@salsita-ai/sdk 0.50.0-develop.b335a15889 → 0.50.0-develop.b9eb39baf0

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 (366) hide show
  1. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  2. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  3. package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
  4. package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
  5. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  6. package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
  7. package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
  8. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
  9. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
  10. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
  11. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
  12. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
  13. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
  14. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  15. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +1 -1
  16. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +2 -1
  17. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -2
  18. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +3 -3
  19. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
  20. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
  21. package/dist/docs/index.json +1 -1
  22. package/dist/docs/layouts/custom-price.mdx +14 -16
  23. package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
  24. package/dist/docs/other-features/domain-actions.mdx +1 -1
  25. package/dist/docs/other-features/side-effects.mdx +42 -34
  26. package/dist/docs/other-features/transformers.mdx +1 -1
  27. package/dist/docs/phoenix/admin.mdx +9 -24
  28. package/dist/docs/phoenix/localization.mdx +3 -22
  29. package/dist/docs/phoenix/project-structure.mdx +6 -0
  30. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
  31. package/dist/docs/relations/hierarchy.mdx +13 -2
  32. package/dist/domain/actions/action-factory.d.ts +4 -4
  33. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -1
  34. package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
  35. package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
  36. package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
  37. package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
  38. package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
  39. package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
  40. package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
  41. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +1 -3
  42. package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
  43. package/dist/domain/admin-domain/index.d.ts +1 -1
  44. package/dist/domain/application/admin-page-factories.d.ts +1 -1
  45. package/dist/domain/application/application-config.d.ts +23 -13
  46. package/dist/domain/application/assistant-field-options.d.ts +1 -2
  47. package/dist/domain/application/assistant-mutations.d.ts +1 -3
  48. package/dist/domain/application/assistant-mutations.js +1 -1
  49. package/dist/domain/application/assistant-recipe-groups.d.ts +1 -3
  50. package/dist/domain/application/configurator-builder.d.ts +30 -16
  51. package/dist/domain/application/configurator-builder.js +1 -1
  52. package/dist/domain/application/element-registration.d.ts +5 -0
  53. package/dist/domain/application/element-registration.js +1 -1
  54. package/dist/domain/application/handler-registration.d.ts +5 -0
  55. package/dist/domain/application/handler-registration.js +1 -1
  56. package/dist/domain/application/index.d.ts +4 -4
  57. package/dist/domain/application/index.js +1 -1
  58. package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
  59. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  60. package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
  61. package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
  62. package/dist/domain/application/resolve-imported-transformers.js +1 -1
  63. package/dist/domain/components/component-reader-types.d.ts +1 -2
  64. package/dist/domain/components/debug-state-component.d.ts +1 -1
  65. package/dist/domain/components/debug-state-component.js +1 -1
  66. package/dist/domain/components/domain-component-optic.d.ts +4 -5
  67. package/dist/domain/components/domain-component-optic.js +2 -2
  68. package/dist/domain/components/drag-state-component.d.ts +1 -1
  69. package/dist/domain/components/drag-state-component.js +1 -1
  70. package/dist/domain/components/export-state-component.d.ts +1 -1
  71. package/dist/domain/components/export-state-component.js +1 -1
  72. package/dist/domain/components/fullscreen-state-component.d.ts +1 -1
  73. package/dist/domain/components/fullscreen-state-component.js +1 -1
  74. package/dist/domain/components/group-components-by-entity-id-and-name.d.ts +1 -2
  75. package/dist/domain/components/group-components-by-entity-id-and-name.js +1 -1
  76. package/dist/domain/components/hover-state-component.d.ts +1 -1
  77. package/dist/domain/components/hover-state-component.js +1 -1
  78. package/dist/domain/components/legacy-filter.d.ts +1 -2
  79. package/dist/domain/components/navigation-state-component.d.ts +1 -1
  80. package/dist/domain/components/navigation-state-component.js +1 -1
  81. package/dist/domain/components/selection-state-component.d.ts +1 -1
  82. package/dist/domain/components/selection-state-component.js +1 -1
  83. package/dist/domain/components/system-component-builder.d.ts +1 -2
  84. package/dist/domain/components/system-component-builder.js +1 -1
  85. package/dist/domain/components/system-component-filter.d.ts +1 -3
  86. package/dist/domain/components/system-virtual-entity.js +1 -1
  87. package/dist/domain/components/tool-state-component.d.ts +1 -1
  88. package/dist/domain/components/tool-state-component.js +1 -1
  89. package/dist/domain/components/updates.d.ts +1 -2
  90. package/dist/domain/components/view-state-component.d.ts +1 -1
  91. package/dist/domain/components/view-state-component.js +1 -1
  92. package/dist/domain/components/viewport-state-component.d.ts +1 -1
  93. package/dist/domain/components/viewport-state-component.js +1 -1
  94. package/dist/domain/core/action.d.ts +2 -2
  95. package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
  96. package/dist/domain/core/decoder/create-decoder.js +1 -0
  97. package/dist/domain/core/decoder/decoder.d.ts +6 -0
  98. package/dist/domain/core/decoder/index.d.ts +2 -0
  99. package/dist/domain/core/decoder/index.js +1 -0
  100. package/dist/domain/core/domain-factory.d.ts +1 -2
  101. package/dist/domain/core/domain-factory.js +1 -1
  102. package/dist/domain/core/domain.d.ts +1 -2
  103. package/dist/domain/core/domain.js +1 -1
  104. package/dist/domain/core/expression.d.ts +1 -2
  105. package/dist/domain/core/index.d.ts +8 -17
  106. package/dist/domain/core/index.js +1 -1
  107. package/dist/domain/core/migrations.d.ts +1 -2
  108. package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
  109. package/dist/domain/core/model/index.d.ts +6 -0
  110. package/dist/domain/core/model/index.js +1 -0
  111. package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
  112. package/dist/domain/core/model/reflection.js +1 -0
  113. package/dist/domain/core/schema/extended-schema-validator.js +1 -0
  114. package/dist/domain/core/schema/index.d.ts +3 -0
  115. package/dist/domain/core/schema/index.js +1 -0
  116. package/dist/domain/core/schema/schema-validator.js +1 -0
  117. package/dist/domain/core/state.d.ts +1 -2
  118. package/dist/domain/domain-builder.d.ts +11 -8
  119. package/dist/domain/domain-builder.js +1 -1
  120. package/dist/domain/domain-context/action-system/action-system.d.ts +1 -3
  121. package/dist/domain/domain-context/action-system/action-system.js +1 -1
  122. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  123. package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
  124. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +1 -2
  125. package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -1
  126. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  127. package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
  128. package/dist/domain/domain-context/recipe-system/recipes.d.ts +1 -3
  129. package/dist/domain/domain-context/recipe-system/recipes.js +1 -1
  130. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
  131. package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
  132. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
  133. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
  134. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
  135. package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -2
  136. package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
  137. package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -2
  138. package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
  139. package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -1
  140. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -3
  141. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  142. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
  143. package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -1
  144. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  145. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -2
  146. package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
  147. package/dist/domain/domain-context/transformers/context.d.ts +1 -2
  148. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -1
  149. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  150. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -1
  151. package/dist/domain/domain-context/transformers/then-builder.js +1 -1
  152. package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -2
  153. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  154. package/dist/domain/domain-context/undo-system.d.ts +1 -1
  155. package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -3
  156. package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
  157. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -2
  158. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  159. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  160. package/dist/domain/expressions/constant-expressions.d.ts +1 -3
  161. package/dist/domain/expressions/custom-expression.d.ts +1 -4
  162. package/dist/domain/expressions/memoize-expression.d.ts +1 -2
  163. package/dist/domain/expressions/prepare-domain-expressions.d.ts +1 -1
  164. package/dist/domain/index.d.ts +3 -2
  165. package/dist/domain/index.js +1 -1
  166. package/dist/domain/invariants/builtin-invariant.d.ts +1 -2
  167. package/dist/domain/invariants/custom-invariants.d.ts +1 -2
  168. package/dist/domain/invariants/invariants.d.ts +10 -4
  169. package/dist/domain/invariants/invariants.js +1 -1
  170. package/dist/domain/invariants/violation.d.ts +1 -1
  171. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +1 -1
  172. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  173. package/dist/domain/project-modules/index.d.ts +1 -0
  174. package/dist/domain/project-modules/index.js +1 -0
  175. package/dist/domain/project-modules/project-modules.d.ts +41 -0
  176. package/dist/domain/project-modules/project-modules.js +1 -0
  177. package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
  178. package/dist/domain/projections/snap-matching.d.ts +1 -2
  179. package/dist/domain/projections/snap-utils.d.ts +1 -2
  180. package/dist/domain/relations/all-of-type-relation.d.ts +1 -4
  181. package/dist/domain/relations/all-of-type-relation.js +1 -1
  182. package/dist/domain/relations/component-factories.d.ts +1 -2
  183. package/dist/domain/relations/composed-of.d.ts +1 -1
  184. package/dist/domain/relations/composed-of.js +1 -1
  185. package/dist/domain/relations/direct-relation.d.ts +1 -3
  186. package/dist/domain/relations/indirect-relation.d.ts +1 -4
  187. package/dist/domain/relations/indirect-relation.js +1 -1
  188. package/dist/domain/relations/reference-component.d.ts +1 -2
  189. package/dist/domain/relations/reference-component.js +1 -1
  190. package/dist/domain/relations/reference-field.d.ts +1 -1
  191. package/dist/domain/relations/relation-factory.d.ts +1 -3
  192. package/dist/domain/relations/relation-implementation.d.ts +1 -4
  193. package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
  194. package/dist/domain/system-components/admin-sidebar.js +1 -1
  195. package/dist/domain/system-components/angle-indicator.d.ts +1 -1
  196. package/dist/domain/system-components/angle-indicator.js +1 -1
  197. package/dist/domain/system-components/application-config.d.ts +1 -1
  198. package/dist/domain/system-components/application-config.js +1 -1
  199. package/dist/domain/system-components/attribute-selection.js +1 -1
  200. package/dist/domain/system-components/autorotate-camera-component.d.ts +1 -1
  201. package/dist/domain/system-components/basic-sidebar-footer.d.ts +1 -1
  202. package/dist/domain/system-components/basic-sidebar-footer.js +1 -1
  203. package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
  204. package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
  205. package/dist/domain/system-components/camera-based-hidden-entity-object.js +1 -1
  206. package/dist/domain/system-components/camera-based-hidden-entity.js +1 -1
  207. package/dist/domain/system-components/canvas-config.d.ts +1 -1
  208. package/dist/domain/system-components/canvas-config.js +1 -1
  209. package/dist/domain/system-components/canvas-padding.d.ts +1 -1
  210. package/dist/domain/system-components/canvas-padding.js +1 -1
  211. package/dist/domain/system-components/canvas-preset-environment.d.ts +1 -1
  212. package/dist/domain/system-components/canvas-preset-environment.js +1 -1
  213. package/dist/domain/system-components/child-entity-selection.d.ts +1 -1
  214. package/dist/domain/system-components/client-side-image.js +1 -1
  215. package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
  216. package/dist/domain/system-components/collision-geometries.d.ts +1 -1
  217. package/dist/domain/system-components/collision-geometry.d.ts +1 -1
  218. package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
  219. package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +1 -1
  220. package/dist/domain/system-components/common/dimension-indicator-schema.js +1 -1
  221. package/dist/domain/system-components/constraint.d.ts +1 -1
  222. package/dist/domain/system-components/create-blueprint.d.ts +1 -1
  223. package/dist/domain/system-components/custom-header.d.ts +1 -1
  224. package/dist/domain/system-components/custom-header.js +1 -1
  225. package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
  226. package/dist/domain/system-components/custom-scene-entity.js +1 -1
  227. package/dist/domain/system-components/custom-sidebar-footer.d.ts +1 -1
  228. package/dist/domain/system-components/custom-sidebar-footer.js +1 -1
  229. package/dist/domain/system-components/dimension-indicator.d.ts +1 -1
  230. package/dist/domain/system-components/dimension-indicator.js +1 -1
  231. package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
  232. package/dist/domain/system-components/distance-dimension-select.js +1 -1
  233. package/dist/domain/system-components/distance-dimension.d.ts +1 -1
  234. package/dist/domain/system-components/distance-dimension.js +1 -1
  235. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  236. package/dist/domain/system-components/drag-handle.js +1 -1
  237. package/dist/domain/system-components/editable-angle-indicator.d.ts +1 -1
  238. package/dist/domain/system-components/editable-angle-indicator.js +1 -1
  239. package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +1 -1
  240. package/dist/domain/system-components/editable-distance-dimension-indicator.js +1 -1
  241. package/dist/domain/system-components/editable-offset-indicator.d.ts +1 -1
  242. package/dist/domain/system-components/editable-offset-indicator.js +1 -1
  243. package/dist/domain/system-components/editable-size-indicator.d.ts +1 -1
  244. package/dist/domain/system-components/editable-size-indicator.js +1 -1
  245. package/dist/domain/system-components/exit-tool-mode-fab.d.ts +1 -1
  246. package/dist/domain/system-components/exit-tool-mode-fab.js +1 -1
  247. package/dist/domain/system-components/finalize-action.d.ts +1 -1
  248. package/dist/domain/system-components/finalize-action.js +1 -1
  249. package/dist/domain/system-components/fixed-header.d.ts +1 -1
  250. package/dist/domain/system-components/fixed-header.js +1 -1
  251. package/dist/domain/system-components/floating-header.d.ts +1 -1
  252. package/dist/domain/system-components/floating-header.js +1 -1
  253. package/dist/domain/system-components/generic-dimension.d.ts +1 -1
  254. package/dist/domain/system-components/generic-dimension.js +1 -1
  255. package/dist/domain/system-components/hidden-header.d.ts +1 -1
  256. package/dist/domain/system-components/hidden-header.js +1 -1
  257. package/dist/domain/system-components/hidden-sidebar-footer.d.ts +1 -1
  258. package/dist/domain/system-components/hidden-sidebar-footer.js +1 -1
  259. package/dist/domain/system-components/horizontal-tabs.d.ts +1 -1
  260. package/dist/domain/system-components/horizontal-tabs.js +1 -1
  261. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  262. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  263. package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +1 -1
  264. package/dist/domain/system-components/list-selector-dimension-indicator.js +1 -1
  265. package/dist/domain/system-components/material-swatch.js +1 -1
  266. package/dist/domain/system-components/offset-anchors.d.ts +1 -1
  267. package/dist/domain/system-components/offset-anchors.js +1 -1
  268. package/dist/domain/system-components/offset-indicator.d.ts +1 -2
  269. package/dist/domain/system-components/offset-indicator.js +1 -1
  270. package/dist/domain/system-components/offset.d.ts +1 -1
  271. package/dist/domain/system-components/offset.js +1 -1
  272. package/dist/domain/system-components/other-action.d.ts +1 -1
  273. package/dist/domain/system-components/other-action.js +1 -1
  274. package/dist/domain/system-components/pivot-point.d.ts +1 -1
  275. package/dist/domain/system-components/pivot-point.js +1 -1
  276. package/dist/domain/system-components/price.js +1 -1
  277. package/dist/domain/system-components/projected-entities.d.ts +1 -1
  278. package/dist/domain/system-components/projected-entities.js +1 -1
  279. package/dist/domain/system-components/property-page.d.ts +1 -1
  280. package/dist/domain/system-components/property-page.js +1 -1
  281. package/dist/domain/system-components/read-sidebar-footer.d.ts +1 -1
  282. package/dist/domain/system-components/read-sidebar-footer.js +1 -1
  283. package/dist/domain/system-components/save-template-thumbnail.js +1 -1
  284. package/dist/domain/system-components/scene-entity-add-fab.js +1 -1
  285. package/dist/domain/system-components/scene-entity-delete-fab.js +1 -1
  286. package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
  287. package/dist/domain/system-components/scene-entity-material-override.js +1 -1
  288. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +1 -1
  289. package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
  290. package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
  291. package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
  292. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
  293. package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
  294. package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
  295. package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
  296. package/dist/domain/system-components/sidebar-tabs.d.ts +1 -1
  297. package/dist/domain/system-components/sidebar-tabs.js +1 -1
  298. package/dist/domain/system-components/simple-summary.js +1 -1
  299. package/dist/domain/system-components/size.d.ts +1 -1
  300. package/dist/domain/system-components/size.js +1 -1
  301. package/dist/domain/system-components/sketching-draw.d.ts +1 -1
  302. package/dist/domain/system-components/sketching-draw.js +1 -1
  303. package/dist/domain/system-components/sketching-edit.d.ts +1 -1
  304. package/dist/domain/system-components/sketching-edit.js +1 -1
  305. package/dist/domain/system-components/sketching-line.d.ts +1 -1
  306. package/dist/domain/system-components/sketching-line.js +1 -1
  307. package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
  308. package/dist/domain/system-components/sketching-rectangle.js +1 -1
  309. package/dist/domain/system-components/sketching.d.ts +1 -1
  310. package/dist/domain/system-components/sketching.js +1 -1
  311. package/dist/domain/system-components/snap-axis.d.ts +1 -1
  312. package/dist/domain/system-components/snap-axis.js +1 -1
  313. package/dist/domain/system-components/snap-edge.d.ts +1 -1
  314. package/dist/domain/system-components/snap-edge.js +1 -1
  315. package/dist/domain/system-components/snap-plane.d.ts +1 -1
  316. package/dist/domain/system-components/snap-plane.js +1 -1
  317. package/dist/domain/system-components/snap-point.d.ts +1 -1
  318. package/dist/domain/system-components/snap-point.js +1 -1
  319. package/dist/domain/system-components/summary-component.js +1 -1
  320. package/dist/domain/system-components/tool-menu-fab.d.ts +1 -1
  321. package/dist/domain/system-components/tool-menu-fab.js +1 -1
  322. package/dist/domain/system-components/toolbar.d.ts +1 -1
  323. package/dist/domain/system-components/toolbar.js +1 -1
  324. package/dist/domain/system-components/universal-sidebar-footer.d.ts +1 -1
  325. package/dist/domain/system-components/universal-sidebar-footer.js +1 -1
  326. package/dist/domain/utils/eval-cache.d.ts +1 -2
  327. package/dist/domain/utils/memo-eval.d.ts +1 -3
  328. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -6
  329. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  330. package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
  331. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  332. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  333. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
  334. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
  335. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
  336. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
  337. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
  338. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
  339. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
  340. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
  341. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
  342. package/dist/phoenix/scripts/build-admin.js +1 -1
  343. package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
  344. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
  345. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  346. package/package.json +3 -3
  347. package/dist/domain/core/json-schema.js +0 -1
  348. package/dist/domain/core/reflection.js +0 -1
  349. /package/dist/domain/core/{enhanced-json-schema.js → decoder/decoder.js} +0 -0
  350. /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
  351. /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
  352. /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
  353. /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
  354. /package/dist/domain/core/{component.js → model/component.js} +0 -0
  355. /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
  356. /package/dist/domain/core/{model.js → model/model.js} +0 -0
  357. /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
  358. /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
  359. /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
  360. /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
  361. /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
  362. /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
  363. /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
  364. /package/dist/domain/core/{schema-validator.js → schema/enhanced-json-schema.js} +0 -0
  365. /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
  366. /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
@@ -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.
@@ -83,7 +83,7 @@ export default phx.domain.implementActions({
83
83
  })
84
84
  ```
85
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 action declared without an implementation, or an implementation of a name the spec does not declare, is a type error. A declared action without an implementation also 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.
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
87
 
88
88
  ## Run it from the UI
89
89
 
@@ -66,40 +66,48 @@ 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
+ ```
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
103
111
  ```
104
112
 
105
113
  ### Hints and the AI assistant
@@ -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
 
@@ -427,43 +427,28 @@ For technical details about data transformation and storage, see [Data Sources -
427
427
 
428
428
  ## Web Component Integration
429
429
 
430
- Admin functionality integrates through the configurator builder rather than requiring separate web component setup.
430
+ Admin functionality is part of the same application as the configurator and needs no separate web component setup.
431
431
 
432
- ### Configurator Builder Setup
432
+ ### Registering Admin Components
433
433
 
434
- In phx-cli projects, frontend entry is auto-generated in `.phoenix/`. Admin components are registered through `src/admin/components/`:
434
+ The frontend entry is generated into `.phoenix/`, so a project never calls the configurator builder itself. Every file
435
+ in `src/admin/components/` is picked up by its location and its default export is registered as admin components:
435
436
 
436
437
  ```typescript
437
438
  // src/admin/components/admin-components.tsx
438
- import { configuratorBuilder } from '.phoenix/frontend.js'
439
- import { customAdminOptics } from './optics.js'
440
- import { NotAuthenticatedPage } from '../pages/NotAuthenticatedPage.js'
441
-
442
- const config = configuratorBuilder
443
- .withComponentOptics(customConfiguratorComponents)
444
- .withAdminComponentOptics(customAdminOptics) // Register admin components
445
- .buildConfig({
446
- deploymentId: phx.runtimeConfig.DEPLOYMENT_ID,
447
- persistence: {
448
- type: 'server',
449
- serverUrl: phx.runtimeConfig.SERVER_URL,
450
- },
451
- ui: {
452
- notAuthenticatedPage: <NotAuthenticatedPage />, // Show when user not authenticated
453
- },
454
- // ... other config
455
- })
439
+ // ... customAdminOptics as defined in the example above
456
440
 
457
- phx.frontend.mountApplication(config)
441
+ export default customAdminOptics
458
442
  ```
459
443
 
460
- Admin component files go in `src/admin/components/` and are automatically discovered by phx-cli.
444
+ The page shown to a user who is not authenticated is an element. Create it with
445
+ `phx.frontend.createNotAuthenticatedPage(...)` in a file under `src/elements/`.
461
446
 
462
447
  ### Built-in Admin Integration
463
448
 
464
449
  Phoenix automatically provides admin functionality when:
465
450
 
466
- 1. Admin components are registered via `withAdminComponentOptics()`
451
+ 1. Admin components are default-exported from files in `src/admin/components/`
467
452
  2. Admin configuration exists in `phoenix.config.ts`
468
453
  3. User has admin session token
469
454
 
@@ -116,28 +116,9 @@ After running `pnpm lingui:compile`, your custom translations will override the
116
116
  - Adapt translations for your target audience
117
117
  - Maintain consistency with your existing product language
118
118
 
119
- **Frontend integration**:
120
-
121
- ```typescript
122
- import { configuratorBuilder } from 'project-domain'
123
- import { createI18n } from 'project-i18n'
124
-
125
- const i18n = createI18n()
126
-
127
- export const config = configuratorBuilder
128
- .withComponentOptics(customComponents)
129
- .withPresets(presets)
130
- .withI18n(i18n) // Register i18n service with configurator
131
- .buildConfig({
132
- features: {
133
- availableLocales: ['en', 'de', 'cs'],
134
- },
135
- services: {
136
- logger,
137
- },
138
- // ... other configuration
139
- })
140
- ```
119
+ **Frontend integration**: the generated `.phoenix` code creates the i18n service from `.phoenix/i18n.ts` and registers
120
+ it with the application, so there is nothing to wire by hand. The languages come from `availableLocales` in
121
+ `spec/application.yaml`.
141
122
 
142
123
  ## Working with YAML Domain Specifications
143
124
 
@@ -49,6 +49,12 @@ project-root/
49
49
  | `locales/` | Locale catalogs (`.po` sources; compiled `.ts`, do not edit) |
50
50
  | `_*` | Shared code folders at any depth (not auto-imported) |
51
51
 
52
+ Every file in `components/`, `elements/`, `expressions/`, `actions/`, `invariants/`, `transformers/` and `handlers/`
53
+ (and their `admin/` counterparts) is imported by its location, so its default export must be what that folder's `phx`
54
+ factory returns, or an array of those. A file that exports anything else, such as a plain React component in
55
+ `elements/`, stops the application at start with an `Invalid default export in <file>` error that names the expected
56
+ shape. Keep plain components and helpers in a `_*` folder.
57
+
52
58
  ### Admin Folders (src/admin/)
53
59
 
54
60
  The `admin/` folder supports these admin-specific categories:
@@ -160,21 +160,23 @@ Room: {
160
160
 
161
161
  ### Entity Replacement Transformer
162
162
 
163
- Configure transformers to handle entity deselection when replacement occurs. This ensures clean state transitions:
163
+ Add a transformer to handle entity deselection when replacement occurs. This ensures clean state transitions:
164
164
 
165
165
  ```typescript
166
- const config = configuratorBuilder
167
- .withTransformers(ctx => {
168
- return [
169
- phx.frontend.transformerBuilder.when
170
- .entity(['RedSpecialConsole', 'BlueSpecialConsole'])
171
- .replacedWith(['RedSpecialConsole', 'BlueSpecialConsole'])
172
- .then.deselect()
173
- .build('Deselect special console on replacement')
174
- .register(ctx),
175
- ]
176
- })
177
- .buildConfig()
166
+ // src/transformers/deselect-special.ts
167
+ export default phx.frontend.transformerBuilder.when
168
+ .entity(['RedSpecialConsole', 'BlueSpecialConsole'])
169
+ .replacedWith(['RedSpecialConsole', 'BlueSpecialConsole'])
170
+ .then.deselect()
171
+ .build('deselect-special')
172
+ ```
173
+
174
+ 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:
175
+
176
+ ```yaml
177
+ # spec/application.yaml
178
+ transformers:
179
+ - name: deselect-special
178
180
  ```
179
181
 
180
182
  ### Initial Configuration
@@ -69,8 +69,19 @@ relations:
69
69
 
70
70
  Consider enabling select-parent-on-deselection to keep selection stable:
71
71
 
72
- ```ts
73
- .withTransformers(ctx => [{ priority: 101, transformer: createSelectParentOnDeselectionTransformer(ctx) }])
72
+ ```typescript
73
+ // src/transformers/select-parent.ts
74
+ import { createSelectParentOnDeselectionTransformer } from '@salsita-ai/sdk/domain'
75
+
76
+ export default createSelectParentOnDeselectionTransformer
77
+ ```
78
+
79
+ 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:
80
+
81
+ ```yaml
82
+ # spec/application.yaml
83
+ transformers:
84
+ - name: select-parent
74
85
  ```
75
86
 
76
87
  ## Example
@@ -1,10 +1,10 @@
1
- import type { ActionImplementations, ActionTypes } from '../core/action.js';
2
- import type { $DomainEntity, DomainEntity } from '../core/model.js';
1
+ import type { $DomainEntity, ActionImplementations, ActionTypes, DomainEntity } from '../core/index.js';
3
2
  /**
4
3
  * Creates the `implementActions` factory the generated `domain-spec.ts` exposes as
5
4
  * `phx.domain.implementActions`. A module in `src/actions/` implements any subset of the declared
6
5
  * actions and gets each parameter and result typed from the spec; a name the spec does not declare
7
- * is a type error, since its implementation would have to be `never`. The generated barrel merges
8
- * the modules and checks that every declared action is implemented.
6
+ * is a type error, since its implementation would have to be `never`. The generated barrel lists
7
+ * the modules; `DomainBuilder.withActionModules` merges them, and domain initialization checks that
8
+ * every declared action is implemented.
9
9
  */
10
10
  export declare const createActionFactory: <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>() => <IMPLEMENTATIONS extends Partial<ActionImplementations<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>>>(implementations: IMPLEMENTATIONS & Readonly<Record<Exclude<keyof IMPLEMENTATIONS, keyof ACTION_TYPES>, never>>) => IMPLEMENTATIONS;
@@ -3,7 +3,7 @@
3
3
  * @file enhanced-model.ts
4
4
  * @description Standalone common-admin enhanced model types.
5
5
  */
6
- import type { $DomainEntity } from '../../core/model.js';
6
+ import type { $DomainEntity } from '../../core/index.js';
7
7
  import type { Violation } from '../../invariants/violation.js';
8
8
  import type { Admin, ConnectedDataConfig, DataTable, DummyDoNotUse, Preset, PresetCategory, Recipe } from './model/index.js';
9
9
  export type PresetCategoryExpressions = {
@@ -3,7 +3,7 @@
3
3
  * @file model/versions/v1.ts
4
4
  * @description Historical domain model types for the migration chain.
5
5
  */
6
- import type { DomainEntityId } from '../../../../core/model.js';
6
+ import type { DomainEntityId } from '../../../../core/index.js';
7
7
  export interface Admin {
8
8
  readonly id: DomainEntityId<'Admin'>;
9
9
  readonly type: 'Admin';
@@ -3,7 +3,7 @@
3
3
  * @file model/versions/v2.ts
4
4
  * @description Historical domain model types for the migration chain.
5
5
  */
6
- import type { DomainEntityId } from '../../../../core/model.js';
6
+ import type { DomainEntityId } from '../../../../core/index.js';
7
7
  export type GenericDomainEntity = {
8
8
  readonly id: DomainEntityId<string>;
9
9
  readonly type: string;
@@ -3,7 +3,7 @@
3
3
  * @file model/versions/v3.ts
4
4
  * @description Historical domain model types for the migration chain.
5
5
  */
6
- import type { DomainEntityId } from '../../../../core/model.js';
6
+ import type { DomainEntityId } from '../../../../core/index.js';
7
7
  export type GenericDomainEntity = {
8
8
  readonly id: DomainEntityId<string>;
9
9
  readonly type: string;
@@ -4,7 +4,7 @@
4
4
  * @description Historical domain model types for the migration chain.
5
5
  */
6
6
  import type { MultilingualString } from '@salsita-ai/common/utils';
7
- import type { DomainEntityId } from '../../../../core/model.js';
7
+ import type { DomainEntityId } from '../../../../core/index.js';
8
8
  export type GenericDomainEntity = {
9
9
  readonly id: DomainEntityId<string>;
10
10
  readonly type: string;
@@ -4,7 +4,7 @@
4
4
  * @description Historical domain model types for the migration chain.
5
5
  */
6
6
  import type { MultilingualString } from '@salsita-ai/common/utils';
7
- import type { DomainEntityId } from '../../../../core/model.js';
7
+ import type { DomainEntityId } from '../../../../core/index.js';
8
8
  export type GenericDomainEntity = {
9
9
  readonly id: DomainEntityId<string>;
10
10
  readonly type: string;
@@ -4,8 +4,8 @@
4
4
  * @description Standalone versioned domain model and reflections.
5
5
  */
6
6
  import type { MultilingualString } from '@salsita-ai/common/utils';
7
- import type { DomainEntityId } from '../../../../core/model.js';
8
- import { DomainEntityReflection, RawAliasReflection } from '../../../../core/reflection.js';
7
+ import type { DomainEntityId } from '../../../../core/index.js';
8
+ import { DomainEntityReflection, RawAliasReflection } from '../../../../core/index.js';
9
9
  export declare const modelVersion = 6;
10
10
  export type GenericDomainEntity = {
11
11
  readonly id: DomainEntityId<string>;
@@ -1 +1 @@
1
- import{DomainEntityReflection as e,RawAliasReflection as t}from"../../../../core/reflection.js";export const modelVersion=6;export const Admin=new e("Admin",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]}},required:["commonAdminModelVersion"],additionalProperties:!1}]);export const Preset=new e("Preset",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},description:{$ref:"#/$defs/MultilingualString"},index:{type:"number"},visible:{type:"boolean"},categoryId:{oneOf:[{$ref:"#/$defs/DomainEntityId"},{type:"null"}]},configurationId:{oneOf:[{type:"string"},{type:"null"}]},revisionId:{oneOf:[{type:"string"},{type:"null"}]},ownerToken:{oneOf:[{type:"string"},{type:"null"}]},readToken:{oneOf:[{type:"string"},{type:"null"}]},thumbnailUrl:{oneOf:[{type:"string"},{type:"null"}]},customThumbnailUrl:{oneOf:[{type:"string"},{type:"null"}]},tags:{type:"array",items:{type:"string"}}},required:["commonAdminModelVersion","name","description","index","visible","categoryId","configurationId","revisionId","ownerToken","readToken","thumbnailUrl","customThumbnailUrl","tags"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1},DomainEntityId:{type:"string",pattern:"^[A-Z]\\w*-\\d+$"}}}]);export const PresetCategory=new e("PresetCategory",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},index:{type:"number"},visible:{type:"boolean"},description:{$ref:"#/$defs/MultilingualString"}},required:["commonAdminModelVersion","name","index","visible","description"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1}}}]);export const Recipe=new e("Recipe",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},description:{$ref:"#/$defs/MultilingualString"},collection:{type:"string"},index:{type:"number"},visible:{type:"boolean"},configuration:{anyOf:[{$ref:"#/$defs/RecipeConfiguration"},{type:"null"}]}},required:["commonAdminModelVersion","name","description","collection","index","visible","configuration"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1},RecipeConfiguration:{type:"object",properties:{modelVersion:{type:"integer"},entities:{type:"array",items:{$ref:"#/$defs/GenericDomainEntity"}},rootEntityType:{type:"string"},rootRecipeId:{type:"string"},recipeIds:{type:"array",items:{type:"string"}},configurationId:{type:"string"},revisionId:{type:"string"},ownerToken:{type:"string"}},additionalProperties:!1,required:["entities","rootEntityType","rootRecipeId","recipeIds","modelVersion","configurationId","revisionId","ownerToken"]},GenericDomainEntity:{type:"object",properties:{id:{$ref:"#/$defs/DomainEntityId"},type:{type:"string"}},additionalProperties:!0,required:["id","type"]},DomainEntityId:{type:"string",pattern:"^[A-Z]\\w*-\\d+$"}}}]);export const ConnectedDataConfig=new e("ConnectedDataConfig",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},dataEntryKey:{type:"string"},provider:{type:"string"},externalFileId:{type:"string"},fileLabel:{type:"string"},driveId:{oneOf:[{type:"string"},{type:"null"}]},tabSelection:{type:"array",items:{type:"string"}},headerRowIndex:{oneOf:[{type:"integer"},{type:"null"}]}},required:["commonAdminModelVersion","dataEntryKey","provider","externalFileId","fileLabel","driveId","tabSelection","headerRowIndex"],additionalProperties:!1}]);export const DataTable=new e("DataTable",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},dataEntryKey:{type:"string"},data:{type:"object"}},required:["commonAdminModelVersion","dataEntryKey","data"],additionalProperties:!1}]);export const DummyDoNotUse=new e("DummyDoNotUse",[{type:"object",properties:{},required:[],additionalProperties:!1}]);export const RootEntity=new t("RootEntity",[Admin]);export const CommonAdminEntity=new t("CommonAdminEntity",[Admin,Preset,PresetCategory,Recipe,ConnectedDataConfig,DataTable]);export const AnyDomainEntity=new t("AnyDomainEntity",[Admin,Preset,PresetCategory,Recipe,ConnectedDataConfig,DataTable,DummyDoNotUse]);export const aliases={RootEntity:RootEntity.types,CommonAdminEntity:CommonAdminEntity.types,AnyDomainEntity:AnyDomainEntity.types};
1
+ import{DomainEntityReflection as e,RawAliasReflection as t}from"../../../../core/index.js";export const modelVersion=6;export const Admin=new e("Admin",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]}},required:["commonAdminModelVersion"],additionalProperties:!1}]);export const Preset=new e("Preset",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},description:{$ref:"#/$defs/MultilingualString"},index:{type:"number"},visible:{type:"boolean"},categoryId:{oneOf:[{$ref:"#/$defs/DomainEntityId"},{type:"null"}]},configurationId:{oneOf:[{type:"string"},{type:"null"}]},revisionId:{oneOf:[{type:"string"},{type:"null"}]},ownerToken:{oneOf:[{type:"string"},{type:"null"}]},readToken:{oneOf:[{type:"string"},{type:"null"}]},thumbnailUrl:{oneOf:[{type:"string"},{type:"null"}]},customThumbnailUrl:{oneOf:[{type:"string"},{type:"null"}]},tags:{type:"array",items:{type:"string"}}},required:["commonAdminModelVersion","name","description","index","visible","categoryId","configurationId","revisionId","ownerToken","readToken","thumbnailUrl","customThumbnailUrl","tags"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1},DomainEntityId:{type:"string",pattern:"^[A-Z]\\w*-\\d+$"}}}]);export const PresetCategory=new e("PresetCategory",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},index:{type:"number"},visible:{type:"boolean"},description:{$ref:"#/$defs/MultilingualString"}},required:["commonAdminModelVersion","name","index","visible","description"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1}}}]);export const Recipe=new e("Recipe",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},name:{$ref:"#/$defs/MultilingualString"},description:{$ref:"#/$defs/MultilingualString"},collection:{type:"string"},index:{type:"number"},visible:{type:"boolean"},configuration:{anyOf:[{$ref:"#/$defs/RecipeConfiguration"},{type:"null"}]}},required:["commonAdminModelVersion","name","description","collection","index","visible","configuration"],additionalProperties:!1,$defs:{MultilingualString:{type:"object",properties:{$lang:{type:"object",additionalProperties:{type:"string"}}},required:["$lang"],additionalProperties:!1},RecipeConfiguration:{type:"object",properties:{modelVersion:{type:"integer"},entities:{type:"array",items:{$ref:"#/$defs/GenericDomainEntity"}},rootEntityType:{type:"string"},rootRecipeId:{type:"string"},recipeIds:{type:"array",items:{type:"string"}},configurationId:{type:"string"},revisionId:{type:"string"},ownerToken:{type:"string"}},additionalProperties:!1,required:["entities","rootEntityType","rootRecipeId","recipeIds","modelVersion","configurationId","revisionId","ownerToken"]},GenericDomainEntity:{type:"object",properties:{id:{$ref:"#/$defs/DomainEntityId"},type:{type:"string"}},additionalProperties:!0,required:["id","type"]},DomainEntityId:{type:"string",pattern:"^[A-Z]\\w*-\\d+$"}}}]);export const ConnectedDataConfig=new e("ConnectedDataConfig",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},dataEntryKey:{type:"string"},provider:{type:"string"},externalFileId:{type:"string"},fileLabel:{type:"string"},driveId:{oneOf:[{type:"string"},{type:"null"}]},tabSelection:{type:"array",items:{type:"string"}},headerRowIndex:{oneOf:[{type:"integer"},{type:"null"}]}},required:["commonAdminModelVersion","dataEntryKey","provider","externalFileId","fileLabel","driveId","tabSelection","headerRowIndex"],additionalProperties:!1}]);export const DataTable=new e("DataTable",[{type:"object",properties:{commonAdminModelVersion:{enum:[6]},dataEntryKey:{type:"string"},data:{type:"object"}},required:["commonAdminModelVersion","dataEntryKey","data"],additionalProperties:!1}]);export const DummyDoNotUse=new e("DummyDoNotUse",[{type:"object",properties:{},required:[],additionalProperties:!1}]);export const RootEntity=new t("RootEntity",[Admin]);export const CommonAdminEntity=new t("CommonAdminEntity",[Admin,Preset,PresetCategory,Recipe,ConnectedDataConfig,DataTable]);export const AnyDomainEntity=new t("AnyDomainEntity",[Admin,Preset,PresetCategory,Recipe,ConnectedDataConfig,DataTable,DummyDoNotUse]);export const aliases={RootEntity:RootEntity.types,CommonAdminEntity:CommonAdminEntity.types,AnyDomainEntity:AnyDomainEntity.types};
@@ -1,6 +1,4 @@
1
- import type { ExpressionContext } from '../../core/expression.js';
2
- import type { DomainEntity } from '../../core/model.js';
3
- import type { DomainState } from '../../core/state.js';
1
+ import type { DomainEntity, DomainState, ExpressionContext } from '../../core/index.js';
4
2
  import type { Violation } from '../../invariants/violation.js';
5
3
  import type { ChildEntitySelectionOption } from '../../system-components/child-entity-selection.js';
6
4
  import type { RecipeListItem } from '../../system-components/index.js';
@@ -1,4 +1,4 @@
1
- import type { DomainEntity } from '../../core/model.js';
1
+ import type { DomainEntity } from '../../core/index.js';
2
2
  import { AnyDomainEntity as V1Entity } from '../__generated/model/versions/v1.js';
3
3
  import { AnyDomainEntity as V2Entity } from '../__generated/model/versions/v2.js';
4
4
  import { AnyDomainEntity as V3Entity } from '../__generated/model/versions/v3.js';
@@ -1,6 +1,6 @@
1
1
  import type { ConfiguratorBuilder } from '../application/configurator-builder.js';
2
2
  import { DomainComponentOpticBuilder } from '../components/domain-component-optic.js';
3
- import type { $DomainEntity, DomainEntity } from '../core/model.js';
3
+ import type { $DomainEntity, DomainEntity } from '../core/index.js';
4
4
  import type { FinalizeData, FinalizeResult, FrontendData, NavigationState, PublishedData, SessionData, ViewState } from './__generated/application-types.js';
5
5
  import type { $Map } from './__generated/enhanced-model.js';
6
6
  import type { Aliases, CommonAdminEntity, RootEntity } from './__generated/model/index.js';
@@ -1,4 +1,4 @@
1
- import type { DomainEntityId } from '../core/model.js';
1
+ import type { DomainEntityId } from '../core/index.js';
2
2
  import type { AttributeSelectionComponentState } from '../system-components/attribute-selection.js';
3
3
  import type { NavigationListItem, NestedNavigationListItem } from '../system-components/navigation-panel-list.js';
4
4
  import type { DataCellValue, DataSchema } from './application-config.js';
@@ -6,13 +6,11 @@ import type { Logger } from '@salsita-ai/common/utils';
6
6
  import type { SessionRole, SessionTokenPayload } from '@salsita-ai/contracts/api';
7
7
  import type { CellValue } from '@salsita-ai/contracts/webhook';
8
8
  import type { AdminIntegrationService } from '#package/react-sdk';
9
- import type { DomainComponentOptic } from '../components/domain-component-optic.js';
10
- import type { $DomainEntity, DomainEntity, DomainFactory, ProductPreset, SystemComponentTypeConstraint } from '../core/index.js';
11
- import type { AnalyticsSystem, DomainContextSystems, TransformerFactory, Transformers } from '../domain-context/index.js';
9
+ import type { $DomainEntity, DomainEntity, DomainFactory, ProductPreset } from '../core/index.js';
10
+ import type { AnalyticsSystem, TransformerFactory } from '../domain-context/index.js';
12
11
  import type { RegistrableTransformer } from '../domain-context/transformers/index.js';
12
+ import type { ProjectModule } from '../project-modules/index.js';
13
13
  import type { AssistantResolvedManifest } from './assistant/index.js';
14
- import type { ElementRegistration } from './element-registration.js';
15
- import type { HandlerRegistration } from './handler-registration.js';
16
14
  import type { WebComponentEventDescriptor } from './web-component-event.js';
17
15
  import type { WebComponentPropertyDescriptor } from './web-component-property.js';
18
16
  export type ImportedTransformer<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> = {
@@ -23,6 +21,17 @@ export type SpecTransformer = {
23
21
  name: string;
24
22
  priority?: number;
25
23
  };
24
+ /**
25
+ * The transformers of an application: the `src/transformers/` files as project modules, and the spec's
26
+ * `transformers` section, which selects them by name and orders them by priority. A plain-function
27
+ * export is selected by its file name; a transformer made with `build(name)` by that name, which the spec
28
+ * parser requires to match the file name with case and dashes ignored. The runtime spec resolves the two
29
+ * into the factory the store system calls on every update.
30
+ */
31
+ export interface TransformersConfig {
32
+ readonly importedTransformers: readonly ProjectModule[];
33
+ readonly specTransformers: readonly SpecTransformer[];
34
+ }
26
35
  export interface DataSchemaPrimitiveField {
27
36
  readonly type: 'string' | 'number' | 'integer' | 'boolean';
28
37
  readonly enum?: ReadonlyArray<string | number>;
@@ -111,9 +120,11 @@ export interface DomainConfig<ENTITIES extends DomainEntity<string>, ALLOWED_ROO
111
120
  */
112
121
  readonly domainFactory: DomainFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
113
122
  /**
114
- * Components attached to the domain used for the Application to work.
123
+ * Components attached to the domain used for the Application to work, as project modules: the
124
+ * `src/components/` files and the optics a generated file lists. The runtime spec validates and
125
+ * flattens them.
115
126
  */
116
- readonly componentOptics: ReadonlyArray<DomainComponentOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, SystemComponentTypeConstraint>>;
127
+ readonly componentOptics: readonly ProjectModule[];
117
128
  /**
118
129
  * List of languages that the user will be able to provide in multi-lingual text fields in the Admin UI
119
130
  */
@@ -293,14 +304,13 @@ export interface ApplicationConfig<ENTITIES extends DomainEntity<string>, ALLOWE
293
304
  readonly dataSpec?: DataSpec;
294
305
  readonly publishedDataHash?: string;
295
306
  readonly assistant?: AssistantResolvedManifest | null;
296
- /**
297
- * Factory for transformers that will be registered in the store system and called on any update.
298
- */
299
- readonly createTransformers?: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => Transformers<ENTITIES>;
307
+ /** The project's transformers; the runtime spec validates the files and builds the store's transformer factory from them. */
308
+ readonly transformers?: TransformersConfig;
300
309
  readonly adminNavigation?: AdminNavigationConfig<ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES> | undefined;
301
310
  readonly adminDomain: DomainConfig<ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
302
- readonly handlers: ReadonlyArray<HandlerRegistration<any, any>>;
303
- readonly elements: readonly ElementRegistration[];
311
+ /** The `src/handlers/` and `src/elements/` files as project modules; the runtime spec validates and flattens both. */
312
+ readonly handlers: readonly ProjectModule[];
313
+ readonly elements: readonly ProjectModule[];
304
314
  readonly mount: MountConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>;
305
315
  }
306
316
  export {};
@@ -1,5 +1,4 @@
1
- import type { DomainEntity, DomainEntityId } from '../core/model.js';
2
- import type { DomainState } from '../core/state.js';
1
+ import type { DomainEntity, DomainEntityId, DomainState } from '../core/index.js';
3
2
  import type { AssistantRecipeContext } from './assistant-recipe-groups.js';
4
3
  import type { AssistantFieldOptions, AssistantManifest } from './assistant/index.js';
5
4
  type AnyDomainState = DomainState<DomainEntity<string>>;
@@ -1,8 +1,6 @@
1
1
  import type { Localizable } from '@salsita-ai/common/utils';
2
2
  import { type StateUpdate } from '../components/updates.js';
3
- import type { AnyActionContext } from '../core/action.js';
4
- import { type DomainEntity } from '../core/model.js';
5
- import type { DomainState } from '../core/state.js';
3
+ import { type AnyActionContext, type DomainEntity, type DomainState } from '../core/index.js';
6
4
  import type { AssistantManifest } from './assistant/index.js';
7
5
  type AnyDomainState = DomainState<DomainEntity<string>>;
8
6
  /**