Skip to content

Commit

Permalink
Specify root imports of design-system
Browse files Browse the repository at this point in the history
- it's easier to debug and quicker to bundle
  • Loading branch information
gdbroman committed Jul 12, 2023
1 parent a2cceb2 commit bff1c1f
Show file tree
Hide file tree
Showing 140 changed files with 254 additions and 211 deletions.
2 changes: 1 addition & 1 deletion app/src/main/helpers/mouseEvents.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BrowserWindow, ipcMain, screen } from 'electron';

import { Position } from '@holium/design-system';
import { Position } from '@holium/design-system/util';
import { MouseState, PresenceArg } from '@holium/realm-presence';

import { denormalizePosition } from '../../renderer/lib/window-manager';
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/preload.multiplayer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ipcRenderer } from 'electron';

import { Position } from '@holium/design-system';
import { Position } from '@holium/design-system/util';
import { MouseState, PresenceArg } from '@holium/realm-presence';

export const multiplayerPreload = {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/preload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { contextBridge, ipcRenderer } from 'electron';

import { Position } from '@holium/design-system';
import { Position } from '@holium/design-system/util';
import { MouseState } from '@holium/realm-presence';

import { ConduitState } from 'os/services/api';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/AppLoading.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Centered, Fill, ViewPort } from 'react-spaces';

import { Flex, Spinner } from '@holium/design-system';
import { Flex, Spinner } from '@holium/design-system/general';

export const AppLoading = () => (
<ViewPort>
Expand Down
8 changes: 7 additions & 1 deletion app/src/renderer/apps/Account/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { observer } from 'mobx-react';

import { Avatar, Button, Flex, Icon, Text } from '@holium/design-system';
import {
Avatar,
Button,
Flex,
Icon,
Text,
} from '@holium/design-system/general';

import { trackEvent } from 'renderer/lib/track';
import { useAppState } from 'renderer/stores/app.store';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Browser/BrowserWebview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useMemo, useState } from 'react';
import { observer } from 'mobx-react';

import { Text } from '@holium/design-system';
import { Text } from '@holium/design-system/general';

import { useAppState } from 'renderer/stores/app.store';
import { WebView } from 'renderer/system/desktop/components/AppWindow/View/WebView';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex } from '@holium/design-system';
import { Flex } from '@holium/design-system/general';

import { AppWindowIcon } from 'renderer/system/desktop/components/AppWindow/AppWindowIcon';

Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Browser/Toolbar/ToolbarLockIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, Icon, Spinner } from '@holium/design-system';
import { Flex, Icon, Spinner } from '@holium/design-system/general';

type Props = {
loading: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RefObject } from 'react';

import { Flex } from '@holium/design-system';
import { Flex } from '@holium/design-system/general';

import { AppWindowIcon } from 'renderer/system/desktop/components/AppWindow/AppWindowIcon';

Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Courier/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from 'react';
import { LayoutGroup } from 'framer-motion';
import { observer } from 'mobx-react';

import { Flex, Spinner, Text } from '@holium/design-system';
import { Flex, Spinner, Text } from '@holium/design-system/general';

import { useTrayApps } from 'renderer/apps/store';
import { useShipStore } from 'renderer/stores/ship.store';
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/apps/Courier/components/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { observer } from 'mobx-react';
import {
Bubble,
convertFragmentsToText,
MenuItemProps,
OnReactionPayload,
} from '@holium/design-system';
} from '@holium/design-system/blocks';
import { MenuItemProps } from '@holium/design-system/navigation';
import { useToggle } from '@holium/design-system/util';

import { SystemTrayRegistry } from 'renderer/apps/registry';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Courier/components/GroupSigil.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC } from 'react';

import { Avatar, Flex } from '@holium/design-system';
import { Avatar, Flex } from '@holium/design-system/general';

import { Patp } from 'os/types';
import { useShipStore } from 'renderer/stores/ship.store';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Courier/components/UnreadBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, Text } from '@holium/design-system';
import { Flex, Text } from '@holium/design-system/general';

export const UnreadBadge = ({ count }: { count: number }) => {
return (
Expand Down
8 changes: 5 additions & 3 deletions app/src/renderer/apps/Courier/views/ChatInfo/ChatInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import {
Box,
Flex,
Icon,
InlineEdit,
NoScrollBar,
SectionDivider,
Select,
Text,
} from '@holium/design-system/general';
import {
InlineEdit,
Select,
TextInput,
Toggle,
} from '@holium/design-system';
} from '@holium/design-system/inputs';

import { FileUploadParams } from 'os/services/ship/ship.service';
import { ShipSearch } from 'renderer/components/ShipSearch';
Expand Down
6 changes: 3 additions & 3 deletions app/src/renderer/apps/Courier/views/ChatLog/ChatLog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
fetchOGData,
measureImage,
measureTweet,
parseMediaType,
WindowedListRef,
} from '@holium/design-system';
} from '@holium/design-system/blocks';
import { WindowedListRef } from '@holium/design-system/general';
import { parseMediaType } from '@holium/design-system/util';

import { useTrayApps } from 'renderer/apps/store';
import { trackEvent } from 'renderer/lib/track';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
Icon,
Spinner,
Text,
TextInput,
Tooltip,
} from '@holium/design-system';
} from '@holium/design-system/general';
import { TextInput } from '@holium/design-system/inputs';

import { ChatPathType } from 'os/services/ship/chat/chat.types';
import { ShipSearch } from 'renderer/components/ShipSearch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { motion } from 'framer-motion';
import { observer } from 'mobx-react';
import styled from 'styled-components';

import { Avatar, Button, Flex, Icon, Text } from '@holium/design-system';
import {
Avatar,
Button,
Flex,
Icon,
Text,
} from '@holium/design-system/general';

import { useShipStore } from 'renderer/stores/ship.store';

Expand Down
8 changes: 7 additions & 1 deletion app/src/renderer/apps/Rooms/List.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { useEffect } from 'react';
import { observer } from 'mobx-react';

import { Button, Flex, Icon, Text, Tooltip } from '@holium/design-system';
import {
Button,
Flex,
Icon,
Text,
Tooltip,
} from '@holium/design-system/general';

import { useSound } from 'renderer/lib/sound';
import { trackEvent } from 'renderer/lib/track';
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/apps/Rooms/NewRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
Icon,
Spinner,
Text,
TextInput,
} from '@holium/design-system';
} from '@holium/design-system/general';
import { TextInput } from '@holium/design-system/inputs';

import { useSound } from 'renderer/lib/sound';
import { useAppState } from 'renderer/stores/app.store';
Expand Down
6 changes: 3 additions & 3 deletions app/src/renderer/apps/Rooms/Room/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { useCallback, useMemo, useRef } from 'react';
import { createField, createForm } from 'mobx-easy-form';
import { observer } from 'mobx-react';

import { Bubble } from '@holium/design-system/blocks';
import {
Box,
Bubble,
Button,
Flex,
Icon,
Text,
TextInput,
WindowedList,
} from '@holium/design-system';
} from '@holium/design-system/general';
import { TextInput } from '@holium/design-system/inputs';

import { useTrayApps } from 'renderer/apps/store';
import { useAppState } from 'renderer/stores/app.store';
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/apps/Rooms/Room/Invite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
Icon,
Spinner,
Text,
TextInput,
} from '@holium/design-system';
} from '@holium/design-system/general';
import { TextInput } from '@holium/design-system/inputs';

import { useAppState } from 'renderer/stores/app.store';

Expand Down
8 changes: 7 additions & 1 deletion app/src/renderer/apps/Rooms/Room/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { useEffect, useState } from 'react';
import { observer } from 'mobx-react';

import { Button, CommButton, Flex, Icon, Text } from '@holium/design-system';
import {
Button,
CommButton,
Flex,
Icon,
Text,
} from '@holium/design-system/general';

import { useTrayApps } from 'renderer/apps/store';
import { Badge } from 'renderer/components';
Expand Down
10 changes: 2 additions & 8 deletions app/src/renderer/apps/Rooms/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { useEffect, useState } from 'react';
import { observer } from 'mobx-react';

import {
Button,
Flex,
Icon,
RadioOption,
Select,
Text,
} from '@holium/design-system';
import { Button, Flex, Icon, Text } from '@holium/design-system/general';
import { RadioOption, Select } from '@holium/design-system/inputs';

import { useTrayApps } from '../store';
import { useRoomsStore } from './store/RoomsStoreContext';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Rooms/components/AvatarRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { observer } from 'mobx-react';

import { Avatar, Box, Flex } from '@holium/design-system';
import { Avatar, Box, Flex } from '@holium/design-system/general';

import { useShipStore } from 'renderer/stores/ship.store';

Expand Down
8 changes: 7 additions & 1 deletion app/src/renderer/apps/Rooms/components/DynamicSpeaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import BeatLoader from 'react-spinners/BeatLoader';
import { observer } from 'mobx-react';
import styled from 'styled-components';

import { Avatar, Flex, FlexProps, Icon, Text } from '@holium/design-system';
import {
Avatar,
Flex,
FlexProps,
Icon,
Text,
} from '@holium/design-system/general';

import { ContextMenuOption, useContextMenu } from 'renderer/components';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { observer } from 'mobx-react';
import styled from 'styled-components';

import { Flex, Icon, Text } from '@holium/design-system';
import { Flex, Icon, Text } from '@holium/design-system/general';

import { useRoomsStore } from '../store/RoomsStoreContext';

Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Rooms/components/RoomRow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MouseEvent, useEffect, useMemo } from 'react';
import { observer } from 'mobx-react';

import { Flex, Row, Text } from '@holium/design-system';
import { Flex, Row, Text } from '@holium/design-system/general';

import {
ContextMenuOption,
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Rooms/components/rooms.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { ComponentMeta, ComponentStory } from '@storybook/react';

import { Button, Flex, Text } from '@holium/design-system';
import { Button, Flex, Text } from '@holium/design-system/general';

import { PeerConnectionState } from '../store/room.types';
import { SpeakerGrid } from './SpeakerGrid';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Rooms/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect } from 'react';
import { observer } from 'mobx-react';

import { Flex } from '@holium/design-system';
import { Flex } from '@holium/design-system/general';

import { useTrayApps } from 'renderer/apps/store';
import { useAppState } from 'renderer/stores/app.store';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/FeaturedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Spinner,
Text,
WindowedList,
} from '@holium/design-system';
} from '@holium/design-system/general';

import { useShipStore } from 'renderer/stores/ship.store';

Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/SpaceRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react';
import { observer } from 'mobx-react';
import styled from 'styled-components';

import { Flex, Icon, Row, Text } from '@holium/design-system';
import { Flex, Icon, Row, Text } from '@holium/design-system/general';

import {
ContextMenuOption,
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/SpacesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Icon,
Text,
WindowedList,
} from '@holium/design-system';
} from '@holium/design-system/general';

import { useAppState } from 'renderer/stores/app.store';
import { SpaceModelType } from 'renderer/stores/models/spaces.model';
Expand Down
8 changes: 7 additions & 1 deletion app/src/renderer/apps/Spaces/Workflow/SelectType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { motion } from 'framer-motion';
import { observer } from 'mobx-react';
import styled from 'styled-components';

import { Button, Flex, Icon, Skeleton, Text } from '@holium/design-system';
import {
Button,
Flex,
Icon,
Skeleton,
Text,
} from '@holium/design-system/general';

import { useShipStore } from 'renderer/stores/ship.store';
import { BaseDialogProps } from 'renderer/system/dialog/dialogs';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/YouRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components';

import { Avatar, Box, Flex, Row, Text } from '@holium/design-system';
import { Avatar, Box, Flex, Row, Text } from '@holium/design-system/general';

import { MobXAccount } from 'renderer/stores/models/account.model';
import { SpaceModelType } from 'renderer/stores/models/spaces.model';
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/components/SelectionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
isValidImageUrl,
Row,
Text,
} from '@holium/design-system';
} from '@holium/design-system/general';

import { EmptyGroup } from '../SpaceRow';

Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/apps/Spaces/components/VisaRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Row,
Spinner,
Text,
} from '@holium/design-system';
} from '@holium/design-system/general';

import { Patp } from 'os/types';
import { useShipStore } from 'renderer/stores/ship.store';
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/apps/Spaces/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
Icon,
Spinner,
Text,
TextInput,
} from '@holium/design-system';
} from '@holium/design-system/general';
import { TextInput } from '@holium/design-system/inputs';

import { useAppState } from 'renderer/stores/app.store';
import { useShipStore } from 'renderer/stores/ship.store';
Expand Down
Loading

0 comments on commit bff1c1f

Please sign in to comment.