@salsita-ai/sdk 0.50.0-develop.26a71cda28 → 0.50.0-develop.2ad6270b01

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 (685) hide show
  1. package/README.md +19 -14
  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/core/expressions/index.d.ts +2 -0
  16. package/dist/application-spec/core/expressions/index.js +1 -0
  17. package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
  18. package/dist/application-spec/core/expressions/relation-expression-params.js +1 -0
  19. package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
  20. package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
  21. package/dist/application-spec/core/index.d.ts +1 -0
  22. package/dist/application-spec/core/index.js +1 -1
  23. package/dist/application-spec/errors/diagnostic-codes.d.ts +5 -0
  24. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  25. package/dist/application-spec/errors/diagnostic-messages.d.ts +5 -0
  26. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  27. package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
  28. package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
  29. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  30. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  31. package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
  32. package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
  33. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  34. package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
  35. package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
  36. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +15 -14
  37. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  38. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
  39. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  40. package/dist/application-spec/generate-application/code/story-files.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
  42. package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
  43. package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
  44. package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
  45. package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
  46. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +35 -0
  47. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
  48. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
  49. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
  50. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
  51. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +6 -6
  52. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +59 -63
  53. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
  54. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  55. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
  56. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +13 -13
  57. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
  58. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
  59. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +2 -1
  60. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  61. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  62. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  63. package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
  64. package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
  65. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
  66. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +31 -0
  67. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  68. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  69. package/dist/application-spec/generate-application/code/templates/globals.js +24 -44
  70. package/dist/application-spec/generate-application/code/templates/index.d.ts +3 -3
  71. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  72. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  73. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  74. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  75. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  76. package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
  77. package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
  78. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  79. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
  80. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
  81. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +3 -3
  82. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  83. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
  84. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +24 -7
  85. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  86. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
  87. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
  88. package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
  89. package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
  90. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
  91. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
  92. package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
  93. package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
  94. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
  95. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
  96. package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
  97. package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
  98. package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
  99. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
  100. package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
  101. package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
  102. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
  103. package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
  104. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
  105. package/dist/application-spec/generate-application/index.d.ts +2 -0
  106. package/dist/application-spec/generate-application/index.js +1 -1
  107. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
  108. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
  109. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +8 -3
  110. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  111. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  112. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +19 -5
  113. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  114. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +6 -4
  115. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
  116. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -2
  117. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  118. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  119. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
  120. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
  121. package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
  122. package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
  123. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
  124. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
  125. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
  126. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
  127. package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
  128. package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
  129. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
  130. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
  131. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  132. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +2 -1
  133. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  134. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
  135. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
  136. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +3 -0
  137. package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
  138. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  139. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +7 -4
  140. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  141. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
  142. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  143. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
  144. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
  145. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  146. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
  147. package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
  148. package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
  149. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
  150. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
  151. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
  152. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
  153. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
  154. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
  155. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
  156. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
  157. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
  158. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
  159. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +5 -0
  160. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
  161. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
  162. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
  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 +34 -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/categorize/earlier-generated-tsconfig.d.ts +9 -0
  170. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
  171. package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
  172. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  173. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  174. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  175. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  176. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
  177. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
  178. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
  179. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
  180. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  181. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  182. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
  183. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
  184. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
  185. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
  186. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
  187. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
  188. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
  189. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
  190. package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
  191. package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
  192. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
  193. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
  194. package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
  195. package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
  196. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
  197. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
  198. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
  199. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
  200. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +6 -0
  201. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  202. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +7 -4
  203. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  204. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
  205. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  206. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  207. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  208. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
  209. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
  210. package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
  211. package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
  212. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -3
  213. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  214. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  215. package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
  216. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
  217. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  218. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
  219. package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
  220. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
  221. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  222. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
  223. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
  224. package/dist/client/phoenix-api.d.ts +367 -0
  225. package/dist/configurator/ConfiguratorApp.js +1 -1
  226. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +36 -1
  227. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  228. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
  229. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  230. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
  231. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
  232. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
  233. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +7 -1
  234. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  235. package/dist/configurator/common/configurator-interface.d.ts +86 -3
  236. package/dist/configurator/common/configurator-interface.js +1 -1
  237. package/dist/configurator/common/index.d.ts +3 -1
  238. package/dist/configurator/common/index.js +1 -1
  239. package/dist/configurator/common/use-reset-camera.d.ts +6 -0
  240. package/dist/configurator/common/use-reset-camera.js +1 -0
  241. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +12 -0
  242. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
  243. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.d.ts +9 -0
  244. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +1 -0
  245. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
  246. package/dist/configurator/configuration-not-found-page/index.js +1 -0
  247. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
  248. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
  249. package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
  250. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  251. package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
  252. package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
  253. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +6 -0
  254. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
  255. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
  256. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +12 -0
  257. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
  258. package/dist/configurator/configurator-error-page/create-configurator-error-page.d.ts +9 -0
  259. package/dist/configurator/configurator-error-page/create-configurator-error-page.js +1 -0
  260. package/dist/configurator/configurator-error-page/index.d.ts +3 -0
  261. package/dist/configurator/configurator-error-page/index.js +1 -0
  262. package/dist/configurator/index.d.ts +2 -0
  263. package/dist/configurator/index.js +1 -1
  264. package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
  265. package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
  266. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  267. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
  268. package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
  269. package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
  270. package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
  271. package/dist/configurator/pages/DefaultPresetUi.js +1 -0
  272. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  273. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  274. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  275. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  276. package/dist/configurator/pages/RootPage.js +1 -1
  277. package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
  278. package/dist/configurator/pages/configurator-layout-name.js +1 -0
  279. package/dist/configurator/pages/default-configurator-elements.d.ts +12 -0
  280. package/dist/configurator/pages/default-configurator-elements.js +1 -0
  281. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  282. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  283. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  284. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  285. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  286. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  287. package/dist/configurator/pages/default-elements/index.d.ts +4 -0
  288. package/dist/configurator/pages/default-elements/index.js +1 -0
  289. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  290. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  291. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  292. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  293. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  294. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  295. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  296. package/dist/configurator/pages/index.d.ts +1 -0
  297. package/dist/configurator/pages/index.js +1 -1
  298. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
  299. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
  300. package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
  301. package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
  302. package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
  303. package/dist/configurator/preset-screen-elements/index.js +1 -0
  304. package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
  305. package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
  306. package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
  307. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  308. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
  309. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  310. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  311. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  312. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
  313. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  314. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
  315. package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
  316. package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
  317. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
  318. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
  319. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
  320. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
  321. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
  322. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
  323. package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
  324. package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
  325. package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
  326. package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
  327. package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
  328. package/dist/configurator/ui/assistant/form/form-model.js +1 -0
  329. package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
  330. package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
  331. package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
  332. package/dist/configurator/ui/assistant/form/form-state.js +1 -0
  333. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  334. package/dist/configurator/ui/assistant/form/index.js +1 -0
  335. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
  336. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
  337. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
  338. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
  339. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
  340. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
  341. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
  342. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
  343. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
  344. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
  345. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
  346. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
  347. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
  348. package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
  349. package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
  350. package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
  351. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  352. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  353. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  354. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  355. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  356. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  357. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  358. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  359. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  360. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  361. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  362. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  363. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
  364. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
  365. package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
  366. package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
  367. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +11 -0
  368. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
  369. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
  370. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
  371. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
  372. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  373. package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
  374. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  375. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
  376. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
  377. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
  378. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
  379. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  380. package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
  381. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
  382. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
  383. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
  384. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
  385. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +1 -1
  386. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  387. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +1 -1
  388. package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
  389. package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
  390. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  391. package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
  392. package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
  393. package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
  394. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  395. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  396. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  397. package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
  398. package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
  399. package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
  400. package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
  401. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
  402. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
  403. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
  404. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
  405. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +3 -3
  406. package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
  407. package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
  408. package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
  409. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
  410. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
  411. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
  412. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
  413. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  414. package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
  415. package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
  416. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  417. package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
  418. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
  419. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
  420. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
  421. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  422. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  423. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  424. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
  425. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
  426. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
  427. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
  428. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
  429. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  430. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  431. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -0
  432. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  433. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
  434. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
  435. package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
  436. package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
  437. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  438. package/dist/docs/fabs/basic.mdx +2 -2
  439. package/dist/docs/index.json +11 -1
  440. package/dist/docs/layouts/custom-layout.mdx +1635 -181
  441. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +2 -2
  442. package/dist/docs/other-features/error-5xx.mdx +1 -1
  443. package/dist/docs/other-features/not-found-404.mdx +1 -1
  444. package/dist/docs/phoenix/application-states.mdx +9 -7
  445. package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
  446. package/dist/docs/phoenix/components.mdx +6 -0
  447. package/dist/docs/phoenix/configurator-interface.mdx +164 -25
  448. package/dist/docs/phoenix/deployments.mdx +2 -6
  449. package/dist/docs/phoenix/domain-model.mdx +2 -0
  450. package/dist/docs/phoenix/finalization.mdx +1 -1
  451. package/dist/docs/phoenix/getting-started.mdx +6 -3
  452. package/dist/docs/phoenix/layout-slots.mdx +116 -0
  453. package/dist/docs/phoenix/localization.mdx +10 -6
  454. package/dist/docs/phoenix/migration-guide.mdx +24 -11
  455. package/dist/docs/phoenix/phoenix-cli.mdx +67 -20
  456. package/dist/docs/phoenix/project-structure.mdx +70 -33
  457. package/dist/docs/phoenix/quickstart.mdx +7 -7
  458. package/dist/docs/phoenix/sdk-builder-workflow.mdx +7 -7
  459. package/dist/docs/phoenix/testing.mdx +8 -0
  460. package/dist/docs/phoenix/webhooks.mdx +21 -4
  461. package/dist/domain/application/application-config.d.ts +3 -1
  462. package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
  463. package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
  464. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  465. package/dist/domain/application/assistant/index.d.ts +2 -0
  466. package/dist/domain/application/assistant/index.js +1 -1
  467. package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
  468. package/dist/domain/application/configurator-builder.d.ts +4 -1
  469. package/dist/domain/application/configurator-builder.js +1 -1
  470. package/dist/domain/core/model/model.d.ts +1 -1
  471. package/dist/domain/core/schema/extended-schema-validator.js +1 -1
  472. package/dist/domain/domain-context/index.d.ts +1 -1
  473. package/dist/domain/domain-context/undo-system.d.ts +28 -1
  474. package/dist/domain/domain-context/undo-system.js +1 -1
  475. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  476. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +12 -11
  477. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  478. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +1 -1
  479. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  480. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  481. package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
  482. package/dist/domain/extensions/attribute-switch.d.ts +1 -1
  483. package/dist/domain/extensions/attribute-switch.js +1 -1
  484. package/dist/domain/extensions/editable-offset-indicator.js +1 -1
  485. package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
  486. package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
  487. package/dist/domain/extensions/offset-indicator.js +1 -1
  488. package/dist/domain/extensions/scene-entity-animation.js +1 -1
  489. package/dist/domain/system-components/child-entity-selection.js +1 -1
  490. package/dist/domain/system-components/common/recipes.d.ts +21 -3
  491. package/dist/domain/system-components/common/recipes.js +1 -1
  492. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  493. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  494. package/dist/domain/system-components/drag-handle.js +1 -1
  495. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  496. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  497. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  498. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  499. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  500. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  501. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  502. package/dist/editor/Editor.d.ts +7 -0
  503. package/dist/editor/Editor.js +1 -1
  504. package/dist/editor/mocks/CreateMockYaml.js +2 -2
  505. package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
  506. package/dist/editor/mocks/EditorMockContext.js +1 -1
  507. package/dist/globals/index.d.ts +2 -0
  508. package/dist/i18n/locales/cs/messages.js +1 -1
  509. package/dist/i18n/locales/da/messages.js +1 -1
  510. package/dist/i18n/locales/de/messages.js +1 -1
  511. package/dist/i18n/locales/de-AT/messages.js +1 -1
  512. package/dist/i18n/locales/en/messages.js +1 -1
  513. package/dist/i18n/locales/en-AU/messages.js +1 -1
  514. package/dist/i18n/locales/en-GB/messages.js +1 -1
  515. package/dist/i18n/locales/es/messages.js +1 -1
  516. package/dist/i18n/locales/fr/messages.js +1 -1
  517. package/dist/i18n/locales/hu/messages.js +1 -1
  518. package/dist/i18n/locales/it/messages.js +1 -1
  519. package/dist/i18n/locales/nl/messages.js +1 -1
  520. package/dist/i18n/locales/pl/messages.js +1 -1
  521. package/dist/i18n/locales/pt/messages.js +1 -1
  522. package/dist/i18n/locales/ro/messages.js +1 -1
  523. package/dist/i18n/locales/sk/messages.js +1 -1
  524. package/dist/i18n/locales/tr/messages.js +1 -1
  525. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  526. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  527. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +146 -145
  528. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  529. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  530. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  531. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -2
  532. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +15 -14
  533. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
  534. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +14 -13
  535. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
  536. package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
  537. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  538. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
  539. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  540. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  541. package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
  542. package/dist/phoenix/application-spec/project-files.js +1 -1
  543. package/dist/phoenix/bin.d.ts +2 -0
  544. package/dist/phoenix/bin.js +2 -0
  545. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  546. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  547. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  548. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  549. package/dist/phoenix/check-configs/index.d.ts +8 -0
  550. package/dist/phoenix/check-configs/index.js +1 -0
  551. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  552. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  553. package/dist/phoenix/cli.d.ts +0 -1
  554. package/dist/phoenix/cli.js +1 -2
  555. package/dist/phoenix/commands/build.js +1 -1
  556. package/dist/phoenix/commands/check.js +1 -1
  557. package/dist/phoenix/commands/clean.js +1 -1
  558. package/dist/phoenix/commands/deploy.js +2 -2
  559. package/dist/phoenix/commands/deps/deps.d.ts +73 -0
  560. package/dist/phoenix/commands/deps/deps.js +3 -0
  561. package/dist/phoenix/commands/deps/index.d.ts +1 -0
  562. package/dist/phoenix/commands/deps/index.js +1 -0
  563. package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
  564. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
  565. package/dist/phoenix/commands/dev.js +5 -5
  566. package/dist/phoenix/commands/fix.js +1 -1
  567. package/dist/phoenix/commands/index.d.ts +1 -0
  568. package/dist/phoenix/commands/index.js +1 -1
  569. package/dist/phoenix/commands/init.d.ts +17 -5
  570. package/dist/phoenix/commands/init.js +1 -1
  571. package/dist/phoenix/commands/link.js +1 -1
  572. package/dist/phoenix/commands/prettier.js +1 -1
  573. package/dist/phoenix/commands/sync.js +1 -1
  574. package/dist/phoenix/commands/unlink.js +1 -1
  575. package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -2
  576. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  577. package/dist/phoenix/services/lingui.d.ts +8 -0
  578. package/dist/phoenix/services/lingui.js +1 -1
  579. package/dist/phoenix/services/swc.js +1 -1
  580. package/dist/phoenix/services/vite-config.js +1 -1
  581. package/dist/phoenix/utils/index.d.ts +4 -2
  582. package/dist/phoenix/utils/index.js +1 -1
  583. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  584. package/dist/phoenix/utils/node-version/index.js +1 -0
  585. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  586. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  587. package/dist/phoenix/utils/package-info.d.ts +0 -9
  588. package/dist/phoenix/utils/package-info.js +1 -1
  589. package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
  590. package/dist/phoenix/utils/package-manager/index.js +1 -0
  591. package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
  592. package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
  593. package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
  594. package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
  595. package/dist/phoenix/utils/run-command.d.ts +11 -0
  596. package/dist/phoenix/utils/run-command.js +1 -1
  597. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  598. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  599. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  600. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  601. package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +4 -0
  602. package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
  603. package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
  604. package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
  605. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +8 -0
  606. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
  607. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +41 -0
  608. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
  609. package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
  610. package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
  611. package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
  612. package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
  613. package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
  614. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
  615. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
  616. package/dist/react-sdk/domain-context/index.d.ts +5 -1
  617. package/dist/react-sdk/domain-context/index.js +1 -1
  618. package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
  619. package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
  620. package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
  621. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
  622. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  623. package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
  624. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
  625. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
  626. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
  627. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
  628. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
  629. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
  630. package/dist/react-sdk/elements/configurator-error-page-props.d.ts +20 -0
  631. package/dist/react-sdk/elements/configurator-error-page-props.js +1 -0
  632. package/dist/react-sdk/elements/index.d.ts +1 -0
  633. package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
  634. package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
  635. package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
  636. package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
  637. package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
  638. package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
  639. package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
  640. package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
  641. package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
  642. package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
  643. package/dist/react-sdk/handlers/index.d.ts +6 -0
  644. package/dist/react-sdk/handlers/index.js +1 -1
  645. package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
  646. package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
  647. package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
  648. package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
  649. package/dist/react-sdk/index.d.ts +1 -0
  650. package/dist/react-sdk/index.js +1 -1
  651. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +25 -0
  652. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +1 -0
  653. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +14 -0
  654. package/dist/react-sdk/responsive-state/canvas-padding.js +1 -0
  655. package/dist/react-sdk/responsive-state/index.d.ts +5 -0
  656. package/dist/react-sdk/responsive-state/index.js +1 -0
  657. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +111 -0
  658. package/dist/react-sdk/responsive-state/responsive-state-manager.js +1 -0
  659. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +10 -0
  660. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +1 -0
  661. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +11 -0
  662. package/dist/react-sdk/responsive-state/use-responsive-state.js +1 -0
  663. package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
  664. package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
  665. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
  666. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
  667. package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
  668. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +57 -0
  669. package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
  670. package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
  671. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
  672. package/dist/ui-sdk/theme/types.d.ts +1 -1
  673. package/package.json +48 -36
  674. package/schema/domain-spec.json +996 -205
  675. package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
  676. package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
  677. package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
  678. package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
  679. package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
  680. package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
  681. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
  682. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
  683. package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
  684. package/dist/phoenix/commands/generate-project-files.js +0 -1
  685. /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.js +0 -0
@@ -90,8 +90,8 @@ The spec is a table with one property, its edge finish, on a **Design** tab and
90
90
 
91
91
  ## Known gaps
92
92
 
93
- - The finalize button is disabled unless the spec configures `finalizeButton` or `finalizePage`, as in the built-in layout. A `finalizePage` is not shown by a project layout unless the layout renders it.
94
- - `LayoutSlots.DesktopSidebar` is the desktop sidebar. At phone width a project layout needs its own arrangement, for example the `Mobile*` members of `LayoutSlots` in a drawer.
93
+ - The footer is the basic sidebar footer, as in the built-in layout when the spec configures none. Its finalize button is disabled unless the spec configures the legacy `finalizeButton` or `finalizePage` components, which are declared only in TypeScript, and a project layout shows a `finalizePage` only if it renders it. New projects finalize over `finalizeAction` components, which the universal sidebar footer offers when the spec configures `universalSidebarFooter`.
94
+ - `LayoutSlots.DesktopSidebar` is the desktop sidebar. At phone width a project layout needs its own arrangement, for example the `Mobile*` members of `LayoutSlots`, listed in [Layout Slots](?path=/docs/phoenix-layout-slots--docs#phone-layout), in a drawer.
95
95
  - The tabs overlap the scene beside the sidebar; the safe area in this example does not leave room for them.
96
96
  - `miniSidebar` does not shrink the sidebar: the built-in layout does that, and here the sidebar fills its container. A layout that honours it reads `LayoutSlots.useSidebarContent().hasMiniSidebar` and gives the container no fixed height, anchored at the bottom for example, so the sidebar takes its content's height.
97
97
 
@@ -12,7 +12,7 @@ Error page that is displayed when needed.
12
12
 
13
13
  ## Code
14
14
 
15
- The `ErrorPage` is provided in the default in the `LoadedConfigurationDetailPage` and `PresetSelectionProvider`.
15
+ In production the configurator renders the layout element `ConfiguratorErrorPage` when an error reaches its error boundary or a configuration cannot be created from the only preset. Its default is a built-in page made with `ErrorPage` from `@salsita-ai/sdk/ui`; this example renders `ErrorPage` directly to show it. A project replaces the page with `phx.frontend.createConfiguratorErrorPage`, see [Configurator Interface → Configurator Error Page](?path=/docs/phoenix-configurator-interface--docs#configurator-error-page), which also lists the cases that still show another page.
16
16
 
17
17
  ## Example
18
18
 
@@ -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 with `phx.frontend.createConfigurationNotFoundPage`, 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
 
@@ -223,22 +223,24 @@ components:
223
223
 
224
224
  staticPerspectiveCamera:
225
225
  overview:
226
- position: [0, 10, 10]
227
- target: [0, 0, 0]
226
+ distance: 14
227
+ polarAngle: 0.8
228
+ azimuthAngle: 0
228
229
  $filter:
229
230
  viewStates: ['overview']
230
231
 
231
232
  detail:
232
- position: [2, 2, 2]
233
- target: [0, 0, 0]
233
+ distance: 3.5
234
+ polarAngle: 0.95
235
+ azimuthAngle: 0.8
234
236
  $filter:
235
237
  viewStates: ['closeup']
236
238
 
237
239
  staticOrthographicCamera:
238
240
  blueprint:
239
- position: [0, 20, 0]
240
- target: [0, 0, 0]
241
- zoom: 1.5
241
+ distance: 20
242
+ polarAngle: 0
243
+ frustumSize: 12
242
244
  $filter:
243
245
  viewStates: ['blueprint']
244
246
 
@@ -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
 
@@ -273,6 +273,12 @@ components:
273
273
 
274
274
  `$bind` is essential for form controls that need to show current state and accept changes, any UI element that both displays and modifies data, and interactive controls like attribute selectors, toggles, sliders, and input fields.
275
275
 
276
+ ### Types of bound values
277
+
278
+ The build checks that the field a `$read` or `$bind` reads fits the prop it is read into, the filter criterion, or, for `$filter: { $read: field }`, the whole filter. A `string` field read into a number prop, a nullable field read into a text, or an array read into a boolean is reported as `COMPONENT_BINDING_TYPE_MISMATCH` at the prop. A field whose schema gives its type only as `tsType` is not checked here. Expressions are checked where their type is settled.
279
+
280
+ A prop or filter criterion that takes an entity id, such as the `value` of `childEntitySelection` or `selectedEntityIds`, cannot hold an id written in YAML: an entity id is a branded type that only comes from the domain state. Bind it to a field or expression that holds the id; a written id is reported as `COMPONENT_STATIC_ENTITY_ID`.
281
+
276
282
  ### `$eval` - Inline Expressions
277
283
 
278
284
  `$eval` allows simple dynamic calculations directly in YAML without defining separate `$expression` implementations in TypeScript. It can appear wherever `$read` is allowed — including in component filter `active` properties — and is mutually exclusive with `$read` on the same property, but both can coexist on the same component instance across different properties.
@@ -165,6 +165,10 @@ const popNavigate = phx.frontend.usePopNavigate() // popNavigate() returns to th
165
165
  // Fullscreen: a flag in the configurator's state that the layout honours; it does not put the browser into fullscreen
166
166
  const isFullscreen = phx.frontend.useIsFullscreenActive()
167
167
  const setFullscreen = phx.frontend.useSetFullscreen() // setFullscreen(true) or setFullscreen(false)
168
+
169
+ // View state and camera
170
+ const setViewState = phx.frontend.useSetViewState() // setViewState(state) makes one of the spec's viewStates active
171
+ const resetCamera = phx.frontend.useResetCamera() // resetCamera() undoes the user's orbit, pan and zoom
168
172
  ```
169
173
 
170
174
  ### Controls
@@ -218,6 +222,9 @@ const controlViolations = phx.frontend.useControlViolations([])
218
222
  // Finalize violations
219
223
  const { disabled, hints } = phx.frontend.useFinalizeViolations()
220
224
 
225
+ // Messages for the user: violations of a rejected change, side-effect hints, errors and failed saves, one call each
226
+ phx.frontend.useConfiguratorMessages(message => showToast(message.text))
227
+
221
228
  // Map violations to hints
222
229
  const mapViolationHints = phx.frontend.useMapViolationHints()
223
230
  ```
@@ -384,24 +391,68 @@ Use these factories to customize the preset-selection screen without changing ho
384
391
  - `createPresetPageAction` adds project-specific content below the default preset cards.
385
392
  - `createPresetDeviceNotSupported` adds project-specific overlay content above the default preset cards.
386
393
 
394
+ Without `createPresetUi`, Phoenix renders its built-in preset screen, which is the default `PresetUi` registration in `defaultConfiguratorElements`. The action and the overlay are parts of that built-in screen and render nothing until the project registers them.
395
+
387
396
  ```typescript
388
397
  const PresetScreen = phx.frontend.createPresetUi(CustomPresetScreen)
389
398
  const PresetAction = phx.frontend.createPresetPageAction(PresetHelpAction)
390
399
  const PresetOverlay = phx.frontend.createPresetDeviceNotSupported(SmallScreenNotice)
391
400
  ```
392
401
 
402
+ ### Configuration Not Found Page
403
+
404
+ `phx.frontend.createConfigurationNotFoundPage` registers a page that replaces the one the configurator shows when it cannot open a configuration, as the layout element `ConfigurationNotFoundPage`. Without it, Phoenix renders its built-in "Configuration not accessible" page, which is the default `ConfigurationNotFoundPage` registration in `defaultConfiguratorElements`.
405
+
406
+ ```typescript
407
+ // src/elements/ConfigurationNotFoundPage.tsx
408
+ export default phx.frontend.createConfigurationNotFoundPage(({ onBack }) => (
409
+ <main>
410
+ <h1>We could not find this configuration</h1>
411
+ {onBack && <button onClick={onBack}>Start a new one</button>}
412
+ </main>
413
+ ))
414
+ ```
415
+
416
+ The helper types the page's props as `ConfigurationNotFoundPageProps` from `@salsita-ai/sdk/react`. A layout element registered under the name `ConfigurationNotFoundPage` with `createCustomPhoenixLayoutElement` replaces the page too, but its component is typed as taking only `children`.
417
+
418
+ - The page receives one optional prop, `onBack`, which returns to the start of the configurator. It is set when a configuration fails to load or is opened without a valid access key. It is not set on the start page itself, so a page that offers a way back shows it only when `onBack` is set.
419
+ - The configurator renders the element in four cases: a configuration fails to load, for example because its ID does not exist or the server rejects its access key; a configuration is opened without an access key for it; a signed-in user whose role may not create configurations (`acl.canCreate`) opens the start page; the preset screen has no preset category to show, for example because the host's `presetTags` match no preset. The last case happens inside the built-in preset screen, so a project that replaces it with `createPresetUi` decides what to show itself.
420
+ - The not-authenticated page, shown when session authentication fails or to an anonymous visitor who may not create a configuration, is its own element, which `createNotAuthenticatedPage` replaces. Its default, the `NotAuthenticatedPage` registration in `defaultConfiguratorElements`, renders the `ConfigurationNotFoundPage` element, so a project's not-found page shows there too.
421
+ - The admin's not-authorized page still shows the built-in page directly, not the element.
422
+
423
+ ### Configurator Error Page
424
+
425
+ `phx.frontend.createConfiguratorErrorPage` registers a page that replaces the one the configurator shows in production when it cannot go on, as the layout element `ConfiguratorErrorPage`. Without it, Phoenix renders its built-in "Whoops, something went wrong!" page, which is the default `ConfiguratorErrorPage` registration in `defaultConfiguratorElements`.
426
+
427
+ ```typescript
428
+ // src/elements/ConfiguratorErrorPage.tsx
429
+ export default phx.frontend.createConfiguratorErrorPage(({ reason, onRetry }) => (
430
+ <main>
431
+ <h1>{reason === 'presetCreationFailed' ? 'We could not start your design' : 'Something went wrong'}</h1>
432
+ <button onClick={onRetry}>{reason === 'presetCreationFailed' ? 'Reload' : 'Try again'}</button>
433
+ </main>
434
+ ))
435
+ ```
436
+
437
+ The helper types the page's props as `ConfiguratorErrorPageProps` from `@salsita-ai/sdk/react`. A layout element registered under the name `ConfiguratorErrorPage` with `createCustomPhoenixLayoutElement` replaces the page too, but its component is typed as taking only `children`.
438
+
439
+ - The page receives two props. `reason` says what failed: `uncaughtError` when rendering the configurator failed with an error nothing else handled, `presetCreationFailed` when starting a configuration from the only preset failed. `onRetry` tries again: after `uncaughtError` it renders the configurator again, after `presetCreationFailed` it reloads the page. The error itself is not passed; it is logged to the console.
440
+ - The configurator renders the element in two cases: an error reaches the configurator's error boundary, which wraps everything from the scene resources and the session down to the pages, including a failure while the application starts; and creating a configuration fails on a start screen with a single preset. The element is available in both, because the spec and its elements are part of the application before the configurator renders.
441
+ - A registered page that throws does not take the configurator down: the built-in page is shown in its place and the error is logged, until a hot reload replaces or removes the page.
442
+ - Three cases do not show the element. In development the configurator shows its detailed error pages instead. A failed preset creation with more than one preset is a snackbar on the preset screen (see [Loaded Configuration UI](#loaded-configuration-ui) for how a project shows it). The admin's own error page stays the built-in one, while the configurator the admin embeds renders the element.
443
+
393
444
  ### Loaded Configuration UI
394
445
 
395
446
  A layout element registered under the name `ConfiguratorLayout` replaces the whole UI of a loaded configuration, in owner and in read mode, whatever `layout` the spec sets. Without it, Phoenix renders the layout the spec selects. [Custom Layout](?path=/docs/layouts-custom-layout--docs) is a worked example: a fully custom product page with its panel on the left, built from the scene, the safe-area hook and state hooks.
396
447
 
397
448
  ```typescript
398
449
  // src/elements/ConfiguratorLayout.tsx
399
- import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
450
+ import { LayoutSlots } from '@salsita-ai/sdk/configurator'
400
451
 
401
452
  const SIDEBAR_WIDTH = 320
402
453
 
403
454
  export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', () => {
404
- const { containerRef, safeAreaRef } = useSceneSafeArea()
455
+ const { containerRef, safeAreaRef } = phx.frontend.useSceneSafeArea()
405
456
 
406
457
  return (
407
458
  <div ref={containerRef} style={{ position: 'absolute', inset: 0 }}>
@@ -420,17 +471,20 @@ export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout
420
471
  ```
421
472
 
422
473
  - `LayoutSlots.SharedCanvas` renders the scene. It is absolutely positioned and fills its nearest positioned ancestor, so the layout's root is positioned and covers the page. The layout positions its own UI above the canvas and after it in the markup, as the `aside` does; unpositioned content is painted under the canvas.
423
- - `useSceneSafeArea()`, called without arguments, tells the camera which part of the canvas the UI leaves free. Attach `containerRef` to the element that covers the whole canvas and `safeAreaRef` to the region the scene should stay visible in: the hook measures the gap between the two and the camera frames the scene inside the safe area. Without it the scene is framed in the whole canvas. The safe-area element lies over the canvas, so it sets `pointerEvents: 'none'` to leave orbiting and clicking to the scene. A `canvasPadding` component in the spec scales the measured gaps, see [Canvas Padding](?path=/docs/layouts-canvas-padding--docs).
474
+ - `phx.frontend.useSceneSafeArea()`, called without arguments, tells the camera which part of the canvas the UI leaves free. Attach `containerRef` to the element that covers the whole canvas and `safeAreaRef` to the region the scene should stay visible in: the hook measures the gap between the two and the camera frames the scene inside the safe area. Without it the scene is framed in the whole canvas. The safe-area element lies over the canvas, so it sets `pointerEvents: 'none'` to leave orbiting and clicking to the scene. A `canvasPadding` component in the spec scales the measured gaps, see [Canvas Padding](?path=/docs/layouts-canvas-padding--docs). Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it.
424
475
  - The layout has to mount `LayoutSlots.SharedCanvas`, or the project sets `appLoader: legacy`. Otherwise the app loader stays on screen.
425
- - The layout composes the rest from what `@salsita-ai/sdk/configurator` exports: `LayoutSlots.Services` and the other members of `LayoutSlots`.
476
+ - The layout composes the rest from what `@salsita-ai/sdk/configurator` exports: `LayoutSlots.Services` and the other members of `LayoutSlots`, which [Layout Slots](?path=/docs/phoenix-layout-slots--docs) lists with what each shows, what feeds it, what it renders when the spec configures nothing for it and what it does in read mode.
426
477
  - `LayoutSlots.DesktopSidebar` is the built-in desktop sidebar as one piece: the spec's tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel. Use it when the spec's property pages are what the customer should see and only their place changes, for example a sidebar on the left; build the controls yourself when they have to look like the brand's own. Without `width` it fills its container, so the layout positions and sizes that container; `miniSidebar` does not shrink it, so a layout that honours it reads `LayoutSlots.useSidebarContent().hasMiniSidebar` and lets the container take the sidebar's height. Its tabs sit outside it on the left; `side="start"` puts them on its right, for a sidebar on the left. In fullscreen it stays in place, transparent and inert, so a layout that wants the space back removes it while `phx.frontend.useIsFullscreenActive()` is set. See [Sidebar in a Custom Layout](?path=/docs/layouts-sidebar-in-a-custom-layout--docs).
427
- - Nothing of the built-in layouts is rendered for it. A project layout finalizes over the spec's `finalizeAction` components, see the finalize paragraph of [Hooks for a Project Layout](#hooks-for-a-project-layout). The `finalizePage` and `finalizeButton` components are legacy: they cannot be declared in YAML, only in TypeScript, and `Legacy.CommonFinalizePage`, which is deprecated, shows a `finalizePage` for projects that still have one. `LayoutDialog` renders only what the project registers with `createLayoutDialog` and is not part of the finalize flow. The preview start screen is `DesktopPreview` or `MobilePreview`, which the layout shows while `usePreview().isPreview` is set. Both previews frame the scene themselves, so the layout renders the component that calls `useSceneSafeArea()` only while `isPreview` is not set; it then measures when it mounts after the preview. The assistant panel is available to a project layout only inside `LayoutSlots.DesktopSidebar`.
478
+ - Nothing of the built-in layouts is rendered for it. A project layout finalizes over the spec's `finalizeAction` components, see the finalize paragraph of [Hooks for a Project Layout](#hooks-for-a-project-layout). The `finalizePage` and `finalizeButton` components are legacy: they cannot be declared in YAML, only in TypeScript, and `Legacy.CommonFinalizePage`, which is deprecated, shows a `finalizePage` for projects that still have one. `LayoutDialog` renders only what the project registers with `createLayoutDialog` and is not part of the finalize flow. The preview start screen is `DesktopPreview` or `MobilePreview`, which the layout shows while `phx.frontend.usePreview().isPreview` is set. Both previews frame the scene themselves, so the layout renders the component that calls `phx.frontend.useSceneSafeArea()` only while `isPreview` is not set; it then measures when it mounts after the preview. The assistant panel is available to a project layout only inside `LayoutSlots.DesktopSidebar`.
428
479
  - The layout reads the state it has to react to from hooks, listed with what each returns in [Hooks for a Project Layout](#hooks-for-a-project-layout).
480
+ - Messages for the user come one of two ways. `LayoutSlots.Services` shows violations of a rejected change, side-effect hints, errors and failed saves as the built-in snackbars, which render into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot` wherever the layout mounts it. `phx.frontend.useConfiguratorMessages(onMessage)` hands the same messages to the layout's own UI instead, with their text resolved, as the toast in [Custom Layout](?path=/docs/layouts-custom-layout--docs#show-messages) does; mount one of the two, not both, or every message is shown twice. A failure to save the configuration, and the first successful save after it, are messages too, so a layout that mounts neither shows no sign of a failed save. An error of the built-in finalize and other actions stays a snackbar either way. It renders into the snackbar root, so a layout that mounts none shows it outside the configurator, in the page's `body`. A failure to start a configuration from a preset is not a message of the hook either: it happens on the preset screen, before any `ConfiguratorLayout` mounts. In production with more than one preset it is a snackbar there, also on a preset screen replaced with `createPresetUi` (see [Preset UI](#preset-ui)), which reads the error from `phx.frontend.usePresetSelection().selectionError` and mounts `PresetSnackbarsRoot` to keep the snackbar inside the configurator. With a single preset it is the [Configurator Error Page](#configurator-error-page). A finalize action the layout runs with `phx.frontend.useFinalizeActions` or `phx.frontend.useFinalizeAction` reports its error as the action's `error` instead, neither as a message nor as a snackbar.
429
481
  - Any project layout element named `ConfiguratorLayout` takes over the page.
430
482
 
483
+ `defaultConfiguratorElements`, exported from `@salsita-ai/sdk/configurator`, holds the built-in UI as a `ConfiguratorLayout` registration that renders the layout the spec selects, the built-in not-found page as a `ConfigurationNotFoundPage` registration, the built-in not-authenticated page as a `NotAuthenticatedPage` registration, the built-in preset screen as a `PresetUi` registration, and the built-in error page as a `ConfiguratorErrorPage` registration. Generated code registers these defaults with `withDefaultElements`, apart from the project's elements, so the built-in UI is a registration like any other; a project element registered under the same name wins over a default. The list also holds the configurator's built-in controls and layout elements under the kinds the spec names them by, such as `attributeSelect` or `undoToolbarButton`, so a project element registered under one of those names replaces the built-in one wherever the spec names that kind. A config assembled by hand, without generated code, calls `withDefaultElements(defaultConfiguratorElements)` too; the lists are the only way the built-in elements are registered, so without it the page shows a "not found" box instead of the configurator, and a project layout shows one in place of every built-in control. The admin mounts a full configurator, so its list, `defaultAdminElements` from `@salsita-ai/sdk/admin`, holds the configurator's defaults followed by the admin's built-in pages, sidebars and actions; generated admin code passes it to `withDefaultElements` in place of `defaultConfiguratorElements`, because each call replaces the defaults passed before.
484
+
431
485
  #### Hooks for a Project Layout
432
486
 
433
- A project layout reads the product and the configurator's state through hooks, and changes them through the functions the hooks return. Each row names where its hook comes from; the `phx.frontend` hooks in these tables are also exported from `@salsita-ai/sdk/react` under the same name. No hook looks at read mode: the control hooks and the navigation and fullscreen setters keep working while `accessInfo.viewMode` is `true`, so the layout decides what a viewer can change.
487
+ A project layout reads the product and the configurator's state through hooks, and changes them through the functions the hooks return. Every hook in these tables is a member of `phx.frontend` and is also exported from `@salsita-ai/sdk/react` under the same name, unless its row names another export. No hook looks at read mode: the control hooks and the navigation and fullscreen setters keep working while `accessInfo.viewMode` is `true`, so the layout decides what a viewer can change.
434
488
 
435
489
  **The product**
436
490
 
@@ -453,36 +507,121 @@ The other control hooks in [Controls](#controls) take the same two arguments, `u
453
507
 
454
508
  **Texts**
455
509
 
456
- Texts from the spec, such as option titles and the `detail` fields, are `Localizable`, not `string`. `useResolveLocalizable()` from `@salsita-ai/sdk/react` returns a function that turns one into a string in the current language, which suits a list; `useLocalizable(text)` and `<LocalizableMessage>` resolve a single text, see [Localization](?path=/docs/phoenix-localization--docs).
510
+ Texts from the spec, such as option titles and the `detail` fields, are `Localizable`, not `string`. `phx.frontend.useResolveLocalizable()` returns a function that turns one into a string in the current language, which suits a list; `phx.frontend.useLocalizable(text)` and `<LocalizableMessage>` from `@salsita-ai/sdk/react` resolve a single text, see [Localization](?path=/docs/phoenix-localization--docs).
457
511
 
458
512
  **Mode, fullscreen, preview and navigation**
459
513
 
460
- | Hook | Returns |
461
- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
462
- | `phx.frontend.useAccessService()` | `{ configurationId, accessInfo }`. `accessInfo.viewMode` is `true` while a configuration shared for viewing is open, and also while the host sets the `readonly` property. |
463
- | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | The fullscreen flag, a `boolean`, and a function `(enabled: boolean) => void` that sets it. |
464
- | `usePreview()` from `@salsita-ai/sdk/configurator` | `{ isPreview, isExpanded, isPreviewEnabled, isHidden, enter, leave }`. The layout shows a preview start screen while `isPreview` is `true`. |
465
- | `phx.frontend.useActiveNavigationState()` | The active navigation state, one of the spec's `navigationStates`. |
466
- | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | `(state) => void`, which enters a state and remembers the active one, and `() => void`, which returns to the remembered state and does nothing when there is none. `phx.frontend.useNavigate()` returns `(state) => void`, which enters a state and forgets the history. |
467
- | `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state. |
468
- | `useActiveViewports()` from `@salsita-ai/sdk/react` | The responsive breakpoints the configurator's container satisfies, as `Viewport[]`, or `null` before it is measured. It follows the container, not the window, so it is the switch between a desktop and a phone layout. |
514
+ | Hook | Returns |
515
+ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
516
+ | `phx.frontend.useAccessService()` | `{ configurationId, accessInfo }`. `accessInfo.viewMode` is `true` while a configuration shared for viewing is open, and also while the host sets the `readonly` property. |
517
+ | `phx.frontend.useIsFullscreenActive()` and `phx.frontend.useSetFullscreen()` | The fullscreen flag, a `boolean`, and a function `(enabled: boolean) => void` that sets it. |
518
+ | `phx.frontend.usePreview()` | `{ isPreview, isExpanded, isPreviewEnabled, isHidden, enter, leave }`. The layout shows a preview start screen while `isPreview` is `true`. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
519
+ | `phx.frontend.useCloseAction()` | The host's close action, `() => Promise<void>`, or `null` when the integration mode offers none. It dispatches the web component's `close` event and, depending on the integration mode, first leaves for the go-back URL of the page's query or puts the configurator on standby. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
520
+ | `phx.frontend.useActiveNavigationState()` | The active navigation state, one of the spec's `navigationStates`. |
521
+ | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | `(state) => void`, which enters a state and remembers the active one, and `() => void`, which returns to the remembered state and does nothing when there is none. `phx.frontend.useNavigate()` returns `(state) => void`, which enters a state and forgets the history. |
522
+ | `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state. |
523
+ | `phx.frontend.useSetViewState()` | `(state) => void`, which makes the given view state, one of the spec's `viewStates`, the active one; setting the active state again keeps it. Cameras and components filtered by `viewStates` follow the change. |
524
+ | `phx.frontend.useResetCamera()` | `() => void`, which moves the camera back to the framing of the active camera configuration, undoing the user's orbit, pan and zoom, as the toolbar's reset button does. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
525
+ | `phx.frontend.useUndoRedo()` | `{ canUndo, canRedo, undo, redo }`: whether the undo history has a change to undo or to redo, and two `() => void` functions that undo or redo it, as the toolbar's undo and redo buttons do, pushing the same analytics events; each does nothing while there is nothing to undo or redo. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
526
+ | `phx.frontend.useTabNavigation(options?)` | `{ source, tabs, activeTab, select }` for the spec's tabs: `source` is `'sidebarTabs'` (every active `sidebarTabs` of the selected entity, in spec order) or `'horizontalTabs'` (the first active `horizontalTabs`), or `null` without tabs. Each tab is `{ index, label, icon, iconNode, navigationStates, state, isActive }`, with the label resolved, `icon` a PhxIcon name and `iconNode` a React node given by TypeScript spec code; `activeTab` is the first active tab or `null`. `select(index or navigation state)` enters the tab's first navigation state, as the built-in tabs do, pushing the same analytics event for `horizontalTabs`. `options.source` (`'auto'`, `'sidebarTabs'` or `'horizontalTabs'`) chooses the kind; `'auto'` prefers `sidebarTabs` when both are active, with a warning in development. `options.entityId` reads another entity's `sidebarTabs`. A tab without navigation states is left out, with a warning in development. It does not check read mode. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
527
+ | `phx.frontend.useStepNavigation()` | `{ steps, activeStep, activeIndex, isFirst, isLast, canGoNext, canGoPrevious, next, previous, goTo }` for the spec's `navigationSteps`, read from the first active instance on the root entity, the one the built-in layout shows. Each step is `{ index, label, navigationStates, state, status }`, with the label resolved, `state` the navigation state that enters the step and `status` `'complete'`, `'active'` or `'upcoming'`; while the active navigation state belongs to no step, `activeStep` is `null`, `activeIndex` is -1, every step is `'upcoming'` and the next step is the first one. A single step is both first and last. `next()` and `previous()` enter the following or preceding step, as the built-in step buttons do, pushing the same analytics events; `goTo(index or navigation state)` enters any step, as the header's stepper does, pushing its event. Each does nothing without a step to enter. A step without navigation states is left out, with a warning in development. It enforces no order and does not check read mode. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
528
+ | `phx.frontend.useActiveViewports()` | The responsive breakpoints the configurator's container satisfies, as `Viewport[]`, or `null` before it is measured. It follows the container, not the window, so it is the switch between a desktop and a phone layout. `desktop` is a container wider than 768 pixels and `mobile` one at most 768 pixels wide; `phone` is narrower than 480 and `tablet` between 480 and 1024 pixels; `landscape` and `portrait` follow the browser window's orientation. The built-in layout uses its phone arrangement unless `desktop` is active. |
529
+
530
+ **Steps and tabs**
531
+
532
+ A project layout builds its steps and tabs from the spec, so the structure stays in `navigationSteps`, `sidebarTabs` and `horizontalTabs`, where `$filter` switches it, and the layout decides how it looks. `phx.frontend.useStepNavigation()` gives a wizard its steps with a `status` each, and `next`, `previous` and `goTo`; `phx.frontend.useTabNavigation()` gives tabs with `isActive` each, and `select`. Both enter a navigation state, so controls, cameras and components filtered by `navigationStates` follow. Neither hides anything in read mode or blocks a step on violations: a layout that should not move on while the configuration is invalid combines `canGoNext` with `useStateValidity()`, and a stepper that offers only earlier steps enables the steps whose `status` is `'complete'`.
533
+
534
+ ```tsx
535
+ export const Wizard = () => {
536
+ const { steps, activeStep, canGoNext, canGoPrevious, next, previous, goTo } = phx.frontend.useStepNavigation()
537
+
538
+ return (
539
+ <nav aria-label="Steps">
540
+ <ol>
541
+ {steps.map(step => (
542
+ <li key={step.state} aria-current={step.status === 'active' ? 'step' : undefined}>
543
+ <button type="button" disabled={step.status === 'upcoming'} onClick={() => goTo(step.index)}>
544
+ {step.index + 1}. {step.label}
545
+ </button>
546
+ </li>
547
+ ))}
548
+ </ol>
549
+ <button type="button" disabled={!canGoPrevious} onClick={previous}>
550
+ Back
551
+ </button>
552
+ {canGoNext && (
553
+ <button type="button" onClick={next}>
554
+ Next: {steps[(activeStep?.index ?? -1) + 1]?.label}
555
+ </button>
556
+ )}
557
+ </nav>
558
+ )
559
+ }
560
+ ```
469
561
 
470
562
  **Violations**
471
563
 
472
- | Hook | Returns |
473
- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
474
- | `phx.frontend.useStateValidity()` | The validity of the last committed state: `{ valid: true, severity: null }`, or `{ valid: true, severity: 'notice' \| 'warning', entityViolations }`. A change that leaves a `fixable` or `fatal` violation is rejected and never committed, and neither is a change during which an error was thrown, so neither is seen here. |
475
- | `phx.frontend.useFinalizeViolations()` | `{ disabled, hints, violations }`. `disabled` is `true` while a `warning`, `fixable` or `fatal` violation holds or the configuration failed to save; `hints` is the violations' text, or `undefined`. |
564
+ | Hook | Returns |
565
+ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
566
+ | `phx.frontend.useStateValidity()` | The validity of the last committed state: `{ valid: true, severity: null }`, or `{ valid: true, severity: 'notice' \| 'warning', entityViolations }`. A change that leaves a `fixable` or `fatal` violation is rejected and never committed, and neither is a change during which an error was thrown, so neither is seen here. |
567
+ | `phx.frontend.useFinalizeViolations()` | `{ disabled, hints, violations }`. `disabled` is `true` while a `warning`, `fixable` or `fatal` violation holds or the configuration failed to save; `hints` is the violations' text, or `undefined`. |
568
+ | `phx.frontend.useConfiguratorMessages(onMessage)` | Nothing. It calls `onMessage(message)` once per message: `{ kind: 'violation', entityId, violation, text }` for each violation of the rejected state, including notices and warnings already present, so `violation.severity` tells the reason for the rejection (`fixable` or `fatal`) from them, `{ kind: 'sideEffect', text }` for each hint of a committed update, `{ kind: 'error', error, text }` when an error is thrown while a change is validated, with `text` the generic "Oops, something went wrong", `{ kind: 'saveError', error, text }` each time saving the configuration fails, with `error` what the save rejected with and `text` a generic message, and `{ kind: 'saveRecovery', text }` when a save succeeds after a failed one, with `text` "Configuration updated". `text` is resolved to the current language; a violation's is its `message`, or its `type` without one, and the built-in snackbar prefixes it with `entityId`. Hints committed before the layout mounted are not delivered, nor is a save that failed before it mounted; when the most recent change was rejected or threw, its messages are delivered again when the hook mounts. `onMessage` may be a new function on every render. On `phx.frontend` the message is typed by the project, so `violation.type` narrows to its violation types; from `@salsita-ai/sdk/react` the type is `ConfiguratorMessage`. |
569
+ | `phx.frontend.useFinalizeAction(handler)` | `{ run, isPending, error, disabled, hints }` for the `finalizeAction` whose `handler` it is given; see the Finalize paragraph below for how to call it. `run()` records the finalize-button click for analytics and runs the project's handler, does nothing while `disabled` or `isPending`, and returns a promise that resolves once the handler has settled and never rejects; `error` is what the handler's last run rejected with, or `null`; `disabled` and `hints` are those of `useFinalizeViolations()`. The type of the result is `UseFinalizeActionResult` from `@salsita-ai/sdk/configurator`, which also exports the hook. |
570
+ | `phx.frontend.useFinalizeActions()` | `{ actions, primary, secondary, disabled, hints }`: every active `finalizeAction` of the spec in spec order, `primary` the first `'primary'` one, or else the first, or `null`, and `secondary` the others; see the Finalize paragraph below. Each action is `{ key, handler, variant, label, title, icon, run, isPending, error, disabled }`, with `label` and `title` resolved; `run()` records the finalize-button click for analytics and runs the action's handler, does nothing while `disabled` or `isPending`, and returns a promise that never rejects. `disabled` and `hints` are those of `useFinalizeViolations()`. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
476
571
 
477
- `LayoutSlots.Services` shows rejected changes, errors and side-effect hints as snackbars, rendered into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot`. No hook delivers them to a layout's own UI.
572
+ `LayoutSlots.Services` shows every message of `useConfiguratorMessages` as a snackbar, `saveError` and `saveRecovery` included; see the messages paragraph of [Loaded Configuration UI](#loaded-configuration-ui) for choosing between the two and for the messages that stay snackbars.
478
573
 
479
574
  **Finalize**
480
575
 
481
- A project layout finalizes over the spec's `finalizeAction` components. `phx.frontend.useComponents({ componentTypes: [finalizeActionComponent] })`, with `finalizeActionComponent` from `@salsita-ai/sdk/domain`, lists them; each `state` is `{ variant, label, title, icon, handler }`, where `variant` is `'primary'` or `'secondary'` and `handler` names the project's handler registered with `phx.frontend.createPhoenixHandler`. The built-in footer offers the first `'primary'` action, or else the first action, as its button and the others in a menu, and disables them with `phx.frontend.useFinalizeViolations()`.
576
+ A project layout finalizes over the spec's `finalizeAction` components, each `{ variant, label, title, icon, handler }`, where `variant` is `'primary'` or `'secondary'` and `handler` names the project's handler registered with `phx.frontend.createPhoenixHandler`. `phx.frontend.useFinalizeActions()` is the convenient way: it lists them with what a button needs, runs their handlers itself, and can be called anywhere in the layout, including a dialog the layout opens with `useModal`, as often as it likes. It returns:
577
+
578
+ - `actions`, every active `finalizeAction` in spec order, and `primary` and `secondary`, the same actions split as the built-in footer splits them: `primary` is the first `'primary'` action, or else the first action, or `null` without any, and `secondary` the others in spec order.
579
+ - `disabled` and `hints`, those of `useFinalizeViolations()`: finalizing is not possible while a `warning`, `fixable` or `fatal` violation holds or the configuration failed to save, and `hints` says why.
580
+
581
+ Each action has `key`, a stable key for React, `handler`, `variant`, `label` and `title` resolved to the current language, `icon`, a `PhxIcon` name, and:
582
+
583
+ - `run()`, which records the finalize-button click for analytics and then runs the handler. It does nothing while `disabled` or `isPending`. It returns a promise that resolves once the handler has settled and never rejects, so a menu or a sheet can close after it.
584
+ - `isPending`, `true` while the handler runs.
585
+ - `error`, what the handler's last run rejected with, or `null`; a rejection that is not an `Error` is wrapped in one, with the value as its `cause`. It is cleared when the action runs again. No snackbar is raised; the layout shows the error its own way. A handler that throws while it is loaded, for example because it calls a hook that needs a provider the configurator does not have, makes `error` that error and the action `disabled`.
586
+ - `disabled`, `true` while finalizing is not possible, or when the handler could not be loaded.
587
+
588
+ ```tsx
589
+ export const Finalize = () => {
590
+ const { accessInfo } = phx.frontend.useAccessService()
591
+ const { primary, secondary, hints } = phx.frontend.useFinalizeActions()
592
+
593
+ if (accessInfo.viewMode || !primary) {
594
+ return null
595
+ }
596
+
597
+ return (
598
+ <div>
599
+ <button
600
+ type="button"
601
+ disabled={primary.disabled || primary.isPending}
602
+ onClick={() => void primary.run()}
603
+ title={hints}
604
+ >
605
+ {primary.isPending ? 'Sending…' : primary.label}
606
+ </button>
607
+ {primary.error && <p role="alert">{primary.error.message}</p>}
608
+ {secondary.map(action => (
609
+ <button key={action.key} type="button" disabled={action.disabled} onClick={() => void action.run()}>
610
+ {action.label}
611
+ </button>
612
+ ))}
613
+ </div>
614
+ )
615
+ }
616
+ ```
617
+
618
+ The configurator runs the handlers outside the layout, beside it, whenever a configuration is open, also in read mode and on every step. A handler can use what the configurator provides, such as `useModal`, but not a provider the layout itself adds; such a handler fails to load and shows as that action's `error`. An action's `isPending` and `error` are kept while the layout re-renders and while its components unmount and mount again.
619
+
620
+ To run a single action the layout already knows, `phx.frontend.useFinalizeAction(handler)` runs it in the layout itself and returns `{ run, isPending, error, disabled, hints }`, with the same meaning. It runs the project's handler factory, which calls hooks, so the layout calls it once per component, never in a loop or conditionally, and wraps that component in `<PhoenixHandlerBoundary name={handler}>` from `@salsita-ai/sdk/react`, so an edited handler takes effect without a reload. Its `isPending` and `error` belong to the mounted component: when it unmounts during a run, the handler keeps running, and a component mounted afterwards starts with `isPending` false and no `error`. [Custom Layout](?path=/docs/layouts-custom-layout--docs#request-a-quote) runs a finalize action this way from its review step.
482
621
 
483
- To offer the same buttons, a project layout mounts `<FinalizeActions />` from `@salsita-ai/sdk/configurator`: the built-in footer's finalize buttons, the primary action plus a menu of the others, disabled with the hints of `useFinalizeViolations()`, with a spinner while the handler runs and a snackbar when it fails. It renders nothing without a `finalizeAction`, and it does not check read mode, so a layout hides it while `accessInfo.viewMode` is `true`.
622
+ Neither hook checks read mode, so the layout hides finalizing while `accessInfo.viewMode` is `true`, as above.
484
623
 
485
- To build its own buttons, a layout runs an action with `usePhoenixHandler(action.state.handler).handler()` from `@salsita-ai/sdk/react`, which returns a promise. `usePhoenixHandler` runs the project's handler factory, which calls hooks, so each action gets its own component that calls it once, never in a loop, and that component is wrapped in `<PhoenixHandlerBoundary name={action.state.handler}>` from the same import, so an edited handler takes effect without a reload. The layout then shows the pending state, the error and the disabled state from `useFinalizeViolations()` itself.
624
+ Instead of its own buttons, a project layout can mount `<FinalizeActions />` from `@salsita-ai/sdk/configurator`: the built-in footer's finalize buttons, the primary action plus a menu of the others, disabled with the hints of `useFinalizeViolations()`, with a spinner while the handler runs and a snackbar when it fails. It renders nothing without a `finalizeAction`, and it does not check read mode either.
486
625
 
487
626
  ## TransformerBuilder
488
627
 
@@ -566,7 +705,7 @@ const NotAuthorizedAdminPage = phx.frontend.admin.createNotAuthorizedAdminPage((
566
705
  ```
567
706
 
568
707
  When no authentication-error page is registered, Phoenix falls back to the registered not-authorized page and then
569
- to the default configuration-not-found page.
708
+ to the built-in configuration-not-found page. The admin shows the built-in page even when the project registers a `ConfigurationNotFoundPage`, see [Configuration Not Found Page](#configuration-not-found-page).
570
709
 
571
710
  ## What We Learned
572
711
 
@@ -281,9 +281,7 @@ Phoenix provides two helper functions for reading environment variables with val
281
281
  **`createEnvReader`** - General purpose environment reader used in frontend and deployment contexts:
282
282
 
283
283
  ```typescript
284
- import { bool, str } from 'envalid'
285
-
286
- import { createEnvReader } from '@salsita-ai/sdk/common/env'
284
+ import { bool, createEnvReader, str } from '@salsita-ai/sdk/common/env'
287
285
 
288
286
  // Create a reader function
289
287
  const readEnv = createEnvReader({
@@ -301,9 +299,7 @@ console.log(env.SERVER_URL) // Typed and validated
301
299
 
302
300
  ```typescript
303
301
  // webhooks/webhooks.config.ts
304
- import { str } from 'envalid'
305
-
306
- import { createEnvReader } from '@salsita-ai/sdk/common/env'
302
+ import { createEnvReader, str } from '@salsita-ai/sdk/common/env'
307
303
 
308
304
  export const readRuntimeConfig = createEnvReader({
309
305
  AWS_S3_PUBLIC_RESOURCES_BUCKET: str(),
@@ -329,6 +329,8 @@ components:
329
329
 
330
330
  The code generator will automatically create an expression with the same name and infer the return type based on usage context.
331
331
 
332
+ The type of an expression must share values with the type every component expects where it is read, and with its declared type. An expression declared as a number and read into a `title`, or one read both into a `title` and into `offsetX`, has no value its implementation could return, so the build reports `EXPRESSION_READ_TYPE_CONFLICT` at the expression and names each place it is read. A type given only as `tsType` is not checked here.
333
+
332
334
  ## Constants
333
335
 
334
336
  Constants are pre-generated expressions that return fixed values. Under the hood, they are implemented as expressions but are automatically generated by the Phoenix system, so you don't need to write TypeScript implementation code for them.
@@ -15,7 +15,7 @@ Finalization is Phoenix's system for completing configurator sessions and proces
15
15
 
16
16
  > For integration-specific finalization flows — how host-specific data is passed in and how the host is notified on completion (event dispatch in `headless`, redirect in `handoff`) — see [Finalization (Internal)](?path=/docs/phoenix-integration-finalization-internal--docs) and [Finalization (External)](?path=/docs/phoenix-integration-finalization-external--docs).
17
17
 
18
- The universal sidebar footer offers the spec's `finalizeAction` components: Phoenix selects one primary footer action and places additional finalization actions in its menu. It never opens a `finalizePage`; the `finalizePage` and `finalizeButton` components are legacy, declared only in TypeScript, and used by the basic sidebar footer and the legacy layouts. Built-in finalization actions use configuration validity to disable the footer action and provide pending and generic error states, including for add-to-cart handlers. See [Universal Sidebar Footer](?path=/docs/layouts-sidebar-footer-universal--docs) for the layout behavior.
18
+ The universal sidebar footer offers the spec's `finalizeAction` components: Phoenix selects one primary footer action and places additional finalization actions in its menu. It never opens a `finalizePage`; the `finalizePage` and `finalizeButton` components are legacy, declared only in TypeScript, and used by the basic sidebar footer and the legacy layouts. Built-in finalization actions use configuration validity to disable the footer action and provide pending and generic error states, including for add-to-cart handlers. See [Universal Sidebar Footer](?path=/docs/layouts-sidebar-footer-universal--docs) for the layout behavior. A project layout (`ConfiguratorLayout`) offers the same actions with its own buttons through `phx.frontend.useFinalizeActions`, which lists them with the primary one picked as the footer picks it, each with its own `run`, pending state, error and disabled state, or through `phx.frontend.useFinalizeAction`, which runs one known action's handler and returns the same state with hints; see the Finalize paragraph of [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout).
19
19
 
20
20
  ## How Finalization Works
21
21
 
@@ -22,10 +22,11 @@ The frontend SDK provides the core libraries and components for building configu
22
22
 
23
23
  The Phoenix CLI (`phoenix` command) is the unified tool for all configurator development. It combines domain code generation, webhook building, deployment management, and development workflows into a single interface:
24
24
 
25
- - `phoenix init` - Start a new project with a working starter spec
25
+ - `phoenix init` - Start a new project: a working starter spec and a `package.json` with the SDK, the packages it requires next to it, ESLint and Prettier
26
26
  - `phoenix dev` - Start the development server with hot reload
27
27
  - `phoenix build` - Build the configurator for production
28
- - `phoenix sync` - Synchronize dependencies and generated code
28
+ - `phoenix sync` - Regenerate the generated code and project files
29
+ - `phoenix deps` - Add the SDK's missing peer dependencies to `package.json` and move out-of-range ones into range
29
30
  - `phoenix check` - Validate domain configuration and code
30
31
  - `phoenix fix` - Auto-fix common issues in domain files
31
32
 
@@ -57,12 +58,14 @@ This section provides practical guidance for developers who are new to Phoenix P
57
58
 
58
59
  Before diving into Phoenix Platform development, ensure you have:
59
60
 
60
- - **Node.js** and **pnpm** - Required versions are set automatically in the project
61
+ - **Node.js 22.13 or newer** and **a package manager** - The SDK and the Phoenix CLI run on Node.js 22.13 or newer (see [Starting a New Project](?path=/docs/phoenix-phoenix-cli--docs#starting-a-new-project)). A project installs with any package manager; with pnpm 11 it needs the settings in [Package manager](?path=/docs/phoenix-project-structure--docs#package-manager)
61
62
  - **JavaScript/TypeScript** - Phoenix generates TypeScript code and uses modern JavaScript patterns
62
63
  - **React** - The platform builds on React components, hooks, and modern React patterns
63
64
  - **Three.js** - Basic knowledge of 3D graphics, scenes, cameras, and rendering concepts
64
65
  - **React Three Fiber** - Understanding of declarative 3D development and R3F component patterns
65
66
 
67
+ The commands in this documentation use pnpm, as in `pnpm phoenix sync`. They work the same through any other package manager: `npx phoenix sync` with npm, `yarn phoenix sync` with Yarn, `bunx phoenix sync` with Bun.
68
+
66
69
  We assume you have working knowledge of these technologies before starting with Phoenix Platform. If you're new to any of these areas, we recommend familiarizing yourself with them first, as Phoenix Platform builds directly on these foundations.
67
70
 
68
71
  ### Your First Steps