@salsita-ai/sdk 0.50.0-develop.e33c8d8711 → 0.50.0-develop.e54f47e4bf

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 (952) hide show
  1. package/README.md +8 -4
  2. package/dist/admin/default-admin-elements.d.ts +9 -0
  3. package/dist/admin/default-admin-elements.js +1 -0
  4. package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
  5. package/dist/admin/default-elements/built-in-entity-element.js +1 -0
  6. package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
  7. package/dist/admin/default-elements/built-in-layout-element.js +1 -0
  8. package/dist/admin/default-elements/index.d.ts +2 -0
  9. package/dist/admin/default-elements/index.js +1 -0
  10. package/dist/admin/index.d.ts +1 -0
  11. package/dist/admin/index.js +1 -1
  12. package/dist/application/index.d.ts +1 -0
  13. package/dist/application/index.js +1 -1
  14. package/dist/application/mount-application.d.ts +1 -1
  15. package/dist/application/mount-application.js +1 -1
  16. package/dist/application/mount-configurator.d.ts +19 -0
  17. package/dist/application/mount-configurator.js +1 -0
  18. package/dist/application/mounted-application-runtime.d.ts +4 -0
  19. package/dist/application/mounted-application-runtime.js +1 -0
  20. package/dist/application/register-web-component.d.ts +2 -0
  21. package/dist/application/register-web-component.js +1 -0
  22. package/dist/application-spec/caching/content-diff.js +1 -1
  23. package/dist/application-spec/core/application-file.d.ts +0 -2
  24. package/dist/application-spec/core/application-file.js +1 -1
  25. package/dist/application-spec/errors/diagnostic-codes.d.ts +11 -0
  26. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  27. package/dist/application-spec/errors/diagnostic-messages.d.ts +12 -1
  28. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  29. package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
  30. package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
  31. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  32. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  33. package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
  34. package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
  35. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  36. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +10 -14
  37. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  38. package/dist/application-spec/generate-application/code/story-files.js +1 -1
  39. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
  40. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  41. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  42. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  43. package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
  44. package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
  45. package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
  46. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  47. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  48. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +35 -0
  49. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
  50. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
  51. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
  52. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
  53. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +6 -6
  54. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +59 -63
  55. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
  56. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  57. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
  58. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +13 -13
  59. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
  60. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
  61. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +2 -1
  62. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  63. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  64. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  65. package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -3
  66. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  67. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  68. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  69. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
  70. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +33 -0
  71. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +2 -0
  72. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  73. package/dist/application-spec/generate-application/code/templates/globals.js +24 -43
  74. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -2
  75. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  76. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  77. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  78. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  79. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  80. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  81. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
  82. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
  83. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +3 -3
  84. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  85. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
  86. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +26 -8
  87. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  88. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
  89. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
  90. package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
  91. package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
  92. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
  93. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
  94. package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
  95. package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
  96. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
  97. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
  98. package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
  99. package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
  100. package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
  101. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
  102. package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
  103. package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
  104. package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
  105. package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
  106. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
  107. package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
  108. package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
  109. package/dist/application-spec/generate-application/implementations/phx.js +1 -0
  110. package/dist/application-spec/generate-application/index.d.ts +2 -0
  111. package/dist/application-spec/generate-application/index.js +1 -1
  112. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
  113. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
  114. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +9 -5
  115. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  116. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
  117. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  118. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  119. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +29 -9
  120. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  121. package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
  122. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
  123. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +7 -5
  124. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
  125. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +9 -6
  126. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  127. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
  128. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  129. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  130. package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
  131. package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
  132. package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
  133. package/dist/application-spec/generate-application/runtime/index.js +1 -0
  134. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +2 -2
  135. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  136. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +2 -1
  137. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  138. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
  139. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
  140. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +3 -0
  141. package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
  142. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  143. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +15 -6
  144. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  145. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
  146. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  147. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
  148. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
  149. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  150. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
  151. package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
  152. package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
  153. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
  154. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
  155. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
  156. package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
  157. package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
  158. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +3 -2
  159. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +1 -0
  160. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -1
  161. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +44 -9
  162. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -1
  163. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
  164. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.js +1 -0
  165. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +18 -0
  166. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  167. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
  168. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
  169. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
  170. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  171. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  172. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  173. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +1 -0
  174. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -1
  175. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  176. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  177. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +3 -0
  178. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  179. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +3 -0
  180. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  181. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
  182. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  183. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  184. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  185. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
  186. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
  187. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +6 -2
  188. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  189. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
  190. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  191. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  192. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  193. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  194. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  195. package/dist/client/authorized-client.d.ts +3 -1
  196. package/dist/client/authorized-client.js +1 -1
  197. package/dist/client/contract.d.ts +17 -0
  198. package/dist/client/index.d.ts +1 -1
  199. package/dist/client/local-authorized-client.d.ts +3 -1
  200. package/dist/client/local-authorized-client.js +1 -1
  201. package/dist/client/memory-authorized-client.d.ts +4 -1
  202. package/dist/client/memory-authorized-client.js +1 -1
  203. package/dist/client/phoenix-api.d.ts +228 -0
  204. package/dist/configurator/ConfiguratorApp.js +1 -1
  205. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
  206. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
  207. package/dist/configurator/app-loader-content/index.d.ts +1 -0
  208. package/dist/configurator/app-loader-content/index.js +1 -0
  209. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  210. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +24 -4
  211. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  212. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +34 -7
  213. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  214. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
  215. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  216. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  217. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  218. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  219. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  220. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  221. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
  222. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
  223. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
  224. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  225. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +52 -5
  226. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  227. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  228. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  229. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  230. package/dist/configurator/common/configurator-interface.d.ts +121 -6
  231. package/dist/configurator/common/configurator-interface.js +1 -1
  232. package/dist/configurator/common/index.d.ts +2 -2
  233. package/dist/configurator/common/index.js +1 -1
  234. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
  235. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
  236. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +6 -0
  237. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
  238. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
  239. package/dist/configurator/configuration-not-found-page/index.js +1 -0
  240. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
  241. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
  242. package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
  243. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  244. package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
  245. package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
  246. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +10 -0
  247. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
  248. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
  249. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
  250. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +7 -0
  251. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
  252. package/dist/configurator/configurator-error-page/index.d.ts +2 -0
  253. package/dist/configurator/configurator-error-page/index.js +1 -0
  254. package/dist/configurator/index.d.ts +10 -0
  255. package/dist/configurator/index.js +1 -1
  256. package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
  257. package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
  258. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  259. package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
  260. package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
  261. package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
  262. package/dist/configurator/pages/DefaultPresetUi.js +1 -0
  263. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  264. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  265. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  266. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  267. package/dist/configurator/pages/RootPage.js +1 -1
  268. package/dist/configurator/pages/default-configurator-elements.d.ts +7 -1
  269. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  270. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  271. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  272. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  273. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  274. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  275. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  276. package/dist/configurator/pages/default-elements/index.d.ts +5 -0
  277. package/dist/configurator/pages/default-elements/index.js +1 -0
  278. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  279. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  280. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  281. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  282. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  283. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  284. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  285. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  286. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  287. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  288. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  289. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  290. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  291. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  292. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  293. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  294. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  295. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  296. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  297. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  298. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  299. package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
  300. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
  301. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
  302. package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
  303. package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
  304. package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
  305. package/dist/configurator/preset-screen-elements/index.js +1 -0
  306. package/dist/configurator/scene/index.d.ts +1 -0
  307. package/dist/configurator/scene/index.js +1 -1
  308. package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
  309. package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
  310. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  311. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  312. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  313. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  314. package/dist/configurator/toolbar-actions/index.d.ts +3 -0
  315. package/dist/configurator/toolbar-actions/index.js +1 -0
  316. package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
  317. package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
  318. package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
  319. package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
  320. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  321. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  322. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  323. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  324. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  325. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  326. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  327. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  328. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  329. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  330. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  331. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  332. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  333. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  334. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  335. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  336. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
  337. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  338. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
  339. package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
  340. package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
  341. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  342. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
  343. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  344. package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
  345. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  346. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  347. package/dist/configurator/ui/assistant/form/index.js +1 -1
  348. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
  349. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  350. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  351. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  352. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  353. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  354. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  355. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  356. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  357. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  358. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
  359. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  360. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  361. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  362. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  363. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  364. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  365. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  366. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  367. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  368. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
  369. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  370. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  371. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
  372. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
  373. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  374. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  375. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  376. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
  377. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  378. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  379. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  380. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
  381. package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
  382. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  383. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  384. package/dist/configurator/ui/assistant/index.js +1 -1
  385. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  386. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  387. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  388. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  389. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  390. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  391. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  392. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  393. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  394. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  395. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  396. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  397. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
  398. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
  399. package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
  400. package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
  401. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +2 -0
  402. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
  403. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
  404. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
  405. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  406. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  407. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  408. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  409. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +22 -0
  410. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  411. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  412. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  413. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
  414. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  415. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  416. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
  417. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  418. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  419. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
  420. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
  421. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  422. package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
  423. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
  424. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
  425. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  426. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  427. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  428. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +1 -1
  429. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  430. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +1 -1
  431. package/dist/configurator/ui/index.d.ts +1 -0
  432. package/dist/configurator/ui/index.js +1 -1
  433. package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
  434. package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
  435. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  436. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  437. package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
  438. package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
  439. package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
  440. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  441. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  442. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  443. package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
  444. package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
  445. package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
  446. package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
  447. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
  448. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
  449. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
  450. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
  451. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
  452. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
  453. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  454. package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
  455. package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
  456. package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
  457. package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
  458. package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
  459. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
  460. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
  461. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
  462. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
  463. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
  464. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  465. package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
  466. package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
  467. package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
  468. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  469. package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
  470. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
  471. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
  472. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
  473. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  474. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
  475. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  476. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  477. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  478. package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
  479. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
  480. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
  481. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
  482. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
  483. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
  484. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
  485. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
  486. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  487. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  488. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -2
  489. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  490. package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
  491. package/dist/configurator/ui/preset-layout/index.js +1 -1
  492. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
  493. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
  494. package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
  495. package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
  496. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  497. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  498. package/dist/docs/fabs/basic.mdx +6 -2
  499. package/dist/docs/index.json +95 -1
  500. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  501. package/dist/docs/layouts/custom-layout.mdx +637 -165
  502. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  503. package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
  504. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  505. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  506. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  507. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
  508. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  509. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
  510. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  511. package/dist/docs/other-features/error-5xx.mdx +1 -1
  512. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  513. package/dist/docs/other-features/not-found-404.mdx +1 -1
  514. package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
  515. package/dist/docs/phoenix/configurator-interface.mdx +223 -59
  516. package/dist/docs/phoenix/domain-model.mdx +2 -0
  517. package/dist/docs/phoenix/finalization.mdx +1 -1
  518. package/dist/docs/phoenix/getting-started.mdx +5 -3
  519. package/dist/docs/phoenix/layout-slots.mdx +23 -23
  520. package/dist/docs/phoenix/localization.mdx +6 -2
  521. package/dist/docs/phoenix/migration-guide.mdx +12 -10
  522. package/dist/docs/phoenix/phoenix-cli.mdx +31 -16
  523. package/dist/docs/phoenix/project-structure.mdx +52 -30
  524. package/dist/docs/phoenix/quickstart.mdx +7 -7
  525. package/dist/docs/phoenix/sdk-builder-workflow.mdx +11 -9
  526. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  527. package/dist/docs/phoenix/testing.mdx +8 -0
  528. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  529. package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
  530. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
  531. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  532. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  533. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  534. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
  535. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  536. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  537. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  538. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  539. package/dist/domain/application/assistant/form/index.js +1 -0
  540. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  541. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  542. package/dist/domain/application/assistant/index.d.ts +2 -3
  543. package/dist/domain/application/assistant/index.js +1 -1
  544. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  545. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
  546. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  547. package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
  548. package/dist/domain/application/configurator-builder.d.ts +7 -1
  549. package/dist/domain/application/configurator-builder.js +1 -1
  550. package/dist/domain/application/index.d.ts +1 -1
  551. package/dist/domain/application/index.js +1 -1
  552. package/dist/domain/application/standard-properties.js +1 -1
  553. package/dist/domain/application/web-component-property.d.ts +3 -1
  554. package/dist/domain/application/web-component-property.js +1 -1
  555. package/dist/domain/available-system-components.d.ts +1 -1
  556. package/dist/domain/available-system-components.js +1 -1
  557. package/dist/domain/domain-builder.d.ts +9 -3
  558. package/dist/domain/domain-builder.js +1 -1
  559. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  560. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  561. package/dist/domain/domain-runtime/application.d.ts +39 -0
  562. package/dist/domain/domain-runtime/application.js +1 -0
  563. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  564. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  565. package/dist/domain/domain-runtime/domain-runtime.d.ts +44 -4
  566. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  567. package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
  568. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  569. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
  570. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
  571. package/dist/domain/domain-runtime/index.d.ts +2 -1
  572. package/dist/domain/domain-runtime/index.js +1 -1
  573. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  574. package/dist/domain/domain-runtime/spec/index.js +1 -1
  575. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  576. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +27 -12
  577. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  578. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  579. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  580. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +3 -1
  581. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  582. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
  583. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
  584. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
  585. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  586. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  587. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  588. package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
  589. package/dist/domain/domain-runtime/web-component/actions.js +1 -1
  590. package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
  591. package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
  592. package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
  593. package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
  594. package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
  595. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  596. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  597. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  598. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  599. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  600. package/dist/domain/extensions/export-images/index.js +1 -0
  601. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  602. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  603. package/dist/domain/extensions/index.d.ts +1 -2
  604. package/dist/domain/extensions/index.js +1 -1
  605. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
  606. package/dist/domain/system-components/child-entity-selection.js +1 -1
  607. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  608. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  609. package/dist/editor/Editor.d.ts +7 -0
  610. package/dist/editor/Editor.js +1 -1
  611. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  612. package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
  613. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  614. package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
  615. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  616. package/dist/editor/mocks/CreateMockYaml.js +2 -2
  617. package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
  618. package/dist/editor/mocks/EditorMockContext.js +1 -1
  619. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  620. package/dist/i18n/locales/cs/messages.js +1 -1
  621. package/dist/i18n/locales/da/messages.js +1 -1
  622. package/dist/i18n/locales/de/messages.js +1 -1
  623. package/dist/i18n/locales/de-AT/messages.js +1 -1
  624. package/dist/i18n/locales/en/messages.js +1 -1
  625. package/dist/i18n/locales/en-AU/messages.js +1 -1
  626. package/dist/i18n/locales/en-GB/messages.js +1 -1
  627. package/dist/i18n/locales/es/messages.js +1 -1
  628. package/dist/i18n/locales/fr/messages.js +1 -1
  629. package/dist/i18n/locales/hu/messages.js +1 -1
  630. package/dist/i18n/locales/it/messages.js +1 -1
  631. package/dist/i18n/locales/nl/messages.js +1 -1
  632. package/dist/i18n/locales/pl/messages.js +1 -1
  633. package/dist/i18n/locales/pt/messages.js +1 -1
  634. package/dist/i18n/locales/ro/messages.js +1 -1
  635. package/dist/i18n/locales/sk/messages.js +1 -1
  636. package/dist/i18n/locales/tr/messages.js +1 -1
  637. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  638. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  639. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +95 -80
  640. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  641. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  642. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  643. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  644. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +11 -5
  645. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +10 -11
  646. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +9 -10
  647. package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
  648. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  649. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
  650. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  651. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  652. package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
  653. package/dist/phoenix/application-spec/project-files.js +1 -1
  654. package/dist/phoenix/bin.d.ts +2 -0
  655. package/dist/phoenix/bin.js +2 -0
  656. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  657. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  658. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  659. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  660. package/dist/phoenix/check-configs/index.d.ts +8 -0
  661. package/dist/phoenix/check-configs/index.js +1 -0
  662. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  663. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  664. package/dist/phoenix/cli.d.ts +0 -1
  665. package/dist/phoenix/cli.js +1 -2
  666. package/dist/phoenix/commands/build.js +1 -1
  667. package/dist/phoenix/commands/check.js +1 -1
  668. package/dist/phoenix/commands/clean.js +1 -1
  669. package/dist/phoenix/commands/deploy.js +2 -2
  670. package/dist/phoenix/commands/deps/deps.d.ts +22 -1
  671. package/dist/phoenix/commands/deps/deps.js +2 -2
  672. package/dist/phoenix/commands/deps/index.d.ts +1 -1
  673. package/dist/phoenix/commands/deps/index.js +1 -1
  674. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -1
  675. package/dist/phoenix/commands/dev.js +4 -4
  676. package/dist/phoenix/commands/fix.js +1 -1
  677. package/dist/phoenix/commands/init.d.ts +17 -5
  678. package/dist/phoenix/commands/init.js +1 -1
  679. package/dist/phoenix/commands/link.js +1 -1
  680. package/dist/phoenix/commands/prettier.js +1 -1
  681. package/dist/phoenix/commands/sync.js +1 -1
  682. package/dist/phoenix/commands/unlink.js +1 -1
  683. package/dist/phoenix/services/application-spec-project-watcher.d.ts +0 -2
  684. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  685. package/dist/phoenix/services/lingui.d.ts +8 -0
  686. package/dist/phoenix/services/lingui.js +1 -1
  687. package/dist/phoenix/services/swc.js +1 -1
  688. package/dist/phoenix/services/vite-config.js +1 -1
  689. package/dist/phoenix/utils/index.d.ts +3 -2
  690. package/dist/phoenix/utils/index.js +1 -1
  691. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  692. package/dist/phoenix/utils/node-version/index.js +1 -0
  693. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  694. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  695. package/dist/phoenix/utils/package-info.d.ts +0 -9
  696. package/dist/phoenix/utils/package-info.js +1 -1
  697. package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
  698. package/dist/phoenix/utils/package-manager/index.js +1 -0
  699. package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
  700. package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
  701. package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
  702. package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
  703. package/dist/phoenix/utils/run-command.d.ts +11 -0
  704. package/dist/phoenix/utils/run-command.js +1 -1
  705. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  706. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  707. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  708. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  709. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
  710. package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +4 -0
  711. package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
  712. package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
  713. package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
  714. package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
  715. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  716. package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
  717. package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
  718. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
  719. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
  720. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
  721. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
  722. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
  723. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
  724. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
  725. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
  726. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
  727. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
  728. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  729. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  730. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  731. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  732. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  733. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  734. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  735. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  736. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  737. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  738. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
  739. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  740. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  741. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
  742. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
  743. package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
  744. package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
  745. package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
  746. package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
  747. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
  748. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
  749. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
  750. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
  751. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
  752. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
  753. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
  754. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
  755. package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
  756. package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
  757. package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
  758. package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
  759. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
  760. package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
  761. package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
  762. package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
  763. package/dist/react-sdk/application-runtime/index.d.ts +3 -0
  764. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  765. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  766. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  767. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  768. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  769. package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
  770. package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
  771. package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
  772. package/dist/react-sdk/application-runtime/loading/index.js +1 -0
  773. package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
  774. package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
  775. package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
  776. package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
  777. package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
  778. package/dist/react-sdk/application-runtime/loading/types.js +1 -0
  779. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  780. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
  781. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
  782. package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
  783. package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
  784. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  785. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  786. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  787. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  788. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  789. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  790. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  791. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  792. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  793. package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
  794. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  795. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  796. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +313 -10
  797. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  798. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  799. package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
  800. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  801. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  802. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +9 -0
  803. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
  804. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  805. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  806. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +15 -4
  807. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -1
  808. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  809. package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
  810. package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
  811. package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
  812. package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
  813. package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
  814. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
  815. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
  816. package/dist/react-sdk/domain-context/index.d.ts +7 -0
  817. package/dist/react-sdk/domain-context/index.js +1 -1
  818. package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
  819. package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
  820. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
  821. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
  822. package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
  823. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
  824. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
  825. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  826. package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
  827. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
  828. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
  829. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
  830. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
  831. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
  832. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
  833. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
  834. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
  835. package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
  836. package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
  837. package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
  838. package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
  839. package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
  840. package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
  841. package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
  842. package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
  843. package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
  844. package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
  845. package/dist/react-sdk/handlers/index.d.ts +6 -0
  846. package/dist/react-sdk/handlers/index.js +1 -1
  847. package/dist/{configurator/common → react-sdk/handlers}/use-finalize-action.d.ts +3 -2
  848. package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
  849. package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
  850. package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
  851. package/dist/react-sdk/index.d.ts +2 -0
  852. package/dist/react-sdk/index.js +1 -1
  853. package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
  854. package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
  855. package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
  856. package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
  857. package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
  858. package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
  859. package/dist/react-sdk/loading-state/index.d.ts +4 -2
  860. package/dist/react-sdk/loading-state/index.js +1 -1
  861. package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
  862. package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
  863. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
  864. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
  865. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
  866. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
  867. package/dist/react-sdk/page-elements/configurator-error-page-props.d.ts +20 -0
  868. package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
  869. package/dist/react-sdk/page-elements/create-configuration-not-found-page.d.ts +15 -0
  870. package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
  871. package/dist/react-sdk/page-elements/create-configurator-error-page.d.ts +14 -0
  872. package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
  873. package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
  874. package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
  875. package/dist/react-sdk/page-elements/index.d.ts +6 -0
  876. package/dist/react-sdk/page-elements/index.js +1 -0
  877. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  878. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  879. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  880. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  881. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  882. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  883. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  884. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  885. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  886. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  887. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  888. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  889. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  890. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  891. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  892. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  893. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  894. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  895. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  896. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  897. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  898. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  899. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  900. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
  901. package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
  902. package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
  903. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  904. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  905. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  906. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  907. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  908. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  909. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  910. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  911. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  912. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  913. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  914. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  915. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  916. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
  917. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
  918. package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
  919. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +59 -0
  920. package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
  921. package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
  922. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
  923. package/dist/ui-sdk/theme/types.d.ts +5 -1
  924. package/package.json +28 -11
  925. package/schema/domain-spec.json +226 -8
  926. package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
  927. package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
  928. package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
  929. package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
  930. package/dist/configurator/common/use-finalize-action.js +0 -1
  931. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
  932. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
  933. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  934. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  935. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  936. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
  937. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
  938. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
  939. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
  940. package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
  941. package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
  942. package/dist/domain/extensions/client-side-image.js +0 -1
  943. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  944. package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
  945. package/dist/phoenix/commands/generate-project-files.js +0 -1
  946. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  947. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  948. package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
  949. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -32
  950. package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
  951. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → application-spec/generate-application/runtime/spec-code/spec-code-module.js} +0 -0
  952. /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.js +0 -0
@@ -1,6 +1,6 @@
1
1
  # Custom Layout
2
2
 
3
- Make the configurator look like the brand's own product page. A furniture shop wants its table configurator to read like the rest of its site: a floating panel on the left with the product's name, the edge finishes as picture cards, the price in large type and one clear call to action, and the table in the space beside it. On a phone the panel becomes a sheet at the bottom, and a button on the table's edge offers the finishes right where they apply. The project writes that page as one React component. Phoenix supplies the 3D scene, the product's state and a few hooks; every pixel around the scene is the project's own.
3
+ Make the configurator look like the brand's own product page. A furniture shop wants its table configurator to read like the rest of its site: a floating panel on the left with the product's name, the edge finishes as picture cards, the price in large type and one clear call to action, and the table in the space beside it. On a phone the panel becomes a sheet at the bottom, and a button on the table's edge offers the finishes right where they apply, and the layout's own buttons switch between the whole table and a close-up of its edge. The project writes that page as one React component. Phoenix supplies the 3D scene, the product's state and a few hooks; every pixel around the scene is the project's own.
4
4
 
5
5
  - [Choose this approach](#choose-this-approach)
6
6
  - [Register the layout](#register-the-layout)
@@ -8,11 +8,13 @@ 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)
14
15
  - [Fit a phone](#fit-a-phone)
15
16
  - [Put a control on the product](#put-a-control-on-the-product)
17
+ - [Control the scene](#control-the-scene)
16
18
  - [The spec the layout reads](#the-spec-the-layout-reads)
17
19
  - [Try the example](#try-the-example)
18
20
  - [Test cases](#test-cases)
@@ -26,7 +28,7 @@ Write your own layout when the configurator has to follow a design the built-in
26
28
 
27
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).
28
30
 
29
- 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).
30
32
 
31
33
  ## Register the layout
32
34
 
@@ -36,14 +38,15 @@ Create `src/elements/ConfiguratorLayout.tsx` with a default export made by `phx.
36
38
  import { Box } from '@mui/material'
37
39
  import { useState } from 'react'
38
40
 
39
- import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
40
- import { useActiveViewports } from '@salsita-ai/sdk/react'
41
+ import { LayoutSlots } from '@salsita-ai/sdk/configurator'
41
42
 
42
43
  import { phx } from '../../.phoenix/phx.js'
43
44
  import { BottomSheet } from '../_shared/BottomSheet.js'
44
45
  import { FullscreenToggle } from '../_shared/FullscreenToggle.js'
45
46
  import { MessageToast } from '../_shared/MessageToast.js'
46
47
  import { ProductPanel } from '../_shared/ProductPanel.js'
48
+ import { SceneControls } from '../_shared/SceneControls.js'
49
+ import { UndoRedo } from '../_shared/UndoRedo.js'
47
50
 
48
51
  const GUTTER = 24
49
52
  const PANEL_WIDTH = 380
@@ -51,10 +54,10 @@ const PHONE_GUTTER = 16
51
54
  const TOUCH_TARGET = 44
52
55
 
53
56
  const ConfiguratorLayout = () => {
54
- const { containerRef, safeAreaRef } = useSceneSafeArea()
57
+ const { containerRef, safeAreaRef } = phx.frontend.useSceneSafeArea()
55
58
  const isFullscreen = phx.frontend.useIsFullscreenActive()
56
59
  // `null` until the container has been measured; the layout shows only the scene until then
57
- const viewports = useActiveViewports()
60
+ const viewports = phx.frontend.useActiveViewports()
58
61
  const [isSheetOpen, setSheetOpen] = useState(false)
59
62
 
60
63
  const isDesktop = viewports?.includes('desktop') ?? false
@@ -113,8 +116,16 @@ const ConfiguratorLayout = () => {
113
116
  >
114
117
  <Box
115
118
  component="div"
116
- 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
+ }}
117
127
  >
128
+ {!isFullscreen && <UndoRedo />}
118
129
  <FullscreenToggle compact={!isDesktop} />
119
130
  </Box>
120
131
  <Box
@@ -122,14 +133,26 @@ const ConfiguratorLayout = () => {
122
133
  sx={{
123
134
  position: 'absolute',
124
135
  pointerEvents: 'auto',
125
- // Desktop: bottom left. Phone: at the top beside the fullscreen button, clear of the sheet's handle.
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.
126
138
  ...(isDesktop
127
- ? { insetBlockEnd: GUTTER, insetInlineStart: GUTTER }
128
- : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
139
+ ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
140
+ : { insetBlockStart: gutter + TOUCH_TARGET + gutter / 2, insetInline: gutter }),
129
141
  }}
130
142
  >
131
143
  <MessageToast />
132
144
  </Box>
145
+ {/* A phone in fullscreen keeps only the reset, as the built-in layout does. Below 1024 pixels (`tablet`) the
146
+ free area beside the panel is narrow, so the reset shows only its icon there too. */}
147
+ <Box
148
+ component="div"
149
+ sx={{ position: 'absolute', insetBlockEnd: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
150
+ >
151
+ <SceneControls
152
+ compact={!isDesktop || (viewports?.includes('tablet') ?? false)}
153
+ resetOnly={!isDesktop && isFullscreen}
154
+ />
155
+ </Box>
133
156
  </Box>
134
157
  )}
135
158
 
@@ -150,13 +173,13 @@ The components it uses live in `src/_shared/`, which Phoenix does not import by
150
173
  ## What the layout has to do
151
174
 
152
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`.
153
- - **Mount the shared canvas.** The app loader stays on screen until the scene has loaded. A layout without `LayoutSlots.SharedCanvas` never gets past the loader unless the project sets `appLoader: legacy`.
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.
154
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.
155
- - **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.
156
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.
157
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.
158
- - **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).
159
- - **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).
160
183
 
161
184
  ## Read and change the product
162
185
 
@@ -165,8 +188,7 @@ The panel reads everything it shows from hooks and writes the customer's choice
165
188
  ```tsx
166
189
  import { Box, Button, Typography } from '@mui/material'
167
190
 
168
- import { detailComponent, finalizeActionComponent } from '@salsita-ai/sdk/domain'
169
- import { PhoenixHandlerBoundary, useResolveLocalizable } from '@salsita-ai/sdk/react'
191
+ import { detailComponent } from '@salsita-ai/sdk/domain'
170
192
 
171
193
  import { phx } from '../../.phoenix/phx.js'
172
194
  import { EdgeFinishCards } from './EdgeFinishCards.js'
@@ -182,7 +204,7 @@ interface ProductPanelProps {
182
204
  }
183
205
 
184
206
  export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPanelProps) => {
185
- const resolve = useResolveLocalizable()
207
+ const resolve = phx.frontend.useResolveLocalizable()
186
208
  const detail = phx.frontend.useFirstRootComponent(detailComponent)
187
209
  const price = phx.frontend.useRootEntityPrice()
188
210
  const tableId = phx.frontend.useRootEntityId()
@@ -192,12 +214,9 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
192
214
  const pushNavigate = phx.frontend.usePushNavigate()
193
215
  const popNavigate = phx.frontend.usePopNavigate()
194
216
  const navigate = phx.frontend.useNavigate()
195
- const finalizeActions = phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] }) ?? []
196
217
 
197
218
  const isReadMode = accessInfo.viewMode
198
219
  const isReview = isReadMode || navigationState !== 'configure'
199
- // The spec's primary finalize action, or its first one
200
- const quoteAction = finalizeActions.find(action => action.state.variant === 'primary') ?? finalizeActions[0]
201
220
  const chosenEdge = edgeFinish.options.find(option => option.value === edgeFinish.value)
202
221
 
203
222
  return (
@@ -275,19 +294,7 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
275
294
  <Typography variant="body2" color="text.secondary">
276
295
  Your table is ready for a quote. A real shop collects the contact details here.
277
296
  </Typography>
278
- {quoteAction ? (
279
- <PhoenixHandlerBoundary name={quoteAction.state.handler}>
280
- <ReviewActions
281
- handler={quoteAction.state.handler}
282
- label={resolve(quoteAction.state.label)}
283
- onBack={popNavigate}
284
- />
285
- </PhoenixHandlerBoundary>
286
- ) : (
287
- <Button size="large" variant="outlined" onClick={popNavigate} sx={BUTTON_SX}>
288
- Back to the configuration
289
- </Button>
290
- )}
297
+ <ReviewActions onBack={popNavigate} />
291
298
  </>
292
299
  )}
293
300
  {!isReadMode && navigationState === 'requested' && (
@@ -306,23 +313,26 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
306
313
  }
307
314
  ```
308
315
 
309
- | Hook | What the layout uses it for |
310
- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
311
- | `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. |
312
- | `phx.frontend.useRootEntityId()` | The id of the table, which the control hooks take. |
313
- | `phx.frontend.useAttributeSelection(entityId, instanceName)` | The `attributeSelection` component named `edgeFinish`: the current `value` and the `options`, each with `title`, `description`, `value`, `disabled` and `onSelect`. |
314
- | `phx.frontend.useRootEntityPrice()` | The root entity's `price` component, formatted for the current locale and currency, or `null` without one. |
315
- | `phx.frontend.useAccessService()` | `accessInfo.viewMode` is `true` while a configuration shared for viewing is open, and also while the host sets the `readonly` property. |
316
- | `phx.frontend.useActiveNavigationState()` | The active navigation state; the panel shows its review step while it is `checkout`. |
317
- | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | Enter the review step and leave it again. |
318
- | `phx.frontend.useNavigate()` | Return from the confirmation to the configuration, forgetting the review step. |
319
- | `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`. |
320
- | `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). |
321
- | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | Read the fullscreen flag, and set it from the layout's own button. |
322
- | `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). |
323
- | `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). |
324
- | `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`. |
325
- | `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). |
326
336
 
327
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`.
328
338
 
@@ -336,7 +346,9 @@ The edge finish is a visual choice, so the panel shows it as cards with a drawin
336
346
  import { Box, ButtonBase, type SxProps, type Theme, Typography } from '@mui/material'
337
347
  import type { KeyboardEvent } from 'react'
338
348
 
339
- 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'
340
352
 
341
353
  // Cross-sections of the tabletop's edge, keyed by the option values of the spec.
342
354
  const EDGE_PROFILES: Readonly<Record<string, string>> = {
@@ -373,7 +385,7 @@ interface EdgeFinishCardsProps {
373
385
  }
374
386
 
375
387
  export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
376
- const resolve = useResolveLocalizable()
388
+ const resolve = phx.frontend.useResolveLocalizable()
377
389
  const { options } = selection
378
390
  // The card in the tab order: the selected one, or the first enabled one. Disabled cards are never in it.
379
391
  const selectedIndex = options.findIndex(option => option.value === selection.value && !option.disabled)
@@ -469,11 +481,13 @@ The drawings are keyed by the option values of the spec. A spec can carry a pict
469
481
 
470
482
  ## Offer fullscreen
471
483
 
472
- 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`.
473
485
 
474
486
  ```tsx
475
487
  import { Button, Tooltip } from '@mui/material'
476
488
 
489
+ import { FrontendAnalyticsFactory } from '@salsita-ai/sdk/configurator'
490
+
477
491
  import { phx } from '../../.phoenix/phx.js'
478
492
 
479
493
  const ENTER_ICON = 'M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'
@@ -487,6 +501,7 @@ interface FullscreenToggleProps {
487
501
  export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) => {
488
502
  const isFullscreen = phx.frontend.useIsFullscreenActive()
489
503
  const setFullscreen = phx.frontend.useSetFullscreen()
504
+ const analytics = phx.frontend.useAnalytics()
490
505
  const label = isFullscreen ? 'Exit fullscreen' : 'Fullscreen'
491
506
  const icon = (
492
507
  <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
@@ -494,10 +509,16 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
494
509
  </svg>
495
510
  )
496
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
+
497
518
  return (
498
519
  <Tooltip title={compact ? label : ''}>
499
520
  <Button
500
- onClick={() => setFullscreen(!isFullscreen)}
521
+ onClick={toggle}
501
522
  aria-label={compact ? label : undefined}
502
523
  startIcon={compact ? undefined : icon}
503
524
  sx={{
@@ -522,9 +543,81 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
522
543
 
523
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.
524
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
+
525
618
  ## Show messages
526
619
 
527
- When a change is rejected because it breaks an invariant, when a committed change carries a hint, or when an error is thrown while a change is validated, 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 of the free area 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:
528
621
 
529
622
  ```tsx
530
623
  import { Alert } from '@mui/material'
@@ -543,7 +636,7 @@ const severityOf = (message: ConfiguratorMessage) => {
543
636
  return VIOLATION_SEVERITY[message.violation.severity]
544
637
  }
545
638
 
546
- return message.kind === 'error' ? 'error' : 'info'
639
+ return message.kind === 'error' || message.kind === 'saveError' ? 'error' : 'info'
547
640
  }
548
641
 
549
642
  export const MessageToast = () => {
@@ -580,7 +673,7 @@ export const MessageToast = () => {
580
673
  }
581
674
  ```
582
675
 
583
- The hook takes a new function on every render without missing a message, so passing the state setter, or an inline function, is fine. `message.kind` is `'violation'`, `'sideEffect'` or `'error'`; a violation also carries `entityId` and the `violation` itself, with its `severity`. A rejected change brings one message for each violation of the rejected state, including notices and warnings that were already present, so the toast keeps the most severe message while it is shown instead of letting a later notice replace the reason for the rejection. The layout mounts the toast in the safe-area element, which sets `pointerEvents: 'none'`, so the toast's wrapper switches pointer events back on for the close button.
676
+ The hook takes a new function on every render without missing a message, so passing the state setter, or an inline function, is fine. `message.kind` is `'violation'`, `'sideEffect'`, `'error'`, `'saveError'` or `'saveRecovery'`; the toast shows an error and a failed save as errors, a hint and the save that succeeded again as information. A violation also carries `entityId` and the `violation` itself, with its `severity`. A rejected change brings one message for each violation of the rejected state, including notices and warnings that were already present, so the toast keeps the most severe message while it is shown instead of letting a later notice replace the reason for the rejection. The layout mounts the toast in the safe-area element, which sets `pointerEvents: 'none'`, so the toast's wrapper switches pointer events back on for the close button.
584
677
 
585
678
  To give the toast something to show, the spec registers one transformer. Choosing **Tree trunk** keeps the change and adds a hint to it, which arrives as a `sideEffect` message:
586
679
 
@@ -603,7 +696,7 @@ export default phx.frontend.transformerBuilder.when
603
696
  .build('tree-trunk-delivery')
604
697
  ```
605
698
 
606
- [Configurator Interface → Loaded Configuration UI](?path=/docs/phoenix-configurator-interface--docs#loaded-configuration-ui) lists the messages the hook does not deliver: a failure to save, errors of the built-in finalize and other actions, and preset errors stay snackbars.
699
+ [Configurator Interface → Loaded Configuration UI](?path=/docs/phoenix-configurator-interface--docs#loaded-configuration-ui) lists the messages the hook does not deliver: errors of the built-in finalize and other actions stay snackbars, and a failure to start from a preset is raised on the preset screen.
607
700
 
608
701
  ## Request a quote
609
702
 
@@ -641,7 +734,7 @@ export default phx.frontend.createPhoenixHandler('requestQuote', () => {
641
734
 
642
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()`.
643
736
 
644
- 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.
645
738
 
646
739
  ```tsx
647
740
  import { Alert, Box, Button, CircularProgress, Typography } from '@mui/material'
@@ -651,39 +744,40 @@ import { phx } from '../../.phoenix/phx.js'
651
744
  const BUTTON_SX = { minBlockSize: 48, borderRadius: 999, textTransform: 'none', fontWeight: 600 } as const
652
745
 
653
746
  interface ReviewActionsProps {
654
- readonly handler: string
655
- readonly label: string
656
747
  readonly onBack: () => void
657
748
  }
658
749
 
659
- // The review step's buttons: one finalize action and the way back. `useFinalizeAction` runs the action's handler,
660
- // so this component calls it exactly once and is rendered inside a `PhoenixHandlerBoundary` for that handler.
661
- // Back is disabled while the request is pending, so the customer cannot change the configuration while it is sent.
662
- // The pending state belongs to this component: when the panel unmounts, as in fullscreen, the request goes on and
663
- // the remounted buttons are enabled again.
664
- export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) => {
665
- 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
666
757
 
667
758
  return (
668
759
  <Box component="div" sx={{ display: 'grid', gap: 2 }}>
669
- <Box component="div" sx={{ display: 'grid', gap: 1 }}>
670
- <Button
671
- size="large"
672
- variant="contained"
673
- disabled={disabled || isPending}
674
- onClick={run}
675
- startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
676
- sx={BUTTON_SX}
677
- >
678
- {isPending ? 'Sending the request…' : label}
679
- </Button>
680
- {disabled && hints && (
681
- <Typography variant="caption" color="text.secondary">
682
- {hints}
683
- </Typography>
684
- )}
685
- {error && <Alert severity="error">The request could not be sent: {error.message}</Alert>}
686
- </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
+ )}
687
781
  <Button size="large" variant="outlined" disabled={isPending} onClick={onBack} sx={BUTTON_SX}>
688
782
  Back to the configuration
689
783
  </Button>
@@ -692,22 +786,30 @@ export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) =>
692
786
  }
693
787
  ```
694
788
 
695
- - `run()` records the finalize-button click for analytics and runs the handler; it does nothing while `disabled` or `isPending`.
696
- - 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.
697
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.
698
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.
699
794
 
700
- 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.
701
796
 
702
797
  ## Serve read mode
703
798
 
704
- 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).
705
807
 
706
808
  ## Fit a phone
707
809
 
708
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.
709
811
 
710
- **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.
711
813
 
712
814
  | Value | When it is active |
713
815
  | ----------- | ---------------------------------------------------------------------------------- |
@@ -886,10 +988,10 @@ export const BottomSheet = ({ open, onOpenChange, label, children }: BottomSheet
886
988
 
887
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.
888
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.
889
- - 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.
890
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.
891
993
 
892
- **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.
893
995
 
894
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:
895
997
 
@@ -1015,9 +1117,156 @@ export default phx.frontend.createCustomPhoenixEntityElement('EdgeFinishHotspot'
1015
1117
 
1016
1118
  [Html Hotspots](?path=/docs/controls-scene-html-hotspots--docs) describes the component and its other properties.
1017
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
+
1122
+ ## Control the scene
1123
+
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.
1125
+
1126
+ **Views are view states.** The spec lists them, and each camera says by its `$filter` in which view states and at which widths it applies. The two close-up cameras have the highest priorities and apply only in the `edge` view state, the desktop one with `desktop` and the phone one with `mobile`, a little farther away. In the `overview` view state, the first in the list and so the initial one, only the two whole-table cameras of [Fit a phone](#fit-a-phone) apply. A camera always looks at the middle of the table, so the close-up shows the near corner, where the edge profile is seen on both sides:
1127
+
1128
+ ```yaml
1129
+ viewStates:
1130
+ - overview
1131
+ - edge
1132
+
1133
+ components:
1134
+ Table:
1135
+ fitRootPerspectiveCamera:
1136
+ edge:
1137
+ priority: 4
1138
+ fov: 35
1139
+ near: 100
1140
+ far: 10000
1141
+ minDistance: 800
1142
+ maxDistance: 9000
1143
+ distance: 2000
1144
+ azimuthAngle: 0.5
1145
+ polarAngle: 1.15
1146
+ fitMeshChanges: true
1147
+ $filter:
1148
+ viewports: [desktop]
1149
+ viewStates: [edge]
1150
+ edgePhone:
1151
+ priority: 3
1152
+ fov: 35
1153
+ near: 100
1154
+ far: 10000
1155
+ minDistance: 800
1156
+ maxDistance: 12000
1157
+ distance: 3000
1158
+ azimuthAngle: 0.5
1159
+ polarAngle: 1.15
1160
+ fitMeshChanges: true
1161
+ $filter:
1162
+ viewports: [mobile]
1163
+ viewStates: [edge]
1164
+ ```
1165
+
1166
+ **The buttons.** `phx.frontend.useActiveViewState()` returns the active view state and `phx.frontend.useSetViewState()` a function that makes another one active; the camera then moves to the camera of that view state. `phx.frontend.useResetCamera()` returns a function that moves the camera back to the framing of the active camera, the whole table or the close-up:
1167
+
1168
+ ```tsx
1169
+ import { Box, Button, Tooltip } from '@mui/material'
1170
+
1171
+ import { phx } from '../../.phoenix/phx.js'
1172
+
1173
+ // The spec's view states, each with the label of the button that shows it
1174
+ const VIEWS = [
1175
+ { state: 'overview', label: 'Whole table' },
1176
+ { state: 'edge', label: 'Edge close-up' },
1177
+ ] as const
1178
+
1179
+ const RESET_ICON = 'M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4'
1180
+
1181
+ const SURFACE_SX = {
1182
+ borderRadius: 999,
1183
+ bgcolor: 'background.paper',
1184
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
1185
+ } as const
1186
+
1187
+ const BUTTON_SX = {
1188
+ minBlockSize: 44,
1189
+ minInlineSize: 44,
1190
+ borderRadius: 999,
1191
+ textTransform: 'none',
1192
+ fontWeight: 600,
1193
+ whiteSpace: 'nowrap',
1194
+ } as const
1195
+
1196
+ interface SceneControlsProps {
1197
+ // The reset button shows only its icon, with its label as tooltip and accessible name
1198
+ readonly compact?: boolean
1199
+ // Only the reset button, without the view buttons
1200
+ readonly resetOnly?: boolean
1201
+ }
1202
+
1203
+ // The layout's own camera controls: one button per view state of the spec, and a reset that undoes an orbit
1204
+ export const SceneControls = ({ compact = false, resetOnly = false }: SceneControlsProps) => {
1205
+ const activeView = phx.frontend.useActiveViewState()
1206
+ const setViewState = phx.frontend.useSetViewState()
1207
+ const resetCamera = phx.frontend.useResetCamera()
1208
+ const resetIcon = (
1209
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
1210
+ <path d={RESET_ICON} />
1211
+ </svg>
1212
+ )
1213
+
1214
+ return (
1215
+ <Box component="div" sx={{ display: 'flex', gap: 1 }}>
1216
+ {!resetOnly && (
1217
+ <Box component="div" role="group" aria-label="View" sx={{ ...SURFACE_SX, display: 'flex' }}>
1218
+ {VIEWS.map(view => {
1219
+ const isActive = activeView === view.state
1220
+
1221
+ return (
1222
+ <Button
1223
+ key={view.state}
1224
+ aria-pressed={isActive}
1225
+ onClick={() => setViewState(view.state)}
1226
+ sx={{
1227
+ ...BUTTON_SX,
1228
+ paddingInline: 2,
1229
+ bgcolor: isActive ? 'text.primary' : 'transparent',
1230
+ color: isActive ? 'background.paper' : 'text.primary',
1231
+ '&:hover': { bgcolor: isActive ? 'text.primary' : 'action.hover' },
1232
+ }}
1233
+ >
1234
+ {view.label}
1235
+ </Button>
1236
+ )
1237
+ })}
1238
+ </Box>
1239
+ )}
1240
+ <Tooltip title={compact ? 'Reset view' : ''}>
1241
+ <Button
1242
+ onClick={resetCamera}
1243
+ aria-label={compact ? 'Reset view' : undefined}
1244
+ startIcon={compact ? undefined : resetIcon}
1245
+ sx={{
1246
+ ...SURFACE_SX,
1247
+ ...BUTTON_SX,
1248
+ paddingInline: compact ? 0 : 2,
1249
+ color: 'text.primary',
1250
+ '&:hover': { bgcolor: 'background.paper', boxShadow: '0 6px 20px rgba(0, 0, 0, 0.18)' },
1251
+ }}
1252
+ >
1253
+ {compact ? resetIcon : 'Reset view'}
1254
+ </Button>
1255
+ </Tooltip>
1256
+ </Box>
1257
+ )
1258
+ }
1259
+ ```
1260
+
1261
+ - The view buttons are a group with `aria-pressed`, so a screen reader announces which view is active, and the active one is drawn dark, not only in another colour.
1262
+ - On a desktop the controls sit at the bottom right of the free area and the toast above its bottom left; on a phone they sit at the bottom of the free area, just above the sheet. On a phone, and on a desktop arrangement below 1024 pixels, where `tablet` is also active and the free area beside the panel is narrow, **Reset view** shows only its icon, with its label as tooltip and accessible name.
1263
+ - In fullscreen the controls stay on a desktop. On a phone the view buttons are hidden and **Reset view** stays, as [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs#full-screen-preview) describes for the built-in layout: on a phone the canvas is small and the product comes first, and the way back to the framed product is still needed after an orbit.
1264
+ - The controls stay in the review step and in read mode: changing the view changes nothing in the configuration, and a viewer may look at the product as closely as the customer.
1265
+ - The hooks need no `viewControls` component. That component configures the built-in layout's view controls and has no effect here.
1266
+
1018
1267
  ## The spec the layout reads
1019
1268
 
1020
- The layout reads four components of the root entity and its navigation states; the scene components are in the complete implementation below.
1269
+ The layout reads four components of the root entity and its navigation and view states; the scene components are in the complete implementation below. `SceneControls` names the view states `overview` and `edge` in its code, so they must match the spec's `viewStates`.
1021
1270
 
1022
1271
  ```yaml
1023
1272
  navigationStates:
@@ -1025,6 +1274,10 @@ navigationStates:
1025
1274
  - checkout
1026
1275
  - requested
1027
1276
 
1277
+ viewStates:
1278
+ - overview
1279
+ - edge
1280
+
1028
1281
  components:
1029
1282
  Table:
1030
1283
  detail:
@@ -1069,7 +1322,7 @@ transformers:
1069
1322
 
1070
1323
  ## Try the example
1071
1324
 
1072
- 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.
1073
1326
 
1074
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.
1075
1328
 
@@ -1077,35 +1330,44 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
1077
1330
 
1078
1331
  - The panel is on the left and the table is centred in the area to the right of it, not in the whole canvas.
1079
1332
  - Choosing **Tree trunk** moves the check mark to that card, changes the edge of the tabletop and raises the price from $1,290.00 to $1,630.00.
1080
- - Choosing **Tree trunk** also shows "Tree trunk edges are cut by hand, so delivery takes three weeks longer." at the bottom of the free area, until its close button is clicked or six seconds pass. Choosing another finish shows nothing.
1333
+ - Choosing **Tree trunk** also shows "Tree trunk edges are cut by hand, so delivery takes three weeks longer." at the bottom left of the free area, above the view controls, until its close button is clicked or six seconds pass. Choosing another finish shows nothing.
1081
1334
  - Tab reaches the selected card, and the arrow keys move the selection to the next or previous card.
1082
1335
  - Dragging in the area to the right of the panel orbits the camera.
1083
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.
1084
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.
1085
1338
  - **Fullscreen** removes the panel and the table moves to the centre of the canvas; **Exit fullscreen** brings both back.
1086
- - 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.
1087
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.
1088
1346
  - Tab reaches the button on the edge, and Enter or Space opens the popover.
1089
- - 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.
1090
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.
1091
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.
1092
1350
  - On the phone, the review step, **Request a quote** and the thank-you message work with the sheet collapsed and open.
1093
- - 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.
1094
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.
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.
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.
1355
+ - The view buttons and **Reset view** sit at the bottom right of the free area on a desktop and just above the sheet on a phone, and overlap neither the panel, the sheet, the button on the edge nor the toast.
1356
+ - In fullscreen the view controls stay on a desktop. On a phone the view buttons are hidden and **Reset view** stays; after an orbit it restores the framing.
1095
1357
 
1096
1358
  ## Known gaps
1097
1359
 
1098
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.
1099
1361
 
1100
- - **Messages that stay snackbars.** The toast shows violations, side effects and errors, and the finalize button shows its own error. A failure to save the configuration is still raised as a snackbar, which renders into `LayoutSlots.DesktopSnackbarsRoot`; this layout mounts no snackbar root, so it appears outside the configurator. A layout that wants it inside mounts the root.
1101
- - **Toolbar actions.** Undo and redo, camera reset, 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.
1102
- - **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 they do not appear. Nor does this layout build view buttons or a camera reset of its own.
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).
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).
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.
1103
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`.
1104
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.
1105
- - **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`.
1106
- - **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.
1107
- - **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(...)`.
1108
- - **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.
1109
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.
1110
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.
1111
1373
 
@@ -1114,7 +1376,7 @@ A project layout has only what it renders. This one leaves out the following, ea
1114
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.
1115
1377
  - [Universal](?path=/docs/layouts-universal--docs) is the built-in layout this one replaces.
1116
1378
  - [Header / Custom](?path=/docs/layouts-header-custom--docs) replaces only the header, with the price from `useRootEntityPrice()`.
1117
- - [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.
1118
1380
  - [Presets / Custom](?path=/docs/layouts-presets-custom--docs) replaces the preset screen the same way.
1119
1381
 
1120
1382
  ## Complete Implementation
@@ -1158,6 +1420,10 @@ navigationStates:
1158
1420
  - checkout
1159
1421
  - requested
1160
1422
 
1423
+ viewStates:
1424
+ - overview
1425
+ - edge
1426
+
1161
1427
  components:
1162
1428
  Table:
1163
1429
  detail:
@@ -1229,6 +1495,34 @@ components:
1229
1495
  fitMeshChanges: true
1230
1496
  $filter:
1231
1497
  viewports: [mobile]
1498
+ edge:
1499
+ priority: 4
1500
+ fov: 35
1501
+ near: 100
1502
+ far: 10000
1503
+ minDistance: 800
1504
+ maxDistance: 9000
1505
+ distance: 2000
1506
+ azimuthAngle: 0.5
1507
+ polarAngle: 1.15
1508
+ fitMeshChanges: true
1509
+ $filter:
1510
+ viewports: [desktop]
1511
+ viewStates: [edge]
1512
+ edgePhone:
1513
+ priority: 3
1514
+ fov: 35
1515
+ near: 100
1516
+ far: 10000
1517
+ minDistance: 800
1518
+ maxDistance: 12000
1519
+ distance: 3000
1520
+ azimuthAngle: 0.5
1521
+ polarAngle: 1.15
1522
+ fitMeshChanges: true
1523
+ $filter:
1524
+ viewports: [mobile]
1525
+ viewStates: [edge]
1232
1526
  sceneEntityRemoteObject:
1233
1527
  top:
1234
1528
  fileUrl: /models/tables.gltf
@@ -1446,7 +1740,9 @@ export const BottomSheet = ({ open, onOpenChange, label, children }: BottomSheet
1446
1740
  import { Box, ButtonBase, type SxProps, type Theme, Typography } from '@mui/material'
1447
1741
  import type { KeyboardEvent } from 'react'
1448
1742
 
1449
- 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'
1450
1746
 
1451
1747
  // Cross-sections of the tabletop's edge, keyed by the option values of the spec.
1452
1748
  const EDGE_PROFILES: Readonly<Record<string, string>> = {
@@ -1483,7 +1779,7 @@ interface EdgeFinishCardsProps {
1483
1779
  }
1484
1780
 
1485
1781
  export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
1486
- const resolve = useResolveLocalizable()
1782
+ const resolve = phx.frontend.useResolveLocalizable()
1487
1783
  const { options } = selection
1488
1784
  // The card in the tab order: the selected one, or the first enabled one. Disabled cards are never in it.
1489
1785
  const selectedIndex = options.findIndex(option => option.value === selection.value && !option.disabled)
@@ -1580,6 +1876,8 @@ export const EdgeFinishCards = ({ selection }: EdgeFinishCardsProps) => {
1580
1876
  ```tsx
1581
1877
  import { Button, Tooltip } from '@mui/material'
1582
1878
 
1879
+ import { FrontendAnalyticsFactory } from '@salsita-ai/sdk/configurator'
1880
+
1583
1881
  import { phx } from '../../.phoenix/phx.js'
1584
1882
 
1585
1883
  const ENTER_ICON = 'M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5'
@@ -1593,6 +1891,7 @@ interface FullscreenToggleProps {
1593
1891
  export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) => {
1594
1892
  const isFullscreen = phx.frontend.useIsFullscreenActive()
1595
1893
  const setFullscreen = phx.frontend.useSetFullscreen()
1894
+ const analytics = phx.frontend.useAnalytics()
1596
1895
  const label = isFullscreen ? 'Exit fullscreen' : 'Fullscreen'
1597
1896
  const icon = (
1598
1897
  <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
@@ -1600,10 +1899,16 @@ export const FullscreenToggle = ({ compact = false }: FullscreenToggleProps) =>
1600
1899
  </svg>
1601
1900
  )
1602
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
+
1603
1908
  return (
1604
1909
  <Tooltip title={compact ? label : ''}>
1605
1910
  <Button
1606
- onClick={() => setFullscreen(!isFullscreen)}
1911
+ onClick={toggle}
1607
1912
  aria-label={compact ? label : undefined}
1608
1913
  startIcon={compact ? undefined : icon}
1609
1914
  sx={{
@@ -1645,7 +1950,7 @@ const severityOf = (message: ConfiguratorMessage) => {
1645
1950
  return VIOLATION_SEVERITY[message.violation.severity]
1646
1951
  }
1647
1952
 
1648
- return message.kind === 'error' ? 'error' : 'info'
1953
+ return message.kind === 'error' || message.kind === 'saveError' ? 'error' : 'info'
1649
1954
  }
1650
1955
 
1651
1956
  export const MessageToast = () => {
@@ -1687,8 +1992,7 @@ export const MessageToast = () => {
1687
1992
  ```tsx
1688
1993
  import { Box, Button, Typography } from '@mui/material'
1689
1994
 
1690
- import { detailComponent, finalizeActionComponent } from '@salsita-ai/sdk/domain'
1691
- import { PhoenixHandlerBoundary, useResolveLocalizable } from '@salsita-ai/sdk/react'
1995
+ import { detailComponent } from '@salsita-ai/sdk/domain'
1692
1996
 
1693
1997
  import { phx } from '../../.phoenix/phx.js'
1694
1998
  import { EdgeFinishCards } from './EdgeFinishCards.js'
@@ -1704,7 +2008,7 @@ interface ProductPanelProps {
1704
2008
  }
1705
2009
 
1706
2010
  export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPanelProps) => {
1707
- const resolve = useResolveLocalizable()
2011
+ const resolve = phx.frontend.useResolveLocalizable()
1708
2012
  const detail = phx.frontend.useFirstRootComponent(detailComponent)
1709
2013
  const price = phx.frontend.useRootEntityPrice()
1710
2014
  const tableId = phx.frontend.useRootEntityId()
@@ -1714,12 +2018,9 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
1714
2018
  const pushNavigate = phx.frontend.usePushNavigate()
1715
2019
  const popNavigate = phx.frontend.usePopNavigate()
1716
2020
  const navigate = phx.frontend.useNavigate()
1717
- const finalizeActions = phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] }) ?? []
1718
2021
 
1719
2022
  const isReadMode = accessInfo.viewMode
1720
2023
  const isReview = isReadMode || navigationState !== 'configure'
1721
- // The spec's primary finalize action, or its first one
1722
- const quoteAction = finalizeActions.find(action => action.state.variant === 'primary') ?? finalizeActions[0]
1723
2024
  const chosenEdge = edgeFinish.options.find(option => option.value === edgeFinish.value)
1724
2025
 
1725
2026
  return (
@@ -1797,19 +2098,7 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
1797
2098
  <Typography variant="body2" color="text.secondary">
1798
2099
  Your table is ready for a quote. A real shop collects the contact details here.
1799
2100
  </Typography>
1800
- {quoteAction ? (
1801
- <PhoenixHandlerBoundary name={quoteAction.state.handler}>
1802
- <ReviewActions
1803
- handler={quoteAction.state.handler}
1804
- label={resolve(quoteAction.state.label)}
1805
- onBack={popNavigate}
1806
- />
1807
- </PhoenixHandlerBoundary>
1808
- ) : (
1809
- <Button size="large" variant="outlined" onClick={popNavigate} sx={BUTTON_SX}>
1810
- Back to the configuration
1811
- </Button>
1812
- )}
2101
+ <ReviewActions onBack={popNavigate} />
1813
2102
  </>
1814
2103
  )}
1815
2104
  {!isReadMode && navigationState === 'requested' && (
@@ -1838,39 +2127,40 @@ import { phx } from '../../.phoenix/phx.js'
1838
2127
  const BUTTON_SX = { minBlockSize: 48, borderRadius: 999, textTransform: 'none', fontWeight: 600 } as const
1839
2128
 
1840
2129
  interface ReviewActionsProps {
1841
- readonly handler: string
1842
- readonly label: string
1843
2130
  readonly onBack: () => void
1844
2131
  }
1845
2132
 
1846
- // The review step's buttons: one finalize action and the way back. `useFinalizeAction` runs the action's handler,
1847
- // so this component calls it exactly once and is rendered inside a `PhoenixHandlerBoundary` for that handler.
1848
- // Back is disabled while the request is pending, so the customer cannot change the configuration while it is sent.
1849
- // The pending state belongs to this component: when the panel unmounts, as in fullscreen, the request goes on and
1850
- // the remounted buttons are enabled again.
1851
- export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) => {
1852
- 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
1853
2140
 
1854
2141
  return (
1855
2142
  <Box component="div" sx={{ display: 'grid', gap: 2 }}>
1856
- <Box component="div" sx={{ display: 'grid', gap: 1 }}>
1857
- <Button
1858
- size="large"
1859
- variant="contained"
1860
- disabled={disabled || isPending}
1861
- onClick={run}
1862
- startIcon={isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
1863
- sx={BUTTON_SX}
1864
- >
1865
- {isPending ? 'Sending the request…' : label}
1866
- </Button>
1867
- {disabled && hints && (
1868
- <Typography variant="caption" color="text.secondary">
1869
- {hints}
1870
- </Typography>
1871
- )}
1872
- {error && <Alert severity="error">The request could not be sent: {error.message}</Alert>}
1873
- </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
+ )}
1874
2164
  <Button size="large" variant="outlined" disabled={isPending} onClick={onBack} sx={BUTTON_SX}>
1875
2165
  Back to the configuration
1876
2166
  </Button>
@@ -1879,20 +2169,182 @@ export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) =>
1879
2169
  }
1880
2170
  ```
1881
2171
 
2172
+ ### ./src/\_shared/SceneControls.tsx
2173
+
2174
+ ```tsx
2175
+ import { Box, Button, Tooltip } from '@mui/material'
2176
+
2177
+ import { phx } from '../../.phoenix/phx.js'
2178
+
2179
+ // The spec's view states, each with the label of the button that shows it
2180
+ const VIEWS = [
2181
+ { state: 'overview', label: 'Whole table' },
2182
+ { state: 'edge', label: 'Edge close-up' },
2183
+ ] as const
2184
+
2185
+ const RESET_ICON = 'M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4'
2186
+
2187
+ const SURFACE_SX = {
2188
+ borderRadius: 999,
2189
+ bgcolor: 'background.paper',
2190
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
2191
+ } as const
2192
+
2193
+ const BUTTON_SX = {
2194
+ minBlockSize: 44,
2195
+ minInlineSize: 44,
2196
+ borderRadius: 999,
2197
+ textTransform: 'none',
2198
+ fontWeight: 600,
2199
+ whiteSpace: 'nowrap',
2200
+ } as const
2201
+
2202
+ interface SceneControlsProps {
2203
+ // The reset button shows only its icon, with its label as tooltip and accessible name
2204
+ readonly compact?: boolean
2205
+ // Only the reset button, without the view buttons
2206
+ readonly resetOnly?: boolean
2207
+ }
2208
+
2209
+ // The layout's own camera controls: one button per view state of the spec, and a reset that undoes an orbit
2210
+ export const SceneControls = ({ compact = false, resetOnly = false }: SceneControlsProps) => {
2211
+ const activeView = phx.frontend.useActiveViewState()
2212
+ const setViewState = phx.frontend.useSetViewState()
2213
+ const resetCamera = phx.frontend.useResetCamera()
2214
+ const resetIcon = (
2215
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
2216
+ <path d={RESET_ICON} />
2217
+ </svg>
2218
+ )
2219
+
2220
+ return (
2221
+ <Box component="div" sx={{ display: 'flex', gap: 1 }}>
2222
+ {!resetOnly && (
2223
+ <Box component="div" role="group" aria-label="View" sx={{ ...SURFACE_SX, display: 'flex' }}>
2224
+ {VIEWS.map(view => {
2225
+ const isActive = activeView === view.state
2226
+
2227
+ return (
2228
+ <Button
2229
+ key={view.state}
2230
+ aria-pressed={isActive}
2231
+ onClick={() => setViewState(view.state)}
2232
+ sx={{
2233
+ ...BUTTON_SX,
2234
+ paddingInline: 2,
2235
+ bgcolor: isActive ? 'text.primary' : 'transparent',
2236
+ color: isActive ? 'background.paper' : 'text.primary',
2237
+ '&:hover': { bgcolor: isActive ? 'text.primary' : 'action.hover' },
2238
+ }}
2239
+ >
2240
+ {view.label}
2241
+ </Button>
2242
+ )
2243
+ })}
2244
+ </Box>
2245
+ )}
2246
+ <Tooltip title={compact ? 'Reset view' : ''}>
2247
+ <Button
2248
+ onClick={resetCamera}
2249
+ aria-label={compact ? 'Reset view' : undefined}
2250
+ startIcon={compact ? undefined : resetIcon}
2251
+ sx={{
2252
+ ...SURFACE_SX,
2253
+ ...BUTTON_SX,
2254
+ paddingInline: compact ? 0 : 2,
2255
+ color: 'text.primary',
2256
+ '&:hover': { bgcolor: 'background.paper', boxShadow: '0 6px 20px rgba(0, 0, 0, 0.18)' },
2257
+ }}
2258
+ >
2259
+ {compact ? resetIcon : 'Reset view'}
2260
+ </Button>
2261
+ </Tooltip>
2262
+ </Box>
2263
+ )
2264
+ }
2265
+ ```
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
+
1882
2333
  ### ./src/elements/ConfiguratorLayout.tsx
1883
2334
 
1884
2335
  ```tsx
1885
2336
  import { Box } from '@mui/material'
1886
2337
  import { useState } from 'react'
1887
2338
 
1888
- import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
1889
- import { useActiveViewports } from '@salsita-ai/sdk/react'
2339
+ import { LayoutSlots } from '@salsita-ai/sdk/configurator'
1890
2340
 
1891
2341
  import { phx } from '../../.phoenix/phx.js'
1892
2342
  import { BottomSheet } from '../_shared/BottomSheet.js'
1893
2343
  import { FullscreenToggle } from '../_shared/FullscreenToggle.js'
1894
2344
  import { MessageToast } from '../_shared/MessageToast.js'
1895
2345
  import { ProductPanel } from '../_shared/ProductPanel.js'
2346
+ import { SceneControls } from '../_shared/SceneControls.js'
2347
+ import { UndoRedo } from '../_shared/UndoRedo.js'
1896
2348
 
1897
2349
  const GUTTER = 24
1898
2350
  const PANEL_WIDTH = 380
@@ -1900,10 +2352,10 @@ const PHONE_GUTTER = 16
1900
2352
  const TOUCH_TARGET = 44
1901
2353
 
1902
2354
  const ConfiguratorLayout = () => {
1903
- const { containerRef, safeAreaRef } = useSceneSafeArea()
2355
+ const { containerRef, safeAreaRef } = phx.frontend.useSceneSafeArea()
1904
2356
  const isFullscreen = phx.frontend.useIsFullscreenActive()
1905
2357
  // `null` until the container has been measured; the layout shows only the scene until then
1906
- const viewports = useActiveViewports()
2358
+ const viewports = phx.frontend.useActiveViewports()
1907
2359
  const [isSheetOpen, setSheetOpen] = useState(false)
1908
2360
 
1909
2361
  const isDesktop = viewports?.includes('desktop') ?? false
@@ -1962,8 +2414,16 @@ const ConfiguratorLayout = () => {
1962
2414
  >
1963
2415
  <Box
1964
2416
  component="div"
1965
- 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
+ }}
1966
2425
  >
2426
+ {!isFullscreen && <UndoRedo />}
1967
2427
  <FullscreenToggle compact={!isDesktop} />
1968
2428
  </Box>
1969
2429
  <Box
@@ -1971,14 +2431,26 @@ const ConfiguratorLayout = () => {
1971
2431
  sx={{
1972
2432
  position: 'absolute',
1973
2433
  pointerEvents: 'auto',
1974
- // Desktop: bottom left. Phone: at the top beside the fullscreen button, clear of the sheet's handle.
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.
1975
2436
  ...(isDesktop
1976
- ? { insetBlockEnd: GUTTER, insetInlineStart: GUTTER }
1977
- : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
2437
+ ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
2438
+ : { insetBlockStart: gutter + TOUCH_TARGET + gutter / 2, insetInline: gutter }),
1978
2439
  }}
1979
2440
  >
1980
2441
  <MessageToast />
1981
2442
  </Box>
2443
+ {/* A phone in fullscreen keeps only the reset, as the built-in layout does. Below 1024 pixels (`tablet`) the
2444
+ free area beside the panel is narrow, so the reset shows only its icon there too. */}
2445
+ <Box
2446
+ component="div"
2447
+ sx={{ position: 'absolute', insetBlockEnd: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
2448
+ >
2449
+ <SceneControls
2450
+ compact={!isDesktop || (viewports?.includes('tablet') ?? false)}
2451
+ resetOnly={!isDesktop && isFullscreen}
2452
+ />
2453
+ </Box>
1982
2454
  </Box>
1983
2455
  )}
1984
2456