@salsita-ai/sdk 0.50.0-develop.f6390cb584 → 0.50.0-develop.f9cd9b3a12

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 (357) hide show
  1. package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
  2. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  3. package/dist/application-spec/errors/diagnostic-messages.d.ts +10 -1
  4. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  5. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  6. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  7. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  8. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  9. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  10. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  11. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  12. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  13. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  14. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
  15. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  16. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  17. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -6
  18. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  19. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
  20. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  21. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  22. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  23. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  24. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  25. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  26. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +4 -3
  27. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  28. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +33 -7
  29. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  30. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  31. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  32. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  33. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  34. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  35. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  36. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
  37. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  38. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +45 -4
  39. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  40. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  41. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  42. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  43. package/dist/configurator/common/configurator-interface.d.ts +38 -2
  44. package/dist/configurator/common/configurator-interface.js +1 -1
  45. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +3 -3
  46. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -1
  47. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  48. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
  49. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
  50. package/dist/configurator/pages/default-configurator-elements.d.ts +3 -2
  51. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  52. package/dist/configurator/pages/default-elements/index.d.ts +1 -0
  53. package/dist/configurator/pages/default-elements/index.js +1 -1
  54. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  55. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  56. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  57. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  58. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  59. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  60. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  61. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  62. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  63. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  64. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  65. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  66. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  67. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  68. package/dist/configurator/scene/index.d.ts +1 -0
  69. package/dist/configurator/scene/index.js +1 -1
  70. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  71. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  72. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  73. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  74. package/dist/configurator/toolbar-actions/index.d.ts +1 -0
  75. package/dist/configurator/toolbar-actions/index.js +1 -1
  76. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  77. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  78. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  79. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  80. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  81. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  82. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  83. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  84. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  85. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  86. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  87. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  88. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  89. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  90. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  91. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
  92. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  93. package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
  94. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  95. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  96. package/dist/configurator/ui/assistant/form/index.js +1 -1
  97. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
  98. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  99. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  100. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  101. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  102. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  103. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  104. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  105. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  106. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  107. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
  108. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  109. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  110. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  111. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  112. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  113. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  114. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  115. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  116. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  117. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
  118. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  119. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  120. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
  121. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
  122. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  123. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  124. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  125. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
  126. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  127. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  128. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  129. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
  130. package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
  131. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  132. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  133. package/dist/configurator/ui/assistant/index.js +1 -1
  134. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  135. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  136. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
  137. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
  138. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  139. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  140. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  141. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  142. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +14 -0
  143. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  144. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
  145. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  146. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  147. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  148. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  149. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  150. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  151. package/dist/configurator/ui/index.d.ts +1 -0
  152. package/dist/configurator/ui/index.js +1 -1
  153. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  154. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  155. package/dist/docs/fabs/basic.mdx +4 -0
  156. package/dist/docs/index.json +62 -1
  157. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  158. package/dist/docs/layouts/custom-layout.mdx +320 -158
  159. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  160. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  161. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  162. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  163. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  164. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  165. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  166. package/dist/docs/phoenix/configurator-interface.mdx +68 -11
  167. package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
  168. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  169. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  170. package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
  171. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
  172. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  173. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  174. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  175. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  176. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  177. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  178. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  179. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  180. package/dist/domain/application/assistant/form/index.js +1 -0
  181. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  182. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  183. package/dist/domain/application/assistant/index.d.ts +2 -3
  184. package/dist/domain/application/assistant/index.js +1 -1
  185. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  186. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
  187. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  188. package/dist/domain/application/web-component-property.d.ts +3 -1
  189. package/dist/domain/application/web-component-property.js +1 -1
  190. package/dist/domain/available-system-components.d.ts +1 -1
  191. package/dist/domain/available-system-components.js +1 -1
  192. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  193. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  194. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  195. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  196. package/dist/domain/domain-runtime/domain-runtime.d.ts +8 -0
  197. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  198. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  199. package/dist/domain/domain-runtime/spec/index.js +1 -1
  200. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  201. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
  202. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  203. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  204. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  205. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +2 -1
  206. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  207. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  208. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  209. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  210. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  211. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  212. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  213. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  214. package/dist/domain/extensions/export-images/index.js +1 -0
  215. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  216. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  217. package/dist/domain/extensions/index.d.ts +1 -2
  218. package/dist/domain/extensions/index.js +1 -1
  219. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +4 -0
  220. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  221. package/dist/editor/domain-editors/apply-spec-update.d.ts +8 -1
  222. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  223. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  224. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  225. package/dist/i18n/locales/cs/messages.js +1 -1
  226. package/dist/i18n/locales/da/messages.js +1 -1
  227. package/dist/i18n/locales/de/messages.js +1 -1
  228. package/dist/i18n/locales/de-AT/messages.js +1 -1
  229. package/dist/i18n/locales/en/messages.js +1 -1
  230. package/dist/i18n/locales/en-AU/messages.js +1 -1
  231. package/dist/i18n/locales/en-GB/messages.js +1 -1
  232. package/dist/i18n/locales/es/messages.js +1 -1
  233. package/dist/i18n/locales/fr/messages.js +1 -1
  234. package/dist/i18n/locales/hu/messages.js +1 -1
  235. package/dist/i18n/locales/it/messages.js +1 -1
  236. package/dist/i18n/locales/nl/messages.js +1 -1
  237. package/dist/i18n/locales/pl/messages.js +1 -1
  238. package/dist/i18n/locales/pt/messages.js +1 -1
  239. package/dist/i18n/locales/ro/messages.js +1 -1
  240. package/dist/i18n/locales/sk/messages.js +1 -1
  241. package/dist/i18n/locales/tr/messages.js +1 -1
  242. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  243. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  244. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
  245. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  246. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  247. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  248. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  249. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +11 -5
  250. package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
  251. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  252. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  253. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  254. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  255. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  256. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  257. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  258. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  259. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  260. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  261. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  262. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
  263. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  264. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  265. package/dist/react-sdk/application-runtime/index.d.ts +1 -0
  266. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  267. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  268. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  269. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  270. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  271. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  272. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  273. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  274. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  275. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  276. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  277. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  278. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  279. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  280. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  281. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  282. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  283. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +95 -2
  284. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  285. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +1 -0
  286. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -1
  287. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  288. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  289. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  290. package/dist/react-sdk/domain-context/index.d.ts +1 -0
  291. package/dist/react-sdk/domain-context/index.js +1 -1
  292. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
  293. package/dist/react-sdk/index.d.ts +1 -1
  294. package/dist/react-sdk/index.js +1 -1
  295. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  296. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  297. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  298. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  299. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  300. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  301. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  302. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  303. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  304. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  305. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  306. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  307. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  308. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  309. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  310. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  311. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  312. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  313. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  314. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  315. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  316. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  317. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  318. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  319. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  320. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  321. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  322. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  323. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  324. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  325. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  326. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  327. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  328. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  329. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  330. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +2 -2
  331. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
  332. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
  333. package/dist/ui-sdk/theme/types.d.ts +5 -1
  334. package/package.json +13 -3
  335. package/schema/domain-spec.json +140 -0
  336. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  337. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  338. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  339. package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
  340. package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
  341. package/dist/domain/extensions/client-side-image.js +0 -1
  342. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  343. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  344. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  345. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
  346. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
  347. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
  348. package/dist/react-sdk/responsive-state/index.d.ts +0 -5
  349. package/dist/react-sdk/responsive-state/index.js +0 -1
  350. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
  351. package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
  352. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
  353. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
  354. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
  355. package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
  356. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/application-runtime/responsive/types.js} +0 -0
  357. /package/dist/react-sdk/{responsive-state/canvas-padding.js → scene-control-elements/scene-control-tooltip-visibility.js} +0 -0
@@ -0,0 +1,9 @@
1
+ import { type PhoenixEntityElementRegistration } from '#package/domain';
2
+ import { type ToolMenuFabElementProps } from './ToolMenuFabElement.js';
3
+ /**
4
+ * Registers a project's tool-menu FAB as the `ToolMenuFab` entity element, with its props typed.
5
+ * Registering an entity element under that name with `createCustomPhoenixEntityElement` works too,
6
+ * but its component is then typed as taking only `entityId` and `children`.
7
+ */
8
+ export declare const createToolMenuFab: (Element: (props: ToolMenuFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
9
+ export type CreateToolMenuFab = (Element: (props: ToolMenuFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
@@ -0,0 +1 @@
1
+ import{createCustomPhoenixEntityElement as o}from"#package/domain";import{ToolMenuFabName as e}from"./ToolMenuFabElement.js";export const createToolMenuFab=a=>o(e,a);
@@ -0,0 +1,11 @@
1
+ export { AddEntityFabElement, AddEntityFabName, type AddEntityFabElementProps } from './AddEntityFabElement.js';
2
+ export { DeleteEntityFabElement, DeleteEntityFabName, type DeleteEntityFabElementProps, } from './DeleteEntityFabElement.js';
3
+ export { NavigationHotspotElement, NavigationHotspotName, type NavigationHotspotElementProps, } from './NavigationHotspotElement.js';
4
+ export { SelectionHotspotElement, SelectionHotspotName, type SelectionHotspotElementProps, } from './SelectionHotspotElement.js';
5
+ export { ToolMenuFabElement, ToolMenuFabName, type ToolMenuFabElementProps } from './ToolMenuFabElement.js';
6
+ export { createAddEntityFab, type CreateAddEntityFab } from './create-add-entity-fab.js';
7
+ export { createDeleteEntityFab, type CreateDeleteEntityFab } from './create-delete-entity-fab.js';
8
+ export { createNavigationHotspot, type CreateNavigationHotspot } from './create-navigation-hotspot.js';
9
+ export { createSelectionHotspot, type CreateSelectionHotspot } from './create-selection-hotspot.js';
10
+ export { createToolMenuFab, type CreateToolMenuFab } from './create-tool-menu-fab.js';
11
+ export { type SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
@@ -0,0 +1 @@
1
+ export{AddEntityFabElement,AddEntityFabName}from"./AddEntityFabElement.js";export{DeleteEntityFabElement,DeleteEntityFabName}from"./DeleteEntityFabElement.js";export{NavigationHotspotElement,NavigationHotspotName}from"./NavigationHotspotElement.js";export{SelectionHotspotElement,SelectionHotspotName}from"./SelectionHotspotElement.js";export{ToolMenuFabElement,ToolMenuFabName}from"./ToolMenuFabElement.js";export{createAddEntityFab}from"./create-add-entity-fab.js";export{createDeleteEntityFab}from"./create-delete-entity-fab.js";export{createNavigationHotspot}from"./create-navigation-hotspot.js";export{createSelectionHotspot}from"./create-selection-hotspot.js";export{createToolMenuFab}from"./create-tool-menu-fab.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * When an in-scene control shows its tooltip: `on-hover` on hover, `forced` always once the camera
3
+ * has been still, `forced-when-still` while the camera is still, `hidden` never.
4
+ */
5
+ export type SceneControlTooltipVisibility = 'on-hover' | 'forced' | 'forced-when-still' | 'hidden';
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createRoot as t}from"react-dom/client";import{Subject as r,Subscription as o,filter as s,scan as i}from"rxjs";import{v4 as n}from"uuid";import{standardWebComponentEvents as a,standardWebComponentProperties as l}from"#package/domain";import{WebComponentApp as c}from"./WebComponentApp.js";import{createEventDispatcher as u,createStorage as p,createWebComponentApi as h}from"./create-web-component-api.js";import{createAttributeNameToPropertyMap as b,createEventTypeByDescriptorMap as d,deriveWebComponentContract as m}from"./web-component-contract.js";let f=Symbol("storagesByPropertyDescriptor"),y=Symbol("reactRoot"),g=Symbol("pendingDisconnection"),v=Symbol("setProperty"),j=Symbol("activeSubscriptions"),S=Symbol("propertiesWithStorages"),P=Symbol("container"),w=Symbol("applicationRuntime"),C=Symbol("webComponentApi"),A=Symbol("PreviousPropertyValues"),E=Symbol("Events"),O=Symbol("Uuid"),$=(e,t,r)=>{let o=t?.attributeParser;if(!o)throw Error("Attribute parser is not defined");try{let e=o(r);return{success:!0,data:e}}catch(t){return console.error(`Failed to parse attribute ${e}, ignoring`,t),{success:!1}}};export const createWebComponent=x=>{let{RootComponent:k,webComponentOptions:D,embeddedIntegration:B,applicationRuntimeFactory:W}=x,F=m(D),{properties:M,events:V}=F,q=b(M),N=d(V),R=class Salsita3dConfigurator extends HTMLElement{[f];[y];[g]=null;[j]=[];[S];[P];[w];[C];[A]=new Map;[E]=new r;[O]=n();get applicationRuntime(){return this[w]}static observedAttributes=Array.from(q.keys());[v](e,t,r){let o=t.schema.safeParse(r);if(!o.success)return void console.error(`Invalid value provided for property ${e}, ignoring`,o.error);let s=this[f].get(t);if(!s)return void console.error(`Subject not found for property descriptor of ${e}`);let i=s.isSet;s.isSet=!0,i&&s.subject.value===o.data||s.subject.next(o.data)}constructor(){super(),this[P]=this.attachShadow({mode:"closed"}),this[S]=Object.entries(M).map(([e,t])=>{if(Object.prototype.hasOwnProperty.call(this,e)){let r=t.schema.safeParse(this[e]);if(delete this[e],r.success)return{name:e,propertyDescriptor:t,storage:p(t,r.data)};console.error(`Failed to validate property ${e}, ignoring`,r.error)}if(t.attributeParser&&t.attributeNames){let r=t.attributeNames.map(e=>this.getAttribute(e)).find(e=>null!==e)??null;if(null!==r){let o=$(e,t,r);if(o.success){let r=t.schema.safeParse(o.data);if(r.success)return{name:e,propertyDescriptor:t,storage:p(t,r.data)};console.error(`Failed to validate attribute ${e}, ignoring`,r.error)}}}return{name:e,propertyDescriptor:t,storage:p(t,t.defaultValue)}}),this[f]=new Map(this[S].map(({propertyDescriptor:e,storage:t})=>[e,t])),this[C]=h({element:this,eventTypeByDescriptor:N,events:this[E],propertiesWithStorages:this[S],storagesByPropertyDescriptor:this[f]}),this[w]=W({webComponentOptions:F,webComponentApi:this[C]})}connectedCallback(){let r;if(null!==this[g]){this[g]=null,this[w].actions.webComponent.startNewGeneration();return}let n=this[w],p=this[C],h=u({element:this,eventTypeByDescriptor:N,storagesByPropertyDescriptor:this[f]},!0),b=this[S].map(({name:e,storage:t})=>t.subject.pipe(i((e,t)=>[e[1],t],[t.subject.value,t.subject.value]),s(([e,t])=>e!==t)).subscribe(([t,r])=>{h(a.propertyChanged,{name:e,oldValue:t,newValue:r})})),d=e=>{if(e)for(let[t,r]of Object.entries(e)){let e=this[S].find(({name:e})=>e===t);if(e){let{storage:o,propertyDescriptor:s}=e;this[A].has(t)||this[A].set(t,o.subject.value);let i=s.schema.safeParse(r);i.success?(o.subject.next(i.data),o.isSet=!0):console.error(`Failed to apply web component property override for "${t}":`,i.error)}}else{for(let[e,t]of this[A]){let r=this[S].find(({name:t})=>t===e);if(r){let{storage:e}=r;e.subject.next(t)}}this[A].clear()}},m=new o(n.subscribe(()=>{let e=n.selectors.overrides.getWebComponentProperties();e!==r&&(r=e,d(e))}));this[j]=[...b,m],this[y]=t(this[P]),this[y].render(e(c,{runtime:n,container:this[P],children:e(k,{})}));let v=p.getPropertyValue(l.onAttached);if(v)try{v(this)}catch(e){console.error("Error in onAttached handler",e)}this.dispatchEvent(new CustomEvent("attached",{bubbles:!0}))}disconnectedCallback(){let e={};this[g]=e,queueMicrotask(()=>{this[g]===e&&(this[g]=null,this[j].forEach(e=>{e.unsubscribe()}),this[y]?.unmount(),this[y]=void 0)})}attributeChangedCallback(e,t,r){let o=q.get(e);if(!o)throw Error(`Property descriptor not found for attribute: ${e}, despite the attribute being observed`);if(null===r)return o.required?void console.error(`Cannot unset a required attribute ${e}, ignoring`):void this[v](e,o,o.defaultValue);let s=$(e,o,r);s.success&&this[v](e,o,s.data)}};return Object.entries(M).forEach(([e,t])=>{Object.defineProperty(R.prototype,e,{enumerable:!0,configurable:!1,get(){return this[f].get(t).subject.value},set(r){this[v](e,t,r)}})}),B&&(Object.defineProperty(R.prototype,"$events",{enumerable:!1,configurable:!1,get(){return this[E]}}),Object.defineProperty(R.prototype,"uuid",{enumerable:!1,configurable:!1,get(){return this[O]}})),R};
1
+ import{jsx as e}from"react/jsx-runtime";import{createRoot as t}from"react-dom/client";import{Subject as r,Subscription as o,filter as s,scan as i}from"rxjs";import{v4 as n}from"uuid";import{standardWebComponentEvents as a,standardWebComponentProperties as l,webComponentAttributeParsers as c}from"#package/domain";import{WebComponentApp as u}from"./WebComponentApp.js";import{createEventDispatcher as p,createStorage as h,createWebComponentApi as b}from"./create-web-component-api.js";import{registerGodModeTarget as d}from"./god-mode/index.js";import{createAttributeNameToPropertyMap as m,createEventTypeByDescriptorMap as f,deriveWebComponentContract as y}from"./web-component-contract.js";let g=Symbol("storagesByPropertyDescriptor"),v=Symbol("reactRoot"),j=Symbol("pendingDisconnection"),S=Symbol("setProperty"),P=Symbol("activeSubscriptions"),w=Symbol("propertiesWithStorages"),C=Symbol("container"),A=Symbol("applicationRuntime"),x=Symbol("webComponentApi"),E=Symbol("PreviousPropertyValues"),O=Symbol("Events"),$=Symbol("Uuid"),k=(e,t,r)=>{let o=t?.attributeParser;if(!o)throw Error("Attribute parser is not defined");let s=o===c.boolean&&r===e?"":r;try{let e=o(s);return{success:!0,data:e}}catch(t){return console.error(`Failed to parse attribute ${e}, ignoring`,t),{success:!1}}};export const createWebComponent=c=>{let{RootComponent:D,webComponentOptions:B,embeddedIntegration:M,applicationRuntimeFactory:W}=c,F=y(B),{properties:V,events:q}=F,N=m(V),R=f(q),T=class Salsita3dConfigurator extends HTMLElement{[g];[v];[j]=null;[P]=[];[w];[C];[A];[x];[E]=new Map;[O]=new r;[$]=n();get applicationRuntime(){return this[A]}static observedAttributes=Array.from(N.keys());[S](e,t,r){let o=t.schema.safeParse(r);if(!o.success)return void console.error(`Invalid value provided for property ${e}, ignoring`,o.error);let s=this[g].get(t);if(!s)return void console.error(`Subject not found for property descriptor of ${e}`);let i=s.isSet;s.isSet=!0,i&&s.subject.value===o.data||s.subject.next(o.data)}constructor(){super(),this[C]=this.attachShadow({mode:"closed"}),this[w]=Object.entries(V).map(([e,t])=>{if(Object.prototype.hasOwnProperty.call(this,e)){let r=t.schema.safeParse(this[e]);if(delete this[e],r.success)return{name:e,propertyDescriptor:t,storage:h(t,r.data)};console.error(`Failed to validate property ${e}, ignoring`,r.error)}if(t.attributeParser&&t.attributeNames){let r=t.attributeNames.find(e=>this.hasAttribute(e)),o=void 0===r?null:this.getAttribute(r);if(void 0!==r&&null!==o){let s=k(r,t,o);if(s.success){let o=t.schema.safeParse(s.data);if(o.success)return{name:e,propertyDescriptor:t,storage:h(t,o.data)};console.error(`Failed to validate attribute ${r}, ignoring`,o.error)}}}return{name:e,propertyDescriptor:t,storage:h(t,t.defaultValue)}}),this[g]=new Map(this[w].map(({propertyDescriptor:e,storage:t})=>[e,t])),this[x]=b({element:this,eventTypeByDescriptor:R,events:this[O],propertiesWithStorages:this[w],storagesByPropertyDescriptor:this[g]}),this[A]=W({webComponentOptions:F,webComponentApi:this[x]})}connectedCallback(){let r;if(null!==this[j]){this[j]=null,this[A].actions.webComponent.startNewGeneration();return}let n=this[A],c=this[x],h=p({element:this,eventTypeByDescriptor:R,storagesByPropertyDescriptor:this[g]},!0),b=this[w].map(({name:e,storage:t})=>t.subject.pipe(i((e,t)=>[e[1],t],[t.subject.value,t.subject.value]),s(([e,t])=>e!==t)).subscribe(([t,r])=>{h(a.propertyChanged,{name:e,oldValue:t,newValue:r})})),m=e=>{if(e)for(let[t,r]of Object.entries(e)){let e=this[w].find(({name:e})=>e===t);if(e){let{storage:o,propertyDescriptor:s}=e;this[E].has(t)||this[E].set(t,o.subject.value);let i=s.schema.safeParse(r);i.success?(o.subject.next(i.data),o.isSet=!0):console.error(`Failed to apply web component property override for "${t}":`,i.error)}}else{for(let[e,t]of this[E]){let r=this[w].find(({name:t})=>t===e);if(r){let{storage:e}=r;e.subject.next(t)}}this[E].clear()}},f=new o(n.subscribe(()=>{let e=n.selectors.overrides.getWebComponentProperties();e!==r&&(r=e,m(e))})),y=new o(d(this,n.actions.environment.setGodMode));this[P]=[...b,f,y],this[v]=t(this[C]),this[v].render(e(u,{runtime:n,container:this[C],children:e(D,{})}));let S=c.getPropertyValue(l.onAttached);if(S)try{S(this)}catch(e){console.error("Error in onAttached handler",e)}this.dispatchEvent(new CustomEvent("attached",{bubbles:!0}))}disconnectedCallback(){let e={};this[j]=e,queueMicrotask(()=>{this[j]===e&&(this[j]=null,this[P].forEach(e=>{e.unsubscribe()}),this[v]?.unmount(),this[v]=void 0)})}attributeChangedCallback(e,t,r){let o=N.get(e);if(!o)throw Error(`Property descriptor not found for attribute: ${e}, despite the attribute being observed`);if(null===r)return o.required?void console.error(`Cannot unset a required attribute ${e}, ignoring`):void this[S](e,o,o.defaultValue);let s=k(e,o,r);s.success&&this[S](e,o,s.data)}};return Object.entries(V).forEach(([e,t])=>{Object.defineProperty(T.prototype,e,{enumerable:!0,configurable:!1,get(){return this[g].get(t).subject.value},set(r){this[S](e,t,r)}})}),M&&(Object.defineProperty(T.prototype,"$events",{enumerable:!1,configurable:!1,get(){return this[O]}}),Object.defineProperty(T.prototype,"uuid",{enumerable:!1,configurable:!1,get(){return this[$]}})),T};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Turns god mode on or off from the browser console, for the applications mounted on the page.
3
+ *
4
+ * - `window.__salsita.setGodMode(true)` switches every mounted application and remembers the value
5
+ * for the tab's session, so applications created later, and after a reload, start with it.
6
+ * - `window.__salsita.setGodMode(true, $0)` switches only the application whose custom element is
7
+ * given, here the one selected in the browser's element inspector.
8
+ * - `window.__salsita.setGodMode(false, 'my-configurator')` switches only the application whose
9
+ * custom element is the first match of the CSS selector.
10
+ *
11
+ * A targeted call is not remembered. A target that matches no mounted application changes
12
+ * nothing and logs an error.
13
+ */
14
+ export type SetGodMode = (godMode: boolean, target?: Element | string) => void;
15
+ declare global {
16
+ interface Window {
17
+ __salsita: {
18
+ setGodMode: SetGodMode;
19
+ };
20
+ }
21
+ }
22
+ /**
23
+ * Makes a mounted application reachable through `window.__salsita.setGodMode` (see
24
+ * {@link SetGodMode}) and installs the global. Returns the function that removes the application
25
+ * again.
26
+ *
27
+ * @param element The application's custom element, which a targeted call names.
28
+ * @param setRuntimeGodMode Publishes the value to the application's own runtime.
29
+ */
30
+ export declare const registerGodModeTarget: (element: Element, setRuntimeGodMode: (godMode: boolean) => void) => (() => void);
@@ -0,0 +1 @@
1
+ import{GOD_MODE_SESSION_STORAGE_KEY as e}from"#package/domain";let t=new Map,o=(o,n)=>{if(void 0===n){sessionStorage.setItem(e,o.toString()),t.forEach(e=>{e(o)});return}let i="string"==typeof n?document.querySelector(n):n,r=null===i?void 0:t.get(i);void 0===r?console.error("setGodMode: the target is not the element of a mounted application; nothing changed.",n):r(o)};export const registerGodModeTarget=(e,n)=>(t.set(e,n),window.__salsita={...window.__salsita,setGodMode:o},()=>{t.get(e)===n&&t.delete(e)});
@@ -0,0 +1 @@
1
+ export { registerGodModeTarget, type SetGodMode } from './god-mode-registry.js';
@@ -0,0 +1 @@
1
+ export{registerGodModeTarget}from"./god-mode-registry.js";
@@ -0,0 +1,3 @@
1
+ import { type SvgIconProps } from '@mui/material';
2
+ declare const SvgLightbulb: (props: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default SvgLightbulb;
@@ -0,0 +1 @@
1
+ import{jsx as a}from"react/jsx-runtime";import{SvgIcon as r}from"@mui/material";export default(m=>a(r,{...m,children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:a("path",{d:"M176 232a8 8 0 0 1-8 8H88a8 8 0 0 1 0-16h80a8 8 0 0 1 8 8m40-128a87.55 87.55 0 0 1-33.64 69.21A16.24 16.24 0 0 0 176 186v6a16 16 0 0 1-16 16H96a16 16 0 0 1-16-16v-6a16 16 0 0 0-6.23-12.66A87.59 87.59 0 0 1 40 104.49C39.74 56.83 78.26 17.14 125.88 16A88 88 0 0 1 216 104m-16 0a72 72 0 0 0-73.74-72c-39 .92-70.47 33.39-70.26 72.39a71.65 71.65 0 0 0 27.64 56.3A32 32 0 0 1 96 186v6h64v-6a32.15 32.15 0 0 1 12.47-25.35A71.65 71.65 0 0 0 200 104m-16.11-9.34a57.6 57.6 0 0 0-46.56-46.55 8 8 0 0 0-2.66 15.78c16.57 2.79 30.63 16.85 33.44 33.45A8 8 0 0 0 176 104a9 9 0 0 0 1.35-.11 8 8 0 0 0 6.54-9.23"})})}));
@@ -0,0 +1,3 @@
1
+ import { type SvgIconProps } from '@mui/material';
2
+ declare const SvgXCircle: (props: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default SvgXCircle;
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{SvgIcon as a}from"@mui/material";export default(l=>r(a,{...l,children:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:r("path",{d:"M165.66 101.66 139.31 128l26.35 26.34a8 8 0 0 1-11.32 11.32L128 139.31l-26.34 26.35a8 8 0 0 1-11.32-11.32L116.69 128l-26.35-26.34a8 8 0 0 1 11.32-11.32L128 116.69l26.34-26.35a8 8 0 0 1 11.32 11.32M232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88 88.1 88.1 0 0 0 88-88"})})}));
@@ -61,6 +61,7 @@ import ImageSquareBold from './ImageSquareBold.js';
61
61
  import Info from './Info.js';
62
62
  import InfoBold from './InfoBold.js';
63
63
  import Key from './Key.js';
64
+ import Lightbulb from './Lightbulb.js';
64
65
  import List from './List.js';
65
66
  import ListBullets from './ListBullets.js';
66
67
  import ListChecks from './ListChecks.js';
@@ -104,6 +105,7 @@ import WarningCircleDuotone from './WarningCircleDuotone.js';
104
105
  import WarningDuotone from './WarningDuotone.js';
105
106
  import X from './X.js';
106
107
  import XBold from './XBold.js';
108
+ import XCircle from './XCircle.js';
107
109
  export declare const Icon: {
108
110
  readonly Alarm: typeof Alarm;
109
111
  readonly ArrowClockwise: typeof ArrowClockwise;
@@ -168,6 +170,7 @@ export declare const Icon: {
168
170
  readonly Info: typeof Info;
169
171
  readonly InfoBold: typeof InfoBold;
170
172
  readonly Key: typeof Key;
173
+ readonly Lightbulb: typeof Lightbulb;
171
174
  readonly List: typeof List;
172
175
  readonly ListBullets: typeof ListBullets;
173
176
  readonly ListChecks: typeof ListChecks;
@@ -211,4 +214,5 @@ export declare const Icon: {
211
214
  readonly WarningDuotone: typeof WarningDuotone;
212
215
  readonly X: typeof X;
213
216
  readonly XBold: typeof XBold;
217
+ readonly XCircle: typeof XCircle;
214
218
  };
@@ -1 +1 @@
1
- import o from"./Alarm.js";import r from"./ArrowClockwise.js";import m from"./ArrowCounterClockwise.js";import t from"./ArrowLeft.js";import i from"./ArrowRight.js";import s from"./ArrowRightBold.js";import p from"./ArrowsHorizontal.js";import f from"./ArrowsIn.js";import j from"./ArrowsOut.js";import e from"./ArrowsOutCardinal.js";import l from"./Basketball.js";import a from"./BoundingBox.js";import n from"./BracketsCurly.js";import u from"./BuildingBold.js";import C from"./CameraRotate.js";import d from"./CaretDown.js";import B from"./CaretLeft.js";import c from"./CaretLeftBold.js";import g from"./CaretRight.js";import A from"./CaretRightBold.js";import h from"./Check.js";import P from"./CheckCircle.js";import w from"./CheckCircleDuotone.js";import S from"./Circle.js";import k from"./Cloud.js";import D from"./CloudArrowUp.js";import y from"./CopySimpleBold.js";import F from"./Cube.js";import L from"./CubeDuotone.js";import M from"./CurrencyDollar.js";import R from"./CurrencyEur.js";import I from"./CursorClick.js";import T from"./CustomAiAssistant.js";import O from"./CustomAiAssistantBold.js";import W from"./CustomAr.js";import x from"./CustomBigAiAssistant.js";import b from"./CustomMeasureCm.js";import E from"./CustomMeasureFt.js";import H from"./CustomMeasureIn.js";import G from"./CustomMeasureM.js";import U from"./CustomMeasureMm.js";import V from"./DotsSixVerticalBold.js";import v from"./DotsThreeVertical.js";import z from"./DotsThreeVerticalBold.js";import Q from"./Export.js";import X from"./EyeBold.js";import q from"./EyeClosedBold.js";import K from"./FileArrowUp.js";import N from"./FilePlus.js";import J from"./FileText.js";import Y from"./FireBold.js";import Z from"./Flame.js";import $ from"./FolderOpen.js";import _ from"./FolderStarBold.js";import oo from"./Gear.js";import or from"./GridFour.js";import om from"./HardDrives.js";import ot from"./House.js";import oi from"./Image.js";import os from"./ImageSquareBold.js";import op from"./Info.js";import of from"./InfoBold.js";import oj from"./Key.js";import oe from"./List.js";import ol from"./ListBullets.js";import oa from"./ListChecks.js";import on from"./Lock.js";import ou from"./MagicWand.js";import oC from"./MagnifyingGlassBold.js";import od from"./NavigationArrow.js";import oB from"./PaintBrush.js";import oc from"./Palette.js";import og from"./PaletteBold.js";import oA from"./PaperPlaneRightBold.js";import oh from"./PaperPlaneTilt.js";import oP from"./PauseBold.js";import ow from"./PencilSimpleBold.js";import oS from"./PlayBold.js";import ok from"./Plus.js";import oD from"./PlusBold.js";import oy from"./PlusCircle.js";import oF from"./PlusCircleBold.js";import oL from"./PushPin.js";import oM from"./PushPinSlash.js";import oR from"./Question.js";import oI from"./QuestionDuotone.js";import oT from"./RocketLaunchBold.js";import oO from"./SalsitaLogo.js";import oW from"./Scan.js";import ox from"./ShoppingCartSimple.js";import ob from"./SignOut.js";import oE from"./SignOutBold.js";import oH from"./SlidersBold.js";import oG from"./SlidersHorizontal.js";import oU from"./SubsetOfRaw.js";import oV from"./TagBold.js";import ov from"./Trash.js";import oz from"./TrashSimpleBold.js";import oQ from"./UsersBold.js";import oX from"./Warning.js";import oq from"./WarningCircle.js";import oK from"./WarningCircleBold.js";import oN from"./WarningCircleDuotone.js";import oJ from"./WarningDuotone.js";import oY from"./X.js";import oZ from"./XBold.js";export const Icon={Alarm:o,ArrowClockwise:r,ArrowCounterClockwise:m,ArrowLeft:t,ArrowRight:i,ArrowRightBold:s,ArrowsHorizontal:p,ArrowsIn:f,ArrowsOut:j,ArrowsOutCardinal:e,Basketball:l,BoundingBox:a,BracketsCurly:n,BuildingBold:u,CameraRotate:C,CaretDown:d,CaretLeft:B,CaretLeftBold:c,CaretRight:g,CaretRightBold:A,Check:h,CheckCircle:P,CheckCircleDuotone:w,Circle:S,Cloud:k,CloudArrowUp:D,CopySimpleBold:y,Cube:F,CubeDuotone:L,CurrencyDollar:M,CurrencyEur:R,CursorClick:I,CustomAiAssistant:T,CustomAiAssistantBold:O,CustomAr:W,CustomBigAiAssistant:x,CustomMeasureCm:b,CustomMeasureFt:E,CustomMeasureIn:H,CustomMeasureM:G,CustomMeasureMm:U,DotsSixVerticalBold:V,DotsThreeVertical:v,DotsThreeVerticalBold:z,Export:Q,EyeBold:X,EyeClosedBold:q,FileArrowUp:K,FilePlus:N,FileText:J,FireBold:Y,Flame:Z,FolderOpen:$,FolderStarBold:_,Gear:oo,GridFour:or,HardDrives:om,House:ot,Image:oi,ImageSquareBold:os,Info:op,InfoBold:of,Key:oj,List:oe,ListBullets:ol,ListChecks:oa,Lock:on,MagicWand:ou,MagnifyingGlassBold:oC,NavigationArrow:od,PaintBrush:oB,Palette:oc,PaletteBold:og,PaperPlaneRightBold:oA,PaperPlaneTilt:oh,PauseBold:oP,PencilSimpleBold:ow,PlayBold:oS,Plus:ok,PlusBold:oD,PlusCircle:oy,PlusCircleBold:oF,PushPin:oL,PushPinSlash:oM,Question:oR,QuestionDuotone:oI,RocketLaunchBold:oT,SalsitaLogo:oO,Scan:oW,ShoppingCartSimple:ox,SignOut:ob,SignOutBold:oE,SlidersBold:oH,SlidersHorizontal:oG,SubsetOfRaw:oU,TagBold:oV,Trash:ov,TrashSimpleBold:oz,UsersBold:oQ,Warning:oX,WarningCircle:oq,WarningCircleBold:oK,WarningCircleDuotone:oN,WarningDuotone:oJ,X:oY,XBold:oZ};
1
+ import o from"./Alarm.js";import r from"./ArrowClockwise.js";import m from"./ArrowCounterClockwise.js";import t from"./ArrowLeft.js";import i from"./ArrowRight.js";import s from"./ArrowRightBold.js";import p from"./ArrowsHorizontal.js";import f from"./ArrowsIn.js";import j from"./ArrowsOut.js";import e from"./ArrowsOutCardinal.js";import l from"./Basketball.js";import a from"./BoundingBox.js";import u from"./BracketsCurly.js";import n from"./BuildingBold.js";import C from"./CameraRotate.js";import d from"./CaretDown.js";import B from"./CaretLeft.js";import c from"./CaretLeftBold.js";import g from"./CaretRight.js";import h from"./CaretRightBold.js";import A from"./Check.js";import P from"./CheckCircle.js";import w from"./CheckCircleDuotone.js";import S from"./Circle.js";import k from"./Cloud.js";import D from"./CloudArrowUp.js";import L from"./CopySimpleBold.js";import y from"./Cube.js";import F from"./CubeDuotone.js";import M from"./CurrencyDollar.js";import R from"./CurrencyEur.js";import I from"./CursorClick.js";import T from"./CustomAiAssistant.js";import b from"./CustomAiAssistantBold.js";import O from"./CustomAr.js";import W from"./CustomBigAiAssistant.js";import x from"./CustomMeasureCm.js";import E from"./CustomMeasureFt.js";import H from"./CustomMeasureIn.js";import G from"./CustomMeasureM.js";import U from"./CustomMeasureMm.js";import V from"./DotsSixVerticalBold.js";import X from"./DotsThreeVertical.js";import v from"./DotsThreeVerticalBold.js";import z from"./Export.js";import Q from"./EyeBold.js";import q from"./EyeClosedBold.js";import K from"./FileArrowUp.js";import N from"./FilePlus.js";import J from"./FileText.js";import Y from"./FireBold.js";import Z from"./Flame.js";import $ from"./FolderOpen.js";import _ from"./FolderStarBold.js";import oo from"./Gear.js";import or from"./GridFour.js";import om from"./HardDrives.js";import ot from"./House.js";import oi from"./Image.js";import os from"./ImageSquareBold.js";import op from"./Info.js";import of from"./InfoBold.js";import oj from"./Key.js";import oe from"./Lightbulb.js";import ol from"./List.js";import oa from"./ListBullets.js";import ou from"./ListChecks.js";import on from"./Lock.js";import oC from"./MagicWand.js";import od from"./MagnifyingGlassBold.js";import oB from"./NavigationArrow.js";import oc from"./PaintBrush.js";import og from"./Palette.js";import oh from"./PaletteBold.js";import oA from"./PaperPlaneRightBold.js";import oP from"./PaperPlaneTilt.js";import ow from"./PauseBold.js";import oS from"./PencilSimpleBold.js";import ok from"./PlayBold.js";import oD from"./Plus.js";import oL from"./PlusBold.js";import oy from"./PlusCircle.js";import oF from"./PlusCircleBold.js";import oM from"./PushPin.js";import oR from"./PushPinSlash.js";import oI from"./Question.js";import oT from"./QuestionDuotone.js";import ob from"./RocketLaunchBold.js";import oO from"./SalsitaLogo.js";import oW from"./Scan.js";import ox from"./ShoppingCartSimple.js";import oE from"./SignOut.js";import oH from"./SignOutBold.js";import oG from"./SlidersBold.js";import oU from"./SlidersHorizontal.js";import oV from"./SubsetOfRaw.js";import oX from"./TagBold.js";import ov from"./Trash.js";import oz from"./TrashSimpleBold.js";import oQ from"./UsersBold.js";import oq from"./Warning.js";import oK from"./WarningCircle.js";import oN from"./WarningCircleBold.js";import oJ from"./WarningCircleDuotone.js";import oY from"./WarningDuotone.js";import oZ from"./X.js";import o$ from"./XBold.js";import o_ from"./XCircle.js";export const Icon={Alarm:o,ArrowClockwise:r,ArrowCounterClockwise:m,ArrowLeft:t,ArrowRight:i,ArrowRightBold:s,ArrowsHorizontal:p,ArrowsIn:f,ArrowsOut:j,ArrowsOutCardinal:e,Basketball:l,BoundingBox:a,BracketsCurly:u,BuildingBold:n,CameraRotate:C,CaretDown:d,CaretLeft:B,CaretLeftBold:c,CaretRight:g,CaretRightBold:h,Check:A,CheckCircle:P,CheckCircleDuotone:w,Circle:S,Cloud:k,CloudArrowUp:D,CopySimpleBold:L,Cube:y,CubeDuotone:F,CurrencyDollar:M,CurrencyEur:R,CursorClick:I,CustomAiAssistant:T,CustomAiAssistantBold:b,CustomAr:O,CustomBigAiAssistant:W,CustomMeasureCm:x,CustomMeasureFt:E,CustomMeasureIn:H,CustomMeasureM:G,CustomMeasureMm:U,DotsSixVerticalBold:V,DotsThreeVertical:X,DotsThreeVerticalBold:v,Export:z,EyeBold:Q,EyeClosedBold:q,FileArrowUp:K,FilePlus:N,FileText:J,FireBold:Y,Flame:Z,FolderOpen:$,FolderStarBold:_,Gear:oo,GridFour:or,HardDrives:om,House:ot,Image:oi,ImageSquareBold:os,Info:op,InfoBold:of,Key:oj,Lightbulb:oe,List:ol,ListBullets:oa,ListChecks:ou,Lock:on,MagicWand:oC,MagnifyingGlassBold:od,NavigationArrow:oB,PaintBrush:oc,Palette:og,PaletteBold:oh,PaperPlaneRightBold:oA,PaperPlaneTilt:oP,PauseBold:ow,PencilSimpleBold:oS,PlayBold:ok,Plus:oD,PlusBold:oL,PlusCircle:oy,PlusCircleBold:oF,PushPin:oM,PushPinSlash:oR,Question:oI,QuestionDuotone:oT,RocketLaunchBold:ob,SalsitaLogo:oO,Scan:oW,ShoppingCartSimple:ox,SignOut:oE,SignOutBold:oH,SlidersBold:oG,SlidersHorizontal:oU,SubsetOfRaw:oV,TagBold:oX,Trash:ov,TrashSimpleBold:oz,UsersBold:oQ,Warning:oq,WarningCircle:oK,WarningCircleBold:oN,WarningCircleDuotone:oJ,WarningDuotone:oY,X:oZ,XBold:o$,XCircle:o_};
@@ -1 +1 @@
1
- export const CustomIcons=["custom-ai-assistant","custom-ai-assistant-bold","custom-ar","custom-big-ai-assistant","custom-measure-cm","custom-measure-ft","custom-measure-in","custom-measure-m","custom-measure-mm","SalsitaLogo","subset-of-raw"];export const PhosphorIcons={bold:["arrow-right","building","caret-left","caret-right","copy-simple","dots-six-vertical","dots-three-vertical","eye-closed","eye","fire","folder-star","image-square","info","magnifying-glass","palette","paper-plane-right","pause","pencil-simple","play","plus","plus-circle","rocket-launch","sign-out","sliders","tag","trash-simple","users","warning-circle","x"],duotone:["check-circle","cube","question","warning-circle","warning"],regular:["alarm","arrow-clockwise","arrow-counter-clockwise","arrow-left","arrow-left","arrow-right","arrows-horizontal","arrows-in","arrows-out","arrows-out-cardinal","basketball","bounding-box","brackets-curly","camera-rotate","caret-down","caret-left","caret-right","check","check-circle","circle","cloud","cloud-arrow-up","cube","currency-dollar","currency-eur","cursor-click","dots-three-vertical","export","file-arrow-up","file-plus","file-text","flame","gear","folder-open","grid-four","hard-drives","house","image","info","key","list","list-bullets","list-checks","lock","magic-wand","navigation-arrow","paint-brush","palette","paper-plane-tilt","plus","plus-circle","push-pin","push-pin-slash","question","scan","shopping-cart-simple","sign-out","sliders-horizontal","trash","warning","warning-circle","x"]};
1
+ export const CustomIcons=["custom-ai-assistant","custom-ai-assistant-bold","custom-ar","custom-big-ai-assistant","custom-measure-cm","custom-measure-ft","custom-measure-in","custom-measure-m","custom-measure-mm","SalsitaLogo","subset-of-raw"];export const PhosphorIcons={bold:["arrow-right","building","caret-left","caret-right","copy-simple","dots-six-vertical","dots-three-vertical","eye-closed","eye","fire","folder-star","image-square","info","magnifying-glass","palette","paper-plane-right","pause","pencil-simple","play","plus","plus-circle","rocket-launch","sign-out","sliders","tag","trash-simple","users","warning-circle","x"],duotone:["check-circle","cube","question","warning-circle","warning"],regular:["alarm","arrow-clockwise","arrow-counter-clockwise","arrow-left","arrow-left","arrow-right","arrows-horizontal","arrows-in","arrows-out","arrows-out-cardinal","basketball","bounding-box","brackets-curly","camera-rotate","caret-down","caret-left","caret-right","check","check-circle","circle","cloud","cloud-arrow-up","cube","currency-dollar","currency-eur","cursor-click","dots-three-vertical","export","file-arrow-up","file-plus","file-text","flame","gear","folder-open","grid-four","hard-drives","house","image","info","key","lightbulb","list","list-bullets","list-checks","lock","magic-wand","navigation-arrow","paint-brush","palette","paper-plane-tilt","plus","plus-circle","push-pin","push-pin-slash","question","scan","shopping-cart-simple","sign-out","sliders-horizontal","trash","warning","warning-circle","x","x-circle"]};
@@ -6,8 +6,8 @@ export interface ResponsiveApplicationProviderProps extends PropsWithChildren {
6
6
  * Responsive state owned outside the UI. When given, the provider measures its container into
7
7
  * it and `useResponsive()` reads from it; otherwise the provider keeps the state itself.
8
8
  *
9
- * @internal Runtime plumbing for the SDK's own configurator, which passes its runtime
10
- * `ResponsiveStateManager`. A project mounting this provider leaves it out.
9
+ * @internal Runtime plumbing for the SDK's own configurator, which passes its application
10
+ * runtime's responsive state. A project mounting this provider leaves it out.
11
11
  */
12
12
  store?: ResponsiveStateStore;
13
13
  }
@@ -1,4 +1,3 @@
1
- import type { BehaviorSubject, Observable } from 'rxjs';
2
1
  import type { CanvasPadding } from './ResponsiveProvider.js';
3
2
  /**
4
3
  * The responsive state a `ResponsiveStateStore` holds.
@@ -20,9 +19,9 @@ export interface ResponsiveStateSnapshot {
20
19
  }
21
20
  /**
22
21
  * Responsive state owned outside the UI, which `ResponsiveApplicationProvider` measures its root
23
- * container into and provides to `useResponsive()`. A mounted Phoenix application passes the
24
- * `ResponsiveStateManager` of `@salsita-ai/sdk/react`, so its lifecycle reads the same state
25
- * without the UI.
22
+ * container into and provides to `useResponsive()`. A mounted Phoenix configurator passes its
23
+ * application runtime's responsive state (`useResponsiveStore()` of `@salsita-ai/sdk/react`), so
24
+ * its lifecycle reads the same state without the UI.
26
25
  *
27
26
  * Declared here by shape rather than imported, because `ui-sdk` depends on no other SDK package.
28
27
  *
@@ -30,12 +29,15 @@ export interface ResponsiveStateSnapshot {
30
29
  * `ResponsiveApplicationProvider` leaves `store` out.
31
30
  */
32
31
  export interface ResponsiveStateStore {
33
- readonly state$: Observable<ResponsiveStateSnapshot>;
34
- readonly viewport$: BehaviorSubject<{
35
- width: number;
36
- height: number;
37
- }>;
32
+ /** Calls `onChange` after every change of the store; returns the unsubscribe. */
33
+ readonly subscribe: (onChange: () => void) => () => void;
34
+ /** The same object until a value in it changes. */
38
35
  readonly getState: () => ResponsiveStateSnapshot;
36
+ /** The container's size rounded up to whole pixels; the same object until it changes. */
37
+ readonly getViewportSize: () => {
38
+ readonly width: number;
39
+ readonly height: number;
40
+ };
39
41
  readonly setViewport: (viewport: {
40
42
  readonly width: number;
41
43
  readonly height: number;
@@ -1 +1 @@
1
- import{useTheme as e}from"@mui/material";import{useCallback as t,useLayoutEffect as i,useMemo as a,useSyncExternalStore as s}from"react";import{isMobileOnly as n}from"react-device-detect";import{useResizeObserver as o}from"usehooks-ts";export const useStoreResponsiveInfo=(r,c)=>{let{sm:d,md:p,lg:l}=e().breakpoints.values,u=s(t(e=>{let t=c.state$.subscribe(e);return()=>{t.unsubscribe()}},[c]),c.getState);i(()=>{c.setBreakpoints({sm:d,md:p,lg:l})},[c,d,p,l]);let m=t(e=>{let{width:t,height:i}=e.getBoundingClientRect();c.setViewport({width:t,height:i,isLandscape:window.matchMedia("(orientation: landscape)").matches,isPortrait:window.matchMedia("(orientation: portrait)").matches})},[c]),b=t(e=>{c.setCanvasPadding("function"==typeof e?e(c.getCanvasPadding()):e)},[c]),g=t(()=>{r.current&&m(r.current)},[r,m]);return o({ref:r,onResize:()=>{null!=r.current&&m(r.current)}}),i(()=>{null!=r.current&&m(r.current)},[r,m]),a(()=>({...u,expand:c.expand,collapse:c.collapse,hide:c.hide,show:c.show,isMobileAndMobileLandscape:u.isMobile||u.isLandscape&&u.isTablet&&n,isDesktopExceptMobileLandscape:u.isDesktop&&!(u.isLandscape&&u.isTablet&&n),viewport$:c.viewport$,getCanvasPadding:c.getCanvasPadding,setCanvasPadding:b,update:g,setAnimating:c.setAnimating}),[u,c,b,g])};
1
+ import{useTheme as e}from"@mui/material";import{useCallback as t,useLayoutEffect as i,useMemo as a,useState as n,useSyncExternalStore as s}from"react";import{isMobileOnly as r}from"react-device-detect";import{BehaviorSubject as o}from"rxjs";import{useResizeObserver as c}from"usehooks-ts";export const useStoreResponsiveInfo=(p,d)=>{let{sm:l,md:u,lg:m}=e().breakpoints.values,g=s(d.subscribe,d.getState),[b]=n(()=>new o(d.getViewportSize()));i(()=>{let e=()=>{let e=d.getViewportSize();e!==b.value&&b.next(e)};return e(),d.subscribe(e)},[d,b]),i(()=>{d.setBreakpoints({sm:l,md:u,lg:m})},[d,l,u,m]);let w=t(e=>{let{width:t,height:i}=e.getBoundingClientRect();d.setViewport({width:t,height:i,isLandscape:window.matchMedia("(orientation: landscape)").matches,isPortrait:window.matchMedia("(orientation: portrait)").matches})},[d]),f=t(e=>{d.setCanvasPadding("function"==typeof e?e(d.getCanvasPadding()):e)},[d]),h=t(()=>{p.current&&w(p.current)},[p,w]);return c({ref:p,onResize:()=>{null!=p.current&&w(p.current)}}),i(()=>{null!=p.current&&w(p.current)},[p,w]),a(()=>({...g,expand:d.expand,collapse:d.collapse,hide:d.hide,show:d.show,isMobileAndMobileLandscape:g.isMobile||g.isLandscape&&g.isTablet&&r,isDesktopExceptMobileLandscape:g.isDesktop&&!(g.isLandscape&&g.isTablet&&r),viewport$:b,getCanvasPadding:d.getCanvasPadding,setCanvasPadding:f,update:h,setAnimating:d.setAnimating}),[g,d,b,f,h])};
@@ -44,7 +44,8 @@ declare module '@mui/material/styles' {
44
44
  PhxChat: 'root';
45
45
  PhxChatFooter: 'root' | 'formLayout' | 'input';
46
46
  PhxChatMessage: 'base' | 'assistant' | 'user' | 'widget' | 'error' | 'helper';
47
- PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'entityLink' | 'referenceLink' | 'referenceDetails' | 'image' | 'form' | 'formGroup' | 'formGroupLabel' | 'formOptions' | 'formOptionsLabel' | 'formOptionsRow' | 'formReply' | 'formText' | 'formTextInput' | 'formSubmit' | 'formNote' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'undoButton' | 'status' | 'separator' | 'earlierButton' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
47
+ PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'alert' | 'entityLink' | 'referenceLink' | 'referenceDetails' | 'image' | 'screenshotsLink' | 'screenshots' | 'form' | 'formGroup' | 'formGroupLabel' | 'formOptions' | 'formOptionsLabel' | 'formOptionsRow' | 'formReply' | 'formCard' | 'formCardImage' | 'formCardLabel' | 'formCardDescription' | 'formCardCheck' | 'formSwatch' | 'formSwatchImage' | 'formSwatchCheck' | 'formText' | 'formTextInput' | 'formNumber' | 'formConfirm' | 'formConfirmButtons' | 'formConfirmButton' | 'formSubmit' | 'formNote' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'undoButton' | 'status' | 'separator' | 'earlierButton' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
48
+ PhxExportingOverlay: 'root' | 'message';
48
49
  PhxTopNavigation: 'root' | 'stepper' | 'step';
49
50
  PhxListSelector: 'root';
50
51
  PhxListSelectorItem: 'root' | 'radio' | 'title' | 'description' | 'formControlLabel';
@@ -113,6 +114,9 @@ declare module '@mui/material/styles' {
113
114
  PhxAssistantPanel?: {
114
115
  styleOverrides?: ComponentsOverrides<Theme>['PhxAssistantPanel'];
115
116
  };
117
+ PhxExportingOverlay?: {
118
+ styleOverrides?: ComponentsOverrides<Theme>['PhxExportingOverlay'];
119
+ };
116
120
  PhxPreviewLayout?: {
117
121
  styleOverrides?: ComponentsOverrides<Theme>['PhxPreviewLayout'];
118
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/sdk",
3
- "version": "0.50.0-develop.f6390cb584",
3
+ "version": "0.50.0-develop.f9cd9b3a12",
4
4
  "description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
5
5
  "keywords": [
6
6
  "salsita",
@@ -207,6 +207,16 @@
207
207
  "schema",
208
208
  "CHANGELOG.md"
209
209
  ],
210
+ "nx": {
211
+ "targets": {
212
+ "build": {
213
+ "outputs": [
214
+ "{projectRoot}/dist",
215
+ "{projectRoot}/src/i18n/locales/*/messages.ts"
216
+ ]
217
+ }
218
+ }
219
+ },
210
220
  "dependencies": {
211
221
  "@apidevtools/json-schema-ref-parser": "14.1.1",
212
222
  "@aws-sdk/client-s3": "3.1054.0",
@@ -298,8 +308,8 @@
298
308
  "yaml": "2.9.0",
299
309
  "yargs": "17.7.2",
300
310
  "zod": "3.25.76",
301
- "@salsita-ai/contracts": "0.50.0-develop.f6390cb584",
302
- "@salsita-ai/common": "0.50.0-develop.f6390cb584"
311
+ "@salsita-ai/common": "0.50.0-develop.f9cd9b3a12",
312
+ "@salsita-ai/contracts": "0.50.0-develop.f9cd9b3a12"
303
313
  },
304
314
  "devDependencies": {
305
315
  "@clerk/clerk-react": "5.61.8",
@@ -13959,6 +13959,53 @@
13959
13959
  "required": ["exportState", "width", "height", "fileFormat", "toolState", "viewState", "navigationState"],
13960
13960
  "additionalProperties": false
13961
13961
  },
13962
+ "AgentScreenshotComponentState": {
13963
+ "type": "object",
13964
+ "tsType": "AgentScreenshotComponentState",
13965
+ "import": [
13966
+ {
13967
+ "module": "@salsita-ai/sdk/domain",
13968
+ "member": "AgentScreenshotComponentState"
13969
+ }
13970
+ ],
13971
+ "properties": {
13972
+ "exportState": {
13973
+ "type": "string"
13974
+ },
13975
+ "width": {
13976
+ "type": "number"
13977
+ },
13978
+ "height": {
13979
+ "type": "number"
13980
+ },
13981
+ "fileFormat": {
13982
+ "type": "string",
13983
+ "enum": ["PNG", "JPEG"]
13984
+ },
13985
+ "backgroundColor": {
13986
+ "type": "string",
13987
+ "pattern": "^#[0-9a-fA-F]{6}$",
13988
+ "tsType": "HexColor",
13989
+ "import": [
13990
+ {
13991
+ "module": "@salsita-ai/sdk/common/utils",
13992
+ "member": "HexColor"
13993
+ }
13994
+ ]
13995
+ },
13996
+ "toolState": {
13997
+ "type": "string"
13998
+ },
13999
+ "viewState": {
14000
+ "type": "string"
14001
+ },
14002
+ "navigationState": {
14003
+ "type": "string"
14004
+ }
14005
+ },
14006
+ "required": ["exportState", "width", "height", "fileFormat", "toolState", "viewState", "navigationState"],
14007
+ "additionalProperties": false
14008
+ },
13962
14009
  "ProjectedEntitiesComponentState": {
13963
14010
  "type": "object",
13964
14011
  "tsType": "ProjectedEntitiesComponentState",
@@ -44102,6 +44149,99 @@
44102
44149
  ]
44103
44150
  }
44104
44151
  },
44152
+ "agentScreenshot": {
44153
+ "type": "object",
44154
+ "additionalProperties": {
44155
+ "anyOf": [
44156
+ {
44157
+ "type": "object",
44158
+ "tsType": "AgentScreenshotComponentState",
44159
+ "import": [
44160
+ {
44161
+ "module": "@salsita-ai/sdk/domain",
44162
+ "member": "AgentScreenshotComponentState"
44163
+ }
44164
+ ],
44165
+ "properties": {
44166
+ "exportState": {
44167
+ "$ref": "#/definitions/EnhancedStringRead"
44168
+ },
44169
+ "width": {
44170
+ "$ref": "#/definitions/EnhancedNumberRead"
44171
+ },
44172
+ "height": {
44173
+ "$ref": "#/definitions/EnhancedNumberRead"
44174
+ },
44175
+ "fileFormat": {
44176
+ "anyOf": [
44177
+ {
44178
+ "type": "string",
44179
+ "enum": ["PNG", "JPEG"]
44180
+ },
44181
+ {
44182
+ "$ref": "#/definitions/ReadEnhancement"
44183
+ }
44184
+ ]
44185
+ },
44186
+ "backgroundColor": {
44187
+ "anyOf": [
44188
+ {
44189
+ "type": "string",
44190
+ "pattern": "^#[0-9a-fA-F]{6}$",
44191
+ "tsType": "HexColor",
44192
+ "import": [
44193
+ {
44194
+ "module": "@salsita-ai/sdk/common/utils",
44195
+ "member": "HexColor"
44196
+ }
44197
+ ]
44198
+ },
44199
+ {
44200
+ "$ref": "#/definitions/ReadEnhancement"
44201
+ }
44202
+ ]
44203
+ },
44204
+ "toolState": {
44205
+ "$ref": "#/definitions/EnhancedStringRead"
44206
+ },
44207
+ "viewState": {
44208
+ "$ref": "#/definitions/EnhancedStringRead"
44209
+ },
44210
+ "navigationState": {
44211
+ "$ref": "#/definitions/EnhancedStringRead"
44212
+ },
44213
+ "$filter": {
44214
+ "$ref": "#/definitions/ComponentSystemFilter"
44215
+ }
44216
+ },
44217
+ "required": [
44218
+ "exportState",
44219
+ "width",
44220
+ "height",
44221
+ "fileFormat",
44222
+ "toolState",
44223
+ "viewState",
44224
+ "navigationState"
44225
+ ],
44226
+ "additionalProperties": false
44227
+ },
44228
+ {
44229
+ "type": "object",
44230
+ "properties": {
44231
+ "$read": {
44232
+ "type": "string",
44233
+ "pattern": "^\\$?[a-z]\\w*$"
44234
+ },
44235
+ "$filter": {
44236
+ "$ref": "#/definitions/ComponentSystemFilter"
44237
+ }
44238
+ },
44239
+ "required": ["$read"],
44240
+ "additionalProperties": false
44241
+ }
44242
+ ]
44243
+ }
44244
+ },
44105
44245
  "projectedEntities": {
44106
44246
  "type": "object",
44107
44247
  "additionalProperties": {
@@ -1,10 +0,0 @@
1
- import type { FormElementDefinition } from './form-element-definition.js';
2
- import { type FormRegistry } from './form-registry.js';
3
- /** The elements of every assistant form: the built-ins the SDK prompt lists, with their components. */
4
- export declare const BUILT_IN_FORM_ELEMENTS: readonly FormElementDefinition[];
5
- /**
6
- * The registry of the built-in elements, built on the first form rather than when the module loads:
7
- * compiling validators while the bundle evaluates would break a configurator on a page whose CSP
8
- * forbids eval, even one without an assistant.
9
- */
10
- export declare const getBuiltInFormRegistry: () => FormRegistry;
@@ -1 +0,0 @@
1
- let o;import{match as t}from"ts-pattern";import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e,extendedSchemaValidator as r}from"#package/domain";import{FormGroup as i,FormOptions as m,FormReply as n,FormText as p}from"../form-elements/index.js";import{createFormRegistry as c}from"./form-registry.js";export const BUILT_IN_FORM_ELEMENTS=e.map(o=>t(o.role).with("group",t=>({...o,role:t,component:i})).with("choice","choices",t=>({...o,role:t,component:m})).with("option",t=>({...o,role:t,component:n})).with("input",t=>({...o,role:t,component:p})).exhaustive());export const getBuiltInFormRegistry=()=>o??=c(BUILT_IN_FORM_ELEMENTS,{schemaValidator:r});
@@ -1,8 +0,0 @@
1
- let e=new Set(`a abbr acronym address applet area article aside audio b base basefont bdi bdo big blink blockquote body br
2
- button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em
3
- embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html
4
- i iframe image img input ins kbd keygen label legend li link main map mark marquee math menu menuitem meta
5
- meter nav nobr noembed noframes noscript object ol optgroup option output p param picture plaintext pre
6
- progress q rb rp rt rtc ruby s samp script search section select slot small source span strike strong style
7
- sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr
8
- xmp`.split(/\s+/)),t=/^[a-z][a-z0-9-]*$/,r={type:"string"},a=({role:e,attributes:t})=>Object.entries({label:r,..."option"===e||"input"===e?{value:r}:{},...t}),o=(e,t)=>{let r=e.get(t);if(r?.definition.role!==t)throw Error(`The form registry has no "${t}" element with the role "${t}". Forms wrap implicit content in it. Register the built-in "${t}".`);return r};export const createFormRegistry=(r,{schemaValidator:n})=>{let i=new Map;for(let o of r){if(!t.test(o.name)||e.has(o.name))throw Error(`The form element "${o.name}" cannot be registered: its name must be lowercase and must not be an HTML element name, so form markup is never read as HTML. Rename the element.`);if(i.has(o.name))throw Error(`The form element "${o.name}" is registered twice. Each tag names one element. Remove or rename one of them.`);let r=new Map(a(o).map(([e,t])=>[e,{attribute:t,validate:n.compile({type:t.type,...t.enum?{enum:t.enum}:{}})}]));i.set(o.name,{definition:o,attributes:r})}return{group:o(i,"group"),choice:o(i,"choice"),choices:o(i,"choices"),get:e=>i.get(e)}};
@@ -1,28 +0,0 @@
1
- /**
2
- * What an element of an assistant form collects: a `group` all its children, a `choice` exactly one
3
- * of its options, a `choices` any number of them; an `option` is something to pick and an `input` a
4
- * free value.
5
- */
6
- export type AssistantFormRole = 'group' | 'choice' | 'choices' | 'option' | 'input';
7
- /** The type an attribute of a form element is validated and coerced to; the model writes every attribute as a string. */
8
- export interface AssistantFormAttribute {
9
- readonly type: 'string' | 'number' | 'integer' | 'boolean';
10
- readonly enum?: readonly string[];
11
- }
12
- /**
13
- * An element the assistant can write inside a ```` ```form ```` fence of its reply to ask the user
14
- * something. The panel renders it, and the SDK prompt lists it, so the model and the panel agree on
15
- * one set of elements.
16
- */
17
- export interface AssistantFormElementDescriptor {
18
- /** The tag: lowercase, and never the name of an HTML element. */
19
- readonly name: string;
20
- readonly role: AssistantFormRole;
21
- /** What the element is for, printed in the prompt after its signature. */
22
- readonly description: string;
23
- /** Attributes beyond the built-in `label` and, on an option or an input, `value`. */
24
- readonly attributes: Readonly<Record<string, AssistantFormAttribute>>;
25
- readonly required?: readonly string[];
26
- }
27
- /** The elements every assistant form understands, in the order the prompt lists them. */
28
- export declare const ASSISTANT_BUILT_IN_FORM_ELEMENTS: readonly AssistantFormElementDescriptor[];
@@ -1 +0,0 @@
1
- export const ASSISTANT_BUILT_IN_FORM_ELEMENTS=[{name:"group",role:"group",description:"Puts related questions together under its label.",attributes:{}},{name:"choice",role:"choice",description:"The user picks exactly one of its options.",attributes:{}},{name:"choices",role:"choices",description:"The user picks any number of its options.",attributes:{}},{name:"reply",role:"option",description:"A short answer shown as a button.",attributes:{}},{name:"text",role:"input",description:"A single line the user types.",attributes:{placeholder:{type:"string"}}}];
@@ -1 +0,0 @@
1
- import{SystemComponentBuilder as t,isSnapshotOfComponentType as e}from"../core/index.js";export const clientSideImageComponent=t.component("clientSideImage").withState({type:"object",tsType:"ClientSideImageComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ClientSideImageComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isClientSideImageComponentSnapshot=e(clientSideImageComponent);
@@ -1 +0,0 @@
1
- import{SystemComponentBuilder as t,isSnapshotOfComponentType as e}from"../core/index.js";export const saveTemplateThumbnailComponent=t.component("saveTemplateThumbnail").withState({type:"object",tsType:"SaveTemplateThumbnailComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"SaveTemplateThumbnailComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isSaveTemplateThumbnailComponentSnapshot=e(saveTemplateThumbnailComponent);
@@ -1,19 +0,0 @@
1
- import { type EnvironmentActions } from '#package/domain';
2
- declare global {
3
- interface Window {
4
- __salsita: {
5
- setGodMode: (godMode: boolean) => void;
6
- };
7
- }
8
- }
9
- interface Context {
10
- readonly environmentActions: EnvironmentActions;
11
- }
12
- /**
13
- * Installs the `window.__salsita.setGodMode` global toggle for the given registry. The
14
- * toggle persists the value in session storage (so it survives reloads, see
15
- * {@link resolveGodMode}) and publishes it to the runtime spec, where consumers read it
16
- * via `useRuntimeSpecGodMode`.
17
- */
18
- export declare const registerGodModeGlobal: (context: Context) => void;
19
- export {};
@@ -1 +0,0 @@
1
- import{GOD_MODE_SESSION_STORAGE_KEY as o}from"#package/domain";export const registerGodModeGlobal=e=>{window.__salsita={...window.__salsita,setGodMode:t=>{sessionStorage.setItem(o,t.toString()),e.environmentActions.setGodMode(t)}}};
@@ -1,25 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import type { ResponsiveStateManager } from './responsive-state-manager.js';
3
- export declare const ResponsiveStateContext: import("react").Context<ResponsiveStateManager | null>;
4
- /**
5
- * The props of `ResponsiveStateProvider`.
6
- *
7
- * @internal Runtime plumbing behind `useResponsiveState`, for the SDK's own UI. A project layout
8
- * uses `useActiveViewports()` from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from
9
- * `@salsita-ai/sdk/configurator`.
10
- */
11
- export interface ResponsiveStateProviderProps {
12
- readonly children: ReactNode;
13
- /** The responsive state of the application mounted inside. One per mounted application. */
14
- readonly manager: ResponsiveStateManager;
15
- }
16
- /**
17
- * Provides the responsive state of one mounted application to the lifecycle and UI inside it.
18
- * Each mounted application has its own, because each has its own root container: an admin that
19
- * embeds a configurator runs both in one application runtime.
20
- *
21
- * @internal Exists for the SDK's own UI, which reaches the runtime's responsive state through it.
22
- * A project layout does not use it: it uses `useActiveViewports()` from `@salsita-ai/sdk/react`
23
- * and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
24
- */
25
- export declare const ResponsiveStateProvider: (props: ResponsiveStateProviderProps) => import("react/jsx-runtime").JSX.Element;