@salsita-ai/sdk 0.50.0-develop.ed1806b910 → 0.50.0-develop.eeaf6c4605

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 (938) hide show
  1. package/README.md +8 -2
  2. package/dist/admin/AdminShell.js +1 -1
  3. package/dist/admin/legacy-admin/Application.js +1 -1
  4. package/dist/application-spec/caching/index.d.ts +6 -1
  5. package/dist/application-spec/caching/index.js +1 -1
  6. package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
  7. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  8. package/dist/application-spec/core/index.d.ts +1 -3
  9. package/dist/application-spec/core/index.js +1 -1
  10. package/dist/application-spec/core/json-schema.d.ts +2 -52
  11. package/dist/application-spec/core/markers/index.d.ts +1 -1
  12. package/dist/application-spec/core/markers/index.js +1 -1
  13. package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
  14. package/dist/application-spec/core/markers/msg-marker.js +1 -1
  15. package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
  16. package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
  17. package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
  18. package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -1
  19. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  20. package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -1
  21. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  22. package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +0 -19
  23. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  24. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  25. package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -1
  26. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
  27. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  28. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +5 -4
  29. package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
  32. package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
  33. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
  34. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +150 -0
  35. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
  36. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +40 -0
  37. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout.d.ts +2 -0
  38. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout.js +1 -0
  39. package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
  40. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
  41. package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
  42. package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
  43. package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
  44. package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
  45. package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
  46. package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
  47. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +2 -0
  48. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +1 -0
  49. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +54 -0
  50. package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
  51. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
  52. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +14 -0
  53. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
  54. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
  55. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
  56. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +39 -0
  57. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
  58. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
  59. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
  60. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
  61. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
  62. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +7 -0
  63. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
  64. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
  65. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
  66. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
  67. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
  68. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +23 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
  70. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +26 -0
  71. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
  72. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
  73. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
  74. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +7 -0
  75. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
  76. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
  77. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +9 -0
  78. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
  79. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
  80. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
  81. package/dist/application-spec/generate-application/code/templates/skills/{phoenix-skill.d.ts → processes/operations.d.ts} +2 -1
  82. package/dist/application-spec/generate-application/code/templates/skills/processes/operations.js +2 -0
  83. package/dist/application-spec/generate-application/code/templates/skills/processes/planning.d.ts +2 -0
  84. package/dist/application-spec/generate-application/code/templates/skills/processes/planning.js +5 -0
  85. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
  86. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
  87. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
  88. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
  89. package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
  90. package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
  91. package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
  92. package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
  93. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
  94. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
  95. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
  96. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
  97. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
  98. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
  99. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
  100. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
  101. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
  102. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
  103. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
  104. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
  105. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
  106. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
  107. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
  108. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
  109. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +63 -249
  110. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -58
  111. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +1 -1
  112. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -1
  113. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
  114. package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
  115. package/dist/application-spec/generate-application/index.d.ts +1 -8
  116. package/dist/application-spec/generate-application/index.js +1 -1
  117. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
  118. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  119. package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
  120. package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
  121. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  122. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
  123. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
  124. package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
  125. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +25 -20
  126. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  127. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
  128. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
  129. package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
  130. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
  131. package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
  132. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
  133. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
  134. package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
  135. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
  136. package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
  137. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
  138. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  139. package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
  140. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
  141. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  142. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
  143. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
  144. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
  145. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  146. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
  147. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  148. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
  149. package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
  150. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
  151. package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
  152. package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
  153. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
  154. package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
  155. package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
  156. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
  157. package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
  158. package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
  159. package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
  160. package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
  161. package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
  162. package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
  163. package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
  164. package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
  165. package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
  166. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
  167. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
  168. package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
  169. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  170. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
  171. package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
  172. package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
  173. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
  174. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
  175. package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
  176. package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
  177. package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
  178. package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
  179. package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
  180. package/dist/client/authorized-client.d.ts +4 -2
  181. package/dist/client/authorized-client.js +1 -1
  182. package/dist/client/contract.d.ts +34 -4
  183. package/dist/client/contract.js +1 -1
  184. package/dist/client/index.d.ts +1 -1
  185. package/dist/client/local-authorized-client.d.ts +3 -1
  186. package/dist/client/local-authorized-client.js +1 -1
  187. package/dist/client/memory-authorized-client.d.ts +4 -1
  188. package/dist/client/memory-authorized-client.js +1 -1
  189. package/dist/client/phoenix-api.d.ts +259 -1
  190. package/dist/configurator/ConfiguratorApp.js +1 -1
  191. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  192. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +92 -24
  193. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  194. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +21 -4
  195. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  196. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
  197. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  198. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +38 -11
  199. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  200. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
  201. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
  202. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  203. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  204. package/dist/configurator/common/configurator-interface.d.ts +2 -2
  205. package/dist/configurator/common/configurator-interface.js +1 -1
  206. package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
  207. package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
  208. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
  209. package/dist/configurator/configurator-context/index.d.ts +0 -5
  210. package/dist/configurator/configurator-context/index.js +1 -1
  211. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  212. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  213. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  214. package/dist/configurator/pages/default-configurator-elements.d.ts +6 -2
  215. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  216. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
  217. package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
  218. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  219. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  220. package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
  221. package/dist/configurator/pages/error-boundaries/index.js +1 -1
  222. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
  223. package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
  224. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
  225. package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
  226. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
  227. package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
  228. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
  229. package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
  230. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
  231. package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
  232. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
  233. package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
  234. package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
  235. package/dist/configurator/pages/provider-slots/index.js +1 -0
  236. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
  237. package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
  238. package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
  239. package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
  240. package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
  241. package/dist/configurator/pages/ui-elements/index.js +1 -0
  242. package/dist/configurator/ui/assistant/AssistantChips.d.ts +10 -0
  243. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  244. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  245. package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
  246. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  247. package/dist/configurator/ui/assistant/AssistantThread.d.ts +4 -3
  248. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  249. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +4 -1
  250. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
  251. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +11 -0
  252. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
  253. package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
  254. package/dist/configurator/ui/assistant/attachments/index.js +1 -0
  255. package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +19 -0
  256. package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
  257. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  258. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  259. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +26 -0
  260. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
  261. package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
  262. package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
  263. package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
  264. package/dist/configurator/ui/assistant/popover/index.js +1 -0
  265. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
  266. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -1
  267. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +1 -1
  268. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  269. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
  270. package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
  271. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +12 -4
  272. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  273. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  274. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  275. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +11 -0
  276. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  277. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -0
  278. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  279. package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
  280. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  281. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
  282. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
  283. package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
  284. package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
  285. package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
  286. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  287. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  288. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  289. package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
  290. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  291. package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
  292. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  293. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  294. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  295. package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
  296. package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
  297. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  298. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  299. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
  300. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  301. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  302. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  303. package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
  304. package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
  305. package/dist/docs/index.json +1 -1
  306. package/dist/docs/phoenix/configurator-interface.mdx +2 -2
  307. package/dist/docs/phoenix/deployments.mdx +11 -1
  308. package/dist/docs/phoenix/domain-model.mdx +4 -1
  309. package/dist/docs/phoenix/getting-started.mdx +0 -2
  310. package/dist/docs/phoenix/layout-slots.mdx +21 -0
  311. package/dist/docs/phoenix/migration-guide.mdx +10 -11
  312. package/dist/docs/phoenix/phoenix-cli.mdx +57 -15
  313. package/dist/docs/phoenix/project-structure.mdx +30 -31
  314. package/dist/docs/phoenix/sdk-builder-workflow.mdx +5 -11
  315. package/dist/docs/phoenix/testing.mdx +6 -1
  316. package/dist/docs/phoenix/webhooks.mdx +9 -1
  317. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
  318. package/dist/domain/application/GetThemeHandler.d.ts +1 -1
  319. package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
  320. package/dist/domain/application/application-config.d.ts +6 -26
  321. package/dist/domain/application/assistant/assistant-fields.d.ts +1 -1
  322. package/dist/domain/application/assistant/assistant-value-type.d.ts +1 -1
  323. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +1 -2
  324. package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
  325. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +1 -2
  326. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  327. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -2
  328. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  329. package/dist/domain/application/assistant/index.d.ts +0 -4
  330. package/dist/domain/application/assistant/index.js +1 -1
  331. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +1 -1
  332. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +1 -1
  333. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  334. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +3 -5
  335. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  336. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +1 -2
  337. package/dist/domain/application/assistant-field-options.d.ts +1 -1
  338. package/dist/domain/application/assistant-mutations.d.ts +1 -1
  339. package/dist/domain/application/assistant-mutations.js +1 -1
  340. package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
  341. package/dist/domain/application/configurator-builder.d.ts +1 -2
  342. package/dist/domain/application/create-initial-published-data.d.ts +2 -1
  343. package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
  344. package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
  345. package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
  346. package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
  347. package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
  348. package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
  349. package/dist/domain/available-system-components/available-system-components.js +1 -0
  350. package/dist/domain/available-system-components/index.d.ts +1 -0
  351. package/dist/domain/available-system-components/index.js +1 -0
  352. package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +2 -2
  353. package/dist/domain/domain-builder/domain-builder.js +1 -0
  354. package/dist/domain/domain-builder/index.d.ts +1 -0
  355. package/dist/domain/domain-builder/index.js +1 -0
  356. package/dist/domain/domain-runtime/domain-runtime.d.ts +24 -24
  357. package/dist/domain/domain-runtime/index.d.ts +0 -1
  358. package/dist/domain/domain-runtime/index.js +1 -1
  359. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +1 -1
  360. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -1
  361. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  362. package/dist/domain/domain-runtime/spec/index.js +1 -1
  363. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  364. package/dist/domain/domain-runtime/spec/{module-checks/resolve-imported-transformers.d.ts → resolve-imported-transformers.d.ts} +3 -3
  365. package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
  366. package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -5
  367. package/dist/domain/domain-runtime/spec/types.d.ts +2 -2
  368. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
  369. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  370. package/dist/domain/extensions/export-images/index.d.ts +1 -1
  371. package/dist/domain/extensions/export-images/index.js +1 -1
  372. package/dist/domain/extensions/index.d.ts +1 -1
  373. package/dist/domain/extensions/index.js +1 -1
  374. package/dist/domain/index.d.ts +15 -2
  375. package/dist/domain/index.js +1 -1
  376. package/dist/domain/mocks/create-test-application-config.d.ts +1 -1
  377. package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
  378. package/dist/domain/spec/application/admin-pages.d.ts +26 -0
  379. package/dist/domain/spec/application/admin-states.d.ts +5 -0
  380. package/dist/domain/spec/application/configurator-states.d.ts +8 -0
  381. package/dist/domain/spec/application/index.d.ts +5 -0
  382. package/dist/domain/spec/application/index.js +1 -0
  383. package/dist/domain/spec/components/bindings/index.d.ts +2 -0
  384. package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
  385. package/dist/domain/spec/components/bindings/read-binding.js +1 -0
  386. package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
  387. package/dist/domain/spec/components/bindings/write-binding.js +1 -0
  388. package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
  389. package/dist/domain/spec/components/component-entry.js +1 -0
  390. package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
  391. package/dist/domain/spec/components/component-filters.d.ts +10 -0
  392. package/dist/domain/spec/components/component-filters.js +1 -0
  393. package/dist/domain/spec/components/components.d.ts +4 -0
  394. package/dist/domain/spec/components/components.js +1 -0
  395. package/dist/domain/spec/components/index.d.ts +6 -0
  396. package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
  397. package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
  398. package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
  399. package/dist/domain/spec/enhanced-json/index.js +1 -0
  400. package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
  401. package/dist/domain/spec/expressions/expression.js +1 -0
  402. package/dist/domain/spec/expressions/expressions.d.ts +27 -0
  403. package/dist/domain/spec/expressions/expressions.js +1 -0
  404. package/dist/domain/spec/expressions/index.d.ts +5 -0
  405. package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
  406. package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
  407. package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
  408. package/dist/domain/spec/index.d.ts +4 -0
  409. package/dist/domain/spec/index.js +1 -0
  410. package/dist/domain/spec/invariants/index.d.ts +2 -0
  411. package/dist/domain/spec/invariants/index.js +1 -0
  412. package/dist/domain/spec/invariants/invariant.d.ts +24 -0
  413. package/dist/domain/spec/invariants/invariant.js +1 -0
  414. package/dist/domain/spec/invariants/invariants.d.ts +14 -0
  415. package/dist/domain/spec/invariants/invariants.js +1 -0
  416. package/dist/domain/spec/json-schema.d.ts +52 -0
  417. package/dist/domain/spec/json-schema.js +1 -0
  418. package/dist/domain/spec/markers/index.d.ts +3 -0
  419. package/dist/domain/spec/markers/index.js +1 -0
  420. package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
  421. package/dist/domain/spec/markers/msg-marker.js +1 -0
  422. package/dist/domain/spec/model/aliases.d.ts +9 -0
  423. package/dist/domain/spec/model/aliases.js +1 -0
  424. package/dist/domain/spec/model/common-types.d.ts +15 -0
  425. package/dist/domain/spec/model/common-types.js +1 -0
  426. package/dist/domain/spec/model/defaults.d.ts +33 -0
  427. package/dist/domain/spec/model/defaults.js +1 -0
  428. package/dist/domain/spec/model/entity-types.d.ts +8 -0
  429. package/dist/domain/spec/model/entity-types.js +1 -0
  430. package/dist/domain/spec/model/index.d.ts +7 -0
  431. package/dist/domain/spec/model/index.js +1 -0
  432. package/dist/domain/spec/model/model-version-key.d.ts +3 -0
  433. package/dist/domain/spec/model/model-version-key.js +1 -0
  434. package/dist/domain/spec/model/names/action-name.d.ts +7 -0
  435. package/dist/domain/spec/model/names/action-name.js +1 -0
  436. package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
  437. package/dist/domain/spec/model/names/alias-name.js +1 -0
  438. package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
  439. package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
  440. package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
  441. package/dist/domain/spec/model/names/entity-type-name.js +1 -0
  442. package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
  443. package/dist/domain/spec/model/names/expression-name.js +1 -0
  444. package/dist/domain/spec/model/names/index.d.ts +9 -0
  445. package/dist/domain/spec/model/names/index.js +1 -0
  446. package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
  447. package/dist/domain/spec/model/names/instance-name.js +1 -0
  448. package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
  449. package/dist/domain/spec/model/names/invariant-name.js +1 -0
  450. package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
  451. package/dist/domain/spec/model/names/shape-property-name.js +1 -0
  452. package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
  453. package/dist/domain/spec/model/names/violation-type-name.js +1 -0
  454. package/dist/domain/spec/model/presets.d.ts +30 -0
  455. package/dist/domain/spec/model/presets.js +1 -0
  456. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.d.ts +1 -1
  457. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/find-assistant-form-element-errors.d.ts +1 -1
  458. package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
  459. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/index.d.ts +2 -3
  460. package/dist/domain/spec/modules/index.js +1 -0
  461. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/merge-expression-modules.d.ts +2 -2
  462. package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
  463. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/project-modules.d.ts +1 -1
  464. package/dist/domain/spec/modules/project-modules.js +1 -0
  465. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.d.ts +1 -1
  466. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.d.ts +1 -1
  467. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.d.ts +1 -1
  468. package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.d.ts +1 -1
  469. package/dist/domain/spec/phx/index.d.ts +1 -0
  470. package/dist/domain/spec/phx/index.js +1 -0
  471. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-application-types.d.ts +1 -1
  472. package/dist/domain/spec/phx/phx-application-types.js +1 -0
  473. package/dist/domain/spec/phx/phx-domain.js +1 -0
  474. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-model.d.ts +2 -2
  475. package/dist/domain/spec/phx/phx-model.js +1 -0
  476. package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.d.ts +1 -2
  477. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-runtime.d.ts +7 -6
  478. package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
  479. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-spec-runtime.d.ts +2 -2
  480. package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  481. package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
  482. package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
  483. package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.d.ts +1 -1
  484. package/dist/{application-spec/generate-application → domain/spec}/runtime/application-runtime.d.ts +8 -6
  485. package/dist/domain/spec/runtime/application-runtime.js +1 -0
  486. package/dist/{application-spec/generate-application → domain/spec}/runtime/application-spec-slice.d.ts +3 -1
  487. package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
  488. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-runtime.d.ts +8 -10
  489. package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
  490. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-spec-runtime.d.ts +2 -2
  491. package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  492. package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
  493. package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
  494. package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.d.ts +1 -1
  495. package/dist/{application-spec/generate-application → domain/spec}/runtime/create-application.d.ts +3 -2
  496. package/dist/domain/spec/runtime/create-application.js +1 -0
  497. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/expression-runtime.d.ts +5 -3
  498. package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
  499. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/generate-memo-eval-plan-runtime.d.ts +2 -2
  500. package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
  501. package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
  502. package/dist/domain/spec/runtime/expressions/index.js +1 -0
  503. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.d.ts +2 -1
  504. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.d.ts +4 -3
  505. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/recipe-defaults.d.ts +1 -1
  506. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/recipe-defaults.js +1 -1
  507. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/static-violations.d.ts +2 -2
  508. package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/static-violations.js +1 -1
  509. package/dist/{application-spec/generate-application → domain/spec}/runtime/generate-runtime-instance.d.ts +1 -1
  510. package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
  511. package/dist/domain/spec/runtime/index.d.ts +13 -0
  512. package/dist/domain/spec/runtime/index.js +1 -0
  513. package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/migration-runtime.d.ts +2 -2
  514. package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
  515. package/dist/{application-spec/generate-application/runtime/admin-runtime → domain/spec/runtime/model}/admin-model-runtime.d.ts +4 -3
  516. package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
  517. package/dist/{application-spec/generate-application/runtime/configurator-runtime → domain/spec/runtime/model}/configurator-model-runtime.d.ts +4 -3
  518. package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
  519. package/dist/domain/spec/runtime/model/index.d.ts +2 -0
  520. package/dist/domain/spec/runtime/model/index.js +1 -0
  521. package/dist/domain/spec/runtime/optics/build-sdk-optic.d.ts +7 -0
  522. package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
  523. package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
  524. package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
  525. package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
  526. package/dist/domain/spec/runtime/optics/built-component-optic.js +1 -0
  527. package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.d.ts +4 -14
  528. package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
  529. package/dist/domain/spec/runtime/optics/index.js +1 -0
  530. package/dist/{application-spec/caching → domain/spec/runtime}/runtime-reference-store.d.ts +1 -5
  531. package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
  532. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.d.ts +3 -3
  533. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.d.ts +2 -2
  534. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.d.ts +1 -1
  535. package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
  536. package/dist/domain/spec/runtime/sections/index.js +1 -0
  537. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.d.ts +4 -4
  538. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.d.ts +1 -1
  539. package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.d.ts +2 -2
  540. package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  541. package/dist/domain/spec/runtime/spec-code/spec-code-module.js +1 -0
  542. package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-runtime.d.ts +3 -3
  543. package/dist/domain/spec/runtime/spec-runtime.js +1 -0
  544. package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
  545. package/dist/domain/spec/runtime-spec/index.js +1 -0
  546. package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +174 -0
  547. package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.d.ts +1 -1
  548. package/dist/domain/spec/sections/actions.d.ts +23 -0
  549. package/dist/domain/spec/sections/actions.js +1 -0
  550. package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
  551. package/dist/domain/spec/sections/app-metadata.js +1 -0
  552. package/dist/domain/spec/sections/application-version.d.ts +7 -0
  553. package/dist/domain/spec/sections/application-version.js +1 -0
  554. package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.d.ts +13 -3
  555. package/dist/domain/{application → spec/sections}/assistant/assistant-resolved-manifest.d.ts +5 -9
  556. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
  557. package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
  558. package/dist/domain/spec/sections/assistant/index.js +1 -0
  559. package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
  560. package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
  561. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
  562. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
  563. package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
  564. package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
  565. package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
  566. package/dist/domain/spec/sections/data-spec/index.js +1 -0
  567. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
  568. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
  569. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
  570. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
  571. package/dist/domain/spec/sections/index.d.ts +10 -0
  572. package/dist/domain/spec/sections/index.js +1 -0
  573. package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
  574. package/dist/domain/spec/sections/infra/acl.js +1 -0
  575. package/dist/domain/spec/sections/infra/index.d.ts +3 -0
  576. package/dist/domain/spec/sections/infra/index.js +1 -0
  577. package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
  578. package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
  579. package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
  580. package/dist/domain/spec/sections/infra/resources-config.js +1 -0
  581. package/dist/domain/spec/sections/state-value.d.ts +7 -0
  582. package/dist/domain/spec/sections/state-value.js +1 -0
  583. package/dist/domain/spec/sections/theme.d.ts +10 -0
  584. package/dist/domain/spec/sections/theme.js +1 -0
  585. package/dist/domain/spec/sections/transformers.d.ts +15 -0
  586. package/dist/domain/spec/sections/transformers.js +1 -0
  587. package/dist/domain/spec/sections/ui.d.ts +12 -0
  588. package/dist/domain/spec/sections/ui.js +1 -0
  589. package/dist/domain/system-definitions.js +1 -1
  590. package/dist/domain/utils/index.d.ts +2 -0
  591. package/dist/domain/utils/index.js +1 -0
  592. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  593. package/dist/i18n/locales/cs/messages.js +1 -1
  594. package/dist/i18n/locales/da/messages.js +1 -1
  595. package/dist/i18n/locales/de/messages.js +1 -1
  596. package/dist/i18n/locales/de-AT/messages.js +1 -1
  597. package/dist/i18n/locales/en/messages.js +1 -1
  598. package/dist/i18n/locales/en-AU/messages.js +1 -1
  599. package/dist/i18n/locales/en-GB/messages.js +1 -1
  600. package/dist/i18n/locales/es/messages.js +1 -1
  601. package/dist/i18n/locales/fr/messages.js +1 -1
  602. package/dist/i18n/locales/hu/messages.js +1 -1
  603. package/dist/i18n/locales/it/messages.js +1 -1
  604. package/dist/i18n/locales/nl/messages.js +1 -1
  605. package/dist/i18n/locales/pl/messages.js +1 -1
  606. package/dist/i18n/locales/pt/messages.js +1 -1
  607. package/dist/i18n/locales/ro/messages.js +1 -1
  608. package/dist/i18n/locales/sk/messages.js +1 -1
  609. package/dist/i18n/locales/tr/messages.js +1 -1
  610. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
  611. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  612. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
  613. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
  614. package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
  615. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  616. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
  617. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  618. package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
  619. package/dist/phoenix/application-spec/index.d.ts +2 -0
  620. package/dist/phoenix/application-spec/index.js +1 -1
  621. package/dist/phoenix/application-spec/project-files.d.ts +8 -2
  622. package/dist/phoenix/application-spec/project-files.js +1 -1
  623. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
  624. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  625. package/dist/phoenix/bin.js +1 -1
  626. package/dist/phoenix/cli.js +1 -1
  627. package/dist/phoenix/commands/activate-deployment.js +1 -1
  628. package/dist/phoenix/commands/build.js +1 -1
  629. package/dist/phoenix/commands/changelog.js +1 -1
  630. package/dist/phoenix/commands/check.js +1 -1
  631. package/dist/phoenix/commands/clean.js +1 -1
  632. package/dist/phoenix/commands/cleanup-environment.js +2 -2
  633. package/dist/phoenix/commands/create-environment.js +1 -1
  634. package/dist/phoenix/commands/data.js +1 -1
  635. package/dist/phoenix/commands/deploy.js +1 -1
  636. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  637. package/dist/phoenix/commands/dev.js +4 -5
  638. package/dist/phoenix/commands/docs.js +1 -1
  639. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  640. package/dist/phoenix/commands/fix.js +1 -1
  641. package/dist/phoenix/commands/index.d.ts +1 -1
  642. package/dist/phoenix/commands/index.js +1 -1
  643. package/dist/phoenix/commands/inspect-assets.js +1 -1
  644. package/dist/phoenix/commands/list-environments.js +1 -1
  645. package/dist/phoenix/commands/login.d.ts +4 -1
  646. package/dist/phoenix/commands/login.js +2 -2
  647. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  648. package/dist/phoenix/commands/register-deployment.js +1 -1
  649. package/dist/phoenix/commands/scene.js +1 -1
  650. package/dist/phoenix/commands/screenshot.js +1 -1
  651. package/dist/phoenix/commands/state.js +1 -1
  652. package/dist/phoenix/commands/story-build.js +3 -3
  653. package/dist/phoenix/commands/story-create.js +1 -1
  654. package/dist/phoenix/commands/story-dev.js +2 -2
  655. package/dist/phoenix/commands/sync.js +1 -1
  656. package/dist/phoenix/commands/variants.js +1 -1
  657. package/dist/phoenix/editor-server/commands-router.js +1 -1
  658. package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
  659. package/dist/phoenix/editor-server/editor-server.js +1 -1
  660. package/dist/phoenix/editor-server/spec-router.js +1 -1
  661. package/dist/phoenix/editor-server/trpc.d.ts +2 -12
  662. package/dist/phoenix/lingui/index.d.ts +1 -0
  663. package/dist/phoenix/lingui/index.js +1 -0
  664. package/dist/phoenix/lingui/lingui.d.ts +18 -0
  665. package/dist/phoenix/lingui/lingui.js +1 -0
  666. package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -6
  667. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  668. package/dist/phoenix/services/cli-credentials.d.ts +3 -0
  669. package/dist/phoenix/services/cli-credentials.js +1 -1
  670. package/dist/phoenix/services/cli-exit.d.ts +5 -0
  671. package/dist/phoenix/services/cli-exit.js +1 -0
  672. package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
  673. package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
  674. package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +1 -0
  675. package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
  676. package/dist/phoenix/services/deployment/index.d.ts +2 -0
  677. package/dist/phoenix/services/deployment/index.js +1 -0
  678. package/dist/phoenix/services/index.d.ts +5 -1
  679. package/dist/phoenix/services/index.js +1 -1
  680. package/dist/phoenix/services/lingui-watcher.js +1 -1
  681. package/dist/phoenix/services/phoenix-store.d.ts +3 -0
  682. package/dist/phoenix/services/phoenix-store.js +1 -1
  683. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  684. package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
  685. package/dist/phoenix/services/session/editor-server-handle.js +1 -0
  686. package/dist/phoenix/services/session/index.d.ts +2 -0
  687. package/dist/phoenix/services/session/index.js +1 -0
  688. package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
  689. package/dist/phoenix/services/session/phoenix-application.js +2 -0
  690. package/dist/phoenix/services/source-archive.d.ts +2 -0
  691. package/dist/phoenix/services/source-archive.js +1 -1
  692. package/dist/phoenix/services/swc.d.ts +5 -4
  693. package/dist/phoenix/services/swc.js +2 -2
  694. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
  695. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
  696. package/dist/phoenix/services/telemetry/index.d.ts +3 -0
  697. package/dist/phoenix/services/telemetry/index.js +1 -0
  698. package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
  699. package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
  700. package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
  701. package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
  702. package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
  703. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
  704. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
  705. package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
  706. package/dist/phoenix/services/vite-config.js +1 -1
  707. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  708. package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
  709. package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
  710. package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
  711. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
  712. package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
  713. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
  714. package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
  715. package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
  716. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
  717. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
  718. package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
  719. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
  720. package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
  721. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
  722. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
  723. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
  724. package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
  725. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
  726. package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
  727. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
  728. package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
  729. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
  730. package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
  731. package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
  732. package/dist/react-sdk/configurator-ui-elements/index.js +1 -0
  733. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  734. package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
  735. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  736. package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
  737. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  738. package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
  739. package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
  740. package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
  741. package/dist/react-sdk/domain-application-context/index.js +1 -1
  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 +7 -0
  745. package/dist/react-sdk/index.js +1 -1
  746. package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
  747. package/dist/react-sdk/integration/index.d.ts +1 -0
  748. package/dist/react-sdk/integration/index.js +1 -0
  749. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
  750. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
  751. package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
  752. package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
  753. package/dist/react-sdk/lifecycle-providers/index.js +1 -0
  754. package/dist/react-sdk/notifications/index.d.ts +1 -0
  755. package/dist/react-sdk/notifications/index.js +1 -0
  756. package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
  757. package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
  758. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
  759. package/dist/react-sdk/preset-selection/index.d.ts +1 -0
  760. package/dist/react-sdk/preset-selection/index.js +1 -0
  761. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
  762. package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
  763. package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
  764. package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
  765. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
  766. package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
  767. package/dist/react-sdk/provider-slots/index.d.ts +3 -0
  768. package/dist/react-sdk/provider-slots/index.js +1 -0
  769. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  770. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  771. package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
  772. package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
  773. package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
  774. package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
  775. package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
  776. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
  777. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  778. package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
  779. package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
  780. package/dist/ui-sdk/icons/__generated/index.d.ts +2 -0
  781. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  782. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  783. package/dist/ui-sdk/theme/types.d.ts +1 -1
  784. package/dist/watch/glob-matcher.d.ts +4 -4
  785. package/dist/watch/glob-matcher.js +1 -1
  786. package/dist/watch/watch.d.ts +4 -4
  787. package/dist/watch/watch.js +1 -1
  788. package/package.json +3 -3
  789. package/schema/domain-spec.json +22 -4
  790. package/dist/application-spec/caching/runtime-reference-store.js +0 -1
  791. package/dist/application-spec/core/components/index.d.ts +0 -2
  792. package/dist/application-spec/core/expressions/index.d.ts +0 -2
  793. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
  794. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
  795. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
  796. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -166
  797. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
  798. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
  799. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
  800. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -115
  801. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
  802. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
  803. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
  804. package/dist/application-spec/generate-application/implementations/phx-application-types.js +0 -1
  805. package/dist/application-spec/generate-application/implementations/phx-domain.js +0 -1
  806. package/dist/application-spec/generate-application/implementations/phx-model.js +0 -1
  807. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
  808. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
  809. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +0 -1
  810. package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
  811. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +0 -1
  812. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
  813. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
  814. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +0 -1
  815. package/dist/application-spec/generate-application/runtime/create-application.js +0 -1
  816. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
  817. package/dist/application-spec/generate-application/runtime/index.d.ts +0 -8
  818. package/dist/application-spec/generate-application/runtime/index.js +0 -1
  819. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +0 -1
  820. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +0 -8
  821. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
  822. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -8
  823. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
  824. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
  825. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
  826. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
  827. package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
  828. package/dist/application-spec/generate-application/runtime/spec-runtime.js +0 -1
  829. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +0 -5
  830. package/dist/application-spec/generate-application/runtime-spec/index.js +0 -1
  831. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +0 -103
  832. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
  833. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
  834. package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
  835. package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
  836. package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
  837. package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
  838. package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
  839. package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
  840. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
  841. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
  842. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
  843. package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
  844. package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
  845. package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
  846. package/dist/domain/available-system-components.d.ts +0 -11
  847. package/dist/domain/available-system-components.js +0 -1
  848. package/dist/domain/domain-builder.js +0 -1
  849. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +0 -1
  850. package/dist/domain/domain-runtime/spec/module-checks/index.js +0 -1
  851. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +0 -1
  852. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +0 -1
  853. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +0 -1
  854. package/dist/phoenix/commands/generated-env-markers.js +0 -1
  855. package/dist/phoenix/services/lingui.d.ts +0 -15
  856. package/dist/phoenix/services/lingui.js +0 -1
  857. package/dist/phoenix/services/phoenix-application.d.ts +0 -21
  858. package/dist/phoenix/services/phoenix-application.js +0 -1
  859. /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.d.ts +0 -0
  860. /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.js +0 -0
  861. /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
  862. /package/dist/{application-spec/generate-application/runtime/spec-code/spec-code-module.js → domain/spec/application/admin-pages.js} +0 -0
  863. /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-states.js} +0 -0
  864. /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
  865. /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
  866. /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/configurator-states.js} +0 -0
  867. /package/dist/domain/{application/assistant/assistant-manifest.js → spec/components/bindings/index.js} +0 -0
  868. /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
  869. /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
  870. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
  871. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
  872. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.d.ts +0 -0
  873. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.js +0 -0
  874. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.d.ts +0 -0
  875. /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.js +0 -0
  876. /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.d.ts +0 -0
  877. /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.js +0 -0
  878. /package/dist/domain/{domain-runtime → spec}/errors/index.d.ts +0 -0
  879. /package/dist/domain/{domain-runtime → spec}/errors/index.js +0 -0
  880. /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.d.ts +0 -0
  881. /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.js +0 -0
  882. /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
  883. /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
  884. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
  885. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
  886. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
  887. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
  888. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
  889. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
  890. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.js +0 -0
  891. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts +0 -0
  892. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js +0 -0
  893. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js +0 -0
  894. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.js +0 -0
  895. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.js +0 -0
  896. /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js +0 -0
  897. /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-domain.d.ts +0 -0
  898. /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.js +0 -0
  899. /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
  900. /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
  901. /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.js +0 -0
  902. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.js +0 -0
  903. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.d.ts +0 -0
  904. /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.js +0 -0
  905. /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.d.ts +0 -0
  906. /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.js +0 -0
  907. /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.js +0 -0
  908. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
  909. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.js +0 -0
  910. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
  911. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
  912. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
  913. /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
  914. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.d.ts +0 -0
  915. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.js +0 -0
  916. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.js +0 -0
  917. /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/spec-code-module.d.ts +0 -0
  918. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.d.ts +0 -0
  919. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.js +0 -0
  920. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.d.ts +0 -0
  921. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.js +0 -0
  922. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.d.ts +0 -0
  923. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.js +0 -0
  924. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.js +0 -0
  925. /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.js +0 -0
  926. /package/dist/domain/{application/assistant/assistant-resolved-manifest.js → spec/sections/assistant/assistant-manifest.js} +0 -0
  927. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.d.ts +0 -0
  928. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.js +0 -0
  929. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.d.ts +0 -0
  930. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.js +0 -0
  931. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.d.ts +0 -0
  932. /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.js +0 -0
  933. /package/dist/domain/{application → spec/sections}/assistant/form/index.d.ts +0 -0
  934. /package/dist/domain/{application → spec/sections}/assistant/form/index.js +0 -0
  935. /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
  936. /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
  937. /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
  938. /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as t,styled as s}from"@mui/material";import{useCallback as r,useMemo as n}from"react";import{match as o}from"ts-pattern";import{useEagerObservableValue as l}from"#package/react-sdk";import{PhxIcon as d}from"#package/ui-sdk";import{useConfigurator as m}from"../../application-runtime/index.js";import{AssistantToolChips as c}from"./AssistantChips.js";import{AssistantMarkdown as h}from"./AssistantMarkdown.js";import{describeAssistantFailure as p}from"./assistant-failure.js";import{EntityLinkSelectionProvider as g,useCreateEntityLinkSelection as u}from"./entity-link/index.js";import{AssistantPanelName as f}from"./theme.js";import{buildEarlierThreadItems as k,buildThreadView as v}from"./thread-items.js";import{useFollowStream as b}from"./use-follow-stream.js";let w=s("div",{name:f,slot:"thread"})({display:"grid",position:"relative"}),x=s("div",{name:f,slot:"messages"})(({theme:{spacing:e,typography:a}})=>({...a.body2,display:"flex",flexDirection:"column",gap:e(1.5),overflowY:"auto",overscrollBehavior:"contain",paddingBlock:e(2),paddingInline:`var(--phx-sidebar-padding, ${e(2)})`,"& > :first-child":{marginBlockStart:"auto"}})),y=s("div",{name:f,slot:"userMessage"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-end",background:`hsl(from ${e.primary.main} h s l / 12%)`,borderRadius:"14px 14px 4px 14px",maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),T=s("div",{name:f,slot:"greeting"})({}),C=s("div",{name:f,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),S=s("div",{name:f,slot:"separator"})(({theme:{palette:e,spacing:a,typography:i}})=>({...i.caption,alignItems:"center",color:e.text.secondary,display:"flex",gap:a(1),"&::before, &::after":{borderBlockStart:`1px solid ${e.divider}`,content:'""',flex:1}})),j=s(t,{name:f,slot:"earlierButton"})({alignSelf:"center"}),I=s("div",{name:f,slot:"notice"})(({theme:{palette:e,shape:a,spacing:i}})=>({alignItems:"center",background:e.action.hover,borderRadius:a.borderRadius,display:"flex",flexWrap:"wrap",gap:i(1),justifyContent:"space-between",paddingBlock:i(1),paddingInline:i(1.5)})),B=s(t,{name:f,slot:"newReplyButton"})(({theme:{palette:e,spacing:a}})=>({background:e.text.primary,borderRadius:"calc(infinity * 1px)",color:e.background.paper,insetBlockEnd:a(1),insetInlineStart:"50%",position:"absolute",translate:"-50% 0","&:hover":{background:e.text.secondary}})),E=({item:a,isActive:t,undoableToolCallId:s,onUndo:r})=>o(a).with({kind:"user"},({text:a})=>e(y,{children:a})).with({kind:"text"},({markdown:a,isStreaming:i,forms:t})=>e(h,{markdown:a,isStreaming:i,forms:t})).with({kind:"tools"},({tools:a})=>e(c,{tools:a,isActive:t,canUndo:a.some(({id:e})=>e===s),onUndo:r})).with({kind:"separator"},()=>e(S,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:s}=m(),c=l(s.chat$),{messages:h,isLoading:f,isResuming:y,earlierThreads:S}=c,A=l(s.undoTipToolCallId$),R=f?void 0:A,{items:L,isThinking:z}=n(()=>v(h,f,y),[h,f,y]),$=n(()=>k(S),[S]),U=n(()=>L.filter(({kind:e})=>"user"===e).length,[L]),D=c.error?p(c.failedStatus):void 0,{scrollerRef:M,hasUnseenContent:W,handleScroll:q,scrollToEnd:H}=b(n(()=>({messages:h,isThinking:z,isResuming:y,failure:D?.kind}),[h,z,y,D?.kind]),U),N=u(),Y=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, label, select, textarea, [role="button"], [role="tooltip"]')||window.getSelection()?.isCollapsed!==!1&&N.release()},[N]),F=!c.isLoaded&&0===$.length&&!y&&!D;return a(w,{children:[e(g,{selection:N,children:a(x,{ref:M,onScroll:q,onClick:Y,role:"log","aria-live":"polite",children:[c.isLoaded&&0===L.length&&0===$.length&&!f&&!y&&!D&&e(T,{children:e(i,{id:"sdk.assistant.thread.greeting",message:"Hi. I can answer questions about this design and change it with you. Tell me what you need."})}),F&&e(C,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversation…"})}),c.isLoadingEarlierThread&&e(C,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversation…"})}),c.hasEarlierThread&&!c.isLoadingEarlierThread&&e(j,{size:"small",color:"inherit",onClick:s.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),$.map(a=>e(E,{item:a,isActive:!1,undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),L.map(a=>e(E,{item:a,isActive:f&&a===L.at(-1),undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),y&&e(C,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversation…"})}),z&&e(C,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinking…"})}),D&&a(I,{role:"alert",children:[e("span",{children:o(D.kind).with("notAvailable",()=>e(i,{id:"sdk.assistant.failure.notAvailable",message:"The assistant is not available here."})).with("busy",()=>e(i,{id:"sdk.assistant.failure.busy",message:"The assistant is still working on an earlier message."})).with("unavailable",()=>e(i,{id:"sdk.assistant.failure.unavailable",message:"The assistant is unavailable right now."})).exhaustive()}),D.canRetry&&e(t,{size:"small",variant:"outlined",color:"inherit",onClick:s.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]})}),W&&e(B,{size:"small",onClick:H,endIcon:e(d,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as s,styled as t}from"@mui/material";import{useCallback as r,useMemo as n,useRef as o}from"react";import{match as l}from"ts-pattern";import{useEagerObservableValue as d}from"#package/react-sdk";import{PhxIcon as m,hoverStyles as c}from"#package/ui-sdk";import{useConfigurator as h}from"../../application-runtime/index.js";import{AssistantActivityRow as g,AssistantToolChips as p}from"./AssistantChips.js";import{AssistantMarkdown as u}from"./AssistantMarkdown.js";import{describeAssistantFailure as k}from"./assistant-failure.js";import{MessageImages as f}from"./attachments/index.js";import{EntityLinkSelectionProvider as b,useCreateEntityLinkSelection as v}from"./entity-link/index.js";import{AssistantPanelName as x}from"./theme.js";import{buildEarlierThreadItems as w,buildThreadView as y}from"./thread-items.js";import{useFollowStream as T}from"./use-follow-stream.js";import{useLoadOlderOnTop as I}from"./use-load-older-on-top.js";let S=t("div",{name:x,slot:"thread"})({display:"grid",position:"relative"}),j=t("div",{name:x,slot:"messages"})(({theme:{spacing:e,typography:a}})=>({...a.body2,display:"flex",flexDirection:"column",gap:e(1.5),overflowY:"auto",overscrollBehavior:"contain",paddingBlock:e(2),paddingInline:`var(--phx-sidebar-padding, ${e(2)})`,position:"relative","& > :first-child":{marginBlockStart:"auto"}})),C=t("div",{name:x,slot:"userMessage"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-end",background:`hsl(from ${e.primary.main} h s l / 12%)`,borderRadius:"14px 14px 4px 14px",display:"grid",gap:a(1),maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),B=t("div",{name:x,slot:"greeting"})({}),R=t("div",{name:x,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),L=t("div",{name:x,slot:"separator"})(({theme:{palette:e,spacing:a,typography:i}})=>({...i.caption,alignItems:"center",color:e.text.secondary,display:"flex",gap:a(1),"&::before, &::after":{borderBlockStart:`1px solid ${e.divider}`,content:'""',flex:1}})),A=t(s,{name:x,slot:"earlierButton"})({alignSelf:"center"}),E=t("div")({blockSize:1,insetBlockStart:0,insetInline:0,position:"absolute"}),M=t(R)(({theme:{palette:e,shape:a,spacing:i}})=>({background:e.background.paper,borderRadius:a.borderRadius,insetBlockStart:i(1),insetInlineStart:"50%",paddingBlock:i(.5),paddingInline:i(1),position:"absolute",translate:"-50% 0"})),z=t("div",{name:x,slot:"notice"})(({theme:{palette:e,shape:a,spacing:i}})=>({alignItems:"center",background:e.action.hover,borderRadius:a.borderRadius,display:"flex",flexWrap:"wrap",gap:i(1),justifyContent:"space-between",paddingBlock:i(1),paddingInline:i(1.5)})),O=t(s,{name:x,slot:"newReplyButton"})(({theme:{palette:e,spacing:a}})=>({background:e.text.primary,borderRadius:"calc(infinity * 1px)",color:e.background.paper,insetBlockEnd:a(1),insetInlineStart:"50%",position:"absolute",translate:"-50% 0","&:hover":{background:e.text.primary},...c({"&:hover":{background:e.text.secondary}})})),$=({item:s,isActive:t,undoableToolCallId:r,onUndo:n})=>l(s).with({kind:"user"},({text:i,imageIds:s})=>a(C,{children:[s.length>0&&e(f,{imageIds:s}),i]})).with({kind:"text"},({markdown:a,isStreaming:i,forms:s})=>e(u,{markdown:a,isStreaming:i,forms:s})).with({kind:"tools"},({tools:a})=>e(p,{tools:a,isActive:t,canUndo:a.some(({id:e})=>e===r),onUndo:n})).with({kind:"separator"},()=>e(L,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:t}=h(),c=d(t.chat$),{messages:p,isLoading:u,isResuming:f,earlierThreads:x}=c,C=d(t.undoTipToolCallId$),L=u?void 0:C,{items:U,isThinking:D}=n(()=>y(p,u,f),[p,u,f]),W=n(()=>w(x),[x]),q=n(()=>U.filter(({kind:e})=>"user"===e).at(-1)?.id,[U]),H=c.error?k(c.failedStatus):void 0,K=p.at(-1),{scrollerRef:N,hasUnseenContent:Y,handleScroll:F,scrollToEnd:G}=T(n(()=>({newestMessage:K,isThinking:D,isResuming:f,failure:H?.kind}),[K,D,f,H?.kind]),q),J=o(null);I(N,J,{enabled:c.hasOlderMessages&&!c.isLoadingOlderMessages,onReachTop:t.loadOlderMessages,firstItemKey:p[0]?.id});let P=null!==c.earlierThreadId&&!c.hasOlderMessages&&!c.isLoadingEarlierThread,Q=v(),V=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, label, select, textarea, [role="button"], [role="tooltip"]')||window.getSelection()?.isCollapsed!==!1&&Q.release()},[Q]),X=!c.isLoaded&&0===W.length&&!f&&!H;return a(S,{children:[e(b,{selection:Q,children:a(j,{ref:N,onScroll:F,onClick:V,role:"log","aria-live":"polite",children:[c.isLoaded&&0===U.length&&0===W.length&&!u&&!f&&!H&&e(B,{children:e(i,{id:"sdk.assistant.thread.greeting",message:"Hi. I can answer questions about this design and change it with you. Tell me what you need."})}),X&&e(R,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversation…"})}),c.isLoadingEarlierThread&&e(R,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversation…"})}),P&&e(A,{size:"small",color:"inherit",onClick:t.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),W.map(a=>e($,{item:a,isActive:!1,undoableToolCallId:L,onUndo:t.undoToolCalls},a.id)),U.map(a=>e($,{item:a,isActive:u&&a===U.at(-1),undoableToolCallId:L,onUndo:t.undoToolCalls},a.id)),f&&e(R,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversation…"})}),D&&e(g,{label:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinking…"})}),H&&a(z,{role:"alert",children:[e("span",{children:l(H.kind).with("notAvailable",()=>e(i,{id:"sdk.assistant.failure.notAvailable",message:"The assistant is not available here."})).with("busy",()=>e(i,{id:"sdk.assistant.failure.busy",message:"The assistant is still working on an earlier message."})).with("unavailable",()=>e(i,{id:"sdk.assistant.failure.unavailable",message:"The assistant is unavailable right now."})).exhaustive()}),H.canRetry&&e(s,{size:"small",variant:"outlined",color:"inherit",onClick:t.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]}),c.hasOlderMessages&&e(E,{ref:J,"aria-hidden":!0})]})}),c.isLoadingOlderMessages&&e(M,{role:"status",children:e(i,{id:"sdk.assistant.thread.loadingOlder",message:"Loading earlier messages…"})}),Y&&e(O,{size:"small",onClick:G,endIcon:e(m,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
@@ -4,5 +4,8 @@ export interface AssistantAlertProps {
4
4
  readonly kind: AlertKind;
5
5
  readonly children: ReactNode;
6
6
  }
7
- /** A GitHub alert in a reply: its content as Markdown, marked by the colour and icon of its kind. */
7
+ /**
8
+ * A GitHub alert in a reply: its content as Markdown, marked by the colour and icon of its kind,
9
+ * and starting with the word for its kind, which only assistive technology reads.
10
+ */
8
11
  export declare const AssistantAlert: import("react").MemoExoticComponent<({ kind, children }: AssistantAlertProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as i}from"react/jsx-runtime";import{alpha as o,styled as t}from"@mui/material";import{memo as n}from"react";import{PhxIcon as a}from"#package/ui-sdk";import{AssistantPanelName as e}from"../theme.js";let l={note:{color:"info",icon:"Info"},tip:{color:"success",icon:"Lightbulb"},important:{color:"primary",icon:"WarningCircle"},warning:{color:"warning",icon:"Warning"},caution:{color:"error",icon:"XCircle"}},c=t("div",{name:e,slot:"alert"})(({theme:{palette:r,shape:i,spacing:t,typography:n}})=>({borderInlineStart:"3px solid",borderRadius:i.borderRadius,display:"grid",gap:t(1),gridTemplateColumns:"min-content minmax(0, 1fr)",marginBlock:t(1),padding:t(1,1.5),...Object.fromEntries(Object.entries(l).map(([i,{color:t}])=>[`&[data-alert="${i}"]`,{background:o(r[t].main,.08),borderInlineStartColor:r[t].main,"& > :first-child":{color:r[t].main}}])),"& > :last-child > :first-child":{marginBlockStart:0},"& > :last-child > :last-child":{marginBlockEnd:0},"& > :first-child":{blockSize:`calc(${n.body2.lineHeight} * 1em)`,display:"grid",placeItems:"center"}}));export const AssistantAlert=n(({kind:o,children:t})=>i(c,{role:"note","data-alert":o,children:[r("span",{children:r(a,{name:l[o].icon})}),r("div",{children:t})]}));
1
+ import{jsx as a,jsxs as i}from"react/jsx-runtime";import{alpha as r,styled as t}from"@mui/material";import{visuallyHidden as e}from"@mui/utils";import{memo as l}from"react";import{useLocalizable as n}from"#package/react-sdk";import{PhxIcon as s}from"#package/ui-sdk";import{AssistantPanelName as o}from"../theme.js";let m={note:{color:"info",icon:"Info",label:{id:"sdk.assistant.alert.note.label",message:"Note"}},tip:{color:"success",icon:"Lightbulb",label:{id:"sdk.assistant.alert.tip.label",message:"Tip"}},important:{color:"primary",icon:"WarningCircle",label:{id:"sdk.assistant.alert.important.label",message:"Important"}},warning:{color:"warning",icon:"Warning",label:{id:"sdk.assistant.alert.warning.label",message:"Warning"}},caution:{color:"error",icon:"XCircle",label:{id:"sdk.assistant.alert.caution.label",message:"Caution"}}},c=t("div",{name:o,slot:"alert"})(({theme:{palette:a,shape:i,spacing:t,typography:e}})=>({borderInlineStart:"3px solid",borderRadius:i.borderRadius,display:"grid",gap:t(1),gridTemplateColumns:"min-content minmax(0, 1fr)",marginBlock:t(1),padding:t(1,1.5),...Object.fromEntries(Object.entries(m).map(([i,{color:t}])=>[`&[data-alert="${i}"]`,{background:r(a[t].main,.08),borderInlineStartColor:a[t].main,"& > :first-child":{color:a[t].main}}])),"& > :last-child > :first-child":{marginBlockStart:0},"& > :last-child > :last-child":{marginBlockEnd:0},"& > :first-child":{blockSize:`calc(${e.body2.lineHeight} * 1em)`,display:"grid",placeItems:"center"}}));export const AssistantAlert=l(({kind:r,children:t})=>{let{icon:l,label:o}=m[r],d=n(o);return i(c,{role:"note","data-alert":r,children:[i("span",{children:[a(s,{name:l}),a("span",{style:e,children:d})]}),a("div",{children:t})]})});
@@ -0,0 +1,11 @@
1
+ interface MessageImagesProps {
2
+ /** The images the user attached to the message, by the ids it references them by. */
3
+ readonly imageIds: readonly string[];
4
+ }
5
+ /**
6
+ * The images a user attached to a message, as thumbnails above its text. They are read from the
7
+ * server as soon as the bubble shows, through the same per-configuration cache as the screenshots;
8
+ * a click shows one larger in a popover.
9
+ */
10
+ export declare const MessageImages: ({ imageIds }: MessageImagesProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ButtonBase as i,Popover as o,styled as a}from"@mui/material";import{useCallback as t,useMemo as s,useState as n}from"react";import{useLocalizable as m}from"#package/react-sdk";import{useScreenshotSrc as l}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"},p=a("div",{name:d,slot:"messageImages"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(.75),justifyContent:"flex-end"})),g=a(i,{name:d,slot:"messageImage"})(({theme:{palette:e,shape:r}})=>({background:e.action.hover,blockSize:64,borderRadius:r.borderRadius,inlineSize:64,overflow:"hidden"})),h=a("img")({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),b=a("img")(({theme:{shape:e}})=>({borderRadius:e.borderRadius,display:"block",maxBlockSize:"70vh",maxInlineSize:"min(80vw, 640px)"})),v=({imageId:r,onOpen:i})=>{let o=l(s(()=>({kind:"stored",imageId:r}),[r]));return e(g,{"aria-label":m(c),disabled:void 0===o,onClick:e=>void 0!==o&&i(e,o),children:void 0!==o&&e(h,{src:o,alt:""})})};export const MessageImages=({imageIds:i})=>{let[a,s]=n(),m=t((e,r)=>{s({anchor:e.currentTarget,src:r})},[]),l=t(()=>s(void 0),[]);return r(p,{children:[i.map(r=>e(v,{imageId:r,onOpen:m},r)),e(o,{open:void 0!==a,anchorEl:a?.anchor,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{padding:1}}},children:a&&e(b,{src:a.src,alt:""})})]})};
@@ -0,0 +1,2 @@
1
+ export { MessageImages } from './MessageImages.js';
2
+ export { ASSISTANT_IMAGE_MAX_SIDE, fitWithin, prepareImage } from './prepare-image.js';
@@ -0,0 +1 @@
1
+ export{MessageImages}from"./MessageImages.js";export{ASSISTANT_IMAGE_MAX_SIDE,fitWithin,prepareImage}from"./prepare-image.js";
@@ -0,0 +1,19 @@
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
+ * Turns an image file the user attaches into what is uploaded: decoded, fitted within
14
+ * {@link ASSISTANT_IMAGE_MAX_SIDE} on each side and re-encoded as JPEG. Re-encoding drops the
15
+ * file's metadata, its location included, and fills a transparent background white. Rejects for a
16
+ * file the browser cannot decode.
17
+ */
18
+ export declare const prepareImage: (file: Blob) => Promise<Blob>;
19
+ 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 prepareImage=async t=>{let a=await e(t),{width:r,height:n}=fitWithin({width:a.naturalWidth,height:a.naturalHeight},2048),o=document.createElement("canvas");o.width=r,o.height=n;let h=o.getContext("2d");if(!h)throw Error("The browser gave no 2D canvas to prepare the attached image on.");return h.fillStyle="#fff",h.fillRect(0,0,r,n),h.drawImage(a,0,0,r,n),new Promise((e,t)=>{o.toBlob(a=>a?e(a):t(Error("The browser could not encode the attached image as JPEG.")),"image/jpeg",.85)})};
@@ -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 n}from"@mui/material";import{memo as t,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 b}from"../theme.js";import{composeAnswer as u}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=n("div",{name:b,slot:"form"})(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(1.5),marginBlock:e(1)})),x=n(o,{name:b,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=n(o,{name:b,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}})),M=n("div",{name:b,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=({model:o,disabled:n,send:t})=>{let[a,d]=l(()=>new Map),[s,c]=l(()=>new Map),p=(i,r)=>{let{id:s,definition:l,label:b,attributes:g}=i;return m(l).with({role:"option"},({component:l})=>e(l,{attributes:g,label:b,disabled:n,selected:!0===a.get(s),onSelect:e=>{o.isQuick?t(u(o,new Map([[i.id,!0]]),new Map([[i.id,e]]))):(c(r=>new Map(r).set(i.id,e)),d(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}))}},s)).with({role:"input"},({component:r})=>e(r,{attributes:g,label:b,disabled:n,state:a.get(s),onChange:(e,r)=>{o.isQuick?t(u(o,new Map([[i.id,e]]),new Map([[i.id,r]]))):(d(r=>new Map(r).set(i.id,e)),c(e=>new Map(e).set(i.id,r)))}},s)).with({role:"group"},{role:"choice"},{role:"choices"},({component:r})=>e(r,{attributes:g,label:b,disabled:n,children:i.children.map(e=>p(e,i))},s)).exhaustive()};return i(k,{children:[o.root.children.map(e=>p(e,o.root)),!o.isQuick&&e(x,{variant:"contained",disabled:n,disableElevation:!0,onClick:()=>{n||o.isQuick||t(u(o,a,s))},children:e(r,{id:"sdk.assistant.form.submit.label",message:"Submit"})})]})};export const AssistantForm=t(({source:o,status:n})=>{let{assistantSystem:t}=p(),[m,c]=l(!1),b="writing"===n,u=h(),k=s(()=>b?void 0:f(o,u),[o,b,u]),x="ready"!==n||m,y=a(e=>{c(!0),t.send(e).finally(()=>c(!1))},[t]);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(v,{model:k,disabled:x,send:y}):i(M,{role:"alert",children:[e("span",{children:e(r,{id:"sdk.assistant.form.failure",message:"The assistant couldn't build this form."})}),e(w,{disabled:x,onClick:()=>y(g(k.errors)),children:e(r,{id:"sdk.assistant.form.fix.label",message:"Fix it"})})]}):e(M,{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})]})};
@@ -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}});
@@ -4,6 +4,6 @@ interface ScreenshotThumbnailsProps {
4
4
  /** Called once a picture has loaded, which changes the size of the popover. */
5
5
  readonly onImageLoad: () => void;
6
6
  }
7
- /** The pictures of a tool call's screenshots, each captioned by its view and entity id. */
7
+ /** The pictures of a tool call's screenshots. */
8
8
  export declare const ScreenshotThumbnails: ({ screenshots, onImageLoad }: ScreenshotThumbnailsProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{styled as r}from"@mui/material";import{AssistantPanelName as o}from"../theme.js";let a=r("span",{name:o,slot:"screenshots"})(({theme:{palette:e,shape:i,shadows:r,spacing:o,typography:a}})=>({...a.caption,background:e.background.paper,borderRadius:i.borderRadius,boxShadow:r[4],color:e.text.secondary,display:"grid",gap:o(1.5),gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",inlineSize:"min(80vw, 480px)",padding:o(1.5)})),n=r("span")(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(.5),minInlineSize:0})),t=r("img")(({theme:{palette:e,shape:i}})=>({blockSize:"auto",borderRadius:i.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,inlineSize:"100%"})),s=r("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});export const ScreenshotThumbnails=({screenshots:r,onImageLoad:o})=>e(a,{children:r.map(({label:r,entityId:a,view:d,src:l})=>i(n,{children:[e(t,{src:l,alt:"",onLoad:o}),i(s,{title:r,children:[d," \xb7 ",a]})]},r))});
1
+ import{jsx as e}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{AssistantPanelName as r}from"../theme.js";import{useScreenshotSrc as a}from"./use-screenshot-src.js";let i=o("span",{name:r,slot:"screenshots",shouldForwardProp:e=>"columns"!==e})(({columns:e,theme:{palette:o,shape:r,shadows:a,spacing:i}})=>({background:o.background.paper,borderRadius:r.borderRadius,boxShadow:a[4],display:"grid",gap:i(1.5),gridTemplateColumns:`repeat(${e}, minmax(0, 200px))`,maxInlineSize:"80vw",padding:i(1.5)})),s=o("img")(({theme:{palette:e,shape:o}})=>({blockSize:"auto",borderRadius:o.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,display:"block",inlineSize:"100%"})),d=o("span")(({theme:{palette:e,shape:o}})=>({aspectRatio:"4 / 3",background:e.action.hover,borderRadius:o.borderRadius/2,display:"block"})),t=({picture:o,onImageLoad:r})=>{let i=a(o);return void 0===i?e(d,{}):e(s,{src:i,alt:"",onLoad:r})};export const ScreenshotThumbnails=({screenshots:o,onImageLoad:r})=>e(i,{columns:Math.min(o.length,2),children:o.map(({label:o,picture:a})=>e(t,{picture:a,onImageLoad:r},o))});
@@ -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,11 +1,19 @@
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 = {
6
+ readonly kind: 'stored';
7
+ readonly imageId: string;
8
+ } | {
9
+ readonly kind: 'inline';
10
+ readonly src: string;
11
+ };
1
12
  /** A screenshot a `query` or `apply` call took, as the panel shows it. */
2
13
  export interface AssistantToolScreenshot {
3
14
  /** The label the call's `image` field returned, such as `Cabinet-2/doorLayout#2`. */
4
15
  readonly label: string;
5
- readonly entityId: string;
6
- readonly view: string;
7
- /** The picture as a data URL. */
8
- readonly src: string;
16
+ readonly picture: AssistantScreenshotPicture;
9
17
  }
10
18
  /**
11
19
  * The screenshots of a tool result: the image parts that follow the result's JSON, each after the
@@ -1 +1 @@
1
- import{z as e}from"zod";let t=e.object({type:e.literal("text"),content:e.string()}),a=e.object({type:e.literal("image"),source:e.object({type:e.literal("data"),value:e.string(),mimeType:e.string()})}),s=/^([^/]+)\/([^#]+)(?:#\d+)?$/;export const readToolScreenshots=e=>Array.isArray(e)?e.slice(1).flatMap((e,r,c)=>{let l=a.safeParse(e),o=t.safeParse(c[r-1]),n=o.success?s.exec(o.data.content):null;if(!l.success||!o.success||!n?.[1]||!n[2])return[];let{value:i,mimeType:d}=l.data.source;return[{label:o.data.content,entityId:n[1],view:n[2],src:`data:${d};base64,${i}`}]}):[];
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}]:[]}):[];
@@ -0,0 +1,8 @@
1
+ import type { AssistantScreenshotPicture } from './tool-screenshots.js';
2
+ /**
3
+ * The `src` of a screenshot's or an attached image's picture: the data URL of an inline one at
4
+ * once, and for an uploaded one the object URL the assistant system reads it into, once it has been
5
+ * read; `undefined` until then and when the read fails. The screenshots of a call are read only
6
+ * while their popover is open; the images a user attached are read as soon as their bubble shows.
7
+ */
8
+ export declare const useScreenshotSrc: (picture: AssistantScreenshotPicture) => string | undefined;
@@ -0,0 +1 @@
1
+ import{useEffect as r,useState as e}from"react";import{useConfigurator as n}from"../../../application-runtime/index.js";export const useScreenshotSrc=t=>{let{assistantSystem:i}=n(),o="stored"===t.kind?t.imageId:null,[l,d]=e();return(r(()=>{if(null===o)return;let r=!0;return i.loadScreenshotUrl(o).then(e=>{r&&d({imageId:o,src:e})},()=>void 0),()=>{r=!1}},[i,o]),"inline"===t.kind)?t.src:l?.imageId===o?l.src:void 0};
@@ -1,3 +1,14 @@
1
+ /** Where a code block starts and ends in the text, as Markdown parsed it. */
2
+ export interface FencePosition {
3
+ readonly start: number;
4
+ readonly end: number;
5
+ }
6
+ /**
7
+ * True when a code block of a finished reply was cut off: it runs to the end of the reply without
8
+ * the line that closes its fence, whatever backticks the reply has elsewhere. A block that the end
9
+ * of its list item or blockquote closed before the reply went on is not cut off.
10
+ */
11
+ export declare const isCutOffFence: (text: string, { start, end }: FencePosition) => boolean;
1
12
  /** True when the text has a code fence the model has not closed yet. */
2
13
  export declare const hasOpenFence: (text: string) => boolean;
3
14
  /**
@@ -1,2 +1,2 @@
1
- let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/,l=/(^|\n) {0,3}>[ \t]*\[![a-z]*$/i,n=/(^|\n) {0,3}>[ \t]*\[![a-z]+\][ \t]*$/i;export const hasOpenFence=t=>e(t,"```")%2==1;export const completeStreamedMarkdown=s=>{var r;let a;if(hasOpenFence(s))return`${s}
2
- \`\`\``;let i=s.lastIndexOf("```"),c=-1===i?"":s.slice(0,i+3),{head:$,marker:h}=(r=s.slice(c.length),null==(a=n.exec(r))?{head:r.replace(l,"$1"),marker:""}:{head:r.slice(0,a.index),marker:r.slice(a.index)}),p=(e=>{let l=e.split("\n"),n=l.length;for(;n>0&&l[n-1]?.trimStart().startsWith("|");)n-=1;let s=l.slice(n),r=s[1],a=null!=r&&s.length>2&&t.test(r);return 0===s.length||a?e:l.slice(0,n).join("\n")})((e($,"`")%2==1?$.slice(0,$.lastIndexOf("`")):$).replace(/!?\[([^\]\n]*)\](?:\([^)\n]*)?$/,"$1").replace(/!?\[[^\]\n]*$/,"")),d=e(p,"**")%2==1?`${p}**`:p;return`${c}${d}${h}`};
1
+ let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/,l=/(^|\n) {0,3}>[ \t]*\[![a-z]*$/i,n=/(^|\n) {0,3}>[ \t]*\[![a-z]+\][ \t]*$/i,s=/^[ \t>]*(`{3,}|~{3,})/,r=/^[ \t>]*(`{3,}|~{3,})[ \t]*$/;export const isCutOffFence=(e,{start:t,end:l})=>{let n,i,c;return l>=e.trimEnd().length&&(n=e.slice(t,l).split("\n"),i=s.exec(n[0]??"")?.[1],c=n.length>1?r.exec(n.at(-1)??"")?.[1]:void 0,null==i||null==c||c[0]!==i[0]||!(c.length>=i.length))};export const hasOpenFence=t=>e(t,"```")%2==1;export const completeStreamedMarkdown=s=>{var r;let i;if(hasOpenFence(s))return`${s}
2
+ \`\`\``;let c=s.lastIndexOf("```"),a=-1===c?"":s.slice(0,c+3),{head:h,marker:$}=(r=s.slice(a.length),null==(i=n.exec(r))?{head:r.replace(l,"$1"),marker:""}:{head:r.slice(0,i.index),marker:r.slice(i.index)}),p=(e=>{let l=e.split("\n"),n=l.length;for(;n>0&&l[n-1]?.trimStart().startsWith("|");)n-=1;let s=l.slice(n),r=s[1],i=null!=r&&s.length>2&&t.test(r);return 0===s.length||i?e:l.slice(0,n).join("\n")})((e(h,"`")%2==1?h.slice(0,h.lastIndexOf("`")):h).replace(/!?\[([^\]\n]*)\](?:\([^)\n]*)?$/,"$1").replace(/!?\[[^\]\n]*$/,"")),d=e(p,"**")%2==1?`${p}**`:p;return`${a}${d}${$}`};
@@ -23,6 +23,8 @@ export type AssistantThreadItem = {
23
23
  readonly kind: 'user';
24
24
  readonly id: string;
25
25
  readonly text: string;
26
+ /** The images the user attached, by the ids the message references them by. */
27
+ readonly imageIds: readonly string[];
26
28
  } | {
27
29
  readonly kind: 'text';
28
30
  readonly id: string;
@@ -1 +1 @@
1
- import{match as t}from"ts-pattern";import{describeToolCall as e}from"./tool-chip.js";let r=t=>{try{return JSON.parse(t)}catch{return t}},i=t=>t.map(t=>"text"===t.type?t.content:"").join("").trim();export const buildThreadView=(o,n,s)=>{let l=(t=>{let e=new Map;for(let i of t)for(let t of i.parts)"tool-result"===t.type&&e.set(t.toolCallId,{result:"string"==typeof t.content?r(t.content):t.content,error:"error"===t.state?t.error??"The tool call failed.":void 0});return e})(o),a=[],d=o.at(-1),p=t=>{let e=a.at(-1);e?.kind==="tools"?a[a.length-1]={...e,tools:[...e.tools,t]}:a.push({kind:"tools",id:t.id,tools:[t]})};for(let r of o){if("user"===r.role){let t=i(r.parts);t&&a.push({kind:"user",id:r.id,text:t});continue}let o=n&&r===d,u=t({isLast:r===d,isBusy:o||s}).with({isLast:!1},()=>"hidden").with({isBusy:!0},()=>"disabled").otherwise(()=>"enabled");r.parts.forEach((t,i)=>{let n=`${r.id}:${i}`;if("text"===t.type){if(t.content.trim()){let e=o&&i===r.parts.length-1;a.push({kind:"text",id:n,markdown:t.content,isStreaming:e,forms:u})}return}if("tool-call"!==t.type)return;let s=l.get(t.id),d=t.input,h=t.output??s?.result;p({id:t.id,input:d,result:h,chip:e({name:t.name,input:d,result:h,error:s?.error,isReplyRunning:o})})})}let u=a.at(-1),h=d?.role==="assistant"&&(u?.kind==="text"&&u.isStreaming||u?.kind==="tools");return{items:a,isThinking:n&&!h}};export const buildEarlierThreadItems=t=>t.flatMap(({threadId:t,messages:e})=>[...buildThreadView(e,!1,!1).items.map(e=>"text"===e.kind?{...e,id:`${t}:${e.id}`,forms:"hidden"}:{...e,id:`${t}:${e.id}`}),{kind:"separator",id:`${t}:separator`}]);
1
+ import{match as t}from"ts-pattern";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";import{describeToolCall as r}from"./tool-chip.js";let i=t=>{try{return JSON.parse(t)}catch{return t}},o=t=>t.map(t=>"text"===t.type?t.content:"").join("").trim(),s=t=>t.flatMap(t=>"image"===t.type&&"url"===t.source.type?e(t.source.value)??[]:[]);export const buildThreadView=(e,a,l)=>{let n=(t=>{let e=new Map;for(let r of t)for(let t of r.parts)"tool-result"===t.type&&e.set(t.toolCallId,{result:"string"==typeof t.content?i(t.content):t.content,error:"error"===t.state?t.error??"The tool call failed.":void 0});return e})(e),d=[],p=e.at(-1),u=t=>{let e=d.at(-1);e?.kind==="tools"?d[d.length-1]={...e,tools:[...e.tools,t]}:d.push({kind:"tools",id:t.id,tools:[t]})};for(let i of e){if("user"===i.role){let t=o(i.parts),e=s(i.parts);(t||e.length>0)&&d.push({kind:"user",id:i.id,text:t,imageIds:e});continue}let e=a&&i===p,c=t({isLast:i===p,isBusy:e||l}).with({isLast:!1},()=>"hidden").with({isBusy:!0},()=>"disabled").otherwise(()=>"enabled");i.parts.forEach((t,o)=>{let s=`${i.id}:${o}`;if("text"===t.type){if(t.content.trim()){let r=e&&o===i.parts.length-1;d.push({kind:"text",id:s,markdown:t.content,isStreaming:r,forms:c})}return}if("tool-call"!==t.type)return;let a=n.get(t.id),l=t.input,p=t.output??a?.result;u({id:t.id,input:l,result:p,chip:r({name:t.name,input:l,result:p,error:a?.error,isReplyRunning:e})})})}let c=d.at(-1),h=p?.role==="assistant"&&(c?.kind==="text"&&c.isStreaming||c?.kind==="tools");return{items:d,isThinking:a&&!h}};export const buildEarlierThreadItems=t=>t.flatMap(({threadId:t,messages:e})=>[...buildThreadView(e,!1,!1).items.map(e=>"text"===e.kind?{...e,id:`${t}:${e.id}`,forms:"hidden"}:{...e,id:`${t}:${e.id}`}),{kind:"separator",id:`${t}:separator`}]);
@@ -1,11 +1,14 @@
1
1
  import { type AssistantToolErrorCode } from '@salsita-ai/contracts/assistant';
2
2
  /**
3
- * How a tool call of the assistant looks in the thread: still running, finished, a change that was
4
- * not kept (`failed`), or a read that answered with errors (`flawed`), which matters less because
5
- * the assistant usually just asks again.
3
+ * How a tool call of the assistant looks in the thread: still running, finished, or gone wrong
4
+ * (`failed`): a change that was not kept, or a read that answered with errors. Both look the same,
5
+ * since the reply says what came of them.
6
+ */
7
+ export type AssistantToolChipState = 'running' | 'done' | 'failed';
8
+ /**
9
+ * What a tool chip is called: the title or the operation names the model gave, a fixed text, or the
10
+ * tool's name.
6
11
  */
7
- export type AssistantToolChipState = 'running' | 'done' | 'failed' | 'flawed';
8
- /** What a tool chip is called: the operation names the model gave, a fixed text, or the tool's name. */
9
12
  export type AssistantToolChipLabel = {
10
13
  readonly kind: 'text';
11
14
  readonly text: string;
@@ -22,6 +25,12 @@ export interface AssistantToolChip {
22
25
  * panel knows. Nothing for a call that went wrong for any other reason.
23
26
  */
24
27
  readonly errorCode: AssistantToolErrorCode | undefined;
28
+ /**
29
+ * The messages of the violations a failed call failed on, written for the user, in result order.
30
+ * Empty for a call that did not fail, that failed for any other reason, or whose violations have
31
+ * no message.
32
+ */
33
+ readonly violations: readonly string[];
25
34
  }
26
35
  /** A tool call of a message as the chip reads it. */
27
36
  export interface AssistantToolCall {
@@ -36,9 +45,10 @@ export interface AssistantToolCall {
36
45
  readonly isReplyRunning: boolean;
37
46
  }
38
47
  /**
39
- * Describes one tool call for its chip: the label in the order operation names, fixed text for the
40
- * `apply` and `query` tools, tool name; and whether the call runs, finished, or went wrong. Why it
41
- * went wrong is part of it only as the code of an error the server recorded: the text of a tool
42
- * result is worded for the model, not for the user.
48
+ * Describes one tool call for its chip: the label in the order title, operation names, fixed text
49
+ * for the `apply` and `query` tools, tool name; and whether the call runs, finished, or went wrong.
50
+ * Why it went wrong is part of it only as the code of an error the server recorded, or as the
51
+ * messages of the violations it failed on, which are written for the user: the rest of a tool result
52
+ * is worded for the model.
43
53
  */
44
54
  export declare const describeToolCall: (call: AssistantToolCall) => AssistantToolChip;
@@ -1 +1 @@
1
- import{Kind as e,parse as t}from"graphql";import{z as n}from"zod";import{ASSISTANT_TOOL_ERROR_CODES as r,AssistantToolError as a,applyTool as s,queryTool as o}from"@salsita-ai/contracts/assistant";let i=n.object({operations:n.array(n.object({query:n.string(),operationName:n.string().nullish()}))}),l=n.object({results:n.array(n.object({errors:n.array(n.unknown()).optional()})),committed:n.boolean()}),u=n.tuple([n.object({type:n.literal("text"),content:n.string()})]).rest(n.unknown());export const describeToolCall=n=>{let d=(({name:n,input:r})=>{let a,l=(a=i.safeParse(r)).success?a.data.operations.flatMap(({query:n,operationName:r})=>r??(n=>{try{let r=t(n).definitions.find(t=>t.kind===e.OPERATION_DEFINITION);return r?.kind===e.OPERATION_DEFINITION?r.name?.value:void 0}catch{return}})(n)??[]):[];return l.length>0?{kind:"text",text:l.join(", ")}:n===s.name?{kind:"updateDesign"}:n===o.name?{kind:"readDesign"}:{kind:"text",text:n}})(n);if(null==n.result&&null==n.error)return{label:d,state:n.isReplyRunning?"running":"done",errorCode:void 0};let c=(e=>{let t=a.safeParse(e);if(t.success)return r.find(e=>e===t.data.code)})(n.result);return{label:d,state:(({name:e,result:t,error:n},r)=>{if(null!=n||null!=r)return e===o.name?"flawed":"failed";if(e!==s.name&&e!==o.name)return"done";let a=l.safeParse((e=>{let t=u.safeParse(e);if(!t.success)return e;try{return JSON.parse(t.data[0].content)}catch{return e}})(t));if(!a.success)return e===o.name?"flawed":"failed";let{results:i,committed:d}=a.data;return e===s.name?d?"done":"failed":i.some(({errors:e})=>(e?.length??0)>0)||0===i.length?"flawed":"done"})(n,c),errorCode:c}};
1
+ import{Kind as e,parse as t}from"graphql";import{z as r}from"zod";import{ASSISTANT_TOOL_ERROR_CODES as n,AssistantToolError as s,applyTool as a,queryTool as i}from"@salsita-ai/contracts/assistant";import{SCREENSHOT_NOT_TAKEN as o}from"../../application-runtime/index.js";let l=r.object({title:r.string().nullish().catch(void 0),operations:r.array(r.object({query:r.string(),operationName:r.string().nullish()}))}),u=r.object({results:r.array(r.object({errors:r.array(r.unknown()).optional()})),committed:r.boolean()}),d=r.tuple([r.object({type:r.literal("text"),content:r.string()})]).rest(r.unknown()),c=e=>{let t=d.safeParse(e);if(!t.success)return e;try{return JSON.parse(t.data[0].content)}catch{return e}},f=r.object({extensions:r.object({code:r.string()})}),m=r.object({message:r.string(),extensions:r.object({code:r.literal("VIOLATION"),type:r.string()})});export const describeToolCall=r=>{var d;let p,g=(({name:r,input:n})=>{let s,o,u=(s=l.safeParse(n)).success&&s.data.title?.trim()||void 0;if(null!=u)return{kind:"text",text:u};let d=(o=l.safeParse(n)).success?o.data.operations.flatMap(({query:r,operationName:n})=>n??(r=>{try{let n=t(r).definitions.find(t=>t.kind===e.OPERATION_DEFINITION);return n?.kind===e.OPERATION_DEFINITION?n.name?.value:void 0}catch{return}})(r)??[]):[];return d.length>0?{kind:"text",text:d.join(", ")}:r===a.name?{kind:"updateDesign"}:r===i.name?{kind:"readDesign"}:{kind:"text",text:r}})(r);if(null==r.result&&null==r.error)return{label:g,state:r.isReplyRunning?"running":"done",errorCode:void 0,violations:[]};let x=(e=>{let t=s.safeParse(e);if(t.success)return n.find(e=>e===t.data.code)})(r.result),b=(({name:e,result:t,error:r},n)=>{if(null!=r||null!=n)return"failed";if(e!==a.name&&e!==i.name)return"done";let s=u.safeParse(c(t));if(!s.success)return"failed";let{results:l,committed:d}=s.data;return e===a.name?d?"done":"failed":l.some(({errors:e})=>e?.some(e=>{let t;return!(t=f.safeParse(e)).success||t.data.extensions.code!==o}))||0===l.length?"failed":"done"})(r,x);return{label:g,state:b,errorCode:x,violations:"failed"===b?(d=r.result,(p=u.safeParse(c(d))).success?p.data.results.flatMap(({errors:e})=>(e??[]).flatMap(e=>{let t=m.safeParse(e);return t.success&&t.data.message!==t.data.extensions.type?[t.data.message]:[]})):[]):[]}};
@@ -0,0 +1,22 @@
1
+ import { type RefObject } from 'react';
2
+ export interface LoadOlderOnTopOptions {
3
+ /** True while there is an older page to load and none is loading. */
4
+ readonly enabled: boolean;
5
+ readonly onReachTop: () => void;
6
+ /** Changes when a page is painted above the thread, such as the id of its first message. */
7
+ readonly firstItemKey: unknown;
8
+ }
9
+ /**
10
+ * Loads older messages when the user scrolls the thread to its top: a sentinel above the first
11
+ * message is watched within the scroller, and `onReachTop` runs when it comes into view. A page
12
+ * that does not fill the scroller leaves the sentinel in view, so the next page loads too. An
13
+ * attempt that painted nothing, because it failed, is tried again only once the user scrolls the
14
+ * sentinel out of view and back.
15
+ *
16
+ * The page lands above what the user reads, so the reading position is kept: the distance from the
17
+ * end of the thread is restored once the page is painted, before the browser shows it, and again
18
+ * each time an image in the thread finishes loading, until the user scrolls: an image reserves no
19
+ * height, so one that loads above the reader grows the thread there. CSS scroll anchoring would do
20
+ * the same, but Safari does not support it.
21
+ */
22
+ export declare const useLoadOlderOnTop: <SCROLLER extends HTMLElement, SENTINEL extends HTMLElement>(scrollerRef: RefObject<SCROLLER>, sentinelRef: RefObject<SENTINEL>, { enabled, onReachTop, firstItemKey }: LoadOlderOnTopOptions) => void;
@@ -0,0 +1 @@
1
+ import{useEffect as r,useLayoutEffect as e,useRef as t}from"react";let n=Symbol("no attempt");export const useLoadOlderOnTop=(l,c,{enabled:o,onReachTop:u,firstItemKey:s})=>{let i=t(null),p=t(n),a=t(null),d=t({onReachTop:u,firstItemKey:s});d.current={onReachTop:u,firstItemKey:s},r(()=>{let r=l.current;if(!r)return;let e=()=>{null!==i.current&&(i.current=r.scrollHeight-r.scrollTop),a.current&&Math.abs(r.scrollTop-a.current.scrollTop)>1&&(a.current=null)},t=()=>{a.current&&(r.scrollTop=r.scrollHeight-a.current.distanceFromEnd,a.current={...a.current,scrollTop:r.scrollTop})};return r.addEventListener("scroll",e,{passive:!0}),r.addEventListener("load",t,!0),()=>{r.removeEventListener("scroll",e),r.removeEventListener("load",t,!0)}},[l]),r(()=>{let r=l.current,e=c.current;if(!o||!r||!e)return;let t=new IntersectionObserver(([e])=>{if(!e?.isIntersecting){p.current=n;return}p.current!==d.current.firstItemKey&&(p.current=d.current.firstItemKey,a.current=null,i.current=r.scrollHeight-r.scrollTop,d.current.onReachTop())},{root:r});return t.observe(e),()=>t.disconnect()},[o,l,c]),e(()=>{let r=l.current;r&&null!==i.current&&(r.scrollTop=r.scrollHeight-i.current,a.current={distanceFromEnd:i.current,scrollTop:r.scrollTop}),i.current=null},[s,l])};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as t,Typography as o,styled as s}from"@mui/material";import{PhxIcon as a}from"#package/ui-sdk";import{useConfiguratorRouting as n}from"../../../../configurator-context/index.js";let c=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),m=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const GPUAccelerationDisabled=()=>{let{goToIndex:s}=n();return e(c,{children:r(m,{children:[e(a,{name:"CubeDuotone",sx:{fontSize:48}}),e(o,{component:"h1",variant:"h4",sx:{my:4},children:e(i,{id:"sdk.messages.error.gpuDisabled.title",message:"GPU acceleration disabled"})}),e(o,{color:"text.secondary",children:e(i,{id:"sdk.messages.error.gpuDisabled.message",message:"Your browser has GPU acceleration disabled, which prevents the configurator from working correctly. 3D performance is severely impacted. Enabled this option in your browser settings to use the configurator."})}),e(t,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(i,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as a,Typography as t,styled as s}from"@mui/material";import{useConfiguratorRouting as o}from"#package/react-sdk";import{PhxIcon as n}from"#package/ui-sdk";let c=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),m=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const GPUAccelerationDisabled=()=>{let{goToIndex:s}=o();return e(c,{children:r(m,{children:[e(n,{name:"CubeDuotone",sx:{fontSize:48}}),e(t,{component:"h1",variant:"h4",sx:{my:4},children:e(i,{id:"sdk.messages.error.gpuDisabled.title",message:"GPU acceleration disabled"})}),e(t,{color:"text.secondary",children:e(i,{id:"sdk.messages.error.gpuDisabled.message",message:"Your browser has GPU acceleration disabled, which prevents the configurator from working correctly. 3D performance is severely impacted. Enabled this option in your browser settings to use the configurator."})}),e(a,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(i,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as o}from"@lingui/react";import{Button as t,Typography as i,styled as s}from"@mui/material";import{PhxIcon as a}from"#package/ui-sdk";import{useConfiguratorRouting as n}from"../../../../configurator-context/index.js";let m=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),d=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const WebGLNotSupported=()=>{let{goToIndex:s}=n();return e(m,{children:r(d,{children:[e(a,{name:"CubeDuotone",sx:{fontSize:48}}),e(i,{component:"h1",variant:"h4",sx:{my:4},children:e(o,{id:"sdk.messages.error.webglNotSupported.title",message:"WebGL is not supported or cannot be initialized"})}),e(i,{color:"text.secondary",children:e(o,{id:"sdk.messages.error.webglNotSupported.message",message:"Your device or browser does not support WebGL, which is required for the configurator to function. Try a different browser or device that supports WebGL"})}),e(t,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(o,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{Button as o,Typography as i,styled as s}from"@mui/material";import{useConfiguratorRouting as a}from"#package/react-sdk";import{PhxIcon as n}from"#package/ui-sdk";let m=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),d=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const WebGLNotSupported=()=>{let{goToIndex:s}=a();return e(m,{children:r(d,{children:[e(n,{name:"CubeDuotone",sx:{fontSize:48}}),e(i,{component:"h1",variant:"h4",sx:{my:4},children:e(t,{id:"sdk.messages.error.webglNotSupported.title",message:"WebGL is not supported or cannot be initialized"})}),e(i,{color:"text.secondary",children:e(t,{id:"sdk.messages.error.webglNotSupported.message",message:"Your device or browser does not support WebGL, which is required for the configurator to function. Try a different browser or device that supports WebGL"})}),e(o,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(t,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as o}from"@lingui/react";import{Button as n,DialogActions as r,DialogContent as i,DialogContentText as t,DialogTitle as l,Dialog as c,dialogClasses as s,styled as d}from"@mui/material";import{useMutation as m}from"@tanstack/react-query";import{useCallback as u}from"react";import{useAuthorizedClient as p,useConfigurationId as g,useDomainApplication as f}from"#package/react-sdk";import{LoadingButton as k}from"#package/ui-sdk";import{useConfiguratorRouting as y}from"../../../../configurator-context/index.js";let h=d(c)(()=>({[`.${s.paper}`]:{inlineSize:"min(480px, 100%)",maxWidth:"unset"}}));export const CloneToEditDialog=c=>{let{onClose:s,open:d}=c,{goToConfigurationDetail:b}=y(),x=p(),C=g(),{configurationPersistSystem:j}=f(),{mutate:v,isPending:T}=m({mutationFn:()=>x.cloneConfiguration(C,j.revisionId$.value),onSuccess:e=>{s(),b(e.configurationId,e.accessToken)}}),D=u(()=>{v()},[v]);return a(h,{open:d,onClose:s,children:[e(l,{children:e(o,{id:"sdk.layout.banner.readonly.clone.title",message:"Edit configuration"})}),e(i,{children:e(t,{children:e(o,{id:"sdk.layout.banner.readonly.clone.message",message:"You're about to create an editable copy of this setup. Changes you make won't affect the original shared link."})})}),a(r,{children:[e(n,{variant:"text",color:"inherit",onClick:s,children:e(o,{id:"sdk.layout.banner.readonly.cancel.label",message:"Cancel"})}),e(k,{variant:"contained",color:"primary",busy:T,onClick:D,children:e(o,{id:"sdk.layout.banner.readonly.clone.label",message:"Create editable copy"})})]})]})};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as n}from"@lingui/react";import{Button as o,DialogActions as r,DialogContent as i,DialogContentText as t,DialogTitle as l,Dialog as s,dialogClasses as c,styled as d}from"@mui/material";import{useMutation as m}from"@tanstack/react-query";import{useCallback as u}from"react";import{useAuthorizedClient as p,useConfigurationId as g,useConfiguratorRouting as k,useDomainApplication as y}from"#package/react-sdk";import{LoadingButton as f}from"#package/ui-sdk";let h=d(s)(()=>({[`.${c.paper}`]:{inlineSize:"min(480px, 100%)",maxWidth:"unset"}}));export const CloneToEditDialog=s=>{let{onClose:c,open:d}=s,{goToConfigurationDetail:b}=k(),C=p(),x=g(),{configurationPersistSystem:v}=y(),{mutate:j,isPending:T}=m({mutationFn:()=>C.cloneConfiguration(x,v.revisionId$.value),onSuccess:e=>{c(),b(e.configurationId,e.accessToken)}}),D=u(()=>{j()},[j]);return a(h,{open:d,onClose:c,children:[e(l,{children:e(n,{id:"sdk.layout.banner.readonly.clone.title",message:"Edit configuration"})}),e(i,{children:e(t,{children:e(n,{id:"sdk.layout.banner.readonly.clone.message",message:"You're about to create an editable copy of this setup. Changes you make won't affect the original shared link."})})}),a(r,{children:[e(o,{variant:"text",color:"inherit",onClick:c,children:e(n,{id:"sdk.layout.banner.readonly.cancel.label",message:"Cancel"})}),e(f,{variant:"contained",color:"primary",busy:T,onClick:D,children:e(n,{id:"sdk.layout.banner.readonly.clone.label",message:"Create editable copy"})})]})]})};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{useResolveLocalizable as a}from"#package/react-sdk";import{Preview as i,useResponsive as r}from"#package/ui-sdk";import{usePresetSelection as n,usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as p}from"./use-layout-scene-safe-area.js";let u={id:"sdk.preview.customize.title",message:"Customize product"},m={id:"sdk.preview.start.button.label",message:"Start configuring"},c={layoutId:"ui-layout",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{layout:{type:"spring",bounce:.2,duration:.6},opacity:{duration:.2,ease:"linear"}}};export const DesktopPreview=l=>{let{slotProps:d={},slots:f}=l,{enter:y}=s(),{hasMultiplePresets:g}=n(),{setAnimating:b}=r(),{containerRef:k,safeAreaRef:x,update:S}=p({enabled:!0,hasMiniSidebar:!1}),j=a(),w=e(()=>{b(!0)},[b]),v=e(()=>{b(!1),S()},[b,S]),A=o(()=>({...d,root:{...c,onLayoutAnimationStart:w,onLayoutAnimationComplete:v,...d.root}}),[v,w,d]);return t(i,{title:j(u),buttonLabel:j(m),containerRef:k,safeAreaRef:x,withScene:!g,slots:f,slotProps:A,onStart:y})};
1
+ import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as a,useResolveLocalizable as i}from"#package/react-sdk";import{Preview as r,useResponsive as n}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as p}from"./use-layout-scene-safe-area.js";let u={id:"sdk.preview.customize.title",message:"Customize product"},m={id:"sdk.preview.start.button.label",message:"Start configuring"},c={layoutId:"ui-layout",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{layout:{type:"spring",bounce:.2,duration:.6},opacity:{duration:.2,ease:"linear"}}};export const DesktopPreview=l=>{let{slotProps:d={},slots:f}=l,{enter:y}=s(),{hasMultiplePresets:g}=a(),{setAnimating:b}=n(),{containerRef:k,safeAreaRef:x,update:S}=p({enabled:!0,hasMiniSidebar:!1}),j=i(),w=e(()=>{b(!0)},[b]),v=e(()=>{b(!1),S()},[b,S]),A=o(()=>({...d,root:{...c,onLayoutAnimationStart:w,onLayoutAnimationComplete:v,...d.root}}),[v,w,d]);return t(r,{title:j(u),buttonLabel:j(m),containerRef:k,safeAreaRef:x,withScene:!g,slots:f,slotProps:A,onStart:y})};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{useEffect as i}from"react";import{useEagerObservableValue as m}from"#package/react-sdk";import{useResponsive as n}from"#package/ui-sdk";import{useConfigurator as a}from"../../../application-runtime/index.js";import{LayoutSlots as s}from"../slots/index.js";import{DesktopLayout as c}from"./DesktopLayout.js";import{ExportingOverlay as p}from"./ExportingOverlay.js";import{MobileLayout as d}from"./MobileLayout.js";let l=o("div")({display:"contents"});export const Layout=()=>{let{isDesktop:o}=n(),{exportSystem:u}=a(),f=m(u.exporting$);return i(()=>{if(!f)return;let t=document.activeElement;return()=>{t instanceof HTMLElement&&t.isConnected&&document.activeElement===document.body&&t.focus()}},[f]),e(r,{children:[e(l,{...{inert:f?"":void 0},children:[t(s.Services,{}),t(s.SharedCanvas,{}),o?t(c,{}):t(d,{})]}),f&&t(p,{})]})};
1
+ import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import{styled as r}from"@mui/material";import{useEffect as i,useRef as n}from"react";import{useEagerObservableValue as m}from"#package/react-sdk";import{useResponsive as a}from"#package/ui-sdk";import{useConfigurator as s}from"../../../application-runtime/index.js";import{LayoutSlots as c}from"../slots/index.js";import{DesktopLayout as p}from"./DesktopLayout.js";import{ExportingOverlay as d}from"./ExportingOverlay.js";import{MobileLayout as l}from"./MobileLayout.js";let u=r("div")({display:"contents"});export const Layout=()=>{let{isDesktop:r}=a(),{exportSystem:f}=s(),j=m(f.exporting$),v=n(null);return i(()=>{if(!j)return;let t=v.current?.getRootNode(),e=t instanceof ShadowRoot?t.activeElement:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&document.activeElement===document.body&&e.focus()}},[j]),e(o,{children:[e(u,{ref:v,...{inert:j?"":void 0},children:[t(c.Services,{}),t(c.SharedCanvas,{}),r?t(p,{}):t(l,{})]}),j&&t(d,{})]})};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{useResolveLocalizable as i}from"#package/react-sdk";import{Preview as a}from"#package/ui-sdk";import{usePresetSelection as r,usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as n}from"./use-layout-scene-safe-area.js";let m={id:"sdk.preview.customize.title",message:"Customize product"},p={id:"sdk.preview.start.button.label",message:"Start configuring"},c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{opacity:{duration:.1,ease:"linear"}}};export const MobilePreview=l=>{let{slotProps:u={},slots:d}=l,{enter:f,isPreview:b}=s(),{hasMultiplePresets:g}=r(),{containerRef:k,safeAreaRef:x,update:y}=n({enabled:b,hasMiniSidebar:!1}),j=i(),w=e(()=>{y()},[y]),S=o(()=>({...u,root:{...c,onLayoutAnimationComplete:w,...u.root}}),[w,u]);return t(a,{title:j(m),buttonLabel:j(p),containerRef:k,safeAreaRef:x,withScene:!g,slots:d,slotProps:S,onStart:f})};
1
+ import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as i,useResolveLocalizable as a}from"#package/react-sdk";import{Preview as r}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as n}from"./use-layout-scene-safe-area.js";let m={id:"sdk.preview.customize.title",message:"Customize product"},p={id:"sdk.preview.start.button.label",message:"Start configuring"},c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{opacity:{duration:.1,ease:"linear"}}};export const MobilePreview=l=>{let{slotProps:u={},slots:d}=l,{enter:f,isPreview:b}=s(),{hasMultiplePresets:g}=i(),{containerRef:k,safeAreaRef:x,update:y}=n({enabled:b,hasMiniSidebar:!1}),j=a(),w=e(()=>{y()},[y]),S=o(()=>({...u,root:{...c,onLayoutAnimationComplete:w,...u.root}}),[w,u]);return t(r,{title:j(m),buttonLabel:j(p),containerRef:k,safeAreaRef:x,withScene:!g,slots:d,slotProps:S,onStart:f})};