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

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 (558) hide show
  1. package/dist/application/index.d.ts +1 -0
  2. package/dist/application/index.js +1 -1
  3. package/dist/application/mount-application.d.ts +1 -1
  4. package/dist/application/mount-application.js +1 -1
  5. package/dist/application/mount-configurator.d.ts +19 -0
  6. package/dist/application/mount-configurator.js +1 -0
  7. package/dist/application/mounted-application-runtime.d.ts +4 -0
  8. package/dist/application/mounted-application-runtime.js +1 -0
  9. package/dist/application/register-web-component.d.ts +2 -0
  10. package/dist/application/register-web-component.js +1 -0
  11. package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
  12. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  13. package/dist/application-spec/errors/diagnostic-messages.d.ts +10 -1
  14. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  15. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  16. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  17. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  18. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  19. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  20. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  21. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  22. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  23. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  24. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
  25. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  26. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  27. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -6
  28. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  29. package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
  30. package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
  31. package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
  32. package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
  33. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
  34. package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
  35. package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
  36. package/dist/application-spec/generate-application/implementations/phx.js +1 -0
  37. package/dist/application-spec/generate-application/index.d.ts +2 -0
  38. package/dist/application-spec/generate-application/index.js +1 -1
  39. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +3 -3
  40. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -4
  41. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  42. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
  43. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  44. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +17 -4
  45. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  46. package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
  47. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
  48. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +3 -3
  49. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -5
  50. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  51. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
  52. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  53. package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
  54. package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
  55. package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
  56. package/dist/application-spec/generate-application/runtime/index.js +1 -0
  57. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +9 -3
  58. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  59. package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
  60. package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
  61. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +3 -2
  62. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +44 -9
  63. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -1
  64. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
  65. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  66. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  67. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  68. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  69. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  70. package/dist/client/authorized-client.d.ts +3 -1
  71. package/dist/client/authorized-client.js +1 -1
  72. package/dist/client/contract.d.ts +17 -0
  73. package/dist/client/index.d.ts +1 -1
  74. package/dist/client/local-authorized-client.d.ts +3 -1
  75. package/dist/client/local-authorized-client.js +1 -1
  76. package/dist/client/memory-authorized-client.d.ts +4 -1
  77. package/dist/client/memory-authorized-client.js +1 -1
  78. package/dist/client/phoenix-api.d.ts +228 -0
  79. package/dist/configurator/ConfiguratorApp.js +1 -1
  80. package/dist/configurator/app-loader-content/index.d.ts +0 -1
  81. package/dist/configurator/app-loader-content/index.js +1 -1
  82. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  83. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +17 -3
  84. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  85. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +34 -7
  86. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  87. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  88. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  89. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  90. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  91. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  92. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  93. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
  94. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  95. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +51 -4
  96. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  97. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  98. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  99. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  100. package/dist/configurator/common/configurator-interface.d.ts +40 -6
  101. package/dist/configurator/common/configurator-interface.js +1 -1
  102. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
  103. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
  104. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +0 -6
  105. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -1
  106. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -2
  107. package/dist/configurator/configuration-not-found-page/index.js +1 -1
  108. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +3 -3
  109. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -1
  110. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  111. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
  112. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
  113. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +3 -3
  114. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -1
  115. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +0 -5
  116. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -1
  117. package/dist/configurator/configurator-error-page/index.d.ts +1 -2
  118. package/dist/configurator/configurator-error-page/index.js +1 -1
  119. package/dist/configurator/index.d.ts +9 -2
  120. package/dist/configurator/index.js +1 -1
  121. package/dist/configurator/pages/default-configurator-elements.d.ts +3 -2
  122. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  123. package/dist/configurator/pages/default-elements/index.d.ts +1 -0
  124. package/dist/configurator/pages/default-elements/index.js +1 -1
  125. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  126. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  127. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  128. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  129. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  130. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  131. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  132. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  133. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  134. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  135. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  136. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  137. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  138. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  139. package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
  140. package/dist/configurator/scene/index.d.ts +1 -0
  141. package/dist/configurator/scene/index.js +1 -1
  142. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  143. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  144. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  145. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  146. package/dist/configurator/toolbar-actions/index.d.ts +1 -0
  147. package/dist/configurator/toolbar-actions/index.js +1 -1
  148. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  149. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  150. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  151. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  152. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  153. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  154. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  155. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  156. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  157. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  158. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  159. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  160. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  161. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  162. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  163. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
  164. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  165. package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
  166. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  167. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  168. package/dist/configurator/ui/assistant/form/index.js +1 -1
  169. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
  170. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  171. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  172. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  173. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  174. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  175. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  176. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  177. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  178. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  179. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
  180. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  181. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  182. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  183. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  184. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  185. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  186. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  187. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  188. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  189. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
  190. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  191. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  192. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
  193. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
  194. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  195. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  196. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  197. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
  198. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  199. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  200. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  201. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
  202. package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
  203. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  204. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  205. package/dist/configurator/ui/assistant/index.js +1 -1
  206. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  207. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  208. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
  209. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
  210. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  211. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  212. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  213. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  214. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +22 -0
  215. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  216. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  217. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  218. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
  219. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  220. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  221. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  222. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  223. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  224. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  225. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  226. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  227. package/dist/configurator/ui/index.d.ts +1 -0
  228. package/dist/configurator/ui/index.js +1 -1
  229. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  230. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
  231. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -2
  232. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
  233. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  234. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +0 -2
  235. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  236. package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
  237. package/dist/configurator/ui/preset-layout/index.js +1 -1
  238. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  239. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  240. package/dist/docs/fabs/basic.mdx +4 -0
  241. package/dist/docs/index.json +95 -1
  242. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  243. package/dist/docs/layouts/custom-layout.mdx +320 -158
  244. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  245. package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
  246. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  247. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  248. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  249. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
  250. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  251. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
  252. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  253. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  254. package/dist/docs/phoenix/configurator-interface.mdx +72 -14
  255. package/dist/docs/phoenix/sdk-builder-workflow.mdx +5 -3
  256. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  257. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  258. package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
  259. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
  260. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  261. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  262. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  263. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  264. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  265. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  266. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  267. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  268. package/dist/domain/application/assistant/form/index.js +1 -0
  269. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  270. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  271. package/dist/domain/application/assistant/index.d.ts +2 -3
  272. package/dist/domain/application/assistant/index.js +1 -1
  273. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  274. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
  275. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  276. package/dist/domain/application/configurator-builder.d.ts +7 -1
  277. package/dist/domain/application/configurator-builder.js +1 -1
  278. package/dist/domain/application/index.d.ts +1 -1
  279. package/dist/domain/application/index.js +1 -1
  280. package/dist/domain/application/standard-properties.js +1 -1
  281. package/dist/domain/application/web-component-property.d.ts +3 -1
  282. package/dist/domain/application/web-component-property.js +1 -1
  283. package/dist/domain/available-system-components.d.ts +1 -1
  284. package/dist/domain/available-system-components.js +1 -1
  285. package/dist/domain/domain-builder.d.ts +9 -3
  286. package/dist/domain/domain-builder.js +1 -1
  287. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  288. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  289. package/dist/domain/domain-runtime/application.d.ts +39 -0
  290. package/dist/domain/domain-runtime/application.js +1 -0
  291. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  292. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  293. package/dist/domain/domain-runtime/domain-runtime.d.ts +44 -4
  294. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  295. package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
  296. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  297. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
  298. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
  299. package/dist/domain/domain-runtime/index.d.ts +2 -1
  300. package/dist/domain/domain-runtime/index.js +1 -1
  301. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  302. package/dist/domain/domain-runtime/spec/index.js +1 -1
  303. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  304. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
  305. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  306. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  307. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  308. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +3 -1
  309. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  310. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
  311. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
  312. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
  313. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  314. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  315. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  316. package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
  317. package/dist/domain/domain-runtime/web-component/actions.js +1 -1
  318. package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
  319. package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
  320. package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
  321. package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
  322. package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
  323. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  324. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  325. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  326. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  327. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  328. package/dist/domain/extensions/export-images/index.js +1 -0
  329. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  330. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  331. package/dist/domain/extensions/index.d.ts +1 -2
  332. package/dist/domain/extensions/index.js +1 -1
  333. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
  334. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  335. package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
  336. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  337. package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
  338. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  339. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  340. package/dist/i18n/locales/cs/messages.js +1 -1
  341. package/dist/i18n/locales/da/messages.js +1 -1
  342. package/dist/i18n/locales/de/messages.js +1 -1
  343. package/dist/i18n/locales/de-AT/messages.js +1 -1
  344. package/dist/i18n/locales/en/messages.js +1 -1
  345. package/dist/i18n/locales/en-AU/messages.js +1 -1
  346. package/dist/i18n/locales/en-GB/messages.js +1 -1
  347. package/dist/i18n/locales/es/messages.js +1 -1
  348. package/dist/i18n/locales/fr/messages.js +1 -1
  349. package/dist/i18n/locales/hu/messages.js +1 -1
  350. package/dist/i18n/locales/it/messages.js +1 -1
  351. package/dist/i18n/locales/nl/messages.js +1 -1
  352. package/dist/i18n/locales/pl/messages.js +1 -1
  353. package/dist/i18n/locales/pt/messages.js +1 -1
  354. package/dist/i18n/locales/ro/messages.js +1 -1
  355. package/dist/i18n/locales/sk/messages.js +1 -1
  356. package/dist/i18n/locales/tr/messages.js +1 -1
  357. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  358. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  359. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
  360. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  361. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  362. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  363. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  364. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +11 -5
  365. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
  366. package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
  367. package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
  368. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  369. package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
  370. package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
  371. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
  372. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
  373. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
  374. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
  375. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
  376. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
  377. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
  378. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
  379. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
  380. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
  381. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  382. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  383. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  384. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  385. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  386. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  387. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  388. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  389. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  390. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  391. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
  392. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  393. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  394. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
  395. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
  396. package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
  397. package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
  398. package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
  399. package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
  400. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
  401. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
  402. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
  403. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
  404. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
  405. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
  406. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
  407. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
  408. package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
  409. package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
  410. package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
  411. package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
  412. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
  413. package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
  414. package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
  415. package/dist/react-sdk/application-runtime/index.d.ts +3 -0
  416. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  417. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  418. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  419. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  420. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  421. package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
  422. package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
  423. package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
  424. package/dist/react-sdk/application-runtime/loading/index.js +1 -0
  425. package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
  426. package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
  427. package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
  428. package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
  429. package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
  430. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  431. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
  432. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
  433. package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
  434. package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
  435. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  436. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  437. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  438. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  439. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  440. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  441. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  442. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  443. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  444. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  445. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  446. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +313 -10
  447. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  448. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  449. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  450. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  451. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +1 -0
  452. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -1
  453. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  454. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  455. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  456. package/dist/react-sdk/domain-context/index.d.ts +1 -0
  457. package/dist/react-sdk/domain-context/index.js +1 -1
  458. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
  459. package/dist/react-sdk/elements/index.d.ts +0 -1
  460. package/dist/react-sdk/index.d.ts +2 -1
  461. package/dist/react-sdk/index.js +1 -1
  462. package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
  463. package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
  464. package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
  465. package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
  466. package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
  467. package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
  468. package/dist/react-sdk/loading-state/index.d.ts +4 -2
  469. package/dist/react-sdk/loading-state/index.js +1 -1
  470. package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
  471. package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
  472. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
  473. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
  474. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
  475. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
  476. package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
  477. package/dist/{configurator/configuration-not-found-page → react-sdk/page-elements}/create-configuration-not-found-page.d.ts +7 -1
  478. package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
  479. package/dist/{configurator/configurator-error-page → react-sdk/page-elements}/create-configurator-error-page.d.ts +6 -1
  480. package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
  481. package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
  482. package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
  483. package/dist/react-sdk/page-elements/index.d.ts +6 -0
  484. package/dist/react-sdk/page-elements/index.js +1 -0
  485. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  486. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  487. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  488. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  489. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  490. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  491. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  492. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  493. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  494. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  495. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  496. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  497. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  498. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  499. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  500. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  501. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  502. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  503. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  504. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  505. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  506. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  507. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  508. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
  509. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  510. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  511. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  512. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  513. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  514. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  515. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  516. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  517. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  518. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  519. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  520. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  521. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  522. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +2 -2
  523. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
  524. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
  525. package/dist/ui-sdk/theme/types.d.ts +5 -1
  526. package/package.json +13 -3
  527. package/schema/domain-spec.json +140 -0
  528. package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +0 -5
  529. package/dist/configurator/app-loader-content/app-loader-content-name.js +0 -1
  530. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +0 -1
  531. package/dist/configurator/configurator-error-page/create-configurator-error-page.js +0 -1
  532. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  533. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  534. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  535. package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
  536. package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
  537. package/dist/domain/extensions/client-side-image.js +0 -1
  538. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  539. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  540. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  541. package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
  542. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -37
  543. package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
  544. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
  545. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
  546. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
  547. package/dist/react-sdk/responsive-state/index.d.ts +0 -5
  548. package/dist/react-sdk/responsive-state/index.js +0 -1
  549. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
  550. package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
  551. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
  552. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
  553. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
  554. package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
  555. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/application-runtime/host-properties/types.js} +0 -0
  556. /package/dist/react-sdk/{elements/configurator-error-page-props.js → application-runtime/loading/types.js} +0 -0
  557. /package/dist/react-sdk/{responsive-state/canvas-padding.js → application-runtime/responsive/types.js} +0 -0
  558. /package/dist/react-sdk/{elements → page-elements}/configurator-error-page-props.d.ts +0 -0
@@ -8,6 +8,7 @@ Make the configurator look like the brand's own product page. A furniture shop w
8
8
  - [Read and change the product](#read-and-change-the-product)
9
9
  - [Draw the choices](#draw-the-choices)
10
10
  - [Offer fullscreen](#offer-fullscreen)
11
+ - [Undo and redo](#undo-and-redo)
11
12
  - [Show messages](#show-messages)
12
13
  - [Request a quote](#request-a-quote)
13
14
  - [Serve read mode](#serve-read-mode)
@@ -27,7 +28,7 @@ Write your own layout when the configurator has to follow a design the built-in
27
28
 
28
29
  Stay with the built-in layout when its structure fits and only its parts change. [Universal](?path=/docs/layouts-universal--docs) demonstrates that layout, and the pages of its parts describe what the spec configures: [Header](?path=/docs/layouts-header-floating--docs), [Sidebar](?path=/docs/layouts-sidebar-general--docs), [Sidebar Footer](?path=/docs/layouts-sidebar-footer-basic--docs), [Toolbar](?path=/docs/layouts-toolbar--docs) and [View Controls](?path=/docs/layouts-view-controls--docs).
29
30
 
30
- A project layout replaces all of that. None of the built-in sidebar, footer, toolbar or property pages is rendered for it, so the layout builds every control the user needs. This example uses no SDK component that draws UI: only the scene, the safe-area hook and hooks that read and change the product's state. A layout may also mount the SDK's own pieces where it wants them, see [Configurator Interface → Loaded Configuration UI](?path=/docs/phoenix-configurator-interface--docs#loaded-configuration-ui).
31
+ A project layout replaces all of that. None of the built-in sidebar, footer, toolbar or property pages is rendered for it, so the layout builds every control the user needs. This example uses no SDK component that draws UI: only the scene and the `phx.frontend` hooks that measure the free area, read and change the product's state and record analytics. A layout may also mount the SDK's own pieces where it wants them, see [Configurator Interface → Loaded Configuration UI](?path=/docs/phoenix-configurator-interface--docs#loaded-configuration-ui).
31
32
 
32
33
  ## Register the layout
33
34
 
@@ -37,8 +38,7 @@ Create `src/elements/ConfiguratorLayout.tsx` with a default export made by `phx.
37
38
  import { Box } from '@mui/material'
38
39
  import { useState } from 'react'
39
40
 
40
- import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
41
- import { useActiveViewports } from '@salsita-ai/sdk/react'
41
+ import { LayoutSlots } from '@salsita-ai/sdk/configurator'
42
42
 
43
43
  import { phx } from '../../.phoenix/phx.js'
44
44
  import { BottomSheet } from '../_shared/BottomSheet.js'
@@ -46,6 +46,7 @@ import { FullscreenToggle } from '../_shared/FullscreenToggle.js'
46
46
  import { MessageToast } from '../_shared/MessageToast.js'
47
47
  import { ProductPanel } from '../_shared/ProductPanel.js'
48
48
  import { SceneControls } from '../_shared/SceneControls.js'
49
+ import { UndoRedo } from '../_shared/UndoRedo.js'
49
50
 
50
51
  const GUTTER = 24
51
52
  const PANEL_WIDTH = 380
@@ -53,10 +54,10 @@ const PHONE_GUTTER = 16
53
54
  const TOUCH_TARGET = 44
54
55
 
55
56
  const ConfiguratorLayout = () => {
56
- const { containerRef, safeAreaRef } = useSceneSafeArea()
57
+ const { containerRef, safeAreaRef } = phx.frontend.useSceneSafeArea()
57
58
  const isFullscreen = phx.frontend.useIsFullscreenActive()
58
59
  // `null` until the container has been measured; the layout shows only the scene until then
59
- const viewports = useActiveViewports()
60
+ const viewports = phx.frontend.useActiveViewports()
60
61
  const [isSheetOpen, setSheetOpen] = useState(false)
61
62
 
62
63
  const isDesktop = viewports?.includes('desktop') ?? false
@@ -115,8 +116,16 @@ const ConfiguratorLayout = () => {
115
116
  >
116
117
  <Box
117
118
  component="div"
118
- sx={{ position: 'absolute', insetBlockStart: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
119
+ sx={{
120
+ position: 'absolute',
121
+ insetBlockStart: gutter,
122
+ insetInlineEnd: gutter,
123
+ display: 'flex',
124
+ gap: 1,
125
+ pointerEvents: 'auto',
126
+ }}
119
127
  >
128
+ {!isFullscreen && <UndoRedo />}
120
129
  <FullscreenToggle compact={!isDesktop} />
121
130
  </Box>
122
131
  <Box
@@ -124,11 +133,11 @@ const ConfiguratorLayout = () => {
124
133
  sx={{
125
134
  position: 'absolute',
126
135
  pointerEvents: 'auto',
127
- // Desktop: bottom left, above the row of view controls. Phone: at the top beside the fullscreen button,
128
- // clear of the sheet's handle and the view controls.
136
+ // Desktop: bottom left, above the row of view controls. Phone: at the top below the row of undo, redo and
137
+ // fullscreen, clear of the sheet's handle and the view controls.
129
138
  ...(isDesktop
130
139
  ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
131
- : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
140
+ : { insetBlockStart: gutter + TOUCH_TARGET + gutter / 2, insetInline: gutter }),
132
141
  }}
133
142
  >
134
143
  <MessageToast />
@@ -166,11 +175,11 @@ The components it uses live in `src/_shared/`, which Phoenix does not import by
166
175
  - **Position the root and cover the page.** `LayoutSlots.SharedCanvas` is absolutely positioned and fills its nearest positioned ancestor. The root here is `position: absolute; inset: 0`.
167
176
  - **Mount the shared canvas.** It renders the scene, and the app loader stays on screen until the scene has loaded. A layout without a canvas is not held by the loader: it leaves once the configuration is up.
168
177
  - **Put the UI above the canvas.** The canvas is opaque. Content that is positioned and comes after it in the markup is painted above it; unpositioned content is painted under it and cannot be seen.
169
- - **Tell the camera where the free area is.** `useSceneSafeArea()` returns two refs. `containerRef` goes on the element that covers the whole canvas, `safeAreaRef` on the region the product should stay visible in, here everything right of the panel, or above the sheet on a phone. The camera then frames the product in that region. The hook measures again whenever either of the two elements resizes; for a change no resize reports, such as a `transform` on an ancestor settling at the end of an animation, it also returns `update` to call. Without the two refs the product is centred in the whole canvas and sits against the panel.
178
+ - **Tell the camera where the free area is.** `phx.frontend.useSceneSafeArea()` returns two refs. `containerRef` goes on the element that covers the whole canvas, `safeAreaRef` on the region the product should stay visible in, here everything right of the panel, or above the sheet on a phone. The camera then frames the product in that region. The hook measures again whenever either of the two elements resizes; for a change no resize reports, such as a `transform` on an ancestor settling at the end of an animation, it also returns `update` to call. Without the two refs the product is centred in the whole canvas and sits against the panel.
170
179
  - **Let the pointer through.** The safe-area element lies over the canvas, so it sets `pointerEvents: 'none'`; otherwise the scene cannot be orbited. The fullscreen button inside it switches pointer events back on.
171
180
  - **Honour fullscreen.** Fullscreen is a flag in the product's state, not a browser feature. The layout reads it with `phx.frontend.useIsFullscreenActive()`, removes the panel or the sheet and lets the safe area cover the canvas, so the camera frames the product in the whole canvas.
172
- - **Fit the width it is given.** The configurator can be embedded in a narrow column or opened on a phone. The layout reads the container's width class with `useActiveViewports()` and renders a desktop or a phone arrangement, see [Fit a phone](#fit-a-phone).
173
- - **Serve read mode.** The same element renders a configuration shared for viewing, and the layout decides what a viewer sees.
181
+ - **Fit the width it is given.** The configurator can be embedded in a narrow column or opened on a phone. The layout reads the container's width class with `phx.frontend.useActiveViewports()` and renders a desktop or a phone arrangement, see [Fit a phone](#fit-a-phone).
182
+ - **Serve read mode.** The same element renders a configuration shared for viewing, or one the host page opens read-only, and the layout decides what a viewer sees; see [Serve read mode](#serve-read-mode).
174
183
 
175
184
  ## Read and change the product
176
185
 
@@ -179,8 +188,7 @@ The panel reads everything it shows from hooks and writes the customer's choice
179
188
  ```tsx
180
189
  import { Box, Button, Typography } from '@mui/material'
181
190
 
182
- import { detailComponent, finalizeActionComponent } from '@salsita-ai/sdk/domain'
183
- import { PhoenixHandlerBoundary, useResolveLocalizable } from '@salsita-ai/sdk/react'
191
+ import { detailComponent } from '@salsita-ai/sdk/domain'
184
192
 
185
193
  import { phx } from '../../.phoenix/phx.js'
186
194
  import { EdgeFinishCards } from './EdgeFinishCards.js'
@@ -196,7 +204,7 @@ interface ProductPanelProps {
196
204
  }
197
205
 
198
206
  export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPanelProps) => {
199
- const resolve = useResolveLocalizable()
207
+ const resolve = phx.frontend.useResolveLocalizable()
200
208
  const detail = phx.frontend.useFirstRootComponent(detailComponent)
201
209
  const price = phx.frontend.useRootEntityPrice()
202
210
  const tableId = phx.frontend.useRootEntityId()
@@ -206,12 +214,9 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
206
214
  const pushNavigate = phx.frontend.usePushNavigate()
207
215
  const popNavigate = phx.frontend.usePopNavigate()
208
216
  const navigate = phx.frontend.useNavigate()
209
- const finalizeActions = phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] }) ?? []
210
217
 
211
218
  const isReadMode = accessInfo.viewMode
212
219
  const isReview = isReadMode || navigationState !== 'configure'
213
- // The spec's primary finalize action, or its first one
214
- const quoteAction = finalizeActions.find(action => action.state.variant === 'primary') ?? finalizeActions[0]
215
220
  const chosenEdge = edgeFinish.options.find(option => option.value === edgeFinish.value)
216
221
 
217
222
  return (
@@ -289,19 +294,7 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
289
294
  <Typography variant="body2" color="text.secondary">
290
295
  Your table is ready for a quote. A real shop collects the contact details here.
291
296
  </Typography>
292
- {quoteAction ? (
293
- <PhoenixHandlerBoundary name={quoteAction.state.handler}>
294
- <ReviewActions
295
- handler={quoteAction.state.handler}
296
- label={resolve(quoteAction.state.label)}
297
- onBack={popNavigate}
298
- />
299
- </PhoenixHandlerBoundary>
300
- ) : (
301
- <Button size="large" variant="outlined" onClick={popNavigate} sx={BUTTON_SX}>
302
- Back to the configuration
303
- </Button>
304
- )}
297
+ <ReviewActions onBack={popNavigate} />
305
298
  </>
306
299
  )}
307
300
  {!isReadMode && navigationState === 'requested' && (
@@ -320,26 +313,26 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
320
313
  }
321
314
  ```
322
315
 
323
- | Hook | What the layout uses it for |
324
- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
325
- | `phx.frontend.useFirstRootComponent(detailComponent)` | The `detail` component of the root entity: name, subtitle and description. `detailComponent` comes from `@salsita-ai/sdk/domain`; the hook returns `null` without one. |
326
- | `phx.frontend.useRootEntityId()` | The id of the table, which the control hooks take. |
327
- | `phx.frontend.useAttributeSelection(entityId, instanceName)` | The `attributeSelection` component named `edgeFinish`: the current `value` and the `options`, each with `title`, `description`, `value`, `disabled` and `onSelect`. |
328
- | `phx.frontend.useRootEntityPrice()` | The root entity's `price` component, formatted for the current locale and currency, or `null` without one. |
329
- | `phx.frontend.useAccessService()` | `accessInfo.viewMode` is `true` while a configuration shared for viewing is open, and also while the host sets the `readonly` property. |
330
- | `phx.frontend.useActiveNavigationState()` | The active navigation state; the panel shows its review step while it is `checkout`. |
331
- | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | Enter the review step and leave it again. |
332
- | `phx.frontend.useNavigate()` | Return from the confirmation to the configuration, forgetting the review step. |
333
- | `phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] })` | The spec's `finalizeAction` components; the panel offers the primary one in its review step. `finalizeActionComponent` comes from `@salsita-ai/sdk/domain`. |
334
- | `phx.frontend.useFinalizeAction(handler)` | Run the finalize action's handler, with its pending state, its error and whether finalizing is possible; see [Request a quote](#request-a-quote). |
335
- | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | Read the fullscreen flag, and set it from the layout's own button. |
336
- | `phx.frontend.useActiveViewState()` and `phx.frontend.useSetViewState()` | Read the active view state, one of the spec's `viewStates`, to mark the active view button, and make another one active; see [Control the scene](#control-the-scene). |
337
- | `phx.frontend.useResetCamera()` | Move the camera back to the framing of the active camera, undoing the customer's orbit, pan and zoom. |
338
- | `phx.frontend.useUndoRedo()` | Not used here: whether there is a change to undo or redo, and `undo` and `redo`, for a layout's own undo and redo buttons; see [Known gaps](#known-gaps). |
339
- | `useActiveViewports()` from `@salsita-ai/sdk/react` | The width classes of the configurator's container, or `null` before it is measured; the layout renders its phone arrangement unless it includes `desktop`, see [Fit a phone](#fit-a-phone). |
340
- | `phx.frontend.useConfiguratorMessages(onMessage)` | Receive violations, side-effect hints and errors one by one, with their text resolved, for the layout's own toast; see [Show messages](#show-messages). |
341
- | `useResolveLocalizable()` from `@salsita-ai/sdk/react` | Turns the localizable texts of the spec into strings in the current language. [Localization](?path=/docs/phoenix-localization--docs) describes it and `LocalizableMessage`. |
342
- | `PhoenixHandlerBoundary` from `@salsita-ai/sdk/react` | Wraps the review step's buttons, so an edited handler takes effect without a reload. |
316
+ | Hook | What the layout uses it for |
317
+ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
318
+ | `phx.frontend.useFirstRootComponent(detailComponent)` | The `detail` component of the root entity: name, subtitle and description. `detailComponent` comes from `@salsita-ai/sdk/domain`; the hook returns `null` without one. |
319
+ | `phx.frontend.useRootEntityId()` | The id of the table, which the control hooks take. |
320
+ | `phx.frontend.useAttributeSelection(entityId, instanceName)` | The `attributeSelection` component named `edgeFinish`: the current `value` and the `options`, each with `title`, `description`, `value`, `disabled` and `onSelect`. |
321
+ | `phx.frontend.useRootEntityPrice()` | The root entity's `price` component, formatted for the current locale and currency, or `null` without one. |
322
+ | `phx.frontend.useResolveLocalizable()` | Turns the localizable texts of the spec into strings in the current language. [Localization](?path=/docs/phoenix-localization--docs) describes it, `phx.frontend.useLocalizable(text)` and `LocalizableMessage`. |
323
+ | `phx.frontend.useAccessService()` | `accessInfo.viewMode` is `true` while a configuration shared for viewing is open, and also while the host sets the `readonly` property; see [Serve read mode](#serve-read-mode). |
324
+ | `phx.frontend.useActiveNavigationState()` | The active navigation state; the panel shows its review step while it is `checkout`. |
325
+ | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | Enter the review step and leave it again. |
326
+ | `phx.frontend.useNavigate()` | Return from the confirmation to the configuration, forgetting the review step. |
327
+ | `phx.frontend.useFinalizeActions()` | The spec's `finalizeAction` components with what a button needs; the review step offers the `primary` one and runs it, with its pending state, its error and whether finalizing is possible; see [Request a quote](#request-a-quote). |
328
+ | `phx.frontend.useUndoRedo()` | Whether there is a change to undo or redo, and `undo` and `redo`, for the layout's own buttons; see [Undo and redo](#undo-and-redo). |
329
+ | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | Read the fullscreen flag, and set it from the layout's own button. |
330
+ | `phx.frontend.useAnalytics()` | Record the fullscreen button's click as the built-in button does; see [Offer fullscreen](#offer-fullscreen). |
331
+ | `phx.frontend.useSceneSafeArea()` | The two refs that tell the camera which part of the canvas the panel or the sheet leaves free; see [What the layout has to do](#what-the-layout-has-to-do). |
332
+ | `phx.frontend.useActiveViewports()` | The width classes of the configurator's container, or `null` before it is measured; the layout renders its phone arrangement unless it includes `desktop`, see [Fit a phone](#fit-a-phone). |
333
+ | `phx.frontend.useActiveViewState()` and `phx.frontend.useSetViewState()` | Read the active view state, one of the spec's `viewStates`, to mark the active view button, and make another one active; see [Control the scene](#control-the-scene). |
334
+ | `phx.frontend.useResetCamera()` | Move the camera back to the framing of the active camera, undoing the customer's orbit, pan and zoom. |
335
+ | `phx.frontend.useConfiguratorMessages(onMessage)` | Receive violations, side-effect hints and errors one by one, with their text resolved, for the layout's own toast; see [Show messages](#show-messages). |
343
336
 
344
337
  Calling an option's `onSelect` is the whole write: it changes `edgeFinish` on the table, the scene morphs the edge and the price expression recalculates. The option fields are named for display: the spec's `label` arrives as `title`, its `img` as `imageSrc`.
345
338
 
@@ -353,7 +346,9 @@ The edge finish is a visual choice, so the panel shows it as cards with a drawin
353
346
  import { Box, ButtonBase, type SxProps, type Theme, Typography } from '@mui/material'
354
347
  import type { KeyboardEvent } from 'react'
355
348
 
356
- import { type UseAttributeSelection, useResolveLocalizable } from '@salsita-ai/sdk/react'
349
+ import type { UseAttributeSelection } from '@salsita-ai/sdk/react'
350
+
351
+ import { phx } from '../../.phoenix/phx.js'
357
352
 
358
353
  // Cross-sections of the tabletop's edge, keyed by the option values of the spec.
359
354
  const EDGE_PROFILES: Readonly<Record<string, string>> = {
@@ -390,7 +385,7 @@ interface EdgeFinishCardsProps {
390
385
  }
391
386
 
392
387
  export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
393
- const resolve = useResolveLocalizable()
388
+ const resolve = phx.frontend.useResolveLocalizable()
394
389
  const { options } = selection
395
390
  // The card in the tab order: the selected one, or the first enabled one. Disabled cards are never in it.
396
391
  const selectedIndex = options.findIndex(option => option.value === selection.value && !option.disabled)
@@ -486,11 +481,13 @@ The drawings are keyed by the option values of the spec. A spec can carry a pict
486
481
 
487
482
  ## Offer fullscreen
488
483
 
489
- Fullscreen is a flag in the configurator's state, not the browser's fullscreen mode. `phx.frontend.useIsFullscreenActive()` reads it and `phx.frontend.useSetFullscreen()` returns a function that sets it: `setFullscreen(true)` turns it on, `setFullscreen(false)` off. The layout's own button flips it, and the layout decides what to hide.
484
+ Fullscreen is a flag in the configurator's state, not the browser's fullscreen mode. `phx.frontend.useIsFullscreenActive()` reads it and `phx.frontend.useSetFullscreen()` returns a function that sets it: `setFullscreen(true)` turns it on, `setFullscreen(false)` off. The layout's own button flips it, and the layout decides what to hide. Before it flips the flag, the button records the click with `phx.frontend.useAnalytics().push(FrontendAnalyticsFactory.FullScreenModeToggled())`, the event the built-in fullscreen button records, so the shop's analytics count fullscreen the same way with either layout. `FrontendAnalyticsFactory` comes from `@salsita-ai/sdk/configurator`.
490
485
 
491
486
  ```tsx
492
487
  import { Button, Tooltip } from '@mui/material'
493
488
 
489
+ import { FrontendAnalyticsFactory } from '@salsita-ai/sdk/configurator'
490
+
494
491
  import { phx } from '../../.phoenix/phx.js'
495
492
 
496
493
  const ENTER_ICON = 'M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'
@@ -504,6 +501,7 @@ interface FullscreenToggleProps {
504
501
  export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) => {
505
502
  const isFullscreen = phx.frontend.useIsFullscreenActive()
506
503
  const setFullscreen = phx.frontend.useSetFullscreen()
504
+ const analytics = phx.frontend.useAnalytics()
507
505
  const label = isFullscreen ? 'Exit fullscreen' : 'Fullscreen'
508
506
  const icon = (
509
507
  <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
@@ -511,10 +509,16 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
511
509
  </svg>
512
510
  )
513
511
 
512
+ // The same event the built-in fullscreen button records, for entering and for leaving
513
+ const toggle = () => {
514
+ analytics.push(FrontendAnalyticsFactory.FullScreenModeToggled())
515
+ setFullscreen(!isFullscreen)
516
+ }
517
+
514
518
  return (
515
519
  <Tooltip title={compact ? label : ''}>
516
520
  <Button
517
- onClick={() => setFullscreen(!isFullscreen)}
521
+ onClick={toggle}
518
522
  aria-label={compact ? label : undefined}
519
523
  startIcon={compact ? undefined : icon}
520
524
  sx={{
@@ -539,9 +543,81 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
539
543
 
540
544
  The button stays in the free area in both states, so the way back is always where the user left it. [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs#full-screen-preview) describes what fullscreen hides.
541
545
 
546
+ ## Undo and redo
547
+
548
+ The customer tries the four finishes against each other, so the layout offers **Undo** and **Redo** at the top right of the free area, beside the fullscreen button. `phx.frontend.useUndoRedo()` returns `canUndo` and `canRedo`, whether the history has a change to undo or to redo, and `undo` and `redo`, which change the configuration back or forward as the built-in toolbar's buttons do and push the same analytics events:
549
+
550
+ ```tsx
551
+ import { Box, IconButton, Tooltip } from '@mui/material'
552
+
553
+ import { phx } from '../../.phoenix/phx.js'
554
+
555
+ const UNDO_ICON = 'M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11'
556
+ const REDO_ICON = 'M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 0 0 0 11H13'
557
+
558
+ interface HistoryButtonProps {
559
+ readonly label: string
560
+ readonly icon: string
561
+ readonly enabled: boolean
562
+ readonly onClick: () => void
563
+ }
564
+
565
+ const HistoryButton = ({ label, icon, enabled, onClick }: HistoryButtonProps) => (
566
+ <Tooltip title={label}>
567
+ {/* A disabled button fires no pointer events, so the span keeps the tooltip working */}
568
+ <span>
569
+ <IconButton
570
+ aria-label={label}
571
+ disabled={!enabled}
572
+ onClick={onClick}
573
+ sx={{ inlineSize: 44, blockSize: 44, color: 'text.primary' }}
574
+ >
575
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
576
+ <path d={icon} />
577
+ </svg>
578
+ </IconButton>
579
+ </span>
580
+ </Tooltip>
581
+ )
582
+
583
+ // Undo and redo for the customer's choices. They change the configuration, so they are offered only where the cards
584
+ // are: not to a viewer, and not in the review step, where the summary and a running request must not change under the
585
+ // customer. `useUndoRedo` pushes the same analytics events as the built-in toolbar's buttons.
586
+ export const UndoRedo = () => {
587
+ const { canUndo, canRedo, undo, redo } = phx.frontend.useUndoRedo()
588
+ const { accessInfo } = phx.frontend.useAccessService()
589
+ const navigationState = phx.frontend.useActiveNavigationState()
590
+
591
+ if (accessInfo.viewMode || navigationState !== 'configure') {
592
+ return null
593
+ }
594
+
595
+ return (
596
+ <Box
597
+ component="div"
598
+ role="group"
599
+ aria-label="History"
600
+ sx={{
601
+ display: 'flex',
602
+ borderRadius: 999,
603
+ bgcolor: 'background.paper',
604
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
605
+ }}
606
+ >
607
+ <HistoryButton label="Undo" icon={UNDO_ICON} enabled={canUndo} onClick={undo} />
608
+ <HistoryButton label="Redo" icon={REDO_ICON} enabled={canRedo} onClick={redo} />
609
+ </Box>
610
+ )
611
+ }
612
+ ```
613
+
614
+ - Each choice of a finish is one step of the history, whether it is made on the cards or on the button on the table's edge; undoing it moves the check mark back, changes the edge back and restores the price.
615
+ - Each button is disabled while there is nothing to undo or redo, and keeps its tooltip and accessible name. A disabled MUI button receives no pointer events, so a `span` around it carries the tooltip.
616
+ - The hook does not look at read mode or at the navigation state. The buttons change the configuration, so the component renders them only while the cards are shown: not to a viewer, not in the review step, where the summary and a running request must not change under the customer, and not in the confirmation. The layout also leaves them out in fullscreen, which gives the canvas to the product and keeps only the controls placed on it or for looking at it. The button on the table's edge stays there and still changes the finish; the history keeps that change, so **Undo** undoes it after fullscreen is left.
617
+
542
618
  ## Show messages
543
619
 
544
- When a change is rejected because it breaks an invariant, when a committed change carries a hint, when an error is thrown while a change is validated, or when saving the configuration fails and later succeeds again, the configurator has a message for the customer. `phx.frontend.useConfiguratorMessages(onMessage)` calls `onMessage` once for each, with the text already in the customer's language, and the layout shows it its own way. Here a toast shows a message for six seconds, colored by its severity, at the bottom left of the free area above the view controls on a desktop, and at its top on a phone:
620
+ When a change is rejected because it breaks an invariant, when a committed change carries a hint, when an error is thrown while a change is validated, or when saving the configuration fails and later succeeds again, the configurator has a message for the customer. `phx.frontend.useConfiguratorMessages(onMessage)` calls `onMessage` once for each, with the text already in the customer's language, and the layout shows it its own way. Here a toast shows a message for six seconds, colored by its severity, at the bottom left of the free area above the view controls on a desktop, and at its top, below the row of buttons, on a phone:
545
621
 
546
622
  ```tsx
547
623
  import { Alert } from '@mui/material'
@@ -658,7 +734,7 @@ export default phx.frontend.createPhoenixHandler('requestQuote', () => {
658
734
 
659
735
  The handler stands in for the shop's quote service: it waits a moment, as a request would, and then enters the `requested` navigation state, in which the panel thanks the customer. A handler is a hook factory, so it can use any hook, here `phx.frontend.useNavigate()`.
660
736
 
661
- The panel lists the finalize actions with `phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] })` and offers the primary one, or the first when none is primary, in its review step. It renders the review step's buttons in a component of their own inside `<PhoenixHandlerBoundary name={handler}>`, because `phx.frontend.useFinalizeAction(handler)` runs the project's handler factory: it is called once per component, never in a loop, and the boundary remounts the buttons when the handler is edited. **Back to the configuration** lives in the same component, so it can be disabled while the request is pending.
737
+ The review step offers the spec's primary finalize action, or the first one when none is primary, with `phx.frontend.useFinalizeActions()`. The hook lists the active `finalizeAction` components with what a button needs, the label and the title resolved to the customer's language, and runs their handlers itself, beside the layout, so the buttons need no handler boundary and the component may be called anywhere and as often as the layout likes. **Back to the configuration** lives in the same component, so it can be disabled while the request is pending.
662
738
 
663
739
  ```tsx
664
740
  import { Alert, Box, Button, CircularProgress, Typography } from '@mui/material'
@@ -668,39 +744,40 @@ import { phx } from '../../.phoenix/phx.js'
668
744
  const BUTTON_SX = { minBlockSize: 48, borderRadius: 999, textTransform: 'none', fontWeight: 600 } as const
669
745
 
670
746
  interface ReviewActionsProps {
671
- readonly handler: string
672
- readonly label: string
673
747
  readonly onBack: () => void
674
748
  }
675
749
 
676
- // The review step's buttons: one finalize action and the way back. `useFinalizeAction` runs the action's handler,
677
- // so this component calls it exactly once and is rendered inside a `PhoenixHandlerBoundary` for that handler.
678
- // Back is disabled while the request is pending, so the customer cannot change the configuration while it is sent.
679
- // The pending state belongs to this component: when the panel unmounts, as in fullscreen, the request goes on and
680
- // the remounted buttons are enabled again.
681
- export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) => {
682
- const { run, isPending, error, disabled, hints } = phx.frontend.useFinalizeAction(handler)
750
+ // The review step's buttons: the spec's primary finalize action and the way back. `useFinalizeActions` runs the
751
+ // action's handler beside the layout, so its pending state and error outlive this component: when the panel unmounts,
752
+ // as in fullscreen, the request goes on and the remounted buttons still show it. Back is disabled while the request
753
+ // is pending, so the customer cannot change the configuration while it is sent.
754
+ export const ReviewActions = ({ onBack }: ReviewActionsProps) => {
755
+ const { primary, hints } = phx.frontend.useFinalizeActions()
756
+ const isPending = primary?.isPending ?? false
683
757
 
684
758
  return (
685
759
  <Box component="div" sx={{ display: 'grid', gap: 2 }}>
686
- <Box component="div" sx={{ display: 'grid', gap: 1 }}>
687
- <Button
688
- size="large"
689
- variant="contained"
690
- disabled={disabled || isPending}
691
- onClick={run}
692
- startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
693
- sx={BUTTON_SX}
694
- >
695
- {isPending ? 'Sending the request…' : label}
696
- </Button>
697
- {disabled && hints && (
698
- <Typography variant="caption" color="text.secondary">
699
- {hints}
700
- </Typography>
701
- )}
702
- {error && <Alert severity="error">The request could not be sent: {error.message}</Alert>}
703
- </Box>
760
+ {primary && (
761
+ <Box component="div" sx={{ display: 'grid', gap: 1 }}>
762
+ <Button
763
+ size="large"
764
+ variant="contained"
765
+ disabled={primary.disabled || isPending}
766
+ onClick={() => void primary.run()}
767
+ title={primary.title}
768
+ startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
769
+ sx={BUTTON_SX}
770
+ >
771
+ {isPending ? 'Sending the request…' : primary.label}
772
+ </Button>
773
+ {primary.disabled && hints && (
774
+ <Typography variant="caption" color="text.secondary">
775
+ {hints}
776
+ </Typography>
777
+ )}
778
+ {primary.error && <Alert severity="error">The request could not be sent: {primary.error.message}</Alert>}
779
+ </Box>
780
+ )}
704
781
  <Button size="large" variant="outlined" disabled={isPending} onClick={onBack} sx={BUTTON_SX}>
705
782
  Back to the configuration
706
783
  </Button>
@@ -709,22 +786,30 @@ export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) =>
709
786
  }
710
787
  ```
711
788
 
712
- - `run()` records the finalize-button click for analytics and runs the handler; it does nothing while `disabled` or `isPending`.
713
- - While `isPending` the button shows a spinner and cannot be clicked again, and **Back to the configuration** is disabled, so the customer cannot change the configuration while it is sent. `isPending` and `error` belong to the mounted component: entering fullscreen unmounts the panel, the request goes on, and the panel shown after fullscreen starts with both buttons enabled. A layout that must rule that out keeps the review step mounted, or hides its fullscreen button while a request runs.
789
+ - `primary` is the first `'primary'` action, or else the first action, or `null` when the spec has none; the component then shows only **Back to the configuration**. `secondary` holds the others, which this product does not have.
790
+ - `run()` records the finalize-button click for analytics and runs the handler; it does nothing while `disabled` or `isPending`, and returns a promise that never rejects.
791
+ - While `isPending` the button shows a spinner and cannot be clicked again, and **Back to the configuration** is disabled, so the customer cannot change the configuration while it is sent. The configurator keeps `isPending` and `error` while the layout's components unmount: entering fullscreen during the request removes the panel, and the panel shown after fullscreen still shows the spinner until the handler settles.
714
792
  - `error` is what the handler rejected with. The layout shows it under the button; no snackbar is raised. It is cleared when the customer tries again.
715
793
  - `disabled` and `hints` come from the configuration's violations: while a `warning` or worse holds, or the configuration failed to save, finalizing is not possible and `hints` says why.
716
794
 
717
- The review step stays: a quote request is a commitment, so the customer sees the summary first, and a real shop collects the contact details there. A product that finalizes without a review offers the button in place of **Review and request a quote**. [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout) describes the hook, and [Finalization](?path=/docs/phoenix-finalization--docs) what a real flow does on the server.
795
+ The review step stays: a quote request is a commitment, so the customer sees the summary first, and a real shop collects the contact details there. A product that finalizes without a review offers the button in place of **Review and request a quote**. [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout) describes the hook, and `phx.frontend.useFinalizeAction(handler)`, which runs one known action inside the layout instead, and [Finalization](?path=/docs/phoenix-finalization--docs) what a real flow does on the server.
718
796
 
719
797
  ## Serve read mode
720
798
 
721
- While `accessInfo.viewMode` is `true` the panel marks the view as view only, replaces the cards with the chosen finish and shows the price without an action; the finalize action is not offered, since `useFinalizeAction` does not check read mode itself. The hooks do not hide or disable anything in read mode: what a viewer can change is decided by what the layout renders. Rotating and zooming the scene, and fullscreen, stay available, as [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs#view-only-mode) recommends. The button on the table's edge is hidden for viewers by the spec, see [Put a control on the product](#put-a-control-on-the-product).
799
+ A configuration is in read mode by one of two routes, and the layout does not need to know which:
800
+
801
+ - **A configuration shared for viewing.** The configuration is opened with `read-revision` access, as a viewer of a shared link opens it. The `read` mock template sets that access, and the **Read Mode** story below opens it.
802
+ - **The host page sets `readonly`.** The page that embeds the configurator sets the web component's `readonly` property, here on a configuration the user owns. The mock template `mocks/readonly-host.yaml`, **Host sets readonly** in the editor's **Mocks** panel, keeps `access: owner` and sets the property with `webComponentProperties: { readonly: true }`.
803
+
804
+ Both routes set `accessInfo.viewMode` to `true`, and both switch the spec's filter mode to read, so a component filtered with `$filter.modes: [owner]` is left out either way. While `viewMode` is `true` the panel marks the view as view only, replaces the cards with the chosen finish and shows the price without an action; neither the finalize action nor undo and redo are offered, since `useFinalizeActions` and `useUndoRedo` do not check read mode themselves. The hooks do not hide or disable anything in read mode: what a viewer can change is decided by what the layout renders. Rotating and zooming the scene, and fullscreen, stay available, as [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs#view-only-mode) recommends. The button on the table's edge is hidden for viewers by the spec, see [Put a control on the product](#put-a-control-on-the-product).
805
+
806
+ A viewer of a shared configuration has no way here to edit a copy of it; see **Clone to edit in read mode** in [Known gaps](#known-gaps).
722
807
 
723
808
  ## Fit a phone
724
809
 
725
810
  A panel 380 pixels wide beside the scene leaves nothing of the table on a phone. Below a desktop width the layout puts the panel into a sheet at the bottom and lets the camera frame the table in the area above it. The layout above shows both arrangements.
726
811
 
727
- **The switch.** `useActiveViewports()` from `@salsita-ai/sdk/react` returns the width classes the configurator's container satisfies. The container decides, not the window, so a configurator embedded in a narrow column of a wide page gets the phone arrangement too. The built-in layout switches on `desktop` as well.
812
+ **The switch.** `phx.frontend.useActiveViewports()` returns the width classes the configurator's container satisfies. The container decides, not the window, so a configurator embedded in a narrow column of a wide page gets the phone arrangement too. The built-in layout switches on `desktop` as well.
728
813
 
729
814
  | Value | When it is active |
730
815
  | ----------- | ---------------------------------------------------------------------------------- |
@@ -903,10 +988,10 @@ export const BottomSheet = ({ open, onOpenChange, label, children }: BottomSheet
903
988
 
904
989
  - The handle is a real button with `aria-expanded`. A tap, Enter or Space toggles the sheet, and dragging it up or down snaps the sheet to the other position when the drag is long or fast enough. `touchAction: 'none'` is set on the handle only, so the cards still scroll by touch.
905
990
  - The sheet's height comes from its content and is at most 55% of the configurator; when the content does not fit, the cards region shrinks until only the top of the cards shows and scrolls, and below that the sheet's content scrolls as a whole. On a phone with room for the header, the top of the cards and the footer, the price and the action stay in view with the sheet open; on a shorter one the customer scrolls the sheet to them, and the review step's buttons are reached the same way in both positions. A scroll on the cards that reaches their end moves the sheet on. Because the safe-area element is its neighbour in the column, the free area ends where the sheet starts without anything being measured by the layout.
906
- - While the handle is dragged the sheet follows the finger with a `transform`. `useSceneSafeArea()` does not see a transform, so the free area changes once, when the sheet snaps, and the camera refits once. A safe area that followed the finger would refit the camera on every move and reset an orbit the customer made.
991
+ - While the handle is dragged the sheet follows the finger with a `transform`. `phx.frontend.useSceneSafeArea()` does not see a transform, so the free area changes once, when the sheet snaps, and the camera refits once. A safe area that followed the finger would refit the camera on every move and reset an orbit the customer made.
907
992
  - The sheet is not a modal: no backdrop covers the scene, so the table can be orbited with one finger and zoomed with two while the sheet is open. MUI's temporary `Drawer` and `SwipeableDrawer` are modals and would block the scene; their persistent and permanent variants have no backdrop, but no drag handle with two positions either.
908
993
 
909
- **What else moves.** The toast sits at the top of the free area, so it does not cover the sheet's handle, and the fullscreen button shows only its icon, with its label as tooltip and accessible name, so the toast has room beside it. Fullscreen removes the sheet as it removes the panel on a desktop. The sheet keeps its position while fullscreen is on.
994
+ **What else moves.** The toast sits at the top of the free area, below the row of undo, redo and fullscreen buttons, so it does not cover the sheet's handle, and the fullscreen button shows only its icon, with its label as tooltip and accessible name. Fullscreen removes the sheet as it removes the panel on a desktop. The sheet keeps its position while fullscreen is on.
910
995
 
911
996
  **A camera for the phone.** The desktop camera is close enough to fill a wide free area, and on a narrow one it cuts off the ends of the table. So each camera has a filter on the viewport: the desktop camera `main` applies while `desktop` is active, and a second camera, `phone`, with a larger distance frames the whole table while `mobile` is. The filters exclude each other once the container is measured. Before that, for example when an image of the configuration is rendered, no viewport is known and a viewport filter matches, so both cameras apply and the higher priority of `main` decides:
912
997
 
@@ -1032,6 +1117,8 @@ export default phx.frontend.createCustomPhoenixEntityElement('EdgeFinishHotspot'
1032
1117
 
1033
1118
  [Html Hotspots](?path=/docs/controls-scene-html-hotspots--docs) describes the component and its other properties.
1034
1119
 
1120
+ The SDK's own controls on the product, such as `sceneEntityAddFab` and `sceneEntitySelectHotspot`, keep the SDK's look in a project layout too. Each is rendered through an entity element of its own name, so a project gives it the brand's look by registering that name, for example with `phx.frontend.createAddEntityFab`; see [Configurator Interface → In-Scene Controls](?path=/docs/phoenix-configurator-interface--docs#in-scene-controls). `htmlHotspot` is for a control the SDK has none of, like this one.
1121
+
1035
1122
  ## Control the scene
1036
1123
 
1037
1124
  The four finishes differ by a few millimetres on a table two metres long, so from the default distance the difference is hard to judge. The layout offers two views, **Whole table** and **Edge close-up**, a close and low look at a corner of the top, and a **Reset view** button that brings back the framing after the customer has orbited, panned or zoomed.
@@ -1235,7 +1322,7 @@ transformers:
1235
1322
 
1236
1323
  ## Try the example
1237
1324
 
1238
- To see read mode, open **Mocks** in the editor rail on the left and apply the **Read User** template.
1325
+ Each story names the mock template it opens with `args: { mockTemplate }`: **Example** and **Phone** open `default-user`, and **Read Mode** opens `read`. A template applied from the **Mocks** panel lasts until the story is opened again.
1239
1326
 
1240
1327
  The same layout in a frame 390 pixels wide, as on a phone. Opened on its own from the sidebar, the **Phone** story sets Storybook's viewport to 390 × 844.
1241
1328
 
@@ -1249,14 +1336,19 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
1249
1336
  - **Review and request a quote** replaces the cards with the chosen finish and offers **Request a quote**; **Back to the configuration** brings the cards back.
1250
1337
  - **Request a quote** shows a spinner and "Sending the request…" for about a second and a half, with **Back to the configuration** disabled, then "Thank you. Your quote request is on its way, and the shop replies within two working days."; **Back to the configuration** then returns to the cards.
1251
1338
  - **Fullscreen** removes the panel and the table moves to the centre of the canvas; **Exit fullscreen** brings both back.
1252
- - With the **Read User** mock the panel says **View only**, shows the chosen finish and the price, and has no button, so no quote can be requested.
1339
+ - In the **Read Mode** story the panel says **View only**, shows the chosen finish and the price, and has no button, so no quote can be requested; **Undo**, **Redo** and the button on the table's edge are not shown, and **Fullscreen**, the view buttons and **Reset view** work.
1340
+ - Applying **Host sets readonly** from the **Mocks** panel in the **Example** story shows the same read mode: **View only**, the chosen finish, no button in the panel, no **Undo**, **Redo** or button on the table's edge. Applying **Default User** brings the cards back.
1341
+ - **Undo** and **Redo** are disabled when the story opens. After choosing **Tree trunk**, **Undo** restores **Square** and $1,290.00 and enables **Redo**; **Redo** chooses **Tree trunk** again at $1,630.00.
1342
+ - **Undo** and **Redo** are not shown in the review step, in the confirmation or in fullscreen.
1343
+ - Clicking **Fullscreen** and **Exit fullscreen** each pushes the `fullscreenButton` user-action event, as an `AnalyticsService.push` line in the browser console shows: without a Google Tag Manager id, Storybook's analytics only log their events with `console.debug`, which the console shows only with its Verbose level enabled.
1344
+ - Entering fullscreen while **Request a quote** is pending and leaving it again shows the panel with the spinner still running, until the thank-you message appears.
1253
1345
  - A round button sits on the middle of the table's long edge. Clicking it opens the four finishes next to it; choosing **Round** there moves the check mark in the popover and in the panel, rounds the edge and raises the price to $1,410.00. Escape closes the popover.
1254
1346
  - Tab reaches the button on the edge, and Enter or Space opens the popover.
1255
- - The button on the edge is gone in the review step, in the confirmation and with the **Read User** mock, and stays in fullscreen.
1347
+ - The button on the edge is gone in the review step, in the confirmation and in both read routes, and stays in fullscreen.
1256
1348
  - In the **Phone** story the panel is a sheet at the bottom showing the name, the price and **Review and request a quote**, and the whole table is visible above it.
1257
1349
  - Tapping the sheet's handle, or dragging it up, opens the sheet with the cards; the table moves up once the sheet has snapped and stays fully visible. Dragging the handle down, or tapping it again, collapses the sheet.
1258
1350
  - On the phone, the review step, **Request a quote** and the thank-you message work with the sheet collapsed and open.
1259
- - On the phone, choosing **Tree trunk** shows the hint at the top of the free area, beside the fullscreen button.
1351
+ - On the phone, choosing **Tree trunk** shows the hint at the top of the free area, below the undo, redo and fullscreen buttons.
1260
1352
  - On the phone, the fullscreen button removes the sheet and the table moves to the centre of the canvas; pressing it again brings the sheet back in the position it had.
1261
1353
  - **Edge close-up** moves the camera close to the near corner of the top, where the edge profile shows; the button is drawn dark and the other light. **Whole table** returns to the whole table.
1262
1354
  - After dragging in the free area to orbit the table, **Reset view** returns to the framing of the active view, the whole table or the close-up.
@@ -1268,14 +1360,14 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
1268
1360
  A project layout has only what it renders. This one leaves out the following, each of which a product may need. [Layout Slots](?path=/docs/phoenix-layout-slots--docs) describes every `LayoutSlots` member named here.
1269
1361
 
1270
1362
  - **Messages that stay snackbars.** The toast shows violations, side effects, errors and failed saves, and the finalize button shows its own error. Two kinds of message stay snackbars. An error of a built-in action, such as one from `LayoutSlots.DesktopToolbar`, renders into `LayoutSlots.DesktopSnackbarsRoot`; this layout mounts neither, and a layout that mounts such an action mounts the root too, or the snackbar appears outside the configurator. A failure to start from a preset appears on the preset screen, before this layout mounts; a project replaces that screen with `phx.frontend.createPresetUi`, see [Configurator Interface → Preset UI](?path=/docs/phoenix-configurator-interface--docs#preset-ui).
1271
- - **Toolbar actions.** Undo and redo, measurements, sharing and language switching are not offered. A layout can mount `LayoutSlots.DesktopToolbar` for the toolbar the spec configures, or build its own buttons: `phx.frontend.useUndoRedo()`, `useMeasurements()`, `useShareLinks()` and `useLocaleSwitch()` serve single actions, pushing the same analytics events as the built-in buttons; see [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout).
1363
+ - **Toolbar actions.** Measurements, sharing and language switching are not offered; undo and redo are the layout's own buttons, see [Undo and redo](#undo-and-redo). A layout can mount `LayoutSlots.DesktopToolbar` for the toolbar the spec configures, or build its own buttons: `phx.frontend.useToolbarActions()` returns the spec's toolbar as runnable entries, and `phx.frontend.useUndoRedo()`, `useMeasurements()`, `useShareLinks()` and `useLocaleSwitch()` serve single actions, pushing the same analytics events as the built-in buttons; see [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout).
1272
1364
  - **The spec's view controls, tool controls and leaving a tool mode.** A spec can configure view controls and tool controls, and a tool mode has a button that leaves it. The built-in layout places them with `LayoutSlots.DesktopViewControls`, `LayoutSlots.DesktopToolControls` and `LayoutSlots.DesktopCallToAction`; this layout mounts none of them, so the spec's `viewControls` and `toolControls` do not appear. Its views come from its own buttons instead, see [Control the scene](#control-the-scene), and it has no tool modes.
1273
1365
  - **A project's layout dialog.** A dialog the project registers with `phx.frontend.createLayoutDialog` is shown by `LayoutDialog`, which the built-in layout mounts. This layout does not; a layout that needs the dialog mounts `LayoutDialog` from `@salsita-ai/sdk/configurator`.
1274
1366
  - **Selection.** The table has no parts to select. A product with selectable parts reads `phx.frontend.useSelectedDomainEntityId()` and shows the controls of the selected part.
1275
- - **Clone to edit in read mode.** With `shareCloneToEdit` set, the built-in layout's `LayoutSlots.DesktopReadonlyBanner` offers **Edit configuration** to a viewer; this layout's "View only" label offers nothing. A layout mounts the banner, or builds its own action with `LayoutSlots.useIsCloningAllowed()` and `LayoutSlots.CloneToEditDialog`.
1276
- - **Back and close.** The built-in header's back button returns to the product choice, runs the host's close action or leaves the expanded view, whichever applies. This layout has none of them. `useCloseAction()` from `@salsita-ai/sdk/configurator` returns the host's close action, or `null` when there is none; the hook that chooses among the three is not exported.
1277
- - **Analytics.** The finalize button records `FinalizeButtonClicked` through `useFinalizeAction`. The built-in fullscreen button records `FullScreenModeToggled`; this layout's fullscreen and other buttons record nothing. A layout that wants the events pushes `FrontendAnalyticsFactory.FullScreenModeToggled()` and the like, from `@salsita-ai/sdk/configurator`, with `phx.frontend.useAnalytics().push(...)`.
1278
- - **Preview start screen.** The built-in layout shows a preview while `usePreview().isPreview` is set, which `preview: auto` does on phones without the project opting in. This layout ignores it and always renders the interface.
1367
+ - **Clone to edit in read mode.** With `shareCloneToEdit` set, the built-in layout's `LayoutSlots.DesktopReadonlyBanner` offers **Edit configuration** to a viewer; this layout's "View only" label offers nothing. A layout mounts the banner, or builds its own action with `phx.frontend.useIsCloningAllowed()` and `LayoutSlots.CloneToEditDialog`. The example leaves it out because Storybook cannot show the result: the dialog creates and opens the copy, but the mock template keeps its `read-revision` access on every configuration it opens, so the copy opens in read mode again.
1368
+ - **Back and close.** The built-in header's back button returns to the product choice, runs the host's close action or leaves the expanded view, whichever applies. This layout has none of them. `phx.frontend.useCloseAction()` returns the host's close action, or `null` when there is none, as in this Storybook example; the hook that chooses among the three is not exported.
1369
+ - **Analytics.** The finalize button records `FinalizeButtonClicked` through `useFinalizeActions`, the cards record the attribute choice through `useAttributeSelection`, undo and redo record their events through `useUndoRedo`, and the fullscreen button records `FullScreenModeToggled` itself. The review step's navigation buttons, the view buttons, **Reset view**, the sheet's handle and the button on the table's edge record nothing. A layout that wants more events pushes them from `FrontendAnalyticsFactory`, from `@salsita-ai/sdk/configurator`, with `phx.frontend.useAnalytics().push(...)`, as [Offer fullscreen](#offer-fullscreen) does.
1370
+ - **Preview start screen.** The built-in layout shows a preview while `phx.frontend.usePreview().isPreview` is set, which `preview: auto` does on phones without the project opting in. This layout ignores it and always renders the interface.
1279
1371
  - **Assistant panel.** A project layout gets it only with `LayoutSlots.DesktopSidebar`, the built-in sidebar as one piece, see [Sidebar in a Custom Layout](?path=/docs/layouts-sidebar-in-a-custom-layout--docs); this layout does not use it.
1280
1372
  - **"Powered by Salsita" mark.** The built-in layout shows it; a project layout decides whether to mount `LayoutSlots.DesktopPoweredBy`, and this one does not.
1281
1373
 
@@ -1284,7 +1376,7 @@ A project layout has only what it renders. This one leaves out the following, ea
1284
1376
  - [Configurator Interface → Loaded Configuration UI](?path=/docs/phoenix-configurator-interface--docs#loaded-configuration-ui) is the reference for the element name, the minimal layout, the SDK pieces a layout can mount and the hooks it reads.
1285
1377
  - [Universal](?path=/docs/layouts-universal--docs) is the built-in layout this one replaces.
1286
1378
  - [Header / Custom](?path=/docs/layouts-header-custom--docs) replaces only the header, with the price from `useRootEntityPrice()`.
1287
- - [Canvas Padding](?path=/docs/layouts-canvas-padding--docs) scales the gaps `useSceneSafeArea()` measures.
1379
+ - [Canvas Padding](?path=/docs/layouts-canvas-padding--docs) scales the gaps `phx.frontend.useSceneSafeArea()` measures.
1288
1380
  - [Presets / Custom](?path=/docs/layouts-presets-custom--docs) replaces the preset screen the same way.
1289
1381
 
1290
1382
  ## Complete Implementation
@@ -1648,7 +1740,9 @@ export const BottomSheet = ({ open, onOpenChange, label, children }: BottomSheet
1648
1740
  import { Box, ButtonBase, type SxProps, type Theme, Typography } from '@mui/material'
1649
1741
  import type { KeyboardEvent } from 'react'
1650
1742
 
1651
- import { type UseAttributeSelection, useResolveLocalizable } from '@salsita-ai/sdk/react'
1743
+ import type { UseAttributeSelection } from '@salsita-ai/sdk/react'
1744
+
1745
+ import { phx } from '../../.phoenix/phx.js'
1652
1746
 
1653
1747
  // Cross-sections of the tabletop's edge, keyed by the option values of the spec.
1654
1748
  const EDGE_PROFILES: Readonly<Record<string, string>> = {
@@ -1685,7 +1779,7 @@ interface EdgeFinishCardsProps {
1685
1779
  }
1686
1780
 
1687
1781
  export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
1688
- const resolve = useResolveLocalizable()
1782
+ const resolve = phx.frontend.useResolveLocalizable()
1689
1783
  const { options } = selection
1690
1784
  // The card in the tab order: the selected one, or the first enabled one. Disabled cards are never in it.
1691
1785
  const selectedIndex = options.findIndex(option => option.value === selection.value && !option.disabled)
@@ -1782,6 +1876,8 @@ export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
1782
1876
  ```tsx
1783
1877
  import { Button, Tooltip } from '@mui/material'
1784
1878
 
1879
+ import { FrontendAnalyticsFactory } from '@salsita-ai/sdk/configurator'
1880
+
1785
1881
  import { phx } from '../../.phoenix/phx.js'
1786
1882
 
1787
1883
  const ENTER_ICON = 'M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'
@@ -1795,6 +1891,7 @@ interface FullscreenToggleProps {
1795
1891
  export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) => {
1796
1892
  const isFullscreen = phx.frontend.useIsFullscreenActive()
1797
1893
  const setFullscreen = phx.frontend.useSetFullscreen()
1894
+ const analytics = phx.frontend.useAnalytics()
1798
1895
  const label = isFullscreen ? 'Exit fullscreen' : 'Fullscreen'
1799
1896
  const icon = (
1800
1897
  <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
@@ -1802,10 +1899,16 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
1802
1899
  </svg>
1803
1900
  )
1804
1901
 
1902
+ // The same event the built-in fullscreen button records, for entering and for leaving
1903
+ const toggle = () => {
1904
+ analytics.push(FrontendAnalyticsFactory.FullScreenModeToggled())
1905
+ setFullscreen(!isFullscreen)
1906
+ }
1907
+
1805
1908
  return (
1806
1909
  <Tooltip title={compact ? label : ''}>
1807
1910
  <Button
1808
- onClick={() => setFullscreen(!isFullscreen)}
1911
+ onClick={toggle}
1809
1912
  aria-label={compact ? label : undefined}
1810
1913
  startIcon={compact ? undefined : icon}
1811
1914
  sx={{
@@ -1889,8 +1992,7 @@ export const MessageToast = () => {
1889
1992
  ```tsx
1890
1993
  import { Box, Button, Typography } from '@mui/material'
1891
1994
 
1892
- import { detailComponent, finalizeActionComponent } from '@salsita-ai/sdk/domain'
1893
- import { PhoenixHandlerBoundary, useResolveLocalizable } from '@salsita-ai/sdk/react'
1995
+ import { detailComponent } from '@salsita-ai/sdk/domain'
1894
1996
 
1895
1997
  import { phx } from '../../.phoenix/phx.js'
1896
1998
  import { EdgeFinishCards } from './EdgeFinishCards.js'
@@ -1906,7 +2008,7 @@ interface ProductPanelProps {
1906
2008
  }
1907
2009
 
1908
2010
  export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPanelProps) => {
1909
- const resolve = useResolveLocalizable()
2011
+ const resolve = phx.frontend.useResolveLocalizable()
1910
2012
  const detail = phx.frontend.useFirstRootComponent(detailComponent)
1911
2013
  const price = phx.frontend.useRootEntityPrice()
1912
2014
  const tableId = phx.frontend.useRootEntityId()
@@ -1916,12 +2018,9 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
1916
2018
  const pushNavigate = phx.frontend.usePushNavigate()
1917
2019
  const popNavigate = phx.frontend.usePopNavigate()
1918
2020
  const navigate = phx.frontend.useNavigate()
1919
- const finalizeActions = phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] }) ?? []
1920
2021
 
1921
2022
  const isReadMode = accessInfo.viewMode
1922
2023
  const isReview = isReadMode || navigationState !== 'configure'
1923
- // The spec's primary finalize action, or its first one
1924
- const quoteAction = finalizeActions.find(action => action.state.variant === 'primary') ?? finalizeActions[0]
1925
2024
  const chosenEdge = edgeFinish.options.find(option => option.value === edgeFinish.value)
1926
2025
 
1927
2026
  return (
@@ -1999,19 +2098,7 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
1999
2098
  <Typography variant="body2" color="text.secondary">
2000
2099
  Your table is ready for a quote. A real shop collects the contact details here.
2001
2100
  </Typography>
2002
- {quoteAction ? (
2003
- <PhoenixHandlerBoundary name={quoteAction.state.handler}>
2004
- <ReviewActions
2005
- handler={quoteAction.state.handler}
2006
- label={resolve(quoteAction.state.label)}
2007
- onBack={popNavigate}
2008
- />
2009
- </PhoenixHandlerBoundary>
2010
- ) : (
2011
- <Button size="large" variant="outlined" onClick={popNavigate} sx={BUTTON_SX}>
2012
- Back to the configuration
2013
- </Button>
2014
- )}
2101
+ <ReviewActions onBack={popNavigate} />
2015
2102
  </>
2016
2103
  )}
2017
2104
  {!isReadMode && navigationState === 'requested' && (
@@ -2040,39 +2127,40 @@ import { phx } from '../../.phoenix/phx.js'
2040
2127
  const BUTTON_SX = { minBlockSize: 48, borderRadius: 999, textTransform: 'none', fontWeight: 600 } as const
2041
2128
 
2042
2129
  interface ReviewActionsProps {
2043
- readonly handler: string
2044
- readonly label: string
2045
2130
  readonly onBack: () => void
2046
2131
  }
2047
2132
 
2048
- // The review step's buttons: one finalize action and the way back. `useFinalizeAction` runs the action's handler,
2049
- // so this component calls it exactly once and is rendered inside a `PhoenixHandlerBoundary` for that handler.
2050
- // Back is disabled while the request is pending, so the customer cannot change the configuration while it is sent.
2051
- // The pending state belongs to this component: when the panel unmounts, as in fullscreen, the request goes on and
2052
- // the remounted buttons are enabled again.
2053
- export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) => {
2054
- const { run, isPending, error, disabled, hints } = phx.frontend.useFinalizeAction(handler)
2133
+ // The review step's buttons: the spec's primary finalize action and the way back. `useFinalizeActions` runs the
2134
+ // action's handler beside the layout, so its pending state and error outlive this component: when the panel unmounts,
2135
+ // as in fullscreen, the request goes on and the remounted buttons still show it. Back is disabled while the request
2136
+ // is pending, so the customer cannot change the configuration while it is sent.
2137
+ export const ReviewActions = ({ onBack }: ReviewActionsProps) => {
2138
+ const { primary, hints } = phx.frontend.useFinalizeActions()
2139
+ const isPending = primary?.isPending ?? false
2055
2140
 
2056
2141
  return (
2057
2142
  <Box component="div" sx={{ display: 'grid', gap: 2 }}>
2058
- <Box component="div" sx={{ display: 'grid', gap: 1 }}>
2059
- <Button
2060
- size="large"
2061
- variant="contained"
2062
- disabled={disabled || isPending}
2063
- onClick={run}
2064
- startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
2065
- sx={BUTTON_SX}
2066
- >
2067
- {isPending ? 'Sending the request…' : label}
2068
- </Button>
2069
- {disabled && hints && (
2070
- <Typography variant="caption" color="text.secondary">
2071
- {hints}
2072
- </Typography>
2073
- )}
2074
- {error && <Alert severity="error">The request could not be sent: {error.message}</Alert>}
2075
- </Box>
2143
+ {primary && (
2144
+ <Box component="div" sx={{ display: 'grid', gap: 1 }}>
2145
+ <Button
2146
+ size="large"
2147
+ variant="contained"
2148
+ disabled={primary.disabled || isPending}
2149
+ onClick={() => void primary.run()}
2150
+ title={primary.title}
2151
+ startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
2152
+ sx={BUTTON_SX}
2153
+ >
2154
+ {isPending ? 'Sending the request…' : primary.label}
2155
+ </Button>
2156
+ {primary.disabled && hints && (
2157
+ <Typography variant="caption" color="text.secondary">
2158
+ {hints}
2159
+ </Typography>
2160
+ )}
2161
+ {primary.error && <Alert severity="error">The request could not be sent: {primary.error.message}</Alert>}
2162
+ </Box>
2163
+ )}
2076
2164
  <Button size="large" variant="outlined" disabled={isPending} onClick={onBack} sx={BUTTON_SX}>
2077
2165
  Back to the configuration
2078
2166
  </Button>
@@ -2176,14 +2264,79 @@ export const SceneControls = ({ compact = false, resetOnly = false }: SceneContr
2176
2264
  }
2177
2265
  ```
2178
2266
 
2267
+ ### ./src/\_shared/UndoRedo.tsx
2268
+
2269
+ ```tsx
2270
+ import { Box, IconButton, Tooltip } from '@mui/material'
2271
+
2272
+ import { phx } from '../../.phoenix/phx.js'
2273
+
2274
+ const UNDO_ICON = 'M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11'
2275
+ const REDO_ICON = 'M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 0 0 0 11H13'
2276
+
2277
+ interface HistoryButtonProps {
2278
+ readonly label: string
2279
+ readonly icon: string
2280
+ readonly enabled: boolean
2281
+ readonly onClick: () => void
2282
+ }
2283
+
2284
+ const HistoryButton = ({ label, icon, enabled, onClick }: HistoryButtonProps) => (
2285
+ <Tooltip title={label}>
2286
+ {/* A disabled button fires no pointer events, so the span keeps the tooltip working */}
2287
+ <span>
2288
+ <IconButton
2289
+ aria-label={label}
2290
+ disabled={!enabled}
2291
+ onClick={onClick}
2292
+ sx={{ inlineSize: 44, blockSize: 44, color: 'text.primary' }}
2293
+ >
2294
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
2295
+ <path d={icon} />
2296
+ </svg>
2297
+ </IconButton>
2298
+ </span>
2299
+ </Tooltip>
2300
+ )
2301
+
2302
+ // Undo and redo for the customer's choices. They change the configuration, so they are offered only where the cards
2303
+ // are: not to a viewer, and not in the review step, where the summary and a running request must not change under the
2304
+ // customer. `useUndoRedo` pushes the same analytics events as the built-in toolbar's buttons.
2305
+ export const UndoRedo = () => {
2306
+ const { canUndo, canRedo, undo, redo } = phx.frontend.useUndoRedo()
2307
+ const { accessInfo } = phx.frontend.useAccessService()
2308
+ const navigationState = phx.frontend.useActiveNavigationState()
2309
+
2310
+ if (accessInfo.viewMode || navigationState !== 'configure') {
2311
+ return null
2312
+ }
2313
+
2314
+ return (
2315
+ <Box
2316
+ component="div"
2317
+ role="group"
2318
+ aria-label="History"
2319
+ sx={{
2320
+ display: 'flex',
2321
+ borderRadius: 999,
2322
+ bgcolor: 'background.paper',
2323
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
2324
+ }}
2325
+ >
2326
+ <HistoryButton label="Undo" icon={UNDO_ICON} enabled={canUndo} onClick={undo} />
2327
+ <HistoryButton label="Redo" icon={REDO_ICON} enabled={canRedo} onClick={redo} />
2328
+ </Box>
2329
+ )
2330
+ }
2331
+ ```
2332
+
2179
2333
  ### ./src/elements/ConfiguratorLayout.tsx
2180
2334
 
2181
2335
  ```tsx
2182
2336
  import { Box } from '@mui/material'
2183
2337
  import { useState } from 'react'
2184
2338
 
2185
- import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
2186
- import { useActiveViewports } from '@salsita-ai/sdk/react'
2339
+ import { LayoutSlots } from '@salsita-ai/sdk/configurator'
2187
2340
 
2188
2341
  import { phx } from '../../.phoenix/phx.js'
2189
2342
  import { BottomSheet } from '../_shared/BottomSheet.js'
@@ -2191,6 +2344,7 @@ import { FullscreenToggle } from '../_shared/FullscreenToggle.js'
2191
2344
  import { MessageToast } from '../_shared/MessageToast.js'
2192
2345
  import { ProductPanel } from '../_shared/ProductPanel.js'
2193
2346
  import { SceneControls } from '../_shared/SceneControls.js'
2347
+ import { UndoRedo } from '../_shared/UndoRedo.js'
2194
2348
 
2195
2349
  const GUTTER = 24
2196
2350
  const PANEL_WIDTH = 380
@@ -2198,10 +2352,10 @@ const PHONE_GUTTER = 16
2198
2352
  const TOUCH_TARGET = 44
2199
2353
 
2200
2354
  const ConfiguratorLayout = () => {
2201
- const { containerRef, safeAreaRef } = useSceneSafeArea()
2355
+ const { containerRef, safeAreaRef } = phx.frontend.useSceneSafeArea()
2202
2356
  const isFullscreen = phx.frontend.useIsFullscreenActive()
2203
2357
  // `null` until the container has been measured; the layout shows only the scene until then
2204
- const viewports = useActiveViewports()
2358
+ const viewports = phx.frontend.useActiveViewports()
2205
2359
  const [isSheetOpen, setSheetOpen] = useState(false)
2206
2360
 
2207
2361
  const isDesktop = viewports?.includes('desktop') ?? false
@@ -2260,8 +2414,16 @@ const ConfiguratorLayout = () => {
2260
2414
  >
2261
2415
  <Box
2262
2416
  component="div"
2263
- sx={{ position: 'absolute', insetBlockStart: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
2417
+ sx={{
2418
+ position: 'absolute',
2419
+ insetBlockStart: gutter,
2420
+ insetInlineEnd: gutter,
2421
+ display: 'flex',
2422
+ gap: 1,
2423
+ pointerEvents: 'auto',
2424
+ }}
2264
2425
  >
2426
+ {!isFullscreen && <UndoRedo />}
2265
2427
  <FullscreenToggle compact={!isDesktop} />
2266
2428
  </Box>
2267
2429
  <Box
@@ -2269,11 +2431,11 @@ const ConfiguratorLayout = () => {
2269
2431
  sx={{
2270
2432
  position: 'absolute',
2271
2433
  pointerEvents: 'auto',
2272
- // Desktop: bottom left, above the row of view controls. Phone: at the top beside the fullscreen button,
2273
- // clear of the sheet's handle and the view controls.
2434
+ // Desktop: bottom left, above the row of view controls. Phone: at the top below the row of undo, redo and
2435
+ // fullscreen, clear of the sheet's handle and the view controls.
2274
2436
  ...(isDesktop
2275
2437
  ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
2276
- : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
2438
+ : { insetBlockStart: gutter + TOUCH_TARGET + gutter / 2, insetInline: gutter }),
2277
2439
  }}
2278
2440
  >
2279
2441
  <MessageToast />