@salsita-ai/sdk 0.50.0-develop.dede205ab0 → 0.50.0-develop.e33c8d8711
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.
- package/README.md +13 -12
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/core/components/component-filter.d.ts +53 -0
- package/dist/application-spec/core/components/component-filter.js +1 -0
- package/dist/application-spec/core/components/index.d.ts +2 -0
- package/dist/application-spec/core/components/index.js +1 -0
- package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
- package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
- package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/expressions/index.d.ts +2 -0
- package/dist/application-spec/core/expressions/index.js +1 -0
- package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
- package/dist/application-spec/core/index.d.ts +2 -0
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-value.d.ts +1 -1
- package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
- package/dist/application-spec/enhanced-json/index.d.ts +4 -0
- package/dist/application-spec/enhanced-json/index.js +1 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
- package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +12 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +17 -5
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +56 -56
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -2
- package/dist/application-spec/generate-application/code/templates/globals.js +3 -3
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -8
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +66 -42
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +9 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +24 -18
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +6 -8
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +4 -3
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +6 -2
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +8 -3
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +5 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/index.d.ts +4 -0
- package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +4 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
- package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
- package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +4 -4
- package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
- package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
- package/dist/client/phoenix-api.d.ts +468 -3
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +66 -2
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +20 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +26 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +2 -0
- package/dist/configurator/common/frontend-analytics.js +1 -1
- package/dist/configurator/common/index.d.ts +2 -0
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.d.ts +31 -0
- package/dist/configurator/common/use-finalize-action.js +1 -0
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +7 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +7 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
- package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
- package/dist/configurator/ui/assistant/form/form-model.js +1 -0
- package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
- package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
- package/dist/configurator/ui/assistant/form/form-state.js +1 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
- package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/planes.mdx +1 -1
- package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
- package/dist/docs/index.json +42 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-layout.mdx +2125 -0
- package/dist/docs/layouts/header/fixed.mdx +2 -2
- package/dist/docs/layouts/header/floating.mdx +2 -2
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
- package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +8 -11
- package/dist/docs/other-features/transformers.mdx +4 -0
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/application-states.mdx +9 -7
- package/dist/docs/phoenix/components.mdx +6 -0
- package/dist/docs/phoenix/configurator-interface.mdx +237 -80
- package/dist/docs/phoenix/deployments.mdx +2 -6
- package/dist/docs/phoenix/domain-model.mdx +4 -0
- package/dist/docs/phoenix/expression-context.mdx +11 -3
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +2 -1
- package/dist/docs/phoenix/layout-slots.mdx +116 -0
- package/dist/docs/phoenix/localization.mdx +4 -4
- package/dist/docs/phoenix/migration-guide.mdx +19 -8
- package/dist/docs/phoenix/phoenix-cli.mdx +66 -34
- package/dist/docs/phoenix/project-structure.mdx +38 -16
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +3 -3
- package/dist/docs/phoenix/testing.mdx +140 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +23 -6
- package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.d.ts +7 -2
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -2
- package/dist/domain/application/application-config.d.ts +9 -26
- package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
- package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +9 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +8 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/assistant-mutations.d.ts +2 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +5 -2
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +6 -7
- package/dist/domain/application/index.d.ts +1 -5
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
- package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
- package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +3 -3
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
- package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
- package/dist/domain/core/action/action-factory.d.ts +2 -2
- package/dist/domain/core/action/action.d.ts +19 -14
- package/dist/domain/core/component/domain-component-optic.d.ts +29 -40
- package/dist/domain/core/component/domain-component-optic.js +2 -2
- package/dist/domain/core/component/legacy-filter.d.ts +2 -17
- package/dist/domain/core/component/system-component-filter.d.ts +36 -18
- package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
- package/dist/domain/core/data-schema/data-cell-value.js +1 -0
- package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-array-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-field-object.js +1 -0
- package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema.js +1 -0
- package/dist/domain/core/data-schema/index.d.ts +7 -0
- package/dist/domain/core/data-schema/index.js +1 -0
- package/dist/domain/core/domain.d.ts +2 -2
- package/dist/domain/core/emission/index.d.ts +8 -0
- package/dist/domain/core/emission/index.js +1 -0
- package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
- package/dist/domain/core/emission/reset-state-emission.js +1 -0
- package/dist/domain/core/emission/state-emission.d.ts +4 -0
- package/dist/domain/core/emission/state-emission.js +1 -0
- package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
- package/dist/domain/core/emission/state-update-emission.js +1 -0
- package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
- package/dist/domain/core/emission/state-validation-result.js +1 -0
- package/dist/domain/core/emission/transformation-log.d.ts +2 -0
- package/dist/domain/core/emission/transformation-log.js +1 -0
- package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
- package/dist/domain/core/emission/transformer-log-entry.js +1 -0
- package/dist/domain/core/emission/transformer-log.d.ts +11 -0
- package/dist/domain/core/emission/transformer-log.js +1 -0
- package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
- package/dist/domain/core/emission/transformer-phase.js +1 -0
- package/dist/domain/core/expression/aliased-expressions.d.ts +2 -2
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
- package/dist/domain/core/expression/constant-expressions.js +1 -1
- package/dist/domain/core/expression/custom-expression.d.ts +20 -7
- package/dist/domain/core/expression/custom-expression.js +1 -1
- package/dist/domain/core/expression/expression.d.ts +15 -17
- package/dist/domain/core/index.d.ts +2 -0
- package/dist/domain/core/invariant/custom-invariants.d.ts +8 -16
- package/dist/domain/core/invariant/index.d.ts +1 -1
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/core/invariant/invariants.d.ts +4 -70
- package/dist/domain/core/invariant/invariants.js +1 -1
- package/dist/domain/core/invariant/violation.d.ts +51 -3
- package/dist/domain/core/invariant/violation.js +1 -1
- package/dist/domain/core/model/model.d.ts +1 -1
- package/dist/domain/core/recipe/recipes.d.ts +18 -50
- package/dist/domain/core/recipe/recipes.js +1 -1
- package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
- package/dist/domain/core/relation/all-of-type-relation.js +1 -1
- package/dist/domain/core/relation/direct-relation.d.ts +13 -24
- package/dist/domain/core/relation/index.d.ts +0 -1
- package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
- package/dist/domain/core/relation/indirect-relation.js +1 -1
- package/dist/domain/core/relation/reference-component.d.ts +2 -2
- package/dist/domain/core/relation/relation-factory.d.ts +19 -15
- package/dist/domain/core/relation/relation-factory.js +1 -1
- package/dist/domain/core/schema/extended-schema-validator.js +1 -1
- package/dist/domain/core/state/migrations.d.ts +14 -45
- package/dist/domain/core/state/migrations.js +1 -1
- package/dist/domain/core/state/state.d.ts +1 -1
- package/dist/domain/domain-builder.d.ts +1 -1
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +2 -2
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/action-system/index.d.ts +1 -0
- package/dist/domain/domain-context/action-system/index.js +1 -0
- package/dist/domain/domain-context/analytics-system/index.d.ts +2 -0
- package/dist/domain/domain-context/analytics-system/index.js +1 -0
- package/dist/domain/domain-context/create-transformer.d.ts +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +2 -2
- package/dist/domain/domain-context/dimension-system/dimension-system.js +1 -1
- package/dist/domain/domain-context/dimension-system/index.d.ts +1 -0
- package/dist/domain/domain-context/dimension-system/index.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +7 -7
- package/dist/domain/domain-context/index.d.ts +8 -17
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/index.d.ts +3 -0
- package/dist/domain/domain-context/navigation-system/index.js +1 -0
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -3
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
- package/dist/domain/domain-context/recipe-system/index.d.ts +1 -0
- package/dist/domain/domain-context/recipe-system/index.js +1 -0
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -1
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +2 -2
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +2 -2
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +2 -2
- package/dist/domain/domain-context/relation-transformers/index.d.ts +4 -0
- package/dist/domain/domain-context/relation-transformers/index.js +1 -0
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +2 -2
- package/dist/domain/domain-context/store-system/index.d.ts +4 -0
- package/dist/domain/domain-context/store-system/index.js +1 -0
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +2 -35
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +5 -7
- package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/context.d.ts +2 -3
- package/dist/domain/domain-context/transformers/context.js +1 -1
- package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
- package/dist/domain/domain-context/transformers/index.d.ts +1 -1
- package/dist/domain/domain-context/transformers/index.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -3
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +29 -3
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
- package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +18 -22
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +84 -68
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
- package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
- package/dist/domain/domain-runtime/errors/index.js +1 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/index.d.ts +1 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +2 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
- package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
- package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -17
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +15 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -6
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +5 -2
- package/dist/domain/extensions/attribute-switch.d.ts +1 -1
- package/dist/domain/extensions/attribute-switch.js +1 -1
- package/dist/domain/extensions/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/client-side-image.d.ts +2 -2
- package/dist/domain/extensions/client-side-image.js +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.js +1 -1
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
- package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/navigation-steps.d.ts +2 -2
- package/dist/domain/extensions/offset-indicator.js +1 -1
- package/dist/domain/extensions/rotation-handle.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.js +1 -1
- package/dist/domain/extensions/scene-entity-animation.js +1 -1
- package/dist/domain/index.d.ts +0 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +28 -19
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-mock-state.d.ts +2 -2
- package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
- package/dist/domain/mocks/create-test-application-config.js +1 -0
- package/dist/domain/mocks/index.d.ts +1 -0
- package/dist/domain/mocks/index.js +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -2
- package/dist/domain/projections/blender-projections/camera.d.ts +2 -2
- package/dist/domain/projections/collision-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.d.ts +1 -1
- package/dist/domain/projections/constraint-projections.d.ts +1 -1
- package/dist/domain/projections/index.d.ts +1 -1
- package/dist/domain/projections/position-projections.d.ts +1 -1
- package/dist/domain/projections/projected-entities-projections.d.ts +1 -1
- package/dist/domain/projections/snapping-projections.d.ts +1 -1
- package/dist/domain/projections/validation-projections.d.ts +3 -19
- package/dist/domain/sketching/sketching-projections.d.ts +1 -1
- package/dist/domain/system-components/application-config.d.ts +2 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
- package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +21 -3
- package/dist/domain/system-components/common/recipes.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +10 -23
- package/dist/domain/system-components/drag-handle.d.ts +1 -1
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/admin-data-table-sidebar.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/utils/eval-cache.d.ts +1 -1
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -2
- package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/globals/index.d.ts +2 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +7 -6
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +81 -68
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/deps/deps.d.ts +52 -0
- package/dist/phoenix/commands/deps/deps.js +3 -0
- package/dist/phoenix/commands/deps/index.d.ts +1 -0
- package/dist/phoenix/commands/deps/index.js +1 -0
- package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init.d.ts +4 -4
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -0
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.js +1 -1
- package/dist/phoenix/utils/git/index.d.ts +1 -0
- package/dist/phoenix/utils/git/index.js +1 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
- package/dist/phoenix/utils/index.d.ts +2 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +53 -36
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +30 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +9 -9
- package/dist/react-sdk/domain-context/index.d.ts +2 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +11 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/common.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +34 -29
- package/schema/domain-spec.json +1115 -209
- package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
- package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-example.js +0 -90
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/domain/application/element-registration.js +0 -1
- package/dist/domain/application/handler-registration.js +0 -1
- package/dist/domain/application/resolve-imported-transformers.d.ts +0 -23
- package/dist/domain/application/resolve-imported-transformers.js +0 -1
- package/dist/domain/application/resource-builder.d.ts +0 -13
- package/dist/domain/application/resource-builder.js +0 -1
- package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
- package/dist/domain/project-modules/index.d.ts +0 -1
- package/dist/domain/project-modules/index.js +0 -1
- package/dist/domain/project-modules/project-modules.js +0 -1
- /package/dist/{domain/core/relation/relation-implementation.js → application-spec/core/expressions/relation-expression-params.js} +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
2
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
3
3
|
import type { ApplicationSpec } from '../../../parse-application-files/index.js';
|
|
4
|
+
import { FactoryDataRuntime } from '../factory-data/index.js';
|
|
5
|
+
import { type MigrationModules, MigrationRuntime } from '../migrations/index.js';
|
|
4
6
|
import { ComponentOptics } from '../sections/component-optic.js';
|
|
5
|
-
import { type ExpressionImplementations, ExpressionRuntime, type MissingExpression } from '../sections/expression-runtime.js';
|
|
7
|
+
import { type ExpressionImplementations, ExpressionRuntime, type InvariantImplementations, type MissingExpression } from '../sections/expression-runtime.js';
|
|
6
8
|
import { PresetRuntime } from '../sections/preset-runtime.js';
|
|
7
9
|
import { AdminModelRuntime } from './admin-model-runtime.js';
|
|
8
10
|
import { AdminStatesRuntime } from './states-runtime.js';
|
|
@@ -12,6 +14,8 @@ export type AdminRuntime = Branded<'AdminRuntime', {
|
|
|
12
14
|
readonly expressionRuntime: ExpressionRuntime;
|
|
13
15
|
readonly presetRuntime: PresetRuntime;
|
|
14
16
|
readonly statesRuntime: AdminStatesRuntime;
|
|
17
|
+
readonly migrationRuntime: MigrationRuntime;
|
|
18
|
+
readonly factoryDataRuntime: FactoryDataRuntime;
|
|
15
19
|
}>;
|
|
16
20
|
export type AdminRuntimeResult = {
|
|
17
21
|
readonly ok: true;
|
|
@@ -20,4 +24,4 @@ export type AdminRuntimeResult = {
|
|
|
20
24
|
readonly ok: false;
|
|
21
25
|
readonly missingExpressions: readonly MissingExpression[];
|
|
22
26
|
};
|
|
23
|
-
export declare const AdminRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations
|
|
27
|
+
export declare const AdminRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, invariantImplementations: InvariantImplementations, migrationModules: MigrationModules) => AdminRuntimeResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{Preset as t,PresetCategory as i,commonAdminCustomExpressions as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{Preset as t,PresetCategory as i,commonAdminCustomExpressions as n,commonAdminViolationExpressions as r}from"#package/domain";import{FactoryDataRuntime as s}from"../factory-data/index.js";import{MigrationRuntime as o}from"../migrations/index.js";import{ComponentOptics as m}from"../sections/component-optic.js";import{ExpressionRuntime as a}from"../sections/expression-runtime.js";import{PresetRuntime as p}from"../sections/preset-runtime.js";import{AdminModelRuntime as f}from"./admin-model-runtime.js";import{AdminStatesRuntime as u}from"./states-runtime.js";let c={Preset:[{evaluate:(e,i,n)=>{let s=n.domain.get$Entity(e,i);return t.assert(s),r.Preset.nameNotEmpty(s)}}]},l={PresetCategory:{$isDraft:{origin:{name:"$isDraft",typeOrAlias:"PresetCategory"},evaluate:(e,t,r)=>{let s=r.domain.get$Entity(e,t);return i.assert(s),n.PresetCategory.$isDraft(s)},meta:{}}}},d=new WeakMap;export const AdminRuntime=(t,i,n,r,g)=>{let R={...l};for(let[e,t]of Object.entries(n))R[e]={...R[e],...t};let y=f(t.admin,t.configurator.dataSchemas,i),j=a(t.admin,i,R,"adminExpressionRuntime",((e,t)=>{if(0===Object.keys(e).length)return c;let i=d.get(t)??new WeakMap;d.set(t,i);let n=i.get(e);if(n)return n;let r={};for(let i of[c,e])for(let[e,n]of Object.entries(i))for(let i of t[e]??[e])r[i]=[...r[i]??[],...n];return i.set(e,r),r})(r,y.aliases));return j.ok?{ok:!0,runtime:e({modelRuntime:y,componentOptics:m(i,{components:t.admin.components,referenceScope:"adminRuntime/componentOptics",modelRuntime:y}),expressionRuntime:j.runtime,presetRuntime:p(i,{referenceScope:"adminRuntime/presetRuntime",presets:t.admin.presets.presets}),statesRuntime:u(t,i),migrationRuntime:o(i,{referenceScope:"adminRuntime/migrationRuntime",resolvedVersions:t.admin.resolvedVersions,latestEntities:y.entities,migrationModules:g}),factoryDataRuntime:s(i,{referenceScope:"adminRuntime/factoryDataRuntime",invariants:t.admin.invariants,defaults:t.admin.defaults,aliases:y.aliases,entities:y.entities})})}:{ok:!1,missingExpressions:j.missing}};
|
|
@@ -4,9 +4,9 @@ import type { RuntimeReferenceStore } from '../../caching/index.js';
|
|
|
4
4
|
import type { ApplicationSpec } from '../../parse-application-files/index.js';
|
|
5
5
|
import { AdminRuntime } from './admin-runtime/admin-runtime.js';
|
|
6
6
|
import { ConfiguratorRuntime } from './configurator-runtime/configurator-runtime.js';
|
|
7
|
+
import type { MigrationModules } from './migrations/index.js';
|
|
7
8
|
import { DataRuntime } from './sections/data-runtime.js';
|
|
8
9
|
import type { ExpressionImplementations, InvariantImplementations, MissingExpression } from './sections/expression-runtime.js';
|
|
9
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
10
10
|
/**
|
|
11
11
|
* Runtime objects built from ApplicationSpec.
|
|
12
12
|
* Domain-specific fields mirror ApplicationSpec configurator/admin nesting.
|
|
@@ -29,7 +29,12 @@ export type ApplicationRuntimeResult = {
|
|
|
29
29
|
* section-level changes across rebuilds.
|
|
30
30
|
* Each field on the result carries its own `changed` flag.
|
|
31
31
|
*
|
|
32
|
+
* `adminInvariantImplementations` are the project's admin invariants (`src/admin/invariants/`); the
|
|
33
|
+
* admin domain checks them after the invariants every admin domain has. `migrationModules` are the
|
|
34
|
+
* project's migration modules of both domains (`src/migrations/`, `src/admin/migrations/`), keyed by
|
|
35
|
+
* project path; a migration they do not provide is listed in `missingMigrations` of the domain's
|
|
36
|
+
* `migrationRuntime`.
|
|
37
|
+
*
|
|
32
38
|
* Returns an error result when declared expressions are missing implementations.
|
|
33
39
|
*/
|
|
34
|
-
export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly
|
|
35
|
-
export {};
|
|
40
|
+
export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations?: InvariantImplementations, adminImplementations?: ExpressionImplementations, adminInvariantImplementations?: InvariantImplementations, migrationModules?: MigrationModules) => ApplicationRuntimeResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as i}from"@salsita-ai/common/utils";import{AdminRuntime as r}from"./admin-runtime/admin-runtime.js";import{ConfiguratorRuntime as n}from"./configurator-runtime/configurator-runtime.js";import{DataRuntime as o}from"./sections/data-runtime.js";export const ApplicationRuntime=(s,t,m,e,u,a)=>{let
|
|
1
|
+
import{Branded as i}from"@salsita-ai/common/utils";import{AdminRuntime as r}from"./admin-runtime/admin-runtime.js";import{ConfiguratorRuntime as n}from"./configurator-runtime/configurator-runtime.js";import{DataRuntime as o}from"./sections/data-runtime.js";export const ApplicationRuntime=(s,t,m,e,u,a={},p={},f={})=>{let c=n(s,t,m,e,u,f);if(!c.ok)return{ok:!1,missingExpressions:c.missingExpressions};let g=r(s,t,a,p,f);return g.ok?{ok:!0,runtime:i({configurator:c.runtime,admin:g.runtime,data:o(s,t)})}:{ok:!1,missingExpressions:g.missingExpressions}};
|
|
@@ -2,6 +2,8 @@ import { Branded } from '@salsita-ai/common/utils';
|
|
|
2
2
|
import type { ImportedTransformer } from '#package/domain';
|
|
3
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
4
|
import type { ApplicationSpec } from '../../../parse-application-files/index.js';
|
|
5
|
+
import { FactoryDataRuntime } from '../factory-data/index.js';
|
|
6
|
+
import { type MigrationModules, MigrationRuntime } from '../migrations/index.js';
|
|
5
7
|
import { ActionsRuntime } from '../sections/actions-runtime.js';
|
|
6
8
|
import { AssistantRuntime } from '../sections/assistant-runtime.js';
|
|
7
9
|
import { ComponentOptics } from '../sections/component-optic.js';
|
|
@@ -11,7 +13,6 @@ import { ThemeRuntime } from '../sections/theme-runtime.js';
|
|
|
11
13
|
import { TransformersRuntime } from '../sections/transformers-runtime.js';
|
|
12
14
|
import { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
|
|
13
15
|
import { ConfiguratorStatesRuntime } from './states-runtime.js';
|
|
14
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
15
16
|
export type ConfiguratorRuntime = Branded<'ConfiguratorRuntime', {
|
|
16
17
|
readonly modelRuntime: ConfiguratorModelRuntime;
|
|
17
18
|
readonly componentOptics: ComponentOptics;
|
|
@@ -22,6 +23,8 @@ export type ConfiguratorRuntime = Branded<'ConfiguratorRuntime', {
|
|
|
22
23
|
readonly transformersRuntime: TransformersRuntime;
|
|
23
24
|
readonly assistantRuntime: AssistantRuntime;
|
|
24
25
|
readonly actionsRuntime: ActionsRuntime;
|
|
26
|
+
readonly migrationRuntime: MigrationRuntime;
|
|
27
|
+
readonly factoryDataRuntime: FactoryDataRuntime;
|
|
25
28
|
}>;
|
|
26
29
|
export type ConfiguratorRuntimeResult = {
|
|
27
30
|
readonly ok: true;
|
|
@@ -30,5 +33,4 @@ export type ConfiguratorRuntimeResult = {
|
|
|
30
33
|
readonly ok: false;
|
|
31
34
|
readonly missingExpressions: readonly MissingExpression[];
|
|
32
35
|
};
|
|
33
|
-
export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly
|
|
34
|
-
export {};
|
|
36
|
+
export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations: InvariantImplementations | undefined, migrationModules: MigrationModules) => ConfiguratorRuntimeResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as t}from"@salsita-ai/common/utils";import{ActionsRuntime as o}from"../sections/actions-runtime.js";import{AssistantRuntime as
|
|
1
|
+
import{Branded as t}from"@salsita-ai/common/utils";import{FactoryDataRuntime as e}from"../factory-data/index.js";import{MigrationRuntime as i}from"../migrations/index.js";import{ActionsRuntime as o}from"../sections/actions-runtime.js";import{AssistantRuntime as r}from"../sections/assistant-runtime.js";import{ComponentOptics as n}from"../sections/component-optic.js";import{ExpressionRuntime as s}from"../sections/expression-runtime.js";import{PresetRuntime as m}from"../sections/preset-runtime.js";import{ThemeRuntime as a}from"../sections/theme-runtime.js";import{TransformersRuntime as u}from"../sections/transformers-runtime.js";import{ConfiguratorModelRuntime as c}from"./configurator-model-runtime.js";import{ConfiguratorStatesRuntime as f}from"./states-runtime.js";export const ConfiguratorRuntime=(p,g,R,j,l,d)=>{let x=c(p.configurator,g),v=s(p.configurator,g,R,"configuratorExpressionRuntime",l);return v.ok?{ok:!0,runtime:t({modelRuntime:x,componentOptics:n(g,{components:p.configurator.components,referenceScope:"configuratorRuntime/componentOptics",modelRuntime:x}),presetRuntime:m(g,{referenceScope:"configuratorRuntime/presetRuntime",presets:p.configurator.presets.presets}),statesRuntime:f(p,g),expressionRuntime:v.runtime,themeRuntime:a(p,g),transformersRuntime:u(p,g,j),assistantRuntime:r(p,g),actionsRuntime:o(p.configurator.actions,g),migrationRuntime:i(g,{referenceScope:"configuratorRuntime/migrationRuntime",resolvedVersions:p.configurator.resolvedVersions,latestEntities:x.entities,migrationModules:d}),factoryDataRuntime:e(g,{referenceScope:"configuratorRuntime/factoryDataRuntime",invariants:p.configurator.invariants,defaults:p.configurator.defaults,aliases:x.aliases,entities:x.entities})})}:{ok:!1,missingExpressions:v.missing}};
|
package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { AnyEntityReflections, DomainEntity, DomainEntityReflection } from '#package/domain';
|
|
3
|
+
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
|
+
import type { Defaults, Invariants } from '../../../parse-application-files/index.js';
|
|
5
|
+
import { type RecipeDefaults } from './recipe-defaults.js';
|
|
6
|
+
import { type StaticViolations } from './static-violations.js';
|
|
7
|
+
interface FactoryDataRuntimeFields {
|
|
8
|
+
/**
|
|
9
|
+
* The member types of each alias: what `phx.domain.attachComponent` expands an alias with, and
|
|
10
|
+
* what `phx.domain.createRecipe` expands alias defaults with.
|
|
11
|
+
*/
|
|
12
|
+
readonly aliases: Readonly<Record<string, readonly string[]>>;
|
|
13
|
+
/** The entity reflections `phx.domain.createRecipe` validates the defaults with. */
|
|
14
|
+
readonly entityReflections: ReadonlyArray<DomainEntityReflection<DomainEntity<string>>>;
|
|
15
|
+
/** The violations `phx.domain.implementCustomInvariants` reports for a static invariant that fails. */
|
|
16
|
+
readonly staticViolations: StaticViolations;
|
|
17
|
+
/** The defaults `phx.domain.createRecipe` puts into a new recipe. */
|
|
18
|
+
readonly defaults: RecipeDefaults;
|
|
19
|
+
readonly changed: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The data the `phx.domain` factories of one domain carry, built from the parsed spec: the static
|
|
23
|
+
* violations of `implementCustomInvariants`, the aliases of `attachComponent`, and the aliases,
|
|
24
|
+
* entity reflections and defaults of `createRecipe`. Generated `domain-spec.ts` passes the same
|
|
25
|
+
* values to those factories as literals; with this section the factories can be built from the
|
|
26
|
+
* spec instead. The configurator and the admin domain each have one.
|
|
27
|
+
*/
|
|
28
|
+
export type FactoryDataRuntime = Branded<'FactoryDataRuntime', FactoryDataRuntimeFields>;
|
|
29
|
+
interface FactoryDataRuntimeInput {
|
|
30
|
+
readonly invariants: Invariants;
|
|
31
|
+
readonly defaults: Defaults;
|
|
32
|
+
readonly aliases: Readonly<Record<string, readonly string[]>>;
|
|
33
|
+
readonly entities: AnyEntityReflections;
|
|
34
|
+
}
|
|
35
|
+
interface FactoryDataRuntimeProps extends FactoryDataRuntimeInput {
|
|
36
|
+
readonly referenceScope: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Builds the factory data of one domain. The result keeps its reference while the invariants and
|
|
40
|
+
* defaults are equal and the model runtime's aliases and entity reflections are the same objects.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FactoryDataRuntime: (referenceStore: RuntimeReferenceStore, props: FactoryDataRuntimeProps) => FactoryDataRuntime;
|
|
43
|
+
export {};
|
package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRecipeDefaults as i}from"./recipe-defaults.js";import{createStaticViolations as s}from"./static-violations.js";let a=e=>({aliases:e.aliases,entityReflections:Object.values(e.entities),staticViolations:s(e.invariants),defaults:i(e.defaults)});export const FactoryDataRuntime=(i,s)=>{let n=i.createBuilder(s.referenceScope,{build:a,getKey:()=>"singleton",compare:(t,i)=>t.aliases===i.aliases&&t.entities===i.entities&&e(t.invariants.entries,i.invariants.entries)&&e(t.defaults.entries,i.defaults.entries)}).build({invariants:s.invariants,defaults:s.defaults,aliases:s.aliases,entities:s.entities});return t({...n.output,changed:n.changed})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{FactoryDataRuntime}from"./factory-data-runtime.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Defaults } from '../../../parse-application-files/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The default property values of each entity type, keyed by entity type: what
|
|
4
|
+
* `phx.domain.createRecipe` puts into a new recipe before the caller's overrides. Alias entries are
|
|
5
|
+
* already expanded to their member types by the parser.
|
|
6
|
+
*/
|
|
7
|
+
export type RecipeDefaults = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
8
|
+
/**
|
|
9
|
+
* The runtime counterpart of the `defaults` literal the generated `domain-spec.ts` passes to
|
|
10
|
+
* `createRecipeFactory`: the parsed per-entity defaults with every `$msg` lowered to the descriptor
|
|
11
|
+
* the `msg` macro produces.
|
|
12
|
+
*/
|
|
13
|
+
export declare const createRecipeDefaults: (defaults: Defaults) => RecipeDefaults;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createMessageDescriptor as e,isEvalMarker as t,isMsgMarker as r}from"../../../core/index.js";let s=(a,i)=>{if(null===a||"object"!=typeof a)return a;if(r(a))return e(a);if(t(a))throw Error(`The default at ${i} is an $eval expression. Defaults are static values; the parser rejects $eval in them, so the spec given to the runtime was not produced by it. Parse the spec again and pass the result.`);return Array.isArray(a)?a.map((e,t)=>s(e,`${i}[${t}]`)):Object.fromEntries(Object.entries(a).map(([e,t])=>[e,s(t,`${i}.${e}`)]))};export const createRecipeDefaults=e=>Object.fromEntries(Object.entries(e.entries).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([t,r])=>[t,s(r,`${e}.${t}`)]))]));
|
package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Violation } from '#package/domain';
|
|
2
|
+
import type { Invariants } from '../../../parse-application-files/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The violation each static invariant of a domain reports when its implementation returns `false`,
|
|
5
|
+
* by entity type or alias and by invariant name. `phx.domain.implementCustomInvariants` closes over
|
|
6
|
+
* it: a project implements a static invariant as a boolean and the factory turns `false` into this
|
|
7
|
+
* violation.
|
|
8
|
+
*/
|
|
9
|
+
export type StaticViolations = Readonly<Record<string, Readonly<Record<string, Violation<string>>>>>;
|
|
10
|
+
/**
|
|
11
|
+
* The runtime counterpart of the `staticViolations` literal the generated `domain-spec.ts` passes
|
|
12
|
+
* to `createCustomInvariantFactory`: one entry per static invariant, keyed as the spec declares it,
|
|
13
|
+
* with a `$msg` message lowered to the descriptor the `msg` macro produces. Types and aliases
|
|
14
|
+
* without a static invariant have no entry.
|
|
15
|
+
*/
|
|
16
|
+
export declare const createStaticViolations: (invariants: Invariants) => StaticViolations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createMessageDescriptor as t}from"../../../core/index.js";export const createStaticViolations=e=>{let i={};for(let[o,r]of Object.entries(e.entries))for(let e of Object.values(r)){if("static"!==e.kind)continue;let r={type:String(e.violationType),severity:e.severity,message:"string"==typeof e.message?e.message:t(e.message),...void 0===e.controlViolationPriority?{}:{controlViolationPriority:e.controlViolationPriority}};i[o]={...i[o],[String(e.name)]:r}}return i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MigrationRuntime, type MigrationModules } from './migration-runtime.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MigrationRuntime}from"./migration-runtime.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import { type AnyEntityReflections, type DomainEntity, type MigrateFunction, type Migration } from '#package/domain';
|
|
3
|
+
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
|
+
import type { ResolvedVersions } from '../../../parse-application-files/index.js';
|
|
5
|
+
type AnyEntity = DomainEntity<string>;
|
|
6
|
+
type AnyMigration = Migration<AnyEntity, AnyEntity>;
|
|
7
|
+
/**
|
|
8
|
+
* The project's migration modules, keyed by the project path the parser records for each model
|
|
9
|
+
* version (`src/migrations/v2.ts`, `src/admin/migrations/v2.ts`), each holding the module's exports.
|
|
10
|
+
* The module of version `N` exports the migration to that version as `migrateToV<N>`, the name the
|
|
11
|
+
* generated `domain.ts` imports.
|
|
12
|
+
*/
|
|
13
|
+
export type MigrationModules = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
14
|
+
interface MigrationRuntimeFields {
|
|
15
|
+
/** The entity reflections of each model version, keyed by version; the latest is the domain's own. */
|
|
16
|
+
readonly modelVersions: Readonly<Record<number, AnyEntityReflections>>;
|
|
17
|
+
/** The migration to each version, keyed by the version it yields. */
|
|
18
|
+
readonly migrations: Readonly<Record<number, AnyMigration>>;
|
|
19
|
+
readonly migrate: MigrateFunction<AnyEntity>;
|
|
20
|
+
/**
|
|
21
|
+
* The migrations the spec declares but the migration modules do not provide, as
|
|
22
|
+
* `<migration file>#migrateToV<N>`. A state that needs one fails to load with a
|
|
23
|
+
* `StateMigrationError` naming the missing step.
|
|
24
|
+
*/
|
|
25
|
+
readonly missingMigrations: readonly string[];
|
|
26
|
+
readonly changed: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* How a domain migrates a stored state of any of its model versions to the latest one: the entity
|
|
30
|
+
* reflections of every version, the project's migration to each version above the first, and the
|
|
31
|
+
* migrate function built from both, which `DomainBuilder.withMigrate` takes.
|
|
32
|
+
*
|
|
33
|
+
* The configurator and the admin domain each have one. The admin domain's factory first applies the
|
|
34
|
+
* SDK's own migration of the common admin entities (`migrateCommonAdminDomain`) and then this one.
|
|
35
|
+
*/
|
|
36
|
+
export type MigrationRuntime = Branded<'MigrationRuntime', MigrationRuntimeFields>;
|
|
37
|
+
interface MigrationRuntimeInput {
|
|
38
|
+
readonly resolvedVersions: ResolvedVersions;
|
|
39
|
+
readonly latestEntities: AnyEntityReflections;
|
|
40
|
+
readonly migrationModules: MigrationModules;
|
|
41
|
+
}
|
|
42
|
+
interface MigrationRuntimeProps extends MigrationRuntimeInput {
|
|
43
|
+
readonly referenceScope: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Builds a domain's migrations from its resolved model versions and the project's migration
|
|
47
|
+
* modules: the runtime counterpart of the `modelVersions` literal of the generated `domain-spec.ts`
|
|
48
|
+
* and the `createMigrateFunction(...)` call of the generated `domain.ts`. The latest version uses the
|
|
49
|
+
* domain's own entity reflections, as generated code does. The result keeps its reference while
|
|
50
|
+
* the versions, the latest reflections and the migration modules stay the same.
|
|
51
|
+
*/
|
|
52
|
+
export declare const MigrationRuntime: (referenceStore: RuntimeReferenceStore, props: MigrationRuntimeProps) => MigrationRuntime;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{Branded as i}from"@salsita-ai/common/utils";import{DomainEntityReflection as t,createMigrateFunction as s}from"#package/domain";let o=e=>"function"==typeof e,r=e=>`migrateToV${e}`,n=e=>{let{resolvedVersions:i,latestEntities:n,migrationModules:a}=e,l={},m={},d=[];for(let e of i.versionedModels){if(e.isLatest)l[e.version]=n;else{let i={};for(let s of e.modelVersion.entitySchemas)i[String(s.entityType)]=new t(String(s.entityType),[s.shapeSchema]);l[e.version]=i}if(void 0===e.migrationFile)continue;let i=r(e.version),s=a[e.migrationFile]?.[i];o(s)?m[e.version]=s:d.push(`${e.migrationFile}#${i}`)}return{modelVersions:l,migrations:m,migrate:s(l,i.latestVersion,m),missingMigrations:d}},a=e=>e.versionedModels.map(e=>({version:e.version,isLatest:e.isLatest,migrationFile:e.migrationFile,schemas:e.isLatest?[]:e.modelVersion.entitySchemas.map(e=>e.shapeSchema)})),l=(i,t)=>i.latestEntities===t.latestEntities&&i.resolvedVersions.latestVersion===t.resolvedVersions.latestVersion&&e(a(i.resolvedVersions),a(t.resolvedVersions))&&i.resolvedVersions.versionedModels.every(e=>void 0===e.migrationFile||i.migrationModules[e.migrationFile]===t.migrationModules[e.migrationFile]);export const MigrationRuntime=(e,t)=>{let s=e.createBuilder(t.referenceScope,{build:n,getKey:()=>"singleton",compare:l}).build({resolvedVersions:t.resolvedVersions,latestEntities:t.latestEntities,migrationModules:t.migrationModules});return i({...s.output,changed:s.changed})};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentEntry, ComponentImplementation } from '../../../parse-application-files/spec/index.js';
|
|
2
2
|
import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
|
|
3
3
|
import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
|
|
4
4
|
import type { ComponentOptic } from './component-optic.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as t,adminSidebarComponent as a,attributeSelectionComponent as i,componentsByName as r,composedOfComponent as n,navigationPageComponent as o,navigationPanelListComponent as d,referenceComponent as c}from"#package/domain";import*as m from"#package/domain";import{FILTER_CRITERION_KEYS as s,isSdkCodeRef as l}from"../../../
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as t,adminSidebarComponent as a,attributeSelectionComponent as i,componentsByName as r,composedOfComponent as n,navigationPageComponent as o,navigationPanelListComponent as d,referenceComponent as c}from"#package/domain";import*as m from"#package/domain";import{FILTER_CRITERION_KEYS as s,isSdkCodeRef as l}from"../../../core/index.js";let g=new Map([["reference",c],["composedOf",n],["adminSidebar",a],["attributeSelection",i],["navigationPage",o],["navigationPanelList",d]]),R={createAdminCustomPageRead:m.createAdminCustomPageRead,createAdminCustomSidebarRead:m.createAdminCustomSidebarRead,createAdminDataPageRead:m.createAdminDataPageRead,createAdminDataTableSidebarRead:m.createAdminDataTableSidebarRead,createAdminNavigationPanelRead:m.createAdminNavigationPanelRead,createAdminPresetCategoryPageRead:m.createAdminPresetCategoryPageRead,createAdminPresetCategorySelectionRead:m.createAdminPresetCategorySelectionRead,createAdminPresetCategorySelectionWrite:m.createAdminPresetCategorySelectionWrite,createAdminPresetCategorySidebarRead:m.createAdminPresetCategorySidebarRead,createAdminPresetListPageRead:m.createAdminPresetListPageRead,createAdminPresetSidebarRead:m.createAdminPresetSidebarRead,createAdminRecipeCollectionPageRead:m.createAdminRecipeCollectionPageRead,createAdminRecipeSidebarRead:m.createAdminRecipeSidebarRead},p=(e,t)=>{let a=R[e.sdkFunction]??m[e.sdkFunction];if("function"!=typeof a)throw Error(`SDK factory function "${e.sdkFunction}" not found. Make sure it is exported from the package.`);return a(...e.params.map(e=>{if(l(e)){let a=t.entities[e.$codeRef]??t.aliasReflections[e.$codeRef];if(!a)throw Error(`Reflection "${e.$codeRef}" not found in ModelRuntime. This is a bug — the target was validated at parse time.`);return a}return e}))};export const buildSdkOptic=(a,i,n,o)=>{let d=t.from(n),c=r.get(a.componentName)??g.get(a.componentName);if(!c)throw Error(`SDK component "${a.componentName}" not found. This is a bug — the component was validated at parse time.`);let m=d.withComponent(c,a.instanceName,!0),l=a.isAlias?m.withAlias(String(a.typeOrAlias)):m.withEntity(String(a.typeOrAlias));for(let e of i.filters.items){if("root"===e.kind){let t=e.target,a=e=>e[t];l=l.withFilter(a);continue}let t={};for(let a of s){let i=e[a];void 0!==i&&("dynamic"===i.kind?t[a]=e=>e[i.target]:"eval"===i.kind?t[a]=Function("self",`return (${i.code})`):t[a]=i.value)}l=l.withGradualFilter(t)}let R=p(i.readFactory,o),A=p(i.writeFactory,o),f=l.attach(R,A);return e({typeOrAlias:String(a.typeOrAlias),componentName:a.componentName,instanceName:String(a.instanceName),optic:f})};
|
|
@@ -4,7 +4,8 @@ import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
|
4
4
|
import type { ComponentEntry } from '../../../parse-application-files/spec/index.js';
|
|
5
5
|
import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
|
|
6
6
|
import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
|
|
7
|
-
|
|
7
|
+
/** A component optic of any project, for any component type. */
|
|
8
|
+
export type AnyComponentOptic = DomainComponentOptic<any, any, any, any, any, any, SystemComponentTypeConstraint>;
|
|
8
9
|
/** A single built component optic with its identifying metadata. */
|
|
9
10
|
export type ComponentOptic = Branded<'ComponentOptic', {
|
|
10
11
|
readonly typeOrAlias: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as n,isSdkExpressionImplementation as a}from"../../../core/index.js";import{generateMemoEvalPlanRuntime as r}from"./generate-memo-eval-plan-runtime.js";let l={},o=["0-1","1-1","0-N","1-N"],s={relation:(e,t)=>{let n=t[0];if(!("object"==typeof n&&null!==n&&"kind"in n&&"target"in n&&"string"==typeof n.target&&"cardinality"in n&&o.includes(n.cardinality)&&("allOfType"===n.kind||("direct"===n.kind||"indirect"===n.kind)&&"field"in n&&"string"==typeof n.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return i(e.aliasMap)(n)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},p=e=>{let t=r(e.plan);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},m=e=>({...(0,s[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(i,r,o,s,u=l)=>{let d={};for(let[e,t]of i.latestModel.aliases)d[String(e)]=t.map(String);let c=r.createBuilder(`${s}/sdk`,{build:m,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),f=r.createBuilder(`${s}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>e.impl===t.impl}),y=r.createBuilder(`${s}/value`,{build:p,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey}),g={},v=!1,S=new Set,k=new Set,b=new Set;for(let[e,t]of i.expressions.expressions)for(let[,i]of t){let t=d[String(e)]??[String(e)];if(a(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:d,invariantImplementations:u},a=c.build(n);for(let e of(a.changed&&(v=!0),S.add(c.getKey(n)),t))g[e]||(g[e]={}),g[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let a=i.implementation.value,r={entityOrAlias:String(e),name:String(i.name),valueKey:n(a),plan:i.implementation.plan},l=y.build(r);for(let e of(l.changed&&(v=!0),b.add(y.getKey(r)),t))g[e]||(g[e]={}),g[e][String(i.name)]=l.output;continue}}for(let[e,t]of Object.entries(o))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=f.build(t);a.changed&&(v=!0),k.add(f.getKey(t)),g[e]||(g[e]={}),g[e][i]=a.output}c.cleanup(S)&&(v=!0),f.cleanup(k)&&(v=!0),y.cleanup(b)&&(v=!0);let h=[];for(let[e,t]of i.expressions.entityExpressions)for(let n of t.shapeGroups){let t=i.expressions.expressions.get(n);if(t)for(let[i]of t)g[String(e)]?.[String(i)]||h.push({entityType:String(e),exprName:String(i)})}return h.length>0?{ok:!1,missing:h}:{ok:!0,runtime:t({merged:g,changed:v})}};
|
package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Branded } from '@salsita-ai/common/utils';
|
|
|
2
2
|
import type { ImportedTransformer } from '#package/domain';
|
|
3
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
4
|
import type { ApplicationSpec } from '../../../parse-application-files/index.js';
|
|
5
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
6
5
|
/**
|
|
7
6
|
* Runtime section for transformers. Combines two sources of truth:
|
|
8
7
|
* - `importedTransformers` — factory functions from src/transformers/*.ts
|
|
@@ -13,9 +12,8 @@ type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any,
|
|
|
13
12
|
* decide whether to push a fresh `createTransformers` factory into the registry.
|
|
14
13
|
*/
|
|
15
14
|
export type TransformersRuntime = Branded<'TransformersRuntime', {
|
|
16
|
-
readonly importedTransformers: readonly
|
|
15
|
+
readonly importedTransformers: readonly ImportedTransformer[];
|
|
17
16
|
readonly specTransformers: ApplicationSpec['configurator']['transformers'];
|
|
18
17
|
readonly changed: boolean;
|
|
19
18
|
}>;
|
|
20
|
-
export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly
|
|
21
|
-
export {};
|
|
19
|
+
export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly ImportedTransformer[]) => TransformersRuntime;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RuntimeSpec } from './runtime-spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the JSON text of `.phoenix/application-spec.json` back into the runtime spec that
|
|
4
|
+
* `encodeRuntimeSpec` wrote: one `JSON.parse`, then each listed array back into its Map or Set.
|
|
5
|
+
*
|
|
6
|
+
* Throws when the text is not a runtime spec artifact, or when it was written in another format
|
|
7
|
+
* version than this SDK reads; `phoenix sync` writes the artifact again in the right one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const decodeRuntimeSpec: (text: string) => RuntimeSpec;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{RUNTIME_SPEC_FORMAT_VERSION as e}from"./encoded-runtime-spec.js";let t="Run `phoenix sync` to write it again with the SDK the project uses.",r=e=>"object"==typeof e&&null!==e,i=e=>Error(`Cannot read .phoenix/application-spec.json: its ${e.kind} at ${JSON.stringify(e.path)} is not where the file says it is, so the file was changed after it was written. ${t}`),o=(e,t)=>{let o=e,n="spec";for(let e of t.path)o=r(o)?o[n]:void 0,n=e;let s=r(o)?o[n]:void 0;if(!r(o)||!Array.isArray(s))throw i(t);o[n]="Map"===t.kind?new Map(s.map(e=>{if(!Array.isArray(e)||2!==e.length)throw i(t);return[e[0],e[1]]})):new Set(s)};export const decodeRuntimeSpec=i=>{let n=JSON.parse(i);if(!(r(n)&&"number"==typeof n.format&&Array.isArray(n.collections)&&"spec"in n))throw Error(`Cannot read .phoenix/application-spec.json: it is not a runtime spec written by \`phoenix sync\` or \`phoenix build\`. ${t}`);if(n.format!==e)throw Error(`Cannot read .phoenix/application-spec.json: it is written in format version ${n.format}, and this SDK reads format version ${e}, so it was written by another version of the SDK. ${t}`);let s={spec:n.spec};for(let e of n.collections)o(s,e);return s.spec};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RuntimeSpec } from './runtime-spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* Writes a runtime spec as the JSON text of `.phoenix/application-spec.json`, which
|
|
4
|
+
* `decodeRuntimeSpec` reads back. Maps and Sets become arrays listed in `collections`, properties
|
|
5
|
+
* whose value is `undefined` are left out, and the document carries the format version. The text
|
|
6
|
+
* is the same for the same spec, so an unchanged spec leaves the file unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export declare const encodeRuntimeSpec: (spec: RuntimeSpec) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{RUNTIME_SPEC_FORMAT_VERSION as t}from"./encoded-runtime-spec.js";let e=(t,e)=>Error(`Cannot write .phoenix/application-spec.json: the parsed spec holds ${e} at ${JSON.stringify(t.path)}, which the runtime spec cannot hold. The runtime spec holds only plain data, Maps and Sets, so the parser produced a value it should not have. Report this to the Phoenix team with the YAML that declares this value.`),o=(t,e,o)=>{t.path.push(e);let n=r(t,o);return t.path.pop(),n},r=(t,r)=>{let n;if(null===r||"string"==typeof r||"boolean"==typeof r)return r;if("number"==typeof r){if(!Number.isFinite(r))throw e(t,`the number ${r}`);return r}if("object"!=typeof r)throw e(t,`a value of type ${typeof r}`);if(r instanceof Map){let e=[...r].map(([e,r],n)=>{t.path.push(n);let p=[o(t,0,e),o(t,1,r)];return t.path.pop(),p});return t.collections.push({kind:"Map",path:[...t.path]}),e}if(r instanceof Set){let e=[...r].map((e,r)=>o(t,r,e));return t.collections.push({kind:"Set",path:[...t.path]}),e}if(Array.isArray(r))return r.map((r,n)=>{if(void 0===r)throw e(t,`undefined as item ${n} of an array`);return o(t,n,r)});if((n=Object.getPrototypeOf(r))!==Object.prototype&&null!==n)throw e(t,`an instance of ${r.constructor.name}`);let p={};for(let[e,n]of Object.entries(r))void 0!==n&&(p[e]=o(t,e,n));return p};export const encodeRuntimeSpec=e=>{let o={path:[],collections:[]},n=r(o,e);return JSON.stringify({format:t,collections:o.collections,spec:n})};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The version of the JSON format `encodeRuntimeSpec` writes. Raise it with every change to the
|
|
3
|
+
* format or to the shape of `RuntimeSpec`, so that `decodeRuntimeSpec` refuses an artifact an older
|
|
4
|
+
* or newer SDK wrote instead of building a runtime from data it does not understand.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RUNTIME_SPEC_FORMAT_VERSION = 1;
|
|
7
|
+
/** One step from a value into a part of it: an object key or an array index. */
|
|
8
|
+
export type RuntimeSpecPathSegment = string | number;
|
|
9
|
+
/**
|
|
10
|
+
* A Map or Set of the runtime spec, which JSON cannot hold: it is written as an array (a Map as its
|
|
11
|
+
* `[key, value]` entries), and `path` leads from the spec to that array. Paths into a Map run
|
|
12
|
+
* through its entries, so `[..., 2, 1]` is the value of its third entry.
|
|
13
|
+
*/
|
|
14
|
+
export interface EncodedCollection {
|
|
15
|
+
readonly kind: 'Map' | 'Set';
|
|
16
|
+
readonly path: readonly RuntimeSpecPathSegment[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The JSON document of `.phoenix/application-spec.json`. `spec` is the runtime spec with every Map
|
|
20
|
+
* and Set written as an array, and `collections` lists those arrays, inner ones before the ones
|
|
21
|
+
* that hold them, so a decoder turns them back in that order without walking the whole spec.
|
|
22
|
+
*/
|
|
23
|
+
export interface EncodedRuntimeSpec {
|
|
24
|
+
readonly format: number;
|
|
25
|
+
readonly collections: readonly EncodedCollection[];
|
|
26
|
+
readonly spec: unknown;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RUNTIME_SPEC_FORMAT_VERSION=1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./runtime-spec.js";export*from"./encoded-runtime-spec.js";export*from"./encode-runtime-spec.js";export*from"./decode-runtime-spec.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AdminSpec, ApplicationSpec, ConfiguratorSpec, EntitySchema, Infra, ModelVersion, ResolvedModelVersion, ResolvedVersions } from '../../parse-application-files/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The part of a parsed entity schema the runtime reads: the entity type and the schema of its
|
|
4
|
+
* shape, from which it builds the entity's reflection. The full schema with `id` and `type` is
|
|
5
|
+
* only registered with a deployment, and the compiled shape validators only check presets and
|
|
6
|
+
* defaults while parsing.
|
|
7
|
+
*/
|
|
8
|
+
export type RuntimeEntitySchema = Pick<EntitySchema, 'entityType' | 'shapeSchema'>;
|
|
9
|
+
/**
|
|
10
|
+
* The part of a parsed model version the runtime reads: the entity types, the aliases, the common
|
|
11
|
+
* types and the schema of every entity's shape. The raw shapes and resolved shapes only serve the
|
|
12
|
+
* parser and the type generator.
|
|
13
|
+
*/
|
|
14
|
+
export type RuntimeModelVersion = Pick<ModelVersion, 'versionKey' | 'entityTypes' | 'rootEntityTypes' | 'aliases' | 'commonTypes'> & {
|
|
15
|
+
readonly entitySchemas: readonly RuntimeEntitySchema[];
|
|
16
|
+
};
|
|
17
|
+
/** One model version of a domain as the runtime reads it, with the migration file that leads to it. */
|
|
18
|
+
export type RuntimeResolvedModelVersion = Omit<ResolvedModelVersion, 'modelVersion'> & {
|
|
19
|
+
readonly modelVersion: RuntimeModelVersion;
|
|
20
|
+
};
|
|
21
|
+
/** Every model version of a domain as the runtime reads it; it builds the domain's migrations from them. */
|
|
22
|
+
export type RuntimeResolvedVersions = Pick<ResolvedVersions, 'latestVersion'> & {
|
|
23
|
+
readonly versionedModels: readonly RuntimeResolvedModelVersion[];
|
|
24
|
+
};
|
|
25
|
+
/** The model of a domain as the runtime reads it: the latest version and every earlier one. */
|
|
26
|
+
interface RuntimeDomainModel {
|
|
27
|
+
readonly latestModel: RuntimeModelVersion;
|
|
28
|
+
readonly resolvedVersions: RuntimeResolvedVersions;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The configurator part of the runtime spec. It leaves out the configuration schema and its
|
|
32
|
+
* version, which only a deployment registers, and the assistant's server settings (instructions
|
|
33
|
+
* and AI settings), which must never reach the browser of a customer.
|
|
34
|
+
*/
|
|
35
|
+
export type RuntimeConfiguratorSpec = Pick<ConfiguratorSpec, 'components' | 'presets' | 'expressions' | 'actions' | 'invariants' | 'dataSchemas' | 'defaults' | 'states' | 'theme' | 'ui' | 'transformers' | 'assistant'> & RuntimeDomainModel;
|
|
36
|
+
/**
|
|
37
|
+
* The admin part of the runtime spec. It leaves out the configuration schema and its version, which
|
|
38
|
+
* only a deployment registers.
|
|
39
|
+
*/
|
|
40
|
+
export type RuntimeAdminSpec = Pick<AdminSpec, 'components' | 'presets' | 'expressions' | 'invariants' | 'defaults' | 'states' | 'adminPages'> & RuntimeDomainModel;
|
|
41
|
+
/**
|
|
42
|
+
* The infrastructure settings the runtime reads: access control and resources. The environment
|
|
43
|
+
* variable declarations only drive the generated environment readers.
|
|
44
|
+
*/
|
|
45
|
+
export type RuntimeInfra = Pick<Infra, 'acl' | 'resources' | 'resourcesConfig'>;
|
|
46
|
+
/**
|
|
47
|
+
* The parsed application spec as the runtime reads it: what `ApplicationRuntime` builds the
|
|
48
|
+
* configurator and admin runtimes from, and the sections an application needs besides its domains
|
|
49
|
+
* (data spec, app metadata, resources, access control, user interface settings, webhook data
|
|
50
|
+
* schemas, admin pages). `phoenix sync` and `phoenix build` write it to
|
|
51
|
+
* `.phoenix/application-spec.json` with `encodeRuntimeSpec`.
|
|
52
|
+
*
|
|
53
|
+
* It is derived from the parsed types, so a section the runtime reads keeps the parser's type. It
|
|
54
|
+
* leaves out what only the parser, the type generator or a deployment use, and holds plain data,
|
|
55
|
+
* Maps and Sets only, so it can be encoded as JSON.
|
|
56
|
+
*/
|
|
57
|
+
export interface RuntimeSpec extends Pick<ApplicationSpec, 'appMetadata' | 'dataSpec'> {
|
|
58
|
+
readonly configurator: RuntimeConfiguratorSpec;
|
|
59
|
+
readonly admin: RuntimeAdminSpec;
|
|
60
|
+
readonly infra: RuntimeInfra;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Takes from a parsed application spec the part the runtime reads. The sections it keeps are the
|
|
64
|
+
* parsed values themselves, not copies; only the model versions are rebuilt without what the
|
|
65
|
+
* runtime does not read.
|
|
66
|
+
*/
|
|
67
|
+
export declare const toRuntimeSpec: (spec: ApplicationSpec) => RuntimeSpec;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=e=>({versionKey:e.versionKey,entityTypes:e.entityTypes,rootEntityTypes:e.rootEntityTypes,aliases:e.aliases,commonTypes:e.commonTypes,entitySchemas:e.entitySchemas.map(e=>({entityType:e.entityType,shapeSchema:e.shapeSchema}))}),s=s=>({latestModel:e(s.latestModel),resolvedVersions:{latestVersion:s.resolvedVersions.latestVersion,versionedModels:s.resolvedVersions.versionedModels.map(s=>({version:s.version,key:s.key,isLatest:s.isLatest,migrationFile:s.migrationFile,modelVersion:e(s.modelVersion)}))}});export const toRuntimeSpec=e=>{let{configurator:t,admin:a,infra:n}=e;return{configurator:{components:t.components,presets:t.presets,expressions:t.expressions,actions:t.actions,invariants:t.invariants,dataSchemas:t.dataSchemas,defaults:t.defaults,states:t.states,theme:t.theme,ui:t.ui,transformers:t.transformers,assistant:t.assistant,...s(t)},admin:{components:a.components,presets:a.presets,expressions:a.expressions,invariants:a.invariants,defaults:a.defaults,states:a.states,adminPages:a.adminPages,...s(a)},appMetadata:e.appMetadata,infra:{acl:n.acl,resources:n.resources,resourcesConfig:n.resourcesConfig},dataSpec:e.dataSpec}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./core/index.js";export*from"./caching/index.js";export*from"./errors/index.js";export*from"./generate-application/index.js";export*from"./parse-application-files/index.js";export*from"./webhook-boundary.js";
|
|
1
|
+
export*from"./core/index.js";export*from"./enhanced-json/index.js";export*from"./caching/index.js";export*from"./errors/index.js";export*from"./generate-application/index.js";export*from"./parse-application-files/index.js";export*from"./webhook-boundary.js";
|
|
@@ -58,12 +58,28 @@ export type CategorizedFiles = Branded<'CategorizedFiles', {
|
|
|
58
58
|
readonly adminElementsChanged: boolean;
|
|
59
59
|
readonly webhooks: readonly CategorizedFile[];
|
|
60
60
|
readonly webhooksChanged: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the project has its webhook entry, `src/webhooks/index.ts`, whose default export is the
|
|
63
|
+
* project's webhook. Generation reads it to decide the generated webhook entry: without it the
|
|
64
|
+
* entry holds the built-in inert webhook.
|
|
65
|
+
*/
|
|
66
|
+
readonly hasWebhookEntry: boolean;
|
|
61
67
|
readonly locales: readonly CategorizedFile[];
|
|
62
68
|
readonly localesChanged: boolean;
|
|
63
69
|
readonly mockTemplates: readonly CategorizedFile[];
|
|
64
70
|
readonly mockTemplatesChanged: boolean;
|
|
65
71
|
readonly projectFiles: readonly CategorizedFile[];
|
|
66
72
|
readonly projectFilesChanged: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* One-time migration: true only on a checkout's first sync with an SDK that contains this field;
|
|
75
|
+
* delete it once projects have synced with such an SDK.
|
|
76
|
+
*
|
|
77
|
+
* Whether the project's root `tsconfig.json` is the full file earlier SDK versions generated on
|
|
78
|
+
* every sync, before the TypeScript settings moved to `.phoenix/tsconfig.json`. Generation reads
|
|
79
|
+
* it to replace that file with the one-line `tsconfig.json` that extends `.phoenix/tsconfig.json`;
|
|
80
|
+
* any other root `tsconfig.json` is the project's own and is left as it is.
|
|
81
|
+
*/
|
|
82
|
+
readonly hasEarlierGeneratedTsconfig: boolean;
|
|
67
83
|
readonly customCode: readonly CategorizedFile[];
|
|
68
84
|
readonly customCodeChanged: boolean;
|
|
69
85
|
readonly envs: Record<string, unknown>;
|