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

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 (872) hide show
  1. package/README.md +5 -1
  2. package/dist/application/index.d.ts +1 -0
  3. package/dist/application/index.js +1 -1
  4. package/dist/application/mount-application.d.ts +1 -1
  5. package/dist/application/mount-application.js +1 -1
  6. package/dist/application/mount-configurator.d.ts +19 -0
  7. package/dist/application/mount-configurator.js +1 -0
  8. package/dist/application/mounted-application-runtime.d.ts +4 -0
  9. package/dist/application/mounted-application-runtime.js +1 -0
  10. package/dist/application/register-web-component.d.ts +2 -0
  11. package/dist/application/register-web-component.js +1 -0
  12. package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
  13. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  14. package/dist/application-spec/core/index.d.ts +1 -3
  15. package/dist/application-spec/core/index.js +1 -1
  16. package/dist/application-spec/core/json-schema.d.ts +2 -52
  17. package/dist/application-spec/core/markers/index.d.ts +1 -1
  18. package/dist/application-spec/core/markers/index.js +1 -1
  19. package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
  20. package/dist/application-spec/core/markers/msg-marker.js +1 -1
  21. package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
  22. package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
  23. package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
  24. package/dist/application-spec/errors/diagnostic-codes.d.ts +17 -1
  25. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  26. package/dist/application-spec/errors/diagnostic-messages.d.ts +25 -2
  27. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  28. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  29. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  30. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  31. package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
  32. package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
  33. package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
  34. package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
  35. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
  36. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
  37. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
  38. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
  39. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  40. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
  42. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  43. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
  44. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
  45. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  46. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +14 -7
  47. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  48. package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
  49. package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
  50. package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
  51. package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
  52. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
  53. package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
  54. package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
  55. package/dist/application-spec/generate-application/implementations/phx.js +1 -0
  56. package/dist/application-spec/generate-application/index.d.ts +2 -0
  57. package/dist/application-spec/generate-application/index.js +1 -1
  58. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +3 -4
  59. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -4
  60. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  61. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
  62. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
  63. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +17 -4
  64. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  65. package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
  66. package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
  67. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +3 -4
  68. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -5
  69. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  70. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
  71. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
  72. package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
  73. package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
  74. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
  75. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
  76. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
  77. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
  78. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
  79. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
  80. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
  81. package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
  82. package/dist/application-spec/generate-application/runtime/index.js +1 -0
  83. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
  84. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  85. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  86. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
  87. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
  88. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +9 -4
  89. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  90. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
  91. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  92. package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
  93. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
  94. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  95. package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
  96. package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
  97. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +3 -2
  98. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +124 -24
  99. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -1
  100. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
  101. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
  102. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  103. package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
  104. package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
  105. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  106. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
  107. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
  108. package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
  109. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +58 -23
  110. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  111. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
  112. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
  113. package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
  114. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
  115. package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
  116. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
  117. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
  118. package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
  119. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
  120. package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
  121. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
  122. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  123. package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
  124. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
  125. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  126. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
  127. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
  128. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
  129. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  130. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
  131. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  132. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
  133. package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
  134. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
  135. package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
  136. package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
  137. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
  138. package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
  139. package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
  140. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
  141. package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
  142. package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
  143. package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
  144. package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
  145. package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
  146. package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
  147. package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
  148. package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
  149. package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
  150. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
  151. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
  152. package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
  153. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
  154. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
  155. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
  156. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  157. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
  158. package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
  159. package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
  160. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
  161. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
  162. package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
  163. package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
  164. package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
  165. package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
  166. package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
  167. package/dist/client/authorized-client.d.ts +3 -1
  168. package/dist/client/authorized-client.js +1 -1
  169. package/dist/client/contract.d.ts +17 -0
  170. package/dist/client/index.d.ts +1 -1
  171. package/dist/client/local-authorized-client.d.ts +3 -1
  172. package/dist/client/local-authorized-client.js +1 -1
  173. package/dist/client/memory-authorized-client.d.ts +4 -1
  174. package/dist/client/memory-authorized-client.js +1 -1
  175. package/dist/client/phoenix-api.d.ts +240 -1
  176. package/dist/configurator/ConfiguratorApp.js +1 -1
  177. package/dist/configurator/app-loader-content/index.d.ts +0 -1
  178. package/dist/configurator/app-loader-content/index.js +1 -1
  179. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  180. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +17 -3
  181. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  182. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -9
  183. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  184. package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
  185. package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
  186. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
  187. package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
  188. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
  189. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  190. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +82 -55
  191. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  192. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +66 -4
  193. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  194. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
  195. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
  196. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
  197. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  198. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  199. package/dist/configurator/common/configurator-interface.d.ts +9 -6
  200. package/dist/configurator/common/configurator-interface.js +1 -1
  201. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
  202. package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
  203. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +0 -6
  204. package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -1
  205. package/dist/configurator/configuration-not-found-page/index.d.ts +2 -2
  206. package/dist/configurator/configuration-not-found-page/index.js +1 -1
  207. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +3 -3
  208. package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -1
  209. package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
  210. package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
  211. package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
  212. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
  213. package/dist/configurator/configurator-context/index.d.ts +0 -5
  214. package/dist/configurator/configurator-context/index.js +1 -1
  215. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +3 -3
  216. package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -1
  217. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +0 -5
  218. package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -1
  219. package/dist/configurator/configurator-error-page/index.d.ts +1 -2
  220. package/dist/configurator/configurator-error-page/index.js +1 -1
  221. package/dist/configurator/index.d.ts +9 -2
  222. package/dist/configurator/index.js +1 -1
  223. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  224. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  225. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  226. package/dist/configurator/pages/default-configurator-elements.js +1 -1
  227. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  228. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  229. package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
  230. package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
  231. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  232. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  233. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -2
  234. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
  235. package/dist/configurator/ui/assistant/form/form-model.d.ts +1 -3
  236. package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
  237. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  238. package/dist/configurator/ui/assistant/form/index.js +1 -1
  239. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +1 -1
  240. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  241. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
  242. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
  243. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
  244. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
  245. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
  246. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
  247. package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
  248. package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
  249. package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +1 -1
  250. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
  251. package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
  252. package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
  253. package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
  254. package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
  255. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +1 -1
  256. package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -1
  257. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +1 -1
  258. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  259. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +1 -1
  260. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -1
  261. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +5 -5
  262. package/dist/configurator/ui/assistant/index.d.ts +3 -0
  263. package/dist/configurator/ui/assistant/index.js +1 -1
  264. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
  265. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
  266. package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
  267. package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
  268. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +22 -0
  269. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
  270. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  271. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  272. package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
  273. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  274. package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
  275. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  276. package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
  277. package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
  278. package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
  279. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  280. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
  281. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
  282. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  283. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  284. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  285. package/dist/configurator/ui/index.d.ts +1 -0
  286. package/dist/configurator/ui/index.js +1 -1
  287. package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
  288. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  289. package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
  290. package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
  291. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  292. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  293. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  294. package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
  295. package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
  296. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
  297. package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -2
  298. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  299. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  300. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
  301. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  302. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
  303. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  304. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  305. package/dist/configurator/ui/preset-layout/PresetUi.d.ts +0 -2
  306. package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
  307. package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
  308. package/dist/configurator/ui/preset-layout/index.js +1 -1
  309. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  310. package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
  311. package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
  312. package/dist/docs/index.json +95 -1
  313. package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
  314. package/dist/docs/layouts/custom-layout.mdx +318 -158
  315. package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
  316. package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
  317. package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
  318. package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
  319. package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
  320. package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
  321. package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
  322. package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
  323. package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
  324. package/dist/docs/phoenix/configurator-interface.mdx +9 -7
  325. package/dist/docs/phoenix/domain-model.mdx +4 -1
  326. package/dist/docs/phoenix/layout-slots.mdx +21 -0
  327. package/dist/docs/phoenix/phoenix-cli.mdx +40 -7
  328. package/dist/docs/phoenix/project-structure.mdx +21 -17
  329. package/dist/docs/phoenix/sdk-builder-workflow.mdx +6 -4
  330. package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
  331. package/dist/docs/phoenix/webhooks.mdx +5 -1
  332. package/dist/domain/application/application-config.d.ts +6 -24
  333. package/dist/domain/application/assistant/assistant-manifest.d.ts +29 -4
  334. package/dist/domain/application/assistant/assistant-manifest.js +1 -1
  335. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +12 -9
  336. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  337. package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
  338. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  339. package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
  340. package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
  341. package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +39 -28
  342. package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -1
  343. package/dist/domain/application/assistant/form/index.d.ts +1 -1
  344. package/dist/domain/application/assistant/form/index.js +1 -1
  345. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -1
  346. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  347. package/dist/domain/application/assistant/index.d.ts +3 -3
  348. package/dist/domain/application/assistant/index.js +1 -1
  349. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  350. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +4 -4
  351. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  352. package/dist/domain/application/assistant-mutations.js +1 -1
  353. package/dist/domain/application/configurator-builder.d.ts +7 -1
  354. package/dist/domain/application/configurator-builder.js +1 -1
  355. package/dist/domain/application/index.d.ts +1 -1
  356. package/dist/domain/application/index.js +1 -1
  357. package/dist/domain/application/standard-properties.js +1 -1
  358. package/dist/domain/application/web-component-property.d.ts +3 -1
  359. package/dist/domain/application/web-component-property.js +1 -1
  360. package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
  361. package/dist/domain/available-system-components/available-system-components.js +1 -0
  362. package/dist/domain/available-system-components/index.d.ts +1 -0
  363. package/dist/domain/available-system-components/index.js +1 -0
  364. package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +11 -5
  365. package/dist/domain/domain-builder/domain-builder.js +1 -0
  366. package/dist/domain/domain-builder/index.d.ts +1 -0
  367. package/dist/domain/domain-builder/index.js +1 -0
  368. package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
  369. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  370. package/dist/domain/domain-runtime/application.d.ts +39 -0
  371. package/dist/domain/domain-runtime/application.js +1 -0
  372. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  373. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  374. package/dist/domain/domain-runtime/domain-runtime.d.ts +44 -4
  375. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  376. package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
  377. package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
  378. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
  379. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
  380. package/dist/domain/domain-runtime/index.d.ts +2 -1
  381. package/dist/domain/domain-runtime/index.js +1 -1
  382. package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
  383. package/dist/domain/domain-runtime/spec/index.js +1 -1
  384. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  385. package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
  386. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
  387. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
  388. package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
  389. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +3 -1
  390. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
  391. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
  392. package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
  393. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
  394. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
  395. package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
  396. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  397. package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
  398. package/dist/domain/domain-runtime/web-component/actions.js +1 -1
  399. package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
  400. package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
  401. package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
  402. package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
  403. package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
  404. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
  405. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
  406. package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
  407. package/dist/domain/extensions/export-images/client-side-image.js +1 -0
  408. package/dist/domain/extensions/export-images/index.d.ts +3 -0
  409. package/dist/domain/extensions/export-images/index.js +1 -0
  410. package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
  411. package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
  412. package/dist/domain/extensions/index.d.ts +1 -2
  413. package/dist/domain/extensions/index.js +1 -1
  414. package/dist/domain/index.d.ts +3 -2
  415. package/dist/domain/index.js +1 -1
  416. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
  417. package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
  418. package/dist/domain/spec/application/admin-pages.d.ts +26 -0
  419. package/dist/domain/spec/application/admin-states.d.ts +5 -0
  420. package/dist/domain/spec/application/configurator-states.d.ts +8 -0
  421. package/dist/domain/spec/application/index.d.ts +5 -0
  422. package/dist/domain/spec/application/index.js +1 -0
  423. package/dist/domain/spec/components/bindings/index.d.ts +2 -0
  424. package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
  425. package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
  426. package/dist/domain/spec/components/bindings/write-binding.js +1 -0
  427. package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
  428. package/dist/domain/spec/components/component-entry.js +1 -0
  429. package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
  430. package/dist/domain/spec/components/component-filters.d.ts +10 -0
  431. package/dist/domain/spec/components/component-filters.js +1 -0
  432. package/dist/domain/spec/components/components.d.ts +4 -0
  433. package/dist/domain/spec/components/components.js +1 -0
  434. package/dist/domain/spec/components/index.d.ts +6 -0
  435. package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
  436. package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
  437. package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
  438. package/dist/domain/spec/enhanced-json/index.js +1 -0
  439. package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
  440. package/dist/domain/spec/expressions/expression.js +1 -0
  441. package/dist/domain/spec/expressions/expressions.d.ts +27 -0
  442. package/dist/domain/spec/expressions/expressions.js +1 -0
  443. package/dist/domain/spec/expressions/index.d.ts +5 -0
  444. package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
  445. package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
  446. package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
  447. package/dist/domain/spec/index.d.ts +9 -0
  448. package/dist/domain/spec/index.js +1 -0
  449. package/dist/domain/spec/invariants/index.d.ts +2 -0
  450. package/dist/domain/spec/invariants/index.js +1 -0
  451. package/dist/domain/spec/invariants/invariant.d.ts +24 -0
  452. package/dist/domain/spec/invariants/invariant.js +1 -0
  453. package/dist/domain/spec/invariants/invariants.d.ts +14 -0
  454. package/dist/domain/spec/invariants/invariants.js +1 -0
  455. package/dist/domain/spec/json-schema.d.ts +52 -0
  456. package/dist/domain/spec/json-schema.js +1 -0
  457. package/dist/domain/spec/markers/index.d.ts +3 -0
  458. package/dist/domain/spec/markers/index.js +1 -0
  459. package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
  460. package/dist/domain/spec/markers/msg-marker.js +1 -0
  461. package/dist/domain/spec/model/aliases.d.ts +9 -0
  462. package/dist/domain/spec/model/aliases.js +1 -0
  463. package/dist/domain/spec/model/common-types.d.ts +15 -0
  464. package/dist/domain/spec/model/common-types.js +1 -0
  465. package/dist/domain/spec/model/defaults.d.ts +33 -0
  466. package/dist/domain/spec/model/defaults.js +1 -0
  467. package/dist/domain/spec/model/entity-types.d.ts +8 -0
  468. package/dist/domain/spec/model/entity-types.js +1 -0
  469. package/dist/domain/spec/model/index.d.ts +7 -0
  470. package/dist/domain/spec/model/index.js +1 -0
  471. package/dist/domain/spec/model/model-version-key.d.ts +3 -0
  472. package/dist/domain/spec/model/model-version-key.js +1 -0
  473. package/dist/domain/spec/model/names/action-name.d.ts +7 -0
  474. package/dist/domain/spec/model/names/action-name.js +1 -0
  475. package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
  476. package/dist/domain/spec/model/names/alias-name.js +1 -0
  477. package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
  478. package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
  479. package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
  480. package/dist/domain/spec/model/names/entity-type-name.js +1 -0
  481. package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
  482. package/dist/domain/spec/model/names/expression-name.js +1 -0
  483. package/dist/domain/spec/model/names/index.d.ts +9 -0
  484. package/dist/domain/spec/model/names/index.js +1 -0
  485. package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
  486. package/dist/domain/spec/model/names/instance-name.js +1 -0
  487. package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
  488. package/dist/domain/spec/model/names/invariant-name.js +1 -0
  489. package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
  490. package/dist/domain/spec/model/names/shape-property-name.js +1 -0
  491. package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
  492. package/dist/domain/spec/model/names/violation-type-name.js +1 -0
  493. package/dist/domain/spec/model/presets.d.ts +30 -0
  494. package/dist/domain/spec/model/presets.js +1 -0
  495. package/dist/domain/spec/sections/actions.d.ts +23 -0
  496. package/dist/domain/spec/sections/actions.js +1 -0
  497. package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
  498. package/dist/domain/spec/sections/app-metadata.js +1 -0
  499. package/dist/domain/spec/sections/application-version.d.ts +7 -0
  500. package/dist/domain/spec/sections/application-version.js +1 -0
  501. package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
  502. package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
  503. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
  504. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
  505. package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
  506. package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
  507. package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
  508. package/dist/domain/spec/sections/data-spec/index.js +1 -0
  509. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
  510. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
  511. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
  512. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
  513. package/dist/domain/spec/sections/index.d.ts +9 -0
  514. package/dist/domain/spec/sections/index.js +1 -0
  515. package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
  516. package/dist/domain/spec/sections/infra/acl.js +1 -0
  517. package/dist/domain/spec/sections/infra/index.d.ts +3 -0
  518. package/dist/domain/spec/sections/infra/index.js +1 -0
  519. package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
  520. package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
  521. package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
  522. package/dist/domain/spec/sections/infra/resources-config.js +1 -0
  523. package/dist/domain/spec/sections/state-value.d.ts +7 -0
  524. package/dist/domain/spec/sections/state-value.js +1 -0
  525. package/dist/domain/spec/sections/theme.d.ts +10 -0
  526. package/dist/domain/spec/sections/theme.js +1 -0
  527. package/dist/domain/spec/sections/transformers.d.ts +15 -0
  528. package/dist/domain/spec/sections/transformers.js +1 -0
  529. package/dist/domain/spec/sections/ui.d.ts +12 -0
  530. package/dist/domain/spec/sections/ui.js +1 -0
  531. package/dist/domain/system-definitions.js +1 -1
  532. package/dist/domain/utils/index.d.ts +2 -0
  533. package/dist/domain/utils/index.js +1 -0
  534. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  535. package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
  536. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  537. package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
  538. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  539. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  540. package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
  541. package/dist/i18n/locales/cs/messages.js +1 -1
  542. package/dist/i18n/locales/da/messages.js +1 -1
  543. package/dist/i18n/locales/de/messages.js +1 -1
  544. package/dist/i18n/locales/de-AT/messages.js +1 -1
  545. package/dist/i18n/locales/en/messages.js +1 -1
  546. package/dist/i18n/locales/en-AU/messages.js +1 -1
  547. package/dist/i18n/locales/en-GB/messages.js +1 -1
  548. package/dist/i18n/locales/es/messages.js +1 -1
  549. package/dist/i18n/locales/fr/messages.js +1 -1
  550. package/dist/i18n/locales/hu/messages.js +1 -1
  551. package/dist/i18n/locales/it/messages.js +1 -1
  552. package/dist/i18n/locales/nl/messages.js +1 -1
  553. package/dist/i18n/locales/pl/messages.js +1 -1
  554. package/dist/i18n/locales/pt/messages.js +1 -1
  555. package/dist/i18n/locales/ro/messages.js +1 -1
  556. package/dist/i18n/locales/sk/messages.js +1 -1
  557. package/dist/i18n/locales/tr/messages.js +1 -1
  558. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  559. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  560. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
  561. package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
  562. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  563. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  564. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  565. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +11 -5
  566. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
  567. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  568. package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
  569. package/dist/phoenix/application-spec/index.d.ts +1 -0
  570. package/dist/phoenix/application-spec/index.js +1 -1
  571. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
  572. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  573. package/dist/phoenix/bin.js +1 -1
  574. package/dist/phoenix/cli.js +1 -1
  575. package/dist/phoenix/commands/activate-deployment.js +1 -1
  576. package/dist/phoenix/commands/build.js +1 -1
  577. package/dist/phoenix/commands/changelog.js +1 -1
  578. package/dist/phoenix/commands/check.js +1 -1
  579. package/dist/phoenix/commands/clean.js +1 -1
  580. package/dist/phoenix/commands/cleanup-environment.js +2 -2
  581. package/dist/phoenix/commands/create-environment.js +1 -1
  582. package/dist/phoenix/commands/data.js +1 -1
  583. package/dist/phoenix/commands/deploy.js +1 -1
  584. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  585. package/dist/phoenix/commands/dev.js +5 -5
  586. package/dist/phoenix/commands/docs.js +1 -1
  587. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  588. package/dist/phoenix/commands/fix.js +1 -1
  589. package/dist/phoenix/commands/generated-env-markers.d.ts +1 -0
  590. package/dist/phoenix/commands/generated-env-markers.js +1 -1
  591. package/dist/phoenix/commands/index.d.ts +1 -1
  592. package/dist/phoenix/commands/index.js +1 -1
  593. package/dist/phoenix/commands/inspect-assets.js +1 -1
  594. package/dist/phoenix/commands/list-environments.js +1 -1
  595. package/dist/phoenix/commands/login.d.ts +4 -1
  596. package/dist/phoenix/commands/login.js +2 -2
  597. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  598. package/dist/phoenix/commands/register-deployment.js +1 -1
  599. package/dist/phoenix/commands/scene.js +1 -1
  600. package/dist/phoenix/commands/screenshot.js +1 -1
  601. package/dist/phoenix/commands/state.js +1 -1
  602. package/dist/phoenix/commands/story-build.js +3 -3
  603. package/dist/phoenix/commands/story-create.js +1 -1
  604. package/dist/phoenix/commands/sync.js +1 -1
  605. package/dist/phoenix/commands/variants.js +1 -1
  606. package/dist/phoenix/lingui/index.d.ts +1 -0
  607. package/dist/phoenix/lingui/index.js +1 -0
  608. package/dist/phoenix/{services → lingui}/lingui.d.ts +5 -2
  609. package/dist/phoenix/lingui/lingui.js +1 -0
  610. package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
  611. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  612. package/dist/phoenix/services/cli-credentials.d.ts +3 -0
  613. package/dist/phoenix/services/cli-credentials.js +1 -1
  614. package/dist/phoenix/services/cli-exit.d.ts +5 -0
  615. package/dist/phoenix/services/cli-exit.js +1 -0
  616. package/dist/phoenix/services/index.d.ts +3 -0
  617. package/dist/phoenix/services/index.js +1 -1
  618. package/dist/phoenix/services/lingui-watcher.js +1 -1
  619. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  620. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
  621. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
  622. package/dist/phoenix/services/telemetry/index.d.ts +3 -0
  623. package/dist/phoenix/services/telemetry/index.js +1 -0
  624. package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
  625. package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
  626. package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
  627. package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
  628. package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
  629. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
  630. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
  631. package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
  632. package/dist/phoenix/services/vite-config.js +1 -1
  633. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
  634. package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
  635. package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
  636. package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
  637. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  638. package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
  639. package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
  640. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
  641. package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
  642. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
  643. package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
  644. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
  645. package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
  646. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
  647. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
  648. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
  649. package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
  650. package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
  651. package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
  652. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
  653. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
  654. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
  655. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
  656. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
  657. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
  658. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
  659. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
  660. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
  661. package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
  662. package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
  663. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
  664. package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
  665. package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
  666. package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
  667. package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
  668. package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
  669. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
  670. package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
  671. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
  672. package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
  673. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
  674. package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
  675. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
  676. package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
  677. package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
  678. package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
  679. package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
  680. package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
  681. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
  682. package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
  683. package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
  684. package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
  685. package/dist/react-sdk/application-runtime/index.d.ts +3 -0
  686. package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
  687. package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
  688. package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
  689. package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
  690. package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
  691. package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
  692. package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
  693. package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
  694. package/dist/react-sdk/application-runtime/loading/index.js +1 -0
  695. package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
  696. package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
  697. package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
  698. package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
  699. package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
  700. package/dist/react-sdk/application-runtime/loading/types.js +1 -0
  701. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  702. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
  703. package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
  704. package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
  705. package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
  706. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +47 -0
  707. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
  708. package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
  709. package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
  710. package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
  711. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
  712. package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
  713. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
  714. package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
  715. package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
  716. package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
  717. package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
  718. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +313 -10
  719. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  720. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
  721. package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
  722. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
  723. package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
  724. package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
  725. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
  726. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
  727. package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
  728. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  729. package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
  730. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  731. package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
  732. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  733. package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
  734. package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
  735. package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
  736. package/dist/react-sdk/domain-application-context/index.js +1 -1
  737. package/dist/react-sdk/domain-context/common-hooks/index.d.ts +1 -0
  738. package/dist/react-sdk/domain-context/common-hooks/index.js +1 -1
  739. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
  740. package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
  741. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  742. package/dist/react-sdk/domain-context/index.d.ts +1 -0
  743. package/dist/react-sdk/domain-context/index.js +1 -1
  744. package/dist/react-sdk/elements/index.d.ts +0 -1
  745. package/dist/react-sdk/index.d.ts +6 -1
  746. package/dist/react-sdk/index.js +1 -1
  747. package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
  748. package/dist/react-sdk/integration/index.d.ts +1 -0
  749. package/dist/react-sdk/integration/index.js +1 -0
  750. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
  751. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
  752. package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
  753. package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
  754. package/dist/react-sdk/lifecycle-providers/index.js +1 -0
  755. package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
  756. package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
  757. package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
  758. package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
  759. package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
  760. package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
  761. package/dist/react-sdk/loading-state/index.d.ts +4 -2
  762. package/dist/react-sdk/loading-state/index.js +1 -1
  763. package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
  764. package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
  765. package/dist/react-sdk/notifications/index.d.ts +1 -0
  766. package/dist/react-sdk/notifications/index.js +1 -0
  767. package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
  768. package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
  769. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
  770. package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
  771. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
  772. package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
  773. package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
  774. package/dist/{configurator/configuration-not-found-page → react-sdk/page-elements}/create-configuration-not-found-page.d.ts +7 -1
  775. package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
  776. package/dist/{configurator/configurator-error-page → react-sdk/page-elements}/create-configurator-error-page.d.ts +6 -1
  777. package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
  778. package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
  779. package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
  780. package/dist/react-sdk/page-elements/index.d.ts +6 -0
  781. package/dist/react-sdk/page-elements/index.js +1 -0
  782. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
  783. package/dist/react-sdk/preset-selection/index.d.ts +1 -0
  784. package/dist/react-sdk/preset-selection/index.js +1 -0
  785. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  786. package/dist/react-sdk/web-component/create-web-component.js +1 -1
  787. package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
  788. package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
  789. package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
  790. package/dist/react-sdk/web-component/god-mode/index.js +1 -0
  791. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
  792. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  793. package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +2 -2
  794. package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
  795. package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
  796. package/dist/ui-sdk/theme/types.d.ts +5 -1
  797. package/dist/watch/glob-matcher.d.ts +4 -4
  798. package/dist/watch/glob-matcher.js +1 -1
  799. package/dist/watch/watch.d.ts +4 -4
  800. package/dist/watch/watch.js +1 -1
  801. package/package.json +13 -3
  802. package/schema/domain-spec.json +140 -0
  803. package/dist/application-spec/core/components/index.d.ts +0 -2
  804. package/dist/application-spec/core/expressions/index.d.ts +0 -2
  805. package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +0 -5
  806. package/dist/configurator/app-loader-content/app-loader-content-name.js +0 -1
  807. package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +0 -1
  808. package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
  809. package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
  810. package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
  811. package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
  812. package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
  813. package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
  814. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
  815. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
  816. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
  817. package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
  818. package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
  819. package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
  820. package/dist/configurator/configurator-error-page/create-configurator-error-page.js +0 -1
  821. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
  822. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
  823. package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
  824. package/dist/domain/application/assistant/form/get-assistant-form-value-attribute.d.ts +0 -6
  825. package/dist/domain/application/assistant/form/get-assistant-form-value-attribute.js +0 -1
  826. package/dist/domain/available-system-components.d.ts +0 -11
  827. package/dist/domain/available-system-components.js +0 -1
  828. package/dist/domain/domain-builder.js +0 -1
  829. package/dist/domain/extensions/client-side-image.js +0 -1
  830. package/dist/domain/extensions/save-template-thumbnail.js +0 -1
  831. package/dist/phoenix/services/lingui.js +0 -1
  832. package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
  833. package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
  834. package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
  835. package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -37
  836. package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
  837. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
  838. package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
  839. package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
  840. package/dist/react-sdk/responsive-state/index.d.ts +0 -5
  841. package/dist/react-sdk/responsive-state/index.js +0 -1
  842. package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
  843. package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
  844. package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
  845. package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
  846. package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
  847. package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
  848. /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
  849. /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
  850. /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
  851. /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
  852. /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
  853. /package/dist/{configurator/ui/assistant/form/form-element-definition.js → domain/spec/application/configurator-states.js} +0 -0
  854. /package/dist/{react-sdk/elements/configurator-error-page-props.js → domain/spec/components/bindings/index.js} +0 -0
  855. /package/dist/{react-sdk/responsive-state/canvas-padding.js → domain/spec/components/bindings/read-binding.js} +0 -0
  856. /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
  857. /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
  858. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
  859. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
  860. /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
  861. /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
  862. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
  863. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
  864. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
  865. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
  866. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
  867. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
  868. /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
  869. /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
  870. /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
  871. /package/dist/react-sdk/{elements → page-elements}/configurator-error-page-props.d.ts +0 -0
  872. /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
@@ -1,18 +1,10 @@
1
- import { Branded } from '@salsita-ai/common/utils';
2
- import { type EnhancedJsonSchemaType, type JsonSchema, type ParseContext, type PhoenixDefinitions } from '../../../core/index.js';
1
+ import type { CommonType as CommonTypeData, CommonTypes as CommonTypesData } from '#package/domain';
2
+ import { type ParseContext, type PhoenixDefinitions } from '../../../core/index.js';
3
3
  import type { MergedModelVersion } from '../../merge/index.js';
4
- /** A single common type definition with both enhanced schema (for type inference) and resolved runtime schema. */
5
- export type CommonType = Branded<'CommonType', {
6
- readonly name: string;
7
- readonly schema: EnhancedJsonSchemaType;
8
- readonly runtimeSchema: JsonSchema;
9
- }>;
10
- /**
11
- * Branded map of common type name to CommonType.
12
- * Entries are in topo-sorted order (dependencies before dependents),
13
- * so iterating the map yields types in valid emission order.
14
- */
15
- export type CommonTypes = Branded<'CommonTypes', ReadonlyMap<string, CommonType>>;
4
+ /** A common type with its enhanced and runtime schemas; see {@link CommonTypeData | CommonType} in `domain`. */
5
+ export type CommonType = CommonTypeData;
6
+ /** The common types of a model version by name; see {@link CommonTypesData | CommonTypes} in `domain`. */
7
+ export type CommonTypes = CommonTypesData;
16
8
  /**
17
9
  * Validates, topo-sorts, and resolves commonType entries from the merged model version.
18
10
  *
@@ -1,37 +1,12 @@
1
- import { Branded } from '@salsita-ai/common/utils';
2
- import { type EnhancedJsonValue, type ParseContext } from '../../../core/index.js';
1
+ import type { Defaults as DefaultsData } from '#package/domain';
2
+ import { type ParseContext } from '../../../core/index.js';
3
3
  import type { MergedDefaults } from '../../merge/index.js';
4
4
  import type { ModelVersion } from './model-version.js';
5
- import type { EntityTypeName } from './names/entity-type-name.js';
6
- import { ShapePropertyName } from './names/shape-property-name.js';
5
+ export type { DefaultEntries } from '#package/domain';
7
6
  /**
8
- * A map of shape property names to their default values inside a single entity block.
9
- * Raw YAML values — markers intact — keyed by a validated {@link ShapePropertyName}.
10
- * Codegen emits these as-is via `stringifyEnhancedJsonValue`; at run time
11
- * `createRecipeFactory` makes the generated `createRecipe` factory from them.
12
- */
13
- export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValue>>;
14
- /**
15
- * Validated defaults map — source keys confirmed to exist in `model.latest`,
16
- * property names confirmed to exist on the (effective) shape of the entity
17
- * or on every alias member's effective shape, values type-checked against the
18
- * relaxed entity shape (all properties optional). Alias-keyed defaults are
19
- * flattened here to concrete entity entries so downstream codegen only serialises
20
- * a runtime-ready per-entity map.
21
- *
22
- * A source key may state part of a shape, but the flattened entry of a concrete
23
- * entity type states every property of its shape: `createRecipeFactory` validates
24
- * each entry as a whole entity when the generated module loads. An entity type
25
- * with no entry has no defaults and is not checked.
26
- *
27
- * Values are raw `EnhancedJsonValue` so codegen can emit them via
28
- * `stringifyEnhancedJsonValue` with `$msg` markers preserved.
7
+ * The validated defaults of a domain by entity type; see {@link DefaultsData | Defaults} in `domain`.
29
8
  *
30
- * **Deprecated feature.** The whole defaults surface is retained for legacy parity.
31
- * New specs should express initial values as `$data` entries. When the merged map is
32
- * non-empty, the factory emits a `DEFAULTS_DEPRECATED` warning.
9
+ * **Deprecated feature.** New specs express initial values as `$data` entries.
33
10
  */
34
- export type Defaults = Branded<'Defaults', {
35
- readonly entries: Readonly<Record<EntityTypeName, DefaultEntries>>;
36
- }>;
11
+ export type Defaults = DefaultsData;
37
12
  export declare const Defaults: (merged: MergedDefaults, latestModel: ModelVersion, ctx: ParseContext) => Defaults | undefined;
@@ -1,13 +1,8 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { EntityTypes as EntityTypesData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../core/index.js';
3
3
  import type { MergedModelVersion } from '../../merge/index.js';
4
- import { EntityTypeName } from './names/entity-type-name.js';
5
- /**
6
- * Validated list of entity type names declared in a model version (e.g. [Table, TopCircle, Legs3D]).
7
- * Entity types are the concrete domain objects that can be instantiated in the configurator.
8
- * Each name must be unique PascalCase.
9
- */
10
- export type EntityTypes = Branded<'EntityTypes', readonly EntityTypeName[]>;
4
+ /** The entity type names a model version declares; see {@link EntityTypesData | EntityTypes} in `domain`. */
5
+ export type EntityTypes = EntityTypesData;
11
6
  /**
12
7
  * Validates and brands entity type names from a merged model version.
13
8
  * Checks PascalCase naming and rejects duplicates.
@@ -1,6 +1,6 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ModelVersionKey as ModelVersionKeyData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../core/index.js';
3
- /** Branded string for a model version key ("latest", "v1", "v2", etc.). */
4
- export type ModelVersionKey = Branded<'ModelVersionKey', string>;
3
+ /** A model version key (`latest`, `v1`, `v2`, …); see {@link ModelVersionKeyData | ModelVersionKey} in `domain`. */
4
+ export type ModelVersionKey = ModelVersionKeyData;
5
5
  /** Validates that a version key is "latest" or "v{N}" (e.g. "v1", "v2"). */
6
6
  export declare const ModelVersionKey: (key: string, ctx: ParseContext) => ModelVersionKey | undefined;
@@ -1,10 +1,6 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ActionName as ActionNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded action name: camelCase without a prefix (e.g. "movePartBy", "swapCabinets"). An action is
5
- * a named domain operation, so its name doubles as the key of its implementation and of its
6
- * generated types.
7
- */
8
- export type ActionName = Branded<'ActionName', string>;
3
+ /** A branded action name; see {@link ActionNameData | ActionName} in `domain`. */
4
+ export type ActionName = ActionNameData;
9
5
  /** Validates that a name follows the action naming convention (camelCase, no prefix). */
10
6
  export declare const ActionName: (name: string, ctx: ParseContext) => ActionName | undefined;
@@ -1,11 +1,7 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { AliasName as AliasNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded PascalCase alias name (e.g. "RootEntity", "AllLegs").
5
- * Aliases group entity types so that shapes, expressions, and rules can target
6
- * multiple entities at once. "RootEntity" is required in every model version.
7
- */
8
- export type AliasName = Branded<'AliasName', string>;
3
+ /** A branded alias name; see {@link AliasNameData | AliasName} in `domain`. */
4
+ export type AliasName = AliasNameData;
9
5
  export declare const RESERVED_ALIAS_NAMES: readonly ['AnyDomainEntity'];
10
6
  /** Validates PascalCase naming and rejects reserved names (AnyDomainEntity). */
11
7
  export declare const AliasName: (name: string, ctx: ParseContext) => AliasName | undefined;
@@ -1,11 +1,6 @@
1
+ import type { EntityOrAliasName as EntityOrAliasNameData } from '#package/domain';
1
2
  import type { ParseContext } from '../../../../core/index.js';
2
- import { AliasName } from './alias-name.js';
3
- import { EntityTypeName } from './entity-type-name.js';
4
- /**
5
- * A PascalCase name that identifies either a concrete entity type (e.g. "Table")
6
- * or an alias group (e.g. "RootEntity"). Used as shape keys since shapes
7
- * can be defined for both entity types and aliases.
8
- */
9
- export type EntityOrAliasName = EntityTypeName | AliasName;
3
+ /** The name of an entity type or an alias; see {@link EntityOrAliasNameData | EntityOrAliasName} in `domain`. */
4
+ export type EntityOrAliasName = EntityOrAliasNameData;
10
5
  /** Validates that a name is valid PascalCase for either an entity type or alias. */
11
6
  export declare const EntityOrAliasName: (name: string, ctx: ParseContext) => EntityOrAliasName | undefined;
@@ -1,11 +1,6 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { EntityTypeName as EntityTypeNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded PascalCase entity type name (e.g. "Table", "TopCircle", "Legs3D").
5
- * Entity types are the concrete domain objects declared in a model version.
6
- * Each entity type can have shapes, be referenced by aliases, and be instantiated
7
- * in the configurator at runtime.
8
- */
9
- export type EntityTypeName = Branded<'EntityTypeName', string>;
3
+ /** A branded entity type name; see {@link EntityTypeNameData | EntityTypeName} in `domain`. */
4
+ export type EntityTypeName = EntityTypeNameData;
10
5
  /** Validates that a name is PascalCase for use as an entity type identifier. */
11
6
  export declare const EntityTypeName: (name: string, ctx: ParseContext) => EntityTypeName | undefined;
@@ -1,9 +1,6 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ExpressionName as ExpressionNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded expression name starting with $ followed by camelCase (e.g. "$price", "$isValid", "$availableColors").
5
- * Expressions are computed properties on entities — their names are prefixed with $ to distinguish them from shape properties.
6
- */
7
- export type ExpressionName = Branded<'ExpressionName', string>;
3
+ /** A branded expression name; see {@link ExpressionNameData | ExpressionName} in `domain`. */
4
+ export type ExpressionName = ExpressionNameData;
8
5
  /** Validates that a name follows the expression naming convention ($camelCase). */
9
6
  export declare const ExpressionName: (name: string, ctx: ParseContext) => ExpressionName | undefined;
@@ -1,9 +1,5 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { InstanceName as InstanceNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded component instance name.
5
- * User-declared names must start with a letter (e.g. "default", "body", "main").
6
- * SDK-derived names may include `$` prefix and `.` separators (e.g. "$top", "Table.$top").
7
- */
8
- export type InstanceName = Branded<'InstanceName', string>;
3
+ /** A branded component instance name; see {@link InstanceNameData | InstanceName} in `domain`. */
4
+ export type InstanceName = InstanceNameData;
9
5
  export declare const InstanceName: (name: string, entityKey: string, componentName: string, ctx: ParseContext) => InstanceName | undefined;
@@ -1,5 +1,5 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { InvariantName as InvariantNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /** A camelCase identifier for an invariant implementation declared in YAML. */
4
- export type InvariantName = Branded<'InvariantName', string>;
3
+ /** A branded invariant name; see {@link InvariantNameData | InvariantName} in `domain`. */
4
+ export type InvariantName = InvariantNameData;
5
5
  export declare const InvariantName: (name: string, ctx: ParseContext) => InvariantName | undefined;
@@ -1,15 +1,7 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ShapePropertyName as ShapePropertyNameData } from '#package/domain';
2
2
  import { ParseContext } from '../../../../core/index.js';
3
- /**
4
- * Branded shape property name — the key under which an entity shape (or
5
- * alias shape) declares a field, and the key under which `defaults:` attaches
6
- * initial values. Must match /^[a-z]\w*$/: start with a lowercase letter,
7
- * then word characters (letters, digits, underscore).
8
- *
9
- * Examples: `height`, `positionX`, `hoodId`. Rejected: `Height`, `$height`,
10
- * `3D`, `height-px`.
11
- */
12
- export type ShapePropertyName = Branded<'ShapePropertyName', string>;
3
+ /** A branded shape property name; see {@link ShapePropertyNameData | ShapePropertyName} in `domain`. */
4
+ export type ShapePropertyName = ShapePropertyNameData;
13
5
  /** Validates `name` as a shape property identifier. Emits `INVALID_SHAPE_PROPERTY_NAME` on failure. */
14
6
  export declare const ShapePropertyName: (name: string, ctx: ParseContext) => ShapePropertyName | undefined;
15
7
  /**
@@ -1,5 +1,5 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ViolationTypeName as ViolationTypeNameData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
- /** A stable violation discriminator returned by an invariant. */
4
- export type ViolationTypeName = Branded<'ViolationTypeName', string>;
3
+ /** A branded violation type name; see {@link ViolationTypeNameData | ViolationTypeName} in `domain`. */
4
+ export type ViolationTypeName = ViolationTypeNameData;
5
5
  export declare const ViolationTypeName: (name: string, ctx: ParseContext) => ViolationTypeName | undefined;
@@ -1,37 +1,14 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { Presets as PresetsData, SpecPreset } from '#package/domain';
2
2
  import type { ParseContext } from '../../../core/index.js';
3
3
  import type { MergedPresets } from '../../merge/index.js';
4
4
  import type { RawPreset } from '../../raw-spec/index.js';
5
5
  import type { Relations } from '../relations/index.js';
6
6
  import type { ModelVersion } from './model-version.js';
7
- /**
8
- * A single entity within a preset — id, type, and shape properties.
9
- * Properties are validated against the entity's schema from ConfigurationSchema.
10
- */
11
- export type PresetEntity = Branded<'PresetEntity', {
12
- readonly id: string;
13
- readonly type: string;
14
- readonly properties: Readonly<Record<string, unknown>>;
15
- }>;
16
- /**
17
- * A single parsed preset — the root entity type, initial entities, and optional metadata.
18
- * Represents one initial configuration state for a configurator deployment.
19
- */
20
- export type Preset = Branded<'Preset', {
21
- readonly rootEntityType: string;
22
- readonly initialDomainEntities: readonly PresetEntity[];
23
- readonly name?: string;
24
- readonly description?: string;
25
- readonly img?: string;
26
- readonly imgAlt?: string;
27
- readonly detailTitle?: string;
28
- readonly detailDescription?: string;
29
- readonly tags?: readonly string[];
30
- }>;
31
- /** All parsed presets for a parsed configurator or admin model. */
32
- export type Presets = Branded<'Presets', {
33
- readonly presets: readonly Preset[];
34
- }>;
7
+ export type { PresetEntity } from '#package/domain';
8
+ /** The parsed preset; see {@link SpecPreset} in `domain`. */
9
+ export type Preset = SpecPreset;
10
+ /** The parsed presets of a domain; see {@link PresetsData | Presets} in `domain`. */
11
+ export type Presets = PresetsData;
35
12
  export declare const Preset: (raw: RawPreset, latestModel: ModelVersion, relations: Relations, ctx: ParseContext) => Preset | undefined;
36
13
  /**
37
14
  * Parses and validates merged presets against the domain model.
@@ -1,26 +1,10 @@
1
- import { Branded } from '@salsita-ai/common/utils';
2
- import { type EnhancedJsonSchemaType, type JsonSchema, type ParseContext, type PhoenixDefinitions } from '../../../core/index.js';
1
+ import type { Actions as ActionsData } from '#package/domain';
2
+ import { type ParseContext, type PhoenixDefinitions } from '../../../core/index.js';
3
3
  import type { MergedActions } from '../../merge/index.js';
4
- import { ActionName, type ModelVersion } from '../model/index.js';
5
- /** One parameter of an action: its declared schema, and whether a call has to pass it (a nullable param is optional). */
6
- export interface ActionParam {
7
- readonly schema: EnhancedJsonSchemaType;
8
- readonly required: boolean;
9
- }
10
- /**
11
- * One validated action declaration. `params` and `result` keep the enhanced schemas for codegen and
12
- * for consumers that expose the action; `paramsSchema` is the AJV-ready object schema of the parameters, with the
13
- * refs resolved into `$defs`, which the action system validates the arguments of a call against.
14
- */
15
- export type Action = Branded<'Action', {
16
- readonly name: ActionName;
17
- readonly description?: string;
18
- readonly params: Readonly<Record<string, ActionParam>>;
19
- readonly result: Readonly<Record<string, EnhancedJsonSchemaType>>;
20
- readonly paramsSchema: JsonSchema;
21
- }>;
22
- /** The validated `actions` section: every declared action by name, in declaration order; empty when the spec declares none. */
23
- export type Actions = Branded<'Actions', ReadonlyMap<ActionName, Action>>;
4
+ import { type ModelVersion } from '../model/index.js';
5
+ export type { ActionParam, Action } from '#package/domain';
6
+ /** The validated `actions` section by action name; see {@link ActionsData | Actions} in `domain`. */
7
+ export type Actions = ActionsData;
24
8
  interface ActionsContext {
25
9
  readonly latestModel: ModelVersion;
26
10
  readonly phxDefinitions: PhoenixDefinitions;
@@ -32,4 +16,3 @@ interface ActionsContext {
32
16
  * invalid, so nothing downstream builds on a partial list.
33
17
  */
34
18
  export declare const Actions: (merged: MergedActions, context: ActionsContext, ctx: ParseContext) => Actions | undefined;
35
- export {};
@@ -1,21 +1,6 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { AppMetadata as AppMetadataData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../core/index.js';
3
3
  import type { MergedAppMetadata } from '../../merge/index.js';
4
- import { ApplicationVersion } from './application-version.js';
5
- /**
6
- * Validated application metadata — version, auth, infrastructure settings.
7
- * Used by codegen for ApplicationVersion export and builder chain methods.
8
- */
9
- export type AppMetadata = Branded<'AppMetadata', {
10
- readonly applicationVersion: ApplicationVersion;
11
- readonly workspace: boolean;
12
- readonly webComponentTag: string | undefined;
13
- readonly pageTitle: string | undefined;
14
- readonly useAuthHook: boolean;
15
- readonly useClerk: boolean;
16
- readonly enableAdminRelease: boolean;
17
- readonly jsonSchemaValidator: 'ajv' | 'csp-compatible';
18
- readonly gltfDecoder: 'js' | 'wasm';
19
- readonly collectFinalizeData: boolean;
20
- }>;
4
+ /** The validated application metadata; see {@link AppMetadataData | AppMetadata} in `domain`. */
5
+ export type AppMetadata = AppMetadataData;
21
6
  export declare const AppMetadata: (merged: MergedAppMetadata, ctx: ParseContext) => AppMetadata | undefined;
@@ -1,9 +1,5 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ApplicationVersion as ApplicationVersionData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../core/index.js';
3
- /**
4
- * Branded semantic version (x.y.z) of the application.
5
- * Exported by codegen as the `ApplicationVersion` constant and stored as
6
- * `applicationVersion` on the deployment record.
7
- */
8
- export type ApplicationVersion = Branded<'ApplicationVersion', string>;
3
+ /** The semantic version of the application; see {@link ApplicationVersionData | ApplicationVersion} in `domain`. */
4
+ export type ApplicationVersion = ApplicationVersionData;
9
5
  export declare const ApplicationVersion: (version: string, ctx: ParseContext) => ApplicationVersion | undefined;
@@ -0,0 +1,9 @@
1
+ import { type AssistantFormElementDescriptor } from '#package/domain';
2
+ import type { ParseContext } from '../../../../core/index.js';
3
+ import type { RawAssistantFormElement } from '../../../raw-spec/index.js';
4
+ /**
5
+ * Checks the project's own form elements and turns them into the descriptors the built-ins use, in
6
+ * YAML order. Whether each has an implementation is not known here, since module analysis does not
7
+ * see the name a file registers; the application checks that pairing when it starts.
8
+ */
9
+ export declare const resolveFormElements: (formElements: Readonly<Record<string, RawAssistantFormElement>>, ctx: ParseContext) => readonly AssistantFormElementDescriptor[];
@@ -0,0 +1 @@
1
+ import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e,isHtmlElementName as r}from"#package/domain";import{DiagnosticCode as E,diagnosticMessages as _}from"../../../../errors/index.js";let T=e.map(({name:e})=>e),t=new Set(["label"]);export const resolveFormElements=(e,N)=>Object.entries(e).map(([e,S])=>{let A=N.at(e);return T.includes(e)?A.error(E.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME,_.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME(e,T)):r(e)&&A.error(E.ASSISTANT_FORM_ELEMENT_HTML_NAME,_.ASSISTANT_FORM_ELEMENT_HTML_NAME(e)),((e,{attributes:r={},required:T=[]},N)=>{let S=Object.keys(r);for(let r of S)t.has(r)&&N.at("attributes",r).error(E.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME,_.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME(e,r));for(let t of T)Object.hasOwn(r,t)||N.at("required").error(E.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED,_.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED(e,t,S))})(e,S,A),{name:e,role:S.role,description:S.description,attributes:S.attributes??{},...void 0===S.required?{}:{required:S.required}}});
@@ -29,7 +29,10 @@ export type AssistantSchema = Required<AssistantManifest> & {
29
29
  /** What the assistant schema is built from, besides the manifest. */
30
30
  export interface AssistantSchemaInput {
31
31
  readonly model: ModelVersion;
32
- readonly states: AssistantStates;
32
+ /** The declared UI states; the export states only check the screenshot views, the schema never shows them. */
33
+ readonly states: AssistantStates & {
34
+ readonly exportStates: readonly string[];
35
+ };
33
36
  /** Resolves `phx:` refs, so a field's nullability is read through phoenix definitions. */
34
37
  readonly phxDefinitions: PhoenixDefinitions;
35
38
  /** The parsed expressions, which `$` manifest entries whitelist by their declared schema. */
@@ -1 +1 @@
1
- import{isArray as e}from"@salsita-ai/common/utils";import{ASSISTANT_HINTS as t,AssistantFieldClashError as i,buildAssistantManifest as r,describeAssistantValues as n,mergeAssistantFields as s,resolveAssistantField as o}from"#package/domain";import{DiagnosticCode as a,diagnosticMessages as l}from"../../../../errors/index.js";import{createSchemaRefResolver as S,isNullableSchema as p,phxDefinitionRefName as N}from"../../common/index.js";import{resolveAssistantFieldType as T}from"./assistant-field-type.js";let c="AnyDomainEntity",d="RecipeGroup",f="Recipe",A="DryRun",E="FieldOption",m={section:"childRecipes",component:"childEntityRecipes",mutation:"addChild"},_={section:"replaceRecipes",component:"replaceEntityRecipes",mutation:"replaceEntity"},u=new Set(["id","type","meta"]),O=new Set(["Query","Mutation","Navigation",d,f,A,"DryRunError",E,"JSON","String","Int","Float","Boolean","ID"]),I=new Set([d,f,E,A]),y=new Set(["id","type"]),b="A string, a message descriptor or a multilingual object; passed without translation.",h=(e,t)=>Object.entries(e).find(([e])=>e===t)?.[1],g=(e,{property:t,writableKey:i},r,{resolveRef:s,exposed:o,sources:S},p)=>{let N=Object.entries(h(S,e)??{}),c=o.get(e)?.find(({source:e})=>e===t)?.name??N.find(([,{source:e}])=>e===t)?.[0],d=void 0===c?N.find(([e])=>e===t)?.[1]:void 0;if(d)return void p.at(i,t).error(a.ASSISTANT_FIELD_NAME_CONFLICT,l.ASSISTANT_FIELD_NAME_CONFLICT(e,t,[d.source,t],`${i}.${t}`));let{type:f,enumValues:A,localized:E,description:m}=T(r,s),_={...f,nonNull:!1},u=c??t,O=void 0===c?n(m,A):void 0;return E?{name:u,property:t,type:{kind:"scalar",name:"JSON",nonNull:!1},description:O?`${O} ${b}`:b}:{name:u,property:t,type:_,...void 0===O?{}:{description:O}}},v=(e,t,{model:i,components:r})=>{let n=new Set([e,...[...i.aliases].filter(([,t])=>t.includes(e)).map(([e])=>e)]);return r.filter(({componentName:e,typeOrAlias:i})=>e===t&&n.has(i)).map(({instanceName:e})=>String(e))},R=(...e)=>t.filter(t=>e.some(e=>e?.includes(t))),j=(e,t,i,r)=>{let{model:n}=i,s=new Map,o=new Map;for(let[S,{groups:p,hints:N}]of Object.entries(e)){let e=n.entityTypes.find(e=>e===S),T=e?[e]:[...n.aliases].find(([e])=>e===S)?.[1];if(!T){r.at(S).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE(t.section,S));continue}for(let[e,n]of(T.forEach(e=>o.set(e,R(o.get(e),N))),Object.entries(p))){let o=r.at(S,"groups",e),p=`${S}.groups.${e}`,N={groupId:n?.as??e,instanceName:e,...n?.description===void 0?{}:{description:n.description},dryRuns:n?.allowDryRuns??!0};for(let r of T){let n=v(r,t.component,i),T=s.get(r)??[],c=T.find(e=>e.group.groupId===N.groupId);n.includes(e)?c?o.error(a.ASSISTANT_DUPLICATE_RECIPE_GROUP,l.ASSISTANT_DUPLICATE_RECIPE_GROUP(t,r,N.groupId,[c.entry,p])):s.set(r,[...T,{group:N,entry:p,entryCtx:o}]):o.error(a.ASSISTANT_UNKNOWN_RECIPE_GROUP,l.ASSISTANT_UNKNOWN_RECIPE_GROUP(t,S,e,r,n))}}}let S=n.entityTypes.flatMap(e=>{let t=s.get(e);return t?[{entityType:e,groups:t}]:[]});return{groups:Object.fromEntries(S.map(({entityType:e,groups:t})=>[e,t.map(({group:e})=>e)])),hints:o,metaEntries:new Map(S.flatMap(({entityType:e,groups:[t]})=>t?[[e,t.entryCtx]]:[]))}},M=e=>`${e}Meta`,D=e=>`${e.charAt(0).toUpperCase()+e.slice(1)}Result`,C=e=>{let t=(({anyOf:e,oneOf:t})=>[...e??[],...t??[]].filter(e=>"null"!==e.type))(e);return e.$ref||1!==t.length?e:t[0]},P=(e,t)=>{let{type:i,enumValues:r,localized:s,description:o}=T(e,t),a={...i,nonNull:!1},l=s?`${n(o,r)??""} ${b}`.trim():n(o,r);return{type:{...s?{kind:"scalar",name:"JSON",nonNull:!1}:a,nonNull:i.nonNull},...void 0===l?{}:{description:l}}},L=(t,i)=>{let r=(t=>{let i=C(t),r=i?.type==="array"&&i.items&&!e(i.items)?C(i.items):void 0,n=r??i;if(n?.$ref!==void 0&&"$DomainEntity"===N(n.$ref))return{target:n.references??c,list:void 0!==r}})(t);if(r)return{kind:"edge",...r,nullable:p(t,i),...void 0===t.description?{}:{description:t.description}};let{type:s,enumValues:o,localized:a,description:l}=T(t,i),S=n(l,o);return a?{kind:"value",type:{kind:"scalar",name:"JSON",nonNull:s.nonNull},description:`${l??""} ${b}`.trim()}:{kind:"value",type:s,...void 0===S?{}:{description:S}}},U=(e,t)=>{let{type:i,enumValues:r,localized:n,description:s}=T(e,t);return{type:{kind:"value",type:i},localized:!0===n,description:s,enumValues:r}},w=(e,t,i,r,s)=>{let o=t.startsWith("$")?((e,t,i,r)=>{let n=((e,t,{expressions:i,entityTypes:r})=>{let n=r.find(t=>t===e);for(let r of void 0===n?[e]:i.entityExpressions.get(n)?.shapeGroups??[]){let e=[...i.expressions.get(r)?.values()??[]].find(e=>e.name===t);if(e?.declaredSchema)return{implementation:e.implementation,declaredSchema:e.declaredSchema}}})(e.name,t,i);if(!n)return void r.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("entities",e.name,t));let{implementation:s}=n;if("violations"===s.kind)return void r.error(a.ASSISTANT_UNSUPPORTED_EXPRESSION,l.ASSISTANT_UNSUPPORTED_EXPRESSION(e.name,t));if("relation"===s.kind){let[{target:e,cardinality:t}]=s.params;return{type:{kind:"edge",target:e,cardinality:t},localized:!1,description:void 0}}return U(n.declaredSchema,i.resolveRef)})(e,t,r,s):((e,t,{resolveRef:i},r)=>{let n=Object.entries(e.shape.properties).find(([e])=>e===t)?.[1];return n?U(n,i):void r.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("entities",e.name,t))})(e,t,r,s);if(!o)return;let S=i?.as??(t.startsWith("$")?`_${t.slice(1)}`:t);return u.has(S)?void s.error(a.ASSISTANT_RESERVED_FIELD_NAME,l.ASSISTANT_RESERVED_FIELD_NAME(e.name,t,S)):{name:S,source:t,type:o.type,localized:o.localized,description:n(i?.description??o.description,o.enumValues),describedByManifest:i?.description!==void 0,enumValues:o.enumValues,valueDescription:i?.description??o.description,...i?.lenses?.length?{lenses:[...new Set(i.lenses)]}:{}}},$=(e,t,i,r,n)=>s(t,i,r,(t,i,r)=>{n.error(a.ASSISTANT_FIELD_NAME_CONFLICT,l.ASSISTANT_FIELD_NAME_CONFLICT(e,t,[i,r]))});export const resolveAssistantManifest=(e,{model:t,states:i,phxDefinitions:r,expressions:n,components:s,actions:p},N)=>{let d=N.errors.length,f=N.at("entities"),A=S(t.commonTypes,r);for(let e of t.resolvedShapes.keys())O.has(e)&&N.error(a.ASSISTANT_RESERVED_TYPE_NAME,l.ASSISTANT_RESERVED_TYPE_NAME(e,[...O]));let E=((e,t,i)=>{let r=new Map;for(let n of e){let e=[];for(let[r,s]of Object.entries(n.entries)){let o=w(n,r,s,t,i.at(n.name,r));o&&e.push(o)}r.set(n.name,e)}return r})(((e,t,i)=>{let r=[];for(let[i,n]of t.resolvedShapes){let t=e[i];t&&r.push({name:i,shape:n,entries:t})}let n=new Set(t.resolvedShapes.keys());for(let t of Object.keys(e))n.has(t)||i.at(t).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("entities",t));return r})(e.entities??{},t,f),{resolveRef:A,expressions:n,entityTypes:t.entityTypes},f),u=$(c,[],E.get(c)??[],()=>void 0,N),C=new Map([[c,u]]);for(let e of t.aliases.keys())e!==c&&C.set(e,$(e,[u],E.get(e)??[],()=>void 0,N));for(let e of t.entityTypes){let i=[c,...[...t.aliases].filter(([t,i])=>t!==c&&i.includes(e)).map(([e])=>e)],r=[...t.resolvedShapes].find(([t])=>t===e)?.[1];C.set(e,$(e,i.map(e=>C.get(e)??[]),E.get(e)??[],e=>{let t=Object.entries(r?.properties??{}).find(([t])=>t===e)?.[1];return t&&T(t,A).enumValues},N))}let U=Object.fromEntries(t.entityTypes.map(e=>[e,Object.fromEntries((C.get(e)??[]).map(({name:e,source:t,localized:i})=>[e,i?{source:t,localized:!0}:{source:t}]))])),F=j(e.childRecipes??{},m,{model:t,components:s},N.at("childRecipes")),W=j(e.replaceRecipes??{},_,{model:t,components:s},N.at("replaceRecipes")),k=((e,t,i)=>{let r=new Set;for(let n of Object.keys(e)){let e=t.entityTypes.find(e=>e===n),s=e?[e]:[...t.aliases].find(([e])=>e===n)?.[1];s?s.forEach(e=>r.add(e)):i.at(n).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("deletable",n))}return t.entityTypes.filter(e=>r.has(e))})(e.deletable??{},t,N.at("deletable")),K=((e,t,i)=>{let{model:r}=t,n=((e,t,i)=>{let r=new Map;for(let[n,s]of Object.entries(e)){let e=t.entityTypes.find(e=>e===n),o=e?[e]:[...t.aliases].find(([e])=>e===n)?.[1],S=[...t.resolvedShapes].find(([e])=>e===n)?.[1];if(!o||!S){i.at(n).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("writable",n));continue}for(let e of Object.keys(s)){let t=i.at(n,e);e.startsWith("$")||y.has(e)?t.error(a.ASSISTANT_NOT_WRITABLE,l.ASSISTANT_NOT_WRITABLE(n,e)):h(S.properties,e)?o.forEach(t=>{let i=r.get(t)??new Map;r.set(t,i.has(e)?i:i.set(e,n))}):t.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("writable",n,e))}}return r})(e,r,i);return r.entityTypes.flatMap(e=>{let s=[...r.resolvedShapes].find(([t])=>t===e)?.[1],o=[...n.get(e)??[]].flatMap(([r,n])=>{let o=s&&h(s.properties,r);return(o&&g(e,{property:r,writableKey:n},o,t,i))??[]});return o.length>0?[{entityType:e,fields:o}]:[]})})(e.writable??{},{model:t,resolveRef:A,exposed:E,sources:U},N.at("writable")),V=((e,t,i,r)=>{let{model:n}=i,s=new Map;for(let[o,S]of Object.entries(e)){let e=n.entityTypes.find(e=>e===o),p=e?[e]:[...n.aliases].find(([e])=>e===o)?.[1]??[];for(let[e,n]of Object.entries(S)){let S=n?.options;if(!S)continue;let N=r.at(o,e,"options"),T=`${o}.${e}`;for(let r of p){let n=t.find(e=>e.entityType===r)?.fields.find(t=>t.property===e);if(!n)continue;let o=S.as??`${n.name}Options`,p=v(r,S.componentType,i),c=s.get(r)??[],d=c.find(e=>e.options.edgeName===o||e.options.field===n.name);if(p.includes(S.instanceName))if(o===m.section||o===_.section)N.error(a.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME,l.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME(T,o,n.name));else if(d)N.error(a.ASSISTANT_DUPLICATE_OPTIONS_EDGE,l.ASSISTANT_DUPLICATE_OPTIONS_EDGE(r,d.options.edgeName===o?{edgeName:o}:{field:n.name},[d.entry,T]));else{let e={field:n.name,edgeName:o,componentType:S.componentType,instanceName:S.instanceName,validate:S.validate??!0,dryRuns:S.allowDryRuns??!0};s.set(r,[...c,{options:e,hints:R(S.hints),entry:T,entryCtx:N}])}else N.error(a.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT,l.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT(T,S,r,p))}}}return s})(e.writable??{},K,{model:t,components:s},N.at("writable"));var Y=[F.metaEntries,W.metaEntries,new Map([...V].flatMap(([e,[t]])=>t?[[e,t.entryCtx]]:[]))];for(let e of t.entityTypes){let i=Y.flatMap(t=>t.get(e)??[])[0],r=M(e);i&&[...t.resolvedShapes.keys()].some(e=>e===r)&&i.error(a.ASSISTANT_META_TYPE_NAME_CONFLICT,l.ASSISTANT_META_TYPE_NAME_CONFLICT(e,r))}let x=t.entityTypes.filter(e=>(F.groups[e]?.length??0)>0||(W.groups[e]?.length??0)>0||(V.get(e)?.length??0)>0).map(M),G=((e,{actions:t,resolveRef:i,builtInMutations:r,typeNames:n},s)=>{let o=[],S=[...t.values()].map(e=>String(e.name));for(let[p,N]of Object.entries(e)){let e=s.at(p),T=[...t.values()].find(e=>e.name===p);if(!T){e.error(a.ASSISTANT_UNKNOWN_ACTION,l.ASSISTANT_UNKNOWN_ACTION(p,S));continue}let c=N?.as??p,d=o.find(e=>e.fieldName===c),f=D(c);if(r.has(c)||d){e.error(a.ASSISTANT_MUTATION_NAME_CONFLICT,l.ASSISTANT_MUTATION_NAME_CONFLICT(p,c,d?`"assistant.actions.${d.actionName}" already exposes`:"the built-in mutation of that name already takes"));continue}if(n.has(f)||o.some(e=>D(e.fieldName)===f)){e.error(a.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT,l.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT(p,c,f));continue}let A=N?.description??T.description;o.push({fieldName:c,actionName:p,...void 0===A?{}:{description:A},args:Object.fromEntries(Object.entries(T.params).map(([e,{schema:t}])=>[e,P(t,i)])),result:Object.fromEntries(Object.entries(T.result).map(([e,t])=>[e,L(t,i)]))})}return o})(e.actions??{},{actions:p,resolveRef:A,builtInMutations:new Set(["deleteEntity",m.mutation,_.mutation,...K.map(({entityType:e})=>`modify${e}`)]),typeNames:new Set([...O,...t.resolvedShapes.keys(),...x])},N.at("actions")),z=((e,t)=>{let i=e.lenses??{},r=new Set;for(let[n,s]of Object.entries(e.entities??{}))for(let[e,o]of Object.entries(s))for(let s of o?.lenses??[])Object.hasOwn(i,s)?r.add(s):t.at("entities",n,e,"lenses").error(a.ASSISTANT_UNKNOWN_LENS,l.ASSISTANT_UNKNOWN_LENS(`${n}.${e}`,s,Object.keys(i)));for(let e of Object.keys(i))I.has(e)?t.at("lenses",e).error(a.ASSISTANT_RESERVED_LENS_NAME,l.ASSISTANT_RESERVED_LENS_NAME(e,[...I])):r.has(e)||t.at("lenses",e).error(a.ASSISTANT_EMPTY_LENS,l.ASSISTANT_EMPTY_LENS(e));return Object.fromEntries(Object.entries(i).map(([e,{description:t,maxDepth:i}])=>[e,{description:t,maxDepth:i??1}]))})(e,N);if(N.errors.length>d)return;let B=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{hints:R(t.hints),groups:Object.entries(t.groups).map(([e,t])=>({instanceName:e,groupId:t?.as??e,...t?.description===void 0?{}:{description:t.description},dryRuns:t?.allowDryRuns??!0}))}]));return{declarations:{entities:Object.fromEntries(Object.keys(e.entities??{}).map(e=>[e,(E.get(e)??[]).map(e=>({name:e.name,source:e.source,type:e.type,localized:e.localized,describedByManifest:e.describedByManifest,...void 0===e.description?{}:{description:e.description},...void 0===e.valueDescription?{}:{valueDescription:e.valueDescription},...void 0===e.enumValues?{}:{enumValues:e.enumValues},...void 0===e.lenses?{}:{lenses:e.lenses}}))])),enumValues:Object.fromEntries(t.entityTypes.map(e=>[e,Object.fromEntries(Object.entries(t.resolvedShapes.get(e)?.properties??{}).flatMap(([e,t])=>{let i=T(t,A).enumValues;return i?[[e,i]]:[]}))])),deletable:Object.keys(e.deletable??{}),writable:Object.fromEntries(Object.entries(e.writable??{}).map(([e,i])=>[e,Object.fromEntries(Object.entries(i).map(([i,r])=>[i,{defaultOptionsName:r?.options?.as===void 0,members:Object.fromEntries(t.entityTypes.filter(i=>i===e||[...t.aliases].find(([t])=>t===e)?.[1].includes(i)).flatMap(r=>{let n=h(t.resolvedShapes.get(r)?.properties??{},i),s=n&&g(r,{property:i,writableKey:e},n,{model:t,resolveRef:A,exposed:new Map,sources:{}},N.at("writable")),o=V.get(r)?.find(t=>t.entry===`${e}.${i}`);return s?[[r,{field:s,...T(n,A).localized?{exposedDescription:b}:{},...o?{options:{options:o.options,hints:o.hints}}:{}}]]:[]}))}]))])),childRecipes:B(e.childRecipes??{}),replaceRecipes:B(e.replaceRecipes??{})},entityTypes:t.entityTypes,aliases:Object.fromEntries(t.aliases),exampleType:t.rootEntityTypes[0]??t.entityTypes[0],states:{navigationStates:i.navigationStates,viewStates:i.viewStates,toolStates:i.toolStates},deletableTypes:k,writableTypes:K,actionFields:G,childRecipes:Object.fromEntries(Object.entries(F.groups).map(([e,t])=>[e,{groups:t,hints:F.hints.get(e)??[]}])),replaceRecipes:Object.fromEntries(Object.entries(W.groups).map(([e,t])=>[e,{groups:t,hints:W.hints.get(e)??[]}])),optionsEdges:Object.fromEntries([...V].map(([e,t])=>[e,t.map(({options:e,hints:t})=>({options:e,hints:t}))])),fields:Object.fromEntries([...C].map(([e,t])=>[e,t.map(t=>o(t,E.get(e)??[]))])),lenses:z}};export const createAssistantSchema=(e,t,n)=>{let s=resolveAssistantManifest(e,t,n);if(s)try{return{...r(s),resolved:s}}catch(e){if(e instanceof i)return void n.at("entities").error(a.ASSISTANT_FIELD_SHAPE_CONFLICT,l.ASSISTANT_FIELD_SHAPE_CONFLICT(e.fieldName,e.exposures));n.error(a.ASSISTANT_INVALID_SCHEMA,l.ASSISTANT_INVALID_SCHEMA([e instanceof Error?e.message:String(e)]));return}};
1
+ import{isArray as e}from"@salsita-ai/common/utils";import{ASSISTANT_HINTS as t,AssistantFieldClashError as i,buildAssistantManifest as r,describeAssistantValues as n,mergeAssistantFields as s,resolveAssistantField as o}from"#package/domain";import{DiagnosticCode as a,diagnosticMessages as l}from"../../../../errors/index.js";import{ASSISTANT_OPTION_COMPONENT_TYPES as S,GRAPHQL_NAME_PATTERN as N}from"../../../raw-spec/index.js";import{createSchemaRefResolver as p,isNullableSchema as T,phxDefinitionRefName as c}from"../../common/index.js";import{resolveAssistantFieldType as _}from"./assistant-field-type.js";import{resolveFormElements as d}from"./assistant-form-elements.js";let E="AnyDomainEntity",A="RecipeGroup",m="Recipe",f="DryRun",I="FieldOption",O="agentScreenshot",u=/^(?!(true|false|null)$)[_A-Za-z][_0-9A-Za-z]*$/,y={section:"childRecipes",component:"childEntityRecipes",mutation:"addChild",typeSuffix:"ChildRecipes"},h={section:"replaceRecipes",component:"replaceEntityRecipes",mutation:"replaceEntity",typeSuffix:"ReplaceRecipes"},v=new Set(["id","type","meta"]),R=new Set(["Query","Mutation","Navigation",A,m,f,"DryRunError",I,"Screenshot","JSON","String","Int","Float","Boolean","ID"]),b=new Set([A,m,I,f]),M=new Set(["id","type"]),C="A string, a message descriptor or a multilingual object; passed without translation.",g=(e,t)=>Object.entries(e).find(([e])=>e===t)?.[1],P=(e,{property:t,writableKey:i},r,{resolveRef:s,exposed:o,sources:S},N)=>{let p=Object.entries(g(S,e)??{}),T=o.get(e)?.find(({source:e})=>e===t)?.name??p.find(([,{source:e}])=>e===t)?.[0],c=void 0===T?p.find(([e])=>e===t)?.[1]:void 0;if(c)return void N.at(i,t).error(a.ASSISTANT_FIELD_NAME_CONFLICT,l.ASSISTANT_FIELD_NAME_CONFLICT(e,t,[c.source,t],`${i}.${t}`));let{type:d,enumValues:E,localized:A,description:m}=_(r,s),f={...d,nonNull:!1},I=T??t,O=void 0===T?n(m,E):void 0;return A?{name:I,property:t,type:{kind:"scalar",name:"JSON",nonNull:!1},description:O?`${O} ${C}`:C}:{name:I,property:t,type:f,...void 0===O?{}:{description:O}}},j=(e,t)=>new Set([e,...[...t.aliases].filter(([,t])=>t.includes(e)).map(([e])=>e)]),w=(e,t,{model:i,components:r})=>{let n=j(e,i);return r.filter(({componentName:e,typeOrAlias:i})=>e===t&&n.has(i)).map(({instanceName:e})=>String(e))},D=(e,t,{model:i,components:r})=>{let n=j(e,i);return r.flatMap(({componentName:e,typeOrAlias:i,instanceName:r,implementation:s})=>S.some(t=>t===e)&&n.has(i)&&"userBound"===s.kind&&"composite"===s.implementation.kind&&s.implementation.writeBindings.some(({entityField:e})=>e===t)?[{componentType:e,instanceName:String(r)}]:[])},U=(...e)=>t.filter(t=>e.some(e=>e?.includes(t))),L=(e,t)=>({groupId:t?.as??e,instanceName:e,...t?.description===void 0?{}:{description:t.description},dryRuns:t?.allowDryRuns??!0,hints:U(t?.hints)}),W=(e,t,i,r)=>{let{model:n}=i,s=new Map;for(let[o,S]of Object.entries(e)){let e=n.entityTypes.find(e=>e===o),p=e?[e]:[...n.aliases].find(([e])=>e===o)?.[1];if(!p){r.at(o).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE(t.section,o));continue}for(let[e,n]of Object.entries(S)){let S=r.at(o,e),T=`${o}.${e}`,c=L(e,n);if(!N.test(c.groupId)){S.error(a.ASSISTANT_INVALID_RECIPE_GROUP_ID,l.ASSISTANT_INVALID_RECIPE_GROUP_ID(t,o,e,c.groupId));continue}for(let r of p){let n=w(r,t.component,i),N=s.get(r)??[],p=N.find(e=>e.group.groupId===c.groupId);n.includes(e)?p?S.error(a.ASSISTANT_DUPLICATE_RECIPE_GROUP,l.ASSISTANT_DUPLICATE_RECIPE_GROUP(t,r,c.groupId,[p.entry,T])):s.set(r,[...N,{group:c,entry:T,entryCtx:S}]):S.error(a.ASSISTANT_UNKNOWN_RECIPE_GROUP,l.ASSISTANT_UNKNOWN_RECIPE_GROUP(t,o,e,r,n))}}}let o=n.entityTypes.flatMap(e=>{let t=s.get(e);return t?[{entityType:e,groups:t}]:[]});return{groups:Object.fromEntries(o.map(({entityType:e,groups:t})=>[e,t.map(({group:e})=>e)])),metaEntries:new Map(o.flatMap(({entityType:e,groups:[t]})=>t?[[e,t.entryCtx]]:[]))}},$=(e,t,{model:i,components:r})=>{let n=new Set([e,...[...i.aliases].filter(([,t])=>t.includes(e)).map(([e])=>e)]),s=r.find(e=>e.componentName===O&&String(e.instanceName)===t&&n.has(e.typeOrAlias));if(s?.implementation.kind!=="userBound"||"composite"!==s.implementation.implementation.kind)return;let o=s.implementation.implementation.resolvedProps.exportState;return"string"==typeof o?o:void 0},F=e=>`${e}Meta`,V=e=>`${e}ScreenshotView`,k=(e,{typeSuffix:t})=>`${e}${t}`,K=(e,t,i)=>{for(let[r,n]of e){let e=k(r,t);[...i.resolvedShapes.keys()].some(t=>t===e)&&n.error(a.ASSISTANT_RECIPE_GROUPS_TYPE_NAME_CONFLICT,l.ASSISTANT_RECIPE_GROUPS_TYPE_NAME_CONFLICT(t,r,e))}},Y=e=>`${e.charAt(0).toUpperCase()+e.slice(1)}Result`,x=e=>{let t=(({anyOf:e,oneOf:t})=>[...e??[],...t??[]].filter(e=>"null"!==e.type))(e);return e.$ref||1!==t.length?e:t[0]},G=(e,t)=>{let{type:i,enumValues:r,localized:s,description:o}=_(e,t),a={...i,nonNull:!1},l=s?`${n(o,r)??""} ${C}`.trim():n(o,r);return{type:{...s?{kind:"scalar",name:"JSON",nonNull:!1}:a,nonNull:i.nonNull},...void 0===l?{}:{description:l}}},H=(t,i)=>{let r=(t=>{let i=x(t),r=i?.type==="array"&&i.items&&!e(i.items)?x(i.items):void 0,n=r??i;if(n?.$ref!==void 0&&"$DomainEntity"===c(n.$ref))return{target:n.references??E,list:void 0!==r}})(t);if(r)return{kind:"edge",...r,nullable:T(t,i),...void 0===t.description?{}:{description:t.description}};let{type:s,enumValues:o,localized:a,description:l}=_(t,i),S=n(l,o);return a?{kind:"value",type:{kind:"scalar",name:"JSON",nonNull:s.nonNull},description:`${l??""} ${C}`.trim()}:{kind:"value",type:s,...void 0===S?{}:{description:S}}},B=(e,t)=>{let{type:i,enumValues:r,localized:n,description:s}=_(e,t);return{type:{kind:"value",type:i},localized:!0===n,description:s,enumValues:r}},z=(e,t,i,r,s)=>{let o=t.startsWith("$")?((e,t,i,r)=>{let n=((e,t,{expressions:i,entityTypes:r})=>{let n=r.find(t=>t===e);for(let r of void 0===n?[e]:i.entityExpressions.get(n)?.shapeGroups??[]){let e=[...i.expressions.get(r)?.values()??[]].find(e=>e.name===t);if(e?.declaredSchema)return{implementation:e.implementation,declaredSchema:e.declaredSchema}}})(e.name,t,i);if(!n)return void r.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("entities",e.name,t));let{implementation:s}=n;if("violations"===s.kind)return void r.error(a.ASSISTANT_UNSUPPORTED_EXPRESSION,l.ASSISTANT_UNSUPPORTED_EXPRESSION(e.name,t));if("relation"===s.kind){let[{target:e,cardinality:t}]=s.params;return{type:{kind:"edge",target:e,cardinality:t},localized:!1,description:void 0}}return B(n.declaredSchema,i.resolveRef)})(e,t,r,s):((e,t,{resolveRef:i},r)=>{let n=Object.entries(e.shape.properties).find(([e])=>e===t)?.[1];return n?B(n,i):void r.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("entities",e.name,t))})(e,t,r,s);if(!o)return;let S=i?.as??(t.startsWith("$")?`_${t.slice(1)}`:t);return v.has(S)?void s.error(a.ASSISTANT_RESERVED_FIELD_NAME,l.ASSISTANT_RESERVED_FIELD_NAME(e.name,t,S)):{name:S,source:t,type:o.type,localized:o.localized,description:n(i?.description??o.description,o.enumValues),describedByManifest:i?.description!==void 0,enumValues:o.enumValues,valueDescription:i?.description??o.description,...i?.lenses?.length?{lenses:[...new Set(i.lenses)]}:{}}},J=(e,t,i,r,n)=>s(t,i,r,(t,i,r)=>{n.error(a.ASSISTANT_FIELD_NAME_CONFLICT,l.ASSISTANT_FIELD_NAME_CONFLICT(e,t,[i,r]))});export const resolveAssistantManifest=(e,{model:t,states:i,phxDefinitions:r,expressions:n,components:s,actions:S},N)=>{let T=N.errors.length,c=N.at("entities"),A=p(t.commonTypes,r);for(let e of t.resolvedShapes.keys())R.has(e)&&N.error(a.ASSISTANT_RESERVED_TYPE_NAME,l.ASSISTANT_RESERVED_TYPE_NAME(e,[...R]));let m=((e,t,i)=>{let r=new Map;for(let n of e){let e=[];for(let[r,s]of Object.entries(n.entries)){let o=z(n,r,s,t,i.at(n.name,r));o&&e.push(o)}r.set(n.name,e)}return r})(((e,t,i)=>{let r=[];for(let[i,n]of t.resolvedShapes){let t=e[i];t&&r.push({name:i,shape:n,entries:t})}let n=new Set(t.resolvedShapes.keys());for(let t of Object.keys(e))n.has(t)||i.at(t).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("entities",t));return r})(e.entities??{},t,c),{resolveRef:A,expressions:n,entityTypes:t.entityTypes},c),f=J(E,[],m.get(E)??[],()=>void 0,N),I=new Map([[E,f]]);for(let e of t.aliases.keys())e!==E&&I.set(e,J(e,[f],m.get(e)??[],()=>void 0,N));for(let e of t.entityTypes){let i=[E,...[...t.aliases].filter(([t,i])=>t!==E&&i.includes(e)).map(([e])=>e)],r=[...t.resolvedShapes].find(([t])=>t===e)?.[1];I.set(e,J(e,i.map(e=>I.get(e)??[]),m.get(e)??[],e=>{let t=Object.entries(r?.properties??{}).find(([t])=>t===e)?.[1];return t&&_(t,A).enumValues},N))}let v=Object.fromEntries(t.entityTypes.map(e=>[e,Object.fromEntries((I.get(e)??[]).map(({name:e,source:t,localized:i})=>[e,i?{source:t,localized:!0}:{source:t}]))])),j=W(e.childRecipes??{},y,{model:t,components:s},N.at("childRecipes")),x=W(e.replaceRecipes??{},h,{model:t,components:s},N.at("replaceRecipes")),B=((e,t,i)=>{let r=new Set;for(let n of Object.keys(e)){let e=t.entityTypes.find(e=>e===n),s=e?[e]:[...t.aliases].find(([e])=>e===n)?.[1];s?s.forEach(e=>r.add(e)):i.at(n).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("deletable",n))}return t.entityTypes.filter(e=>r.has(e))})(e.deletable??{},t,N.at("deletable")),X=((e,t,i)=>{let{model:r}=t,n=((e,t,i)=>{let r=new Map;for(let[n,s]of Object.entries(e)){let e=t.entityTypes.find(e=>e===n),o=e?[e]:[...t.aliases].find(([e])=>e===n)?.[1],S=[...t.resolvedShapes].find(([e])=>e===n)?.[1];if(!o||!S){i.at(n).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("writable",n));continue}for(let e of Object.keys(s)){let t=i.at(n,e);e.startsWith("$")||M.has(e)?t.error(a.ASSISTANT_NOT_WRITABLE,l.ASSISTANT_NOT_WRITABLE(n,e)):g(S.properties,e)?o.forEach(t=>{let i=r.get(t)??new Map;r.set(t,i.has(e)?i:i.set(e,n))}):t.error(a.ASSISTANT_UNKNOWN_FIELD,l.ASSISTANT_UNKNOWN_FIELD("writable",n,e))}}return r})(e,r,i);return r.entityTypes.flatMap(e=>{let s=[...r.resolvedShapes].find(([t])=>t===e)?.[1],o=[...n.get(e)??[]].flatMap(([r,n])=>{let o=s&&g(s.properties,r);return(o&&P(e,{property:r,writableKey:n},o,t,i))??[]});return o.length>0?[{entityType:e,fields:o}]:[]})})(e.writable??{},{model:t,resolveRef:A,exposed:m,sources:v},N.at("writable")),Z=((e,t,i,r)=>{let{model:n}=i,s=new Map,o=e=>{let t=n.entityTypes.find(t=>t===e);return t?[t]:[...n.aliases].find(([t])=>t===e)?.[1]??[]},S=new Set(Object.entries(e).flatMap(([e,t])=>Object.entries(t).flatMap(([t,i])=>i?.options===void 0?[]:o(e).map(e=>`${e}.${t}`)))),N=new Set;for(let[n,p]of Object.entries(e)){let e=o(n);for(let[o,T]of Object.entries(p)){let p=T?.options;if(null===p)continue;let c=p?r.at(n,o,"options"):r.at(n,o),_=`${n}.${o}`;for(let r of e){let e=t.find(e=>e.entityType===r)?.fields.find(e=>e.property===o),n=`${r}.${o}`;if(!e||!p&&(S.has(n)||N.has(n)))continue;p||N.add(n);let T=s.get(r)??[],d=p?.componentType===void 0||void 0===p.instanceName?void 0:{componentType:p.componentType,instanceName:p.instanceName},E=d?[d]:D(r,o,i),[A]=E,m=p?.as??`${e.name}Options`,f=T.find(t=>t.options.edgeName===m||t.options.field===e.name);if(d&&!w(r,d.componentType,i).includes(d.instanceName))c.error(a.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT,l.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT(_,d,r,w(r,d.componentType,i)));else if(E.length>1)c.error(a.ASSISTANT_AMBIGUOUS_OPTIONS_COMPONENT,l.ASSISTANT_AMBIGUOUS_OPTIONS_COMPONENT(p?`${_}.options`:_,r,E));else if(A)if(m===y.section||m===h.section||"screenshot"===m)c.error(a.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME,l.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME(_,m,e.name));else if(f)c.error(a.ASSISTANT_DUPLICATE_OPTIONS_EDGE,l.ASSISTANT_DUPLICATE_OPTIONS_EDGE(r,f.options.edgeName===m?{edgeName:m}:{field:e.name},[f.entry,_]));else{let t={field:e.name,edgeName:m,componentType:A.componentType,instanceName:A.instanceName,validate:p?.validate??!0,dryRuns:p?.allowDryRuns??!0};s.set(r,[...T,{options:t,hints:U(p?.hints),entry:_,entryCtx:c}])}else p&&c.error(a.ASSISTANT_MISSING_OPTIONS_COMPONENT,l.ASSISTANT_MISSING_OPTIONS_COMPONENT(_,r,o))}}}return s})(e.writable??{},X,{model:t,components:s},N.at("writable")),Q=((e,t,i)=>{let{model:r,states:n}=t,s=new Map;for(let[o,S]of Object.entries(e)){let e=r.entityTypes.find(e=>e===o),N=e?[e]:[...r.aliases].find(([e])=>e===o)?.[1];if(!N){i.at(o).error(a.ASSISTANT_UNKNOWN_TYPE,l.ASSISTANT_UNKNOWN_TYPE("screenshots",o));continue}for(let[e,{description:r,as:p}]of Object.entries(S)){let S=i.at(o,e),T=`${o}.${e}`,c={view:p??e,instanceName:e,description:r};if(!u.test(c.view)){S.error(a.ASSISTANT_INVALID_SCREENSHOT_VIEW_NAME,l.ASSISTANT_INVALID_SCREENSHOT_VIEW_NAME(o,e,c.view));continue}for(let i of N){let r=w(i,O,t),N=$(i,e,t),p=s.get(i)??[],_=p.find(e=>e.view.view===c.view);r.includes(e)?void 0===N||n.exportStates.includes(N)?_?S.error(a.ASSISTANT_DUPLICATE_SCREENSHOT_VIEW,l.ASSISTANT_DUPLICATE_SCREENSHOT_VIEW(i,c.view,[_.entry,T])):s.set(i,[...p,{view:c,entry:T,entryCtx:S}]):S.error(a.ASSISTANT_UNKNOWN_SCREENSHOT_EXPORT_STATE,l.ASSISTANT_UNKNOWN_SCREENSHOT_EXPORT_STATE(o,e,N,n.exportStates)):S.error(a.ASSISTANT_UNKNOWN_SCREENSHOT_VIEW,l.ASSISTANT_UNKNOWN_SCREENSHOT_VIEW(o,e,i,r))}}}let o=r.entityTypes.flatMap(e=>{let t=s.get(e);return t?[{entityType:e,views:t}]:[]});return{views:new Map(o.map(({entityType:e,views:t})=>[e,t.map(({view:e})=>e)])),metaEntries:new Map(o.flatMap(({entityType:e,views:[t]})=>t?[[e,t.entryCtx]]:[]))}})(e.screenshots??{},{model:t,components:s,states:i},N.at("screenshots")),q=t.entityTypes.filter(e=>w(e,"violations",{model:t,components:s}).length>0);var ee=[j.metaEntries,x.metaEntries,new Map([...Z].flatMap(([e,[t]])=>t?[[e,t.entryCtx]]:[])),Q.metaEntries,new Map(q.map(e=>[e,N]))];for(let e of t.entityTypes){let i=ee.flatMap(t=>t.get(e)??[])[0],r=F(e);i&&[...t.resolvedShapes.keys()].some(e=>e===r)&&i.error(a.ASSISTANT_META_TYPE_NAME_CONFLICT,l.ASSISTANT_META_TYPE_NAME_CONFLICT(e,r))}for(let[e,i]of(K(j.metaEntries,y,t),K(x.metaEntries,h,t),Q.metaEntries)){let r=V(e);[...t.resolvedShapes.keys()].some(e=>e===r)&&i.error(a.ASSISTANT_SCREENSHOT_VIEW_TYPE_NAME_CONFLICT,l.ASSISTANT_SCREENSHOT_VIEW_TYPE_NAME_CONFLICT(e,r))}let et=t.entityTypes.filter(e=>(j.groups[e]?.length??0)>0||(x.groups[e]?.length??0)>0||(Z.get(e)?.length??0)>0||Q.views.has(e)||q.includes(e)).flatMap(e=>[F(e),...(j.groups[e]?.length??0)>0?[k(e,y)]:[],...(x.groups[e]?.length??0)>0?[k(e,h)]:[],...Q.views.has(e)?[V(e)]:[]]),ei=((e,{actions:t,resolveRef:i,builtInMutations:r,typeNames:n},s)=>{let o=[],S=[...t.values()].map(e=>String(e.name));for(let[N,p]of Object.entries(e)){let e=s.at(N),T=[...t.values()].find(e=>e.name===N);if(!T){e.error(a.ASSISTANT_UNKNOWN_ACTION,l.ASSISTANT_UNKNOWN_ACTION(N,S));continue}let c=p?.as??N,_=o.find(e=>e.fieldName===c),d=Y(c);if(r.has(c)||_){e.error(a.ASSISTANT_MUTATION_NAME_CONFLICT,l.ASSISTANT_MUTATION_NAME_CONFLICT(N,c,_?`"assistant.actions.${_.actionName}" already exposes`:"the built-in mutation of that name already takes"));continue}if(n.has(d)||o.some(e=>Y(e.fieldName)===d)){e.error(a.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT,l.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT(N,c,d));continue}let E=p?.description??T.description;o.push({fieldName:c,actionName:N,...void 0===E?{}:{description:E},args:Object.fromEntries(Object.entries(T.params).map(([e,{schema:t}])=>[e,G(t,i)])),result:Object.fromEntries(Object.entries(T.result).map(([e,t])=>[e,H(t,i)]))})}return o})(e.actions??{},{actions:S,resolveRef:A,builtInMutations:new Set(["deleteEntity",y.mutation,h.mutation,...X.map(({entityType:e})=>`modify${e}`)]),typeNames:new Set([...R,...t.resolvedShapes.keys(),...et])},N.at("actions")),er=((e,t)=>{let i=e.lenses??{},r=new Set;for(let[n,s]of Object.entries(e.entities??{}))for(let[e,o]of Object.entries(s))for(let s of o?.lenses??[])Object.hasOwn(i,s)?r.add(s):t.at("entities",n,e,"lenses").error(a.ASSISTANT_UNKNOWN_LENS,l.ASSISTANT_UNKNOWN_LENS(`${n}.${e}`,s,Object.keys(i)));for(let e of Object.keys(i))b.has(e)?t.at("lenses",e).error(a.ASSISTANT_RESERVED_LENS_NAME,l.ASSISTANT_RESERVED_LENS_NAME(e,[...b])):r.has(e)||t.at("lenses",e).error(a.ASSISTANT_EMPTY_LENS,l.ASSISTANT_EMPTY_LENS(e));return Object.fromEntries(Object.entries(i).map(([e,{description:t,maxDepth:i}])=>[e,{description:t,maxDepth:i??1}]))})(e,N),en=d(e.formElements??{},N.at("formElements"));if(N.errors.length>T)return;let es=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.entries(t).map(([e,t])=>L(e,t))]));return{declarations:{entities:Object.fromEntries(Object.keys(e.entities??{}).map(e=>[e,(m.get(e)??[]).map(e=>({name:e.name,source:e.source,type:e.type,localized:e.localized,describedByManifest:e.describedByManifest,...void 0===e.description?{}:{description:e.description},...void 0===e.valueDescription?{}:{valueDescription:e.valueDescription},...void 0===e.enumValues?{}:{enumValues:e.enumValues},...void 0===e.lenses?{}:{lenses:e.lenses}}))])),enumValues:Object.fromEntries(t.entityTypes.map(e=>[e,Object.fromEntries(Object.entries(t.resolvedShapes.get(e)?.properties??{}).flatMap(([e,t])=>{let i=_(t,A).enumValues;return i?[[e,i]]:[]}))])),deletable:Object.keys(e.deletable??{}),writable:Object.fromEntries(Object.entries(e.writable??{}).map(([e,i])=>[e,Object.fromEntries(Object.entries(i).map(([i,r])=>[i,{defaultOptionsName:r?.options?.as===void 0,members:Object.fromEntries(t.entityTypes.filter(i=>i===e||[...t.aliases].find(([t])=>t===e)?.[1].includes(i)).flatMap(r=>{let n=g(t.resolvedShapes.get(r)?.properties??{},i),s=n&&P(r,{property:i,writableKey:e},n,{model:t,resolveRef:A,exposed:new Map,sources:{}},N.at("writable")),o=Z.get(r)?.find(t=>t.entry===`${e}.${i}`);return s?[[r,{field:s,..._(n,A).localized?{exposedDescription:C}:{},...o?{options:{options:o.options,hints:o.hints}}:{}}]]:[]}))}]))])),childRecipes:es(e.childRecipes??{}),replaceRecipes:es(e.replaceRecipes??{}),screenshots:Object.fromEntries(Object.entries(e.screenshots??{}).map(([e,t])=>[e,Object.entries(t).map(([e,{description:t,as:i}])=>({view:i??e,instanceName:e,description:t}))]))},entityTypes:t.entityTypes,aliases:Object.fromEntries(t.aliases),exampleType:t.rootEntityTypes[0]??t.entityTypes[0],states:{navigationStates:i.navigationStates,viewStates:i.viewStates,toolStates:i.toolStates},deletableTypes:B,writableTypes:X,actionFields:ei,invariantTypes:q,childRecipes:j.groups,replaceRecipes:x.groups,optionsEdges:Object.fromEntries([...Z].map(([e,t])=>[e,t.map(({options:e,hints:t})=>({options:e,hints:t}))])),screenshots:Object.fromEntries(Q.views),fields:Object.fromEntries([...I].map(([e,t])=>[e,t.map(t=>o(t,m.get(e)??[]))])),lenses:er,formElements:en}};export const createAssistantSchema=(e,t,n)=>{let s=resolveAssistantManifest(e,t,n);if(s)try{return{...r(s),resolved:s}}catch(e){if(e instanceof i)return void n.at("entities").error(a.ASSISTANT_FIELD_SHAPE_CONFLICT,l.ASSISTANT_FIELD_SHAPE_CONFLICT(e.fieldName,e.exposures));n.error(a.ASSISTANT_INVALID_SCHEMA,l.ASSISTANT_INVALID_SCHEMA([e instanceof Error?e.message:String(e)]));return}};
@@ -1 +1 @@
1
- import{Branded as t}from"@salsita-ai/common/utils";import{createAssistantSchema as s}from"./assistant-schema.js";export const AssistantSpec=(i,a,n)=>{let{manifest:l,origin:r}=i;if(!l)return null;let e=s(l,a,(r?n.inFile(r):n).at("assistant"));return e?t(e):null};
1
+ import{Branded as t}from"@salsita-ai/common/utils";import{createAssistantSchema as s}from"./assistant-schema.js";export const AssistantSpec=(a,i,n)=>{let{manifest:r}=a;if(!r)return null;let l=s(r,i,n.at("assistant"));return l?t(l):null};
@@ -1,27 +1,10 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { ChunkName as ChunkNameData, Chunks as ChunksData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
3
  import type { MergedChunks } from '../../../merge/index.js';
4
- /**
5
- * Validated published-data chunk name.
6
- * Chunk names identify top-level partitions in generated `publishedData`. Data
7
- * entries point to these names through their `chunk` field, and the parser adds
8
- * the reserved `system` chunk when user chunks exist.
9
- */
10
- export type ChunkName = Branded<'ChunkName', string>;
4
+ export type { ChunkDefinition } from '#package/domain';
5
+ /** A validated published-data chunk name; see {@link ChunkNameData | ChunkName} in `domain`. */
6
+ export type ChunkName = ChunkNameData;
11
7
  export declare const ChunkName: (name: string, ctx: ParseContext) => ChunkName | undefined;
12
- /**
13
- * A named partition of published data with a scope.
14
- * `scope` is typically `'project'` (per-project data) or `'public'` (shared).
15
- */
16
- export interface ChunkDefinition {
17
- /** Visibility/storage scope used by runtime data publishing for this chunk. */
18
- readonly scope: string;
19
- }
20
- /**
21
- * Validated chunk definitions, keyed by chunk name.
22
- * When any user-defined chunks are present, the reserved `system` chunk is
23
- * auto-injected with `scope: 'public'` to carry admin presets/recipes schemas.
24
- * When the input is empty, no system injection happens (mirrors domain-spec behavior).
25
- */
26
- export type Chunks = Readonly<Record<ChunkName, ChunkDefinition>>;
8
+ /** The validated chunk definitions by chunk name; see {@link ChunksData | Chunks} in `domain`. */
9
+ export type Chunks = ChunksData;
27
10
  export declare const Chunks: (merged: MergedChunks, ctx: ParseContext) => Chunks | undefined;
@@ -1,24 +1,9 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { DataCellValue, DataSchema } from '#package/domain';
2
+ import type { CustomDataSpecEntry } from '#package/domain';
3
3
  import { type ParseContext } from '../../../../core/index.js';
4
4
  import type { MergedDataSpec } from '../../../merge/index.js';
5
5
  import { type ChunkDefinition, ChunkName } from './chunks.js';
6
6
  import { DataEntryKey } from './data-entry-key.js';
7
- /** Parsed `$data.custom` entry with validated definition and normalized row values. */
8
- export interface CustomDataSpecEntry {
9
- /** Column/property schema for a custom data row, used by admin pages and published-data schemas. */
10
- readonly definition: DataSchema;
11
- /** Optional published-data chunk that receives this entry as an array property. */
12
- readonly chunk?: string;
13
- /** Ownership mode deciding whether data is manual, externally connected, or admin-generated. */
14
- readonly kind: 'manual' | 'connected' | 'generated';
15
- /** Optional human-readable label used by inferred admin pages and connected-data UI. */
16
- readonly title?: string;
17
- /** Optional icon name used in inferred admin navigation. */
18
- readonly icon?: string;
19
- /** Default rows normalized to the same column order as `definition`. */
20
- readonly values?: ReadonlyArray<readonly DataCellValue[]>;
21
- }
22
7
  /**
23
8
  * Validated `$data.custom` section.
24
9
  * Every key is a validated data entry key, every definition field has a valid
@@ -1,13 +1,7 @@
1
- import { Branded } from '@salsita-ai/common/utils';
1
+ import type { DataEntryKey as DataEntryKeyData } from '#package/domain';
2
2
  import type { ParseContext } from '../../../../core/index.js';
3
3
  /** `$data` subsection that owns a data entry key and determines its raw entry shape. */
4
4
  export type DataEntrySection = 'custom' | 'swatchOptions';
5
- /**
6
- * Validated `$data` entry key.
7
- * This is the stable identifier for a data collection declared under `$data.custom`
8
- * or `$data.swatchOptions`. The same key is used when extending published data,
9
- * wiring connected/generated admin pages, and linking explicit admin pages through
10
- * `connectedDataEntry`.
11
- */
12
- export type DataEntryKey = Branded<'DataEntryKey', string>;
5
+ /** A validated `$data` entry key; see {@link DataEntryKeyData | DataEntryKey} in `domain`. */
6
+ export type DataEntryKey = DataEntryKeyData;
13
7
  export declare const DataEntryKey: (section: DataEntrySection, key: string, ctx: ParseContext) => DataEntryKey | undefined;
@@ -1,18 +1,9 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { DataCellValue, DataSchema } from '#package/domain';
2
+ import { type DataCellValue, type DataSchema, type ParsedDataSpecEntries } from '#package/domain';
3
3
  import { type ParseContext } from '../../../../core/index.js';
4
4
  import type { MergedChunks, MergedDataSpec } from '../../../merge/index.js';
5
5
  import { Chunks } from './chunks.js';
6
- import { type CustomDataSpecEntry } from './custom-data-spec.js';
7
6
  import type { DataEntryKey } from './data-entry-key.js';
8
- import { type SwatchDataSpecEntry } from './swatch-data-spec.js';
9
- /** Validated `$data` entries grouped by their source section. */
10
- export interface ParsedDataSpecEntries {
11
- /** Custom data entries with user-declared schemas. */
12
- readonly custom: Readonly<Record<DataEntryKey, CustomDataSpecEntry>>;
13
- /** Swatch data entries with the built-in swatch schema. */
14
- readonly swatchOptions: Readonly<Record<DataEntryKey, SwatchDataSpecEntry>>;
15
- }
16
7
  export interface DataSpecDataEntry {
17
8
  /** Data entry identifier used as published-data property and admin page navigation state. */
18
9
  readonly key: DataEntryKey;