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

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 (1171) hide show
  1. package/README.md +19 -14
  2. package/dist/admin/default-admin-elements.d.ts +9 -0
  3. package/dist/admin/default-admin-elements.js +1 -0
  4. package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
  5. package/dist/admin/default-elements/built-in-entity-element.js +1 -0
  6. package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
  7. package/dist/admin/default-elements/built-in-layout-element.js +1 -0
  8. package/dist/admin/default-elements/index.d.ts +2 -0
  9. package/dist/admin/default-elements/index.js +1 -0
  10. package/dist/admin/index.d.ts +1 -0
  11. package/dist/admin/index.js +1 -1
  12. package/dist/application-spec/caching/content-diff.js +1 -1
  13. package/dist/application-spec/core/application-file.d.ts +0 -2
  14. package/dist/application-spec/core/application-file.js +1 -1
  15. package/dist/application-spec/core/components/component-filter.d.ts +53 -0
  16. package/dist/application-spec/core/components/component-filter.js +1 -0
  17. package/dist/application-spec/core/components/index.d.ts +2 -0
  18. package/dist/application-spec/core/components/index.js +1 -0
  19. package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
  20. package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
  21. package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
  22. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  23. package/dist/application-spec/core/expressions/index.d.ts +2 -0
  24. package/dist/application-spec/core/expressions/index.js +1 -0
  25. package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
  26. package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
  27. package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
  28. package/dist/application-spec/core/index.d.ts +2 -0
  29. package/dist/application-spec/core/index.js +1 -1
  30. package/dist/application-spec/core/json-value.d.ts +1 -1
  31. package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
  32. package/dist/application-spec/enhanced-json/index.d.ts +4 -0
  33. package/dist/application-spec/enhanced-json/index.js +1 -0
  34. package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
  35. package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
  36. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
  37. package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
  38. package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
  39. package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
  40. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
  41. package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
  42. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
  43. package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
  44. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
  45. package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
  46. package/dist/application-spec/errors/diagnostic-codes.d.ts +14 -0
  47. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  48. package/dist/application-spec/errors/diagnostic-messages.d.ts +17 -0
  49. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  50. package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
  51. package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
  52. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  53. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  54. package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
  55. package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
  56. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  57. package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
  58. package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
  59. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +22 -14
  60. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  61. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
  62. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  63. package/dist/application-spec/generate-application/code/story-files.js +1 -1
  64. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
  65. package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
  66. package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
  67. package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
  68. package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
  69. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +35 -0
  70. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
  71. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
  72. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
  73. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
  74. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +7 -7
  75. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
  76. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
  77. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +69 -73
  78. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
  79. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
  80. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  81. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
  82. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
  83. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
  84. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +21 -21
  85. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
  86. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
  87. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +3 -2
  88. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  89. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  90. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  91. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  92. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  93. package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
  94. package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
  95. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
  96. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +31 -0
  97. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  98. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  99. package/dist/application-spec/generate-application/code/templates/globals.js +24 -43
  100. package/dist/application-spec/generate-application/code/templates/index.d.ts +3 -10
  101. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  102. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  103. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  104. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  105. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  106. package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
  107. package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
  108. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  109. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +1 -1
  110. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
  111. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +9 -3
  112. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  113. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +2 -2
  114. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +31 -14
  115. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -4
  116. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
  117. package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
  118. package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
  119. package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
  120. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
  121. package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
  122. package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
  123. package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
  124. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
  125. package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
  126. package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
  127. package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
  128. package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
  129. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
  130. package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
  131. package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
  132. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
  133. package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
  134. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
  135. package/dist/application-spec/generate-application/index.d.ts +2 -0
  136. package/dist/application-spec/generate-application/index.js +1 -1
  137. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +6 -4
  138. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
  139. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +8 -3
  140. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  141. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  142. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +19 -7
  143. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  144. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +6 -4
  145. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
  146. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -4
  147. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  148. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  149. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
  150. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
  151. package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
  152. package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
  153. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
  154. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
  155. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
  156. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
  157. package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
  158. package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
  159. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
  160. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
  161. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  162. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +3 -2
  163. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  164. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
  165. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
  166. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +5 -1
  167. package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
  168. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  169. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +7 -4
  170. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  171. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
  172. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  173. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
  174. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
  175. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  176. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +4 -6
  177. package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
  178. package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
  179. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
  180. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
  181. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
  182. package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
  183. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
  184. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
  185. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
  186. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
  187. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
  188. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
  189. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +5 -0
  190. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
  191. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
  192. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
  193. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
  194. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.js +1 -0
  195. package/dist/application-spec/index.d.ts +1 -0
  196. package/dist/application-spec/index.js +1 -1
  197. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
  198. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  199. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
  200. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
  201. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
  202. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
  203. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
  204. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  205. package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
  206. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
  207. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  208. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  209. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  210. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  211. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  212. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  213. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
  214. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
  215. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
  216. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
  217. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  218. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  219. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
  220. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
  221. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
  222. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
  223. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
  224. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
  225. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
  226. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
  227. package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
  228. package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
  229. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
  230. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
  231. package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
  232. package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
  233. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
  234. package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
  235. package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
  236. package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
  237. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
  238. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
  239. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
  240. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  241. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
  242. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
  243. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +6 -0
  244. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  245. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +7 -4
  246. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  247. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
  248. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  249. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  250. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  251. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
  252. package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
  253. package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
  254. package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
  255. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -3
  256. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  257. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  258. package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
  259. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  260. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +3 -1
  261. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  262. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
  263. package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
  264. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
  265. package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
  266. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
  267. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  268. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
  269. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
  270. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
  271. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
  272. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
  273. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
  274. package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
  275. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  276. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  277. package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
  278. package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
  279. package/dist/client/phoenix-api.d.ts +463 -0
  280. package/dist/configurator/ConfiguratorApp.js +1 -1
  281. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
  282. package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
  283. package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +5 -0
  284. package/dist/configurator/app-loader-content/app-loader-content-name.js +1 -0
  285. package/dist/configurator/app-loader-content/index.d.ts +2 -0
  286. package/dist/configurator/app-loader-content/index.js +1 -0
  287. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  288. package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
  289. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  290. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +38 -1
  291. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  292. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
  293. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  294. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
  295. package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
  296. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
  297. package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
  298. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +20 -4
  299. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  300. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
  301. package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
  302. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
  303. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  304. package/dist/configurator/common/configurator-interface.d.ts +141 -4
  305. package/dist/configurator/common/configurator-interface.js +1 -1
  306. package/dist/configurator/common/index.d.ts +3 -1
  307. package/dist/configurator/common/index.js +1 -1
  308. package/dist/configurator/common/use-reset-camera.d.ts +6 -0
  309. package/dist/configurator/common/use-reset-camera.js +1 -0
  310. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +12 -0
  311. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
  312. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.d.ts +9 -0
  313. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +1 -0
  314. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
  315. package/dist/configurator/configuration-not-found-page/index.js +1 -0
  316. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
  317. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
  318. package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
  319. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  320. package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
  321. package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
  322. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +11 -1
  323. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
  324. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
  325. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +12 -0
  326. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
  327. package/dist/configurator/configurator-error-page/create-configurator-error-page.d.ts +9 -0
  328. package/dist/configurator/configurator-error-page/create-configurator-error-page.js +1 -0
  329. package/dist/configurator/configurator-error-page/index.d.ts +3 -0
  330. package/dist/configurator/configurator-error-page/index.js +1 -0
  331. package/dist/configurator/index.d.ts +3 -0
  332. package/dist/configurator/index.js +1 -1
  333. package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
  334. package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
  335. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  336. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +7 -0
  337. package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
  338. package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
  339. package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
  340. package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
  341. package/dist/configurator/pages/DefaultPresetUi.js +1 -0
  342. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  343. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  344. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  345. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  346. package/dist/configurator/pages/RootPage.js +1 -1
  347. package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
  348. package/dist/configurator/pages/configurator-layout-name.js +1 -0
  349. package/dist/configurator/pages/default-configurator-elements.d.ts +13 -0
  350. package/dist/configurator/pages/default-configurator-elements.js +1 -0
  351. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  352. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  353. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  354. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  355. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  356. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  357. package/dist/configurator/pages/default-elements/index.d.ts +5 -0
  358. package/dist/configurator/pages/default-elements/index.js +1 -0
  359. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  360. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  361. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
  362. package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
  363. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
  364. package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
  365. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
  366. package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
  367. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
  368. package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
  369. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
  370. package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
  371. package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
  372. package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
  373. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
  374. package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
  375. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  376. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  377. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  378. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  379. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  380. package/dist/configurator/pages/index.d.ts +1 -0
  381. package/dist/configurator/pages/index.js +1 -1
  382. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
  383. package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
  384. package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
  385. package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
  386. package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
  387. package/dist/configurator/preset-screen-elements/index.js +1 -0
  388. package/dist/configurator/scene/index.d.ts +1 -0
  389. package/dist/configurator/scene/index.js +1 -1
  390. package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
  391. package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
  392. package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
  393. package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
  394. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
  395. package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
  396. package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
  397. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
  398. package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
  399. package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
  400. package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
  401. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  402. package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
  403. package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
  404. package/dist/configurator/toolbar-actions/index.d.ts +3 -0
  405. package/dist/configurator/toolbar-actions/index.js +1 -0
  406. package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
  407. package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
  408. package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
  409. package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
  410. package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
  411. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
  412. package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
  413. package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
  414. package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
  415. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  416. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
  417. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  418. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  419. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  420. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
  421. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
  422. package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
  423. package/dist/configurator/ui/assistant/alert/index.js +1 -0
  424. package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
  425. package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
  426. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
  427. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
  428. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
  429. package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
  430. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
  431. package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
  432. package/dist/configurator/ui/assistant/entity-link/index.d.ts +2 -0
  433. package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
  434. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
  435. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
  436. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
  437. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
  438. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +12 -0
  439. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
  440. package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
  441. package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
  442. package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
  443. package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
  444. package/dist/configurator/ui/assistant/form/form-model.d.ts +39 -0
  445. package/dist/configurator/ui/assistant/form/form-model.js +1 -0
  446. package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
  447. package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
  448. package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
  449. package/dist/configurator/ui/assistant/form/form-state.js +1 -0
  450. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  451. package/dist/configurator/ui/assistant/form/index.js +1 -0
  452. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +10 -0
  453. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
  454. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
  455. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
  456. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
  457. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
  458. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
  459. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
  460. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +6 -0
  461. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
  462. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
  463. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
  464. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +6 -0
  465. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
  466. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +6 -0
  467. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
  468. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
  469. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
  470. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +6 -0
  471. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
  472. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
  473. package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
  474. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +38 -0
  475. package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
  476. package/dist/configurator/ui/assistant/form-elements/index.d.ts +9 -0
  477. package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
  478. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  479. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  480. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  481. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  482. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  483. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  484. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  485. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  486. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  487. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  488. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  489. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  490. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
  491. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
  492. package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
  493. package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
  494. package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +2 -0
  495. package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
  496. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
  497. package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
  498. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +4 -2
  499. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  500. package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
  501. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  502. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
  503. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
  504. package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
  505. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
  506. package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
  507. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  508. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  509. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
  510. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
  511. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
  512. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
  513. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
  514. package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
  515. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
  516. package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
  517. package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
  518. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
  519. package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
  520. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
  521. package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
  522. package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
  523. package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
  524. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
  525. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
  526. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  527. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  528. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  529. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
  530. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
  531. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
  532. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
  533. package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
  534. package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
  535. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  536. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  537. package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
  538. package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
  539. package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
  540. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  541. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
  542. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  543. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  544. package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
  545. package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
  546. package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
  547. package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
  548. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
  549. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
  550. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
  551. package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
  552. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
  553. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  554. package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
  555. package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
  556. package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
  557. package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
  558. package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
  559. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
  560. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
  561. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
  562. package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
  563. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
  564. package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
  565. package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
  566. package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
  567. package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
  568. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  569. package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
  570. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
  571. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
  572. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
  573. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  574. package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
  575. package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
  576. package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
  577. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
  578. package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
  579. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
  580. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
  581. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
  582. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
  583. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
  584. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  585. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  586. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -0
  587. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  588. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
  589. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
  590. package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
  591. package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
  592. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
  593. package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
  594. package/dist/docs/complex-use-cases/sketching.mdx +0 -38
  595. package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
  596. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  597. package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
  598. package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
  599. package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
  600. package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
  601. package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
  602. package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
  603. package/dist/docs/drag-and-drop/planes.mdx +1 -1
  604. package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
  605. package/dist/docs/fabs/basic.mdx +6 -2
  606. package/dist/docs/index.json +42 -1
  607. package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
  608. package/dist/docs/layouts/custom-layout.mdx +2437 -0
  609. package/dist/docs/layouts/header/fixed.mdx +2 -2
  610. package/dist/docs/layouts/header/floating.mdx +2 -2
  611. package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
  612. package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
  613. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  614. package/dist/docs/other-features/error-5xx.mdx +1 -1
  615. package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
  616. package/dist/docs/other-features/not-found-404.mdx +1 -1
  617. package/dist/docs/other-features/side-effects.mdx +8 -11
  618. package/dist/docs/other-features/transformers.mdx +4 -0
  619. package/dist/docs/other-features/violation-messages.mdx +52 -56
  620. package/dist/docs/phoenix/application-states.mdx +9 -7
  621. package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
  622. package/dist/docs/phoenix/components.mdx +6 -0
  623. package/dist/docs/phoenix/configurator-interface.mdx +400 -81
  624. package/dist/docs/phoenix/deployments.mdx +2 -6
  625. package/dist/docs/phoenix/domain-model.mdx +6 -0
  626. package/dist/docs/phoenix/finalization.mdx +1 -1
  627. package/dist/docs/phoenix/getting-started.mdx +7 -4
  628. package/dist/docs/phoenix/layout-slots.mdx +116 -0
  629. package/dist/docs/phoenix/localization.mdx +10 -6
  630. package/dist/docs/phoenix/migration-guide.mdx +24 -11
  631. package/dist/docs/phoenix/phoenix-cli.mdx +88 -44
  632. package/dist/docs/phoenix/project-structure.mdx +80 -36
  633. package/dist/docs/phoenix/quickstart.mdx +9 -9
  634. package/dist/docs/phoenix/sdk-builder-workflow.mdx +9 -9
  635. package/dist/docs/phoenix/testing.mdx +148 -0
  636. package/dist/docs/phoenix/webhook-membership.mdx +10 -9
  637. package/dist/docs/phoenix/webhooks.mdx +23 -6
  638. package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
  639. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
  640. package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
  641. package/dist/domain/admin-domain/index.js +1 -1
  642. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
  643. package/dist/domain/application/GetThemeHandler.d.ts +1 -1
  644. package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
  645. package/dist/domain/application/application-config.d.ts +8 -5
  646. package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
  647. package/dist/domain/application/assistant/assistant-fields.js +1 -0
  648. package/dist/domain/application/assistant/assistant-manifest.d.ts +9 -1
  649. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
  650. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  651. package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
  652. package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
  653. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  654. package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
  655. package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
  656. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +163 -0
  657. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
  658. package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
  659. package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
  660. package/dist/domain/application/assistant/form/get-assistant-form-value-attribute.d.ts +6 -0
  661. package/dist/domain/application/assistant/form/get-assistant-form-value-attribute.js +1 -0
  662. package/dist/domain/application/assistant/form/index.d.ts +4 -0
  663. package/dist/domain/application/assistant/form/index.js +1 -0
  664. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  665. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  666. package/dist/domain/application/assistant/index.d.ts +7 -1
  667. package/dist/domain/application/assistant/index.js +1 -1
  668. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
  669. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
  670. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
  671. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
  672. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
  673. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
  674. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
  675. package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
  676. package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
  677. package/dist/domain/application/assistant/session-setup/index.js +1 -0
  678. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -2
  679. package/dist/domain/application/configurator-builder.d.ts +5 -2
  680. package/dist/domain/application/configurator-builder.js +1 -1
  681. package/dist/domain/application/create-initial-published-data.d.ts +6 -7
  682. package/dist/domain/application/index.d.ts +0 -4
  683. package/dist/domain/application/index.js +1 -1
  684. package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
  685. package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
  686. package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
  687. package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
  688. package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
  689. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  690. package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
  691. package/dist/domain/core/component/domain-component-optic.d.ts +11 -19
  692. package/dist/domain/core/component/domain-component-optic.js +2 -2
  693. package/dist/domain/core/component/legacy-filter.d.ts +2 -17
  694. package/dist/domain/core/component/system-component-filter.d.ts +36 -18
  695. package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
  696. package/dist/domain/core/expression/constant-expressions.js +1 -1
  697. package/dist/domain/core/expression/custom-expression.d.ts +17 -4
  698. package/dist/domain/core/expression/custom-expression.js +1 -1
  699. package/dist/domain/core/expression/expression.d.ts +1 -2
  700. package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
  701. package/dist/domain/core/invariant/invariants.d.ts +1 -4
  702. package/dist/domain/core/invariant/violation.d.ts +50 -2
  703. package/dist/domain/core/invariant/violation.js +1 -1
  704. package/dist/domain/core/model/model.d.ts +1 -1
  705. package/dist/domain/core/recipe/recipes.d.ts +18 -50
  706. package/dist/domain/core/recipe/recipes.js +1 -1
  707. package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
  708. package/dist/domain/core/relation/all-of-type-relation.js +1 -1
  709. package/dist/domain/core/relation/direct-relation.d.ts +13 -24
  710. package/dist/domain/core/relation/index.d.ts +0 -1
  711. package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
  712. package/dist/domain/core/relation/indirect-relation.js +1 -1
  713. package/dist/domain/core/relation/relation-factory.d.ts +19 -15
  714. package/dist/domain/core/relation/relation-factory.js +1 -1
  715. package/dist/domain/core/schema/extended-schema-validator.js +1 -1
  716. package/dist/domain/core/state/migrations.d.ts +14 -45
  717. package/dist/domain/core/state/migrations.js +1 -1
  718. package/dist/domain/core/state/state.d.ts +1 -1
  719. package/dist/domain/domain-builder.d.ts +1 -1
  720. package/dist/domain/domain-builder.js +1 -1
  721. package/dist/domain/domain-context/action-system/action-system.d.ts +1 -1
  722. package/dist/domain/domain-context/action-system/action-system.js +1 -1
  723. package/dist/domain/domain-context/action-system/index.d.ts +1 -0
  724. package/dist/domain/domain-context/action-system/index.js +1 -0
  725. package/dist/domain/domain-context/analytics-system/index.d.ts +2 -0
  726. package/dist/domain/domain-context/analytics-system/index.js +1 -0
  727. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  728. package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +2 -2
  729. package/dist/domain/domain-context/dimension-system/dimension-system.js +1 -1
  730. package/dist/domain/domain-context/dimension-system/index.d.ts +1 -0
  731. package/dist/domain/domain-context/dimension-system/index.js +1 -0
  732. package/dist/domain/domain-context/domain-context-systems.d.ts +7 -7
  733. package/dist/domain/domain-context/index.d.ts +8 -17
  734. package/dist/domain/domain-context/index.js +1 -1
  735. package/dist/domain/domain-context/navigation-system/index.d.ts +3 -0
  736. package/dist/domain/domain-context/navigation-system/index.js +1 -0
  737. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -3
  738. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  739. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  740. package/dist/domain/domain-context/recipe-system/index.d.ts +1 -0
  741. package/dist/domain/domain-context/recipe-system/index.js +1 -0
  742. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -1
  743. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
  744. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +2 -2
  745. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +2 -2
  746. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +2 -2
  747. package/dist/domain/domain-context/relation-transformers/index.d.ts +4 -0
  748. package/dist/domain/domain-context/relation-transformers/index.js +1 -0
  749. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +2 -2
  750. package/dist/domain/domain-context/store-system/index.d.ts +4 -0
  751. package/dist/domain/domain-context/store-system/index.js +1 -0
  752. package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
  753. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -3
  754. package/dist/domain/domain-context/store-system/store-system.js +2 -2
  755. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -1
  756. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  757. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +5 -7
  758. package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
  759. package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
  760. package/dist/domain/domain-context/transformers/context.d.ts +1 -1
  761. package/dist/domain/domain-context/transformers/context.js +1 -1
  762. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  763. package/dist/domain/domain-context/transformers/index.d.ts +1 -1
  764. package/dist/domain/domain-context/transformers/index.js +1 -1
  765. package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -3
  766. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  767. package/dist/domain/domain-context/undo-system.d.ts +29 -2
  768. package/dist/domain/domain-context/undo-system.js +1 -1
  769. package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
  770. package/dist/domain/domain-runtime/access/selectors.js +1 -1
  771. package/dist/domain/domain-runtime/access/types.d.ts +2 -0
  772. package/dist/domain/domain-runtime/access/types.js +1 -1
  773. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  774. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +17 -22
  775. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  776. package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
  777. package/dist/domain/domain-runtime/domain-runtime.d.ts +76 -60
  778. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
  779. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
  780. package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
  781. package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
  782. package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
  783. package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
  784. package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
  785. package/dist/domain/domain-runtime/errors/index.js +1 -0
  786. package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
  787. package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
  788. package/dist/domain/domain-runtime/index.d.ts +1 -0
  789. package/dist/domain/domain-runtime/index.js +1 -1
  790. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
  791. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
  792. package/dist/domain/domain-runtime/spec/index.d.ts +2 -5
  793. package/dist/domain/domain-runtime/spec/index.js +1 -1
  794. package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
  795. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  796. package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +14 -13
  797. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
  798. package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +1 -1
  799. package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
  800. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
  801. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
  802. package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -1
  803. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
  804. package/dist/domain/domain-runtime/spec/{resolve-action-modules.d.ts → module-checks/resolve-action-modules.d.ts} +2 -2
  805. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
  806. package/dist/domain/domain-runtime/spec/{resolve-component-optic-modules.d.ts → module-checks/resolve-component-optic-modules.d.ts} +2 -2
  807. package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
  808. package/dist/domain/domain-runtime/spec/{resolve-expression-modules.d.ts → module-checks/resolve-expression-modules.d.ts} +2 -2
  809. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
  810. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
  811. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
  812. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
  813. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
  814. package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -6
  815. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  816. package/dist/domain/domain-runtime/spec/types.d.ts +5 -2
  817. package/dist/domain/extensions/attribute-switch.d.ts +1 -1
  818. package/dist/domain/extensions/attribute-switch.js +1 -1
  819. package/dist/domain/extensions/canvas-config.d.ts +1 -1
  820. package/dist/domain/extensions/client-side-image.d.ts +2 -2
  821. package/dist/domain/extensions/client-side-image.js +1 -1
  822. package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
  823. package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
  824. package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
  825. package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
  826. package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
  827. package/dist/domain/extensions/editable-offset-indicator.js +1 -1
  828. package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
  829. package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
  830. package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
  831. package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
  832. package/dist/domain/extensions/navigation-steps.d.ts +2 -2
  833. package/dist/domain/extensions/offset-indicator.js +1 -1
  834. package/dist/domain/extensions/rotation-handle.d.ts +2 -2
  835. package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
  836. package/dist/domain/extensions/save-template-thumbnail.js +1 -1
  837. package/dist/domain/extensions/scene-entity-animation.js +1 -1
  838. package/dist/domain/index.d.ts +0 -1
  839. package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
  840. package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
  841. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +28 -19
  842. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  843. package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
  844. package/dist/domain/mocks/create-mock-domain.js +1 -1
  845. package/dist/domain/mocks/create-mock-state.d.ts +2 -2
  846. package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
  847. package/dist/domain/mocks/create-test-application-config.js +1 -0
  848. package/dist/domain/mocks/index.d.ts +1 -0
  849. package/dist/domain/mocks/index.js +1 -1
  850. package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -2
  851. package/dist/domain/projections/blender-projections/camera.d.ts +2 -2
  852. package/dist/domain/projections/collision-projections.d.ts +1 -1
  853. package/dist/domain/projections/composition-projections.d.ts +1 -1
  854. package/dist/domain/projections/constraint-projections.d.ts +1 -1
  855. package/dist/domain/projections/position-projections.d.ts +1 -1
  856. package/dist/domain/projections/projected-entities-projections.d.ts +1 -1
  857. package/dist/domain/projections/snapping-projections.d.ts +1 -1
  858. package/dist/domain/projections/validation-projections.d.ts +2 -2
  859. package/dist/domain/sketching/sketching-projections.d.ts +1 -1
  860. package/dist/domain/system-components/application-config.d.ts +2 -2
  861. package/dist/domain/system-components/child-entity-selection.js +1 -1
  862. package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
  863. package/dist/domain/system-components/collision-geometry.d.ts +4 -2
  864. package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
  865. package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
  866. package/dist/domain/system-components/common/recipes.d.ts +21 -3
  867. package/dist/domain/system-components/common/recipes.js +1 -1
  868. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  869. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  870. package/dist/domain/system-components/constraint.d.ts +10 -23
  871. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  872. package/dist/domain/system-components/drag-handle.js +1 -1
  873. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  874. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  875. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  876. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  877. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  878. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  879. package/dist/domain/system-components/material-swatch.js +1 -1
  880. package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
  881. package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
  882. package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
  883. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
  884. package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
  885. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  886. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  887. package/dist/domain/utils/eval-cache.d.ts +1 -1
  888. package/dist/domain/utils/map-nested-object.d.ts +1 -1
  889. package/dist/editor/Editor.d.ts +7 -0
  890. package/dist/editor/Editor.js +1 -1
  891. package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
  892. package/dist/editor/mocks/CreateMockYaml.js +2 -2
  893. package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
  894. package/dist/editor/mocks/EditorMockContext.js +1 -1
  895. package/dist/globals/index.d.ts +2 -0
  896. package/dist/i18n/locales/cs/messages.js +1 -1
  897. package/dist/i18n/locales/da/messages.js +1 -1
  898. package/dist/i18n/locales/de/messages.js +1 -1
  899. package/dist/i18n/locales/de-AT/messages.js +1 -1
  900. package/dist/i18n/locales/en/messages.js +1 -1
  901. package/dist/i18n/locales/en-AU/messages.js +1 -1
  902. package/dist/i18n/locales/en-GB/messages.js +1 -1
  903. package/dist/i18n/locales/es/messages.js +1 -1
  904. package/dist/i18n/locales/fr/messages.js +1 -1
  905. package/dist/i18n/locales/hu/messages.js +1 -1
  906. package/dist/i18n/locales/it/messages.js +1 -1
  907. package/dist/i18n/locales/nl/messages.js +1 -1
  908. package/dist/i18n/locales/pl/messages.js +1 -1
  909. package/dist/i18n/locales/pt/messages.js +1 -1
  910. package/dist/i18n/locales/ro/messages.js +1 -1
  911. package/dist/i18n/locales/sk/messages.js +1 -1
  912. package/dist/i18n/locales/tr/messages.js +1 -1
  913. package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
  914. package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
  915. package/dist/legacy/domain-cli/gen/defaults.js +1 -7
  916. package/dist/legacy/domain-cli/gen/implementation.js +7 -11
  917. package/dist/legacy/domain-cli/gen/invariants.js +3 -4
  918. package/dist/legacy/domain-cli/gen/relations.js +1 -1
  919. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  920. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  921. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +160 -148
  922. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  923. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  924. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  925. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -0
  926. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
  927. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +15 -14
  928. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
  929. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +14 -13
  930. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
  931. package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
  932. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  933. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
  934. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  935. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  936. package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
  937. package/dist/phoenix/application-spec/project-files.js +1 -1
  938. package/dist/phoenix/bin.d.ts +2 -0
  939. package/dist/phoenix/bin.js +2 -0
  940. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  941. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  942. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  943. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  944. package/dist/phoenix/check-configs/index.d.ts +8 -0
  945. package/dist/phoenix/check-configs/index.js +1 -0
  946. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  947. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  948. package/dist/phoenix/cli.d.ts +0 -1
  949. package/dist/phoenix/cli.js +1 -2
  950. package/dist/phoenix/commands/build.js +1 -1
  951. package/dist/phoenix/commands/check.js +1 -1
  952. package/dist/phoenix/commands/clean.js +1 -1
  953. package/dist/phoenix/commands/deploy.js +2 -2
  954. package/dist/phoenix/commands/deps/deps.d.ts +73 -0
  955. package/dist/phoenix/commands/deps/deps.js +3 -0
  956. package/dist/phoenix/commands/deps/index.d.ts +1 -0
  957. package/dist/phoenix/commands/deps/index.js +1 -0
  958. package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
  959. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
  960. package/dist/phoenix/commands/dev.js +5 -5
  961. package/dist/phoenix/commands/fix.js +1 -1
  962. package/dist/phoenix/commands/index.d.ts +1 -0
  963. package/dist/phoenix/commands/index.js +1 -1
  964. package/dist/phoenix/commands/init.d.ts +17 -5
  965. package/dist/phoenix/commands/init.js +1 -1
  966. package/dist/phoenix/commands/link.js +1 -1
  967. package/dist/phoenix/commands/prettier.js +1 -1
  968. package/dist/phoenix/commands/sync.js +1 -1
  969. package/dist/phoenix/commands/unlink.js +1 -1
  970. package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -2
  971. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  972. package/dist/phoenix/services/lingui.d.ts +8 -0
  973. package/dist/phoenix/services/lingui.js +1 -1
  974. package/dist/phoenix/services/source-archive.d.ts +1 -0
  975. package/dist/phoenix/services/source-archive.js +1 -1
  976. package/dist/phoenix/services/swc.js +1 -1
  977. package/dist/phoenix/services/vite-config.js +1 -1
  978. package/dist/phoenix/utils/git/index.d.ts +1 -0
  979. package/dist/phoenix/utils/git/index.js +1 -0
  980. package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
  981. package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
  982. package/dist/phoenix/utils/index.d.ts +5 -2
  983. package/dist/phoenix/utils/index.js +1 -1
  984. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  985. package/dist/phoenix/utils/node-version/index.js +1 -0
  986. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  987. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  988. package/dist/phoenix/utils/package-info.d.ts +0 -9
  989. package/dist/phoenix/utils/package-info.js +1 -1
  990. package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
  991. package/dist/phoenix/utils/package-manager/index.js +1 -0
  992. package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
  993. package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
  994. package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
  995. package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
  996. package/dist/phoenix/utils/run-command.d.ts +11 -0
  997. package/dist/phoenix/utils/run-command.js +1 -1
  998. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  999. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  1000. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  1001. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  1002. package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +6 -0
  1003. package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.js +1 -0
  1004. package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
  1005. package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
  1006. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
  1007. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  1008. package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
  1009. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +53 -36
  1010. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  1011. package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
  1012. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +8 -0
  1013. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
  1014. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +41 -0
  1015. package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
  1016. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +9 -9
  1017. package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
  1018. package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
  1019. package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
  1020. package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
  1021. package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
  1022. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
  1023. package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
  1024. package/dist/react-sdk/domain-context/index.d.ts +8 -1
  1025. package/dist/react-sdk/domain-context/index.js +1 -1
  1026. package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
  1027. package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
  1028. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
  1029. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
  1030. package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
  1031. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
  1032. package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
  1033. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +11 -0
  1034. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  1035. package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
  1036. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
  1037. package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
  1038. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
  1039. package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
  1040. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
  1041. package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
  1042. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
  1043. package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
  1044. package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
  1045. package/dist/react-sdk/elements/configurator-error-page-props.d.ts +20 -0
  1046. package/dist/react-sdk/elements/configurator-error-page-props.js +1 -0
  1047. package/dist/react-sdk/elements/index.d.ts +1 -0
  1048. package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
  1049. package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
  1050. package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
  1051. package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
  1052. package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
  1053. package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
  1054. package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
  1055. package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
  1056. package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
  1057. package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
  1058. package/dist/react-sdk/handlers/index.d.ts +6 -0
  1059. package/dist/react-sdk/handlers/index.js +1 -1
  1060. package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
  1061. package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
  1062. package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
  1063. package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
  1064. package/dist/react-sdk/index.d.ts +2 -0
  1065. package/dist/react-sdk/index.js +1 -1
  1066. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +5 -0
  1067. package/dist/react-sdk/loading-state/loading-state-manager.js +1 -1
  1068. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +25 -0
  1069. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +1 -0
  1070. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +14 -0
  1071. package/dist/react-sdk/responsive-state/canvas-padding.js +1 -0
  1072. package/dist/react-sdk/responsive-state/index.d.ts +5 -0
  1073. package/dist/react-sdk/responsive-state/index.js +1 -0
  1074. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +111 -0
  1075. package/dist/react-sdk/responsive-state/responsive-state-manager.js +1 -0
  1076. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +10 -0
  1077. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +1 -0
  1078. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +11 -0
  1079. package/dist/react-sdk/responsive-state/use-responsive-state.js +1 -0
  1080. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
  1081. package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
  1082. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
  1083. package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
  1084. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
  1085. package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
  1086. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
  1087. package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
  1088. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
  1089. package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
  1090. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
  1091. package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
  1092. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
  1093. package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
  1094. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
  1095. package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
  1096. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
  1097. package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
  1098. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
  1099. package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
  1100. package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
  1101. package/dist/react-sdk/scene-control-elements/index.js +1 -0
  1102. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
  1103. package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
  1104. package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
  1105. package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
  1106. package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
  1107. package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
  1108. package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
  1109. package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
  1110. package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
  1111. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  1112. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  1113. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
  1114. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
  1115. package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
  1116. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +57 -0
  1117. package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
  1118. package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
  1119. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
  1120. package/dist/ui-sdk/theme/types.d.ts +1 -1
  1121. package/dist/webhook/builders/webhook-builder.js +1 -1
  1122. package/package.json +48 -36
  1123. package/schema/domain-spec.json +1201 -217
  1124. package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
  1125. package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
  1126. package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
  1127. package/dist/application-spec/generate-application/code/templates/env-example.js +0 -94
  1128. package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
  1129. package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
  1130. package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
  1131. package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
  1132. package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
  1133. package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
  1134. package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
  1135. package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
  1136. package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
  1137. package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
  1138. package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
  1139. package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
  1140. package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
  1141. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
  1142. package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
  1143. package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
  1144. package/dist/configurator/common/frontend-analytics.js +0 -1
  1145. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
  1146. package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
  1147. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
  1148. package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
  1149. package/dist/domain/application/element-registration.js +0 -1
  1150. package/dist/domain/application/handler-registration.js +0 -1
  1151. package/dist/domain/application/resolve-imported-transformers.d.ts +0 -23
  1152. package/dist/domain/application/resolve-imported-transformers.js +0 -1
  1153. package/dist/domain/application/resource-builder.d.ts +0 -13
  1154. package/dist/domain/application/resource-builder.js +0 -1
  1155. package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
  1156. package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +0 -61
  1157. package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
  1158. package/dist/domain/domain-runtime/spec/resolve-action-modules.js +0 -1
  1159. package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.js +0 -1
  1160. package/dist/domain/domain-runtime/spec/resolve-expression-modules.js +0 -1
  1161. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.d.ts +0 -6
  1162. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.js +0 -1
  1163. package/dist/domain/project-modules/index.d.ts +0 -1
  1164. package/dist/domain/project-modules/index.js +0 -1
  1165. package/dist/domain/project-modules/project-modules.js +0 -1
  1166. package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
  1167. package/dist/phoenix/commands/generate-project-files.js +0 -1
  1168. /package/dist/{domain/core/relation/relation-implementation.js → application-spec/core/expressions/relation-expression-params.js} +0 -0
  1169. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
  1170. /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
  1171. /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { I18n } from '@lingui/core';
2
- import type { Localizable } from '@salsita-ai/common/utils';
2
+ import { type Localizable } from '@salsita-ai/common/utils';
3
3
  import type { StateEmission } from '../emission/index.js';
4
4
  import type { $DomainEntity, DomainEntity, EntityId } from '../model/index.js';
5
5
  /**
@@ -66,7 +66,55 @@ export declare const ViolationSchema: {
66
66
  readonly enum: ("fatal" | "fixable" | "notice" | "warning")[];
67
67
  };
68
68
  readonly message: {
69
- readonly type: 'string';
69
+ readonly anyOf: [{
70
+ readonly type: 'string';
71
+ }, {
72
+ readonly type: 'object';
73
+ readonly properties: {
74
+ readonly id: {
75
+ readonly type: 'string';
76
+ };
77
+ readonly comment: {
78
+ readonly type: 'string';
79
+ };
80
+ readonly message: {
81
+ readonly type: 'string';
82
+ };
83
+ readonly values: {
84
+ readonly type: 'object';
85
+ readonly additionalProperties: true;
86
+ };
87
+ };
88
+ readonly required: ["id"];
89
+ readonly additionalProperties: false;
90
+ readonly import: [{
91
+ readonly module: '@lingui/core';
92
+ readonly member: 'MessageDescriptor';
93
+ }];
94
+ readonly tsType: 'MessageDescriptor';
95
+ }, {
96
+ readonly import: [{
97
+ readonly module: '@salsita-ai/sdk/common/utils';
98
+ readonly member: 'MultilingualString';
99
+ }];
100
+ readonly tsType: 'MultilingualString';
101
+ readonly type: 'object';
102
+ readonly properties: {
103
+ readonly $lang: {
104
+ readonly type: 'object';
105
+ readonly additionalProperties: {
106
+ readonly type: 'string';
107
+ };
108
+ };
109
+ };
110
+ readonly required: ["$lang"];
111
+ readonly additionalProperties: false;
112
+ }];
113
+ readonly tsType: 'Localizable';
114
+ readonly import: [{
115
+ readonly module: '@salsita-ai/sdk/common/utils';
116
+ readonly member: 'Localizable';
117
+ }];
70
118
  };
71
119
  readonly controlViolationPriority: {
72
120
  readonly type: 'number';
@@ -1 +1 @@
1
- let e=["fatal","fixable","warning","notice"];export const compareSeverity=(t,i)=>e.indexOf(t)-e.indexOf(i);export const ViolationSchema={type:"object",properties:{type:{type:"string"},severity:{enum:e.slice()},message:{type:"string"},controlViolationPriority:{type:"number"}},required:["type","severity"],additionalProperties:!1};
1
+ import{MessageDescriptorSchema as e,MultilingualStringSchema as t}from"@salsita-ai/common/utils";let i=["fatal","fixable","warning","notice"];export const compareSeverity=(e,t)=>i.indexOf(e)-i.indexOf(t);export const ViolationSchema={type:"object",properties:{type:{type:"string"},severity:{enum:i.slice()},message:{anyOf:[{type:"string"},e,t],tsType:"Localizable",import:[{module:"@salsita-ai/sdk/common/utils",member:"Localizable"}]},controlViolationPriority:{type:"number"}},required:["type","severity"],additionalProperties:!1};
@@ -25,7 +25,7 @@ export declare const VirtualEntityIdSchema: {
25
25
  };
26
26
  export declare const createVirtualEntityId: (name: string) => VirtualEntityId;
27
27
  export declare const isVirtualEntityId: (value: EntityId<any>) => value is VirtualEntityId;
28
- export type DomainEntityId<TYPE extends string> = `${TYPE}-${number}` & {
28
+ export type DomainEntityId<TYPE extends string = string> = `${TYPE}-${number}` & {
29
29
  __brand: TYPE;
30
30
  };
31
31
  /**
@@ -1,55 +1,23 @@
1
- import type { OmitEmpty, OmitNever, UnionToIntersection } from '@salsita-ai/common/utils';
2
- import { type AliasMap, type DomainEntity, type DomainEntityId, type DomainEntityReflection, type EntityByType, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../model/index.js';
3
- export type EntityDefaults<ENTITY extends DomainEntity<string>> = {
4
- [K in Exclude<keyof ENTITY, 'id' | 'type'>]: ENTITY[K] extends DomainEntityId<any> ? null : ENTITY[K];
5
- };
1
+ import { type AnyAliasMap, type DomainEntity, type DomainEntityReflection, type EntityByType } from '../model/index.js';
2
+ /** The entity a recipe yields: a whole entity, which the recipe system gives a new id when it cooks the recipe. */
6
3
  export type EntityRecipe<ENTITY extends DomainEntity<string>> = ENTITY;
4
+ /** What a project passes to its recipe factory: the entity type, and the properties that differ from the defaults. */
7
5
  export type EntityOverrides<ENTITIES extends DomainEntity<string>, TYPE extends ENTITIES['type']> = Partial<Omit<EntityByType<ENTITIES, TYPE>, 'type'>> & {
8
6
  type: TYPE;
9
7
  };
10
- export type DeclaredEntitiesDefaults<ENTITIES extends DomainEntity<string>> = {
11
- [K in ENTITIES['type']]: EntityDefaults<EntityByType<ENTITIES, K>>;
12
- };
13
- type ExpandDefaults<ENTITIES extends DomainEntity<string>, ALIASES extends Readonly<Record<string, ENTITIES>>, ALIASED_DEFAULTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, unknown>>>> = {
14
- [K in ENTITIES['type']]: ExtractFromAliasedRecord<ENTITIES, ALIASES, ALIASED_DEFAULTS, EventualAlias<ENTITIES, ALIASES, K> | K> extends infer DEFAULTS_FROM_ALIAS ? [
15
- DEFAULTS_FROM_ALIAS
16
- ] extends [never] ? Record<never, never> : unknown extends UnionToIntersection<DEFAULTS_FROM_ALIAS> ? never : UnionToIntersection<DEFAULTS_FROM_ALIAS> : never;
17
- };
18
- export type AliasedEntitiesDefaults<ENTITIES extends DomainEntity<string>, ALIASES extends Readonly<Record<string, ENTITIES>>> = {
19
- [K in TypeOrAlias<ENTITIES, ALIASES>]?: Partial<EntityDefaults<ExpandAlias<ENTITIES, ALIASES, K>>>;
20
- };
8
+ /** The function a project creates recipes with, `phx.domain.createRecipe`. */
21
9
  export type RecipeFactory<ENTITIES extends DomainEntity<string>> = <TYPE extends ENTITIES['type']>(overrides: EntityOverrides<ENTITIES, TYPE>) => EntityRecipe<EntityByType<ENTITIES, TYPE>>;
22
- type ConflictingDefaults<PROVIDED extends Record<string, Record<string, unknown>>, EXPECTED extends Record<string, Record<string, unknown>>> = OmitEmpty<OmitNever<{
23
- [TYPE in keyof PROVIDED | keyof EXPECTED]: TYPE extends keyof EXPECTED ? TYPE extends keyof PROVIDED ? PROVIDED[TYPE] extends EXPECTED[TYPE] ? never : OmitNever<Exclude<EXPECTED[TYPE], PROVIDED[TYPE]>> : EXPECTED[TYPE] : never;
24
- }>>;
25
- type Build<ENTITIES extends DomainEntity<string>, PROVIDED extends Record<string, Record<string, unknown>>, EXPECTED extends Record<string, Record<string, unknown>>> = Record<string, never> extends ConflictingDefaults<PROVIDED, EXPECTED> ? {
26
- build: () => RecipeFactory<ENTITIES>;
27
- } : {
28
- /**
29
- * DO NOT USE in runtime!
30
- *
31
- * This is just a dev-time tool to review which defaults you forgot to provide.
32
- * Use your IDEs code-completion to see which entities have missing expressions
33
- * and which expressions these are.
34
- *
35
- * Use the helper when you see the following error on the `.build()` method call:
36
- * ```
37
- * TS2349: This expression is not callable.
38
- * Type never has no call signatures.
39
- * ```
40
- * simply
41
- * ```ts
42
- * .withDefaults({...})
43
- * ._conflicts.Oven. // <- trigger code-completion here
44
- * ```
45
- */
46
- _conflicts: ConflictingDefaults<PROVIDED, EXPECTED>;
47
- };
48
- export declare const RecipeFactoryBuilder: {
49
- forAliases: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => {
50
- forEntities: (entityReflections: ReadonlyArray<ENTITIES extends any ? DomainEntityReflection<ENTITIES> : never>) => {
51
- withDefaults: <ALIASED_DEFAULTS extends AliasedEntitiesDefaults<ENTITIES, ALIASES>>(entitiesDefaults: ALIASED_DEFAULTS) => Build<ENTITIES, ExpandDefaults<ENTITIES, ALIASES, ALIASED_DEFAULTS>, DeclaredEntitiesDefaults<ENTITIES>>;
52
- };
53
- };
54
- };
55
- export {};
10
+ /**
11
+ * Creates the recipe factory of a domain from the `defaults` of its spec.
12
+ *
13
+ * Defaults declared for an alias apply to every entity type of the alias, and a later key overrides
14
+ * an earlier one. The defaults of an entity type must be a whole entity of that type: they are
15
+ * validated here against the entity's schema, so a domain with invalid defaults fails when its
16
+ * module loads. An entity type without defaults is not checked.
17
+ *
18
+ * `ENTITIES` is the only type the result depends on, and no argument determines it, so the caller
19
+ * states it.
20
+ *
21
+ * @param defaults Property values by entity type or alias.
22
+ */
23
+ export declare const createRecipeFactory: <ENTITIES extends DomainEntity<string>>(aliasMap: AnyAliasMap, entityReflections: ReadonlyArray<ENTITIES extends unknown ? DomainEntityReflection<ENTITIES> : never>, defaults: Readonly<Record<string, Readonly<Record<string, unknown>>>>) => RecipeFactory<ENTITIES>;
@@ -1 +1 @@
1
- import{_unsafeBuildDomainEntityId as e,expandAlias as r}from"../model/index.js";export const RecipeFactoryBuilder={forAliases:t=>({forEntities:o=>({withDefaults:i=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(e=>{a[e]={...a[e],...o}})});let n=new Map(o.map(e=>[e.type,e._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=n.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),{build:()=>r=>({id:e(r.type,1),...a[r.type],...r})}}})})};
1
+ import{_unsafeBuildDomainEntityId as e,expandAlias as r}from"../model/index.js";export const createRecipeFactory=(t,o,i)=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(e=>{a[e]={...a[e],...o}})});let n=new Map(o.map(e=>[e.type,e._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=n.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),r=>({id:e(r.type,1),...a[r.type],...r})};
@@ -1,32 +1,19 @@
1
1
  import type { ExpressionMeta } from '../expression/index.js';
2
- import { type AliasMap, type DomainEntity, type DomainEntityId, type TypeOrAlias } from '../model/index.js';
2
+ import { type AnyAliasMap, type DomainEntity, type DomainEntityId } from '../model/index.js';
3
3
  import type { DomainState } from '../state/index.js';
4
- interface AllOfType0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
4
+ /** A relation whose related entities are all entities of the target type or alias. */
5
+ export interface AllOfTypeRelation {
5
6
  kind: 'allOfType';
6
- target: TARGET;
7
- cardinality: '0-1';
7
+ target: string;
8
+ cardinality: '0-1' | '1-1' | '0-N' | '1-N';
8
9
  meta?: ExpressionMeta;
9
10
  }
10
- interface AllOfType1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
11
- kind: 'allOfType';
12
- target: TARGET;
13
- cardinality: '1-1';
14
- meta?: ExpressionMeta;
15
- }
16
- interface AllOfTypeNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
17
- kind: 'allOfType';
18
- target: TARGET;
19
- cardinality: '0-N' | '1-N';
20
- meta?: ExpressionMeta;
21
- }
22
- export type AllOfTypeRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = AllOfType0Relation<ENTITIES, ALIASES, TARGET> | AllOfType1Relation<ENTITIES, ALIASES, TARGET> | AllOfTypeNRelation<ENTITIES, ALIASES, TARGET>;
23
11
  /**
24
12
  * Resolves `allOfType` relations from a per-state index. Relations targeting the same set of types
25
13
  * share one bucket; the first resolution on a state walks the entities once to fill every bucket,
26
14
  * and every later resolution on that state is a lookup. Registration closes once the first state
27
15
  * has been indexed, so a bucket can never be missing from an index that was already built.
28
16
  */
29
- export declare const createAllOfTypeRelation: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => (relation: {
30
- readonly target: TypeOrAlias<ENTITIES, ALIASES>;
31
- }) => (_selfId: DomainEntityId<string>, state: DomainState<ENTITIES>) => DomainEntityId<string>[];
32
- export {};
17
+ export declare const createAllOfTypeRelation: (aliasMap: AnyAliasMap) => (relation: {
18
+ readonly target: string;
19
+ }) => (_selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>) => DomainEntityId<string>[];
@@ -1 +1 @@
1
- import{expandAlias as e}from"../model/index.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${String(o.target)} after evaluation started. Create all relation expressions before evaluating the domain state.`);let i=new Set(e(t,o.target)),l=[...i].sort().join("|");return r.set(l,i),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(l)}};
1
+ import{expandAlias as e}from"../model/index.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${o.target} after evaluation started. Create all relation expressions before evaluating the domain state.`);let l=new Set(e(t,o.target)),i=[...l].sort().join("|");return r.set(i,l),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(i)}};
@@ -1,28 +1,17 @@
1
+ import type { AnyDomain } from '../domain.js';
1
2
  import type { ExpressionMeta } from '../expression/index.js';
2
- import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
3
- import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
4
- import type { RelationImplementation } from './relation-implementation.js';
5
- interface DirectArrayRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
3
+ import type { DomainEntity, DomainEntityId } from '../model/index.js';
4
+ import type { DomainState } from '../state/index.js';
5
+ /**
6
+ * A relation whose related entities are the ones a field of the entity itself references. The
7
+ * application-spec parser checks that `field` is a reference field of the entity that fits the
8
+ * target and the cardinality.
9
+ */
10
+ export interface DirectRelation {
6
11
  kind: 'direct';
7
- target: TARGET;
8
- field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>>;
9
- cardinality: '0-N' | '1-N';
12
+ target: string;
13
+ field: string;
14
+ cardinality: '0-1' | '1-1' | '0-N' | '1-N';
10
15
  meta?: ExpressionMeta;
11
16
  }
12
- interface DirectSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
13
- kind: 'direct';
14
- target: TARGET;
15
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>, never>;
16
- cardinality: '1-1';
17
- meta?: ExpressionMeta;
18
- }
19
- interface DirectSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
20
- kind: 'direct';
21
- target: TARGET;
22
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>, null>;
23
- cardinality: '0-1';
24
- meta?: ExpressionMeta;
25
- }
26
- export type DirectRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = DirectArrayRelation<ENTITIES, ALIASES, SELF, TARGET> | DirectSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | DirectSingle0Relation<ENTITIES, ALIASES, SELF, TARGET>;
27
- export declare const directRelation: RelationImplementation<'direct'>;
28
- export {};
17
+ export declare const directRelation: (relation: DirectRelation) => (selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>, domain: AnyDomain) => Array<DomainEntityId<string>>;
@@ -6,4 +6,3 @@ export * from './indirect-relation.js';
6
6
  export * from './reference-component.js';
7
7
  export type * from './reference-field.js';
8
8
  export * from './relation-factory.js';
9
- export type * from './relation-implementation.js';
@@ -1,71 +1,17 @@
1
1
  import type { ExpressionMeta } from '../expression/index.js';
2
- import { type AliasMap, type DomainEntity, type DomainEntityId, type ExpandAlias, type TypeOrAlias } from '../model/index.js';
2
+ import { type AnyAliasMap, type DomainEntity, type DomainEntityId } from '../model/index.js';
3
3
  import type { DomainState } from '../state/index.js';
4
- import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
5
- interface IndirectNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
6
- kind: 'indirect';
7
- target: TARGET;
8
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
9
- cardinality: '0-1';
10
- meta?: ExpressionMeta;
11
- }
12
- interface IndirectNonNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
13
- kind: 'indirect';
14
- target: TARGET;
15
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
16
- cardinality: '0-1';
17
- meta?: ExpressionMeta;
18
- }
19
- interface IndirectNullableSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
20
- kind: 'indirect';
21
- target: TARGET;
22
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
23
- cardinality: '1-1';
24
- meta?: ExpressionMeta;
25
- }
26
- interface IndirectNonNullableSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
27
- kind: 'indirect';
28
- target: TARGET;
29
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
30
- cardinality: '1-1';
31
- meta?: ExpressionMeta;
32
- }
33
- interface IndirectSingleNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
34
- kind: 'indirect';
35
- target: TARGET;
36
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
37
- cardinality: '0-N' | '1-N';
38
- meta?: ExpressionMeta;
39
- }
40
- interface IndirectNullableSingleNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
41
- kind: 'indirect';
42
- target: TARGET;
43
- field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
44
- cardinality: '0-N' | '1-N';
45
- meta?: ExpressionMeta;
46
- }
47
- interface IndirectArray0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
48
- kind: 'indirect';
49
- target: TARGET;
50
- field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
51
- cardinality: '0-1';
52
- meta?: ExpressionMeta;
53
- }
54
- interface IndirectArray1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
55
- kind: 'indirect';
56
- target: TARGET;
57
- field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
58
- cardinality: '1-1';
59
- meta?: ExpressionMeta;
60
- }
61
- interface IndirectArrayNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
4
+ /**
5
+ * A relation whose related entities are the ones that reference the entity in their `field`. The
6
+ * application-spec parser checks that `field` is a reference field of the target that points back.
7
+ */
8
+ export interface IndirectRelation {
62
9
  kind: 'indirect';
63
- target: TARGET;
64
- field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
65
- cardinality: '0-N' | '1-N';
10
+ target: string;
11
+ field: string;
12
+ cardinality: '0-1' | '1-1' | '0-N' | '1-N';
66
13
  meta?: ExpressionMeta;
67
14
  }
68
- export type IndirectRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = IndirectArray1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectArray0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectArrayNRelation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingle0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNonNullableSingle0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNonNullableSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectSingleNRelation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingleNRelation<ENTITIES, ALIASES, SELF, TARGET>;
69
15
  /**
70
16
  * Resolves `indirect` relations from a per-state reverse-reference index. Relations reading the
71
17
  * same field on the same set of target types share one index mapping each referenced id to the
@@ -73,8 +19,7 @@ export type IndirectRelation<ENTITIES extends DomainEntity<string>, ALIASES exte
73
19
  * every index, and every later resolution on that state is a lookup. Registration closes once the
74
20
  * first state has been indexed, so an index can never be missing from a state already walked.
75
21
  */
76
- export declare const createIndirectRelation: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => (relation: {
77
- readonly target: TypeOrAlias<ENTITIES, ALIASES>;
22
+ export declare const createIndirectRelation: (aliasMap: AnyAliasMap) => (relation: {
23
+ readonly target: string;
78
24
  readonly field: string;
79
- }) => (sourceId: DomainEntityId<string>, state: DomainState<ENTITIES>) => DomainEntityId<string>[];
80
- export {};
25
+ }) => (sourceId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>) => DomainEntityId<string>[];
@@ -1 +1 @@
1
- import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../model/index.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let n=new Map,o=new WeakMap,a=!1;return l=>{if(a)throw Error(`Cannot register indirect relation ${String(l.target)}#${l.field} after evaluation started. Create all relation expressions before evaluating the domain state.`);let s=new Set(t(i,l.target)),f=`${l.field}|${[...s].sort().join("|")}`;return n.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=o.get(t);if(i)return i;a=!0;let l=new Map([...n.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:o,targetTypes:a}]of n){if(!a.has(i.type))continue;let n=i[o],s=e(n)?new Set(n.filter(r)):r(n)?[n]:[],f=l.get(t);for(let e of s){let t=f.get(e);t||(t=[],f.set(e,t)),t.push(i.id)}}return o.set(t,l),l})(i).get(f).get(t)??[]}};
1
+ import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../model/index.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let n=new Map,o=new WeakMap,a=!1;return l=>{if(a)throw Error(`Cannot register indirect relation ${l.target}#${l.field} after evaluation started. Create all relation expressions before evaluating the domain state.`);let s=new Set(t(i,l.target)),f=`${l.field}|${[...s].sort().join("|")}`;return n.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=o.get(t);if(i)return i;a=!0;let l=new Map([...n.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:o,targetTypes:a}]of n){if(!a.has(i.type))continue;let n=i[o],s=e(n)?new Set(n.filter(r)):r(n)?[n]:[],f=l.get(t);for(let e of s){let t=f.get(e);t||(t=[],f.set(e,t)),t.push(i.id)}}return o.set(t,l),l})(i).get(f).get(t)??[]}};
@@ -1,18 +1,22 @@
1
1
  import type { AnonymousExpression } from '../expression/index.js';
2
- import type { $DomainEntity, AliasMap, DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
2
+ import { type $DomainEntity, type AnyAliasMap, type DomainEntity } from '../model/index.js';
3
3
  import { type AllOfTypeRelation } from './all-of-type-relation.js';
4
- import type { DirectRelation } from './direct-relation.js';
4
+ import { type DirectRelation } from './direct-relation.js';
5
5
  import { type IndirectRelation } from './indirect-relation.js';
6
- export type Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = DirectRelation<ENTITIES, ALIASES, SELF, TARGET> | AllOfTypeRelation<ENTITIES, ALIASES, TARGET> | IndirectRelation<ENTITIES, ALIASES, SELF, TARGET>;
7
- export interface RelationFactory<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>> {
8
- <SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
9
- cardinality: '0-1';
10
- }>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, $MAP[TARGET] | null>;
11
- <SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
12
- cardinality: '1-1';
13
- }>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, $MAP[TARGET]>;
14
- <SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
15
- cardinality: '0-N' | '1-N';
16
- }>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, ReadonlyArray<$MAP[TARGET]>>;
17
- }
18
- export declare const createRelationFactory: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => RelationFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES>;
6
+ /** A relation as a spec declares it: where the related entities are found and how many there may be. */
7
+ export type Relation = DirectRelation | AllOfTypeRelation | IndirectRelation;
8
+ type RelatedEntity = $DomainEntity<DomainEntity<string>>;
9
+ /**
10
+ * The expression of a relation as a domain takes it. The entity and data types are erased, so that
11
+ * the domain of any project accepts it: an expression typed with the base entity type is not
12
+ * assignable to one typed with a project's entities. The type a project reads from a relation is
13
+ * the one its generated model declares for the relation's property.
14
+ */
15
+ type RelationExpression = AnonymousExpression<any, any, any, any, any, any, RelatedEntity | null | ReadonlyArray<RelatedEntity>>;
16
+ /**
17
+ * Makes the expression of one relation: it collects the related entities of an entity and returns
18
+ * them as the cardinality says, one entity, one entity or `null`, or an array.
19
+ */
20
+ export type RelationFactory = (relation: Relation) => RelationExpression;
21
+ export declare const createRelationFactory: (aliasMap: AnyAliasMap) => RelationFactory;
22
+ export {};
@@ -1 +1 @@
1
- import{match as t}from"ts-pattern";import{createAllOfTypeRelation as e}from"./all-of-type-relation.js";import{directRelation as r}from"./direct-relation.js";import{createIndirectRelation as i}from"./indirect-relation.js";export const createRelationFactory=n=>{let a=e(n),o=i(n);return e=>{let i=t(e).with({kind:"direct"},t=>r(t,n)).with({kind:"indirect"},t=>o(t)).with({kind:"allOfType"},t=>a(t)).exhaustive(),l=t(e).with({cardinality:"0-1"},()=>t=>{if(t.length>1)throw Error(`Expected at most one entity, but got ${t.length}`);return t.length>0?t[0]:null}).with({cardinality:"1-1"},()=>t=>{if(1!==t.length)throw Error(`Expected exactly one entity, but got ${t.length}`);return t[0]}).with({cardinality:"0-N"},()=>t=>t).with({cardinality:"1-N"},()=>t=>{if(0===t.length)throw Error("Expected at least one entity, but got none");return t}).exhaustive();return{meta:{alwaysEvaluate:!0,...e.meta},evaluate:(t,r,a)=>{let o=i(t,r,a.domain),d=a.domain.get$Entities(o,r);if(!d.every(t=>e.target in n?n[e.target].includes(t.type):t.type===e.target)){let t=d.map(t=>t.type).filter(t=>e.target in n?n[e.target].includes(t):t===e.target);throw Error(`Expected ${e.target} entities, but got ${t.join(", ")}`)}return l(d)}}}};
1
+ import{match as t}from"ts-pattern";import{expandAlias as e}from"../model/index.js";import{createAllOfTypeRelation as r}from"./all-of-type-relation.js";import{directRelation as i}from"./direct-relation.js";import{createIndirectRelation as n}from"./indirect-relation.js";export const createRelationFactory=o=>{let a=r(o),l=n(o);return r=>{let n=t(r).with({kind:"direct"},t=>i(t)).with({kind:"indirect"},t=>l(t)).with({kind:"allOfType"},t=>a(t)).exhaustive(),d=t(r).with({cardinality:"0-1"},()=>t=>{if(t.length>1)throw Error(`Expected at most one entity, but got ${t.length}`);return t[0]??null}).with({cardinality:"1-1"},()=>t=>{let[e,...r]=t;if(void 0===e||r.length>0)throw Error(`Expected exactly one entity, but got ${t.length}`);return e}).with({cardinality:"0-N"},()=>t=>t).with({cardinality:"1-N"},()=>t=>{if(0===t.length)throw Error("Expected at least one entity, but got none");return t}).exhaustive(),c=e(o,r.target);return{meta:{alwaysEvaluate:!0,...r.meta},evaluate:(t,e,i)=>{let o=n(t,e,i.domain),a=i.domain.get$Entities(o,e);if(!a.every(t=>c.includes(t.type))){let t=a.map(t=>t.type).filter(t=>!c.includes(t));throw Error(`Expected ${r.target} entities, but got ${t.join(", ")}`)}return d(a)}}}};
@@ -1 +1 @@
1
- import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=t();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
1
+ import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";export const getExtendedSchemaValidator=()=>{let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a():e();return t.addKeyword("tsType"),t.addKeyword("import"),t.addKeyword("declared"),t};export const extendedSchemaValidator=getExtendedSchemaValidator();
@@ -48,51 +48,20 @@ export type MigrateFunction<LATEST_ENTITIES extends DomainEntity<string>> = (ver
48
48
  state: ReadonlyArray<DomainEntity<string>>;
49
49
  }, options: MigrateFunctionOptions) => readonly LATEST_ENTITIES[];
50
50
  /**
51
- * Builder for the state migration function.
51
+ * Creates the function that migrates a state of any registered version of the model to the latest
52
+ * one. The state is validated against the reflections of its own version, and again after every
53
+ * migration against the reflections of the version that migration yields.
54
+ *
55
+ * @param modelVersions the entity reflections of every version of the model, keyed by version
56
+ * @param latestVersion the version the state is migrated to
57
+ * @param migrations the migration to each version above the first: the one under key `n` takes a
58
+ * state of version `n - 1` to version `n`
52
59
  * @example
53
-
54
- export const migrateState = MigrateFunctionBuilder
55
-
56
- // the reflections are used for validation and sanitization
57
- .fromVersions({
58
- 1: v1Reflections,
59
- 2: v2Reflections,
60
- 3: v3Reflections,
61
- })
62
-
63
- // the latest version of the model
64
- .to(2)
65
-
66
- // the migrations between the versions
67
- .using({
68
- 2: migrationToV2,
69
- 3: migrationToV3,
70
- })
71
-
72
- .build()
73
-
60
+ * export const migrate = createMigrateFunction(
61
+ * { 1: v1Reflections, 2: v2Reflections, 3: v3Reflections },
62
+ * 3,
63
+ * { 2: migrationToV2, 3: migrationToV3 }
64
+ * )
74
65
  */
75
- export declare const MigrateFunctionBuilder: {
76
- /**
77
- * Provide the entity reflections for all versions of the model.
78
- */
79
- fromVersions: <VERSIONS extends Record<number, EntityReflections<any>>>(modelVersions: VERSIONS) => {
80
- /**
81
- * Specify the latest version of the model. I.e. the version to which the state will be migrated.
82
- */
83
- to: <LATEST extends keyof VERSIONS & number>(latestVersion: LATEST) => {
84
- /**
85
- * Provide the migrations between each consecutive version of the model.
86
- *
87
- * Migration with index `i` should migrate the state from version `i - 1` to version `i`.
88
- */
89
- using: (migrations: Record<Exclude<keyof VERSIONS, 1>, Migration<any, any>>) => {
90
- /**
91
- * Finally, build the migration function.
92
- */
93
- build: () => MigrateFunction<EntitiesOfReflections<VERSIONS[LATEST]>>;
94
- };
95
- };
96
- };
97
- };
66
+ export declare const createMigrateFunction: <VERSIONS extends Record<number, EntityReflections<any>>, LATEST extends keyof VERSIONS & number>(modelVersions: VERSIONS, latestVersion: LATEST, migrations: Record<Exclude<keyof VERSIONS, 1>, Migration<any, any>>) => MigrateFunction<EntitiesOfReflections<VERSIONS[LATEST]>>;
98
67
  export {};
@@ -1 +1 @@
1
- import e from"lodash-es/pick.js";export class StateMigrationError extends Error{constructor(e){super(e),this.name="StateMigrationError"}}export const isStateMigrationError=e=>e instanceof StateMigrationError;let t=(t,r,i,o)=>t.map(t=>{let n=r[t.type];if(!n)throw new StateMigrationError(`Unknown entity type "${t.type}". The state contains an entity whose type is not registered in the domain model for this version. Fix: register the entity type in the domain spec, or remove/migrate the stale entity from the preset or configuration data.`);if(n._meta.validator(t))return t;if(i){let r=e(t,Object.keys(n._meta.schema.properties));if(n._meta.validator(t))return o?.error(`Entity ${t.type}#${t.id} had extra fields that had to be trimmed: ${Object.keys(r)}`),r}throw new StateMigrationError(`Entity "${t.type}#${t.id}" does not match its schema in the current domain model. Validation errors: ${JSON.stringify(n._meta.validator.errors)}. Fix: update the entity data to match the schema, add a migration that transforms older data into the current shape, or re-register the schema if it changed.`)});export const MigrateFunctionBuilder={fromVersions:e=>({to:r=>({using:i=>({build:()=>(o,{logger:n,trimExtraProperties:a})=>{let s=e[o.version];if(!s)throw new StateMigrationError(`Unknown model version ${o.version}. The state declares a version that has no registered reflections. Fix: register the version in MigrateFunctionBuilder.fromVersions({ ... }), or correct the version stored on the state.`);let d=t(o.state,s,a,n);o.version===r?n?.debug(`State is already in the latest version ${r}`):n?.debug(`Migrating state from version ${o.version} to ${r}`);for(let s=o.version;s<r;s++){n?.debug(`Applying intermediate migration to version ${s+1}`);let h=e[s+1];if(!h)throw new StateMigrationError(`Unknown model version ${s+1} while migrating from ${o.version} to ${r}. An intermediate version has no registered reflections. Fix: register version ${s+1} in MigrateFunctionBuilder.fromVersions({ ... }).`);let g=i[s+1];if(!g)throw new StateMigrationError(`Missing migration from version ${s} to ${s+1}. No migration is registered for this step while migrating to ${r}. Fix: add the migration in MigrateFunctionBuilder.using({ ${s+1}: ... }).`);d=t(g(d),h,a,n)}if(!e[o.version])throw new StateMigrationError(`Unknown model version ${o.version}. The state declares a version that has no registered reflections. Fix: register the version in MigrateFunctionBuilder.fromVersions({ ... }), or correct the version stored on the state.`);return d}})})})};
1
+ import t from"lodash-es/pick.js";export class StateMigrationError extends Error{constructor(t){super(t),this.name="StateMigrationError"}}export const isStateMigrationError=t=>t instanceof StateMigrationError;let e=(e,r,i,o)=>e.map(e=>{let n=r[e.type];if(!n)throw new StateMigrationError(`Unknown entity type "${e.type}". The state contains an entity whose type is not registered in the domain model for this version. Fix: register the entity type in the domain spec, or remove/migrate the stale entity from the preset or configuration data.`);if(n._meta.validator(e))return e;if(i){let r=t(e,Object.keys(n._meta.schema.properties));if(n._meta.validator(e))return o?.error(`Entity ${e.type}#${e.id} had extra fields that had to be trimmed: ${Object.keys(r)}`),r}throw new StateMigrationError(`Entity "${e.type}#${e.id}" does not match its schema in the current domain model. Validation errors: ${JSON.stringify(n._meta.validator.errors)}. Fix: update the entity data to match the schema, add a migration that transforms older data into the current shape, or re-register the schema if it changed.`)});export const createMigrateFunction=(t,r,i)=>(o,{logger:n,trimExtraProperties:a})=>{let s=t[o.version];if(!s)throw new StateMigrationError(`Unknown model version ${o.version}. The state declares a version that has no registered reflections. Fix: register the version in the model versions passed to createMigrateFunction, or correct the version stored on the state.`);let d=e(o.state,s,a,n);o.version===r?n?.debug(`State is already in the latest version ${r}`):n?.debug(`Migrating state from version ${o.version} to ${r}`);for(let s=o.version;s<r;s++){n?.debug(`Applying intermediate migration to version ${s+1}`);let h=t[s+1];if(!h)throw new StateMigrationError(`Unknown model version ${s+1} while migrating from ${o.version} to ${r}. An intermediate version has no registered reflections. Fix: register version ${s+1} in the model versions passed to createMigrateFunction.`);let g=i[s+1];if(!g)throw new StateMigrationError(`Missing migration from version ${s} to ${s+1}. No migration is registered for this step while migrating to ${r}. Fix: add the migration under key ${s+1} in the migrations passed to createMigrateFunction.`);d=e(g(d),h,a,n)}return d};
@@ -6,4 +6,4 @@ export interface DomainState<ENTITIES extends DomainEntity<string>> {
6
6
  readonly ephemeralRecords: ReadonlyArray<ComponentSnapshot<SystemComponentTypeConstraint>>;
7
7
  }
8
8
  export type DomainStateFactory<ENTITIES extends DomainEntity<string>> = (entities: readonly ENTITIES[], ephemeralRecords: ReadonlyArray<ComponentSnapshot<SystemComponentTypeConstraint>>, rootEntityType: ENTITIES['type']) => DomainState<ENTITIES>;
9
- export declare const createInitialDomainState: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES>(entities: readonly ENTITIES[], rootEntityType: ALLOWED_ROOT_ENTITIES['type']) => DomainState<ENTITIES>;
9
+ export declare const createInitialDomainState: <ENTITIES extends DomainEntity<string>>(entities: readonly ENTITIES[], rootEntityType: ENTITIES['type']) => DomainState<ENTITIES>;
@@ -1,6 +1,6 @@
1
1
  import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
2
2
  import { type $DomainEntity, type $DomainEntityReflection, type ActionDefinition, type AliasMap, type AliasedExpressions, type AnyActionImplementations, type DomainEntity, DomainFactory, type EntityByType, type EntityReflections, type MigrateFunction, type SchemaOfObject } from './core/index.js';
3
- import type { ProjectModule } from './project-modules/index.js';
3
+ import { type ProjectModule } from './domain-runtime/index.js';
4
4
  type $EntityReflections<ENTITIES extends DomainEntity<string>> = {
5
5
  [TYPE in ENTITIES['type']]: $DomainEntityReflection<$DomainEntity<EntityByType<ENTITIES, TYPE>>>;
6
6
  };
@@ -1 +1 @@
1
- import{DomainFactory as t,MigrateFunctionBuilder as i,expandAlias as e}from"./core/index.js";import{resolveActionModules as s,resolveExpressionModules as n}from"./domain-runtime/index.js";import{withProfilerLabel as a}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;actions;actionImplementations;constructor(t,i,e,s,n,a,o,h,l,r,m,d,p,c){this.entities=t,this.aliasMap=i,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=n,this.modelVersion=a,this.publishedData=o,this.sessionData=h,this.frontendData=l,this.backendData=r,this.migrate=m,this.isAdminDomain=d,this.actions=p,this.actionImplementations=c}static from(t,e,s,n,a,o,h,l,r,m){let d=i.fromVersions({1:t}).to(1).using({}).build();return new DomainBuilder(t,e,s,n,{},a,o,h,l,r,d,m,{},{})}withMigrate(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,t,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressions(t){let i={...this.implemented};return Object.entries(t).forEach(([t,s])=>{e(this.aliasMap,t).forEach(e=>{let n={...i[e]};i[e]=n,Object.entries(s).forEach(([i,s])=>{let o=n[i];if(o)throw Error(`Duplicate expression ${e}.${i}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[i]={...s,evaluate:a(`${e}_${i}`,s.evaluate),origin:{name:i,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,i,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressionModules(t){return n(t,this.aliasMap).reduce((t,i)=>t.withExpressions(i.expressions),this)}withActions(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,Object.fromEntries(t.map(t=>[t.name,t])),this.actionImplementations)}withActionModules(t){return this.withActionImplementations(s(t))}withActionImplementations(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,{...this.actionImplementations,...t})}build=()=>{let e=this.implemented,s=this.migrate??i.fromVersions({1:this.entities}).to(1).using({}).build();return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:e,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain,actions:this.actions,actionImplementations:this.actionImplementations})}}
1
+ import{DomainFactory as t,createMigrateFunction as i,expandAlias as e}from"./core/index.js";import{resolveActionModules as s,resolveExpressionModules as n}from"./domain-runtime/index.js";import{withProfilerLabel as a}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;actions;actionImplementations;constructor(t,i,e,s,n,a,o,h,l,m,r,d,p,c){this.entities=t,this.aliasMap=i,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=n,this.modelVersion=a,this.publishedData=o,this.sessionData=h,this.frontendData=l,this.backendData=m,this.migrate=r,this.isAdminDomain=d,this.actions=p,this.actionImplementations=c}static from(t,e,s,n,a,o,h,l,m,r){let d=i({1:t},1,{});return new DomainBuilder(t,e,s,n,{},a,o,h,l,m,d,r,{},{})}withMigrate(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,t,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressions(t){let i={...this.implemented};return Object.entries(t).forEach(([t,s])=>{e(this.aliasMap,t).forEach(e=>{let n={...i[e]};i[e]=n,Object.entries(s).forEach(([i,s])=>{let o=n[i];if(o)throw Error(`Duplicate expression ${e}.${i}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[i]={...s,evaluate:a(`${e}_${i}`,s.evaluate),origin:{name:i,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,i,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressionModules(t){return n(t,this.aliasMap).reduce((t,i)=>t.withExpressions(i.expressions),this)}withActions(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,Object.fromEntries(t.map(t=>[t.name,t])),this.actionImplementations)}withActionModules(t){return this.withActionImplementations(s(t))}withActionImplementations(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,{...this.actionImplementations,...t})}build=()=>{let e=this.implemented,s=this.migrate??i({1:this.entities},1,{});return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:e,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain,actions:this.actions,actionImplementations:this.actionImplementations})}}
@@ -1,5 +1,5 @@
1
1
  import { type $DomainEntity, type ActionTypes, type DomainEntity, type DomainState, type PreparedAction } from '../../core/index.js';
2
- import type { ActionContext, DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
2
+ import type { ActionContext, DomainContextSelectors } from '../../domain-runtime/index.js';
3
3
  export interface ActionSystemContext {
4
4
  /**
5
5
  * The action system's window into the runtime registry: the declared actions and their
@@ -1 +1 @@
1
- import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as s}from"../../core/index.js";import{getIdSequence as n}from"../store-system/next-domain-entity-id.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,s.compile(t.params)])));_updates=e();constructor(t){this._context=t}createContext=t=>({expressionContext:this._context.selectors.getExpressionContext(),systems:this._context.selectors.getDomainSystems(),getIdSequence:()=>n(t.entities,[]),updates:this._updates});prepareAction=(t,e,n)=>{let o=this._context.selectors.getActionDefinitions(),i=Object.values(o).find(e=>e.name===t);if(!i){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(i.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${s.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._context.selectors.getActionImplementations()).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
1
+ import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as s}from"../../core/index.js";import{getIdSequence as n}from"../store-system/index.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,s.compile(t.params)])));_updates=e();constructor(t){this._context=t}createContext=t=>({expressionContext:this._context.selectors.getExpressionContext(),systems:this._context.selectors.getDomainSystems(),getIdSequence:()=>n(t.entities,[]),updates:this._updates});prepareAction=(t,e,n)=>{let o=this._context.selectors.getActionDefinitions(),i=Object.values(o).find(e=>e.name===t);if(!i){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(i.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${s.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._context.selectors.getActionImplementations()).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
@@ -0,0 +1 @@
1
+ export { ActionSystem, type ActionSystemContext, type AnyActionSystem } from './action-system.js';
@@ -0,0 +1 @@
1
+ export{ActionSystem}from"./action-system.js";
@@ -0,0 +1,2 @@
1
+ export { type AnalyticsEvent, AnalyticsEventFactory, AnalyticsEventType, type DataLoadedEvent, type InitEvent, type NavigationEvent, type SessionAuthenticatedEvent, type SystemEvent, type UserActionEvent, } from './analytics-contracts.js';
2
+ export { type AnalyticsSystem, NoopAnalyticsSystem } from './analytics-system.js';
@@ -0,0 +1 @@
1
+ export{AnalyticsEventFactory,AnalyticsEventType}from"./analytics-contracts.js";export{NoopAnalyticsSystem}from"./analytics-system.js";
@@ -1,5 +1,5 @@
1
1
  import type { $DomainEntity, DomainEntity } from '../core/index.js';
2
2
  import type { DomainContextSystems } from './domain-context-systems.js';
3
- import type { UpdateTransformer } from './store-system/store-system.js';
3
+ import type { UpdateTransformer } from './store-system/index.js';
4
4
  export declare const createTransformer: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>(transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
5
5
  export type TransformerFactory<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> = (transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
@@ -1,7 +1,7 @@
1
1
  import type { DomainEntity, DomainState, EntityViolation } from '../../core/index.js';
2
2
  import { DimensionUnit, type UnitsConfig } from '../../dimensions/index.js';
3
- import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
4
- import { SystemState } from '../store-system/system-state.js';
3
+ import type { DomainContextSelectors } from '../../domain-runtime/index.js';
4
+ import { SystemState } from '../store-system/index.js';
5
5
  import { type DimensionStateComponent } from './dimension-state.js';
6
6
  export type DistanceDimensionViolation = `${string}.distanceDimension.tooLarge` | `${string}.distanceDimension.tooSmall`;
7
7
  export type GenericDimensionViolation = `${string}.genericDimension.tooLarge` | `${string}.genericDimension.tooSmall`;