@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
|
@@ -31,9 +31,20 @@ var _useStaticPortraits = require("./use-static-portraits.js");
|
|
|
31
31
|
var _defaultCatalog = require("./default-catalog.js");
|
|
32
32
|
var _vectorCompose = require("./vector-compose.js");
|
|
33
33
|
var _vectorFrame = require("./vector-frame.js");
|
|
34
|
+
var _vectorLoop = require("./vector-loop.js");
|
|
35
|
+
var _VectorNativeSurface = require("./VectorNativeSurface.js");
|
|
34
36
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
37
|
var cache;
|
|
36
38
|
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
39
|
+
/** One computed frame: what is drawn, and the pose and motion a later transition starts from. */
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The rest loops the native surface has, by `vectorLoopKey`: `true` once it said it has one (from
|
|
43
|
+
* memory, from an earlier start, or because it was handed over), `false` once it said it has not.
|
|
44
|
+
* Where there is no native surface (the web) the JS thread replays the remembered frames itself.
|
|
45
|
+
*/
|
|
46
|
+
const nativeLoops = new Map();
|
|
47
|
+
let lastCapture = 0;
|
|
37
48
|
/** Shared browser/native SVG host; loading, composition and projection never start the 3D runtime. */
|
|
38
49
|
function VectorCharacterAvatar(props) {
|
|
39
50
|
const $ = (0, _compilerRuntime.c)(4);
|
|
@@ -139,6 +150,15 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
139
150
|
latestAsset.current = paintedAsset;
|
|
140
151
|
const [display, setDisplay] = (0, _react.useState)(),
|
|
141
152
|
[revision, setRevision] = (0, _react.useState)(0);
|
|
153
|
+
/** The clock of the rest loop the native surface plays, if it does; the JS thread draws nothing meanwhile. */
|
|
154
|
+
const [looping, setLooping] = (0, _react.useState)();
|
|
155
|
+
const loopSession = (0, _react.useRef)(undefined);
|
|
156
|
+
/** The rest loop the native surface is asked about, and the loop handed to it when it has not got it. */
|
|
157
|
+
const [restKey, setRestKey] = (0, _react.useState)();
|
|
158
|
+
const [handedLoop, setHandedLoop] = (0, _react.useState)();
|
|
159
|
+
const [capture, setCapture] = (0, _react.useState)(0);
|
|
160
|
+
const captures = (0, _react.useRef)(new Map());
|
|
161
|
+
const drawn = (0, _react.useRef)(false);
|
|
142
162
|
const host = (0, _react.useRef)(null);
|
|
143
163
|
const svg = (0, _react.useRef)(null);
|
|
144
164
|
const observeSnapshot = (0, _react.useContext)(_context.AvatarSnapshotObserver);
|
|
@@ -150,8 +170,15 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
150
170
|
uri: 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(new XMLSerializer().serializeToString(element))
|
|
151
171
|
} : null;
|
|
152
172
|
}
|
|
153
|
-
return
|
|
154
|
-
|
|
173
|
+
if (_VectorNativeSurface.VectorNativeSurface) return drawn.current ? new Promise(resolve => {
|
|
174
|
+
const id = ++lastCapture;
|
|
175
|
+
captures.current.set(id, data => resolve(data ? {
|
|
176
|
+
uri: 'data:image/png;base64,' + data
|
|
177
|
+
} : null));
|
|
178
|
+
setCapture(id);
|
|
179
|
+
}) : null;
|
|
180
|
+
return svg.current ? new Promise(resolve_0 => svg.current.toDataURL(data_0 => resolve_0({
|
|
181
|
+
uri: 'data:image/png;base64,' + data_0
|
|
155
182
|
}))) : null;
|
|
156
183
|
});
|
|
157
184
|
return () => observeSnapshot?.(null);
|
|
@@ -206,6 +233,49 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
206
233
|
cycles.current = props.workingCycles;
|
|
207
234
|
const catalogRef = (0, _react.useRef)(catalog);
|
|
208
235
|
catalogRef.current = catalog;
|
|
236
|
+
/**
|
|
237
|
+
* Takes the drawing back from the native surface: the clock moves on by what it played (both read
|
|
238
|
+
* the same monotonic clock), and the surface keeps the frame it got to on screen until the JS
|
|
239
|
+
* thread draws one. Called before anything changes the motion (a gesture, a mood, the pointer) and
|
|
240
|
+
* whenever the frame loop restarts, so the character carries on from where it was.
|
|
241
|
+
*/
|
|
242
|
+
const endLoop = (0, _react.useCallback)(() => {
|
|
243
|
+
const session = loopSession.current;
|
|
244
|
+
if (!session) return;
|
|
245
|
+
loopSession.current = undefined;
|
|
246
|
+
const seconds = Math.max(0, (performance.now() - session.epoch) / 1000),
|
|
247
|
+
motion = state.current;
|
|
248
|
+
(0, _vectorPlayback.advanceVectorPlayback)(motion, session.asset, seconds);
|
|
249
|
+
(0, _vectorMood.advanceVectorMood)(motion.mood, latestMood.current, seconds);
|
|
250
|
+
// The pose of that frame, which a gesture blends from: at rest it is the idle clip's pose at the
|
|
251
|
+
// frame's grid time, as the loop drew it.
|
|
252
|
+
motion.lastPose = (0, _vectorPose.sampleVectorPose)(session.asset, 'idle', (0, _vectorLoop.vectorLoopTime)(session.loop, (0, _vectorLoop.vectorLoopIndex)(session.loop, motion.time)));
|
|
253
|
+
setLooping(undefined);
|
|
254
|
+
setDisplay(shown => shown && {
|
|
255
|
+
...shown,
|
|
256
|
+
time: motion.time
|
|
257
|
+
});
|
|
258
|
+
}, []);
|
|
259
|
+
const onLoop = (0, _react.useCallback)(({
|
|
260
|
+
nativeEvent: {
|
|
261
|
+
key,
|
|
262
|
+
ready: ready_0
|
|
263
|
+
}
|
|
264
|
+
}) => {
|
|
265
|
+
nativeLoops.set(key, ready_0);
|
|
266
|
+
if (ready_0) setHandedLoop(handed => handed?.key === key ? undefined : handed);
|
|
267
|
+
// The surface lost a loop it was playing: the JS thread draws it again.
|
|
268
|
+
else if (loopSession.current?.key === key) endLoop();
|
|
269
|
+
}, [endLoop]);
|
|
270
|
+
const onCapture = (0, _react.useCallback)(({
|
|
271
|
+
nativeEvent: {
|
|
272
|
+
id: id_0,
|
|
273
|
+
data: data_1
|
|
274
|
+
}
|
|
275
|
+
}) => {
|
|
276
|
+
captures.current.get(id_0)?.(data_1);
|
|
277
|
+
captures.current.delete(id_0);
|
|
278
|
+
}, []);
|
|
209
279
|
/**
|
|
210
280
|
* The character is first loaded at rest (`VECTOR_REST_CLIPS`): its idle tracks and the geometry
|
|
211
281
|
* they draw, which is what an avatar shows almost always (a mood is drawn on the idle clip). Its
|
|
@@ -217,24 +287,27 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
217
287
|
const loadingFull = (0, _react.useRef)(null);
|
|
218
288
|
const pendingAction = (0, _react.useRef)(null);
|
|
219
289
|
const ensureFull = (0, _react.useCallback)(() => {
|
|
220
|
-
const
|
|
221
|
-
if (fullGeometry.current ===
|
|
222
|
-
loadingFull.current =
|
|
290
|
+
const key_0 = (0, _vectorCompose.vectorGeometryKey)(latestResolved.current);
|
|
291
|
+
if (fullGeometry.current === key_0 || loadingFull.current === key_0) return;
|
|
292
|
+
loadingFull.current = key_0;
|
|
223
293
|
void (0, _vectorCompose.loadVectorGeometry)(latestResolved.current, catalogRef.current).then(value_0 => {
|
|
224
|
-
if ((0, _vectorCompose.vectorGeometryKey)(latestResolved.current) !==
|
|
225
|
-
fullGeometry.current =
|
|
226
|
-
loadedGeometry.current =
|
|
294
|
+
if ((0, _vectorCompose.vectorGeometryKey)(latestResolved.current) !== key_0) return;
|
|
295
|
+
fullGeometry.current = key_0;
|
|
296
|
+
loadedGeometry.current = key_0;
|
|
227
297
|
if (value_0.referenceFace) state.current.workLook = (0, _vectorWorkLook.vectorWorkLook)(value_0);
|
|
298
|
+
// The loop may have been handed over again while this loaded: its clock first.
|
|
299
|
+
endLoop();
|
|
228
300
|
setAsset(value_0);
|
|
229
301
|
const action = pendingAction.current;
|
|
230
302
|
pendingAction.current = null;
|
|
231
303
|
if (action) (0, _vectorPlayback.playVectorAction)(state.current, action, action === 'work' ? cycles.current : 1);
|
|
232
304
|
setRevision(revision_0 => revision_0 + 1);
|
|
233
305
|
}, () => {
|
|
234
|
-
if (loadingFull.current ===
|
|
306
|
+
if (loadingFull.current === key_0) loadingFull.current = null;
|
|
235
307
|
});
|
|
236
|
-
}, []);
|
|
308
|
+
}, [endLoop]);
|
|
237
309
|
const play = (0, _react.useCallback)(action_0 => {
|
|
310
|
+
endLoop();
|
|
238
311
|
if (action_0 !== 'idle' && fullGeometry.current !== (0, _vectorCompose.vectorGeometryKey)(latestResolved.current)) {
|
|
239
312
|
pendingAction.current = action_0;
|
|
240
313
|
ensureFull();
|
|
@@ -243,7 +316,7 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
243
316
|
pendingAction.current = null;
|
|
244
317
|
(0, _vectorPlayback.playVectorAction)(state.current, action_0, action_0 === 'work' ? cycles.current : 1);
|
|
245
318
|
setRevision(value_1 => value_1 + 1);
|
|
246
|
-
}, [ensureFull]);
|
|
319
|
+
}, [ensureFull, endLoop]);
|
|
247
320
|
(0, _react.useEffect)(() => {
|
|
248
321
|
let current = true;
|
|
249
322
|
setFailed(false);
|
|
@@ -282,7 +355,7 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
282
355
|
eyewear: resolved.eyewear,
|
|
283
356
|
accessory: resolved.accessory
|
|
284
357
|
},
|
|
285
|
-
available: Object.fromEntries([..._catalogIds.AVATAR_SHAPES.map(
|
|
358
|
+
available: Object.fromEntries([..._catalogIds.AVATAR_SHAPES.map(id_1 => [`shape:${id_1}`, true]), ..._catalogIds.AVATAR_EYES.map(id_2 => [`eyes:${id_2}`, true]), ['eyes:none', true], ..._catalogIds.AVATAR_EYEWEAR.map(id_3 => [`eyewear:${id_3}`, true]), ..._catalogIds.AVATAR_ACCESSORIES.map(id_4 => [`accessory:${id_4}`, true]), ..._catalogIds.AVATAR_COLORS.map(id_5 => [`color:${id_5}`, true])])
|
|
286
359
|
});
|
|
287
360
|
}).catch(() => {
|
|
288
361
|
if (current) {
|
|
@@ -315,11 +388,12 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
315
388
|
}, [props.idleKey, props.reactionKey, props.workingKey, props.entranceKey, play]);
|
|
316
389
|
(0, _react.useEffect)(() => {
|
|
317
390
|
if (mood === previous.current.mood) return;
|
|
391
|
+
endLoop();
|
|
318
392
|
(0, _vectorMood.setVectorMood)(state.current.mood, mood, previous.current.mood);
|
|
319
393
|
previous.current.mood = mood;
|
|
320
394
|
// A still character repaints into the new mood; a running one restarts its frame loop.
|
|
321
395
|
setRevision(value_3 => value_3 + 1);
|
|
322
|
-
}, [mood]);
|
|
396
|
+
}, [mood, endLoop]);
|
|
323
397
|
(0, _react.useEffect)(() => {
|
|
324
398
|
if (_reactNative.Platform.OS !== 'web' || typeof IntersectionObserver === 'undefined' || !host.current) return;
|
|
325
399
|
const observer = new IntersectionObserver(([entry]) => setVisible(entry?.isIntersecting ?? false));
|
|
@@ -328,12 +402,15 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
328
402
|
}, []);
|
|
329
403
|
(0, _react.useEffect)(() => {
|
|
330
404
|
if (!asset || !visible || !screenVisible) return;
|
|
405
|
+
// The UI thread plays the loop until something changes; then the JS thread takes over again.
|
|
406
|
+
if (looping) return endLoop;
|
|
331
407
|
let last,
|
|
332
408
|
painted = 0,
|
|
409
|
+
paintedIndex = -1,
|
|
333
410
|
disposed = false;
|
|
334
411
|
const stopped = !!paused || !!portrait || reduced;
|
|
335
412
|
const tick = timestamp => {
|
|
336
|
-
if (disposed) return;
|
|
413
|
+
if (disposed || loopSession.current) return;
|
|
337
414
|
// A frame callback that brings no timestamp is read off the page's own clock; with no clock
|
|
338
415
|
// at all there is nothing to advance by, and the frame is not drawn.
|
|
339
416
|
const now = Number.isFinite(timestamp) ? timestamp : typeof performance === 'undefined' ? Number.NaN : performance.now();
|
|
@@ -341,92 +418,126 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
341
418
|
const delta = (0, _vectorPlayback.vectorFrameDelta)(now, last);
|
|
342
419
|
last = now;
|
|
343
420
|
const asset_0 = latestAsset.current;
|
|
344
|
-
const
|
|
421
|
+
const motion_0 = state.current;
|
|
345
422
|
if (!stopped) {
|
|
346
|
-
(0, _vectorPlayback.advanceVectorPlayback)(
|
|
347
|
-
|
|
423
|
+
(0, _vectorPlayback.advanceVectorPlayback)(motion_0, asset_0, delta);
|
|
424
|
+
motion_0.entrance = Math.min(1, motion_0.entrance + delta / 0.25);
|
|
348
425
|
const follow = 1 - Math.exp(-delta * 7);
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
(0, _vectorMood.advanceVectorMood)(
|
|
353
|
-
} else (0, _vectorMood.settleVectorMood)(
|
|
354
|
-
|
|
426
|
+
motion_0.yaw += (motion_0.targetYaw - motion_0.yaw) * follow;
|
|
427
|
+
motion_0.pitch += (motion_0.targetPitch - motion_0.pitch) * follow;
|
|
428
|
+
motion_0.lookMix += ((motion_0.pointerActive ? 1 : 0) - motion_0.lookMix) * follow;
|
|
429
|
+
(0, _vectorMood.advanceVectorMood)(motion_0.mood, latestMood.current, delta);
|
|
430
|
+
} else (0, _vectorMood.settleVectorMood)(motion_0.mood, latestMood.current);
|
|
431
|
+
// At rest the frame is one of the loop's, drawn once and remembered (`vector-loop.ts`), and
|
|
432
|
+
// each grid frame is painted in turn; otherwise a frame is painted 30 times a second.
|
|
433
|
+
const resting = !stopped && motion_0.action === 'idle' && !motion_0.poseFrom && !motion_0.motionFrom && motion_0.entrance >= 1 && motion_0.yaw === 0 && motion_0.pitch === 0 && !(0, _vectorMood.vectorMoodActive)(motion_0.mood) && !asset_0.referenceFace && !previewPart;
|
|
434
|
+
const loop = resting ? (0, _vectorLoop.vectorLoop)(latestFrameRecipe.current, asset_0.clips.idle.duration) : undefined;
|
|
435
|
+
const index = loop ? (0, _vectorLoop.vectorLoopIndex)(loop, motion_0.time) : 0;
|
|
436
|
+
const transition = Math.min(1, Math.max(0, (motion_0.clock - motion_0.transitionStarted) / motion_0.transitionDuration));
|
|
437
|
+
const eased = transition * transition * (3 - 2 * transition);
|
|
438
|
+
const feeling = !portrait && (0, _vectorMood.vectorMoodActive)(motion_0.mood) ? {
|
|
439
|
+
...motion_0.mood
|
|
440
|
+
} : undefined;
|
|
441
|
+
const draw = (action_1, time) => {
|
|
442
|
+
const poseTime = asset_0.referenceFace && action_1 === 'work' ? (0, _vectorMotion.referenceWorkTime)(time) : time;
|
|
443
|
+
const targetPose = (0, _vectorPose.sampleVectorPose)(asset_0, action_1, poseTime);
|
|
444
|
+
const pose = motion_0.poseFrom && !portrait ? (0, _vectorPose.blendVectorPose)(motion_0.poseFrom, targetPose, eased) : targetPose;
|
|
445
|
+
const procedural = asset_0.referenceFace ? (0, _vectorMotion.sampleVectorMotion)({
|
|
446
|
+
personalityKey: latestResolved.current.shape,
|
|
447
|
+
time: portrait ? 0 : motion_0.clock,
|
|
448
|
+
state: action_1,
|
|
449
|
+
stateTime: poseTime,
|
|
450
|
+
workLook: motion_0.workLook,
|
|
451
|
+
look: {
|
|
452
|
+
yaw: motion_0.yaw,
|
|
453
|
+
pitch: motion_0.pitch,
|
|
454
|
+
mix: portrait ? 0 : motion_0.lookMix,
|
|
455
|
+
wander: (action_1 === 'work' ? 0.15 : 1) * (1 - motion_0.lookMix)
|
|
456
|
+
},
|
|
457
|
+
transition: motion_0.motionFrom && !portrait ? {
|
|
458
|
+
from: motion_0.motionFrom,
|
|
459
|
+
startedAt: motion_0.transitionStarted,
|
|
460
|
+
duration: motion_0.transitionDuration
|
|
461
|
+
} : undefined
|
|
462
|
+
}) : undefined;
|
|
463
|
+
// The mood goes over the blended motion, never into it: a transition captures the
|
|
464
|
+
// motion without the mood, which carries on through the transition on its own clock.
|
|
465
|
+
const framed = (0, _vectorMood.vectorMoodFrame)(asset_0, procedural, {
|
|
466
|
+
yaw: portrait ? 0 : motion_0.yaw,
|
|
467
|
+
pitch: portrait ? 0 : motion_0.pitch
|
|
468
|
+
}, feeling);
|
|
469
|
+
const drawing = (0, _vectorFrame.renderVectorFrame)(asset_0, {
|
|
470
|
+
action: action_1,
|
|
471
|
+
time,
|
|
472
|
+
...framed,
|
|
473
|
+
eyesOnly: previewPart === 'eyes',
|
|
474
|
+
pose
|
|
475
|
+
});
|
|
476
|
+
return {
|
|
477
|
+
pose,
|
|
478
|
+
procedural,
|
|
479
|
+
gaze: framed.look ?? framed,
|
|
480
|
+
drawing
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
// Where there is a native surface, a loop it has is played by it, from where the clock is.
|
|
484
|
+
const key_1 = loop && _VectorNativeSurface.VectorNativeSurface ? (0, _vectorLoop.vectorLoopKey)(loop, JSON.stringify([(0, _vectorCompose.vectorGeometryKey)(latestResolved.current), latestResolved.current.paint]), asset_0.clips.idle, () => (0, _vectorLoop.vectorLoopFrame)(loop, 0, () => draw('idle', (0, _vectorLoop.vectorLoopTime)(loop, 0))).drawing) : undefined;
|
|
485
|
+
if (key_1 !== undefined) {
|
|
486
|
+
setRestKey(key_1);
|
|
487
|
+
// Once a frame is on screen, so the surface is there to play it.
|
|
488
|
+
if (nativeLoops.get(key_1) && motion_0.count > 0) {
|
|
489
|
+
const clock = {
|
|
490
|
+
epoch: performance.now(),
|
|
491
|
+
time: motion_0.time
|
|
492
|
+
};
|
|
493
|
+
loopSession.current = {
|
|
494
|
+
key: key_1,
|
|
495
|
+
loop: loop,
|
|
496
|
+
asset: asset_0,
|
|
497
|
+
...clock
|
|
498
|
+
};
|
|
499
|
+
(0, _vectorLoop.releaseVectorLoop)(loop);
|
|
500
|
+
setLooping(clock);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if (loop ? index !== paintedIndex : !painted || stopped || now - painted >= 1000 / 30) {
|
|
355
505
|
painted = painted ? now - (now - painted) % (1000 / 30) : now;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
const
|
|
360
|
-
const feeling = !portrait && (0, _vectorMood.vectorMoodActive)(motion.mood) ? {
|
|
361
|
-
...motion.mood
|
|
362
|
-
} : undefined;
|
|
363
|
-
const sharedKey = JSON.stringify([latestFrameRecipe.current, action_1, time, motion.clock, motion.yaw, motion.pitch, motion.lookMix, motion.workLook, motion.transitionStarted, motion.transitionDuration, (0, _vectorScheduler.vectorStateIdentity)(motion.poseFrom), (0, _vectorScheduler.vectorStateIdentity)(motion.motionFrom), feeling?.sadness, feeling?.declineTime, portrait, previewPart]);
|
|
506
|
+
paintedIndex = loop ? index : -1;
|
|
507
|
+
const action_2 = portrait ? 'idle' : motion_0.action,
|
|
508
|
+
time_0 = loop ? (0, _vectorLoop.vectorLoopTime)(loop, index) : portrait ? 0 : motion_0.time;
|
|
509
|
+
const sharedKey = () => JSON.stringify([latestFrameRecipe.current, action_2, time_0, motion_0.clock, motion_0.yaw, motion_0.pitch, motion_0.lookMix, motion_0.workLook, motion_0.transitionStarted, motion_0.transitionDuration, (0, _vectorScheduler.vectorStateIdentity)(motion_0.poseFrom), (0, _vectorScheduler.vectorStateIdentity)(motion_0.motionFrom), feeling?.sadness, feeling?.declineTime, portrait, previewPart]);
|
|
364
510
|
const {
|
|
365
511
|
pose: pose_0,
|
|
366
512
|
procedural: procedural_0,
|
|
367
513
|
gaze,
|
|
368
514
|
drawing: drawing_0
|
|
369
|
-
} = (0, _vectorScheduler.shareVectorFrame)(sharedKey, () =>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
const pose = motion.poseFrom && !portrait ? (0, _vectorPose.blendVectorPose)(motion.poseFrom, targetPose, eased) : targetPose;
|
|
373
|
-
const procedural = asset_0.referenceFace ? (0, _vectorMotion.sampleVectorMotion)({
|
|
374
|
-
personalityKey: latestResolved.current.shape,
|
|
375
|
-
time: portrait ? 0 : motion.clock,
|
|
376
|
-
state: action_1,
|
|
377
|
-
stateTime: poseTime,
|
|
378
|
-
workLook: motion.workLook,
|
|
379
|
-
look: {
|
|
380
|
-
yaw: motion.yaw,
|
|
381
|
-
pitch: motion.pitch,
|
|
382
|
-
mix: portrait ? 0 : motion.lookMix,
|
|
383
|
-
wander: (action_1 === 'work' ? 0.15 : 1) * (1 - motion.lookMix)
|
|
384
|
-
},
|
|
385
|
-
transition: motion.motionFrom && !portrait ? {
|
|
386
|
-
from: motion.motionFrom,
|
|
387
|
-
startedAt: motion.transitionStarted,
|
|
388
|
-
duration: motion.transitionDuration
|
|
389
|
-
} : undefined
|
|
390
|
-
}) : undefined;
|
|
391
|
-
// The mood goes over the blended motion, never into it: a transition captures the
|
|
392
|
-
// motion without the mood, which carries on through the transition on its own clock.
|
|
393
|
-
const framed = (0, _vectorMood.vectorMoodFrame)(asset_0, procedural, {
|
|
394
|
-
yaw: portrait ? 0 : motion.yaw,
|
|
395
|
-
pitch: portrait ? 0 : motion.pitch
|
|
396
|
-
}, feeling);
|
|
397
|
-
const drawing = (0, _vectorFrame.renderVectorFrame)(asset_0, {
|
|
398
|
-
action: action_1,
|
|
399
|
-
time,
|
|
400
|
-
...framed,
|
|
401
|
-
eyesOnly: previewPart === 'eyes',
|
|
402
|
-
pose
|
|
403
|
-
});
|
|
404
|
-
return {
|
|
405
|
-
pose,
|
|
406
|
-
procedural,
|
|
407
|
-
gaze: framed.look ?? framed,
|
|
408
|
-
drawing
|
|
409
|
-
};
|
|
410
|
-
});
|
|
411
|
-
motion.lastPose = pose_0;
|
|
412
|
-
motion.lastMotion = procedural_0;
|
|
515
|
+
} = loop ? (0, _vectorLoop.vectorLoopFrame)(loop, index, () => draw(action_2, time_0)) : (0, _vectorScheduler.shareVectorFrame)(sharedKey(), () => draw(action_2, time_0));
|
|
516
|
+
motion_0.lastPose = pose_0;
|
|
517
|
+
motion_0.lastMotion = procedural_0;
|
|
413
518
|
if (transition >= 1) {
|
|
414
|
-
|
|
415
|
-
|
|
519
|
+
motion_0.poseFrom = undefined;
|
|
520
|
+
motion_0.motionFrom = undefined;
|
|
416
521
|
}
|
|
417
|
-
|
|
522
|
+
motion_0.count++;
|
|
418
523
|
setDisplay({
|
|
419
524
|
geometry: loadedGeometry.current,
|
|
420
525
|
drawing: drawing_0,
|
|
421
|
-
action:
|
|
422
|
-
time,
|
|
423
|
-
count:
|
|
424
|
-
entrance: stopped ? 1 :
|
|
526
|
+
action: action_2,
|
|
527
|
+
time: time_0,
|
|
528
|
+
count: motion_0.count,
|
|
529
|
+
entrance: stopped ? 1 : motion_0.entrance,
|
|
425
530
|
gazeYaw: gaze.yaw,
|
|
426
531
|
gazePitch: gaze.pitch,
|
|
427
|
-
tracking:
|
|
532
|
+
tracking: motion_0.lookMix
|
|
428
533
|
});
|
|
429
534
|
}
|
|
535
|
+
// A complete loop the native surface said it has not got is handed to it once.
|
|
536
|
+
const tracks = key_1 !== undefined && nativeLoops.get(key_1) === false && (0, _vectorLoop.vectorLoopTracks)(loop);
|
|
537
|
+
if (tracks) setHandedLoop(handed_0 => handed_0?.key === key_1 ? handed_0 : {
|
|
538
|
+
key: key_1,
|
|
539
|
+
loop: (0, _VectorNativeSurface.nativeVectorLoop)(tracks, (0, _vectorViewbox.avatarViewBox)(tracks.viewBox))
|
|
540
|
+
});
|
|
430
541
|
};
|
|
431
542
|
if (stopped) tick(typeof performance === 'undefined' ? 0 : performance.now());
|
|
432
543
|
const unsubscribe = stopped ? undefined : (0, _vectorScheduler.subscribeVectorFrame)(tick);
|
|
@@ -434,7 +545,7 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
434
545
|
disposed = true;
|
|
435
546
|
unsubscribe?.();
|
|
436
547
|
};
|
|
437
|
-
}, [asset, visible, screenVisible, paused, portrait, reduced, previewPart, revision]);
|
|
548
|
+
}, [asset, visible, screenVisible, paused, portrait, reduced, previewPart, revision, looping, endLoop]);
|
|
438
549
|
(0, _react.useEffect)(() => {
|
|
439
550
|
if (paused || portrait || reduced) setRevision(value_4 => value_4 + 1);
|
|
440
551
|
}, [resolved.paint, paused, portrait, reduced]);
|
|
@@ -445,9 +556,37 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
445
556
|
onReady.current?.();
|
|
446
557
|
}
|
|
447
558
|
}, [display]);
|
|
559
|
+
drawn.current = !!display;
|
|
560
|
+
/** The paint a drawn path is shown with: the current paint, when the frame is of the current geometry. */
|
|
561
|
+
const paintOf = path => {
|
|
562
|
+
const part = display?.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path.id)] : undefined;
|
|
563
|
+
const stroke = part ? part.stroke ?? (part.role === 'panel' ? path.stroke : undefined) : path.stroke;
|
|
564
|
+
return {
|
|
565
|
+
fill: part?.color ?? path.fill,
|
|
566
|
+
stroke,
|
|
567
|
+
strokeWidth: stroke ? part?.strokeWidth ?? path.strokeWidth ?? 1.5 : undefined
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
const nativeFrame = (0, _react.useMemo)(() => _VectorNativeSurface.VectorNativeSurface && display ? {
|
|
571
|
+
revision: display.count,
|
|
572
|
+
viewBox: (0, _VectorNativeSurface.viewBoxNumbers)((0, _vectorViewbox.avatarViewBox)(display.drawing.viewBox)),
|
|
573
|
+
opacity: display.entrance,
|
|
574
|
+
paths: display.drawing.paths.map(path_0 => ({
|
|
575
|
+
d: path_0.d,
|
|
576
|
+
...(path_0.clip !== undefined ? {
|
|
577
|
+
clip: path_0.clip
|
|
578
|
+
} : {}),
|
|
579
|
+
...(0, _VectorNativeSurface.nativePaint)(paintOf(path_0)),
|
|
580
|
+
opacity: path_0.opacity,
|
|
581
|
+
fillOpacity: path_0.fillOpacity
|
|
582
|
+
}))
|
|
583
|
+
} : undefined,
|
|
584
|
+
// `paintOf` reads only `display` and `paintedAsset`.
|
|
585
|
+
[display, paintedAsset]);
|
|
448
586
|
const gaze_0 = (x, y, width, height) => {
|
|
449
587
|
if (!interactive || paused || portrait || reduced) return;
|
|
450
588
|
if (![x, y, width, height].every(Number.isFinite) || width <= 0 || height <= 0) return;
|
|
589
|
+
endLoop();
|
|
451
590
|
state.current.pointerActive = true;
|
|
452
591
|
const limit = asset?.referenceFace ? 0.6 : 0.8;
|
|
453
592
|
state.current.targetYaw = Math.max(-limit, Math.min(limit, (x / width - 0.5) * 1.8));
|
|
@@ -505,40 +644,57 @@ function AnimatedVectorCharacterAvatar(props) {
|
|
|
505
644
|
fontSize: 10
|
|
506
645
|
},
|
|
507
646
|
children: messages.unavailable
|
|
508
|
-
}) : display ? /*#__PURE__*/(0, _jsxRuntime.
|
|
647
|
+
}) : display && _VectorNativeSurface.VectorNativeSurface ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VectorNativeSurface.VectorNativeSurface, {
|
|
648
|
+
style: {
|
|
649
|
+
width: '100%',
|
|
650
|
+
height: '100%'
|
|
651
|
+
},
|
|
652
|
+
pointerEvents: "none",
|
|
653
|
+
accessible: false,
|
|
654
|
+
importantForAccessibility: "no-hide-descendants",
|
|
655
|
+
testID: "bloom-vector-drawing",
|
|
656
|
+
frame: nativeFrame,
|
|
657
|
+
loopKey: restKey,
|
|
658
|
+
loopTracks: handedLoop?.key === restKey ? handedLoop?.loop : undefined,
|
|
659
|
+
loopClock: looping,
|
|
660
|
+
capture: capture,
|
|
661
|
+
onLoop: onLoop,
|
|
662
|
+
onCapture: onCapture
|
|
663
|
+
}) : display ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.default, {
|
|
509
664
|
ref: svg,
|
|
510
665
|
width: "100%",
|
|
511
666
|
height: "100%",
|
|
512
667
|
viewBox: (0, _vectorViewbox.avatarViewBox)(display.drawing.viewBox),
|
|
513
668
|
testID: "bloom-vector-drawing",
|
|
514
669
|
...(0, _svgA11y.svgA11yProps)(),
|
|
515
|
-
children:
|
|
516
|
-
children:
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
670
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
671
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Defs, {
|
|
672
|
+
children: display.drawing.paths.filter(path_1 => path_1.clip !== undefined).map(path_2 => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.ClipPath, {
|
|
673
|
+
id: `${prefix}-${path_2.id}`,
|
|
674
|
+
clipPathUnits: 'userSpaceOnUse',
|
|
675
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
676
|
+
d: path_2.clip,
|
|
677
|
+
fillRule: "nonzero",
|
|
678
|
+
clipRule: "nonzero"
|
|
679
|
+
})
|
|
680
|
+
}, path_2.id))
|
|
681
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.G, {
|
|
682
|
+
opacity: display.entrance,
|
|
683
|
+
children: display.drawing.paths.map(path_3 => {
|
|
684
|
+
const paint = paintOf(path_3);
|
|
685
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
686
|
+
d: path_3.d,
|
|
687
|
+
fill: paint.fill,
|
|
688
|
+
opacity: path_3.opacity,
|
|
689
|
+
fillOpacity: path_3.fillOpacity,
|
|
690
|
+
fillRule: "nonzero",
|
|
691
|
+
stroke: paint.stroke,
|
|
692
|
+
strokeWidth: paint.strokeWidth,
|
|
693
|
+
clipPath: path_3.clip !== undefined ? `url(#${prefix}-${path_3.id})` : undefined
|
|
694
|
+
}, path_3.id);
|
|
523
695
|
})
|
|
524
|
-
}
|
|
525
|
-
})
|
|
526
|
-
opacity: display.entrance,
|
|
527
|
-
children: display.drawing.paths.map(path_1 => {
|
|
528
|
-
const currentPart = display.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path_1.id)] : undefined;
|
|
529
|
-
const stroke = currentPart ? currentPart.stroke ?? (currentPart.role === 'panel' ? path_1.stroke : undefined) : path_1.stroke;
|
|
530
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
531
|
-
d: path_1.d,
|
|
532
|
-
fill: display.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path_1.id)]?.color ?? path_1.fill : path_1.fill,
|
|
533
|
-
opacity: path_1.opacity,
|
|
534
|
-
fillOpacity: path_1.fillOpacity,
|
|
535
|
-
fillRule: "nonzero",
|
|
536
|
-
stroke: stroke,
|
|
537
|
-
strokeWidth: stroke ? currentPart?.strokeWidth ?? path_1.strokeWidth ?? 1.5 : undefined,
|
|
538
|
-
clipPath: path_1.clip !== undefined ? `url(#${prefix}-${path_1.id})` : undefined
|
|
539
|
-
}, path_1.id);
|
|
540
|
-
})
|
|
541
|
-
})]
|
|
696
|
+
})]
|
|
697
|
+
})
|
|
542
698
|
}) : null
|
|
543
699
|
});
|
|
544
700
|
}
|