@oxy.so/bloom 7.0.1 → 7.1.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/assets/character-runtime/README.md +55 -0
- package/assets/character-runtime/appearance-codec.mjs +149 -0
- package/assets/character-runtime/integrity.json +6 -0
- package/assets/character-runtime/legacy-engine.mjs +105 -0
- package/assets/character-runtime/legacy-geometry.mjs +166 -0
- package/assets/character-runtime/legacy-worker.mjs +85 -0
- package/assets/character-runtime/orbit-characters.data +0 -0
- package/assets/character-runtime/orbit-characters.mjs +30 -0
- package/assets/character-runtime/orbit-characters.wasm +0 -0
- package/assets/character-runtime/preparation-worker.mjs +19 -0
- package/assets/character-runtime/runtime.mjs +820 -0
- package/assets/character-runtime/thumbnails/eyes/crescent_inset.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/dots.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/double_highlights.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/highlight_capsules.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/oval.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/round_inset.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/sleepy_lids.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/sparkle_capsules.png +0 -0
- package/assets/character-runtime/thumbnails/eyes/swept_lids.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/capsule.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/circle.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/circle_two_ears.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/four_lobed_butterfly.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/heart.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/rounded_cube.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/rounded_diamond.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/rounded_head_two_ears.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/rounded_triangle.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/six_lobed_flower.png +0 -0
- package/assets/character-runtime/thumbnails/shapes/twelve_scalloped_rosette.png +0 -0
- package/docs/adoption-matrix.mdx +9 -9
- package/docs/agent-avatar.mdx +35 -10
- package/docs/agent-creator.mdx +12 -4
- package/docs/multi-agent-chat.mdx +12 -0
- package/docs/project-board.mdx +3 -3
- package/lib/commonjs/agent-avatar/AgentAvatar.js +15 -203
- package/lib/commonjs/agent-avatar/AgentAvatar.js.map +1 -1
- package/lib/commonjs/agent-avatar/AgentAvatarProvider.js +64 -0
- package/lib/commonjs/agent-avatar/AgentAvatarProvider.js.map +1 -0
- package/lib/commonjs/agent-avatar/CharacterAvatar.js +211 -0
- package/lib/commonjs/agent-avatar/CharacterAvatar.js.map +1 -0
- package/lib/commonjs/agent-avatar/ProceduralAvatar.js +216 -0
- package/lib/commonjs/agent-avatar/ProceduralAvatar.js.map +1 -0
- package/lib/commonjs/agent-avatar/artwork.js +4 -3
- package/lib/commonjs/agent-avatar/artwork.js.map +1 -1
- package/lib/commonjs/agent-avatar/avatar-color.js +16 -0
- package/lib/commonjs/agent-avatar/avatar-color.js.map +1 -0
- package/lib/commonjs/agent-avatar/character-html.js +25 -0
- package/lib/commonjs/agent-avatar/character-html.js.map +1 -0
- package/lib/commonjs/agent-avatar/character-runtime-module.js +39 -0
- package/lib/commonjs/agent-avatar/character-runtime-module.js.map +1 -0
- package/lib/commonjs/agent-avatar/character-webview.js +18 -0
- package/lib/commonjs/agent-avatar/character-webview.js.map +1 -0
- package/lib/commonjs/agent-avatar/config-character.js +36 -0
- package/lib/commonjs/agent-avatar/config-character.js.map +1 -0
- package/lib/commonjs/agent-avatar/context.js +3 -1
- package/lib/commonjs/agent-avatar/context.js.map +1 -1
- package/lib/commonjs/agent-avatar/index.js +7 -0
- package/lib/commonjs/agent-avatar/index.js.map +1 -1
- package/lib/commonjs/agent-avatar/legacy-contours.js +57 -0
- package/lib/commonjs/agent-avatar/legacy-contours.js.map +1 -0
- package/lib/commonjs/agent-avatar/legacy-recipe.js +112 -0
- package/lib/commonjs/agent-avatar/legacy-recipe.js.map +1 -0
- package/lib/commonjs/agent-avatar/messages.js +2 -1
- package/lib/commonjs/agent-avatar/messages.js.map +1 -1
- package/lib/commonjs/agent-avatar/model.js +2 -0
- package/lib/commonjs/agent-avatar/model.js.map +1 -1
- package/lib/commonjs/agent-creator/AgentCreatorBase.js +245 -21
- package/lib/commonjs/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/commonjs/agent-creator/CharacterControls.js +113 -0
- package/lib/commonjs/agent-creator/CharacterControls.js.map +1 -0
- package/lib/commonjs/agent-creator/EmotionPicker.js +51 -18
- package/lib/commonjs/agent-creator/EmotionPicker.js.map +1 -1
- package/lib/commonjs/agent-creator/ShapeArc.js +56 -26
- package/lib/commonjs/agent-creator/ShapeArc.js.map +1 -1
- package/lib/commonjs/agent-creator/ShapeSilhouette.js +62 -0
- package/lib/commonjs/agent-creator/ShapeSilhouette.js.map +1 -0
- package/lib/commonjs/agent-creator/constants.js +48 -1
- package/lib/commonjs/agent-creator/constants.js.map +1 -1
- package/lib/commonjs/agent-creator/messages.js +9 -0
- package/lib/commonjs/agent-creator/messages.js.map +1 -1
- package/lib/commonjs/agent-creator/shared.js +7 -10
- package/lib/commonjs/agent-creator/shared.js.map +1 -1
- package/lib/commonjs/agent-thinking/AgentThinking.js +4 -62
- package/lib/commonjs/agent-thinking/AgentThinking.js.map +1 -1
- package/lib/commonjs/agent-thinking/ThinkingLabel.js +77 -0
- package/lib/commonjs/agent-thinking/ThinkingLabel.js.map +1 -0
- package/lib/commonjs/chart-cards/TokensChartCard.js +20 -5
- package/lib/commonjs/chart-cards/TokensChartCard.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +11 -1
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +11 -1
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +11 -1
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +11 -1
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +11 -1
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +11 -1
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +11 -1
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +11 -1
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +11 -1
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +11 -1
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +11 -1
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +11 -1
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +11 -1
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +11 -1
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/AvatarHandoff.js +2 -4
- package/lib/commonjs/multi-agent-chat/AvatarHandoff.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/ChatAgentProfile.js +97 -0
- package/lib/commonjs/multi-agent-chat/ChatAgentProfile.js.map +1 -0
- package/lib/commonjs/multi-agent-chat/EditorRail.js +4 -0
- package/lib/commonjs/multi-agent-chat/EditorRail.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js +89 -126
- package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/ReplyRow.js +8 -11
- package/lib/commonjs/multi-agent-chat/ReplyRow.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/handoff.js +5 -5
- package/lib/commonjs/multi-agent-chat/handoff.js.map +1 -1
- package/lib/commonjs/project-board/CreateTicketDialog.js +33 -2
- package/lib/commonjs/project-board/CreateTicketDialog.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardBase.js +137 -38
- package/lib/commonjs/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js +34 -28
- package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js.map +1 -1
- package/lib/commonjs/project-board/TicketDetailDialog.js +6 -3
- package/lib/commonjs/project-board/TicketDetailDialog.js.map +1 -1
- package/lib/commonjs/project-board/TicketGenieSurface.js +17 -7
- package/lib/commonjs/project-board/TicketGenieSurface.js.map +1 -1
- package/lib/commonjs/project-board/TicketGenieSurface.web.js +1 -1
- package/lib/commonjs/project-board/TicketGenieSurface.web.js.map +1 -1
- package/lib/commonjs/project-board/TicketPresence.js +125 -0
- package/lib/commonjs/project-board/TicketPresence.js.map +1 -0
- package/lib/commonjs/project-board/TicketTokenChart.js +23 -0
- package/lib/commonjs/project-board/TicketTokenChart.js.map +1 -0
- package/lib/commonjs/project-board/context.js +3 -1
- package/lib/commonjs/project-board/context.js.map +1 -1
- package/lib/commonjs/search/Search.js +12 -3
- package/lib/commonjs/search/Search.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarToolbar.js +28 -14
- package/lib/commonjs/sidebar/SidebarToolbar.js.map +1 -1
- package/lib/commonjs/text-field/TextField.js +13 -7
- package/lib/commonjs/text-field/TextField.js.map +1 -1
- package/lib/module/agent-avatar/AgentAvatar.js +16 -204
- package/lib/module/agent-avatar/AgentAvatar.js.map +1 -1
- package/lib/module/agent-avatar/AgentAvatarProvider.js +60 -0
- package/lib/module/agent-avatar/AgentAvatarProvider.js.map +1 -0
- package/lib/module/agent-avatar/CharacterAvatar.js +207 -0
- package/lib/module/agent-avatar/CharacterAvatar.js.map +1 -0
- package/lib/module/agent-avatar/ProceduralAvatar.js +212 -0
- package/lib/module/agent-avatar/ProceduralAvatar.js.map +1 -0
- package/lib/module/agent-avatar/artwork.js +3 -3
- package/lib/module/agent-avatar/artwork.js.map +1 -1
- package/lib/module/agent-avatar/avatar-color.js +12 -0
- package/lib/module/agent-avatar/avatar-color.js.map +1 -0
- package/lib/module/agent-avatar/character-html.js +19 -0
- package/lib/module/agent-avatar/character-html.js.map +1 -0
- package/lib/module/agent-avatar/character-runtime-module.js +35 -0
- package/lib/module/agent-avatar/character-runtime-module.js.map +1 -0
- package/lib/module/agent-avatar/character-webview.js +14 -0
- package/lib/module/agent-avatar/character-webview.js.map +1 -0
- package/lib/module/agent-avatar/config-character.js +32 -0
- package/lib/module/agent-avatar/config-character.js.map +1 -0
- package/lib/module/agent-avatar/context.js +2 -0
- package/lib/module/agent-avatar/context.js.map +1 -1
- package/lib/module/agent-avatar/index.js +1 -0
- package/lib/module/agent-avatar/index.js.map +1 -1
- package/lib/module/agent-avatar/legacy-contours.js +53 -0
- package/lib/module/agent-avatar/legacy-contours.js.map +1 -0
- package/lib/module/agent-avatar/legacy-recipe.js +104 -0
- package/lib/module/agent-avatar/legacy-recipe.js.map +1 -0
- package/lib/module/agent-avatar/messages.js +2 -1
- package/lib/module/agent-avatar/messages.js.map +1 -1
- package/lib/module/agent-avatar/model.js +2 -0
- package/lib/module/agent-avatar/model.js.map +1 -1
- package/lib/module/agent-creator/AgentCreatorBase.js +242 -18
- package/lib/module/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/module/agent-creator/CharacterControls.js +110 -0
- package/lib/module/agent-creator/CharacterControls.js.map +1 -0
- package/lib/module/agent-creator/EmotionPicker.js +52 -19
- package/lib/module/agent-creator/EmotionPicker.js.map +1 -1
- package/lib/module/agent-creator/ShapeArc.js +58 -28
- package/lib/module/agent-creator/ShapeArc.js.map +1 -1
- package/lib/module/agent-creator/ShapeSilhouette.js +57 -0
- package/lib/module/agent-creator/ShapeSilhouette.js.map +1 -0
- package/lib/module/agent-creator/constants.js +47 -0
- package/lib/module/agent-creator/constants.js.map +1 -1
- package/lib/module/agent-creator/messages.js +9 -0
- package/lib/module/agent-creator/messages.js.map +1 -1
- package/lib/module/agent-creator/shared.js +1 -9
- package/lib/module/agent-creator/shared.js.map +1 -1
- package/lib/module/agent-thinking/AgentThinking.js +5 -63
- package/lib/module/agent-thinking/AgentThinking.js.map +1 -1
- package/lib/module/agent-thinking/ThinkingLabel.js +73 -0
- package/lib/module/agent-thinking/ThinkingLabel.js.map +1 -0
- package/lib/module/chart-cards/TokensChartCard.js +20 -5
- package/lib/module/chart-cards/TokensChartCard.js.map +1 -1
- package/lib/module/locale/translations/ar.js +11 -1
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +11 -1
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +11 -1
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +11 -1
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +11 -1
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +11 -1
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +11 -1
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +11 -1
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +11 -1
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +11 -1
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +11 -1
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +11 -1
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +11 -1
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +11 -1
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/module/multi-agent-chat/AvatarHandoff.js +3 -5
- package/lib/module/multi-agent-chat/AvatarHandoff.js.map +1 -1
- package/lib/module/multi-agent-chat/ChatAgentProfile.js +94 -0
- package/lib/module/multi-agent-chat/ChatAgentProfile.js.map +1 -0
- package/lib/module/multi-agent-chat/EditorRail.js +4 -0
- package/lib/module/multi-agent-chat/EditorRail.js.map +1 -1
- package/lib/module/multi-agent-chat/MultiAgentChatBase.js +89 -126
- package/lib/module/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
- package/lib/module/multi-agent-chat/ReplyRow.js +9 -12
- package/lib/module/multi-agent-chat/ReplyRow.js.map +1 -1
- package/lib/module/multi-agent-chat/handoff.js +4 -4
- package/lib/module/multi-agent-chat/handoff.js.map +1 -1
- package/lib/module/project-board/CreateTicketDialog.js +33 -2
- package/lib/module/project-board/CreateTicketDialog.js.map +1 -1
- package/lib/module/project-board/ProjectBoardBase.js +138 -39
- package/lib/module/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/module/project-board/TicketCornerGenieSurface.web.js +35 -29
- package/lib/module/project-board/TicketCornerGenieSurface.web.js.map +1 -1
- package/lib/module/project-board/TicketDetailDialog.js +7 -4
- package/lib/module/project-board/TicketDetailDialog.js.map +1 -1
- package/lib/module/project-board/TicketGenieSurface.js +17 -7
- package/lib/module/project-board/TicketGenieSurface.js.map +1 -1
- package/lib/module/project-board/TicketGenieSurface.web.js +1 -1
- package/lib/module/project-board/TicketGenieSurface.web.js.map +1 -1
- package/lib/module/project-board/TicketPresence.js +119 -0
- package/lib/module/project-board/TicketPresence.js.map +1 -0
- package/lib/module/project-board/TicketTokenChart.js +20 -0
- package/lib/module/project-board/TicketTokenChart.js.map +1 -0
- package/lib/module/project-board/context.js +2 -0
- package/lib/module/project-board/context.js.map +1 -1
- package/lib/module/search/Search.js +12 -3
- package/lib/module/search/Search.js.map +1 -1
- package/lib/module/sidebar/SidebarToolbar.js +29 -15
- package/lib/module/sidebar/SidebarToolbar.js.map +1 -1
- package/lib/module/text-field/TextField.js +13 -7
- package/lib/module/text-field/TextField.js.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/AgentAvatar.d.ts +2 -2
- package/lib/typescript/commonjs/agent-avatar/AgentAvatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/AgentAvatarProvider.d.ts +4 -0
- package/lib/typescript/commonjs/agent-avatar/AgentAvatarProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/CharacterAvatar.d.ts +4 -0
- package/lib/typescript/commonjs/agent-avatar/CharacterAvatar.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/ProceduralAvatar.d.ts +6 -0
- package/lib/typescript/commonjs/agent-avatar/ProceduralAvatar.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/artwork.d.ts +2 -1
- package/lib/typescript/commonjs/agent-avatar/artwork.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/avatar-color.d.ts +3 -0
- package/lib/typescript/commonjs/agent-avatar/avatar-color.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/character-html.d.ts +4 -0
- package/lib/typescript/commonjs/agent-avatar/character-html.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/character-runtime-module.d.ts +2 -0
- package/lib/typescript/commonjs/agent-avatar/character-runtime-module.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/character-webview.d.ts +24 -0
- package/lib/typescript/commonjs/agent-avatar/character-webview.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/config-character.d.ts +11 -0
- package/lib/typescript/commonjs/agent-avatar/config-character.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/context.d.ts +12 -0
- package/lib/typescript/commonjs/agent-avatar/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/index.d.ts +3 -1
- package/lib/typescript/commonjs/agent-avatar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/legacy-contours.d.ts +5 -0
- package/lib/typescript/commonjs/agent-avatar/legacy-contours.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/legacy-recipe.d.ts +40 -0
- package/lib/typescript/commonjs/agent-avatar/legacy-recipe.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-avatar/messages.d.ts +1 -0
- package/lib/typescript/commonjs/agent-avatar/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/model.d.ts +3 -0
- package/lib/typescript/commonjs/agent-avatar/model.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/types.d.ts +10 -1
- package/lib/typescript/commonjs/agent-avatar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/AgentCreatorBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/CharacterControls.d.ts +8 -0
- package/lib/typescript/commonjs/agent-creator/CharacterControls.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-creator/EmotionPicker.d.ts +12 -1
- package/lib/typescript/commonjs/agent-creator/EmotionPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/ShapeArc.d.ts +11 -2
- package/lib/typescript/commonjs/agent-creator/ShapeArc.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/ShapeSilhouette.d.ts +6 -0
- package/lib/typescript/commonjs/agent-creator/ShapeSilhouette.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-creator/constants.d.ts +44 -0
- package/lib/typescript/commonjs/agent-creator/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/context.d.ts +9 -0
- package/lib/typescript/commonjs/agent-creator/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/messages.d.ts +10 -0
- package/lib/typescript/commonjs/agent-creator/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/shared.d.ts +1 -1
- package/lib/typescript/commonjs/agent-creator/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-thinking/AgentThinking.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-thinking/ThinkingLabel.d.ts +7 -0
- package/lib/typescript/commonjs/agent-thinking/ThinkingLabel.d.ts.map +1 -0
- package/lib/typescript/commonjs/chart-cards/TokensChartCard.d.ts +3 -1
- package/lib/typescript/commonjs/chart-cards/TokensChartCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/AvatarHandoff.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/ChatAgentProfile.d.ts +11 -0
- package/lib/typescript/commonjs/multi-agent-chat/ChatAgentProfile.d.ts.map +1 -0
- package/lib/typescript/commonjs/multi-agent-chat/EditorRail.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/ReplyRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/handoff.d.ts +2 -2
- package/lib/typescript/commonjs/multi-agent-chat/handoff.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/CreateTicketDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketDetailDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketGenieSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketPresence.d.ts +17 -0
- package/lib/typescript/commonjs/project-board/TicketPresence.d.ts.map +1 -0
- package/lib/typescript/commonjs/project-board/TicketTokenChart.d.ts +5 -0
- package/lib/typescript/commonjs/project-board/TicketTokenChart.d.ts.map +1 -0
- package/lib/typescript/commonjs/project-board/context.d.ts +2 -0
- package/lib/typescript/commonjs/project-board/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/search/Search.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts.map +1 -1
- package/lib/typescript/commonjs/text-field/TextField.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/AgentAvatar.d.ts +2 -2
- package/lib/typescript/module/agent-avatar/AgentAvatar.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/AgentAvatarProvider.d.ts +4 -0
- package/lib/typescript/module/agent-avatar/AgentAvatarProvider.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/CharacterAvatar.d.ts +4 -0
- package/lib/typescript/module/agent-avatar/CharacterAvatar.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/ProceduralAvatar.d.ts +6 -0
- package/lib/typescript/module/agent-avatar/ProceduralAvatar.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/artwork.d.ts +2 -1
- package/lib/typescript/module/agent-avatar/artwork.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/avatar-color.d.ts +3 -0
- package/lib/typescript/module/agent-avatar/avatar-color.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/character-html.d.ts +4 -0
- package/lib/typescript/module/agent-avatar/character-html.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/character-runtime-module.d.ts +2 -0
- package/lib/typescript/module/agent-avatar/character-runtime-module.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/character-webview.d.ts +24 -0
- package/lib/typescript/module/agent-avatar/character-webview.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/config-character.d.ts +11 -0
- package/lib/typescript/module/agent-avatar/config-character.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/context.d.ts +12 -0
- package/lib/typescript/module/agent-avatar/context.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/index.d.ts +3 -1
- package/lib/typescript/module/agent-avatar/index.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/legacy-contours.d.ts +5 -0
- package/lib/typescript/module/agent-avatar/legacy-contours.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/legacy-recipe.d.ts +40 -0
- package/lib/typescript/module/agent-avatar/legacy-recipe.d.ts.map +1 -0
- package/lib/typescript/module/agent-avatar/messages.d.ts +1 -0
- package/lib/typescript/module/agent-avatar/messages.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/model.d.ts +3 -0
- package/lib/typescript/module/agent-avatar/model.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/types.d.ts +10 -1
- package/lib/typescript/module/agent-avatar/types.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/AgentCreatorBase.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/CharacterControls.d.ts +8 -0
- package/lib/typescript/module/agent-creator/CharacterControls.d.ts.map +1 -0
- package/lib/typescript/module/agent-creator/EmotionPicker.d.ts +12 -1
- package/lib/typescript/module/agent-creator/EmotionPicker.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/ShapeArc.d.ts +11 -2
- package/lib/typescript/module/agent-creator/ShapeArc.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/ShapeSilhouette.d.ts +6 -0
- package/lib/typescript/module/agent-creator/ShapeSilhouette.d.ts.map +1 -0
- package/lib/typescript/module/agent-creator/constants.d.ts +44 -0
- package/lib/typescript/module/agent-creator/constants.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/context.d.ts +9 -0
- package/lib/typescript/module/agent-creator/context.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/messages.d.ts +10 -0
- package/lib/typescript/module/agent-creator/messages.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/shared.d.ts +1 -1
- package/lib/typescript/module/agent-creator/shared.d.ts.map +1 -1
- package/lib/typescript/module/agent-thinking/AgentThinking.d.ts.map +1 -1
- package/lib/typescript/module/agent-thinking/ThinkingLabel.d.ts +7 -0
- package/lib/typescript/module/agent-thinking/ThinkingLabel.d.ts.map +1 -0
- package/lib/typescript/module/chart-cards/TokensChartCard.d.ts +3 -1
- package/lib/typescript/module/chart-cards/TokensChartCard.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/AvatarHandoff.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/ChatAgentProfile.d.ts +11 -0
- package/lib/typescript/module/multi-agent-chat/ChatAgentProfile.d.ts.map +1 -0
- package/lib/typescript/module/multi-agent-chat/EditorRail.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/ReplyRow.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/handoff.d.ts +2 -2
- package/lib/typescript/module/multi-agent-chat/handoff.d.ts.map +1 -1
- package/lib/typescript/module/project-board/CreateTicketDialog.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketDetailDialog.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketGenieSurface.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketPresence.d.ts +17 -0
- package/lib/typescript/module/project-board/TicketPresence.d.ts.map +1 -0
- package/lib/typescript/module/project-board/TicketTokenChart.d.ts +5 -0
- package/lib/typescript/module/project-board/TicketTokenChart.d.ts.map +1 -0
- package/lib/typescript/module/project-board/context.d.ts +2 -0
- package/lib/typescript/module/project-board/context.d.ts.map +1 -1
- package/lib/typescript/module/search/Search.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/SidebarToolbar.d.ts.map +1 -1
- package/lib/typescript/module/text-field/TextField.d.ts.map +1 -1
- package/package.json +8 -3
- package/src/agent-avatar/AgentAvatar.tsx +16 -296
- package/src/agent-avatar/AgentAvatarProvider.tsx +72 -0
- package/src/agent-avatar/CharacterAvatar.tsx +255 -0
- package/src/agent-avatar/ProceduralAvatar.tsx +303 -0
- package/src/agent-avatar/artwork.ts +3 -3
- package/src/agent-avatar/avatar-color.ts +17 -0
- package/src/agent-avatar/character-html.ts +21 -0
- package/src/agent-avatar/character-runtime-module.ts +37 -0
- package/src/agent-avatar/character-webview.ts +24 -0
- package/src/agent-avatar/config-character.ts +40 -0
- package/src/agent-avatar/context.ts +13 -0
- package/src/agent-avatar/index.ts +4 -1
- package/src/agent-avatar/legacy-contours.ts +76 -0
- package/src/agent-avatar/legacy-recipe.ts +123 -0
- package/src/agent-avatar/messages.ts +1 -0
- package/src/agent-avatar/model.ts +5 -0
- package/src/agent-avatar/types.ts +12 -1
- package/src/agent-creator/AgentCreatorBase.tsx +329 -38
- package/src/agent-creator/CharacterControls.tsx +146 -0
- package/src/agent-creator/EmotionPicker.tsx +43 -21
- package/src/agent-creator/ShapeArc.tsx +83 -29
- package/src/agent-creator/ShapeSilhouette.tsx +65 -0
- package/src/agent-creator/constants.ts +30 -0
- package/src/agent-creator/messages.ts +19 -0
- package/src/agent-creator/shared.ts +1 -15
- package/src/agent-thinking/AgentThinking.tsx +7 -70
- package/src/agent-thinking/ThinkingLabel.tsx +74 -0
- package/src/chart-cards/TokensChartCard.tsx +10 -6
- package/src/locale/translations/ar.ts +10 -1
- package/src/locale/translations/bn.ts +10 -1
- package/src/locale/translations/ca.ts +10 -1
- package/src/locale/translations/de.ts +10 -1
- package/src/locale/translations/es.ts +10 -1
- package/src/locale/translations/fr.ts +10 -1
- package/src/locale/translations/hi.ts +10 -1
- package/src/locale/translations/id.ts +10 -1
- package/src/locale/translations/it.ts +10 -1
- package/src/locale/translations/ja.ts +10 -1
- package/src/locale/translations/pt.ts +10 -1
- package/src/locale/translations/ru.ts +10 -1
- package/src/locale/translations/tr.ts +10 -1
- package/src/locale/translations/zh.ts +10 -1
- package/src/multi-agent-chat/AvatarHandoff.tsx +2 -5
- package/src/multi-agent-chat/ChatAgentProfile.tsx +116 -0
- package/src/multi-agent-chat/EditorRail.tsx +2 -0
- package/src/multi-agent-chat/MultiAgentChatBase.tsx +123 -175
- package/src/multi-agent-chat/ReplyRow.tsx +10 -9
- package/src/multi-agent-chat/handoff.ts +4 -4
- package/src/project-board/CreateTicketDialog.tsx +28 -4
- package/src/project-board/ProjectBoardBase.tsx +115 -21
- package/src/project-board/TicketCornerGenieSurface.web.tsx +11 -6
- package/src/project-board/TicketDetailDialog.tsx +5 -4
- package/src/project-board/TicketGenieSurface.tsx +9 -0
- package/src/project-board/TicketGenieSurface.web.tsx +1 -1
- package/src/project-board/TicketPresence.tsx +137 -0
- package/src/project-board/TicketTokenChart.tsx +14 -0
- package/src/project-board/context.ts +2 -0
- package/src/search/Search.tsx +6 -5
- package/src/sidebar/SidebarToolbar.tsx +27 -15
- package/src/text-field/TextField.tsx +12 -7
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { avatarHex } from './avatar-color';
|
|
2
|
+
import { legacyContours } from './legacy-contours';
|
|
3
|
+
import type { AvatarConfig } from './model';
|
|
4
|
+
import type { AvatarCharacterConfig } from './config-character';
|
|
5
|
+
|
|
6
|
+
type Point = [number, number];
|
|
7
|
+
export type LegacyRecipe = {
|
|
8
|
+
/** Absent when the original catalog already provides this shape. */
|
|
9
|
+
points?: Point[];
|
|
10
|
+
shape?: string;
|
|
11
|
+
eyes: string;
|
|
12
|
+
selections?: Pick<
|
|
13
|
+
NonNullable<AvatarCharacterConfig['selections']>,
|
|
14
|
+
'eyewear' | 'accessory'
|
|
15
|
+
>;
|
|
16
|
+
patch: { bodyColor: string };
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** Saved unsupported artwork stays readable without pretending it was migrated. */
|
|
20
|
+
export function legacyRecipeUnsupported(config: AvatarConfig): boolean {
|
|
21
|
+
return (
|
|
22
|
+
config.family === 'alien' || config.family === 'mascot' || !config.face
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Reuse actual beta geometry for equivalent shapes, per the unified catalog. */
|
|
27
|
+
export function legacyNativeShape(config: AvatarConfig): string | undefined {
|
|
28
|
+
const shared: Partial<
|
|
29
|
+
Record<AvatarConfig['shape'] | AvatarConfig['foldShape'], string>
|
|
30
|
+
> = {
|
|
31
|
+
circle: 'circle',
|
|
32
|
+
triangle: 'rounded_triangle',
|
|
33
|
+
flower: 'six_lobed_flower',
|
|
34
|
+
diamond: 'rounded_diamond',
|
|
35
|
+
heart: 'heart',
|
|
36
|
+
};
|
|
37
|
+
return config.family === 'fold'
|
|
38
|
+
? shared[config.foldShape]
|
|
39
|
+
: config.family === 'blob'
|
|
40
|
+
? shared[config.shape]
|
|
41
|
+
: undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Radial union of the existing paper front/back or blob contour, starting +X.
|
|
45
|
+
* The fur/body deformation needs a counter-clockwise ring, not winding-dependent
|
|
46
|
+
* path vertices. Every ray takes the outermost segment intersection.
|
|
47
|
+
*/
|
|
48
|
+
export function radialContour(polygons: Point[][], samples = 256): Point[] {
|
|
49
|
+
if (!Number.isInteger(samples) || samples < 16 || samples > 2048)
|
|
50
|
+
throw new Error('Invalid contour sample count');
|
|
51
|
+
return Array.from({ length: samples }, (_, i) => {
|
|
52
|
+
const angle = (i * Math.PI * 2) / samples;
|
|
53
|
+
const dx = Math.cos(angle),
|
|
54
|
+
dy = Math.sin(angle);
|
|
55
|
+
let radius = 0;
|
|
56
|
+
for (const polygon of polygons)
|
|
57
|
+
for (let j = 0; j < polygon.length; j++) {
|
|
58
|
+
const [ax, ay] = polygon[j]!;
|
|
59
|
+
const [bx, by] = polygon[(j + 1) % polygon.length]!;
|
|
60
|
+
const ex = bx - ax,
|
|
61
|
+
ey = by - ay,
|
|
62
|
+
denominator = dx * ey - dy * ex;
|
|
63
|
+
if (Math.abs(denominator) < 1e-10) continue;
|
|
64
|
+
const distance = (ax * ey - ay * ex) / denominator;
|
|
65
|
+
const segment = (ax * dy - ay * dx) / denominator;
|
|
66
|
+
if (distance > radius && segment >= -1e-8 && segment <= 1 + 1e-8)
|
|
67
|
+
radius = distance;
|
|
68
|
+
}
|
|
69
|
+
if (!Number.isFinite(radius) || radius <= 0)
|
|
70
|
+
throw new Error('Legacy contour does not enclose its origin');
|
|
71
|
+
return [radius * dx, radius * dy];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Shared capability identity for the editor and the legacy engine adapter. */
|
|
76
|
+
export function legacyCharacterRecipe(config: AvatarConfig) {
|
|
77
|
+
const customization =
|
|
78
|
+
config.character?.preset === 'bloom' ? config.character : undefined;
|
|
79
|
+
return {
|
|
80
|
+
preset: 'legacy',
|
|
81
|
+
selections: {
|
|
82
|
+
shape: legacyNativeShape(config) ?? 'circle',
|
|
83
|
+
eyes: customization?.selections?.eyes ?? 'oval',
|
|
84
|
+
...(customization?.selections?.eyewear
|
|
85
|
+
? { eyewear: customization.selections.eyewear }
|
|
86
|
+
: {}),
|
|
87
|
+
...(customization?.selections?.accessory
|
|
88
|
+
? { accessory: customization.selections.accessory }
|
|
89
|
+
: {}),
|
|
90
|
+
},
|
|
91
|
+
bodyColor: customization?.bodyColor ?? avatarHex(config),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Legacy recipes contribute their body only; eyes are the original 3D catalog.
|
|
96
|
+
* Historical expression, spacing and tilt fields remain readable but no longer
|
|
97
|
+
* alter the migrated face. The engine owns eye geometry and animation.
|
|
98
|
+
*/
|
|
99
|
+
export function legacyRecipe(
|
|
100
|
+
config: AvatarConfig,
|
|
101
|
+
samples = 256,
|
|
102
|
+
): LegacyRecipe {
|
|
103
|
+
if (legacyRecipeUnsupported(config))
|
|
104
|
+
throw new Error('Unsupported legacy 3D recipe');
|
|
105
|
+
const shape = legacyNativeShape(config);
|
|
106
|
+
const recipe = legacyCharacterRecipe(config);
|
|
107
|
+
const { eyewear, accessory } = recipe.selections;
|
|
108
|
+
return {
|
|
109
|
+
...(shape
|
|
110
|
+
? { shape }
|
|
111
|
+
: { points: radialContour(legacyContours(config), samples) }),
|
|
112
|
+
eyes: recipe.selections.eyes,
|
|
113
|
+
...(eyewear || accessory
|
|
114
|
+
? {
|
|
115
|
+
selections: {
|
|
116
|
+
...(eyewear ? { eyewear } : {}),
|
|
117
|
+
...(accessory ? { accessory } : {}),
|
|
118
|
+
},
|
|
119
|
+
}
|
|
120
|
+
: {}),
|
|
121
|
+
patch: { bodyColor: recipe.bodyColor },
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { parseCharacterConfig, type AvatarCharacterConfig } from './config-character';
|
|
2
|
+
|
|
1
3
|
export const SHAPES = [
|
|
2
4
|
'pebble',
|
|
3
5
|
'circle',
|
|
@@ -65,6 +67,8 @@ export const LOOKS = [
|
|
|
65
67
|
] as const;
|
|
66
68
|
|
|
67
69
|
export type AvatarConfig = {
|
|
70
|
+
/** Optional compiled character renderer; the procedural recipe remains the fallback. */
|
|
71
|
+
character?: AvatarCharacterConfig;
|
|
68
72
|
family: AvatarFamily;
|
|
69
73
|
foldShape: (typeof FOLD_SHAPES)[number];
|
|
70
74
|
foldDirection: (typeof FOLD_DIRECTIONS)[number];
|
|
@@ -568,6 +572,7 @@ export function parsePreset(value: unknown): AvatarPreset {
|
|
|
568
572
|
if (!LOOKS.includes(c.lookAt as AvatarConfig['lookAt']))
|
|
569
573
|
throw new Error('Unknown gaze direction.');
|
|
570
574
|
config.lookAt = c.lookAt as AvatarConfig['lookAt'];
|
|
575
|
+
if (c.character !== undefined) config.character = parseCharacterConfig(c.character);
|
|
571
576
|
return {
|
|
572
577
|
name: p.name.slice(0, 48) || 'Untitled',
|
|
573
578
|
description: 'Your saved direction',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { AvatarConfig } from './model';
|
|
3
4
|
|
|
@@ -7,9 +8,12 @@ export type AgentAvatarProps = {
|
|
|
7
8
|
paused?: boolean;
|
|
8
9
|
label?: string;
|
|
9
10
|
locale?: string;
|
|
10
|
-
/**
|
|
11
|
+
/** Enables pointer and touch reactions when a 3D runtime provider is available. */
|
|
11
12
|
interactive?: boolean;
|
|
13
|
+
/** Uses a cached still portrait for optional character previews, avoiding a live renderer per thumbnail. */
|
|
12
14
|
portrait?: boolean;
|
|
15
|
+
/** Replays the supported 3D reaction (signature or migrated silhouette wave) when the key changes. */
|
|
16
|
+
reactionKey?: number;
|
|
13
17
|
entranceKey?: number;
|
|
14
18
|
workingKey?: number;
|
|
15
19
|
workingCycles?: number;
|
|
@@ -19,3 +23,10 @@ export type AgentAvatarProps = {
|
|
|
19
23
|
testID?: string;
|
|
20
24
|
};
|
|
21
25
|
export type AvatarProps = AgentAvatarProps;
|
|
26
|
+
|
|
27
|
+
export type { AvatarCharacterConfig, AvatarCharacterCategory } from './config-character';
|
|
28
|
+
|
|
29
|
+
export type AgentAvatarProviderProps = {
|
|
30
|
+
runtimeUrl: string;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { useContext, useState } from 'react';
|
|
1
2
|
import { Platform } from 'react-native';
|
|
2
3
|
import { AgentAvatar, type AvatarConfig } from '../agent-avatar';
|
|
4
|
+
import type { AvatarCharacterCategory } from '../agent-avatar/config-character';
|
|
5
|
+
import { CharacterRuntimeContext } from '../agent-avatar/context';
|
|
6
|
+
import {
|
|
7
|
+
legacyCharacterRecipe,
|
|
8
|
+
legacyNativeShape,
|
|
9
|
+
} from '../agent-avatar/legacy-recipe';
|
|
10
|
+
import { Button } from '../button/Button';
|
|
3
11
|
import { CloseButton } from '../button/CloseButton';
|
|
4
12
|
import { useDirectionProps } from '../hooks/use-is-rtl';
|
|
5
13
|
import { StyledPressable, StyledView } from '../styles/styled-primitives';
|
|
@@ -8,12 +16,17 @@ import { Textarea } from '../textarea';
|
|
|
8
16
|
import { useTheme } from '../theme/use-theme';
|
|
9
17
|
import { Text } from '../typography';
|
|
10
18
|
import { AgentPreferencesPanel } from './AgentPreferencesPanel';
|
|
19
|
+
import { CharacterControls } from './CharacterControls';
|
|
11
20
|
import { CustomColorPicker } from './CustomColorPicker';
|
|
12
21
|
import { EmotionPicker } from './EmotionPicker';
|
|
13
22
|
import { GlossArt } from './GlossArt';
|
|
14
23
|
import { ScrollSurface } from './ScrollSurface';
|
|
15
24
|
import { ShapeArc } from './ShapeArc';
|
|
16
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
AVATAR_COLORS,
|
|
27
|
+
CHARACTER_COLORS,
|
|
28
|
+
CHARACTER_OPTIONS,
|
|
29
|
+
} from './constants';
|
|
17
30
|
import {
|
|
18
31
|
AgentCreatorCopyContext,
|
|
19
32
|
useAgentCreatorBindings,
|
|
@@ -30,8 +43,190 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
30
43
|
const { colors } = useTheme();
|
|
31
44
|
const { Popover, PopoverTrigger, PopoverContent } = useAgentCreatorBindings();
|
|
32
45
|
const c = agent.avatar;
|
|
33
|
-
const
|
|
34
|
-
|
|
46
|
+
const [reactionKey, setReactionKey] = useState(0);
|
|
47
|
+
const [workingKey, setWorkingKey] = useState(0);
|
|
48
|
+
const runtime = useContext(CharacterRuntimeContext);
|
|
49
|
+
const { runtimeUrl } = runtime;
|
|
50
|
+
const beta = Boolean(c.character && c.character.preset !== 'bloom');
|
|
51
|
+
const nativeShape = legacyNativeShape(c);
|
|
52
|
+
const key = JSON.stringify(beta ? c.character : legacyCharacterRecipe(c));
|
|
53
|
+
const capabilities =
|
|
54
|
+
runtime.capabilitiesByKey?.get(key) ??
|
|
55
|
+
(runtime.capabilities?.key === key ? runtime.capabilities : undefined);
|
|
56
|
+
const betaColor =
|
|
57
|
+
capabilities?.selected.color ?? c.character?.selections?.color;
|
|
58
|
+
const customColorValue = beta
|
|
59
|
+
? (c.character?.bodyColor ??
|
|
60
|
+
CHARACTER_COLORS[betaColor as keyof typeof CHARACTER_COLORS] ??
|
|
61
|
+
avatarHex(c))
|
|
62
|
+
: (c.character?.bodyColor ?? avatarHex(c));
|
|
63
|
+
const selectedEyes =
|
|
64
|
+
capabilities?.selected.eyes ?? c.character?.selections?.eyes ?? 'oval';
|
|
65
|
+
const characterConfig = (
|
|
66
|
+
category: AvatarCharacterCategory,
|
|
67
|
+
id: string,
|
|
68
|
+
): AvatarConfig => {
|
|
69
|
+
if (
|
|
70
|
+
!beta &&
|
|
71
|
+
(category === 'eyes' ||
|
|
72
|
+
category === 'eyewear' ||
|
|
73
|
+
category === 'accessory')
|
|
74
|
+
)
|
|
75
|
+
return {
|
|
76
|
+
...c,
|
|
77
|
+
character: {
|
|
78
|
+
...c.character,
|
|
79
|
+
preset: 'bloom',
|
|
80
|
+
selections: { ...c.character?.selections, [category]: id },
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
const character = beta
|
|
84
|
+
? c.character!
|
|
85
|
+
: {
|
|
86
|
+
preset: 'blue_beret',
|
|
87
|
+
bodyColor: customColorValue,
|
|
88
|
+
selections: {
|
|
89
|
+
eyewear:
|
|
90
|
+
c.character?.selections?.eyewear ??
|
|
91
|
+
capabilities?.selected.eyewear ??
|
|
92
|
+
'none',
|
|
93
|
+
accessory:
|
|
94
|
+
c.character?.selections?.accessory ??
|
|
95
|
+
capabilities?.selected.accessory ??
|
|
96
|
+
'none',
|
|
97
|
+
eyes: selectedEyes,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
const selections = { ...character.selections, [category]: id };
|
|
101
|
+
if (category === 'shape') delete selections.eyes;
|
|
102
|
+
const next = { ...character, selections };
|
|
103
|
+
if (category === 'color') delete next.bodyColor;
|
|
104
|
+
return { ...c, character: next };
|
|
105
|
+
};
|
|
106
|
+
const selectCharacter = (category: AvatarCharacterCategory, id: string) =>
|
|
107
|
+
onChange({ ...agent, avatar: characterConfig(category, id) });
|
|
108
|
+
const thumbnailBase = runtimeUrl
|
|
109
|
+
? runtimeUrl.slice(0, runtimeUrl.lastIndexOf('/') + 1)
|
|
110
|
+
: '';
|
|
111
|
+
const eyeBackground = customColorValue;
|
|
112
|
+
const migratedShapes = [
|
|
113
|
+
...(['slender', 'pocket', 'petal', 'star', 'cloud', 'shield'] as const).map(
|
|
114
|
+
(shape) => ({
|
|
115
|
+
family: 'fold' as const,
|
|
116
|
+
shape,
|
|
117
|
+
title: messages.shapes[shape],
|
|
118
|
+
}),
|
|
119
|
+
),
|
|
120
|
+
...(
|
|
121
|
+
[
|
|
122
|
+
['pebble', 'Pebble'],
|
|
123
|
+
['squircle', 'Squircle'],
|
|
124
|
+
] as const
|
|
125
|
+
).map(([shape, title]) => ({
|
|
126
|
+
family: 'blob' as const,
|
|
127
|
+
shape,
|
|
128
|
+
title: messages.characterOption('shape', shape, title),
|
|
129
|
+
})),
|
|
130
|
+
];
|
|
131
|
+
const migratedConfig = (
|
|
132
|
+
family: 'fold' | 'blob',
|
|
133
|
+
shape: string,
|
|
134
|
+
): AvatarConfig => {
|
|
135
|
+
const { character: _character, ...existing } = c;
|
|
136
|
+
const color = hexAppearance(customColorValue);
|
|
137
|
+
return {
|
|
138
|
+
...existing,
|
|
139
|
+
...color,
|
|
140
|
+
lightEyes: beta ? false : c.lightEyes,
|
|
141
|
+
family,
|
|
142
|
+
...(family === 'fold'
|
|
143
|
+
? { foldShape: shape as AvatarConfig['foldShape'] }
|
|
144
|
+
: { shape: shape as AvatarConfig['shape'] }),
|
|
145
|
+
...(runtimeUrl
|
|
146
|
+
? {
|
|
147
|
+
character: {
|
|
148
|
+
preset: 'bloom',
|
|
149
|
+
selections: {
|
|
150
|
+
eyes: selectedEyes,
|
|
151
|
+
...((capabilities?.selected.eyewear ??
|
|
152
|
+
c.character?.selections?.eyewear)
|
|
153
|
+
? {
|
|
154
|
+
eyewear:
|
|
155
|
+
capabilities?.selected.eyewear ??
|
|
156
|
+
c.character?.selections?.eyewear,
|
|
157
|
+
}
|
|
158
|
+
: {}),
|
|
159
|
+
...((capabilities?.selected.accessory ??
|
|
160
|
+
c.character?.selections?.accessory)
|
|
161
|
+
? {
|
|
162
|
+
accessory:
|
|
163
|
+
capabilities?.selected.accessory ??
|
|
164
|
+
c.character?.selections?.accessory,
|
|
165
|
+
}
|
|
166
|
+
: {}),
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
: {}),
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const shapeChoices = runtimeUrl
|
|
174
|
+
? [
|
|
175
|
+
...CHARACTER_OPTIONS.shape.map(([id, title]) => ({
|
|
176
|
+
id,
|
|
177
|
+
label: messages.characterOption('shape', id, title),
|
|
178
|
+
config: characterConfig('shape', id),
|
|
179
|
+
thumbnail: `${thumbnailBase}thumbnails/shapes/${id}.png`,
|
|
180
|
+
})),
|
|
181
|
+
...migratedShapes.map(({ family, shape, title }) => ({
|
|
182
|
+
id: `legacy:${family}:${shape}`,
|
|
183
|
+
label: title,
|
|
184
|
+
config: migratedConfig(family, shape),
|
|
185
|
+
})),
|
|
186
|
+
]
|
|
187
|
+
: undefined;
|
|
188
|
+
const shapeValue = beta
|
|
189
|
+
? (capabilities?.selected.shape ?? c.character?.selections?.shape)
|
|
190
|
+
: (nativeShape ??
|
|
191
|
+
`legacy:${c.family}:${c.family === 'fold' ? c.foldShape : c.shape}`);
|
|
192
|
+
const selectShape = (id: string) => {
|
|
193
|
+
if (id.startsWith('legacy:')) {
|
|
194
|
+
const [, family, shape] = id.split(':');
|
|
195
|
+
onChange({
|
|
196
|
+
...agent,
|
|
197
|
+
avatar: migratedConfig(family as 'fold' | 'blob', shape!),
|
|
198
|
+
});
|
|
199
|
+
} else selectCharacter('shape', id);
|
|
200
|
+
};
|
|
201
|
+
const eyeChoices = runtimeUrl
|
|
202
|
+
? CHARACTER_OPTIONS.eyes.map(([id, title]) => ({
|
|
203
|
+
id,
|
|
204
|
+
label: messages.characterOption('eyes', id, title),
|
|
205
|
+
config: characterConfig('eyes', id),
|
|
206
|
+
thumbnail: `${thumbnailBase}thumbnails/eyes/${id}.png`,
|
|
207
|
+
disabled:
|
|
208
|
+
!capabilities || capabilities.available[`eyes:${id}`] === false,
|
|
209
|
+
}))
|
|
210
|
+
: undefined;
|
|
211
|
+
const appearance = (patch: Partial<AvatarConfig>) => {
|
|
212
|
+
const { character: _character, ...procedural } = c;
|
|
213
|
+
const character =
|
|
214
|
+
c.character?.preset === 'bloom' ? { ...c.character } : undefined;
|
|
215
|
+
if (
|
|
216
|
+
character &&
|
|
217
|
+
('hue' in patch || 'saturation' in patch || 'lightness' in patch)
|
|
218
|
+
)
|
|
219
|
+
delete character.bodyColor;
|
|
220
|
+
onChange({
|
|
221
|
+
...agent,
|
|
222
|
+
avatar: {
|
|
223
|
+
...procedural,
|
|
224
|
+
...patch,
|
|
225
|
+
...(character ? { character } : {}),
|
|
226
|
+
lookAt: 'wander',
|
|
227
|
+
},
|
|
228
|
+
});
|
|
229
|
+
};
|
|
35
230
|
return (
|
|
36
231
|
<AgentCreatorCopyContext.Provider
|
|
37
232
|
value={{ locale: props.locale, labels: props.labels }}
|
|
@@ -100,11 +295,17 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
100
295
|
key={agent.id}
|
|
101
296
|
config={c}
|
|
102
297
|
onChange={(eyes) => appearance({ eyes })}
|
|
298
|
+
choices={eyeChoices}
|
|
299
|
+
backgroundColor={eyeBackground}
|
|
300
|
+
value={runtimeUrl ? selectedEyes : undefined}
|
|
301
|
+
onSelect={
|
|
302
|
+
runtimeUrl ? (id) => selectCharacter('eyes', id) : undefined
|
|
303
|
+
}
|
|
103
304
|
/>
|
|
104
305
|
</StyledView>
|
|
105
306
|
<StyledView
|
|
106
|
-
pointerEvents=
|
|
107
|
-
className=
|
|
307
|
+
pointerEvents={runtimeUrl ? 'auto' : 'none'}
|
|
308
|
+
className={`${runtimeUrl ? 'pointer-events-auto' : 'pointer-events-none'} absolute left-1/2 top-[83px] -translate-x-1/2`}
|
|
108
309
|
style={{
|
|
109
310
|
position: 'absolute',
|
|
110
311
|
left: '50%',
|
|
@@ -116,6 +317,9 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
116
317
|
<AgentAvatar
|
|
117
318
|
config={{ ...c, lookAt: 'wander' }}
|
|
118
319
|
size={162}
|
|
320
|
+
interactive={Boolean(runtimeUrl)}
|
|
321
|
+
reactionKey={reactionKey}
|
|
322
|
+
workingKey={workingKey}
|
|
119
323
|
label={messages.livePreview(agent.name || messages.newAgent)}
|
|
120
324
|
/>
|
|
121
325
|
</StyledView>
|
|
@@ -127,10 +331,42 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
127
331
|
<ShapeArc
|
|
128
332
|
key={agent.id}
|
|
129
333
|
config={c}
|
|
130
|
-
onChange={(foldShape) =>
|
|
334
|
+
onChange={(foldShape) =>
|
|
335
|
+
appearance({
|
|
336
|
+
foldShape,
|
|
337
|
+
...(c.family === 'alien'
|
|
338
|
+
? { family: 'fold' as const }
|
|
339
|
+
: {}),
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
choices={shapeChoices}
|
|
343
|
+
value={shapeChoices ? shapeValue : undefined}
|
|
344
|
+
onSelect={shapeChoices ? selectShape : undefined}
|
|
131
345
|
/>
|
|
132
346
|
</StyledView>
|
|
133
347
|
</StyledView>
|
|
348
|
+
{runtimeUrl && (
|
|
349
|
+
<StyledView className="mt-2 flex-row justify-center gap-2">
|
|
350
|
+
<Button
|
|
351
|
+
size="xs"
|
|
352
|
+
onPress={() => setReactionKey((key) => key + 1)}
|
|
353
|
+
>
|
|
354
|
+
{messages.reaction}
|
|
355
|
+
</Button>
|
|
356
|
+
<Button size="xs" onPress={() => setWorkingKey((key) => key + 1)}>
|
|
357
|
+
{messages.working}
|
|
358
|
+
</Button>
|
|
359
|
+
</StyledView>
|
|
360
|
+
)}
|
|
361
|
+
<CharacterControls
|
|
362
|
+
character={c.character ?? { preset: 'bloom' }}
|
|
363
|
+
capabilitiesKey={key}
|
|
364
|
+
onChange={(character) => {
|
|
365
|
+
if (character)
|
|
366
|
+
onChange({ ...agent, avatar: { ...c, character } });
|
|
367
|
+
else appearance({});
|
|
368
|
+
}}
|
|
369
|
+
/>
|
|
134
370
|
<StyledView className="mt-[15px] flex flex-row justify-center">
|
|
135
371
|
<StyledView
|
|
136
372
|
role="group"
|
|
@@ -142,38 +378,79 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
142
378
|
boxShadow: '0 1px 2px rgba(0,0,0,.05)',
|
|
143
379
|
}}
|
|
144
380
|
>
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
381
|
+
{!beta &&
|
|
382
|
+
AVATAR_COLORS.map(([hue, saturation, name, center, edge]) => {
|
|
383
|
+
const active =
|
|
384
|
+
c.hue === hue &&
|
|
385
|
+
c.saturation === saturation &&
|
|
386
|
+
c.lightness === undefined;
|
|
387
|
+
return (
|
|
388
|
+
<StyledPressable
|
|
389
|
+
key={name}
|
|
390
|
+
accessibilityRole="button"
|
|
391
|
+
accessibilityLabel={messages.avatarColorLabel(
|
|
392
|
+
messages.colors[name],
|
|
393
|
+
)}
|
|
394
|
+
accessibilityState={{ selected: active }}
|
|
395
|
+
aria-pressed={active}
|
|
396
|
+
onPress={() =>
|
|
397
|
+
appearance({
|
|
398
|
+
hue,
|
|
399
|
+
saturation,
|
|
400
|
+
lightness: undefined,
|
|
401
|
+
lightEyes: false,
|
|
402
|
+
})
|
|
403
|
+
}
|
|
404
|
+
className="relative shrink-0 cursor-pointer overflow-hidden rounded-full transition-transform duration-150 ease-out hover:scale-110 outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-2 size-[26px]"
|
|
405
|
+
>
|
|
406
|
+
<GlossArt center={center} edge={edge} active={active} />
|
|
407
|
+
</StyledPressable>
|
|
408
|
+
);
|
|
409
|
+
})}
|
|
410
|
+
{beta &&
|
|
411
|
+
CHARACTER_OPTIONS.color.map(([id, title]) => {
|
|
412
|
+
const active =
|
|
413
|
+
!c.character?.bodyColor &&
|
|
414
|
+
capabilities?.selected.color === id;
|
|
415
|
+
const hex = CHARACTER_COLORS[id];
|
|
416
|
+
const disabled =
|
|
417
|
+
!capabilities ||
|
|
418
|
+
capabilities.available[`color:${id}`] === false;
|
|
419
|
+
return (
|
|
420
|
+
<StyledPressable
|
|
421
|
+
key={id}
|
|
422
|
+
accessibilityRole="button"
|
|
423
|
+
accessibilityLabel={messages.avatarColorLabel(
|
|
424
|
+
messages.characterOption('color', id, title),
|
|
425
|
+
)}
|
|
426
|
+
aria-pressed={active}
|
|
427
|
+
aria-disabled={disabled}
|
|
428
|
+
accessibilityState={{ selected: active, disabled }}
|
|
429
|
+
disabled={disabled}
|
|
430
|
+
onPress={() => selectCharacter('color', id)}
|
|
431
|
+
className="relative shrink-0 cursor-pointer overflow-hidden rounded-full transition-transform duration-150 ease-out hover:scale-110 outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-2 size-[26px]"
|
|
432
|
+
>
|
|
433
|
+
<GlossArt center={hex} edge={hex} active={active} />
|
|
434
|
+
</StyledPressable>
|
|
435
|
+
);
|
|
436
|
+
})}
|
|
437
|
+
<Popover>
|
|
438
|
+
<PopoverTrigger asChild label={messages.customColor}>
|
|
151
439
|
<StyledPressable
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
accessibilityLabel={messages.avatarColorLabel(
|
|
155
|
-
messages.colors[name],
|
|
156
|
-
)}
|
|
157
|
-
accessibilityState={{ selected: active }}
|
|
158
|
-
aria-pressed={active}
|
|
159
|
-
onPress={() =>
|
|
160
|
-
appearance({
|
|
161
|
-
hue,
|
|
162
|
-
saturation,
|
|
163
|
-
lightness: undefined,
|
|
164
|
-
lightEyes: false,
|
|
165
|
-
})
|
|
440
|
+
aria-pressed={
|
|
441
|
+
beta ? Boolean(c.character?.bodyColor) : undefined
|
|
166
442
|
}
|
|
167
|
-
|
|
443
|
+
accessibilityState={{
|
|
444
|
+
selected: beta && Boolean(c.character?.bodyColor),
|
|
445
|
+
}}
|
|
446
|
+
className="relative size-[26px] shrink-0 overflow-hidden rounded-full"
|
|
168
447
|
>
|
|
169
|
-
<GlossArt
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<StyledPressable className="relative size-[26px] shrink-0 overflow-hidden rounded-full">
|
|
176
|
-
<GlossArt rainbow />
|
|
448
|
+
<GlossArt
|
|
449
|
+
rainbow={!beta || !c.character?.bodyColor}
|
|
450
|
+
center={beta ? c.character?.bodyColor : undefined}
|
|
451
|
+
edge={beta ? c.character?.bodyColor : undefined}
|
|
452
|
+
active={beta && Boolean(c.character?.bodyColor)}
|
|
453
|
+
/>
|
|
177
454
|
</StyledPressable>
|
|
178
455
|
</PopoverTrigger>
|
|
179
456
|
<PopoverContent
|
|
@@ -184,10 +461,23 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
184
461
|
className="w-[248px] rounded-3xl p-2.5"
|
|
185
462
|
>
|
|
186
463
|
<CustomColorPicker
|
|
187
|
-
value={
|
|
464
|
+
value={customColorValue}
|
|
188
465
|
onChange={(hex) => {
|
|
189
466
|
const next = hexAppearance(hex);
|
|
190
|
-
if (next)
|
|
467
|
+
if (!next) return;
|
|
468
|
+
if (beta)
|
|
469
|
+
onChange({
|
|
470
|
+
...agent,
|
|
471
|
+
avatar: {
|
|
472
|
+
...c,
|
|
473
|
+
...next,
|
|
474
|
+
character: {
|
|
475
|
+
...c.character!,
|
|
476
|
+
bodyColor: hex.toLowerCase(),
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
});
|
|
480
|
+
else appearance(next);
|
|
191
481
|
}}
|
|
192
482
|
/>
|
|
193
483
|
</PopoverContent>
|
|
@@ -220,7 +510,8 @@ export function AgentCreatorBase(props: AgentCreatorProps) {
|
|
|
220
510
|
maxLength={48}
|
|
221
511
|
value={agent.name}
|
|
222
512
|
onChangeText={(name) => onChange({ ...agent, name })}
|
|
223
|
-
|
|
513
|
+
/* i18n-exempt: original example person’s proper name */
|
|
514
|
+
placeholder={'Michael Scott'}
|
|
224
515
|
/>
|
|
225
516
|
</StyledView>
|
|
226
517
|
</StyledView>
|