@salsita-ai/sdk 0.50.0-develop.eb204e0da4 → 0.50.0-develop.f03b563886

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 (995) hide show
  1. package/README.md +20 -12
  2. package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
  3. package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
  4. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  5. package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
  6. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  7. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  8. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  9. package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
  10. package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
  11. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  12. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  13. package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
  14. package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
  15. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
  16. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
  17. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  18. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +2 -2
  19. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -13
  20. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
  21. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
  22. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
  23. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
  24. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
  25. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +69 -65
  26. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
  27. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  28. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  29. package/dist/application-spec/generate-application/code/templates/domain-spec.js +7 -7
  30. package/dist/application-spec/generate-application/code/templates/domain.js +4 -4
  31. package/dist/application-spec/generate-application/code/templates/env-example.js +4 -0
  32. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
  33. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
  34. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  35. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  36. package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
  37. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -0
  38. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  39. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +1 -1
  40. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +95 -41
  42. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +39 -16
  43. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +5 -3
  44. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  45. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  46. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  47. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +32 -3
  48. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -5
  49. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +9 -4
  50. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -2
  51. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
  52. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  53. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
  54. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
  55. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
  56. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
  57. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
  58. package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
  59. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
  60. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  61. package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
  62. package/dist/application-spec/parse-application-files/merge/index.js +1 -1
  63. package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
  64. package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
  65. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
  66. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  67. package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
  68. package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
  69. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
  70. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
  71. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
  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.d.ts +2 -0
  74. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  75. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  76. package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
  77. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
  78. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  79. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  80. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  81. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
  82. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
  83. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
  84. package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
  85. package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
  86. package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
  87. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
  88. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
  89. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +5 -21
  90. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  91. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +14 -39
  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/assistant/assistant-server-settings.d.ts +2 -2
  94. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -19
  95. package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
  96. package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
  97. package/dist/client/authorized-client.d.ts +3 -1
  98. package/dist/client/authorized-client.js +1 -1
  99. package/dist/client/contract.d.ts +34 -0
  100. package/dist/client/contract.js +1 -1
  101. package/dist/client/index.d.ts +2 -2
  102. package/dist/client/index.js +1 -1
  103. package/dist/client/local-authorized-client.d.ts +3 -1
  104. package/dist/client/local-authorized-client.js +1 -1
  105. package/dist/client/memory-authorized-client.d.ts +3 -1
  106. package/dist/client/memory-authorized-client.js +1 -1
  107. package/dist/client/phoenix-api.d.ts +271 -30
  108. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
  109. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  110. package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
  111. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  112. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +267 -0
  113. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
  114. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
  115. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
  116. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  117. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  118. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
  119. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
  120. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  121. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  122. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  123. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  124. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  125. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  126. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
  127. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  128. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
  129. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  130. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  131. package/dist/configurator/index.d.ts +0 -1
  132. package/dist/configurator/index.js +1 -1
  133. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  134. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  135. package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
  136. package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
  137. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +7 -0
  138. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
  139. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
  140. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
  141. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
  142. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
  143. package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -0
  144. package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
  145. package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
  146. package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
  147. package/dist/configurator/ui/assistant/index.d.ts +2 -0
  148. package/dist/configurator/ui/assistant/index.js +1 -0
  149. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
  150. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
  151. package/dist/configurator/ui/assistant/theme.d.ts +2 -0
  152. package/dist/configurator/ui/assistant/theme.js +1 -0
  153. package/dist/configurator/ui/assistant/thread-items.d.ts +48 -0
  154. package/dist/configurator/ui/assistant/thread-items.js +1 -0
  155. package/dist/configurator/ui/assistant/tool-chip.d.ts +44 -0
  156. package/dist/configurator/ui/assistant/tool-chip.js +1 -0
  157. package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
  158. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
  159. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  160. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  161. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
  162. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
  163. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  164. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  165. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
  166. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
  167. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
  168. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  169. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
  170. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
  171. package/dist/docs/index.json +12 -2
  172. package/dist/docs/layouts/custom-price.mdx +14 -16
  173. package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
  174. package/dist/docs/layouts/toolbar.mdx +6 -0
  175. package/dist/docs/other-features/domain-actions.mdx +418 -0
  176. package/dist/docs/other-features/side-effects.mdx +68 -34
  177. package/dist/docs/other-features/transformers.mdx +1 -1
  178. package/dist/docs/phoenix/admin.mdx +11 -26
  179. package/dist/docs/phoenix/best-practices.mdx +1 -0
  180. package/dist/docs/phoenix/deployments.mdx +1 -1
  181. package/dist/docs/phoenix/expression-context.mdx +11 -3
  182. package/dist/docs/phoenix/finalization.mdx +1 -1
  183. package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
  184. package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
  185. package/dist/docs/phoenix/localization.mdx +3 -22
  186. package/dist/docs/phoenix/phoenix-cli.mdx +162 -40
  187. package/dist/docs/phoenix/project-structure.mdx +13 -3
  188. package/dist/docs/phoenix/sdk-builder-workflow.mdx +14 -12
  189. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
  190. package/dist/docs/relations/hierarchy.mdx +13 -2
  191. package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
  192. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
  193. package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
  194. package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
  195. package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
  196. package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
  197. package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
  198. package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
  199. package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
  200. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +10 -13
  201. package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
  202. package/dist/domain/admin-domain/index.d.ts +9 -5
  203. package/dist/domain/admin-domain/index.js +1 -1
  204. package/dist/domain/application/admin-page-factories.d.ts +1 -2
  205. package/dist/domain/application/application-config.d.ts +24 -92
  206. package/dist/domain/application/assistant/assistant-manifest.d.ts +63 -0
  207. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
  208. package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
  209. package/dist/domain/application/assistant/assistant-value-type.js +1 -0
  210. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
  211. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
  212. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  213. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
  214. package/dist/domain/application/assistant/index.d.ts +4 -0
  215. package/dist/domain/application/assistant/index.js +1 -0
  216. package/dist/domain/application/assistant-field-options.d.ts +2 -3
  217. package/dist/domain/application/assistant-mutations.d.ts +16 -17
  218. package/dist/domain/application/assistant-mutations.js +1 -1
  219. package/dist/domain/application/assistant-recipe-groups.d.ts +2 -6
  220. package/dist/domain/application/configurator-builder.d.ts +33 -18
  221. package/dist/domain/application/configurator-builder.js +1 -1
  222. package/dist/domain/application/element-registration.d.ts +5 -0
  223. package/dist/domain/application/element-registration.js +1 -1
  224. package/dist/domain/application/handler-registration.d.ts +5 -0
  225. package/dist/domain/application/handler-registration.js +1 -1
  226. package/dist/domain/application/index.d.ts +6 -5
  227. package/dist/domain/application/index.js +1 -1
  228. package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
  229. package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
  230. package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
  231. package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
  232. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +2 -2
  233. package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
  234. package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
  235. package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
  236. package/dist/domain/application/resolve-imported-transformers.js +1 -1
  237. package/dist/domain/available-system-components.js +1 -1
  238. package/dist/domain/core/action/action-factory.d.ts +11 -0
  239. package/dist/domain/core/action/action-factory.js +1 -0
  240. package/dist/domain/core/action/action.d.ts +71 -0
  241. package/dist/domain/core/action/index.d.ts +2 -0
  242. package/dist/domain/core/action/index.js +1 -0
  243. package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
  244. package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
  245. package/dist/domain/core/component/debug-state-component.js +1 -0
  246. package/dist/domain/{components → core/component}/domain-component-optic.d.ts +36 -39
  247. package/dist/domain/{components → core/component}/domain-component-optic.js +2 -2
  248. package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
  249. package/dist/domain/core/component/drag-state-component.js +1 -0
  250. package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
  251. package/dist/domain/core/component/export-state-component.js +1 -0
  252. package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
  253. package/dist/domain/core/component/fullscreen-state-component.js +1 -0
  254. package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
  255. package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
  256. package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
  257. package/dist/domain/core/component/hover-state-component.js +1 -0
  258. package/dist/domain/core/component/index.d.ts +18 -0
  259. package/dist/domain/core/component/index.js +1 -0
  260. package/dist/domain/{components → core/component}/legacy-filter.d.ts +2 -2
  261. package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
  262. package/dist/domain/core/component/navigation-state-component.js +1 -0
  263. package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
  264. package/dist/domain/core/component/selection-state-component.js +1 -0
  265. package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
  266. package/dist/domain/core/component/system-component-builder.js +1 -0
  267. package/dist/domain/{components → core/component}/system-component-filter.d.ts +19 -19
  268. package/dist/domain/core/component/system-virtual-entity.js +1 -0
  269. package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
  270. package/dist/domain/core/component/tool-state-component.js +1 -0
  271. package/dist/domain/{components → core/component}/updates.d.ts +17 -2
  272. package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
  273. package/dist/domain/core/component/view-state-component.js +1 -0
  274. package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
  275. package/dist/domain/core/component/viewport-state-component.js +1 -0
  276. package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
  277. package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
  278. package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
  279. package/dist/domain/core/data-schema/data-schema-field-object.js +1 -0
  280. package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
  281. package/dist/domain/core/data-schema/data-schema-field.js +1 -0
  282. package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
  283. package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
  284. package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
  285. package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
  286. package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
  287. package/dist/domain/core/data-schema/data-schema.js +1 -0
  288. package/dist/domain/core/data-schema/index.d.ts +7 -0
  289. package/dist/domain/core/data-schema/index.js +1 -0
  290. package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
  291. package/dist/domain/core/decoder/create-decoder.js +1 -0
  292. package/dist/domain/core/decoder/decoder.d.ts +6 -0
  293. package/dist/domain/core/decoder/decoder.js +1 -0
  294. package/dist/domain/core/decoder/index.d.ts +2 -0
  295. package/dist/domain/core/decoder/index.js +1 -0
  296. package/dist/domain/core/domain-factory.d.ts +7 -4
  297. package/dist/domain/core/domain-factory.js +1 -1
  298. package/dist/domain/core/domain.d.ts +4 -5
  299. package/dist/domain/core/domain.js +1 -1
  300. package/dist/domain/core/emission/index.d.ts +8 -0
  301. package/dist/domain/core/emission/index.js +1 -0
  302. package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
  303. package/dist/domain/core/emission/reset-state-emission.js +1 -0
  304. package/dist/domain/core/emission/state-emission.d.ts +4 -0
  305. package/dist/domain/core/emission/state-emission.js +1 -0
  306. package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
  307. package/dist/domain/core/emission/state-update-emission.js +1 -0
  308. package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
  309. package/dist/domain/core/emission/state-validation-result.js +1 -0
  310. package/dist/domain/core/emission/transformation-log.d.ts +2 -0
  311. package/dist/domain/core/emission/transformation-log.js +1 -0
  312. package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
  313. package/dist/domain/core/emission/transformer-log-entry.js +1 -0
  314. package/dist/domain/core/emission/transformer-log.d.ts +11 -0
  315. package/dist/domain/core/emission/transformer-log.js +1 -0
  316. package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
  317. package/dist/domain/core/emission/transformer-phase.js +1 -0
  318. package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
  319. package/dist/domain/core/expression/aliased-expressions.js +1 -0
  320. package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
  321. package/dist/domain/core/expression/constant-expressions.js +1 -0
  322. package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +9 -10
  323. package/dist/domain/core/expression/custom-expression.js +1 -0
  324. package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +17 -20
  325. package/dist/domain/core/expression/expression.js +1 -0
  326. package/dist/domain/core/expression/index.d.ts +4 -0
  327. package/dist/domain/core/expression/index.js +1 -0
  328. package/dist/domain/core/index.d.ts +13 -16
  329. package/dist/domain/core/index.js +1 -1
  330. package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
  331. package/dist/domain/{invariants → core/invariant}/custom-invariants.d.ts +7 -8
  332. package/dist/domain/core/invariant/custom-invariants.js +1 -0
  333. package/dist/domain/core/invariant/index.d.ts +5 -0
  334. package/dist/domain/core/invariant/index.js +1 -0
  335. package/dist/domain/core/invariant/invariants.d.ts +13 -0
  336. package/dist/domain/core/invariant/invariants.js +1 -0
  337. package/dist/domain/core/invariant/violation-component.js +1 -0
  338. package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
  339. package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
  340. package/dist/domain/core/model/index.d.ts +6 -0
  341. package/dist/domain/core/model/index.js +1 -0
  342. package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
  343. package/dist/domain/core/model/reflection.js +1 -0
  344. package/dist/domain/core/recipe/index.d.ts +1 -0
  345. package/dist/domain/core/recipe/index.js +1 -0
  346. package/dist/domain/{domain-context/recipe-system → core/recipe}/recipes.d.ts +1 -3
  347. package/dist/domain/core/recipe/recipes.js +1 -0
  348. package/dist/domain/{relations → core/relation}/all-of-type-relation.d.ts +3 -4
  349. package/dist/domain/core/relation/all-of-type-relation.js +1 -0
  350. package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -2
  351. package/dist/domain/core/relation/component-factories.js +1 -0
  352. package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
  353. package/dist/domain/core/relation/composed-of.js +1 -0
  354. package/dist/domain/{relations → core/relation}/direct-relation.d.ts +2 -3
  355. package/dist/domain/core/relation/index.d.ts +9 -0
  356. package/dist/domain/core/relation/index.js +1 -0
  357. package/dist/domain/{relations → core/relation}/indirect-relation.d.ts +3 -4
  358. package/dist/domain/core/relation/indirect-relation.js +1 -0
  359. package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -5
  360. package/dist/domain/core/relation/reference-component.js +1 -0
  361. package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
  362. package/dist/domain/core/relation/reference-field.js +1 -0
  363. package/dist/domain/{relations → core/relation}/relation-factory.d.ts +2 -3
  364. package/dist/domain/{relations → core/relation}/relation-implementation.d.ts +3 -4
  365. package/dist/domain/core/relation/relation-implementation.js +1 -0
  366. package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
  367. package/dist/domain/core/schema/extended-schema-validator.js +1 -0
  368. package/dist/domain/core/schema/index.d.ts +3 -0
  369. package/dist/domain/core/schema/index.js +1 -0
  370. package/dist/domain/core/schema/schema-validator.js +1 -0
  371. package/dist/domain/core/state/id-sequence.d.ts +15 -0
  372. package/dist/domain/core/state/id-sequence.js +1 -0
  373. package/dist/domain/core/state/index.d.ts +3 -0
  374. package/dist/domain/core/state/index.js +1 -0
  375. package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
  376. package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
  377. package/dist/domain/domain-builder.d.ts +16 -9
  378. package/dist/domain/domain-builder.js +1 -1
  379. package/dist/domain/domain-context/action-system/action-system.d.ts +38 -0
  380. package/dist/domain/domain-context/action-system/action-system.js +1 -0
  381. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  382. package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
  383. package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +1 -2
  384. package/dist/domain/domain-context/domain-context-systems.d.ts +5 -4
  385. package/dist/domain/domain-context/index.d.ts +4 -4
  386. package/dist/domain/domain-context/index.js +1 -1
  387. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -5
  388. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  389. package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
  390. package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
  391. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  392. package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
  393. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -3
  394. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
  395. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
  396. package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
  397. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
  398. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
  399. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
  400. package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
  401. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
  402. package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
  403. package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
  404. package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
  405. package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
  406. package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
  407. package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
  408. package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
  409. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -36
  410. package/dist/domain/domain-context/store-system/store-system.js +2 -2
  411. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
  412. package/dist/domain/domain-context/store-system/system-state.js +1 -1
  413. package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
  414. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  415. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -3
  416. package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
  417. package/dist/domain/domain-context/transformers/context.d.ts +1 -6
  418. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
  419. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  420. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
  421. package/dist/domain/domain-context/transformers/then-builder.js +1 -1
  422. package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -6
  423. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  424. package/dist/domain/domain-context/undo-system.d.ts +1 -2
  425. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
  426. package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
  427. package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
  428. package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
  429. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  430. package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
  431. package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
  432. package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
  433. package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
  434. package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
  435. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +7 -4
  436. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  437. package/dist/domain/domain-runtime/domain-runtime.d.ts +24 -12
  438. package/dist/domain/domain-runtime/spec/index.d.ts +8 -0
  439. package/dist/domain/domain-runtime/spec/index.js +1 -1
  440. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  441. package/dist/domain/{invariants/invariants.d.ts → domain-runtime/spec/invariant-builder.d.ts} +7 -14
  442. package/dist/domain/domain-runtime/spec/invariant-builder.js +1 -0
  443. package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.d.ts +1 -2
  444. package/dist/domain/domain-runtime/spec/prepare-action-implementations.d.ts +15 -0
  445. package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
  446. package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.d.ts +1 -1
  447. package/dist/domain/domain-runtime/spec/resolve-action-modules.d.ts +4 -0
  448. package/dist/domain/domain-runtime/spec/resolve-action-modules.js +1 -0
  449. package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.d.ts +4 -0
  450. package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.js +1 -0
  451. package/dist/domain/domain-runtime/spec/resolve-expression-modules.d.ts +15 -0
  452. package/dist/domain/domain-runtime/spec/resolve-expression-modules.js +1 -0
  453. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.d.ts +6 -0
  454. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.js +1 -0
  455. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  456. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  457. package/dist/domain/domain-runtime/spec/types.d.ts +18 -5
  458. package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +1 -1
  459. package/dist/domain/extensions/angle-indicator.js +1 -0
  460. package/dist/domain/extensions/attribute-switch.js +1 -0
  461. package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +1 -1
  462. package/dist/domain/extensions/autorotate-camera-component.js +1 -0
  463. package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +1 -1
  464. package/dist/domain/extensions/basic-sidebar-footer.js +1 -0
  465. package/dist/domain/extensions/camera-based-hidden-entity-object.js +1 -0
  466. package/dist/domain/extensions/camera-based-hidden-entity.js +1 -0
  467. package/dist/domain/{system-components → extensions}/canvas-config.d.ts +1 -1
  468. package/dist/domain/extensions/canvas-config.js +1 -0
  469. package/dist/domain/extensions/canvas-custom-environment.js +1 -0
  470. package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +1 -1
  471. package/dist/domain/extensions/canvas-padding.js +1 -0
  472. package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +1 -1
  473. package/dist/domain/extensions/canvas-preset-environment.js +1 -0
  474. package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +2 -2
  475. package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
  476. package/dist/domain/extensions/client-side-image.js +1 -0
  477. package/dist/domain/extensions/color-value.js +1 -0
  478. package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +1 -1
  479. package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
  480. package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +1 -1
  481. package/dist/domain/extensions/common/dimension-indicator-schema.js +1 -0
  482. package/dist/domain/extensions/common/index.d.ts +4 -0
  483. package/dist/domain/extensions/common/index.js +1 -0
  484. package/dist/domain/{system-components → extensions}/custom-header.d.ts +2 -2
  485. package/dist/domain/{system-components → extensions}/custom-header.js +1 -1
  486. package/dist/domain/extensions/custom-price-footer.js +1 -0
  487. package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +2 -2
  488. package/dist/domain/{system-components → extensions}/custom-sidebar-footer.js +1 -1
  489. package/dist/domain/{system-components → extensions}/dimension-indicator.d.ts +1 -1
  490. package/dist/domain/extensions/dimension-indicator.js +1 -0
  491. package/dist/domain/{system-components → extensions}/editable-angle-indicator.d.ts +3 -2
  492. package/dist/domain/extensions/editable-angle-indicator.js +1 -0
  493. package/dist/domain/{system-components → extensions}/editable-distance-dimension-indicator.d.ts +3 -2
  494. package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
  495. package/dist/domain/{system-components → extensions}/editable-offset-indicator.d.ts +3 -2
  496. package/dist/domain/extensions/editable-offset-indicator.js +1 -0
  497. package/dist/domain/{system-components → extensions}/editable-size-indicator.d.ts +3 -2
  498. package/dist/domain/extensions/editable-size-indicator.js +1 -0
  499. package/dist/domain/{system-components → extensions}/entity-header.d.ts +1 -1
  500. package/dist/domain/extensions/entity-header.js +1 -0
  501. package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +1 -1
  502. package/dist/domain/extensions/exit-tool-mode-fab.js +1 -0
  503. package/dist/domain/{system-components → extensions}/finalize-action.d.ts +1 -1
  504. package/dist/domain/extensions/finalize-action.js +1 -0
  505. package/dist/domain/extensions/finalize-component.js +1 -0
  506. package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -0
  507. package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -0
  508. package/dist/domain/{system-components → extensions}/fixed-header.d.ts +1 -1
  509. package/dist/domain/extensions/fixed-header.js +1 -0
  510. package/dist/domain/{system-components → extensions}/floating-header.d.ts +1 -1
  511. package/dist/domain/extensions/floating-header.js +1 -0
  512. package/dist/domain/{system-components → extensions}/hidden-header.d.ts +1 -1
  513. package/dist/domain/extensions/hidden-header.js +1 -0
  514. package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +1 -1
  515. package/dist/domain/extensions/hidden-sidebar-footer.js +1 -0
  516. package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +1 -1
  517. package/dist/domain/extensions/horizontal-tabs.js +1 -0
  518. package/dist/domain/extensions/index.d.ts +69 -0
  519. package/dist/domain/extensions/index.js +1 -0
  520. package/dist/domain/{system-components → extensions}/list-selector-dimension-indicator.d.ts +3 -2
  521. package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
  522. package/dist/domain/extensions/multilingual-text-value.js +1 -0
  523. package/dist/domain/extensions/navigation-steps.js +1 -0
  524. package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +1 -1
  525. package/dist/domain/extensions/offset-anchors.js +1 -0
  526. package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +1 -2
  527. package/dist/domain/extensions/offset-indicator.js +1 -0
  528. package/dist/domain/{system-components → extensions}/offset.d.ts +1 -1
  529. package/dist/domain/extensions/offset.js +1 -0
  530. package/dist/domain/{system-components → extensions}/other-action.d.ts +1 -1
  531. package/dist/domain/extensions/other-action.js +1 -0
  532. package/dist/domain/{system-components → extensions}/property-page.d.ts +2 -2
  533. package/dist/domain/extensions/property-page.js +1 -0
  534. package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +1 -1
  535. package/dist/domain/extensions/read-sidebar-footer.js +1 -0
  536. package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +2 -2
  537. package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
  538. package/dist/domain/extensions/rotatable.js +1 -0
  539. package/dist/domain/extensions/rotation-handle.js +1 -0
  540. package/dist/domain/extensions/save-template-thumbnail.js +1 -0
  541. package/dist/domain/{system-components → extensions}/scene-entity-add-fab.d.ts +1 -1
  542. package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
  543. package/dist/domain/extensions/scene-entity-animation.js +1 -0
  544. package/dist/domain/extensions/scene-entity-control.js +1 -0
  545. package/dist/domain/{system-components → extensions}/scene-entity-delete-fab.d.ts +1 -1
  546. package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
  547. package/dist/domain/extensions/scene-entity-floor-object.js +1 -0
  548. package/dist/domain/{system-components → extensions}/scene-entity-html-hotspot.d.ts +1 -1
  549. package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
  550. package/dist/domain/{system-components → extensions}/scene-entity-navigation-hotspot.d.ts +1 -1
  551. package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
  552. package/dist/domain/{system-components → extensions}/scene-entity-object-html-hotspot.d.ts +1 -1
  553. package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
  554. package/dist/domain/{system-components → extensions}/scene-entity-select-hotspot.d.ts +1 -1
  555. package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
  556. package/dist/domain/extensions/scene-entity-wall-object.js +1 -0
  557. package/dist/domain/extensions/selectable-component.js +1 -0
  558. package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +1 -1
  559. package/dist/domain/extensions/sidebar-tabs.js +1 -0
  560. package/dist/domain/extensions/simple-summary.js +1 -0
  561. package/dist/domain/{system-components → extensions}/size.d.ts +1 -1
  562. package/dist/domain/extensions/size.js +1 -0
  563. package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +1 -1
  564. package/dist/domain/extensions/sketching-draw.js +1 -0
  565. package/dist/domain/{system-components → extensions}/sketching-edit.d.ts +2 -2
  566. package/dist/domain/extensions/sketching-edit.js +1 -0
  567. package/dist/domain/extensions/summary-component.js +1 -0
  568. package/dist/domain/extensions/text-value.js +1 -0
  569. package/dist/domain/extensions/tool-controls.js +1 -0
  570. package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +2 -2
  571. package/dist/domain/extensions/tool-menu-fab.js +1 -0
  572. package/dist/domain/{system-components → extensions}/toolbar.d.ts +2 -2
  573. package/dist/domain/{system-components → extensions}/toolbar.js +1 -1
  574. package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +1 -1
  575. package/dist/domain/extensions/universal-sidebar-footer.js +1 -0
  576. package/dist/domain/extensions/view-controls.js +1 -0
  577. package/dist/domain/index.d.ts +3 -30
  578. package/dist/domain/index.js +1 -1
  579. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -3
  580. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  581. package/dist/domain/project-modules/index.d.ts +1 -0
  582. package/dist/domain/project-modules/index.js +1 -0
  583. package/dist/domain/project-modules/project-modules.d.ts +25 -0
  584. package/dist/domain/project-modules/project-modules.js +1 -0
  585. package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -1
  586. package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
  587. package/dist/domain/projections/composition-projections.js +1 -1
  588. package/dist/domain/projections/index.d.ts +1 -1
  589. package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
  590. package/dist/domain/projections/snap-matching.d.ts +1 -2
  591. package/dist/domain/projections/snap-utils.d.ts +1 -2
  592. package/dist/domain/projections/validation-projections.d.ts +1 -18
  593. package/dist/domain/projections/validation-projections.js +1 -1
  594. package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
  595. package/dist/domain/system-components/admin-sidebar.js +1 -1
  596. package/dist/domain/system-components/angle-dimension.js +1 -1
  597. package/dist/domain/system-components/application-config.d.ts +1 -1
  598. package/dist/domain/system-components/application-config.js +1 -1
  599. package/dist/domain/system-components/attribute-selection.js +1 -1
  600. package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
  601. package/dist/domain/system-components/bounding-box-component.js +1 -1
  602. package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
  603. package/dist/domain/system-components/bounding-sphere-component.js +1 -1
  604. package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
  605. package/dist/domain/system-components/child-entity-recipes.js +1 -1
  606. package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
  607. package/dist/domain/system-components/child-entity-selection.js +1 -1
  608. package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
  609. package/dist/domain/system-components/collision-box-geometry.js +1 -1
  610. package/dist/domain/system-components/collision-geometries.d.ts +1 -1
  611. package/dist/domain/system-components/collision-geometry.d.ts +1 -1
  612. package/dist/domain/system-components/collision-geometry.js +1 -1
  613. package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
  614. package/dist/domain/system-components/collision-point-geometry.js +1 -1
  615. package/dist/domain/system-components/common/index.d.ts +0 -4
  616. package/dist/domain/system-components/common/index.js +1 -1
  617. package/dist/domain/system-components/common/recipes.d.ts +1 -2
  618. package/dist/domain/system-components/constraint.d.ts +1 -1
  619. package/dist/domain/system-components/constraint.js +1 -1
  620. package/dist/domain/system-components/create-blueprint.d.ts +1 -1
  621. package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
  622. package/dist/domain/system-components/custom-scene-entity.js +1 -1
  623. package/dist/domain/system-components/detail.js +1 -1
  624. package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
  625. package/dist/domain/system-components/distance-dimension-select.js +1 -1
  626. package/dist/domain/system-components/distance-dimension.d.ts +1 -1
  627. package/dist/domain/system-components/distance-dimension.js +1 -1
  628. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  629. package/dist/domain/system-components/drag-handle.js +1 -1
  630. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  631. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  632. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  633. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  634. package/dist/domain/system-components/generic-dimension.d.ts +1 -1
  635. package/dist/domain/system-components/generic-dimension.js +1 -1
  636. package/dist/domain/system-components/hidden-entity.js +1 -1
  637. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
  638. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  639. package/dist/domain/system-components/index.d.ts +0 -68
  640. package/dist/domain/system-components/index.js +1 -1
  641. package/dist/domain/system-components/material-override-property-transition.js +1 -1
  642. package/dist/domain/system-components/material-override-transformer.js +1 -1
  643. package/dist/domain/system-components/material-swatch.js +1 -1
  644. package/dist/domain/system-components/navigation-page.js +1 -1
  645. package/dist/domain/system-components/navigation-panel-list.js +1 -1
  646. package/dist/domain/system-components/phoenix-entity-elements/admin-data-table-sidebar.d.ts +1 -1
  647. package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
  648. package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
  649. package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +1 -1
  650. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
  651. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
  652. package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
  653. package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
  654. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
  655. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
  656. package/dist/domain/system-components/pivot-point.d.ts +1 -1
  657. package/dist/domain/system-components/pivot-point.js +1 -1
  658. package/dist/domain/system-components/price.js +1 -1
  659. package/dist/domain/system-components/projected-entities.d.ts +1 -1
  660. package/dist/domain/system-components/projected-entities.js +1 -1
  661. package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
  662. package/dist/domain/system-components/replace-entity-recipes.js +1 -1
  663. package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
  664. package/dist/domain/system-components/scene-entity-box-object.js +1 -1
  665. package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
  666. package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
  667. package/dist/domain/system-components/scene-entity-material-override.js +1 -1
  668. package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
  669. package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
  670. package/dist/domain/system-components/scene-entity-object-group.js +1 -1
  671. package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
  672. package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
  673. package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
  674. package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
  675. package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
  676. package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
  677. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
  678. package/dist/domain/system-components/scene-entity-object.js +1 -1
  679. package/dist/domain/system-components/scene-entity-point-light.js +1 -1
  680. package/dist/domain/system-components/scene-entity-properties.js +1 -1
  681. package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
  682. package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
  683. package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
  684. package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
  685. package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
  686. package/dist/domain/system-components/sketching-line.d.ts +1 -1
  687. package/dist/domain/system-components/sketching-line.js +1 -1
  688. package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
  689. package/dist/domain/system-components/sketching-rectangle.js +1 -1
  690. package/dist/domain/system-components/sketching.d.ts +1 -1
  691. package/dist/domain/system-components/sketching.js +1 -1
  692. package/dist/domain/system-components/snap-axis.d.ts +1 -1
  693. package/dist/domain/system-components/snap-axis.js +1 -1
  694. package/dist/domain/system-components/snap-edge.d.ts +1 -1
  695. package/dist/domain/system-components/snap-edge.js +1 -1
  696. package/dist/domain/system-components/snap-plane.d.ts +1 -1
  697. package/dist/domain/system-components/snap-plane.js +1 -1
  698. package/dist/domain/system-components/snap-point.d.ts +1 -1
  699. package/dist/domain/system-components/snap-point.js +1 -1
  700. package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
  701. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  702. package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
  703. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  704. package/dist/domain/utils/eval-cache.d.ts +1 -2
  705. package/dist/domain/utils/memo-eval.d.ts +2 -4
  706. package/dist/editor/Editor.js +1 -1
  707. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  708. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  709. package/dist/editor/domain-editors/use-implementation-files.d.ts +11 -6
  710. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  711. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  712. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  713. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  714. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  715. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  716. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  717. package/dist/editor/variants/variant-preview-styles.js +1 -0
  718. package/dist/i18n/locales/cs/messages.js +1 -1
  719. package/dist/i18n/locales/da/messages.js +1 -1
  720. package/dist/i18n/locales/de/messages.js +1 -1
  721. package/dist/i18n/locales/de-AT/messages.js +1 -1
  722. package/dist/i18n/locales/en/messages.js +1 -1
  723. package/dist/i18n/locales/en-AU/messages.js +1 -1
  724. package/dist/i18n/locales/en-GB/messages.js +1 -1
  725. package/dist/i18n/locales/es/messages.js +1 -1
  726. package/dist/i18n/locales/fr/messages.js +1 -1
  727. package/dist/i18n/locales/hu/messages.js +1 -1
  728. package/dist/i18n/locales/it/messages.js +1 -1
  729. package/dist/i18n/locales/nl/messages.js +1 -1
  730. package/dist/i18n/locales/pl/messages.js +1 -1
  731. package/dist/i18n/locales/pt/messages.js +1 -1
  732. package/dist/i18n/locales/ro/messages.js +1 -1
  733. package/dist/i18n/locales/sk/messages.js +1 -1
  734. package/dist/i18n/locales/tr/messages.js +1 -1
  735. package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
  736. package/dist/legacy/domain-cli/gen/implementation.js +5 -5
  737. package/dist/legacy/domain-cli/gen/invariants.js +5 -3
  738. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  739. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  740. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
  741. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
  742. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
  743. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
  744. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
  745. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
  746. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
  747. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
  748. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
  749. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
  750. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
  751. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
  752. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  753. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
  754. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  755. package/dist/phoenix/cli.js +1 -1
  756. package/dist/phoenix/commands/build.d.ts +5 -0
  757. package/dist/phoenix/commands/build.js +1 -1
  758. package/dist/phoenix/commands/deploy.js +2 -2
  759. package/dist/phoenix/commands/dev.js +5 -5
  760. package/dist/phoenix/commands/feedback.d.ts +2 -1
  761. package/dist/phoenix/commands/feedback.js +1 -1
  762. package/dist/phoenix/commands/index.d.ts +1 -0
  763. package/dist/phoenix/commands/index.js +1 -1
  764. package/dist/phoenix/commands/login.d.ts +24 -6
  765. package/dist/phoenix/commands/login.js +2 -2
  766. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  767. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  768. package/dist/phoenix/commands/story-dev.js +2 -2
  769. package/dist/phoenix/commands/variants.d.ts +35 -0
  770. package/dist/phoenix/commands/variants.js +1 -0
  771. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  772. package/dist/phoenix/editor-server/commands-router.js +1 -1
  773. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  774. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  775. package/dist/phoenix/editor-server/editor-server.js +1 -1
  776. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  777. package/dist/phoenix/editor-server/spec-router.js +1 -1
  778. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  779. package/dist/phoenix/scripts/build-admin.js +1 -1
  780. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  781. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  782. package/dist/phoenix/services/index.d.ts +5 -0
  783. package/dist/phoenix/services/index.js +1 -1
  784. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  785. package/dist/phoenix/services/phoenix-application.js +1 -0
  786. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  787. package/dist/phoenix/services/phoenix-store.js +1 -0
  788. package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
  789. package/dist/phoenix/services/phx-banner-plugin.js +1 -0
  790. package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
  791. package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
  792. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  793. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  794. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  795. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  796. package/dist/phoenix/services/variant-file-session.js +1 -0
  797. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  798. package/dist/phoenix/services/variant-preview-service.js +1 -0
  799. package/dist/phoenix/services/vite-config.d.ts +2 -0
  800. package/dist/phoenix/services/vite-config.js +1 -1
  801. package/dist/phoenix/utils/index.d.ts +1 -0
  802. package/dist/phoenix/utils/index.js +1 -1
  803. package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
  804. package/dist/phoenix/utils/read-git-commit.js +1 -0
  805. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  806. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  807. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  808. package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
  809. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  810. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
  811. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  812. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +16 -4
  813. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
  814. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  815. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  816. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  817. package/dist/ui-sdk/theme/types.d.ts +4 -0
  818. package/dist/webhook/builders/common.d.ts +8 -0
  819. package/dist/webhook/builders/webhook-builder.d.ts +1 -1
  820. package/dist/webhook/builders/webhook-builder.js +1 -1
  821. package/package.json +5 -8
  822. package/schema/domain-spec.json +24 -0
  823. package/dist/configurator/assistant/browser-details.js +0 -1
  824. package/dist/configurator/assistant/graphql-tools.js +0 -1
  825. package/dist/configurator/assistant/index.d.ts +0 -1
  826. package/dist/configurator/assistant/index.js +0 -1
  827. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
  828. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  829. package/dist/domain/components/debug-state-component.js +0 -1
  830. package/dist/domain/components/drag-state-component.js +0 -1
  831. package/dist/domain/components/export-state-component.js +0 -1
  832. package/dist/domain/components/fullscreen-state-component.js +0 -1
  833. package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
  834. package/dist/domain/components/hover-state-component.js +0 -1
  835. package/dist/domain/components/index.d.ts +0 -2
  836. package/dist/domain/components/index.js +0 -1
  837. package/dist/domain/components/navigation-state-component.js +0 -1
  838. package/dist/domain/components/selection-state-component.js +0 -1
  839. package/dist/domain/components/system-component-builder.js +0 -1
  840. package/dist/domain/components/system-virtual-entity.js +0 -1
  841. package/dist/domain/components/tool-state-component.js +0 -1
  842. package/dist/domain/components/view-state-component.js +0 -1
  843. package/dist/domain/components/viewport-state-component.js +0 -1
  844. package/dist/domain/core/json-schema.js +0 -1
  845. package/dist/domain/core/reflection.js +0 -1
  846. package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
  847. package/dist/domain/expressions/constant-expressions.js +0 -1
  848. package/dist/domain/expressions/custom-expression.js +0 -1
  849. package/dist/domain/expressions/index.d.ts +0 -1
  850. package/dist/domain/expressions/index.js +0 -1
  851. package/dist/domain/invariants/custom-invariants.js +0 -1
  852. package/dist/domain/invariants/invariants.js +0 -1
  853. package/dist/domain/invariants/violation-component.js +0 -1
  854. package/dist/domain/relations/all-of-type-relation.js +0 -1
  855. package/dist/domain/relations/component-factories.js +0 -1
  856. package/dist/domain/relations/composed-of.js +0 -1
  857. package/dist/domain/relations/indirect-relation.js +0 -1
  858. package/dist/domain/relations/reference-component.js +0 -1
  859. package/dist/domain/system-components/angle-indicator.js +0 -1
  860. package/dist/domain/system-components/attribute-switch.js +0 -1
  861. package/dist/domain/system-components/autorotate-camera-component.js +0 -1
  862. package/dist/domain/system-components/basic-sidebar-footer.js +0 -1
  863. package/dist/domain/system-components/camera-based-hidden-entity-object.js +0 -1
  864. package/dist/domain/system-components/camera-based-hidden-entity.js +0 -1
  865. package/dist/domain/system-components/canvas-config.js +0 -1
  866. package/dist/domain/system-components/canvas-custom-environment.js +0 -1
  867. package/dist/domain/system-components/canvas-padding.js +0 -1
  868. package/dist/domain/system-components/canvas-preset-environment.js +0 -1
  869. package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
  870. package/dist/domain/system-components/client-side-image.js +0 -1
  871. package/dist/domain/system-components/color-value.js +0 -1
  872. package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
  873. package/dist/domain/system-components/common/dimension-indicator-schema.js +0 -1
  874. package/dist/domain/system-components/custom-price-footer.js +0 -1
  875. package/dist/domain/system-components/dimension-indicator.js +0 -1
  876. package/dist/domain/system-components/editable-angle-indicator.js +0 -1
  877. package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
  878. package/dist/domain/system-components/editable-offset-indicator.js +0 -1
  879. package/dist/domain/system-components/editable-size-indicator.js +0 -1
  880. package/dist/domain/system-components/entity-header.js +0 -1
  881. package/dist/domain/system-components/exit-tool-mode-fab.js +0 -1
  882. package/dist/domain/system-components/finalize-action.js +0 -1
  883. package/dist/domain/system-components/finalize-component.js +0 -1
  884. package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +0 -1
  885. package/dist/domain/system-components/fit-selection-perspective-camera-component.js +0 -1
  886. package/dist/domain/system-components/fixed-header.js +0 -1
  887. package/dist/domain/system-components/floating-header.js +0 -1
  888. package/dist/domain/system-components/hidden-header.js +0 -1
  889. package/dist/domain/system-components/hidden-sidebar-footer.js +0 -1
  890. package/dist/domain/system-components/horizontal-tabs.js +0 -1
  891. package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
  892. package/dist/domain/system-components/multilingual-text-value.js +0 -1
  893. package/dist/domain/system-components/navigation-steps.js +0 -1
  894. package/dist/domain/system-components/offset-anchors.js +0 -1
  895. package/dist/domain/system-components/offset-indicator.js +0 -1
  896. package/dist/domain/system-components/offset.js +0 -1
  897. package/dist/domain/system-components/other-action.js +0 -1
  898. package/dist/domain/system-components/property-page.js +0 -1
  899. package/dist/domain/system-components/read-sidebar-footer.js +0 -1
  900. package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
  901. package/dist/domain/system-components/rotatable.js +0 -1
  902. package/dist/domain/system-components/rotation-handle.js +0 -1
  903. package/dist/domain/system-components/save-template-thumbnail.js +0 -1
  904. package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
  905. package/dist/domain/system-components/scene-entity-animation.js +0 -1
  906. package/dist/domain/system-components/scene-entity-control.js +0 -1
  907. package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
  908. package/dist/domain/system-components/scene-entity-floor-object.js +0 -1
  909. package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
  910. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
  911. package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
  912. package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
  913. package/dist/domain/system-components/scene-entity-wall-object.js +0 -1
  914. package/dist/domain/system-components/selectable-component.js +0 -1
  915. package/dist/domain/system-components/sidebar-tabs.js +0 -1
  916. package/dist/domain/system-components/simple-summary.js +0 -1
  917. package/dist/domain/system-components/size.js +0 -1
  918. package/dist/domain/system-components/sketching-draw.js +0 -1
  919. package/dist/domain/system-components/sketching-edit.js +0 -1
  920. package/dist/domain/system-components/summary-component.js +0 -1
  921. package/dist/domain/system-components/text-value.js +0 -1
  922. package/dist/domain/system-components/tool-controls.js +0 -1
  923. package/dist/domain/system-components/tool-menu-fab.js +0 -1
  924. package/dist/domain/system-components/universal-sidebar-footer.js +0 -1
  925. package/dist/domain/system-components/view-controls.js +0 -1
  926. package/dist/extras/assistant/AssistantChat.d.ts +0 -6
  927. package/dist/extras/assistant/AssistantChat.js +0 -1
  928. package/dist/extras/assistant/index.d.ts +0 -1
  929. package/dist/extras/assistant/index.js +0 -1
  930. package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +0 -12
  931. package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
  932. /package/dist/domain/{components/component-reader-types.js → application/assistant/assistant-manifest.js} +0 -0
  933. /package/dist/domain/{core/enhanced-json-schema.js → application/assistant/assistant-resolved-manifest.js} +0 -0
  934. /package/dist/domain/core/{expression.js → action/action.js} +0 -0
  935. /package/dist/domain/core/{schema-validator.js → component/component-reader-types.js} +0 -0
  936. /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
  937. /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
  938. /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
  939. /package/dist/domain/{components → core/component}/updates.js +0 -0
  940. /package/dist/domain/{relations/reference-field.js → core/data-schema/data-cell-value.js} +0 -0
  941. /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-array-field.js} +0 -0
  942. /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
  943. /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
  944. /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
  945. /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
  946. /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
  947. /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
  948. /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
  949. /package/dist/domain/core/{component.js → model/component.js} +0 -0
  950. /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
  951. /package/dist/domain/core/{model.js → model/model.js} +0 -0
  952. /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
  953. /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
  954. /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
  955. /package/dist/domain/{relations → core/relation}/relation-factory.js +0 -0
  956. /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
  957. /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
  958. /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
  959. /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
  960. /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
  961. /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
  962. /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
  963. /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
  964. /package/dist/domain/core/{state.js → state/state.js} +0 -0
  965. /package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.js +0 -0
  966. /package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
  967. /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
  968. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
  969. /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
  970. /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
  971. /package/dist/domain/{system-components → extensions}/client-side-image.d.ts +0 -0
  972. /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
  973. /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
  974. /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
  975. /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
  976. /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
  977. /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
  978. /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
  979. /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
  980. /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
  981. /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
  982. /package/dist/domain/{system-components → extensions}/navigation-steps.d.ts +0 -0
  983. /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
  984. /package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +0 -0
  985. /package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +0 -0
  986. /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
  987. /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
  988. /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
  989. /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
  990. /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
  991. /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
  992. /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
  993. /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
  994. /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
  995. /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
2
+ import type { PhxValidateFunction } from '../schema/index.js';
2
3
  import type { EntityId } from './model.js';
3
- import type { PhxValidateFunction } from './schema-validator.js';
4
4
  /**
5
5
  * Definition of how the component looks like, it's name, state and other properties. It is used to instantiate components.
6
6
  */
@@ -0,0 +1,6 @@
1
+ export * from './alias.js';
2
+ export * from './common-definitions.js';
3
+ export * from './component.js';
4
+ export * from './model.js';
5
+ export * from './preset.js';
6
+ export * from './reflection.js';
@@ -0,0 +1 @@
1
+ export*from"./alias.js";export*from"./common-definitions.js";export*from"./component.js";export*from"./model.js";export*from"./preset.js";export*from"./reflection.js";
@@ -1,6 +1,6 @@
1
1
  import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
2
+ import { type PhxValidateFunction } from '../schema/index.js';
2
3
  import { type $DomainEntity, type DomainEntity, type EntityByType, type EntityId } from './model.js';
3
- import type { PhxValidateFunction } from './schema-validator.js';
4
4
  type RequiredKeys<T> = {
5
5
  [K in keyof T]: undefined extends T[K] ? never : K;
6
6
  }[keyof T];
@@ -0,0 +1 @@
1
+ import{extendedSchemaValidator as t}from"../schema/index.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
@@ -0,0 +1 @@
1
+ export * from './recipes.js';
@@ -0,0 +1 @@
1
+ export*from"./recipes.js";
@@ -1,7 +1,5 @@
1
1
  import type { OmitEmpty, OmitNever, UnionToIntersection } from '@salsita-ai/common/utils';
2
- import { type AliasMap, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../../core/alias.js';
3
- import { type DomainEntity, type DomainEntityId, type EntityByType } from '../../core/model.js';
4
- import type { DomainEntityReflection } from '../../core/reflection.js';
2
+ import { type AliasMap, type DomainEntity, type DomainEntityId, type DomainEntityReflection, type EntityByType, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../model/index.js';
5
3
  export type EntityDefaults<ENTITY extends DomainEntity<string>> = {
6
4
  [K in Exclude<keyof ENTITY, 'id' | 'type'>]: ENTITY[K] extends DomainEntityId<any> ? null : ENTITY[K];
7
5
  };
@@ -0,0 +1 @@
1
+ import{_unsafeBuildDomainEntityId as e,expandAlias as r}from"../model/index.js";export const RecipeFactoryBuilder={forAliases:t=>({forEntities:o=>({withDefaults:i=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(e=>{a[e]={...a[e],...o}})});let n=new Map(o.map(e=>[e.type,e._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=n.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),{build:()=>r=>({id:e(r.type,1),...a[r.type],...r})}}})})};
@@ -1,7 +1,6 @@
1
- import { type AliasMap, type TypeOrAlias } from '../core/alias.js';
2
- import type { ExpressionMeta } from '../core/expression.js';
3
- import type { DomainEntity, DomainEntityId } from '../core/model.js';
4
- import type { DomainState } from '../core/state.js';
1
+ import type { ExpressionMeta } from '../expression/index.js';
2
+ import { type AliasMap, type DomainEntity, type DomainEntityId, type TypeOrAlias } from '../model/index.js';
3
+ import type { DomainState } from '../state/index.js';
5
4
  interface AllOfType0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
6
5
  kind: 'allOfType';
7
6
  target: TARGET;
@@ -0,0 +1 @@
1
+ import{expandAlias as e}from"../model/index.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${String(o.target)} after evaluation started. Create all relation expressions before evaluating the domain state.`);let i=new Set(e(t,o.target)),l=[...i].sort().join("|");return r.set(l,i),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(l)}};
@@ -1,5 +1,4 @@
1
- import type { DomainEntity, DomainEntityId } from '../core/model.js';
2
- import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
1
+ import type { DomainEntity, DomainEntityId, DomainEntityReflection, RawAliasReflection } from '../model/index.js';
3
2
  import type { ComposedOfComponentState } from './composed-of.js';
4
3
  import type { ReferenceComponentState } from './reference-component.js';
5
4
  export declare const createSingleReferenceRead: <TARGET extends DomainEntity<string>>(_targetReflection: DomainEntityReflection<TARGET> | RawAliasReflection<TARGET>, field: string) => (self: object, state: unknown, ctx: unknown) => ReferenceComponentState;
@@ -0,0 +1 @@
1
+ import{memoEval as e}from"../../utils/memo-eval.js";export const createSingleReferenceRead=(t,r)=>e(e=>[e[r]],e=>({referencedEntityIds:null===e?[]:[e]}));export const createSingleReferenceWrite=(e,t)=>r=>{let n=r.referencedEntityIds[0];return n&&e.assertId(n),{[t]:n??null}};export const createMultipleReferenceRead=(t,r)=>e(e=>[e[r]],e=>({referencedEntityIds:e}));export const createMultipleReferenceWrite=(e,t)=>r=>(e.assertIds(r.referencedEntityIds),{[t]:r.referencedEntityIds});export const createSingleCompositionRead=t=>e(e=>[e[t]?.id??null],e=>({childEntityIds:null===e?[]:[e]}));export const createMultipleCompositionRead=t=>e(e=>e[t].map(e=>e.id),(...e)=>({childEntityIds:e}));export const createEmptyWrite=()=>()=>({});
@@ -1,4 +1,4 @@
1
- import { type DomainEntityId } from '../core/model.js';
1
+ import { type DomainEntityId } from '../model/index.js';
2
2
  export type ComposedOfComponentState = {
3
3
  /**
4
4
  * List of entity IDs that the parent entity is composed of
@@ -0,0 +1 @@
1
+ import{SystemComponentBuilder as o}from"../component/index.js";import{EntityIdSchema as t}from"../model/index.js";export const composedOfComponent=o.component("composedOf").withState({type:"object",properties:{childEntityIds:{type:"array",items:t}},required:["childEntityIds"],additionalProperties:!1}).build();
@@ -1,6 +1,5 @@
1
- import type { ExpandAlias, TypeOrAlias } from '../core/alias.js';
2
- import type { ExpressionMeta } from '../core/expression.js';
3
- import type { DomainEntity } from '../core/model.js';
1
+ import type { ExpressionMeta } from '../expression/index.js';
2
+ import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
4
3
  import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
5
4
  import type { RelationImplementation } from './relation-implementation.js';
6
5
  interface DirectArrayRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
@@ -0,0 +1,9 @@
1
+ export * from './all-of-type-relation.js';
2
+ export * from './component-factories.js';
3
+ export * from './composed-of.js';
4
+ export * from './direct-relation.js';
5
+ export * from './indirect-relation.js';
6
+ export * from './reference-component.js';
7
+ export type * from './reference-field.js';
8
+ export * from './relation-factory.js';
9
+ export type * from './relation-implementation.js';
@@ -0,0 +1 @@
1
+ export*from"./all-of-type-relation.js";export*from"./component-factories.js";export*from"./composed-of.js";export*from"./direct-relation.js";export*from"./indirect-relation.js";export*from"./reference-component.js";export*from"./relation-factory.js";
@@ -1,7 +1,6 @@
1
- import { type AliasMap, type ExpandAlias, type TypeOrAlias } from '../core/alias.js';
2
- import type { ExpressionMeta } from '../core/expression.js';
3
- import { type DomainEntity, type DomainEntityId } from '../core/model.js';
4
- import type { DomainState } from '../core/state.js';
1
+ import type { ExpressionMeta } from '../expression/index.js';
2
+ import { type AliasMap, type DomainEntity, type DomainEntityId, type ExpandAlias, type TypeOrAlias } from '../model/index.js';
3
+ import type { DomainState } from '../state/index.js';
5
4
  import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
6
5
  interface IndirectNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
7
6
  kind: 'indirect';
@@ -0,0 +1 @@
1
+ import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../model/index.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let n=new Map,o=new WeakMap,a=!1;return l=>{if(a)throw Error(`Cannot register indirect relation ${String(l.target)}#${l.field} after evaluation started. Create all relation expressions before evaluating the domain state.`);let s=new Set(t(i,l.target)),f=`${l.field}|${[...s].sort().join("|")}`;return n.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=o.get(t);if(i)return i;a=!0;let l=new Map([...n.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:o,targetTypes:a}]of n){if(!a.has(i.type))continue;let n=i[o],s=e(n)?new Set(n.filter(r)):r(n)?[n]:[],f=l.get(t);for(let e of s){let t=f.get(e);t||(t=[],f.set(e,t)),t.push(i.id)}}return o.set(t,l),l})(i).get(f).get(t)??[]}};
@@ -1,6 +1,5 @@
1
- import type { DomainComponentOpticBuilder } from '../components/domain-component-optic.js';
2
- import type { $DomainEntity, DomainEntity, DomainEntityId } from '../core/model.js';
3
- import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
1
+ import { type DomainComponentOpticBuilder } from '../component/index.js';
2
+ import { type $DomainEntity, type DomainEntity, type DomainEntityId, type DomainEntityReflection, type RawAliasReflection } from '../model/index.js';
4
3
  import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
5
4
  export type ReferenceComponentState = {
6
5
  /**
@@ -14,5 +13,5 @@ export type ReferenceComponentState = {
14
13
  */
15
14
  export declare const referenceComponent: import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">;
16
15
  export type ReferenceComponent = typeof referenceComponent;
17
- export declare const attachSingleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: SingleReferenceField<ENTITY, TARGET_ENTITY, any>) => import("../components/domain-component-optic.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">>;
18
- export declare const attachMultipleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: ArrayReferenceField<ENTITY, TARGET_ENTITY>) => import("../components/domain-component-optic.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">>;
16
+ export declare const attachSingleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES, CONTEXT_EXTENSION = unknown>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent, CONTEXT_EXTENSION>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: SingleReferenceField<ENTITY, TARGET_ENTITY, any>) => import("../index.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">, CONTEXT_EXTENSION>;
17
+ export declare const attachMultipleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES, CONTEXT_EXTENSION = unknown>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent, CONTEXT_EXTENSION>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: ArrayReferenceField<ENTITY, TARGET_ENTITY>) => import("../index.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">, CONTEXT_EXTENSION>;
@@ -0,0 +1 @@
1
+ import{memoEval as e}from"../../utils/memo-eval.js";import{SystemComponentBuilder as t}from"../component/index.js";import{EntityIdSchema as r}from"../model/index.js";export const referenceComponent=t.component("reference").withState({type:"object",properties:{referencedEntityIds:{type:"array",items:r}},required:["referencedEntityIds"],additionalProperties:!1}).withWritableKeys(["referencedEntityIds"]).build();export const attachSingleReferenceComponent=(t,r,n)=>t.attach(e(e=>[e[n]],e=>({referencedEntityIds:null===e?[]:[e]})),e=>{let t=e.referencedEntityIds[0];return t&&r.assertId(t),{[n]:t??null}});export const attachMultipleReferenceComponent=(t,r,n)=>t.attach(e(e=>[e[n]],e=>({referencedEntityIds:e})),e=>(r.assertIds(e.referencedEntityIds),{[n]:e.referencedEntityIds}));
@@ -1,4 +1,4 @@
1
- import type { DomainEntity } from '../core/model.js';
1
+ import type { DomainEntity } from '../model/index.js';
2
2
  export type SingleReferenceField<FROM extends DomainEntity<string>, TO extends DomainEntity<string>, OPTIONALITY extends null | never> = {
3
3
  [K in keyof FROM]: TO['id'] | OPTIONALITY extends FROM[K] ? FROM[K] extends TO['id'] | OPTIONALITY ? K & string : never : never;
4
4
  }[keyof FROM];
@@ -0,0 +1 @@
1
+ export{};
@@ -1,6 +1,5 @@
1
- import type { AliasMap, ExpandAlias, TypeOrAlias } from '../core/alias.js';
2
- import type { AnonymousExpression } from '../core/expression.js';
3
- import type { $DomainEntity, DomainEntity } from '../core/model.js';
1
+ import type { AnonymousExpression } from '../expression/index.js';
2
+ import type { $DomainEntity, AliasMap, DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
4
3
  import { type AllOfTypeRelation } from './all-of-type-relation.js';
5
4
  import type { DirectRelation } from './direct-relation.js';
6
5
  import { type IndirectRelation } from './indirect-relation.js';
@@ -1,7 +1,6 @@
1
- import type { AliasMap } from '../core/alias.js';
2
- import type { Domain } from '../core/index.js';
3
- import type { DomainEntity, DomainEntityId } from '../core/model.js';
4
- import type { DomainState } from '../core/state.js';
1
+ import type { Domain } from '../domain.js';
2
+ import type { AliasMap, DomainEntity, DomainEntityId } from '../model/index.js';
3
+ import type { DomainState } from '../state/index.js';
5
4
  import type { Relation } from './relation-factory.js';
6
5
  export type RelationImplementation<KIND extends Relation<any, any, any, any>['kind']> = (relation: Extract<Relation<any, any, any, any>, {
7
6
  kind: KIND;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=t();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
@@ -0,0 +1,3 @@
1
+ export type { EnhancedJsonObjectSchemaType, EnhancedJsonSchemaType, JsonSchemaType, MemberImport, } from './enhanced-json-schema.js';
2
+ export { extendedSchemaValidator, getExtendedSchemaValidator } from './extended-schema-validator.js';
3
+ export type { PhxValidateFunction, PhxValidationError, SchemaValidator } from './schema-validator.js';
@@ -0,0 +1 @@
1
+ export{extendedSchemaValidator,getExtendedSchemaValidator}from"./extended-schema-validator.js";
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,15 @@
1
+ import type { DomainEntity, DomainEntityId } from '../model/index.js';
2
+ /**
3
+ * Hands out the ids of entities that are about to be created, one sequence per entity type. An
4
+ * action or a transformer asks it for an id instead of computing one from the state.
5
+ */
6
+ export type IdSequence<ENTITIES extends DomainEntity<string>> = {
7
+ /**
8
+ * Returns the next available entity ID for the given type.
9
+ * This automatically increments the sequence number for the given type, so that the next call will return a new ID.
10
+ *
11
+ * @param type the entity type
12
+ * @returns a new domain entity ID for the given type
13
+ */
14
+ nextId: <TYPE extends ENTITIES['type']>(type: TYPE) => DomainEntityId<TYPE>;
15
+ };
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,3 @@
1
+ export type * from './id-sequence.js';
2
+ export * from './migrations.js';
3
+ export * from './state.js';
@@ -0,0 +1 @@
1
+ export*from"./migrations.js";export*from"./state.js";
@@ -1,6 +1,5 @@
1
1
  import { type Logger } from '@salsita-ai/common/utils';
2
- import type { DomainEntity } from './model.js';
3
- import type { EntityReflections } from './reflection.js';
2
+ import type { DomainEntity, EntityReflections } from '../model/index.js';
4
3
  /**
5
4
  * Thrown when domain state cannot be validated/migrated to the latest model
6
5
  * version: an entity is invalid against its schema, an entity type or model
@@ -1,5 +1,4 @@
1
- import type { ComponentSnapshot, SystemComponentTypeConstraint } from './component.js';
2
- import type { DomainEntity } from './model.js';
1
+ import type { ComponentSnapshot, DomainEntity, SystemComponentTypeConstraint } from '../model/index.js';
3
2
  export interface DomainState<ENTITIES extends DomainEntity<string>> {
4
3
  readonly rootEntityId: ENTITIES['id'];
5
4
  readonly rootEntityType: ENTITIES['type'];
@@ -1,13 +1,6 @@
1
1
  import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
2
- import { type AliasMap, type ExpandAlias, type TypeOrAlias } from './core/alias.js';
3
- import type { AnonymousExpression } from './core/expression.js';
4
- import { DomainFactory } from './core/index.js';
5
- import { type MigrateFunction } from './core/migrations.js';
6
- import { type $DomainEntity, type DomainEntity, type EntityByType } from './core/model.js';
7
- import type { $DomainEntityReflection, EntityReflections, SchemaOfObject } from './core/reflection.js';
8
- export type AliasedExpressions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>> = {
9
- [K in TypeOrAlias<ENTITIES, ALIASES>]?: Record<string, AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, unknown>>;
10
- };
2
+ import { type $DomainEntity, type $DomainEntityReflection, type ActionDefinition, type AliasMap, type AliasedExpressions, type AnyActionImplementations, type DomainEntity, DomainFactory, type EntityByType, type EntityReflections, type MigrateFunction, type SchemaOfObject } from './core/index.js';
3
+ import type { ProjectModule } from './project-modules/index.js';
11
4
  type $EntityReflections<ENTITIES extends DomainEntity<string>> = {
12
5
  [TYPE in ENTITIES['type']]: $DomainEntityReflection<$DomainEntity<EntityByType<ENTITIES, TYPE>>>;
13
6
  };
@@ -24,10 +17,24 @@ export declare class DomainBuilder<ENTITIES extends DomainEntity<string>, ALLOWE
24
17
  private readonly backendData;
25
18
  private readonly migrate;
26
19
  private readonly isAdminDomain;
20
+ private readonly actions;
21
+ private readonly actionImplementations;
27
22
  private constructor();
28
23
  static from<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Readonly<Record<string, ENTITIES>>>(entities: EntityReflections<ENTITIES>, aliasMap: AliasMap<ALIASES>, $entityReflections: $EntityReflections<ENTITIES>, allowedRootEntityTypes: ReadonlyArray<ALLOWED_ROOT_ENTITIES['type']>, modelVersion: number, publishedData: SchemaOfObject<PUBLISHED_DATA>, sessionData: SchemaOfObject<SESSION_DATA>, frontendData: SchemaOfObject<FRONTEND_DATA>, backendData: ExtendedJsonSchema | undefined, isAdminDomain: boolean): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
29
24
  withMigrate(migration: MigrateFunction<ENTITIES>): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
30
25
  withExpressions(implementation: AliasedExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES>): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
26
+ /**
27
+ * Adds the expressions of the `src/expressions/` files, as the generated barrel lists them. Each file
28
+ * is checked against the folder's contract and added on its own, so an expression defined twice is
29
+ * reported with both files instead of being overwritten by file order.
30
+ */
31
+ withExpressionModules(modules: readonly ProjectModule[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
32
+ /** Declares the actions of the domain, as the generated `domain-spec.ts` reads them from the spec's `actions` section. */
33
+ withActions(actions: readonly ActionDefinition[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
34
+ /** Adds the action implementations of the `src/actions/` files, as the generated barrel lists them, after checking each file against the folder's contract. */
35
+ withActionModules(modules: readonly ProjectModule[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
36
+ /** Adds the implementations of the declared actions, already merged by action name. */
37
+ withActionImplementations(implementations: AnyActionImplementations): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
31
38
  build: () => DomainFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
32
39
  }
33
40
  export {};
@@ -1 +1 @@
1
- import{expandAlias as i}from"./core/alias.js";import{DomainFactory as t}from"./core/index.js";import{MigrateFunctionBuilder as e}from"./core/migrations.js";import{withProfilerLabel as s}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;constructor(i,t,e,s,a,n,o,l,r,h,d,m){this.entities=i,this.aliasMap=t,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=a,this.modelVersion=n,this.publishedData=o,this.sessionData=l,this.frontendData=r,this.backendData=h,this.migrate=d,this.isAdminDomain=m}static from(i,t,s,a,n,o,l,r,h,d){let m=e.fromVersions({1:i}).to(1).using({}).build();return new DomainBuilder(i,t,s,a,{},n,o,l,r,h,m,d)}withMigrate(i){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,i,this.isAdminDomain)}withExpressions(t){let e={...this.implemented};return Object.entries(t).forEach(([t,a])=>{i(this.aliasMap,t).forEach(i=>{let n={...e[i]};e[i]=n,Object.entries(a).forEach(([e,a])=>{let o=n[e];if(o)throw Error(`Duplicate expression ${i}.${e}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[e]={...a,evaluate:s(`${i}_${e}`,a.evaluate),origin:{name:e,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,e,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain)}build=()=>{let i=this.implemented,s=this.migrate??e.fromVersions({1:this.entities}).to(1).using({}).build();return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:i,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain})}}
1
+ import{DomainFactory as t,MigrateFunctionBuilder as i,expandAlias as e}from"./core/index.js";import{resolveActionModules as s,resolveExpressionModules as n}from"./domain-runtime/index.js";import{withProfilerLabel as a}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;actions;actionImplementations;constructor(t,i,e,s,n,a,o,h,l,r,m,d,p,c){this.entities=t,this.aliasMap=i,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=n,this.modelVersion=a,this.publishedData=o,this.sessionData=h,this.frontendData=l,this.backendData=r,this.migrate=m,this.isAdminDomain=d,this.actions=p,this.actionImplementations=c}static from(t,e,s,n,a,o,h,l,r,m){let d=i.fromVersions({1:t}).to(1).using({}).build();return new DomainBuilder(t,e,s,n,{},a,o,h,l,r,d,m,{},{})}withMigrate(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,t,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressions(t){let i={...this.implemented};return Object.entries(t).forEach(([t,s])=>{e(this.aliasMap,t).forEach(e=>{let n={...i[e]};i[e]=n,Object.entries(s).forEach(([i,s])=>{let o=n[i];if(o)throw Error(`Duplicate expression ${e}.${i}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[i]={...s,evaluate:a(`${e}_${i}`,s.evaluate),origin:{name:i,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,i,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressionModules(t){return n(t,this.aliasMap).reduce((t,i)=>t.withExpressions(i.expressions),this)}withActions(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,Object.fromEntries(t.map(t=>[t.name,t])),this.actionImplementations)}withActionModules(t){return this.withActionImplementations(s(t))}withActionImplementations(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,{...this.actionImplementations,...t})}build=()=>{let e=this.implemented,s=this.migrate??i.fromVersions({1:this.entities}).to(1).using({}).build();return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:e,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain,actions:this.actions,actionImplementations:this.actionImplementations})}}
@@ -0,0 +1,38 @@
1
+ import { type $DomainEntity, type ActionTypes, type DomainEntity, type DomainState, type PreparedAction } from '../../core/index.js';
2
+ import type { ActionContext, DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
3
+ export interface ActionSystemContext {
4
+ /**
5
+ * The action system's window into the runtime registry: the declared actions and their
6
+ * implementations are read per call, never snapshotted, so a hot-reloaded spec or action file is
7
+ * observed without rebuilding the system.
8
+ */
9
+ readonly selectors: DomainContextSelectors;
10
+ }
11
+ /** ActionSystem with its types erased — how the runtime selectors expose the instance. */
12
+ export type AnyActionSystem = ActionSystem<any, any, any, any, any, any, any, any, any, any, any>;
13
+ /**
14
+ * Runs the actions an application declares under `actions` and implements in `src/actions/`. It
15
+ * only prepares: an action gets the state it is called on and returns the updates it wants applied
16
+ * with a reader for its result, and the caller stages, commits or dry-runs them. Every caller of an
17
+ * action goes through it, so all of them run the same domain logic.
18
+ */
19
+ export declare class ActionSystem<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes> {
20
+ private readonly _context;
21
+ /** One compiled validator per declared action, rebuilt only when the declarations change. */
22
+ private readonly _selectValidators;
23
+ private readonly _updates;
24
+ constructor(_context: ActionSystemContext);
25
+ /**
26
+ * The context an implementation runs with on `state`. Code that prepares updates outside an
27
+ * action can run on the same context, so it can do everything an action can, the same way.
28
+ */
29
+ readonly createContext: (state: DomainState<ENTITIES>) => ActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
30
+ /**
31
+ * Prepares the action `name` with `args` on `state`. The arguments are validated against the
32
+ * params schema the action declares, and the implementation is called with the validated
33
+ * parameters and the context of the state; nothing is staged or committed. Throws for an unknown
34
+ * action, arguments that do not fit the schema, or a declared action without an implementation.
35
+ * The result of `readResult` is not validated: the generated type is its contract.
36
+ */
37
+ readonly prepareAction: <NAME extends keyof ACTION_TYPES & string>(name: NAME, args: unknown, state: DomainState<ENTITIES>) => PreparedAction<ENTITIES, ACTION_TYPES[NAME]['result']>;
38
+ }
@@ -0,0 +1 @@
1
+ import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as s}from"../../core/index.js";import{getIdSequence as n}from"../store-system/next-domain-entity-id.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,s.compile(t.params)])));_updates=e();constructor(t){this._context=t}createContext=t=>({expressionContext:this._context.selectors.getExpressionContext(),systems:this._context.selectors.getDomainSystems(),getIdSequence:()=>n(t.entities,[]),updates:this._updates});prepareAction=(t,e,n)=>{let o=this._context.selectors.getActionDefinitions(),i=Object.values(o).find(e=>e.name===t);if(!i){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(i.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${s.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._context.selectors.getActionImplementations()).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
@@ -1,4 +1,4 @@
1
- import type { $DomainEntity, DomainEntity } from '../core/model.js';
1
+ import type { $DomainEntity, DomainEntity } from '../core/index.js';
2
2
  import type { DomainContextSystems } from './domain-context-systems.js';
3
3
  import type { UpdateTransformer } from './store-system/store-system.js';
4
4
  export declare const createTransformer: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>(transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
@@ -1 +1 @@
1
- import{SystemComponentBuilder as t}from"../../components/index.js";import{DimensionUnitSchema as e}from"../../dimensions/index.js";export const dimensionStateComponent=t.component("dimensionStateComponent").withState({type:"object",properties:{unit:e},required:["unit"],additionalProperties:!1}).withWritableKeys(["unit"]).build();
1
+ import{SystemComponentBuilder as t}from"../../core/index.js";import{DimensionUnitSchema as e}from"../../dimensions/index.js";export const dimensionStateComponent=t.component("dimensionStateComponent").withState({type:"object",properties:{unit:e},required:["unit"],additionalProperties:!1}).withWritableKeys(["unit"]).build();
@@ -1,7 +1,6 @@
1
- import type { DomainEntity, DomainState } from '../../core/index.js';
1
+ import type { DomainEntity, DomainState, EntityViolation } from '../../core/index.js';
2
2
  import { DimensionUnit, type UnitsConfig } from '../../dimensions/index.js';
3
3
  import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
4
- import type { EntityViolation } from '../../invariants/violation.js';
5
4
  import { SystemState } from '../store-system/system-state.js';
6
5
  import { type DimensionStateComponent } from './dimension-state.js';
7
6
  export type DistanceDimensionViolation = `${string}.distanceDimension.tooLarge` | `${string}.distanceDimension.tooSmall`;
@@ -1,8 +1,8 @@
1
- import type { Domain } from '../core/domain.js';
2
- import type { $DomainEntity, DomainEntity } from '../core/model.js';
1
+ import type { $DomainEntity, ActionTypes, Domain, DomainEntity } from '../core/index.js';
3
2
  import type { ComponentReader, DomainContextSelectors } from '../domain-runtime/domain-context/index.js';
4
3
  import type { BlenderProjections, CollisionProjections, CompositionProjections, ConstraintProjections, PositionProjections, ProjectedEntitiesProjections, SnappingProjections, ValidationProjections } from '../projections/index.js';
5
4
  import type { SketchingProjections } from '../sketching/sketching-projections.js';
5
+ import type { ActionSystem } from './action-system/action-system.js';
6
6
  import type { DimensionSystem } from './dimension-system/dimension-system.js';
7
7
  import type { NavigationSystem } from './navigation-system/navigation-system.js';
8
8
  import type { RecipeCookerSystem } from './recipe-system/recipe-cooker-system.js';
@@ -14,7 +14,7 @@ import type { UndoSystem } from './undo-system.js';
14
14
  * The `DomainContext` lifecycle orchestrates these systems but does not expose them.
15
15
  * Consumers read this record through `DomainContextSelectors.getDomainSystems()`.
16
16
  */
17
- export interface DomainContextSystems<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> {
17
+ export interface DomainContextSystems<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes = ActionTypes> {
18
18
  /**
19
19
  * The system graph's window into the runtime registry. Consumers outside the domain systems use
20
20
  * it to read spec-derived values live rather than through construction-time snapshots.
@@ -30,6 +30,7 @@ export interface DomainContextSystems<ENTITIES extends DomainEntity<string>, ALL
30
30
  readonly dimensionSystem: DimensionSystem<ENTITIES>;
31
31
  readonly undoSystem: UndoSystem<ENTITIES, $MAP>;
32
32
  readonly recipeCooker: RecipeCookerSystem<ENTITIES>;
33
+ readonly actionSystem: ActionSystem<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>;
33
34
  readonly sketchingProjections: SketchingProjections<ENTITIES>;
34
35
  readonly collisionProjections: CollisionProjections<ENTITIES>;
35
36
  readonly positionProjections: PositionProjections<ENTITIES>;
@@ -37,4 +38,4 @@ export interface DomainContextSystems<ENTITIES extends DomainEntity<string>, ALL
37
38
  readonly projectedEntitiesProjections: ProjectedEntitiesProjections<ENTITIES>;
38
39
  readonly constraintProjections: ConstraintProjections<ENTITIES>;
39
40
  }
40
- export type AnyDomainContextSystems = DomainContextSystems<any, any, any, any, any, any, any>;
41
+ export type AnyDomainContextSystems = DomainContextSystems<any, any, any, any, any, any, any, any>;
@@ -1,10 +1,10 @@
1
1
  export { type AnalyticsSystem, NoopAnalyticsSystem } from './analytics-system/analytics-system.js';
2
- export { type AnalyticsEvent, AnalyticsEventFactory, AnalyticsEventType, } from './analytics-system/analytics-contracts.js';
2
+ export { type AnalyticsEvent, AnalyticsEventFactory, AnalyticsEventType, type DataLoadedEvent, type InitEvent, type NavigationEvent, type SessionAuthenticatedEvent, type SystemEvent, type UserActionEvent, } from './analytics-system/analytics-contracts.js';
3
3
  export { NavigationUpdateTag, isInitialNavigationUpdate, isNavigationUpdate, isInitialViewUpdate, isViewUpdate, isInitialSelectionUpdate, isSelectUpdate, isDeselectUpdate, isInitialFullscreenUpdate, isToggleFullscreenUpdate, isInitialDebugUpdate, isInitialViewportUpdate, isSetViewportUpdate, isInitialDragUpdate, isDragStartUpdate, isDragEndUpdate, isInitialToolUpdate, isToolUpdate, isExportUpdate, } from './navigation-system/navigation-updates.js';
4
4
  export { createAutoSelectionTransformer, NavigationSystem, type NavigationSystemContext, } from './navigation-system/navigation-system.js';
5
5
  export { createResetSelectionOnNavigationTransformer, createNavigationOnSelectionTransformer, createNavigationOnDeselectTransformer, createSelectParentOnDeselectionTransformer, createNavigationOnSelectionChangeTransformer, } from './navigation-system/selection-transformers.js';
6
- export { StoreSystem, type TransformerRegistration, type StateEmission, type UpdateTransformer, type TransformerLogFunction, type Transformers, type StateSliceName, type StateUpdateEmission, type StateEmissionKind, type CommitPreparedOutcome, } from './store-system/store-system.js';
7
- export { nextDomainEntityId, getIdSequence, type IdSequence } from './store-system/next-domain-entity-id.js';
6
+ export { StoreSystem, type TransformerRegistration, type UpdateTransformer, type TransformerLogFunction, type Transformers, type StateSliceName, type StateEmissionKind, type CommitPreparedOutcome, } from './store-system/store-system.js';
7
+ export { nextDomainEntityId, getIdSequence } from './store-system/next-domain-entity-id.js';
8
8
  export { applyUpdates } from './store-system/apply-updates.js';
9
9
  export { SystemState, SystemStateInitialUpdateTag, SystemStateUpdateTag, type SystemStateContext, } from './store-system/system-state.js';
10
10
  export { createRefReplaceTransformer } from './relation-transformers/replace-refs.js';
@@ -13,7 +13,7 @@ export { createCascadeRefPruningTransformer } from './relation-transformers/casc
13
13
  export { createCreateEntityRefsTransformer } from './relation-transformers/create-entity-refs.js';
14
14
  export { type CanBeUndonePredicate, type CanBeUndoneContext, type UndoCapabilities, UndoSystem, UNDO_REDO_RESET_TAG, isUndoRedoReset, } from './undo-system.js';
15
15
  export { DimensionSystem, type AnyDimensionSystem, type DimensionSystemContext, type AngleDimensionViolation, type DistanceDimensionViolation, type GenericDimensionViolation, } from './dimension-system/dimension-system.js';
16
- export { RecipeFactoryBuilder, type EntityRecipe } from './recipe-system/recipes.js';
16
+ export { ActionSystem, type AnyActionSystem, type ActionSystemContext } from './action-system/action-system.js';
17
17
  export { RecipeCookerSystem, type AnyRecipeCookerSystem, type RecipeCookerSystemContext, ReplaceRecipeUpdateTag, isReplaceEntityUpdate, type IsReplaceRecipeUpdate, CreateRecipeUpdateTag, isCreateEntityUpdate, type IsCreateRecipeUpdate, } from './recipe-system/recipe-cooker-system.js';
18
18
  export { type DomainContextSystems, type AnyDomainContextSystems } from './domain-context-systems.js';
19
19
  export { createTransformer, type TransformerFactory } from './create-transformer.js';
@@ -1 +1 @@
1
- export{NoopAnalyticsSystem}from"./analytics-system/analytics-system.js";export{AnalyticsEventFactory,AnalyticsEventType}from"./analytics-system/analytics-contracts.js";export{NavigationUpdateTag,isInitialNavigationUpdate,isNavigationUpdate,isInitialViewUpdate,isViewUpdate,isInitialSelectionUpdate,isSelectUpdate,isDeselectUpdate,isInitialFullscreenUpdate,isToggleFullscreenUpdate,isInitialDebugUpdate,isInitialViewportUpdate,isSetViewportUpdate,isInitialDragUpdate,isDragStartUpdate,isDragEndUpdate,isInitialToolUpdate,isToolUpdate,isExportUpdate}from"./navigation-system/navigation-updates.js";export{createAutoSelectionTransformer,NavigationSystem}from"./navigation-system/navigation-system.js";export{createResetSelectionOnNavigationTransformer,createNavigationOnSelectionTransformer,createNavigationOnDeselectTransformer,createSelectParentOnDeselectionTransformer,createNavigationOnSelectionChangeTransformer}from"./navigation-system/selection-transformers.js";export{StoreSystem}from"./store-system/store-system.js";export{nextDomainEntityId,getIdSequence}from"./store-system/next-domain-entity-id.js";export{applyUpdates}from"./store-system/apply-updates.js";export{SystemState,SystemStateInitialUpdateTag,SystemStateUpdateTag}from"./store-system/system-state.js";export{createRefReplaceTransformer}from"./relation-transformers/replace-refs.js";export{createCascadeDeletesTransformer}from"./relation-transformers/cascade-deletes.js";export{createCascadeRefPruningTransformer}from"./relation-transformers/cascade-ref-pruning.js";export{createCreateEntityRefsTransformer}from"./relation-transformers/create-entity-refs.js";export{UndoSystem,UNDO_REDO_RESET_TAG,isUndoRedoReset}from"./undo-system.js";export{DimensionSystem}from"./dimension-system/dimension-system.js";export{RecipeFactoryBuilder}from"./recipe-system/recipes.js";export{RecipeCookerSystem,ReplaceRecipeUpdateTag,isReplaceEntityUpdate,CreateRecipeUpdateTag,isCreateEntityUpdate}from"./recipe-system/recipe-cooker-system.js";export{createTransformer}from"./create-transformer.js";export*from"./transformers/index.js";
1
+ export{NoopAnalyticsSystem}from"./analytics-system/analytics-system.js";export{AnalyticsEventFactory,AnalyticsEventType}from"./analytics-system/analytics-contracts.js";export{NavigationUpdateTag,isInitialNavigationUpdate,isNavigationUpdate,isInitialViewUpdate,isViewUpdate,isInitialSelectionUpdate,isSelectUpdate,isDeselectUpdate,isInitialFullscreenUpdate,isToggleFullscreenUpdate,isInitialDebugUpdate,isInitialViewportUpdate,isSetViewportUpdate,isInitialDragUpdate,isDragStartUpdate,isDragEndUpdate,isInitialToolUpdate,isToolUpdate,isExportUpdate}from"./navigation-system/navigation-updates.js";export{createAutoSelectionTransformer,NavigationSystem}from"./navigation-system/navigation-system.js";export{createResetSelectionOnNavigationTransformer,createNavigationOnSelectionTransformer,createNavigationOnDeselectTransformer,createSelectParentOnDeselectionTransformer,createNavigationOnSelectionChangeTransformer}from"./navigation-system/selection-transformers.js";export{StoreSystem}from"./store-system/store-system.js";export{nextDomainEntityId,getIdSequence}from"./store-system/next-domain-entity-id.js";export{applyUpdates}from"./store-system/apply-updates.js";export{SystemState,SystemStateInitialUpdateTag,SystemStateUpdateTag}from"./store-system/system-state.js";export{createRefReplaceTransformer}from"./relation-transformers/replace-refs.js";export{createCascadeDeletesTransformer}from"./relation-transformers/cascade-deletes.js";export{createCascadeRefPruningTransformer}from"./relation-transformers/cascade-ref-pruning.js";export{createCreateEntityRefsTransformer}from"./relation-transformers/create-entity-refs.js";export{UndoSystem,UNDO_REDO_RESET_TAG,isUndoRedoReset}from"./undo-system.js";export{DimensionSystem}from"./dimension-system/dimension-system.js";export{ActionSystem}from"./action-system/action-system.js";export{RecipeCookerSystem,ReplaceRecipeUpdateTag,isReplaceEntityUpdate,CreateRecipeUpdateTag,isCreateEntityUpdate}from"./recipe-system/recipe-cooker-system.js";export{createTransformer}from"./create-transformer.js";export*from"./transformers/index.js";
@@ -1,6 +1,4 @@
1
- import { type Viewport } from '../../components/viewport-state-component.js';
2
- import type { DomainEntity } from '../../core/model.js';
3
- import type { DomainState } from '../../core/state.js';
1
+ import { type DomainEntity, type DomainState, type Viewport } from '../../core/index.js';
4
2
  import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
5
3
  import type { DomainServicesSelectors } from '../../domain-runtime/domain-services/index.js';
6
4
  import type { UpdateTransformer } from '../store-system/store-system.js';
@@ -37,7 +35,7 @@ export declare class NavigationSystem<ENTITIES extends DomainEntity<string>, NAV
37
35
  private get _initialExportState();
38
36
  constructor(_context: NavigationSystemContext);
39
37
  initialize: () => void;
40
- getInitialUpdates: () => (import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"debugState", import("../../index.js").DebugStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"dragState", import("../../index.js").DragStateComponentState, "draggedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"exportState", import("../../components/export-state-component.js").ExportStateComponentState, "activeState" | "exportedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"fullscreenState", import("../../index.js").FullscreenStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"hoverState", import("../../index.js").HoverStateComponentState, "hoveredEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"navigationState", import("../../index.js").NavigationStateComponentState, "activeState" | "historyStack">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"toolState", import("../../index.js").ToolStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewState", import("../../index.js").ViewStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewportState", import("../../index.js").ViewportStateComponentState, "active">>)[];
38
+ getInitialUpdates: () => (import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"debugState", import("../../index.js").DebugStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"dragState", import("../../index.js").DragStateComponentState, "draggedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"exportState", import("../../index.js").ExportStateComponentState, "activeState" | "exportedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"fullscreenState", import("../../index.js").FullscreenStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"hoverState", import("../../index.js").HoverStateComponentState, "hoveredEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"navigationState", import("../../index.js").NavigationStateComponentState, "activeState" | "historyStack">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"toolState", import("../../index.js").ToolStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewState", import("../../index.js").ViewStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewportState", import("../../index.js").ViewportStateComponentState, "active">>)[];
41
39
  /**
42
40
  * Get the current navigation state from the provided system state. This method should be only used in transformers or other imperative contexts, for
43
41
  * other use cases, use the observables provided by the NavigationSystem.
@@ -102,7 +100,7 @@ export declare class NavigationSystem<ENTITIES extends DomainEntity<string>, NAV
102
100
  getPopNavigationUpdate: (state: DomainState<ENTITIES>) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"navigationState", import("../../index.js").NavigationStateComponentState, "activeState" | "historyStack">> | null;
103
101
  getViewUpdate: (activeState: VIEW_STATES) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"viewState", import("../../index.js").ViewStateComponentState, "activeState">>;
104
102
  getToolUpdate: (activeState: TOOL_STATES) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"toolState", import("../../index.js").ToolStateComponentState, "activeState">>;
105
- getExportUpdate: (activeState: EXPORT_STATES, exportedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"exportState", import("../../components/export-state-component.js").ExportStateComponentState, "activeState" | "exportedEntityId">>;
103
+ getExportUpdate: (activeState: EXPORT_STATES, exportedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"exportState", import("../../index.js").ExportStateComponentState, "activeState" | "exportedEntityId">>;
106
104
  getSelectUpdate: (selectedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">>;
107
105
  getDeselectUpdate: () => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">>;
108
106
  getHoverInUpdate: (hoveredEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"hoverState", import("../../index.js").HoverStateComponentState, "hoveredEntityId">>;