@salsita-ai/sdk 0.50.0-develop.5c4dae56bb → 0.50.0-develop.600437cb2f

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 (318) 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 +2 -1
  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.js +1 -1
  27. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +12 -2
  28. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  29. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  30. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  31. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  32. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  33. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  34. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  35. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
  36. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  37. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +45 -4
  38. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  39. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  40. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  41. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  42. package/dist/configurator/common/configurator-interface.d.ts +52 -2
  43. package/dist/configurator/common/configurator-interface.js +1 -1
  44. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
  45. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
  46. package/dist/configurator/index.d.ts +1 -0
  47. package/dist/configurator/index.js +1 -1
  48. package/dist/configurator/pages/default-configurator-elements.d.ts +3 -2
  49. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  50. package/dist/configurator/pages/default-elements/index.d.ts +1 -0
  51. package/dist/configurator/pages/default-elements/index.js +1 -1
  52. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  53. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  54. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  55. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  56. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  57. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  58. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  59. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  60. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  61. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  62. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  63. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  64. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  65. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  66. package/dist/configurator/scene/index.d.ts +1 -0
  67. package/dist/configurator/scene/index.js +1 -1
  68. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  69. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  70. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  71. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  72. package/dist/configurator/toolbar-actions/index.d.ts +3 -0
  73. package/dist/configurator/toolbar-actions/index.js +1 -0
  74. package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
  75. package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
  76. package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
  77. package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
  78. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  79. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  80. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  81. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  82. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  83. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  84. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  85. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  86. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  87. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  88. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  89. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  90. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  91. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  92. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  93. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
  94. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  95. package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
  96. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  97. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  98. package/dist/configurator/ui/assistant/form/index.js +1 -1
  99. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
  100. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  101. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  102. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  103. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  104. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  105. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  106. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  107. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  108. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  109. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
  110. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  111. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  112. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  113. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  114. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  115. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  116. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  117. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  118. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  119. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
  120. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  121. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  122. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
  123. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
  124. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  125. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  126. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  127. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
  128. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  129. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  130. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  131. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
  132. package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
  133. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  134. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  135. package/dist/configurator/ui/assistant/index.js +1 -1
  136. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  137. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  138. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
  139. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
  140. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  141. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  142. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  143. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  144. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +14 -0
  145. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  146. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
  147. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  148. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  149. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  150. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  151. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  152. package/dist/configurator/ui/index.d.ts +1 -0
  153. package/dist/configurator/ui/index.js +1 -1
  154. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  155. package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
  156. package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
  157. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
  158. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  159. package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
  160. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  161. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  162. package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
  163. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
  164. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
  165. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  166. package/dist/docs/fabs/basic.mdx +4 -0
  167. package/dist/docs/index.json +18 -1
  168. package/dist/docs/layouts/custom-layout.mdx +3 -1
  169. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  170. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  171. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  172. package/dist/docs/phoenix/configurator-interface.mdx +68 -1
  173. package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
  174. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  175. package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
  176. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
  177. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  178. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  179. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  180. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  181. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  182. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  183. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  184. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  185. package/dist/domain/application/assistant/form/index.js +1 -0
  186. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  187. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  188. package/dist/domain/application/assistant/index.d.ts +2 -3
  189. package/dist/domain/application/assistant/index.js +1 -1
  190. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  191. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
  192. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  193. package/dist/domain/available-system-components.d.ts +1 -1
  194. package/dist/domain/available-system-components.js +1 -1
  195. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  196. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  197. package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -0
  198. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  199. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  200. package/dist/domain/domain-runtime/spec/index.js +1 -1
  201. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  202. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
  203. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  204. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  205. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  206. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +2 -1
  207. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  208. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  209. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  210. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  211. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  212. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  213. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  214. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  215. package/dist/domain/extensions/export-images/index.js +1 -0
  216. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  217. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  218. package/dist/domain/extensions/index.d.ts +1 -2
  219. package/dist/domain/extensions/index.js +1 -1
  220. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +2 -0
  221. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  222. package/dist/editor/domain-editors/apply-spec-update.d.ts +8 -1
  223. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  224. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  225. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  226. package/dist/i18n/locales/cs/messages.js +1 -1
  227. package/dist/i18n/locales/da/messages.js +1 -1
  228. package/dist/i18n/locales/de/messages.js +1 -1
  229. package/dist/i18n/locales/de-AT/messages.js +1 -1
  230. package/dist/i18n/locales/en/messages.js +1 -1
  231. package/dist/i18n/locales/en-AU/messages.js +1 -1
  232. package/dist/i18n/locales/en-GB/messages.js +1 -1
  233. package/dist/i18n/locales/es/messages.js +1 -1
  234. package/dist/i18n/locales/fr/messages.js +1 -1
  235. package/dist/i18n/locales/hu/messages.js +1 -1
  236. package/dist/i18n/locales/it/messages.js +1 -1
  237. package/dist/i18n/locales/nl/messages.js +1 -1
  238. package/dist/i18n/locales/pl/messages.js +1 -1
  239. package/dist/i18n/locales/pt/messages.js +1 -1
  240. package/dist/i18n/locales/ro/messages.js +1 -1
  241. package/dist/i18n/locales/sk/messages.js +1 -1
  242. package/dist/i18n/locales/tr/messages.js +1 -1
  243. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
  244. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  245. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  246. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  247. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  248. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  249. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  250. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  251. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  252. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  253. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  254. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -2
  255. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  256. package/dist/react-sdk/domain-context/index.d.ts +3 -0
  257. package/dist/react-sdk/domain-context/index.js +1 -1
  258. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
  259. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
  260. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
  261. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
  262. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
  263. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
  264. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
  265. package/dist/react-sdk/index.d.ts +1 -0
  266. package/dist/react-sdk/index.js +1 -1
  267. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  268. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  269. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  270. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  271. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  272. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  273. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  274. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  275. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  276. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  277. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  278. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  279. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  280. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  281. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  282. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  283. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  284. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  285. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  286. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  287. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  288. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  289. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  290. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  291. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  292. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  293. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  294. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  295. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  296. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  297. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  298. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  299. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  300. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  301. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  302. package/dist/ui-sdk/theme/types.d.ts +5 -1
  303. package/package.json +13 -3
  304. package/schema/domain-spec.json +140 -0
  305. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  306. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  307. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  308. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
  309. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
  310. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
  311. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
  312. package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
  313. package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
  314. package/dist/domain/extensions/client-side-image.js +0 -1
  315. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  316. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  317. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  318. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/scene-control-elements/scene-control-tooltip-visibility.js} +0 -0
@@ -1 +1 @@
1
- import{memoOnce as e}from"@salsita-ai/common/utils";import{AccessLevel as t}from"@salsita-ai/contracts/api";import{createDomainRuntime as o,createMockDomainRuntimeServices as n,createMockSessionContext as s}from"#package/domain";import{createCommonServicesSelectors as i}from"../common-services/index.js";import{createDomainApplicationContextSelectors as a}from"../domain-application-context/index.js";import{createIntegrationActions as r,createIntegrationSelectors as c,initializeIntegration as m}from"../integration/index.js";import{createRoutingActions as d,createRoutingSelectors as p,initializeRouting as l}from"../routing/index.js";import{SessionService as S,createSessionRuntimeActions as g,createSessionRuntimeSelectors as v,initializeSessionRuntime as u}from"../session/index.js";import{createMockWebComponentApi as f}from"../web-component/index.js";export const createMockApplicationRuntime=(C,x)=>{var b;let w,y,A,D,k,E,I,R,h,j,O,T,L,F,M,{sessionData:U,mode:V,role:z}=x,q=n(),B=(b={webComponentOptions:x.webComponentOptions??C.mount.options,webComponentApi:x.webComponentApi??f()},A=u(),D=o({config:C,services:q,getExtensionSystems:e=>M[e].getInitializableSystems()}),k=new Set,E=()=>{k.forEach(e=>{e()})},w=m({actions:I=r({setIntegration:e=>{w=e(w),E()}})}),R=c({getState:()=>({integration:w})}),h=d({setRouting:e=>{y=e(y),E()}}),y=l(),j=p({getState:()=>({...D.getState(),routing:y}),actions:h,accessActions:D.actions.access,loadedDataActions:D.actions.loadedData,domainServicesSelectors:D.selectors.domainServices,overridesSelectors:D.selectors.overrides}),O=i({getState:()=>({...D.getState(),session:A}),environmentSelectors:D.selectors.environment,specSelectors:D.selectors.spec,accessSelectors:D.selectors.access,domainServicesSelectors:D.selectors.domainServices,webComponentOptions:b.webComponentOptions,webComponentApi:b.webComponentApi,getSessionService:()=>F(),routingSelectors:j}),T=g({setSessionRuntime:e=>{A=e(A),E()}}),L=v({getState:()=>({...D.getState(),session:A}),sessionContextSelectors:D.selectors.sessionContext}),F=e(()=>new S({getLogger:()=>D.selectors.domainServices.getLogger(),getAnalyticsService:()=>D.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:O.getUnauthenticatedClient,environmentSelectors:D.selectors.environment,sessionActions:T,setSessionContext:D.actions.sessionContext.setSessionContext,sessionSelectors:L,specSelectors:D.selectors.spec})),M={configurator:a({applicationType:"configurator",commonServicesSelectors:O,domainServicesSelectors:D.selectors.domainServices,domainContextSelectors:D.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:a({applicationType:"admin",commonServicesSelectors:O,domainServicesSelectors:D.selectors.domainServices,domainContextSelectors:D.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{k.add(e);let t=D.subscribe(e);return()=>{k.delete(e),t()}},getState:()=>({...D.getState(),integration:w,routing:y,session:A}),selectors:{...D.selectors,commonServices:O,integration:R,routing:j,session:L,domainApplicationContext:M},actions:{...D.actions,integration:I,routing:h,session:T}}),G=B.getState().spec;return B.actions.spec.updateSpec({...G,configurator:{...G.configurator,createTransformers:e=>x.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),B.actions.sessionContext.setSessionContext(s(z,U)),B.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",access:"read"===V?t.Read:t.Owner,viewMode:"read"===V,revisionId:void 0,configurationId:"mock"}),B.actions.domainData.setDomainData({publishedData:x.publishedData,frontendData:x.frontendData,backendData:x.backendData}),B.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:x.entities,modelVersion:C.domain.domainFactory.modelVersion,rootEntityType:x.rootEntityType,schemaIdentity:C.domain.domainFactory}),B};
1
+ import{memoOnce as e}from"@salsita-ai/common/utils";import{AccessLevel as t}from"@salsita-ai/contracts/api";import{createDomainRuntime as o,createMockDomainRuntimeServices as n,createMockSessionContext as s}from"#package/domain";import{createCommonServicesSelectors as i}from"../common-services/index.js";import{createDomainApplicationContextSelectors as a}from"../domain-application-context/index.js";import{createIntegrationActions as r,createIntegrationSelectors as c,initializeIntegration as m}from"../integration/index.js";import{createRoutingActions as d,createRoutingSelectors as p,initializeRouting as l}from"../routing/index.js";import{SessionService as S,createSessionRuntimeActions as g,createSessionRuntimeSelectors as v,initializeSessionRuntime as u}from"../session/index.js";import{createMockWebComponentApi as f}from"../web-component/index.js";export const createMockApplicationRuntime=(C,x)=>{var b;let w,y,A,D,k,E,I,R,h,j,O,T,L,F,M,{sessionData:U,mode:V,role:z}=x,q=n(),B=(b={webComponentOptions:x.webComponentOptions??C.mount.options,webComponentApi:x.webComponentApi??f()},A=u(),D=o({config:C,services:q,getExtensionSystems:e=>M[e].getInitializableSystems()}),k=new Set,E=()=>{k.forEach(e=>{e()})},I=r({setIntegration:e=>{w=e(w),E()}}),w=m(),R=c({getState:()=>({integration:w}),actions:I}),h=d({setRouting:e=>{y=e(y),E()}}),y=l(),j=p({getState:()=>({...D.getState(),routing:y}),actions:h,accessActions:D.actions.access,loadedDataActions:D.actions.loadedData,domainServicesSelectors:D.selectors.domainServices,overridesSelectors:D.selectors.overrides}),O=i({getState:()=>({...D.getState(),session:A}),environmentSelectors:D.selectors.environment,specSelectors:D.selectors.spec,accessSelectors:D.selectors.access,domainServicesSelectors:D.selectors.domainServices,webComponentOptions:b.webComponentOptions,webComponentApi:b.webComponentApi,getSessionService:()=>F(),routingSelectors:j}),T=g({setSessionRuntime:e=>{A=e(A),E()}}),L=v({getState:()=>({...D.getState(),session:A}),sessionContextSelectors:D.selectors.sessionContext}),F=e(()=>new S({getLogger:()=>D.selectors.domainServices.getLogger(),getAnalyticsService:()=>D.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:O.getUnauthenticatedClient,environmentSelectors:D.selectors.environment,sessionActions:T,setSessionContext:D.actions.sessionContext.setSessionContext,sessionSelectors:L,specSelectors:D.selectors.spec})),M={configurator:a({applicationType:"configurator",commonServicesSelectors:O,domainServicesSelectors:D.selectors.domainServices,domainContextSelectors:D.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:a({applicationType:"admin",commonServicesSelectors:O,domainServicesSelectors:D.selectors.domainServices,domainContextSelectors:D.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{k.add(e);let t=D.subscribe(e);return()=>{k.delete(e),t()}},getState:()=>({...D.getState(),integration:w,routing:y,session:A}),selectors:{...D.selectors,commonServices:O,integration:R,routing:j,session:L,domainApplicationContext:M},actions:{...D.actions,integration:I,routing:h,session:T}}),G=B.getState().spec;return B.actions.spec.updateSpec({...G,configurator:{...G.configurator,createTransformers:e=>x.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),B.actions.sessionContext.setSessionContext(s(z,U)),B.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",access:"read"===V?t.Read:t.Owner,viewMode:"read"===V,revisionId:void 0,configurationId:"mock"}),B.actions.domainData.setDomainData({publishedData:x.publishedData,frontendData:x.frontendData,backendData:x.backendData}),B.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:x.entities,modelVersion:C.domain.domainFactory.modelVersion,rootEntityType:x.rootEntityType,schemaIdentity:C.domain.domainFactory}),B};
@@ -17,11 +17,43 @@ interface RoutingServiceContext {
17
17
  }
18
18
  export declare class RoutingService {
19
19
  private readonly context;
20
- private onGoToIndex;
21
- private onNavigated;
20
+ private readonly onGoToIndexRegistrations;
21
+ private readonly onNavigatedRegistrations;
22
+ private unregisterSetOnGoToIndex;
23
+ private unregisterSetOnNavigated;
22
24
  constructor(context: RoutingServiceContext);
25
+ /**
26
+ * Registers the handler `goToIndex` calls instead of navigating; the handler navigates by calling
27
+ * `next`. The most recent registration is the active one. The returned function removes only this
28
+ * registration, so the one registered before it becomes active again.
29
+ * @internal Plumbing for `ConfiguratorRoutingProvider`; projects intercept `goToIndex` with
30
+ * `createOnGoToIndexHandler`.
31
+ */
32
+ registerOnGoToIndex: (handler: OnGoToIndexHandler) => (() => void);
33
+ /**
34
+ * Registers the callback told about each navigation `goToIndex` and `goToConfigurationDetail`
35
+ * make. The most recent registration is the active one, and it replaces the SDK's own reporting
36
+ * to the host (the `route` property, the configuration id in the URL and the `navigated` event)
37
+ * rather than listening beside it. The returned function removes only this registration, so the
38
+ * one registered before it becomes active again.
39
+ * @internal Plumbing for `ConfiguratorRoutingProvider`, which does that reporting.
40
+ */
41
+ registerOnNavigated: (handler: OnNavigatedHandler) => (() => void);
42
+ /**
43
+ * Replaces the handler this method registered before, on top of the other registrations; `null`
44
+ * removes it. Registrations made with `registerOnGoToIndex` stay.
45
+ * @deprecated Intercept `goToIndex` with a handler made by `createOnGoToIndexHandler` instead. This
46
+ * API will be removed in a future version.
47
+ */
23
48
  setOnGoToIndex: (handler: OnGoToIndexHandler | null) => void;
49
+ /**
50
+ * Replaces the callback this method registered before, on top of the other registrations; `null`
51
+ * removes it. Registrations made with `registerOnNavigated` stay.
52
+ * @deprecated Listen to the `navigated` event of the web component instead; a callback set here
53
+ * replaces the SDK's own reporting to the host. This API will be removed in a future version.
54
+ */
24
55
  setOnNavigated: (handler: OnNavigatedHandler | null) => void;
56
+ private notifyNavigated;
25
57
  routeTo: (routingState: RoutingState) => void;
26
58
  goToIndex: () => void;
27
59
  goToConfigurationDetail: (configurationId: string, accessToken?: string) => void;
@@ -1 +1 @@
1
- import{InvalidAccessKeyError as t}from"#package/client";import{AnalyticsEventFactory as o,decodeAccessInfo as e}from"#package/domain";import{getAccessInfo as n,getAccessTokenFromLocalStorage as i,putAccessTokenToLocalStorage as s,removeAccessTokenFromLocalStorage as a}from"./access-service.js";import{ApplicationRoutes as c}from"./types.js";export class RoutingService{context;onGoToIndex=null;onNavigated=null;constructor(t){this.context=t}setOnGoToIndex=t=>{this.onGoToIndex=t};setOnNavigated=t=>{this.onNavigated=t};routeTo=t=>{var o;if(o=this.context.getRoutingState(),o.route===c.Index||t.route===c.Index?o.route===t.route:o.configurationId===t.configurationId&&o.accessToken===t.accessToken)return;if(this.context.loadedDataActions.resetConfiguratorLoad(),t.route===c.Index){this.context.accessActions.setConfiguratorAccessInfo(null),this.context.actions.setRoutingState(t);return}let e=n(t.configurationId,t.accessToken);this.context.accessActions.setConfiguratorAccessInfo(e),this.context.actions.setRoutingState(t),t.accessToken&&s(t.configurationId,t.accessToken)};goToIndex=()=>{let t=()=>{this.context.getAnalytics().push(o.NavigationEvent({navigationState:"productPage"})),this.context.getLogger().appendToGlobalContext({navigationState:"productPage"});let t={route:c.Index};this.routeTo(t),this.onNavigated?.(t)};null==this.onGoToIndex?t():this.onGoToIndex({next:t})};goToConfigurationDetail=(t,o)=>{let e={route:c.Configuration,configurationId:t,accessToken:o};this.routeTo(e),this.onNavigated?.(e)};rejectAccessToken=(t,o)=>{i(t)===o&&a(t)};requestAccessToken=(o,n)=>{if(null!==e(n,o))return n;let i=new t;throw this.rejectAccessToken(o,n),this.context.loadedDataActions.failConfiguratorLoad(i),i}}
1
+ import{InvalidAccessKeyError as t}from"#package/client";import{AnalyticsEventFactory as e,decodeAccessInfo as o}from"#package/domain";import{getAccessInfo as n,getAccessTokenFromLocalStorage as i,putAccessTokenToLocalStorage as s,removeAccessTokenFromLocalStorage as a}from"./access-service.js";import{ApplicationRoutes as r}from"./types.js";let c=(t,e)=>{let o={handler:e};return t.push(o),()=>{let e=t.indexOf(o);-1!==e&&t.splice(e,1)}},g=t=>t.at(-1)?.handler??null;export class RoutingService{context;onGoToIndexRegistrations=[];onNavigatedRegistrations=[];unregisterSetOnGoToIndex=null;unregisterSetOnNavigated=null;constructor(t){this.context=t}registerOnGoToIndex=t=>c(this.onGoToIndexRegistrations,t);registerOnNavigated=t=>c(this.onNavigatedRegistrations,t);setOnGoToIndex=t=>{this.unregisterSetOnGoToIndex?.(),this.unregisterSetOnGoToIndex=null===t?null:this.registerOnGoToIndex(t)};setOnNavigated=t=>{this.unregisterSetOnNavigated?.(),this.unregisterSetOnNavigated=null===t?null:this.registerOnNavigated(t)};notifyNavigated=t=>{g(this.onNavigatedRegistrations)?.(t)};routeTo=t=>{var e;if(e=this.context.getRoutingState(),e.route===r.Index||t.route===r.Index?e.route===t.route:e.configurationId===t.configurationId&&e.accessToken===t.accessToken)return;if(this.context.loadedDataActions.resetConfiguratorLoad(),t.route===r.Index){this.context.accessActions.setConfiguratorAccessInfo(null),this.context.actions.setRoutingState(t);return}let o=n(t.configurationId,t.accessToken);this.context.accessActions.setConfiguratorAccessInfo(o),this.context.actions.setRoutingState(t),t.accessToken&&s(t.configurationId,t.accessToken)};goToIndex=()=>{let t=()=>{this.context.getAnalytics().push(e.NavigationEvent({navigationState:"productPage"})),this.context.getLogger().appendToGlobalContext({navigationState:"productPage"});let t={route:r.Index};this.routeTo(t),this.notifyNavigated(t)},o=g(this.onGoToIndexRegistrations);null==o?t():o({next:t})};goToConfigurationDetail=(t,e)=>{let o={route:r.Configuration,configurationId:t,accessToken:e};this.routeTo(o),this.notifyNavigated(o)};rejectAccessToken=(t,e)=>{i(t)===e&&a(t)};requestAccessToken=(e,n)=>{if(null!==o(n,e))return n;let i=new t;throw this.rejectAccessToken(e,n),this.context.loadedDataActions.failConfiguratorLoad(i),i}}
@@ -93,6 +93,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
93
93
  selectElementSlots: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, {
94
94
  entityElements: Record<string, (props: import("#package/domain").CustomPhoenixEntityElementProps) => JSX.Element>;
95
95
  layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
96
+ assistantFormElements: Record<string, import("react").ComponentType<never>>;
96
97
  hashes: Record<string, string>;
97
98
  }>;
98
99
  selectDataConfig: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").DataSpec | null>;
@@ -136,6 +137,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
136
137
  getElementSlots: () => {
137
138
  entityElements: Record<string, (props: import("#package/domain").CustomPhoenixEntityElementProps) => JSX.Element>;
138
139
  layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
140
+ assistantFormElements: Record<string, import("react").ComponentType<never>>;
139
141
  hashes: Record<string, string>;
140
142
  };
141
143
  getDataConfig: () => import("#package/domain").DataSpec | null;
@@ -596,7 +598,6 @@ export declare function createApplicationRuntimeSlices<State extends Application
596
598
  getUnauthenticatedClient: () => import("../../../client/contract.js").UnauthenticatedPhoenixApiClient;
597
599
  };
598
600
  integration: {
599
- selectAdminIntegrationService: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").AdminIntegrationService>;
600
601
  selectIntegrationState: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, IntegrationState>;
601
602
  selectEmbeddedView: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").EmbeddedView>;
602
603
  selectPresetEmbeddedState: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").PresetEmbeddedView | null>;
@@ -761,6 +762,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
761
762
  selectElementSlots: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, {
762
763
  entityElements: Record<string, (props: import("#package/domain").CustomPhoenixEntityElementProps) => JSX.Element>;
763
764
  layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
765
+ assistantFormElements: Record<string, import("react").ComponentType<never>>;
764
766
  hashes: Record<string, string>;
765
767
  }>;
766
768
  selectDataConfig: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").DataSpec | null>;
@@ -804,6 +806,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
804
806
  getElementSlots: () => {
805
807
  entityElements: Record<string, (props: import("#package/domain").CustomPhoenixEntityElementProps) => JSX.Element>;
806
808
  layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
809
+ assistantFormElements: Record<string, import("react").ComponentType<never>>;
807
810
  hashes: Record<string, string>;
808
811
  };
809
812
  getDataConfig: () => import("#package/domain").DataSpec | null;
@@ -1264,7 +1267,6 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
1264
1267
  getUnauthenticatedClient: () => import("../../../client/contract.js").UnauthenticatedPhoenixApiClient;
1265
1268
  };
1266
1269
  integration: {
1267
- selectAdminIntegrationService: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").AdminIntegrationService>;
1268
1270
  selectIntegrationState: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, IntegrationState>;
1269
1271
  selectEmbeddedView: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").EmbeddedView>;
1270
1272
  selectPresetEmbeddedState: import("@salsita-ai/common/utils").Selector<import("../index.js").IntegrationSelectorState, import("../index.js").PresetEmbeddedView | null>;
@@ -1 +1 @@
1
- import{BehaviorSubject as e}from"rxjs";import{memoOnce as t}from"@salsita-ai/common/utils";import{createDomainRuntimeSlices as i,resolveIsDev as n}from"#package/domain";import{initializeAnalyticsService as o}from"../common-services/analytics/analytics-service.js";import{initializeI18n as s,initializeLogger as r}from"../common-services/initialize.js";import{createCommonServicesSelectors as a}from"../common-services/selectors.js";import{createDomainApplicationContextSelectors as c}from"../domain-application-context/index.js";import{createIntegrationActions as m,createIntegrationSelectors as l,initializeIntegration as p}from"../integration/index.js";import{createRoutingActions as u,createRoutingSelectors as d,initializeRouting as g}from"../routing/index.js";import{SessionService as S,createSessionRuntimeActions as v,createSessionRuntimeSelectors as x,initializeSessionRuntime as f}from"../session/index.js";import{registerGodModeGlobal as C}from"./god-mode.js";export function createApplicationRuntimeSlices(e){let{config:y,bootConfig:A,getSubject:b,getConfiguratorExtensions:j}=e,w=n(y),R=r(y,w),I={analyticsService:o(y,R,w),i18n:s(y),logger:R},{initialize:E,selectors:h,actions:z}=i({config:y,services:I,getSubject:b,getExtensionSystems:e=>J[e].getInitializableSystems()}),D=E(),T=m({setIntegration:e=>{let t=b(),i=e(t.value.integration);t.next({...t.value,integration:i})}}),L=l({getState:()=>b().value}),O=p({actions:T}),U=u({setRouting:e=>{let t=b(),i=e(t.value.routing);t.next({...t.value,routing:i})}}),k=d({getState:()=>b().value,actions:U,accessActions:z.access,loadedDataActions:z.loadedData,domainServicesSelectors:h.domainServices,overridesSelectors:h.overrides}),G=g(),$=a({getState:()=>b().value,environmentSelectors:h.environment,specSelectors:h.spec,accessSelectors:h.access,domainServicesSelectors:h.domainServices,webComponentOptions:A.webComponentOptions,webComponentApi:A.webComponentApi,getSessionService:()=>H(),routingSelectors:k}),q=v({setSessionRuntime:e=>{let t=b(),i=e(t.value.session);t.next({...t.value,session:i})}}),B=x({getState:()=>b().value,sessionContextSelectors:h.sessionContext}),F=f(),H=t(()=>new S({getLogger:()=>h.domainServices.getLogger(),getAnalyticsService:()=>h.domainServices.getAnalyticsService(),getUnauthenticatedClient:$.getUnauthenticatedClient,environmentSelectors:h.environment,sessionActions:q,setSessionContext:z.sessionContext.setSessionContext,sessionSelectors:B,specSelectors:h.spec})),J={configurator:c({applicationType:"configurator",commonServicesSelectors:$,domainServicesSelectors:h.domainServices,domainContextSelectors:h.domainContext.configurator,getApplicationRuntimeExtensions:j}),admin:c({applicationType:"admin",commonServicesSelectors:$,domainServicesSelectors:h.domainServices,domainContextSelectors:h.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})};return C({environmentActions:z.environment}),R.info(`Configurator Application loaded with deployment ID: ${y.deploymentId}!`),R.appendToGlobalContext({deploymentId:y.deploymentId}),{getState:()=>b().value,initialize:()=>({...D,integration:O,routing:G,session:F}),selectors:{...h,commonServices:$,integration:L,routing:k,session:B,domainApplicationContext:J},actions:{...z,integration:T,routing:U,session:q}}}export function createApplicationRuntime(t,i,n){return((t,i,n)=>{let o=null,s=null,r=()=>{if(!o)throw Error("Subject not yet initialized!");return o},{initialize:a,...c}=createApplicationRuntimeSlices({config:t,bootConfig:i,getSubject:r,getConfiguratorExtensions:()=>s});return s=n?n(c):[],c.selectors.domainApplicationContext.configurator.getSystems(),o=new e(a()),{...c,getState:()=>r().value,subscribe:e=>{let t=r().subscribe(()=>e());return()=>t.unsubscribe()}}})(t,i,n)}
1
+ import{BehaviorSubject as e}from"rxjs";import{memoOnce as t}from"@salsita-ai/common/utils";import{ImplementationErrors as i,createDomainRuntimeSlices as n,findAssistantFormElementErrors as o,resolveIsDev as s}from"#package/domain";import{initializeAnalyticsService as r}from"../common-services/analytics/analytics-service.js";import{initializeI18n as a,initializeLogger as c}from"../common-services/initialize.js";import{createCommonServicesSelectors as l}from"../common-services/selectors.js";import{createDomainApplicationContextSelectors as m}from"../domain-application-context/index.js";import{createIntegrationActions as p,createIntegrationSelectors as u,initializeIntegration as g}from"../integration/index.js";import{createRoutingActions as d,createRoutingSelectors as S,initializeRouting as v}from"../routing/index.js";import{SessionService as x,createSessionRuntimeActions as f,createSessionRuntimeSelectors as C,initializeSessionRuntime as y}from"../session/index.js";export function createApplicationRuntimeSlices(e){let{config:A,bootConfig:b,getSubject:w,getConfiguratorExtensions:j}=e,R=s(A),h=c(A,R),E={analyticsService:r(A,h,R),i18n:a(A),logger:h},{initialize:I,selectors:z,actions:D}=n({config:A,services:E,getSubject:w,getExtensionSystems:e=>P[e].getInitializableSystems()}),T=I(),{assistant:L,elements:O}=T.spec.configurator,U=o(L?.formElements??[],O);if(U.length>0)throw new i(U);let k=p({setIntegration:e=>{let t=w(),i=e(t.value.integration);t.next({...t.value,integration:i})}}),G=u({getState:()=>w().value,actions:k}),$=g(),q=d({setRouting:e=>{let t=w(),i=e(t.value.routing);t.next({...t.value,routing:i})}}),B=S({getState:()=>w().value,actions:q,accessActions:D.access,loadedDataActions:D.loadedData,domainServicesSelectors:z.domainServices,overridesSelectors:z.overrides}),F=v(),H=l({getState:()=>w().value,environmentSelectors:z.environment,specSelectors:z.spec,accessSelectors:z.access,domainServicesSelectors:z.domainServices,webComponentOptions:b.webComponentOptions,webComponentApi:b.webComponentApi,getSessionService:()=>N(),routingSelectors:B}),J=f({setSessionRuntime:e=>{let t=w(),i=e(t.value.session);t.next({...t.value,session:i})}}),K=C({getState:()=>w().value,sessionContextSelectors:z.sessionContext}),M=y(),N=t(()=>new x({getLogger:()=>z.domainServices.getLogger(),getAnalyticsService:()=>z.domainServices.getAnalyticsService(),getUnauthenticatedClient:H.getUnauthenticatedClient,environmentSelectors:z.environment,sessionActions:J,setSessionContext:D.sessionContext.setSessionContext,sessionSelectors:K,specSelectors:z.spec})),P={configurator:m({applicationType:"configurator",commonServicesSelectors:H,domainServicesSelectors:z.domainServices,domainContextSelectors:z.domainContext.configurator,getApplicationRuntimeExtensions:j}),admin:m({applicationType:"admin",commonServicesSelectors:H,domainServicesSelectors:z.domainServices,domainContextSelectors:z.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})};return h.info(`Configurator Application loaded with deployment ID: ${A.deploymentId}!`),h.appendToGlobalContext({deploymentId:A.deploymentId}),{getState:()=>w().value,initialize:()=>({...T,integration:$,routing:F,session:M}),selectors:{...z,commonServices:H,integration:G,routing:B,session:K,domainApplicationContext:P},actions:{...D,integration:k,routing:q,session:J}}}export function createApplicationRuntime(t,i,n){return((t,i,n)=>{let o=null,s=null,r=()=>{if(!o)throw Error("Subject not yet initialized!");return o},{initialize:a,...c}=createApplicationRuntimeSlices({config:t,bootConfig:i,getSubject:r,getConfiguratorExtensions:()=>s});return s=n?n(c):[],c.selectors.domainApplicationContext.configurator.getSystems(),o=new e(a()),{...c,getState:()=>r().value,subscribe:e=>{let t=r().subscribe(()=>e());return()=>t.unsubscribe()}}})(t,i,n)}
@@ -13,6 +13,9 @@ export { useComposition, type UseComposition } from './system-hooks/composition-
13
13
  export { useUndoRedo, type UseUndoRedo, type UseUndoRedoResult } from './system-hooks/undo-redo-hooks.js';
14
14
  export { useTabNavigation, type TabEntry, type TabSource, type UseTabNavigation, type UseTabNavigationOptions, type UseTabNavigationResult, } from './system-hooks/tab-navigation-hooks.js';
15
15
  export { useStepNavigation, type NavigationStepEntry, type StepStatus, type UseStepNavigation, type UseStepNavigationResult, } from './system-hooks/step-navigation-hooks.js';
16
+ export { useLocaleSwitch, type UseLocaleSwitch, type UseLocaleSwitchResult, type LocaleOption, } from './system-hooks/locale-switch-hooks.js';
17
+ export { useGenerateShareLink, type GenerateShareLinkOptions } from './system-hooks/generate-share-link-hooks.js';
18
+ export { useShareLinks, type UseShareLinks, type UseShareLinksOptions, type UseShareLinksResult, } from './system-hooks/share-links-hooks.js';
16
19
  export { useHoveredDomainEntityId, useHoveredEntity, useHoveredEntityId, type UseHoveredDomainEntityId, type UseHoveredEntity, type UseHoveredEntityId, } from './system-hooks/hover-hooks.js';
17
20
  export { type UseRootEntityState, useRootEntityState, useRootEntityRenderedState, } from './entity-hooks/use-root-entity-state.js';
18
21
  export { type UseRootEntityId, useRootEntityId, useRootEntityRenderedId } from './entity-hooks/use-root-entity-id.js';
@@ -1 +1 @@
1
- export{useDomain}from"./common-hooks/use-domain-context.js";export{useStoreSelector,useRenderedSelector,useRenderedSelector$,useStoreSelector$}from"./common-hooks/use-store-selector.js";export{useEagerObservableSelector,usePatientObservableSelector,usePatientObservableValue,useEagerObservableValue}from"./common-hooks/use-observable-selector.js";export{useStateValidity,useMapViolationHints,useControlViolations,useFinalizeViolations}from"./common-hooks/use-state-validity.js";export{useConfiguratorMessages}from"./common-hooks/use-configurator-messages.js";export{useComponent,useRenderedComponent,useComponents,useDynamicComponents,useRenderedComponents,useRootComponents,useRootRenderedComponents,useFirstComponent,useFirstRenderedComponent,useFirstRootComponent,useFirstRootRenderedComponent}from"./component-hooks/use-component.js";export{useCommittedState,useCommittedSlice,useRenderedSlice,useRenderedState}from"./common-hooks/use-slices.js";export{useDomainEntityState,useDomainEntityRenderedState}from"./entity-hooks/use-domain-entity-state.js";export{useEntityPrice,useRootEntityPrice}from"./entity-hooks/use-entity-price.js";export{useSelectEntity,useSelectedEntity,useSelectedEntityId,useSelectedDomainEntityId,useDeselect,useSelectParent}from"./system-hooks/selection-hooks.js";export{useActiveNavigationState,useActiveViewState,useSetViewState,useActiveToolState,useIsFullscreenActive,useSetFullscreen,useActiveViewports,useDraggedDomainEntityId,useNavigate,usePushNavigate,usePopNavigate}from"./system-hooks/navigation-hooks.js";export{useComposition}from"./system-hooks/composition-hooks.js";export{useUndoRedo}from"./system-hooks/undo-redo-hooks.js";export{useTabNavigation}from"./system-hooks/tab-navigation-hooks.js";export{useStepNavigation}from"./system-hooks/step-navigation-hooks.js";export{useHoveredDomainEntityId,useHoveredEntity,useHoveredEntityId}from"./system-hooks/hover-hooks.js";export{useRootEntityState,useRootEntityRenderedState}from"./entity-hooks/use-root-entity-state.js";export{useRootEntityId,useRootEntityRenderedId}from"./entity-hooks/use-root-entity-id.js";export{useEntitySelector,useRootEntitySelector,useRenderedEntitySelector,useRenderedRootEntitySelector}from"./common-hooks/use-entity-selector.js";export{useDimensionState,useDimensions,useDimensionConfig}from"./system-hooks/dimension-hooks.js";
1
+ export{useDomain}from"./common-hooks/use-domain-context.js";export{useStoreSelector,useRenderedSelector,useRenderedSelector$,useStoreSelector$}from"./common-hooks/use-store-selector.js";export{useEagerObservableSelector,usePatientObservableSelector,usePatientObservableValue,useEagerObservableValue}from"./common-hooks/use-observable-selector.js";export{useStateValidity,useMapViolationHints,useControlViolations,useFinalizeViolations}from"./common-hooks/use-state-validity.js";export{useConfiguratorMessages}from"./common-hooks/use-configurator-messages.js";export{useComponent,useRenderedComponent,useComponents,useDynamicComponents,useRenderedComponents,useRootComponents,useRootRenderedComponents,useFirstComponent,useFirstRenderedComponent,useFirstRootComponent,useFirstRootRenderedComponent}from"./component-hooks/use-component.js";export{useCommittedState,useCommittedSlice,useRenderedSlice,useRenderedState}from"./common-hooks/use-slices.js";export{useDomainEntityState,useDomainEntityRenderedState}from"./entity-hooks/use-domain-entity-state.js";export{useEntityPrice,useRootEntityPrice}from"./entity-hooks/use-entity-price.js";export{useSelectEntity,useSelectedEntity,useSelectedEntityId,useSelectedDomainEntityId,useDeselect,useSelectParent}from"./system-hooks/selection-hooks.js";export{useActiveNavigationState,useActiveViewState,useSetViewState,useActiveToolState,useIsFullscreenActive,useSetFullscreen,useActiveViewports,useDraggedDomainEntityId,useNavigate,usePushNavigate,usePopNavigate}from"./system-hooks/navigation-hooks.js";export{useComposition}from"./system-hooks/composition-hooks.js";export{useUndoRedo}from"./system-hooks/undo-redo-hooks.js";export{useTabNavigation}from"./system-hooks/tab-navigation-hooks.js";export{useStepNavigation}from"./system-hooks/step-navigation-hooks.js";export{useLocaleSwitch}from"./system-hooks/locale-switch-hooks.js";export{useGenerateShareLink}from"./system-hooks/generate-share-link-hooks.js";export{useShareLinks}from"./system-hooks/share-links-hooks.js";export{useHoveredDomainEntityId,useHoveredEntity,useHoveredEntityId}from"./system-hooks/hover-hooks.js";export{useRootEntityState,useRootEntityRenderedState}from"./entity-hooks/use-root-entity-state.js";export{useRootEntityId,useRootEntityRenderedId}from"./entity-hooks/use-root-entity-id.js";export{useEntitySelector,useRootEntitySelector,useRenderedEntitySelector,useRenderedRootEntitySelector}from"./common-hooks/use-entity-selector.js";export{useDimensionState,useDimensions,useDimensionConfig}from"./system-hooks/dimension-hooks.js";
@@ -0,0 +1,8 @@
1
+ import type { AccessLevel } from '@salsita-ai/contracts/api';
2
+ export interface GenerateShareLinkOptions {
3
+ access: AccessLevel;
4
+ expiration?: number;
5
+ }
6
+ export declare const useGenerateShareLink: () => (options: GenerateShareLinkOptions) => Promise<{
7
+ readonly link: string;
8
+ }>;
@@ -0,0 +1 @@
1
+ import{useCallback as e}from"react";import{match as r}from"ts-pattern";import{applicationConfigComponent as t}from"#package/domain";import{useAuthorizedClient as a,useConfigurationId as o,useDomainApplication as i}from"../../application-runtime/index.js";import{useFirstRootComponent as n}from"../component-hooks/index.js";export const useGenerateShareLink=()=>{let s=n(t),m=s?.state.shareStrategy??"deployment-registered",{configurationPersistSystem:c}=i(),d=o(),p=a();return e(async e=>{let t=r(m).with("deployment-registered",()=>void 0).with("current-frontend",()=>{let e=new URL(window.location.href);return e.searchParams.delete("cid"),e.searchParams.delete("ca"),e.toString()}).exhaustive(),a=await c.save();return p.generateShareLink(d,"rr"===e.access?a:void 0,e.expiration,e.access,t)},[m,c,p,d])};
@@ -0,0 +1,24 @@
1
+ /** A language the configurator offers, with its name in that language. */
2
+ export interface LocaleOption {
3
+ readonly locale: string;
4
+ readonly displayName: string;
5
+ }
6
+ /**
7
+ * What a project layout needs to offer a language switch.
8
+ * - `locales`: the spec's `applicationConfig.availableLocales` (`['en']` without it), each with its own name.
9
+ * - `locale`: the active locale.
10
+ * - `setLocale`: activates a locale, falling back to a supported one as `useLinguiActivate` does.
11
+ * - `available`: whether there is more than one locale to choose from, the built-in rule for showing the switch.
12
+ */
13
+ export interface UseLocaleSwitchResult {
14
+ readonly locales: readonly LocaleOption[];
15
+ readonly locale: string;
16
+ readonly setLocale: (locale: string) => void;
17
+ readonly available: boolean;
18
+ }
19
+ export type UseLocaleSwitch = () => UseLocaleSwitchResult;
20
+ /**
21
+ * Hook to list the languages the configurator offers and switch between them, as the built-in toolbar's language
22
+ * button and the menu's language action do. It re-renders when the language changes.
23
+ */
24
+ export declare const useLocaleSwitch: UseLocaleSwitch;
@@ -0,0 +1 @@
1
+ import{useLingui as e}from"@lingui/react";import{useMemo as a}from"react";import{applicationConfigComponent as o}from"#package/domain";import{useLinguiActivate as l}from"../../localizable/index.js";import{useFirstRootComponent as t}from"../component-hooks/index.js";export const useLocaleSwitch=()=>{let{i18n:r}=e(),i=t(o),m=l(),n=i?.state.availableLocales,c=a(()=>(n??["en"]).map(e=>{let a=new Intl.DisplayNames([e],{type:"language",fallback:"code"});return{locale:e,displayName:a.of(e)??e}}),[n]),p=r.locale;return a(()=>({locales:c,locale:p,setLocale:e=>{m(e)},available:c.length>1}),[c,p,m])};
@@ -0,0 +1,32 @@
1
+ export interface UseShareLinksOptions {
2
+ /** Whether the links are generated; `true` by default. A layout passes whether its share dialog is open. */
3
+ readonly enabled?: boolean;
4
+ }
5
+ /**
6
+ * What a project layout needs to share the configuration.
7
+ * - `available`: whether sharing is offered, that is `applicationConfig.shareDisabled` is not set and at least one
8
+ * kind of link is enabled; the built-in share button renders nothing otherwise.
9
+ * - `ownerLinkAvailable` and `readLinkAvailable`: whether each kind of link is enabled
10
+ * (`applicationConfig.shareOwnerLinkDisabled`, `applicationConfig.shareReadRevisionLinkDisabled`).
11
+ * - `ownerLink`: a link that opens the configuration for editing, or `null` while it loads, is disabled or the
12
+ * hook is not `enabled`.
13
+ * - `readLink`: a link that opens the current revision of the configuration for viewing, `null` in the same cases.
14
+ * The configuration is saved before the link is generated; while the hook is enabled, each commit of the
15
+ * configuration generates a new link, and `readLink` is `null` again until it arrives.
16
+ * - `isLoading`: whether an enabled link is still being generated.
17
+ */
18
+ export interface UseShareLinksResult {
19
+ readonly available: boolean;
20
+ readonly ownerLinkAvailable: boolean;
21
+ readonly readLinkAvailable: boolean;
22
+ readonly ownerLink: string | null;
23
+ readonly readLink: string | null;
24
+ readonly isLoading: boolean;
25
+ }
26
+ export type UseShareLinks = (options?: UseShareLinksOptions) => UseShareLinksResult;
27
+ /**
28
+ * Hook to generate the links that share the configuration, as the built-in share dialog does. The links expire
29
+ * after `applicationConfig.shareExpiration` hours, or never without it. Generating a link saves the configuration,
30
+ * so a layout enables the hook only while its share dialog is open. It does not check read mode.
31
+ */
32
+ export declare const useShareLinks: UseShareLinks;
@@ -0,0 +1 @@
1
+ import{useQuery as e}from"@tanstack/react-query";import{useMemo as t}from"react";import{applicationConfigComponent as i}from"#package/domain";import{useConfigurationId as r}from"../../application-runtime/index.js";import{useStoreSelector as a}from"../common-hooks/index.js";import{useFirstRootComponent as n}from"../component-hooks/index.js";import{useGenerateShareLink as s}from"./generate-share-link-hooks.js";export const useShareLinks=(o={})=>{let{enabled:l=!0}=o,d=n(i),m=s(),c=r(),h=d?.state.shareExpiration,k=d?.state.shareDisabled??!1,p=!k&&!d?.state.shareOwnerLinkDisabled,u=!k&&!d?.state.shareReadRevisionLinkDisabled,y=l&&u,f=a(e=>({entities:e.state.entities,rootEntityId:e.state.rootEntityId}),[],y),b=e({queryKey:["share-owner-link",c],staleTime:1/0,queryFn:()=>m({access:"o",expiration:h}),enabled:l&&p}),q=e({queryKey:y?["share-revision-link",c,f.entities,f.rootEntityId]:["share-revision-link",c,"disabled"],queryFn:()=>m({access:"rr",expiration:h}),enabled:y}),x=l&&p&&b.data?.link||null,F=y&&q.isFetchedAfterMount&&q.data?.link||null,g=l&&p&&b.isLoading||y&&q.isFetching&&!q.isFetchedAfterMount;return t(()=>({available:p||u,ownerLinkAvailable:p,readLinkAvailable:u,ownerLink:x,readLink:F,isLoading:g}),[p,u,x,F,g])};
@@ -1 +1 @@
1
- import{useCallback as o}from"react";import{FrontendAnalyticsFactory as n,useAnalyticsService as e}from"../../application-runtime/index.js";import{useDomain as d,useEagerObservableValue as t}from"../common-hooks/index.js";export const useUndoRedo=()=>{let r=e(),{undoSystem:i}=d(),{canUndo:c,canRedo:m}=t(i.can$);return{canUndo:c,canRedo:m,undo:o(()=>{i.canUndo()&&(r.push(n.UndoButtonClicked()),i.undo())},[r,i]),redo:o(()=>{i.canRedo()&&(r.push(n.RedoButtonClicked()),i.redo())},[r,i])}};
1
+ import{useCallback as o,useMemo as n}from"react";import{FrontendAnalyticsFactory as e,useAnalyticsService as t}from"../../application-runtime/index.js";import{useDomain as d,useEagerObservableValue as r}from"../common-hooks/index.js";export const useUndoRedo=()=>{let i=t(),{undoSystem:c}=d(),{canUndo:m,canRedo:p}=r(c.can$),u=o(()=>{c.canUndo()&&(i.push(e.UndoButtonClicked()),c.undo())},[i,c]),s=o(()=>{c.canRedo()&&(i.push(e.RedoButtonClicked()),c.redo())},[i,c]);return n(()=>({canUndo:m,canRedo:p,undo:u,redo:s}),[m,p,u,s])};
@@ -10,5 +10,6 @@ export * from './localizable/index.js';
10
10
  export * from './loading-state/index.js';
11
11
  export * from './responsive-state/index.js';
12
12
  export * from './elements/index.js';
13
+ export * from './scene-control-elements/index.js';
13
14
  export * from './handlers/index.js';
14
15
  export * from './application-runtime/index.js';
@@ -1 +1 @@
1
- export*from"./theme/index.js";export*from"./utils/index.js";export*from"./session/index.js";export*from"./domain-context/index.js";export*from"./domain-application-context/index.js";export*from"./domain-controls/index.js";export*from"./invalid-deployment/index.js";export*from"./web-component/index.js";export*from"./localizable/index.js";export*from"./loading-state/index.js";export*from"./responsive-state/index.js";export*from"./elements/index.js";export*from"./handlers/index.js";export*from"./application-runtime/index.js";
1
+ export*from"./theme/index.js";export*from"./utils/index.js";export*from"./session/index.js";export*from"./domain-context/index.js";export*from"./domain-application-context/index.js";export*from"./domain-controls/index.js";export*from"./invalid-deployment/index.js";export*from"./web-component/index.js";export*from"./localizable/index.js";export*from"./loading-state/index.js";export*from"./responsive-state/index.js";export*from"./elements/index.js";export*from"./scene-control-elements/index.js";export*from"./handlers/index.js";export*from"./application-runtime/index.js";
@@ -0,0 +1,36 @@
1
+ import type { Localizable } from '@salsita-ai/common/utils';
2
+ import type { DomainEntityId } from '#package/domain';
3
+ import type { SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
4
+ /**
5
+ * The name of the entity element that renders a `sceneEntityAddFab`. Its default, the built-in
6
+ * add-entity FAB, is registered in `defaultConfiguratorElements`.
7
+ */
8
+ export declare const AddEntityFabName = "AddEntityFab";
9
+ /**
10
+ * Props of the `AddEntityFab` element, rendered for each `sceneEntityAddFab` of an entity, at the
11
+ * position the component sets. The recipes it can add are not computed up front: the built-in FAB
12
+ * reads them with `useGroupedRecipeOptions(entityId, instanceNames, fixableViolations)` when it
13
+ * opens its menu, and a replacement does the same.
14
+ */
15
+ export interface AddEntityFabElementProps {
16
+ /** The entity the FAB adds children to. */
17
+ readonly entityId: DomainEntityId<string>;
18
+ /** The `childEntityRecipes` instances whose recipes the FAB offers; all of them when not set. */
19
+ readonly instanceNames?: readonly string[];
20
+ /** Violations a new entity may cause without disabling its recipe (the component's `hiddenViolations`). */
21
+ readonly fixableViolations?: readonly string[];
22
+ /** The name of a Phoenix icon. */
23
+ readonly icon?: string;
24
+ /** A visible text label. */
25
+ readonly label?: Localizable;
26
+ /** The tooltip text. */
27
+ readonly title?: Localizable;
28
+ /** When the tooltip shows: `on-hover` unless the component sets it. */
29
+ readonly tooltipVisibility: SceneControlTooltipVisibility;
30
+ /** Add the only recipe directly, without a menu. */
31
+ readonly skipMenuWhenOnlyOne?: boolean;
32
+ /** Render nothing when there is no recipe. */
33
+ readonly hideWhenNone?: boolean;
34
+ }
35
+ /** Renders the `AddEntityFab` element for an entity. */
36
+ export declare const AddEntityFabElement: import("react").MemoExoticComponent<(props: AddEntityFabElementProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as e,useMemo as n}from"react";import{PhoenixEntityElementWithChildren as r}from"../elements/index.js";export const AddEntityFabName="AddEntityFab";export const AddEntityFabElement=e(e=>{let{entityId:d,instanceNames:i,fixableViolations:m,icon:o,label:a,title:s,tooltipVisibility:p,skipMenuWhenOnlyOne:x,hideWhenNone:y}=e,E=n(()=>({instanceNames:i,fixableViolations:m,icon:o,label:a,title:s,tooltipVisibility:p,skipMenuWhenOnlyOne:x,hideWhenNone:y}),[i,m,o,a,s,p,x,y]);return t(r,{kind:"AddEntityFab",entityId:d,elementProps:E})});
@@ -0,0 +1,44 @@
1
+ import { type SyntheticEvent } from 'react';
2
+ import type { Localizable } from '@salsita-ai/common/utils';
3
+ import type { DomainEntityId } from '#package/domain';
4
+ import type { SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
5
+ /**
6
+ * The name of the entity element that renders a `sceneEntityDeleteFab`. Its default, the built-in
7
+ * delete-entity FAB, is registered in `defaultConfiguratorElements`.
8
+ */
9
+ export declare const DeleteEntityFabName = "DeleteEntityFab";
10
+ /**
11
+ * Props of the `DeleteEntityFab` element, rendered for each `sceneEntityDeleteFab` of an entity, at
12
+ * the position the component sets.
13
+ */
14
+ export interface DeleteEntityFabElementProps {
15
+ /** The entity the FAB deletes. */
16
+ readonly entityId: DomainEntityId<string>;
17
+ /** The name of a Phoenix icon. */
18
+ readonly icon?: string;
19
+ /** A visible text label. */
20
+ readonly label?: Localizable;
21
+ /** The tooltip text. */
22
+ readonly title?: Localizable;
23
+ /** When the tooltip shows: `on-hover` unless the component sets it. */
24
+ readonly tooltipVisibility: SceneControlTooltipVisibility;
25
+ /**
26
+ * Deletes the entity and pushes the delete analytics event. Pass it straight to `onClick`: given
27
+ * an event, it stops the event's propagation so the click does not reach the scene.
28
+ */
29
+ readonly onDelete: (event?: SyntheticEvent) => void;
30
+ /** True when deleting would cause a violation the component does not allow. */
31
+ readonly disabled: boolean;
32
+ /** Why deleting is disabled, when it is. */
33
+ readonly disabledHint: string | undefined;
34
+ /** Logs the dry run of the deletion to the console, for debugging. */
35
+ readonly trace: () => void;
36
+ }
37
+ type DeleteEntityFabElementConfig = Omit<DeleteEntityFabElementProps, 'onDelete' | 'disabled' | 'disabledHint' | 'trace'>;
38
+ interface Props extends DeleteEntityFabElementConfig {
39
+ /** Violations deleting may cause without disabling the FAB (the component's `hiddenViolations`). */
40
+ readonly fixableViolations?: readonly string[];
41
+ }
42
+ /** Renders the `DeleteEntityFab` element for an entity, with the deletion it performs. */
43
+ export declare const DeleteEntityFabElement: import("react").MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
44
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as e,useCallback as i,useMemo as o}from"react";import{FrontendAnalyticsFactory as n}from"../application-runtime/index.js";import{useDeletedEntity as r}from"../domain-controls/index.js";import{PhoenixEntityElementWithChildren as m}from"../elements/index.js";export const DeleteEntityFabName="DeleteEntityFab";export const DeleteEntityFabElement=e(e=>{let{entityId:a,fixableViolations:s,icon:l,label:p,title:d,tooltipVisibility:c}=e,x=i(()=>n.EntityDeleteHotspotClicked(a),[a]),{disabled:y,hints:E,remove:b,trace:f}=r(a,s,x),j=i(t=>{t?.stopPropagation(),b()},[b]),D=o(()=>({icon:l,label:p,title:d,tooltipVisibility:c,onDelete:j,disabled:y,disabledHint:E,trace:f}),[l,p,d,c,j,y,E,f]);return t(m,{kind:"DeleteEntityFab",entityId:a,elementProps:D})});
@@ -0,0 +1,38 @@
1
+ import { type SyntheticEvent } from 'react';
2
+ import type { Localizable } from '@salsita-ai/common/utils';
3
+ import type { DomainEntityId } from '#package/domain';
4
+ import type { SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
5
+ /**
6
+ * The name of the entity element that renders a `sceneEntityNavigationHotspot`. Its default, the
7
+ * built-in navigation hotspot, is registered in `defaultConfiguratorElements`.
8
+ */
9
+ export declare const NavigationHotspotName = "NavigationHotspot";
10
+ /**
11
+ * Props of the `NavigationHotspot` element, rendered for each `sceneEntityNavigationHotspot` of an
12
+ * entity, at the position the component sets.
13
+ */
14
+ export interface NavigationHotspotElementProps {
15
+ /** The entity the hotspot is attached to. */
16
+ readonly entityId: DomainEntityId<string>;
17
+ /** The navigation state the hotspot goes to. */
18
+ readonly navigationState: string;
19
+ /** The tooltip text. */
20
+ readonly title?: Localizable;
21
+ /** When the tooltip shows: `on-hover` unless the component sets it. */
22
+ readonly tooltipVisibility: SceneControlTooltipVisibility;
23
+ /**
24
+ * Goes to `navigationState`, pushed onto the navigation stack or replacing the current state as
25
+ * the component sets. Pass it straight to `onClick`: given an event, it prevents the event's
26
+ * default and stops its propagation so the click does not reach the scene.
27
+ */
28
+ readonly onNavigate: (event?: SyntheticEvent) => void;
29
+ }
30
+ interface Props extends Omit<NavigationHotspotElementProps, 'onNavigate'> {
31
+ /** Push `navigationState` onto the navigation stack instead of replacing the current state. */
32
+ readonly pushToStack?: boolean;
33
+ /** The states `navigationState` can be stacked onto. */
34
+ readonly canStackOnto?: readonly string[];
35
+ }
36
+ /** Renders the `NavigationHotspot` element for an entity, with the navigation it performs. */
37
+ export declare const NavigationHotspotElement: import("react").MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
38
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as e,useCallback as o,useMemo as a}from"react";import{useDomain as i}from"../domain-context/index.js";import{PhoenixEntityElementWithChildren as n}from"../elements/index.js";export const NavigationHotspotName="NavigationHotspot";export const NavigationHotspotElement=e(e=>{let{entityId:s,navigationState:m,pushToStack:r,canStackOnto:p,title:g,tooltipVisibility:d}=e,{navigationSystem:l,storeSystem:v}=i(),c=o(t=>{t?.preventDefault(),t?.stopPropagation();let e=r?l.getPushNavigationUpdate(m,v.stateSlices.committed.value.state,{canStackOnto:p}):l.getNavigationUpdate(m);v.stageAndCommit([e])},[l,m,r,v,p]);return t(n,{kind:"NavigationHotspot",entityId:s,elementProps:a(()=>({navigationState:m,title:g,tooltipVisibility:d,onNavigate:c}),[m,g,d,c])})});
@@ -0,0 +1,30 @@
1
+ import { type SyntheticEvent } from 'react';
2
+ import type { Localizable } from '@salsita-ai/common/utils';
3
+ import type { DomainEntityId } from '#package/domain';
4
+ import type { SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
5
+ /**
6
+ * The name of the entity element that renders a `sceneEntitySelectHotspot`. Its default, the
7
+ * built-in selection hotspot, is registered in `defaultConfiguratorElements`.
8
+ */
9
+ export declare const SelectionHotspotName = "SelectionHotspot";
10
+ /**
11
+ * Props of the `SelectionHotspot` element, rendered for each `sceneEntitySelectHotspot` of an
12
+ * entity, at the position the component sets.
13
+ */
14
+ export interface SelectionHotspotElementProps {
15
+ /** The entity the hotspot selects. */
16
+ readonly entityId: DomainEntityId<string>;
17
+ /** The tooltip text. */
18
+ readonly title?: Localizable;
19
+ /** When the tooltip shows: `on-hover` unless the component sets it. */
20
+ readonly tooltipVisibility: SceneControlTooltipVisibility;
21
+ /**
22
+ * Selects the entity and pushes the selection-hotspot analytics event. Pass it straight to
23
+ * `onClick`: given an event, it stops the event's propagation so the click does not reach the scene.
24
+ */
25
+ readonly onSelect: (event?: SyntheticEvent) => void;
26
+ }
27
+ type Props = Omit<SelectionHotspotElementProps, 'onSelect'>;
28
+ /** Renders the `SelectionHotspot` element for an entity, with the selection it performs. */
29
+ export declare const SelectionHotspotElement: import("react").MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
30
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as o,useCallback as e,useMemo as i}from"react";import{FrontendAnalyticsFactory as n}from"../application-runtime/index.js";import{useSelectEntity as r}from"../domain-context/index.js";import{PhoenixEntityElementWithChildren as m}from"../elements/index.js";export const SelectionHotspotName="SelectionHotspot";export const SelectionHotspotElement=o(o=>{let{entityId:p,title:s,tooltipVisibility:c}=o,l=r(n.SelectionHotspotClicked),a=e(t=>{t?.stopPropagation(),l(p)},[p,l]);return t(m,{kind:"SelectionHotspot",entityId:p,elementProps:i(()=>({title:s,tooltipVisibility:c,onSelect:a}),[s,c,a])})});
@@ -0,0 +1,30 @@
1
+ import type { Localizable } from '@salsita-ai/common/utils';
2
+ import type { DomainEntityId, ToolMenuFabOption } from '#package/domain';
3
+ import type { SceneControlTooltipVisibility } from './scene-control-tooltip-visibility.js';
4
+ /**
5
+ * The name of the entity element that renders a `toolMenuFab`. Its default, the built-in tool-menu
6
+ * FAB, is registered in `defaultConfiguratorElements`.
7
+ */
8
+ export declare const ToolMenuFabName = "ToolMenuFab";
9
+ /**
10
+ * Props of the `ToolMenuFab` element, rendered for each `toolMenuFab` of an entity, at the position
11
+ * the component sets.
12
+ */
13
+ export interface ToolMenuFabElementProps {
14
+ /** The entity the FAB is attached to. */
15
+ readonly entityId: DomainEntityId<string>;
16
+ /** The tools the menu offers, each with its `label`, optional `icon` and `toolState`. */
17
+ readonly options: readonly ToolMenuFabOption[];
18
+ /** The name of a Phoenix icon; the built-in FAB shows `PencilSimpleBold` when it is not set. */
19
+ readonly icon?: string;
20
+ /** The tooltip text, which the built-in menu also shows as its heading. */
21
+ readonly title?: Localizable;
22
+ /** When the tooltip shows: `on-hover` unless the component sets it. */
23
+ readonly tooltipVisibility: SceneControlTooltipVisibility;
24
+ /** Switches to the given tool state, the `toolState` of one of the `options`. */
25
+ readonly onSelectTool: (toolState: string) => void;
26
+ }
27
+ type Props = Omit<ToolMenuFabElementProps, 'onSelectTool'>;
28
+ /** Renders the `ToolMenuFab` element for an entity, with the tool switch it performs. */
29
+ export declare const ToolMenuFabElement: import("react").MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>;
30
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{memo as o,useCallback as t,useMemo as n}from"react";import{useDomain as m}from"../domain-context/index.js";import{PhoenixEntityElementWithChildren as r}from"../elements/index.js";export const ToolMenuFabName="ToolMenuFab";export const ToolMenuFabElement=o(o=>{let{entityId:a,options:i,icon:s,title:l,tooltipVisibility:p}=o,{navigationSystem:d,storeSystem:x}=m(),u=t(e=>{x.stageAndCommit([d.getToolUpdate(e)])},[d,x]);return e(r,{kind:"ToolMenuFab",entityId:a,elementProps:n(()=>({options:i,icon:s,title:l,tooltipVisibility:p,onSelectTool:u}),[i,s,l,p,u])})});
@@ -0,0 +1,9 @@
1
+ import { type PhoenixEntityElementRegistration } from '#package/domain';
2
+ import { type AddEntityFabElementProps } from './AddEntityFabElement.js';
3
+ /**
4
+ * Registers a project's add-entity FAB as the `AddEntityFab` 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 createAddEntityFab: (Element: (props: AddEntityFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
9
+ export type CreateAddEntityFab = (Element: (props: AddEntityFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
@@ -0,0 +1 @@
1
+ import{createCustomPhoenixEntityElement as t}from"#package/domain";import{AddEntityFabName as o}from"./AddEntityFabElement.js";export const createAddEntityFab=a=>t(o,a);
@@ -0,0 +1,9 @@
1
+ import { type PhoenixEntityElementRegistration } from '#package/domain';
2
+ import { type DeleteEntityFabElementProps } from './DeleteEntityFabElement.js';
3
+ /**
4
+ * Registers a project's delete-entity FAB as the `DeleteEntityFab` entity element, with its props
5
+ * typed. Registering an entity element under that name with `createCustomPhoenixEntityElement`
6
+ * works too, but its component is then typed as taking only `entityId` and `children`.
7
+ */
8
+ export declare const createDeleteEntityFab: (Element: (props: DeleteEntityFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
9
+ export type CreateDeleteEntityFab = (Element: (props: DeleteEntityFabElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
@@ -0,0 +1 @@
1
+ import{createCustomPhoenixEntityElement as e}from"#package/domain";import{DeleteEntityFabName as t}from"./DeleteEntityFabElement.js";export const createDeleteEntityFab=o=>e(t,o);
@@ -0,0 +1,10 @@
1
+ import { type PhoenixEntityElementRegistration } from '#package/domain';
2
+ import { type NavigationHotspotElementProps } from './NavigationHotspotElement.js';
3
+ /**
4
+ * Registers a project's navigation hotspot as the `NavigationHotspot` entity element, with its
5
+ * props typed. Registering an entity element under that name with
6
+ * `createCustomPhoenixEntityElement` works too, but its component is then typed as taking only
7
+ * `entityId` and `children`.
8
+ */
9
+ export declare const createNavigationHotspot: (Element: (props: NavigationHotspotElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
10
+ export type CreateNavigationHotspot = (Element: (props: NavigationHotspotElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
@@ -0,0 +1 @@
1
+ import{createCustomPhoenixEntityElement as o}from"#package/domain";import{NavigationHotspotName as t}from"./NavigationHotspotElement.js";export const createNavigationHotspot=a=>o(t,a);
@@ -0,0 +1,9 @@
1
+ import { type PhoenixEntityElementRegistration } from '#package/domain';
2
+ import { type SelectionHotspotElementProps } from './SelectionHotspotElement.js';
3
+ /**
4
+ * Registers a project's selection hotspot as the `SelectionHotspot` entity element, with its props
5
+ * typed. Registering an entity element under that name with `createCustomPhoenixEntityElement`
6
+ * works too, but its component is then typed as taking only `entityId` and `children`.
7
+ */
8
+ export declare const createSelectionHotspot: (Element: (props: SelectionHotspotElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
9
+ export type CreateSelectionHotspot = (Element: (props: SelectionHotspotElementProps) => JSX.Element | null) => PhoenixEntityElementRegistration;
@@ -0,0 +1 @@
1
+ import{createCustomPhoenixEntityElement as o}from"#package/domain";import{SelectionHotspotName as t}from"./SelectionHotspotElement.js";export const createSelectionHotspot=e=>o(t,e);
@@ -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';