@oxy.so/bloom 23.8.0 → 23.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/so/oxy/bloom/AvatarLoops.kt +293 -0
- package/android/src/main/java/so/oxy/bloom/AvatarSurface.kt +351 -0
- package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +1 -1
- package/docs/agent-avatar.mdx +77 -1
- package/docs/bloom-language-classnames.mdx +11 -11
- package/docs/bloom-language-codemod.mdx +30 -5
- package/docs/bloom-language-for-agents.mdx +1 -1
- package/docs/bloom-language-modifiers.mdx +222 -77
- package/docs/bloom-language-nodes.mdx +43 -21
- package/docs/bloom-language-tokens.mdx +69 -14
- package/docs/bloom-language.mdx +148 -46
- package/docs/design-tokens.mdx +12 -2
- package/docs/no-nativewind.mdx +5 -2
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/docs/theme.mdx +37 -0
- package/lib/commonjs/accordion/Accordion.js +12 -12
- package/lib/commonjs/accordion/Accordion.js.map +1 -1
- package/lib/commonjs/accordion/Accordion.web.js +8 -8
- package/lib/commonjs/accordion/Accordion.web.js.map +1 -1
- package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js +267 -111
- package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js.map +1 -1
- package/lib/commonjs/agent-avatar/VectorNativeSurface.js +75 -0
- package/lib/commonjs/agent-avatar/VectorNativeSurface.js.map +1 -0
- package/lib/commonjs/agent-avatar/vector-loop.js +161 -0
- package/lib/commonjs/agent-avatar/vector-loop.js.map +1 -0
- package/lib/commonjs/agent-avatar/vector-visibility.js +4 -1
- package/lib/commonjs/agent-avatar/vector-visibility.js.map +1 -1
- package/lib/commonjs/agent-creator/AgentCreatorSection.js +8 -10
- package/lib/commonjs/agent-creator/AgentCreatorSection.js.map +1 -1
- package/lib/commonjs/agent-creator/EmotionPicker.js +3 -5
- package/lib/commonjs/agent-creator/EmotionPicker.js.map +1 -1
- package/lib/commonjs/agent-log/AgentLog.js +131 -174
- package/lib/commonjs/agent-log/AgentLog.js.map +1 -1
- package/lib/commonjs/agent-reply/AgentProfile.js +6 -9
- package/lib/commonjs/agent-reply/AgentProfile.js.map +1 -1
- package/lib/commonjs/agent-thinking/AgentThinking.js +8 -7
- package/lib/commonjs/agent-thinking/AgentThinking.js.map +1 -1
- package/lib/commonjs/agent-thinking/ThinkingReasoning.js +8 -8
- package/lib/commonjs/agent-thinking/ThinkingReasoning.js.map +1 -1
- package/lib/commonjs/app-shell/AppShell.js +5 -7
- package/lib/commonjs/app-shell/AppShell.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellEngine.js +72 -28
- package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellPanelLayout.js +3 -3
- package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/NotificationBell.js +9 -9
- package/lib/commonjs/app-shell/NotificationBell.js.map +1 -1
- package/lib/commonjs/app-shell/PanelReorderHandle.js +4 -6
- package/lib/commonjs/app-shell/PanelReorderHandle.js.map +1 -1
- package/lib/commonjs/avatar-group/AvatarGroupBase.js +7 -7
- package/lib/commonjs/avatar-group/AvatarGroupBase.js.map +1 -1
- package/lib/commonjs/blur/BlurIsland.js +112 -118
- package/lib/commonjs/blur/BlurIsland.js.map +1 -1
- package/lib/commonjs/button/Button.js +12 -22
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/button/GroupBase.js +35 -50
- package/lib/commonjs/button/GroupBase.js.map +1 -1
- package/lib/commonjs/chat-list/ChatSearchResultsBase.js +4 -4
- package/lib/commonjs/chat-list/ChatSearchResultsBase.js.map +1 -1
- package/lib/commonjs/choice-list/ChoiceList.js +5 -5
- package/lib/commonjs/choice-list/ChoiceList.js.map +1 -1
- package/lib/commonjs/color-swatch-picker/ColorSwatchPicker.js +7 -7
- package/lib/commonjs/color-swatch-picker/ColorSwatchPicker.js.map +1 -1
- package/lib/commonjs/connection-dots/ConnectionDots.js +4 -4
- package/lib/commonjs/connection-dots/ConnectionDots.js.map +1 -1
- package/lib/commonjs/connection-dots/ConnectionDots.web.js +4 -4
- package/lib/commonjs/connection-dots/ConnectionDots.web.js.map +1 -1
- package/lib/commonjs/cover-header/CoverHeader.js +3 -3
- package/lib/commonjs/cover-header/CoverHeader.js.map +1 -1
- package/lib/commonjs/data-table/DataTableSelect.js +8 -8
- package/lib/commonjs/data-table/DataTableSelect.js.map +1 -1
- package/lib/commonjs/design-tokens/theme.css +1 -0
- package/lib/commonjs/design-tokens/tokens.json +390 -0
- package/lib/commonjs/dialog/DialogContent.js +5 -4
- package/lib/commonjs/dialog/DialogContent.js.map +1 -1
- package/lib/commonjs/dialog/DialogHeader.js +6 -5
- package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
- package/lib/commonjs/dialog/SheetShell.js +5 -4
- package/lib/commonjs/dialog/SheetShell.js.map +1 -1
- package/lib/commonjs/expandable-text/ExpandableText.js +3 -3
- package/lib/commonjs/expandable-text/ExpandableText.js.map +1 -1
- package/lib/commonjs/floating/lens/lens-cover.js +56 -0
- package/lib/commonjs/floating/lens/lens-cover.js.map +1 -0
- package/lib/commonjs/floating/lens/lens-frame.js +286 -0
- package/lib/commonjs/floating/lens/lens-frame.js.map +1 -0
- package/lib/commonjs/floating/lens/lens-material.js +1 -1
- package/lib/commonjs/floating/lens/native-lens.js.map +1 -1
- package/lib/commonjs/grouped-section/GroupedSection.js +16 -15
- package/lib/commonjs/grouped-section/GroupedSection.js.map +1 -1
- package/lib/commonjs/home-search/BudgetPicker.js +8 -8
- package/lib/commonjs/home-search/BudgetPicker.js.map +1 -1
- package/lib/commonjs/home-search/MoveInPicker.js +7 -7
- package/lib/commonjs/home-search/MoveInPicker.js.map +1 -1
- package/lib/commonjs/icon-circle/IconCircle.js +14 -16
- package/lib/commonjs/icon-circle/IconCircle.js.map +1 -1
- package/lib/commonjs/icons/shared.js +3 -5
- package/lib/commonjs/icons/shared.js.map +1 -1
- package/lib/commonjs/kbd/Kbd.js +8 -8
- package/lib/commonjs/kbd/Kbd.js.map +1 -1
- package/lib/commonjs/layout/ResizeHandle.js +6 -5
- package/lib/commonjs/layout/ResizeHandle.js.map +1 -1
- package/lib/commonjs/link-preview/LinkPreviewCard.js +24 -26
- package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/commonjs/list/ListBase.js +3 -3
- package/lib/commonjs/list/ListBase.js.map +1 -1
- package/lib/commonjs/list/ListPerson.js +3 -3
- package/lib/commonjs/list/ListPerson.js.map +1 -1
- package/lib/commonjs/listing-editor/ListingPreviewPane.js +30 -30
- package/lib/commonjs/listing-editor/ListingPreviewPane.js.map +1 -1
- package/lib/commonjs/markdown/InlineMarkdown.js +9 -11
- package/lib/commonjs/markdown/InlineMarkdown.js.map +1 -1
- package/lib/commonjs/markdown/MarkdownBlocks.js +35 -43
- package/lib/commonjs/markdown/MarkdownBlocks.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js +5 -8
- package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/SelectedAgentPreview.js +9 -11
- package/lib/commonjs/multi-agent-chat/SelectedAgentPreview.js.map +1 -1
- package/lib/commonjs/notifications/NotificationPermissionSheet.js +3 -5
- package/lib/commonjs/notifications/NotificationPermissionSheet.js.map +1 -1
- package/lib/commonjs/notifications/NotificationsScreen.js +21 -27
- package/lib/commonjs/notifications/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/overlay/OverlayInertBoundary.js +33 -12
- package/lib/commonjs/overlay/OverlayInertBoundary.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +24 -15
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/page-header/PageHeaderTitleInput.js +20 -20
- package/lib/commonjs/page-header/PageHeaderTitleInput.js.map +1 -1
- package/lib/commonjs/panel-routing/expo-router/StackScene.js +43 -24
- package/lib/commonjs/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/commonjs/phone-input/CountryCodeSelect.js +4 -4
- package/lib/commonjs/phone-input/CountryCodeSelect.js.map +1 -1
- package/lib/commonjs/project-board/MemberAvatars.js +7 -9
- package/lib/commonjs/project-board/MemberAvatars.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardBase.js +3 -6
- package/lib/commonjs/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardCanvas.js +2 -2
- package/lib/commonjs/project-board/ProjectBoardCanvas.js.map +1 -1
- package/lib/commonjs/project-board/styles.js +2 -5
- package/lib/commonjs/project-board/styles.js.map +1 -1
- package/lib/commonjs/radio/RadioSwatch.js +5 -5
- package/lib/commonjs/radio/RadioSwatch.js.map +1 -1
- package/lib/commonjs/rating/Rating.js +7 -7
- package/lib/commonjs/rating/Rating.js.map +1 -1
- package/lib/commonjs/rating/RatingBar.js +8 -8
- package/lib/commonjs/rating/RatingBar.js.map +1 -1
- package/lib/commonjs/rating/RatingBar.web.js +5 -5
- package/lib/commonjs/rating/RatingBar.web.js.map +1 -1
- package/lib/commonjs/rating/RatingInput.js +9 -9
- package/lib/commonjs/rating/RatingInput.js.map +1 -1
- package/lib/commonjs/rating/RatingSummary.js +6 -6
- package/lib/commonjs/rating/RatingSummary.js.map +1 -1
- package/lib/commonjs/row-actions/RowActions.js +5 -5
- package/lib/commonjs/row-actions/RowActions.js.map +1 -1
- package/lib/commonjs/select/Select.js +5 -5
- package/lib/commonjs/select/Select.js.map +1 -1
- package/lib/commonjs/skeleton/Skeleton.js +22 -30
- package/lib/commonjs/skeleton/Skeleton.js.map +1 -1
- package/lib/commonjs/stay-filters/AvailabilityFilter.js +3 -3
- package/lib/commonjs/stay-filters/AvailabilityFilter.js.map +1 -1
- package/lib/commonjs/stay-filters/CountFilter.js +3 -3
- package/lib/commonjs/stay-filters/CountFilter.js.map +1 -1
- package/lib/commonjs/stay-filters/FilterFooter.js +7 -7
- package/lib/commonjs/stay-filters/FilterFooter.js.map +1 -1
- package/lib/commonjs/stay-filters/FilterSection.js +12 -12
- package/lib/commonjs/stay-filters/FilterSection.js.map +1 -1
- package/lib/commonjs/stay-filters/SwitchFilterRow.js +9 -9
- package/lib/commonjs/stay-filters/SwitchFilterRow.js.map +1 -1
- package/lib/commonjs/stay-search/GuestPicker.js +5 -5
- package/lib/commonjs/stay-search/GuestPicker.js.map +1 -1
- package/lib/commonjs/stepper/Stepper.js +11 -10
- package/lib/commonjs/stepper/Stepper.js.map +1 -1
- package/lib/commonjs/stepper/StepperRow.js +12 -12
- package/lib/commonjs/stepper/StepperRow.js.map +1 -1
- package/lib/commonjs/subscription-plans/SubscriptionPlans.js +10 -10
- package/lib/commonjs/subscription-plans/SubscriptionPlans.js.map +1 -1
- package/lib/commonjs/subscription-plans/SubscriptionPrice.js +5 -5
- package/lib/commonjs/subscription-plans/SubscriptionPrice.js.map +1 -1
- package/lib/commonjs/surface/Surface.js +64 -193
- package/lib/commonjs/surface/Surface.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +18 -15
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/commonjs/task-list/TaskList.js +14 -15
- package/lib/commonjs/task-list/TaskList.js.map +1 -1
- package/lib/commonjs/theme/BloomThemeProvider.js +207 -223
- package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/build-theme-from-seed.js +1 -1
- package/lib/commonjs/theme/build-theme.js +39 -9
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/canonical-tokens.js +40 -0
- package/lib/commonjs/theme/canonical-tokens.js.map +1 -0
- package/lib/commonjs/theme/color-policy.js +3 -0
- package/lib/commonjs/theme/color-policy.js.map +1 -1
- package/lib/commonjs/theme/color-scope/resolve-scope.js +48 -5
- package/lib/commonjs/theme/color-scope/resolve-scope.js.map +1 -1
- package/lib/commonjs/theme/color-scope/use-scope.js +1 -5
- package/lib/commonjs/theme/color-scope/use-scope.js.map +1 -1
- package/lib/commonjs/theme/color-tokens.js +32 -10
- package/lib/commonjs/theme/color-tokens.js.map +1 -1
- package/lib/commonjs/theme/color-utils.js +4 -0
- package/lib/commonjs/theme/color-utils.js.map +1 -1
- package/lib/commonjs/theme/default-token-vars.js +92 -0
- package/lib/commonjs/theme/default-token-vars.js.map +1 -0
- package/lib/commonjs/theme/index.js +6 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/index.web.js +6 -0
- package/lib/commonjs/theme/index.web.js.map +1 -1
- package/lib/commonjs/theme/prepaint-palettes.js +1 -5
- package/lib/commonjs/theme/prepaint-palettes.js.map +1 -1
- package/lib/commonjs/theme/token-registry.js +7 -28
- package/lib/commonjs/theme/token-registry.js.map +1 -1
- package/lib/commonjs/theme/use-theme-paint.js +28 -0
- package/lib/commonjs/theme/use-theme-paint.js.map +1 -1
- package/lib/commonjs/typography/Typography.js +27 -27
- package/lib/commonjs/typography/Typography.js.map +1 -1
- package/lib/commonjs/web-search/WebSearch.js +18 -19
- package/lib/commonjs/web-search/WebSearch.js.map +1 -1
- package/lib/commonjs/wizard/WizardFooterBase.js +10 -10
- package/lib/commonjs/wizard/WizardFooterBase.js.map +1 -1
- package/lib/commonjs/wizard/WizardProgress.js +5 -5
- package/lib/commonjs/wizard/WizardProgress.js.map +1 -1
- package/lib/module/accordion/Accordion.js +12 -12
- package/lib/module/accordion/Accordion.js.map +1 -1
- package/lib/module/accordion/Accordion.web.js +8 -8
- package/lib/module/accordion/Accordion.web.js.map +1 -1
- package/lib/module/agent-avatar/VectorCharacterAvatar.js +268 -112
- package/lib/module/agent-avatar/VectorCharacterAvatar.js.map +1 -1
- package/lib/module/agent-avatar/VectorNativeSurface.js +66 -0
- package/lib/module/agent-avatar/VectorNativeSurface.js.map +1 -0
- package/lib/module/agent-avatar/vector-loop.js +150 -0
- package/lib/module/agent-avatar/vector-loop.js.map +1 -0
- package/lib/module/agent-avatar/vector-visibility.js +3 -1
- package/lib/module/agent-avatar/vector-visibility.js.map +1 -1
- package/lib/module/agent-creator/AgentCreatorSection.js +8 -10
- package/lib/module/agent-creator/AgentCreatorSection.js.map +1 -1
- package/lib/module/agent-creator/EmotionPicker.js +3 -5
- package/lib/module/agent-creator/EmotionPicker.js.map +1 -1
- package/lib/module/agent-log/AgentLog.js +131 -174
- package/lib/module/agent-log/AgentLog.js.map +1 -1
- package/lib/module/agent-reply/AgentProfile.js +7 -10
- package/lib/module/agent-reply/AgentProfile.js.map +1 -1
- package/lib/module/agent-thinking/AgentThinking.js +8 -7
- package/lib/module/agent-thinking/AgentThinking.js.map +1 -1
- package/lib/module/agent-thinking/ThinkingReasoning.js +8 -8
- package/lib/module/agent-thinking/ThinkingReasoning.js.map +1 -1
- package/lib/module/app-shell/AppShell.js +5 -7
- package/lib/module/app-shell/AppShell.js.map +1 -1
- package/lib/module/app-shell/AppShellEngine.js +73 -29
- package/lib/module/app-shell/AppShellEngine.js.map +1 -1
- package/lib/module/app-shell/AppShellPanelLayout.js +3 -3
- package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/module/app-shell/NotificationBell.js +9 -9
- package/lib/module/app-shell/NotificationBell.js.map +1 -1
- package/lib/module/app-shell/PanelReorderHandle.js +4 -6
- package/lib/module/app-shell/PanelReorderHandle.js.map +1 -1
- package/lib/module/avatar-group/AvatarGroupBase.js +7 -7
- package/lib/module/avatar-group/AvatarGroupBase.js.map +1 -1
- package/lib/module/blur/BlurIsland.js +112 -116
- package/lib/module/blur/BlurIsland.js.map +1 -1
- package/lib/module/button/Button.js +13 -23
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/button/GroupBase.js +37 -52
- package/lib/module/button/GroupBase.js.map +1 -1
- package/lib/module/chat-list/ChatSearchResultsBase.js +4 -4
- package/lib/module/chat-list/ChatSearchResultsBase.js.map +1 -1
- package/lib/module/choice-list/ChoiceList.js +5 -5
- package/lib/module/choice-list/ChoiceList.js.map +1 -1
- package/lib/module/color-swatch-picker/ColorSwatchPicker.js +7 -7
- package/lib/module/color-swatch-picker/ColorSwatchPicker.js.map +1 -1
- package/lib/module/connection-dots/ConnectionDots.js +4 -4
- package/lib/module/connection-dots/ConnectionDots.js.map +1 -1
- package/lib/module/connection-dots/ConnectionDots.web.js +4 -4
- package/lib/module/connection-dots/ConnectionDots.web.js.map +1 -1
- package/lib/module/cover-header/CoverHeader.js +3 -3
- package/lib/module/cover-header/CoverHeader.js.map +1 -1
- package/lib/module/data-table/DataTableSelect.js +8 -8
- package/lib/module/data-table/DataTableSelect.js.map +1 -1
- package/lib/module/design-tokens/theme.css +1 -0
- package/lib/module/design-tokens/tokens.json +390 -0
- package/lib/module/dialog/DialogContent.js +5 -4
- package/lib/module/dialog/DialogContent.js.map +1 -1
- package/lib/module/dialog/DialogHeader.js +6 -5
- package/lib/module/dialog/DialogHeader.js.map +1 -1
- package/lib/module/dialog/SheetShell.js +5 -4
- package/lib/module/dialog/SheetShell.js.map +1 -1
- package/lib/module/expandable-text/ExpandableText.js +3 -3
- package/lib/module/expandable-text/ExpandableText.js.map +1 -1
- package/lib/module/floating/lens/lens-cover.js +51 -0
- package/lib/module/floating/lens/lens-cover.js.map +1 -0
- package/lib/module/floating/lens/lens-frame.js +282 -0
- package/lib/module/floating/lens/lens-frame.js.map +1 -0
- package/lib/module/floating/lens/lens-material.js +1 -1
- package/lib/module/floating/lens/native-lens.js.map +1 -1
- package/lib/module/grouped-section/GroupedSection.js +16 -15
- package/lib/module/grouped-section/GroupedSection.js.map +1 -1
- package/lib/module/home-search/BudgetPicker.js +8 -8
- package/lib/module/home-search/BudgetPicker.js.map +1 -1
- package/lib/module/home-search/MoveInPicker.js +7 -7
- package/lib/module/home-search/MoveInPicker.js.map +1 -1
- package/lib/module/icon-circle/IconCircle.js +14 -16
- package/lib/module/icon-circle/IconCircle.js.map +1 -1
- package/lib/module/icons/shared.js +3 -5
- package/lib/module/icons/shared.js.map +1 -1
- package/lib/module/kbd/Kbd.js +8 -8
- package/lib/module/kbd/Kbd.js.map +1 -1
- package/lib/module/layout/ResizeHandle.js +6 -5
- package/lib/module/layout/ResizeHandle.js.map +1 -1
- package/lib/module/link-preview/LinkPreviewCard.js +24 -26
- package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/module/list/ListBase.js +3 -3
- package/lib/module/list/ListBase.js.map +1 -1
- package/lib/module/list/ListPerson.js +3 -3
- package/lib/module/list/ListPerson.js.map +1 -1
- package/lib/module/listing-editor/ListingPreviewPane.js +30 -30
- package/lib/module/listing-editor/ListingPreviewPane.js.map +1 -1
- package/lib/module/markdown/InlineMarkdown.js +9 -11
- package/lib/module/markdown/InlineMarkdown.js.map +1 -1
- package/lib/module/markdown/MarkdownBlocks.js +35 -43
- package/lib/module/markdown/MarkdownBlocks.js.map +1 -1
- package/lib/module/multi-agent-chat/MultiAgentChatBase.js +6 -9
- package/lib/module/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
- package/lib/module/multi-agent-chat/SelectedAgentPreview.js +9 -11
- package/lib/module/multi-agent-chat/SelectedAgentPreview.js.map +1 -1
- package/lib/module/notifications/NotificationPermissionSheet.js +3 -5
- package/lib/module/notifications/NotificationPermissionSheet.js.map +1 -1
- package/lib/module/notifications/NotificationsScreen.js +21 -27
- package/lib/module/notifications/NotificationsScreen.js.map +1 -1
- package/lib/module/overlay/OverlayInertBoundary.js +33 -12
- package/lib/module/overlay/OverlayInertBoundary.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +24 -15
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/page-header/PageHeaderTitleInput.js +20 -20
- package/lib/module/page-header/PageHeaderTitleInput.js.map +1 -1
- package/lib/module/panel-routing/expo-router/StackScene.js +43 -24
- package/lib/module/panel-routing/expo-router/StackScene.js.map +1 -1
- package/lib/module/phone-input/CountryCodeSelect.js +4 -4
- package/lib/module/phone-input/CountryCodeSelect.js.map +1 -1
- package/lib/module/project-board/MemberAvatars.js +7 -9
- package/lib/module/project-board/MemberAvatars.js.map +1 -1
- package/lib/module/project-board/ProjectBoardBase.js +4 -7
- package/lib/module/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/module/project-board/ProjectBoardCanvas.js +2 -2
- package/lib/module/project-board/ProjectBoardCanvas.js.map +1 -1
- package/lib/module/project-board/styles.js +3 -6
- package/lib/module/project-board/styles.js.map +1 -1
- package/lib/module/radio/RadioSwatch.js +5 -5
- package/lib/module/radio/RadioSwatch.js.map +1 -1
- package/lib/module/rating/Rating.js +7 -7
- package/lib/module/rating/Rating.js.map +1 -1
- package/lib/module/rating/RatingBar.js +8 -8
- package/lib/module/rating/RatingBar.js.map +1 -1
- package/lib/module/rating/RatingBar.web.js +5 -5
- package/lib/module/rating/RatingBar.web.js.map +1 -1
- package/lib/module/rating/RatingInput.js +9 -9
- package/lib/module/rating/RatingInput.js.map +1 -1
- package/lib/module/rating/RatingSummary.js +6 -6
- package/lib/module/rating/RatingSummary.js.map +1 -1
- package/lib/module/row-actions/RowActions.js +5 -5
- package/lib/module/row-actions/RowActions.js.map +1 -1
- package/lib/module/select/Select.js +5 -5
- package/lib/module/select/Select.js.map +1 -1
- package/lib/module/skeleton/Skeleton.js +22 -30
- package/lib/module/skeleton/Skeleton.js.map +1 -1
- package/lib/module/stay-filters/AvailabilityFilter.js +3 -3
- package/lib/module/stay-filters/AvailabilityFilter.js.map +1 -1
- package/lib/module/stay-filters/CountFilter.js +3 -3
- package/lib/module/stay-filters/CountFilter.js.map +1 -1
- package/lib/module/stay-filters/FilterFooter.js +7 -7
- package/lib/module/stay-filters/FilterFooter.js.map +1 -1
- package/lib/module/stay-filters/FilterSection.js +12 -12
- package/lib/module/stay-filters/FilterSection.js.map +1 -1
- package/lib/module/stay-filters/SwitchFilterRow.js +9 -9
- package/lib/module/stay-filters/SwitchFilterRow.js.map +1 -1
- package/lib/module/stay-search/GuestPicker.js +5 -5
- package/lib/module/stay-search/GuestPicker.js.map +1 -1
- package/lib/module/stepper/Stepper.js +11 -10
- package/lib/module/stepper/Stepper.js.map +1 -1
- package/lib/module/stepper/StepperRow.js +12 -12
- package/lib/module/stepper/StepperRow.js.map +1 -1
- package/lib/module/subscription-plans/SubscriptionPlans.js +10 -10
- package/lib/module/subscription-plans/SubscriptionPlans.js.map +1 -1
- package/lib/module/subscription-plans/SubscriptionPrice.js +5 -5
- package/lib/module/subscription-plans/SubscriptionPrice.js.map +1 -1
- package/lib/module/surface/Surface.js +65 -194
- package/lib/module/surface/Surface.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +18 -15
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/task-list/TaskList.js +14 -15
- package/lib/module/task-list/TaskList.js.map +1 -1
- package/lib/module/theme/BloomThemeProvider.js +208 -224
- package/lib/module/theme/BloomThemeProvider.js.map +1 -1
- package/lib/module/theme/build-theme-from-seed.js +1 -1
- package/lib/module/theme/build-theme.js +38 -9
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/canonical-tokens.js +36 -0
- package/lib/module/theme/canonical-tokens.js.map +1 -0
- package/lib/module/theme/color-policy.js +3 -0
- package/lib/module/theme/color-policy.js.map +1 -1
- package/lib/module/theme/color-scope/resolve-scope.js +46 -5
- package/lib/module/theme/color-scope/resolve-scope.js.map +1 -1
- package/lib/module/theme/color-scope/use-scope.js +2 -6
- package/lib/module/theme/color-scope/use-scope.js.map +1 -1
- package/lib/module/theme/color-tokens.js +30 -8
- package/lib/module/theme/color-tokens.js.map +1 -1
- package/lib/module/theme/color-utils.js +4 -0
- package/lib/module/theme/color-utils.js.map +1 -1
- package/lib/module/theme/default-token-vars.js +88 -0
- package/lib/module/theme/default-token-vars.js.map +1 -0
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/index.web.js +1 -1
- package/lib/module/theme/index.web.js.map +1 -1
- package/lib/module/theme/prepaint-palettes.js +2 -6
- package/lib/module/theme/prepaint-palettes.js.map +1 -1
- package/lib/module/theme/token-registry.js +1 -27
- package/lib/module/theme/token-registry.js.map +1 -1
- package/lib/module/theme/use-theme-paint.js +30 -3
- package/lib/module/theme/use-theme-paint.js.map +1 -1
- package/lib/module/typography/Typography.js +27 -27
- package/lib/module/typography/Typography.js.map +1 -1
- package/lib/module/web-search/WebSearch.js +18 -19
- package/lib/module/web-search/WebSearch.js.map +1 -1
- package/lib/module/wizard/WizardFooterBase.js +10 -10
- package/lib/module/wizard/WizardFooterBase.js.map +1 -1
- package/lib/module/wizard/WizardProgress.js +5 -5
- package/lib/module/wizard/WizardProgress.js.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts +75 -0
- package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts +93 -0
- package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts +2 -0
- package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/AgentCreatorSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-log/AgentLog.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-reply/AgentProfile.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-thinking/AgentThinking.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/blur/BlurIsland.d.ts +1 -1
- package/lib/typescript/commonjs/blur/BlurIsland.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/GroupBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogContent.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/lens/lens-cover.d.ts +15 -0
- package/lib/typescript/commonjs/floating/lens/lens-cover.d.ts.map +1 -0
- package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts +52 -0
- package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/floating/lens/lens-material.d.ts +1 -1
- package/lib/typescript/commonjs/floating/lens/native-lens.d.ts +6 -0
- package/lib/typescript/commonjs/floating/lens/native-lens.d.ts.map +1 -1
- package/lib/typescript/commonjs/grouped-section/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/ResizeHandle.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/ListBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/OverlayInertBoundary.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts +3 -1
- package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/commonjs/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/task-list/TaskList.d.ts +3 -3
- package/lib/typescript/commonjs/task-list/TaskList.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme.d.ts +9 -0
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/canonical-tokens.d.ts +20 -0
- package/lib/typescript/commonjs/theme/canonical-tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/resolve-scope.d.ts +58 -0
- package/lib/typescript/commonjs/theme/color-scope/resolve-scope.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/use-scope.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-tokens.d.ts +5 -2
- package/lib/typescript/commonjs/theme/color-tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-utils.d.ts +3 -0
- package/lib/typescript/commonjs/theme/color-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/default-token-vars.d.ts +11 -0
- package/lib/typescript/commonjs/theme/default-token-vars.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/index.web.d.ts +1 -1
- package/lib/typescript/commonjs/theme/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/prepaint-palettes.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/token-registry.d.ts +1 -16
- package/lib/typescript/commonjs/theme/token-registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/use-theme-paint.d.ts +11 -0
- package/lib/typescript/commonjs/theme/use-theme-paint.d.ts.map +1 -1
- package/lib/typescript/commonjs/web-search/WebSearch.d.ts +3 -3
- package/lib/typescript/commonjs/web-search/WebSearch.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts +75 -0
- package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/vector-loop.d.ts +93 -0
- package/lib/typescript/module/agent-avatar/vector-loop.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/vector-visibility.d.ts +2 -0
- package/lib/typescript/module/agent-avatar/vector-visibility.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/AgentCreatorSection.d.ts.map +1 -1
- package/lib/typescript/module/agent-log/AgentLog.d.ts.map +1 -1
- package/lib/typescript/module/agent-reply/AgentProfile.d.ts.map +1 -1
- package/lib/typescript/module/agent-thinking/AgentThinking.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/module/blur/BlurIsland.d.ts +1 -1
- package/lib/typescript/module/blur/BlurIsland.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/button/GroupBase.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogContent.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -1
- package/lib/typescript/module/floating/lens/lens-cover.d.ts +15 -0
- package/lib/typescript/module/floating/lens/lens-cover.d.ts.map +1 -0
- package/lib/typescript/module/floating/lens/lens-frame.d.ts +52 -0
- package/lib/typescript/module/floating/lens/lens-frame.d.ts.map +1 -0
- package/lib/typescript/module/floating/lens/lens-material.d.ts +1 -1
- package/lib/typescript/module/floating/lens/native-lens.d.ts +6 -0
- package/lib/typescript/module/floating/lens/native-lens.d.ts.map +1 -1
- package/lib/typescript/module/grouped-section/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/module/layout/ResizeHandle.d.ts.map +1 -1
- package/lib/typescript/module/list/ListBase.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
- package/lib/typescript/module/overlay/OverlayInertBoundary.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts +3 -1
- package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/module/project-board/styles.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/module/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/module/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/task-list/TaskList.d.ts +3 -3
- package/lib/typescript/module/task-list/TaskList.d.ts.map +1 -1
- package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme.d.ts +9 -0
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/canonical-tokens.d.ts +20 -0
- package/lib/typescript/module/theme/canonical-tokens.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-policy.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/resolve-scope.d.ts +58 -0
- package/lib/typescript/module/theme/color-scope/resolve-scope.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/use-scope.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-tokens.d.ts +5 -2
- package/lib/typescript/module/theme/color-tokens.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-utils.d.ts +3 -0
- package/lib/typescript/module/theme/color-utils.d.ts.map +1 -1
- package/lib/typescript/module/theme/default-token-vars.d.ts +11 -0
- package/lib/typescript/module/theme/default-token-vars.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +1 -1
- package/lib/typescript/module/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/theme/index.web.d.ts +1 -1
- package/lib/typescript/module/theme/index.web.d.ts.map +1 -1
- package/lib/typescript/module/theme/prepaint-palettes.d.ts.map +1 -1
- package/lib/typescript/module/theme/token-registry.d.ts +1 -16
- package/lib/typescript/module/theme/token-registry.d.ts.map +1 -1
- package/lib/typescript/module/theme/use-theme-paint.d.ts +11 -0
- package/lib/typescript/module/theme/use-theme-paint.d.ts.map +1 -1
- package/lib/typescript/module/web-search/WebSearch.d.ts +3 -3
- package/lib/typescript/module/web-search/WebSearch.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/accordion/Accordion.tsx +6 -6
- package/src/accordion/Accordion.web.tsx +6 -6
- package/src/agent-avatar/VectorCharacterAvatar.tsx +327 -120
- package/src/agent-avatar/VectorNativeSurface.tsx +117 -0
- package/src/agent-avatar/vector-loop.ts +213 -0
- package/src/agent-avatar/vector-visibility.ts +3 -1
- package/src/agent-creator/AgentCreatorSection.tsx +4 -6
- package/src/agent-creator/EmotionPicker.tsx +3 -3
- package/src/agent-log/AgentLog.tsx +8 -21
- package/src/agent-reply/AgentProfile.tsx +4 -5
- package/src/agent-thinking/AgentThinking.tsx +4 -3
- package/src/agent-thinking/ThinkingReasoning.tsx +4 -4
- package/src/app-shell/AppShell.tsx +3 -3
- package/src/app-shell/AppShellEngine.tsx +67 -19
- package/src/app-shell/AppShellPanelLayout.tsx +3 -3
- package/src/app-shell/NotificationBell.tsx +6 -6
- package/src/app-shell/PanelReorderHandle.tsx +4 -4
- package/src/avatar-group/AvatarGroupBase.tsx +6 -6
- package/src/blur/BlurIsland.tsx +16 -14
- package/src/button/Button.tsx +19 -36
- package/src/button/GroupBase.tsx +42 -56
- package/src/chat-list/ChatSearchResultsBase.tsx +4 -4
- package/src/choice-list/ChoiceList.tsx +3 -3
- package/src/color-swatch-picker/ColorSwatchPicker.tsx +4 -4
- package/src/connection-dots/ConnectionDots.tsx +4 -4
- package/src/connection-dots/ConnectionDots.web.tsx +4 -4
- package/src/cover-header/CoverHeader.tsx +3 -3
- package/src/data-table/DataTableSelect.tsx +4 -4
- package/src/design-tokens/theme.css +1 -0
- package/src/design-tokens/tokens.json +390 -0
- package/src/dialog/DialogContent.tsx +3 -2
- package/src/dialog/DialogHeader.tsx +6 -5
- package/src/dialog/SheetShell.tsx +3 -2
- package/src/expandable-text/ExpandableText.tsx +3 -3
- package/src/floating/lens/lens-cover.tsx +29 -0
- package/src/floating/lens/lens-frame.tsx +195 -0
- package/src/floating/lens/lens-material.ts +1 -1
- package/src/floating/lens/native-lens.ts +2 -0
- package/src/grouped-section/GroupedSection.tsx +7 -6
- package/src/home-search/BudgetPicker.tsx +4 -4
- package/src/home-search/MoveInPicker.tsx +3 -3
- package/src/icon-circle/IconCircle.tsx +5 -5
- package/src/icons/shared.tsx +3 -3
- package/src/kbd/Kbd.tsx +4 -4
- package/src/layout/ResizeHandle.tsx +7 -5
- package/src/link-preview/LinkPreviewCard.tsx +7 -7
- package/src/list/ListBase.tsx +3 -6
- package/src/list/ListPerson.tsx +3 -3
- package/src/listing-editor/ListingPreviewPane.tsx +13 -13
- package/src/markdown/InlineMarkdown.tsx +3 -3
- package/src/markdown/MarkdownBlocks.tsx +14 -14
- package/src/multi-agent-chat/MultiAgentChatBase.tsx +6 -9
- package/src/multi-agent-chat/SelectedAgentPreview.tsx +4 -4
- package/src/notifications/NotificationPermissionSheet.tsx +3 -3
- package/src/notifications/NotificationsScreen.tsx +9 -9
- package/src/overlay/OverlayInertBoundary.tsx +10 -1
- package/src/page-header/PageHeader.tsx +26 -13
- package/src/page-header/PageHeaderTitleInput.tsx +4 -4
- package/src/panel-routing/expo-router/StackScene.tsx +16 -2
- package/src/phone-input/CountryCodeSelect.tsx +4 -4
- package/src/project-board/MemberAvatars.tsx +3 -3
- package/src/project-board/ProjectBoardBase.tsx +4 -5
- package/src/project-board/ProjectBoardCanvas.tsx +2 -2
- package/src/project-board/styles.ts +3 -4
- package/src/radio/RadioSwatch.tsx +3 -3
- package/src/rating/Rating.tsx +5 -5
- package/src/rating/RatingBar.tsx +4 -4
- package/src/rating/RatingBar.web.tsx +3 -3
- package/src/rating/RatingInput.tsx +5 -5
- package/src/rating/RatingSummary.tsx +4 -4
- package/src/row-actions/RowActions.tsx +3 -3
- package/src/select/Select.tsx +3 -3
- package/src/skeleton/Skeleton.tsx +9 -9
- package/src/stay-filters/AvailabilityFilter.tsx +3 -3
- package/src/stay-filters/CountFilter.tsx +3 -3
- package/src/stay-filters/FilterFooter.tsx +4 -4
- package/src/stay-filters/FilterSection.tsx +5 -5
- package/src/stay-filters/SwitchFilterRow.tsx +4 -4
- package/src/stay-search/GuestPicker.tsx +3 -6
- package/src/stepper/Stepper.tsx +6 -5
- package/src/stepper/StepperRow.tsx +5 -5
- package/src/subscription-plans/SubscriptionPlans.tsx +6 -6
- package/src/subscription-plans/SubscriptionPrice.tsx +3 -3
- package/src/surface/Surface.tsx +13 -28
- package/src/tab-bar/TabBarBase.tsx +13 -8
- package/src/task-list/TaskList.tsx +14 -16
- package/src/theme/BloomThemeProvider.tsx +33 -33
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +134 -0
- package/src/theme/build-theme-from-seed.ts +1 -1
- package/src/theme/build-theme.ts +52 -11
- package/src/theme/canonical-tokens.ts +108 -0
- package/src/theme/color-policy.ts +3 -0
- package/src/theme/color-scope/resolve-scope.ts +47 -8
- package/src/theme/color-scope/use-scope.ts +2 -6
- package/src/theme/color-tokens.ts +7 -7
- package/src/theme/color-utils.ts +4 -0
- package/src/theme/default-token-vars.ts +86 -0
- package/src/theme/index.ts +1 -1
- package/src/theme/index.web.ts +1 -1
- package/src/theme/prepaint-palettes.ts +2 -3
- package/src/theme/token-registry.ts +1 -101
- package/src/theme/use-theme-paint.ts +26 -3
- package/src/typography/Typography.tsx +12 -12
- package/src/web-search/WebSearch.tsx +16 -18
- package/src/wizard/WizardFooterBase.tsx +5 -5
- package/src/wizard/WizardProgress.tsx +5 -5
- package/lib/commonjs/floating/lens/lens-button-host.js +0 -218
- package/lib/commonjs/floating/lens/lens-button-host.js.map +0 -1
- package/lib/module/floating/lens/lens-button-host.js +0 -214
- package/lib/module/floating/lens/lens-button-host.js.map +0 -1
- package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts +0 -34
- package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts.map +0 -1
- package/lib/typescript/module/floating/lens/lens-button-host.d.ts +0 -34
- package/lib/typescript/module/floating/lens/lens-button-host.d.ts.map +0 -1
- package/src/floating/lens/lens-button-host.tsx +0 -148
|
@@ -71,7 +71,7 @@ function buildSeedThemeValues(
|
|
|
71
71
|
// The same ONE quiet-text colour `build-theme.ts` resolves — see the long
|
|
72
72
|
// note there. The parity suite walks every preset through both paths, so a
|
|
73
73
|
// change on one side that is not made on the other goes red.
|
|
74
|
-
textTertiary: g('
|
|
74
|
+
textTertiary: g('faint-foreground'),
|
|
75
75
|
|
|
76
76
|
border: g('border'),
|
|
77
77
|
borderLight: g('input'),
|
package/src/theme/build-theme.ts
CHANGED
|
@@ -3,7 +3,10 @@ import { Platform } from 'react-native';
|
|
|
3
3
|
import { APP_COLOR_PRESETS, type AppColorName } from './color-presets';
|
|
4
4
|
import { generateRoleColors, type RoleColors } from './color-engine';
|
|
5
5
|
import type { ExplicitAccents } from './preset-vars';
|
|
6
|
-
import { getAdaptiveColors } from './adaptive-colors';
|
|
6
|
+
import { type AdaptiveColors, getAdaptiveColors } from './adaptive-colors';
|
|
7
|
+
import type { ScopePalette } from './color-scope/context';
|
|
8
|
+
import { withFieldColors } from './color-scope/resolve-scope';
|
|
9
|
+
import { buildScopeVars } from './color-scope/style-builder';
|
|
7
10
|
import { getResolvedTokens } from './token-registry';
|
|
8
11
|
import { THEME_GRADIENTS } from './gradients';
|
|
9
12
|
import type { Theme } from './types';
|
|
@@ -78,7 +81,11 @@ function buildColorsFromPreset(
|
|
|
78
81
|
// asked for against the fill it lands on, which is what
|
|
79
82
|
// `styles/surface-levels.ts` `surfaceTextOn()` returns and what every family
|
|
80
83
|
// that wants a caption grey now calls.
|
|
81
|
-
|
|
84
|
+
//
|
|
85
|
+
// It has a token of its own, `--faint-foreground`, which the policy holds at
|
|
86
|
+
// `--muted-foreground`'s colour: in an adaptive theme the platform answers
|
|
87
|
+
// it with its own tertiary label, and that token carries it.
|
|
88
|
+
textTertiary: g('faint-foreground'),
|
|
82
89
|
|
|
83
90
|
border: g('border'),
|
|
84
91
|
borderLight: g('input'),
|
|
@@ -165,20 +172,18 @@ function buildColorsFromPreset(
|
|
|
165
172
|
};
|
|
166
173
|
}
|
|
167
174
|
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
export function buildTheme(
|
|
175
|
+
/** The platform's palette (Material You, iOS dynamic) when the theme is adaptive: none on the web. */
|
|
176
|
+
function platformColors(isAdaptive: boolean): AdaptiveColors | null {
|
|
177
|
+
return isAdaptive && Platform.OS !== 'web' ? getAdaptiveColors() : null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function themeOf(
|
|
175
181
|
preset: AppColorName,
|
|
176
182
|
resolved: 'light' | 'dark',
|
|
177
|
-
|
|
183
|
+
adaptive: AdaptiveColors | null,
|
|
178
184
|
accents?: ExplicitAccents,
|
|
179
185
|
): Theme {
|
|
180
186
|
const { colors: base, chartColors } = buildColorsFromPreset(preset, resolved, accents);
|
|
181
|
-
const adaptive = isAdaptive && Platform.OS !== 'web' ? getAdaptiveColors() : undefined;
|
|
182
187
|
// The platform palette OVERLAYS the preset one rather than replacing it. Every
|
|
183
188
|
// field the platform answers still wins, byte for byte; the tinted status
|
|
184
189
|
// members — which Material You and iOS dynamic have no role for at all — fall
|
|
@@ -194,3 +199,39 @@ export function buildTheme(
|
|
|
194
199
|
isLight: resolved === 'light',
|
|
195
200
|
};
|
|
196
201
|
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Build a `Theme` from a color preset and a resolved light/dark mode.
|
|
205
|
+
*
|
|
206
|
+
* When `isAdaptive` is true and the platform exposes adaptive (Material You /
|
|
207
|
+
* iOS dynamic) colors, those override the preset-derived palette.
|
|
208
|
+
*/
|
|
209
|
+
export function buildTheme(
|
|
210
|
+
preset: AppColorName,
|
|
211
|
+
resolved: 'light' | 'dark',
|
|
212
|
+
isAdaptive: boolean = false,
|
|
213
|
+
accents?: ExplicitAccents,
|
|
214
|
+
): Theme {
|
|
215
|
+
return themeOf(preset, resolved, platformColors(isAdaptive), accents);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* A preset's one resolved palette: the theme `useTheme()` reads and the token
|
|
220
|
+
* record `useColorTokens()` reads. In an adaptive theme on Android and iOS the
|
|
221
|
+
* platform's colours overlay both, each token taking the colour of the
|
|
222
|
+
* `theme.colors` field it feeds (`COLOR_FIELDS`), so the two readers never
|
|
223
|
+
* disagree in any mode.
|
|
224
|
+
*/
|
|
225
|
+
export function buildPresetPalette(
|
|
226
|
+
preset: AppColorName,
|
|
227
|
+
resolved: 'light' | 'dark',
|
|
228
|
+
isAdaptive: boolean = false,
|
|
229
|
+
accents?: ExplicitAccents,
|
|
230
|
+
): ScopePalette {
|
|
231
|
+
const adaptive = platformColors(isAdaptive);
|
|
232
|
+
const vars = buildScopeVars(preset, resolved, accents);
|
|
233
|
+
return {
|
|
234
|
+
theme: themeOf(preset, resolved, adaptive, accents),
|
|
235
|
+
vars: adaptive ? withFieldColors(vars, adaptive) : vars,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical set of Bloom theme token names — WITHOUT the leading `--`.
|
|
3
|
+
*
|
|
4
|
+
* This is the single source of truth for which tokens a preset produces. It
|
|
5
|
+
* covers exactly the keys returned by `getPresetVars(name, mode)` (the base
|
|
6
|
+
* shadcn palette plus the synthesized extended tokens: card/chart/content-area/
|
|
7
|
+
* sidebar-*). The list is intentionally hand-maintained and verified by
|
|
8
|
+
* `token-registry.test.ts` against the live `getPresetVars('oxy', 'light')`
|
|
9
|
+
* output, so any drift in the preset shape fails CI.
|
|
10
|
+
*
|
|
11
|
+
* Order mirrors `getPresetVars`'s insertion order: base tokens first (in the
|
|
12
|
+
* order they appear in the preset data), then the synthesized extended tokens.
|
|
13
|
+
*
|
|
14
|
+
* It imports nothing, so a reader of the names (`useColorTokens`) does not pull
|
|
15
|
+
* in the colour engine; `token-registry` re-exports it.
|
|
16
|
+
*/
|
|
17
|
+
export const CANONICAL_TOKENS = [
|
|
18
|
+
'background',
|
|
19
|
+
'foreground',
|
|
20
|
+
'surface',
|
|
21
|
+
'surface-foreground',
|
|
22
|
+
'popover',
|
|
23
|
+
'popover-foreground',
|
|
24
|
+
'primary',
|
|
25
|
+
'primary-foreground',
|
|
26
|
+
'secondary',
|
|
27
|
+
'secondary-foreground',
|
|
28
|
+
'tertiary',
|
|
29
|
+
'tertiary-foreground',
|
|
30
|
+
'muted',
|
|
31
|
+
'muted-foreground',
|
|
32
|
+
// The tertiary text: `theme.colors.textTertiary`. Every preset holds it at
|
|
33
|
+
// `muted-foreground` (one legible quiet text, `build-theme.ts`); in an adaptive
|
|
34
|
+
// theme the platform answers it with its own tertiary label.
|
|
35
|
+
'faint-foreground',
|
|
36
|
+
'accent',
|
|
37
|
+
'accent-foreground',
|
|
38
|
+
'destructive',
|
|
39
|
+
'border',
|
|
40
|
+
'input',
|
|
41
|
+
'ring',
|
|
42
|
+
'sidebar',
|
|
43
|
+
'card',
|
|
44
|
+
'card-foreground',
|
|
45
|
+
'chart-1',
|
|
46
|
+
'chart-2',
|
|
47
|
+
'chart-3',
|
|
48
|
+
'chart-4',
|
|
49
|
+
'chart-5',
|
|
50
|
+
'chart-6',
|
|
51
|
+
'chart-7',
|
|
52
|
+
'chart-8',
|
|
53
|
+
'chart-9',
|
|
54
|
+
'chart-1-active',
|
|
55
|
+
'chart-2-active',
|
|
56
|
+
'chart-3-active',
|
|
57
|
+
'chart-4-active',
|
|
58
|
+
'chart-5-active',
|
|
59
|
+
'chart-6-active',
|
|
60
|
+
'chart-7-active',
|
|
61
|
+
'chart-8-active',
|
|
62
|
+
'chart-9-active',
|
|
63
|
+
'content-area',
|
|
64
|
+
'sidebar-foreground',
|
|
65
|
+
'sidebar-primary',
|
|
66
|
+
'sidebar-primary-foreground',
|
|
67
|
+
'sidebar-accent',
|
|
68
|
+
'sidebar-accent-foreground',
|
|
69
|
+
'sidebar-border',
|
|
70
|
+
'sidebar-ring',
|
|
71
|
+
|
|
72
|
+
// --- the accent families ---
|
|
73
|
+
// Each accent is a FAMILY, not a colour: a fill, the label that is legible on
|
|
74
|
+
// it, a `-text` form for a mark on the page, and a `-subtle` translucent tint
|
|
75
|
+
// for the surface behind one. A single value can only ever be a fill, which is
|
|
76
|
+
// why consumers hand-rolled the rest with hex-alpha arithmetic.
|
|
77
|
+
'primary-text',
|
|
78
|
+
'vivid',
|
|
79
|
+
'vivid-foreground',
|
|
80
|
+
'primary-subtle',
|
|
81
|
+
'secondary-text',
|
|
82
|
+
'secondary-subtle',
|
|
83
|
+
'tertiary-text',
|
|
84
|
+
'tertiary-subtle',
|
|
85
|
+
|
|
86
|
+
// --- semantic status, themed per mode ---
|
|
87
|
+
// Replaces four frozen hexes that all FAILED AA under white text (warning at
|
|
88
|
+
// 2.15, success 2.54, info 3.68, error 3.76) and had no subtle or text member.
|
|
89
|
+
'success',
|
|
90
|
+
'success-foreground',
|
|
91
|
+
'success-text',
|
|
92
|
+
'success-subtle',
|
|
93
|
+
'error',
|
|
94
|
+
'error-foreground',
|
|
95
|
+
'error-text',
|
|
96
|
+
'error-subtle',
|
|
97
|
+
'warning',
|
|
98
|
+
'warning-foreground',
|
|
99
|
+
'warning-text',
|
|
100
|
+
'warning-subtle',
|
|
101
|
+
'info',
|
|
102
|
+
'info-foreground',
|
|
103
|
+
'info-text',
|
|
104
|
+
'info-subtle',
|
|
105
|
+
] as const;
|
|
106
|
+
|
|
107
|
+
/** A canonical token name (no leading `--`). */
|
|
108
|
+
export type CanonicalToken = (typeof CANONICAL_TOKENS)[number];
|
|
@@ -603,6 +603,9 @@ export function buildPolicyTokens(
|
|
|
603
603
|
'--popover-foreground': monochrome ? roles.onSurface : foreground,
|
|
604
604
|
'--sidebar-foreground': monochrome ? roles.onSurface : foreground,
|
|
605
605
|
'--muted-foreground': monochrome ? roles.onSurfaceVariant : mutedForeground,
|
|
606
|
+
// The tertiary text is the quiet text: a fixed third grey is measured on one
|
|
607
|
+
// surface and lands on all of them (`build-theme.ts`, `textTertiary`).
|
|
608
|
+
'--faint-foreground': monochrome ? roles.onSurfaceVariant : mutedForeground,
|
|
606
609
|
'--border': monochrome ? roles.outlineVariant : boundary,
|
|
607
610
|
'--input': monochrome ? roles.outlineVariant : boundary,
|
|
608
611
|
'--sidebar-border': monochrome ? roles.outlineVariant : boundary,
|
|
@@ -6,13 +6,18 @@ import type { ScopePalette } from './context';
|
|
|
6
6
|
import { withScopeAliases } from './seed-scope';
|
|
7
7
|
import type { BloomColorScopeTokens } from './types';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The `theme.colors` fields each canonical token feeds. The first is the
|
|
11
|
+
* token's own field, the one `buildTheme` reads from it (`--muted-foreground`
|
|
12
|
+
* is `textSecondary`); the rest are aliases an exact override also sets.
|
|
13
|
+
*/
|
|
14
|
+
export const COLOR_FIELDS = {
|
|
11
15
|
background: ['background', 'primaryDark'],
|
|
12
16
|
foreground: ['text'],
|
|
13
17
|
surface: ['backgroundSecondary', 'primaryLight'],
|
|
14
18
|
popover: ['backgroundTertiary'],
|
|
15
|
-
'muted-foreground': ['textSecondary', '
|
|
19
|
+
'muted-foreground': ['textSecondary', 'icon'],
|
|
20
|
+
'faint-foreground': ['textTertiary'],
|
|
16
21
|
border: ['border'],
|
|
17
22
|
input: ['borderLight'],
|
|
18
23
|
primary: ['primary', 'tint', 'iconActive'],
|
|
@@ -50,7 +55,43 @@ const COLOR_FIELDS = {
|
|
|
50
55
|
destructive: ['destructive'],
|
|
51
56
|
'surface-foreground': ['surfaceForeground'],
|
|
52
57
|
accent: ['accent'],
|
|
53
|
-
} satisfies Partial<Record<CanonicalToken, readonly (keyof ThemeColors)[]>>;
|
|
58
|
+
} satisfies Partial<Record<CanonicalToken, readonly [keyof ThemeColors, ...(keyof ThemeColors)[]]>>;
|
|
59
|
+
|
|
60
|
+
/** A token record without its `--color-*` aliases, rebuilt after its tokens change. */
|
|
61
|
+
function withoutAliases(vars: Record<string, string>): Record<string, string> {
|
|
62
|
+
return Object.fromEntries(Object.entries(vars).filter(([name]) => !name.startsWith('--color-')));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A token record whose tokens take the colours `colors` holds, each the colour
|
|
67
|
+
* of the token's own field (`COLOR_FIELDS`), with the aliases rebuilt. The
|
|
68
|
+
* provider's record in an adaptive theme, so `useColorTokens()` paints the
|
|
69
|
+
* platform's colours exactly where `useTheme().colors` holds them.
|
|
70
|
+
*/
|
|
71
|
+
export function withFieldColors(
|
|
72
|
+
vars: Record<string, string>,
|
|
73
|
+
colors: Partial<ThemeColors>,
|
|
74
|
+
): Record<string, string> {
|
|
75
|
+
const next = withoutAliases(vars);
|
|
76
|
+
for (const [name, [field]] of Object.entries(COLOR_FIELDS)) {
|
|
77
|
+
const value = colors[field];
|
|
78
|
+
if (value !== undefined) next[`--${name}`] = value;
|
|
79
|
+
}
|
|
80
|
+
return withScopeAliases(next);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The tertiary text follows an exact `muted-foreground`, unless the scope names
|
|
85
|
+
* `faint-foreground` too. Every preset holds the two at one colour (the one
|
|
86
|
+
* legible quiet text), so a scope that sets its quiet text on its own fill
|
|
87
|
+
* keeps its tertiary text legible there, as it did before the token existed,
|
|
88
|
+
* instead of painting the preset's grey on a fill it was never measured on.
|
|
89
|
+
*/
|
|
90
|
+
function withFaintText(overrides: BloomColorScopeTokens): BloomColorScopeTokens {
|
|
91
|
+
const muted = overrides['muted-foreground'];
|
|
92
|
+
if (muted === undefined || overrides['faint-foreground'] !== undefined) return overrides;
|
|
93
|
+
return { ...overrides, 'faint-foreground': muted };
|
|
94
|
+
}
|
|
54
95
|
|
|
55
96
|
/** Preserve unspecified roles; rebuild the full CSS alias layer after exact overrides. */
|
|
56
97
|
export function applyScopeTokens(
|
|
@@ -61,7 +102,7 @@ export function applyScopeTokens(
|
|
|
61
102
|
const vars = { ...base.vars };
|
|
62
103
|
const colors = { ...base.theme.colors };
|
|
63
104
|
let changedCharts = false;
|
|
64
|
-
for (const [name, value] of Object.entries(overrides)) {
|
|
105
|
+
for (const [name, value] of Object.entries(withFaintText(overrides))) {
|
|
65
106
|
if (value === undefined) continue;
|
|
66
107
|
if (!(CANONICAL_TOKENS as readonly string[]).includes(name)) {
|
|
67
108
|
throw new Error(`BloomColorScope: unknown canonical token "${name}".`);
|
|
@@ -75,9 +116,7 @@ export function applyScopeTokens(
|
|
|
75
116
|
if (name.startsWith('chart-')) changedCharts = true;
|
|
76
117
|
}
|
|
77
118
|
return {
|
|
78
|
-
vars: withScopeAliases(
|
|
79
|
-
Object.fromEntries(Object.entries(vars).filter(([name]) => !name.startsWith('--color-'))),
|
|
80
|
-
),
|
|
119
|
+
vars: withScopeAliases(withoutAliases(vars)),
|
|
81
120
|
theme: {
|
|
82
121
|
...base.theme,
|
|
83
122
|
colors,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useContext, useMemo } from 'react';
|
|
2
2
|
import { BloomThemeContext } from '../BloomThemeProvider';
|
|
3
|
-
import {
|
|
3
|
+
import { buildPresetPalette } from '../build-theme';
|
|
4
4
|
import { buildThemeFromSeed } from '../build-theme-from-seed';
|
|
5
5
|
import { buildSeedScopeVars } from './seed-scope';
|
|
6
6
|
import type { AppColorName } from '../color-presets';
|
|
7
7
|
import { ThemeScopeContext, type ScopePalette, type ScopeState } from './context';
|
|
8
|
-
import { buildScopeVars } from './style-builder';
|
|
9
8
|
import { applyScopeTokens } from './resolve-scope';
|
|
10
9
|
import type { BloomColorScopeTokens } from './types';
|
|
11
10
|
|
|
@@ -44,10 +43,7 @@ export function useScope(
|
|
|
44
43
|
vars: buildSeedScopeVars({ seed, mode: resolved }),
|
|
45
44
|
}
|
|
46
45
|
: colorPreset !== undefined || !inherited
|
|
47
|
-
?
|
|
48
|
-
theme: buildTheme(colorPreset ?? preset, resolved),
|
|
49
|
-
vars: buildScopeVars(colorPreset ?? preset, resolved),
|
|
50
|
-
}
|
|
46
|
+
? buildPresetPalette(colorPreset ?? preset, resolved)
|
|
51
47
|
: (inherited.resolvePreset?.(preset, resolved) ?? inherited.resolveMode(resolved));
|
|
52
48
|
const palette = applyScopeTokens(base, tokens);
|
|
53
49
|
palettes.set(key, palette);
|
|
@@ -2,9 +2,9 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import { IS_WEB } from '../styles/platform';
|
|
4
4
|
import { ThemeScopeContext } from './color-scope/context';
|
|
5
|
-
import { buildScopeVars } from './color-scope/style-builder';
|
|
6
5
|
import { parseRgba } from './color-utils';
|
|
7
|
-
import {
|
|
6
|
+
import { DEFAULT_TOKEN_VARS } from './default-token-vars';
|
|
7
|
+
import { CANONICAL_TOKENS, type CanonicalToken } from './canonical-tokens';
|
|
8
8
|
|
|
9
9
|
/** `primary-foreground` → `primaryForeground`, `chart-1-active` → `chart1Active`. */
|
|
10
10
|
type Camel<S extends string> = S extends `${infer Head}-${infer Tail}`
|
|
@@ -47,22 +47,22 @@ function tokensOf(vars: Record<string, string>): ColorTokens {
|
|
|
47
47
|
return tokens;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
let fallbackVars: Record<string, string> | undefined;
|
|
51
|
-
|
|
52
50
|
/**
|
|
53
51
|
* The colour tokens of the theme or colour scope a component is drawn in.
|
|
54
52
|
*
|
|
55
53
|
* Native reads the nearest scope's token record (the provider's, a
|
|
56
54
|
* `BloomColorScope`'s, a `BloomSeedScope`'s, or the one a portal bridge
|
|
57
55
|
* carries): the same values the theme publishes, in an adaptive theme as well.
|
|
58
|
-
*
|
|
56
|
+
* Outside any provider it reads Bloom's default palette (`oxy`, light), from a
|
|
57
|
+
* generated table (`default-token-vars.ts`), so a component that paints
|
|
58
|
+
* through the tokens does not import the colour engine. The web returns the
|
|
59
|
+
* CSS variables, which the cascade resolves.
|
|
59
60
|
*/
|
|
60
61
|
export function useColorTokens(): ColorTokens {
|
|
61
62
|
const scope = useContext(ThemeScopeContext);
|
|
62
63
|
if (IS_WEB) return WEB_TOKENS;
|
|
63
64
|
if (scope) return tokensOf(scope.vars);
|
|
64
|
-
|
|
65
|
-
return tokensOf(fallbackVars);
|
|
65
|
+
return tokensOf(DEFAULT_TOKEN_VARS);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
package/src/theme/color-utils.ts
CHANGED
|
@@ -36,8 +36,12 @@ export interface RgbaChannels extends RgbChannels {
|
|
|
36
36
|
* resolve to `rgba(r, g, b, 0.13)` in light and `0.24` in dark, so anything
|
|
37
37
|
* compositing onto a tint has to know it is compositing onto something
|
|
38
38
|
* translucent — dropping the alpha silently turns a tint into an opaque fill.
|
|
39
|
+
*
|
|
40
|
+
* A platform colour (iOS dynamic, Material You: a `PlatformColor` object in an
|
|
41
|
+
* adaptive theme) is not a string and yields `null` as well.
|
|
39
42
|
*/
|
|
40
43
|
export function parseRgba(color: string): RgbaChannels | null {
|
|
44
|
+
if (typeof color !== 'string') return null;
|
|
41
45
|
const trimmed = color.trim();
|
|
42
46
|
if (trimmed.startsWith('#')) {
|
|
43
47
|
let hex = trimmed.slice(1);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED by scripts/generate-default-token-vars.ts — DO NOT EDIT.
|
|
3
|
+
* Re-run `bun run generate:default-token-vars` after changing the oxy preset or
|
|
4
|
+
* the colour policy; default-token-vars.test.ts fails until then.
|
|
5
|
+
*
|
|
6
|
+
* Bloom's default palette (`oxy`, light): every canonical token's value, as
|
|
7
|
+
* `buildScopeVars('oxy', 'light')` resolves it.
|
|
8
|
+
*/
|
|
9
|
+
import type { CanonicalToken } from './canonical-tokens';
|
|
10
|
+
|
|
11
|
+
export const DEFAULT_TOKEN_VARS: Readonly<Record<`--${CanonicalToken}`, string>> = {
|
|
12
|
+
'--background': 'rgb(247 235 240)',
|
|
13
|
+
'--foreground': 'rgb(42 17 50)',
|
|
14
|
+
'--surface': 'rgb(241 221 233)',
|
|
15
|
+
'--surface-foreground': 'rgb(42 17 50)',
|
|
16
|
+
'--popover': 'rgb(237 206 228)',
|
|
17
|
+
'--popover-foreground': 'rgb(42 17 50)',
|
|
18
|
+
'--primary': 'rgb(148 34 174)',
|
|
19
|
+
'--primary-foreground': 'rgb(255 238 252)',
|
|
20
|
+
'--secondary': 'rgb(143 57 135)',
|
|
21
|
+
'--secondary-foreground': 'rgb(255 238 248)',
|
|
22
|
+
'--tertiary': 'rgb(160 57 43)',
|
|
23
|
+
'--tertiary-foreground': 'rgb(255 239 237)',
|
|
24
|
+
'--muted': 'rgb(231 193 221)',
|
|
25
|
+
'--muted-foreground': 'rgb(89 60 96)',
|
|
26
|
+
'--faint-foreground': 'rgb(89 60 96)',
|
|
27
|
+
'--accent': 'rgb(231 193 221)',
|
|
28
|
+
'--accent-foreground': 'rgb(89 60 96)',
|
|
29
|
+
'--destructive': 'rgb(186 26 26)',
|
|
30
|
+
'--border': 'rgb(201 165 207)',
|
|
31
|
+
'--input': 'rgb(201 165 207)',
|
|
32
|
+
'--ring': 'rgb(148 34 174)',
|
|
33
|
+
'--sidebar': 'rgb(241 221 233)',
|
|
34
|
+
'--card': 'rgb(255 247 249)',
|
|
35
|
+
'--card-foreground': 'rgb(42 17 50)',
|
|
36
|
+
'--chart-1': 'rgb(159 81 184)',
|
|
37
|
+
'--chart-2': 'rgb(192 78 43)',
|
|
38
|
+
'--chart-3': 'rgb(123 116 0)',
|
|
39
|
+
'--chart-4': 'rgb(0 129 109)',
|
|
40
|
+
'--chart-5': 'rgb(0 118 190)',
|
|
41
|
+
'--chart-6': 'rgb(189 72 120)',
|
|
42
|
+
'--chart-7': 'rgb(160 101 0)',
|
|
43
|
+
'--chart-8': 'rgb(45 131 38)',
|
|
44
|
+
'--chart-9': 'rgb(0 125 145)',
|
|
45
|
+
'--chart-1-active': 'rgb(137 60 162)',
|
|
46
|
+
'--chart-2-active': 'rgb(165 59 25)',
|
|
47
|
+
'--chart-3-active': 'rgb(102 96 0)',
|
|
48
|
+
'--chart-4-active': 'rgb(0 107 90)',
|
|
49
|
+
'--chart-5-active': 'rgb(0 98 159)',
|
|
50
|
+
'--chart-6-active': 'rgb(164 52 100)',
|
|
51
|
+
'--chart-7-active': 'rgb(133 84 0)',
|
|
52
|
+
'--chart-8-active': 'rgb(19 110 17)',
|
|
53
|
+
'--chart-9-active': 'rgb(0 104 120)',
|
|
54
|
+
'--content-area': 'rgb(255 239 253)',
|
|
55
|
+
'--sidebar-foreground': 'rgb(42 17 50)',
|
|
56
|
+
'--sidebar-primary': 'rgb(148 34 174)',
|
|
57
|
+
'--sidebar-primary-foreground': 'rgb(255 238 252)',
|
|
58
|
+
'--sidebar-accent': 'rgb(255 189 241)',
|
|
59
|
+
'--sidebar-accent-foreground': 'rgb(119 35 113)',
|
|
60
|
+
'--sidebar-border': 'rgb(201 165 207)',
|
|
61
|
+
'--sidebar-ring': 'rgb(148 34 174)',
|
|
62
|
+
'--primary-text': 'rgb(156 0 200)',
|
|
63
|
+
'--vivid': 'rgb(196 110 222)',
|
|
64
|
+
'--vivid-foreground': 'rgb(0 0 0)',
|
|
65
|
+
'--primary-subtle': 'rgba(213, 86, 255, 0.13)',
|
|
66
|
+
'--secondary-text': 'rgb(150 56 142)',
|
|
67
|
+
'--secondary-subtle': 'rgba(255, 5, 248, 0.13)',
|
|
68
|
+
'--tertiary-text': 'rgb(167 57 42)',
|
|
69
|
+
'--tertiary-subtle': 'rgba(255, 85, 64, 0.13)',
|
|
70
|
+
'--success': 'rgb(0 121 82)',
|
|
71
|
+
'--success-foreground': 'rgb(255 255 255)',
|
|
72
|
+
'--success-text': 'rgb(0 108 73)',
|
|
73
|
+
'--success-subtle': 'rgba(16, 185, 129, 0.13)',
|
|
74
|
+
'--error': 'rgb(191 31 39)',
|
|
75
|
+
'--error-foreground': 'rgb(255 255 255)',
|
|
76
|
+
'--error-text': 'rgb(167 55 53)',
|
|
77
|
+
'--error-subtle': 'rgba(239, 68, 68, 0.13)',
|
|
78
|
+
'--warning': 'rgb(148 93 0)',
|
|
79
|
+
'--warning-foreground': 'rgb(255 255 255)',
|
|
80
|
+
'--warning-text': 'rgb(133 83 0)',
|
|
81
|
+
'--warning-subtle': 'rgba(245, 158, 11, 0.13)',
|
|
82
|
+
'--info': 'rgb(0 100 213)',
|
|
83
|
+
'--info-foreground': 'rgb(255 255 255)',
|
|
84
|
+
'--info-text': 'rgb(1 90 194)',
|
|
85
|
+
'--info-subtle': 'rgba(59, 130, 246, 0.13)',
|
|
86
|
+
};
|
package/src/theme/index.ts
CHANGED
|
@@ -101,7 +101,7 @@ export type {
|
|
|
101
101
|
} from './persistence';
|
|
102
102
|
export { createBloomThemeStorage, webLocalStorage } from './persistence';
|
|
103
103
|
|
|
104
|
-
export { useThemePaint } from './use-theme-paint';
|
|
104
|
+
export { readThemePaint, useThemePaint } from './use-theme-paint';
|
|
105
105
|
export { createTokenStyles, tokenAlpha, useColorTokens } from './color-tokens';
|
|
106
106
|
export { ColorScopeLayerContext } from './color-scope/layer';
|
|
107
107
|
export type { ColorScopeLayer } from './color-scope/layer';
|
package/src/theme/index.web.ts
CHANGED
|
@@ -106,7 +106,7 @@ export type {
|
|
|
106
106
|
} from './persistence';
|
|
107
107
|
export { createBloomThemeStorage, webLocalStorage } from './persistence';
|
|
108
108
|
|
|
109
|
-
export { useThemePaint } from './use-theme-paint';
|
|
109
|
+
export { readThemePaint, useThemePaint } from './use-theme-paint';
|
|
110
110
|
export { createTokenStyles, tokenAlpha, useColorTokens } from './color-tokens';
|
|
111
111
|
export { ColorScopeLayerContext } from './color-scope/layer';
|
|
112
112
|
export type { ColorScopeLayer } from './color-scope/layer';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { buildScopeVars } from './color-scope/style-builder';
|
|
1
|
+
import { buildPresetPalette } from './build-theme';
|
|
3
2
|
import type { ScopePalette } from './color-scope/context';
|
|
4
3
|
import type { AppColorName } from './color-presets';
|
|
5
4
|
|
|
@@ -11,7 +10,7 @@ export function getPrepaintPalette(preset: AppColorName, mode: 'light' | 'dark')
|
|
|
11
10
|
const key = `${preset}/${mode}`;
|
|
12
11
|
let palette = palettes.get(key);
|
|
13
12
|
if (!palette) {
|
|
14
|
-
palette =
|
|
13
|
+
palette = buildPresetPalette(preset, mode);
|
|
15
14
|
palettes.set(key, palette);
|
|
16
15
|
}
|
|
17
16
|
return palette;
|
|
@@ -1,107 +1,7 @@
|
|
|
1
1
|
import { APP_COLOR_NAMES, type AppColorName } from './color-presets';
|
|
2
2
|
import { getPresetVars, type ExplicitAccents } from './preset-vars';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
* The canonical set of Bloom theme token names — WITHOUT the leading `--`.
|
|
6
|
-
*
|
|
7
|
-
* This is the single source of truth for which tokens a preset produces. It
|
|
8
|
-
* covers exactly the keys returned by `getPresetVars(name, mode)` (the base
|
|
9
|
-
* shadcn palette plus the synthesized extended tokens: card/chart/content-area/
|
|
10
|
-
* sidebar-*). The list is intentionally hand-maintained and verified by
|
|
11
|
-
* `token-registry.test.ts` against the live `getPresetVars('oxy', 'light')`
|
|
12
|
-
* output, so any drift in the preset shape fails CI.
|
|
13
|
-
*
|
|
14
|
-
* Order mirrors `getPresetVars`'s insertion order: base tokens first (in the
|
|
15
|
-
* order they appear in the preset data), then the synthesized extended tokens.
|
|
16
|
-
*/
|
|
17
|
-
export const CANONICAL_TOKENS = [
|
|
18
|
-
'background',
|
|
19
|
-
'foreground',
|
|
20
|
-
'surface',
|
|
21
|
-
'surface-foreground',
|
|
22
|
-
'popover',
|
|
23
|
-
'popover-foreground',
|
|
24
|
-
'primary',
|
|
25
|
-
'primary-foreground',
|
|
26
|
-
'secondary',
|
|
27
|
-
'secondary-foreground',
|
|
28
|
-
'tertiary',
|
|
29
|
-
'tertiary-foreground',
|
|
30
|
-
'muted',
|
|
31
|
-
'muted-foreground',
|
|
32
|
-
'accent',
|
|
33
|
-
'accent-foreground',
|
|
34
|
-
'destructive',
|
|
35
|
-
'border',
|
|
36
|
-
'input',
|
|
37
|
-
'ring',
|
|
38
|
-
'sidebar',
|
|
39
|
-
'card',
|
|
40
|
-
'card-foreground',
|
|
41
|
-
'chart-1',
|
|
42
|
-
'chart-2',
|
|
43
|
-
'chart-3',
|
|
44
|
-
'chart-4',
|
|
45
|
-
'chart-5',
|
|
46
|
-
'chart-6',
|
|
47
|
-
'chart-7',
|
|
48
|
-
'chart-8',
|
|
49
|
-
'chart-9',
|
|
50
|
-
'chart-1-active',
|
|
51
|
-
'chart-2-active',
|
|
52
|
-
'chart-3-active',
|
|
53
|
-
'chart-4-active',
|
|
54
|
-
'chart-5-active',
|
|
55
|
-
'chart-6-active',
|
|
56
|
-
'chart-7-active',
|
|
57
|
-
'chart-8-active',
|
|
58
|
-
'chart-9-active',
|
|
59
|
-
'content-area',
|
|
60
|
-
'sidebar-foreground',
|
|
61
|
-
'sidebar-primary',
|
|
62
|
-
'sidebar-primary-foreground',
|
|
63
|
-
'sidebar-accent',
|
|
64
|
-
'sidebar-accent-foreground',
|
|
65
|
-
'sidebar-border',
|
|
66
|
-
'sidebar-ring',
|
|
67
|
-
|
|
68
|
-
// --- the accent families ---
|
|
69
|
-
// Each accent is a FAMILY, not a colour: a fill, the label that is legible on
|
|
70
|
-
// it, a `-text` form for a mark on the page, and a `-subtle` translucent tint
|
|
71
|
-
// for the surface behind one. A single value can only ever be a fill, which is
|
|
72
|
-
// why consumers hand-rolled the rest with hex-alpha arithmetic.
|
|
73
|
-
'primary-text',
|
|
74
|
-
'vivid',
|
|
75
|
-
'vivid-foreground',
|
|
76
|
-
'primary-subtle',
|
|
77
|
-
'secondary-text',
|
|
78
|
-
'secondary-subtle',
|
|
79
|
-
'tertiary-text',
|
|
80
|
-
'tertiary-subtle',
|
|
81
|
-
|
|
82
|
-
// --- semantic status, themed per mode ---
|
|
83
|
-
// Replaces four frozen hexes that all FAILED AA under white text (warning at
|
|
84
|
-
// 2.15, success 2.54, info 3.68, error 3.76) and had no subtle or text member.
|
|
85
|
-
'success',
|
|
86
|
-
'success-foreground',
|
|
87
|
-
'success-text',
|
|
88
|
-
'success-subtle',
|
|
89
|
-
'error',
|
|
90
|
-
'error-foreground',
|
|
91
|
-
'error-text',
|
|
92
|
-
'error-subtle',
|
|
93
|
-
'warning',
|
|
94
|
-
'warning-foreground',
|
|
95
|
-
'warning-text',
|
|
96
|
-
'warning-subtle',
|
|
97
|
-
'info',
|
|
98
|
-
'info-foreground',
|
|
99
|
-
'info-text',
|
|
100
|
-
'info-subtle',
|
|
101
|
-
] as const;
|
|
102
|
-
|
|
103
|
-
/** A canonical token name (no leading `--`). */
|
|
104
|
-
export type CanonicalToken = (typeof CANONICAL_TOKENS)[number];
|
|
4
|
+
export { CANONICAL_TOKENS, type CanonicalToken } from './canonical-tokens';
|
|
105
5
|
|
|
106
6
|
/**
|
|
107
7
|
* Matches a shadcn-style raw HSL triple — `H S% L%`, optionally with an alpha
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { createElement, type DependencyList, useContext, useId, useMemo } from 'react';
|
|
1
|
+
import { createElement, type DependencyList, use, useContext, useId, useMemo } from 'react';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
+
import { BloomThemeContext } from './BloomThemeProvider';
|
|
3
4
|
import { useTheme } from './use-theme';
|
|
4
5
|
import { ThemeScopeContext } from './color-scope/context';
|
|
5
|
-
import { usePrepaintThemeConfig } from './prepaint/context';
|
|
6
|
+
import { PrepaintThemeContext, usePrepaintThemeConfig } from './prepaint/context';
|
|
6
7
|
import { usePaintColors } from './prepaint/use-paint-colors';
|
|
7
|
-
import { themePaintRecipe, themePaintCss, presetPaintCss } from './paint';
|
|
8
|
+
import { themePaintColors, themePaintRecipe, themePaintCss, presetPaintCss } from './paint';
|
|
8
9
|
import { APP_COLOR_NAMES, type AppColorName } from './color-presets';
|
|
9
10
|
import { ServerStyleSheetFactory } from '../styles/ServerStyleSheetFactory';
|
|
10
11
|
import type { Theme, ThemeColors } from './types';
|
|
@@ -92,3 +93,25 @@ export function useThemePaint(): ThemeColors {
|
|
|
92
93
|
if (!paint) throw new Error('useThemePaint must be used within a <BloomThemeProvider>');
|
|
93
94
|
return paint;
|
|
94
95
|
}
|
|
96
|
+
|
|
97
|
+
const paints = new WeakMap<ThemeColors, ThemeColors>();
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* `useTheme()` and `useThemePaint()` in one read, through React's `use`: not a
|
|
101
|
+
* hook, so a renderer that draws from a tree it builds (the Bloom language's
|
|
102
|
+
* roots and `view()` bodies) reads the theme only when that tree paints from
|
|
103
|
+
* it. Called during render, as a hook is. One context read natively, two on
|
|
104
|
+
* the web (the theme and its prepaint).
|
|
105
|
+
*/
|
|
106
|
+
export function readThemePaint(): { readonly theme: Theme; readonly paint: ThemeColors } {
|
|
107
|
+
const theme = use(BloomThemeContext)?.theme;
|
|
108
|
+
if (!theme) throw new Error('useTheme must be used within a <BloomThemeProvider>');
|
|
109
|
+
if (Platform.OS !== 'web' || use(PrepaintThemeContext) === undefined)
|
|
110
|
+
return { theme, paint: theme.colors };
|
|
111
|
+
let paint = paints.get(theme.colors);
|
|
112
|
+
if (paint === undefined) {
|
|
113
|
+
paint = themePaintColors(theme.colors);
|
|
114
|
+
paints.set(theme.colors, paint);
|
|
115
|
+
}
|
|
116
|
+
return { theme, paint };
|
|
117
|
+
}
|