@salsita-ai/sdk 0.50.0-develop.996c9540be → 0.50.0-develop.9c1e52435a

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 (432) 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-spec/caching/content-diff.js +1 -1
  13. package/dist/application-spec/core/application-file.d.ts +0 -2
  14. package/dist/application-spec/core/application-file.js +1 -1
  15. package/dist/application-spec/errors/diagnostic-codes.d.ts +3 -0
  16. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  17. package/dist/application-spec/errors/diagnostic-messages.d.ts +3 -0
  18. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  19. package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
  20. package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
  21. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  22. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  23. package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
  24. package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
  25. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  26. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +10 -14
  27. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  28. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
  29. package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
  30. package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
  31. package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
  32. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
  33. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +6 -6
  34. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
  35. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +13 -13
  36. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
  37. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
  38. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  39. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  40. package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -3
  41. package/dist/application-spec/generate-application/code/templates/globals.js +7 -4
  42. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -2
  43. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  44. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  45. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  46. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  47. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  48. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  49. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
  50. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
  51. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +3 -3
  52. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  53. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
  54. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -2
  55. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  56. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
  57. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
  58. package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
  59. package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
  60. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
  61. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
  62. package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
  63. package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
  64. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
  65. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
  66. package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
  67. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
  68. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
  69. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
  70. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +3 -2
  71. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  72. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  73. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +13 -6
  74. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  75. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +6 -4
  76. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
  77. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +3 -2
  78. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  79. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  80. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +2 -2
  81. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  82. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +2 -1
  83. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  84. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
  85. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
  86. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +3 -0
  87. package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
  88. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  89. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +7 -4
  90. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  91. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
  92. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  93. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
  94. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
  95. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  96. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
  97. package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
  98. package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
  99. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
  100. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
  101. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
  102. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
  103. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
  104. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
  105. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
  106. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
  107. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
  108. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
  109. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +5 -0
  110. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
  111. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
  112. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
  113. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
  114. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.js +1 -0
  115. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +18 -0
  116. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  117. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
  118. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
  119. package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
  120. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  121. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  122. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +1 -0
  123. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -1
  124. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  125. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  126. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +3 -0
  127. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  128. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +3 -0
  129. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  130. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
  131. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  132. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  133. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  134. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
  135. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
  136. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +6 -2
  137. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  138. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
  139. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  140. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +7 -1
  141. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  142. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
  143. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
  144. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +1 -1
  145. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  146. package/dist/configurator/common/configurator-interface.d.ts +6 -1
  147. package/dist/configurator/common/configurator-interface.js +1 -1
  148. package/dist/configurator/common/index.d.ts +1 -1
  149. package/dist/configurator/common/index.js +1 -1
  150. package/dist/configurator/common/use-finalize-action.js +1 -1
  151. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +12 -0
  152. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
  153. package/dist/configurator/configuration-not-found-page/index.d.ts +1 -0
  154. package/dist/configurator/configuration-not-found-page/index.js +1 -0
  155. package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
  156. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  157. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
  158. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  159. package/dist/configurator/pages/RootPage.js +1 -1
  160. package/dist/configurator/pages/default-configurator-elements.d.ts +3 -1
  161. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  162. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  163. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  164. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  165. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  166. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  167. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  168. package/dist/configurator/pages/default-elements/index.d.ts +4 -0
  169. package/dist/configurator/pages/default-elements/index.js +1 -0
  170. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  171. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  172. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  173. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  174. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  175. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  176. package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
  177. package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
  178. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
  179. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  180. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  181. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  182. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
  183. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  184. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
  185. package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
  186. package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
  187. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
  188. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
  189. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
  190. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
  191. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
  192. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
  193. package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
  194. package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
  195. package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
  196. package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
  197. package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
  198. package/dist/configurator/ui/assistant/form/form-model.js +1 -0
  199. package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
  200. package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
  201. package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
  202. package/dist/configurator/ui/assistant/form/form-state.js +1 -0
  203. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  204. package/dist/configurator/ui/assistant/form/index.js +1 -0
  205. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
  206. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
  207. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
  208. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
  209. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
  210. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
  211. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
  212. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
  213. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
  214. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
  215. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
  216. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
  217. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
  218. package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
  219. package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
  220. package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
  221. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  222. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  223. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  224. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  225. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  226. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  227. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  228. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  229. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  230. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  231. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  232. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  233. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
  234. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
  235. package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
  236. package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
  237. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +11 -0
  238. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
  239. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
  240. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
  241. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
  242. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  243. package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
  244. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  245. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
  246. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  247. package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
  248. package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
  249. package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
  250. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  251. package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
  252. package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
  253. package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
  254. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  255. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  256. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  257. package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
  258. package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
  259. package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
  260. package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
  261. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
  262. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
  263. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
  264. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
  265. package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
  266. package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
  267. package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
  268. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
  269. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
  270. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
  271. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
  272. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  273. package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
  274. package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
  275. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  276. package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
  277. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  278. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  279. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  280. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
  281. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
  282. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
  283. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
  284. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  285. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  286. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
  287. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
  288. package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
  289. package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
  290. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  291. package/dist/docs/fabs/basic.mdx +2 -2
  292. package/dist/docs/index.json +1 -1
  293. package/dist/docs/layouts/custom-layout.mdx +325 -15
  294. package/dist/docs/other-features/not-found-404.mdx +1 -1
  295. package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
  296. package/dist/docs/phoenix/configurator-interface.mdx +36 -11
  297. package/dist/docs/phoenix/domain-model.mdx +2 -0
  298. package/dist/docs/phoenix/getting-started.mdx +5 -3
  299. package/dist/docs/phoenix/layout-slots.mdx +9 -9
  300. package/dist/docs/phoenix/localization.mdx +6 -2
  301. package/dist/docs/phoenix/migration-guide.mdx +12 -10
  302. package/dist/docs/phoenix/phoenix-cli.mdx +31 -16
  303. package/dist/docs/phoenix/project-structure.mdx +52 -30
  304. package/dist/docs/phoenix/quickstart.mdx +7 -7
  305. package/dist/docs/phoenix/sdk-builder-workflow.mdx +6 -6
  306. package/dist/docs/phoenix/testing.mdx +8 -0
  307. package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
  308. package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
  309. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  310. package/dist/domain/application/assistant/index.d.ts +2 -0
  311. package/dist/domain/application/assistant/index.js +1 -1
  312. package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
  313. package/dist/domain/core/schema/extended-schema-validator.js +1 -1
  314. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +12 -11
  315. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  316. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +1 -1
  317. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  318. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  319. package/dist/domain/system-components/child-entity-selection.js +1 -1
  320. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  321. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  322. package/dist/editor/Editor.d.ts +7 -0
  323. package/dist/editor/Editor.js +1 -1
  324. package/dist/editor/mocks/CreateMockYaml.js +2 -2
  325. package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
  326. package/dist/editor/mocks/EditorMockContext.js +1 -1
  327. package/dist/i18n/locales/cs/messages.js +1 -1
  328. package/dist/i18n/locales/da/messages.js +1 -1
  329. package/dist/i18n/locales/de/messages.js +1 -1
  330. package/dist/i18n/locales/de-AT/messages.js +1 -1
  331. package/dist/i18n/locales/en/messages.js +1 -1
  332. package/dist/i18n/locales/en-AU/messages.js +1 -1
  333. package/dist/i18n/locales/en-GB/messages.js +1 -1
  334. package/dist/i18n/locales/es/messages.js +1 -1
  335. package/dist/i18n/locales/fr/messages.js +1 -1
  336. package/dist/i18n/locales/hu/messages.js +1 -1
  337. package/dist/i18n/locales/it/messages.js +1 -1
  338. package/dist/i18n/locales/nl/messages.js +1 -1
  339. package/dist/i18n/locales/pl/messages.js +1 -1
  340. package/dist/i18n/locales/pt/messages.js +1 -1
  341. package/dist/i18n/locales/ro/messages.js +1 -1
  342. package/dist/i18n/locales/sk/messages.js +1 -1
  343. package/dist/i18n/locales/tr/messages.js +1 -1
  344. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  345. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  346. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +79 -80
  347. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +10 -11
  348. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +9 -10
  349. package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
  350. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  351. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
  352. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  353. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  354. package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
  355. package/dist/phoenix/application-spec/project-files.js +1 -1
  356. package/dist/phoenix/bin.d.ts +2 -0
  357. package/dist/phoenix/bin.js +2 -0
  358. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  359. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  360. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  361. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  362. package/dist/phoenix/check-configs/index.d.ts +8 -0
  363. package/dist/phoenix/check-configs/index.js +1 -0
  364. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  365. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  366. package/dist/phoenix/cli.d.ts +0 -1
  367. package/dist/phoenix/cli.js +1 -2
  368. package/dist/phoenix/commands/build.js +1 -1
  369. package/dist/phoenix/commands/check.js +1 -1
  370. package/dist/phoenix/commands/clean.js +1 -1
  371. package/dist/phoenix/commands/deploy.js +2 -2
  372. package/dist/phoenix/commands/deps/deps.d.ts +22 -1
  373. package/dist/phoenix/commands/deps/deps.js +2 -2
  374. package/dist/phoenix/commands/deps/index.d.ts +1 -1
  375. package/dist/phoenix/commands/deps/index.js +1 -1
  376. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -1
  377. package/dist/phoenix/commands/dev.js +4 -4
  378. package/dist/phoenix/commands/fix.js +1 -1
  379. package/dist/phoenix/commands/init.d.ts +17 -5
  380. package/dist/phoenix/commands/init.js +1 -1
  381. package/dist/phoenix/commands/link.js +1 -1
  382. package/dist/phoenix/commands/prettier.js +1 -1
  383. package/dist/phoenix/commands/sync.js +1 -1
  384. package/dist/phoenix/commands/unlink.js +1 -1
  385. package/dist/phoenix/services/application-spec-project-watcher.d.ts +0 -2
  386. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  387. package/dist/phoenix/services/lingui.d.ts +8 -0
  388. package/dist/phoenix/services/lingui.js +1 -1
  389. package/dist/phoenix/services/swc.js +1 -1
  390. package/dist/phoenix/services/vite-config.js +1 -1
  391. package/dist/phoenix/utils/index.d.ts +3 -2
  392. package/dist/phoenix/utils/index.js +1 -1
  393. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  394. package/dist/phoenix/utils/node-version/index.js +1 -0
  395. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  396. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  397. package/dist/phoenix/utils/package-info.d.ts +0 -9
  398. package/dist/phoenix/utils/package-info.js +1 -1
  399. package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
  400. package/dist/phoenix/utils/package-manager/index.js +1 -0
  401. package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
  402. package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
  403. package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
  404. package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
  405. package/dist/phoenix/utils/run-command.d.ts +11 -0
  406. package/dist/phoenix/utils/run-command.js +1 -1
  407. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  408. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  409. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  410. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  411. package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
  412. package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
  413. package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
  414. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +15 -4
  415. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -1
  416. package/dist/react-sdk/domain-context/index.d.ts +1 -0
  417. package/dist/react-sdk/domain-context/index.js +1 -1
  418. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
  419. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
  420. package/dist/ui-sdk/theme/types.d.ts +1 -1
  421. package/package.json +16 -9
  422. package/schema/domain-spec.json +86 -8
  423. package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
  424. package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
  425. package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
  426. package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
  427. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
  428. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
  429. package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
  430. package/dist/phoenix/commands/generate-project-files.js +0 -1
  431. /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +0 -0
  432. /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)
@@ -13,6 +13,7 @@ Make the configurator look like the brand's own product page. A furniture shop w
13
13
  - [Serve read mode](#serve-read-mode)
14
14
  - [Fit a phone](#fit-a-phone)
15
15
  - [Put a control on the product](#put-a-control-on-the-product)
16
+ - [Control the scene](#control-the-scene)
16
17
  - [The spec the layout reads](#the-spec-the-layout-reads)
17
18
  - [Try the example](#try-the-example)
18
19
  - [Test cases](#test-cases)
@@ -44,6 +45,7 @@ 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'
47
49
 
48
50
  const GUTTER = 24
49
51
  const PANEL_WIDTH = 380
@@ -122,14 +124,26 @@ const ConfiguratorLayout = () => {
122
124
  sx={{
123
125
  position: 'absolute',
124
126
  pointerEvents: 'auto',
125
- // Desktop: bottom left. Phone: at the top beside the fullscreen button, clear of the sheet's handle.
127
+ // Desktop: bottom left, above the row of view controls. Phone: at the top beside the fullscreen button,
128
+ // clear of the sheet's handle and the view controls.
126
129
  ...(isDesktop
127
- ? { insetBlockEnd: GUTTER, insetInlineStart: GUTTER }
130
+ ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
128
131
  : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
129
132
  }}
130
133
  >
131
134
  <MessageToast />
132
135
  </Box>
136
+ {/* A phone in fullscreen keeps only the reset, as the built-in layout does. Below 1024 pixels (`tablet`) the
137
+ free area beside the panel is narrow, so the reset shows only its icon there too. */}
138
+ <Box
139
+ component="div"
140
+ sx={{ position: 'absolute', insetBlockEnd: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
141
+ >
142
+ <SceneControls
143
+ compact={!isDesktop || (viewports?.includes('tablet') ?? false)}
144
+ resetOnly={!isDesktop && isFullscreen}
145
+ />
146
+ </Box>
133
147
  </Box>
134
148
  )}
135
149
 
@@ -319,6 +333,9 @@ export const ProductPanel = ({ collapsed = false, inSheet = false }: ProductPane
319
333
  | `phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] })` | The spec's `finalizeAction` components; the panel offers the primary one in its review step. `finalizeActionComponent` comes from `@salsita-ai/sdk/domain`. |
320
334
  | `phx.frontend.useFinalizeAction(handler)` | Run the finalize action's handler, with its pending state, its error and whether finalizing is possible; see [Request a quote](#request-a-quote). |
321
335
  | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | Read the fullscreen flag, and set it from the layout's own button. |
336
+ | `phx.frontend.useActiveViewState()` and `phx.frontend.useSetViewState()` | Read the active view state, one of the spec's `viewStates`, to mark the active view button, and make another one active; see [Control the scene](#control-the-scene). |
337
+ | `phx.frontend.useResetCamera()` | Move the camera back to the framing of the active camera, undoing the customer's orbit, pan and zoom. |
338
+ | `phx.frontend.useUndoRedo()` | Not used here: whether there is a change to undo or redo, and `undo` and `redo`, for a layout's own undo and redo buttons; see [Known gaps](#known-gaps). |
322
339
  | `useActiveViewports()` from `@salsita-ai/sdk/react` | The width classes of the configurator's container, or `null` before it is measured; the layout renders its phone arrangement unless it includes `desktop`, see [Fit a phone](#fit-a-phone). |
323
340
  | `phx.frontend.useConfiguratorMessages(onMessage)` | Receive violations, side-effect hints and errors one by one, with their text resolved, for the layout's own toast; see [Show messages](#show-messages). |
324
341
  | `useResolveLocalizable()` from `@salsita-ai/sdk/react` | Turns the localizable texts of the spec into strings in the current language. [Localization](?path=/docs/phoenix-localization--docs) describes it and `LocalizableMessage`. |
@@ -524,7 +541,7 @@ The button stays in the free area in both states, so the way back is always wher
524
541
 
525
542
  ## Show messages
526
543
 
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:
544
+ When a change is rejected because it breaks an invariant, when a committed change carries a hint, when an error is thrown while a change is validated, or when saving the configuration fails and later succeeds again, the configurator has a message for the customer. `phx.frontend.useConfiguratorMessages(onMessage)` calls `onMessage` once for each, with the text already in the customer's language, and the layout shows it its own way. Here a toast shows a message for six seconds, colored by its severity, at the bottom left of the free area above the view controls on a desktop, and at its top on a phone:
528
545
 
529
546
  ```tsx
530
547
  import { Alert } from '@mui/material'
@@ -543,7 +560,7 @@ const severityOf = (message: ConfiguratorMessage) => {
543
560
  return VIOLATION_SEVERITY[message.violation.severity]
544
561
  }
545
562
 
546
- return message.kind === 'error' ? 'error' : 'info'
563
+ return message.kind === 'error' || message.kind === 'saveError' ? 'error' : 'info'
547
564
  }
548
565
 
549
566
  export const MessageToast = () => {
@@ -580,7 +597,7 @@ export const MessageToast = () => {
580
597
  }
581
598
  ```
582
599
 
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.
600
+ 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
601
 
585
602
  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
603
 
@@ -603,7 +620,7 @@ export default phx.frontend.transformerBuilder.when
603
620
  .build('tree-trunk-delivery')
604
621
  ```
605
622
 
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.
623
+ [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
624
 
608
625
  ## Request a quote
609
626
 
@@ -1015,9 +1032,154 @@ export default phx.frontend.createCustomPhoenixEntityElement('EdgeFinishHotspot'
1015
1032
 
1016
1033
  [Html Hotspots](?path=/docs/controls-scene-html-hotspots--docs) describes the component and its other properties.
1017
1034
 
1035
+ ## Control the scene
1036
+
1037
+ 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.
1038
+
1039
+ **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:
1040
+
1041
+ ```yaml
1042
+ viewStates:
1043
+ - overview
1044
+ - edge
1045
+
1046
+ components:
1047
+ Table:
1048
+ fitRootPerspectiveCamera:
1049
+ edge:
1050
+ priority: 4
1051
+ fov: 35
1052
+ near: 100
1053
+ far: 10000
1054
+ minDistance: 800
1055
+ maxDistance: 9000
1056
+ distance: 2000
1057
+ azimuthAngle: 0.5
1058
+ polarAngle: 1.15
1059
+ fitMeshChanges: true
1060
+ $filter:
1061
+ viewports: [desktop]
1062
+ viewStates: [edge]
1063
+ edgePhone:
1064
+ priority: 3
1065
+ fov: 35
1066
+ near: 100
1067
+ far: 10000
1068
+ minDistance: 800
1069
+ maxDistance: 12000
1070
+ distance: 3000
1071
+ azimuthAngle: 0.5
1072
+ polarAngle: 1.15
1073
+ fitMeshChanges: true
1074
+ $filter:
1075
+ viewports: [mobile]
1076
+ viewStates: [edge]
1077
+ ```
1078
+
1079
+ **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:
1080
+
1081
+ ```tsx
1082
+ import { Box, Button, Tooltip } from '@mui/material'
1083
+
1084
+ import { phx } from '../../.phoenix/phx.js'
1085
+
1086
+ // The spec's view states, each with the label of the button that shows it
1087
+ const VIEWS = [
1088
+ { state: 'overview', label: 'Whole table' },
1089
+ { state: 'edge', label: 'Edge close-up' },
1090
+ ] as const
1091
+
1092
+ const RESET_ICON = 'M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4'
1093
+
1094
+ const SURFACE_SX = {
1095
+ borderRadius: 999,
1096
+ bgcolor: 'background.paper',
1097
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
1098
+ } as const
1099
+
1100
+ const BUTTON_SX = {
1101
+ minBlockSize: 44,
1102
+ minInlineSize: 44,
1103
+ borderRadius: 999,
1104
+ textTransform: 'none',
1105
+ fontWeight: 600,
1106
+ whiteSpace: 'nowrap',
1107
+ } as const
1108
+
1109
+ interface SceneControlsProps {
1110
+ // The reset button shows only its icon, with its label as tooltip and accessible name
1111
+ readonly compact?: boolean
1112
+ // Only the reset button, without the view buttons
1113
+ readonly resetOnly?: boolean
1114
+ }
1115
+
1116
+ // The layout's own camera controls: one button per view state of the spec, and a reset that undoes an orbit
1117
+ export const SceneControls = ({ compact = false, resetOnly = false }: SceneControlsProps) => {
1118
+ const activeView = phx.frontend.useActiveViewState()
1119
+ const setViewState = phx.frontend.useSetViewState()
1120
+ const resetCamera = phx.frontend.useResetCamera()
1121
+ const resetIcon = (
1122
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
1123
+ <path d={RESET_ICON} />
1124
+ </svg>
1125
+ )
1126
+
1127
+ return (
1128
+ <Box component="div" sx={{ display: 'flex', gap: 1 }}>
1129
+ {!resetOnly && (
1130
+ <Box component="div" role="group" aria-label="View" sx={{ ...SURFACE_SX, display: 'flex' }}>
1131
+ {VIEWS.map(view => {
1132
+ const isActive = activeView === view.state
1133
+
1134
+ return (
1135
+ <Button
1136
+ key={view.state}
1137
+ aria-pressed={isActive}
1138
+ onClick={() => setViewState(view.state)}
1139
+ sx={{
1140
+ ...BUTTON_SX,
1141
+ paddingInline: 2,
1142
+ bgcolor: isActive ? 'text.primary' : 'transparent',
1143
+ color: isActive ? 'background.paper' : 'text.primary',
1144
+ '&:hover': { bgcolor: isActive ? 'text.primary' : 'action.hover' },
1145
+ }}
1146
+ >
1147
+ {view.label}
1148
+ </Button>
1149
+ )
1150
+ })}
1151
+ </Box>
1152
+ )}
1153
+ <Tooltip title={compact ? 'Reset view' : ''}>
1154
+ <Button
1155
+ onClick={resetCamera}
1156
+ aria-label={compact ? 'Reset view' : undefined}
1157
+ startIcon={compact ? undefined : resetIcon}
1158
+ sx={{
1159
+ ...SURFACE_SX,
1160
+ ...BUTTON_SX,
1161
+ paddingInline: compact ? 0 : 2,
1162
+ color: 'text.primary',
1163
+ '&:hover': { bgcolor: 'background.paper', boxShadow: '0 6px 20px rgba(0, 0, 0, 0.18)' },
1164
+ }}
1165
+ >
1166
+ {compact ? resetIcon : 'Reset view'}
1167
+ </Button>
1168
+ </Tooltip>
1169
+ </Box>
1170
+ )
1171
+ }
1172
+ ```
1173
+
1174
+ - 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.
1175
+ - 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.
1176
+ - 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.
1177
+ - 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.
1178
+ - The hooks need no `viewControls` component. That component configures the built-in layout's view controls and has no effect here.
1179
+
1018
1180
  ## The spec the layout reads
1019
1181
 
1020
- The layout reads four components of the root entity and its navigation states; the scene components are in the complete implementation below.
1182
+ 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
1183
 
1022
1184
  ```yaml
1023
1185
  navigationStates:
@@ -1025,6 +1187,10 @@ navigationStates:
1025
1187
  - checkout
1026
1188
  - requested
1027
1189
 
1190
+ viewStates:
1191
+ - overview
1192
+ - edge
1193
+
1028
1194
  components:
1029
1195
  Table:
1030
1196
  detail:
@@ -1077,7 +1243,7 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
1077
1243
 
1078
1244
  - 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
1245
  - 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.
1246
+ - 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
1247
  - Tab reaches the selected card, and the arrow keys move the selection to the next or previous card.
1082
1248
  - Dragging in the area to the right of the panel orbits the camera.
1083
1249
  - **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.
@@ -1092,14 +1258,18 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
1092
1258
  - On the phone, the review step, **Request a quote** and the thank-you message work with the sheet collapsed and open.
1093
1259
  - On the phone, choosing **Tree trunk** shows the hint at the top of the free area, beside the fullscreen button.
1094
1260
  - On the phone, the fullscreen button removes the sheet and the table moves to the centre of the canvas; pressing it again brings the sheet back in the position it had.
1261
+ - **Edge close-up** moves the camera close to the near corner of the top, where the edge profile shows; the button is drawn dark and the other light. **Whole table** returns to the whole table.
1262
+ - 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.
1263
+ - 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.
1264
+ - 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
1265
 
1096
1266
  ## Known gaps
1097
1267
 
1098
1268
  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
1269
 
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.
1270
+ - **Messages that stay snackbars.** The toast shows violations, side effects, errors and failed saves, and the finalize button shows its own error. Two kinds of message stay snackbars. An error of a built-in action, such as one from `LayoutSlots.DesktopToolbar`, renders into `LayoutSlots.DesktopSnackbarsRoot`; this layout mounts neither, and a layout that mounts such an action mounts the root too, or the snackbar appears outside the configurator. A failure to start from a preset appears on the preset screen, before this layout mounts; a project replaces that screen with `phx.frontend.createPresetUi`, see [Configurator Interface → Preset UI](?path=/docs/phoenix-configurator-interface--docs#preset-ui).
1271
+ - **Toolbar actions.** Undo and redo, measurements, sharing and language switching are not offered. A layout can mount `LayoutSlots.DesktopToolbar` for the toolbar the spec configures, or build its own buttons; for undo and redo, `phx.frontend.useUndoRedo()` gives `canUndo`, `canRedo`, `undo` and `redo`, and pushes the same analytics events as the built-in buttons.
1272
+ - **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
1273
  - **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
1274
  - **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
1275
  - **Clone to edit in read mode.** With `shareCloneToEdit` set, the built-in layout's `LayoutSlots.DesktopReadonlyBanner` offers **Edit configuration** to a viewer; this layout's "View only" label offers nothing. A layout mounts the banner, or builds its own action with `LayoutSlots.useIsCloningAllowed()` and `LayoutSlots.CloneToEditDialog`.
@@ -1158,6 +1328,10 @@ navigationStates:
1158
1328
  - checkout
1159
1329
  - requested
1160
1330
 
1331
+ viewStates:
1332
+ - overview
1333
+ - edge
1334
+
1161
1335
  components:
1162
1336
  Table:
1163
1337
  detail:
@@ -1229,6 +1403,34 @@ components:
1229
1403
  fitMeshChanges: true
1230
1404
  $filter:
1231
1405
  viewports: [mobile]
1406
+ edge:
1407
+ priority: 4
1408
+ fov: 35
1409
+ near: 100
1410
+ far: 10000
1411
+ minDistance: 800
1412
+ maxDistance: 9000
1413
+ distance: 2000
1414
+ azimuthAngle: 0.5
1415
+ polarAngle: 1.15
1416
+ fitMeshChanges: true
1417
+ $filter:
1418
+ viewports: [desktop]
1419
+ viewStates: [edge]
1420
+ edgePhone:
1421
+ priority: 3
1422
+ fov: 35
1423
+ near: 100
1424
+ far: 10000
1425
+ minDistance: 800
1426
+ maxDistance: 12000
1427
+ distance: 3000
1428
+ azimuthAngle: 0.5
1429
+ polarAngle: 1.15
1430
+ fitMeshChanges: true
1431
+ $filter:
1432
+ viewports: [mobile]
1433
+ viewStates: [edge]
1232
1434
  sceneEntityRemoteObject:
1233
1435
  top:
1234
1436
  fileUrl: /models/tables.gltf
@@ -1645,7 +1847,7 @@ const severityOf = (message: ConfiguratorMessage) => {
1645
1847
  return VIOLATION_SEVERITY[message.violation.severity]
1646
1848
  }
1647
1849
 
1648
- return message.kind === 'error' ? 'error' : 'info'
1850
+ return message.kind === 'error' || message.kind === 'saveError' ? 'error' : 'info'
1649
1851
  }
1650
1852
 
1651
1853
  export const MessageToast = () => {
@@ -1879,6 +2081,101 @@ export const ReviewActions = ({ handler, label, onBack }: ReviewActionsProps) =>
1879
2081
  }
1880
2082
  ```
1881
2083
 
2084
+ ### ./src/\_shared/SceneControls.tsx
2085
+
2086
+ ```tsx
2087
+ import { Box, Button, Tooltip } from '@mui/material'
2088
+
2089
+ import { phx } from '../../.phoenix/phx.js'
2090
+
2091
+ // The spec's view states, each with the label of the button that shows it
2092
+ const VIEWS = [
2093
+ { state: 'overview', label: 'Whole table' },
2094
+ { state: 'edge', label: 'Edge close-up' },
2095
+ ] as const
2096
+
2097
+ const RESET_ICON = 'M4 12a8 8 0 1 0 2.4-5.7M4 4v4h4'
2098
+
2099
+ const SURFACE_SX = {
2100
+ borderRadius: 999,
2101
+ bgcolor: 'background.paper',
2102
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
2103
+ } as const
2104
+
2105
+ const BUTTON_SX = {
2106
+ minBlockSize: 44,
2107
+ minInlineSize: 44,
2108
+ borderRadius: 999,
2109
+ textTransform: 'none',
2110
+ fontWeight: 600,
2111
+ whiteSpace: 'nowrap',
2112
+ } as const
2113
+
2114
+ interface SceneControlsProps {
2115
+ // The reset button shows only its icon, with its label as tooltip and accessible name
2116
+ readonly compact?: boolean
2117
+ // Only the reset button, without the view buttons
2118
+ readonly resetOnly?: boolean
2119
+ }
2120
+
2121
+ // The layout's own camera controls: one button per view state of the spec, and a reset that undoes an orbit
2122
+ export const SceneControls = ({ compact = false, resetOnly = false }: SceneControlsProps) => {
2123
+ const activeView = phx.frontend.useActiveViewState()
2124
+ const setViewState = phx.frontend.useSetViewState()
2125
+ const resetCamera = phx.frontend.useResetCamera()
2126
+ const resetIcon = (
2127
+ <svg viewBox="0 0 24 24" width={20} height={20} fill="none" stroke="currentColor" strokeWidth={2}>
2128
+ <path d={RESET_ICON} />
2129
+ </svg>
2130
+ )
2131
+
2132
+ return (
2133
+ <Box component="div" sx={{ display: 'flex', gap: 1 }}>
2134
+ {!resetOnly && (
2135
+ <Box component="div" role="group" aria-label="View" sx={{ ...SURFACE_SX, display: 'flex' }}>
2136
+ {VIEWS.map(view => {
2137
+ const isActive = activeView === view.state
2138
+
2139
+ return (
2140
+ <Button
2141
+ key={view.state}
2142
+ aria-pressed={isActive}
2143
+ onClick={() => setViewState(view.state)}
2144
+ sx={{
2145
+ ...BUTTON_SX,
2146
+ paddingInline: 2,
2147
+ bgcolor: isActive ? 'text.primary' : 'transparent',
2148
+ color: isActive ? 'background.paper' : 'text.primary',
2149
+ '&:hover': { bgcolor: isActive ? 'text.primary' : 'action.hover' },
2150
+ }}
2151
+ >
2152
+ {view.label}
2153
+ </Button>
2154
+ )
2155
+ })}
2156
+ </Box>
2157
+ )}
2158
+ <Tooltip title={compact ? 'Reset view' : ''}>
2159
+ <Button
2160
+ onClick={resetCamera}
2161
+ aria-label={compact ? 'Reset view' : undefined}
2162
+ startIcon={compact ? undefined : resetIcon}
2163
+ sx={{
2164
+ ...SURFACE_SX,
2165
+ ...BUTTON_SX,
2166
+ paddingInline: compact ? 0 : 2,
2167
+ color: 'text.primary',
2168
+ '&:hover': { bgcolor: 'background.paper', boxShadow: '0 6px 20px rgba(0, 0, 0, 0.18)' },
2169
+ }}
2170
+ >
2171
+ {compact ? resetIcon : 'Reset view'}
2172
+ </Button>
2173
+ </Tooltip>
2174
+ </Box>
2175
+ )
2176
+ }
2177
+ ```
2178
+
1882
2179
  ### ./src/elements/ConfiguratorLayout.tsx
1883
2180
 
1884
2181
  ```tsx
@@ -1893,6 +2190,7 @@ import { BottomSheet } from '../_shared/BottomSheet.js'
1893
2190
  import { FullscreenToggle } from '../_shared/FullscreenToggle.js'
1894
2191
  import { MessageToast } from '../_shared/MessageToast.js'
1895
2192
  import { ProductPanel } from '../_shared/ProductPanel.js'
2193
+ import { SceneControls } from '../_shared/SceneControls.js'
1896
2194
 
1897
2195
  const GUTTER = 24
1898
2196
  const PANEL_WIDTH = 380
@@ -1971,14 +2269,26 @@ const ConfiguratorLayout = () => {
1971
2269
  sx={{
1972
2270
  position: 'absolute',
1973
2271
  pointerEvents: 'auto',
1974
- // Desktop: bottom left. Phone: at the top beside the fullscreen button, clear of the sheet's handle.
2272
+ // Desktop: bottom left, above the row of view controls. Phone: at the top beside the fullscreen button,
2273
+ // clear of the sheet's handle and the view controls.
1975
2274
  ...(isDesktop
1976
- ? { insetBlockEnd: GUTTER, insetInlineStart: GUTTER }
2275
+ ? { insetBlockEnd: 2 * GUTTER + TOUCH_TARGET, insetInlineStart: GUTTER }
1977
2276
  : { insetBlockStart: gutter, insetInline: `${gutter}px ${2 * gutter + TOUCH_TARGET}px` }),
1978
2277
  }}
1979
2278
  >
1980
2279
  <MessageToast />
1981
2280
  </Box>
2281
+ {/* A phone in fullscreen keeps only the reset, as the built-in layout does. Below 1024 pixels (`tablet`) the
2282
+ free area beside the panel is narrow, so the reset shows only its icon there too. */}
2283
+ <Box
2284
+ component="div"
2285
+ sx={{ position: 'absolute', insetBlockEnd: gutter, insetInlineEnd: gutter, pointerEvents: 'auto' }}
2286
+ >
2287
+ <SceneControls
2288
+ compact={!isDesktop || (viewports?.includes('tablet') ?? false)}
2289
+ resetOnly={!isDesktop && isFullscreen}
2290
+ />
2291
+ </Box>
1982
2292
  </Box>
1983
2293
  )}
1984
2294
 
@@ -12,7 +12,7 @@ Error page that is displayed when the configuration is not accesible.
12
12
 
13
13
  ## Code
14
14
 
15
- The `NotFoundPage` is provided in the default in the `ConfiguratorRoot` and `ConfiguratorApp`.
15
+ The configurator renders the layout element `ConfigurationNotFoundPage`, whose default is the built-in page, `ConfigurationNotFoundPage` from `@salsita-ai/sdk/react`. This example renders that component directly to show it. A project replaces the page by registering a layout element under the name `ConfigurationNotFoundPage`, see [Configurator Interface → Configuration Not Found Page](?path=/docs/phoenix-configurator-interface--docs#configuration-not-found-page), which also lists when the page is shown.
16
16
 
17
17
  ## Example
18
18
 
@@ -14,7 +14,7 @@ useAuthHook: true
14
14
  useClerk: true
15
15
  ```
16
16
 
17
- `phoenix sync` then adds `@clerk/clerk-react` as a direct application dependency and generates typed Clerk environment readers. `phoenix deployment:prepare-local` writes the deployment's public `CLERK_PUBLISHABLE_KEY` to `.env.generated`; application source should read it from `phx.frontendEnv`, not hardcode a key.
17
+ `@clerk/clerk-react` then becomes a dependency the project declares: run `phoenix deps` through your package manager (for example `pnpm phoenix deps`) and install to add it, because `phoenix sync`, `dev` and `build` stop while it is missing. `phoenix sync` generates typed Clerk environment readers. In a project on the legacy pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), `phoenix sync` adds the dependency itself. `phoenix deployment:prepare-local` writes the deployment's public `CLERK_PUBLISHABLE_KEY` to `.env.generated`; application source should read it from `phx.frontendEnv`, not hardcode a key.
18
18
 
19
19
  ## Configure the auth webhook
20
20