@salsita-ai/sdk 0.50.0-develop.bc08a38ffe → 0.50.0-develop.bd84173265

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 (348) hide show
  1. package/README.md +14 -13
  2. package/dist/application-spec/caching/content-diff.js +1 -1
  3. package/dist/application-spec/core/application-file.d.ts +0 -2
  4. package/dist/application-spec/core/application-file.js +1 -1
  5. package/dist/application-spec/errors/diagnostic-codes.d.ts +4 -0
  6. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  7. package/dist/application-spec/errors/diagnostic-messages.d.ts +4 -0
  8. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  9. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  10. package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
  11. package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
  12. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +11 -8
  13. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  14. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
  15. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  16. package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
  17. package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
  18. package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
  19. package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
  20. package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
  21. package/dist/application-spec/generate-application/code/templates/globals.js +3 -4
  22. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
  23. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  24. package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
  25. package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
  26. package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
  27. package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
  28. package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
  29. package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
  30. package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  32. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +1 -1
  33. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -7
  34. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
  35. package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
  36. package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
  37. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
  38. package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
  39. package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
  40. package/dist/application-spec/generate-application/index.d.ts +2 -0
  41. package/dist/application-spec/generate-application/index.js +1 -1
  42. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +4 -3
  43. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -3
  44. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
  45. package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
  46. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +13 -5
  47. package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
  48. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +4 -3
  49. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +6 -2
  50. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  51. package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
  52. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
  53. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
  54. package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
  55. package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
  56. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
  57. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
  58. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
  59. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
  60. package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
  61. package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
  62. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
  63. package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
  64. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
  65. package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
  66. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +3 -2
  67. package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
  68. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
  69. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
  70. package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
  71. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
  72. package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
  73. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
  74. package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
  75. package/dist/application-spec/generate-application/runtime-spec/index.d.ts +4 -0
  76. package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
  77. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
  78. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
  79. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
  80. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  81. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
  82. package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
  83. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
  84. package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
  85. package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
  86. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  87. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  88. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  89. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  90. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
  91. package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
  92. package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
  93. package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
  94. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
  95. package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
  96. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
  97. package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
  98. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
  99. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
  100. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
  101. package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
  102. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
  103. package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
  104. package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
  105. package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
  106. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
  107. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
  108. package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
  109. package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
  110. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
  111. package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
  112. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
  113. package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
  114. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +6 -0
  115. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  116. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +7 -4
  117. package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
  118. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +19 -0
  119. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
  120. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
  121. package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
  122. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +6 -2
  123. package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
  124. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
  125. package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
  126. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
  127. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  128. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
  129. package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
  130. package/dist/client/phoenix-api.d.ts +367 -0
  131. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +36 -1
  132. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  133. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
  134. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  135. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +6 -0
  136. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  137. package/dist/configurator/common/configurator-interface.d.ts +16 -1
  138. package/dist/configurator/common/configurator-interface.js +1 -1
  139. package/dist/configurator/common/index.d.ts +2 -0
  140. package/dist/configurator/common/index.js +1 -1
  141. package/dist/configurator/common/use-finalize-action.d.ts +31 -0
  142. package/dist/configurator/common/use-finalize-action.js +1 -0
  143. package/dist/configurator/common/use-reset-camera.d.ts +6 -0
  144. package/dist/configurator/common/use-reset-camera.js +1 -0
  145. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
  146. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  147. package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
  148. package/dist/configurator/pages/configurator-layout-name.js +1 -0
  149. package/dist/configurator/pages/default-configurator-elements.d.ts +8 -0
  150. package/dist/configurator/pages/default-configurator-elements.js +1 -0
  151. package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
  152. package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
  153. package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
  154. package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
  155. package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
  156. package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
  157. package/dist/configurator/pages/default-elements/index.d.ts +4 -0
  158. package/dist/configurator/pages/default-elements/index.js +1 -0
  159. package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
  160. package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
  161. package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
  162. package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
  163. package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
  164. package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
  165. package/dist/configurator/pages/index.d.ts +1 -0
  166. package/dist/configurator/pages/index.js +1 -1
  167. package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
  168. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  169. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
  170. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  171. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  172. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  173. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
  174. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  175. package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
  176. package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
  177. package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
  178. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
  179. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
  180. package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
  181. package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
  182. package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
  183. package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
  184. package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
  185. package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
  186. package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
  187. package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
  188. package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
  189. package/dist/configurator/ui/assistant/form/form-model.js +1 -0
  190. package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
  191. package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
  192. package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
  193. package/dist/configurator/ui/assistant/form/form-state.js +1 -0
  194. package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
  195. package/dist/configurator/ui/assistant/form/index.js +1 -0
  196. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
  197. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
  198. package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
  199. package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
  200. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
  201. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
  202. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
  203. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
  204. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
  205. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
  206. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
  207. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
  208. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
  209. package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
  210. package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
  211. package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
  212. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
  213. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
  214. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
  215. package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
  216. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
  217. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
  218. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
  219. package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
  220. package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
  221. package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
  222. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
  223. package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
  224. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
  225. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
  226. package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
  227. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  228. package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
  229. package/dist/docs/fabs/basic.mdx +2 -2
  230. package/dist/docs/index.json +1 -1
  231. package/dist/docs/layouts/custom-layout.mdx +1466 -196
  232. package/dist/docs/phoenix/components.mdx +6 -0
  233. package/dist/docs/phoenix/configurator-interface.mdx +66 -13
  234. package/dist/docs/phoenix/deployments.mdx +2 -6
  235. package/dist/docs/phoenix/domain-model.mdx +2 -0
  236. package/dist/docs/phoenix/finalization.mdx +1 -1
  237. package/dist/docs/phoenix/getting-started.mdx +2 -1
  238. package/dist/docs/phoenix/layout-slots.mdx +4 -2
  239. package/dist/docs/phoenix/localization.mdx +8 -6
  240. package/dist/docs/phoenix/migration-guide.mdx +21 -8
  241. package/dist/docs/phoenix/phoenix-cli.mdx +46 -10
  242. package/dist/docs/phoenix/project-structure.mdx +31 -12
  243. package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
  244. package/dist/docs/phoenix/webhooks.mdx +21 -4
  245. package/dist/domain/application/application-config.d.ts +3 -1
  246. package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
  247. package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
  248. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  249. package/dist/domain/application/assistant/index.d.ts +2 -0
  250. package/dist/domain/application/assistant/index.js +1 -1
  251. package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
  252. package/dist/domain/application/configurator-builder.d.ts +4 -1
  253. package/dist/domain/application/configurator-builder.js +1 -1
  254. package/dist/domain/core/schema/extended-schema-validator.js +1 -1
  255. package/dist/domain/domain-context/index.d.ts +1 -1
  256. package/dist/domain/domain-context/undo-system.d.ts +28 -1
  257. package/dist/domain/domain-context/undo-system.js +1 -1
  258. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  259. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  260. package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
  261. package/dist/domain/system-components/child-entity-selection.js +1 -1
  262. package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
  263. package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
  264. package/dist/globals/index.d.ts +2 -0
  265. package/dist/i18n/locales/cs/messages.js +1 -1
  266. package/dist/i18n/locales/da/messages.js +1 -1
  267. package/dist/i18n/locales/de/messages.js +1 -1
  268. package/dist/i18n/locales/de-AT/messages.js +1 -1
  269. package/dist/i18n/locales/en/messages.js +1 -1
  270. package/dist/i18n/locales/en-AU/messages.js +1 -1
  271. package/dist/i18n/locales/en-GB/messages.js +1 -1
  272. package/dist/i18n/locales/es/messages.js +1 -1
  273. package/dist/i18n/locales/fr/messages.js +1 -1
  274. package/dist/i18n/locales/hu/messages.js +1 -1
  275. package/dist/i18n/locales/it/messages.js +1 -1
  276. package/dist/i18n/locales/nl/messages.js +1 -1
  277. package/dist/i18n/locales/pl/messages.js +1 -1
  278. package/dist/i18n/locales/pt/messages.js +1 -1
  279. package/dist/i18n/locales/ro/messages.js +1 -1
  280. package/dist/i18n/locales/sk/messages.js +1 -1
  281. package/dist/i18n/locales/tr/messages.js +1 -1
  282. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  283. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  284. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +79 -80
  285. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  286. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  287. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  288. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -2
  289. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
  290. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
  291. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
  292. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
  293. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  294. package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
  295. package/dist/phoenix/application-spec/project-files.js +1 -1
  296. package/dist/phoenix/bin.d.ts +2 -0
  297. package/dist/phoenix/bin.js +2 -0
  298. package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
  299. package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
  300. package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
  301. package/dist/phoenix/check-configs/eslint-config.js +1 -0
  302. package/dist/phoenix/check-configs/index.d.ts +8 -0
  303. package/dist/phoenix/check-configs/index.js +1 -0
  304. package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
  305. package/dist/phoenix/check-configs/typescript-project.js +1 -0
  306. package/dist/phoenix/cli.d.ts +0 -1
  307. package/dist/phoenix/cli.js +1 -2
  308. package/dist/phoenix/commands/check.js +1 -1
  309. package/dist/phoenix/commands/deps/deps.d.ts +52 -0
  310. package/dist/phoenix/commands/deps/deps.js +3 -0
  311. package/dist/phoenix/commands/deps/index.d.ts +1 -0
  312. package/dist/phoenix/commands/deps/index.js +1 -0
  313. package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
  314. package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
  315. package/dist/phoenix/commands/dev.js +5 -5
  316. package/dist/phoenix/commands/fix.js +1 -1
  317. package/dist/phoenix/commands/index.d.ts +1 -0
  318. package/dist/phoenix/commands/index.js +1 -1
  319. package/dist/phoenix/commands/prettier.js +1 -1
  320. package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -0
  321. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  322. package/dist/phoenix/services/lingui.d.ts +8 -0
  323. package/dist/phoenix/services/lingui.js +1 -1
  324. package/dist/phoenix/services/swc.js +1 -1
  325. package/dist/phoenix/services/vite-config.js +1 -1
  326. package/dist/phoenix/utils/index.d.ts +2 -1
  327. package/dist/phoenix/utils/index.js +1 -1
  328. package/dist/phoenix/utils/node-version/index.d.ts +1 -0
  329. package/dist/phoenix/utils/node-version/index.js +1 -0
  330. package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
  331. package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
  332. package/dist/phoenix/utils/run-command.d.ts +11 -0
  333. package/dist/phoenix/utils/run-command.js +1 -1
  334. package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
  335. package/dist/phoenix/utils/sdk-tool/index.js +1 -0
  336. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
  337. package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
  338. package/dist/react-sdk/domain-context/index.d.ts +1 -1
  339. package/dist/react-sdk/domain-context/index.js +1 -1
  340. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
  341. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  342. package/dist/ui-sdk/theme/types.d.ts +1 -1
  343. package/package.json +46 -35
  344. package/schema/domain-spec.json +86 -8
  345. package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
  346. package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
  347. package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
  348. package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
@@ -44,7 +44,7 @@ project-root/
44
44
  | `invariants/` | Domain constraints |
45
45
  | `transformers/` | Data transformation logic |
46
46
  | `handlers/` | Event & lifecycle handlers |
47
- | `webhooks/` | Webhook implementations |
47
+ | `webhooks/` | Webhook implementations, entered through `index.ts` |
48
48
  | `migrations/` | Data schema migrations (v\*.ts) - auto-created based on model versions |
49
49
  | `locales/` | Locale catalogs (`.po` sources; compiled `.ts`, do not edit) |
50
50
  | `_*` | Shared code folders at any depth (not auto-imported) |
@@ -56,6 +56,9 @@ factory returns, or an array of those. A file that exports anything else, such a
56
56
  shape. When several files in `handlers/`, `elements/`, `transformers/`, `components/`, `admin/elements/` and
57
57
  `admin/components/` are wrong, the error lists all of them, one numbered line per file. Keep plain components and helpers in a `_*` folder.
58
58
 
59
+ With the application-spec pipeline, sync does not write `src/webhooks/index.ts`, and a project without it gets a
60
+ built-in webhook; see [Webhook Entry Point](?path=/docs/phoenix-webhooks--docs#webhook-entry-point).
61
+
59
62
  ### Admin Folders (src/admin/)
60
63
 
61
64
  The `admin/` folder supports these admin-specific categories:
@@ -180,29 +183,41 @@ type CustomMaterial = Phx['AdminModel']['CustomMaterial']
180
183
  | File | Auto-Generated? | Notes |
181
184
  | ------------------------------------------------------ | --------------- | -------------------------------------- |
182
185
  | `package.json` | Partially | Dependencies merged, scripts untouched |
183
- | `tsconfig.json` | Yes | Managed by Phoenix |
184
- | `eslint.config.js` | Yes | Managed by Phoenix |
185
- | `prettier.config.js` | Yes | Managed by Phoenix |
186
+ | `tsconfig.json` | Once | Yours; see below |
187
+ | `eslint.config.js` | Once | Yours; see below |
188
+ | `prettier.config.js` | Once | Yours; see below |
186
189
  | `.prettierignore` | No | Optional and your own; see below |
187
- | `.linguirc` | Yes | Managed by Phoenix |
188
190
  | `.nvmrc` | Yes | Managed by Phoenix |
189
191
  | `.gitignore` | Partially | Only in a git repository; see Markers |
190
192
  | `.env` | No | Git-ignored, local config |
191
193
  | `.env.example` | No | Template for env vars |
192
- | `.env.generated` | Yes | Auto-generated IDs, git-ignored |
194
+ | `.env.generated` | Yes | Optional, git-ignored; see below |
193
195
  | `README.md` | No | Project documentation |
194
196
  | `AGENTS.md` | No | Your own coding-agent instructions |
195
197
  | `.claude/skills/phoenix*/`, `.agents/skills/phoenix*/` | Yes | Phoenix agent skills |
196
198
 
197
199
  Sync does not write `README.md`, `AGENTS.md`, `.env.example`, `.env.ci` or the `README.md` files in `assets/public/` and `assets/private/`. Earlier SDK versions wrote them once; a project that has them keeps them, and they are yours to edit.
198
200
 
199
- With the application-spec pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), Phoenix does not write a `.prettierignore`, and a fresh clone or CI checkout of a project has none. `phoenix check` and `phoenix fix` do not read one: they skip `.phoenix/`, `dist/`, the compiled catalogs in `src/locales/`, `pnpm-lock.yaml` and `.linguirc` on their own. A project that runs Prettier directly, as `prettier --check .` or from an editor, can add its own `.prettierignore`. To commit it, add a `!.prettierignore` line after the Phoenix block of `.gitignore`, because that block lists the file. The legacy pipeline writes `.prettierignore` on every sync.
201
+ Phoenix keeps the generated env file, with the IDs and values of the prepared deployment, in `.phoenix/` unless the project has a `.env.generated` in its root, which then is the one that counts. `phoenix dev` creates no `.env.generated` in the project root; the deployment and environment commands write it there. See [The generated env file](?path=/docs/phoenix-phoenix-cli--docs#the-generated-env-file).
202
+
203
+ With the application-spec pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), Phoenix does not write a `.prettierignore`, and a fresh clone or CI checkout of a project has none. `phoenix check` and `phoenix fix` do not read one: they skip `.phoenix/`, `dist/`, the compiled catalogs in `src/locales/` and `.linguirc` on their own, and the package manager's files in the project root, which belong to whichever package manager the project uses: `pnpm-lock.yaml`, `pnpm-workspace.yaml`, `package-lock.json`, `npm-shrinkwrap.json`, `yarn.lock`, `.yarnrc.yml`, `bun.lock` and `bun.lockb`. A project that runs Prettier directly, as `prettier --check .` or from an editor, can add its own `.prettierignore`. To commit it, add a `!.prettierignore` line after the Phoenix block of `.gitignore`, because that block lists the file. The legacy pipeline writes `.prettierignore` on every sync.
204
+
205
+ With the application-spec pipeline, the project's TypeScript settings are in `.phoenix/tsconfig.json`, which sync rewrites with the rest of `.phoenix/`. The root `tsconfig.json` is the one editors and tools find: sync writes it only when the project has none, as a single line that extends the generated settings, and it is yours to commit and to add to:
206
+
207
+ ```json
208
+ { "extends": "./.phoenix/tsconfig.json" }
209
+ ```
210
+
211
+ The only root `tsconfig.json` sync replaces is the full file earlier SDK versions generated there, recognised by its settings; any other stays as it is. `phoenix dev`, `phoenix build` and the webhook bundle do not resolve `paths` aliases, so an alias added to the root file passes `phoenix check` and fails the build. `phoenix check` type-checks with the root `tsconfig.json`, or with `.phoenix/tsconfig.json` when the project has none. The legacy pipeline writes the full `tsconfig.json` on every sync.
212
+
213
+ With the application-spec pipeline, sync writes `eslint.config.js` and `prettier.config.js` only when the project has none, each re-exporting the SDK's shared configuration so editors find it. They are yours to commit and to change. The only ones sync replaces are the files earlier SDK versions generated there; any other stays as it is. `phoenix check` and `phoenix fix` lint and format with the project's files, and with the SDK's configurations when a file is missing (see [`phoenix check`](?path=/docs/phoenix-phoenix-cli--docs#phoenix-check)). Sync formats the files it generates in the project root, such as `package.json` and the agent skills, with the same Prettier configuration, so `phoenix check` accepts them; while the project's configuration cannot be loaded, as before the first install, they get the SDK's settings. The legacy pipeline writes both files on every sync.
214
+
215
+ With the application-spec pipeline, the Lingui configuration is `.phoenix/.linguirc`, which sync rewrites with the rest of `.phoenix/` from `availableLocales` in `spec/application.yaml`. Phoenix passes that file to Lingui every time it extracts or compiles the catalogs and to its Vite builds, so a `.linguirc` in the project root is not read and can be deleted. To run Lingui yourself, name the file: `npx lingui extract --config .phoenix/.linguirc`, from the project root. The legacy pipeline writes `.linguirc` in the project root on every sync.
200
216
 
201
217
  ### DO NOT EDIT (Fully Auto-Generated)
202
218
 
203
- - **Everything in `.phoenix/`** - Completely regenerated on each build. The one exception is `.phoenix/variants/`, where a coding agent writes the option files for `phoenix variants`; a rebuild keeps it
204
- - `tsconfig.json`, `eslint.config.js`, `prettier.config.js`
205
- - `.linguirc`, `.nvmrc`
219
+ - **Everything in `.phoenix/`** - Completely regenerated on each build. The exceptions are `.phoenix/variants/`, where a coding agent writes the option files for `phoenix variants`, and `.phoenix/.env.generated`, the generated env file of `phoenix dev`; a rebuild keeps both
220
+ - `.nvmrc`
206
221
  - `src/locales/**/*.ts` - Compiled from `.po` catalogs
207
222
  - `.env.generated`
208
223
  - `phoenix` and `phoenix-*` skill folders under `.claude/skills/` and `.agents/skills/` — rewritten on every sync with anything else inside them removed, and other `phoenix`-prefixed skill folders are removed; to customise a skill, copy it to a folder whose name does not start with `phoenix`
@@ -215,7 +230,7 @@ Projects created by earlier SDK versions had this guidance in `CLAUDE.md`, `.cur
215
230
 
216
231
  ### Markers for Partial Auto-Generation
217
232
 
218
- `.gitignore` holds the Phoenix entries between two marker lines. Sync rewrites that block and keeps everything outside it:
233
+ `.gitignore` holds the Phoenix entries between two marker lines. Sync rewrites that block and keeps everything outside it. With the application-spec pipeline the block does not list the files sync writes once, `tsconfig.json`, `eslint.config.js` and `prettier.config.js`, so a project commits them:
219
234
 
220
235
  ```gitignore
221
236
  # ===== BEGIN PHOENIX AUTO-GENERATED =====
@@ -239,6 +254,8 @@ With the application-spec pipeline (see [Current and legacy project tooling](?pa
239
254
  - `templates/`
240
255
  - `package.json` (scripts section, custom dependencies)
241
256
  - `.env`, `.env.example`, `.env.ci`
257
+ - `tsconfig.json` (application-spec pipeline; keep it extending `.phoenix/tsconfig.json`)
258
+ - `eslint.config.js`, `prettier.config.js` (application-spec pipeline; sync writes them once, and they are the project's afterwards)
242
259
  - `README.md`, `AGENTS.md`
243
260
 
244
261
  ## File Naming Conventions
@@ -346,6 +363,8 @@ project-root/
346
363
  │ ├── admin-interface.ts # Admin interface types
347
364
  │ ├── i18n.ts # i18n initialization
348
365
  │ ├── globals.d.ts # Global type definitions
366
+ │ ├── tsconfig.json # TypeScript settings, extended by the root tsconfig.json
367
+ │ ├── .linguirc # Lingui configuration
349
368
  │ ├── index.html # Configurator HTML entry
350
369
  │ └── admin.html # Admin HTML entry
351
370
  │
@@ -509,7 +528,7 @@ Assets are split between two locations with different deployment strategies:
509
528
 
510
529
  Localization files enable multi-language support in your configurator.
511
530
 
512
- Translatable messages are authored in TypeScript and TSX source files using `@lingui/macro`.
531
+ Translatable messages are authored in TypeScript and TSX source files using Lingui's macros: `msg` from `@lingui/core/macro` and `<Trans>` from `@lingui/react/macro`.
513
532
 
514
533
  Locale catalogs live in `src/locales/<lang>/`. Phoenix creates and updates the `messages.po` source catalogs; edit their `msgstr` values to provide translations. The `messages.ts` files are compiled from those catalogs and must not be edited directly.
515
534
 
@@ -22,7 +22,7 @@ pnpm install
22
22
  pnpm phoenix sync
23
23
  ```
24
24
 
25
- `phoenix init [folder]` writes the starter project: `package.json`, `pnpm-workspace.yaml` and the starter spec, `spec/application.yaml` and `spec/configurator.yaml`, which describe one box you can resize and recolour. The starter depends on the same SDK version as the CLI that created it, and its `package.json` has the `dev`, `build`, `deploy`, `check` and `fix` scripts, which are yours to change. `phoenix sync` then adds the rest of the project: webhooks and lint config. It writes a `.gitignore` only when the folder is inside a git repository; run `git init` before the first sync, or sync again after it, to get the file.
25
+ `phoenix init [folder]` writes the starter project: `package.json`, `pnpm-workspace.yaml` and the starter spec, `spec/application.yaml` and `spec/configurator.yaml`, which describe one box you can resize and recolour. The starter depends on the same SDK version as the CLI that created it, and its `package.json` has the `dev`, `build`, `deploy`, `check` and `fix` scripts, which are yours to change. `phoenix sync` then adds the rest of the project: the TypeScript, lint and formatting config and the agent skills. It writes no webhook code: a project without `src/webhooks/index.ts` gets a built-in webhook (see [Webhook Entry Point](?path=/docs/phoenix-webhooks--docs#webhook-entry-point)). It writes a `.gitignore` only when the folder is inside a git repository; run `git init` before the first sync, or sync again after it, to get the file.
26
26
 
27
27
  `init` only writes these files: it asks nothing and contacts no server. It refuses a folder that already has a `spec/` folder. A `package.json` already in the folder is kept, as long as it depends on the SDK.
28
28
 
@@ -76,7 +76,7 @@ pnpm phoenix deploy
76
76
  `phoenix deploy` goes through these steps:
77
77
 
78
78
  1. It validates the application spec.
79
- 2. It packs the project files: the `.yaml` files in `spec`, everything in `src`, `mocks`, `assets`, `public` and `templates`, and `package.json`, `pnpm-lock.yaml`, `pnpm-workspace.yaml`, `.gitignore`, `CLAUDE.md` and `.cursor/rules/phoenix.mdc`. Every `node_modules`, `.phoenix` and `__generated` folder, every `.DS_Store` and `._*` file and every `.env` and `.env.*` file are left out, at any depth.
79
+ 2. It packs the project files: the `.yaml` files in `spec`, everything in `src`, `mocks`, `assets`, `public` and `templates`, and `package.json`, `tsconfig.json`, `pnpm-lock.yaml`, `pnpm-workspace.yaml`, `.gitignore`, `CLAUDE.md` and `.cursor/rules/phoenix.mdc`. Every `node_modules`, `.phoenix` and `__generated` folder, every `.DS_Store` and `._*` file and every `.env` and `.env.*` file are left out, at any depth.
80
80
  3. It asks the server for a build. The server compares your domain model with the deployed one and refuses, before anything is uploaded, a model that changed under an already deployed model version; see [Migrations](?path=/docs/phoenix-migrations--docs).
81
81
  4. It uploads the archive, which may be up to 200 MB.
82
82
  5. It starts the build, prints a link to the build's page in Studio and follows the build until your configurator is live, then prints its URL.
@@ -34,6 +34,23 @@ Phoenix provides domain-aware builders through the global `phx.webhooks` namespa
34
34
 
35
35
  ### Webhook Entry Point
36
36
 
37
+ Your webhook is the default export of `src/webhooks/index.ts`. With the application-spec pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), the file is yours to create; sync does not write it. A project without it gets a built-in webhook, so it builds and deploys with no webhook code. The built-in webhook has one handler, an anonymous auth handler, which the platform calls only when `spec/application.yaml` sets `useAuthHook`. The legacy pipeline writes the file with that webhook on the first sync.
38
+
39
+ Create `src/webhooks/index.ts` when the project needs its own handlers: finalization, backend data, or an auth handler that does more than start an anonymous session. A project that sets `useAuthHook` or `useClerk` needs its own auth handler, because the built-in one answers only anonymous requests. The smallest file is the built-in webhook itself:
40
+
41
+ ```ts
42
+ // src/webhooks/index.ts
43
+ const authHandler = phx.webhooks.authHandlerBuilder
44
+ .withAnonymousHandler(async () => ({ success: true, data: {}, role: 'anonymous' }))
45
+ .build()
46
+
47
+ export default phx.webhooks.webhookBuilder.withAuthHook(authHandler).build()
48
+ ```
49
+
50
+ The next `phoenix sync` or `phoenix build`, or the rebuild of a running `phoenix dev`, uses the file; deleting it brings the built-in webhook back. A webhook needs at least one handler, and a project with any other file in `src/webhooks/` must have `index.ts`.
51
+
52
+ A webhook with more handlers:
53
+
37
54
  ```ts
38
55
  // src/webhooks/index.ts
39
56
  import { authHandler } from './handlers/auth-handler.js'
@@ -391,7 +408,7 @@ ctx.emailTaskBuilder.withSubject(msg`Your configuration`)
391
408
  In React templates, use `<Trans>` for inline strings and `<HtmlHelpers.Localized>` to render message descriptors:
392
409
 
393
410
  ```tsx
394
- import { Trans } from '@lingui/macro'
411
+ import { Trans } from '@lingui/react/macro'
395
412
 
396
413
  import { HtmlHelpers } from '@salsita-ai/sdk/webhook'
397
414
 
@@ -456,7 +473,7 @@ The template file:
456
473
 
457
474
  ```tsx
458
475
  // src/webhooks/handlers/configurator-finalize-handler/tasks/pdf-template.tsx
459
- import { Trans } from '@lingui/macro'
476
+ import { Trans } from '@lingui/react/macro'
460
477
 
461
478
  import { HtmlHelpers, PdfHelpers, ResourceHelpers } from '@salsita-ai/sdk/webhook'
462
479
 
@@ -578,7 +595,7 @@ except for resource reference interpolation.
578
595
 
579
596
  ```tsx
580
597
  // src/webhooks/handlers/configurator-finalize-handler/tasks/email-task.tsx
581
- import { msg } from '@lingui/macro'
598
+ import { msg } from '@lingui/core/macro'
582
599
 
583
600
  import { EmailTemplate } from './email-template.js'
584
601
 
@@ -603,7 +620,7 @@ export const simpleEmailTask = phx.webhooks.taskFactory.createSendEmailTask((res
603
620
 
604
621
  ```tsx
605
622
  // src/webhooks/handlers/configurator-finalize-handler/tasks/email-template.tsx
606
- import { Trans } from '@lingui/macro'
623
+ import { Trans } from '@lingui/react/macro'
607
624
 
608
625
  import { EmailHelpers, ResourceHelpers } from '@salsita-ai/sdk/webhook'
609
626
 
@@ -8,7 +8,7 @@ import type { CellValue } from '@salsita-ai/contracts/webhook';
8
8
  import type { AdminIntegrationService } from '#package/react-sdk';
9
9
  import type { $DomainEntity, DataCellValue, DataSchema, DomainEntity, DomainFactory, ProductPreset } from '../core/index.js';
10
10
  import type { AnalyticsSystem, RegistrableTransformer, TransformerFactory } from '../domain-context/index.js';
11
- import type { ProjectModule } from '../domain-runtime/index.js';
11
+ import type { ElementRegistration, ProjectModule } from '../domain-runtime/index.js';
12
12
  import type { AssistantResolvedManifest } from './assistant/index.js';
13
13
  import type { WebComponentEventDescriptor } from './web-component-event.js';
14
14
  import type { WebComponentPropertyDescriptor } from './web-component-property.js';
@@ -292,6 +292,8 @@ export interface ApplicationConfig<ENTITIES extends DomainEntity<string>, ALLOWE
292
292
  /** The `src/handlers/` and `src/elements/` files as project modules; the runtime spec validates and flattens both. */
293
293
  readonly handlers: readonly ProjectModule[];
294
294
  readonly elements: readonly ProjectModule[];
295
+ /** The SDK's default element registrations; a project element with the same name replaces one. */
296
+ readonly defaultElements?: readonly ElementRegistration[];
295
297
  readonly mount: MountConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>;
296
298
  }
297
299
  export {};
@@ -0,0 +1,28 @@
1
+ /**
2
+ * What an element of an assistant form collects: a `group` all its children, a `choice` exactly one
3
+ * of its options, a `choices` any number of them; an `option` is something to pick and an `input` a
4
+ * free value.
5
+ */
6
+ export type AssistantFormRole = 'group' | 'choice' | 'choices' | 'option' | 'input';
7
+ /** The type an attribute of a form element is validated and coerced to; the model writes every attribute as a string. */
8
+ export interface AssistantFormAttribute {
9
+ readonly type: 'string' | 'number' | 'integer' | 'boolean';
10
+ readonly enum?: readonly string[];
11
+ }
12
+ /**
13
+ * An element the assistant can write inside a ```` ```form ```` fence of its reply to ask the user
14
+ * something. The panel renders it, and the SDK prompt lists it, so the model and the panel agree on
15
+ * one set of elements.
16
+ */
17
+ export interface AssistantFormElementDescriptor {
18
+ /** The tag: lowercase, and never the name of an HTML element. */
19
+ readonly name: string;
20
+ readonly role: AssistantFormRole;
21
+ /** What the element is for, printed in the prompt after its signature. */
22
+ readonly description: string;
23
+ /** Attributes beyond the built-in `label` and, on an option or an input, `value`. */
24
+ readonly attributes: Readonly<Record<string, AssistantFormAttribute>>;
25
+ readonly required?: readonly string[];
26
+ }
27
+ /** The elements every assistant form understands, in the order the prompt lists them. */
28
+ export declare const ASSISTANT_BUILT_IN_FORM_ELEMENTS: readonly AssistantFormElementDescriptor[];
@@ -0,0 +1 @@
1
+ export const ASSISTANT_BUILT_IN_FORM_ELEMENTS=[{name:"group",role:"group",description:"Puts related questions together under its label.",attributes:{}},{name:"choice",role:"choice",description:"The user picks exactly one of its options.",attributes:{}},{name:"choices",role:"choices",description:"The user picks any number of its options.",attributes:{}},{name:"reply",role:"option",description:"A short answer shown as a button.",attributes:{}},{name:"text",role:"input",description:"A single line the user types.",attributes:{placeholder:{type:"string"}}}];
@@ -1 +1 @@
1
- export const generateAssistantPrompt=e=>{let t=Object.values(e.childRecipes??{}).some(e=>e.length>0),a=Object.values(e.replaceRecipes??{}).some(e=>e.length>0),n=Object.values(e.fieldOptions??{}).some(e=>e.length>0),s=Object.keys(e.actions??{}).length>0,i=(e.deletableTypes?.length??0)>0||Object.values(e.writableFields??{}).some(e=>Object.keys(e).length>0)||t||a||s,o=t||a||n,r=[...t?["`childRecipes` is what can be added to it"]:[],...a?["`replaceRecipes` what it can be replaced with"]:[],...n?["`<field>Options` the values a field accepts"]:[]],h=["`selected`",...(e.navigationFields??[]).map(e=>`\`${e}\``)].join(", ");return[["Tools","- Put related operations in one call and select only the fields you need.",...i?[`- Use a mutation inside \`query\` to answer a what-if about a change ${o?"the lists under `meta` do not show":"before making it"}.`,"- Use `apply` only for what the user asked for."]:["- Nothing in this configurator can be changed through you. Say so when the user asks for a change."],"- When an operation fails, its `errors` say why and what to send instead."],...i?[["After a change","- A change is made only when the `apply` result has `committed: true`. Otherwise `errors` or `message` says what happened; without either, nothing changed. Never say a change was made when it was not.","- `sideEffects` names the major or unexpected things the configurator changed along with your change. Tell the user about them when committed; otherwise they describe what would happen. Smaller adjustments are not listed.","- A mutation returns the state after the change: use the ids and values it returned, not the ones you sent.",...s?["- When one mutation does the whole of what the user asked, use it instead of building the same change from several others."]:[]]]:[],...o?[["What can be done to an entity",`- \`meta\` lists what is possible right now: ${r.join(", ")}. Read the list before such a change and before telling the user what is available.`,`- You can select \`dryRun\` on ${[...t||a?["recipes"]:[],...n?["options"]:[]].join(" or ")} to look ahead and pick one that meets what the user asked for. It is optional before a change.`,"- Read the lists again after a change, unless their descriptions say they stay the same."]]:[],["The `[changes]` block","- Every user message starts with it: a glimpse of what the user did in the configurator since your last turn.",`- \`[changes: none]\`, or only ${h} lines: what you know still holds. Do not query it again.`,"- Other lines are a hint at what to read again: `A` added, `D` deleted, `M` modified with the fields. Text after `#` says what caused the line; `reset: undo/redo` says the user undid or redid changes.","- Read computed fields again when a listed change may affect them.","- `[changes: unavailable]` and `[changes: too many (n)]`: read again before relying on anything you read earlier.",...i?["- Your applied changes are not listed, except those waiting for user approval: they appear once approved."]:[]],["Reading the schema","- Take ids from results.",...(e.deletableTypes?.length??0)>0||a?["- The id of a deleted or replaced entity is gone and may later be given to another entity."]:[],`- A field whose name starts with \`_\` is computed: read it${i?", never write it":""}.`,"- Numbers are in the unit the field description names. Convert when the user uses another unit."],["Entity links","- When you name an entity the user may want to find, write it as a Markdown link whose target is `entity:` and its id: `[the corner cabinet](entity:<id>)`. The user sees only the text; the id is never shown.","- Link only entities that exist in the configuration now, never one created only inside `query`."],...e.lenses?.declarations?[["Built-in fragments","- These fragments are already defined for every operation. Spread one by name on a field of its type, as in `field { ...FragmentName }`, instead of listing its fields.","- A fragment is a starting selection: add the other fields you need next to the spread, by name from the schema.","- Never define a fragment with one of these names.","",e.lenses.declarations]]:[]].map(e=>e.join("\n")).join("\n\n")};
1
+ import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e}from"./assistant-form-elements.js";let t=[["Containers",["group","choice","choices"]],["Options",["option"]],["Inputs",["input"]]];export const generateAssistantPrompt=a=>{let n=Object.values(a.childRecipes??{}).some(e=>e.length>0),i=Object.values(a.replaceRecipes??{}).some(e=>e.length>0),s=Object.values(a.fieldOptions??{}).some(e=>e.length>0),o=Object.keys(a.actions??{}).length>0,r=(a.deletableTypes?.length??0)>0||Object.values(a.writableFields??{}).some(e=>Object.keys(e).length>0)||n||i||o,h=n||i||s,l=[...n?["`childRecipes` is what can be added to it"]:[],...i?["`replaceRecipes` what it can be replaced with"]:[],...s?["`<field>Options` the values a field accepts"]:[]],d=["`selected`",...(a.navigationFields??[]).map(e=>`\`${e}\``)].join(", ");return[["Tools","- Put related operations in one call and select only the fields you need.",...r?[`- Use a mutation inside \`query\` to answer a what-if about a change ${h?"the lists under `meta` do not show":"before making it"}.`,"- Use `apply` only for what the user asked for."]:["- Nothing in this configurator can be changed through you. Say so when the user asks for a change."],"- When an operation fails, its `errors` say why and what to send instead."],...r?[["After a change","- A change is made only when the `apply` result has `committed: true`. Otherwise `errors` or `message` says what happened; without either, nothing changed. Never say a change was made when it was not.","- `sideEffects` names the major or unexpected things the configurator changed along with your change. Tell the user about them when committed; otherwise they describe what would happen. Smaller adjustments are not listed.","- A mutation returns the state after the change: use the ids and values it returned, not the ones you sent.",...o?["- When one mutation does the whole of what the user asked, use it instead of building the same change from several others."]:[]]]:[],...h?[["What can be done to an entity",`- \`meta\` lists what is possible right now: ${l.join(", ")}. Read the list before such a change and before telling the user what is available.`,`- You can select \`dryRun\` on ${[...n||i?["recipes"]:[],...s?["options"]:[]].join(" or ")} to look ahead and pick one that meets what the user asked for. It is optional before a change.`,"- Read the lists again after a change, unless their descriptions say they stay the same."]]:[],["The `[changes]` block","- Every user message starts with it: a glimpse of what the user did in the configurator since your last turn.",`- \`[changes: none]\`, or only ${d} lines: what you know still holds. Do not query it again.`,"- Other lines are a hint at what to read again: `A` added, `D` deleted, `M` modified with the fields. Text after `#` says what caused the line; `reset: undo/redo` says the user undid or redid changes.","- Read computed fields again when a listed change may affect them.","- `[changes: unavailable]` and `[changes: too many (n)]`: read again before relying on anything you read earlier.",...r?["- Your applied changes are not listed, except those waiting for user approval: they appear once approved."]:[]],["Reading the schema","- Take ids from results.",...(a.deletableTypes?.length??0)>0||i?["- The id of a deleted or replaced entity is gone and may later be given to another entity."]:[],`- A field whose name starts with \`_\` is computed: read it${r?", never write it":""}.`,"- Numbers are in the unit the field description names. Convert when the user uses another unit."],["Links","- You may link an entity of the current configuration when you speak about that very entity: `[the left burner](entity:CookingTop-1)`. It helps the user find it in the configurator.",...h?["- Whenever you name recipes or options you read from `meta`, in a list, a table or a sentence, link each one: `[Single gas burner](recipe:KitchenRange-1/top/gas_single)` or `[Oak](option:Cabinet-2/finishOptions/oak)`. The link shows the user its picture or color and its description, so never draw previews yourself. The target is the entity id, the recipe group id or the options field you read, and the key or value, each encoded as in a URL."]:[]],["Replies","- Write Markdown only, never HTML: the panel does not render it."],["Forms","- To ask the user something they answer by picking or typing, end your reply with a form: a fenced code block with the language `form`. It holds only elements, written as lowercase tags with string attributes, without Markdown or text.","- Every element takes `label`, the text the user sees; on a container or an input it also names the answer. Options and inputs take `value`: an option sends it instead of its label, and an input starts with it.","- Options can also stand on their own, outside a `choice` or `choices`.","- An element or attribute not listed here, or an element other than an option inside a `choice` or `choices`, makes the whole form fail.","- The answer is the user's next message. Each container or input gives a line `Label: value`, or the bare value without a label; the lines of a labelled container are indented by two spaces under it, a `choices` lists each picked option on its own line, and `—` marks what was left unanswered.",'- Example: `<choice label="Plinth"><reply label="Black" /><reply label="Oak" /></choice>` is answered with `Plinth: Oak`.',...t.flatMap(([t,a])=>{let n=e.filter(({role:e})=>a.includes(e));return 0===n.length?[]:[`- ${t}:`,...n.map(e=>` - \`${(({name:e,role:t,attributes:a})=>{let n=["label",..."option"===t||"input"===t?["value"]:[],...Object.keys(a)];return"option"===t||"input"===t?`<${e} ${n.join(" ")} />`:`<${e} ${n.join(" ")}>…</${e}>`})(e)}\`: ${e.description}`)]})],...a.lenses?.declarations?[["Built-in fragments","- These fragments are already defined for every operation. Spread one by name on a field of its type, as in `field { ...FragmentName }`, instead of listing its fields.","- A fragment is a starting selection: add the other fields you need next to the spread, by name from the schema.","- Never define a fragment with one of these names.","",a.lenses.declarations]]:[]].map(e=>e.join("\n")).join("\n\n")};
@@ -7,3 +7,5 @@ export type { AssistantFieldSource, AssistantRecipeGroup, AssistantFieldOptions,
7
7
  export { generateAssistantPrompt } from './generate-assistant-prompt.js';
8
8
  export * from './session-setup/index.js';
9
9
  export { describeAssistantValues, mergeAssistantFields, resolveAssistantField } from './assistant-fields.js';
10
+ export { ASSISTANT_BUILT_IN_FORM_ELEMENTS } from './assistant-form-elements.js';
11
+ export type { AssistantFormAttribute, AssistantFormElementDescriptor, AssistantFormRole, } from './assistant-form-elements.js';
@@ -1 +1 @@
1
- export{ASSISTANT_HINTS}from"./assistant-resolved-manifest.js";export{buildAssistantManifest}from"./build-assistant-manifest.js";export{AssistantFieldClashError,createAssistantExecutionSchema}from"./create-assistant-execution-schema.js";export{generateAssistantPrompt}from"./generate-assistant-prompt.js";export*from"./session-setup/index.js";export{describeAssistantValues,mergeAssistantFields,resolveAssistantField}from"./assistant-fields.js";
1
+ export{ASSISTANT_HINTS}from"./assistant-resolved-manifest.js";export{buildAssistantManifest}from"./build-assistant-manifest.js";export{AssistantFieldClashError,createAssistantExecutionSchema}from"./create-assistant-execution-schema.js";export{generateAssistantPrompt}from"./generate-assistant-prompt.js";export*from"./session-setup/index.js";export{describeAssistantValues,mergeAssistantFields,resolveAssistantField}from"./assistant-fields.js";export{ASSISTANT_BUILT_IN_FORM_ELEMENTS}from"./assistant-form-elements.js";
@@ -41,6 +41,8 @@ export interface AssistantRecipeContext {
41
41
  /** Resolves a title in the current language, for the key of a recipe that declares none. */
42
42
  readonly resolveLocalizable: (message: Localizable) => string;
43
43
  }
44
+ /** What reading a recipe group needs: listing never cooks, so the panel can read a group without a cooker. */
45
+ type AssistantRecipeReadContext = Pick<AssistantRecipeContext, 'componentReader' | 'resolveLocalizable'>;
44
46
  /** One recipe of a group as the assistant addresses it: the list item and its key, unique within the group. */
45
47
  export interface AssistantRecipe {
46
48
  readonly key: string;
@@ -73,7 +75,7 @@ export declare const findAssistantRecipeGroups: (manifest: AssistantManifest, ki
73
75
  * assistant sees the groups the configurator's own controls would offer. A list item without recipes
74
76
  * adds nothing and is left out.
75
77
  */
76
- export declare const readAssistantRecipeGroup: (kind: AssistantRecipeKind, group: AssistantRecipeGroup, entityId: DomainEntityId<string>, state: AnyDomainState, context: AssistantRecipeContext) => AssistantRecipeGroupSnapshot | null;
78
+ export declare const readAssistantRecipeGroup: (kind: AssistantRecipeKind, group: AssistantRecipeGroup, entityId: DomainEntityId<string>, state: AnyDomainState, context: AssistantRecipeReadContext) => AssistantRecipeGroupSnapshot | null;
77
79
  /**
78
80
  * The updates of one recipe of a group for the entity `entityId`, computed from `state`: the same
79
81
  * updates, with the same tag, the configurator's own controls make. A recipe of a child group is
@@ -3,7 +3,7 @@ import type { ThemeOptions } from '@mui/material';
3
3
  import type { z } from 'zod';
4
4
  import type { FinalizeTaskResource } from '@salsita-ai/contracts/webhook';
5
5
  import { type $DomainEntity, type DomainEntity, type DomainFactory, type EnumLike, type ProductPreset, type SchemaOfObject } from '../core/index.js';
6
- import { type ProjectModule } from '../domain-runtime/index.js';
6
+ import { type ElementRegistration, type ProjectModule } from '../domain-runtime/index.js';
7
7
  import type { AclConfig, ApplicationConfig, DataSpec, DefaultEnvs, ResourcesConfig, SpecTransformer, TransformersConfig, UserInterfaceConfig } from './application-config.js';
8
8
  import { type AssistantResolvedManifest } from './assistant/index.js';
9
9
  interface ConfiguratorBuilderContext<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> {
@@ -44,6 +44,7 @@ interface ConfiguratorBuilderContext<ENTITIES extends DomainEntity<string> = nev
44
44
  tagName?: string;
45
45
  handlers?: readonly ProjectModule[];
46
46
  elements?: readonly ProjectModule[];
47
+ defaultElements?: readonly ElementRegistration[];
47
48
  }
48
49
  export declare class ConfiguratorBuilder<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> {
49
50
  private readonly _context;
@@ -87,6 +88,8 @@ export declare class ConfiguratorBuilder<ENTITIES extends DomainEntity<string> =
87
88
  withHandlers(handlers: readonly ProjectModule[]): 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>;
88
89
  /** Sets the elements as project modules, one per `src/elements/` file, for the runtime spec to validate. */
89
90
  withElements(elements: readonly ProjectModule[]): 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>;
91
+ /** Sets the SDK's default element registrations; a project element with the same name replaces one. */
92
+ withDefaultElements(defaultElements: readonly ElementRegistration[]): 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>;
90
93
  withResources<NEW_RESOURCE extends string>(resources: ReadonlyArray<FinalizeTaskResource<NEW_RESOURCE>>): 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, NEW_RESOURCE>;
91
94
  withWebComponentTag(tagName: string): 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>;
92
95
  /**
@@ -1 +1 @@
1
- import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{defaultI18n as e}from"#package/i18n";import{extendedSchemaValidator as i}from"../core/index.js";import{NoopAnalyticsSystem as r}from"../domain-context/index.js";import{createDomainRuntime as n}from"../domain-runtime/index.js";import{isGetApplicationWrapperHandler as o}from"./GetApplicationWrapperHandler.js";import{isGetWebComponentOptionsHandler as a}from"./GetWebComponentOptions.js";import{isAssistantSetupHandler as s}from"./assistant/index.js";import{createInitialPublishedData as l}from"./create-initial-published-data.js";import{isDataRowValidatorHandler as h}from"./published-data/DataRowValidatorHandler.js";import{isFilterPublishedChunksHandler as u}from"./published-data/FilterPublishedChunksHandler.js";import{isMapPublishedChunkedDataHandler as d}from"./published-data/MapPublishedChunkedDataHandler.js";import{isMapPublishedRevisionDataHandler as c}from"./published-data/MapPublishedRevisionDataHandler.js";import{isSheetValidatorHandler as f}from"./published-data/SheetValidatorHandler.js";export class ConfiguratorBuilder{_context;constructor(t){this._context=t}withDefaultEnvs(t){return new ConfiguratorBuilder({...this._context,defaultEnvs:t})}withVersion(t){return new ConfiguratorBuilder({...this._context,version:t})}withTextLanguages(t){return new ConfiguratorBuilder({...this._context,textLanguages:t})}withAcl(t){return new ConfiguratorBuilder({...this._context,acl:t})}withAdminRelease(t){return new ConfiguratorBuilder({...this._context,enableAdminRelease:t})}withUi(t){return new ConfiguratorBuilder({...this._context,ui:t})}withResourcesConfig(t){return new ConfiguratorBuilder({...this._context,resourcesConfig:t})}withChunks(t){return new ConfiguratorBuilder({...this._context,chunks:t})}withPublishedDataHash(t){return new ConfiguratorBuilder({...this._context,publishedDataHash:t})}withAssistant(t){return new ConfiguratorBuilder({...this._context,assistant:t})}withTheme(t){return new ConfiguratorBuilder({...this._context,theme:t})}withDomainFactory(t){return new ConfiguratorBuilder({...this._context,domainFactory:t})}withAdminDomainFactory(t){return new ConfiguratorBuilder({...this._context,adminDomainFactory:t})}withI18n=t=>new ConfiguratorBuilder({...this._context,i18n:t});withPrefetchedFinalizeData(t){return new ConfiguratorBuilder({...this._context,prefetchedFinalizeData:t})}withFinalizeData(t){return new ConfiguratorBuilder({...this._context,finalizeData:t})}withFinalizeResult(t){return new ConfiguratorBuilder({...this._context,finalizeResult:t})}withCallbackData(t){return new ConfiguratorBuilder({...this._context,callbackData:t})}withNavigationState(t){return new ConfiguratorBuilder({...this._context,navigationState:t})}withViewState(t){return new ConfiguratorBuilder({...this._context,viewState:t})}withToolState(t){return new ConfiguratorBuilder({...this._context,toolState:t})}withExportState(t){return new ConfiguratorBuilder({...this._context,exportState:t})}withAdminNavigationState(t){return new ConfiguratorBuilder({...this._context,adminNavigationState:t})}withAdminViewState(t){return new ConfiguratorBuilder({...this._context,adminViewState:t})}withPresets(t){return new ConfiguratorBuilder({...this._context,presets:t})}withAdminPresets(t){return new ConfiguratorBuilder({...this._context,adminPresets:t})}withComponentOptics(t){return new ConfiguratorBuilder({...this._context,componentOptics:[...this._context.componentOptics,...t]})}withAdminComponentOptics(t){return new ConfiguratorBuilder({...this._context,adminComponentOptics:[...this._context.adminComponentOptics??[],...t]})}withHandlers(t){return new ConfiguratorBuilder({...this._context,handlers:t})}withElements(t){return new ConfiguratorBuilder({...this._context,elements:t})}withResources(t){return new ConfiguratorBuilder({...this._context,resources:t})}withWebComponentTag(t){return new ConfiguratorBuilder({...this._context,tagName:t})}withTransformers(t,e){return new ConfiguratorBuilder({...this._context,transformers:{importedTransformers:t,specTransformers:e}})}withInterface(t){return this}withDataSpec=t=>new ConfiguratorBuilder({...this._context,dataSpec:t});_computeInitialPublishedData(t,e,i){if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");return l({adminDomainFactory:this._context.adminDomainFactory,domainRuntime:e,adminPresets:this._context.adminPresets??[],handlers:i,dataSpec:this._context.dataSpec,chunks:this._context.chunks,logger:t})}buildConfig(){return this._buildConfigWithHandlers().config}_buildConfigWithHandlers(){if(!this._context.domainFactory)throw Error("Can not create application config, domainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.presets)throw Error("Can not create application config, presets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminDomainFactory)throw Error("Can not create application config, adminDomainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminPresets)throw Error("Can not create application config, adminPresets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.version)throw Error("Can not create application config, version is required!");let i=this._context.tagName??"salsita-configurator",l={defaultEnvs:this._context.defaultEnvs,services:{i18n:this._context.i18n},version:this._context.version,initialPublishedData:{},domain:{textLanguages:this._context.textLanguages,componentOptics:this._context.componentOptics,presets:this._context.presets,domainFactory:this._context.domainFactory},navigation:{navigationStates:this._context.navigationState?.values(),viewStates:this._context.viewState?.values(),toolStates:this._context.toolState?.values(),exportStates:this._context.exportState?.values()},adminNavigation:{navigationStates:this._context.adminNavigationState?.values(),viewStates:this._context.adminViewState?.values()},adminDomain:{textLanguages:this._context.textLanguages,componentOptics:this._context.adminComponentOptics??[],presets:this._context.adminPresets,domainFactory:this._context.adminDomainFactory},mount:{tag:i,options:{}},handlers:this._context.handlers??[],elements:this._context.elements??[],transformers:this._context.transformers,features:{acl:this._context.acl,enableAdminRelease:this._context.enableAdminRelease},ui:{preview:this._context.ui?.preview,alwaysExpand:this._context.ui?.alwaysExpand,theme:this._context.theme},resources:this._context.resourcesConfig,chunks:this._context.chunks,publishedDataHash:this._context.publishedDataHash,assistant:this._context.assistant,dataSpec:this._context.dataSpec},d=t(),c=n({config:l,services:{analyticsService:new r,i18n:e,logger:d}}),m=c.getState().spec.configurator.handlers;if(m.filter(s).length>1)throw Error("Multiple createAssistantSetupHandler handlers found. Only one handler is allowed.");if(m.filter(t=>u(t)).length>1)throw Error("Multiple createFilterPublishedChunksHandler handlers found. Only one handler is allowed.");if(m.filter(t=>h(t)).length>1)throw Error("Multiple createDataRowValidatorHandler handlers found. Only one handler is allowed.");if(m.filter(t=>f(t)).length>1)throw Error("Multiple createSheetValidatorHandler handlers found. Only one handler is allowed.");let w=m.find(o)?.handler().handler,x=m.find(a)?.handler().handler(void 0),p=this._computeInitialPublishedData(d,c,m);return{config:{...l,mount:{tag:i,options:x??{},Application:w},initialPublishedData:p},handlers:m}}buildWebhookContext(){if(!this._context.domainFactory)throw Error("domainFactory is required!");if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");if(!this._context.adminPresets)throw Error("adminPresets are required!");let{config:t,handlers:e}=this._buildConfigWithHandlers(),r=t=>{if(null==this._context.finalizeData)return{};let e=i.compile(this._context.finalizeData);if(!e(t))throw console.error("Finalize data validation errors:",e.errors),Error("Invalid finalize data!");return t},n=t=>{if(null==this._context.finalizeResult)return{};let e=i.compile(this._context.finalizeResult);if(!e(t))throw console.error("Finalize result validation errors:",e.errors),Error("Invalid finalize result!");return t},o=t=>{if(null==this._context.callbackData)return{};let e=i.compile(this._context.callbackData);if(!e(t))throw console.error("Callback data validation errors:",e.errors),Error("Invalid callback data!");return t},a=e.find(c)?.handler().handler,s=e.find(d)?.handler().handler,l=e.find(h)?.handler().handler,u=e.find(f)?.handler().handler;return{config:t,parseFinalizeData:r,parseFinalizeResult:n,resources:this._context.resources??[],parseCallbackData:o,mapPublishedRevisionData:a,mapPublishedChunkedData:s,dataRowValidator:l,sheetValidator:u}}}
1
+ import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{defaultI18n as e}from"#package/i18n";import{extendedSchemaValidator as i}from"../core/index.js";import{NoopAnalyticsSystem as r}from"../domain-context/index.js";import{createDomainRuntime as n}from"../domain-runtime/index.js";import{isGetApplicationWrapperHandler as o}from"./GetApplicationWrapperHandler.js";import{isGetWebComponentOptionsHandler as a}from"./GetWebComponentOptions.js";import{isAssistantSetupHandler as s}from"./assistant/index.js";import{createInitialPublishedData as l}from"./create-initial-published-data.js";import{isDataRowValidatorHandler as h}from"./published-data/DataRowValidatorHandler.js";import{isFilterPublishedChunksHandler as u}from"./published-data/FilterPublishedChunksHandler.js";import{isMapPublishedChunkedDataHandler as d}from"./published-data/MapPublishedChunkedDataHandler.js";import{isMapPublishedRevisionDataHandler as c}from"./published-data/MapPublishedRevisionDataHandler.js";import{isSheetValidatorHandler as f}from"./published-data/SheetValidatorHandler.js";export class ConfiguratorBuilder{_context;constructor(t){this._context=t}withDefaultEnvs(t){return new ConfiguratorBuilder({...this._context,defaultEnvs:t})}withVersion(t){return new ConfiguratorBuilder({...this._context,version:t})}withTextLanguages(t){return new ConfiguratorBuilder({...this._context,textLanguages:t})}withAcl(t){return new ConfiguratorBuilder({...this._context,acl:t})}withAdminRelease(t){return new ConfiguratorBuilder({...this._context,enableAdminRelease:t})}withUi(t){return new ConfiguratorBuilder({...this._context,ui:t})}withResourcesConfig(t){return new ConfiguratorBuilder({...this._context,resourcesConfig:t})}withChunks(t){return new ConfiguratorBuilder({...this._context,chunks:t})}withPublishedDataHash(t){return new ConfiguratorBuilder({...this._context,publishedDataHash:t})}withAssistant(t){return new ConfiguratorBuilder({...this._context,assistant:t})}withTheme(t){return new ConfiguratorBuilder({...this._context,theme:t})}withDomainFactory(t){return new ConfiguratorBuilder({...this._context,domainFactory:t})}withAdminDomainFactory(t){return new ConfiguratorBuilder({...this._context,adminDomainFactory:t})}withI18n=t=>new ConfiguratorBuilder({...this._context,i18n:t});withPrefetchedFinalizeData(t){return new ConfiguratorBuilder({...this._context,prefetchedFinalizeData:t})}withFinalizeData(t){return new ConfiguratorBuilder({...this._context,finalizeData:t})}withFinalizeResult(t){return new ConfiguratorBuilder({...this._context,finalizeResult:t})}withCallbackData(t){return new ConfiguratorBuilder({...this._context,callbackData:t})}withNavigationState(t){return new ConfiguratorBuilder({...this._context,navigationState:t})}withViewState(t){return new ConfiguratorBuilder({...this._context,viewState:t})}withToolState(t){return new ConfiguratorBuilder({...this._context,toolState:t})}withExportState(t){return new ConfiguratorBuilder({...this._context,exportState:t})}withAdminNavigationState(t){return new ConfiguratorBuilder({...this._context,adminNavigationState:t})}withAdminViewState(t){return new ConfiguratorBuilder({...this._context,adminViewState:t})}withPresets(t){return new ConfiguratorBuilder({...this._context,presets:t})}withAdminPresets(t){return new ConfiguratorBuilder({...this._context,adminPresets:t})}withComponentOptics(t){return new ConfiguratorBuilder({...this._context,componentOptics:[...this._context.componentOptics,...t]})}withAdminComponentOptics(t){return new ConfiguratorBuilder({...this._context,adminComponentOptics:[...this._context.adminComponentOptics??[],...t]})}withHandlers(t){return new ConfiguratorBuilder({...this._context,handlers:t})}withElements(t){return new ConfiguratorBuilder({...this._context,elements:t})}withDefaultElements(t){return new ConfiguratorBuilder({...this._context,defaultElements:t})}withResources(t){return new ConfiguratorBuilder({...this._context,resources:t})}withWebComponentTag(t){return new ConfiguratorBuilder({...this._context,tagName:t})}withTransformers(t,e){return new ConfiguratorBuilder({...this._context,transformers:{importedTransformers:t,specTransformers:e}})}withInterface(t){return this}withDataSpec=t=>new ConfiguratorBuilder({...this._context,dataSpec:t});_computeInitialPublishedData(t,e,i){if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");return l({adminDomainFactory:this._context.adminDomainFactory,domainRuntime:e,adminPresets:this._context.adminPresets??[],handlers:i,dataSpec:this._context.dataSpec,chunks:this._context.chunks,logger:t})}buildConfig(){return this._buildConfigWithHandlers().config}_buildConfigWithHandlers(){if(!this._context.domainFactory)throw Error("Can not create application config, domainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.presets)throw Error("Can not create application config, presets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminDomainFactory)throw Error("Can not create application config, adminDomainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminPresets)throw Error("Can not create application config, adminPresets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.version)throw Error("Can not create application config, version is required!");let i=this._context.tagName??"salsita-configurator",l={defaultEnvs:this._context.defaultEnvs,services:{i18n:this._context.i18n},version:this._context.version,initialPublishedData:{},domain:{textLanguages:this._context.textLanguages,componentOptics:this._context.componentOptics,presets:this._context.presets,domainFactory:this._context.domainFactory},navigation:{navigationStates:this._context.navigationState?.values(),viewStates:this._context.viewState?.values(),toolStates:this._context.toolState?.values(),exportStates:this._context.exportState?.values()},adminNavigation:{navigationStates:this._context.adminNavigationState?.values(),viewStates:this._context.adminViewState?.values()},adminDomain:{textLanguages:this._context.textLanguages,componentOptics:this._context.adminComponentOptics??[],presets:this._context.adminPresets,domainFactory:this._context.adminDomainFactory},mount:{tag:i,options:{}},handlers:this._context.handlers??[],elements:this._context.elements??[],defaultElements:this._context.defaultElements??[],transformers:this._context.transformers,features:{acl:this._context.acl,enableAdminRelease:this._context.enableAdminRelease},ui:{preview:this._context.ui?.preview,alwaysExpand:this._context.ui?.alwaysExpand,theme:this._context.theme},resources:this._context.resourcesConfig,chunks:this._context.chunks,publishedDataHash:this._context.publishedDataHash,assistant:this._context.assistant,dataSpec:this._context.dataSpec},d=t(),c=n({config:l,services:{analyticsService:new r,i18n:e,logger:d}}),m=c.getState().spec.configurator.handlers;if(m.filter(s).length>1)throw Error("Multiple createAssistantSetupHandler handlers found. Only one handler is allowed.");if(m.filter(t=>u(t)).length>1)throw Error("Multiple createFilterPublishedChunksHandler handlers found. Only one handler is allowed.");if(m.filter(t=>h(t)).length>1)throw Error("Multiple createDataRowValidatorHandler handlers found. Only one handler is allowed.");if(m.filter(t=>f(t)).length>1)throw Error("Multiple createSheetValidatorHandler handlers found. Only one handler is allowed.");let w=m.find(o)?.handler().handler,x=m.find(a)?.handler().handler(void 0),_=this._computeInitialPublishedData(d,c,m);return{config:{...l,mount:{tag:i,options:x??{},Application:w},initialPublishedData:_},handlers:m}}buildWebhookContext(){if(!this._context.domainFactory)throw Error("domainFactory is required!");if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");if(!this._context.adminPresets)throw Error("adminPresets are required!");let{config:t,handlers:e}=this._buildConfigWithHandlers(),r=t=>{if(null==this._context.finalizeData)return{};let e=i.compile(this._context.finalizeData);if(!e(t))throw console.error("Finalize data validation errors:",e.errors),Error("Invalid finalize data!");return t},n=t=>{if(null==this._context.finalizeResult)return{};let e=i.compile(this._context.finalizeResult);if(!e(t))throw console.error("Finalize result validation errors:",e.errors),Error("Invalid finalize result!");return t},o=t=>{if(null==this._context.callbackData)return{};let e=i.compile(this._context.callbackData);if(!e(t))throw console.error("Callback data validation errors:",e.errors),Error("Invalid callback data!");return t},a=e.find(c)?.handler().handler,s=e.find(d)?.handler().handler,l=e.find(h)?.handler().handler,u=e.find(f)?.handler().handler;return{config:t,parseFinalizeData:r,parseFinalizeResult:n,resources:this._context.resources??[],parseCallbackData:o,mapPublishedRevisionData:a,mapPublishedChunkedData:s,dataRowValidator:l,sheetValidator:u}}}
@@ -1 +1 @@
1
- import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=t();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
1
+ import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";export const getExtendedSchemaValidator=()=>{let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a():e();return t.addKeyword("tsType"),t.addKeyword("import"),t.addKeyword("declared"),t};export const extendedSchemaValidator=getExtendedSchemaValidator();
@@ -2,7 +2,7 @@ export { type AnalyticsSystem, NoopAnalyticsSystem, type AnalyticsEvent, Analyti
2
2
  export { NavigationUpdateTag, isInitialNavigationUpdate, isNavigationUpdate, isInitialViewUpdate, isViewUpdate, isInitialSelectionUpdate, isSelectUpdate, isDeselectUpdate, isInitialFullscreenUpdate, isToggleFullscreenUpdate, isInitialDebugUpdate, isInitialViewportUpdate, isSetViewportUpdate, isInitialDragUpdate, isDragStartUpdate, isDragEndUpdate, isInitialToolUpdate, isToolUpdate, isExportUpdate, createAutoSelectionTransformer, NavigationSystem, type NavigationSystemContext, createResetSelectionOnNavigationTransformer, createNavigationOnSelectionTransformer, createNavigationOnDeselectTransformer, createSelectParentOnDeselectionTransformer, createNavigationOnSelectionChangeTransformer, type AnyNavigationSystem, } from './navigation-system/index.js';
3
3
  export { StoreSystem, type TransformerRegistration, type UpdateTransformer, type TransformerLogFunction, type Transformers, type StateSliceName, type StateEmissionKind, type CommitPreparedOutcome, nextDomainEntityId, getIdSequence, applyUpdates, SystemState, SystemStateInitialUpdateTag, SystemStateUpdateTag, type SystemStateContext, type AnyCreateTransformersFactory, type AnyStoreSystem, type Unregister, } from './store-system/index.js';
4
4
  export { createRefReplaceTransformer, createCascadeDeletesTransformer, createCascadeRefPruningTransformer, createCreateEntityRefsTransformer, } from './relation-transformers/index.js';
5
- export { type CanBeUndonePredicate, type CanBeUndoneContext, type UndoCapabilities, UndoSystem, UNDO_REDO_RESET_TAG, isUndoRedoReset, type AnyUndoSystem, } from './undo-system.js';
5
+ export { type CanBeUndonePredicate, type CanBeUndoneContext, type UndoCapabilities, type UndoStep, UndoSystem, UNDO_REDO_RESET_TAG, isUndoRedoReset, type AnyUndoSystem, } from './undo-system.js';
6
6
  export { DimensionSystem, type AnyDimensionSystem, type DimensionSystemContext, type AngleDimensionViolation, type DistanceDimensionViolation, type GenericDimensionViolation, } from './dimension-system/index.js';
7
7
  export { ActionSystem, type AnyActionSystem, type ActionSystemContext } from './action-system/index.js';
8
8
  export { RecipeCookerSystem, type AnyRecipeCookerSystem, type RecipeCookerSystemContext, ReplaceRecipeUpdateTag, isReplaceEntityUpdate, type IsReplaceRecipeUpdate, CreateRecipeUpdateTag, isCreateEntityUpdate, type IsCreateRecipeUpdate, } from './recipe-system/index.js';
@@ -1,10 +1,31 @@
1
1
  import type { ObservableWithLastValue } from '@salsita-ai/common/utils';
2
- import type { $DomainEntity, DomainEntity, ResetStateEmission, StateEmission } from '../core/index.js';
2
+ import type { $DomainEntity, DomainEntity, DomainState, ResetStateEmission, StateEmission } from '../core/index.js';
3
3
  import type { DomainContextSelectors } from '../domain-runtime/index.js';
4
4
  export interface UndoCapabilities {
5
5
  readonly canUndo: boolean;
6
6
  readonly canRedo: boolean;
7
7
  }
8
+ /**
9
+ * One step of the undo history: a state that undo and redo return to.
10
+ *
11
+ * A step is made by an undoable change. The non-undoable commits made on top of it afterwards, such
12
+ * as a selection or a navigation, do not make steps of their own; returning to the step keeps them,
13
+ * so undoing a later change does not also take back what the user selected since. A step therefore
14
+ * holds two states: the one that identifies it and the one it returns to.
15
+ */
16
+ export interface UndoStep<ENTITIES extends DomainEntity<string>> {
17
+ /**
18
+ * The state the undoable change committed. It identifies the step and never changes, so a caller
19
+ * that knows which state its own change committed can tell whether that change is the step the
20
+ * configuration is at.
21
+ */
22
+ readonly committedState: DomainState<ENTITIES>;
23
+ /**
24
+ * What undo or redo resets the store to: `committedState` plus the non-undoable commits made on
25
+ * top of it before the next undoable change.
26
+ */
27
+ readonly restoreState: DomainState<ENTITIES>;
28
+ }
8
29
  export interface CanBeUndoneContext<ENTITIES extends DomainEntity<string>, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>> {
9
30
  oldEmission: StateEmission<ENTITIES, $MAP>;
10
31
  newEmission: StateEmission<ENTITIES, $MAP>;
@@ -39,6 +60,12 @@ export declare class UndoSystem<ENTITIES extends DomainEntity<string>, $MAP exte
39
60
  private _activeIsUndoable;
40
61
  private readonly _canSubject;
41
62
  readonly can$: ObservableWithLastValue<UndoCapabilities>;
63
+ private readonly _tipSubject;
64
+ /**
65
+ * The step the configuration is at: the top of the stack, or the step an undo or redo returned to.
66
+ * Nothing while the stack is empty, before the first undoable change and after a reset.
67
+ */
68
+ readonly tip$: ObservableWithLastValue<UndoStep<ENTITIES> | undefined>;
42
69
  constructor(_context: UndoSystemContext);
43
70
  initialize: () => void;
44
71
  /**
@@ -1 +1 @@
1
- import{BehaviorSubject as t,pairwise as e}from"rxjs";let s=t=>t.oldEmission.state.entities!==t.newEmission.state.entities;export const UNDO_REDO_RESET_TAG={};export const isUndoRedoReset=t=>"reset"===t.kind&&t.tag===UNDO_REDO_RESET_TAG;export class UndoSystem{_context;_stack=[];_currentIndex=-1;_activeIsUndoable;_canSubject=new t({canUndo:!1,canRedo:!1});can$=this._canSubject;constructor(t){this._context=t,this._context.selectors.getStoreSystem().stateSlices.committed.pipe(e()).subscribe(([t,e])=>{if("reset"===e.kind&&e.tag!==UNDO_REDO_RESET_TAG)return void this.resetStack();let n=this._activeIsUndoable?.handler??s;("reset"!==e.kind||e.tag!==UNDO_REDO_RESET_TAG)&&n({oldEmission:t,newEmission:e})&&(this._stack=[...this._stack.slice(0,this._currentIndex),t.state,e.state],this._currentIndex=this._stack.length-1,this._refresh())})}initialize=()=>{this.resetStack()};registerIsUndoable(t){let e={handler:t};return this._activeIsUndoable=e,()=>{this._activeIsUndoable===e&&(this._activeIsUndoable=void 0)}}resetStack(){this._stack=[],this._currentIndex=-1,this._refresh()}_refresh(){this._canSubject.next({canUndo:this.canUndo(),canRedo:this.canRedo()})}canUndo(){return this._currentIndex>0}canRedo(){return this._currentIndex<this._stack.length-1}undo(){let t=this._stack[this._currentIndex-1];void 0!==t&&(this._currentIndex--,this._context.selectors.getStoreSystem().reset(t,UNDO_REDO_RESET_TAG),this._refresh())}redo(){let t=this._stack[this._currentIndex+1];void 0!==t&&(this._currentIndex++,this._context.selectors.getStoreSystem().reset(t,UNDO_REDO_RESET_TAG),this._refresh())}}
1
+ import{BehaviorSubject as t,pairwise as e}from"rxjs";let s=t=>t.oldEmission.state.entities!==t.newEmission.state.entities;export const UNDO_REDO_RESET_TAG={};export const isUndoRedoReset=t=>"reset"===t.kind&&t.tag===UNDO_REDO_RESET_TAG;export class UndoSystem{_context;_stack=[];_currentIndex=-1;_activeIsUndoable;_canSubject=new t({canUndo:!1,canRedo:!1});can$=this._canSubject;_tipSubject=new t(void 0);tip$=this._tipSubject;constructor(t){this._context=t,this._context.selectors.getStoreSystem().stateSlices.committed.pipe(e()).subscribe(([t,e])=>{if("reset"===e.kind&&e.tag!==UNDO_REDO_RESET_TAG)return void this.resetStack();let i=this._activeIsUndoable?.handler??s;if("reset"===e.kind&&e.tag===UNDO_REDO_RESET_TAG||!i({oldEmission:t,newEmission:e}))return;let r=this._stack[this._currentIndex],n={committedState:r?.committedState??t.state,restoreState:t.state},c={committedState:e.state,restoreState:e.state};this._stack=[...this._stack.slice(0,this._currentIndex),n,c],this._currentIndex=this._stack.length-1,this._refresh()})}initialize=()=>{this.resetStack()};registerIsUndoable(t){let e={handler:t};return this._activeIsUndoable=e,()=>{this._activeIsUndoable===e&&(this._activeIsUndoable=void 0)}}resetStack(){this._stack=[],this._currentIndex=-1,this._refresh()}_refresh(){this._canSubject.next({canUndo:this.canUndo(),canRedo:this.canRedo()}),this._tipSubject.next(this._stack[this._currentIndex])}canUndo(){return this._currentIndex>0}canRedo(){return this._currentIndex<this._stack.length-1}undo(){let t=this._stack[this._currentIndex-1];void 0!==t&&(this._currentIndex--,this._context.selectors.getStoreSystem().reset(t.restoreState,UNDO_REDO_RESET_TAG),this._refresh())}redo(){let t=this._stack[this._currentIndex+1];void 0!==t&&(this._currentIndex++,this._context.selectors.getStoreSystem().reset(t.restoreState,UNDO_REDO_RESET_TAG),this._refresh())}}
@@ -1 +1 @@
1
- import{SessionRole as e}from"@salsita-ai/contracts/api";import{createImplementationErrorCollector as t}from"../errors/index.js";import{resolveComponentOpticModules as a,resolveElementModule as n,resolveHandlerModule as o,resolveImportedTransformers as i,resolveTransformerModule as s}from"./module-checks/index.js";let r=(e,t,a)=>e.flatMap(e=>a.attempt(()=>t(e),[]));export const initializeSpec=m=>{let c=m.adminDomain.presets[0];if(!c)throw Error("Cannot register application spec because admin preset is required.");let d=t(),l=r(m.handlers,o,d),p=r(m.elements,n,d),y=r(m.transformers?.importedTransformers??[],e=>[s(e)],d),u=r(m.domain.componentOptics,e=>a([e]),d),f=r(m.adminDomain.componentOptics,e=>a([e]),d);d.throwIfAny();let x=(e=>{let t={};for(let a of e)t[a.name]=(void 0)??a.name;return t})(l),g=(e=>{let t={},a=0;for(let n of e)if("entity"===n.type||"layout"===n.type)t[n.name]=(void 0)??n.name;else{let e=`icon:${a}`;t[e]=(void 0)??`${e}:${n.elements.length}`,a+=1}return t})(p),v=m.transformers?.specTransformers??[];return{version:m.version,dataConfig:m.dataSpec??null,chunks:m.chunks,publishedDataHash:m.publishedDataHash,initialPublishedData:m.initialPublishedData,canCreate:m.features?.acl?.canCreate??Object.values(e),enableAdminRelease:m.features?.enableAdminRelease??!1,textLanguages:m.domain.textLanguages??m.adminDomain.textLanguages??["en"],baseResourcesUrl:m.resources?.baseResourcesUrl??m.defaultEnvs?.resourcesUrl??"",configurator:{factory:m.domain.domainFactory,presets:m.domain.presets,aliasMap:m.domain.domainFactory.context.aliasMap,entityReflections:m.domain.domainFactory.context.entityReflections,$entityReflections:m.domain.domainFactory.context.$entityReflections,expressions:m.domain.domainFactory.context.expressions,actions:m.domain.domainFactory.context.actions,actionImplementations:m.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.domain.domainFactory.context.allowedRootEntityTypes,migrate:m.domain.domainFactory.context.migrate,componentOptics:u,createTransformers:e=>i(y,v,e),navigationStates:m.navigation?.navigationStates??[],viewStates:m.navigation?.viewStates??[],toolStates:m.navigation?.toolStates??[],exportStates:m.navigation?.exportStates??[],handlers:l,handlerHashes:x,elements:p,elementHashes:g,appLoader:m.ui?.appLoader??"universal",preview:m.ui?.preview??"auto",alwaysExpand:m.ui?.alwaysExpand??!1,theme:m.ui?.theme??{},assistant:m.assistant??null,deploymentQueryDisabled:m.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:m.resources?.prefetchTextureUrls??[],modelVersion:m.domain.domainFactory.modelVersion},admin:{factory:m.adminDomain.domainFactory,modelVersion:m.adminDomain.domainFactory.modelVersion,aliasMap:m.adminDomain.domainFactory.context.aliasMap,entityReflections:m.adminDomain.domainFactory.context.entityReflections,$entityReflections:m.adminDomain.domainFactory.context.$entityReflections,expressions:m.adminDomain.domainFactory.context.expressions,actions:m.adminDomain.domainFactory.context.actions,actionImplementations:m.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:m.adminDomain.domainFactory.context.migrate,preset:c,componentOptics:f,navigationStates:m.adminNavigation?.navigationStates??[],viewStates:m.adminNavigation?.viewStates??[],handlers:l,handlerHashes:x,elements:p,elementHashes:g}}};
1
+ import{SessionRole as e}from"@salsita-ai/contracts/api";import{createImplementationErrorCollector as t}from"../errors/index.js";import{resolveComponentOpticModules as a,resolveElementModule as n,resolveHandlerModule as o,resolveImportedTransformers as i,resolveTransformerModule as s}from"./module-checks/index.js";let r=(e,t,a)=>e.flatMap(e=>a.attempt(()=>t(e),[]));export const initializeSpec=m=>{let c=m.adminDomain.presets[0];if(!c)throw Error("Cannot register application spec because admin preset is required.");let d=t(),l=r(m.handlers,o,d),p=r(m.elements,n,d),y=r(m.transformers?.importedTransformers??[],e=>[s(e)],d),u=r(m.domain.componentOptics,e=>a([e]),d),f=r(m.adminDomain.componentOptics,e=>a([e]),d);d.throwIfAny();let x=(e=>{let t={};for(let a of e)t[a.name]=(void 0)??a.name;return t})(l),g=(e=>{let t={},a=0;for(let n of e)if("entity"===n.type||"layout"===n.type)t[n.name]=(void 0)??n.name;else{let e=`icon:${a}`;t[e]=(void 0)??`${e}:${n.elements.length}`,a+=1}return t})(p),v=m.transformers?.specTransformers??[];return{version:m.version,dataConfig:m.dataSpec??null,chunks:m.chunks,publishedDataHash:m.publishedDataHash,initialPublishedData:m.initialPublishedData,canCreate:m.features?.acl?.canCreate??Object.values(e),enableAdminRelease:m.features?.enableAdminRelease??!1,textLanguages:m.domain.textLanguages??m.adminDomain.textLanguages??["en"],baseResourcesUrl:m.resources?.baseResourcesUrl??m.defaultEnvs?.resourcesUrl??"",configurator:{factory:m.domain.domainFactory,presets:m.domain.presets,aliasMap:m.domain.domainFactory.context.aliasMap,entityReflections:m.domain.domainFactory.context.entityReflections,$entityReflections:m.domain.domainFactory.context.$entityReflections,expressions:m.domain.domainFactory.context.expressions,actions:m.domain.domainFactory.context.actions,actionImplementations:m.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.domain.domainFactory.context.allowedRootEntityTypes,migrate:m.domain.domainFactory.context.migrate,componentOptics:u,createTransformers:e=>i(y,v,e),navigationStates:m.navigation?.navigationStates??[],viewStates:m.navigation?.viewStates??[],toolStates:m.navigation?.toolStates??[],exportStates:m.navigation?.exportStates??[],handlers:l,handlerHashes:x,elements:p,defaultElements:m.defaultElements??[],elementHashes:g,appLoader:m.ui?.appLoader??"universal",preview:m.ui?.preview??"auto",alwaysExpand:m.ui?.alwaysExpand??!1,theme:m.ui?.theme??{},assistant:m.assistant??null,deploymentQueryDisabled:m.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:m.resources?.prefetchTextureUrls??[],modelVersion:m.domain.domainFactory.modelVersion},admin:{factory:m.adminDomain.domainFactory,modelVersion:m.adminDomain.domainFactory.modelVersion,aliasMap:m.adminDomain.domainFactory.context.aliasMap,entityReflections:m.adminDomain.domainFactory.context.entityReflections,$entityReflections:m.adminDomain.domainFactory.context.$entityReflections,expressions:m.adminDomain.domainFactory.context.expressions,actions:m.adminDomain.domainFactory.context.actions,actionImplementations:m.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:m.adminDomain.domainFactory.context.migrate,preset:c,componentOptics:f,navigationStates:m.adminNavigation?.navigationStates??[],viewStates:m.adminNavigation?.viewStates??[],handlers:l,handlerHashes:x,elements:p,elementHashes:g}}};
@@ -1 +1 @@
1
- import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";import{systemElementRegistry as n}from"./module-checks/index.js";export const createSpecSelectors=a=>{let{getState:s}=a,r=e.withTypes(),o=r([r.leaf(e=>e.spec)],e=>e),l=r([o],e=>e.version),i=r([o],e=>e.baseResourcesUrl),m=r([o],e=>e.configurator),g=r([o],e=>e.dataConfig),p=r([o],e=>e.chunks),d=r([o],e=>e.publishedDataHash),c=r([o],e=>e.initialPublishedData),u=r([o],e=>e.canCreate),h=r([o],e=>e.enableAdminRelease),y=r([o],e=>e.textLanguages),f=r([m],e=>e.modelVersion),C=r([o],e=>e.admin),x=r([C],e=>e.preset),A=r([C],e=>e.modelVersion),E=r([m],e=>e.theme),b=r([m],e=>e.assistant),H=r([b],e=>e?t(e):null),D=r([m],e=>e.factory),P=r([C],e=>e.factory),S=r([m],e=>e.componentOptics),w=r([C],e=>e.componentOptics),O=r([m],e=>e.appLoader),T=r([m],e=>e.preview),V=r([m],e=>e.alwaysExpand),L=r([m],e=>e.presets),R=r([m],e=>e.deploymentQueryDisabled),U=r([m],e=>e.prefetchTextureUrls),k=r([m],e=>e.handlerHashes),v=r([m],e=>e.handlers),j=r([v,k],(e,t)=>({...(e=>{let t={},n={},a={};for(let s of e)"phoenix"===s.type&&(t[s.name]=s.handler),"system"===s.type&&(n[s.name]=s.handler),"system-async"===s.type&&(a[s.name]=s.handler);return{handlers:t,systemHandlers:n,systemAsyncHandlers:a}})(e),hashes:t})),F=r([m],e=>e.elementHashes),M=r([m],e=>e.elements),Q=r([M,F],(e,t)=>({...(e=>{let t={},a={};for(let n of e)"layout"===n.type&&(t[n.name]=n.element),"entity"===n.type&&(a[n.name]=n.element);return{entityElements:{...n.entityElements,...a},layoutElements:{...n.layoutElements,...t}}})(e),hashes:t}));return{selectSpec:o,selectVersion:l,selectBaseResourcesUrl:i,selectConfiguratorSpec:m,selectConfiguratorModelVersion:f,selectAdminSpec:C,selectAdminPreset:x,selectAdminModelVersion:A,selectThemeOptions:E,selectAssistant:H,selectConfiguratorFactory:D,selectAdminFactory:P,selectConfiguratorComponentOptics:S,selectAdminComponentOptics:w,selectAppLoader:O,selectPreview:T,selectAlwaysExpand:V,selectPresetSeed:L,selectDeploymentQueryDisabled:R,selectPrefetchTextureUrls:U,selectTextLanguages:y,selectHandlerHashes:k,selectHandlers:v,selectHandlerSlots:j,selectElementHashes:F,selectElements:M,selectElementSlots:Q,selectDataConfig:g,selectChunks:p,selectPublishedDataHash:d,selectInitialPublishedData:c,selectCanCreate:u,selectEnableAdminRelease:h,getVersion:()=>l(s()),getBaseResourcesUrl:()=>i(s()),getConfiguratorSpec:()=>m(s()),getConfiguratorModelVersion:()=>f(s()),getAdminSpec:()=>C(s()),getAdminPreset:()=>x(s()),getAdminModelVersion:()=>A(s()),getThemeOptions:()=>E(s()),getAssistant:()=>H(s()),getConfiguratorFactory:()=>D(s()),getAdminFactory:()=>P(s()),getConfiguratorComponentOptics:()=>S(s()),getAdminComponentOptics:()=>w(s()),getAppLoader:()=>O(s()),getPreview:()=>T(s()),getAlwaysExpand:()=>V(s()),getPresetSeed:()=>L(s()),getDeploymentQueryDisabled:()=>R(s()),getPrefetchTextureUrls:()=>U(s()),getTextLanguages:()=>y(s()),getHandlerHashes:()=>k(s()),getHandlers:()=>v(s()),getHandlerSlots:()=>j(s()),getElementHashes:()=>F(s()),getElements:()=>M(s()),getElementSlots:()=>Q(s()),getDataConfig:()=>g(s()),getChunks:()=>p(s()),getPublishedDataHash:()=>d(s()),getInitialPublishedData:()=>c(s()),getCanCreate:()=>u(s()),getEnableAdminRelease:()=>h(s())}};
1
+ import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";import{systemElementRegistry as n}from"./module-checks/index.js";export const createSpecSelectors=a=>{let{getState:s}=a,r=e.withTypes(),l=r([r.leaf(e=>e.spec)],e=>e),o=r([l],e=>e.version),i=r([l],e=>e.baseResourcesUrl),m=r([l],e=>e.configurator),g=r([l],e=>e.dataConfig),p=r([l],e=>e.chunks),d=r([l],e=>e.publishedDataHash),c=r([l],e=>e.initialPublishedData),u=r([l],e=>e.canCreate),h=r([l],e=>e.enableAdminRelease),y=r([l],e=>e.textLanguages),f=r([m],e=>e.modelVersion),C=r([l],e=>e.admin),E=r([C],e=>e.preset),x=r([C],e=>e.modelVersion),A=r([m],e=>e.theme),b=r([m],e=>e.assistant),H=r([b],e=>e?t(e):null),D=r([m],e=>e.factory),P=r([C],e=>e.factory),S=r([m],e=>e.componentOptics),w=r([C],e=>e.componentOptics),O=r([m],e=>e.appLoader),T=r([m],e=>e.preview),V=r([m],e=>e.alwaysExpand),L=r([m],e=>e.presets),R=r([m],e=>e.deploymentQueryDisabled),U=r([m],e=>e.prefetchTextureUrls),k=r([m],e=>e.handlerHashes),v=r([m],e=>e.handlers),j=r([v,k],(e,t)=>({...(e=>{let t={},n={},a={};for(let s of e)"phoenix"===s.type&&(t[s.name]=s.handler),"system"===s.type&&(n[s.name]=s.handler),"system-async"===s.type&&(a[s.name]=s.handler);return{handlers:t,systemHandlers:n,systemAsyncHandlers:a}})(e),hashes:t})),F=r([m],e=>e.elementHashes),M=r([m],e=>e.elements),Q=r([m],e=>e.defaultElements),B=r([Q,M,F],(e,t,a)=>({...(e=>{let t={},a={};for(let n of e)"layout"===n.type&&(t[n.name]=n.element),"entity"===n.type&&(a[n.name]=n.element);return{entityElements:{...n.entityElements,...a},layoutElements:{...n.layoutElements,...t}}})([...e,...t]),hashes:a}));return{selectSpec:l,selectVersion:o,selectBaseResourcesUrl:i,selectConfiguratorSpec:m,selectConfiguratorModelVersion:f,selectAdminSpec:C,selectAdminPreset:E,selectAdminModelVersion:x,selectThemeOptions:A,selectAssistant:H,selectConfiguratorFactory:D,selectAdminFactory:P,selectConfiguratorComponentOptics:S,selectAdminComponentOptics:w,selectAppLoader:O,selectPreview:T,selectAlwaysExpand:V,selectPresetSeed:L,selectDeploymentQueryDisabled:R,selectPrefetchTextureUrls:U,selectTextLanguages:y,selectHandlerHashes:k,selectHandlers:v,selectHandlerSlots:j,selectElementHashes:F,selectElements:M,selectElementSlots:B,selectDataConfig:g,selectChunks:p,selectPublishedDataHash:d,selectInitialPublishedData:c,selectCanCreate:u,selectEnableAdminRelease:h,getVersion:()=>o(s()),getBaseResourcesUrl:()=>i(s()),getConfiguratorSpec:()=>m(s()),getConfiguratorModelVersion:()=>f(s()),getAdminSpec:()=>C(s()),getAdminPreset:()=>E(s()),getAdminModelVersion:()=>x(s()),getThemeOptions:()=>A(s()),getAssistant:()=>H(s()),getConfiguratorFactory:()=>D(s()),getAdminFactory:()=>P(s()),getConfiguratorComponentOptics:()=>S(s()),getAdminComponentOptics:()=>w(s()),getAppLoader:()=>O(s()),getPreview:()=>T(s()),getAlwaysExpand:()=>V(s()),getPresetSeed:()=>L(s()),getDeploymentQueryDisabled:()=>R(s()),getPrefetchTextureUrls:()=>U(s()),getTextLanguages:()=>y(s()),getHandlerHashes:()=>k(s()),getHandlers:()=>v(s()),getHandlerSlots:()=>j(s()),getElementHashes:()=>F(s()),getElements:()=>M(s()),getElementSlots:()=>B(s()),getDataConfig:()=>g(s()),getChunks:()=>p(s()),getPublishedDataHash:()=>d(s()),getInitialPublishedData:()=>c(s()),getCanCreate:()=>u(s()),getEnableAdminRelease:()=>h(s())}};
@@ -35,6 +35,8 @@ export interface ApplicationConfiguratorSpec {
35
35
  */
36
36
  readonly handlerHashes: Record<string, string>;
37
37
  readonly elements: readonly ElementRegistration[];
38
+ /** The SDK's default element registrations; an entry of `elements` with the same name replaces one. */
39
+ readonly defaultElements: readonly ElementRegistration[];
38
40
  /**
39
41
  * Per-element content hash. Used as remount key so only the specific element
40
42
  * whose source changed remounts. Unchanged elements keep their hash and stay mounted.
@@ -1 +1 @@
1
- import{EnhancedLocalizableSchema as e}from"@salsita-ai/common/utils";import{DomainEntityIdSchema as t,SystemComponentBuilder as i}from"../core/index.js";import{recipeSchema as o}from"./common/recipes.js";export const childEntitySelectionComponent=i.component("childEntitySelection").withState({type:"object",tsType:"ChildEntitySelectionComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ChildEntitySelectionComponentState"}],properties:{value:t,options:{type:"array",items:{type:"object",properties:{label:e,description:e,img:e,recipes:{type:"array",items:o},keepChildren:{type:"boolean"}},required:["recipes","label"],additionalProperties:!0}}},required:["value","options"],additionalProperties:!1}).build();
1
+ import{EnhancedLocalizableSchema as e}from"@salsita-ai/common/utils";import{DomainEntityIdSchema as t,SystemComponentBuilder as i}from"../core/index.js";import{recipeSchema as o}from"./common/recipes.js";export const childEntitySelectionComponent=i.component("childEntitySelection").withState({type:"object",tsType:"ChildEntitySelectionComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ChildEntitySelectionComponentState"}],properties:{value:t,options:{type:"array",items:{type:"object",properties:{label:e,description:e,img:e,recipes:{type:"array",items:o}},required:["recipes","label"],additionalProperties:!1}},keepChildren:{type:"boolean"}},required:["value","options"],additionalProperties:!1}).build();
@@ -115,6 +115,7 @@ declare const SceneHtmlOpacityPropertiesTmp: {
115
115
  readonly type: 'number';
116
116
  };
117
117
  };
118
+ readonly required: readonly ['min', 'max'];
118
119
  readonly additionalProperties: false;
119
120
  };
120
121
  readonly polarAngleLimits: {
@@ -138,6 +139,7 @@ declare const SceneHtmlOpacityPropertiesTmp: {
138
139
  readonly type: 'number';
139
140
  };
140
141
  };
142
+ readonly required: readonly ['min', 'max'];
141
143
  readonly additionalProperties: false;
142
144
  };
143
145
  readonly distanceLimits: {
@@ -161,6 +163,7 @@ declare const SceneHtmlOpacityPropertiesTmp: {
161
163
  readonly type: 'number';
162
164
  };
163
165
  };
166
+ readonly required: readonly ['min', 'max'];
164
167
  readonly additionalProperties: false;
165
168
  };
166
169
  readonly minInteractiveOpacity: {
@@ -1 +1 @@
1
- import{EnhancedLocalizableSchema as e}from"@salsita-ai/common/utils";let t={type:"object",tsType:"SceneEntityHtmlOpacityLimits",import:[{module:"@salsita-ai/sdk/domain",member:"SceneEntityHtmlOpacityLimits"}],properties:{min:{type:"number"},max:{type:"number"},smoothZone:{type:"number"},minOpacity:{type:"number"}},additionalProperties:!1};export const SceneHtmlOpacityProperties={azimuthAngleLimits:t,polarAngleLimits:t,distanceLimits:t,minInteractiveOpacity:{type:"number"}};export const SceneHtmlPositionProperties={offsetX:{type:"number"},offsetY:{type:"number"},offsetZ:{type:"number"},screenOffsetHorizontal:{type:"number"},screenOffsetVertical:{type:"number"}};export const SceneHtmlVisibilityProperties={hideWhileDragging:{type:"boolean"},occlude:{type:"boolean"},showWhen:{type:"array",items:{type:"string",enum:["selected","unselected"]}}};export const SceneHtmlTooltipProperties={title:e,tooltipVisibility:{type:["string"],enum:["on-hover","forced","forced-when-still","hidden"]}};
1
+ import{EnhancedLocalizableSchema as e}from"@salsita-ai/common/utils";let t={type:"object",tsType:"SceneEntityHtmlOpacityLimits",import:[{module:"@salsita-ai/sdk/domain",member:"SceneEntityHtmlOpacityLimits"}],properties:{min:{type:"number"},max:{type:"number"},smoothZone:{type:"number"},minOpacity:{type:"number"}},required:["min","max"],additionalProperties:!1};export const SceneHtmlOpacityProperties={azimuthAngleLimits:t,polarAngleLimits:t,distanceLimits:t,minInteractiveOpacity:{type:"number"}};export const SceneHtmlPositionProperties={offsetX:{type:"number"},offsetY:{type:"number"},offsetZ:{type:"number"},screenOffsetHorizontal:{type:"number"},screenOffsetVertical:{type:"number"}};export const SceneHtmlVisibilityProperties={hideWhileDragging:{type:"boolean"},occlude:{type:"boolean"},showWhen:{type:"array",items:{type:"string",enum:["selected","unselected"]}}};export const SceneHtmlTooltipProperties={title:e,tooltipVisibility:{type:["string"],enum:["on-hover","forced","forced-when-still","hidden"]}};
@@ -1,4 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/triple-slash-reference */
2
+ // Resolved from the SDK's own `vite`, so a project's `import.meta.env` and asset imports type-check without a `vite` of its own
3
+ /// <reference types="vite/client" />
2
4
  /// <reference path="./asset-modules.d.ts" />
3
5
 
4
6
  export {}