@salsita-ai/sdk 0.49.0-develop.fc391028c9 → 0.50.0-develop.03ef51a292

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 (798) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +20 -12
  3. package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
  4. package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
  5. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  6. package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
  7. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  8. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  9. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  10. package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
  11. package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
  12. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  13. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  14. package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
  15. package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
  16. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
  17. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
  18. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  19. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +2 -2
  20. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -13
  21. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
  22. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
  23. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
  24. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
  25. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
  26. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
  27. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  28. package/dist/application-spec/generate-application/code/templates/domain-spec.js +7 -7
  29. package/dist/application-spec/generate-application/code/templates/domain.js +4 -4
  30. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
  31. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
  32. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  33. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  34. package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
  35. package/dist/application-spec/generate-application/code/templates/index.d.ts +7 -6
  36. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  37. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +2 -0
  38. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -0
  39. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.d.ts → skills/phoenix-create-configurator-skill.d.ts} +1 -1
  40. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.js → skills/phoenix-create-configurator-skill.js} +43 -13
  41. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +54 -0
  42. package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.js → skills/phoenix-review-skill.js} +7 -5
  43. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -0
  44. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  45. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  46. package/dist/application-spec/generate-application/code/templates/{common → skills}/sdk-content.d.ts +53 -3
  47. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +81 -0
  48. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -4
  49. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
  50. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  51. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
  52. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
  53. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
  54. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
  55. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
  56. package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
  57. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
  58. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  59. package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
  60. package/dist/application-spec/parse-application-files/merge/index.js +1 -1
  61. package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
  62. package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
  63. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
  64. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  65. package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
  66. package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
  67. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
  68. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
  69. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
  70. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  71. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
  72. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  73. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  74. package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
  75. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
  76. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  77. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  78. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  79. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
  80. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
  81. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
  82. package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
  83. package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
  84. package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
  85. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
  86. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
  87. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +5 -21
  88. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  89. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +14 -39
  90. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  91. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +2 -2
  92. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -19
  93. package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
  94. package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
  95. package/dist/client/phoenix-api.d.ts +63 -31
  96. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
  97. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  98. package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
  99. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  100. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +180 -0
  101. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
  102. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
  103. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
  104. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  105. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  106. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
  107. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
  108. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  109. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  110. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  111. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  112. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  113. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  114. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
  115. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  116. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
  117. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  118. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  119. package/dist/configurator/index.d.ts +0 -1
  120. package/dist/configurator/index.js +1 -1
  121. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  122. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  123. package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
  124. package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
  125. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  126. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
  127. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
  128. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
  129. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
  130. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
  131. package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -0
  132. package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
  133. package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
  134. package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
  135. package/dist/configurator/ui/assistant/index.d.ts +2 -0
  136. package/dist/configurator/ui/assistant/index.js +1 -0
  137. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
  138. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
  139. package/dist/configurator/ui/assistant/theme.d.ts +2 -0
  140. package/dist/configurator/ui/assistant/theme.js +1 -0
  141. package/dist/configurator/ui/assistant/thread-items.d.ts +37 -0
  142. package/dist/configurator/ui/assistant/thread-items.js +1 -0
  143. package/dist/configurator/ui/assistant/tool-chip.d.ts +44 -0
  144. package/dist/configurator/ui/assistant/tool-chip.js +1 -0
  145. package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
  146. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
  147. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  148. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  149. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
  150. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
  151. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  152. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  153. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
  154. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
  155. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
  156. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  157. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
  158. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
  159. package/dist/docs/index.json +12 -2
  160. package/dist/docs/layouts/custom-price.mdx +14 -16
  161. package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
  162. package/dist/docs/layouts/toolbar.mdx +6 -0
  163. package/dist/docs/other-features/domain-actions.mdx +418 -0
  164. package/dist/docs/other-features/side-effects.mdx +68 -34
  165. package/dist/docs/other-features/transformers.mdx +1 -1
  166. package/dist/docs/phoenix/admin.mdx +11 -26
  167. package/dist/docs/phoenix/best-practices.mdx +1 -0
  168. package/dist/docs/phoenix/finalization.mdx +1 -1
  169. package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
  170. package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
  171. package/dist/docs/phoenix/localization.mdx +3 -22
  172. package/dist/docs/phoenix/migrations.mdx +45 -5
  173. package/dist/docs/phoenix/phoenix-cli.mdx +139 -20
  174. package/dist/docs/phoenix/project-structure.mdx +13 -3
  175. package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -8
  176. package/dist/docs/phoenix/state-management.mdx +1 -1
  177. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
  178. package/dist/docs/relations/hierarchy.mdx +13 -2
  179. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
  180. package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
  181. package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
  182. package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
  183. package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
  184. package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
  185. package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
  186. package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
  187. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +1 -4
  188. package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
  189. package/dist/domain/admin-domain/index.d.ts +2 -3
  190. package/dist/domain/admin-domain/index.js +1 -1
  191. package/dist/domain/application/admin-page-factories.d.ts +1 -1
  192. package/dist/domain/application/application-config.d.ts +25 -73
  193. package/dist/domain/application/assistant/assistant-manifest.d.ts +63 -0
  194. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
  195. package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
  196. package/dist/domain/application/assistant/assistant-value-type.js +1 -0
  197. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
  198. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
  199. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  200. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
  201. package/dist/domain/application/assistant/index.d.ts +4 -0
  202. package/dist/domain/application/assistant/index.js +1 -0
  203. package/dist/domain/application/assistant-field-options.d.ts +2 -3
  204. package/dist/domain/application/assistant-mutations.d.ts +15 -17
  205. package/dist/domain/application/assistant-mutations.js +1 -1
  206. package/dist/domain/application/assistant-recipe-groups.d.ts +2 -6
  207. package/dist/domain/application/configurator-builder.d.ts +33 -18
  208. package/dist/domain/application/configurator-builder.js +1 -1
  209. package/dist/domain/application/element-registration.d.ts +5 -0
  210. package/dist/domain/application/element-registration.js +1 -1
  211. package/dist/domain/application/handler-registration.d.ts +5 -0
  212. package/dist/domain/application/handler-registration.js +1 -1
  213. package/dist/domain/application/index.d.ts +5 -4
  214. package/dist/domain/application/index.js +1 -1
  215. package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
  216. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  217. package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
  218. package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
  219. package/dist/domain/application/resolve-imported-transformers.js +1 -1
  220. package/dist/domain/available-system-components.js +1 -1
  221. package/dist/domain/core/action/action-factory.d.ts +11 -0
  222. package/dist/domain/core/action/action-factory.js +1 -0
  223. package/dist/domain/core/action/action.d.ts +66 -0
  224. package/dist/domain/core/action/index.d.ts +3 -0
  225. package/dist/domain/core/action/index.js +1 -0
  226. package/dist/domain/core/action/prepare-action-implementations.d.ts +15 -0
  227. package/dist/domain/core/action/prepare-action-implementations.js +5 -0
  228. package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
  229. package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
  230. package/dist/domain/core/component/debug-state-component.js +1 -0
  231. package/dist/domain/{components → core/component}/domain-component-optic.d.ts +6 -6
  232. package/dist/domain/core/component/domain-component-optic.js +16 -0
  233. package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
  234. package/dist/domain/core/component/drag-state-component.js +1 -0
  235. package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
  236. package/dist/domain/core/component/export-state-component.js +1 -0
  237. package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
  238. package/dist/domain/core/component/fullscreen-state-component.js +1 -0
  239. package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
  240. package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
  241. package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
  242. package/dist/domain/core/component/hover-state-component.js +1 -0
  243. package/dist/domain/core/component/index.d.ts +18 -0
  244. package/dist/domain/core/component/index.js +1 -0
  245. package/dist/domain/{components → core/component}/legacy-filter.d.ts +2 -2
  246. package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
  247. package/dist/domain/core/component/navigation-state-component.js +1 -0
  248. package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
  249. package/dist/domain/core/component/selection-state-component.js +1 -0
  250. package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
  251. package/dist/domain/core/component/system-component-builder.js +1 -0
  252. package/dist/domain/{components → core/component}/system-component-filter.d.ts +3 -3
  253. package/dist/domain/core/component/system-virtual-entity.js +1 -0
  254. package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
  255. package/dist/domain/core/component/tool-state-component.js +1 -0
  256. package/dist/domain/{components → core/component}/updates.d.ts +17 -2
  257. package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
  258. package/dist/domain/core/component/view-state-component.js +1 -0
  259. package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
  260. package/dist/domain/core/component/viewport-state-component.js +1 -0
  261. package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
  262. package/dist/domain/core/decoder/create-decoder.js +1 -0
  263. package/dist/domain/core/decoder/decoder.d.ts +6 -0
  264. package/dist/domain/core/decoder/decoder.js +1 -0
  265. package/dist/domain/core/decoder/index.d.ts +2 -0
  266. package/dist/domain/core/decoder/index.js +1 -0
  267. package/dist/domain/core/domain-factory.d.ts +7 -4
  268. package/dist/domain/core/domain-factory.js +1 -1
  269. package/dist/domain/core/domain.d.ts +3 -4
  270. package/dist/domain/core/domain.js +1 -1
  271. package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
  272. package/dist/domain/core/expression/constant-expressions.js +1 -0
  273. package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +4 -5
  274. package/dist/domain/core/expression/custom-expression.js +1 -0
  275. package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +6 -8
  276. package/dist/domain/core/expression/expression.js +1 -0
  277. package/dist/domain/core/expression/index.d.ts +5 -0
  278. package/dist/domain/core/expression/index.js +1 -0
  279. package/dist/domain/{expressions → core/expression}/memoize-expression.d.ts +2 -2
  280. package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.d.ts +1 -1
  281. package/dist/domain/core/index.d.ts +9 -16
  282. package/dist/domain/core/index.js +1 -1
  283. package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
  284. package/dist/domain/{invariants → core/invariant}/custom-invariants.d.ts +2 -3
  285. package/dist/domain/core/invariant/custom-invariants.js +1 -0
  286. package/dist/domain/core/invariant/index.d.ts +5 -0
  287. package/dist/domain/core/invariant/index.js +1 -0
  288. package/dist/domain/{invariants → core/invariant}/invariants.d.ts +12 -4
  289. package/dist/domain/core/invariant/invariants.js +1 -0
  290. package/dist/domain/core/invariant/violation-component.js +1 -0
  291. package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
  292. package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
  293. package/dist/domain/core/model/index.d.ts +6 -0
  294. package/dist/domain/core/model/index.js +1 -0
  295. package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
  296. package/dist/domain/core/model/reflection.js +1 -0
  297. package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
  298. package/dist/domain/core/schema/extended-schema-validator.js +1 -0
  299. package/dist/domain/core/schema/index.d.ts +3 -0
  300. package/dist/domain/core/schema/index.js +1 -0
  301. package/dist/domain/core/schema/schema-validator.js +1 -0
  302. package/dist/domain/core/state/id-sequence.d.ts +15 -0
  303. package/dist/domain/core/state/id-sequence.js +1 -0
  304. package/dist/domain/core/state/index.d.ts +3 -0
  305. package/dist/domain/core/state/index.js +1 -0
  306. package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
  307. package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
  308. package/dist/domain/domain-builder.d.ts +16 -6
  309. package/dist/domain/domain-builder.js +1 -1
  310. package/dist/domain/domain-context/action-system/action-system.d.ts +38 -0
  311. package/dist/domain/domain-context/action-system/action-system.js +1 -0
  312. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  313. package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
  314. package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +1 -2
  315. package/dist/domain/domain-context/domain-context-systems.d.ts +5 -4
  316. package/dist/domain/domain-context/index.d.ts +3 -2
  317. package/dist/domain/domain-context/index.js +1 -1
  318. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -5
  319. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  320. package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
  321. package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
  322. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  323. package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
  324. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -2
  325. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
  326. package/dist/domain/domain-context/recipe-system/recipes.d.ts +1 -3
  327. package/dist/domain/domain-context/recipe-system/recipes.js +1 -1
  328. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
  329. package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
  330. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
  331. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
  332. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
  333. package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
  334. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
  335. package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
  336. package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
  337. package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
  338. package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
  339. package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
  340. package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
  341. package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
  342. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -5
  343. package/dist/domain/domain-context/store-system/store-system.js +2 -2
  344. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
  345. package/dist/domain/domain-context/store-system/system-state.js +1 -1
  346. package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
  347. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  348. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -3
  349. package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
  350. package/dist/domain/domain-context/transformers/context.d.ts +1 -5
  351. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
  352. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  353. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
  354. package/dist/domain/domain-context/transformers/then-builder.js +1 -1
  355. package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -6
  356. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  357. package/dist/domain/domain-context/undo-system.d.ts +1 -1
  358. package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
  359. package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
  360. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  361. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -3
  362. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  363. package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -4
  364. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  365. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  366. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  367. package/dist/domain/domain-runtime/spec/types.d.ts +18 -5
  368. package/dist/domain/index.d.ts +1 -25
  369. package/dist/domain/index.js +1 -1
  370. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -3
  371. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  372. package/dist/domain/project-modules/index.d.ts +1 -0
  373. package/dist/domain/project-modules/index.js +1 -0
  374. package/dist/domain/project-modules/project-modules.d.ts +41 -0
  375. package/dist/domain/project-modules/project-modules.js +1 -0
  376. package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -1
  377. package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
  378. package/dist/domain/projections/composition-projections.js +1 -1
  379. package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
  380. package/dist/domain/projections/snap-matching.d.ts +1 -2
  381. package/dist/domain/projections/snap-utils.d.ts +1 -2
  382. package/dist/domain/projections/validation-projections.d.ts +1 -2
  383. package/dist/domain/projections/validation-projections.js +1 -1
  384. package/dist/domain/relations/all-of-type-relation.d.ts +1 -4
  385. package/dist/domain/relations/all-of-type-relation.js +1 -1
  386. package/dist/domain/relations/component-factories.d.ts +1 -2
  387. package/dist/domain/relations/composed-of.d.ts +1 -1
  388. package/dist/domain/relations/composed-of.js +1 -1
  389. package/dist/domain/relations/direct-relation.d.ts +1 -3
  390. package/dist/domain/relations/indirect-relation.d.ts +1 -4
  391. package/dist/domain/relations/indirect-relation.js +1 -1
  392. package/dist/domain/relations/reference-component.d.ts +3 -5
  393. package/dist/domain/relations/reference-component.js +1 -1
  394. package/dist/domain/relations/reference-field.d.ts +1 -1
  395. package/dist/domain/relations/relation-factory.d.ts +1 -3
  396. package/dist/domain/relations/relation-implementation.d.ts +1 -4
  397. package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
  398. package/dist/domain/system-components/admin-sidebar.js +1 -1
  399. package/dist/domain/system-components/angle-dimension.js +1 -1
  400. package/dist/domain/system-components/angle-indicator.d.ts +1 -1
  401. package/dist/domain/system-components/angle-indicator.js +1 -1
  402. package/dist/domain/system-components/application-config.d.ts +1 -1
  403. package/dist/domain/system-components/application-config.js +1 -1
  404. package/dist/domain/system-components/attribute-selection.js +1 -1
  405. package/dist/domain/system-components/attribute-switch.js +1 -1
  406. package/dist/domain/system-components/autorotate-camera-component.d.ts +1 -1
  407. package/dist/domain/system-components/autorotate-camera-component.js +1 -1
  408. package/dist/domain/system-components/basic-sidebar-footer.d.ts +1 -1
  409. package/dist/domain/system-components/basic-sidebar-footer.js +1 -1
  410. package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
  411. package/dist/domain/system-components/bounding-box-component.js +1 -1
  412. package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
  413. package/dist/domain/system-components/bounding-sphere-component.js +1 -1
  414. package/dist/domain/system-components/camera-based-hidden-entity-object.js +1 -1
  415. package/dist/domain/system-components/camera-based-hidden-entity.js +1 -1
  416. package/dist/domain/system-components/canvas-config.d.ts +1 -1
  417. package/dist/domain/system-components/canvas-config.js +1 -1
  418. package/dist/domain/system-components/canvas-custom-environment.js +1 -1
  419. package/dist/domain/system-components/canvas-padding.d.ts +1 -1
  420. package/dist/domain/system-components/canvas-padding.js +1 -1
  421. package/dist/domain/system-components/canvas-preset-environment.d.ts +1 -1
  422. package/dist/domain/system-components/canvas-preset-environment.js +1 -1
  423. package/dist/domain/system-components/child-entity-recipe-hierarchy.d.ts +1 -1
  424. package/dist/domain/system-components/child-entity-recipe-hierarchy.js +1 -1
  425. package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
  426. package/dist/domain/system-components/child-entity-recipes.js +1 -1
  427. package/dist/domain/system-components/child-entity-selection.d.ts +1 -1
  428. package/dist/domain/system-components/child-entity-selection.js +1 -1
  429. package/dist/domain/system-components/client-side-image.js +1 -1
  430. package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
  431. package/dist/domain/system-components/collision-box-geometry.js +1 -1
  432. package/dist/domain/system-components/collision-geometries.d.ts +1 -1
  433. package/dist/domain/system-components/collision-geometry.d.ts +1 -1
  434. package/dist/domain/system-components/collision-geometry.js +1 -1
  435. package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
  436. package/dist/domain/system-components/collision-point-geometry.js +1 -1
  437. package/dist/domain/system-components/color-value.js +1 -1
  438. package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +1 -1
  439. package/dist/domain/system-components/common/dimension-indicator-schema.js +1 -1
  440. package/dist/domain/system-components/constraint.d.ts +1 -1
  441. package/dist/domain/system-components/constraint.js +1 -1
  442. package/dist/domain/system-components/create-blueprint.d.ts +1 -1
  443. package/dist/domain/system-components/custom-header.d.ts +1 -1
  444. package/dist/domain/system-components/custom-header.js +1 -1
  445. package/dist/domain/system-components/custom-price-footer.js +1 -1
  446. package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
  447. package/dist/domain/system-components/custom-scene-entity.js +1 -1
  448. package/dist/domain/system-components/custom-sidebar-footer.d.ts +1 -1
  449. package/dist/domain/system-components/custom-sidebar-footer.js +1 -1
  450. package/dist/domain/system-components/detail.js +1 -1
  451. package/dist/domain/system-components/dimension-indicator.d.ts +1 -1
  452. package/dist/domain/system-components/dimension-indicator.js +1 -1
  453. package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
  454. package/dist/domain/system-components/distance-dimension-select.js +1 -1
  455. package/dist/domain/system-components/distance-dimension.d.ts +1 -1
  456. package/dist/domain/system-components/distance-dimension.js +1 -1
  457. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  458. package/dist/domain/system-components/drag-handle.js +1 -1
  459. package/dist/domain/system-components/editable-angle-indicator.d.ts +1 -1
  460. package/dist/domain/system-components/editable-angle-indicator.js +1 -1
  461. package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +1 -1
  462. package/dist/domain/system-components/editable-distance-dimension-indicator.js +1 -1
  463. package/dist/domain/system-components/editable-offset-indicator.d.ts +1 -1
  464. package/dist/domain/system-components/editable-offset-indicator.js +1 -1
  465. package/dist/domain/system-components/editable-size-indicator.d.ts +1 -1
  466. package/dist/domain/system-components/editable-size-indicator.js +1 -1
  467. package/dist/domain/system-components/entity-header.js +1 -1
  468. package/dist/domain/system-components/exit-tool-mode-fab.d.ts +1 -1
  469. package/dist/domain/system-components/exit-tool-mode-fab.js +1 -1
  470. package/dist/domain/system-components/finalize-action.d.ts +1 -1
  471. package/dist/domain/system-components/finalize-action.js +1 -1
  472. package/dist/domain/system-components/finalize-component.js +1 -1
  473. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  474. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  475. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  476. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  477. package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +1 -1
  478. package/dist/domain/system-components/fit-selection-perspective-camera-component.js +1 -1
  479. package/dist/domain/system-components/fixed-header.d.ts +1 -1
  480. package/dist/domain/system-components/fixed-header.js +1 -1
  481. package/dist/domain/system-components/floating-header.d.ts +1 -1
  482. package/dist/domain/system-components/floating-header.js +1 -1
  483. package/dist/domain/system-components/generic-dimension.d.ts +1 -1
  484. package/dist/domain/system-components/generic-dimension.js +1 -1
  485. package/dist/domain/system-components/hidden-entity.js +1 -1
  486. package/dist/domain/system-components/hidden-header.d.ts +1 -1
  487. package/dist/domain/system-components/hidden-header.js +1 -1
  488. package/dist/domain/system-components/hidden-sidebar-footer.d.ts +1 -1
  489. package/dist/domain/system-components/hidden-sidebar-footer.js +1 -1
  490. package/dist/domain/system-components/horizontal-tabs.d.ts +1 -1
  491. package/dist/domain/system-components/horizontal-tabs.js +1 -1
  492. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
  493. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  494. package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +1 -1
  495. package/dist/domain/system-components/list-selector-dimension-indicator.js +1 -1
  496. package/dist/domain/system-components/material-override-property-transition.js +1 -1
  497. package/dist/domain/system-components/material-override-transformer.js +1 -1
  498. package/dist/domain/system-components/material-swatch.js +1 -1
  499. package/dist/domain/system-components/multilingual-text-value.js +1 -1
  500. package/dist/domain/system-components/navigation-page.js +1 -1
  501. package/dist/domain/system-components/navigation-panel-list.js +1 -1
  502. package/dist/domain/system-components/navigation-steps.js +1 -1
  503. package/dist/domain/system-components/offset-anchors.d.ts +1 -1
  504. package/dist/domain/system-components/offset-anchors.js +1 -1
  505. package/dist/domain/system-components/offset-indicator.d.ts +1 -2
  506. package/dist/domain/system-components/offset-indicator.js +1 -1
  507. package/dist/domain/system-components/offset.d.ts +1 -1
  508. package/dist/domain/system-components/offset.js +1 -1
  509. package/dist/domain/system-components/other-action.d.ts +1 -1
  510. package/dist/domain/system-components/other-action.js +1 -1
  511. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
  512. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
  513. package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
  514. package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
  515. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
  516. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
  517. package/dist/domain/system-components/pivot-point.d.ts +1 -1
  518. package/dist/domain/system-components/pivot-point.js +1 -1
  519. package/dist/domain/system-components/price.js +1 -1
  520. package/dist/domain/system-components/projected-entities.d.ts +1 -1
  521. package/dist/domain/system-components/projected-entities.js +1 -1
  522. package/dist/domain/system-components/property-page.d.ts +1 -1
  523. package/dist/domain/system-components/property-page.js +1 -1
  524. package/dist/domain/system-components/read-sidebar-footer.d.ts +1 -1
  525. package/dist/domain/system-components/read-sidebar-footer.js +1 -1
  526. package/dist/domain/system-components/replace-entity-recipe-hierarchy.d.ts +1 -1
  527. package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +1 -1
  528. package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
  529. package/dist/domain/system-components/replace-entity-recipes.js +1 -1
  530. package/dist/domain/system-components/rotatable.js +1 -1
  531. package/dist/domain/system-components/rotation-handle.js +1 -1
  532. package/dist/domain/system-components/save-template-thumbnail.js +1 -1
  533. package/dist/domain/system-components/scene-entity-add-fab.js +1 -1
  534. package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
  535. package/dist/domain/system-components/scene-entity-animation.js +1 -1
  536. package/dist/domain/system-components/scene-entity-box-object.js +1 -1
  537. package/dist/domain/system-components/scene-entity-control.js +1 -1
  538. package/dist/domain/system-components/scene-entity-delete-fab.js +1 -1
  539. package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
  540. package/dist/domain/system-components/scene-entity-floor-object.js +1 -1
  541. package/dist/domain/system-components/scene-entity-html-hotspot.js +1 -1
  542. package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
  543. package/dist/domain/system-components/scene-entity-material-override.js +1 -1
  544. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +1 -1
  545. package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
  546. package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
  547. package/dist/domain/system-components/scene-entity-object-group.js +1 -1
  548. package/dist/domain/system-components/scene-entity-object-html-hotspot.js +1 -1
  549. package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
  550. package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
  551. package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
  552. package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
  553. package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
  554. package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
  555. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
  556. package/dist/domain/system-components/scene-entity-object.js +1 -1
  557. package/dist/domain/system-components/scene-entity-point-light.js +1 -1
  558. package/dist/domain/system-components/scene-entity-properties.js +1 -1
  559. package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
  560. package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
  561. package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
  562. package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
  563. package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
  564. package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
  565. package/dist/domain/system-components/scene-entity-wall-object.js +1 -1
  566. package/dist/domain/system-components/selectable-component.js +1 -1
  567. package/dist/domain/system-components/sidebar-tabs.d.ts +1 -1
  568. package/dist/domain/system-components/sidebar-tabs.js +1 -1
  569. package/dist/domain/system-components/simple-summary.js +1 -1
  570. package/dist/domain/system-components/size.d.ts +1 -1
  571. package/dist/domain/system-components/size.js +1 -1
  572. package/dist/domain/system-components/sketching-draw.d.ts +1 -1
  573. package/dist/domain/system-components/sketching-draw.js +1 -1
  574. package/dist/domain/system-components/sketching-edit.d.ts +1 -1
  575. package/dist/domain/system-components/sketching-edit.js +1 -1
  576. package/dist/domain/system-components/sketching-line.d.ts +1 -1
  577. package/dist/domain/system-components/sketching-line.js +1 -1
  578. package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
  579. package/dist/domain/system-components/sketching-rectangle.js +1 -1
  580. package/dist/domain/system-components/sketching.d.ts +1 -1
  581. package/dist/domain/system-components/sketching.js +1 -1
  582. package/dist/domain/system-components/snap-axis.d.ts +1 -1
  583. package/dist/domain/system-components/snap-axis.js +1 -1
  584. package/dist/domain/system-components/snap-edge.d.ts +1 -1
  585. package/dist/domain/system-components/snap-edge.js +1 -1
  586. package/dist/domain/system-components/snap-plane.d.ts +1 -1
  587. package/dist/domain/system-components/snap-plane.js +1 -1
  588. package/dist/domain/system-components/snap-point.d.ts +1 -1
  589. package/dist/domain/system-components/snap-point.js +1 -1
  590. package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
  591. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  592. package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
  593. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  594. package/dist/domain/system-components/summary-component.js +1 -1
  595. package/dist/domain/system-components/text-value.js +1 -1
  596. package/dist/domain/system-components/tool-controls.js +1 -1
  597. package/dist/domain/system-components/tool-menu-fab.d.ts +1 -1
  598. package/dist/domain/system-components/tool-menu-fab.js +1 -1
  599. package/dist/domain/system-components/toolbar.d.ts +1 -1
  600. package/dist/domain/system-components/toolbar.js +1 -1
  601. package/dist/domain/system-components/universal-sidebar-footer.d.ts +1 -1
  602. package/dist/domain/system-components/universal-sidebar-footer.js +1 -1
  603. package/dist/domain/system-components/view-controls.js +1 -1
  604. package/dist/domain/utils/eval-cache.d.ts +1 -2
  605. package/dist/domain/utils/memo-eval.d.ts +1 -3
  606. package/dist/editor/Editor.js +1 -1
  607. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  608. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  609. package/dist/editor/domain-editors/use-implementation-files.d.ts +11 -6
  610. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  611. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  612. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  613. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  614. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  615. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  616. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  617. package/dist/editor/variants/variant-preview-styles.js +1 -0
  618. package/dist/i18n/locales/cs/messages.js +1 -1
  619. package/dist/i18n/locales/da/messages.js +1 -1
  620. package/dist/i18n/locales/de/messages.js +1 -1
  621. package/dist/i18n/locales/de-AT/messages.js +1 -1
  622. package/dist/i18n/locales/en/messages.js +1 -1
  623. package/dist/i18n/locales/en-AU/messages.js +1 -1
  624. package/dist/i18n/locales/en-GB/messages.js +1 -1
  625. package/dist/i18n/locales/es/messages.js +1 -1
  626. package/dist/i18n/locales/fr/messages.js +1 -1
  627. package/dist/i18n/locales/hu/messages.js +1 -1
  628. package/dist/i18n/locales/it/messages.js +1 -1
  629. package/dist/i18n/locales/nl/messages.js +1 -1
  630. package/dist/i18n/locales/pl/messages.js +1 -1
  631. package/dist/i18n/locales/pt/messages.js +1 -1
  632. package/dist/i18n/locales/ro/messages.js +1 -1
  633. package/dist/i18n/locales/sk/messages.js +1 -1
  634. package/dist/i18n/locales/tr/messages.js +1 -1
  635. package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
  636. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  637. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  638. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
  639. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
  640. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
  641. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
  642. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
  643. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
  644. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
  645. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
  646. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
  647. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
  648. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  649. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
  650. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  651. package/dist/phoenix/cli.js +1 -1
  652. package/dist/phoenix/commands/build.d.ts +5 -0
  653. package/dist/phoenix/commands/build.js +1 -1
  654. package/dist/phoenix/commands/deploy.js +2 -2
  655. package/dist/phoenix/commands/dev.js +5 -5
  656. package/dist/phoenix/commands/feedback.d.ts +2 -1
  657. package/dist/phoenix/commands/feedback.js +1 -1
  658. package/dist/phoenix/commands/index.d.ts +1 -0
  659. package/dist/phoenix/commands/index.js +1 -1
  660. package/dist/phoenix/commands/login.d.ts +24 -6
  661. package/dist/phoenix/commands/login.js +2 -2
  662. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  663. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  664. package/dist/phoenix/commands/story-dev.js +2 -2
  665. package/dist/phoenix/commands/variants.d.ts +35 -0
  666. package/dist/phoenix/commands/variants.js +1 -0
  667. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  668. package/dist/phoenix/editor-server/commands-router.js +1 -1
  669. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  670. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  671. package/dist/phoenix/editor-server/editor-server.js +1 -1
  672. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  673. package/dist/phoenix/editor-server/spec-router.js +1 -1
  674. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  675. package/dist/phoenix/scripts/build-admin.js +1 -1
  676. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  677. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  678. package/dist/phoenix/services/index.d.ts +5 -0
  679. package/dist/phoenix/services/index.js +1 -1
  680. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  681. package/dist/phoenix/services/phoenix-application.js +1 -0
  682. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  683. package/dist/phoenix/services/phoenix-store.js +1 -0
  684. package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
  685. package/dist/phoenix/services/phx-banner-plugin.js +1 -0
  686. package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
  687. package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
  688. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  689. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  690. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  691. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  692. package/dist/phoenix/services/variant-file-session.js +1 -0
  693. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  694. package/dist/phoenix/services/variant-preview-service.js +1 -0
  695. package/dist/phoenix/services/vite-config.d.ts +2 -0
  696. package/dist/phoenix/services/vite-config.js +1 -1
  697. package/dist/phoenix/utils/index.d.ts +1 -0
  698. package/dist/phoenix/utils/index.js +1 -1
  699. package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
  700. package/dist/phoenix/utils/read-git-commit.js +1 -0
  701. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  702. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  703. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  704. package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
  705. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  706. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
  707. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  708. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +16 -4
  709. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
  710. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  711. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  712. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  713. package/dist/ui-sdk/theme/types.d.ts +4 -0
  714. package/dist/webhook/builders/common.d.ts +3 -0
  715. package/dist/webhook/builders/webhook-builder.d.ts +1 -1
  716. package/dist/webhook/builders/webhook-builder.js +1 -1
  717. package/package.json +5 -8
  718. package/schema/domain-spec.json +24 -0
  719. package/dist/application-spec/generate-application/code/templates/agents-md.js +0 -2
  720. package/dist/application-spec/generate-application/code/templates/common/sdk-content.js +0 -67
  721. package/dist/application-spec/generate-application/code/templates/phoenix-cli-skill.js +0 -1
  722. package/dist/application-spec/generate-application/code/templates/phoenix-feedback-skill.js +0 -31
  723. package/dist/application-spec/generate-application/code/templates/phoenix-skill.js +0 -1
  724. package/dist/configurator/assistant/browser-details.js +0 -1
  725. package/dist/configurator/assistant/graphql-tools.js +0 -1
  726. package/dist/configurator/assistant/index.d.ts +0 -1
  727. package/dist/configurator/assistant/index.js +0 -1
  728. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
  729. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  730. package/dist/domain/components/debug-state-component.js +0 -1
  731. package/dist/domain/components/domain-component-optic.js +0 -16
  732. package/dist/domain/components/drag-state-component.js +0 -1
  733. package/dist/domain/components/export-state-component.js +0 -1
  734. package/dist/domain/components/fullscreen-state-component.js +0 -1
  735. package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
  736. package/dist/domain/components/hover-state-component.js +0 -1
  737. package/dist/domain/components/index.d.ts +0 -2
  738. package/dist/domain/components/index.js +0 -1
  739. package/dist/domain/components/navigation-state-component.js +0 -1
  740. package/dist/domain/components/selection-state-component.js +0 -1
  741. package/dist/domain/components/system-component-builder.js +0 -1
  742. package/dist/domain/components/system-virtual-entity.js +0 -1
  743. package/dist/domain/components/tool-state-component.js +0 -1
  744. package/dist/domain/components/view-state-component.js +0 -1
  745. package/dist/domain/components/viewport-state-component.js +0 -1
  746. package/dist/domain/core/json-schema.js +0 -1
  747. package/dist/domain/core/reflection.js +0 -1
  748. package/dist/domain/expressions/constant-expressions.js +0 -1
  749. package/dist/domain/expressions/custom-expression.js +0 -1
  750. package/dist/domain/expressions/index.d.ts +0 -1
  751. package/dist/domain/expressions/index.js +0 -1
  752. package/dist/domain/invariants/custom-invariants.js +0 -1
  753. package/dist/domain/invariants/invariants.js +0 -1
  754. package/dist/domain/invariants/violation-component.js +0 -1
  755. package/dist/extras/assistant/AssistantChat.d.ts +0 -6
  756. package/dist/extras/assistant/AssistantChat.js +0 -1
  757. package/dist/extras/assistant/index.d.ts +0 -1
  758. package/dist/extras/assistant/index.js +0 -1
  759. package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +0 -12
  760. package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
  761. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.d.ts +0 -0
  762. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js +0 -0
  763. /package/dist/application-spec/generate-application/code/templates/{agents-md.d.ts → skills/agents-md.d.ts} +0 -0
  764. /package/dist/application-spec/generate-application/code/templates/{phoenix-cli-skill.d.ts → skills/phoenix-cli-skill.d.ts} +0 -0
  765. /package/dist/application-spec/generate-application/code/templates/{phoenix-feedback-skill.d.ts → skills/phoenix-feedback-skill.d.ts} +0 -0
  766. /package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.d.ts → skills/phoenix-review-skill.d.ts} +0 -0
  767. /package/dist/application-spec/generate-application/code/templates/{phoenix-skill.d.ts → skills/phoenix-skill.d.ts} +0 -0
  768. /package/dist/domain/{components/component-reader-types.js → application/assistant/assistant-manifest.js} +0 -0
  769. /package/dist/domain/{core/enhanced-json-schema.js → application/assistant/assistant-resolved-manifest.js} +0 -0
  770. /package/dist/domain/core/{expression.js → action/action.js} +0 -0
  771. /package/dist/domain/core/{schema-validator.js → component/component-reader-types.js} +0 -0
  772. /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
  773. /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
  774. /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
  775. /package/dist/domain/{components → core/component}/updates.js +0 -0
  776. /package/dist/domain/{expressions → core/expression}/memoize-expression.js +0 -0
  777. /package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.js +0 -0
  778. /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
  779. /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
  780. /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
  781. /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
  782. /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
  783. /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
  784. /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
  785. /package/dist/domain/core/{component.js → model/component.js} +0 -0
  786. /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
  787. /package/dist/domain/core/{model.js → model/model.js} +0 -0
  788. /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
  789. /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
  790. /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
  791. /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
  792. /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
  793. /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
  794. /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
  795. /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
  796. /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
  797. /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
  798. /package/dist/domain/core/{state.js → state/state.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-07T17:54:56.392Z",
2
+ "generatedAt": "2026-10-13T08:01:20.023Z",
3
3
  "categories": [
4
4
  {
5
5
  "name": "Phoenix",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  "title": "Best Practices",
29
- "description": "1. **YAML is king** - 99% of configuration should be in spec/\\*.yaml files 2. **Custom code locations** (in order of preference): - `src/expressions/` - Computed/derived properties -...",
29
+ "description": "1. **YAML is king** - 99% of configuration should be in spec/\\*.yaml files 2. **Custom code locations** (in order of preference): - `src/expressions/` - Computed/derived properties - `src/actions/` -...",
30
30
  "path": "docs/phoenix/best-practices.mdx",
31
31
  "category": [
32
32
  "Phoenix",
@@ -2479,6 +2479,16 @@
2479
2479
  ],
2480
2480
  "source": "storybook-example"
2481
2481
  },
2482
+ {
2483
+ "title": "Domain Actions",
2484
+ "description": "A plate carries holes, and a hole can be nudged by an offset as long as it stays on the plate. The arrow buttons of a selected hole and the AI assistant both make this change, so the rule (\"stay on...",
2485
+ "path": "docs/other-features/domain-actions.mdx",
2486
+ "category": [
2487
+ "Other features",
2488
+ "Domain Actions"
2489
+ ],
2490
+ "source": "storybook-example"
2491
+ },
2482
2492
  {
2483
2493
  "title": "Not Found (404)",
2484
2494
  "description": "Error page that is displayed when the configuration is not accesible.",
@@ -78,24 +78,22 @@ Your custom component has full access to the Material-UI theme and SDK utilities
78
78
 
79
79
  ### Step 3: Attach the component to your entity
80
80
 
81
- Use the configurator builder to attach your custom price component to the root entity:
81
+ Attach your custom price component to the root entity in a file under `src/components/`. The generated code picks the
82
+ file up by its location and registers its default export:
82
83
 
83
84
  ```typescript
84
- const config = configuratorBuilder
85
- .withComponentOptics([
86
- attachComponent
87
- .withEntity('Scene')
88
- .withComponent(customPriceFooterComponent, 'default')
89
- .attach(
90
- memoEval(
91
- (s) => [s.$price],
92
- (price) => ({
93
- node: <AppPrice price={price} />,
94
- })
95
- )
96
- ),
97
- ])
98
- .buildConfig()
85
+ // src/components/custom-price.tsx
86
+ export default phx.domain.attachComponent
87
+ .withEntity('Scene')
88
+ .withComponent(customPriceFooterComponent, 'default')
89
+ .attach(
90
+ memoEval(
91
+ (s) => [s.$price],
92
+ (price) => ({
93
+ node: <AppPrice price={price} />,
94
+ })
95
+ )
96
+ )
99
97
  ```
100
98
 
101
99
  The `memoEval` function takes two arguments:
@@ -179,27 +179,30 @@ When a selected entity has no `sidebarTabs`, its property pages replace the root
179
179
  You can use transformers to automatically navigate to specific tabs when entities are selected or deselected:
180
180
 
181
181
  ```typescript
182
- const config = configuratorBuilder
183
- .withTransformers(ctx => {
184
- return [
185
- // Navigate to BuckyBall's first tab when selected
186
- phx.frontend.transformerBuilder.when
187
- .entity(['BuckyBall'])
188
- .selected()
189
- .then.navigateTo('BuckyBallTab1')
190
- .build('Navigate to BuckyBallTab1')
191
- .register(ctx),
192
-
193
- // Return to global tab1 when BuckyBall is deselected
194
- phx.frontend.transformerBuilder.when
195
- .entity(['BuckyBall'])
196
- .deselected()
197
- .then.navigateTo('tab1')
198
- .build('Navigate to Tab1')
199
- .register(ctx),
200
- ]
201
- })
202
- .buildConfig()
182
+ // src/transformers/bucky-ball-tab.ts
183
+ export default phx.frontend.transformerBuilder.when
184
+ .entity(['BuckyBall'])
185
+ .selected()
186
+ .then.navigateTo('BuckyBallTab1')
187
+ .build('buckyBallTab')
188
+ ```
189
+
190
+ ```typescript
191
+ // src/transformers/tab.ts
192
+ export default phx.frontend.transformerBuilder.when
193
+ .entity(['BuckyBall'])
194
+ .deselected()
195
+ .then.navigateTo('tab1')
196
+ .build('tab')
197
+ ```
198
+
199
+ Each file in `src/transformers/` default-exports one transformer and is picked up by its location. The `transformers` section of the spec turns it on by name. For a transformer made with `build(name)` that is the name passed to `build(...)`, which must match the file name with case and dashes ignored (`fix-finish.ts` and `fixFinish` match). For a plain-function export it is the file name:
200
+
201
+ ```yaml
202
+ # spec/application.yaml
203
+ transformers:
204
+ - name: buckyBallTab
205
+ - name: tab
203
206
  ```
204
207
 
205
208
  This creates smooth navigation flows where selecting specific entities automatically switches to their relevant tabs, and deselecting returns to a default tab state.
@@ -81,6 +81,12 @@ Phoenix provides built-in toolbar buttons for common operations:
81
81
  `props.showIndicatorSwitch: false` to hide the Dimension indicators switch. When omitted, the prop falls back to
82
82
  `applicationConfig.indicatorSwitch`, then `true`.
83
83
  - `helpToolbarButton` - Show help content (supports custom children)
84
+ - `assistantToolbarButton` - Open and close the built-in assistant panel. It renders only in a project whose
85
+ application spec has an `assistant` section. `props.showTitle` defaults to `true`; the label shows on a
86
+ desktop-sized layout only. The default toolbar includes it, in a group of its own, when the spec has an
87
+ `assistant` section. Only the universal layout carries the panel, and the button does not hide itself in a
88
+ layout without it. A custom layout that renders the toolbar therefore defines a `toolbar` component without the
89
+ button, because the default toolbar would add it.
84
90
 
85
91
  ### Mobile Toolbar Configuration
86
92
 
@@ -0,0 +1,418 @@
1
+ # Domain Actions
2
+
3
+ - [Use case](#use-case)
4
+ - [Declare the action](#declare-the-action)
5
+ - [Implement it](#implement-it)
6
+ - [Run it from the UI](#run-it-from-the-ui)
7
+ - [Expose it to the assistant](#expose-it-to-the-assistant)
8
+ - [Known gaps](#known-gaps)
9
+ - [Example](#example)
10
+
11
+ ## Use case
12
+
13
+ A plate carries holes, and a hole can be nudged by an offset as long as it stays on the plate. The arrow buttons of a selected hole and the AI assistant both make this change, so the rule ("stay on the plate") has to live in one place.
14
+
15
+ An **action** is that place: a named domain operation you declare once under `actions:`, implement in `src/actions/` with generated parameter and result types, and run from any control through `actionSystem.prepareAction()`. The same action is exposed to the assistant as a custom mutation by naming it under `assistant.actions`. Use an action whenever a change is more than writing one field: a swap, a move among siblings, a change that touches several entities at once.
16
+
17
+ ## Declare the action
18
+
19
+ `params` and `result` are maps of named JSON schemas, with the same `phx:` refs, `references`, `tsType` and `import` as entity shapes. A param whose schema allows `null` is optional; every other param is required. A result member typed `phx:$DomainEntity` is the enhanced entity after the change.
20
+
21
+ ```yaml
22
+ actions:
23
+ nudgeHole:
24
+ description: Moves a hole by an offset on the plate; the move fails when the hole would leave the plate
25
+ params:
26
+ holeId:
27
+ $ref: phx:DomainEntityId
28
+ references: Hole
29
+ description: The hole to move
30
+ dx:
31
+ type: integer
32
+ description: Offset along the x axis, in plate units
33
+ dy:
34
+ type: integer
35
+ description: Offset along the y axis, in plate units
36
+ result:
37
+ hole:
38
+ $ref: phx:$DomainEntity
39
+ references: Hole
40
+ description: The hole at its new position
41
+ plate:
42
+ $ref: phx:$DomainEntity
43
+ references: Plate
44
+ description: The plate after the move
45
+ ```
46
+
47
+ Generation derives the types `ActionTypes`, `ActionName`, `ActionParams<'nudgeHole'>` and `ActionResult<'nudgeHole'>` from it: here `ActionParams<'nudgeHole'>` is `{ holeId: Hole['id']; dx: number; dy: number }` and `ActionResult<'nudgeHole'>` is `{ hole: $Hole; plate: $Plate }`. The `description` of the action, of a param and of a result member becomes the doc comment of its generated property, so it shows in the editor wherever the action is implemented or called.
48
+
49
+ ## Implement it
50
+
51
+ A file in `src/actions/` default-exports `phx.domain.implementActions({...})` with any subset of the declared actions. The implementation receives the validated parameters, the state the action runs on, and a context with the `expressionContext`, the domain `systems`, `getIdSequence()` for entities it creates and the typed `updates` factory. It returns the updates it wants applied and `readResult`, which reads the result from the state those updates produced, including whatever the transformers added. It never stages or commits anything.
52
+
53
+ ```ts
54
+ // src/actions/nudge-hole.ts
55
+ export default phx.domain.implementActions({
56
+ nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
57
+ // `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
58
+ const hole = state.entities.find(entity => entity.id === holeId)
59
+
60
+ if (hole?.type !== 'Hole') {
61
+ throw new Error(
62
+ `"${holeId}" is not a hole of the plate, so it cannot be nudged. Query the plate's holes and use an id they return.`
63
+ )
64
+ }
65
+
66
+ const x = hole.x + dx
67
+ const y = hole.y + dy
68
+
69
+ if (Math.abs(x) > 150 || Math.abs(y) > 150) {
70
+ throw new Error(
71
+ `Nudging "${holeId}" by (${dx}, ${dy}) would put it at (${x}, ${y}), outside the plate. Keep both coordinates between -150 and 150.`
72
+ )
73
+ }
74
+
75
+ return {
76
+ updates: [updates.DomainEntityModification({ entityId: hole.id, stateDelta: { x, y }, updateTag: 'nudgeHole' })],
77
+ readResult: ({ state: nudged }) => ({
78
+ hole: domain.get$Entity(holeId, nudged),
79
+ plate: domain.getRoot$Entity(nudged),
80
+ }),
81
+ }
82
+ },
83
+ })
84
+ ```
85
+
86
+ Throw to reject a call: the message reaches the user through the control's hint and the assistant through the failed mutation, so say what went wrong and what to send instead. An implementation of a name the spec does not declare is a type error. A declared action without an implementation is not: it stops the domain from initializing, and under `phoenix dev` the editor reports it as a `MISSING_ACTION_IMPLEMENTATIONS` diagnostic and does not apply the change; an implementation of an undeclared name is logged.
87
+
88
+ ## Run it from the UI
89
+
90
+ `phx.frontend.useDomain().actionSystem.prepareAction(name, args, state)` validates `args` against the declared params and returns `{ updates, readResult }`. Hand the updates to `useUpdateControl()` like any other change: it dry-runs them for hints and commits them on click.
91
+
92
+ ```tsx
93
+ export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
94
+ const { actionSystem } = phx.frontend.useDomain()
95
+ const state = phx.frontend.useCommittedState()
96
+ const prepare = phx.frontend.useUpdateControl()
97
+
98
+ const left = prepare(actionSystem.prepareAction('nudgeHole', { holeId: entityId, dx: -20, dy: 0 }, state).updates)
99
+
100
+ return (
101
+ <Button disabled={left.disabled} title={left.hints} onClick={left.update}>
102
+ ←
103
+ </Button>
104
+ )
105
+ })
106
+ ```
107
+
108
+ `prepareAction` throws for arguments that do not fit the params, for an unknown action and for whatever the implementation rejects, so a control that may ask for an impossible move catches the error and shows its message, as the example's control does.
109
+
110
+ ## Expose it to the assistant
111
+
112
+ Naming the action under `assistant.actions` adds a `Mutation` field with one argument per param and a `<Name>Result` type whose entity members are traversable edges. `as` renames the field, `description` replaces the action's.
113
+
114
+ ```yaml
115
+ assistant:
116
+ actions:
117
+ nudgeHole:
118
+ ```
119
+
120
+ ```graphql
121
+ type Mutation {
122
+ nudgeHole(holeId: ID!, dx: Int!, dy: Int!): NudgeHoleResult!
123
+ }
124
+
125
+ type NudgeHoleResult {
126
+ hole: Hole!
127
+ plate: Plate!
128
+ }
129
+ ```
130
+
131
+ The field runs the same `prepareAction`, applies the updates through the same validation as every other mutation, and fails with the action's message when the call is rejected.
132
+
133
+ ## Known gaps
134
+
135
+ - `references` on a `phx:DomainEntityId` param types the parameter and the GraphQL argument, but at runtime any entity id passes the params check: the implementation verifies that the id names an entity of the expected type, as the example does.
136
+ - Actions exist in the configurator domain only; the admin domain declares none.
137
+ - The result of `readResult` is not validated at runtime: the generated TypeScript type and the GraphQL coercion are the checks.
138
+ - The assistant cannot dry-run a custom mutation the way it dry-runs recipes and field options.
139
+ - `useDomain()` types `prepareAction` with the generic action map, so the name and the arguments are not checked against your `ActionTypes` at that call site; the implementation side is fully typed.
140
+
141
+ ## Example
142
+
143
+ Select a hole and nudge it with the arrows. A move that would leave the plate is disabled with the action's message.
144
+
145
+ ## Complete Implementation
146
+
147
+ {/* AUTO-GENERATED SECTION: This section is automatically updated by 'phoenix story build' */}
148
+
149
+ <details>
150
+ <summary>Click to view the complete implementation files</summary>
151
+
152
+ ### ./spec/domain.yaml
153
+
154
+ ```yaml
155
+ model:
156
+ latest:
157
+ entityTypes:
158
+ - Plate
159
+ - Hole
160
+ aliases:
161
+ RootEntity:
162
+ - Plate
163
+ shapes:
164
+ Hole:
165
+ x:
166
+ type: number
167
+ y:
168
+ type: number
169
+
170
+ relations:
171
+ Plate:
172
+ $holes:
173
+ kind: allOfType
174
+ target: Hole
175
+ cardinality: 0-N
176
+ composedOf: true
177
+ Hole:
178
+ $plate:
179
+ kind: allOfType
180
+ target: Plate
181
+ cardinality: 1-1
182
+ composedOf: false
183
+
184
+ expressions:
185
+ Hole:
186
+ $radius:
187
+ type: number
188
+
189
+ # A named domain operation: declared once, implemented in src/actions/, run by the NudgeControl
190
+ # element and by the assistant alike.
191
+ actions:
192
+ nudgeHole:
193
+ description: Moves a hole by an offset on the plate; the move fails when the hole would leave the plate
194
+ params:
195
+ holeId:
196
+ $ref: phx:DomainEntityId
197
+ references: Hole
198
+ description: The hole to move
199
+ dx:
200
+ type: integer
201
+ description: Offset along the x axis, in plate units
202
+ dy:
203
+ type: integer
204
+ description: Offset along the y axis, in plate units
205
+ result:
206
+ hole:
207
+ $ref: phx:$DomainEntity
208
+ references: Hole
209
+ description: The hole at its new position
210
+ plate:
211
+ $ref: phx:$DomainEntity
212
+ references: Plate
213
+ description: The plate after the move
214
+
215
+ assistant:
216
+ ai:
217
+ provider: openai
218
+ model: balanced
219
+ reasoning: low
220
+ entities:
221
+ Plate:
222
+ $holes:
223
+ description: The holes of the plate
224
+ Hole:
225
+ x:
226
+ y:
227
+ actions:
228
+ nudgeHole:
229
+
230
+ presets:
231
+ - rootEntityType: 'Plate'
232
+ initialDomainEntities:
233
+ - id: 'Plate-1'
234
+ type: 'Plate'
235
+ - id: 'Hole-1'
236
+ type: 'Hole'
237
+ x: -60
238
+ y: 40
239
+ - id: 'Hole-2'
240
+ type: 'Hole'
241
+ x: 70
242
+ y: -50
243
+
244
+ components:
245
+ Plate:
246
+ applicationConfig:
247
+ main:
248
+ layout: 'universal'
249
+ staticPerspectiveCamera:
250
+ main:
251
+ distance: 400
252
+ priority: 1
253
+ polarAngle: 1.2
254
+ azimuthAngle: -0.2
255
+ sceneEntityProperties:
256
+ main:
257
+ offsetX: -100
258
+ offsetY: -100
259
+ offsetZ: -10
260
+ sceneEntityObject:
261
+ Plate:
262
+ object:
263
+ $read: $render
264
+ detail:
265
+ main:
266
+ title: 'Plate'
267
+ subtitle: 'A plate with holes'
268
+ description: 'Select a hole to nudge it.'
269
+ Hole:
270
+ sceneEntityProperties:
271
+ main:
272
+ offsetX:
273
+ $read: x
274
+ offsetY:
275
+ $read: y
276
+ sceneEntitySelectHotspot:
277
+ main:
278
+ offsetX: 15
279
+ offsetY: 15
280
+ offsetZ: 30
281
+ detail:
282
+ main:
283
+ title: 'Hole'
284
+ subtitle: 'A hole in the plate'
285
+ description: 'Nudge it with the arrows; a hole cannot leave the plate.'
286
+ propertyPage:
287
+ main:
288
+ children:
289
+ - kind: propertyContainerGroup
290
+ props:
291
+ spacing: large
292
+ children:
293
+ - kind: customElement
294
+ props:
295
+ name: NudgeControl
296
+ ```
297
+
298
+ ### ./src/actions/nudge-hole.ts
299
+
300
+ ```ts
301
+ import { phx } from '../../.phoenix/phx.js'
302
+
303
+ /** How far a hole may sit from the plate's center on either axis, in plate units. */
304
+ const REACH = 150
305
+
306
+ export default phx.domain.implementActions({
307
+ nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
308
+ // `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
309
+ const hole = state.entities.find(entity => entity.id === holeId)
310
+
311
+ if (hole?.type !== 'Hole') {
312
+ throw new Error(
313
+ `"${holeId}" is not a hole of the plate, so it cannot be nudged. Query the plate's holes and use an id they return.`
314
+ )
315
+ }
316
+
317
+ const x = hole.x + dx
318
+ const y = hole.y + dy
319
+
320
+ if (Math.abs(x) > REACH || Math.abs(y) > REACH) {
321
+ throw new Error(
322
+ `Nudging "${holeId}" by (${dx}, ${dy}) would put it at (${x}, ${y}), outside the plate. Keep both coordinates between ${-REACH} and ${REACH}.`
323
+ )
324
+ }
325
+
326
+ return {
327
+ updates: [updates.DomainEntityModification({ entityId: hole.id, stateDelta: { x, y }, updateTag: 'nudgeHole' })],
328
+ readResult: ({ state: nudged }) => ({
329
+ hole: domain.get$Entity(holeId, nudged),
330
+ plate: domain.getRoot$Entity(nudged),
331
+ }),
332
+ }
333
+ },
334
+ })
335
+ ```
336
+
337
+ ### ./src/elements/NudgeControl.tsx
338
+
339
+ ```tsx
340
+ import { Button, Stack } from '@mui/material'
341
+
342
+ import { PropertyContainer } from '@salsita-ai/sdk/ui'
343
+
344
+ import { phx } from '../../.phoenix/phx.js'
345
+
346
+ const STEP = 20
347
+
348
+ /** Nudges the selected hole with the same `nudgeHole` action the assistant calls, one step at a time. */
349
+ export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
350
+ const { actionSystem } = phx.frontend.useDomain()
351
+ const state = phx.frontend.useCommittedState()
352
+ const prepare = phx.frontend.useUpdateControl()
353
+ const hole = state.entities.find(entity => entity.id === entityId)
354
+
355
+ if (hole?.type !== 'Hole') {
356
+ return <></>
357
+ }
358
+
359
+ // An action throws when the move leaves the plate; the button for that direction is then disabled with the message.
360
+ const nudge = (dx: number, dy: number) => {
361
+ try {
362
+ return prepare(actionSystem.prepareAction('nudgeHole', { holeId: hole.id, dx, dy }, state).updates)
363
+ } catch (error) {
364
+ return { disabled: true, hints: error instanceof Error ? error.message : String(error), update: () => {} }
365
+ }
366
+ }
367
+
368
+ const directions = [
369
+ { label: '←', dx: -STEP, dy: 0 },
370
+ { label: '→', dx: STEP, dy: 0 },
371
+ { label: '↑', dx: 0, dy: STEP },
372
+ { label: '↓', dx: 0, dy: -STEP },
373
+ ]
374
+
375
+ return (
376
+ <PropertyContainer.Item title="Nudge" description={`Moves the hole by ${STEP} units.`}>
377
+ <Stack direction="row" spacing={1}>
378
+ {directions.map(({ label, dx, dy }) => {
379
+ const control = nudge(dx, dy)
380
+
381
+ return (
382
+ <Button
383
+ key={label}
384
+ variant="outlined"
385
+ disabled={control.disabled}
386
+ title={control.hints ?? undefined}
387
+ onClick={event => {
388
+ event.stopPropagation()
389
+ control.update()
390
+ }}
391
+ >
392
+ {label}
393
+ </Button>
394
+ )
395
+ })}
396
+ </Stack>
397
+ </PropertyContainer.Item>
398
+ )
399
+ })
400
+ ```
401
+
402
+ ### ./src/expressions/plate.ts
403
+
404
+ ```ts
405
+ import { createPlate } from '../../../../common/plate-rendering.js'
406
+ import { phx } from '../../.phoenix/phx.js'
407
+
408
+ export default phx.domain.implementCustomExpressions({
409
+ Hole: {
410
+ $radius: () => 10,
411
+ },
412
+ Plate: {
413
+ $render: plate => createPlate({ features: plate.$holes }),
414
+ },
415
+ })
416
+ ```
417
+
418
+ </details>
@@ -66,42 +66,76 @@ With following control structure. The top input selects the material, the bottom
66
66
  The transformer is used to change the finish if necessary and show the notification.
67
67
 
68
68
  ```typescript
69
- configuratorBuilder
70
- .withTransformers(domainContext => [
71
- phx.frontend.transformerBuilder.when
72
- .entity(['Plate'])
73
- .modified({ atFields: ['material'] })
74
- .causes.self.violation(['finishNotAvailable'])
75
- .then.applySideEffect(({ update, getOld$Entity }) => {
76
- const oldPlate = getOld$Entity()
77
- const newMaterial = update.stateDelta.material
78
-
79
- const validMaterial =
80
- availableMaterials.find(m => m.material === newMaterial && m.finish === oldPlate.finish) ??
81
- availableMaterials.find(m => m.material === newMaterial)
82
-
83
- if (!validMaterial || validMaterial.finish === oldPlate.finish) {
84
- return []
85
- }
86
-
87
- // create an additional update that will fix the material finish
88
- const fixUpdate = phx.frontend.updates.DomainEntityModification({
89
- entityId: oldPlate.id,
90
- stateDelta: {
91
- finish: validMaterial.finish,
92
- },
93
- updateTag: 'fix.finish',
94
- hint: msg`Material finish was adjusted`, // specify a hint for the user (side effect)
95
- })
96
-
97
- return [fixUpdate]
98
- })
99
- .build('Fix material finish')
100
- .register(domainContext),
101
- ])
102
- .buildConfig()
69
+ // src/transformers/fix-finish.ts
70
+ import { msg } from '@lingui/core/macro'
71
+
72
+ import { availableMaterials } from '../_shared/materials.js'
73
+
74
+ export default phx.frontend.transformerBuilder.when
75
+ .entity(['Plate'])
76
+ .modified({ atFields: ['material'] })
77
+ .causes.self.violation(['finishNotAvailable'])
78
+ .then.applySideEffect(({ update, getOld$Entity }) => {
79
+ const oldPlate = getOld$Entity()
80
+ const newMaterial = update.stateDelta.material
81
+
82
+ const validMaterial =
83
+ availableMaterials.find(m => m.material === newMaterial && m.finish === oldPlate.finish) ??
84
+ availableMaterials.find(m => m.material === newMaterial)
85
+
86
+ if (!validMaterial || validMaterial.finish === oldPlate.finish) {
87
+ return []
88
+ }
89
+
90
+ // create an additional update that will fix the material finish
91
+ const fixUpdate = phx.frontend.updates.DomainEntityModification({
92
+ entityId: oldPlate.id,
93
+ stateDelta: {
94
+ finish: validMaterial.finish,
95
+ },
96
+ updateTag: 'fix.finish',
97
+ hint: msg`Material finish was adjusted`, // specify a hint for the user (side effect)
98
+ })
99
+
100
+ return [fixUpdate]
101
+ })
102
+ .build('fix-finish')
103
103
  ```
104
104
 
105
+ Each file in `src/transformers/` default-exports one transformer and is picked up by its location. The `transformers` section of the spec turns it on by name. For a transformer made with `build(name)` that is the name passed to `build(...)`, which must match the file name with case and dashes ignored (`fix-finish.ts` and `fixFinish` match). For a plain-function export it is the file name:
106
+
107
+ ```yaml
108
+ # spec/application.yaml
109
+ transformers:
110
+ - name: fix-finish
111
+ ```
112
+
113
+ ### Hints and the AI assistant
114
+
115
+ In a configurator with the AI assistant, the assistant is told the same hints: they arrive as
116
+ `sideEffects` with the result of its changes and in the dry-runs of recipes and options, so it can
117
+ tell the user what else happened. The hints also explain what the user changed between two messages:
118
+ every message carries a change record of the configuration, and each of its lines ends with the hint
119
+ of the last update that touched it, or with the `updateTag` when the update has none. Set `agentHint`
120
+ beside `hint` when the assistant needs different wording, for example with ids or values a snackbar
121
+ would not show:
122
+
123
+ ```ts
124
+ phx.frontend.updates.DomainEntityModification({
125
+ entityId: oldPlate.id,
126
+ stateDelta: { finish: validMaterial.finish },
127
+ updateTag: 'fix.finish',
128
+ hint: msg`Material finish was adjusted`,
129
+ agentHint: `The finish of ${oldPlate.id} was changed to ${validMaterial.finish}, the only one this material comes in.`,
130
+ })
131
+ ```
132
+
133
+ - `agentHint` is a plain string, never shown to the user and not localized.
134
+ - `agentHint: null` keeps the wording from the assistant while the user still gets the `hint`: the
135
+ update is left out of `sideEffects`, and the change record explains its line by the `updateTag`. It
136
+ does not hide the change itself, which the assistant can always read from the configuration.
137
+ - `agentHint` without a `hint` tells only the assistant.
138
+
105
139
  ## Example
106
140
 
107
141
  Here you can see the live example!
@@ -102,7 +102,7 @@ export const removeExtraneousBranchesAndLeavesWhenShortened = phx.frontend.trans
102
102
  - With `overrideMatchinUpdates(ctx => /* side effect updates */)` the updates returned by the provided callback will replace the original **matched update**. This will be triggered for every matching update. Note that this action is not available in events which are not bound to a specific update - such as a violation check without a defined cause.
103
103
  - With `overrideAllUpdates(ctx => /* side effect updates */)` the updates returned by the provided callback will replace all original updates. This will be triggered only once for a single run of the transformer. This allows for implementation of transformers that behave similarly as the raw `UpdateTransformer`
104
104
  - High-level actions: `select`, `deselect`, `navigate`, `changeView` - more on these in the other examples.
105
- - `build(name)` is the final step to create the transformer. Assign a descriptive name (no restrictions) to easily identify the transformer while tracing. Note that this returns a `RegistrableTransformer` which needs to be registered using the `register(domainContext)` method. This is usually done in the `.withTransformers()` method of the configurator builder.
105
+ - `build(name)` is the final step to create the transformer. The name identifies the transformer while tracing, and it is the name the `transformers` section of the spec refers to, so it must match the file name with case and dashes ignored (`fix-finish.ts` and `fixFinish` match). Note that this returns a `RegistrableTransformer`. Default-export it from a file in `src/transformers/` and list the name passed to `build(...)` in the `transformers` section of the spec; the generated code registers it. The shorter snippets on this page use descriptive names for readability; the complete implementation below uses names that match its files.
106
106
 
107
107
  ### Side-Effect on Update Causing Another Entity's Violation
108
108