diff --git a/apps/tlon-mobile/ios/Podfile.lock b/apps/tlon-mobile/ios/Podfile.lock index afcde31336..a2f40838f4 100644 --- a/apps/tlon-mobile/ios/Podfile.lock +++ b/apps/tlon-mobile/ios/Podfile.lock @@ -3105,6 +3105,6 @@ SPEC CHECKSUMS: UMAppLoader: 7e7e0eaa7854ffd652c00a68c443afb28c3bedba Yoga: 1259c7a8cbaccf7b4c3ddf8ee36ca11be9dee407 -PODFILE CHECKSUM: 500570d1beacee20d34e48624934e3f43e61b2f6 +PODFILE CHECKSUM: dd34a8cdd9a705bb933b1a7bc6788c8909f0edcb COCOAPODS: 1.16.2 diff --git a/cosmos.imports.ts b/cosmos.imports.ts index 4d6d9d1649..ff138b4125 100644 --- a/cosmos.imports.ts +++ b/cosmos.imports.ts @@ -1,92 +1,95 @@ // This file is automatically generated by Cosmos. Add it to .gitignore and // only edit if you know what you're doing. + import { RendererConfig, UserModuleWrappers } from 'react-cosmos-core'; -import * as fixture75 from './apps/tlon-mobile/src/App.fixture'; -import * as fixture78 from './apps/tlon-mobile/src/fixtures/InputToolbar.fixture'; -import * as fixture77 from './apps/tlon-mobile/src/fixtures/Onboarding.fixture'; -import * as fixture76 from './apps/tlon-mobile/src/fixtures/SetNicknameScreen.fixture'; -import * as decorator1 from './apps/tlon-mobile/src/fixtures/cosmos.decorator'; -import * as fixture74 from './packages/app/fixtures/ActionSheet/AddGalleryPostSheet.fixture'; -import * as fixture73 from './packages/app/fixtures/ActionSheet/AttachmentSheet.fixture'; -import * as fixture72 from './packages/app/fixtures/ActionSheet/CreateChannelSheet.fixture'; -import * as fixture71 from './packages/app/fixtures/ActionSheet/EditSectionNameSheet.fixture'; -import * as fixture70 from './packages/app/fixtures/ActionSheet/GenericActionSheet.fixture'; -import * as fixture69 from './packages/app/fixtures/ActionSheet/GroupJoinRequestSheet.fixture'; -import * as fixture68 from './packages/app/fixtures/ActionSheet/GroupPreviewSheet.fixture'; -import * as fixture67 from './packages/app/fixtures/ActionSheet/ProfileSheet.fixture'; -import * as fixture63 from './packages/app/fixtures/Activity.fixture'; -import * as fixture62 from './packages/app/fixtures/AddContactsView.fixture'; -import * as fixture61 from './packages/app/fixtures/AttachmentPreviewList.fixture'; -import * as fixture60 from './packages/app/fixtures/AttestationPane.fixture'; -import * as fixture59 from './packages/app/fixtures/AudioEmbed.fixture'; -import * as fixture58 from './packages/app/fixtures/AudioRecorder.fixture'; -import * as fixture57 from './packages/app/fixtures/Avatar.fixture'; -import * as fixture56 from './packages/app/fixtures/BlockSectionList.fixture'; -import * as fixture55 from './packages/app/fixtures/Button.fixture'; -import * as fixture54 from './packages/app/fixtures/ButtonV2.fixture'; -import * as fixture53 from './packages/app/fixtures/Carousel.fixture'; -import * as fixture52 from './packages/app/fixtures/Channel.fixture'; -import * as fixture51 from './packages/app/fixtures/ChannelConfigurationBar.fixture'; -import * as fixture50 from './packages/app/fixtures/ChannelDivider.fixture'; -import * as fixture49 from './packages/app/fixtures/ChannelHeader.fixture'; -import * as fixture48 from './packages/app/fixtures/ChannelListItem.fixture'; -import * as fixture47 from './packages/app/fixtures/ChatMessage.fixture'; -import * as fixture46 from './packages/app/fixtures/ChatOptionsSheet.fixture'; -import * as fixture45 from './packages/app/fixtures/ConfirmDialog.fixture'; -import * as fixture44 from './packages/app/fixtures/ContactList.fixture'; -import * as fixture43 from './packages/app/fixtures/CreateChatSheet.fixture'; -import * as fixture66 from './packages/app/fixtures/DetailView/ChatDetailView.fixture'; -import * as fixture65 from './packages/app/fixtures/DetailView/GalleryDetailView.fixture'; -import * as fixture64 from './packages/app/fixtures/DetailView/NotebookDetailView.fixture'; -import * as fixture42 from './packages/app/fixtures/DmInviteOptions.fixture'; -import * as fixture41 from './packages/app/fixtures/EditProfileScreen.fixture'; -import * as fixture40 from './packages/app/fixtures/EmbedContent.fixture'; -import * as fixture39 from './packages/app/fixtures/EmptyChannelNotice.fixture'; -import * as fixture38 from './packages/app/fixtures/FacePile.fixture'; -import * as fixture37 from './packages/app/fixtures/Form.fixture'; -import * as fixture36 from './packages/app/fixtures/ForwardChannelListItem.fixture'; -import * as fixture35 from './packages/app/fixtures/GalleryPost.fixture'; -import * as fixture34 from './packages/app/fixtures/GroupListItem.fixture'; -import * as fixture33 from './packages/app/fixtures/Input.fixture'; -import * as fixture32 from './packages/app/fixtures/InviteFriendsToTlonButton.fixture'; -import * as fixture31 from './packages/app/fixtures/InviteUsersSheet.fixture'; -import * as fixture30 from './packages/app/fixtures/MediaImageViewer.fixture'; -import * as fixture29 from './packages/app/fixtures/MessageActions.fixture'; -import * as fixture28 from './packages/app/fixtures/MessageInput.fixture'; -import * as fixture27 from './packages/app/fixtures/MetaEditorScreen.fixture'; -import * as fixture26 from './packages/app/fixtures/NotebookPost.fixture'; -import * as fixture25 from './packages/app/fixtures/Onboarding.fixture'; -import * as fixture24 from './packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture'; -import * as fixture23 from './packages/app/fixtures/PostErrorMessage.fixture'; -import * as fixture22 from './packages/app/fixtures/PostReference.fixture'; -import * as fixture21 from './packages/app/fixtures/PostScreen.fixture'; -import * as fixture20 from './packages/app/fixtures/Pressable.fixture'; -import * as fixture19 from './packages/app/fixtures/ProfileBlock.fixture'; -import * as fixture18 from './packages/app/fixtures/ProfileSheet.fixture'; -import * as fixture17 from './packages/app/fixtures/ProfileStatusSheet.fixture'; -import * as fixture16 from './packages/app/fixtures/ReferenceSkeleton.fixture'; -import * as fixture15 from './packages/app/fixtures/ScreenHeader.fixture'; -import * as fixture14 from './packages/app/fixtures/SearchBar.fixture'; -import * as fixture13 from './packages/app/fixtures/SplashSequence.fixture'; -import * as fixture12 from './packages/app/fixtures/StoppedNodePushSheet.fixture'; -import * as fixture11 from './packages/app/fixtures/StorageQuotaIndicator.fixture'; -import * as fixture10 from './packages/app/fixtures/SummaryCollectionView.fixture'; -import * as fixture9 from './packages/app/fixtures/SystemNotice.fixture'; -import * as fixture8 from './packages/app/fixtures/SystemNotices.fixture'; -import * as fixture7 from './packages/app/fixtures/Text.fixture'; -import * as fixture6 from './packages/app/fixtures/Toast.fixture'; -import * as fixture5 from './packages/app/fixtures/TwitterVerification.fixture'; -import * as fixture4 from './packages/app/fixtures/UserProfileScreen.fixture'; -import * as fixture3 from './packages/app/fixtures/VideoEmbed.fixture'; -import * as fixture2 from './packages/app/fixtures/ViewReactionsSheet.fixture'; -import * as fixture1 from './packages/app/fixtures/Waveform.fixture'; import * as fixture0 from './packages/app/fixtures/WayfindingNotices.fixture'; +import * as fixture1 from './packages/app/fixtures/Waveform.fixture'; +import * as fixture2 from './packages/app/fixtures/ViewReactionsSheet.fixture'; +import * as fixture3 from './packages/app/fixtures/VideoEmbed.fixture'; +import * as fixture4 from './packages/app/fixtures/UserProfileScreen.fixture'; +import * as fixture5 from './packages/app/fixtures/TwitterVerification.fixture'; +import * as fixture6 from './packages/app/fixtures/Toast.fixture'; +import * as fixture7 from './packages/app/fixtures/Text.fixture'; +import * as fixture8 from './packages/app/fixtures/SystemNotices.fixture'; +import * as fixture9 from './packages/app/fixtures/SystemNotice.fixture'; +import * as fixture10 from './packages/app/fixtures/SummaryCollectionView.fixture'; +import * as fixture11 from './packages/app/fixtures/StorageQuotaIndicator.fixture'; +import * as fixture12 from './packages/app/fixtures/StoppedNodePushSheet.fixture'; +import * as fixture13 from './packages/app/fixtures/SplashSequence.fixture'; +import * as fixture14 from './packages/app/fixtures/SearchBar.fixture'; +import * as fixture15 from './packages/app/fixtures/ScreenHeader.fixture'; +import * as fixture16 from './packages/app/fixtures/ReferenceSkeleton.fixture'; +import * as fixture17 from './packages/app/fixtures/ProfileStatusSheet.fixture'; +import * as fixture18 from './packages/app/fixtures/ProfileSheet.fixture'; +import * as fixture19 from './packages/app/fixtures/ProfileBlock.fixture'; +import * as fixture20 from './packages/app/fixtures/Pressable.fixture'; +import * as fixture21 from './packages/app/fixtures/PostScreen.fixture'; +import * as fixture22 from './packages/app/fixtures/PostReference.fixture'; +import * as fixture23 from './packages/app/fixtures/PostErrorMessage.fixture'; +import * as fixture24 from './packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture'; +import * as fixture25 from './packages/app/fixtures/Onboarding.fixture'; +import * as fixture26 from './packages/app/fixtures/NotebookPost.fixture'; +import * as fixture27 from './packages/app/fixtures/MetaEditorScreen.fixture'; +import * as fixture28 from './packages/app/fixtures/MessageInput.fixture'; +import * as fixture29 from './packages/app/fixtures/MessageActions.fixture'; +import * as fixture30 from './packages/app/fixtures/MediaImageViewer.fixture'; +import * as fixture31 from './packages/app/fixtures/InviteUsersSheet.fixture'; +import * as fixture32 from './packages/app/fixtures/InviteFriendsToTlonButton.fixture'; +import * as fixture33 from './packages/app/fixtures/Input.fixture'; +import * as fixture34 from './packages/app/fixtures/GroupListItem.fixture'; +import * as fixture35 from './packages/app/fixtures/GestureMediaViewer.fixture'; +import * as fixture36 from './packages/app/fixtures/GalleryPost.fixture'; +import * as fixture37 from './packages/app/fixtures/ForwardChannelListItem.fixture'; +import * as fixture38 from './packages/app/fixtures/Form.fixture'; +import * as fixture39 from './packages/app/fixtures/FacePile.fixture'; +import * as fixture40 from './packages/app/fixtures/EmptyChannelNotice.fixture'; +import * as fixture41 from './packages/app/fixtures/EmbedContent.fixture'; +import * as fixture42 from './packages/app/fixtures/EditProfileScreen.fixture'; +import * as fixture43 from './packages/app/fixtures/DmInviteOptions.fixture'; +import * as fixture44 from './packages/app/fixtures/CreateChatSheet.fixture'; +import * as fixture45 from './packages/app/fixtures/ContactList.fixture'; +import * as fixture46 from './packages/app/fixtures/ConfirmDialog.fixture'; +import * as fixture47 from './packages/app/fixtures/ChatOptionsSheet.fixture'; +import * as fixture48 from './packages/app/fixtures/ChatMessage.fixture'; +import * as fixture49 from './packages/app/fixtures/ChannelListItem.fixture'; +import * as fixture50 from './packages/app/fixtures/ChannelHeader.fixture'; +import * as fixture51 from './packages/app/fixtures/ChannelDivider.fixture'; +import * as fixture52 from './packages/app/fixtures/ChannelConfigurationBar.fixture'; +import * as fixture53 from './packages/app/fixtures/Channel.fixture'; +import * as fixture54 from './packages/app/fixtures/Carousel.fixture'; +import * as fixture55 from './packages/app/fixtures/ButtonV2.fixture'; +import * as fixture56 from './packages/app/fixtures/Button.fixture'; +import * as fixture57 from './packages/app/fixtures/BlockSectionList.fixture'; +import * as fixture58 from './packages/app/fixtures/Avatar.fixture'; +import * as fixture59 from './packages/app/fixtures/AudioRecorder.fixture'; +import * as fixture60 from './packages/app/fixtures/AudioEmbed.fixture'; +import * as fixture61 from './packages/app/fixtures/AttestationPane.fixture'; +import * as fixture62 from './packages/app/fixtures/AttachmentPreviewList.fixture'; +import * as fixture63 from './packages/app/fixtures/AddContactsView.fixture'; +import * as fixture64 from './packages/app/fixtures/Activity.fixture'; +import * as fixture65 from './packages/app/fixtures/DetailView/NotebookDetailView.fixture'; +import * as fixture66 from './packages/app/fixtures/DetailView/GalleryDetailView.fixture'; +import * as fixture67 from './packages/app/fixtures/DetailView/ChatDetailView.fixture'; +import * as fixture68 from './packages/app/fixtures/ActionSheet/ProfileSheet.fixture'; +import * as fixture69 from './packages/app/fixtures/ActionSheet/GroupPreviewSheet.fixture'; +import * as fixture70 from './packages/app/fixtures/ActionSheet/GroupJoinRequestSheet.fixture'; +import * as fixture71 from './packages/app/fixtures/ActionSheet/GenericActionSheet.fixture'; +import * as fixture72 from './packages/app/fixtures/ActionSheet/EditSectionNameSheet.fixture'; +import * as fixture73 from './packages/app/fixtures/ActionSheet/CreateChannelSheet.fixture'; +import * as fixture74 from './packages/app/fixtures/ActionSheet/AttachmentSheet.fixture'; +import * as fixture75 from './packages/app/fixtures/ActionSheet/AddGalleryPostSheet.fixture'; +import * as fixture76 from './apps/tlon-mobile/src/App.fixture'; +import * as fixture77 from './apps/tlon-mobile/src/fixtures/SetNicknameScreen.fixture'; +import * as fixture78 from './apps/tlon-mobile/src/fixtures/Onboarding.fixture'; +import * as fixture79 from './apps/tlon-mobile/src/fixtures/InputToolbar.fixture'; + import * as decorator0 from './packages/app/fixtures/cosmos.decorator'; +import * as decorator1 from './apps/tlon-mobile/src/fixtures/cosmos.decorator'; export const rendererConfig: RendererConfig = { - playgroundUrl: 'http://localhost:5001', - rendererUrl: null, + "playgroundUrl": "http://localhost:5001", + "rendererUrl": null }; const fixtures = { @@ -100,15 +103,9 @@ const fixtures = { 'packages/app/fixtures/Text.fixture.tsx': { module: fixture7 }, 'packages/app/fixtures/SystemNotices.fixture.tsx': { module: fixture8 }, 'packages/app/fixtures/SystemNotice.fixture.tsx': { module: fixture9 }, - 'packages/app/fixtures/SummaryCollectionView.fixture.tsx': { - module: fixture10, - }, - 'packages/app/fixtures/StorageQuotaIndicator.fixture.tsx': { - module: fixture11, - }, - 'packages/app/fixtures/StoppedNodePushSheet.fixture.tsx': { - module: fixture12, - }, + 'packages/app/fixtures/SummaryCollectionView.fixture.tsx': { module: fixture10 }, + 'packages/app/fixtures/StorageQuotaIndicator.fixture.tsx': { module: fixture11 }, + 'packages/app/fixtures/StoppedNodePushSheet.fixture.tsx': { module: fixture12 }, 'packages/app/fixtures/SplashSequence.fixture.tsx': { module: fixture13 }, 'packages/app/fixtures/SearchBar.fixture.tsx': { module: fixture14 }, 'packages/app/fixtures/ScreenHeader.fixture.tsx': { module: fixture15 }, @@ -120,9 +117,7 @@ const fixtures = { 'packages/app/fixtures/PostScreen.fixture.tsx': { module: fixture21 }, 'packages/app/fixtures/PostReference.fixture.tsx': { module: fixture22 }, 'packages/app/fixtures/PostErrorMessage.fixture.tsx': { module: fixture23 }, - 'packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx': { - module: fixture24, - }, + 'packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx': { module: fixture24 }, 'packages/app/fixtures/Onboarding.fixture.tsx': { module: fixture25 }, 'packages/app/fixtures/NotebookPost.fixture.tsx': { module: fixture26 }, 'packages/app/fixtures/MetaEditorScreen.fixture.tsx': { module: fixture27 }, @@ -130,96 +125,63 @@ const fixtures = { 'packages/app/fixtures/MessageActions.fixture.tsx': { module: fixture29 }, 'packages/app/fixtures/MediaImageViewer.fixture.tsx': { module: fixture30 }, 'packages/app/fixtures/InviteUsersSheet.fixture.tsx': { module: fixture31 }, - 'packages/app/fixtures/InviteFriendsToTlonButton.fixture.tsx': { - module: fixture32, - }, + 'packages/app/fixtures/InviteFriendsToTlonButton.fixture.tsx': { module: fixture32 }, 'packages/app/fixtures/Input.fixture.tsx': { module: fixture33 }, 'packages/app/fixtures/GroupListItem.fixture.tsx': { module: fixture34 }, - 'packages/app/fixtures/GalleryPost.fixture.tsx': { module: fixture35 }, - 'packages/app/fixtures/ForwardChannelListItem.fixture.tsx': { - module: fixture36, - }, - 'packages/app/fixtures/Form.fixture.tsx': { module: fixture37 }, - 'packages/app/fixtures/FacePile.fixture.tsx': { module: fixture38 }, - 'packages/app/fixtures/EmptyChannelNotice.fixture.tsx': { module: fixture39 }, - 'packages/app/fixtures/EmbedContent.fixture.tsx': { module: fixture40 }, - 'packages/app/fixtures/EditProfileScreen.fixture.tsx': { module: fixture41 }, - 'packages/app/fixtures/DmInviteOptions.fixture.tsx': { module: fixture42 }, - 'packages/app/fixtures/CreateChatSheet.fixture.tsx': { module: fixture43 }, - 'packages/app/fixtures/ContactList.fixture.tsx': { module: fixture44 }, - 'packages/app/fixtures/ConfirmDialog.fixture.tsx': { module: fixture45 }, - 'packages/app/fixtures/ChatOptionsSheet.fixture.tsx': { module: fixture46 }, - 'packages/app/fixtures/ChatMessage.fixture.tsx': { module: fixture47 }, - 'packages/app/fixtures/ChannelListItem.fixture.tsx': { module: fixture48 }, - 'packages/app/fixtures/ChannelHeader.fixture.tsx': { module: fixture49 }, - 'packages/app/fixtures/ChannelDivider.fixture.tsx': { module: fixture50 }, - 'packages/app/fixtures/ChannelConfigurationBar.fixture.tsx': { - module: fixture51, - }, - 'packages/app/fixtures/Channel.fixture.tsx': { module: fixture52 }, - 'packages/app/fixtures/Carousel.fixture.tsx': { module: fixture53 }, - 'packages/app/fixtures/ButtonV2.fixture.tsx': { module: fixture54 }, - 'packages/app/fixtures/Button.fixture.tsx': { module: fixture55 }, - 'packages/app/fixtures/BlockSectionList.fixture.tsx': { module: fixture56 }, - 'packages/app/fixtures/Avatar.fixture.tsx': { module: fixture57 }, - 'packages/app/fixtures/AudioRecorder.fixture.tsx': { module: fixture58 }, - 'packages/app/fixtures/AudioEmbed.fixture.tsx': { module: fixture59 }, - 'packages/app/fixtures/AttestationPane.fixture.tsx': { module: fixture60 }, - 'packages/app/fixtures/AttachmentPreviewList.fixture.tsx': { - module: fixture61, - }, - 'packages/app/fixtures/AddContactsView.fixture.tsx': { module: fixture62 }, - 'packages/app/fixtures/Activity.fixture.tsx': { module: fixture63 }, - 'packages/app/fixtures/DetailView/NotebookDetailView.fixture.tsx': { - module: fixture64, - }, - 'packages/app/fixtures/DetailView/GalleryDetailView.fixture.tsx': { - module: fixture65, - }, - 'packages/app/fixtures/DetailView/ChatDetailView.fixture.tsx': { - module: fixture66, - }, - 'packages/app/fixtures/ActionSheet/ProfileSheet.fixture.tsx': { - module: fixture67, - }, - 'packages/app/fixtures/ActionSheet/GroupPreviewSheet.fixture.tsx': { - module: fixture68, - }, - 'packages/app/fixtures/ActionSheet/GroupJoinRequestSheet.fixture.tsx': { - module: fixture69, - }, - 'packages/app/fixtures/ActionSheet/GenericActionSheet.fixture.tsx': { - module: fixture70, - }, - 'packages/app/fixtures/ActionSheet/EditSectionNameSheet.fixture.tsx': { - module: fixture71, - }, - 'packages/app/fixtures/ActionSheet/CreateChannelSheet.fixture.tsx': { - module: fixture72, - }, - 'packages/app/fixtures/ActionSheet/AttachmentSheet.fixture.tsx': { - module: fixture73, - }, - 'packages/app/fixtures/ActionSheet/AddGalleryPostSheet.fixture.tsx': { - module: fixture74, - }, - 'apps/tlon-mobile/src/App.fixture.tsx': { module: fixture75 }, - 'apps/tlon-mobile/src/fixtures/SetNicknameScreen.fixture.tsx': { - module: fixture76, - }, - 'apps/tlon-mobile/src/fixtures/Onboarding.fixture.tsx': { module: fixture77 }, - 'apps/tlon-mobile/src/fixtures/InputToolbar.fixture.tsx': { - module: fixture78, - }, + 'packages/app/fixtures/GestureMediaViewer.fixture.tsx': { module: fixture35 }, + 'packages/app/fixtures/GalleryPost.fixture.tsx': { module: fixture36 }, + 'packages/app/fixtures/ForwardChannelListItem.fixture.tsx': { module: fixture37 }, + 'packages/app/fixtures/Form.fixture.tsx': { module: fixture38 }, + 'packages/app/fixtures/FacePile.fixture.tsx': { module: fixture39 }, + 'packages/app/fixtures/EmptyChannelNotice.fixture.tsx': { module: fixture40 }, + 'packages/app/fixtures/EmbedContent.fixture.tsx': { module: fixture41 }, + 'packages/app/fixtures/EditProfileScreen.fixture.tsx': { module: fixture42 }, + 'packages/app/fixtures/DmInviteOptions.fixture.tsx': { module: fixture43 }, + 'packages/app/fixtures/CreateChatSheet.fixture.tsx': { module: fixture44 }, + 'packages/app/fixtures/ContactList.fixture.tsx': { module: fixture45 }, + 'packages/app/fixtures/ConfirmDialog.fixture.tsx': { module: fixture46 }, + 'packages/app/fixtures/ChatOptionsSheet.fixture.tsx': { module: fixture47 }, + 'packages/app/fixtures/ChatMessage.fixture.tsx': { module: fixture48 }, + 'packages/app/fixtures/ChannelListItem.fixture.tsx': { module: fixture49 }, + 'packages/app/fixtures/ChannelHeader.fixture.tsx': { module: fixture50 }, + 'packages/app/fixtures/ChannelDivider.fixture.tsx': { module: fixture51 }, + 'packages/app/fixtures/ChannelConfigurationBar.fixture.tsx': { module: fixture52 }, + 'packages/app/fixtures/Channel.fixture.tsx': { module: fixture53 }, + 'packages/app/fixtures/Carousel.fixture.tsx': { module: fixture54 }, + 'packages/app/fixtures/ButtonV2.fixture.tsx': { module: fixture55 }, + 'packages/app/fixtures/Button.fixture.tsx': { module: fixture56 }, + 'packages/app/fixtures/BlockSectionList.fixture.tsx': { module: fixture57 }, + 'packages/app/fixtures/Avatar.fixture.tsx': { module: fixture58 }, + 'packages/app/fixtures/AudioRecorder.fixture.tsx': { module: fixture59 }, + 'packages/app/fixtures/AudioEmbed.fixture.tsx': { module: fixture60 }, + 'packages/app/fixtures/AttestationPane.fixture.tsx': { module: fixture61 }, + 'packages/app/fixtures/AttachmentPreviewList.fixture.tsx': { module: fixture62 }, + 'packages/app/fixtures/AddContactsView.fixture.tsx': { module: fixture63 }, + 'packages/app/fixtures/Activity.fixture.tsx': { module: fixture64 }, + 'packages/app/fixtures/DetailView/NotebookDetailView.fixture.tsx': { module: fixture65 }, + 'packages/app/fixtures/DetailView/GalleryDetailView.fixture.tsx': { module: fixture66 }, + 'packages/app/fixtures/DetailView/ChatDetailView.fixture.tsx': { module: fixture67 }, + 'packages/app/fixtures/ActionSheet/ProfileSheet.fixture.tsx': { module: fixture68 }, + 'packages/app/fixtures/ActionSheet/GroupPreviewSheet.fixture.tsx': { module: fixture69 }, + 'packages/app/fixtures/ActionSheet/GroupJoinRequestSheet.fixture.tsx': { module: fixture70 }, + 'packages/app/fixtures/ActionSheet/GenericActionSheet.fixture.tsx': { module: fixture71 }, + 'packages/app/fixtures/ActionSheet/EditSectionNameSheet.fixture.tsx': { module: fixture72 }, + 'packages/app/fixtures/ActionSheet/CreateChannelSheet.fixture.tsx': { module: fixture73 }, + 'packages/app/fixtures/ActionSheet/AttachmentSheet.fixture.tsx': { module: fixture74 }, + 'packages/app/fixtures/ActionSheet/AddGalleryPostSheet.fixture.tsx': { module: fixture75 }, + 'apps/tlon-mobile/src/App.fixture.tsx': { module: fixture76 }, + 'apps/tlon-mobile/src/fixtures/SetNicknameScreen.fixture.tsx': { module: fixture77 }, + 'apps/tlon-mobile/src/fixtures/Onboarding.fixture.tsx': { module: fixture78 }, + 'apps/tlon-mobile/src/fixtures/InputToolbar.fixture.tsx': { module: fixture79 } }; const decorators = { 'packages/app/fixtures/cosmos.decorator.tsx': { module: decorator0 }, - 'apps/tlon-mobile/src/fixtures/cosmos.decorator.tsx': { module: decorator1 }, + 'apps/tlon-mobile/src/fixtures/cosmos.decorator.tsx': { module: decorator1 } }; export const moduleWrappers: UserModuleWrappers = { lazy: false, fixtures, - decorators, + decorators }; diff --git a/packages/app/features/settings/ThemeScreen.tsx b/packages/app/features/settings/ThemeScreen.tsx index bfd4b61c77..0f3034155b 100644 --- a/packages/app/features/settings/ThemeScreen.tsx +++ b/packages/app/features/settings/ThemeScreen.tsx @@ -1,20 +1,31 @@ import { NativeStackScreenProps } from '@react-navigation/native-stack'; import { useThemeSettings } from '@tloncorp/shared'; import * as store from '@tloncorp/shared/store'; -import { useEffect, useState } from 'react'; -import { ScrollView, YStack } from 'tamagui'; +import { + ThemeHarmony, + ThemeMode, + builtInThemeOptions, + createCustomThemeDefinition, + customThemeSlotId, + getCustomThemeName, + getCustomThemeRuntimeName, +} from '@tloncorp/shared/utils'; +import { Fragment, useCallback, useEffect, useMemo, useState } from 'react'; +import { ScrollView, Slider, XStack, YStack } from 'tamagui'; import { useTheme } from 'tamagui'; import { useIsDarkMode } from '../../hooks/useIsDarkMode'; import { RootStackParamList } from '../../navigation/types'; import { AppTheme } from '../../types/theme'; import { + Button, ListItem, ListItemInputOption, LoadingSpinner, Pressable, RadioControl, ScreenHeader, + Text, View, useIsWindowNarrow, } from '../../ui'; @@ -22,36 +33,69 @@ import { normalizeTheme } from '../../ui/utils/themeUtils'; type Props = NativeStackScreenProps; +const harmonyOptions: { title: string; value: ThemeHarmony }[] = [ + { title: 'Analogous', value: 'analogous' }, + { title: 'Monochromatic', value: 'monochromatic' }, + { title: 'Complementary', value: 'complementary' }, + { title: 'Split complementary', value: 'split-complementary' }, + { title: 'Triadic', value: 'triadic' }, +]; + +const modeOptions: { title: string; value: ThemeMode }[] = [ + { title: 'Dark', value: 'dark' }, + { title: 'Light', value: 'light' }, +]; + export function ThemeScreen(props: Props) { const theme = useTheme(); const { data: storedTheme, isLoading } = useThemeSettings(); + const { value: localThemePreference } = store.useLocalThemePreference(); + const { value: customThemes, setValue: setCustomThemes } = + store.useCustomThemes(); const isDarkMode = useIsDarkMode(); const [selectedTheme, setSelectedTheme] = useState('auto'); const [loadingTheme, setLoadingTheme] = useState(null); + const [customThemeHue, setCustomThemeHue] = useState(210); + const [customThemeMode, setCustomThemeMode] = useState('dark'); + const [customThemeHarmony, setCustomThemeHarmony] = + useState('analogous'); + const [customThemeAccentSpread, setCustomThemeAccentSpread] = useState(72); + const [customThemeSaturation, setCustomThemeSaturation] = useState(66); + const [customThemeBrightness, setCustomThemeBrightness] = useState(82); + const [savingCustomTheme, setSavingCustomTheme] = useState(false); - const themes: ListItemInputOption[] = [ - { - title: 'Auto', - value: 'auto', - subtitle: `Uses system ${isDarkMode ? 'dark' : 'light'} theme`, - }, - { title: 'Tlon Light', value: 'light' }, - { title: 'Tlon Dark', value: 'dark' }, - { title: 'Dracula', value: 'dracula' }, - { title: 'Greenscreen', value: 'greenscreen' }, - { title: 'Gruvbox', value: 'gruvbox' }, - { title: 'Monokai', value: 'monokai' }, - { title: 'Nord', value: 'nord' }, - { title: 'Peony', value: 'peony' }, - { title: 'Solarized', value: 'solarized' }, - ]; + const savedCustomTheme = customThemes[0]; + const customThemeValue = savedCustomTheme + ? getCustomThemeRuntimeName(savedCustomTheme) + : getCustomThemeName(customThemeSlotId); + + const customThemeNames = useMemo( + () => customThemes.map(getCustomThemeRuntimeName), + [customThemes] + ); + + const themes: ListItemInputOption[] = useMemo( + () => [ + { + title: 'Auto', + value: 'auto', + subtitle: `Uses system ${isDarkMode ? 'dark' : 'light'} theme`, + }, + ...builtInThemeOptions, + { + title: 'Custom', + value: customThemeValue, + }, + ], + [customThemeValue, isDarkMode] + ); const handleThemeChange = async (value: AppTheme) => { if (value === selectedTheme || loadingTheme) return; setLoadingTheme(value); try { - await store.updateTheme(value); + await store.updateThemePreference(value); setSelectedTheme(value); } catch (err) { console.error('Failed to save theme preference:', err); @@ -60,11 +104,70 @@ export function ThemeScreen(props: Props) { } }; + const handleCreateCustomTheme = async () => { + if (savingCustomTheme) return null; + + setSavingCustomTheme(true); + try { + const customTheme = createCustomThemeDefinition({ + name: 'Custom', + hue: customThemeHue, + mode: customThemeMode, + harmony: customThemeHarmony, + width: customThemeAccentSpread, + saturation: customThemeSaturation, + brightness: customThemeBrightness, + createdAt: savedCustomTheme?.createdAt, + }); + const runtimeName = getCustomThemeRuntimeName(customTheme); + + await setCustomThemes([customTheme]); + await store.updateThemePreference(runtimeName); + setSelectedTheme(runtimeName); + return runtimeName; + } catch (err) { + console.error('Failed to create custom theme:', err); + return null; + } finally { + setSavingCustomTheme(false); + } + }; + + const handleCustomThemeChange = async () => { + if (savedCustomTheme) { + await handleThemeChange(customThemeValue); + return; + } + + await handleCreateCustomTheme(); + }; + + useEffect(() => { + if (!savedCustomTheme) { + return; + } + + setCustomThemeHue(savedCustomTheme.params.hue); + setCustomThemeMode(savedCustomTheme.mode); + setCustomThemeHarmony(savedCustomTheme.params.harmony); + setCustomThemeAccentSpread(savedCustomTheme.params.width); + setCustomThemeSaturation(savedCustomTheme.params.saturation); + setCustomThemeBrightness(savedCustomTheme.params.brightness); + }, [savedCustomTheme]); + + useEffect(() => { + if (customThemes.length > 1 && savedCustomTheme) { + setCustomThemes([savedCustomTheme]); + } + }, [customThemes.length, savedCustomTheme, setCustomThemes]); + useEffect(() => { if (!isLoading && storedTheme !== undefined) { - setSelectedTheme(normalizeTheme(storedTheme)); + setSelectedTheme( + normalizeTheme(localThemePreference ?? storedTheme, customThemeNames) + ); } - }, [storedTheme, isLoading]); + }, [storedTheme, localThemePreference, customThemeNames, isLoading]); const isWindowNarrow = useIsWindowNarrow(); @@ -87,33 +190,215 @@ export function ThemeScreen(props: Props) { > {themes.map((theme) => ( - handleThemeChange(theme.value)} - borderRadius="$xl" - > - - - {theme.title} - {theme.subtitle && ( - {theme.subtitle} - )} - - - {loadingTheme === theme.value ? ( - - - - ) : ( - - )} - - - + + + theme.value === customThemeValue + ? handleCustomThemeChange() + : handleThemeChange(theme.value) + } + borderRadius="$xl" + > + + + {theme.title} + {theme.subtitle && ( + {theme.subtitle} + )} + + + {loadingTheme === theme.value || + (theme.value === customThemeValue && savingCustomTheme) ? ( + + + + ) : ( + + )} + + + + {theme.value === customThemeValue && + selectedTheme === customThemeValue && ( + + + + label="Harmony" + options={harmonyOptions} + value={customThemeHarmony} + onChange={setCustomThemeHarmony} + presentation="scroll" + /> + + + + + label="Appearance" + options={modeOptions} + value={customThemeMode} + onChange={setCustomThemeMode} + presentation="segmented" + /> +