@salsita-ai/sdk 0.50.0-develop.1ddc7020fd → 0.50.0-develop.26a71cda28

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 (809) hide show
  1. package/README.md +3 -3
  2. package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
  3. package/dist/application-spec/core/components/component-filter.d.ts +53 -0
  4. package/dist/application-spec/core/components/component-filter.js +1 -0
  5. package/dist/application-spec/core/components/index.d.ts +2 -0
  6. package/dist/application-spec/core/components/index.js +1 -0
  7. package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
  8. package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
  9. package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
  10. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  11. package/dist/application-spec/core/index.d.ts +1 -0
  12. package/dist/application-spec/core/index.js +1 -1
  13. package/dist/application-spec/core/json-value.d.ts +1 -1
  14. package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
  15. package/dist/application-spec/enhanced-json/index.d.ts +4 -0
  16. package/dist/application-spec/enhanced-json/index.js +1 -0
  17. package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
  18. package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
  19. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
  20. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
  21. package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
  22. package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
  23. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
  24. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
  25. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
  26. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
  27. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
  28. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
  29. package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
  30. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  31. package/dist/application-spec/errors/diagnostic-messages.d.ts +12 -0
  32. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  33. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +8 -1
  34. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  35. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
  36. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
  37. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
  38. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +56 -56
  39. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
  40. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  42. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
  43. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
  44. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
  45. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
  46. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  47. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  48. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  49. package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
  50. package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -7
  51. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  52. package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
  53. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +66 -42
  54. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
  55. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  56. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +14 -14
  57. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +6 -8
  58. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +4 -3
  59. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -2
  60. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
  61. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
  62. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  63. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  64. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
  65. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  66. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
  67. package/dist/application-spec/index.d.ts +1 -0
  68. package/dist/application-spec/index.js +1 -1
  69. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
  70. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  71. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
  72. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  73. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  74. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  75. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  76. package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
  77. package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
  78. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
  79. package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
  80. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
  81. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  82. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  83. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  84. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
  85. package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
  86. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
  87. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
  88. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
  89. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
  90. package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
  91. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  92. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  93. package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
  94. package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
  95. package/dist/client/authorized-client.d.ts +3 -1
  96. package/dist/client/authorized-client.js +1 -1
  97. package/dist/client/contract.d.ts +34 -0
  98. package/dist/client/contract.js +1 -1
  99. package/dist/client/index.d.ts +2 -2
  100. package/dist/client/index.js +1 -1
  101. package/dist/client/local-authorized-client.d.ts +3 -1
  102. package/dist/client/local-authorized-client.js +1 -1
  103. package/dist/client/memory-authorized-client.d.ts +3 -1
  104. package/dist/client/memory-authorized-client.js +1 -1
  105. package/dist/client/phoenix-api.d.ts +311 -2
  106. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  107. package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
  108. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  109. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +92 -3
  110. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  111. package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
  112. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  113. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +14 -4
  114. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  115. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
  116. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
  117. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  118. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
  119. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  120. package/dist/configurator/common/configurator-interface.d.ts +5 -1
  121. package/dist/configurator/common/configurator-interface.js +1 -1
  122. package/dist/configurator/common/frontend-analytics.d.ts +2 -0
  123. package/dist/configurator/common/frontend-analytics.js +1 -1
  124. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
  125. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
  126. package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
  127. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  128. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
  129. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
  130. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
  131. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
  132. package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
  133. package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
  134. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  135. package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
  136. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +2 -1
  137. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  138. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
  139. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  140. package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -2
  141. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  142. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
  143. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
  144. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
  145. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
  146. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
  147. package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
  148. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
  149. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
  150. package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
  151. package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
  152. package/dist/configurator/ui/assistant/thread-items.d.ts +13 -2
  153. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  154. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
  155. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
  156. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
  157. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
  158. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
  159. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
  160. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
  161. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
  162. package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
  163. package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
  164. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
  165. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
  166. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  167. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  168. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  169. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
  170. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
  171. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
  172. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
  173. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
  174. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
  175. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
  176. package/dist/docs/complex-use-cases/sketching.mdx +0 -38
  177. package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
  178. package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
  179. package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
  180. package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
  181. package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
  182. package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
  183. package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
  184. package/dist/docs/drag-and-drop/planes.mdx +1 -1
  185. package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
  186. package/dist/docs/index.json +32 -1
  187. package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
  188. package/dist/docs/layouts/custom-layout.mdx +981 -0
  189. package/dist/docs/layouts/header/fixed.mdx +2 -2
  190. package/dist/docs/layouts/header/floating.mdx +2 -2
  191. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
  192. package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
  193. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  194. package/dist/docs/other-features/side-effects.mdx +8 -11
  195. package/dist/docs/other-features/transformers.mdx +4 -0
  196. package/dist/docs/other-features/violation-messages.mdx +52 -56
  197. package/dist/docs/phoenix/configurator-interface.mdx +179 -80
  198. package/dist/docs/phoenix/deployments.mdx +1 -1
  199. package/dist/docs/phoenix/domain-model.mdx +4 -0
  200. package/dist/docs/phoenix/expression-context.mdx +11 -3
  201. package/dist/docs/phoenix/finalization.mdx +1 -1
  202. package/dist/docs/phoenix/getting-started.mdx +1 -1
  203. package/dist/docs/phoenix/phoenix-cli.mdx +48 -48
  204. package/dist/docs/phoenix/project-structure.mdx +18 -11
  205. package/dist/docs/phoenix/quickstart.mdx +2 -2
  206. package/dist/docs/phoenix/sdk-builder-workflow.mdx +8 -8
  207. package/dist/docs/phoenix/testing.mdx +140 -0
  208. package/dist/docs/phoenix/webhook-membership.mdx +10 -9
  209. package/dist/docs/phoenix/webhooks.mdx +2 -2
  210. package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
  211. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
  212. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -12
  213. package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
  214. package/dist/domain/admin-domain/index.d.ts +8 -3
  215. package/dist/domain/admin-domain/index.js +1 -1
  216. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
  217. package/dist/domain/application/GetThemeHandler.d.ts +1 -1
  218. package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
  219. package/dist/domain/application/admin-page-factories.d.ts +1 -2
  220. package/dist/domain/application/application-config.d.ts +7 -26
  221. package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
  222. package/dist/domain/application/assistant/assistant-fields.js +1 -0
  223. package/dist/domain/application/assistant/assistant-manifest.d.ts +11 -1
  224. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
  225. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  226. package/dist/domain/application/assistant/assistant-value-type.js +1 -1
  227. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
  228. package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
  229. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  230. package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
  231. package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
  232. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -11
  233. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  234. package/dist/domain/application/assistant/index.d.ts +6 -1
  235. package/dist/domain/application/assistant/index.js +1 -1
  236. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
  237. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
  238. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
  239. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
  240. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
  241. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
  242. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
  243. package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
  244. package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
  245. package/dist/domain/application/assistant/session-setup/index.js +1 -0
  246. package/dist/domain/application/assistant-mutations.d.ts +2 -1
  247. package/dist/domain/application/assistant-mutations.js +1 -1
  248. package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
  249. package/dist/domain/application/configurator-builder.d.ts +2 -2
  250. package/dist/domain/application/configurator-builder.js +1 -1
  251. package/dist/domain/application/create-initial-published-data.d.ts +6 -7
  252. package/dist/domain/application/index.d.ts +2 -6
  253. package/dist/domain/application/index.js +1 -1
  254. package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
  255. package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
  256. package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
  257. package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
  258. package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
  259. package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
  260. package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
  261. package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
  262. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +3 -3
  263. package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
  264. package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
  265. package/dist/domain/available-system-components.js +1 -1
  266. package/dist/domain/core/action/action-factory.d.ts +11 -0
  267. package/dist/domain/core/{action.d.ts → action/action.d.ts} +21 -16
  268. package/dist/domain/core/action/index.d.ts +2 -0
  269. package/dist/domain/core/action/index.js +1 -0
  270. package/dist/domain/core/component/domain-component-optic.d.ts +29 -40
  271. package/dist/domain/core/component/domain-component-optic.js +2 -2
  272. package/dist/domain/core/component/legacy-filter.d.ts +2 -17
  273. package/dist/domain/core/component/system-component-filter.d.ts +36 -18
  274. package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
  275. package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
  276. package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
  277. package/dist/domain/core/data-schema/data-schema-field-object.js +1 -0
  278. package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
  279. package/dist/domain/core/data-schema/data-schema-field.js +1 -0
  280. package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
  281. package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
  282. package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
  283. package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
  284. package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
  285. package/dist/domain/core/data-schema/data-schema.js +1 -0
  286. package/dist/domain/core/data-schema/index.d.ts +7 -0
  287. package/dist/domain/core/data-schema/index.js +1 -0
  288. package/dist/domain/core/domain-factory.d.ts +1 -1
  289. package/dist/domain/core/domain.d.ts +2 -2
  290. package/dist/domain/core/emission/index.d.ts +8 -0
  291. package/dist/domain/core/emission/index.js +1 -0
  292. package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
  293. package/dist/domain/core/emission/reset-state-emission.js +1 -0
  294. package/dist/domain/core/emission/state-emission.d.ts +4 -0
  295. package/dist/domain/core/emission/state-emission.js +1 -0
  296. package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
  297. package/dist/domain/core/emission/state-update-emission.js +1 -0
  298. package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
  299. package/dist/domain/core/emission/state-validation-result.js +1 -0
  300. package/dist/domain/core/emission/transformation-log.d.ts +2 -0
  301. package/dist/domain/core/emission/transformation-log.js +1 -0
  302. package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
  303. package/dist/domain/core/emission/transformer-log-entry.js +1 -0
  304. package/dist/domain/core/emission/transformer-log.d.ts +11 -0
  305. package/dist/domain/core/emission/transformer-log.js +1 -0
  306. package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
  307. package/dist/domain/core/emission/transformer-phase.js +1 -0
  308. package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
  309. package/dist/domain/core/expression/aliased-expressions.js +1 -0
  310. package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
  311. package/dist/domain/core/expression/constant-expressions.js +1 -1
  312. package/dist/domain/core/expression/custom-expression.d.ts +21 -8
  313. package/dist/domain/core/expression/custom-expression.js +1 -1
  314. package/dist/domain/core/expression/expression.d.ts +15 -17
  315. package/dist/domain/core/expression/index.d.ts +1 -2
  316. package/dist/domain/core/expression/index.js +1 -1
  317. package/dist/domain/core/index.d.ts +6 -1
  318. package/dist/domain/core/index.js +1 -1
  319. package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -1
  320. package/dist/domain/core/invariant/custom-invariants.d.ts +13 -0
  321. package/dist/domain/core/invariant/custom-invariants.js +1 -0
  322. package/dist/domain/core/invariant/index.d.ts +5 -0
  323. package/dist/domain/core/invariant/index.js +1 -0
  324. package/dist/domain/core/invariant/invariants.d.ts +10 -0
  325. package/dist/domain/core/invariant/invariants.js +1 -0
  326. package/dist/domain/core/invariant/violation-component.js +1 -0
  327. package/dist/domain/{invariants → core/invariant}/violation.d.ts +52 -4
  328. package/dist/domain/core/invariant/violation.js +1 -0
  329. package/dist/domain/core/recipe/index.d.ts +1 -0
  330. package/dist/domain/core/recipe/index.js +1 -0
  331. package/dist/domain/core/recipe/recipes.d.ts +23 -0
  332. package/dist/domain/core/recipe/recipes.js +1 -0
  333. package/dist/domain/core/relation/all-of-type-relation.d.ts +19 -0
  334. package/dist/domain/core/relation/all-of-type-relation.js +1 -0
  335. package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -1
  336. package/dist/domain/core/relation/component-factories.js +1 -0
  337. package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
  338. package/dist/domain/core/relation/composed-of.js +1 -0
  339. package/dist/domain/core/relation/direct-relation.d.ts +17 -0
  340. package/dist/domain/core/relation/index.d.ts +8 -0
  341. package/dist/domain/core/relation/index.js +1 -0
  342. package/dist/domain/core/relation/indirect-relation.d.ts +25 -0
  343. package/dist/domain/core/relation/indirect-relation.js +1 -0
  344. package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -3
  345. package/dist/domain/core/relation/reference-component.js +1 -0
  346. package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
  347. package/dist/domain/core/relation/reference-field.js +1 -0
  348. package/dist/domain/core/relation/relation-factory.d.ts +22 -0
  349. package/dist/domain/core/relation/relation-factory.js +1 -0
  350. package/dist/domain/core/state/migrations.d.ts +14 -45
  351. package/dist/domain/core/state/migrations.js +1 -1
  352. package/dist/domain/core/state/state.d.ts +1 -1
  353. package/dist/domain/domain-builder.d.ts +2 -5
  354. package/dist/domain/domain-builder.js +1 -1
  355. package/dist/domain/domain-context/action-system/action-system.d.ts +2 -2
  356. package/dist/domain/domain-context/action-system/action-system.js +1 -1
  357. package/dist/domain/domain-context/action-system/index.d.ts +1 -0
  358. package/dist/domain/domain-context/action-system/index.js +1 -0
  359. package/dist/domain/domain-context/analytics-system/index.d.ts +2 -0
  360. package/dist/domain/domain-context/analytics-system/index.js +1 -0
  361. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  362. package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +3 -4
  363. package/dist/domain/domain-context/dimension-system/dimension-system.js +1 -1
  364. package/dist/domain/domain-context/dimension-system/index.d.ts +1 -0
  365. package/dist/domain/domain-context/dimension-system/index.js +1 -0
  366. package/dist/domain/domain-context/domain-context-systems.d.ts +7 -7
  367. package/dist/domain/domain-context/index.d.ts +8 -18
  368. package/dist/domain/domain-context/index.js +1 -1
  369. package/dist/domain/domain-context/navigation-system/index.d.ts +3 -0
  370. package/dist/domain/domain-context/navigation-system/index.js +1 -0
  371. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -3
  372. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  373. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  374. package/dist/domain/domain-context/recipe-system/index.d.ts +1 -0
  375. package/dist/domain/domain-context/recipe-system/index.js +1 -0
  376. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +2 -3
  377. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
  378. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +2 -2
  379. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +2 -2
  380. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
  381. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +2 -2
  382. package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
  383. package/dist/domain/domain-context/relation-transformers/index.d.ts +4 -0
  384. package/dist/domain/domain-context/relation-transformers/index.js +1 -0
  385. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +2 -2
  386. package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
  387. package/dist/domain/domain-context/store-system/index.d.ts +4 -0
  388. package/dist/domain/domain-context/store-system/index.js +1 -0
  389. package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
  390. package/dist/domain/domain-context/store-system/store-system.d.ts +2 -36
  391. package/dist/domain/domain-context/store-system/store-system.js +2 -2
  392. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -1
  393. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  394. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +5 -7
  395. package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
  396. package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
  397. package/dist/domain/domain-context/transformers/context.d.ts +2 -4
  398. package/dist/domain/domain-context/transformers/context.js +1 -1
  399. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -2
  400. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  401. package/dist/domain/domain-context/transformers/index.d.ts +1 -1
  402. package/dist/domain/domain-context/transformers/index.js +1 -1
  403. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
  404. package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -3
  405. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  406. package/dist/domain/domain-context/undo-system.d.ts +2 -3
  407. package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
  408. package/dist/domain/domain-runtime/access/selectors.js +1 -1
  409. package/dist/domain/domain-runtime/access/types.d.ts +2 -0
  410. package/dist/domain/domain-runtime/access/types.js +1 -1
  411. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
  412. package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
  413. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  414. package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
  415. package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
  416. package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
  417. package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
  418. package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
  419. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +19 -23
  420. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  421. package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
  422. package/dist/domain/domain-runtime/domain-runtime.d.ts +84 -68
  423. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
  424. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
  425. package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
  426. package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
  427. package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
  428. package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
  429. package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
  430. package/dist/domain/domain-runtime/errors/index.js +1 -0
  431. package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
  432. package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
  433. package/dist/domain/domain-runtime/index.d.ts +1 -0
  434. package/dist/domain/domain-runtime/index.js +1 -1
  435. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
  436. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
  437. package/dist/domain/domain-runtime/spec/index.d.ts +5 -0
  438. package/dist/domain/domain-runtime/spec/index.js +1 -1
  439. package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
  440. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  441. package/dist/domain/{core/expression → domain-runtime/spec}/memoize-expression.d.ts +1 -2
  442. package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +2 -2
  443. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
  444. package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +1 -1
  445. package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
  446. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
  447. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
  448. package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -17
  449. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
  450. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.d.ts +4 -0
  451. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
  452. package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.d.ts +4 -0
  453. package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
  454. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +15 -0
  455. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
  456. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
  457. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
  458. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
  459. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
  460. package/dist/domain/{actions → domain-runtime/spec}/prepare-action-implementations.d.ts +1 -1
  461. package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
  462. package/dist/domain/{core/expression → domain-runtime/spec}/prepare-domain-expressions.d.ts +1 -1
  463. package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -6
  464. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  465. package/dist/domain/domain-runtime/spec/types.d.ts +3 -2
  466. package/dist/domain/{system-components → extensions}/canvas-config.d.ts +1 -1
  467. package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +1 -1
  468. package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
  469. package/dist/domain/{system-components → extensions}/client-side-image.d.ts +2 -2
  470. package/dist/domain/{system-components → extensions}/client-side-image.js +1 -1
  471. package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +3 -3
  472. package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
  473. package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +2 -2
  474. package/dist/domain/extensions/common/index.d.ts +4 -0
  475. package/dist/domain/extensions/common/index.js +1 -0
  476. package/dist/domain/{system-components → extensions}/custom-header.d.ts +1 -1
  477. package/dist/domain/extensions/custom-header.js +1 -0
  478. package/dist/domain/{system-components → extensions}/custom-price-footer.js +1 -1
  479. package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +1 -1
  480. package/dist/domain/extensions/custom-sidebar-footer.js +1 -0
  481. package/dist/domain/{system-components → extensions}/editable-angle-indicator.d.ts +3 -2
  482. package/dist/domain/extensions/editable-angle-indicator.js +1 -0
  483. package/dist/domain/{system-components → extensions}/editable-distance-dimension-indicator.d.ts +3 -2
  484. package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
  485. package/dist/domain/{system-components → extensions}/editable-offset-indicator.d.ts +3 -2
  486. package/dist/domain/extensions/editable-offset-indicator.js +1 -0
  487. package/dist/domain/{system-components → extensions}/editable-size-indicator.d.ts +2 -1
  488. package/dist/domain/extensions/editable-size-indicator.js +1 -0
  489. package/dist/domain/{system-components → extensions}/entity-header.d.ts +1 -1
  490. package/dist/domain/extensions/entity-header.js +1 -0
  491. package/dist/domain/{system-components → extensions}/finalize-component.js +1 -1
  492. package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +2 -2
  493. package/dist/domain/extensions/index.d.ts +69 -0
  494. package/dist/domain/extensions/index.js +1 -0
  495. package/dist/domain/{system-components → extensions}/list-selector-dimension-indicator.d.ts +3 -2
  496. package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
  497. package/dist/domain/{system-components → extensions}/navigation-steps.d.ts +2 -2
  498. package/dist/domain/extensions/offset-indicator.js +1 -0
  499. package/dist/domain/{system-components → extensions}/property-page.d.ts +1 -1
  500. package/dist/domain/extensions/property-page.js +1 -0
  501. package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +1 -1
  502. package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
  503. package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +2 -2
  504. package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +2 -2
  505. package/dist/domain/{system-components → extensions}/save-template-thumbnail.js +1 -1
  506. package/dist/domain/{system-components → extensions}/scene-entity-add-fab.d.ts +1 -1
  507. package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
  508. package/dist/domain/{system-components → extensions}/scene-entity-delete-fab.d.ts +1 -1
  509. package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
  510. package/dist/domain/{system-components → extensions}/scene-entity-html-hotspot.d.ts +1 -1
  511. package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
  512. package/dist/domain/{system-components → extensions}/scene-entity-navigation-hotspot.d.ts +1 -1
  513. package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
  514. package/dist/domain/{system-components → extensions}/scene-entity-object-html-hotspot.d.ts +1 -1
  515. package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
  516. package/dist/domain/{system-components → extensions}/scene-entity-select-hotspot.d.ts +1 -1
  517. package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
  518. package/dist/domain/{system-components → extensions}/sketching-edit.d.ts +1 -1
  519. package/dist/domain/extensions/sketching-edit.js +1 -0
  520. package/dist/domain/{system-components → extensions}/summary-component.js +1 -1
  521. package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +1 -1
  522. package/dist/domain/extensions/tool-menu-fab.js +1 -0
  523. package/dist/domain/{system-components → extensions}/toolbar.d.ts +1 -1
  524. package/dist/domain/extensions/toolbar.js +1 -0
  525. package/dist/domain/index.d.ts +2 -14
  526. package/dist/domain/index.js +1 -1
  527. package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
  528. package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
  529. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +28 -19
  530. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  531. package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
  532. package/dist/domain/mocks/create-mock-domain.js +1 -1
  533. package/dist/domain/mocks/create-mock-state.d.ts +2 -2
  534. package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
  535. package/dist/domain/mocks/create-test-application-config.js +1 -0
  536. package/dist/domain/mocks/index.d.ts +1 -0
  537. package/dist/domain/mocks/index.js +1 -1
  538. package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -2
  539. package/dist/domain/projections/blender-projections/camera.d.ts +2 -2
  540. package/dist/domain/projections/collision-projections.d.ts +1 -1
  541. package/dist/domain/projections/composition-projections.d.ts +1 -1
  542. package/dist/domain/projections/composition-projections.js +1 -1
  543. package/dist/domain/projections/constraint-projections.d.ts +1 -1
  544. package/dist/domain/projections/index.d.ts +1 -1
  545. package/dist/domain/projections/position-projections.d.ts +1 -1
  546. package/dist/domain/projections/projected-entities-projections.d.ts +1 -1
  547. package/dist/domain/projections/snapping-projections.d.ts +1 -1
  548. package/dist/domain/projections/validation-projections.d.ts +3 -20
  549. package/dist/domain/projections/validation-projections.js +1 -1
  550. package/dist/domain/sketching/sketching-projections.d.ts +1 -1
  551. package/dist/domain/system-components/application-config.d.ts +2 -2
  552. package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
  553. package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
  554. package/dist/domain/system-components/collision-geometry.d.ts +4 -2
  555. package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
  556. package/dist/domain/system-components/common/index.d.ts +0 -4
  557. package/dist/domain/system-components/common/index.js +1 -1
  558. package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
  559. package/dist/domain/system-components/common/recipes.d.ts +1 -2
  560. package/dist/domain/system-components/constraint.d.ts +10 -23
  561. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  562. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  563. package/dist/domain/system-components/index.d.ts +0 -68
  564. package/dist/domain/system-components/index.js +1 -1
  565. package/dist/domain/system-components/material-swatch.js +1 -1
  566. package/dist/domain/system-components/phoenix-entity-elements/admin-data-table-sidebar.d.ts +1 -1
  567. package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
  568. package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
  569. package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +1 -1
  570. package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
  571. package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
  572. package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
  573. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
  574. package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
  575. package/dist/domain/utils/eval-cache.d.ts +1 -1
  576. package/dist/domain/utils/map-nested-object.d.ts +1 -1
  577. package/dist/domain/utils/memo-eval.d.ts +2 -2
  578. package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
  579. package/dist/editor/mocks/EditorMockContext.js +1 -1
  580. package/dist/i18n/locales/cs/messages.js +1 -1
  581. package/dist/i18n/locales/da/messages.js +1 -1
  582. package/dist/i18n/locales/de/messages.js +1 -1
  583. package/dist/i18n/locales/de-AT/messages.js +1 -1
  584. package/dist/i18n/locales/en/messages.js +1 -1
  585. package/dist/i18n/locales/en-AU/messages.js +1 -1
  586. package/dist/i18n/locales/en-GB/messages.js +1 -1
  587. package/dist/i18n/locales/es/messages.js +1 -1
  588. package/dist/i18n/locales/fr/messages.js +1 -1
  589. package/dist/i18n/locales/hu/messages.js +1 -1
  590. package/dist/i18n/locales/it/messages.js +1 -1
  591. package/dist/i18n/locales/nl/messages.js +1 -1
  592. package/dist/i18n/locales/pl/messages.js +1 -1
  593. package/dist/i18n/locales/pt/messages.js +1 -1
  594. package/dist/i18n/locales/ro/messages.js +1 -1
  595. package/dist/i18n/locales/sk/messages.js +1 -1
  596. package/dist/i18n/locales/tr/messages.js +1 -1
  597. package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
  598. package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
  599. package/dist/legacy/domain-cli/gen/defaults.js +1 -7
  600. package/dist/legacy/domain-cli/gen/implementation.js +7 -11
  601. package/dist/legacy/domain-cli/gen/invariants.js +7 -6
  602. package/dist/legacy/domain-cli/gen/relations.js +1 -1
  603. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  604. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  605. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -5
  606. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  607. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  608. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  609. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +2 -0
  610. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
  611. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
  612. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
  613. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  614. package/dist/phoenix/commands/deploy.js +1 -1
  615. package/dist/phoenix/commands/init.d.ts +4 -4
  616. package/dist/phoenix/commands/init.js +1 -1
  617. package/dist/phoenix/commands/prettier.js +1 -1
  618. package/dist/phoenix/scripts/build-admin.js +1 -1
  619. package/dist/phoenix/services/source-archive.d.ts +1 -0
  620. package/dist/phoenix/services/source-archive.js +1 -1
  621. package/dist/phoenix/utils/git/index.d.ts +1 -0
  622. package/dist/phoenix/utils/git/index.js +1 -0
  623. package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
  624. package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
  625. package/dist/phoenix/utils/index.d.ts +1 -0
  626. package/dist/phoenix/utils/index.js +1 -1
  627. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
  628. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  629. package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
  630. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +53 -36
  631. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  632. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +9 -9
  633. package/dist/react-sdk/domain-context/index.d.ts +1 -1
  634. package/dist/react-sdk/domain-context/index.js +1 -1
  635. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
  636. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  637. package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
  638. package/dist/ui-sdk/theme/types.d.ts +1 -1
  639. package/dist/webhook/builders/common.d.ts +5 -0
  640. package/dist/webhook/builders/webhook-builder.js +1 -1
  641. package/package.json +3 -3
  642. package/schema/domain-spec.json +209 -16
  643. package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
  644. package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
  645. package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
  646. package/dist/application-spec/generate-application/code/templates/env-example.js +0 -90
  647. package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
  648. package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
  649. package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
  650. package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
  651. package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
  652. package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
  653. package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
  654. package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
  655. package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
  656. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
  657. package/dist/domain/actions/action-factory.d.ts +0 -10
  658. package/dist/domain/actions/prepare-action-implementations.js +0 -5
  659. package/dist/domain/application/element-registration.js +0 -1
  660. package/dist/domain/application/handler-registration.js +0 -1
  661. package/dist/domain/application/resolve-imported-transformers.d.ts +0 -23
  662. package/dist/domain/application/resolve-imported-transformers.js +0 -1
  663. package/dist/domain/application/resource-builder.d.ts +0 -13
  664. package/dist/domain/application/resource-builder.js +0 -1
  665. package/dist/domain/domain-context/recipe-system/recipes.d.ts +0 -55
  666. package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
  667. package/dist/domain/invariants/custom-invariants.d.ts +0 -20
  668. package/dist/domain/invariants/custom-invariants.js +0 -1
  669. package/dist/domain/invariants/invariants.d.ts +0 -74
  670. package/dist/domain/invariants/invariants.js +0 -1
  671. package/dist/domain/invariants/violation-component.js +0 -1
  672. package/dist/domain/invariants/violation.js +0 -1
  673. package/dist/domain/project-modules/index.d.ts +0 -1
  674. package/dist/domain/project-modules/index.js +0 -1
  675. package/dist/domain/project-modules/project-modules.js +0 -1
  676. package/dist/domain/relations/all-of-type-relation.d.ts +0 -30
  677. package/dist/domain/relations/all-of-type-relation.js +0 -1
  678. package/dist/domain/relations/component-factories.js +0 -1
  679. package/dist/domain/relations/composed-of.js +0 -1
  680. package/dist/domain/relations/direct-relation.d.ts +0 -27
  681. package/dist/domain/relations/indirect-relation.d.ts +0 -78
  682. package/dist/domain/relations/indirect-relation.js +0 -1
  683. package/dist/domain/relations/reference-component.js +0 -1
  684. package/dist/domain/relations/relation-factory.d.ts +0 -17
  685. package/dist/domain/relations/relation-factory.js +0 -1
  686. package/dist/domain/relations/relation-implementation.d.ts +0 -5
  687. package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
  688. package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
  689. package/dist/domain/system-components/custom-header.js +0 -1
  690. package/dist/domain/system-components/custom-sidebar-footer.js +0 -1
  691. package/dist/domain/system-components/editable-angle-indicator.js +0 -1
  692. package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
  693. package/dist/domain/system-components/editable-offset-indicator.js +0 -1
  694. package/dist/domain/system-components/editable-size-indicator.js +0 -1
  695. package/dist/domain/system-components/entity-header.js +0 -1
  696. package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
  697. package/dist/domain/system-components/offset-indicator.js +0 -1
  698. package/dist/domain/system-components/property-page.js +0 -1
  699. package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
  700. package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
  701. package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
  702. package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
  703. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
  704. package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
  705. package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
  706. package/dist/domain/system-components/sketching-edit.js +0 -1
  707. package/dist/domain/system-components/tool-menu-fab.js +0 -1
  708. package/dist/domain/system-components/toolbar.js +0 -1
  709. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
  710. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
  711. /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
  712. /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
  713. /package/dist/domain/core/{action.js → action/action.js} +0 -0
  714. /package/dist/domain/{relations/reference-field.js → core/data-schema/data-cell-value.js} +0 -0
  715. /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-array-field.js} +0 -0
  716. /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
  717. /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
  718. /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
  719. /package/dist/domain/{core/expression → domain-runtime/spec}/memoize-expression.js +0 -0
  720. /package/dist/domain/{core/expression → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
  721. /package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +0 -0
  722. /package/dist/domain/{system-components → extensions}/angle-indicator.js +0 -0
  723. /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
  724. /package/dist/domain/{system-components → extensions}/attribute-switch.js +0 -0
  725. /package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +0 -0
  726. /package/dist/domain/{system-components → extensions}/autorotate-camera-component.js +0 -0
  727. /package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +0 -0
  728. /package/dist/domain/{system-components → extensions}/basic-sidebar-footer.js +0 -0
  729. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
  730. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.js +0 -0
  731. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
  732. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.js +0 -0
  733. /package/dist/domain/{system-components → extensions}/canvas-config.js +0 -0
  734. /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
  735. /package/dist/domain/{system-components → extensions}/canvas-custom-environment.js +0 -0
  736. /package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +0 -0
  737. /package/dist/domain/{system-components → extensions}/canvas-padding.js +0 -0
  738. /package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +0 -0
  739. /package/dist/domain/{system-components → extensions}/canvas-preset-environment.js +0 -0
  740. /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
  741. /package/dist/domain/{system-components → extensions}/color-value.js +0 -0
  742. /package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.js +0 -0
  743. /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
  744. /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
  745. /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
  746. /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
  747. /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
  748. /package/dist/domain/{system-components → extensions}/dimension-indicator.d.ts +0 -0
  749. /package/dist/domain/{system-components → extensions}/dimension-indicator.js +0 -0
  750. /package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +0 -0
  751. /package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.js +0 -0
  752. /package/dist/domain/{system-components → extensions}/finalize-action.d.ts +0 -0
  753. /package/dist/domain/{system-components → extensions}/finalize-action.js +0 -0
  754. /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
  755. /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
  756. /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.js +0 -0
  757. /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
  758. /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.js +0 -0
  759. /package/dist/domain/{system-components → extensions}/fixed-header.d.ts +0 -0
  760. /package/dist/domain/{system-components → extensions}/fixed-header.js +0 -0
  761. /package/dist/domain/{system-components → extensions}/floating-header.d.ts +0 -0
  762. /package/dist/domain/{system-components → extensions}/floating-header.js +0 -0
  763. /package/dist/domain/{system-components → extensions}/hidden-header.d.ts +0 -0
  764. /package/dist/domain/{system-components → extensions}/hidden-header.js +0 -0
  765. /package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +0 -0
  766. /package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.js +0 -0
  767. /package/dist/domain/{system-components → extensions}/horizontal-tabs.js +0 -0
  768. /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
  769. /package/dist/domain/{system-components → extensions}/multilingual-text-value.js +0 -0
  770. /package/dist/domain/{system-components → extensions}/navigation-steps.js +0 -0
  771. /package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +0 -0
  772. /package/dist/domain/{system-components → extensions}/offset-anchors.js +0 -0
  773. /package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +0 -0
  774. /package/dist/domain/{system-components → extensions}/offset.d.ts +0 -0
  775. /package/dist/domain/{system-components → extensions}/offset.js +0 -0
  776. /package/dist/domain/{system-components → extensions}/other-action.d.ts +0 -0
  777. /package/dist/domain/{system-components → extensions}/other-action.js +0 -0
  778. /package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +0 -0
  779. /package/dist/domain/{system-components → extensions}/read-sidebar-footer.js +0 -0
  780. /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
  781. /package/dist/domain/{system-components → extensions}/rotatable.js +0 -0
  782. /package/dist/domain/{system-components → extensions}/rotation-handle.js +0 -0
  783. /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
  784. /package/dist/domain/{system-components → extensions}/scene-entity-animation.js +0 -0
  785. /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
  786. /package/dist/domain/{system-components → extensions}/scene-entity-control.js +0 -0
  787. /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
  788. /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.js +0 -0
  789. /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
  790. /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.js +0 -0
  791. /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
  792. /package/dist/domain/{system-components → extensions}/selectable-component.js +0 -0
  793. /package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +0 -0
  794. /package/dist/domain/{system-components → extensions}/sidebar-tabs.js +0 -0
  795. /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
  796. /package/dist/domain/{system-components → extensions}/simple-summary.js +0 -0
  797. /package/dist/domain/{system-components → extensions}/size.d.ts +0 -0
  798. /package/dist/domain/{system-components → extensions}/size.js +0 -0
  799. /package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +0 -0
  800. /package/dist/domain/{system-components → extensions}/sketching-draw.js +0 -0
  801. /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
  802. /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
  803. /package/dist/domain/{system-components → extensions}/text-value.js +0 -0
  804. /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
  805. /package/dist/domain/{system-components → extensions}/tool-controls.js +0 -0
  806. /package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +0 -0
  807. /package/dist/domain/{system-components → extensions}/universal-sidebar-footer.js +0 -0
  808. /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
  809. /package/dist/domain/{system-components → extensions}/view-controls.js +0 -0
@@ -153,10 +153,10 @@ The `formatControlViolationMessage` function is where the magic happens. It rece
153
153
  3. **Actionable guidance**: Tell users exactly what values are valid or how to fix the problem
154
154
  4. **Consistent terminology**: Use the same terms and units throughout your application
155
155
 
156
- Implement violations with custom message formatting in your domain TypeScript file:
156
+ Implement violations with custom message formatting in a file of `src/invariants/`:
157
157
 
158
158
  ```typescript
159
- // domain/index.ts
159
+ // src/invariants/invariants.ts
160
160
 
161
161
  // Pre-define translatable labels for nested localization
162
162
  const colorLabels = {
@@ -166,60 +166,56 @@ const colorLabels = {
166
166
  yellow: msg`yellow`,
167
167
  } as const
168
168
 
169
- const violationExpressions = invariantBuilder
170
- .withInvariants(
171
- implementCustomInvariants({
172
- Scene: {
173
- itIsNotZero: s => {
174
- if (s.x !== 0) {
175
- return [
176
- {
177
- type: 'itIsNotZero',
178
- severity: 'fatal',
179
- message: 'Scene is not zero',
180
- controlViolationPriority: 1,
181
- formatControlViolationMessage: () => {
182
- return msg({
183
- message: `Scene is not zero: The position would be ${s.x} which is not equal to 0`,
184
- })
185
- },
186
- },
187
- ]
188
- }
189
- return []
190
- },
191
- // ... tooMuchRight omitted for brevity ...
192
-
193
- // Static violation: severity, message and controlViolationPriority
194
- // are declared in YAML. Implementation only returns a boolean.
195
- wayTooFarRight: s => s.x < 200,
196
-
197
- colorPositionIncompatible: s => {
198
- const compatibleColors = ['red', 'blue', 'green'] as const
199
- if (s.x >= 200 && !compatibleColors.includes(s.color)) {
200
- return [
201
- {
202
- type: 'colorPositionIncompatible',
203
- severity: 'fatal',
204
- message: 'Color is not compatible with far right position',
205
- controlViolationPriority: 3,
206
- formatControlViolationMessage: (_emission, { i18n }) => {
207
- const labels = new Intl.ListFormat(i18n.locale, {
208
- style: 'long',
209
- type: 'disjunction',
210
- }).format(compatibleColors.map(c => i18n.t(colorLabels[c])))
211
-
212
- return msg({ message: `Far right position is only available for ${labels}` })
213
- },
214
- },
215
- ]
216
- }
217
- return []
218
- },
219
- },
220
- })
221
- )
222
- .buildViolationExpressions()
169
+ export default phx.domain.implementCustomInvariants({
170
+ Buckyball: {
171
+ itIsNotZero: s => {
172
+ if (s.x !== 0) {
173
+ return [
174
+ {
175
+ type: 'itIsNotZero',
176
+ severity: 'fatal',
177
+ message: 'Scene is not zero',
178
+ controlViolationPriority: 1,
179
+ formatControlViolationMessage: () => {
180
+ return msg({
181
+ message: `Scene is not zero: The position would be ${s.x} which is not equal to 0`,
182
+ })
183
+ },
184
+ },
185
+ ]
186
+ }
187
+ return []
188
+ },
189
+ // ... tooMuchRight omitted for brevity ...
190
+
191
+ // Static violation: severity, message and controlViolationPriority
192
+ // are declared in YAML. Implementation only returns a boolean.
193
+ wayTooFarRight: s => s.x < 200,
194
+
195
+ colorPositionIncompatible: s => {
196
+ const compatibleColors = ['red', 'blue', 'green'] as const
197
+ if (s.x >= 200 && !compatibleColors.includes(s.color)) {
198
+ return [
199
+ {
200
+ type: 'colorPositionIncompatible',
201
+ severity: 'fatal',
202
+ message: 'Color is not compatible with far right position',
203
+ controlViolationPriority: 3,
204
+ formatControlViolationMessage: (_emission, { i18n }) => {
205
+ const labels = new Intl.ListFormat(i18n.locale, {
206
+ style: 'long',
207
+ type: 'disjunction',
208
+ }).format(compatibleColors.map(c => i18n.t(colorLabels[c])))
209
+
210
+ return msg({ message: `Far right position is only available for ${labels}` })
211
+ },
212
+ },
213
+ ]
214
+ }
215
+ return []
216
+ },
217
+ },
218
+ })
223
219
  ```
224
220
 
225
221
  ### Internationalization with Dynamic Content
@@ -25,8 +25,9 @@ The configurator interface is generated in `.phoenix/configurator-interface.ts`:
25
25
 
26
26
  ```typescript
27
27
  // .phoenix/configurator-interface.ts (AUTO-GENERATED - DO NOT EDIT)
28
- import {'{'} createConfiguratorInterface {'}'} from '@salsita-ai/sdk/configurator'
29
- import {'{'} configuratorBuilder {'}'} from './domain.js'
28
+ import { createConfiguratorInterface } from '@salsita-ai/sdk/configurator'
29
+
30
+ import { configuratorBuilder } from './domain.js'
30
31
 
31
32
  export const configuratorInterface = createConfiguratorInterface(configuratorBuilder)
32
33
 
@@ -64,9 +65,9 @@ type CustomMaterial = Phx['AdminModel']['CustomMaterial']
64
65
  Access the configurator interface via `phx.frontend`:
65
66
 
66
67
  ```typescript
67
- export const CustomComponent = () => {'{'}
68
+ export const CustomComponent = () => {
68
69
  // Access domain systems
69
- const {'{'} navigationSystem, storeSystem {'}'} = phx.frontend.useDomain()
70
+ const { navigationSystem, storeSystem } = phx.frontend.useDomain()
70
71
 
71
72
  // Entity state hooks
72
73
  const rootEntity = phx.frontend.useRootEntityState()
@@ -76,11 +77,11 @@ export const CustomComponent = () => {'{'}
76
77
  const selectEntity = phx.frontend.useSelectEntity()
77
78
 
78
79
  // Type-safe entity access
79
- if (selectedEntity && Cabinet.is(selectedEntity)) {'{'}
80
+ if (selectedEntity && Cabinet.is(selectedEntity)) {
80
81
  // selectedEntity is now typed as $Cabinet
81
82
  console.log(selectedEntity.width, selectedEntity.$area)
82
- {'}'}
83
- {'}'}
83
+ }
84
+ }
84
85
  ```
85
86
 
86
87
  ## Core Hooks
@@ -90,16 +91,16 @@ The configurator interface provides 100+ hooks organized by category. Use TypeSc
90
91
  ### Domain & Application Context
91
92
 
92
93
  ```typescript
93
- const ExampleComponent = () => {'{'}
94
+ const ExampleComponent = () => {
94
95
  // Core domain systems
95
- const {'{'} navigationSystem, storeSystem, entitySystem {'}'} = phx.frontend.useDomain()
96
+ const { navigationSystem, storeSystem, entitySystem } = phx.frontend.useDomain()
96
97
 
97
98
  // Domain application context
98
- const {'{'} configurationPersistSystem {'}'} = phx.frontend.useDomainApplication()
99
+ const { configurationPersistSystem } = phx.frontend.useDomainApplication()
99
100
 
100
101
  // Full configurator context
101
- const {'{'} imageRenderingSystem {'}'} = phx.frontend.useConfigurator()
102
- {'}'}
102
+ const { imageRenderingSystem } = phx.frontend.useConfigurator()
103
+ }
103
104
  ```
104
105
 
105
106
  ### State Subscriptions
@@ -157,26 +158,31 @@ const viewState = phx.frontend.useActiveViewState()
157
158
  const toolState = phx.frontend.useActiveToolState()
158
159
 
159
160
  // Navigation actions
160
- const navigate = phx.frontend.useNavigate()
161
- const pushNavigate = phx.frontend.usePushNavigate()
162
- const popNavigate = phx.frontend.usePopNavigate()
161
+ const navigate = phx.frontend.useNavigate() // navigate(state) replaces the active state and clears the history
162
+ const pushNavigate = phx.frontend.usePushNavigate() // pushNavigate(state) remembers the active state for popNavigate
163
+ const popNavigate = phx.frontend.usePopNavigate() // popNavigate() returns to the remembered state, if there is one
164
+
165
+ // Fullscreen: a flag in the configurator's state that the layout honours; it does not put the browser into fullscreen
166
+ const isFullscreen = phx.frontend.useIsFullscreenActive()
167
+ const setFullscreen = phx.frontend.useSetFullscreen() // setFullscreen(true) or setFullscreen(false)
163
168
  ```
164
169
 
165
170
  ### Controls
166
171
 
167
172
  ```typescript
168
- // Control hooks for UI inputs
169
- const swatchSelection = phx.frontend.useSwatchSelection(entityId, controlId)
170
- const textValue = phx.frontend.useTextValue(entityId, controlId)
171
- const attributeSelection = phx.frontend.useAttributeSelection(entityId, controlId)
172
- const attributeSwitch = phx.frontend.useAttributeSwitch(entityId, controlId)
173
- const distanceDimension = phx.frontend.useDistanceDimension(entityId, controlId)
174
- const angleDimension = phx.frontend.useAngleDimension(entityId, controlId)
175
- const genericDimension = phx.frontend.useGenericDimension(entityId, controlId)
173
+ // Control hooks for UI inputs: the entity id and the instance name of the control component on it
174
+ // useSwatchSelection requires its third argument, the fixable violation types
175
+ const swatchSelection = phx.frontend.useSwatchSelection(entityId, instanceName, [])
176
+ const textValue = phx.frontend.useTextValue(entityId, instanceName)
177
+ const attributeSelection = phx.frontend.useAttributeSelection(entityId, instanceName)
178
+ const attributeSwitch = phx.frontend.useAttributeSwitch(entityId, instanceName)
179
+ const distanceDimension = phx.frontend.useDistanceDimension(entityId, instanceName)
180
+ const angleDimension = phx.frontend.useAngleDimension(entityId, instanceName)
181
+ const genericDimension = phx.frontend.useGenericDimension(entityId, instanceName)
176
182
 
177
183
  // Update control
178
184
  const updateControl = phx.frontend.useUpdateControl()
179
- const updatedControl = phx.frontend.useUpdatedControl(entityId, controlId)
185
+ const updatedControl = phx.frontend.useUpdatedControl(updates)
180
186
  ```
181
187
 
182
188
  ### Recipes & Entity Creation
@@ -202,14 +208,15 @@ const deletedEntity = phx.frontend.useDeletedEntity()
202
208
  ### Validation & Violations
203
209
 
204
210
  ```typescript
205
- // State validity
211
+ // Validity of the last committed state; a rejected change never becomes committed, so it is not seen here
206
212
  const validity = phx.frontend.useStateValidity()
207
213
 
208
- // Control violations
209
- const controlViolations = phx.frontend.useControlViolations(entityId, controlId)
214
+ // Control violations: takes the violation types to ignore and returns a function that maps a prepared
215
+ // state emission to { disabled, hints, violations }
216
+ const controlViolations = phx.frontend.useControlViolations([])
210
217
 
211
218
  // Finalize violations
212
- const {'{'} disabled, hints {'}'} = phx.frontend.useFinalizeViolations()
219
+ const { disabled, hints } = phx.frontend.useFinalizeViolations()
213
220
 
214
221
  // Map violations to hints
215
222
  const mapViolationHints = phx.frontend.useMapViolationHints()
@@ -284,89 +291,89 @@ The interface provides factory functions for creating handlers and providers:
284
291
 
285
292
  ```typescript
286
293
  // Runs early in app startup, before session auth
287
- const OnApplicationStart = phx.frontend.createOnApplicationStartProvider(({'{'} children {'}'}) => {'{'}
288
- return <YourProvider>{'{'}children{'}'}</YourProvider>
289
- {'}'})
294
+ const OnApplicationStart = phx.frontend.createOnApplicationStartProvider(({ children }) => {
295
+ return <YourProvider>{children}</YourProvider>
296
+ })
290
297
 
291
298
  // Runs after session auth, before domain data loading
292
- const OnSessionReady = phx.frontend.createOnSessionReadyProvider(({'{'} children {'}'}) => {'{'}
293
- return <YourProvider>{'{'}children{'}'}</YourProvider>
294
- {'}'})
299
+ const OnSessionReady = phx.frontend.createOnSessionReadyProvider(({ children }) => {
300
+ return <YourProvider>{children}</YourProvider>
301
+ })
295
302
 
296
303
  // Runs after published data is parsed, before frontend/backend loading
297
- const OnPublishedDataReady = phx.frontend.createOnPublishedDataReadyProvider(({'{'} children {'}'}) => {'{'}
298
- return <YourProvider>{'{'}children{'}'}</YourProvider>
299
- {'}'})
304
+ const OnPublishedDataReady = phx.frontend.createOnPublishedDataReadyProvider(({ children }) => {
305
+ return <YourProvider>{children}</YourProvider>
306
+ })
300
307
 
301
308
  // Runs after frontend collection and parsing, before backend loading
302
- const OnFrontendDataReady = phx.frontend.createOnFrontendDataReadyProvider(({'{'} children {'}'}) => {'{'}
303
- return <YourProvider>{'{'}children{'}'}</YourProvider>
304
- {'}'})
309
+ const OnFrontendDataReady = phx.frontend.createOnFrontendDataReadyProvider(({ children }) => {
310
+ return <YourProvider>{children}</YourProvider>
311
+ })
305
312
 
306
313
  // Runs after backend loading, before preset selection and configurator initialization
307
- const OnBackendDataReady = phx.frontend.createOnBackendDataReadyProvider(({'{'} children {'}'}) => {'{'}
308
- return <YourProvider>{'{'}children{'}'}</YourProvider>
309
- {'}'})
314
+ const OnBackendDataReady = phx.frontend.createOnBackendDataReadyProvider(({ children }) => {
315
+ return <YourProvider>{children}</YourProvider>
316
+ })
310
317
 
311
318
  // Runs after routing and preset selection are ready
312
- const OnRoutingReady = phx.frontend.createOnRoutingReadyProvider(({'{'} children {'}'}) => {'{'}
313
- return <YourProvider>{'{'}children{'}'}</YourProvider>
314
- {'}'})
319
+ const OnRoutingReady = phx.frontend.createOnRoutingReadyProvider(({ children }) => {
320
+ return <YourProvider>{children}</YourProvider>
321
+ })
315
322
 
316
323
  // Wraps OwnerUi and ReadUi pages
317
- const OnConfiguratorReady = phx.frontend.createOnConfiguratorReadyProvider(({'{'} children {'}'}) => {'{'}
318
- return <YourProvider>{'{'}children{'}'}</YourProvider>
319
- {'}'})
324
+ const OnConfiguratorReady = phx.frontend.createOnConfiguratorReadyProvider(({ children }) => {
325
+ return <YourProvider>{children}</YourProvider>
326
+ })
320
327
  ```
321
328
 
322
329
  ### Data Handlers
323
330
 
324
331
  ```typescript
325
332
  // Collect frontend data during initialization
326
- const collectFrontendData = phx.frontend.createCollectFrontendDataHandler(async (context) => {'{'}
327
- return {'{'} customData: await fetchCustomData() {'}'}
328
- {'}'})
333
+ const collectFrontendData = phx.frontend.createCollectFrontendDataHandler(async context => {
334
+ return { customData: await fetchCustomData() }
335
+ })
329
336
 
330
337
  // Override which published chunks are fetched by the frontend.
331
338
  // See Publishing page for full documentation.
332
- const filterPublishedChunks = phx.frontend.createFilterPublishedChunksHandler(() => {'{'}
339
+ const filterPublishedChunks = phx.frontend.createFilterPublishedChunksHandler(() => {
333
340
  const session = phx.frontend.useSession()
334
341
 
335
- return useMemo(() => {'{'}
342
+ return useMemo(() => {
336
343
  if (session.sessionPayload?.role === 'admin') return ['styling', 'catalog-na']
337
344
  return ['styling']
338
- {'}'}, [session.sessionPayload?.role])
339
- {'}'})
345
+ }, [session.sessionPayload?.role])
346
+ })
340
347
 
341
348
  // Runs after preset data is loaded
342
- const onPresetLoaded = phx.frontend.createOnPresetLoadedHandler((entities, presetData) => {'{'}
349
+ const onPresetLoaded = phx.frontend.createOnPresetLoadedHandler((entities, presetData) => {
343
350
  // Can modify preset entities before rendering
344
351
  return entities
345
- {'}'})
352
+ })
346
353
 
347
354
  // Intercept navigation to index/presets page
348
- const onGoToIndex = phx.frontend.createOnGoToIndexHandler(() => {'{'}
355
+ const onGoToIndex = phx.frontend.createOnGoToIndexHandler(() => {
349
356
  // Custom logic before navigating
350
- {'}'})
357
+ })
351
358
  ```
352
359
 
353
360
  ### UI Components
354
361
 
355
362
  ```typescript
356
363
  // Custom Phoenix layout element
357
- const MyLayoutElement = phx.frontend.createCustomPhoenixLayoutElement(() => {'{'}
364
+ const MyLayoutElement = phx.frontend.createCustomPhoenixLayoutElement('MyLayoutElement', () => {
358
365
  return <div>Custom Layout</div>
359
- {'}'})
366
+ })
360
367
 
361
368
  // Custom Phoenix entity element
362
- const MyEntityElement = phx.frontend.createCustomPhoenixEntityElement(() => {'{'}
369
+ const MyEntityElement = phx.frontend.createCustomPhoenixEntityElement('MyEntityElement', () => {
363
370
  return <mesh>...</mesh>
364
- {'}'})
371
+ })
365
372
 
366
373
  // Custom page when auth fails
367
- const NotAuthenticatedPage = phx.frontend.createNotAuthenticatedPage(() => {'{'}
374
+ const NotAuthenticatedPage = phx.frontend.createNotAuthenticatedPage(() => {
368
375
  return <div>Please log in</div>
369
- {'}'})
376
+ })
370
377
  ```
371
378
 
372
379
  ### Preset UI
@@ -383,21 +390,113 @@ const PresetAction = phx.frontend.createPresetPageAction(PresetHelpAction)
383
390
  const PresetOverlay = phx.frontend.createPresetDeviceNotSupported(SmallScreenNotice)
384
391
  ```
385
392
 
393
+ ### Loaded Configuration UI
394
+
395
+ 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
+
397
+ ```typescript
398
+ // src/elements/ConfiguratorLayout.tsx
399
+ import { LayoutSlots, useSceneSafeArea } from '@salsita-ai/sdk/configurator'
400
+
401
+ const SIDEBAR_WIDTH = 320
402
+
403
+ export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', () => {
404
+ const { containerRef, safeAreaRef } = useSceneSafeArea()
405
+
406
+ return (
407
+ <div ref={containerRef} style={{ position: 'absolute', inset: 0 }}>
408
+ <LayoutSlots.Services />
409
+ <LayoutSlots.SharedCanvas />
410
+ <aside style={{ position: 'absolute', insetBlock: 0, insetInlineStart: 0, inlineSize: SIDEBAR_WIDTH }}>
411
+ Project sidebar
412
+ </aside>
413
+ <div
414
+ ref={safeAreaRef}
415
+ style={{ position: 'absolute', insetBlock: 0, insetInlineStart: SIDEBAR_WIDTH, insetInlineEnd: 0, pointerEvents: 'none' }}
416
+ />
417
+ </div>
418
+ )
419
+ })
420
+ ```
421
+
422
+ - `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).
424
+ - 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`.
426
+ - `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`.
428
+ - 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).
429
+ - Any project layout element named `ConfiguratorLayout` takes over the page.
430
+
431
+ #### Hooks for a Project Layout
432
+
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.
434
+
435
+ **The product**
436
+
437
+ | Hook | Returns |
438
+ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
439
+ | `phx.frontend.useRootEntityId()` | The id of the root entity, which the control hooks take. |
440
+ | `phx.frontend.useSelectedDomainEntityId()` | The id of the selected entity, or the root entity's id while nothing is selected. |
441
+ | `phx.frontend.useFirstRootComponent(componentType)` | The first component of that type on the root entity as `{ componentInstance, state }`, or `null` without one. It takes a component type such as `detailComponent` from `@salsita-ai/sdk/domain`, or an array of them. The `detail` component's `state` is `{ title, subtitle, description, thumbnailUrl? }`, all `Localizable`. |
442
+ | `phx.frontend.useComponents({ componentTypes, entityIds?, instanceNames? })` | Every matching component on any entity, as `{ componentInstance, state }[]`. Its type on `phx.frontend` includes `null`, but it returns an empty array when nothing matches. |
443
+ | `phx.frontend.useRootEntityPrice()` and `phx.frontend.useEntityPrice(entityId)` | The value of the entity's `price` component formatted as currency for the current locale, in the component's `currency` or `USD`, or `null` without a `price` component. |
444
+
445
+ **Controls**
446
+
447
+ | Hook | Returns |
448
+ | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
449
+ | `phx.frontend.useAttributeSelection(entityId, instanceName)` | `{ value, options }`. Each option has `title` and `description` (`Localizable`, the spec's `label` and `description`), `value`, `imageSrc` (the spec's `img`), `disabled`, `error`, `hint` (a `string` saying why it is disabled, or `undefined`) and `onSelect()`, which writes the option; the selected option's `onSelect` does nothing. It throws when the entity has no `attributeSelection` component named `instanceName`. |
450
+ | `phx.frontend.useAttributeSwitch(entityId, instanceName)` | `{ state, onChange, disabled, error, hint }`: `state.value` is the boolean and `onChange()` writes its opposite. It throws without the component. |
451
+
452
+ The other control hooks in [Controls](#controls) take the same two arguments, `useSwatchSelection` a required third. `useSwatchSelection` returns `{ value, options }`, where `value` is the selected swatch key and each option is `{ swatchName, onClick, swatchKey, selected, thumbnailUrl, disabled, color, hint?, trace? }`; `useTextValue` and the dimension hooks return `{ value, hints, hasErrors, update, resolve, trace }` instead, where `update(value)` stages a value the scene shows at once (`useTextValue`'s is an `onChange` handler, `update(event, value)`) and `resolve()` commits it, or rolls it back when it breaks an invariant. Their TypeScript types give the exact shapes, and [Custom Controls](?path=/docs/controls-custom--docs) lists them.
453
+
454
+ **Texts**
455
+
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).
457
+
458
+ **Mode, fullscreen, preview and navigation**
459
+
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. |
469
+
470
+ **Violations**
471
+
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`. |
476
+
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.
478
+
479
+ **Finalize**
480
+
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()`.
482
+
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`.
484
+
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.
486
+
386
487
  ## TransformerBuilder
387
488
 
388
489
  Use `transformerBuilder` to create entity transformers:
389
490
 
390
491
  ```typescript
391
492
  // Create a transformer that runs when specific conditions are met
392
- const cabinetTransformer = phx.frontend.transformerBuilder
393
- .when(Cabinet.is)
394
- .do((cabinet, context) => {'{'}
395
- // Transform cabinet data
396
- return {'{'}
397
- ...cabinet,
398
- $computedField: calculateSomething(cabinet)
399
- {'}'}
400
- {'}'})
493
+ const cabinetTransformer = phx.frontend.transformerBuilder.when(Cabinet.is).do((cabinet, context) => {
494
+ // Transform cabinet data
495
+ return {
496
+ ...cabinet,
497
+ $computedField: calculateSomething(cabinet),
498
+ }
499
+ })
401
500
  ```
402
501
 
403
502
  **Note**: The deprecated `createTransformer` function should not be used for new implementations.
@@ -407,19 +506,19 @@ const cabinetTransformer = phx.frontend.transformerBuilder
407
506
  The `updates` factory creates type-safe entity updates:
408
507
 
409
508
  ```typescript
410
- const {'{'} storeSystem {'}'} = phx.frontend.useDomain()
509
+ const { storeSystem } = phx.frontend.useDomain()
411
510
 
412
511
  // Create new entity
413
- const createUpdates = phx.frontend.updates.create({'{'}
512
+ const createUpdates = phx.frontend.updates.create({
414
513
  type: 'Cabinet',
415
514
  width: 800,
416
515
  height: 2000,
417
- {'}'})
516
+ })
418
517
 
419
518
  // Modify existing entity
420
- const modifyUpdates = phx.frontend.updates.modify(cabinetId, {'{'}
519
+ const modifyUpdates = phx.frontend.updates.modify(cabinetId, {
421
520
  width: 1000,
422
- {'}'})
521
+ })
423
522
 
424
523
  // Delete entity
425
524
  const deleteUpdates = phx.frontend.updates.delete(cabinetId)
@@ -464,7 +464,7 @@ Error: Failed to upload to S3
464
464
 
465
465
  - Run `deployment:prepare` again to get fresh presigned URLs
466
466
  - Check that `.upload-links.json` exists and is readable
467
- - Use `--skipUpload` / `-su` flag to test without uploading assets
467
+ - Use `--skipUpload` / `--su` flag to test without uploading assets
468
468
 
469
469
  ### "Server URL is required"
470
470
 
@@ -565,9 +565,13 @@ A relation pair can have at most one composition owner. For an ownership relatio
565
565
  Relations are validated when the application spec is parsed:
566
566
 
567
567
  - **Every relation must be declared from both sides.** A relation on `A` targeting `B` needs a counterpart declared on `B` (or on an alias containing `B`) pointing back at `A` — with the opposite kind (`direct` ↔ `indirect`, `allOfType` ↔ `allOfType`) and the same `field`. A missing or mismatched counterpart fails parsing with `RELATION_MISSING_COUNTERPART`. Self‑referencing relations (target is the declaring type) act as their own counterpart and are exempt.
568
+ - **The field of a relation must hold references to the entities the relation relates to.** A `direct` relation reads a field of the entity it is declared on, and the field must reference exactly the entity types of the target. An `indirect` relation reads a field of the target, and the field must reference exactly the entity types the relation is declared on. A field that is not a `DomainEntityId` with `references` fails parsing with `RELATION_FIELD_NOT_REFERENCE`, and one that references other entity types with `RELATION_FIELD_REFERENCES_OTHER_TYPES`.
569
+ - **The field of a `direct` relation must hold its references the way the cardinality needs.** `1-1` needs one reference that is never `null`, `0-1` one reference or `null`, and `0-N` or `1-N` an array of references. Anything else fails parsing with `RELATION_FIELD_CARDINALITY_MISMATCH`. An `indirect` relation takes any of the three, because its cardinality counts the entities that point back.
568
570
  - **At most one side may carry `composedOf: true`.** A pair may have one owner or no owner. Two owning sides fail parsing with `RELATION_COUNTERPART_COMPOSED_OF_MISMATCH` because the pair would define ownership in both directions.
569
571
  - **Every entity type must be reachable from the root** through `composedOf` edges, otherwise parsing fails with `RELATION_ENTITY_NOT_IN_COMPOSITION_TREE`.
570
572
 
573
+ **What the field checks leave out.** A field whose schema states its type as text (`tsType`) or combines schemas with `allOf` is not checked, because the parser cannot tell what it holds. With a wrong field of that kind a `direct` relation fails when it is read, and an `indirect` relation finds no related entities and fails only if its cardinality requires one. When an alias holds the field, the relation is accepted if the field fits in at least one entity type of the alias.
574
+
571
575
  **Why both sides?** The two declarations feed two different runtime systems. The `direct` side owns the id field and generates the reference bookkeeping: dangling ids are pruned when the referenced entity is deleted, and ids are written on create and replace. The `composedOf: true` side generates the composition edge: cascade deletes, the scene hierarchy, and the reachability check. Because these can be different entities — a parent may collect children by reverse lookup (`indirect` + `composedOf: true`) while each child stores the id — dropping either declaration silently disables one of the systems: without the parent side, deleting the parent leaves its children orphaned; without the child side, deleted entities leave dangling ids behind. The missing side also cannot be generated automatically, because the stored id field is compatible with many different relations: the reverse accessor's name is public API, and its cardinality (`0-N`, `1-N`, or a `0-1` slot) changes the generated types, state validation, and UI affordances without changing the stored data at all. Requiring both declarations turns these mistakes into parse errors instead of runtime surprises, and the redundancy lets the parser cross‑check the pair — a typo in `field` or a doubled owner is caught immediately.
572
576
 
573
577
  ### Picking a relation kind
@@ -35,15 +35,23 @@ interface ExpressionContext<
35
35
 
36
36
  // System services
37
37
  readonly domain: Domain // Access to domain model and other entities
38
- readonly componentReader: ComponentReader // Read component states across all entities
39
38
  readonly migrate: MigrateFunction // Data migration utilities
40
- readonly sketchingProjections: SketchingProjections // Sketching system projections
41
- readonly collisionProjections: CollisionProjections // Collision detection projections
39
+ readonly componentReader: ComponentReader // Read component states across all entities
40
+
41
+ // Projections
42
+ readonly positionProjections: PositionProjections // World matrices of scene entities
43
+ readonly sketchingProjections: SketchingProjections // Shapes and connections of a sketch
44
+ readonly collisionProjections: CollisionProjections // Collision meshes and collisions between entities
45
+ readonly constraintProjections: ConstraintProjections // Spatial constraints an entity violates
46
+ readonly snappingProjections: SnappingProjections // Snap points, edges, planes and matches
47
+ readonly projectedEntitiesProjections: ProjectedEntitiesProjections // Data of projected entities
42
48
  }
43
49
  ```
44
50
 
45
51
  The context includes data sources (session, published, frontend, backend), system services (domain access, component reader, projections), and application state (mode, role). Each part serves a different purpose in expression calculations.
46
52
 
53
+ The SDK declares the context in two parts. `CoreExpressionContext` holds the mode, the role, the data sources, `domain` and `migrate`. `RuntimeExpressionContext` holds the component reader and the projections. An editor hover or a type error therefore shows `ctx` as `OpenExpressionContext<..., RuntimeExpressionContext<AnyDomainEntity>>`, which has the members listed above. A helper of your own that takes the context declares its parameter as `ExpressionContext` with the five types of your project.
54
+
47
55
  ### Configurator Modes
48
56
 
49
57
  The `mode` property indicates the current operational context of the configurator. Different modes enable different functionality and access levels. Expressions can check the mode to change their behavior.
@@ -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
- Phoenix selects one primary footer action and places additional finalization actions in its menu. A configured `finalizePage` opens in a dialog. 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.
19
19
 
20
20
  ## How Finalization Works
21
21
 
@@ -86,7 +86,7 @@ For inspiration and real-world implementation patterns, examine deployed Salsita
86
86
 
87
87
  When you encounter challenges or need to implement specific features, use these resources in order:
88
88
 
89
- **AI-Powered Assistance**: Every Phoenix project ships `AGENTS.md` and Phoenix agent skills, so coding agents in your project already know the SDK conventions and CLI. Start by using AI coding assistants in the `configurator-phoenix` project. While they may not solve complex problems directly, they can point you toward relevant examples or search terms that will help you find the right solution.
89
+ **AI-Powered Assistance**: Every Phoenix project ships Phoenix agent skills, so coding agents in your project already know the SDK conventions and CLI. Start by using AI coding assistants in the `configurator-phoenix` project. While they may not solve complex problems directly, they can point you toward relevant examples or search terms that will help you find the right solution.
90
90
 
91
91
  **Storybook Documentation**: Search the Phoenix Storybook for functionality similar to what you need. When you find relevant examples, examine the corresponding code in the configurator-phoenix stories to understand the implementation details.
92
92