@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
|
@@ -61,9 +61,43 @@ import {
|
|
|
61
61
|
vectorGeometryKey,
|
|
62
62
|
} from './vector-compose';
|
|
63
63
|
import { renderVectorFrame } from './vector-frame';
|
|
64
|
-
import
|
|
64
|
+
import {
|
|
65
|
+
releaseVectorLoop,
|
|
66
|
+
vectorLoop,
|
|
67
|
+
vectorLoopFrame,
|
|
68
|
+
vectorLoopIndex,
|
|
69
|
+
vectorLoopKey,
|
|
70
|
+
vectorLoopTime,
|
|
71
|
+
vectorLoopTracks,
|
|
72
|
+
type VectorLoop,
|
|
73
|
+
} from './vector-loop';
|
|
74
|
+
import {
|
|
75
|
+
nativePaint,
|
|
76
|
+
nativeVectorLoop,
|
|
77
|
+
VectorNativeSurface,
|
|
78
|
+
viewBoxNumbers,
|
|
79
|
+
type NativeVectorClock,
|
|
80
|
+
type NativeVectorFrame,
|
|
81
|
+
type NativeVectorLoop,
|
|
82
|
+
type NativeVectorSurfaceProps,
|
|
83
|
+
} from './VectorNativeSurface';
|
|
84
|
+
import type { VectorAction, VectorData, VectorDrawPath, VectorFrame } from './vector-types';
|
|
65
85
|
|
|
66
86
|
type Props = AgentAvatarProps & { previewPart?: 'eyes' };
|
|
87
|
+
/** One computed frame: what is drawn, and the pose and motion a later transition starts from. */
|
|
88
|
+
type PaintedFrame = {
|
|
89
|
+
pose: VectorPose;
|
|
90
|
+
procedural?: VectorMotionPose;
|
|
91
|
+
gaze: { yaw: number; pitch: number };
|
|
92
|
+
drawing: VectorFrame;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* The rest loops the native surface has, by `vectorLoopKey`: `true` once it said it has one (from
|
|
96
|
+
* memory, from an earlier start, or because it was handed over), `false` once it said it has not.
|
|
97
|
+
* Where there is no native surface (the web) the JS thread replays the remembered frames itself.
|
|
98
|
+
*/
|
|
99
|
+
const nativeLoops = new Map<string, boolean>();
|
|
100
|
+
let lastCapture = 0;
|
|
67
101
|
type Display = {
|
|
68
102
|
geometry: string;
|
|
69
103
|
drawing: VectorFrame;
|
|
@@ -128,6 +162,17 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
128
162
|
latestAsset.current = paintedAsset;
|
|
129
163
|
const [display, setDisplay] = useState<Display>(),
|
|
130
164
|
[revision, setRevision] = useState(0);
|
|
165
|
+
/** The clock of the rest loop the native surface plays, if it does; the JS thread draws nothing meanwhile. */
|
|
166
|
+
const [looping, setLooping] = useState<NativeVectorClock>();
|
|
167
|
+
const loopSession = useRef<
|
|
168
|
+
{ key: string; loop: VectorLoop<PaintedFrame>; asset: VectorData } & NativeVectorClock
|
|
169
|
+
>(undefined);
|
|
170
|
+
/** The rest loop the native surface is asked about, and the loop handed to it when it has not got it. */
|
|
171
|
+
const [restKey, setRestKey] = useState<string>();
|
|
172
|
+
const [handedLoop, setHandedLoop] = useState<{ key: string; loop: NativeVectorLoop }>();
|
|
173
|
+
const [capture, setCapture] = useState(0);
|
|
174
|
+
const captures = useRef(new Map<number, (data: string | null) => void>());
|
|
175
|
+
const drawn = useRef(false);
|
|
131
176
|
const host = useRef<ComponentRef<typeof View> | null>(null);
|
|
132
177
|
const svg = useRef<Svg | null>(null);
|
|
133
178
|
const observeSnapshot = useContext(AvatarSnapshotObserver);
|
|
@@ -143,6 +188,16 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
143
188
|
}
|
|
144
189
|
: null;
|
|
145
190
|
}
|
|
191
|
+
if (VectorNativeSurface)
|
|
192
|
+
return drawn.current
|
|
193
|
+
? new Promise((resolve) => {
|
|
194
|
+
const id = ++lastCapture;
|
|
195
|
+
captures.current.set(id, (data) =>
|
|
196
|
+
resolve(data ? { uri: 'data:image/png;base64,' + data } : null),
|
|
197
|
+
);
|
|
198
|
+
setCapture(id);
|
|
199
|
+
})
|
|
200
|
+
: null;
|
|
146
201
|
return svg.current
|
|
147
202
|
? new Promise((resolve) =>
|
|
148
203
|
svg.current!.toDataURL((data) => resolve({ uri: 'data:image/png;base64,' + data })),
|
|
@@ -198,6 +253,46 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
198
253
|
cycles.current = props.workingCycles;
|
|
199
254
|
const catalogRef = useRef(catalog);
|
|
200
255
|
catalogRef.current = catalog;
|
|
256
|
+
/**
|
|
257
|
+
* Takes the drawing back from the native surface: the clock moves on by what it played (both read
|
|
258
|
+
* the same monotonic clock), and the surface keeps the frame it got to on screen until the JS
|
|
259
|
+
* thread draws one. Called before anything changes the motion (a gesture, a mood, the pointer) and
|
|
260
|
+
* whenever the frame loop restarts, so the character carries on from where it was.
|
|
261
|
+
*/
|
|
262
|
+
const endLoop = useCallback(() => {
|
|
263
|
+
const session = loopSession.current;
|
|
264
|
+
if (!session) return;
|
|
265
|
+
loopSession.current = undefined;
|
|
266
|
+
const seconds = Math.max(0, (performance.now() - session.epoch) / 1000),
|
|
267
|
+
motion = state.current;
|
|
268
|
+
advanceVectorPlayback(motion, session.asset, seconds);
|
|
269
|
+
advanceVectorMood(motion.mood, latestMood.current, seconds);
|
|
270
|
+
// The pose of that frame, which a gesture blends from: at rest it is the idle clip's pose at the
|
|
271
|
+
// frame's grid time, as the loop drew it.
|
|
272
|
+
motion.lastPose = sampleVectorPose(
|
|
273
|
+
session.asset,
|
|
274
|
+
'idle',
|
|
275
|
+
vectorLoopTime(session.loop, vectorLoopIndex(session.loop, motion.time)),
|
|
276
|
+
);
|
|
277
|
+
setLooping(undefined);
|
|
278
|
+
setDisplay((shown) => shown && { ...shown, time: motion.time });
|
|
279
|
+
}, []);
|
|
280
|
+
const onLoop = useCallback<NonNullable<NativeVectorSurfaceProps['onLoop']>>(
|
|
281
|
+
({ nativeEvent: { key, ready } }) => {
|
|
282
|
+
nativeLoops.set(key, ready);
|
|
283
|
+
if (ready) setHandedLoop((handed) => (handed?.key === key ? undefined : handed));
|
|
284
|
+
// The surface lost a loop it was playing: the JS thread draws it again.
|
|
285
|
+
else if (loopSession.current?.key === key) endLoop();
|
|
286
|
+
},
|
|
287
|
+
[endLoop],
|
|
288
|
+
);
|
|
289
|
+
const onCapture = useCallback<NonNullable<NativeVectorSurfaceProps['onCapture']>>(
|
|
290
|
+
({ nativeEvent: { id, data } }) => {
|
|
291
|
+
captures.current.get(id)?.(data);
|
|
292
|
+
captures.current.delete(id);
|
|
293
|
+
},
|
|
294
|
+
[],
|
|
295
|
+
);
|
|
201
296
|
/**
|
|
202
297
|
* The character is first loaded at rest (`VECTOR_REST_CLIPS`): its idle tracks and the geometry
|
|
203
298
|
* they draw, which is what an avatar shows almost always (a mood is drawn on the idle clip). Its
|
|
@@ -218,6 +313,8 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
218
313
|
fullGeometry.current = key;
|
|
219
314
|
loadedGeometry.current = key;
|
|
220
315
|
if (value.referenceFace) state.current.workLook = vectorWorkLook(value);
|
|
316
|
+
// The loop may have been handed over again while this loaded: its clock first.
|
|
317
|
+
endLoop();
|
|
221
318
|
setAsset(value);
|
|
222
319
|
const action = pendingAction.current;
|
|
223
320
|
pendingAction.current = null;
|
|
@@ -228,9 +325,10 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
228
325
|
if (loadingFull.current === key) loadingFull.current = null;
|
|
229
326
|
},
|
|
230
327
|
);
|
|
231
|
-
}, []);
|
|
328
|
+
}, [endLoop]);
|
|
232
329
|
const play = useCallback(
|
|
233
330
|
(action: VectorAction) => {
|
|
331
|
+
endLoop();
|
|
234
332
|
if (action !== 'idle' && fullGeometry.current !== vectorGeometryKey(latestResolved.current)) {
|
|
235
333
|
pendingAction.current = action;
|
|
236
334
|
ensureFull();
|
|
@@ -240,7 +338,7 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
240
338
|
playVectorAction(state.current, action, action === 'work' ? cycles.current : 1);
|
|
241
339
|
setRevision((value) => value + 1);
|
|
242
340
|
},
|
|
243
|
-
[ensureFull],
|
|
341
|
+
[ensureFull, endLoop],
|
|
244
342
|
);
|
|
245
343
|
useEffect(() => {
|
|
246
344
|
let current = true;
|
|
@@ -322,11 +420,12 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
322
420
|
}, [props.idleKey, props.reactionKey, props.workingKey, props.entranceKey, play]);
|
|
323
421
|
useEffect(() => {
|
|
324
422
|
if (mood === previous.current.mood) return;
|
|
423
|
+
endLoop();
|
|
325
424
|
setVectorMood(state.current.mood, mood, previous.current.mood);
|
|
326
425
|
previous.current.mood = mood;
|
|
327
426
|
// A still character repaints into the new mood; a running one restarts its frame loop.
|
|
328
427
|
setRevision((value) => value + 1);
|
|
329
|
-
}, [mood]);
|
|
428
|
+
}, [mood, endLoop]);
|
|
330
429
|
useEffect(() => {
|
|
331
430
|
if (Platform.OS !== 'web' || typeof IntersectionObserver === 'undefined' || !host.current)
|
|
332
431
|
return;
|
|
@@ -338,12 +437,15 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
338
437
|
}, []);
|
|
339
438
|
useEffect(() => {
|
|
340
439
|
if (!asset || !visible || !screenVisible) return;
|
|
440
|
+
// The UI thread plays the loop until something changes; then the JS thread takes over again.
|
|
441
|
+
if (looping) return endLoop;
|
|
341
442
|
let last: number | undefined,
|
|
342
443
|
painted = 0,
|
|
444
|
+
paintedIndex = -1,
|
|
343
445
|
disposed = false;
|
|
344
446
|
const stopped = !!paused || !!portrait || reduced;
|
|
345
447
|
const tick = (timestamp: number) => {
|
|
346
|
-
if (disposed) return;
|
|
448
|
+
if (disposed || loopSession.current) return;
|
|
347
449
|
// A frame callback that brings no timestamp is read off the page's own clock; with no clock
|
|
348
450
|
// at all there is nothing to advance by, and the frame is not drawn.
|
|
349
451
|
const now = Number.isFinite(timestamp)
|
|
@@ -365,82 +467,127 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
365
467
|
motion.lookMix += ((motion.pointerActive ? 1 : 0) - motion.lookMix) * follow;
|
|
366
468
|
advanceVectorMood(motion.mood, latestMood.current, delta);
|
|
367
469
|
} else settleVectorMood(motion.mood, latestMood.current);
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
470
|
+
// At rest the frame is one of the loop's, drawn once and remembered (`vector-loop.ts`), and
|
|
471
|
+
// each grid frame is painted in turn; otherwise a frame is painted 30 times a second.
|
|
472
|
+
const resting =
|
|
473
|
+
!stopped &&
|
|
474
|
+
motion.action === 'idle' &&
|
|
475
|
+
!motion.poseFrom &&
|
|
476
|
+
!motion.motionFrom &&
|
|
477
|
+
motion.entrance >= 1 &&
|
|
478
|
+
motion.yaw === 0 &&
|
|
479
|
+
motion.pitch === 0 &&
|
|
480
|
+
!vectorMoodActive(motion.mood) &&
|
|
481
|
+
!asset.referenceFace &&
|
|
482
|
+
!previewPart;
|
|
483
|
+
const loop = resting
|
|
484
|
+
? vectorLoop<PaintedFrame>(latestFrameRecipe.current, asset.clips.idle.duration)
|
|
485
|
+
: undefined;
|
|
486
|
+
const index = loop ? vectorLoopIndex(loop, motion.time) : 0;
|
|
487
|
+
const transition = Math.min(
|
|
488
|
+
1,
|
|
489
|
+
Math.max(0, (motion.clock - motion.transitionStarted) / motion.transitionDuration),
|
|
490
|
+
);
|
|
491
|
+
const eased = transition * transition * (3 - 2 * transition);
|
|
492
|
+
const feeling = !portrait && vectorMoodActive(motion.mood) ? { ...motion.mood } : undefined;
|
|
493
|
+
const draw = (action: VectorAction, time: number): PaintedFrame => {
|
|
494
|
+
const poseTime = asset.referenceFace && action === 'work' ? referenceWorkTime(time) : time;
|
|
495
|
+
const targetPose = sampleVectorPose(asset, action, poseTime);
|
|
496
|
+
const pose =
|
|
497
|
+
motion.poseFrom && !portrait
|
|
498
|
+
? blendVectorPose(motion.poseFrom, targetPose, eased)
|
|
499
|
+
: targetPose;
|
|
500
|
+
const procedural = asset.referenceFace
|
|
501
|
+
? sampleVectorMotion({
|
|
502
|
+
personalityKey: latestResolved.current.shape,
|
|
503
|
+
time: portrait ? 0 : motion.clock,
|
|
504
|
+
state: action,
|
|
505
|
+
stateTime: poseTime,
|
|
506
|
+
workLook: motion.workLook,
|
|
507
|
+
look: {
|
|
508
|
+
yaw: motion.yaw,
|
|
509
|
+
pitch: motion.pitch,
|
|
510
|
+
mix: portrait ? 0 : motion.lookMix,
|
|
511
|
+
wander: (action === 'work' ? 0.15 : 1) * (1 - motion.lookMix),
|
|
512
|
+
},
|
|
513
|
+
transition:
|
|
514
|
+
motion.motionFrom && !portrait
|
|
515
|
+
? {
|
|
516
|
+
from: motion.motionFrom,
|
|
517
|
+
startedAt: motion.transitionStarted,
|
|
518
|
+
duration: motion.transitionDuration,
|
|
519
|
+
}
|
|
520
|
+
: undefined,
|
|
521
|
+
})
|
|
522
|
+
: undefined;
|
|
523
|
+
// The mood goes over the blended motion, never into it: a transition captures the
|
|
524
|
+
// motion without the mood, which carries on through the transition on its own clock.
|
|
525
|
+
const framed = vectorMoodFrame(
|
|
526
|
+
asset,
|
|
527
|
+
procedural,
|
|
528
|
+
{ yaw: portrait ? 0 : motion.yaw, pitch: portrait ? 0 : motion.pitch },
|
|
529
|
+
feeling,
|
|
375
530
|
);
|
|
376
|
-
const
|
|
377
|
-
const feeling = !portrait && vectorMoodActive(motion.mood) ? { ...motion.mood } : undefined;
|
|
378
|
-
const sharedKey = JSON.stringify([
|
|
379
|
-
latestFrameRecipe.current,
|
|
531
|
+
const drawing = renderVectorFrame(asset, {
|
|
380
532
|
action,
|
|
381
533
|
time,
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
from: motion.motionFrom,
|
|
421
|
-
startedAt: motion.transitionStarted,
|
|
422
|
-
duration: motion.transitionDuration,
|
|
423
|
-
}
|
|
424
|
-
: undefined,
|
|
425
|
-
})
|
|
426
|
-
: undefined;
|
|
427
|
-
// The mood goes over the blended motion, never into it: a transition captures the
|
|
428
|
-
// motion without the mood, which carries on through the transition on its own clock.
|
|
429
|
-
const framed = vectorMoodFrame(
|
|
430
|
-
asset,
|
|
431
|
-
procedural,
|
|
432
|
-
{ yaw: portrait ? 0 : motion.yaw, pitch: portrait ? 0 : motion.pitch },
|
|
433
|
-
feeling,
|
|
434
|
-
);
|
|
435
|
-
const drawing = renderVectorFrame(asset, {
|
|
534
|
+
...framed,
|
|
535
|
+
eyesOnly: previewPart === 'eyes',
|
|
536
|
+
pose,
|
|
537
|
+
});
|
|
538
|
+
return { pose, procedural, gaze: framed.look ?? framed, drawing };
|
|
539
|
+
};
|
|
540
|
+
// Where there is a native surface, a loop it has is played by it, from where the clock is.
|
|
541
|
+
const key =
|
|
542
|
+
loop && VectorNativeSurface
|
|
543
|
+
? vectorLoopKey(
|
|
544
|
+
loop,
|
|
545
|
+
JSON.stringify([
|
|
546
|
+
vectorGeometryKey(latestResolved.current),
|
|
547
|
+
latestResolved.current.paint,
|
|
548
|
+
]),
|
|
549
|
+
asset.clips.idle,
|
|
550
|
+
() => vectorLoopFrame(loop, 0, () => draw('idle', vectorLoopTime(loop, 0))).drawing,
|
|
551
|
+
)
|
|
552
|
+
: undefined;
|
|
553
|
+
if (key !== undefined) {
|
|
554
|
+
setRestKey(key);
|
|
555
|
+
// Once a frame is on screen, so the surface is there to play it.
|
|
556
|
+
if (nativeLoops.get(key) && motion.count > 0) {
|
|
557
|
+
const clock = { epoch: performance.now(), time: motion.time };
|
|
558
|
+
loopSession.current = { key, loop: loop!, asset, ...clock };
|
|
559
|
+
releaseVectorLoop(loop!);
|
|
560
|
+
setLooping(clock);
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
if (loop ? index !== paintedIndex : !painted || stopped || now - painted >= 1000 / 30) {
|
|
565
|
+
painted = painted ? now - ((now - painted) % (1000 / 30)) : now;
|
|
566
|
+
paintedIndex = loop ? index : -1;
|
|
567
|
+
const action = portrait ? 'idle' : motion.action,
|
|
568
|
+
time = loop ? vectorLoopTime(loop, index) : portrait ? 0 : motion.time;
|
|
569
|
+
const sharedKey = () =>
|
|
570
|
+
JSON.stringify([
|
|
571
|
+
latestFrameRecipe.current,
|
|
436
572
|
action,
|
|
437
573
|
time,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
574
|
+
motion.clock,
|
|
575
|
+
motion.yaw,
|
|
576
|
+
motion.pitch,
|
|
577
|
+
motion.lookMix,
|
|
578
|
+
motion.workLook,
|
|
579
|
+
motion.transitionStarted,
|
|
580
|
+
motion.transitionDuration,
|
|
581
|
+
vectorStateIdentity(motion.poseFrom),
|
|
582
|
+
vectorStateIdentity(motion.motionFrom),
|
|
583
|
+
feeling?.sadness,
|
|
584
|
+
feeling?.declineTime,
|
|
585
|
+
portrait,
|
|
586
|
+
previewPart,
|
|
587
|
+
]);
|
|
588
|
+
const { pose, procedural, gaze, drawing } = loop
|
|
589
|
+
? vectorLoopFrame(loop, index, () => draw(action, time))
|
|
590
|
+
: shareVectorFrame(sharedKey(), () => draw(action, time));
|
|
444
591
|
motion.lastPose = pose;
|
|
445
592
|
motion.lastMotion = procedural;
|
|
446
593
|
if (transition >= 1) {
|
|
@@ -460,6 +607,14 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
460
607
|
tracking: motion.lookMix,
|
|
461
608
|
});
|
|
462
609
|
}
|
|
610
|
+
// A complete loop the native surface said it has not got is handed to it once.
|
|
611
|
+
const tracks = key !== undefined && nativeLoops.get(key) === false && vectorLoopTracks(loop!);
|
|
612
|
+
if (tracks)
|
|
613
|
+
setHandedLoop((handed) =>
|
|
614
|
+
handed?.key === key
|
|
615
|
+
? handed
|
|
616
|
+
: { key: key!, loop: nativeVectorLoop(tracks, avatarViewBox(tracks.viewBox)) },
|
|
617
|
+
);
|
|
463
618
|
};
|
|
464
619
|
if (stopped) tick(typeof performance === 'undefined' ? 0 : performance.now());
|
|
465
620
|
const unsubscribe = stopped ? undefined : subscribeVectorFrame(tick);
|
|
@@ -467,7 +622,18 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
467
622
|
disposed = true;
|
|
468
623
|
unsubscribe?.();
|
|
469
624
|
};
|
|
470
|
-
}, [
|
|
625
|
+
}, [
|
|
626
|
+
asset,
|
|
627
|
+
visible,
|
|
628
|
+
screenVisible,
|
|
629
|
+
paused,
|
|
630
|
+
portrait,
|
|
631
|
+
reduced,
|
|
632
|
+
previewPart,
|
|
633
|
+
revision,
|
|
634
|
+
looping,
|
|
635
|
+
endLoop,
|
|
636
|
+
]);
|
|
471
637
|
useEffect(() => {
|
|
472
638
|
if (paused || portrait || reduced) setRevision((value) => value + 1);
|
|
473
639
|
}, [resolved.paint, paused, portrait, reduced]);
|
|
@@ -478,9 +644,45 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
478
644
|
onReady.current?.();
|
|
479
645
|
}
|
|
480
646
|
}, [display]);
|
|
647
|
+
drawn.current = !!display;
|
|
648
|
+
/** The paint a drawn path is shown with: the current paint, when the frame is of the current geometry. */
|
|
649
|
+
const paintOf = (path: VectorDrawPath) => {
|
|
650
|
+
const part =
|
|
651
|
+
display?.geometry === loadedGeometry.current
|
|
652
|
+
? paintedAsset?.parts[Number(path.id)]
|
|
653
|
+
: undefined;
|
|
654
|
+
const stroke = part
|
|
655
|
+
? (part.stroke ?? (part.role === 'panel' ? path.stroke : undefined))
|
|
656
|
+
: path.stroke;
|
|
657
|
+
return {
|
|
658
|
+
fill: part?.color ?? path.fill,
|
|
659
|
+
stroke,
|
|
660
|
+
strokeWidth: stroke ? (part?.strokeWidth ?? path.strokeWidth ?? 1.5) : undefined,
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
const nativeFrame = useMemo<NativeVectorFrame | undefined>(
|
|
664
|
+
() =>
|
|
665
|
+
VectorNativeSurface && display
|
|
666
|
+
? {
|
|
667
|
+
revision: display.count,
|
|
668
|
+
viewBox: viewBoxNumbers(avatarViewBox(display.drawing.viewBox)),
|
|
669
|
+
opacity: display.entrance,
|
|
670
|
+
paths: display.drawing.paths.map((path) => ({
|
|
671
|
+
d: path.d,
|
|
672
|
+
...(path.clip !== undefined ? { clip: path.clip } : {}),
|
|
673
|
+
...nativePaint(paintOf(path)),
|
|
674
|
+
opacity: path.opacity,
|
|
675
|
+
fillOpacity: path.fillOpacity,
|
|
676
|
+
})),
|
|
677
|
+
}
|
|
678
|
+
: undefined,
|
|
679
|
+
// `paintOf` reads only `display` and `paintedAsset`.
|
|
680
|
+
[display, paintedAsset],
|
|
681
|
+
);
|
|
481
682
|
const gaze = (x: number, y: number, width: number, height: number) => {
|
|
482
683
|
if (!interactive || paused || portrait || reduced) return;
|
|
483
684
|
if (![x, y, width, height].every(Number.isFinite) || width <= 0 || height <= 0) return;
|
|
685
|
+
endLoop();
|
|
484
686
|
state.current.pointerActive = true;
|
|
485
687
|
const limit = asset?.referenceFace ? 0.6 : 0.8;
|
|
486
688
|
state.current.targetYaw = Math.max(-limit, Math.min(limit, (x / width - 0.5) * 1.8));
|
|
@@ -545,6 +747,21 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
545
747
|
<Text numberOfLines={2} style={{ fontSize: 10 }}>
|
|
546
748
|
{messages.unavailable}
|
|
547
749
|
</Text>
|
|
750
|
+
) : display && VectorNativeSurface ? (
|
|
751
|
+
<VectorNativeSurface
|
|
752
|
+
style={{ width: '100%', height: '100%' }}
|
|
753
|
+
pointerEvents="none"
|
|
754
|
+
accessible={false}
|
|
755
|
+
importantForAccessibility="no-hide-descendants"
|
|
756
|
+
testID="bloom-vector-drawing"
|
|
757
|
+
frame={nativeFrame}
|
|
758
|
+
loopKey={restKey}
|
|
759
|
+
loopTracks={handedLoop?.key === restKey ? handedLoop?.loop : undefined}
|
|
760
|
+
loopClock={looping}
|
|
761
|
+
capture={capture}
|
|
762
|
+
onLoop={onLoop}
|
|
763
|
+
onCapture={onCapture}
|
|
764
|
+
/>
|
|
548
765
|
) : display ? (
|
|
549
766
|
<Svg
|
|
550
767
|
ref={svg}
|
|
@@ -554,49 +771,39 @@ function AnimatedVectorCharacterAvatar(props: Props) {
|
|
|
554
771
|
testID="bloom-vector-drawing"
|
|
555
772
|
{...svgA11yProps()}
|
|
556
773
|
>
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
{display.
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
fillRule="nonzero"
|
|
591
|
-
stroke={stroke}
|
|
592
|
-
strokeWidth={
|
|
593
|
-
stroke ? (currentPart?.strokeWidth ?? path.strokeWidth ?? 1.5) : undefined
|
|
594
|
-
}
|
|
595
|
-
clipPath={path.clip !== undefined ? `url(#${prefix}-${path.id})` : undefined}
|
|
596
|
-
/>
|
|
597
|
-
);
|
|
598
|
-
})}
|
|
599
|
-
</G>
|
|
774
|
+
<>
|
|
775
|
+
<Defs>
|
|
776
|
+
{display.drawing.paths
|
|
777
|
+
.filter((path) => path.clip !== undefined)
|
|
778
|
+
.map((path) => (
|
|
779
|
+
<ClipPath
|
|
780
|
+
key={path.id}
|
|
781
|
+
id={`${prefix}-${path.id}`}
|
|
782
|
+
{...{ clipPathUnits: 'userSpaceOnUse' }}
|
|
783
|
+
>
|
|
784
|
+
<Path d={path.clip} fillRule="nonzero" clipRule="nonzero" />
|
|
785
|
+
</ClipPath>
|
|
786
|
+
))}
|
|
787
|
+
</Defs>
|
|
788
|
+
<G opacity={display.entrance}>
|
|
789
|
+
{display.drawing.paths.map((path) => {
|
|
790
|
+
const paint = paintOf(path);
|
|
791
|
+
return (
|
|
792
|
+
<Path
|
|
793
|
+
key={path.id}
|
|
794
|
+
d={path.d}
|
|
795
|
+
fill={paint.fill}
|
|
796
|
+
opacity={path.opacity}
|
|
797
|
+
fillOpacity={path.fillOpacity}
|
|
798
|
+
fillRule="nonzero"
|
|
799
|
+
stroke={paint.stroke}
|
|
800
|
+
strokeWidth={paint.strokeWidth}
|
|
801
|
+
clipPath={path.clip !== undefined ? `url(#${prefix}-${path.id})` : undefined}
|
|
802
|
+
/>
|
|
803
|
+
);
|
|
804
|
+
})}
|
|
805
|
+
</G>
|
|
806
|
+
</>
|
|
600
807
|
</Svg>
|
|
601
808
|
) : null}
|
|
602
809
|
</View>
|