@salsita-ai/sdk 0.50.0-develop.f16492b14e → 0.50.0-develop.f354d3576d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (884) hide show
  1. package/README.md +4 -2
  2. package/dist/admin/AdminShell.js +1 -1
  3. package/dist/admin/common/admin-interface.d.ts +1 -1
  4. package/dist/admin/legacy-admin/Application.js +1 -1
  5. package/dist/application-spec/caching/index.d.ts +6 -1
  6. package/dist/application-spec/caching/index.js +1 -1
  7. package/dist/application-spec/errors/diagnostic-codes.d.ts +1 -0
  8. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  9. package/dist/application-spec/errors/diagnostic-messages.d.ts +1 -0
  10. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  11. package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +0 -19
  12. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  13. package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -1
  14. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
  15. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  16. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +5 -4
  17. package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
  18. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
  19. package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
  20. package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
  21. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
  22. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +118 -0
  23. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
  24. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +44 -0
  25. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.d.ts +3 -0
  26. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.js +3 -0
  27. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.d.ts +1 -0
  28. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.js +1 -0
  29. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.d.ts +3 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.js +48 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.d.ts +3 -0
  32. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +38 -0
  33. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.d.ts +3 -0
  34. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.js +35 -0
  35. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.d.ts +3 -0
  36. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +61 -0
  37. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.d.ts +3 -0
  38. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +7 -0
  39. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.d.ts +3 -0
  40. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.js +79 -0
  41. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.d.ts +1 -0
  42. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.js +1 -0
  43. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.d.ts +3 -0
  44. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.js +52 -0
  45. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +3 -0
  46. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +49 -0
  47. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.d.ts +3 -0
  48. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.js +62 -0
  49. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.d.ts +3 -0
  50. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.js +40 -0
  51. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.d.ts +3 -0
  52. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.js +65 -0
  53. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.d.ts +3 -0
  54. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.js +58 -0
  55. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.d.ts +3 -0
  56. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.js +41 -0
  57. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.d.ts +3 -0
  58. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.js +24 -0
  59. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.d.ts +3 -0
  60. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.js +44 -0
  61. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.d.ts +3 -0
  62. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +74 -0
  63. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.d.ts +3 -0
  64. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.js +8 -0
  65. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.d.ts +1 -0
  66. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.js +1 -0
  67. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.d.ts +3 -0
  68. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +48 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.d.ts +3 -0
  70. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +64 -0
  71. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.d.ts +3 -0
  72. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +62 -0
  73. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.d.ts +3 -0
  74. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.js +1 -0
  75. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.d.ts +3 -0
  76. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.js +59 -0
  77. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.d.ts +3 -0
  78. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +46 -0
  79. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.d.ts +1 -0
  80. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.js +1 -0
  81. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.d.ts +3 -0
  82. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.js +43 -0
  83. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.d.ts +3 -0
  84. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.js +30 -0
  85. package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
  86. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
  87. package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
  88. package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
  89. package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
  90. package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
  91. package/dist/application-spec/generate-application/code/templates/skills/features/localization.d.ts +3 -0
  92. package/dist/application-spec/generate-application/code/templates/skills/features/localization.js +87 -0
  93. package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.d.ts +3 -0
  94. package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.js +43 -0
  95. package/dist/application-spec/generate-application/code/templates/skills/features/state/index.d.ts +1 -0
  96. package/dist/application-spec/generate-application/code/templates/skills/features/state/index.js +1 -0
  97. package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.d.ts +3 -0
  98. package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.js +48 -0
  99. package/dist/application-spec/generate-application/code/templates/skills/features/state/state.d.ts +3 -0
  100. package/dist/application-spec/generate-application/code/templates/skills/features/state/state.js +1 -0
  101. package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.d.ts +3 -0
  102. package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.js +39 -0
  103. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.d.ts +3 -0
  104. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +36 -0
  105. package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
  106. package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
  107. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +2 -0
  108. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +1 -0
  109. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +68 -0
  110. package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
  111. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +2 -2
  112. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +12 -5
  113. package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.d.ts +9 -0
  114. package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -0
  115. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
  116. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
  117. package/dist/application-spec/generate-application/code/templates/skills/{phoenix-skill.d.ts → processes/beta.d.ts} +2 -1
  118. package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +4 -0
  119. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
  120. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +38 -0
  121. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
  122. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
  123. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
  124. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
  125. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
  126. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +7 -0
  127. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
  128. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
  129. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
  130. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
  131. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
  132. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +25 -0
  133. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
  134. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +35 -0
  135. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
  136. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
  137. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
  138. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +9 -0
  139. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
  140. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
  141. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +8 -0
  142. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
  143. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
  144. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
  145. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
  146. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
  147. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
  148. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
  149. package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
  150. package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
  151. package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
  152. package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
  153. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
  154. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
  155. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
  156. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
  157. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
  158. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
  159. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
  160. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
  161. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
  162. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
  163. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
  164. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
  165. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
  166. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
  167. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
  168. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
  169. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +51 -258
  170. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -58
  171. package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.d.ts +9 -0
  172. package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -0
  173. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +1 -1
  174. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -1
  175. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
  176. package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
  177. package/dist/application-spec/generate-application/index.d.ts +1 -8
  178. package/dist/application-spec/generate-application/index.js +1 -1
  179. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +1 -1
  180. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  181. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  182. package/dist/client/authorized-client.d.ts +1 -1
  183. package/dist/client/authorized-client.js +1 -1
  184. package/dist/client/contract.d.ts +21 -8
  185. package/dist/client/contract.js +1 -1
  186. package/dist/client/phoenix-api.d.ts +43 -5
  187. package/dist/configurator/ConfiguratorApp.js +1 -1
  188. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  189. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +31 -0
  190. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +123 -24
  191. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  192. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +43 -0
  193. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  194. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +8 -2
  195. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  196. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.d.ts +10 -0
  197. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.js +1 -0
  198. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +8 -0
  199. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  200. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +3 -2
  201. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  202. package/dist/configurator/common/configurator-interface.d.ts +1 -1
  203. package/dist/configurator/pages/default-configurator-elements.d.ts +6 -2
  204. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  205. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
  206. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
  207. package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
  208. package/dist/configurator/pages/error-boundaries/index.js +1 -1
  209. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
  210. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
  211. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
  212. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
  213. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
  214. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
  215. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
  216. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
  217. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
  218. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
  219. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
  220. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
  221. package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
  222. package/dist/configurator/pages/provider-slots/index.js +1 -0
  223. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
  224. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
  225. package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
  226. package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
  227. package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
  228. package/dist/configurator/pages/ui-elements/index.js +1 -0
  229. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  230. package/dist/configurator/ui/assistant/AssistantChips.d.ts +10 -0
  231. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  232. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  233. package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
  234. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  235. package/dist/configurator/ui/assistant/AssistantThread.d.ts +4 -3
  236. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  237. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +4 -1
  238. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
  239. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +9 -0
  240. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -0
  241. package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +6 -0
  242. package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.js +1 -0
  243. package/dist/configurator/ui/assistant/annotation/AnnotationPin.d.ts +14 -0
  244. package/dist/configurator/ui/assistant/annotation/AnnotationPin.js +1 -0
  245. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.d.ts +12 -0
  246. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -0
  247. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.d.ts +11 -0
  248. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -0
  249. package/dist/configurator/ui/assistant/annotation/annotation-host-context.d.ts +5 -0
  250. package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +1 -0
  251. package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +26 -0
  252. package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -0
  253. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +15 -0
  254. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -0
  255. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +18 -0
  256. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -0
  257. package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.d.ts +22 -0
  258. package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.js +1 -0
  259. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +22 -0
  260. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -0
  261. package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.d.ts +17 -0
  262. package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.js +1 -0
  263. package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +1 -0
  264. package/dist/configurator/ui/assistant/annotation/editor/index.js +1 -0
  265. package/dist/configurator/ui/assistant/annotation/index.d.ts +4 -0
  266. package/dist/configurator/ui/assistant/annotation/index.js +1 -0
  267. package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.d.ts +2 -0
  268. package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.js +1 -0
  269. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.d.ts +6 -0
  270. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +1 -0
  271. package/dist/configurator/ui/assistant/assistant-failure.d.ts +15 -7
  272. package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
  273. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +19 -0
  274. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
  275. package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
  276. package/dist/configurator/ui/assistant/attachments/index.js +1 -0
  277. package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +24 -0
  278. package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
  279. package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +15 -0
  280. package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -0
  281. package/dist/configurator/ui/assistant/composer/index.d.ts +1 -0
  282. package/dist/configurator/ui/assistant/composer/index.js +1 -0
  283. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  284. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  285. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +26 -0
  286. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
  287. package/dist/configurator/ui/assistant/index.d.ts +1 -0
  288. package/dist/configurator/ui/assistant/index.js +1 -1
  289. package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
  290. package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
  291. package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
  292. package/dist/configurator/ui/assistant/popover/index.js +1 -0
  293. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
  294. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -1
  295. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
  296. package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
  297. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +3 -9
  298. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  299. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +4 -4
  300. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
  301. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +11 -0
  302. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  303. package/dist/configurator/ui/assistant/thread-items.d.ts +5 -0
  304. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  305. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  306. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
  307. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
  308. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  309. package/dist/docs/3d-scene/animations-basic.mdx +0 -4
  310. package/dist/docs/3d-scene/camera-based-hiding.mdx +0 -2
  311. package/dist/docs/3d-scene/cameras/custom.mdx +0 -2
  312. package/dist/docs/3d-scene/cameras/fit-during-drag.mdx +0 -4
  313. package/dist/docs/3d-scene/cameras/locks.mdx +0 -4
  314. package/dist/docs/3d-scene/cameras/transitions.mdx +0 -2
  315. package/dist/docs/3d-scene/engraving.mdx +0 -4
  316. package/dist/docs/3d-scene/materials/custom.mdx +1 -2
  317. package/dist/docs/3d-scene/materials/inherit.mdx +0 -4
  318. package/dist/docs/3d-scene/materials/multilevel.mdx +0 -47
  319. package/dist/docs/3d-scene/materials/override.mdx +0 -4
  320. package/dist/docs/3d-scene/materials/simple.mdx +0 -4
  321. package/dist/docs/3d-scene/materials/transformer.mdx +0 -4
  322. package/dist/docs/3d-scene/materials/transition.mdx +0 -4
  323. package/dist/docs/3d-scene/materials/transmissive.mdx +0 -4
  324. package/dist/docs/3d-scene/postprocessing.mdx +0 -2
  325. package/dist/docs/3d-scene/rendering/basic.mdx +5 -9
  326. package/dist/docs/3d-scene/rendering/custom-entity.mdx +0 -6
  327. package/dist/docs/3d-scene/rendering/lights/ambient-light.mdx +0 -2
  328. package/dist/docs/3d-scene/rendering/lights/directional-light.mdx +0 -2
  329. package/dist/docs/3d-scene/rendering/lights/point-light.mdx +0 -2
  330. package/dist/docs/3d-scene/rendering/lights/rect-area-light.mdx +0 -2
  331. package/dist/docs/3d-scene/rendering/lights/spot-light.mdx +0 -2
  332. package/dist/docs/3d-scene/rendering/object-groups.mdx +0 -2
  333. package/dist/docs/3d-scene/rendering/objects.mdx +0 -4
  334. package/dist/docs/3d-scene/rendering/scene-entity-object.mdx +0 -43
  335. package/dist/docs/3d-scene/rendering/smma.mdx +0 -2
  336. package/dist/docs/3d-scene/rendering/soft-shadows.mdx +0 -2
  337. package/dist/docs/3d-scene/rendering/transformer.mdx +1 -3
  338. package/dist/docs/complex-use-cases/custom-ui-on-root-level.mdx +0 -1
  339. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +19 -19
  340. package/dist/docs/complex-use-cases/navigation-guard.mdx +81 -19
  341. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +28 -65
  342. package/dist/docs/complex-use-cases/navigation-reset-undo.mdx +16 -20
  343. package/dist/docs/complex-use-cases/sketching.mdx +2 -10
  344. package/dist/docs/controls/custom.mdx +88 -87
  345. package/dist/docs/controls/manage-child-entities/entitychildrenlist.mdx +0 -4
  346. package/dist/docs/controls/nullable-attributes.mdx +0 -2
  347. package/dist/docs/controls/scene/custom-controls.mdx +7 -8
  348. package/dist/docs/controls/scene/html-hotspots.mdx +0 -4
  349. package/dist/docs/controls/scene/object-html-hotspots.mdx +0 -4
  350. package/dist/docs/controls/select-attribute/cardselect.mdx +0 -4
  351. package/dist/docs/controls/select-attribute/listselect.mdx +0 -4
  352. package/dist/docs/controls/select-attribute/select.mdx +0 -4
  353. package/dist/docs/controls/select-attribute/swatchselect.mdx +0 -4
  354. package/dist/docs/controls/select-attribute/switchselect.mdx +0 -4
  355. package/dist/docs/controls/select-attribute/toggleselect.mdx +0 -4
  356. package/dist/docs/controls/select-child-entity/cardselect.mdx +2 -6
  357. package/dist/docs/controls/select-child-entity/listselect.mdx +5 -11
  358. package/dist/docs/controls/select-child-entity/toggleselect.mdx +4 -10
  359. package/dist/docs/controls/text-input.mdx +90 -19
  360. package/dist/docs/demos/glass.mdx +0 -4
  361. package/dist/docs/demos/heater.mdx +0 -10
  362. package/dist/docs/demos/office-chair.mdx +0 -8
  363. package/dist/docs/demos/office-desk.mdx +0 -8
  364. package/dist/docs/demos/ring.mdx +0 -9
  365. package/dist/docs/dimensions/3d-scene-integration/angle-indicators.mdx +0 -2
  366. package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +0 -2
  367. package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +0 -2
  368. package/dist/docs/dimensions/3d-scene-integration/editable-offset-indicator.mdx +0 -6
  369. package/dist/docs/dimensions/3d-scene-integration/editable-size-indicator.mdx +0 -4
  370. package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +0 -4
  371. package/dist/docs/dimensions/3d-scene-integration/offset-indicator.mdx +0 -6
  372. package/dist/docs/dimensions/3d-scene-integration/overlap-offset-demo.mdx +0 -6
  373. package/dist/docs/dimensions/input-controls/distance-slider.mdx +6 -6
  374. package/dist/docs/dimensions/selection-controls/list-selector.mdx +0 -2
  375. package/dist/docs/dimensions/selection-controls/toggle-selector.mdx +0 -2
  376. package/dist/docs/drag-and-drop/drag-handle.mdx +0 -1
  377. package/dist/docs/drag-and-drop/hotspot-handle.mdx +0 -1
  378. package/dist/docs/drag-and-drop/no-selection.mdx +0 -1
  379. package/dist/docs/drag-and-drop/planes.mdx +0 -3
  380. package/dist/docs/drag-and-drop/room-planner.mdx +0 -6
  381. package/dist/docs/drag-and-drop/rotatable.mdx +0 -1
  382. package/dist/docs/drag-and-drop/snapping/auto-rotation-demo.mdx +0 -2
  383. package/dist/docs/drag-and-drop/snapping/label-matching-demo.mdx +0 -2
  384. package/dist/docs/drag-and-drop/snapping/multi-snap-composition-demo.mdx +0 -2
  385. package/dist/docs/drag-and-drop/snapping/nested-entity-demo.mdx +0 -2
  386. package/dist/docs/drag-and-drop/snapping/priority-demo.mdx +0 -2
  387. package/dist/docs/drag-and-drop/snapping/snap-axis-demo.mdx +0 -2
  388. package/dist/docs/drag-and-drop/snapping/snap-edge-demo.mdx +0 -2
  389. package/dist/docs/drag-and-drop/snapping/snap-plane-demo.mdx +0 -5
  390. package/dist/docs/drag-and-drop/snapping/snap-point-demo.mdx +0 -2
  391. package/dist/docs/drag-and-drop/spatial-constraints/collision-system.mdx +0 -2
  392. package/dist/docs/drag-and-drop/spatial-constraints/disjoint-and-within.mdx +0 -6
  393. package/dist/docs/drag-and-drop/spatial-constraints/geometry-override.mdx +0 -4
  394. package/dist/docs/drag-and-drop/spatial-constraints/multiple-collision-meshes.mdx +0 -4
  395. package/dist/docs/drag-and-drop/spatial-constraints/touches.mdx +0 -4
  396. package/dist/docs/drag-and-drop/swap.mdx +0 -4
  397. package/dist/docs/fabs/basic.mdx +8 -12
  398. package/dist/docs/fabs/layout.mdx +0 -7
  399. package/dist/docs/index.json +4 -4
  400. package/dist/docs/integrations/lifecycle-providers.mdx +0 -12
  401. package/dist/docs/integrations/onloadprovider.mdx +0 -3
  402. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -2
  403. package/dist/docs/integrations/webcomponent-api/preset-tags.mdx +0 -1
  404. package/dist/docs/layouts/custom-layout.mdx +1 -41
  405. package/dist/docs/layouts/custom-price.mdx +0 -2
  406. package/dist/docs/layouts/custom-theme-handler.mdx +0 -4
  407. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3 -34
  408. package/dist/docs/layouts/gallery/corvid-drone.mdx +0 -29
  409. package/dist/docs/layouts/gallery/fenwick-window.mdx +0 -25
  410. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +0 -27
  411. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +0 -29
  412. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +2 -35
  413. package/dist/docs/layouts/gallery/sunfold-solar.mdx +0 -26
  414. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +0 -46
  415. package/dist/docs/layouts/header/custom.mdx +0 -2
  416. package/dist/docs/layouts/icon-sets.mdx +0 -6
  417. package/dist/docs/layouts/phoenix-elements.mdx +0 -4
  418. package/dist/docs/layouts/phoenix-handlers.mdx +19 -28
  419. package/dist/docs/layouts/presets/action-and-overlay.mdx +0 -8
  420. package/dist/docs/layouts/presets/custom.mdx +6 -13
  421. package/dist/docs/layouts/preview/always-expand.mdx +4 -14
  422. package/dist/docs/layouts/preview/always.mdx +4 -14
  423. package/dist/docs/layouts/preview/auto-presets.mdx +4 -14
  424. package/dist/docs/layouts/preview/auto.mdx +4 -14
  425. package/dist/docs/layouts/preview/never.mdx +4 -14
  426. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +18 -13
  427. package/dist/docs/layouts/sidebar/property-page-stack.mdx +0 -2
  428. package/dist/docs/layouts/sidebar/property-page.mdx +0 -2
  429. package/dist/docs/layouts/sidebar/tabs.mdx +0 -4
  430. package/dist/docs/layouts/sidebar-footer/custom.mdx +0 -2
  431. package/dist/docs/layouts/sidebar-footer/universal.mdx +0 -10
  432. package/dist/docs/layouts/tool-controls.mdx +0 -1
  433. package/dist/docs/layouts/toolbar.mdx +0 -4
  434. package/dist/docs/layouts/universal.mdx +2 -10
  435. package/dist/docs/other-features/client-side-rendering/camera-padding.mdx +0 -2
  436. package/dist/docs/other-features/client-side-rendering/custom.mdx +0 -6
  437. package/dist/docs/other-features/client-side-rendering/declarative.mdx +0 -4
  438. package/dist/docs/other-features/client-side-rendering/postprocessing.mdx +0 -6
  439. package/dist/docs/other-features/component-filters.mdx +0 -7
  440. package/dist/docs/other-features/currency.mdx +5 -6
  441. package/dist/docs/other-features/domain-actions.mdx +0 -5
  442. package/dist/docs/other-features/dynamic-component-attachments.mdx +75 -46
  443. package/dist/docs/other-features/error-5xx.mdx +0 -2
  444. package/dist/docs/other-features/navigation-hotspot.mdx +0 -5
  445. package/dist/docs/other-features/not-found-404.mdx +0 -2
  446. package/dist/docs/other-features/projected-entities.mdx +0 -5
  447. package/dist/docs/other-features/side-effects.mdx +0 -7
  448. package/dist/docs/other-features/transformers.mdx +101 -96
  449. package/dist/docs/other-features/violation-messages.mdx +0 -4
  450. package/dist/docs/other-features/violation-severity.mdx +2 -3
  451. package/dist/docs/performance/clone-highlight.mdx +0 -7
  452. package/dist/docs/performance/dynamic-components.mdx +0 -6
  453. package/dist/docs/performance/editable-dimension-stress-test.mdx +0 -2
  454. package/dist/docs/performance/fast-highlight.mdx +0 -7
  455. package/dist/docs/performance/general.mdx +0 -7
  456. package/dist/docs/performance/render-isolation.mdx +0 -6
  457. package/dist/docs/phoenix/admin.mdx +75 -100
  458. package/dist/docs/phoenix/application-states.mdx +45 -27
  459. package/dist/docs/phoenix/components.mdx +53 -46
  460. package/dist/docs/phoenix/configurator-interface.mdx +196 -116
  461. package/dist/docs/phoenix/deployments.mdx +11 -1
  462. package/dist/docs/phoenix/domain-model.mdx +20 -15
  463. package/dist/docs/phoenix/expression-context.mdx +3 -29
  464. package/dist/docs/phoenix/getting-started.mdx +0 -2
  465. package/dist/docs/phoenix/localization.mdx +64 -54
  466. package/dist/docs/phoenix/migration-guide.mdx +10 -11
  467. package/dist/docs/phoenix/phoenix-cli.mdx +21 -12
  468. package/dist/docs/phoenix/project-structure.mdx +52 -59
  469. package/dist/docs/phoenix/quickstart.mdx +1 -3
  470. package/dist/docs/phoenix/sdk-builder-workflow.mdx +3 -9
  471. package/dist/docs/phoenix/state-management.mdx +18 -16
  472. package/dist/docs/phoenix/testing.mdx +6 -1
  473. package/dist/docs/phoenix/webhooks.mdx +4 -0
  474. package/dist/docs/recipes-and-delete/delete-entity.mdx +3 -6
  475. package/dist/docs/recipes-and-delete/dynamic-root-entity.mdx +0 -2
  476. package/dist/docs/recipes-and-delete/grouped-button.mdx +0 -3
  477. package/dist/docs/recipes-and-delete/grouped-panel.mdx +0 -3
  478. package/dist/docs/recipes-and-delete/horizontal.mdx +3 -6
  479. package/dist/docs/recipes-and-delete/recipe-hierarchy-lists.mdx +0 -3
  480. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +0 -5
  481. package/dist/docs/recipes-and-delete/replace-dropdown.mdx +3 -6
  482. package/dist/docs/recipes-and-delete/replace-panel.mdx +0 -7
  483. package/dist/docs/recipes-and-delete/simple.mdx +3 -6
  484. package/dist/docs/recipes-and-delete/vertical.mdx +3 -6
  485. package/dist/docs/relations/aliases.mdx +0 -2
  486. package/dist/docs/relations/all-of-type.mdx +0 -4
  487. package/dist/docs/relations/child-nullable.mdx +0 -4
  488. package/dist/docs/relations/child-required.mdx +0 -2
  489. package/dist/docs/relations/collection-direct.mdx +0 -4
  490. package/dist/docs/relations/collection-indirect.mdx +0 -4
  491. package/dist/docs/relations/collection-multiple.mdx +0 -2
  492. package/dist/docs/relations/cross-reference.mdx +0 -2
  493. package/dist/docs/relations/hierarchy.mdx +0 -2
  494. package/dist/docs/selection-and-highlight/canvas.mdx +0 -1
  495. package/dist/docs/selection-and-highlight/disable-highlight-per-object.mdx +0 -1
  496. package/dist/docs/selection-and-highlight/disable-highlight.mdx +0 -1
  497. package/dist/docs/selection-and-highlight/effects/outline.mdx +0 -3
  498. package/dist/docs/selection-and-highlight/effects/overlay.mdx +0 -3
  499. package/dist/docs/selection-and-highlight/fast-emissive-highlight.mdx +0 -3
  500. package/dist/docs/selection-and-highlight/group-highlighting.mdx +0 -1
  501. package/dist/docs/selection-and-highlight/hierarchy.mdx +100 -151
  502. package/dist/docs/selection-and-highlight/hotspots.mdx +0 -1
  503. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
  504. package/dist/domain/application/GetThemeHandler.d.ts +1 -1
  505. package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
  506. package/dist/domain/application/application-config.d.ts +1 -3
  507. package/dist/domain/application/assistant/assistant-fields.d.ts +1 -1
  508. package/dist/domain/application/assistant/assistant-value-type.d.ts +1 -1
  509. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +1 -2
  510. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +1 -2
  511. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -2
  512. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  513. package/dist/domain/application/assistant/index.d.ts +0 -4
  514. package/dist/domain/application/assistant/index.js +1 -1
  515. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +1 -1
  516. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +1 -1
  517. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  518. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +1 -1
  519. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +1 -2
  520. package/dist/domain/application/assistant-field-options.d.ts +1 -1
  521. package/dist/domain/application/assistant-mutations.d.ts +1 -1
  522. package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
  523. package/dist/domain/application/configurator-builder.d.ts +1 -2
  524. package/dist/domain/application/create-initial-published-data.d.ts +2 -1
  525. package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
  526. package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
  527. package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
  528. package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
  529. package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
  530. package/dist/domain/core/invariant/violation.d.ts +3 -2
  531. package/dist/domain/domain-builder/domain-builder.d.ts +1 -1
  532. package/dist/domain/domain-builder/domain-builder.js +1 -1
  533. package/dist/domain/domain-context/transformers/context.d.ts +4 -2
  534. package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -1
  535. package/dist/domain/domain-runtime/domain-runtime.d.ts +24 -24
  536. package/dist/domain/domain-runtime/index.d.ts +0 -1
  537. package/dist/domain/domain-runtime/index.js +1 -1
  538. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +1 -1
  539. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -1
  540. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  541. package/dist/domain/domain-runtime/spec/index.js +1 -1
  542. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  543. package/dist/domain/domain-runtime/spec/{module-checks/resolve-imported-transformers.d.ts → resolve-imported-transformers.d.ts} +3 -3
  544. package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
  545. package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -5
  546. package/dist/domain/domain-runtime/spec/types.d.ts +2 -2
  547. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
  548. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  549. package/dist/domain/extensions/export-images/index.d.ts +1 -1
  550. package/dist/domain/extensions/export-images/index.js +1 -1
  551. package/dist/domain/extensions/index.d.ts +1 -1
  552. package/dist/domain/extensions/index.js +1 -1
  553. package/dist/domain/index.d.ts +13 -1
  554. package/dist/domain/index.js +1 -1
  555. package/dist/domain/mocks/create-test-application-config.d.ts +1 -1
  556. package/dist/domain/spec/index.d.ts +3 -8
  557. package/dist/domain/spec/index.js +1 -1
  558. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.d.ts +1 -1
  559. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/find-assistant-form-element-errors.d.ts +1 -1
  560. package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
  561. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/index.d.ts +2 -3
  562. package/dist/domain/spec/modules/index.js +1 -0
  563. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/merge-expression-modules.d.ts +2 -2
  564. package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
  565. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/project-modules.d.ts +1 -1
  566. package/dist/domain/spec/modules/project-modules.js +1 -0
  567. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.d.ts +1 -1
  568. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.d.ts +1 -1
  569. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.d.ts +1 -1
  570. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.d.ts +1 -1
  571. package/dist/domain/spec/phx/index.d.ts +1 -0
  572. package/dist/domain/spec/phx/index.js +1 -0
  573. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-application-types.d.ts +1 -1
  574. package/dist/domain/spec/phx/phx-application-types.js +1 -0
  575. package/dist/domain/spec/phx/phx-domain.js +1 -0
  576. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-model.d.ts +2 -2
  577. package/dist/domain/spec/phx/phx-model.js +1 -0
  578. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.d.ts +1 -2
  579. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-runtime.d.ts +7 -6
  580. package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
  581. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-spec-runtime.d.ts +2 -2
  582. package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  583. package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
  584. package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
  585. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.d.ts +1 -1
  586. package/dist/{application-spec/generate-application → domain/spec}/runtime/application-runtime.d.ts +8 -6
  587. package/dist/domain/spec/runtime/application-runtime.js +1 -0
  588. package/dist/{application-spec/generate-application → domain/spec}/runtime/application-spec-slice.d.ts +3 -1
  589. package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
  590. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-runtime.d.ts +8 -10
  591. package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
  592. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-spec-runtime.d.ts +2 -2
  593. package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  594. package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
  595. package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
  596. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.d.ts +1 -1
  597. package/dist/{application-spec/generate-application → domain/spec}/runtime/create-application.d.ts +3 -2
  598. package/dist/domain/spec/runtime/create-application.js +1 -0
  599. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/expression-runtime.d.ts +5 -2
  600. package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
  601. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/generate-memo-eval-plan-runtime.d.ts +2 -1
  602. package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
  603. package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
  604. package/dist/domain/spec/runtime/expressions/index.js +1 -0
  605. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.d.ts +2 -1
  606. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.d.ts +4 -2
  607. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/recipe-defaults.d.ts +1 -1
  608. package/dist/domain/spec/runtime/factory-data/recipe-defaults.js +1 -0
  609. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/static-violations.d.ts +2 -1
  610. package/dist/domain/spec/runtime/factory-data/static-violations.js +1 -0
  611. package/dist/{application-spec/generate-application → domain/spec}/runtime/generate-runtime-instance.d.ts +1 -1
  612. package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
  613. package/dist/domain/spec/runtime/index.d.ts +13 -0
  614. package/dist/domain/spec/runtime/index.js +1 -0
  615. package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/migration-runtime.d.ts +2 -2
  616. package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
  617. package/dist/{application-spec/generate-application/runtime/admin-runtime → domain/spec/runtime/model}/admin-model-runtime.d.ts +4 -2
  618. package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
  619. package/dist/{application-spec/generate-application/runtime/configurator-runtime → domain/spec/runtime/model}/configurator-model-runtime.d.ts +4 -2
  620. package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
  621. package/dist/domain/spec/runtime/model/index.d.ts +2 -0
  622. package/dist/domain/spec/runtime/model/index.js +1 -0
  623. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/build-sdk-optic.d.ts +3 -4
  624. package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
  625. package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
  626. package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
  627. package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
  628. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.d.ts +4 -13
  629. package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
  630. package/dist/domain/spec/runtime/optics/index.js +1 -0
  631. package/dist/{application-spec/caching → domain/spec/runtime}/runtime-reference-store.d.ts +1 -5
  632. package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
  633. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.d.ts +3 -2
  634. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.d.ts +2 -2
  635. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.d.ts +1 -1
  636. package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
  637. package/dist/domain/spec/runtime/sections/index.js +1 -0
  638. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.d.ts +3 -2
  639. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.d.ts +1 -1
  640. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.d.ts +2 -2
  641. package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  642. package/dist/domain/spec/runtime/spec-code/spec-code-module.js +1 -0
  643. package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-runtime.d.ts +3 -3
  644. package/dist/domain/spec/runtime/spec-runtime.js +1 -0
  645. package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
  646. package/dist/domain/spec/runtime-spec/index.js +1 -0
  647. package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.d.ts +7 -1
  648. package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.d.ts +1 -1
  649. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
  650. package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
  651. package/dist/domain/spec/sections/assistant/index.js +1 -0
  652. package/dist/domain/spec/sections/index.d.ts +1 -0
  653. package/dist/domain/spec/sections/index.js +1 -1
  654. package/dist/domain/system-components/phoenix-entity-elements/child-entity-card-selector.d.ts +2 -3
  655. package/dist/domain/system-components/phoenix-entity-elements/child-entity-list-selector.d.ts +2 -3
  656. package/dist/domain/system-components/phoenix-entity-elements/child-entity-toggle-selector.d.ts +2 -3
  657. package/dist/i18n/locales/cs/messages.js +1 -1
  658. package/dist/i18n/locales/da/messages.js +1 -1
  659. package/dist/i18n/locales/de/messages.js +1 -1
  660. package/dist/i18n/locales/de-AT/messages.js +1 -1
  661. package/dist/i18n/locales/en/messages.js +1 -1
  662. package/dist/i18n/locales/en-AU/messages.js +1 -1
  663. package/dist/i18n/locales/en-GB/messages.js +1 -1
  664. package/dist/i18n/locales/es/messages.js +1 -1
  665. package/dist/i18n/locales/fr/messages.js +1 -1
  666. package/dist/i18n/locales/hu/messages.js +1 -1
  667. package/dist/i18n/locales/it/messages.js +1 -1
  668. package/dist/i18n/locales/nl/messages.js +1 -1
  669. package/dist/i18n/locales/pl/messages.js +1 -1
  670. package/dist/i18n/locales/pt/messages.js +1 -1
  671. package/dist/i18n/locales/ro/messages.js +1 -1
  672. package/dist/i18n/locales/sk/messages.js +1 -1
  673. package/dist/i18n/locales/tr/messages.js +1 -1
  674. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
  675. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  676. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
  677. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
  678. package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
  679. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  680. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  681. package/dist/phoenix/application-spec/index.d.ts +1 -0
  682. package/dist/phoenix/application-spec/index.js +1 -1
  683. package/dist/phoenix/application-spec/project-files.d.ts +8 -2
  684. package/dist/phoenix/application-spec/project-files.js +1 -1
  685. package/dist/phoenix/commands/clean.js +1 -1
  686. package/dist/phoenix/commands/deploy.js +3 -3
  687. package/dist/phoenix/commands/dev.js +4 -5
  688. package/dist/phoenix/commands/story-dev.js +2 -2
  689. package/dist/phoenix/editor-server/commands-router.js +1 -1
  690. package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
  691. package/dist/phoenix/editor-server/editor-server.js +1 -1
  692. package/dist/phoenix/editor-server/spec-router.js +1 -1
  693. package/dist/phoenix/editor-server/trpc.d.ts +2 -12
  694. package/dist/phoenix/lingui/lingui.d.ts +4 -4
  695. package/dist/phoenix/scripts/docs-utils.js +1 -1
  696. package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -8
  697. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  698. package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
  699. package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
  700. package/dist/phoenix/services/deployment/index.d.ts +2 -0
  701. package/dist/phoenix/services/deployment/index.js +1 -0
  702. package/dist/phoenix/services/index.d.ts +2 -1
  703. package/dist/phoenix/services/index.js +1 -1
  704. package/dist/phoenix/services/phoenix-store.d.ts +3 -0
  705. package/dist/phoenix/services/phoenix-store.js +1 -1
  706. package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
  707. package/dist/phoenix/services/session/editor-server-handle.js +1 -0
  708. package/dist/phoenix/services/session/index.d.ts +2 -0
  709. package/dist/phoenix/services/session/index.js +1 -0
  710. package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
  711. package/dist/phoenix/services/session/phoenix-application.js +2 -0
  712. package/dist/phoenix/services/source-archive.d.ts +2 -0
  713. package/dist/phoenix/services/source-archive.js +1 -1
  714. package/dist/phoenix/services/swc.d.ts +5 -4
  715. package/dist/phoenix/services/swc.js +2 -2
  716. package/dist/phoenix/services/vite-config.js +1 -1
  717. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  718. package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
  719. package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
  720. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
  721. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
  722. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
  723. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
  724. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
  725. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
  726. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
  727. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
  728. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
  729. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
  730. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
  731. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
  732. package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
  733. package/dist/react-sdk/configurator-ui-elements/index.js +1 -0
  734. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  735. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  736. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  737. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +7 -1
  738. package/dist/react-sdk/domain-controls/ChildEntityCardSelector.d.ts +2 -3
  739. package/dist/react-sdk/domain-controls/ChildEntityListSelector.d.ts +2 -3
  740. package/dist/react-sdk/domain-controls/ChildEntityToggleSelector.d.ts +2 -3
  741. package/dist/react-sdk/domain-controls/hooks/use-cook-replace-recipes.d.ts +2 -2
  742. package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
  743. package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
  744. package/dist/react-sdk/index.d.ts +2 -0
  745. package/dist/react-sdk/index.js +1 -1
  746. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
  747. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
  748. package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
  749. package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
  750. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
  751. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
  752. package/dist/react-sdk/provider-slots/index.d.ts +3 -0
  753. package/dist/react-sdk/provider-slots/index.js +1 -0
  754. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  755. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  756. package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
  757. package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
  758. package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
  759. package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
  760. package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
  761. package/dist/ui-sdk/icons/__generated/ChatCircleText.d.ts +3 -0
  762. package/dist/ui-sdk/icons/__generated/ChatCircleText.js +1 -0
  763. package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
  764. package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
  765. package/dist/ui-sdk/icons/__generated/PencilSimpleLine.d.ts +3 -0
  766. package/dist/ui-sdk/icons/__generated/PencilSimpleLine.js +1 -0
  767. package/dist/ui-sdk/icons/__generated/index.d.ts +6 -0
  768. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  769. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  770. package/dist/ui-sdk/theme/types.d.ts +1 -1
  771. package/package.json +3 -3
  772. package/schema/domain-spec.json +22 -4
  773. package/dist/application-spec/caching/runtime-reference-store.js +0 -1
  774. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
  775. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
  776. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
  777. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -166
  778. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
  779. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
  780. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
  781. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -115
  782. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
  783. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
  784. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
  785. package/dist/application-spec/generate-application/implementations/phx-application-types.js +0 -1
  786. package/dist/application-spec/generate-application/implementations/phx-domain.js +0 -1
  787. package/dist/application-spec/generate-application/implementations/phx-model.js +0 -1
  788. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
  789. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
  790. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +0 -1
  791. package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
  792. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +0 -1
  793. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
  794. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
  795. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +0 -1
  796. package/dist/application-spec/generate-application/runtime/create-application.js +0 -1
  797. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +0 -1
  798. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +0 -1
  799. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
  800. package/dist/application-spec/generate-application/runtime/index.d.ts +0 -8
  801. package/dist/application-spec/generate-application/runtime/index.js +0 -1
  802. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +0 -1
  803. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
  804. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -8
  805. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
  806. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
  807. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
  808. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
  809. package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
  810. package/dist/application-spec/generate-application/runtime/spec-runtime.js +0 -1
  811. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +0 -5
  812. package/dist/application-spec/generate-application/runtime-spec/index.js +0 -1
  813. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
  814. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
  815. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +0 -1
  816. package/dist/domain/domain-runtime/spec/module-checks/index.js +0 -1
  817. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +0 -1
  818. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +0 -1
  819. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +0 -1
  820. package/dist/phoenix/services/phoenix-application.d.ts +0 -21
  821. package/dist/phoenix/services/phoenix-application.js +0 -1
  822. /package/dist/{application-spec/generate-application/runtime/spec-code/spec-code-module.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.js} +0 -0
  823. /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.d.ts +0 -0
  824. /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.js +0 -0
  825. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.d.ts +0 -0
  826. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.js +0 -0
  827. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.d.ts +0 -0
  828. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.js +0 -0
  829. /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.d.ts +0 -0
  830. /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.js +0 -0
  831. /package/dist/domain/{domain-runtime → spec}/errors/index.d.ts +0 -0
  832. /package/dist/domain/{domain-runtime → spec}/errors/index.js +0 -0
  833. /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.d.ts +0 -0
  834. /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.js +0 -0
  835. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.js +0 -0
  836. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts +0 -0
  837. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js +0 -0
  838. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js +0 -0
  839. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.js +0 -0
  840. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.js +0 -0
  841. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js +0 -0
  842. /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-domain.d.ts +0 -0
  843. /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.js +0 -0
  844. /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
  845. /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
  846. /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.js +0 -0
  847. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.js +0 -0
  848. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.d.ts +0 -0
  849. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.js +0 -0
  850. /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.d.ts +0 -0
  851. /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.js +0 -0
  852. /package/dist/domain/{application/assistant/assistant-resolved-manifest.js → spec/runtime/optics/built-component-optic.js} +0 -0
  853. /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.js +0 -0
  854. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
  855. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.js +0 -0
  856. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
  857. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
  858. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
  859. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
  860. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.d.ts +0 -0
  861. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.js +0 -0
  862. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.js +0 -0
  863. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/spec-code-module.d.ts +0 -0
  864. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.d.ts +0 -0
  865. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.js +0 -0
  866. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.d.ts +0 -0
  867. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.js +0 -0
  868. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.d.ts +0 -0
  869. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.js +0 -0
  870. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.js +0 -0
  871. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.js +0 -0
  872. /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.d.ts +0 -0
  873. /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.js +0 -0
  874. /package/dist/domain/{application → spec/sections}/assistant/assistant-resolved-manifest.d.ts +0 -0
  875. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.d.ts +0 -0
  876. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.js +0 -0
  877. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.d.ts +0 -0
  878. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.js +0 -0
  879. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.d.ts +0 -0
  880. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.js +0 -0
  881. /package/dist/domain/{application → spec/sections}/assistant/form/index.d.ts +0 -0
  882. /package/dist/domain/{application → spec/sections}/assistant/form/index.js +0 -0
  883. /package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +0 -0
  884. /package/dist/phoenix/{commands → services/deployment}/generated-env-markers.js +0 -0
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Tooltip as n,styled as a}from"@mui/material";import{useCallback as o,useRef as i,useState as l}from"react";import{useLocalizable as r}from"#package/react-sdk";import{PhxIcon as s}from"#package/ui-sdk";import{ComposerField as m,ComposerFrame as c,ComposerInput as p,ComposerPrimaryButton as d,ComposerToolButton as u}from"../../composer/index.js";import{AssistantPanelName as h}from"../../theme.js";let f={id:"sdk.assistant.annotation.comment.placeholder",message:"Add a comment…"},g={id:"sdk.assistant.annotation.comment.delete",message:"Delete"},k={id:"sdk.assistant.annotation.comment.save",message:"Save"},x=a(c,{name:h,slot:"annotationComment"})(({theme:{palette:e,shadows:t}})=>({background:e.background.paper,boxShadow:t[6],inlineSize:"min(280px, 80cqw)",position:"absolute",zIndex:1})),v=a("div")(({theme:{spacing:e}})=>({cursor:"default",display:"flex",gap:e(.5),gridColumn:2}));export const AnnotationComment=({point:a,comment:c,onDelete:h,onSave:C})=>{let[b,S]=l(c),w=i(null),z=r(f),D=r(g),j=r(k),y=o(e=>{e.stopPropagation(),e.target===e.currentTarget&&(e.preventDefault(),w.current?.focus())},[]),E=o(e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),C(b))},[b,C]);return t(x,{style:(({x:e,y:t})=>({...e<.5?{insetInlineStart:`${100*e}%`}:{insetInlineEnd:`${(1-e)*100}%`},...t<.5?{insetBlockStart:`calc(${100*t}% + 18px)`}:{insetBlockEnd:`calc(${(1-t)*100}% + 18px)`}}))(a),onPointerDown:e=>e.stopPropagation(),onMouseDown:y,children:[e(m,{children:e(p,{autoFocus:!0,multiline:!0,maxRows:4,placeholder:z,value:b,inputRef:w,inputProps:{"aria-label":z},onChange:e=>S(e.target.value),onKeyDown:E})}),t(v,{children:[e(n,{title:D,placement:"top",children:e(u,{size:"small","aria-label":D,onClick:h,children:e(s,{name:"Trash",fontSize:"small"})})}),e(n,{title:j,placement:"top",children:e(d,{size:"small","aria-label":j,onClick:()=>C(b),children:e(s,{name:"Check",fontSize:"small"})})})]})]})};
@@ -0,0 +1,18 @@
1
+ import type { AssistantAnnotation } from '../../../../application-runtime/index.js';
2
+ interface AnnotationEditorProps {
3
+ /** The frozen view, at the canvas's resolution. */
4
+ readonly view: HTMLCanvasElement;
5
+ /** Ends the editor with what the user made, or with `null` when they cancel. */
6
+ readonly finish: (annotation: AssistantAnnotation | null) => void;
7
+ }
8
+ /**
9
+ * The editor over the configurator: the frozen view, which cannot be moved or zoomed. Marker draws
10
+ * red strokes; Comment places a numbered pin where the user clicks and opens its comment, and opens
11
+ * the comment of a pin clicked again, with Delete. Hovering or tapping a pin shows its comment.
12
+ *
13
+ * Done drops the pins without a comment and flattens the strokes and the pin badges onto the view; it
14
+ * does nothing while there is nothing on it. Cancel, or Escape, ends it with nothing. Either way it
15
+ * fades out first. An editor that goes away before it ended ends as cancelled.
16
+ */
17
+ export declare const AnnotationEditor: ({ view, finish }: AnnotationEditorProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{Button as r,ToggleButton as i,ToggleButtonGroup as o}from"@mui/material";import{useCallback as a,useEffect as l,useLayoutEffect as s,useRef as m,useState as c}from"react";import{useLocalizable as d}from"#package/react-sdk";import{PhxIcon as u}from"#package/ui-sdk";import{AnnotationPin as p}from"../AnnotationPin.js";import{ANNOTATION_FADE_DURATION as h,ANNOTATION_STROKE_WIDTH as g,AnnotationPicture as f,AnnotationRoot as w,AnnotationStage as v,AnnotationSurface as k,AnnotationToolbar as x,annotationSurfaceSize as C}from"../annotation-layout.js";import{prefersReducedMotion as j}from"../prefers-reduced-motion.js";import{useEndOnUnmount as P}from"../use-end-on-unmount.js";import{AnnotationComment as y}from"./AnnotationComment.js";import{drawAnnotationStrokes as I}from"./annotation-drawing.js";import{annotationPointIn as b,closeAnnotationPin as E,createAnnotationPin as T,deleteAnnotationPin as D,keptAnnotationPins as M,replaceAnnotationPin as z}from"./annotation-pins.js";import{flattenAnnotation as A}from"./flatten-annotation.js";let R={id:"sdk.assistant.annotation.label",message:"Annotate the view"},S=(e,n)=>b(n.getBoundingClientRect(),e.clientX,e.clientY);export const AnnotationEditor=({view:b,finish:L})=>{let[O,W]=c("marker"),[B,F]=c([]),[H,U]=c([]),[X,Y]=c(null),[q,G]=c(!1),J=m(null),K=m(null),N=m(null),Q=m(null),V=m(!1),Z=m(L);Z.current=L;let $=d(R),_=B.length>0||M(H).length>0;P(()=>Z.current(null)),s(()=>{K.current?.getContext("2d")?.drawImage(b,0,0)},[b]);let ee=a(()=>{let e,n,t,r=N.current,i=r?.getContext("2d");if(!r||!i)return;let{width:o,height:a,ratio:l}=(e=globalThis.devicePixelRatio||1,n=Math.round(r.clientWidth*e),t=Math.round(r.clientHeight*e),(r.width!==n||r.height!==t)&&(r.width=n,r.height=t),{width:n,height:t,ratio:e}),s=Q.current;i.clearRect(0,0,o,a),I(i,s?[...B,s.points]:B,{width:o,height:a},g*l)},[B]);s(()=>{ee();let e=J.current;if(!e)return;let n=new ResizeObserver(ee);return n.observe(e),()=>n.disconnect()},[ee]);let en=a(async e=>{if(V.current)return;V.current=!0,G(!0);let[n]=await Promise.all([e(),new Promise(e=>setTimeout(e,j()?0:h))]);Z.current(n)},[]),et=a(()=>void en(async()=>null),[en]),er=a(()=>{let e=J.current;if(!_||!e)return;let n=M(H),t=b.width/e.clientWidth;en(async()=>{try{return{blob:await A({view:b,strokes:B,pins:n,scale:t}),pins:n}}catch{return null}})},[_,en,H,B,b]),ei=a(()=>{X&&U(e=>E(e,X)),Y(null)},[X]),eo=a(e=>{if(X){let n={...X,comment:e.trim()};U(e=>E(z(e,X,n),n))}Y(null)},[X]),ea=a(()=>{X&&U(e=>D(e,X)),Y(null)},[X]),el=a(e=>{e!==X&&(ei(),Y(e))},[ei,X]);l(()=>{let e=e=>{"Escape"!==e.key||e.isComposing||(X?ei():et())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ei,X,et]);let es=a(e=>{if(Q.current||!e.isPrimary)return;let n=S(e,e.currentTarget);if("comment"===O){if(X)ei();else{let e=T(n);U(n=>[...n,e]),Y(e)}return}e.currentTarget.setPointerCapture(e.pointerId),Q.current={pointerId:e.pointerId,points:[n]}},[ei,X,O]),em=a(e=>{let n=Q.current;n?.pointerId===e.pointerId&&(n.points.push(S(e,e.currentTarget)),ee())},[ee]),ec=a(e=>{let n=Q.current;n?.pointerId===e.pointerId&&(Q.current=null,F(e=>[...e,n.points]))},[]);return n(w,{role:"dialog","aria-modal":"true","aria-label":$,"data-leaving":q,children:[e(v,{children:n(k,{ref:J,sx:{...C(b.width,b.height),cursor:"comment"===O?"copy":"crosshair"},onPointerDown:es,onMouseDown:e=>"comment"===O&&e.preventDefault(),onPointerMove:em,onPointerUp:ec,onPointerCancel:ec,children:[e(f,{ref:K,width:b.width,height:b.height}),e(f,{ref:N}),H.map((n,t)=>e(p,{pin:n,index:t,variant:"badge",isEdited:n===X,onClick:"comment"===O?()=>el(n):void 0},t)),X&&e(y,{point:X,comment:X.comment,onDelete:ea,onSave:eo},H.indexOf(X))]})}),n(x,{children:[n(o,{exclusive:!0,size:"small",value:O,onChange:(e,n)=>{n&&(W(n),ei())},children:[n(i,{value:"marker",autoFocus:!0,children:[e(u,{name:"PencilSimpleLine",fontSize:"small",sx:{marginInlineEnd:.5}}),e(t,{id:"sdk.assistant.annotation.marker",message:"Marker"})]}),n(i,{value:"comment",children:[e(u,{name:"ChatCircleText",fontSize:"small",sx:{marginInlineEnd:.5}}),e(t,{id:"sdk.assistant.annotation.comment",message:"Comment"})]})]}),e(r,{variant:"text",onClick:et,children:e(t,{id:"sdk.assistant.annotation.cancel",message:"Cancel"})}),e(r,{variant:"contained",disabled:!_,onClick:er,children:e(t,{id:"sdk.assistant.annotation.done",message:"Done"})})]})]})};
@@ -0,0 +1,22 @@
1
+ /** A point on the annotated view, as fractions 0–1 of its width and height from its top left corner. */
2
+ export interface AnnotationPoint {
3
+ readonly x: number;
4
+ readonly y: number;
5
+ }
6
+ /** A marker stroke, as the points the pointer passed through. */
7
+ export type AnnotationStroke = ReadonlyArray<AnnotationPoint>;
8
+ interface Size {
9
+ readonly width: number;
10
+ readonly height: number;
11
+ }
12
+ /** Draws the strokes onto a 2D context of `size`, `lineWidth` in that context's pixels. */
13
+ export declare const drawAnnotationStrokes: (context: CanvasRenderingContext2D, strokes: ReadonlyArray<AnnotationStroke>, { width, height }: Size, lineWidth: number) => void;
14
+ /**
15
+ * Draws the numbered badge of a pin centred on `center`, `size` across in the context's pixels: the
16
+ * same red disc with a white ring and a white number as the editor shows over the view.
17
+ */
18
+ export declare const drawAnnotationPinBadge: (context: CanvasRenderingContext2D, number: number, center: {
19
+ readonly x: number;
20
+ readonly y: number;
21
+ }, size: number) => void;
22
+ export {};
@@ -0,0 +1 @@
1
+ import{ANNOTATION_COLOR as t}from"../annotation-layout.js";export const drawAnnotationStrokes=(e,n,{width:o,height:i},l)=>{for(let f of(e.strokeStyle=t,e.fillStyle=t,e.lineWidth=l,e.lineCap="round",e.lineJoin="round",n)){let[t,...n]=f;if(void 0!==t){if(0===n.length){e.beginPath(),e.arc(t.x*o,t.y*i,l/2,0,2*Math.PI),e.fill();continue}for(let l of(e.beginPath(),e.moveTo(t.x*o,t.y*i),n))e.lineTo(l.x*o,l.y*i);e.stroke()}}};export const drawAnnotationPinBadge=(e,n,o,i)=>{e.beginPath(),e.arc(o.x,o.y,i/2,0,2*Math.PI),e.fillStyle=t,e.fill(),e.lineWidth=i/13,e.strokeStyle="#fff",e.stroke(),e.fillStyle="#fff",e.font=`bold ${Math.round(.5*i)}px system-ui, sans-serif`,e.textAlign="center",e.textBaseline="middle",e.fillText(String(n),o.x,o.y)};
@@ -0,0 +1,22 @@
1
+ import type { AssistantAnnotationPin } from '@salsita-ai/contracts/assistant';
2
+ import type { AnnotationPoint } from './annotation-drawing.js';
3
+ /**
4
+ * The pins of an annotation being edited. A pin's number is its position, from 1, so deleting one
5
+ * renumbers the pins after it.
6
+ */
7
+ export type AnnotationPins = ReadonlyArray<AssistantAnnotationPin>;
8
+ /** A pin placed at `point`, with no comment yet. */
9
+ export declare const createAnnotationPin: ({ x, y }: AnnotationPoint) => AssistantAnnotationPin;
10
+ export declare const replaceAnnotationPin: (pins: AnnotationPins, pin: AssistantAnnotationPin, replacement: AssistantAnnotationPin) => AnnotationPins;
11
+ export declare const deleteAnnotationPin: (pins: AnnotationPins, pin: AssistantAnnotationPin) => AnnotationPins;
12
+ /** The pins once the comment of `pin` closes: no pin is left without a comment, so a pin with none goes. */
13
+ export declare const closeAnnotationPin: (pins: AnnotationPins, pin: AssistantAnnotationPin) => AnnotationPins;
14
+ /** The pins an annotation keeps once it is done: those with a comment, renumbered, their comments trimmed. */
15
+ export declare const keptAnnotationPins: (pins: AnnotationPins) => AnnotationPins;
16
+ /** Where a point of the page is on a box, as fractions of it, kept within it. */
17
+ export declare const annotationPointIn: (box: {
18
+ readonly left: number;
19
+ readonly top: number;
20
+ readonly width: number;
21
+ readonly height: number;
22
+ }, clientX: number, clientY: number) => AnnotationPoint;
@@ -0,0 +1 @@
1
+ export const createAnnotationPin=({x:t,y:n})=>({x:t,y:n,comment:""});export const replaceAnnotationPin=(t,n,o)=>t.map(t=>t===n?o:t);export const deleteAnnotationPin=(t,n)=>t.filter(t=>t!==n);export const closeAnnotationPin=(t,n)=>n.comment.trim()?t:deleteAnnotationPin(t,n);export const keptAnnotationPins=t=>t.flatMap(t=>{let n=t.comment.trim();return n?[{...t,comment:n}]:[]});let t=t=>Math.min(1,Math.max(0,t));export const annotationPointIn=(n,o,e)=>({x:t((o-n.left)/n.width),y:t((e-n.top)/n.height)});
@@ -0,0 +1,17 @@
1
+ import type { AssistantAnnotationPin } from '@salsita-ai/contracts/assistant';
2
+ import { type AnnotationStroke } from './annotation-drawing.js';
3
+ interface FlattenAnnotationProps {
4
+ /** The frozen view, at the canvas's resolution. */
5
+ readonly view: HTMLCanvasElement;
6
+ readonly strokes: ReadonlyArray<AnnotationStroke>;
7
+ readonly pins: ReadonlyArray<AssistantAnnotationPin>;
8
+ /** Pixels of the view per CSS pixel it was shown at, so strokes and badges keep the size the user saw. */
9
+ readonly scale: number;
10
+ }
11
+ /**
12
+ * Flattens the view, the strokes and the numbered pin badges into one JPEG fitted within
13
+ * {@link ASSISTANT_IMAGE_MAX_SIDE}, like an image the user attaches. They are drawn at the view's
14
+ * resolution before it is fitted, so a high-DPR view keeps them as sharp as the rest.
15
+ */
16
+ export declare const flattenAnnotation: ({ view, strokes, pins, scale }: FlattenAnnotationProps) => Promise<Blob>;
17
+ export {};
@@ -0,0 +1 @@
1
+ import{ASSISTANT_IMAGE_MAX_SIDE as t,encodeAssistantImage as n,fitWithin as o}from"../../attachments/index.js";import{ANNOTATION_PIN_SIZE as e,ANNOTATION_STROKE_WIDTH as a}from"../annotation-layout.js";import{drawAnnotationPinBadge as h,drawAnnotationStrokes as i}from"./annotation-drawing.js";export const flattenAnnotation=async({view:r,strokes:d,pins:m,scale:g})=>{let s=document.createElement("canvas"),w={width:r.width,height:r.height};s.width=w.width,s.height=w.height;let c=s.getContext("2d");if(!c)throw Error("The browser gave no 2D canvas to flatten the annotation on.");return c.drawImage(r,0,0),i(c,d,w,a*g),m.forEach(({x:t,y:n},o)=>{h(c,o+1,{x:t*w.width,y:n*w.height},e*g)}),n(s,o(w,t))};
@@ -0,0 +1 @@
1
+ export { AnnotationEditor } from './AnnotationEditor.js';
@@ -0,0 +1 @@
1
+ export{AnnotationEditor}from"./AnnotationEditor.js";
@@ -0,0 +1,4 @@
1
+ export { AnnotationBadge } from './AnnotationBadge.js';
2
+ export { AnnotationOverlay } from './AnnotationOverlay.js';
3
+ export { MessageAnnotations } from './MessageAnnotations.js';
4
+ export { AnnotationHostContext } from './annotation-host-context.js';
@@ -0,0 +1 @@
1
+ export{AnnotationBadge}from"./AnnotationBadge.js";export{AnnotationOverlay}from"./AnnotationOverlay.js";export{MessageAnnotations}from"./MessageAnnotations.js";export{AnnotationHostContext}from"./annotation-host-context.js";
@@ -0,0 +1,2 @@
1
+ /** True when the user asked the system for less motion: the overlay then appears and goes at once. */
2
+ export declare const prefersReducedMotion: () => boolean;
@@ -0,0 +1 @@
1
+ export const prefersReducedMotion=()=>globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Runs `end` once the component is gone for good, so an overlay that is removed without being closed
3
+ * still ends. StrictMode unmounts and mounts a component again at once in development, so the end
4
+ * waits a task and is dropped when the component mounted again meanwhile.
5
+ */
6
+ export declare const useEndOnUnmount: (end: () => void) => void;
@@ -0,0 +1 @@
1
+ import{useEffect as r,useRef as t}from"react";export const useEndOnUnmount=e=>{let n=t(e),u=t(!1);n.current=e,r(()=>(u.current=!0,()=>{u.current=!1,setTimeout(()=>{u.current||n.current()})}),[])};
@@ -2,17 +2,25 @@
2
2
  * What the panel tells the user when the assistant failed:
3
3
  * - `notAvailable`: the server refuses this configuration or customer, and asking again will not help
4
4
  * - `busy`: the server is still answering an earlier message of this thread
5
+ * - `resting`: the assistant has used up its hourly allowance, and the message may be sent again later
6
+ * - `exhausted`: the assistant has used up its monthly allowance, and sending again will not help this month
5
7
  * - `unavailable`: anything else, including a dropped connection and a reply that broke off
6
8
  */
7
- export type AssistantFailureKind = 'notAvailable' | 'busy' | 'unavailable';
8
- export interface AssistantFailure {
9
- readonly kind: AssistantFailureKind;
9
+ export type AssistantFailureKind = 'notAvailable' | 'busy' | 'resting' | 'exhausted' | 'unavailable';
10
+ export type AssistantFailure = {
11
+ readonly kind: Exclude<AssistantFailureKind, 'resting'>;
10
12
  /** True when loading the thread again may help, so the panel offers "Try again". */
11
13
  readonly canRetry: boolean;
12
- }
14
+ } | {
15
+ readonly kind: 'resting';
16
+ readonly canRetry: false;
17
+ /** How long until the message may be sent again, rounded up to whole minutes. */
18
+ readonly minutes: number;
19
+ };
13
20
  /**
14
21
  * Maps a failed assistant request to what the panel shows, by the HTTP status the server answered
15
- * with. A failure without a status never reached the server or broke off mid-reply; it gets the same
16
- * generic message as an unknown status, because the chat client does not tell those apart.
22
+ * with and the seconds it asked to wait. A failure without a status never reached the server or broke
23
+ * off mid-reply; it gets the same generic message as an unknown status, because the chat client does
24
+ * not tell those apart.
17
25
  */
18
- export declare const describeAssistantFailure: (failedStatus: number | undefined) => AssistantFailure;
26
+ export declare const describeAssistantFailure: (failedStatus: number | undefined, retryAfterSeconds: number | undefined) => AssistantFailure;
@@ -1 +1 @@
1
- export const describeAssistantFailure=a=>403===a?{kind:"notAvailable",canRetry:!1}:409===a?{kind:"busy",canRetry:!0}:{kind:"unavailable",canRetry:!0};
1
+ export const describeAssistantFailure=(a,e)=>403===a?{kind:"notAvailable",canRetry:!1}:409===a?{kind:"busy",canRetry:!0}:429===a&&void 0!==e?{kind:"resting",canRetry:!1,minutes:Math.max(1,Math.ceil(e/60))}:429===a?{kind:"exhausted",canRetry:!1}:{kind:"unavailable",canRetry:!0};
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from 'react';
2
+ /** A thumbnail of a picture the user attached to a message, as the bubble shows it. */
3
+ export declare const MessageThumbnail: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").ButtonBaseOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
4
+ ref?: import("react").RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
5
+ }, "LinkComponent" | "TouchRippleProps" | "action" | "centerRipple" | "children" | "className" | "classes" | "disableRipple" | "disableTouchRipple" | "disabled" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "style" | "sx" | "tabIndex" | "touchRippleRef">, "LinkComponent" | "TouchRippleProps" | "about" | "accessKey" | "action" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "centerRipple" | "children" | "className" | "classes" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "disableRipple" | "disableTouchRipple" | "disabled" | "draggable" | "enterKeyHint" | "focusRipple" | "focusVisibleClassName" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hidden" | "id" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "lang" | "name" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onFocusVisible" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onResize" | "onResizeCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "prefix" | "property" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "role" | "security" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "sx" | "tabIndex" | "title" | "touchRippleRef" | "translate" | "type" | "typeof" | "unselectable" | "value" | "vocab"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
6
+ export declare const MessageThumbnailPicture: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
7
+ interface MessageImagesProps {
8
+ /** The images the user attached to the message, by the ids it references them by. */
9
+ readonly imageIds: readonly string[];
10
+ /** More thumbnails of the message, after its images, such as its annotations. */
11
+ readonly children?: ReactNode;
12
+ }
13
+ /**
14
+ * The images a user attached to a message, as thumbnails above its text. They are read from the
15
+ * server as soon as the bubble shows, through the same per-configuration cache as the screenshots;
16
+ * a click shows one larger in a popover.
17
+ */
18
+ export declare const MessageImages: ({ imageIds, children }: MessageImagesProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{ButtonBase as r,Popover as a,styled as o}from"@mui/material";import{useCallback as t,useMemo as s,useState as n}from"react";import{useLocalizable as l}from"#package/react-sdk";import{useScreenshotSrc as m}from"../screenshots/index.js";import{AssistantPanelName as d}from"../theme.js";let c={id:"sdk.assistant.message.image.open",message:"Show the attached image larger"},g=o("div",{name:d,slot:"messageImages"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(.75),justifyContent:"flex-end"}));export const MessageThumbnail=o(r,{name:d,slot:"messageImage"})(({theme:{palette:e,shape:i}})=>({background:e.action.hover,blockSize:64,borderRadius:i.borderRadius,inlineSize:64,overflow:"hidden",position:"relative"}));export const MessageThumbnailPicture=o("img")({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"});let p=o("img")(({theme:{shape:e}})=>({borderRadius:e.borderRadius,display:"block",maxBlockSize:"70vh",maxInlineSize:"min(80vw, 640px)"})),h=({imageId:i,onOpen:r})=>{let a=m(s(()=>({kind:"stored",imageId:i}),[i])),o=l(c);return e(MessageThumbnail,{"aria-label":o,disabled:void 0===a,onClick:e=>void 0!==a&&r(e,a),children:void 0!==a&&e(MessageThumbnailPicture,{src:a,alt:""})})};export const MessageImages=({imageIds:r,children:o})=>{let[s,l]=n(),m=t((e,i)=>{l({anchor:e.currentTarget,src:i})},[]),d=t(()=>l(void 0),[]);return i(g,{children:[r.map(i=>e(h,{imageId:i,onOpen:m},i)),o,e(a,{open:void 0!==s,anchorEl:s?.anchor,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{padding:1}}},children:s&&e(p,{src:s.src,alt:""})})]})};
@@ -0,0 +1,2 @@
1
+ export { MessageImages, MessageThumbnail, MessageThumbnailPicture } from './MessageImages.js';
2
+ export { ASSISTANT_IMAGE_MAX_SIDE, encodeAssistantImage, fitWithin, prepareImage } from './prepare-image.js';
@@ -0,0 +1 @@
1
+ export{MessageImages,MessageThumbnail,MessageThumbnailPicture}from"./MessageImages.js";export{ASSISTANT_IMAGE_MAX_SIDE,encodeAssistantImage,fitWithin,prepareImage}from"./prepare-image.js";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The longest side, in pixels, of an image the user attaches: the provider fits every image within
3
+ * 2048 × 2048 before the model reads it, so more would only cost upload time and storage.
4
+ */
5
+ export declare const ASSISTANT_IMAGE_MAX_SIDE = 2048;
6
+ interface Size {
7
+ readonly width: number;
8
+ readonly height: number;
9
+ }
10
+ /** The size that fits within `max` × `max`, keeping the aspect ratio and never enlarging. */
11
+ export declare const fitWithin: ({ width, height }: Size, max: number) => Size;
12
+ /**
13
+ * Draws `source` at `width` × `height` on a white background and encodes it as JPEG, the way every
14
+ * image the user sends is uploaded. Rejects when the browser has no 2D canvas or cannot encode.
15
+ */
16
+ export declare const encodeAssistantImage: (source: CanvasImageSource, { width, height }: Size) => Promise<Blob>;
17
+ /**
18
+ * Turns an image file the user attaches into what is uploaded: decoded, fitted within
19
+ * {@link ASSISTANT_IMAGE_MAX_SIDE} on each side and re-encoded as JPEG. Re-encoding drops the
20
+ * file's metadata, its location included, and fills a transparent background white. Rejects for a
21
+ * file the browser cannot decode.
22
+ */
23
+ export declare const prepareImage: (file: Blob) => Promise<Blob>;
24
+ export {};
@@ -0,0 +1 @@
1
+ export const ASSISTANT_IMAGE_MAX_SIDE=2048;export const fitWithin=({width:e,height:t},a)=>{let r=Math.min(1,a/e,a/t);return{width:Math.max(1,Math.round(e*r)),height:Math.max(1,Math.round(t*r))}};let e=async e=>{let t=URL.createObjectURL(e),a=new Image;a.src=t;try{return await a.decode(),a}finally{URL.revokeObjectURL(t)}};export const encodeAssistantImage=async(e,{width:t,height:a})=>{let r=document.createElement("canvas");r.width=t,r.height=a;let n=r.getContext("2d");if(!n)throw Error("The browser gave no 2D canvas to prepare the attached image on.");return n.fillStyle="#fff",n.fillRect(0,0,t,a),n.drawImage(e,0,0,t,a),new Promise((e,t)=>{r.toBlob(a=>a?e(a):t(Error("The browser could not encode the attached image as JPEG.")),"image/jpeg",.85)})};export const prepareImage=async t=>{let a=await e(t);return encodeAssistantImage(a,fitWithin({width:a.naturalWidth,height:a.naturalHeight},2048))};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The box that looks like the input, of the composer and of an annotation comment: the input on top across its
3
+ * whole width, so the buttons take none of it from a long text, and a thin row of buttons below. A click on its
4
+ * empty space is meant to type into the input.
5
+ */
6
+ export declare const ComposerFrame: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement>>, {}>;
7
+ export declare const ComposerToolButton: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
+ ref?: import("react").RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
9
+ }, "LinkComponent" | "TouchRippleProps" | "action" | "centerRipple" | "children" | "className" | "classes" | "color" | "disableFocusRipple" | "disableRipple" | "disableTouchRipple" | "disabled" | "edge" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "size" | "style" | "sx" | "tabIndex" | "touchRippleRef" | "variant">, "LinkComponent" | "TouchRippleProps" | "about" | "accessKey" | "action" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "centerRipple" | "children" | "className" | "classes" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "disableFocusRipple" | "disableRipple" | "disableTouchRipple" | "disabled" | "draggable" | "edge" | "enterKeyHint" | "focusRipple" | "focusVisibleClassName" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hidden" | "id" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "lang" | "name" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onFocusVisible" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onResize" | "onResizeCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "prefix" | "property" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "role" | "security" | "size" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "sx" | "tabIndex" | "title" | "touchRippleRef" | "translate" | "type" | "typeof" | "unselectable" | "value" | "variant" | "vocab"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
+ export declare const ComposerField: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
+ export declare const ComposerInput: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").InputBaseProps, keyof import("@mui/material").InputBaseProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
+ /** The button that sends what was typed. */
13
+ export declare const ComposerPrimaryButton: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
14
+ ref?: import("react").RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
15
+ }, "LinkComponent" | "TouchRippleProps" | "action" | "centerRipple" | "children" | "className" | "classes" | "color" | "disableFocusRipple" | "disableRipple" | "disableTouchRipple" | "disabled" | "edge" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "size" | "style" | "sx" | "tabIndex" | "touchRippleRef" | "variant">, "LinkComponent" | "TouchRippleProps" | "about" | "accessKey" | "action" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "autoSave" | "centerRipple" | "children" | "className" | "classes" | "color" | "content" | "contentEditable" | "contextMenu" | "dangerouslySetInnerHTML" | "datatype" | "defaultChecked" | "defaultValue" | "dir" | "disableFocusRipple" | "disableRipple" | "disableTouchRipple" | "disabled" | "draggable" | "edge" | "enterKeyHint" | "focusRipple" | "focusVisibleClassName" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hidden" | "id" | "inlist" | "inputMode" | "is" | "itemID" | "itemProp" | "itemRef" | "itemScope" | "itemType" | "key" | "lang" | "name" | "nonce" | "onAbort" | "onAbortCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAuxClick" | "onAuxClickCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onBlur" | "onBlurCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onChange" | "onChangeCapture" | "onClick" | "onClickCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onContextMenu" | "onContextMenuCapture" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onError" | "onErrorCapture" | "onFocus" | "onFocusCapture" | "onFocusVisible" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onInput" | "onInputCapture" | "onInvalid" | "onInvalidCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onLoad" | "onLoadCapture" | "onLoadStart" | "onLoadStartCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onPaste" | "onPasteCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerMove" | "onPointerMoveCapture" | "onPointerOut" | "onPointerOutCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerUp" | "onPointerUpCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onReset" | "onResetCapture" | "onResize" | "onResizeCapture" | "onScroll" | "onScrollCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onSelect" | "onSelectCapture" | "onStalled" | "onStalledCapture" | "onSubmit" | "onSubmitCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onWheel" | "onWheelCapture" | "prefix" | "property" | "radioGroup" | "ref" | "rel" | "resource" | "results" | "rev" | "role" | "security" | "size" | "slot" | "spellCheck" | "style" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "sx" | "tabIndex" | "title" | "touchRippleRef" | "translate" | "type" | "typeof" | "unselectable" | "value" | "variant" | "vocab"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1 @@
1
+ import{IconButton as o,InputBase as r,styled as a}from"@mui/material";import{hoverStyles as e}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";export const ComposerFrame=a("div",{name:n,slot:"inputFrame"})(({theme:{palette:o,spacing:r}})=>({alignItems:"center",border:`1px solid ${o.divider}`,borderRadius:12,cursor:"text",display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto",padding:r(.5),'&:focus-within, &[data-dragging="true"]':{borderColor:o.primary.main}}));export const ComposerToolButton=a(o,{name:n,slot:"attachButton"})(({theme:{palette:o}})=>({background:"transparent",border:"none",borderRadius:8,boxShadow:"none",color:o.text.secondary,padding:4,"&:hover":{background:"transparent"},...e({"&:hover":{background:o.action.hover,color:o.text.primary}}),"&.Mui-disabled":{background:"transparent",color:o.action.disabled}}));export const ComposerField=a("div")({display:"grid",gridColumn:"1 / -1",minInlineSize:0});export const ComposerInput=a(r,{name:n,slot:"input"})(({theme:{spacing:o,typography:r}})=>({...r.body2,flex:1,paddingBlock:o(.5),paddingInline:o(.75)}));export const ComposerPrimaryButton=a(o,{name:n,slot:"sendButton"})(({theme:{palette:o}})=>({background:o.primary.main,borderRadius:8,color:o.primary.contrastText,padding:4,"&:hover":{background:o.primary.main},...e({"&:hover":{background:o.primary.dark}}),"&.Mui-disabled":{background:o.action.disabledBackground,color:o.action.disabled}}));
@@ -0,0 +1 @@
1
+ export { ComposerField, ComposerFrame, ComposerInput, ComposerPrimaryButton, ComposerToolButton, } from './composer-frame.js';
@@ -0,0 +1 @@
1
+ export{ComposerField,ComposerFrame,ComposerInput,ComposerPrimaryButton,ComposerToolButton}from"./composer-frame.js";
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{styled as t}from"@mui/material";import{memo as n,useCallback as i,useEffect as r,useRef as o}from"react";import{sceneEntitySelectHotspotComponent as a,selectableComponent as l}from"#package/domain";import{FrontendAnalyticsFactory as s,useDomain as c,useFirstRenderedComponent as d,useHoveredDomainEntityId as m,useRenderedSelector as u,useSelectEntity as p,useSelectedDomainEntityId as k,useStoreSelector as y}from"#package/react-sdk";import{assistantReferenceStyles as f}from"../reference-link/index.js";import{AssistantPanelName as g}from"../theme.js";import{useEntityLinkSelection as h}from"./entity-link-selection.js";import{resolveEntityLinkState as v}from"./entity-link-state.js";let b=t("span",{name:g,slot:"entityLink"})(e=>({...f(e),'&[data-entity-link="plain"], &[data-entity-link="missing"]':{cursor:"auto","&:hover":{background:"none"}},'&[data-selected="true"]':{textDecorationStyle:"solid"}})),S={interactive:void 0,plain:"plain",missing:"muted"},j=({kind:t,isSelected:n,children:i})=>e(b,{"data-entity-link":t,"data-reference":S[t],"data-selected":n,children:i}),x=({id:t,isSelected:n,children:u})=>{let{navigationSystem:k}=c(),y=d({entityIds:[t],componentTypes:[l]}),f=d({entityIds:[t],componentTypes:[a]}),{kind:g,canHover:S}=v({isSelectable:null!=y,isHoverDisabled:y?.state.hoverable===!1,hasSelectHotspot:null!=f}),x=m()===t,E=p(s.AssistantEntityLinkClicked),T=h(),D=i(()=>{T?.remember(t),E(t)},[t,T,E]),H=o(!1),L=i(()=>{S&&(H.current=!0,k.debouncedToggleHover(t))},[S,t,k]),I=i(()=>{H.current&&(H.current=!1,k.debouncedToggleHover(null))},[k]),A=i(e=>{"touch"!==e.pointerType&&L()},[L]),C=i(e=>{e.currentTarget.matches(":focus-visible")&&L()},[L]),P=i(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),D())},[D]);return(r(()=>I,[S,I,t]),"interactive"!==g)?e(j,{kind:g,isSelected:n,children:u}):e(b,{role:"button",tabIndex:0,"data-entity-link":g,"data-selected":n,"data-hovered":S&&x,"aria-current":n?"true":void 0,onClick:D,onKeyDown:P,onPointerEnter:A,onPointerLeave:I,onFocus:C,onBlur:I,children:u})};export const AssistantEntityLink=n(({id:t,children:n})=>{let{domain:i}=c(),r=y(e=>null!=i.getEntity(t,e.state),[i,t]),o=u(e=>null!=i.getEntity(t,e.state),[i,t]),a=k()===t;return r?o?e(x,{id:t,isSelected:a,children:n}):e(j,{kind:"plain",isSelected:a,children:n}):e(j,{kind:"missing",isSelected:!1,children:n})});
1
+ import{jsx as e}from"react/jsx-runtime";import{styled as t}from"@mui/material";import{memo as n,useCallback as r,useEffect as i,useRef as o}from"react";import{sceneEntitySelectHotspotComponent as a,selectableComponent as l}from"#package/domain";import{FrontendAnalyticsFactory as c,useDomain as s,useFirstRenderedComponent as d,useHoveredDomainEntityId as m,useRenderedSelector as u,useSelectEntity as p,useSelectedDomainEntityId as k,useStoreSelector as y}from"#package/react-sdk";import{hoverStyles as f}from"#package/ui-sdk";import{assistantReferenceStyles as g}from"../reference-link/index.js";import{AssistantPanelName as h}from"../theme.js";import{useEntityLinkSelection as v}from"./entity-link-selection.js";import{resolveEntityLinkState as b}from"./entity-link-state.js";let S=t("span",{name:h,slot:"entityLink"})(e=>({...g(e),'&[data-entity-link="plain"], &[data-entity-link="missing"]':{cursor:"auto",...f({"&:hover":{background:"none"}})},'&[data-selected="true"]':{textDecorationStyle:"solid"}})),j={interactive:void 0,plain:"plain",missing:"muted"},x=({kind:t,isSelected:n,children:r})=>e(S,{"data-entity-link":t,"data-reference":j[t],"data-selected":n,children:r}),E=({id:t,isSelected:n,children:u})=>{let{navigationSystem:k}=s(),y=d({entityIds:[t],componentTypes:[l]}),f=d({entityIds:[t],componentTypes:[a]}),{kind:g,canHover:h}=b({isSelectable:null!=y,isHoverDisabled:y?.state.hoverable===!1,hasSelectHotspot:null!=f}),j=m()===t,E=p(c.AssistantEntityLinkClicked),T=v(),D=r(()=>{T?.remember(t),E(t)},[t,T,E]),H=o(!1),L=o(!1),I=o(!1),A=r(()=>{I.current&&(I.current=!1,k.debouncedToggleHover(null))},[k]),C=r(()=>{h&&(H.current||L.current)?(I.current=!0,k.debouncedToggleHover(t)):A()},[h,A,t,k]),P=r(e=>{"touch"!==e.pointerType&&(L.current=!0,C())},[C]),w=r(()=>{L.current=!1,C()},[C]),B=r(e=>{e.currentTarget.matches(":focus-visible")&&(H.current=!0,C())},[C]),F=r(()=>{H.current=!1,C()},[C]),K=r(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),D())},[D]);return(i(()=>A,[h,A,t]),"interactive"!==g)?e(x,{kind:g,isSelected:n,children:u}):e(S,{role:"button",tabIndex:0,"data-entity-link":g,"data-selected":n,"data-hovered":h&&j,"aria-current":n?"true":void 0,onClick:D,onKeyDown:K,onPointerEnter:P,onPointerLeave:w,onFocus:B,onBlur:F,children:u})};export const AssistantEntityLink=n(({id:t,children:n})=>{let{domain:r}=s(),i=y(e=>null!=r.getEntity(t,e.state),[r,t]),o=u(e=>null!=r.getEntity(t,e.state),[r,t]),a=k()===t;return i?o?e(E,{id:t,isSelected:a,children:n}):e(x,{kind:"plain",isSelected:a,children:n}):e(x,{kind:"missing",isSelected:!1,children:n})});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as o,styled as t}from"@mui/material";import{memo as n,useCallback as a,useEffect as s,useMemo as l,useState as d}from"react";import{match as m}from"ts-pattern";import{useConfigurator as c}from"../../../application-runtime/index.js";import{AssistantPanelName as p}from"../theme.js";import{composeAnswer as u}from"./compose-answer.js";import{describeBuildErrors as b}from"./describe-build-errors.js";import{parseFormBlock as f}from"./parse-form-block.js";import{useFormRegistry as g}from"./registry/index.js";let h=t("div",{name:p,slot:"form"})(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(1.5),marginBlock:e(1)})),k=t(o,{name:p,slot:"formSubmit"})(({theme:{palette:e,spacing:i,typography:r}})=>({...r.body2,alignSelf:"end",background:e.primary.main,border:"none",borderRadius:8,color:e.primary.contrastText,fontWeight:r.fontWeightMedium,letterSpacing:"normal",minBlockSize:0,minInlineSize:0,paddingBlock:i(.5),paddingInline:i(2),textTransform:"none","&:hover":{background:e.primary.dark,border:"none"},"&.Mui-disabled":{background:e.action.disabledBackground,border:"none",color:e.action.disabled}})),w=t("div",{name:p,slot:"formNote"})(({theme:{palette:e,shape:i,spacing:r,typography:o}})=>({...o.caption,alignItems:"center",background:e.action.hover,borderRadius:i.borderRadius,color:e.text.secondary,display:"flex",flexWrap:"wrap",gap:r(1),justifyContent:"space-between",marginBlock:r(1),paddingBlock:r(1),paddingInline:r(1.5)})),x=({model:o,disabled:t,send:n})=>{let[a,s]=d(()=>new Map),[l,c]=d(()=>new Map),p=(i,r)=>{let{id:l,definition:d,label:b,attributes:f}=i;return m(d).with({role:"option"},({component:d})=>e(d,{attributes:f,label:b,disabled:t,selected:!0===a.get(l),onSelect:e=>{o.isQuick?n(u(o,new Map([[i.id,!0]]),new Map([[i.id,e]]))):(c(r=>new Map(r).set(i.id,e)),s(e=>{let o=new Map(e);if("choice"===r.definition.role){for(let e of r.children)o.delete(e.id);o.set(i.id,!0)}else o.set(i.id,!0!==e.get(i.id));return o}))}},l)).with({role:"input"},({component:r})=>e(r,{attributes:f,label:b,disabled:t,state:a.get(l),onChange:(e,r)=>{o.isQuick?n(u(o,new Map([[i.id,e]]),new Map([[i.id,r]]))):(s(r=>new Map(r).set(i.id,e)),c(e=>new Map(e).set(i.id,r)))}},l)).with({role:"group"},{role:"choice"},{role:"choices"},({component:r})=>e(r,{attributes:f,label:b,disabled:t,children:i.children.map(e=>p(e,i))},l)).exhaustive()};return i(h,{children:[o.root.children.map(e=>p(e,o.root)),!o.isQuick&&e(k,{variant:"contained",disabled:t,disableElevation:!0,onClick:()=>{t||o.isQuick||n(u(o,a,l))},children:e(r,{id:"sdk.assistant.form.submit.label",message:"Submit"})})]})};export const AssistantForm=n(({source:t,status:n})=>{let{assistantSystem:m}=c(),[p,u]=d(!1),h="writing"===n,k=g(),M=l(()=>h?void 0:f(t,k),[t,h,k]),y="ready"!==n||p,j=a(e=>{u(!0),m.send(e).finally(()=>u(!1))},[m]);return(s(()=>{M?.ok===!1&&console.warn("The assistant wrote a form that could not be built.",M.errors)},[M]),M)?M.ok?0===M.root.children.length?null:e(x,{model:M,disabled:y,send:j}):i(w,{role:"alert",children:[e("span",{children:e(r,{id:"sdk.assistant.form.failure",message:"The assistant couldn't build this form."})}),e(o,{size:"small",variant:"outlined",color:"inherit",disabled:y,onClick:()=>j(b(M.errors)),children:e(r,{id:"sdk.assistant.form.fix.label",message:"Fix it"})})]}):e(w,{children:e(r,{id:"sdk.assistant.form.writing",message:"Preparing a form…"})})});
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as o,styled as t}from"@mui/material";import{memo as n,useCallback as a,useEffect as d,useMemo as s,useState as l}from"react";import{match as m}from"ts-pattern";import{hoverStyles as c}from"#package/ui-sdk";import{useConfigurator as p}from"../../../application-runtime/index.js";import{AssistantPanelName as u}from"../theme.js";import{composeAnswer as b}from"./compose-answer.js";import{describeBuildErrors as g}from"./describe-build-errors.js";import{parseFormBlock as f}from"./parse-form-block.js";import{useFormRegistry as h}from"./registry/index.js";let k=t("div",{name:u,slot:"form"})(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(1.5),marginBlock:e(1)})),w=t(o,{name:u,slot:"formSubmit"})(({theme:{palette:e,spacing:i,typography:r}})=>({...r.body2,alignSelf:"end",background:e.primary.main,border:"none",borderRadius:8,color:e.primary.contrastText,fontWeight:r.fontWeightMedium,letterSpacing:"normal",minBlockSize:0,minInlineSize:0,paddingBlock:i(.5),paddingInline:i(2),textTransform:"none","&:hover":{background:e.primary.dark,border:"none"},"&.Mui-disabled":{background:e.action.disabledBackground,border:"none",color:e.action.disabled}})),x=t(o,{name:u,slot:"formFix"})(({theme:{palette:e,spacing:i,typography:r}})=>({...r.caption,background:"transparent",border:`1px solid ${e.divider}`,borderRadius:8,boxShadow:"none",color:e.text.primary,fontWeight:r.fontWeightMedium,letterSpacing:"normal",minBlockSize:0,minInlineSize:0,paddingBlock:i(.25),paddingInline:i(1.5),textTransform:"none","&:hover":{background:"transparent",border:`1px solid ${e.divider}`,boxShadow:"none"},...c({"&:hover":{background:e.action.hover}}),"&.Mui-disabled":{background:"transparent",border:`1px solid ${e.action.disabledBackground}`,color:e.action.disabled}})),y=t("div",{name:u,slot:"formNote"})(({theme:{palette:e,shape:i,spacing:r,typography:o}})=>({...o.caption,alignItems:"center",background:e.action.hover,borderRadius:i.borderRadius,color:e.text.secondary,display:"flex",flexWrap:"wrap",gap:r(1),justifyContent:"space-between",marginBlock:r(1),paddingBlock:r(1),paddingInline:r(1.5)})),v=new Set(["text","search","email","url","tel","number","password"]),M=({model:o,disabled:t,send:n})=>{let[s,c]=l(()=>new Map),[p,u]=l(()=>new Map),g=(i,r)=>{let{id:a,definition:d,label:l,attributes:p}=i;return m(d).with({role:"option"},({component:d})=>e(d,{attributes:p,label:l,disabled:t,selected:!0===s.get(a),onSelect:e=>{o.isQuick?n(b(o,new Map([[i.id,!0]]),new Map([[i.id,e]]))):(u(r=>new Map(r).set(i.id,e)),c(e=>{let o=new Map(e);if("choice"===r.definition.role){for(let e of r.children)o.delete(e.id);o.set(i.id,!0)}else o.set(i.id,!0!==e.get(i.id));return o}))}},a)).with({role:"input"},({component:r})=>e(r,{attributes:p,label:l,disabled:t,state:s.get(a),onChange:(e,r)=>{o.isQuick?n(b(o,new Map([[i.id,e]]),new Map([[i.id,r]]))):(c(r=>new Map(r).set(i.id,e)),u(e=>new Map(e).set(i.id,r)))}},a)).with({role:"group"},{role:"choice"},{role:"choices"},({component:r})=>e(r,{attributes:p,label:l,disabled:t,children:i.children.map(e=>g(e,i))},a)).exhaustive()},f=a(()=>{t||o.isQuick||n(b(o,s,p))},[t,o,n,s,p]),[h,x]=l(!1);return d(()=>{h&&(x(!1),f())},[h,f]),i(k,{onKeyDown:e=>{!("Enter"===e.key&&!e.nativeEvent.isComposing&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&!e.defaultPrevented&&e.target instanceof HTMLInputElement&&v.has(e.target.type))||t||o.isQuick||x(!0)},children:[o.root.children.map(e=>g(e,o.root)),!o.isQuick&&e(w,{variant:"contained",disabled:t,disableElevation:!0,onClick:f,children:e(r,{id:"sdk.assistant.form.submit.label",message:"Submit"})})]})};export const AssistantForm=n(({source:o,status:t})=>{let{assistantSystem:n}=p(),[m,c]=l(!1),u="writing"===t,b=h(),k=s(()=>u?void 0:f(o,b),[o,u,b]),w="ready"!==t||m,v=a(e=>{c(!0),n.send(e).finally(()=>c(!1))},[n]);return(d(()=>{k?.ok===!1&&console.warn("The assistant wrote a form that could not be built.",k.errors)},[k]),k)?k.ok?0===k.root.children.length?null:e(M,{model:k,disabled:w,send:v}):i(y,{role:"alert",children:[e("span",{children:e(r,{id:"sdk.assistant.form.failure",message:"The assistant couldn't build this form."})}),e(x,{disabled:w,onClick:()=>v(g(k.errors)),children:e(r,{id:"sdk.assistant.form.fix.label",message:"Fix it"})})]}):e(y,{children:e(r,{id:"sdk.assistant.form.writing",message:"Preparing a form…"})})});
@@ -1,3 +1,29 @@
1
+ import { ASSISTANT_BUILT_IN_FORM_ELEMENTS, type AssistantBuiltInFormElementAttributes, type AssistantBuiltInFormElementName } from '#package/domain';
2
+ import { type FormContainerProps, type FormInputProps, type FormOptionProps } from '../../form-elements/index.js';
1
3
  import { type FormElementDefinition } from './form-element-definition.js';
4
+ type BuiltInFormElementRole<NAME extends AssistantBuiltInFormElementName> = Extract<(typeof ASSISTANT_BUILT_IN_FORM_ELEMENTS)[number], {
5
+ readonly name: NAME;
6
+ }>['role'];
7
+ /** The state each built-in input keeps, which the form hands back to it. */
8
+ interface BuiltInFormInputStates {
9
+ readonly text: string;
10
+ readonly number: number;
11
+ readonly confirm: boolean;
12
+ }
13
+ /** The props the component of a built-in element takes: those of its role, typed from its descriptor. */
14
+ type BuiltInFormElementProps<NAME extends AssistantBuiltInFormElementName> = BuiltInFormElementRole<NAME> extends 'option' ? FormOptionProps<AssistantBuiltInFormElementAttributes<NAME>> : BuiltInFormElementRole<NAME> extends 'input' ? FormInputProps<NAME extends keyof BuiltInFormInputStates ? BuiltInFormInputStates[NAME] : never, AssistantBuiltInFormElementAttributes<NAME>> : FormContainerProps<AssistantBuiltInFormElementAttributes<NAME>>;
15
+ type Same<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => (T extends B ? 1 : 2) ? true : false;
16
+ type PropsOf<COMPONENT> = COMPONENT extends (props: infer PROPS) => unknown ? PROPS : never;
17
+ /**
18
+ * Checks the component of every built-in element against the name it stands under, since the
19
+ * definition built from it is cast on the word that the two belong together: an entry whose
20
+ * component does not take exactly the props of its name becomes `never`. Exactly, because
21
+ * assignability would let a component whose attributes are all optional, or that reports another
22
+ * state through a method, stand under another name.
23
+ */
24
+ export type BuiltInFormComponents<COMPONENTS extends Readonly<Record<AssistantBuiltInFormElementName, unknown>>> = {
25
+ readonly [NAME in AssistantBuiltInFormElementName]: Same<PropsOf<COMPONENTS[NAME]>, BuiltInFormElementProps<NAME>> extends true ? COMPONENTS[NAME] : never;
26
+ };
2
27
  /** The elements of every assistant form: the built-ins the SDK prompt lists, with their components. */
3
28
  export declare const BUILT_IN_FORM_ELEMENTS: readonly FormElementDefinition[];
29
+ export {};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Trans as e}from"@lingui/react";import{styled as o}from"@mui/material";import{useCallback as t,useEffect as a}from"react";import{NumericalInput as m}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";import{clampFormNumber as s}from"./clamp-form-number.js";let l=o("div",{name:n,slot:"formNumber"})(({theme:{palette:r,spacing:i,typography:e}})=>({alignSelf:"stretch",color:r.text.secondary,display:"grid",gap:i(.5),...e.caption})),d=(r,i)=>i?`${r} ${i}`:String(r),u=r=>""===r.trim()?null:Number(r);export const FormNumber=({attributes:{value:o,min:n,max:p,step:v,unit:c},label:f,disabled:g,state:b,onChange:h})=>{let x=void 0===o?void 0:s(o,{min:n,max:p}),j=b??x;a(()=>{void 0===b&&void 0!==x&&h(x,d(x,c))},[b,x,c,h]);let N=t(r=>h(r,d(r,c)),[h,c]),S=t(()=>{if(void 0===j)return;let r=s(j,{min:n,max:p});r!==j&&N(r)},[j,n,p,N]),k=t(r=>void 0===j?"":String(r),[j]);return i(l,{role:"group","aria-label":f,children:[null!=f&&r("span",{"aria-hidden":!0,children:f}),r(m,{value:j??n??0,min:n,max:p,unit:c,size:"small",disabled:g,withSlider:void 0!==n&&void 0!==p,sliderProps:void 0===v?void 0:{step:v},inputFieldProps:{parseValue:u,formatValue:k,invalidNumberErrorMessage:r(e,{id:"sdk.assistant.form.number.invalid",message:"Enter a number."})},onChange:N,onChanged:S})]})};
1
+ import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Trans as e}from"@lingui/react";import{styled as a}from"@mui/material";import{useCallback as o,useEffect as t}from"react";import{NumericalInput as m}from"#package/ui-sdk";import{AssistantPanelName as l}from"../theme.js";import{clampFormNumber as n}from"./clamp-form-number.js";let s=a("div",{name:l,slot:"formNumber"})(({theme:{palette:r,spacing:i,typography:e}})=>({alignSelf:"stretch",color:r.text.secondary,display:"grid",gap:i(.5),...e.caption})),d=(r,i)=>i?`${r} ${i}`:String(r),u=r=>""===r.trim()?null:Number(r);export const FormNumber=({attributes:{value:a,min:l,max:p,step:g,unit:v},label:b,disabled:c,state:f,onChange:h})=>{let x=void 0===a?void 0:n(a,{min:l,max:p}),j=f??x;t(()=>{void 0===f&&void 0!==x&&h(x,d(x,v))},[f,x,v,h]);let N=o(r=>h(r,d(r,v)),[h,v]),S=o(()=>{if(void 0===j)return;let r=n(j,{min:l,max:p});r!==j&&N(r)},[j,l,p,N]),k=o(r=>void 0===j?"":String(r),[j]),y=o(()=>b??"",[b]);return i(s,{role:"group","aria-label":b,children:[null!=b&&r("span",{"aria-hidden":!0,children:b}),r(m,{value:j??l??0,min:l,max:p,unit:v,size:"small",disabled:c,withSlider:void 0!==l&&void 0!==p,sliderProps:{step:g,getAriaLabel:null==b?void 0:y},inputFieldProps:{"aria-label":b,parseValue:u,formatValue:k,invalidNumberErrorMessage:r(e,{id:"sdk.assistant.form.number.invalid",message:"Enter a number."})},onChange:N,onChanged:S})]})};
@@ -1,4 +1,5 @@
1
1
  export { AssistantPanel, ASSISTANT_PANEL_SLOT } from './AssistantPanel.js';
2
+ export { AnnotationHostContext, AnnotationOverlay } from './annotation/index.js';
2
3
  export { useIsAssistantPanelOpen } from './use-is-assistant-panel-open.js';
3
4
  export type { AssistantFormElementRoleProps, AssistantFormElementType, CreateAssistantFormElement, } from './form/index.js';
4
5
  export { createAssistantFormElementFactory } from './form/index.js';
@@ -1 +1 @@
1
- export{AssistantPanel,ASSISTANT_PANEL_SLOT}from"./AssistantPanel.js";export{useIsAssistantPanelOpen}from"./use-is-assistant-panel-open.js";export{createAssistantFormElementFactory}from"./form/index.js";
1
+ export{AssistantPanel,ASSISTANT_PANEL_SLOT}from"./AssistantPanel.js";export{AnnotationHostContext,AnnotationOverlay}from"./annotation/index.js";export{useIsAssistantPanelOpen}from"./use-is-assistant-panel-open.js";export{createAssistantFormElementFactory}from"./form/index.js";
@@ -0,0 +1,24 @@
1
+ import { type KeyboardEvent, type ReactElement, type ReactNode } from 'react';
2
+ /** What makes the element that opens a popover a button to the keyboard and to assistive technology. */
3
+ export interface AssistantPopoverTriggerProps {
4
+ readonly role: 'button';
5
+ readonly tabIndex: 0;
6
+ readonly 'aria-expanded': boolean;
7
+ readonly onClick: () => void;
8
+ readonly onKeyDown: (event: KeyboardEvent) => void;
9
+ }
10
+ export interface AssistantPopoverProps {
11
+ /**
12
+ * What the popover shows; the tooltip mounts it only while the popover is open. `rePlace` places
13
+ * the popover again after its content changed size, as when a picture in it has loaded.
14
+ */
15
+ readonly title: (rePlace: () => void) => ReactNode;
16
+ /** The element that opens the popover, given the props that make it do so. */
17
+ readonly children: (trigger: AssistantPopoverTriggerProps) => ReactElement;
18
+ }
19
+ /**
20
+ * A popover over something in the thread, such as a reference in a reply or the screenshots of a
21
+ * tool call: hovering, focusing or tapping its element opens it; leaving it, tapping outside or
22
+ * Escape closes it. It describes its element, whose label stays its own.
23
+ */
24
+ export declare const AssistantPopover: ({ title, children }: AssistantPopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{ClickAwayListener as n,Tooltip as o}from"@mui/material";import{useCallback as t,useRef as r,useState as i}from"react";export const AssistantPopover=({title:p,children:a})=>{let[l,s]=i(!1),c=t(()=>s(!0),[]),u=t(()=>s(!1),[]),d=r(null),m=t(e=>{d.current=e},[]),x=t(()=>{d.current?.update()},[]),h=t(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s(!0))},[]);return e(n,{onClickAway:u,mouseEvent:!!l&&"onClick",touchEvent:!!l&&"onTouchEnd",children:e(o,{open:l,onOpen:c,onClose:u,title:p(x),placement:"top-start",describeChild:!0,disableTouchListener:!0,PopperProps:{popperRef:m},slotProps:{tooltip:{sx:{background:"none",maxInlineSize:"none",padding:0}}},children:a({role:"button",tabIndex:0,"aria-expanded":l,onClick:c,onKeyDown:h})})})};
@@ -0,0 +1 @@
1
+ export { AssistantPopover } from './AssistantPopover.js';
@@ -0,0 +1 @@
1
+ export{AssistantPopover}from"./AssistantPopover.js";
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as n}from"@lingui/react";import{ClickAwayListener as t,Tooltip as a,styled as i}from"@mui/material";import{memo as o,useCallback as l,useEffect as s,useRef as d,useState as c}from"react";import{isShallowEqual as p}from"@salsita-ai/common/utils";import{useResourceUrl as m}from"#package/react-sdk";import{AssistantPanelName as u}from"../theme.js";import{assistantReferenceStyles as f}from"./reference-styles.js";import{useAssistantReferenceDetails as h}from"./use-assistant-reference-details.js";let b=i("span",{name:u,slot:"referenceLink"})(f),x=i("span",{name:u,slot:"referenceDetails"})(({theme:{palette:e,shape:r,shadows:n,spacing:t,typography:a}})=>({...a.body2,background:e.background.paper,borderRadius:r.borderRadius,boxShadow:n[4],color:e.text.primary,display:"flex",gap:t(1.5),maxInlineSize:320,padding:t(1.5),'&[data-reference-details="unavailable"]':{color:e.text.secondary}})),g=i("img")(({theme:{shape:e}})=>({alignSelf:"flex-start",blockSize:"auto",borderRadius:e.borderRadius/2,flexShrink:0,inlineSize:64,maxBlockSize:96,objectFit:"contain"})),k=i("span")(({theme:{palette:e,shape:r}})=>({blockSize:32,borderRadius:r.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,flexShrink:0,inlineSize:32})),y=i("span")(({theme:{palette:e,spacing:r}})=>({display:"flex",flexDirection:"column",gap:r(.5),minInlineSize:0,"& > :first-of-type":{fontWeight:600},"& > :not(:first-of-type)":{color:e.text.secondary}})),S=({target:t,onResolve:a,onImageLoad:i})=>{let o=h(t),{getResourceUrl:l}=m(),d=null!=o;if(s(()=>{a(d)},[d,a]),!o)return e(x,{"data-reference-details":"unavailable",children:e(n,{id:"sdk.assistant.reference.unavailable.message",message:"Not available right now"})});let{name:c,description:p,imageUrl:u,color:f}=o;return r(x,{children:[null!=u&&e(g,{src:l(u),alt:"",onLoad:i}),null==u&&null!=f&&e(k,{style:{background:f}}),r(y,{children:[e("span",{children:c}),null!=p&&e("span",{children:p})]})]})};export const AssistantReferenceLink=o(({target:r,children:n})=>{let[i,o]=c(!1),[s,p]=c(!1),m=l(()=>o(!0),[]),u=l(()=>o(!1),[]),f=l(e=>p(!e),[]),h=d(null),x=l(e=>{h.current=e},[]),g=l(()=>{h.current?.update()},[]),k=l(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),o(!0))},[]);return e(t,{onClickAway:u,mouseEvent:!!i&&"onClick",touchEvent:!!i&&"onTouchEnd",children:e(a,{open:i,onOpen:m,onClose:u,title:e(S,{target:r,onResolve:f,onImageLoad:g}),placement:"top-start",describeChild:!0,disableTouchListener:!0,PopperProps:{popperRef:x},slotProps:{tooltip:{sx:{background:"none",maxInlineSize:"none",padding:0}}},children:e(b,{role:"button",tabIndex:0,"aria-expanded":i,"data-reference":s?"muted":void 0,onClick:m,onKeyDown:k,children:n})})})},(e,r)=>e.children===r.children&&p(e.target,r.target));
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{styled as i}from"@mui/material";import{memo as t,useCallback as n,useEffect as o,useState as l}from"react";import{isShallowEqual as s}from"@salsita-ai/common/utils";import{useResourceUrl as d}from"#package/react-sdk";import{AssistantPopover as m}from"../popover/index.js";import{AssistantPanelName as c}from"../theme.js";import{assistantReferenceStyles as f}from"./reference-styles.js";import{useAssistantReferenceDetails as p}from"./use-assistant-reference-details.js";let u=i("span",{name:c,slot:"referenceLink"})(f),h=i("span",{name:c,slot:"referenceDetails"})(({theme:{palette:e,shape:r,shadows:a,spacing:i,typography:t}})=>({...t.body2,background:e.background.paper,borderRadius:r.borderRadius,boxShadow:a[4],color:e.text.primary,display:"flex",gap:i(1.5),maxInlineSize:320,padding:i(1.5),'&[data-reference-details="unavailable"]':{color:e.text.secondary}})),b=i("img")(({theme:{shape:e}})=>({alignSelf:"flex-start",blockSize:"auto",borderRadius:e.borderRadius/2,flexShrink:0,inlineSize:64,maxBlockSize:96,objectFit:"contain"})),x=i("span")(({theme:{palette:e,shape:r}})=>({blockSize:32,borderRadius:r.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,flexShrink:0,inlineSize:32})),g=i("span")(({theme:{palette:e,spacing:r}})=>({display:"flex",flexDirection:"column",gap:r(.5),minInlineSize:0,"& > :first-of-type":{fontWeight:600},"& > :not(:first-of-type)":{color:e.text.secondary}})),k=({target:i,onResolve:t,onImageLoad:n})=>{let l=p(i),{getResourceUrl:s}=d(),m=null!=l;if(o(()=>{t(m)},[m,t]),!l)return e(h,{"data-reference-details":"unavailable",children:e(a,{id:"sdk.assistant.reference.unavailable.message",message:"Not available right now"})});let{name:c,description:f,imageUrl:u,color:k}=l;return r(h,{children:[null!=u&&e(b,{src:s(u),alt:"",onLoad:n}),null==u&&null!=k&&e(x,{style:{background:k}}),r(g,{children:[e("span",{children:c}),null!=f&&e("span",{children:f})]})]})};export const AssistantReferenceLink=t(({target:r,children:a})=>{let[i,t]=l(!1),o=n(e=>t(!e),[]);return e(m,{title:a=>e(k,{target:r,onResolve:o,onImageLoad:a}),children:r=>e(u,{...r,"data-reference":i?"muted":void 0,children:a})})},(e,r)=>e.children===r.children&&s(e.target,r.target));
@@ -1 +1 @@
1
- import{alpha as e}from"@mui/material";export const assistantReferenceStyles=({theme:{palette:r,shape:o}})=>({background:"none",border:"none",borderRadius:o.borderRadius/2,boxDecorationBreak:"clone",color:r.primary.main,cursor:"pointer",font:"inherit",margin:0,padding:0,textDecorationLine:"underline",textDecorationStyle:"dashed",textDecorationThickness:1,textUnderlineOffset:"0.2em",WebkitBoxDecorationBreak:"clone",'&:hover, &:focus-visible, &[data-hovered="true"], &[aria-expanded="true"]':{background:e(r.primary.main,r.action.hoverOpacity)},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},'&[data-reference="plain"]':{color:"inherit",cursor:"auto"},'&[data-reference="muted"]':{color:r.text.disabled}});
1
+ import{alpha as e}from"@mui/material";import{hoverStyles as r}from"#package/ui-sdk";export const assistantReferenceStyles=({theme:{palette:o,shape:i}})=>({background:"none",border:"none",borderRadius:i.borderRadius/2,boxDecorationBreak:"clone",color:o.primary.main,cursor:"pointer",font:"inherit",margin:0,padding:0,textDecorationLine:"underline",textDecorationStyle:"dashed",textDecorationThickness:1,textUnderlineOffset:"0.2em",WebkitBoxDecorationBreak:"clone",'&:focus-visible, &[data-hovered="true"], &[aria-expanded="true"]':{background:e(o.primary.main,o.action.hoverOpacity)},...r({"&:hover":{background:e(o.primary.main,o.action.hoverOpacity)}}),"&:focus-visible":{outline:`2px solid ${o.primary.main}`,outlineOffset:1},'&[data-reference="plain"]':{color:"inherit",cursor:"auto"},'&[data-reference="muted"]':{color:o.text.disabled}});
@@ -1,2 +1,3 @@
1
1
  export { ScreenshotThumbnails } from './ScreenshotThumbnails.js';
2
2
  export { type AssistantToolScreenshot, readToolScreenshots } from './tool-screenshots.js';
3
+ export { useScreenshotSrc } from './use-screenshot-src.js';
@@ -1 +1 @@
1
- export{ScreenshotThumbnails}from"./ScreenshotThumbnails.js";export{readToolScreenshots}from"./tool-screenshots.js";
1
+ export{ScreenshotThumbnails}from"./ScreenshotThumbnails.js";export{readToolScreenshots}from"./tool-screenshots.js";export{useScreenshotSrc}from"./use-screenshot-src.js";
@@ -1,14 +1,8 @@
1
- /**
2
- * Where the panel gets a screenshot's picture from: the server, by the id the browser uploaded it
3
- * under, or the data URL of a picture a thread from before the upload carries inline.
4
- */
5
- export type AssistantScreenshotPicture = {
1
+ /** Where the panel gets a screenshot's picture from: the server, by the id the browser uploaded it under. */
2
+ export interface AssistantScreenshotPicture {
6
3
  readonly kind: 'stored';
7
4
  readonly imageId: string;
8
- } | {
9
- readonly kind: 'inline';
10
- readonly src: string;
11
- };
5
+ }
12
6
  /** A screenshot a `query` or `apply` call took, as the panel shows it. */
13
7
  export interface AssistantToolScreenshot {
14
8
  /** The label the call's `image` field returned, such as `Cabinet-2/doorLayout#2`. */
@@ -1 +1 @@
1
- import{z as t}from"zod";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";let a=t.object({type:t.literal("text"),content:t.string()}),r=t.object({type:t.literal("image"),source:t.discriminatedUnion("type",[t.object({type:t.literal("url"),value:t.string()}),t.object({type:t.literal("data"),value:t.string(),mimeType:t.string()})])}),s=/^[^/]+\/[^#]+(?:#\d+)?$/;export const readToolScreenshots=t=>Array.isArray(t)?t.slice(1).flatMap((t,l,i)=>{let n=r.safeParse(t),o=a.safeParse(i[l-1]),c=n.success?(({source:t})=>{if("data"===t.type)return{kind:"inline",src:`data:${t.mimeType};base64,${t.value}`};let a=e(t.value);return null===a?null:{kind:"stored",imageId:a}})(n.data):null;return c&&o.success&&s.test(o.data.content)?[{label:o.data.content,picture:c}]:[]}):[];
1
+ import{z as t}from"zod";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";let a=t.object({type:t.literal("text"),content:t.string()}),r=t.object({type:t.literal("image"),source:t.object({type:t.literal("url"),value:t.string()})}),s=/^[^/]+\/[^#]+(?:#\d+)?$/;export const readToolScreenshots=t=>Array.isArray(t)?t.slice(1).flatMap((t,l,o)=>{let n=r.safeParse(t),c=a.safeParse(o[l-1]),i=n.success?(({source:t})=>{let a=e(t.value);return null===a?null:{kind:"stored",imageId:a}})(n.data):null;return i&&c.success&&s.test(c.data.content)?[{label:c.data.content,picture:i}]:[]}):[];
@@ -1,8 +1,8 @@
1
1
  import type { AssistantScreenshotPicture } from './tool-screenshots.js';
2
2
  /**
3
- * The `src` of a screenshot's picture: the data URL of an inline one at once, and for an uploaded
4
- * one the object URL the assistant system reads it into, once it has been read; `undefined` until
5
- * then and when the read fails. Only the open popover of a call's screenshots calls it, so nothing
6
- * is read while the popover is closed.
3
+ * The `src` of a screenshot's or an attached image's picture: the object URL the assistant system
4
+ * reads the uploaded image into, once it has been read; `undefined` until then and when the read
5
+ * fails. The screenshots of a call are read only while their popover is open; the images a user
6
+ * attached are read as soon as their bubble shows.
7
7
  */
8
8
  export declare const useScreenshotSrc: (picture: AssistantScreenshotPicture) => string | undefined;