@salsita-ai/sdk 0.50.0-develop.538edd3280 → 0.50.0-develop.6724f281c5

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 (690) hide show
  1. package/README.md +1 -1
  2. package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
  3. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  4. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  5. package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
  6. package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
  7. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  8. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  9. package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
  10. package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
  11. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
  12. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
  13. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
  14. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
  15. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
  16. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
  17. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
  18. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
  19. package/dist/application-spec/generate-application/code/templates/domain-spec.js +4 -4
  20. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  21. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -0
  22. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  23. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +1 -1
  24. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  25. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +41 -13
  26. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +1 -1
  27. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +2 -2
  28. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  29. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +30 -3
  32. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -5
  33. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -4
  34. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
  35. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
  36. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -8
  37. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  38. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +9 -43
  39. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  40. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +2 -2
  41. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -21
  42. package/dist/client/phoenix-api.d.ts +58 -30
  43. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  44. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +158 -13
  45. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  46. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  47. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  48. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +8 -3
  49. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  50. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  51. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  52. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  53. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  54. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  55. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  56. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  57. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  58. package/dist/configurator/index.d.ts +0 -1
  59. package/dist/configurator/index.js +1 -1
  60. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  61. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  62. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  63. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +1 -6
  64. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  65. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  66. package/dist/configurator/ui/assistant/AssistantThread.d.ts +1 -6
  67. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  68. package/dist/configurator/ui/assistant/index.d.ts +1 -1
  69. package/dist/configurator/ui/assistant/index.js +1 -1
  70. package/dist/configurator/ui/assistant/thread-items.d.ts +1 -1
  71. package/dist/configurator/ui/assistant/tool-chip.d.ts +8 -1
  72. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  73. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  74. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  75. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +2 -2
  76. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  77. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  78. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  79. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +2 -2
  80. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  81. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
  82. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
  83. package/dist/docs/index.json +1 -1
  84. package/dist/docs/layouts/custom-price.mdx +14 -16
  85. package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
  86. package/dist/docs/layouts/toolbar.mdx +3 -1
  87. package/dist/docs/other-features/domain-actions.mdx +1 -1
  88. package/dist/docs/other-features/side-effects.mdx +68 -34
  89. package/dist/docs/other-features/transformers.mdx +1 -1
  90. package/dist/docs/phoenix/admin.mdx +9 -24
  91. package/dist/docs/phoenix/deployments.mdx +1 -1
  92. package/dist/docs/phoenix/localization.mdx +3 -22
  93. package/dist/docs/phoenix/phoenix-cli.mdx +102 -23
  94. package/dist/docs/phoenix/project-structure.mdx +9 -2
  95. package/dist/docs/phoenix/sdk-builder-workflow.mdx +10 -9
  96. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
  97. package/dist/docs/relations/hierarchy.mdx +13 -2
  98. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
  99. package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
  100. package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
  101. package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
  102. package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
  103. package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
  104. package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
  105. package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
  106. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +1 -4
  107. package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
  108. package/dist/domain/admin-domain/index.d.ts +3 -4
  109. package/dist/domain/admin-domain/index.js +1 -1
  110. package/dist/domain/application/admin-page-factories.d.ts +1 -1
  111. package/dist/domain/application/application-config.d.ts +25 -75
  112. package/dist/domain/application/assistant/assistant-manifest.d.ts +63 -0
  113. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
  114. package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
  115. package/dist/domain/application/assistant/assistant-value-type.js +1 -0
  116. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
  117. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
  118. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
  119. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
  120. package/dist/domain/application/assistant/index.d.ts +4 -0
  121. package/dist/domain/application/assistant/index.js +1 -0
  122. package/dist/domain/application/assistant-field-options.d.ts +2 -3
  123. package/dist/domain/application/assistant-mutations.d.ts +2 -5
  124. package/dist/domain/application/assistant-mutations.js +1 -1
  125. package/dist/domain/application/assistant-recipe-groups.d.ts +2 -6
  126. package/dist/domain/application/configurator-builder.d.ts +33 -18
  127. package/dist/domain/application/configurator-builder.js +1 -1
  128. package/dist/domain/application/element-registration.d.ts +5 -0
  129. package/dist/domain/application/element-registration.js +1 -1
  130. package/dist/domain/application/handler-registration.d.ts +5 -0
  131. package/dist/domain/application/handler-registration.js +1 -1
  132. package/dist/domain/application/index.d.ts +6 -5
  133. package/dist/domain/application/index.js +1 -1
  134. package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
  135. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  136. package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
  137. package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
  138. package/dist/domain/application/resolve-imported-transformers.js +1 -1
  139. package/dist/domain/available-system-components.js +1 -1
  140. package/dist/domain/{actions → core/action}/action-factory.d.ts +5 -4
  141. package/dist/domain/core/{action.d.ts → action/action.d.ts} +6 -7
  142. package/dist/domain/core/action/index.d.ts +3 -0
  143. package/dist/domain/core/action/index.js +1 -0
  144. package/dist/domain/{actions → core/action}/prepare-action-implementations.d.ts +1 -1
  145. package/dist/domain/core/action/prepare-action-implementations.js +5 -0
  146. package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
  147. package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
  148. package/dist/domain/core/component/debug-state-component.js +1 -0
  149. package/dist/domain/{components → core/component}/domain-component-optic.d.ts +6 -6
  150. package/dist/domain/core/component/domain-component-optic.js +16 -0
  151. package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
  152. package/dist/domain/core/component/drag-state-component.js +1 -0
  153. package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
  154. package/dist/domain/core/component/export-state-component.js +1 -0
  155. package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
  156. package/dist/domain/core/component/fullscreen-state-component.js +1 -0
  157. package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
  158. package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
  159. package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
  160. package/dist/domain/core/component/hover-state-component.js +1 -0
  161. package/dist/domain/core/component/index.d.ts +18 -0
  162. package/dist/domain/core/component/index.js +1 -0
  163. package/dist/domain/{components → core/component}/legacy-filter.d.ts +2 -2
  164. package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
  165. package/dist/domain/core/component/navigation-state-component.js +1 -0
  166. package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
  167. package/dist/domain/core/component/selection-state-component.js +1 -0
  168. package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
  169. package/dist/domain/core/component/system-component-builder.js +1 -0
  170. package/dist/domain/{components → core/component}/system-component-filter.d.ts +3 -3
  171. package/dist/domain/core/component/system-virtual-entity.js +1 -0
  172. package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
  173. package/dist/domain/core/component/tool-state-component.js +1 -0
  174. package/dist/domain/{components → core/component}/updates.d.ts +17 -2
  175. package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
  176. package/dist/domain/core/component/view-state-component.js +1 -0
  177. package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
  178. package/dist/domain/core/component/viewport-state-component.js +1 -0
  179. package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
  180. package/dist/domain/core/decoder/create-decoder.js +1 -0
  181. package/dist/domain/core/decoder/decoder.d.ts +6 -0
  182. package/dist/domain/core/decoder/index.d.ts +2 -0
  183. package/dist/domain/core/decoder/index.js +1 -0
  184. package/dist/domain/core/domain-factory.d.ts +4 -5
  185. package/dist/domain/core/domain-factory.js +1 -1
  186. package/dist/domain/core/domain.d.ts +3 -4
  187. package/dist/domain/core/domain.js +1 -1
  188. package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
  189. package/dist/domain/core/expression/constant-expressions.js +1 -0
  190. package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +4 -5
  191. package/dist/domain/core/expression/custom-expression.js +1 -0
  192. package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +6 -8
  193. package/dist/domain/core/expression/index.d.ts +5 -0
  194. package/dist/domain/core/expression/index.js +1 -0
  195. package/dist/domain/{expressions → core/expression}/memoize-expression.d.ts +2 -2
  196. package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.d.ts +1 -1
  197. package/dist/domain/core/index.d.ts +11 -17
  198. package/dist/domain/core/index.js +1 -1
  199. package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
  200. package/dist/domain/{invariants → core/invariant}/custom-invariants.d.ts +2 -3
  201. package/dist/domain/core/invariant/custom-invariants.js +1 -0
  202. package/dist/domain/core/invariant/index.d.ts +5 -0
  203. package/dist/domain/core/invariant/index.js +1 -0
  204. package/dist/domain/{invariants → core/invariant}/invariants.d.ts +12 -4
  205. package/dist/domain/core/invariant/invariants.js +1 -0
  206. package/dist/domain/core/invariant/violation-component.js +1 -0
  207. package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
  208. package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
  209. package/dist/domain/core/model/index.d.ts +6 -0
  210. package/dist/domain/core/model/index.js +1 -0
  211. package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
  212. package/dist/domain/core/model/reflection.js +1 -0
  213. package/dist/domain/core/recipe/index.d.ts +1 -0
  214. package/dist/domain/core/recipe/index.js +1 -0
  215. package/dist/domain/{domain-context/recipe-system → core/recipe}/recipes.d.ts +1 -3
  216. package/dist/domain/core/recipe/recipes.js +1 -0
  217. package/dist/domain/{relations → core/relation}/all-of-type-relation.d.ts +3 -4
  218. package/dist/domain/core/relation/all-of-type-relation.js +1 -0
  219. package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -2
  220. package/dist/domain/core/relation/component-factories.js +1 -0
  221. package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
  222. package/dist/domain/core/relation/composed-of.js +1 -0
  223. package/dist/domain/{relations → core/relation}/direct-relation.d.ts +2 -3
  224. package/dist/domain/core/relation/index.d.ts +9 -0
  225. package/dist/domain/core/relation/index.js +1 -0
  226. package/dist/domain/{relations → core/relation}/indirect-relation.d.ts +3 -4
  227. package/dist/domain/core/relation/indirect-relation.js +1 -0
  228. package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -5
  229. package/dist/domain/core/relation/reference-component.js +1 -0
  230. package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
  231. package/dist/domain/{relations → core/relation}/relation-factory.d.ts +2 -3
  232. package/dist/domain/{relations → core/relation}/relation-implementation.d.ts +3 -4
  233. package/dist/domain/core/relation/relation-implementation.js +1 -0
  234. package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
  235. package/dist/domain/core/schema/extended-schema-validator.js +1 -0
  236. package/dist/domain/core/schema/index.d.ts +3 -0
  237. package/dist/domain/core/schema/index.js +1 -0
  238. package/dist/domain/core/schema/schema-validator.js +1 -0
  239. package/dist/domain/core/state/id-sequence.d.ts +15 -0
  240. package/dist/domain/core/state/id-sequence.js +1 -0
  241. package/dist/domain/core/state/index.d.ts +3 -0
  242. package/dist/domain/core/state/index.js +1 -0
  243. package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
  244. package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
  245. package/dist/domain/domain-builder.d.ts +11 -8
  246. package/dist/domain/domain-builder.js +1 -1
  247. package/dist/domain/domain-context/action-system/action-system.d.ts +1 -3
  248. package/dist/domain/domain-context/action-system/action-system.js +1 -1
  249. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  250. package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
  251. package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +1 -2
  252. package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
  253. package/dist/domain/domain-context/index.d.ts +2 -3
  254. package/dist/domain/domain-context/index.js +1 -1
  255. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -5
  256. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  257. package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
  258. package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
  259. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  260. package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
  261. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -3
  262. package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
  263. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
  264. package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
  265. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
  266. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
  267. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
  268. package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
  269. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
  270. package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
  271. package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
  272. package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
  273. package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
  274. package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
  275. package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
  276. package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
  277. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -5
  278. package/dist/domain/domain-context/store-system/store-system.js +2 -2
  279. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
  280. package/dist/domain/domain-context/store-system/system-state.js +1 -1
  281. package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
  282. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  283. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -3
  284. package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
  285. package/dist/domain/domain-context/transformers/context.d.ts +1 -5
  286. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
  287. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  288. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
  289. package/dist/domain/domain-context/transformers/then-builder.js +1 -1
  290. package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -6
  291. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  292. package/dist/domain/domain-context/undo-system.d.ts +1 -1
  293. package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
  294. package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
  295. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -3
  296. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  297. package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -4
  298. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  299. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  300. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  301. package/dist/domain/domain-runtime/spec/types.d.ts +4 -5
  302. package/dist/domain/index.d.ts +1 -31
  303. package/dist/domain/index.js +1 -1
  304. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +3 -3
  305. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  306. package/dist/domain/project-modules/index.d.ts +1 -0
  307. package/dist/domain/project-modules/index.js +1 -0
  308. package/dist/domain/project-modules/project-modules.d.ts +41 -0
  309. package/dist/domain/project-modules/project-modules.js +1 -0
  310. package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -1
  311. package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
  312. package/dist/domain/projections/composition-projections.js +1 -1
  313. package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
  314. package/dist/domain/projections/snap-matching.d.ts +1 -2
  315. package/dist/domain/projections/snap-utils.d.ts +1 -2
  316. package/dist/domain/projections/validation-projections.d.ts +1 -2
  317. package/dist/domain/projections/validation-projections.js +1 -1
  318. package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
  319. package/dist/domain/system-components/admin-sidebar.js +1 -1
  320. package/dist/domain/system-components/angle-dimension.js +1 -1
  321. package/dist/domain/system-components/angle-indicator.d.ts +1 -1
  322. package/dist/domain/system-components/angle-indicator.js +1 -1
  323. package/dist/domain/system-components/application-config.d.ts +1 -1
  324. package/dist/domain/system-components/application-config.js +1 -1
  325. package/dist/domain/system-components/attribute-selection.js +1 -1
  326. package/dist/domain/system-components/attribute-switch.js +1 -1
  327. package/dist/domain/system-components/autorotate-camera-component.d.ts +1 -1
  328. package/dist/domain/system-components/autorotate-camera-component.js +1 -1
  329. package/dist/domain/system-components/basic-sidebar-footer.d.ts +1 -1
  330. package/dist/domain/system-components/basic-sidebar-footer.js +1 -1
  331. package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
  332. package/dist/domain/system-components/bounding-box-component.js +1 -1
  333. package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
  334. package/dist/domain/system-components/bounding-sphere-component.js +1 -1
  335. package/dist/domain/system-components/camera-based-hidden-entity-object.js +1 -1
  336. package/dist/domain/system-components/camera-based-hidden-entity.js +1 -1
  337. package/dist/domain/system-components/canvas-config.d.ts +1 -1
  338. package/dist/domain/system-components/canvas-config.js +1 -1
  339. package/dist/domain/system-components/canvas-custom-environment.js +1 -1
  340. package/dist/domain/system-components/canvas-padding.d.ts +1 -1
  341. package/dist/domain/system-components/canvas-padding.js +1 -1
  342. package/dist/domain/system-components/canvas-preset-environment.d.ts +1 -1
  343. package/dist/domain/system-components/canvas-preset-environment.js +1 -1
  344. package/dist/domain/system-components/child-entity-recipe-hierarchy.d.ts +1 -1
  345. package/dist/domain/system-components/child-entity-recipe-hierarchy.js +1 -1
  346. package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
  347. package/dist/domain/system-components/child-entity-recipes.js +1 -1
  348. package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
  349. package/dist/domain/system-components/child-entity-selection.js +1 -1
  350. package/dist/domain/system-components/client-side-image.js +1 -1
  351. package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
  352. package/dist/domain/system-components/collision-box-geometry.js +1 -1
  353. package/dist/domain/system-components/collision-geometries.d.ts +1 -1
  354. package/dist/domain/system-components/collision-geometry.d.ts +1 -1
  355. package/dist/domain/system-components/collision-geometry.js +1 -1
  356. package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
  357. package/dist/domain/system-components/collision-point-geometry.js +1 -1
  358. package/dist/domain/system-components/color-value.js +1 -1
  359. package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +1 -1
  360. package/dist/domain/system-components/common/dimension-indicator-schema.js +1 -1
  361. package/dist/domain/system-components/common/recipes.d.ts +1 -2
  362. package/dist/domain/system-components/constraint.d.ts +1 -1
  363. package/dist/domain/system-components/constraint.js +1 -1
  364. package/dist/domain/system-components/create-blueprint.d.ts +1 -1
  365. package/dist/domain/system-components/custom-header.d.ts +1 -1
  366. package/dist/domain/system-components/custom-header.js +1 -1
  367. package/dist/domain/system-components/custom-price-footer.js +1 -1
  368. package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
  369. package/dist/domain/system-components/custom-scene-entity.js +1 -1
  370. package/dist/domain/system-components/custom-sidebar-footer.d.ts +1 -1
  371. package/dist/domain/system-components/custom-sidebar-footer.js +1 -1
  372. package/dist/domain/system-components/detail.js +1 -1
  373. package/dist/domain/system-components/dimension-indicator.d.ts +1 -1
  374. package/dist/domain/system-components/dimension-indicator.js +1 -1
  375. package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
  376. package/dist/domain/system-components/distance-dimension-select.js +1 -1
  377. package/dist/domain/system-components/distance-dimension.d.ts +1 -1
  378. package/dist/domain/system-components/distance-dimension.js +1 -1
  379. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  380. package/dist/domain/system-components/drag-handle.js +1 -1
  381. package/dist/domain/system-components/editable-angle-indicator.d.ts +1 -1
  382. package/dist/domain/system-components/editable-angle-indicator.js +1 -1
  383. package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +1 -1
  384. package/dist/domain/system-components/editable-distance-dimension-indicator.js +1 -1
  385. package/dist/domain/system-components/editable-offset-indicator.d.ts +1 -1
  386. package/dist/domain/system-components/editable-offset-indicator.js +1 -1
  387. package/dist/domain/system-components/editable-size-indicator.d.ts +1 -1
  388. package/dist/domain/system-components/editable-size-indicator.js +1 -1
  389. package/dist/domain/system-components/entity-header.js +1 -1
  390. package/dist/domain/system-components/exit-tool-mode-fab.d.ts +1 -1
  391. package/dist/domain/system-components/exit-tool-mode-fab.js +1 -1
  392. package/dist/domain/system-components/finalize-action.d.ts +1 -1
  393. package/dist/domain/system-components/finalize-action.js +1 -1
  394. package/dist/domain/system-components/finalize-component.js +1 -1
  395. package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
  396. package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
  397. package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
  398. package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
  399. package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +1 -1
  400. package/dist/domain/system-components/fit-selection-perspective-camera-component.js +1 -1
  401. package/dist/domain/system-components/fixed-header.d.ts +1 -1
  402. package/dist/domain/system-components/fixed-header.js +1 -1
  403. package/dist/domain/system-components/floating-header.d.ts +1 -1
  404. package/dist/domain/system-components/floating-header.js +1 -1
  405. package/dist/domain/system-components/generic-dimension.d.ts +1 -1
  406. package/dist/domain/system-components/generic-dimension.js +1 -1
  407. package/dist/domain/system-components/hidden-entity.js +1 -1
  408. package/dist/domain/system-components/hidden-header.d.ts +1 -1
  409. package/dist/domain/system-components/hidden-header.js +1 -1
  410. package/dist/domain/system-components/hidden-sidebar-footer.d.ts +1 -1
  411. package/dist/domain/system-components/hidden-sidebar-footer.js +1 -1
  412. package/dist/domain/system-components/horizontal-tabs.d.ts +1 -1
  413. package/dist/domain/system-components/horizontal-tabs.js +1 -1
  414. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
  415. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  416. package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +1 -1
  417. package/dist/domain/system-components/list-selector-dimension-indicator.js +1 -1
  418. package/dist/domain/system-components/material-override-property-transition.js +1 -1
  419. package/dist/domain/system-components/material-override-transformer.js +1 -1
  420. package/dist/domain/system-components/material-swatch.js +1 -1
  421. package/dist/domain/system-components/multilingual-text-value.js +1 -1
  422. package/dist/domain/system-components/navigation-page.js +1 -1
  423. package/dist/domain/system-components/navigation-panel-list.js +1 -1
  424. package/dist/domain/system-components/navigation-steps.js +1 -1
  425. package/dist/domain/system-components/offset-anchors.d.ts +1 -1
  426. package/dist/domain/system-components/offset-anchors.js +1 -1
  427. package/dist/domain/system-components/offset-indicator.d.ts +1 -2
  428. package/dist/domain/system-components/offset-indicator.js +1 -1
  429. package/dist/domain/system-components/offset.d.ts +1 -1
  430. package/dist/domain/system-components/offset.js +1 -1
  431. package/dist/domain/system-components/other-action.d.ts +1 -1
  432. package/dist/domain/system-components/other-action.js +1 -1
  433. package/dist/domain/system-components/pivot-point.d.ts +1 -1
  434. package/dist/domain/system-components/pivot-point.js +1 -1
  435. package/dist/domain/system-components/price.js +1 -1
  436. package/dist/domain/system-components/projected-entities.d.ts +1 -1
  437. package/dist/domain/system-components/projected-entities.js +1 -1
  438. package/dist/domain/system-components/property-page.d.ts +1 -1
  439. package/dist/domain/system-components/property-page.js +1 -1
  440. package/dist/domain/system-components/read-sidebar-footer.d.ts +1 -1
  441. package/dist/domain/system-components/read-sidebar-footer.js +1 -1
  442. package/dist/domain/system-components/replace-entity-recipe-hierarchy.d.ts +1 -1
  443. package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +1 -1
  444. package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
  445. package/dist/domain/system-components/replace-entity-recipes.js +1 -1
  446. package/dist/domain/system-components/rotatable.js +1 -1
  447. package/dist/domain/system-components/rotation-handle.js +1 -1
  448. package/dist/domain/system-components/save-template-thumbnail.js +1 -1
  449. package/dist/domain/system-components/scene-entity-add-fab.js +1 -1
  450. package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
  451. package/dist/domain/system-components/scene-entity-animation.js +1 -1
  452. package/dist/domain/system-components/scene-entity-box-object.js +1 -1
  453. package/dist/domain/system-components/scene-entity-control.js +1 -1
  454. package/dist/domain/system-components/scene-entity-delete-fab.js +1 -1
  455. package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
  456. package/dist/domain/system-components/scene-entity-floor-object.js +1 -1
  457. package/dist/domain/system-components/scene-entity-html-hotspot.js +1 -1
  458. package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
  459. package/dist/domain/system-components/scene-entity-material-override.js +1 -1
  460. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +1 -1
  461. package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
  462. package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
  463. package/dist/domain/system-components/scene-entity-object-group.js +1 -1
  464. package/dist/domain/system-components/scene-entity-object-html-hotspot.js +1 -1
  465. package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
  466. package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
  467. package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
  468. package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
  469. package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
  470. package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
  471. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
  472. package/dist/domain/system-components/scene-entity-object.js +1 -1
  473. package/dist/domain/system-components/scene-entity-point-light.js +1 -1
  474. package/dist/domain/system-components/scene-entity-properties.js +1 -1
  475. package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
  476. package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
  477. package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
  478. package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
  479. package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
  480. package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
  481. package/dist/domain/system-components/scene-entity-wall-object.js +1 -1
  482. package/dist/domain/system-components/selectable-component.js +1 -1
  483. package/dist/domain/system-components/sidebar-tabs.d.ts +1 -1
  484. package/dist/domain/system-components/sidebar-tabs.js +1 -1
  485. package/dist/domain/system-components/simple-summary.js +1 -1
  486. package/dist/domain/system-components/size.d.ts +1 -1
  487. package/dist/domain/system-components/size.js +1 -1
  488. package/dist/domain/system-components/sketching-draw.d.ts +1 -1
  489. package/dist/domain/system-components/sketching-draw.js +1 -1
  490. package/dist/domain/system-components/sketching-edit.d.ts +1 -1
  491. package/dist/domain/system-components/sketching-edit.js +1 -1
  492. package/dist/domain/system-components/sketching-line.d.ts +1 -1
  493. package/dist/domain/system-components/sketching-line.js +1 -1
  494. package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
  495. package/dist/domain/system-components/sketching-rectangle.js +1 -1
  496. package/dist/domain/system-components/sketching.d.ts +1 -1
  497. package/dist/domain/system-components/sketching.js +1 -1
  498. package/dist/domain/system-components/snap-axis.d.ts +1 -1
  499. package/dist/domain/system-components/snap-axis.js +1 -1
  500. package/dist/domain/system-components/snap-edge.d.ts +1 -1
  501. package/dist/domain/system-components/snap-edge.js +1 -1
  502. package/dist/domain/system-components/snap-plane.d.ts +1 -1
  503. package/dist/domain/system-components/snap-plane.js +1 -1
  504. package/dist/domain/system-components/snap-point.d.ts +1 -1
  505. package/dist/domain/system-components/snap-point.js +1 -1
  506. package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
  507. package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
  508. package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
  509. package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
  510. package/dist/domain/system-components/summary-component.js +1 -1
  511. package/dist/domain/system-components/text-value.js +1 -1
  512. package/dist/domain/system-components/tool-controls.js +1 -1
  513. package/dist/domain/system-components/tool-menu-fab.d.ts +1 -1
  514. package/dist/domain/system-components/tool-menu-fab.js +1 -1
  515. package/dist/domain/system-components/toolbar.d.ts +1 -1
  516. package/dist/domain/system-components/toolbar.js +1 -1
  517. package/dist/domain/system-components/universal-sidebar-footer.d.ts +1 -1
  518. package/dist/domain/system-components/universal-sidebar-footer.js +1 -1
  519. package/dist/domain/system-components/view-controls.js +1 -1
  520. package/dist/domain/utils/eval-cache.d.ts +1 -2
  521. package/dist/domain/utils/memo-eval.d.ts +1 -3
  522. package/dist/editor/Editor.js +1 -1
  523. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -6
  524. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  525. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  526. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  527. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  528. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  529. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  530. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  531. package/dist/editor/variants/variant-preview-styles.js +1 -0
  532. package/dist/i18n/locales/cs/messages.js +1 -1
  533. package/dist/i18n/locales/da/messages.js +1 -1
  534. package/dist/i18n/locales/de/messages.js +1 -1
  535. package/dist/i18n/locales/de-AT/messages.js +1 -1
  536. package/dist/i18n/locales/en/messages.js +1 -1
  537. package/dist/i18n/locales/en-AU/messages.js +1 -1
  538. package/dist/i18n/locales/en-GB/messages.js +1 -1
  539. package/dist/i18n/locales/es/messages.js +1 -1
  540. package/dist/i18n/locales/fr/messages.js +1 -1
  541. package/dist/i18n/locales/hu/messages.js +1 -1
  542. package/dist/i18n/locales/it/messages.js +1 -1
  543. package/dist/i18n/locales/nl/messages.js +1 -1
  544. package/dist/i18n/locales/pl/messages.js +1 -1
  545. package/dist/i18n/locales/pt/messages.js +1 -1
  546. package/dist/i18n/locales/ro/messages.js +1 -1
  547. package/dist/i18n/locales/sk/messages.js +1 -1
  548. package/dist/i18n/locales/tr/messages.js +1 -1
  549. package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
  550. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  551. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  552. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
  553. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
  554. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
  555. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
  556. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
  557. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
  558. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
  559. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
  560. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
  561. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  562. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
  563. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  564. package/dist/phoenix/cli.js +1 -1
  565. package/dist/phoenix/commands/deploy.js +2 -2
  566. package/dist/phoenix/commands/dev.js +5 -5
  567. package/dist/phoenix/commands/index.d.ts +1 -0
  568. package/dist/phoenix/commands/index.js +1 -1
  569. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  570. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  571. package/dist/phoenix/commands/story-dev.js +2 -2
  572. package/dist/phoenix/commands/variants.d.ts +35 -0
  573. package/dist/phoenix/commands/variants.js +1 -0
  574. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  575. package/dist/phoenix/editor-server/commands-router.js +1 -1
  576. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  577. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  578. package/dist/phoenix/editor-server/editor-server.js +1 -1
  579. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  580. package/dist/phoenix/editor-server/spec-router.js +1 -1
  581. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  582. package/dist/phoenix/scripts/build-admin.js +1 -1
  583. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  584. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  585. package/dist/phoenix/services/index.d.ts +4 -0
  586. package/dist/phoenix/services/index.js +1 -1
  587. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  588. package/dist/phoenix/services/phoenix-application.js +1 -0
  589. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  590. package/dist/phoenix/services/phoenix-store.js +1 -0
  591. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  592. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  593. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  594. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  595. package/dist/phoenix/services/variant-file-session.js +1 -0
  596. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  597. package/dist/phoenix/services/variant-preview-service.js +1 -0
  598. package/dist/phoenix/services/vite-config.js +1 -1
  599. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  600. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  601. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  602. package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
  603. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  604. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
  605. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  606. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -4
  607. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  608. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  609. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  610. package/dist/webhook/builders/common.d.ts +3 -0
  611. package/dist/webhook/builders/webhook-builder.d.ts +1 -1
  612. package/dist/webhook/builders/webhook-builder.js +1 -1
  613. package/package.json +4 -4
  614. package/dist/configurator/assistant/index.d.ts +0 -1
  615. package/dist/configurator/assistant/index.js +0 -1
  616. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -30
  617. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  618. package/dist/configurator/ui/assistant/AssistantPanelProvider.d.ts +0 -42
  619. package/dist/configurator/ui/assistant/AssistantPanelProvider.js +0 -1
  620. package/dist/domain/actions/prepare-action-implementations.js +0 -5
  621. package/dist/domain/components/debug-state-component.js +0 -1
  622. package/dist/domain/components/domain-component-optic.js +0 -16
  623. package/dist/domain/components/drag-state-component.js +0 -1
  624. package/dist/domain/components/export-state-component.js +0 -1
  625. package/dist/domain/components/fullscreen-state-component.js +0 -1
  626. package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
  627. package/dist/domain/components/hover-state-component.js +0 -1
  628. package/dist/domain/components/index.d.ts +0 -2
  629. package/dist/domain/components/index.js +0 -1
  630. package/dist/domain/components/navigation-state-component.js +0 -1
  631. package/dist/domain/components/selection-state-component.js +0 -1
  632. package/dist/domain/components/system-component-builder.js +0 -1
  633. package/dist/domain/components/system-virtual-entity.js +0 -1
  634. package/dist/domain/components/tool-state-component.js +0 -1
  635. package/dist/domain/components/view-state-component.js +0 -1
  636. package/dist/domain/components/viewport-state-component.js +0 -1
  637. package/dist/domain/core/json-schema.js +0 -1
  638. package/dist/domain/core/reflection.js +0 -1
  639. package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
  640. package/dist/domain/expressions/constant-expressions.js +0 -1
  641. package/dist/domain/expressions/custom-expression.js +0 -1
  642. package/dist/domain/expressions/index.d.ts +0 -1
  643. package/dist/domain/expressions/index.js +0 -1
  644. package/dist/domain/invariants/custom-invariants.js +0 -1
  645. package/dist/domain/invariants/invariants.js +0 -1
  646. package/dist/domain/invariants/violation-component.js +0 -1
  647. package/dist/domain/relations/all-of-type-relation.js +0 -1
  648. package/dist/domain/relations/component-factories.js +0 -1
  649. package/dist/domain/relations/composed-of.js +0 -1
  650. package/dist/domain/relations/indirect-relation.js +0 -1
  651. package/dist/domain/relations/reference-component.js +0 -1
  652. package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +0 -12
  653. package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
  654. /package/dist/domain/{components/component-reader-types.js → application/assistant/assistant-manifest.js} +0 -0
  655. /package/dist/domain/{core/action.js → application/assistant/assistant-resolved-manifest.js} +0 -0
  656. /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
  657. /package/dist/domain/core/{enhanced-json-schema.js → action/action.js} +0 -0
  658. /package/dist/domain/core/{expression.js → component/component-reader-types.js} +0 -0
  659. /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
  660. /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
  661. /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
  662. /package/dist/domain/{components → core/component}/updates.js +0 -0
  663. /package/dist/domain/core/{schema-validator.js → decoder/decoder.js} +0 -0
  664. /package/dist/domain/{relations/reference-field.js → core/expression/expression.js} +0 -0
  665. /package/dist/domain/{expressions → core/expression}/memoize-expression.js +0 -0
  666. /package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.js +0 -0
  667. /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
  668. /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
  669. /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
  670. /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
  671. /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
  672. /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
  673. /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
  674. /package/dist/domain/core/{component.js → model/component.js} +0 -0
  675. /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
  676. /package/dist/domain/core/{model.js → model/model.js} +0 -0
  677. /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
  678. /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
  679. /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
  680. /package/dist/domain/{relations/relation-implementation.js → core/relation/reference-field.js} +0 -0
  681. /package/dist/domain/{relations → core/relation}/relation-factory.js +0 -0
  682. /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
  683. /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
  684. /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
  685. /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
  686. /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
  687. /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
  688. /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
  689. /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
  690. /package/dist/domain/core/{state.js → state/state.js} +0 -0
@@ -0,0 +1 @@
1
+ import e from"promise-queue";import{Observable as t,Subject as s,distinctUntilChanged as i,filter as r,firstValueFrom as o,map as n,merge as a,of as h,timeout as l}from"rxjs";import{VariantFileSession as c}from"./variant-file-session.js";export class VariantPreviewService{props;context;queue=new e(1,1/0);result$=new s;closed$=new s;session=null;editors=0;request$=new t(e=>{this.editors+=1;let t=this.context.store.variantPreview$.pipe(n(e=>e.open),i()).subscribe(e);return()=>{this.editors-=1,t.unsubscribe()}});constructor(e,t){this.props=e,this.context=t}get isOpen(){return null!==this.session}async open(e){return(await this.queue.add(async()=>{let t=t=>JSON.stringify(t.variants)===JSON.stringify(e.variants),{open:s,unclaimed:i}=this.state;if(i&&t(i.request))return{outcome:Promise.resolve({status:"settled",...i.result})};if(0===this.editors)throw Error("No editor connected. Open the configurator in a browser");let c=s&&t(s)?s:{requestId:crypto.randomUUID(),title:e.title,description:e.description,variants:e.variants};if(c!==s)try{await this.endSession(!1),await this.startSession()}catch(e){throw this.forget(s),e}let u=o(a(this.result$.pipe(r(e=>e.requestId===c.requestId),n(e=>({status:"settled",...e}))),this.closed$.pipe(r(e=>e===c.requestId),n(()=>({status:"closed"})))).pipe(l({first:e.timeoutMs,with:()=>h({status:"waiting"})})));return c!==s&&(this.setState({open:c,activeChoice:null,unclaimed:null}),s&&this.closed$.next(s.requestId)),{outcome:u}})).outcome}getBaseline(e){if(this.state.open?.requestId!==e||!this.session)throw Error("This variant preview is no longer open");return{files:this.session.getFiles(),choice:this.state.activeChoice}}applyFiles(e){return this.queue.add(async()=>{let{open:t}=this.state;if(t?.requestId!==e.requestId||!this.session)throw Error("This variant preview is no longer open");let s=t.variants.find(t=>t.id===e.choice);if(null!==e.choice&&!s)throw Error("This option does not belong to the open variant preview");if(null===e.choice&&e.files.length>0)throw Error("The baseline cannot contain variant edits");if(s?.kind==="page"&&e.files.length>0)throw Error("HTML previews cannot override project files");await this.session.apply(e.files),this.setState({activeChoice:e.choice})})}submit(e){return this.queue.add(async()=>{let{open:t,activeChoice:s}=this.state;if(t?.requestId!==e.requestId)throw Error("This preview is no longer open. The agent closed it or replaced it with another one");if(!this.session||s!==e.choice||null!==e.choice&&!t.variants.some(t=>t.id===e.choice))throw Error("Apply this option before choosing it");await this.endSession(!0),this.setState({open:null,activeChoice:null,unclaimed:{request:t,result:e}}),this.result$.next(e)})}close(){return this.queue.add(async()=>{let{open:e}=this.state;try{await this.endSession(!1)}finally{this.forget(e)}return{closed:null!==e}})}claim(e){this.state.unclaimed?.result.requestId===e&&this.setState({unclaimed:null})}dispose(){return this.queue.add(()=>this.endSession(!1))}get state(){return this.context.store.variantPreview$.value}setState(e){this.context.store.variantPreview$.next({...this.state,...e})}forget(e){this.setState({open:null,activeChoice:null,unclaimed:null}),e&&this.closed$.next(e.requestId)}async startSession(){let{projectWatcher:e,logger:t}=this.context;e.suspend();try{this.session=await c.create({projectRoot:this.props.projectRoot,logger:t,onFilesChanged:t=>e.applyVariantFiles(t)})}catch(t){throw e.resume(),t}}async endSession(e){if(this.session)try{await this.session.finish(e)}finally{this.session=null,this.context.projectWatcher.resume()}}}
@@ -1 +1 @@
1
- import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import d from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as f}from"../utils/package-info.js";import{loadFrontendConfigModule as p}from"./frontend-config.js";import{phxBannerPlugin as c}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as g}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as u}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as h}from"./phx-licenses-plugin.js";let S=null;export const setViteLogSink=(e,i={})=>{S={sink:e,echo:i.echo??!1}};let b=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],y=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,d,c=f(),g=p(),h=g.readRuntimeConfig(),O=g.frontendBuildConfig,x=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...S&&{customLogger:(n=S.sink,r=S.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...S.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...c&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...c&&{resolve:{alias:(d=a(m(process.cwd(),"package.json")),b.flatMap(e=>{try{let i=s(d.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=g.readRuntimeConfig(),t=g.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},u({getDeploymentId:()=>y(g.readRuntimeConfig())})],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(O.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(O.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...x}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=p(),f=l.readRuntimeConfig(),S=l.frontendBuildConfig,b=h(),O=c({sdkVersion:a.sdkVersion,banner:a.banner}),x=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(p=>({plugins:[i({babel:{plugins:["macros"]}}),e(),d({useStrictCSP:!0}),g(),u({getDeploymentId:()=>y(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!p.htmlFiles.length)return;let e="iife"===p.format?`${p.name}.iife.js`:`${p.name}.js`;for(let i of p.htmlFiles){if(p.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let d=(await n(o,"utf-8")).replace(p.mainScriptPath,e);await r(l,d,"utf-8")}}},b,O],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:p.entryFile,name:o(p.name),formats:[p.format],fileName:()=>"iife"===p.format?`${p.name}.iife.js`:`${p.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${p.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}));return a.enableEditor?[...x,{plugins:[i({babel:{plugins:["macros"]}}),e(),d({useStrictCSP:!0}),g(),b,O],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}]:x};
1
+ import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import p from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as d}from"../utils/package-info.js";import{loadFrontendConfigModule as f}from"./frontend-config.js";import{phxBannerPlugin as c}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as g}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as u}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as h}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as S}from"./phx-variant-previews-plugin.js";let b=null;export const setViteLogSink=(e,i={})=>{b={sink:e,echo:i.echo??!1}};let y=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],O=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,p,c=d(),g=f(),h=g.readRuntimeConfig(),x=g.frontendBuildConfig,D=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...b&&{customLogger:(n=b.sink,r=b.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...b.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...c&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...c&&{resolve:{alias:(p=a(m(process.cwd(),"package.json")),y.flatMap(e=>{try{let i=s(p.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=g.readRuntimeConfig(),t=g.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},u({getDeploymentId:()=>O(g.readRuntimeConfig())}),S()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(x.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(x.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...D}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=f(),d=l.readRuntimeConfig(),S=l.frontendBuildConfig,b=h(),y=c({sdkVersion:a.sdkVersion,banner:a.banner}),x=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(f=>({plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),u({getDeploymentId:()=>O(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!f.htmlFiles.length)return;let e="iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`;for(let i of f.htmlFiles){if(f.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let p=(await n(o,"utf-8")).replace(f.mainScriptPath,e);await r(l,p,"utf-8")}}},b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:f.entryFile,name:o(f.name),formats:[f.format],fileName:()=>"iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${f.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}));return a.enableEditor?[...x,{plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}]:x};
@@ -11,8 +11,8 @@ export declare class AnalyticsService {
11
11
  constructor(_debug: boolean);
12
12
  push: (event: AnalyticsEvent) => void;
13
13
  }
14
- declare const Initialized: (userId: string, configuratorName: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").InitEvent;
15
- declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("../../../../domain/domain-context/analytics-system/analytics-contracts").DataLoadedEvent;
14
+ declare const Initialized: (userId: string, configuratorName: string) => import("#package/domain").InitEvent;
15
+ declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("#package/domain").DataLoadedEvent;
16
16
  export declare const CommonAnalyticsFactory: {
17
17
  Initialized: typeof Initialized;
18
18
  ConfigurationLoaded: typeof ConfigurationLoaded;
@@ -1,26 +1,26 @@
1
1
  import type { MultilingualString } from '@salsita-ai/common/utils';
2
2
  import { type DomainEntity, type DomainEntityId, type EntityId, type EntityRecipe } from '#package/domain';
3
- declare const EntityChildrenListActionButtonClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
4
- declare const EntityChildrenListItemClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
5
- declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
6
- declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
7
- declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
8
- declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
9
- declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
10
- declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
11
- declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
12
- declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
13
- declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
14
- declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
15
- declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
16
- declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
17
- declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
18
- declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
19
- declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
20
- declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
21
- declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
22
- declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
23
- declare const EntityDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
3
+ declare const EntityChildrenListActionButtonClicked: (id: string) => import("#package/domain").UserActionEvent;
4
+ declare const EntityChildrenListItemClicked: (id: string) => import("#package/domain").UserActionEvent;
5
+ declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
6
+ declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
7
+ declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
8
+ declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
9
+ declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
10
+ declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
11
+ declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
12
+ declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
13
+ declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("#package/domain").UserActionEvent;
14
+ declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
15
+ declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
16
+ declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
17
+ declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
18
+ declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("#package/domain").UserActionEvent;
19
+ declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
20
+ declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
21
+ declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("#package/domain").UserActionEvent;
22
+ declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
23
+ declare const EntityDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
24
24
  export declare const DomainControlsAnalytics: {
25
25
  ColorPickerChanged: typeof ColorPickerChanged;
26
26
  EntityChildrenListActionButtonClicked: typeof EntityChildrenListActionButtonClicked;
@@ -9,6 +9,6 @@ interface PublishedDataValueProviderProps extends PublishedDataValue {
9
9
  }
10
10
  export declare const PublishedDataValueProvider: (props: PublishedDataValueProviderProps) => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const useProvidedPublishedData: () => PublishedDataValue;
12
- export declare const usePublishedData: () => Record<string, unknown> & import("../../../../domain/admin-domain/__generated/application-types").PublishedData;
12
+ export declare const usePublishedData: () => PublishedDataValue['publishedData'];
13
13
  export type UsePublishedData<PUBLISHED_DATA extends CommonAdminPublishedData> = () => PUBLISHED_DATA;
14
14
  export {};
@@ -1,8 +1,11 @@
1
- import type { AclConfig, DomainConfig, PersistenceConfig } from '#package/domain';
1
+ import type { AclConfig, AnyDomainComponentOptic, DomainConfig, PersistenceConfig } from '#package/domain';
2
2
  interface DomainApplicationProps {
3
3
  readonly deploymentId: string;
4
4
  readonly persistenceConfig: PersistenceConfig;
5
- readonly domainConfig: DomainConfig<any, any, any, any, any, any>;
5
+ /** The domain config as the runtime spec holds it: component optics already validated, never project modules. */
6
+ readonly domainConfig: Omit<DomainConfig<any, any, any, any, any, any>, 'componentOptics'> & {
7
+ readonly componentOptics: readonly AnyDomainComponentOptic[];
8
+ };
6
9
  readonly canCreate: AclConfig['canCreate'];
7
10
  readonly enableAdminRelease: boolean;
8
11
  }
@@ -1,6 +1,6 @@
1
1
  export declare const useConfiguratorSpec: () => import("../../../domain/index.js").ApplicationConfiguratorSpec;
2
2
  /** The application spec's `assistant` manifest, or nothing when the spec has no `assistant` section. */
3
- export declare const useSpecAssistant: () => import("../../../domain/index.js").AssistantManifest | null;
3
+ export declare const useSpecAssistant: () => Required<import("../../../domain/index.js").AssistantManifest> | null;
4
4
  export declare const useSpecTextLanguages: () => readonly string[];
5
5
  export declare const useSpecHandlerHashes: () => Record<string, string>;
6
6
  export declare const useSpecHandlers: () => readonly import("../../../domain/index.js").HandlerRegistration<any, any>[];
@@ -1,7 +1,7 @@
1
1
  import type { $DomainEntity, ApplicationConfig, DomainEntity, RegistrableTransformer, WebComponentOptions } from '#package/domain';
2
2
  import type { ApplicationRuntime } from '../runtime/react-runtime.js';
3
3
  import { type WebComponentApi } from '../web-component/index.js';
4
- export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(_cfg: ApplicationConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>, mocks: {
4
+ export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(config: ApplicationConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>, mocks: {
5
5
  frontendData: FRONTEND_DATA;
6
6
  publishedData: PUBLISHED_DATA;
7
7
  sessionData: SESSION_DATA;
@@ -1 +1 @@
1
- import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as l}from"../routing/index.js";import{SessionService as p,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(C,x)=>{var f;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=x,z={...C,createTransformers:e=>x.transformers.map(t=>t.transformer.register(e,t.priority??1/0))},q=o(),B=(f={webComponentOptions:x.webComponentOptions??z.mount.options,webComponentApi:x.webComponentApi??u()},w=v(),A=t({config:z,services:q,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=l(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:f.webComponentOptions,webComponentApi:f.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new p({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}});return B.actions.sessionContext.setSessionContext(n(V,M)),B.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),B.actions.domainData.setDomainData({publishedData:x.publishedData,frontendData:x.frontendData,backendData:x.backendData}),B.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:x.entities,modelVersion:z.domain.domainFactory.modelVersion,rootEntityType:x.rootEntityType,schemaIdentity:z.domain.domainFactory}),B};
1
+ import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as p}from"../routing/index.js";import{SessionService as l,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(f,C)=>{var x;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=C,z=o(),q=(x={webComponentOptions:C.webComponentOptions??f.mount.options,webComponentApi:C.webComponentApi??u()},w=v(),A=t({config:f,services:z,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=p(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:x.webComponentOptions,webComponentApi:x.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new l({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}}),B=q.getState().spec;return q.actions.spec.updateSpec({...B,configurator:{...B.configurator,createTransformers:e=>C.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),q.actions.sessionContext.setSessionContext(n(V,M)),q.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),q.actions.domainData.setDomainData({publishedData:C.publishedData,frontendData:C.frontendData,backendData:C.backendData}),q.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:C.entities,modelVersion:f.domain.domainFactory.modelVersion,rootEntityType:C.rootEntityType,schemaIdentity:f.domain.domainFactory}),q};
@@ -67,7 +67,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
67
67
  selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
68
68
  selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
69
69
  selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
70
- selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
70
+ selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
71
71
  selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
72
72
  selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
73
73
  selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
@@ -110,7 +110,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
110
110
  getAdminPreset: () => import("#package/domain").AnyProductPreset;
111
111
  getAdminModelVersion: () => number;
112
112
  getThemeOptions: () => import("@mui/material").ThemeOptions;
113
- getAssistant: () => import("#package/domain").AssistantManifest | null;
113
+ getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
114
114
  getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
115
115
  getAdminFactory: () => import("#package/domain").AnyDomainFactory;
116
116
  getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
@@ -727,7 +727,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
727
727
  selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
728
728
  selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
729
729
  selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
730
- selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
730
+ selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
731
731
  selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
732
732
  selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
733
733
  selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
@@ -770,7 +770,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
770
770
  getAdminPreset: () => import("#package/domain").AnyProductPreset;
771
771
  getAdminModelVersion: () => number;
772
772
  getThemeOptions: () => import("@mui/material").ThemeOptions;
773
- getAssistant: () => import("#package/domain").AssistantManifest | null;
773
+ getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
774
774
  getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
775
775
  getAdminFactory: () => import("#package/domain").AnyDomainFactory;
776
776
  getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
@@ -13,8 +13,11 @@ export declare const getViewportSize: () => Size;
13
13
  * Returns the viewport size. This can also be used as a dependency in a
14
14
  * useEffect to trigger an update when the browser resizes.
15
15
  *
16
+ * @param subscriptionActive if `false`, the viewport is neither measured nor followed, and the size
17
+ * returned is the last one measured, if any (useful for optimization)
18
+ *
16
19
  * @see https://martijnhols.nl/gists/how-to-get-document-height-ios-safari-osk
17
20
  * @todo: investigate if this can use `viewport$`
18
21
  */
19
- export declare const useViewportSize: () => Size | undefined;
22
+ export declare const useViewportSize: (subscriptionActive?: boolean) => Size | undefined;
20
23
  export {};
@@ -1 +1 @@
1
- import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let o="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=()=>{let[t,r]=n(),w=e(()=>{let e=getViewportSize();r(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return o(w,[w]),i(()=>{let e=()=>{w(),setTimeout(w,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[w]),t};
1
+ import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let r="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=(t=!0)=>{let[o,w]=n(),d=e(()=>{let e=getViewportSize();w(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return r(()=>{t&&d()},[t,d]),i(()=>{if(!t)return;let e=()=>{d(),setTimeout(d,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[t,d]),o};
@@ -1 +1 @@
1
- export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps } from './MobileControls.js';
1
+ export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps, type ViewOnlyModeProps, } from './MobileControls.js';
@@ -1,4 +1,5 @@
1
1
  import type { I18n } from '@lingui/core';
2
+ import type { DeploymentAssistant } from '@salsita-ai/contracts/assistant';
2
3
  import type { $DomainEntity, ConfiguratorBuilder, DomainEntity } from '#package/domain';
3
4
  export interface ClerkConfig {
4
5
  apiKey: string;
@@ -11,6 +12,8 @@ export interface ClerkConfig {
11
12
  }
12
13
  export interface BuilderDomainContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
13
14
  configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
15
+ /** Server-only settings supplied by the generated webhook bundle. */
16
+ assistantServerSettings?: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null;
14
17
  createI18n: () => I18n;
15
18
  clerk?: ClerkConfig;
16
19
  }
@@ -1,4 +1,4 @@
1
- import type { $DomainEntity, DomainEntity } from '#package/domain';
1
+ import { type $DomainEntity, type DomainEntity } from '#package/domain';
2
2
  import type { FetchBackendDataHandler } from '../backend-data-handler.js';
3
3
  import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
4
4
  import { CallbackBuilder } from './callback-builder.js';
@@ -1 +1 @@
1
- import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as n}from"@salsita-ai/contracts/webhook";import{AdminFinalizeHandlerBuilder as o}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as t}from"./auth-handler-builder.js";import{CallbackBuilder as i}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as a}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as r}from"./dynamic-resources-factory.js";import{PrefetchBuilder as s}from"./prefetch-builder.js";import{TaskFactory as l}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(e,n){this._context=e,this._handlers=n}withAuthHook(e){return new WebhookBuilder(this._context,{...this._handlers,onAuth:e})}withConfiguratorFinalize(e){return new WebhookBuilder(this._context,{...this._handlers,...e})}withFetchBackendData(e){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:e})}build(){if(!this._handlers)throw Error("Can not build webhook without any handlers! It would be very dumb!");let t=e(),i=new o(this._context).build();return n({onAuth:void 0!==this._handlers.onAuth?(e,n)=>this._handlers.onAuth(e,{logger:t},n):void 0,admin:{onFinalize:(e,n)=>i(e,{logger:t},n)},configurator:{onFetchBackendData:this._handlers.onFetchBackendData?(e,n)=>this._handlers.onFetchBackendData(e,{logger:t},n):void 0,onFinalize:this._handlers.onFinalize?async(e,n)=>{let o=await this._handlers?.onFetchBackendData?.({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls},{logger:t},n);return this._handlers.onFinalize({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls,data:e.data,locale:e.locale,configurationId:e.configurationId,entities:e.entities,modelVersion:e.modelVersion,revisionId:e.revisionId,rootEntityType:e.rootEntityType,backendData:o?.backendData},{logger:t},n)}:void 0,onCallback:this._handlers.onCallback?(e,n)=>this._handlers.onCallback(e,{logger:t},n):void 0}},t)}}export const createDomainWebhook=e=>{let n=new t(e),o=new WebhookBuilder(e),d=new l(e),h=new r(e),u=new a(e,[]);return{authHandlerBuilder:n,webhookBuilder:o,taskFactory:d,finalizeHandlerBuilder:u,callbackBuilder:new i(e),dynamicResourcesFactory:h,prefetchBuilder:new s(e)}};
1
+ import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as t}from"@salsita-ai/contracts/webhook";import{buildAssistantManifest as n,generateAssistantPrompt as o}from"#package/domain";import{AdminFinalizeHandlerBuilder as i}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as s}from"./auth-handler-builder.js";import{CallbackBuilder as a}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as r}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as d}from"./dynamic-resources-factory.js";import{PrefetchBuilder as l}from"./prefetch-builder.js";import{TaskFactory as h}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(e,t){this._context=e,this._handlers=t}withAuthHook(e){return new WebhookBuilder(this._context,{...this._handlers,onAuth:e})}withConfiguratorFinalize(e){return new WebhookBuilder(this._context,{...this._handlers,...e})}withFetchBackendData(e){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:e})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let s=e(),a=new i(this._context).build();return t({onAuth:this._handlers?.onAuth!==void 0?(e,t)=>this._handlers.onAuth(e,{logger:s},t):void 0,admin:{onFinalize:(e,t)=>a(e,{logger:s},t)},configurator:{onAssistantSetup:this._context.assistantServerSettings?async()=>{let e=this._context.configuratorBuilder.buildConfig().assistant;if(!e)throw Error("Assistant setup operation is not configured for this webhook!");let t=n(e),i=this._context.assistantServerSettings;return{setup:{sdl:t.sdl,prompt:o(t),...i}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(e,t)=>this._handlers.onFetchBackendData(e,{logger:s},t):void 0,onFinalize:this._handlers?.onFinalize?async(e,t)=>{let n=await this._handlers?.onFetchBackendData?.({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls},{logger:s},t);return this._handlers.onFinalize({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls,data:e.data,locale:e.locale,configurationId:e.configurationId,entities:e.entities,modelVersion:e.modelVersion,revisionId:e.revisionId,rootEntityType:e.rootEntityType,backendData:n?.backendData},{logger:s},t)}:void 0,onCallback:this._handlers?.onCallback?(e,t)=>this._handlers.onCallback(e,{logger:s},t):void 0}},s)}}export const createDomainWebhook=e=>{let t=new s(e),n=new WebhookBuilder(e),o=new h(e),i=new d(e),u=new r(e,[]);return{authHandlerBuilder:t,webhookBuilder:n,taskFactory:o,finalizeHandlerBuilder:u,callbackBuilder:new a(e),dynamicResourcesFactory:i,prefetchBuilder:new l(e)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/sdk",
3
- "version": "0.50.0-develop.538edd3280",
3
+ "version": "0.50.0-develop.6724f281c5",
4
4
  "description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
5
5
  "keywords": [
6
6
  "salsita",
@@ -221,7 +221,7 @@
221
221
  "@swc/core": "1.15.40",
222
222
  "@swc/wasm-web": "1.15.40",
223
223
  "@tanstack/ai": "0.64.0",
224
- "@tanstack/ai-react": "0.29.4",
224
+ "@tanstack/ai-client": "0.36.1",
225
225
  "@trpc/client": "11.17.0",
226
226
  "@trpc/react-query": "11.17.0",
227
227
  "@trpc/server": "11.17.0",
@@ -292,8 +292,8 @@
292
292
  "yaml": "2.9.0",
293
293
  "yargs": "17.7.2",
294
294
  "zod": "3.25.76",
295
- "@salsita-ai/contracts": "0.50.0-develop.538edd3280",
296
- "@salsita-ai/common": "0.50.0-develop.538edd3280"
295
+ "@salsita-ai/contracts": "0.50.0-develop.6724f281c5",
296
+ "@salsita-ai/common": "0.50.0-develop.6724f281c5"
297
297
  },
298
298
  "devDependencies": {
299
299
  "@clerk/clerk-react": "5.61.8",
@@ -1 +0,0 @@
1
- export { useAssistantChat, type AssistantChatState } from './use-assistant-chat.js';
@@ -1 +0,0 @@
1
- export{useAssistantChat}from"./use-assistant-chat.js";
@@ -1,30 +0,0 @@
1
- import { type UIMessage } from '@tanstack/ai-react';
2
- /** Assistant chat state and actions of the current configuration. */
3
- export interface AssistantChatState {
4
- /** The thread as painted: hydrated from the server, then streamed. */
5
- readonly messages: ReadonlyArray<UIMessage>;
6
- /** True while a reply streams or a browser tool runs. */
7
- readonly isLoading: boolean;
8
- readonly error: Error | undefined;
9
- /**
10
- * HTTP status of the latest request the server answered with a failure, for telling a refusal from
11
- * a dropped connection when `error` is set. Nothing when the latest answered request succeeded or
12
- * the server was never reached.
13
- */
14
- readonly failedStatus: number | undefined;
15
- /** False when the server said this session may read the thread but not add to it. */
16
- readonly isContinuable: boolean;
17
- /** False until the first request of the chat, the thread read, was answered or failed. */
18
- readonly isLoaded: boolean;
19
- /** Sends a user message stamped with its send time. */
20
- readonly send: (content: string) => Promise<void>;
21
- /** Stops the current reply in the browser and on the server. */
22
- readonly stop: () => Promise<void>;
23
- }
24
- /**
25
- * The conversational assistant of the current configuration. The server owns the thread — the chat
26
- * hydrates from it on mount and rejoins a reply still streaming — so the hook keeps nothing in
27
- * browser storage. Each message carries its send time for the model. The model's `query` and
28
- * `apply` calls run here, in the browser, against the configurator this hook is rendered in.
29
- */
30
- export declare const useAssistantChat: () => AssistantChatState;
@@ -1 +0,0 @@
1
- import{fetchServerSentEvents as t,useChat as e}from"@tanstack/ai-react";import{useCallback as a,useMemo as n,useState as r}from"react";import{useApplicationRuntimeSelector as s,useAuthorizedClient as o,useConfigurationId as i,useLogger as c}from"#package/react-sdk";import{useConfigurator as l}from"../application-runtime/index.js";export const useAssistantChat=()=>{let u=i(),h=o(),d=c(),[p,m]=r(),[f,w]=r(!0),[y,g]=r(!1),C=a(()=>h.getAssistantChatConnection(u),[h,u]),k=n(()=>{let e=async(t,e)=>{let a=await fetch(t,e).finally(()=>g(!0)),n=a.headers.get("x-assistant-thread-continuable");return m(a.ok?void 0:a.status),null!=n&&w("false"!==n),a},a=async()=>({headers:await C().headers(),fetchClient:e}),n=t(()=>C().url,a),r=t(()=>`${C().url}/runs`,a);return{...n,joinRun:r.joinRun}},[C]),{assistantSystem:S}=l(),{messages:$,isLoading:j,error:x,sendMessage:A,stop:I,runId:R}=e({threadId:`assistant:${u}`,connection:k,persistence:!0,history:{pageSize:50},tools:s(S.getTools)}),v=a(async t=>{let e={sentAt:new Date().toISOString()};await A({content:t,metadata:e})},[A]),O=a(async()=>{if(I(),null!=R)try{let t=C();await fetch(`${t.url}/runs/${encodeURIComponent(R)}/cancel`,{method:"POST",headers:await t.headers()})}catch(t){d.warn("Could not cancel the assistant run on the server",{error:t})}},[C,d,R,I]);return n(()=>({messages:$,isLoading:j,error:x,failedStatus:p,isContinuable:f,isLoaded:y,send:v,stop:O}),[$,j,x,p,f,y,v,O])};
@@ -1,42 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type AssistantChatState } from '../../assistant/index.js';
3
- /**
4
- * The built-in assistant panel of a universal layout as the layout and the toolbar button see it:
5
- * whether it is open, and the few facts about it they render. It changes only when one of those does.
6
- */
7
- export interface AssistantPanelState {
8
- readonly open: boolean;
9
- readonly setOpen: (open: boolean) => void;
10
- /** True when a reply finished while the panel was closed and the panel was not opened since. */
11
- readonly hasUnreadReply: boolean;
12
- /** True while the message input has focus; a phone layout gives the panel the whole screen then. */
13
- readonly isInputFocused: boolean;
14
- readonly setInputFocused: (isInputFocused: boolean) => void;
15
- }
16
- /** The conversation of the assistant panel. It changes with every chunk of a streaming reply. */
17
- export interface AssistantPanelConversation {
18
- /** Nothing until the chat of the current attempt has mounted. */
19
- readonly chat: AssistantChatState | undefined;
20
- /**
21
- * Loads the thread from the server again, rejoining a reply that is still running there. It never
22
- * sends a message again, because the server may already hold it; a message that did not reach the
23
- * server is therefore gone from the thread and has to be written again.
24
- */
25
- readonly reloadThread: () => void;
26
- }
27
- /**
28
- * The assistant panel of the layout this is rendered in, or nothing when the application spec has no
29
- * `assistant` section or the layout does not carry the panel.
30
- */
31
- export declare const useAssistantPanel: () => AssistantPanelState | undefined;
32
- /** The conversation of the assistant panel, under the same conditions as {@link useAssistantPanel}. */
33
- export declare const useAssistantPanelConversation: () => AssistantPanelConversation | undefined;
34
- export interface AssistantPanelProviderProps {
35
- readonly children: ReactNode;
36
- }
37
- /**
38
- * Owns the open state of the assistant panel and the single chat of the layout below it. The chat
39
- * lives here and not in the panel, so a reply keeps streaming while the panel is closed. Without an
40
- * `assistant` section in the application spec no chat is mounted and no request reaches the server.
41
- */
42
- export declare const AssistantPanelProvider: ({ children }: AssistantPanelProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useCallback as s,useContext as o,useEffect as n,useMemo as a,useRef as i,useState as l}from"react";import{useLogger as d,useSpecAssistant as u}from"#package/react-sdk";import{useAssistantChat as c}from"../../assistant/index.js";let v=t(void 0),m=t(void 0);export const useAssistantPanel=()=>o(v);export const useAssistantPanelConversation=()=>o(m);let p=({onChange:e})=>{let r=c();return n(()=>{e(r)},[r,e]),n(()=>()=>{e(void 0)},[e]),null};export const AssistantPanelProvider=({children:t})=>{let o=u(),[c,x]=l(),[f,P]=l(!1),[h,j]=l(!1),[g,A]=l(0),[k,C]=l(!1),q=d(),L=s(e=>{P(e),e?j(!1):C(!1)},[]),S=c?.isLoading??!1,T=i(!1),b=s(()=>{T.current=!1,A(e=>e+1)},[]);n(()=>{!T.current||S||f||null==c||j(!0),T.current=S},[c,S,f]);let w=c?.error,y=c?.failedStatus;n(()=>{w&&q.error("The assistant request failed",{status:y},w)},[w,y,q]);let z=a(()=>o?{open:f,setOpen:L,hasUnreadReply:h,isInputFocused:k,setInputFocused:C}:void 0,[o,f,L,h,k]),B=a(()=>o?{chat:c,reloadThread:b}:void 0,[o,c,b]);return e(v.Provider,{value:z,children:r(m.Provider,{value:B,children:[o&&e(p,{onChange:x},g),t]})})};
@@ -1,5 +0,0 @@
1
- export const findActionImplementationConflicts=(e,n)=>{let t=Object.keys(n);return{missing:e.filter(e=>!t.includes(e)),extra:t.filter(n=>!e.includes(n))}};export const prepareActionImplementations=(e,n)=>{let{missing:t,extra:i}=findActionImplementationConflicts(Object.values(e).map(e=>e.name),n);if(0===t.length&&0===i.length)return n;let o=Error("Domain cannot be instantiated because there are conflicts between declared and implemented actions."+(t.length>0?`
2
-
3
- Missing actions: ${t.join(", ")}. Add each to a default export of phx.domain.implementActions({ ... }) in src/actions/.`:"")+(i.length>0?`
4
-
5
- Extra actions: ${i.join(", ")}. Declare each under "actions" in a spec file or remove its implementation.`:"")+"\n");if(t.length>0)throw o;return console.error(o),n};
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as e}from"../core/component.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const debugStateComponent=t.component("debugState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isDebugStateComponentSnapshot=t=>e(t,"singleton",debugStateComponent);export const isSystemDebugStateComponentSnapshot=e(o,"singleton",debugStateComponent);
@@ -1,16 +0,0 @@
1
- import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{createCustomExpression as i}from"../expressions/custom-expression.js";import{withProfilerLabel as n}from"../utils/profiler-label.js";export class DomainComponentOpticBuilder{aliasMap;entityTypes;componentType;instanceName;navigationFilters;generated;entityTypeOrAliasNames;constructor(t,e,i,n,s=[],a=!1,o=[]){this.aliasMap=t,this.entityTypes=e,this.componentType=i,this.instanceName=n,this.navigationFilters=s,this.generated=a,this.entityTypeOrAliasNames=o}static from(t){return new DomainComponentOpticBuilder(t,[])}withEntity(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,t],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,t])}withAlias(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,...this.aliasMap[t]],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,String(t)])}withComponent(t,e,i=!1){return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,t,e,this.navigationFilters,i,this.entityTypeOrAliasNames)}withFilter(i){if(console.warn(`Component ${this.componentType?.name}#${this.instanceName} on entity ${this.entityTypes.join(", ")} uses a legacy filter with full filter evaluation. This is a suboptimal variant and is deprecated in favor of per-criterion evaluation.
2
-
3
- In your TS files, replace
4
- withFilter()
5
- ->
6
- withGradualFilter()
7
-
8
- In YAML, replace
9
- $filter:
10
- $read: $falseOrFilterExpression
11
- ->
12
- $filter:
13
- active:
14
- $read: $trueOrFalseExpression
15
- # ... other eventual criteria
16
- `),"function"==typeof i){let n=t(),s=t=>({evaluate:(s,a,o)=>{let r=e(a,n),d=r.get(s);if(!d){if(void 0===(d=i(o.domain.get$Entity(s,a),a)))throw Error(`Dynamic filter on component ${this.componentType?.name}.${this.instanceName} on entity ${s} returned 'undefined'. This is likely a bug in the component definition, check whether you are referencing a correct expression or field!`);r.put(s,d)}return"boolean"==typeof d?"active"===t?d:void 0:d[t]},meta:{}});return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:s("navigationStates"),selectedEntityIds:s("selectedEntityIds"),hoveredEntityIds:s("hoveredEntityIds"),draggedEntityIds:s("draggedEntityIds"),viewStates:s("viewStates"),toolStates:s("toolStates"),modes:s("modes"),roles:s("roles"),active:s("active"),fullscreen:s("fullscreen"),debug:s("debug"),viewports:s("viewports"),exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames)}return"boolean"==typeof i?new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{active:i,navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames):new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,active:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0,...i}],this.generated,this.entityTypeOrAliasNames)}withGradualFilter(t){let e=t=>"function"==typeof t?i(t,{}):t,n={navigationStates:e(t.navigationStates),selectedEntityIds:e(t.selectedEntityIds),hoveredEntityIds:e(t.hoveredEntityIds),draggedEntityIds:e(t.draggedEntityIds),exportedEntityIds:e(t.exportedEntityIds),viewStates:e(t.viewStates),toolStates:e(t.toolStates),exportStates:e(t.exportStates),modes:e(t.modes),roles:e(t.roles),active:e(t.active),fullscreen:e(t.fullscreen),debug:e(t.debug),viewports:e(t.viewports)};return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,n],this.generated,this.entityTypeOrAliasNames)}validate(){if(!this.componentType||!this.instanceName)throw Error("Use withComponent before attaching");if(!this.entityTypes.length)throw Error("Use withEntity and/or withAlias before attaching")}_getProfilerLabel(){return[...this.entityTypeOrAliasNames,this.componentType.name,this.instanceName].join("_")}attach=(i,s)=>{var a,o;let r,d;return this.validate(),a={kind:"simple",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n),write:s??(()=>({})),generated:this.generated},o=this._getProfilerLabel(),r=t(),d=n(o,a.read),{...a,read:(t,i,n)=>{let s=e(i,r),a=s.get(t);if(a)return a;let o=d(t,i,n);return s.put(t,o),o}}};attachMany=i=>{var s,a;let o,r;return this.validate(),s={kind:"dynamic",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n)},a=this._getProfilerLabel(),o=t(),r=n(a,s.read),{...s,read:(t,i,n)=>{let s=e(i,o),a=s.get(t);if(a)return a;let d=r(t,i,n);return s.put(t,d),d}}}}
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const dragStateComponent=e.component("dragState").withState({type:"object",properties:{draggedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["draggedEntityId"],additionalProperties:!1,tsType:"DragStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"DragStateComponentState"}]}).withWritableKeys(["draggedEntityId"]).build();export const isDragStateComponentSnapshot=e=>t(e,"singleton",dragStateComponent);export const isSystemDragStateComponentSnapshot=t(o,"singleton",dragStateComponent);
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const exportStateComponent=e.component("exportState").withState({type:"object",properties:{activeState:{type:"string"},exportedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["activeState","exportedEntityId"],additionalProperties:!1}).withWritableKeys(["activeState","exportedEntityId"]).build();export const isExportStateComponentSnapshot=e=>t(e,"singleton",exportStateComponent);export const isSystemExportStateComponentSnapshot=t(o,"singleton",exportStateComponent);
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as e}from"../core/component.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const fullscreenStateComponent=t.component("fullscreenState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isFullscreenStateComponentSnapshot=t=>e(t,"singleton",fullscreenStateComponent);export const isSystemFullscreenStateComponentSnapshot=e(o,"singleton",fullscreenStateComponent);
@@ -1 +0,0 @@
1
- import{isArray as o,isShallowEqual as t}from"@salsita-ai/common/utils";import{areEqualComponentSnapshots as n,isEqualComponentSnapshot as e}from"../core/component.js";export const isEqualGroupedComponentSnapshots=(p,m)=>t(p,m,(t,p)=>t===p||void 0!==t&&void 0!==p&&(o(t)&&o(p)?n(t,p):!(o(t)||o(p))&&e(t,p)));export const groupComponentsByEntityIdAndName=o=>{let t=new Map;return o.forEach(o=>{let n=o.componentInstance.entityId,e=o.componentInstance.componentType.name,p=t.get(n);p||(p={},t.set(n,p));let m=p[e]??[];p[e]=m,m.push(o)}),t};
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const hoverStateComponent=e.component("hoverState").withState({type:"object",properties:{hoveredEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["hoveredEntityId"],additionalProperties:!1,tsType:"HoverStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"HoverStateComponentState"}]}).withWritableKeys(["hoveredEntityId"]).build();export const isHoverStateComponentSnapshot=e=>t(e,"singleton",hoverStateComponent);export const isSystemHoverStateComponentSnapshot=t(o,"singleton",hoverStateComponent);
@@ -1,2 +0,0 @@
1
- export { SystemComponentBuilder } from './system-component-builder.js';
2
- export * from './domain-component-optic.js';
@@ -1 +0,0 @@
1
- export{SystemComponentBuilder}from"./system-component-builder.js";export*from"./domain-component-optic.js";
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const navigationStateComponent=o.component("navigationState").withState({type:"object",properties:{activeState:{type:"string"},historyStack:{type:"array",items:{type:"string"}}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState","historyStack"]).build();export const isNavigationComponentSnapshot=o=>t(o,"singleton",navigationStateComponent);export const isSystemNavigationComponentSnapshot=t(e,"singleton",navigationStateComponent);
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const selectionStateComponent=e.component("selectionState").withState({type:"object",properties:{selectedEntityId:{type:"string"}},required:["selectedEntityId"],additionalProperties:!1,tsType:"SelectionStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"SelectionStateComponentState"}]}).withWritableKeys(["selectedEntityId"]).build();export const isSelectionComponentSnapshot=e=>t(e,"singleton",selectionStateComponent);export const isSystemSelectionComponentSnapshot=t(o,"singleton",selectionStateComponent);
@@ -1 +0,0 @@
1
- import e from"lodash-es/pick.js";import{getCommonPhxDefinitions as t}from"../core/index.js";import{extendedSchemaValidator as i}from"../core/json-schema.js";export class SystemComponentBuilder{name;writableKeys;jsonSchema;constructor(e,t,i){this.name=e,this.writableKeys=t,this.jsonSchema=i}static component(e){return new SystemComponentBuilder(e,[],{type:"object",properties:{},required:[],additionalProperties:!1})}withState(e){return new SystemComponentBuilder(this.name,[],e)}withWritableKeys(e){return new SystemComponentBuilder(this.name,e,this.jsonSchema)}build(){let s=t(),r={...this.jsonSchema,definitions:{...s,...this.jsonSchema.definitions}};return{name:this.name,writableKeys:this.writableKeys,schema:this.jsonSchema,validateState:i.compile(r),validateWritableState:i.compile({...r,properties:e(this.jsonSchema.properties,this.writableKeys),required:this.jsonSchema.required?.filter(e=>this.writableKeys.includes(e))})}}}
@@ -1 +0,0 @@
1
- import{createVirtualEntityId as t}from"../core/model.js";export const systemVirtualEntityId=t("system");
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const toolStateComponent=o.component("toolState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isToolStateComponentSnapshot=o=>t(o,"singleton",toolStateComponent);export const isSystemToolStateComponentSnapshot=t(e,"singleton",toolStateComponent);
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const viewStateComponent=e.component("viewState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isViewComponentSnapshot=e=>t(e,"singleton",viewStateComponent);export const isSystemViewComponentSnapshot=t(o,"singleton",viewStateComponent);
@@ -1 +0,0 @@
1
- import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const VIEWPORTS=["phone","mobile","tablet","desktop","landscape","portrait"];export const viewportStateComponent=e.component("viewportState").withState({type:"object",properties:{active:{oneOf:[{type:"array",items:{type:"string",enum:[...VIEWPORTS]}},{type:"null"}]}},required:["active"],additionalProperties:!1,tsType:"ViewportStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ViewportStateComponentState"}]}).withWritableKeys(["active"]).build();export const isViewportStateComponentSnapshot=e=>t(e,"singleton",viewportStateComponent);export const isSystemViewportStateComponentSnapshot=t(o,"singleton",viewportStateComponent);
@@ -1 +0,0 @@
1
- import{createAjvSchemaValidator as e}from"./schema-validator-ajv.js";import{createCspSchemaValidator as a}from"./schema-validator-csp.js";let d="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=d();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
@@ -1 +0,0 @@
1
- import{extendedSchemaValidator as t}from"./json-schema.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
@@ -1 +0,0 @@
1
- import{expandAlias as r}from"../../core/alias.js";import{_unsafeBuildDomainEntityId as e}from"../../core/model.js";export const RecipeFactoryBuilder={forAliases:t=>({forEntities:o=>({withDefaults:i=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(r=>{a[r]={...a[r],...o}})});let f=new Map(o.map(r=>[r.type,r._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=f.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),{build:()=>r=>({id:e(r.type,1),...a[r.type],...r})}}})})};
@@ -1 +0,0 @@
1
- import{mapNestedObject as t}from"../utils/map-nested-object.js";export const createConstantExpressionFactory=e=>o=>t()(o,([t,o,a])=>[[t,o,{meta:e[t]?.[o]??{},evaluate:()=>a}]]);
@@ -1 +0,0 @@
1
- import{mapNestedObject as e}from"../utils/map-nested-object.js";export const createCustomExpressionFactory=t=>o=>e()(o,([e,o,r])=>{if(!r)throw Error(`Custom expression for ${e}.${o} is of type undefined`);return[[e,o,createCustomExpression(r,t[e]?.[o]??{})]]});export const createCustomExpression=(e,t)=>({evaluate:(t,o,r)=>e(r.domain.get$Entity(t,o),o,r),meta:t});
@@ -1 +0,0 @@
1
- export { prepareDomainExpressions } from './prepare-domain-expressions.js';
@@ -1 +0,0 @@
1
- export{prepareDomainExpressions}from"./prepare-domain-expressions.js";
@@ -1 +0,0 @@
1
- import{withProfilerLabel as t}from"../utils/profiler-label.js";export const createCustomInvariantFactory=()=>e=>r=>{let n={};return Object.entries(r).forEach(([r,o])=>{let a=Object.entries(o).map(([n,o])=>({evaluate:t(`${r}_invariant_${n}`,(t,a,i)=>{let l=o(i.domain.get$Entity(t,a),a,i);if("boolean"==typeof l){let t=e[r]?.[n];if(!t)throw Error(`Cannot find statically defined violation for ${r}.${n}`);return l?[]:[t]}return l})}));n[r]=a}),n};
@@ -1 +0,0 @@
1
- import{expandAlias as a}from"../core/alias.js";export class InvariantBuilder{aliasMap;invariants;constructor(a,i={}){this.aliasMap=a,this.invariants=i}withInvariants(i){let t={...this.invariants};return Object.entries(i).forEach(([i,s])=>{a(this.aliasMap,i).forEach(a=>{t[a]=[...t[a]??[],...s]})}),new InvariantBuilder(this.aliasMap,t)}_conflicts={};buildViolationExpressions=()=>{let a={};return Object.entries(this.invariants).forEach(([i,t])=>{a[i]={$violations:{evaluate:(a,i,s)=>t.flatMap(t=>t.evaluate(a,i,s)),meta:{}}}}),a}}
@@ -1 +0,0 @@
1
- import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{ViolationSchema as t}from"./violation.js";export const violationsComponent=o.component("violations").withState({tsType:"ViolationComponentState",type:"object",properties:{violations:{type:"array",items:t}},required:["violations"],additionalProperties:!1}).build();
@@ -1 +0,0 @@
1
- import{expandAlias as e}from"../core/alias.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${String(o.target)} after evaluation started. Create all relation expressions before evaluating the domain state.`);let i=new Set(e(t,o.target)),l=[...i].sort().join("|");return r.set(l,i),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(l)}};