@oxy.so/bloom 7.0.1 → 7.1.1
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/managed-avatar.mjs +258 -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/render-budget.mjs +144 -0
- package/assets/character-runtime/runtime.mjs +851 -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 +44 -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 +69 -0
- package/lib/commonjs/agent-avatar/AgentAvatarProvider.js.map +1 -0
- package/lib/commonjs/agent-avatar/CharacterAvatar.js +212 -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 +6 -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 +251 -25
- package/lib/commonjs/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/commonjs/agent-creator/CharacterControls.js +115 -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 +65 -0
- package/lib/module/agent-avatar/AgentAvatarProvider.js.map +1 -0
- package/lib/module/agent-avatar/CharacterAvatar.js +208 -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 +5 -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 +248 -22
- package/lib/module/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/module/agent-creator/CharacterControls.js +112 -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 +15 -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 +15 -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 +79 -0
- package/src/agent-avatar/CharacterAvatar.tsx +260 -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 +17 -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 +338 -39
- package/src/agent-creator/CharacterControls.tsx +150 -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,150 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
CharacterRuntimeContext,
|
|
4
|
+
CharacterCapabilitiesContext,
|
|
5
|
+
} from '../agent-avatar/context';
|
|
6
|
+
import type {
|
|
7
|
+
AvatarCharacterCategory,
|
|
8
|
+
AvatarCharacterConfig,
|
|
9
|
+
} from '../agent-avatar/config-character';
|
|
10
|
+
import { StyledView } from '../styles/styled-primitives';
|
|
11
|
+
import { Text } from '../typography';
|
|
12
|
+
import { CHARACTER_OPTIONS, CHARACTER_PRESETS } from './constants';
|
|
13
|
+
import { useAgentCreatorBindings, useAgentCreatorMessages } from './context';
|
|
14
|
+
|
|
15
|
+
/** Preset and accessory controls share Bloom Select; shapes, eyes and colors use the existing pickers. */
|
|
16
|
+
export function CharacterControls({
|
|
17
|
+
character,
|
|
18
|
+
capabilitiesKey,
|
|
19
|
+
onChange,
|
|
20
|
+
}: {
|
|
21
|
+
character?: AvatarCharacterConfig;
|
|
22
|
+
capabilitiesKey?: string;
|
|
23
|
+
onChange: (character: AvatarCharacterConfig | undefined) => void;
|
|
24
|
+
}) {
|
|
25
|
+
const messages = useAgentCreatorMessages();
|
|
26
|
+
const { runtimeUrl } = useContext(CharacterRuntimeContext);
|
|
27
|
+
const { capabilities, capabilitiesByKey } = useContext(
|
|
28
|
+
CharacterCapabilitiesContext,
|
|
29
|
+
);
|
|
30
|
+
const {
|
|
31
|
+
Select,
|
|
32
|
+
SelectTrigger,
|
|
33
|
+
SelectValue,
|
|
34
|
+
SelectIcon,
|
|
35
|
+
SelectContent,
|
|
36
|
+
SelectItem,
|
|
37
|
+
SelectItemText,
|
|
38
|
+
} = useAgentCreatorBindings();
|
|
39
|
+
if (!runtimeUrl) return null;
|
|
40
|
+
const key = capabilitiesKey ?? JSON.stringify(character);
|
|
41
|
+
const resolved =
|
|
42
|
+
capabilitiesByKey?.get(key) ??
|
|
43
|
+
(character && capabilities?.key === key ? capabilities : undefined);
|
|
44
|
+
const row = (
|
|
45
|
+
label: string,
|
|
46
|
+
value: string,
|
|
47
|
+
items: readonly { id: string; title: string; disabled?: boolean }[],
|
|
48
|
+
onSelect: (id: string) => void,
|
|
49
|
+
placeholder = label,
|
|
50
|
+
) => (
|
|
51
|
+
<StyledView key={label} className="flex flex-row items-center gap-3">
|
|
52
|
+
<Text
|
|
53
|
+
variant="body-regular"
|
|
54
|
+
className="w-[96px] text-body-regular text-text-primary"
|
|
55
|
+
>
|
|
56
|
+
{label}
|
|
57
|
+
</Text>
|
|
58
|
+
<StyledView className="min-w-0 flex-1">
|
|
59
|
+
<Select size="sm" value={value} onValueChange={onSelect}>
|
|
60
|
+
<SelectTrigger label={label}>
|
|
61
|
+
<SelectValue placeholder={placeholder} />
|
|
62
|
+
<SelectIcon />
|
|
63
|
+
</SelectTrigger>
|
|
64
|
+
<SelectContent
|
|
65
|
+
label={label}
|
|
66
|
+
items={items.map((item) => ({ ...item, label: item.title }))}
|
|
67
|
+
width={224}
|
|
68
|
+
valueExtractor={(item) => item.id}
|
|
69
|
+
renderItem={(item) => (
|
|
70
|
+
<SelectItem
|
|
71
|
+
value={item.id}
|
|
72
|
+
label={item.title}
|
|
73
|
+
disabled={item.disabled}
|
|
74
|
+
>
|
|
75
|
+
<SelectItemText>{item.title}</SelectItemText>
|
|
76
|
+
</SelectItem>
|
|
77
|
+
)}
|
|
78
|
+
/>
|
|
79
|
+
</Select>
|
|
80
|
+
</StyledView>
|
|
81
|
+
</StyledView>
|
|
82
|
+
);
|
|
83
|
+
const presets = [
|
|
84
|
+
{ id: 'bloom', title: messages.proceduralAvatar },
|
|
85
|
+
...CHARACTER_PRESETS.map((item) => ({
|
|
86
|
+
id: item.id,
|
|
87
|
+
title: messages.characterOption('preset', item.id, item.title),
|
|
88
|
+
})),
|
|
89
|
+
];
|
|
90
|
+
if (character && !presets.some((item) => item.id === character.preset))
|
|
91
|
+
presets.push({
|
|
92
|
+
id: character.preset,
|
|
93
|
+
title: messages.characterOption(
|
|
94
|
+
'preset',
|
|
95
|
+
character.preset,
|
|
96
|
+
character.preset,
|
|
97
|
+
),
|
|
98
|
+
});
|
|
99
|
+
const labels: Record<AvatarCharacterCategory, string> = {
|
|
100
|
+
shape: messages.shape,
|
|
101
|
+
color: messages.color,
|
|
102
|
+
eyes: messages.betaEyes,
|
|
103
|
+
eyewear: messages.eyewear,
|
|
104
|
+
accessory: messages.accessory,
|
|
105
|
+
};
|
|
106
|
+
return (
|
|
107
|
+
<StyledView
|
|
108
|
+
className="mt-[15px] flex flex-col gap-2 px-3"
|
|
109
|
+
testID="agent-creator-character-controls"
|
|
110
|
+
>
|
|
111
|
+
{row(
|
|
112
|
+
messages.avatarStyle,
|
|
113
|
+
character?.preset ?? 'bloom',
|
|
114
|
+
presets,
|
|
115
|
+
(id) => onChange(id === 'bloom' ? undefined : { preset: id }),
|
|
116
|
+
messages.betaPreset,
|
|
117
|
+
)}
|
|
118
|
+
{character &&
|
|
119
|
+
(['eyewear', 'accessory'] as AvatarCharacterCategory[]).map(
|
|
120
|
+
(category) =>
|
|
121
|
+
row(
|
|
122
|
+
labels[category],
|
|
123
|
+
resolved?.selected[category] ??
|
|
124
|
+
character.selections?.[category] ??
|
|
125
|
+
'none',
|
|
126
|
+
(category === 'accessory'
|
|
127
|
+
? [
|
|
128
|
+
['none', messages.off] as const,
|
|
129
|
+
...CHARACTER_OPTIONS[category],
|
|
130
|
+
]
|
|
131
|
+
: CHARACTER_OPTIONS[category]
|
|
132
|
+
).map(([id, title]) => ({
|
|
133
|
+
id,
|
|
134
|
+
title: messages.characterOption(category, id, title),
|
|
135
|
+
disabled:
|
|
136
|
+
!resolved ||
|
|
137
|
+
resolved.available[`${category}:${id}`] === false,
|
|
138
|
+
})),
|
|
139
|
+
(id) => {
|
|
140
|
+
onChange({
|
|
141
|
+
...character,
|
|
142
|
+
selections: { ...character.selections, [category]: id },
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
labels[category],
|
|
146
|
+
),
|
|
147
|
+
)}
|
|
148
|
+
</StyledView>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
@@ -12,28 +12,35 @@ import Animated, {
|
|
|
12
12
|
} from 'react-native-reanimated';
|
|
13
13
|
import { EYES, type AvatarConfig } from '../agent-avatar';
|
|
14
14
|
import { AgentFace } from '../agent-avatar/AgentFace';
|
|
15
|
-
import { StyledPressable, StyledView } from '../styles/styled-primitives';
|
|
15
|
+
import { StyledImage, StyledPressable, StyledView } from '../styles/styled-primitives';
|
|
16
16
|
import { useTheme } from '../theme/use-theme';
|
|
17
17
|
import { useAgentCreatorMessages } from './context';
|
|
18
18
|
import { useTrackEvents } from './use-track-events';
|
|
19
19
|
|
|
20
20
|
const AnimatedView = Animated.createAnimatedComponent(StyledView);
|
|
21
|
+
export type EmotionChoice = { id: string; label: string; config: AvatarConfig; disabled?: boolean; thumbnail?: string };
|
|
21
22
|
function Emotion({
|
|
22
23
|
config,
|
|
23
|
-
|
|
24
|
+
choice,
|
|
25
|
+
backgroundColor,
|
|
26
|
+
active,
|
|
27
|
+
count,
|
|
24
28
|
index,
|
|
25
29
|
rotation,
|
|
26
30
|
onChange,
|
|
27
31
|
}: {
|
|
28
32
|
config: AvatarConfig;
|
|
29
|
-
|
|
33
|
+
choice: EmotionChoice;
|
|
34
|
+
backgroundColor?: string;
|
|
35
|
+
active: boolean;
|
|
36
|
+
count: number;
|
|
30
37
|
index: number;
|
|
31
38
|
rotation: SharedValue<number>;
|
|
32
|
-
onChange: (
|
|
39
|
+
onChange: (id: string) => void;
|
|
33
40
|
}) {
|
|
34
41
|
const messages = useAgentCreatorMessages();
|
|
35
42
|
const { colors } = useTheme();
|
|
36
|
-
const angle = (index * 360) /
|
|
43
|
+
const angle = (index * 360) / count;
|
|
37
44
|
const counterRotation = useAnimatedStyle(
|
|
38
45
|
() => ({ transform: [{ rotate: `${-rotation.value - angle}deg` }] }),
|
|
39
46
|
[rotation, angle],
|
|
@@ -55,21 +62,22 @@ function Emotion({
|
|
|
55
62
|
<AnimatedView style={counterRotation}>
|
|
56
63
|
<StyledPressable
|
|
57
64
|
accessibilityRole="button"
|
|
58
|
-
accessibilityLabel={
|
|
59
|
-
aria-pressed={
|
|
60
|
-
accessibilityState={{ selected:
|
|
61
|
-
|
|
65
|
+
accessibilityLabel={choice.label}
|
|
66
|
+
aria-pressed={active}
|
|
67
|
+
accessibilityState={{ selected: active, disabled: choice.disabled }}
|
|
68
|
+
aria-disabled={choice.disabled}
|
|
69
|
+
disabled={choice.disabled}
|
|
70
|
+
onPress={() => onChange(choice.id)}
|
|
62
71
|
pointerEvents="auto"
|
|
63
|
-
className={`pointer-events-auto flex size-[34px] cursor-pointer items-center justify-center overflow-hidden rounded-full border-2 outline-none transition-[border-color,box-shadow] hover:ring-2 hover:ring-border-button-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring ${
|
|
72
|
+
className={`pointer-events-auto flex size-[34px] cursor-pointer items-center justify-center overflow-hidden rounded-full border-2 outline-none transition-[border-color,box-shadow] hover:ring-2 hover:ring-border-button-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring ${active ? 'border-foreground-icon-secondary' : 'border-transparent'}`}
|
|
64
73
|
style={{
|
|
65
|
-
backgroundColor: `hsl(${config.hue}, ${config.saturation}%, ${config.lightness ?? 80}%)`,
|
|
66
|
-
borderColor:
|
|
74
|
+
backgroundColor: backgroundColor ?? `hsl(${config.hue}, ${config.saturation}%, ${config.lightness ?? 80}%)`,
|
|
75
|
+
borderColor: active ? colors.icon : 'transparent',
|
|
67
76
|
}}
|
|
68
77
|
>
|
|
69
|
-
<AgentFace
|
|
78
|
+
{choice.thumbnail ? <StyledImage source={{ uri: choice.thumbnail }} resizeMode="contain" accessible={false} style={{ width: 27, height: 27, opacity: choice.disabled ? 0.35 : 1 }} /> : <AgentFace
|
|
70
79
|
config={{
|
|
71
|
-
...config,
|
|
72
|
-
eyes,
|
|
80
|
+
...choice.config,
|
|
73
81
|
eyeSize: 24,
|
|
74
82
|
eyeGap: 36,
|
|
75
83
|
lookAt: 'center',
|
|
@@ -77,7 +85,7 @@ function Emotion({
|
|
|
77
85
|
idle: false,
|
|
78
86
|
}}
|
|
79
87
|
size={34}
|
|
80
|
-
/>
|
|
88
|
+
/>}
|
|
81
89
|
</StyledPressable>
|
|
82
90
|
</AnimatedView>
|
|
83
91
|
</StyledView>
|
|
@@ -88,11 +96,22 @@ function Emotion({
|
|
|
88
96
|
export function EmotionPicker({
|
|
89
97
|
config,
|
|
90
98
|
onChange,
|
|
99
|
+
choices: choicesProp,
|
|
100
|
+
value: valueProp,
|
|
101
|
+
onSelect,
|
|
102
|
+
backgroundColor,
|
|
91
103
|
}: {
|
|
92
104
|
config: AvatarConfig;
|
|
105
|
+
backgroundColor?: string;
|
|
106
|
+
choices?: readonly EmotionChoice[];
|
|
107
|
+
value?: string;
|
|
108
|
+
onSelect?: (id: string) => void;
|
|
93
109
|
onChange: (eyes: AvatarConfig['eyes']) => void;
|
|
94
110
|
}) {
|
|
95
111
|
const messages = useAgentCreatorMessages();
|
|
112
|
+
const choices = choicesProp ?? EYES.map((eyes) => ({ id: eyes, label: messages.emotions[eyes], config: { ...config, eyes } }));
|
|
113
|
+
const value = valueProp ?? config.eyes;
|
|
114
|
+
const emit = (id: string) => onSelect ? onSelect(id) : onChange(id as AvatarConfig['eyes']);
|
|
96
115
|
const ref = useRef<View>(null);
|
|
97
116
|
const visible = useSharedValue(true);
|
|
98
117
|
const target = useSharedValue(0);
|
|
@@ -123,7 +142,7 @@ export function EmotionPicker({
|
|
|
123
142
|
if (Platform.OS === 'web' && typeof document !== 'undefined')
|
|
124
143
|
document.addEventListener('visibilitychange', visibility);
|
|
125
144
|
return () => {
|
|
126
|
-
subscription?.remove();
|
|
145
|
+
subscription?.remove?.();
|
|
127
146
|
if (Platform.OS === 'web' && typeof document !== 'undefined')
|
|
128
147
|
document.removeEventListener('visibilitychange', visibility);
|
|
129
148
|
};
|
|
@@ -182,15 +201,18 @@ export function EmotionPicker({
|
|
|
182
201
|
orbit,
|
|
183
202
|
]}
|
|
184
203
|
>
|
|
185
|
-
{
|
|
204
|
+
{choices.map((choice, index) => (
|
|
186
205
|
<Emotion
|
|
187
|
-
key={
|
|
206
|
+
key={choice.id}
|
|
188
207
|
config={config}
|
|
189
|
-
|
|
208
|
+
choice={choice}
|
|
209
|
+
backgroundColor={backgroundColor}
|
|
210
|
+
active={value === choice.id}
|
|
211
|
+
count={choices.length}
|
|
190
212
|
index={index}
|
|
191
213
|
rotation={rotation}
|
|
192
214
|
onChange={(value) => {
|
|
193
|
-
if (!suppressClick.value)
|
|
215
|
+
if (!suppressClick.value) emit(value);
|
|
194
216
|
}}
|
|
195
217
|
/>
|
|
196
218
|
))}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useEffect,
|
|
3
|
+
useId,
|
|
4
|
+
useRef,
|
|
5
|
+
useState,
|
|
6
|
+
type ComponentType,
|
|
7
|
+
type Ref,
|
|
8
|
+
} from 'react';
|
|
2
9
|
import { Platform, type View, type ViewProps } from 'react-native';
|
|
3
10
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
4
11
|
import Animated, {
|
|
@@ -11,14 +18,18 @@ import Animated, {
|
|
|
11
18
|
type SharedValue,
|
|
12
19
|
} from 'react-native-reanimated';
|
|
13
20
|
import Svg, { Defs, LinearGradient, Path, Rect, Stop } from 'react-native-svg';
|
|
14
|
-
import {
|
|
21
|
+
import { FOLD_SHAPES, type AvatarConfig } from '../agent-avatar/model';
|
|
15
22
|
import { useIsRtl } from '../hooks/use-is-rtl';
|
|
16
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
StyledImage,
|
|
25
|
+
StyledPressable,
|
|
26
|
+
StyledView,
|
|
27
|
+
} from '../styles/styled-primitives';
|
|
17
28
|
import type { WebCssStyle } from '../styles/web-view-style';
|
|
18
29
|
import { useTheme } from '../theme/use-theme';
|
|
19
30
|
import { useAgentCreatorMessages } from './context';
|
|
20
|
-
import { wrapShape } from './shared';
|
|
21
31
|
import { useTrackEvents } from './use-track-events';
|
|
32
|
+
import { ShapeSilhouette } from './ShapeSilhouette';
|
|
22
33
|
|
|
23
34
|
// RNW supports these listbox properties; native handles equivalent accessibility actions.
|
|
24
35
|
type ListboxViewProps = Omit<ViewProps, 'role'> & {
|
|
@@ -37,15 +48,24 @@ const trackClip: ArcCssStyle = {
|
|
|
37
48
|
clipPath:
|
|
38
49
|
'polygon(0 0, 15% 0, 30% 36%, 50% 50%, 70% 36%, 85% 0, 100% 0, 100% 100%, 0 100%)',
|
|
39
50
|
};
|
|
51
|
+
export type ShapeArcChoice = {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
config: AvatarConfig;
|
|
55
|
+
thumbnail?: string;
|
|
56
|
+
};
|
|
57
|
+
const wrap = (slot: number, count: number) => ((slot % count) + count) % count;
|
|
40
58
|
function ShapeSlot({
|
|
41
|
-
config,
|
|
42
59
|
slot,
|
|
43
60
|
position,
|
|
44
61
|
sign,
|
|
45
62
|
id,
|
|
46
63
|
onSelect,
|
|
64
|
+
choices,
|
|
65
|
+
value,
|
|
47
66
|
}: {
|
|
48
|
-
|
|
67
|
+
choices: readonly ShapeArcChoice[];
|
|
68
|
+
value: string;
|
|
49
69
|
slot: number;
|
|
50
70
|
position: SharedValue<number>;
|
|
51
71
|
sign: number;
|
|
@@ -54,8 +74,8 @@ function ShapeSlot({
|
|
|
54
74
|
}) {
|
|
55
75
|
const messages = useAgentCreatorMessages();
|
|
56
76
|
const { colors } = useTheme();
|
|
57
|
-
const
|
|
58
|
-
const active =
|
|
77
|
+
const choice = choices[wrap(slot, choices.length)]!;
|
|
78
|
+
const active = value === choice.id;
|
|
59
79
|
const animated = useAnimatedStyle(() => {
|
|
60
80
|
const angle = (slot - position.value) * 0.34;
|
|
61
81
|
return {
|
|
@@ -86,26 +106,23 @@ function ShapeSlot({
|
|
|
86
106
|
role="option"
|
|
87
107
|
tabIndex={-1}
|
|
88
108
|
aria-selected={active}
|
|
89
|
-
accessibilityLabel={messages.shapeLabel(
|
|
109
|
+
accessibilityLabel={messages.shapeLabel(choice.label)}
|
|
90
110
|
onPress={() => onSelect(slot)}
|
|
91
111
|
className={`flex size-14 cursor-grab items-center justify-center rounded-2xl outline-none transition-colors hover:bg-background-secondary-default active:cursor-grabbing${active ? ' bg-background-secondary-default ring-1 ring-border-button-default' : ''}`}
|
|
92
112
|
style={{
|
|
93
113
|
backgroundColor: active ? colors.backgroundSecondary : 'transparent',
|
|
94
114
|
}}
|
|
95
115
|
>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
paused
|
|
107
|
-
label={messages.silhouetteLabel(messages.shapes[shape])}
|
|
108
|
-
/>
|
|
116
|
+
{choice.thumbnail ? (
|
|
117
|
+
<StyledImage
|
|
118
|
+
source={{ uri: choice.thumbnail }}
|
|
119
|
+
resizeMode="contain"
|
|
120
|
+
accessible={false}
|
|
121
|
+
style={{ width: 56, height: 56 }}
|
|
122
|
+
/>
|
|
123
|
+
) : (
|
|
124
|
+
<ShapeSilhouette config={choice.config} />
|
|
125
|
+
)}
|
|
109
126
|
</StyledPressable>
|
|
110
127
|
</AnimatedView>
|
|
111
128
|
);
|
|
@@ -115,15 +132,42 @@ function ShapeSlot({
|
|
|
115
132
|
export function ShapeArc({
|
|
116
133
|
config,
|
|
117
134
|
onChange,
|
|
135
|
+
choices: choicesProp,
|
|
136
|
+
value: valueProp,
|
|
137
|
+
onSelect,
|
|
118
138
|
}: {
|
|
119
139
|
config: AvatarConfig;
|
|
140
|
+
choices?: readonly ShapeArcChoice[];
|
|
141
|
+
value?: string;
|
|
142
|
+
onSelect?: (id: string) => void;
|
|
120
143
|
onChange: (shape: AvatarConfig['foldShape']) => void;
|
|
121
144
|
}) {
|
|
122
145
|
const messages = useAgentCreatorMessages();
|
|
123
146
|
const { colors } = useTheme();
|
|
147
|
+
const choices =
|
|
148
|
+
choicesProp ??
|
|
149
|
+
FOLD_SHAPES.map((shape) => ({
|
|
150
|
+
id: shape,
|
|
151
|
+
label: messages.shapes[shape],
|
|
152
|
+
config: {
|
|
153
|
+
...config,
|
|
154
|
+
family: 'fold' as const,
|
|
155
|
+
character: undefined,
|
|
156
|
+
foldShape: shape,
|
|
157
|
+
},
|
|
158
|
+
}));
|
|
159
|
+
const value = valueProp ?? config.foldShape;
|
|
160
|
+
const emit = (slot: number) => {
|
|
161
|
+
const choice = choices[wrap(slot, choices.length)]!;
|
|
162
|
+
if (onSelect) onSelect(choice.id);
|
|
163
|
+
else onChange(choice.id as AvatarConfig['foldShape']);
|
|
164
|
+
};
|
|
124
165
|
const id = useId();
|
|
125
166
|
const ref = useRef<View>(null);
|
|
126
|
-
const initial = Math.max(
|
|
167
|
+
const initial = Math.max(
|
|
168
|
+
0,
|
|
169
|
+
choices.findIndex((choice) => choice.id === value),
|
|
170
|
+
);
|
|
127
171
|
const target = useSharedValue(initial);
|
|
128
172
|
const position = useSharedValue(initial);
|
|
129
173
|
const [center, setCenter] = useState(initial);
|
|
@@ -137,6 +181,15 @@ export function ShapeArc({
|
|
|
137
181
|
? next
|
|
138
182
|
: withSpring(next, { stiffness: 180, damping: 28 });
|
|
139
183
|
};
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
const selected = choices.findIndex((choice) => choice.id === value);
|
|
186
|
+
if (selected < 0) return;
|
|
187
|
+
const current = Math.round(target.value);
|
|
188
|
+
let delta = selected - wrap(current, choices.length);
|
|
189
|
+
if (delta > choices.length / 2) delta -= choices.length;
|
|
190
|
+
if (delta < -choices.length / 2) delta += choices.length;
|
|
191
|
+
if (delta) move(current + delta);
|
|
192
|
+
}, [value, choices.length]);
|
|
140
193
|
useAnimatedReaction(
|
|
141
194
|
() => Math.round(position.value),
|
|
142
195
|
(value, previous) => {
|
|
@@ -147,7 +200,7 @@ export function ShapeArc({
|
|
|
147
200
|
const select = (slot: number) => {
|
|
148
201
|
if (suppressClick.value) return;
|
|
149
202
|
move(slot);
|
|
150
|
-
|
|
203
|
+
emit(slot);
|
|
151
204
|
};
|
|
152
205
|
const drag = Gesture.Pan()
|
|
153
206
|
.activeOffsetX([-5, 5])
|
|
@@ -181,15 +234,15 @@ export function ShapeArc({
|
|
|
181
234
|
? Math.round(target.value) + step
|
|
182
235
|
: key === 'Home'
|
|
183
236
|
? 0
|
|
184
|
-
:
|
|
237
|
+
: choices.length - 1;
|
|
185
238
|
move(next);
|
|
186
|
-
|
|
239
|
+
emit(next);
|
|
187
240
|
return true;
|
|
188
241
|
},
|
|
189
242
|
);
|
|
190
243
|
const slots = Array.from({ length: 9 }, (_, index) => center + index - 4);
|
|
191
244
|
const selectedSlot = slots.find(
|
|
192
|
-
(slot) =>
|
|
245
|
+
(slot) => choices[wrap(slot, choices.length)]?.id === value,
|
|
193
246
|
);
|
|
194
247
|
return (
|
|
195
248
|
<GestureDetector gesture={drag}>
|
|
@@ -213,14 +266,15 @@ export function ShapeArc({
|
|
|
213
266
|
Math.round(target.value) +
|
|
214
267
|
(event.nativeEvent.actionName === 'increment' ? 1 : -1);
|
|
215
268
|
move(next);
|
|
216
|
-
|
|
269
|
+
emit(next);
|
|
217
270
|
}}
|
|
218
271
|
>
|
|
219
272
|
{slots.map((slot) => (
|
|
220
273
|
<ShapeSlot
|
|
221
274
|
key={slot}
|
|
222
275
|
id={id}
|
|
223
|
-
|
|
276
|
+
choices={choices}
|
|
277
|
+
value={value}
|
|
224
278
|
slot={slot}
|
|
225
279
|
position={position}
|
|
226
280
|
sign={sign}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
import { legacyContours } from '../agent-avatar/legacy-contours';
|
|
4
|
+
import { radialContour } from '../agent-avatar/legacy-recipe';
|
|
5
|
+
import type { AvatarConfig } from '../agent-avatar/model';
|
|
6
|
+
import { CHARACTER_COLORS } from './constants';
|
|
7
|
+
|
|
8
|
+
const silhouettes = new Map<string, { path: string; viewBox: string }>();
|
|
9
|
+
|
|
10
|
+
function silhouette(config: AvatarConfig) {
|
|
11
|
+
const key = JSON.stringify([
|
|
12
|
+
config.family,
|
|
13
|
+
config.shape,
|
|
14
|
+
config.foldShape,
|
|
15
|
+
config.foldDirection,
|
|
16
|
+
config.foldDepth,
|
|
17
|
+
config.alienShape,
|
|
18
|
+
]);
|
|
19
|
+
const cached = silhouettes.get(key);
|
|
20
|
+
if (cached) return cached;
|
|
21
|
+
const points = radialContour(
|
|
22
|
+
legacyContours({ ...config, grain: 0, material: 'solid' }),
|
|
23
|
+
128,
|
|
24
|
+
).map(([x, y]) => [x, -y] as const);
|
|
25
|
+
const xs = points.map(([x]) => x),
|
|
26
|
+
ys = points.map(([, y]) => y);
|
|
27
|
+
const left = Math.min(...xs),
|
|
28
|
+
top = Math.min(...ys),
|
|
29
|
+
width = Math.max(...xs) - left,
|
|
30
|
+
height = Math.max(...ys) - top;
|
|
31
|
+
// Original catalog PNGs use a flat pink silhouette with a small clear edge.
|
|
32
|
+
const padding = Math.max(width, height) * 0.025;
|
|
33
|
+
const result = {
|
|
34
|
+
path:
|
|
35
|
+
points
|
|
36
|
+
.map(([x, y], i) => `${i ? 'L' : 'M'}${x.toFixed(4)} ${y.toFixed(4)}`)
|
|
37
|
+
.join(' ') + 'Z',
|
|
38
|
+
viewBox: `${left - padding} ${top - padding} ${width + padding * 2} ${height + padding * 2}`,
|
|
39
|
+
};
|
|
40
|
+
if (silhouettes.size >= 64)
|
|
41
|
+
silhouettes.delete(silhouettes.keys().next().value!);
|
|
42
|
+
silhouettes.set(key, result);
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Shape-only selector artwork: no avatar, animation loop, or runtime request. */
|
|
47
|
+
export const ShapeSilhouette = memo(function ShapeSilhouette({
|
|
48
|
+
config,
|
|
49
|
+
}: {
|
|
50
|
+
config: AvatarConfig;
|
|
51
|
+
}) {
|
|
52
|
+
const { path, viewBox } = silhouette(config);
|
|
53
|
+
return (
|
|
54
|
+
<Svg
|
|
55
|
+
width={56}
|
|
56
|
+
height={56}
|
|
57
|
+
viewBox={viewBox}
|
|
58
|
+
preserveAspectRatio="xMidYMid meet"
|
|
59
|
+
accessible={false}
|
|
60
|
+
pointerEvents="none"
|
|
61
|
+
>
|
|
62
|
+
<Path d={path} fill={CHARACTER_COLORS.pink} />
|
|
63
|
+
</Svg>
|
|
64
|
+
);
|
|
65
|
+
});
|
|
@@ -55,3 +55,33 @@ export const PREVIEW_TEXT: Record<AgentLanguage, string> = {
|
|
|
55
55
|
ja: 'こんにちは!準備ができたら始めましょう。',
|
|
56
56
|
pt: 'Olá! Podemos começar quando quiser.',
|
|
57
57
|
};
|
|
58
|
+
|
|
59
|
+
// Recovered engine catalog metadata. IDs are renderer selections; titles retain the beta catalog's English defaults.
|
|
60
|
+
export const CHARACTER_PRESETS = [
|
|
61
|
+
{ id: 'blue_beret', title: 'Felipe' },
|
|
62
|
+
{ id: 'alfred', title: 'Alfred' },
|
|
63
|
+
{ id: 'purple_heart', title: 'Jojo' },
|
|
64
|
+
{ id: 'lime_frog', title: 'Todd' },
|
|
65
|
+
{ id: 'coral_monocle', title: 'Iris' },
|
|
66
|
+
{ id: 'gus', title: 'Thelma' },
|
|
67
|
+
{ id: 'blue_spectacles', title: 'Josh' },
|
|
68
|
+
{ id: 'lime_headphones', title: 'Iggy' },
|
|
69
|
+
] as const;
|
|
70
|
+
export const CHARACTER_OPTIONS = {
|
|
71
|
+
shape: [
|
|
72
|
+
['circle', 'Circle'], ['rounded_triangle', 'Rounded triangle'], ['capsule', 'Capsule'],
|
|
73
|
+
['rounded_head_two_ears', 'Rounded head with two ears'], ['six_lobed_flower', 'Six lobed flower'],
|
|
74
|
+
['heart', 'Heart'], ['four_lobed_butterfly', 'Four lobed butterfly'], ['circle_two_ears', 'Circle with two ears'],
|
|
75
|
+
['twelve_scalloped_rosette', 'Twelve scalloped rosette'], ['rounded_cube', 'Hexagon'], ['rounded_diamond', 'Rounded diamond'],
|
|
76
|
+
],
|
|
77
|
+
color: [['pink', 'Pink'], ['orchid', 'Orchid'], ['violet', 'Violet'], ['blue', 'Blue'], ['cyan', 'Cyan'], ['teal', 'Teal'], ['lime', 'Lime'], ['yellow', 'Yellow'], ['coral', 'Coral']],
|
|
78
|
+
eyes: [['swept_lids', 'Swept lids'], ['oval', 'Oval'], ['sparkle_capsules', 'Sparkle capsules'], ['highlight_capsules', 'Highlight capsules'], ['dots', 'Dots'], ['double_highlights', 'Round highlights'], ['round_inset', 'Round inset'], ['crescent_inset', 'Crescent inset'], ['sleepy_lids', 'Sleepy lids']],
|
|
79
|
+
eyewear: [['none', 'None'], ['monocle', 'Monocle'], ['tall_oval_frames', 'Tall oval frames'], ['separate_trapezoid_lenses', 'Separate trapezoid lenses'], ['classic_sunglasses', 'Classic sunglasses'], ['round_sunglasses', 'Round sunglasses']],
|
|
80
|
+
accessory: [['headphones', 'Headphones'], ['bow', 'Bow tie'], ['beanie', 'Beanie'], ['hat', 'Hat'], ['beret', 'Beret'], ['orb', 'Bulb'], ['three_lobe', 'Tuft'], ['crown', 'Crown']],
|
|
81
|
+
} as const;
|
|
82
|
+
|
|
83
|
+
/** RGB swatches returned by the recovered engine's Color catalog. */
|
|
84
|
+
export const CHARACTER_COLORS = {
|
|
85
|
+
pink: '#fa70ab', orchid: '#dd6adc', violet: '#a25bff', blue: '#4778ff', cyan: '#00b1ff',
|
|
86
|
+
teal: '#04bb9f', lime: '#b6d80b', yellow: '#ffcc38', coral: '#ff8066',
|
|
87
|
+
} as const;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { defineMessages, type MessageCatalog } from '../locale/messages';
|
|
2
2
|
|
|
3
3
|
export interface AgentCreatorMessages {
|
|
4
|
+
reaction: string;
|
|
5
|
+
working: string;
|
|
6
|
+
avatarStyle: string;
|
|
7
|
+
proceduralAvatar: string;
|
|
8
|
+
betaPreset: string;
|
|
9
|
+
betaEyes: string;
|
|
10
|
+
eyewear: string;
|
|
11
|
+
accessory: string;
|
|
12
|
+
/** Recovered beta catalog names default to their source titles; hosts may localize by category/ID. */
|
|
13
|
+
characterOption: (category: string, id: string, title: string) => string;
|
|
4
14
|
editor: string;
|
|
5
15
|
newBot: string;
|
|
6
16
|
closeEditor: string;
|
|
@@ -96,6 +106,15 @@ export interface AgentCreatorMessages {
|
|
|
96
106
|
|
|
97
107
|
export const AGENT_CREATOR_MESSAGES: MessageCatalog<AgentCreatorMessages> =
|
|
98
108
|
defineMessages<AgentCreatorMessages>('AGENT_CREATOR_MESSAGES', {
|
|
109
|
+
reaction: 'React',
|
|
110
|
+
working: 'Work',
|
|
111
|
+
avatarStyle: 'Avatar style',
|
|
112
|
+
proceduralAvatar: 'Current avatar',
|
|
113
|
+
betaPreset: 'Character preset (beta)',
|
|
114
|
+
betaEyes: 'Eye style',
|
|
115
|
+
eyewear: 'Eyewear',
|
|
116
|
+
accessory: 'Accessory',
|
|
117
|
+
characterOption: (_category, _id, title) => String(title),
|
|
99
118
|
editor: 'Agent editor',
|
|
100
119
|
newBot: 'New bot',
|
|
101
120
|
closeEditor: 'Close agent editor',
|
|
@@ -26,21 +26,7 @@ export function normalizeAgentPreferences(
|
|
|
26
26
|
typeof value?.notifications === 'boolean' ? value.notifications : true,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
c: Pick<AvatarConfig, 'hue' | 'saturation' | 'lightness'>,
|
|
31
|
-
) {
|
|
32
|
-
const light = (c.lightness ?? 76) / 100,
|
|
33
|
-
a = (c.saturation / 100) * Math.min(light, 1 - light);
|
|
34
|
-
const channel = (n: number) => {
|
|
35
|
-
const k = (n + c.hue / 30) % 12;
|
|
36
|
-
return Math.round(
|
|
37
|
-
255 * (light - a * Math.max(-1, Math.min(k - 3, 9 - k, 1))),
|
|
38
|
-
)
|
|
39
|
-
.toString(16)
|
|
40
|
-
.padStart(2, '0');
|
|
41
|
-
};
|
|
42
|
-
return `#${channel(0)}${channel(8)}${channel(4)}`;
|
|
43
|
-
}
|
|
29
|
+
export { avatarHex } from '../agent-avatar/avatar-color';
|
|
44
30
|
export function hexAppearance(hex: string): Partial<AvatarConfig> | null {
|
|
45
31
|
if (!/^#[0-9a-f]{6}$/i.test(hex)) return null;
|
|
46
32
|
const [r = 0, g = 0, b = 0] = [1, 3, 5].map(
|