@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.
Files changed (678) hide show
  1. package/android/src/main/java/so/oxy/bloom/AvatarLoops.kt +293 -0
  2. package/android/src/main/java/so/oxy/bloom/AvatarSurface.kt +351 -0
  3. package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +1 -1
  4. package/docs/agent-avatar.mdx +77 -1
  5. package/docs/bloom-language-classnames.mdx +11 -11
  6. package/docs/bloom-language-codemod.mdx +30 -5
  7. package/docs/bloom-language-for-agents.mdx +1 -1
  8. package/docs/bloom-language-modifiers.mdx +222 -77
  9. package/docs/bloom-language-nodes.mdx +43 -21
  10. package/docs/bloom-language-tokens.mdx +69 -14
  11. package/docs/bloom-language.mdx +148 -46
  12. package/docs/design-tokens.mdx +12 -2
  13. package/docs/no-nativewind.mdx +5 -2
  14. package/docs/task-catalog.json +1 -1
  15. package/docs/task-catalog.mdx +1 -1
  16. package/docs/theme.mdx +37 -0
  17. package/lib/commonjs/accordion/Accordion.js +12 -12
  18. package/lib/commonjs/accordion/Accordion.js.map +1 -1
  19. package/lib/commonjs/accordion/Accordion.web.js +8 -8
  20. package/lib/commonjs/accordion/Accordion.web.js.map +1 -1
  21. package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js +267 -111
  22. package/lib/commonjs/agent-avatar/VectorCharacterAvatar.js.map +1 -1
  23. package/lib/commonjs/agent-avatar/VectorNativeSurface.js +75 -0
  24. package/lib/commonjs/agent-avatar/VectorNativeSurface.js.map +1 -0
  25. package/lib/commonjs/agent-avatar/vector-loop.js +161 -0
  26. package/lib/commonjs/agent-avatar/vector-loop.js.map +1 -0
  27. package/lib/commonjs/agent-avatar/vector-visibility.js +4 -1
  28. package/lib/commonjs/agent-avatar/vector-visibility.js.map +1 -1
  29. package/lib/commonjs/agent-creator/AgentCreatorSection.js +8 -10
  30. package/lib/commonjs/agent-creator/AgentCreatorSection.js.map +1 -1
  31. package/lib/commonjs/agent-creator/EmotionPicker.js +3 -5
  32. package/lib/commonjs/agent-creator/EmotionPicker.js.map +1 -1
  33. package/lib/commonjs/agent-log/AgentLog.js +131 -174
  34. package/lib/commonjs/agent-log/AgentLog.js.map +1 -1
  35. package/lib/commonjs/agent-reply/AgentProfile.js +6 -9
  36. package/lib/commonjs/agent-reply/AgentProfile.js.map +1 -1
  37. package/lib/commonjs/agent-thinking/AgentThinking.js +8 -7
  38. package/lib/commonjs/agent-thinking/AgentThinking.js.map +1 -1
  39. package/lib/commonjs/agent-thinking/ThinkingReasoning.js +8 -8
  40. package/lib/commonjs/agent-thinking/ThinkingReasoning.js.map +1 -1
  41. package/lib/commonjs/app-shell/AppShell.js +5 -7
  42. package/lib/commonjs/app-shell/AppShell.js.map +1 -1
  43. package/lib/commonjs/app-shell/AppShellEngine.js +72 -28
  44. package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
  45. package/lib/commonjs/app-shell/AppShellPanelLayout.js +3 -3
  46. package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
  47. package/lib/commonjs/app-shell/NotificationBell.js +9 -9
  48. package/lib/commonjs/app-shell/NotificationBell.js.map +1 -1
  49. package/lib/commonjs/app-shell/PanelReorderHandle.js +4 -6
  50. package/lib/commonjs/app-shell/PanelReorderHandle.js.map +1 -1
  51. package/lib/commonjs/avatar-group/AvatarGroupBase.js +7 -7
  52. package/lib/commonjs/avatar-group/AvatarGroupBase.js.map +1 -1
  53. package/lib/commonjs/blur/BlurIsland.js +112 -118
  54. package/lib/commonjs/blur/BlurIsland.js.map +1 -1
  55. package/lib/commonjs/button/Button.js +12 -22
  56. package/lib/commonjs/button/Button.js.map +1 -1
  57. package/lib/commonjs/button/GroupBase.js +35 -50
  58. package/lib/commonjs/button/GroupBase.js.map +1 -1
  59. package/lib/commonjs/chat-list/ChatSearchResultsBase.js +4 -4
  60. package/lib/commonjs/chat-list/ChatSearchResultsBase.js.map +1 -1
  61. package/lib/commonjs/choice-list/ChoiceList.js +5 -5
  62. package/lib/commonjs/choice-list/ChoiceList.js.map +1 -1
  63. package/lib/commonjs/color-swatch-picker/ColorSwatchPicker.js +7 -7
  64. package/lib/commonjs/color-swatch-picker/ColorSwatchPicker.js.map +1 -1
  65. package/lib/commonjs/connection-dots/ConnectionDots.js +4 -4
  66. package/lib/commonjs/connection-dots/ConnectionDots.js.map +1 -1
  67. package/lib/commonjs/connection-dots/ConnectionDots.web.js +4 -4
  68. package/lib/commonjs/connection-dots/ConnectionDots.web.js.map +1 -1
  69. package/lib/commonjs/cover-header/CoverHeader.js +3 -3
  70. package/lib/commonjs/cover-header/CoverHeader.js.map +1 -1
  71. package/lib/commonjs/data-table/DataTableSelect.js +8 -8
  72. package/lib/commonjs/data-table/DataTableSelect.js.map +1 -1
  73. package/lib/commonjs/design-tokens/theme.css +1 -0
  74. package/lib/commonjs/design-tokens/tokens.json +390 -0
  75. package/lib/commonjs/dialog/DialogContent.js +5 -4
  76. package/lib/commonjs/dialog/DialogContent.js.map +1 -1
  77. package/lib/commonjs/dialog/DialogHeader.js +6 -5
  78. package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
  79. package/lib/commonjs/dialog/SheetShell.js +5 -4
  80. package/lib/commonjs/dialog/SheetShell.js.map +1 -1
  81. package/lib/commonjs/expandable-text/ExpandableText.js +3 -3
  82. package/lib/commonjs/expandable-text/ExpandableText.js.map +1 -1
  83. package/lib/commonjs/floating/lens/lens-cover.js +56 -0
  84. package/lib/commonjs/floating/lens/lens-cover.js.map +1 -0
  85. package/lib/commonjs/floating/lens/lens-frame.js +286 -0
  86. package/lib/commonjs/floating/lens/lens-frame.js.map +1 -0
  87. package/lib/commonjs/floating/lens/lens-material.js +1 -1
  88. package/lib/commonjs/floating/lens/native-lens.js.map +1 -1
  89. package/lib/commonjs/grouped-section/GroupedSection.js +16 -15
  90. package/lib/commonjs/grouped-section/GroupedSection.js.map +1 -1
  91. package/lib/commonjs/home-search/BudgetPicker.js +8 -8
  92. package/lib/commonjs/home-search/BudgetPicker.js.map +1 -1
  93. package/lib/commonjs/home-search/MoveInPicker.js +7 -7
  94. package/lib/commonjs/home-search/MoveInPicker.js.map +1 -1
  95. package/lib/commonjs/icon-circle/IconCircle.js +14 -16
  96. package/lib/commonjs/icon-circle/IconCircle.js.map +1 -1
  97. package/lib/commonjs/icons/shared.js +3 -5
  98. package/lib/commonjs/icons/shared.js.map +1 -1
  99. package/lib/commonjs/kbd/Kbd.js +8 -8
  100. package/lib/commonjs/kbd/Kbd.js.map +1 -1
  101. package/lib/commonjs/layout/ResizeHandle.js +6 -5
  102. package/lib/commonjs/layout/ResizeHandle.js.map +1 -1
  103. package/lib/commonjs/link-preview/LinkPreviewCard.js +24 -26
  104. package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
  105. package/lib/commonjs/list/ListBase.js +3 -3
  106. package/lib/commonjs/list/ListBase.js.map +1 -1
  107. package/lib/commonjs/list/ListPerson.js +3 -3
  108. package/lib/commonjs/list/ListPerson.js.map +1 -1
  109. package/lib/commonjs/listing-editor/ListingPreviewPane.js +30 -30
  110. package/lib/commonjs/listing-editor/ListingPreviewPane.js.map +1 -1
  111. package/lib/commonjs/markdown/InlineMarkdown.js +9 -11
  112. package/lib/commonjs/markdown/InlineMarkdown.js.map +1 -1
  113. package/lib/commonjs/markdown/MarkdownBlocks.js +35 -43
  114. package/lib/commonjs/markdown/MarkdownBlocks.js.map +1 -1
  115. package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js +5 -8
  116. package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
  117. package/lib/commonjs/multi-agent-chat/SelectedAgentPreview.js +9 -11
  118. package/lib/commonjs/multi-agent-chat/SelectedAgentPreview.js.map +1 -1
  119. package/lib/commonjs/notifications/NotificationPermissionSheet.js +3 -5
  120. package/lib/commonjs/notifications/NotificationPermissionSheet.js.map +1 -1
  121. package/lib/commonjs/notifications/NotificationsScreen.js +21 -27
  122. package/lib/commonjs/notifications/NotificationsScreen.js.map +1 -1
  123. package/lib/commonjs/overlay/OverlayInertBoundary.js +33 -12
  124. package/lib/commonjs/overlay/OverlayInertBoundary.js.map +1 -1
  125. package/lib/commonjs/page-header/PageHeader.js +24 -15
  126. package/lib/commonjs/page-header/PageHeader.js.map +1 -1
  127. package/lib/commonjs/page-header/PageHeaderTitleInput.js +20 -20
  128. package/lib/commonjs/page-header/PageHeaderTitleInput.js.map +1 -1
  129. package/lib/commonjs/panel-routing/expo-router/StackScene.js +43 -24
  130. package/lib/commonjs/panel-routing/expo-router/StackScene.js.map +1 -1
  131. package/lib/commonjs/phone-input/CountryCodeSelect.js +4 -4
  132. package/lib/commonjs/phone-input/CountryCodeSelect.js.map +1 -1
  133. package/lib/commonjs/project-board/MemberAvatars.js +7 -9
  134. package/lib/commonjs/project-board/MemberAvatars.js.map +1 -1
  135. package/lib/commonjs/project-board/ProjectBoardBase.js +3 -6
  136. package/lib/commonjs/project-board/ProjectBoardBase.js.map +1 -1
  137. package/lib/commonjs/project-board/ProjectBoardCanvas.js +2 -2
  138. package/lib/commonjs/project-board/ProjectBoardCanvas.js.map +1 -1
  139. package/lib/commonjs/project-board/styles.js +2 -5
  140. package/lib/commonjs/project-board/styles.js.map +1 -1
  141. package/lib/commonjs/radio/RadioSwatch.js +5 -5
  142. package/lib/commonjs/radio/RadioSwatch.js.map +1 -1
  143. package/lib/commonjs/rating/Rating.js +7 -7
  144. package/lib/commonjs/rating/Rating.js.map +1 -1
  145. package/lib/commonjs/rating/RatingBar.js +8 -8
  146. package/lib/commonjs/rating/RatingBar.js.map +1 -1
  147. package/lib/commonjs/rating/RatingBar.web.js +5 -5
  148. package/lib/commonjs/rating/RatingBar.web.js.map +1 -1
  149. package/lib/commonjs/rating/RatingInput.js +9 -9
  150. package/lib/commonjs/rating/RatingInput.js.map +1 -1
  151. package/lib/commonjs/rating/RatingSummary.js +6 -6
  152. package/lib/commonjs/rating/RatingSummary.js.map +1 -1
  153. package/lib/commonjs/row-actions/RowActions.js +5 -5
  154. package/lib/commonjs/row-actions/RowActions.js.map +1 -1
  155. package/lib/commonjs/select/Select.js +5 -5
  156. package/lib/commonjs/select/Select.js.map +1 -1
  157. package/lib/commonjs/skeleton/Skeleton.js +22 -30
  158. package/lib/commonjs/skeleton/Skeleton.js.map +1 -1
  159. package/lib/commonjs/stay-filters/AvailabilityFilter.js +3 -3
  160. package/lib/commonjs/stay-filters/AvailabilityFilter.js.map +1 -1
  161. package/lib/commonjs/stay-filters/CountFilter.js +3 -3
  162. package/lib/commonjs/stay-filters/CountFilter.js.map +1 -1
  163. package/lib/commonjs/stay-filters/FilterFooter.js +7 -7
  164. package/lib/commonjs/stay-filters/FilterFooter.js.map +1 -1
  165. package/lib/commonjs/stay-filters/FilterSection.js +12 -12
  166. package/lib/commonjs/stay-filters/FilterSection.js.map +1 -1
  167. package/lib/commonjs/stay-filters/SwitchFilterRow.js +9 -9
  168. package/lib/commonjs/stay-filters/SwitchFilterRow.js.map +1 -1
  169. package/lib/commonjs/stay-search/GuestPicker.js +5 -5
  170. package/lib/commonjs/stay-search/GuestPicker.js.map +1 -1
  171. package/lib/commonjs/stepper/Stepper.js +11 -10
  172. package/lib/commonjs/stepper/Stepper.js.map +1 -1
  173. package/lib/commonjs/stepper/StepperRow.js +12 -12
  174. package/lib/commonjs/stepper/StepperRow.js.map +1 -1
  175. package/lib/commonjs/subscription-plans/SubscriptionPlans.js +10 -10
  176. package/lib/commonjs/subscription-plans/SubscriptionPlans.js.map +1 -1
  177. package/lib/commonjs/subscription-plans/SubscriptionPrice.js +5 -5
  178. package/lib/commonjs/subscription-plans/SubscriptionPrice.js.map +1 -1
  179. package/lib/commonjs/surface/Surface.js +64 -193
  180. package/lib/commonjs/surface/Surface.js.map +1 -1
  181. package/lib/commonjs/tab-bar/TabBarBase.js +18 -15
  182. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
  183. package/lib/commonjs/task-list/TaskList.js +14 -15
  184. package/lib/commonjs/task-list/TaskList.js.map +1 -1
  185. package/lib/commonjs/theme/BloomThemeProvider.js +207 -223
  186. package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
  187. package/lib/commonjs/theme/build-theme-from-seed.js +1 -1
  188. package/lib/commonjs/theme/build-theme.js +39 -9
  189. package/lib/commonjs/theme/build-theme.js.map +1 -1
  190. package/lib/commonjs/theme/canonical-tokens.js +40 -0
  191. package/lib/commonjs/theme/canonical-tokens.js.map +1 -0
  192. package/lib/commonjs/theme/color-policy.js +3 -0
  193. package/lib/commonjs/theme/color-policy.js.map +1 -1
  194. package/lib/commonjs/theme/color-scope/resolve-scope.js +48 -5
  195. package/lib/commonjs/theme/color-scope/resolve-scope.js.map +1 -1
  196. package/lib/commonjs/theme/color-scope/use-scope.js +1 -5
  197. package/lib/commonjs/theme/color-scope/use-scope.js.map +1 -1
  198. package/lib/commonjs/theme/color-tokens.js +32 -10
  199. package/lib/commonjs/theme/color-tokens.js.map +1 -1
  200. package/lib/commonjs/theme/color-utils.js +4 -0
  201. package/lib/commonjs/theme/color-utils.js.map +1 -1
  202. package/lib/commonjs/theme/default-token-vars.js +92 -0
  203. package/lib/commonjs/theme/default-token-vars.js.map +1 -0
  204. package/lib/commonjs/theme/index.js +6 -0
  205. package/lib/commonjs/theme/index.js.map +1 -1
  206. package/lib/commonjs/theme/index.web.js +6 -0
  207. package/lib/commonjs/theme/index.web.js.map +1 -1
  208. package/lib/commonjs/theme/prepaint-palettes.js +1 -5
  209. package/lib/commonjs/theme/prepaint-palettes.js.map +1 -1
  210. package/lib/commonjs/theme/token-registry.js +7 -28
  211. package/lib/commonjs/theme/token-registry.js.map +1 -1
  212. package/lib/commonjs/theme/use-theme-paint.js +28 -0
  213. package/lib/commonjs/theme/use-theme-paint.js.map +1 -1
  214. package/lib/commonjs/typography/Typography.js +27 -27
  215. package/lib/commonjs/typography/Typography.js.map +1 -1
  216. package/lib/commonjs/web-search/WebSearch.js +18 -19
  217. package/lib/commonjs/web-search/WebSearch.js.map +1 -1
  218. package/lib/commonjs/wizard/WizardFooterBase.js +10 -10
  219. package/lib/commonjs/wizard/WizardFooterBase.js.map +1 -1
  220. package/lib/commonjs/wizard/WizardProgress.js +5 -5
  221. package/lib/commonjs/wizard/WizardProgress.js.map +1 -1
  222. package/lib/module/accordion/Accordion.js +12 -12
  223. package/lib/module/accordion/Accordion.js.map +1 -1
  224. package/lib/module/accordion/Accordion.web.js +8 -8
  225. package/lib/module/accordion/Accordion.web.js.map +1 -1
  226. package/lib/module/agent-avatar/VectorCharacterAvatar.js +268 -112
  227. package/lib/module/agent-avatar/VectorCharacterAvatar.js.map +1 -1
  228. package/lib/module/agent-avatar/VectorNativeSurface.js +66 -0
  229. package/lib/module/agent-avatar/VectorNativeSurface.js.map +1 -0
  230. package/lib/module/agent-avatar/vector-loop.js +150 -0
  231. package/lib/module/agent-avatar/vector-loop.js.map +1 -0
  232. package/lib/module/agent-avatar/vector-visibility.js +3 -1
  233. package/lib/module/agent-avatar/vector-visibility.js.map +1 -1
  234. package/lib/module/agent-creator/AgentCreatorSection.js +8 -10
  235. package/lib/module/agent-creator/AgentCreatorSection.js.map +1 -1
  236. package/lib/module/agent-creator/EmotionPicker.js +3 -5
  237. package/lib/module/agent-creator/EmotionPicker.js.map +1 -1
  238. package/lib/module/agent-log/AgentLog.js +131 -174
  239. package/lib/module/agent-log/AgentLog.js.map +1 -1
  240. package/lib/module/agent-reply/AgentProfile.js +7 -10
  241. package/lib/module/agent-reply/AgentProfile.js.map +1 -1
  242. package/lib/module/agent-thinking/AgentThinking.js +8 -7
  243. package/lib/module/agent-thinking/AgentThinking.js.map +1 -1
  244. package/lib/module/agent-thinking/ThinkingReasoning.js +8 -8
  245. package/lib/module/agent-thinking/ThinkingReasoning.js.map +1 -1
  246. package/lib/module/app-shell/AppShell.js +5 -7
  247. package/lib/module/app-shell/AppShell.js.map +1 -1
  248. package/lib/module/app-shell/AppShellEngine.js +73 -29
  249. package/lib/module/app-shell/AppShellEngine.js.map +1 -1
  250. package/lib/module/app-shell/AppShellPanelLayout.js +3 -3
  251. package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
  252. package/lib/module/app-shell/NotificationBell.js +9 -9
  253. package/lib/module/app-shell/NotificationBell.js.map +1 -1
  254. package/lib/module/app-shell/PanelReorderHandle.js +4 -6
  255. package/lib/module/app-shell/PanelReorderHandle.js.map +1 -1
  256. package/lib/module/avatar-group/AvatarGroupBase.js +7 -7
  257. package/lib/module/avatar-group/AvatarGroupBase.js.map +1 -1
  258. package/lib/module/blur/BlurIsland.js +112 -116
  259. package/lib/module/blur/BlurIsland.js.map +1 -1
  260. package/lib/module/button/Button.js +13 -23
  261. package/lib/module/button/Button.js.map +1 -1
  262. package/lib/module/button/GroupBase.js +37 -52
  263. package/lib/module/button/GroupBase.js.map +1 -1
  264. package/lib/module/chat-list/ChatSearchResultsBase.js +4 -4
  265. package/lib/module/chat-list/ChatSearchResultsBase.js.map +1 -1
  266. package/lib/module/choice-list/ChoiceList.js +5 -5
  267. package/lib/module/choice-list/ChoiceList.js.map +1 -1
  268. package/lib/module/color-swatch-picker/ColorSwatchPicker.js +7 -7
  269. package/lib/module/color-swatch-picker/ColorSwatchPicker.js.map +1 -1
  270. package/lib/module/connection-dots/ConnectionDots.js +4 -4
  271. package/lib/module/connection-dots/ConnectionDots.js.map +1 -1
  272. package/lib/module/connection-dots/ConnectionDots.web.js +4 -4
  273. package/lib/module/connection-dots/ConnectionDots.web.js.map +1 -1
  274. package/lib/module/cover-header/CoverHeader.js +3 -3
  275. package/lib/module/cover-header/CoverHeader.js.map +1 -1
  276. package/lib/module/data-table/DataTableSelect.js +8 -8
  277. package/lib/module/data-table/DataTableSelect.js.map +1 -1
  278. package/lib/module/design-tokens/theme.css +1 -0
  279. package/lib/module/design-tokens/tokens.json +390 -0
  280. package/lib/module/dialog/DialogContent.js +5 -4
  281. package/lib/module/dialog/DialogContent.js.map +1 -1
  282. package/lib/module/dialog/DialogHeader.js +6 -5
  283. package/lib/module/dialog/DialogHeader.js.map +1 -1
  284. package/lib/module/dialog/SheetShell.js +5 -4
  285. package/lib/module/dialog/SheetShell.js.map +1 -1
  286. package/lib/module/expandable-text/ExpandableText.js +3 -3
  287. package/lib/module/expandable-text/ExpandableText.js.map +1 -1
  288. package/lib/module/floating/lens/lens-cover.js +51 -0
  289. package/lib/module/floating/lens/lens-cover.js.map +1 -0
  290. package/lib/module/floating/lens/lens-frame.js +282 -0
  291. package/lib/module/floating/lens/lens-frame.js.map +1 -0
  292. package/lib/module/floating/lens/lens-material.js +1 -1
  293. package/lib/module/floating/lens/native-lens.js.map +1 -1
  294. package/lib/module/grouped-section/GroupedSection.js +16 -15
  295. package/lib/module/grouped-section/GroupedSection.js.map +1 -1
  296. package/lib/module/home-search/BudgetPicker.js +8 -8
  297. package/lib/module/home-search/BudgetPicker.js.map +1 -1
  298. package/lib/module/home-search/MoveInPicker.js +7 -7
  299. package/lib/module/home-search/MoveInPicker.js.map +1 -1
  300. package/lib/module/icon-circle/IconCircle.js +14 -16
  301. package/lib/module/icon-circle/IconCircle.js.map +1 -1
  302. package/lib/module/icons/shared.js +3 -5
  303. package/lib/module/icons/shared.js.map +1 -1
  304. package/lib/module/kbd/Kbd.js +8 -8
  305. package/lib/module/kbd/Kbd.js.map +1 -1
  306. package/lib/module/layout/ResizeHandle.js +6 -5
  307. package/lib/module/layout/ResizeHandle.js.map +1 -1
  308. package/lib/module/link-preview/LinkPreviewCard.js +24 -26
  309. package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
  310. package/lib/module/list/ListBase.js +3 -3
  311. package/lib/module/list/ListBase.js.map +1 -1
  312. package/lib/module/list/ListPerson.js +3 -3
  313. package/lib/module/list/ListPerson.js.map +1 -1
  314. package/lib/module/listing-editor/ListingPreviewPane.js +30 -30
  315. package/lib/module/listing-editor/ListingPreviewPane.js.map +1 -1
  316. package/lib/module/markdown/InlineMarkdown.js +9 -11
  317. package/lib/module/markdown/InlineMarkdown.js.map +1 -1
  318. package/lib/module/markdown/MarkdownBlocks.js +35 -43
  319. package/lib/module/markdown/MarkdownBlocks.js.map +1 -1
  320. package/lib/module/multi-agent-chat/MultiAgentChatBase.js +6 -9
  321. package/lib/module/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
  322. package/lib/module/multi-agent-chat/SelectedAgentPreview.js +9 -11
  323. package/lib/module/multi-agent-chat/SelectedAgentPreview.js.map +1 -1
  324. package/lib/module/notifications/NotificationPermissionSheet.js +3 -5
  325. package/lib/module/notifications/NotificationPermissionSheet.js.map +1 -1
  326. package/lib/module/notifications/NotificationsScreen.js +21 -27
  327. package/lib/module/notifications/NotificationsScreen.js.map +1 -1
  328. package/lib/module/overlay/OverlayInertBoundary.js +33 -12
  329. package/lib/module/overlay/OverlayInertBoundary.js.map +1 -1
  330. package/lib/module/page-header/PageHeader.js +24 -15
  331. package/lib/module/page-header/PageHeader.js.map +1 -1
  332. package/lib/module/page-header/PageHeaderTitleInput.js +20 -20
  333. package/lib/module/page-header/PageHeaderTitleInput.js.map +1 -1
  334. package/lib/module/panel-routing/expo-router/StackScene.js +43 -24
  335. package/lib/module/panel-routing/expo-router/StackScene.js.map +1 -1
  336. package/lib/module/phone-input/CountryCodeSelect.js +4 -4
  337. package/lib/module/phone-input/CountryCodeSelect.js.map +1 -1
  338. package/lib/module/project-board/MemberAvatars.js +7 -9
  339. package/lib/module/project-board/MemberAvatars.js.map +1 -1
  340. package/lib/module/project-board/ProjectBoardBase.js +4 -7
  341. package/lib/module/project-board/ProjectBoardBase.js.map +1 -1
  342. package/lib/module/project-board/ProjectBoardCanvas.js +2 -2
  343. package/lib/module/project-board/ProjectBoardCanvas.js.map +1 -1
  344. package/lib/module/project-board/styles.js +3 -6
  345. package/lib/module/project-board/styles.js.map +1 -1
  346. package/lib/module/radio/RadioSwatch.js +5 -5
  347. package/lib/module/radio/RadioSwatch.js.map +1 -1
  348. package/lib/module/rating/Rating.js +7 -7
  349. package/lib/module/rating/Rating.js.map +1 -1
  350. package/lib/module/rating/RatingBar.js +8 -8
  351. package/lib/module/rating/RatingBar.js.map +1 -1
  352. package/lib/module/rating/RatingBar.web.js +5 -5
  353. package/lib/module/rating/RatingBar.web.js.map +1 -1
  354. package/lib/module/rating/RatingInput.js +9 -9
  355. package/lib/module/rating/RatingInput.js.map +1 -1
  356. package/lib/module/rating/RatingSummary.js +6 -6
  357. package/lib/module/rating/RatingSummary.js.map +1 -1
  358. package/lib/module/row-actions/RowActions.js +5 -5
  359. package/lib/module/row-actions/RowActions.js.map +1 -1
  360. package/lib/module/select/Select.js +5 -5
  361. package/lib/module/select/Select.js.map +1 -1
  362. package/lib/module/skeleton/Skeleton.js +22 -30
  363. package/lib/module/skeleton/Skeleton.js.map +1 -1
  364. package/lib/module/stay-filters/AvailabilityFilter.js +3 -3
  365. package/lib/module/stay-filters/AvailabilityFilter.js.map +1 -1
  366. package/lib/module/stay-filters/CountFilter.js +3 -3
  367. package/lib/module/stay-filters/CountFilter.js.map +1 -1
  368. package/lib/module/stay-filters/FilterFooter.js +7 -7
  369. package/lib/module/stay-filters/FilterFooter.js.map +1 -1
  370. package/lib/module/stay-filters/FilterSection.js +12 -12
  371. package/lib/module/stay-filters/FilterSection.js.map +1 -1
  372. package/lib/module/stay-filters/SwitchFilterRow.js +9 -9
  373. package/lib/module/stay-filters/SwitchFilterRow.js.map +1 -1
  374. package/lib/module/stay-search/GuestPicker.js +5 -5
  375. package/lib/module/stay-search/GuestPicker.js.map +1 -1
  376. package/lib/module/stepper/Stepper.js +11 -10
  377. package/lib/module/stepper/Stepper.js.map +1 -1
  378. package/lib/module/stepper/StepperRow.js +12 -12
  379. package/lib/module/stepper/StepperRow.js.map +1 -1
  380. package/lib/module/subscription-plans/SubscriptionPlans.js +10 -10
  381. package/lib/module/subscription-plans/SubscriptionPlans.js.map +1 -1
  382. package/lib/module/subscription-plans/SubscriptionPrice.js +5 -5
  383. package/lib/module/subscription-plans/SubscriptionPrice.js.map +1 -1
  384. package/lib/module/surface/Surface.js +65 -194
  385. package/lib/module/surface/Surface.js.map +1 -1
  386. package/lib/module/tab-bar/TabBarBase.js +18 -15
  387. package/lib/module/tab-bar/TabBarBase.js.map +1 -1
  388. package/lib/module/task-list/TaskList.js +14 -15
  389. package/lib/module/task-list/TaskList.js.map +1 -1
  390. package/lib/module/theme/BloomThemeProvider.js +208 -224
  391. package/lib/module/theme/BloomThemeProvider.js.map +1 -1
  392. package/lib/module/theme/build-theme-from-seed.js +1 -1
  393. package/lib/module/theme/build-theme.js +38 -9
  394. package/lib/module/theme/build-theme.js.map +1 -1
  395. package/lib/module/theme/canonical-tokens.js +36 -0
  396. package/lib/module/theme/canonical-tokens.js.map +1 -0
  397. package/lib/module/theme/color-policy.js +3 -0
  398. package/lib/module/theme/color-policy.js.map +1 -1
  399. package/lib/module/theme/color-scope/resolve-scope.js +46 -5
  400. package/lib/module/theme/color-scope/resolve-scope.js.map +1 -1
  401. package/lib/module/theme/color-scope/use-scope.js +2 -6
  402. package/lib/module/theme/color-scope/use-scope.js.map +1 -1
  403. package/lib/module/theme/color-tokens.js +30 -8
  404. package/lib/module/theme/color-tokens.js.map +1 -1
  405. package/lib/module/theme/color-utils.js +4 -0
  406. package/lib/module/theme/color-utils.js.map +1 -1
  407. package/lib/module/theme/default-token-vars.js +88 -0
  408. package/lib/module/theme/default-token-vars.js.map +1 -0
  409. package/lib/module/theme/index.js +1 -1
  410. package/lib/module/theme/index.js.map +1 -1
  411. package/lib/module/theme/index.web.js +1 -1
  412. package/lib/module/theme/index.web.js.map +1 -1
  413. package/lib/module/theme/prepaint-palettes.js +2 -6
  414. package/lib/module/theme/prepaint-palettes.js.map +1 -1
  415. package/lib/module/theme/token-registry.js +1 -27
  416. package/lib/module/theme/token-registry.js.map +1 -1
  417. package/lib/module/theme/use-theme-paint.js +30 -3
  418. package/lib/module/theme/use-theme-paint.js.map +1 -1
  419. package/lib/module/typography/Typography.js +27 -27
  420. package/lib/module/typography/Typography.js.map +1 -1
  421. package/lib/module/web-search/WebSearch.js +18 -19
  422. package/lib/module/web-search/WebSearch.js.map +1 -1
  423. package/lib/module/wizard/WizardFooterBase.js +10 -10
  424. package/lib/module/wizard/WizardFooterBase.js.map +1 -1
  425. package/lib/module/wizard/WizardProgress.js +5 -5
  426. package/lib/module/wizard/WizardProgress.js.map +1 -1
  427. package/lib/typescript/commonjs/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
  428. package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts +75 -0
  429. package/lib/typescript/commonjs/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
  430. package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts +93 -0
  431. package/lib/typescript/commonjs/agent-avatar/vector-loop.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts +2 -0
  433. package/lib/typescript/commonjs/agent-avatar/vector-visibility.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/agent-creator/AgentCreatorSection.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/agent-log/AgentLog.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/agent-reply/AgentProfile.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/agent-thinking/AgentThinking.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/blur/BlurIsland.d.ts +1 -1
  440. package/lib/typescript/commonjs/blur/BlurIsland.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/button/GroupBase.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/dialog/DialogContent.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
  445. package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -1
  446. package/lib/typescript/commonjs/floating/lens/lens-cover.d.ts +15 -0
  447. package/lib/typescript/commonjs/floating/lens/lens-cover.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts +52 -0
  449. package/lib/typescript/commonjs/floating/lens/lens-frame.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/floating/lens/lens-material.d.ts +1 -1
  451. package/lib/typescript/commonjs/floating/lens/native-lens.d.ts +6 -0
  452. package/lib/typescript/commonjs/floating/lens/native-lens.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/grouped-section/GroupedSection.d.ts.map +1 -1
  454. package/lib/typescript/commonjs/layout/ResizeHandle.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/list/ListBase.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/overlay/OverlayInertBoundary.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
  459. package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts +3 -1
  460. package/lib/typescript/commonjs/panel-routing/expo-router/StackScene.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/project-board/ProjectBoardBase.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/project-board/styles.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/stepper/Stepper.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/surface/Surface.d.ts.map +1 -1
  466. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/task-list/TaskList.d.ts +3 -3
  468. package/lib/typescript/commonjs/task-list/TaskList.d.ts.map +1 -1
  469. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/theme/build-theme.d.ts +9 -0
  471. package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
  472. package/lib/typescript/commonjs/theme/canonical-tokens.d.ts +20 -0
  473. package/lib/typescript/commonjs/theme/canonical-tokens.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/theme/color-scope/resolve-scope.d.ts +58 -0
  476. package/lib/typescript/commonjs/theme/color-scope/resolve-scope.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/theme/color-scope/use-scope.d.ts.map +1 -1
  478. package/lib/typescript/commonjs/theme/color-tokens.d.ts +5 -2
  479. package/lib/typescript/commonjs/theme/color-tokens.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/theme/color-utils.d.ts +3 -0
  481. package/lib/typescript/commonjs/theme/color-utils.d.ts.map +1 -1
  482. package/lib/typescript/commonjs/theme/default-token-vars.d.ts +11 -0
  483. package/lib/typescript/commonjs/theme/default-token-vars.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/theme/index.d.ts +1 -1
  485. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
  486. package/lib/typescript/commonjs/theme/index.web.d.ts +1 -1
  487. package/lib/typescript/commonjs/theme/index.web.d.ts.map +1 -1
  488. package/lib/typescript/commonjs/theme/prepaint-palettes.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/theme/token-registry.d.ts +1 -16
  490. package/lib/typescript/commonjs/theme/token-registry.d.ts.map +1 -1
  491. package/lib/typescript/commonjs/theme/use-theme-paint.d.ts +11 -0
  492. package/lib/typescript/commonjs/theme/use-theme-paint.d.ts.map +1 -1
  493. package/lib/typescript/commonjs/web-search/WebSearch.d.ts +3 -3
  494. package/lib/typescript/commonjs/web-search/WebSearch.d.ts.map +1 -1
  495. package/lib/typescript/module/agent-avatar/VectorCharacterAvatar.d.ts.map +1 -1
  496. package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts +75 -0
  497. package/lib/typescript/module/agent-avatar/VectorNativeSurface.d.ts.map +1 -0
  498. package/lib/typescript/module/agent-avatar/vector-loop.d.ts +93 -0
  499. package/lib/typescript/module/agent-avatar/vector-loop.d.ts.map +1 -0
  500. package/lib/typescript/module/agent-avatar/vector-visibility.d.ts +2 -0
  501. package/lib/typescript/module/agent-avatar/vector-visibility.d.ts.map +1 -1
  502. package/lib/typescript/module/agent-creator/AgentCreatorSection.d.ts.map +1 -1
  503. package/lib/typescript/module/agent-log/AgentLog.d.ts.map +1 -1
  504. package/lib/typescript/module/agent-reply/AgentProfile.d.ts.map +1 -1
  505. package/lib/typescript/module/agent-thinking/AgentThinking.d.ts.map +1 -1
  506. package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
  507. package/lib/typescript/module/blur/BlurIsland.d.ts +1 -1
  508. package/lib/typescript/module/blur/BlurIsland.d.ts.map +1 -1
  509. package/lib/typescript/module/button/Button.d.ts.map +1 -1
  510. package/lib/typescript/module/button/GroupBase.d.ts.map +1 -1
  511. package/lib/typescript/module/dialog/DialogContent.d.ts.map +1 -1
  512. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
  513. package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -1
  514. package/lib/typescript/module/floating/lens/lens-cover.d.ts +15 -0
  515. package/lib/typescript/module/floating/lens/lens-cover.d.ts.map +1 -0
  516. package/lib/typescript/module/floating/lens/lens-frame.d.ts +52 -0
  517. package/lib/typescript/module/floating/lens/lens-frame.d.ts.map +1 -0
  518. package/lib/typescript/module/floating/lens/lens-material.d.ts +1 -1
  519. package/lib/typescript/module/floating/lens/native-lens.d.ts +6 -0
  520. package/lib/typescript/module/floating/lens/native-lens.d.ts.map +1 -1
  521. package/lib/typescript/module/grouped-section/GroupedSection.d.ts.map +1 -1
  522. package/lib/typescript/module/layout/ResizeHandle.d.ts.map +1 -1
  523. package/lib/typescript/module/list/ListBase.d.ts.map +1 -1
  524. package/lib/typescript/module/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
  525. package/lib/typescript/module/overlay/OverlayInertBoundary.d.ts.map +1 -1
  526. package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
  527. package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts +3 -1
  528. package/lib/typescript/module/panel-routing/expo-router/StackScene.d.ts.map +1 -1
  529. package/lib/typescript/module/project-board/ProjectBoardBase.d.ts.map +1 -1
  530. package/lib/typescript/module/project-board/styles.d.ts.map +1 -1
  531. package/lib/typescript/module/stay-search/GuestPicker.d.ts.map +1 -1
  532. package/lib/typescript/module/stepper/Stepper.d.ts.map +1 -1
  533. package/lib/typescript/module/surface/Surface.d.ts.map +1 -1
  534. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
  535. package/lib/typescript/module/task-list/TaskList.d.ts +3 -3
  536. package/lib/typescript/module/task-list/TaskList.d.ts.map +1 -1
  537. package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
  538. package/lib/typescript/module/theme/build-theme.d.ts +9 -0
  539. package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
  540. package/lib/typescript/module/theme/canonical-tokens.d.ts +20 -0
  541. package/lib/typescript/module/theme/canonical-tokens.d.ts.map +1 -0
  542. package/lib/typescript/module/theme/color-policy.d.ts.map +1 -1
  543. package/lib/typescript/module/theme/color-scope/resolve-scope.d.ts +58 -0
  544. package/lib/typescript/module/theme/color-scope/resolve-scope.d.ts.map +1 -1
  545. package/lib/typescript/module/theme/color-scope/use-scope.d.ts.map +1 -1
  546. package/lib/typescript/module/theme/color-tokens.d.ts +5 -2
  547. package/lib/typescript/module/theme/color-tokens.d.ts.map +1 -1
  548. package/lib/typescript/module/theme/color-utils.d.ts +3 -0
  549. package/lib/typescript/module/theme/color-utils.d.ts.map +1 -1
  550. package/lib/typescript/module/theme/default-token-vars.d.ts +11 -0
  551. package/lib/typescript/module/theme/default-token-vars.d.ts.map +1 -0
  552. package/lib/typescript/module/theme/index.d.ts +1 -1
  553. package/lib/typescript/module/theme/index.d.ts.map +1 -1
  554. package/lib/typescript/module/theme/index.web.d.ts +1 -1
  555. package/lib/typescript/module/theme/index.web.d.ts.map +1 -1
  556. package/lib/typescript/module/theme/prepaint-palettes.d.ts.map +1 -1
  557. package/lib/typescript/module/theme/token-registry.d.ts +1 -16
  558. package/lib/typescript/module/theme/token-registry.d.ts.map +1 -1
  559. package/lib/typescript/module/theme/use-theme-paint.d.ts +11 -0
  560. package/lib/typescript/module/theme/use-theme-paint.d.ts.map +1 -1
  561. package/lib/typescript/module/web-search/WebSearch.d.ts +3 -3
  562. package/lib/typescript/module/web-search/WebSearch.d.ts.map +1 -1
  563. package/package.json +2 -1
  564. package/src/accordion/Accordion.tsx +6 -6
  565. package/src/accordion/Accordion.web.tsx +6 -6
  566. package/src/agent-avatar/VectorCharacterAvatar.tsx +327 -120
  567. package/src/agent-avatar/VectorNativeSurface.tsx +117 -0
  568. package/src/agent-avatar/vector-loop.ts +213 -0
  569. package/src/agent-avatar/vector-visibility.ts +3 -1
  570. package/src/agent-creator/AgentCreatorSection.tsx +4 -6
  571. package/src/agent-creator/EmotionPicker.tsx +3 -3
  572. package/src/agent-log/AgentLog.tsx +8 -21
  573. package/src/agent-reply/AgentProfile.tsx +4 -5
  574. package/src/agent-thinking/AgentThinking.tsx +4 -3
  575. package/src/agent-thinking/ThinkingReasoning.tsx +4 -4
  576. package/src/app-shell/AppShell.tsx +3 -3
  577. package/src/app-shell/AppShellEngine.tsx +67 -19
  578. package/src/app-shell/AppShellPanelLayout.tsx +3 -3
  579. package/src/app-shell/NotificationBell.tsx +6 -6
  580. package/src/app-shell/PanelReorderHandle.tsx +4 -4
  581. package/src/avatar-group/AvatarGroupBase.tsx +6 -6
  582. package/src/blur/BlurIsland.tsx +16 -14
  583. package/src/button/Button.tsx +19 -36
  584. package/src/button/GroupBase.tsx +42 -56
  585. package/src/chat-list/ChatSearchResultsBase.tsx +4 -4
  586. package/src/choice-list/ChoiceList.tsx +3 -3
  587. package/src/color-swatch-picker/ColorSwatchPicker.tsx +4 -4
  588. package/src/connection-dots/ConnectionDots.tsx +4 -4
  589. package/src/connection-dots/ConnectionDots.web.tsx +4 -4
  590. package/src/cover-header/CoverHeader.tsx +3 -3
  591. package/src/data-table/DataTableSelect.tsx +4 -4
  592. package/src/design-tokens/theme.css +1 -0
  593. package/src/design-tokens/tokens.json +390 -0
  594. package/src/dialog/DialogContent.tsx +3 -2
  595. package/src/dialog/DialogHeader.tsx +6 -5
  596. package/src/dialog/SheetShell.tsx +3 -2
  597. package/src/expandable-text/ExpandableText.tsx +3 -3
  598. package/src/floating/lens/lens-cover.tsx +29 -0
  599. package/src/floating/lens/lens-frame.tsx +195 -0
  600. package/src/floating/lens/lens-material.ts +1 -1
  601. package/src/floating/lens/native-lens.ts +2 -0
  602. package/src/grouped-section/GroupedSection.tsx +7 -6
  603. package/src/home-search/BudgetPicker.tsx +4 -4
  604. package/src/home-search/MoveInPicker.tsx +3 -3
  605. package/src/icon-circle/IconCircle.tsx +5 -5
  606. package/src/icons/shared.tsx +3 -3
  607. package/src/kbd/Kbd.tsx +4 -4
  608. package/src/layout/ResizeHandle.tsx +7 -5
  609. package/src/link-preview/LinkPreviewCard.tsx +7 -7
  610. package/src/list/ListBase.tsx +3 -6
  611. package/src/list/ListPerson.tsx +3 -3
  612. package/src/listing-editor/ListingPreviewPane.tsx +13 -13
  613. package/src/markdown/InlineMarkdown.tsx +3 -3
  614. package/src/markdown/MarkdownBlocks.tsx +14 -14
  615. package/src/multi-agent-chat/MultiAgentChatBase.tsx +6 -9
  616. package/src/multi-agent-chat/SelectedAgentPreview.tsx +4 -4
  617. package/src/notifications/NotificationPermissionSheet.tsx +3 -3
  618. package/src/notifications/NotificationsScreen.tsx +9 -9
  619. package/src/overlay/OverlayInertBoundary.tsx +10 -1
  620. package/src/page-header/PageHeader.tsx +26 -13
  621. package/src/page-header/PageHeaderTitleInput.tsx +4 -4
  622. package/src/panel-routing/expo-router/StackScene.tsx +16 -2
  623. package/src/phone-input/CountryCodeSelect.tsx +4 -4
  624. package/src/project-board/MemberAvatars.tsx +3 -3
  625. package/src/project-board/ProjectBoardBase.tsx +4 -5
  626. package/src/project-board/ProjectBoardCanvas.tsx +2 -2
  627. package/src/project-board/styles.ts +3 -4
  628. package/src/radio/RadioSwatch.tsx +3 -3
  629. package/src/rating/Rating.tsx +5 -5
  630. package/src/rating/RatingBar.tsx +4 -4
  631. package/src/rating/RatingBar.web.tsx +3 -3
  632. package/src/rating/RatingInput.tsx +5 -5
  633. package/src/rating/RatingSummary.tsx +4 -4
  634. package/src/row-actions/RowActions.tsx +3 -3
  635. package/src/select/Select.tsx +3 -3
  636. package/src/skeleton/Skeleton.tsx +9 -9
  637. package/src/stay-filters/AvailabilityFilter.tsx +3 -3
  638. package/src/stay-filters/CountFilter.tsx +3 -3
  639. package/src/stay-filters/FilterFooter.tsx +4 -4
  640. package/src/stay-filters/FilterSection.tsx +5 -5
  641. package/src/stay-filters/SwitchFilterRow.tsx +4 -4
  642. package/src/stay-search/GuestPicker.tsx +3 -6
  643. package/src/stepper/Stepper.tsx +6 -5
  644. package/src/stepper/StepperRow.tsx +5 -5
  645. package/src/subscription-plans/SubscriptionPlans.tsx +6 -6
  646. package/src/subscription-plans/SubscriptionPrice.tsx +3 -3
  647. package/src/surface/Surface.tsx +13 -28
  648. package/src/tab-bar/TabBarBase.tsx +13 -8
  649. package/src/task-list/TaskList.tsx +14 -16
  650. package/src/theme/BloomThemeProvider.tsx +33 -33
  651. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +134 -0
  652. package/src/theme/build-theme-from-seed.ts +1 -1
  653. package/src/theme/build-theme.ts +52 -11
  654. package/src/theme/canonical-tokens.ts +108 -0
  655. package/src/theme/color-policy.ts +3 -0
  656. package/src/theme/color-scope/resolve-scope.ts +47 -8
  657. package/src/theme/color-scope/use-scope.ts +2 -6
  658. package/src/theme/color-tokens.ts +7 -7
  659. package/src/theme/color-utils.ts +4 -0
  660. package/src/theme/default-token-vars.ts +86 -0
  661. package/src/theme/index.ts +1 -1
  662. package/src/theme/index.web.ts +1 -1
  663. package/src/theme/prepaint-palettes.ts +2 -3
  664. package/src/theme/token-registry.ts +1 -101
  665. package/src/theme/use-theme-paint.ts +26 -3
  666. package/src/typography/Typography.tsx +12 -12
  667. package/src/web-search/WebSearch.tsx +16 -18
  668. package/src/wizard/WizardFooterBase.tsx +5 -5
  669. package/src/wizard/WizardProgress.tsx +5 -5
  670. package/lib/commonjs/floating/lens/lens-button-host.js +0 -218
  671. package/lib/commonjs/floating/lens/lens-button-host.js.map +0 -1
  672. package/lib/module/floating/lens/lens-button-host.js +0 -214
  673. package/lib/module/floating/lens/lens-button-host.js.map +0 -1
  674. package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts +0 -34
  675. package/lib/typescript/commonjs/floating/lens/lens-button-host.d.ts.map +0 -1
  676. package/lib/typescript/module/floating/lens/lens-button-host.d.ts +0 -34
  677. package/lib/typescript/module/floating/lens/lens-button-host.d.ts.map +0 -1
  678. package/src/floating/lens/lens-button-host.tsx +0 -148
@@ -27,7 +27,18 @@ import { useStaticPortraits } from "./use-static-portraits.js";
27
27
  import { useVectorAssetLoader } from "./default-catalog.js";
28
28
  import { loadVectorGeometry, paintVectorCharacter, VECTOR_REST_CLIPS, vectorGeometryKey } from "./vector-compose.js";
29
29
  import { renderVectorFrame } from "./vector-frame.js";
30
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
+ import { releaseVectorLoop, vectorLoop, vectorLoopFrame, vectorLoopIndex, vectorLoopKey, vectorLoopTime, vectorLoopTracks } from "./vector-loop.js";
31
+ import { nativePaint, nativeVectorLoop, VectorNativeSurface, viewBoxNumbers } from "./VectorNativeSurface.js";
32
+
33
+ /** One computed frame: what is drawn, and the pose and motion a later transition starts from. */
34
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
35
+ /**
36
+ * The rest loops the native surface has, by `vectorLoopKey`: `true` once it said it has one (from
37
+ * memory, from an earlier start, or because it was handed over), `false` once it said it has not.
38
+ * Where there is no native surface (the web) the JS thread replays the remembered frames itself.
39
+ */
40
+ const nativeLoops = new Map();
41
+ let lastCapture = 0;
31
42
  /** Shared browser/native SVG host; loading, composition and projection never start the 3D runtime. */
32
43
  export function VectorCharacterAvatar(props) {
33
44
  const $ = _c(4);
@@ -133,6 +144,15 @@ function AnimatedVectorCharacterAvatar(props) {
133
144
  latestAsset.current = paintedAsset;
134
145
  const [display, setDisplay] = useState(),
135
146
  [revision, setRevision] = useState(0);
147
+ /** The clock of the rest loop the native surface plays, if it does; the JS thread draws nothing meanwhile. */
148
+ const [looping, setLooping] = useState();
149
+ const loopSession = useRef(undefined);
150
+ /** The rest loop the native surface is asked about, and the loop handed to it when it has not got it. */
151
+ const [restKey, setRestKey] = useState();
152
+ const [handedLoop, setHandedLoop] = useState();
153
+ const [capture, setCapture] = useState(0);
154
+ const captures = useRef(new Map());
155
+ const drawn = useRef(false);
136
156
  const host = useRef(null);
137
157
  const svg = useRef(null);
138
158
  const observeSnapshot = useContext(AvatarSnapshotObserver);
@@ -144,8 +164,15 @@ function AnimatedVectorCharacterAvatar(props) {
144
164
  uri: 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(new XMLSerializer().serializeToString(element))
145
165
  } : null;
146
166
  }
147
- return svg.current ? new Promise(resolve => svg.current.toDataURL(data => resolve({
148
- uri: 'data:image/png;base64,' + data
167
+ if (VectorNativeSurface) return drawn.current ? new Promise(resolve => {
168
+ const id = ++lastCapture;
169
+ captures.current.set(id, data => resolve(data ? {
170
+ uri: 'data:image/png;base64,' + data
171
+ } : null));
172
+ setCapture(id);
173
+ }) : null;
174
+ return svg.current ? new Promise(resolve_0 => svg.current.toDataURL(data_0 => resolve_0({
175
+ uri: 'data:image/png;base64,' + data_0
149
176
  }))) : null;
150
177
  });
151
178
  return () => observeSnapshot?.(null);
@@ -200,6 +227,49 @@ function AnimatedVectorCharacterAvatar(props) {
200
227
  cycles.current = props.workingCycles;
201
228
  const catalogRef = useRef(catalog);
202
229
  catalogRef.current = catalog;
230
+ /**
231
+ * Takes the drawing back from the native surface: the clock moves on by what it played (both read
232
+ * the same monotonic clock), and the surface keeps the frame it got to on screen until the JS
233
+ * thread draws one. Called before anything changes the motion (a gesture, a mood, the pointer) and
234
+ * whenever the frame loop restarts, so the character carries on from where it was.
235
+ */
236
+ const endLoop = useCallback(() => {
237
+ const session = loopSession.current;
238
+ if (!session) return;
239
+ loopSession.current = undefined;
240
+ const seconds = Math.max(0, (performance.now() - session.epoch) / 1000),
241
+ motion = state.current;
242
+ advanceVectorPlayback(motion, session.asset, seconds);
243
+ advanceVectorMood(motion.mood, latestMood.current, seconds);
244
+ // The pose of that frame, which a gesture blends from: at rest it is the idle clip's pose at the
245
+ // frame's grid time, as the loop drew it.
246
+ motion.lastPose = sampleVectorPose(session.asset, 'idle', vectorLoopTime(session.loop, vectorLoopIndex(session.loop, motion.time)));
247
+ setLooping(undefined);
248
+ setDisplay(shown => shown && {
249
+ ...shown,
250
+ time: motion.time
251
+ });
252
+ }, []);
253
+ const onLoop = useCallback(({
254
+ nativeEvent: {
255
+ key,
256
+ ready: ready_0
257
+ }
258
+ }) => {
259
+ nativeLoops.set(key, ready_0);
260
+ if (ready_0) setHandedLoop(handed => handed?.key === key ? undefined : handed);
261
+ // The surface lost a loop it was playing: the JS thread draws it again.
262
+ else if (loopSession.current?.key === key) endLoop();
263
+ }, [endLoop]);
264
+ const onCapture = useCallback(({
265
+ nativeEvent: {
266
+ id: id_0,
267
+ data: data_1
268
+ }
269
+ }) => {
270
+ captures.current.get(id_0)?.(data_1);
271
+ captures.current.delete(id_0);
272
+ }, []);
203
273
  /**
204
274
  * The character is first loaded at rest (`VECTOR_REST_CLIPS`): its idle tracks and the geometry
205
275
  * they draw, which is what an avatar shows almost always (a mood is drawn on the idle clip). Its
@@ -211,24 +281,27 @@ function AnimatedVectorCharacterAvatar(props) {
211
281
  const loadingFull = useRef(null);
212
282
  const pendingAction = useRef(null);
213
283
  const ensureFull = useCallback(() => {
214
- const key = vectorGeometryKey(latestResolved.current);
215
- if (fullGeometry.current === key || loadingFull.current === key) return;
216
- loadingFull.current = key;
284
+ const key_0 = vectorGeometryKey(latestResolved.current);
285
+ if (fullGeometry.current === key_0 || loadingFull.current === key_0) return;
286
+ loadingFull.current = key_0;
217
287
  void loadVectorGeometry(latestResolved.current, catalogRef.current).then(value_0 => {
218
- if (vectorGeometryKey(latestResolved.current) !== key) return;
219
- fullGeometry.current = key;
220
- loadedGeometry.current = key;
288
+ if (vectorGeometryKey(latestResolved.current) !== key_0) return;
289
+ fullGeometry.current = key_0;
290
+ loadedGeometry.current = key_0;
221
291
  if (value_0.referenceFace) state.current.workLook = vectorWorkLook(value_0);
292
+ // The loop may have been handed over again while this loaded: its clock first.
293
+ endLoop();
222
294
  setAsset(value_0);
223
295
  const action = pendingAction.current;
224
296
  pendingAction.current = null;
225
297
  if (action) playVectorAction(state.current, action, action === 'work' ? cycles.current : 1);
226
298
  setRevision(revision_0 => revision_0 + 1);
227
299
  }, () => {
228
- if (loadingFull.current === key) loadingFull.current = null;
300
+ if (loadingFull.current === key_0) loadingFull.current = null;
229
301
  });
230
- }, []);
302
+ }, [endLoop]);
231
303
  const play = useCallback(action_0 => {
304
+ endLoop();
232
305
  if (action_0 !== 'idle' && fullGeometry.current !== vectorGeometryKey(latestResolved.current)) {
233
306
  pendingAction.current = action_0;
234
307
  ensureFull();
@@ -237,7 +310,7 @@ function AnimatedVectorCharacterAvatar(props) {
237
310
  pendingAction.current = null;
238
311
  playVectorAction(state.current, action_0, action_0 === 'work' ? cycles.current : 1);
239
312
  setRevision(value_1 => value_1 + 1);
240
- }, [ensureFull]);
313
+ }, [ensureFull, endLoop]);
241
314
  useEffect(() => {
242
315
  let current = true;
243
316
  setFailed(false);
@@ -276,7 +349,7 @@ function AnimatedVectorCharacterAvatar(props) {
276
349
  eyewear: resolved.eyewear,
277
350
  accessory: resolved.accessory
278
351
  },
279
- available: Object.fromEntries([...AVATAR_SHAPES.map(id => [`shape:${id}`, true]), ...AVATAR_EYES.map(id_0 => [`eyes:${id_0}`, true]), ['eyes:none', true], ...AVATAR_EYEWEAR.map(id_1 => [`eyewear:${id_1}`, true]), ...AVATAR_ACCESSORIES.map(id_2 => [`accessory:${id_2}`, true]), ...AVATAR_COLORS.map(id_3 => [`color:${id_3}`, true])])
352
+ available: Object.fromEntries([...AVATAR_SHAPES.map(id_1 => [`shape:${id_1}`, true]), ...AVATAR_EYES.map(id_2 => [`eyes:${id_2}`, true]), ['eyes:none', true], ...AVATAR_EYEWEAR.map(id_3 => [`eyewear:${id_3}`, true]), ...AVATAR_ACCESSORIES.map(id_4 => [`accessory:${id_4}`, true]), ...AVATAR_COLORS.map(id_5 => [`color:${id_5}`, true])])
280
353
  });
281
354
  }).catch(() => {
282
355
  if (current) {
@@ -309,11 +382,12 @@ function AnimatedVectorCharacterAvatar(props) {
309
382
  }, [props.idleKey, props.reactionKey, props.workingKey, props.entranceKey, play]);
310
383
  useEffect(() => {
311
384
  if (mood === previous.current.mood) return;
385
+ endLoop();
312
386
  setVectorMood(state.current.mood, mood, previous.current.mood);
313
387
  previous.current.mood = mood;
314
388
  // A still character repaints into the new mood; a running one restarts its frame loop.
315
389
  setRevision(value_3 => value_3 + 1);
316
- }, [mood]);
390
+ }, [mood, endLoop]);
317
391
  useEffect(() => {
318
392
  if (Platform.OS !== 'web' || typeof IntersectionObserver === 'undefined' || !host.current) return;
319
393
  const observer = new IntersectionObserver(([entry]) => setVisible(entry?.isIntersecting ?? false));
@@ -322,12 +396,15 @@ function AnimatedVectorCharacterAvatar(props) {
322
396
  }, []);
323
397
  useEffect(() => {
324
398
  if (!asset || !visible || !screenVisible) return;
399
+ // The UI thread plays the loop until something changes; then the JS thread takes over again.
400
+ if (looping) return endLoop;
325
401
  let last,
326
402
  painted = 0,
403
+ paintedIndex = -1,
327
404
  disposed = false;
328
405
  const stopped = !!paused || !!portrait || reduced;
329
406
  const tick = timestamp => {
330
- if (disposed) return;
407
+ if (disposed || loopSession.current) return;
331
408
  // A frame callback that brings no timestamp is read off the page's own clock; with no clock
332
409
  // at all there is nothing to advance by, and the frame is not drawn.
333
410
  const now = Number.isFinite(timestamp) ? timestamp : typeof performance === 'undefined' ? Number.NaN : performance.now();
@@ -335,92 +412,126 @@ function AnimatedVectorCharacterAvatar(props) {
335
412
  const delta = vectorFrameDelta(now, last);
336
413
  last = now;
337
414
  const asset_0 = latestAsset.current;
338
- const motion = state.current;
415
+ const motion_0 = state.current;
339
416
  if (!stopped) {
340
- advanceVectorPlayback(motion, asset_0, delta);
341
- motion.entrance = Math.min(1, motion.entrance + delta / 0.25);
417
+ advanceVectorPlayback(motion_0, asset_0, delta);
418
+ motion_0.entrance = Math.min(1, motion_0.entrance + delta / 0.25);
342
419
  const follow = 1 - Math.exp(-delta * 7);
343
- motion.yaw += (motion.targetYaw - motion.yaw) * follow;
344
- motion.pitch += (motion.targetPitch - motion.pitch) * follow;
345
- motion.lookMix += ((motion.pointerActive ? 1 : 0) - motion.lookMix) * follow;
346
- advanceVectorMood(motion.mood, latestMood.current, delta);
347
- } else settleVectorMood(motion.mood, latestMood.current);
348
- if (!painted || stopped || now - painted >= 1000 / 30) {
420
+ motion_0.yaw += (motion_0.targetYaw - motion_0.yaw) * follow;
421
+ motion_0.pitch += (motion_0.targetPitch - motion_0.pitch) * follow;
422
+ motion_0.lookMix += ((motion_0.pointerActive ? 1 : 0) - motion_0.lookMix) * follow;
423
+ advanceVectorMood(motion_0.mood, latestMood.current, delta);
424
+ } else settleVectorMood(motion_0.mood, latestMood.current);
425
+ // At rest the frame is one of the loop's, drawn once and remembered (`vector-loop.ts`), and
426
+ // each grid frame is painted in turn; otherwise a frame is painted 30 times a second.
427
+ 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 && !vectorMoodActive(motion_0.mood) && !asset_0.referenceFace && !previewPart;
428
+ const loop = resting ? vectorLoop(latestFrameRecipe.current, asset_0.clips.idle.duration) : undefined;
429
+ const index = loop ? vectorLoopIndex(loop, motion_0.time) : 0;
430
+ const transition = Math.min(1, Math.max(0, (motion_0.clock - motion_0.transitionStarted) / motion_0.transitionDuration));
431
+ const eased = transition * transition * (3 - 2 * transition);
432
+ const feeling = !portrait && vectorMoodActive(motion_0.mood) ? {
433
+ ...motion_0.mood
434
+ } : undefined;
435
+ const draw = (action_1, time) => {
436
+ const poseTime = asset_0.referenceFace && action_1 === 'work' ? referenceWorkTime(time) : time;
437
+ const targetPose = sampleVectorPose(asset_0, action_1, poseTime);
438
+ const pose = motion_0.poseFrom && !portrait ? blendVectorPose(motion_0.poseFrom, targetPose, eased) : targetPose;
439
+ const procedural = asset_0.referenceFace ? sampleVectorMotion({
440
+ personalityKey: latestResolved.current.shape,
441
+ time: portrait ? 0 : motion_0.clock,
442
+ state: action_1,
443
+ stateTime: poseTime,
444
+ workLook: motion_0.workLook,
445
+ look: {
446
+ yaw: motion_0.yaw,
447
+ pitch: motion_0.pitch,
448
+ mix: portrait ? 0 : motion_0.lookMix,
449
+ wander: (action_1 === 'work' ? 0.15 : 1) * (1 - motion_0.lookMix)
450
+ },
451
+ transition: motion_0.motionFrom && !portrait ? {
452
+ from: motion_0.motionFrom,
453
+ startedAt: motion_0.transitionStarted,
454
+ duration: motion_0.transitionDuration
455
+ } : undefined
456
+ }) : undefined;
457
+ // The mood goes over the blended motion, never into it: a transition captures the
458
+ // motion without the mood, which carries on through the transition on its own clock.
459
+ const framed = vectorMoodFrame(asset_0, procedural, {
460
+ yaw: portrait ? 0 : motion_0.yaw,
461
+ pitch: portrait ? 0 : motion_0.pitch
462
+ }, feeling);
463
+ const drawing = renderVectorFrame(asset_0, {
464
+ action: action_1,
465
+ time,
466
+ ...framed,
467
+ eyesOnly: previewPart === 'eyes',
468
+ pose
469
+ });
470
+ return {
471
+ pose,
472
+ procedural,
473
+ gaze: framed.look ?? framed,
474
+ drawing
475
+ };
476
+ };
477
+ // Where there is a native surface, a loop it has is played by it, from where the clock is.
478
+ const key_1 = loop && VectorNativeSurface ? vectorLoopKey(loop, JSON.stringify([vectorGeometryKey(latestResolved.current), latestResolved.current.paint]), asset_0.clips.idle, () => vectorLoopFrame(loop, 0, () => draw('idle', vectorLoopTime(loop, 0))).drawing) : undefined;
479
+ if (key_1 !== undefined) {
480
+ setRestKey(key_1);
481
+ // Once a frame is on screen, so the surface is there to play it.
482
+ if (nativeLoops.get(key_1) && motion_0.count > 0) {
483
+ const clock = {
484
+ epoch: performance.now(),
485
+ time: motion_0.time
486
+ };
487
+ loopSession.current = {
488
+ key: key_1,
489
+ loop: loop,
490
+ asset: asset_0,
491
+ ...clock
492
+ };
493
+ releaseVectorLoop(loop);
494
+ setLooping(clock);
495
+ return;
496
+ }
497
+ }
498
+ if (loop ? index !== paintedIndex : !painted || stopped || now - painted >= 1000 / 30) {
349
499
  painted = painted ? now - (now - painted) % (1000 / 30) : now;
350
- const action_1 = portrait ? 'idle' : motion.action,
351
- time = portrait ? 0 : motion.time;
352
- const transition = Math.min(1, Math.max(0, (motion.clock - motion.transitionStarted) / motion.transitionDuration));
353
- const eased = transition * transition * (3 - 2 * transition);
354
- const feeling = !portrait && vectorMoodActive(motion.mood) ? {
355
- ...motion.mood
356
- } : undefined;
357
- const sharedKey = JSON.stringify([latestFrameRecipe.current, action_1, time, motion.clock, motion.yaw, motion.pitch, motion.lookMix, motion.workLook, motion.transitionStarted, motion.transitionDuration, vectorStateIdentity(motion.poseFrom), vectorStateIdentity(motion.motionFrom), feeling?.sadness, feeling?.declineTime, portrait, previewPart]);
500
+ paintedIndex = loop ? index : -1;
501
+ const action_2 = portrait ? 'idle' : motion_0.action,
502
+ time_0 = loop ? vectorLoopTime(loop, index) : portrait ? 0 : motion_0.time;
503
+ 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, vectorStateIdentity(motion_0.poseFrom), vectorStateIdentity(motion_0.motionFrom), feeling?.sadness, feeling?.declineTime, portrait, previewPart]);
358
504
  const {
359
505
  pose: pose_0,
360
506
  procedural: procedural_0,
361
507
  gaze,
362
508
  drawing: drawing_0
363
- } = shareVectorFrame(sharedKey, () => {
364
- const poseTime = asset_0.referenceFace && action_1 === 'work' ? referenceWorkTime(time) : time;
365
- const targetPose = sampleVectorPose(asset_0, action_1, poseTime);
366
- const pose = motion.poseFrom && !portrait ? blendVectorPose(motion.poseFrom, targetPose, eased) : targetPose;
367
- const procedural = asset_0.referenceFace ? sampleVectorMotion({
368
- personalityKey: latestResolved.current.shape,
369
- time: portrait ? 0 : motion.clock,
370
- state: action_1,
371
- stateTime: poseTime,
372
- workLook: motion.workLook,
373
- look: {
374
- yaw: motion.yaw,
375
- pitch: motion.pitch,
376
- mix: portrait ? 0 : motion.lookMix,
377
- wander: (action_1 === 'work' ? 0.15 : 1) * (1 - motion.lookMix)
378
- },
379
- transition: motion.motionFrom && !portrait ? {
380
- from: motion.motionFrom,
381
- startedAt: motion.transitionStarted,
382
- duration: motion.transitionDuration
383
- } : undefined
384
- }) : undefined;
385
- // The mood goes over the blended motion, never into it: a transition captures the
386
- // motion without the mood, which carries on through the transition on its own clock.
387
- const framed = vectorMoodFrame(asset_0, procedural, {
388
- yaw: portrait ? 0 : motion.yaw,
389
- pitch: portrait ? 0 : motion.pitch
390
- }, feeling);
391
- const drawing = renderVectorFrame(asset_0, {
392
- action: action_1,
393
- time,
394
- ...framed,
395
- eyesOnly: previewPart === 'eyes',
396
- pose
397
- });
398
- return {
399
- pose,
400
- procedural,
401
- gaze: framed.look ?? framed,
402
- drawing
403
- };
404
- });
405
- motion.lastPose = pose_0;
406
- motion.lastMotion = procedural_0;
509
+ } = loop ? vectorLoopFrame(loop, index, () => draw(action_2, time_0)) : shareVectorFrame(sharedKey(), () => draw(action_2, time_0));
510
+ motion_0.lastPose = pose_0;
511
+ motion_0.lastMotion = procedural_0;
407
512
  if (transition >= 1) {
408
- motion.poseFrom = undefined;
409
- motion.motionFrom = undefined;
513
+ motion_0.poseFrom = undefined;
514
+ motion_0.motionFrom = undefined;
410
515
  }
411
- motion.count++;
516
+ motion_0.count++;
412
517
  setDisplay({
413
518
  geometry: loadedGeometry.current,
414
519
  drawing: drawing_0,
415
- action: action_1,
416
- time,
417
- count: motion.count,
418
- entrance: stopped ? 1 : motion.entrance,
520
+ action: action_2,
521
+ time: time_0,
522
+ count: motion_0.count,
523
+ entrance: stopped ? 1 : motion_0.entrance,
419
524
  gazeYaw: gaze.yaw,
420
525
  gazePitch: gaze.pitch,
421
- tracking: motion.lookMix
526
+ tracking: motion_0.lookMix
422
527
  });
423
528
  }
529
+ // A complete loop the native surface said it has not got is handed to it once.
530
+ const tracks = key_1 !== undefined && nativeLoops.get(key_1) === false && vectorLoopTracks(loop);
531
+ if (tracks) setHandedLoop(handed_0 => handed_0?.key === key_1 ? handed_0 : {
532
+ key: key_1,
533
+ loop: nativeVectorLoop(tracks, avatarViewBox(tracks.viewBox))
534
+ });
424
535
  };
425
536
  if (stopped) tick(typeof performance === 'undefined' ? 0 : performance.now());
426
537
  const unsubscribe = stopped ? undefined : subscribeVectorFrame(tick);
@@ -428,7 +539,7 @@ function AnimatedVectorCharacterAvatar(props) {
428
539
  disposed = true;
429
540
  unsubscribe?.();
430
541
  };
431
- }, [asset, visible, screenVisible, paused, portrait, reduced, previewPart, revision]);
542
+ }, [asset, visible, screenVisible, paused, portrait, reduced, previewPart, revision, looping, endLoop]);
432
543
  useEffect(() => {
433
544
  if (paused || portrait || reduced) setRevision(value_4 => value_4 + 1);
434
545
  }, [resolved.paint, paused, portrait, reduced]);
@@ -439,9 +550,37 @@ function AnimatedVectorCharacterAvatar(props) {
439
550
  onReady.current?.();
440
551
  }
441
552
  }, [display]);
553
+ drawn.current = !!display;
554
+ /** The paint a drawn path is shown with: the current paint, when the frame is of the current geometry. */
555
+ const paintOf = path => {
556
+ const part = display?.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path.id)] : undefined;
557
+ const stroke = part ? part.stroke ?? (part.role === 'panel' ? path.stroke : undefined) : path.stroke;
558
+ return {
559
+ fill: part?.color ?? path.fill,
560
+ stroke,
561
+ strokeWidth: stroke ? part?.strokeWidth ?? path.strokeWidth ?? 1.5 : undefined
562
+ };
563
+ };
564
+ const nativeFrame = useMemo(() => VectorNativeSurface && display ? {
565
+ revision: display.count,
566
+ viewBox: viewBoxNumbers(avatarViewBox(display.drawing.viewBox)),
567
+ opacity: display.entrance,
568
+ paths: display.drawing.paths.map(path_0 => ({
569
+ d: path_0.d,
570
+ ...(path_0.clip !== undefined ? {
571
+ clip: path_0.clip
572
+ } : {}),
573
+ ...nativePaint(paintOf(path_0)),
574
+ opacity: path_0.opacity,
575
+ fillOpacity: path_0.fillOpacity
576
+ }))
577
+ } : undefined,
578
+ // `paintOf` reads only `display` and `paintedAsset`.
579
+ [display, paintedAsset]);
442
580
  const gaze_0 = (x, y, width, height) => {
443
581
  if (!interactive || paused || portrait || reduced) return;
444
582
  if (![x, y, width, height].every(Number.isFinite) || width <= 0 || height <= 0) return;
583
+ endLoop();
445
584
  state.current.pointerActive = true;
446
585
  const limit = asset?.referenceFace ? 0.6 : 0.8;
447
586
  state.current.targetYaw = Math.max(-limit, Math.min(limit, (x / width - 0.5) * 1.8));
@@ -499,40 +638,57 @@ function AnimatedVectorCharacterAvatar(props) {
499
638
  fontSize: 10
500
639
  },
501
640
  children: messages.unavailable
502
- }) : display ? /*#__PURE__*/_jsxs(Svg, {
641
+ }) : display && VectorNativeSurface ? /*#__PURE__*/_jsx(VectorNativeSurface, {
642
+ style: {
643
+ width: '100%',
644
+ height: '100%'
645
+ },
646
+ pointerEvents: "none",
647
+ accessible: false,
648
+ importantForAccessibility: "no-hide-descendants",
649
+ testID: "bloom-vector-drawing",
650
+ frame: nativeFrame,
651
+ loopKey: restKey,
652
+ loopTracks: handedLoop?.key === restKey ? handedLoop?.loop : undefined,
653
+ loopClock: looping,
654
+ capture: capture,
655
+ onLoop: onLoop,
656
+ onCapture: onCapture
657
+ }) : display ? /*#__PURE__*/_jsx(Svg, {
503
658
  ref: svg,
504
659
  width: "100%",
505
660
  height: "100%",
506
661
  viewBox: avatarViewBox(display.drawing.viewBox),
507
662
  testID: "bloom-vector-drawing",
508
663
  ...svgA11yProps(),
509
- children: [/*#__PURE__*/_jsx(Defs, {
510
- children: display.drawing.paths.filter(path => path.clip !== undefined).map(path_0 => /*#__PURE__*/_jsx(ClipPath, {
511
- id: `${prefix}-${path_0.id}`,
512
- clipPathUnits: 'userSpaceOnUse',
513
- children: /*#__PURE__*/_jsx(Path, {
514
- d: path_0.clip,
515
- fillRule: "nonzero",
516
- clipRule: "nonzero"
664
+ children: /*#__PURE__*/_jsxs(_Fragment, {
665
+ children: [/*#__PURE__*/_jsx(Defs, {
666
+ children: display.drawing.paths.filter(path_1 => path_1.clip !== undefined).map(path_2 => /*#__PURE__*/_jsx(ClipPath, {
667
+ id: `${prefix}-${path_2.id}`,
668
+ clipPathUnits: 'userSpaceOnUse',
669
+ children: /*#__PURE__*/_jsx(Path, {
670
+ d: path_2.clip,
671
+ fillRule: "nonzero",
672
+ clipRule: "nonzero"
673
+ })
674
+ }, path_2.id))
675
+ }), /*#__PURE__*/_jsx(G, {
676
+ opacity: display.entrance,
677
+ children: display.drawing.paths.map(path_3 => {
678
+ const paint = paintOf(path_3);
679
+ return /*#__PURE__*/_jsx(Path, {
680
+ d: path_3.d,
681
+ fill: paint.fill,
682
+ opacity: path_3.opacity,
683
+ fillOpacity: path_3.fillOpacity,
684
+ fillRule: "nonzero",
685
+ stroke: paint.stroke,
686
+ strokeWidth: paint.strokeWidth,
687
+ clipPath: path_3.clip !== undefined ? `url(#${prefix}-${path_3.id})` : undefined
688
+ }, path_3.id);
517
689
  })
518
- }, path_0.id))
519
- }), /*#__PURE__*/_jsx(G, {
520
- opacity: display.entrance,
521
- children: display.drawing.paths.map(path_1 => {
522
- const currentPart = display.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path_1.id)] : undefined;
523
- const stroke = currentPart ? currentPart.stroke ?? (currentPart.role === 'panel' ? path_1.stroke : undefined) : path_1.stroke;
524
- return /*#__PURE__*/_jsx(Path, {
525
- d: path_1.d,
526
- fill: display.geometry === loadedGeometry.current ? paintedAsset?.parts[Number(path_1.id)]?.color ?? path_1.fill : path_1.fill,
527
- opacity: path_1.opacity,
528
- fillOpacity: path_1.fillOpacity,
529
- fillRule: "nonzero",
530
- stroke: stroke,
531
- strokeWidth: stroke ? currentPart?.strokeWidth ?? path_1.strokeWidth ?? 1.5 : undefined,
532
- clipPath: path_1.clip !== undefined ? `url(#${prefix}-${path_1.id})` : undefined
533
- }, path_1.id);
534
- })
535
- })]
690
+ })]
691
+ })
536
692
  }) : null
537
693
  });
538
694
  }