@salsita-ai/sdk 0.50.0-develop.f03b563886 → 0.50.0-develop.f41849ae55
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 +19 -14
- package/dist/admin/default-admin-elements.d.ts +9 -0
- package/dist/admin/default-admin-elements.js +1 -0
- package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-entity-element.js +1 -0
- package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-layout-element.js +1 -0
- package/dist/admin/default-elements/index.d.ts +2 -0
- package/dist/admin/default-elements/index.js +1 -0
- package/dist/admin/index.d.ts +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/application-spec/caching/content-diff.js +1 -1
- package/dist/application-spec/core/application-file.d.ts +0 -2
- package/dist/application-spec/core/application-file.js +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 +14 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +17 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
- package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
- package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
- package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
- 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 +22 -14
- 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/story-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +35 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +7 -7
- 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 +69 -73
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
- 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-presets.js +1 -1
- 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 +21 -21
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +3 -2
- 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/eslint-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +31 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +24 -43
- package/dist/application-spec/generate-application/code/templates/index.d.ts +3 -10
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
- package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
- 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 +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +5 -5
- 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/phoenix-variants-skill.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +31 -14
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -4
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
- package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
- package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
- package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -1
- 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-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-model-runtime.d.ts +6 -4
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +8 -3
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +19 -7
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +6 -4
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -4
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
- 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/assistant-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +3 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +5 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +7 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +9 -5
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +3 -1
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +4 -6
- package/dist/application-spec/generate-application/runtime/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/runtime/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.js +1 -0
- package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.d.ts +17 -0
- package/dist/application-spec/generate-application/runtime/spec-code/spec-code-module.js +1 -0
- 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 +5 -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/generate-application/runtime-spec/spec-code-id.d.ts +40 -0
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.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 +34 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
- 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 +5 -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/intersect-value-types.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.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 +6 -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 +7 -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-read-types.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
- 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 +7 -3
- 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.d.ts +3 -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 +463 -0
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
- package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +5 -0
- package/dist/configurator/app-loader-content/app-loader-content-name.js +1 -0
- package/dist/configurator/app-loader-content/index.d.ts +2 -0
- package/dist/configurator/app-loader-content/index.js +1 -0
- 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 +38 -1
- 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/camera-control-system/camera-control-system.d.ts +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/close-unclosed-braces.d.ts +12 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
- 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 +90 -3
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/index.d.ts +3 -1
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +12 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.d.ts +9 -0
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +1 -0
- package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
- package/dist/configurator/configuration-not-found-page/index.js +1 -0
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
- package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +7 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +12 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
- package/dist/configurator/configurator-error-page/create-configurator-error-page.d.ts +9 -0
- package/dist/configurator/configurator-error-page/create-configurator-error-page.js +1 -0
- package/dist/configurator/configurator-error-page/index.d.ts +3 -0
- package/dist/configurator/configurator-error-page/index.js +1 -0
- package/dist/configurator/index.d.ts +2 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +7 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
- package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
- package/dist/configurator/pages/DefaultPresetUi.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/RootPage.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 +12 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/index.d.ts +4 -0
- package/dist/configurator/pages/default-elements/index.js +1 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
- package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
- package/dist/configurator/preset-screen-elements/index.js +1 -0
- package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
- package/dist/configurator/scene/scene-controls/SelectionHotspot.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/AssistantPanel.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/index.d.ts +2 -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/reference-link/AssistantReferenceLink.d.ts +16 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +9 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +11 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.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/assistant/use-follow-stream.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/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
- 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/mobile-tabs/use-mobile-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
- 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/Services.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/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.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/common/CommonFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
- package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -0
- package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
- 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/controls/select-child-entity/cardselect.mdx +1 -0
- 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/fabs/basic.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 +2435 -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/error-5xx.mdx +1 -1
- package/dist/docs/other-features/not-found-404.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/clerk-sign-in.mdx +1 -1
- package/dist/docs/phoenix/components.mdx +6 -0
- package/dist/docs/phoenix/configurator-interface.mdx +333 -81
- package/dist/docs/phoenix/deployments.mdx +2 -6
- package/dist/docs/phoenix/domain-model.mdx +6 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +7 -4
- package/dist/docs/phoenix/layout-slots.mdx +116 -0
- package/dist/docs/phoenix/localization.mdx +10 -6
- package/dist/docs/phoenix/migration-guide.mdx +24 -11
- package/dist/docs/phoenix/phoenix-cli.mdx +88 -44
- package/dist/docs/phoenix/project-structure.mdx +80 -36
- package/dist/docs/phoenix/quickstart.mdx +9 -9
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +8 -8
- package/dist/docs/phoenix/testing.mdx +148 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +23 -6
- 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.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/application-config.d.ts +8 -5
- 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-recipe-groups.d.ts +4 -2
- 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 +0 -4
- 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/map-published-chunked-data.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
- package/dist/domain/core/component/domain-component-optic.d.ts +11 -19
- 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/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 +17 -4
- package/dist/domain/core/expression/custom-expression.js +1 -1
- package/dist/domain/core/expression/expression.d.ts +1 -2
- package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
- package/dist/domain/core/invariant/invariants.d.ts +1 -4
- package/dist/domain/core/invariant/violation.d.ts +50 -2
- 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/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 +1 -1
- 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 +1 -3
- 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 +1 -1
- 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 -2
- 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/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +17 -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 +76 -60
- 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 -5
- 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 +14 -13
- 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 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-action-modules.d.ts → module-checks/resolve-action-modules.d.ts} +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-component-optic-modules.d.ts → module-checks/resolve-component-optic-modules.d.ts} +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-expression-modules.d.ts → module-checks/resolve-expression-modules.d.ts} +2 -2
- 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/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/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 +2 -2
- 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/common/scene-entity-control-schema.d.ts +3 -0
- package/dist/domain/system-components/common/scene-entity-control-schema.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/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/editor/Editor.d.ts +7 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
- package/dist/editor/mocks/CreateMockYaml.js +2 -2
- package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
- 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 +3 -4
- 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 +160 -148
- 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/frontend-admin.js +15 -14
- 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 +14 -13
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/application-spec/application-spec-builder.d.ts +0 -2
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +0 -2
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +0 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/bin.d.ts +2 -0
- package/dist/phoenix/bin.js +2 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
- package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
- package/dist/phoenix/check-configs/eslint-config.js +1 -0
- package/dist/phoenix/check-configs/index.d.ts +8 -0
- package/dist/phoenix/check-configs/index.js +1 -0
- package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
- package/dist/phoenix/check-configs/typescript-project.js +1 -0
- package/dist/phoenix/cli.d.ts +0 -1
- package/dist/phoenix/cli.js +1 -2
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +2 -2
- package/dist/phoenix/commands/deps/deps.d.ts +73 -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 +17 -5
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/link.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/commands/unlink.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -2
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/lingui.d.ts +8 -0
- package/dist/phoenix/services/lingui.js +1 -1
- 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/services/vite-config.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 +5 -2
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/node-version/index.d.ts +1 -0
- package/dist/phoenix/utils/node-version/index.js +1 -0
- package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
- package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
- package/dist/phoenix/utils/package-info.d.ts +0 -9
- package/dist/phoenix/utils/package-info.js +1 -1
- package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
- package/dist/phoenix/utils/package-manager/index.js +1 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
- package/dist/phoenix/utils/run-command.d.ts +11 -0
- package/dist/phoenix/utils/run-command.js +1 -1
- package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
- package/dist/phoenix/utils/sdk-tool/index.js +1 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
- package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.d.ts +6 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/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-application-context/DomainLifecycleBoundary.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/index.d.ts +8 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +41 -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/component-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +5 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.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-context/system-hooks/selection-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/react-sdk/elements/configurator-error-page-props.d.ts +20 -0
- package/dist/react-sdk/elements/configurator-error-page-props.js +1 -0
- package/dist/react-sdk/elements/index.d.ts +1 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
- package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
- package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
- package/dist/react-sdk/handlers/index.d.ts +6 -0
- package/dist/react-sdk/handlers/index.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
- package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
- package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
- package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
- package/dist/react-sdk/index.d.ts +1 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +5 -0
- package/dist/react-sdk/loading-state/loading-state-manager.js +1 -1
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +25 -0
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +1 -0
- package/dist/react-sdk/responsive-state/canvas-padding.d.ts +14 -0
- package/dist/react-sdk/responsive-state/canvas-padding.js +1 -0
- package/dist/react-sdk/responsive-state/index.d.ts +5 -0
- package/dist/react-sdk/responsive-state/index.js +1 -0
- package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +111 -0
- package/dist/react-sdk/responsive-state/responsive-state-manager.js +1 -0
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +10 -0
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +1 -0
- package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +11 -0
- package/dist/react-sdk/responsive-state/use-responsive-state.js +1 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
- package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +57 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +48 -36
- package/schema/domain-spec.json +1201 -217
- 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 -94
- package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
- package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
- package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
- 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/configurator/common/frontend-analytics.js +0 -1
- 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/domain-runtime/spec/invariant-builder.d.ts +0 -61
- package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-action-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-expression-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-invariant-modules.d.ts +0 -6
- package/dist/domain/domain-runtime/spec/resolve-invariant-modules.js +0 -1
- 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/phoenix/commands/generate-project-files.d.ts +0 -6
- package/dist/phoenix/commands/generate-project-files.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
package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type EnhancedJsonObject, type ParseContext } from '../../../core/index.js';
|
|
2
|
+
import { type ValueTypeResolution } from '../common/index.js';
|
|
3
|
+
import type { ExpressionRead } from '../expressions/expression-read.js';
|
|
2
4
|
import type { Expression } from '../expressions/expression.js';
|
|
3
5
|
import type { EntityOrAliasName, InstanceName, ResolvedShape } from '../model/index.js';
|
|
4
6
|
import type { ComponentEntry } from './component-entry.js';
|
|
@@ -11,10 +13,14 @@ interface UserComponentProps {
|
|
|
11
13
|
interface UserComponentContext {
|
|
12
14
|
readonly resolvedShape: ResolvedShape;
|
|
13
15
|
readonly parsingContext: ParseContext;
|
|
16
|
+
/** Resolves the refs of field schemas and the entity types of a name, for the type checks. */
|
|
17
|
+
readonly typeResolution: Omit<ValueTypeResolution, 'author' | 'definitions'>;
|
|
14
18
|
}
|
|
15
19
|
export interface UserComponentResult {
|
|
16
20
|
readonly entry: ComponentEntry;
|
|
17
21
|
readonly inferredExpressions: readonly Expression[];
|
|
22
|
+
/** Every `$read` of an expression in the instance, with the type expected where it is read. */
|
|
23
|
+
readonly expressionReads: readonly ExpressionRead[];
|
|
18
24
|
}
|
|
19
25
|
/**
|
|
20
26
|
* Creates a user-declared ComponentEntry from raw YAML props.
|
package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{componentsByName as t}from"#package/domain";import{
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{componentsByName as t}from"#package/domain";import{FILTER_CRITERION_KEYS as n,FILTER_KEY as r,FILTER_OR_KEY as i,READ_MARKER_KEY as o,isEnhancedJsonObject as a,isEvalMarker as m,isImportRefShaped as p,isRawBindMarker as s,isRawDataRefMarker as l,isRawEvalWriteMarker as d,isRawReadMarker as c,isRawReadWriteMarker as f,navigateSchema as y}from"../../../core/index.js";import{DiagnosticCode as u,diagnosticMessages as g}from"../../../errors/index.js";import{ValueType as N,valueTypeAt as $}from"../common/index.js";import{MemoEvalPlan as O}from"../expressions/memo-eval-plan.js";import{ComponentReadBinding as S,ComponentWriteBinding as A,checkReadBindingType as k,componentPath as R,formatComponentPropPath as T,isExpressionReadTarget as b}from"./bindings/index.js";import{ComponentFilters as h,FILTER_CRITERION_SCHEMAS as P}from"./component-filter.js";import{componentStateType as E}from"./component-state-type.js";import{FILTER_CRITERION_TYPE_SCHEMAS as j,ROOT_FILTER_TYPE_SCHEMA as v}from"./filter-criterion-types.js";import{checkStaticEntityId as _}from"./static-entity-id.js";let x=(e,t,n,r)=>{if(null==e||"object"!=typeof e)return void 0!==e&&n.checkStaticValue(e,t),e;if(c(e))return n.addReadBinding(e.$read,t,"$read"),{$target:e.$read};if(l(e))return void r.parsingContext.at(String(r.entityKey),r.componentName,String(r.instanceName),...t.map(String)).error(u.COMPONENT_DATA_REF_UNSUPPORTED,g.COMPONENT_DATA_REF_UNSUPPORTED(String(r.entityKey),r.componentName,String(r.instanceName),T(t),e.$read,e.$data));if(s(e))return n.addReadBinding(e.$bind,t,"$bind"),{$target:e.$bind};if(m(e))return e;if(p(e))return void r.parsingContext.at(String(r.entityKey),r.componentName,String(r.instanceName),...t.map(String)).error(u.COMPONENT_IMPORT_REF_UNSUPPORTED,g.COMPONENT_IMPORT_REF_UNSUPPORTED(String(r.entityKey),r.componentName,String(r.instanceName),T(t),e.$importRef.module,e.$importRef.member));if(Array.isArray(e))return e.map((e,i)=>x(e,[...t,i],n,r)).filter(e=>void 0!==e);let i={};for(let[o,a]of Object.entries(e)){let e=x(a,[...t,o],n,r);void 0!==e&&(i[o]=e)}return i},C=(t,n,r)=>{for(let i of t.items)if("gradual"===i.kind){for(let[t,o]of Object.entries(i))if("kind"!==t&&o?.kind==="dynamic"&&o.target&&b(o.target)){let i=P[t];i&&r.push(e({entityKey:n,name:o.target,schema:i,implementation:{kind:"user"}}))}}},U=(e,t,n,r)=>{if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e)return void _(e,t,n,r);if("object"==typeof e)for(let[i,o]of Object.entries(e)){let a=Array.isArray(e)?Number(i):i;U(o,[...t,a],$(n,[a]),r)}};export const UserComponentEntry=(m,p)=>{let{implementation:l,inferredExpressions:c,expressionReads:T}=((m,p)=>{let l,c=t.get(m.componentName),T=c?.schema,P=new Set,w=[],D=[],I=[],K={entityKey:m.typeOrAlias,componentName:m.componentName,instanceName:m.instanceName,resolvedShape:p.resolvedShape,parsingContext:p.parsingContext},B={entityKey:m.typeOrAlias,componentName:m.componentName,instanceName:m.instanceName,resolvedShape:p.resolvedShape,parsingContext:p.parsingContext},F={...K,typeResolution:p.typeResolution},M=e=>T?$(l??=E(T,p.typeResolution),e):[{kind:"unknown"}],G=[],V=e=>{b(e.target)?G.push({entityKey:m.typeOrAlias,name:e.target,expected:e.expected,location:R(K,e.path)}):k(e,F)},L=(t,n,r)=>{if(V({marker:r,target:t,path:n,expected:M(n)}),!P.has(t)&&(P.add(t),w.push(S(t,K)),b(t)&&T)){let r=((t,n,r,i)=>{let{schema:o,lastDeclaredType:a,pathSinceDeclaredType:m}=y(r,n),p=n=>e({entityKey:i,name:t,schema:n,implementation:{kind:"user"}});if(void 0!==a){let e=m.map(e=>"number"==typeof e?"[number]":`['${e}']`).join("");return p({...o,tsType:`${a.tsType}${e}`,import:a.import})}if(Object.keys(o).length>0)return p(o)})(t,n,T,m.typeOrAlias);r&&I.push(r)}},W={addReadBinding:L,checkStaticValue:(e,t)=>_(e,t,M(t),K)},q=h(m.rawProps[r]);((e,t,o,m)=>{let p=e=>N(e,{...o.typeResolution,author:"sdk"}),s=void 0!==e&&a(e)&&Array.isArray(e[i]);for(let[e,a]of t.items.entries()){let t=s?[r,i,e]:[r];if("root"===a.kind){m({marker:"$read",target:a.target,path:t,expected:p(v)});continue}for(let e of n){let n=a[e],r=[...t,e],i=p(j[e]);n?.kind==="dynamic"?m({marker:"$read",target:n.target,path:r,expected:i}):n?.kind==="static"&&U(n.value,r,i,o)}}})(m.rawProps[r],q,F,V);let z=`${String(m.typeOrAlias)}.${String(m.instanceName)}`;if((e=>{if(!(o in e)||"string"!=typeof e[o])return!1;for(let t of Object.keys(e))if(t!==o&&t!==r)return!1;return!0})(m.rawProps)){let e=m.rawProps[o];return L(e,[],"$read"),C(q,m.typeOrAlias,I),{implementation:{kind:"userBound",filters:q,plan:O({$target:e},z),implementation:{kind:"rootRead",readBinding:w[0]}},inferredExpressions:I,expressionReads:G}}let H={};for(let[e,t]of Object.entries(m.rawProps)){if(e===r)continue;if(s(t)){D.push(A(e,t.$bind,B)),L(t.$bind,[e],"$bind"),H[e]={$target:t.$bind};continue}if(f(t)){L(t.$read,[e],"$read"),D.push(A(e,t.$write,B)),H[e]={$target:t.$read};continue}if(d(t)){D.push(A(e,t.$write,B)),H[e]={$eval:t.$eval};continue}let n=x(t,[e],W,K);void 0!==n&&(H[e]=n)}let J=new Map;for(let e of D){let t=J.get(e.entityField);t?p.parsingContext.error(u.WRITE_BINDING_DUPLICATE_TARGET,g.WRITE_BINDING_DUPLICATE_TARGET(String(m.typeOrAlias),m.componentName,String(m.instanceName),e.entityField,t,e.propKey)):J.set(e.entityField,e.propKey)}return C(q,m.typeOrAlias,I),{implementation:{kind:"userBound",filters:q,plan:O(H,z),implementation:{kind:"composite",resolvedProps:H,readBindings:w,writeBindings:D}},inferredExpressions:I,expressionReads:G}})(m,p);return{entry:e({typeOrAlias:m.typeOrAlias,instanceName:m.instanceName,isAlias:"alias"===p.resolvedShape.kind,componentName:m.componentName,implementation:l}),inferredExpressions:c,expressionReads:T}};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ParseContext } from '../../../core/index.js';
|
|
2
|
+
import type { ParseContext, PhoenixDefinitions } from '../../../core/index.js';
|
|
3
3
|
import type { MergedComponents } from '../../merge/index.js';
|
|
4
|
+
import type { ExpressionRead } from '../expressions/expression-read.js';
|
|
4
5
|
import type { Expression } from '../expressions/expression.js';
|
|
5
|
-
import type {
|
|
6
|
+
import type { ModelVersion } from '../model/index.js';
|
|
6
7
|
import type { ComponentEntry } from './component-entry.js';
|
|
7
8
|
/** User-declared component entries, flattened from the nested merge map. */
|
|
8
9
|
export type UserComponents = Branded<'UserComponents', readonly ComponentEntry[]>;
|
|
9
10
|
interface UserComponentsContext {
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
11
|
+
readonly latestModel: ModelVersion;
|
|
12
|
+
readonly phxDefinitions: PhoenixDefinitions;
|
|
12
13
|
readonly parsingContext: ParseContext;
|
|
13
14
|
}
|
|
14
15
|
interface UserComponentsResult {
|
|
15
16
|
readonly components: UserComponents;
|
|
16
17
|
readonly expressions: readonly Expression[];
|
|
18
|
+
/** Every `$read` of an expression in a component, with the type expected where it is read. */
|
|
19
|
+
readonly expressionReads: readonly ExpressionRead[];
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Flattens the nested merge map into a flat list of ComponentEntry objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as o,diagnosticMessages as r}from"../../../errors/index.js";import{InstanceName as t,ModelTypeResolution as s,getResolvedShape as n}from"../model/index.js";import{UserComponentEntry as i}from"./user-component-entry.js";export const UserComponents=(p,m)=>{let{latestModel:f,parsingContext:l}=m,N=f.allNames,a=s(f,m.phxDefinitions),O=[],c=[],u=[],x=[...N];for(let[e,s]of Object.entries(p)){if(!N.has(e)){l.error(o.COMPONENT_UNKNOWN_ENTITY_KEY,r.COMPONENT_UNKNOWN_ENTITY_KEY(e,x));continue}let p=n(f.resolvedShapes,e);for(let[o,r]of Object.entries(s))for(let[s,n]of Object.entries(r)){let r=t(s,e,o,l);if(!r)continue;let m=i({typeOrAlias:e,instanceName:r,componentName:o,rawProps:n},{resolvedShape:p,parsingContext:l,typeResolution:a});O.push(m.entry),c.push(...m.inferredExpressions),u.push(...m.expressionReads)}}return{components:e(O),expressions:c,expressionReads:u}};
|
package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ParseContext } from '../../../core/index.js';
|
|
2
|
+
import type { EntityOrAliasName, ExpressionName, ModelTypeResolution } from '../model/index.js';
|
|
3
|
+
import type { ExpressionRead } from './expression-read.js';
|
|
4
|
+
import type { Expression } from './expression.js';
|
|
5
|
+
/** Where an expression is declared: the spec section and the entity or alias under it. */
|
|
6
|
+
export interface ExpressionLocation {
|
|
7
|
+
readonly section: string;
|
|
8
|
+
readonly entityKey: EntityOrAliasName;
|
|
9
|
+
}
|
|
10
|
+
interface ExpressionReadTypesInput {
|
|
11
|
+
readonly userExpressions: readonly Expression[];
|
|
12
|
+
readonly expressionReads: readonly ExpressionRead[];
|
|
13
|
+
/** Finds where a read expression is declared, which is where a conflict is reported. */
|
|
14
|
+
readonly locateDeclaration: (entityKey: EntityOrAliasName, name: ExpressionName) => ExpressionLocation;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reports an expression whose declared type and the types its `$read`s expect have no value in
|
|
18
|
+
* common, or whose `$read`s expect types that have none: generated code types the expression by
|
|
19
|
+
* the intersection of them all, which no value can be, so the implementation cannot type-check.
|
|
20
|
+
* A type given as `tsType` text is not read, and never reported. Relation and invariant
|
|
21
|
+
* expressions state their types only as `tsType`, so only a conflict among their reads is reported.
|
|
22
|
+
*/
|
|
23
|
+
export declare const checkExpressionReadTypes: ({ userExpressions, expressionReads, locateDeclaration }: ExpressionReadTypesInput, typeResolution: ModelTypeResolution, ctx: ParseContext) => void;
|
|
24
|
+
export {};
|
package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DiagnosticCode as e,diagnosticMessages as t}from"../../../errors/index.js";import{ValueType as r,formatValueType as n,intersectValueTypes as o}from"../common/index.js";export const checkExpressionReadTypes=({userExpressions:i,expressionReads:a,locateDeclaration:c},d,l)=>{let s=new Map,m=(e,t)=>{let r=`${String(e)}\0${String(t)}`,n=s.get(r);return n||(n={entityKey:e,name:t,reads:[]},s.set(r,n)),n};for(let e of i)e.declaredSchema&&(m(e.entityKey,e.name).declared=r(e.declaredSchema,{...d,author:"project"}));for(let e of a)m(e.entityKey,e.name).reads.push(e);for(let{entityKey:r,name:i,declared:a,reads:d}of s.values()){let[s,...m]=[...a?[a]:[],...d.map(e=>e.expected)];if(!s||m.reduce(o,s).length>0)continue;let p=c(r,i);l.at(p.section,String(p.entityKey),String(i)).error(e.EXPRESSION_READ_TYPE_CONFLICT,t.EXPRESSION_READ_TYPE_CONFLICT(String(p.entityKey),String(i),a&&n(a),d.map(e=>`${n(e.expected)} at "${e.location}"`)))}};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ValueType } from '../common/index.js';
|
|
2
|
+
import type { EntityOrAliasName, ExpressionName } from '../model/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* A `$read` of an expression in a component, with the type the component expects where the value
|
|
5
|
+
* goes: a prop, the whole state, a filter criterion or the whole filter.
|
|
6
|
+
*/
|
|
7
|
+
export interface ExpressionRead {
|
|
8
|
+
readonly entityKey: EntityOrAliasName;
|
|
9
|
+
readonly name: ExpressionName;
|
|
10
|
+
readonly expected: ValueType;
|
|
11
|
+
/** The place of the read, such as `Hole.detail.main.title`. */
|
|
12
|
+
readonly location: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type EnhancedJsonValue } from '../../../core/index.js';
|
|
2
|
+
import { ValueType } from '../common/index.js';
|
|
3
|
+
import type { ModelTypeResolution } from '../model/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* The type generated code gives the inline value of an expression that declares a schema: a `$msg`
|
|
6
|
+
* compiles to a lingui `MessageDescriptor`. The only other such value is an `$eval`, which is code
|
|
7
|
+
* whose type is not read; constants never declare a schema.
|
|
8
|
+
*/
|
|
9
|
+
export declare const expressionValueType: (value: EnhancedJsonValue, resolution: ModelTypeResolution) => ValueType;
|
package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isMsgMarker as e}from"../../../core/index.js";import{ValueType as o}from"../common/index.js";let r=[{kind:"unknown"}];export const expressionValueType=(n,s)=>e(n)?o({$ref:"phx:MessageDescriptor"},{...s,author:"sdk"}):r;
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { EnhancedJsonSchemaType, EnhancedJsonValue } from '../../../core/index.js';
|
|
2
|
+
import type { EnhancedJsonSchemaType, EnhancedJsonValue, SdkExpressionImplementation } from '../../../core/index.js';
|
|
3
3
|
import type { EntityOrAliasName, ExpressionName } from '../model/index.js';
|
|
4
4
|
import type { MemoEvalPlan } from './memo-eval-plan.js';
|
|
5
|
-
/**
|
|
6
|
-
* The relation factory's single positional param: the relation's kind, the entity type or alias it
|
|
7
|
-
* points to and its cardinality, plus the id field for `direct` and `indirect` relations. The
|
|
8
|
-
* assistant schema reads `target` and `cardinality` to type a relation edge.
|
|
9
|
-
*/
|
|
10
|
-
export interface RelationExpressionParams {
|
|
11
|
-
readonly kind: 'direct' | 'indirect' | 'allOfType';
|
|
12
|
-
readonly target: string;
|
|
13
|
-
readonly cardinality: '0-1' | '1-1' | '0-N' | '1-N';
|
|
14
|
-
readonly field?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* An expression implementation built by an SDK factory at runtime. The kind is the
|
|
18
|
-
* semantic source of the expression, declared by the section that generated it —
|
|
19
|
-
* codegen and runtime dispatch on it instead of inspecting factory-function names.
|
|
20
|
-
* - `relation`: generated from a `relations:` declaration
|
|
21
|
-
* - `violations`: generated from `invariants:` declarations (the `$violations` expression)
|
|
22
|
-
*/
|
|
23
|
-
export type SdkExpressionImplementation = {
|
|
24
|
-
readonly kind: 'relation';
|
|
25
|
-
readonly params: readonly [RelationExpressionParams];
|
|
26
|
-
} | {
|
|
27
|
-
readonly kind: 'violations';
|
|
28
|
-
readonly params: readonly unknown[];
|
|
29
|
-
};
|
|
30
5
|
/**
|
|
31
6
|
* How an expression's runtime implementation is provided.
|
|
32
7
|
* - `user`: implementation from `src/expressions/*.ts` (dynamic import)
|
|
@@ -47,8 +22,6 @@ export type ExpressionImplementation = {
|
|
|
47
22
|
readonly value: EnhancedJsonValue;
|
|
48
23
|
readonly plan: MemoEvalPlan;
|
|
49
24
|
};
|
|
50
|
-
/** Narrows to implementations that are built by an SDK expression factory at runtime. */
|
|
51
|
-
export declare const isSdkExpressionImplementation: (implementation: ExpressionImplementation) => implementation is SdkExpressionImplementation;
|
|
52
25
|
/** A single parsed expression declaration. */
|
|
53
26
|
export type Expression = Branded<'Expression', {
|
|
54
27
|
readonly entityKey: EntityOrAliasName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import { type EvalExpressionParser, type ParseContext } from '../../../core/index.js';
|
|
2
|
+
import { type EvalExpressionParser, type ParseContext, type PhoenixDefinitions } from '../../../core/index.js';
|
|
3
3
|
import type { MergedExpressions } from '../../merge/index.js';
|
|
4
|
-
import type
|
|
5
|
-
import {
|
|
4
|
+
import { type Aliases, type EntityOrAliasName, type EntityTypeName, type ExpressionName, type ModelVersion } from '../model/index.js';
|
|
5
|
+
import type { ExpressionRead } from './expression-read.js';
|
|
6
|
+
import type { Expression } from './expression.js';
|
|
6
7
|
import type { MemoEvalPlan } from './memo-eval-plan.js';
|
|
7
8
|
export type { Expression, ExpressionImplementation } from './expression.js';
|
|
8
9
|
/**
|
|
@@ -31,12 +32,15 @@ export type Expressions = Branded<'Expressions', {
|
|
|
31
32
|
interface ExpressionsProps {
|
|
32
33
|
readonly rawExpressions: MergedExpressions;
|
|
33
34
|
readonly inferredExpressions: readonly Expression[];
|
|
35
|
+
/** The `$read`s of expressions in components, whose expected types the expressions must share. */
|
|
36
|
+
readonly expressionReads: readonly ExpressionRead[];
|
|
34
37
|
}
|
|
35
38
|
interface ExpressionsContext {
|
|
36
39
|
readonly latestModel: ModelVersion;
|
|
37
40
|
readonly aliases: Aliases;
|
|
38
41
|
readonly entityTypes: readonly EntityTypeName[];
|
|
39
42
|
readonly evalExpressionParser: EvalExpressionParser;
|
|
43
|
+
readonly phxDefinitions: PhoenixDefinitions;
|
|
40
44
|
readonly parsingContext: ParseContext;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{intersectSchemas as t}from"../../../core/index.js";import{DiagnosticCode as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{intersectSchemas as t,isSdkExpressionImplementation as n}from"../../../core/index.js";import{DiagnosticCode as o,diagnosticMessages as i}from"../../../errors/index.js";import{ModelTypeResolution as r}from"../model/index.js";import{checkExpressionReadTypes as s}from"./expression-read-types.js";import{UserExpressions as a}from"./user-expressions.js";let l=(e,t)=>{let n=e.get(t.entityKey);n||(n=new Map,e.set(t.entityKey,n)),n.set(t.name,t)},m=(n,o)=>{let i=n.get(o.entityKey);i||(i=new Map,n.set(o.entityKey,i));let r=i.get(o.name);r?i.set(o.name,e({...r,schema:t(r.schema,o.schema),...r.declaredSchema||!o.declaredSchema?{}:{declaredSchema:o.declaredSchema}})):i.set(o.name,o)},f=e=>"relation"===e.implementation.kind?"relations":"violations"===e.implementation.kind?"invariants":"expressions";export const Expressions=(t,p)=>{let{rawExpressions:c,inferredExpressions:d,expressionReads:y}=t,{latestModel:u,aliases:g,entityTypes:x,evalExpressionParser:h,parsingContext:S}=p,w=r(u,p.phxDefinitions),K=a(c,{latestModel:u,evalExpressionParser:h,typeResolution:w,parsingContext:S});if(void 0===K)return;let M=new Map;for(let e of K)l(M,e);for(let e of d)m(M,e);let E=((e,t)=>{let o=new Map,i=e=>{let t=o.get(e.entityKey);t||(t=new Set,o.set(e.entityKey,t)),t.add(e.name)};for(let t of e)i(t);for(let e of t)n(e.implementation)&&i(e);return o})(K,d);s({userExpressions:K,expressionReads:y,locateDeclaration:(e,t)=>{for(let n of[e,...[...g].filter(([,t])=>t.some(t=>t===e)).map(([e])=>e)]){let e=E.get(n)?.has(t)?M.get(n)?.get(t):void 0;if(e)return{section:f(e),entityKey:n}}return{section:"expressions",entityKey:e}}},w,S);let j=new Map;for(let e of K){let{implementation:t}=e;if("value"!==t.kind||!t.constant||t.plan.usesSelf)continue;let n=j.get(e.entityKey);n||(n=new Map,j.set(e.entityKey,n)),n.set(e.name,t.plan)}let v=new Map;for(let t of x){let n=[],r=new Map,s=e=>{let s=M.get(e);if(!s||0===s.size)return;n.push(e);let a=E.get(e);for(let[n,l]of s){if(!a?.has(n))continue;let s=r.get(n);if(s){S.at(f(l),e,n).error(o.DUPLICATE_EXPRESSION,i.DUPLICATE_EXPRESSION(t,n,s,e));continue}r.set(n,e)}};for(let[e,n]of g)n.includes(t)&&s(e);s(t),v.set(t,e({shapeGroups:n}))}return e({expressions:M,entityExpressions:v,constants:j})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./expressions.js";export*from"./memo-eval-plan.js";export*from"./user-expressions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{isEvalMarker as r,isMsgMarker as t}from"../../../core/index.js";import{evalCodeUsesSelf as n}from"../../../enhanced-json/eval-code-uses-self.js";import{isComponentPropTarget as o}from"../components/component-prop-target.js";let l=(e,r)=>0===r.length?e:`${e}.${r.join(".")}`,i=(n,a,d,u)=>{if(void 0===n)throw Error(`MemoEvalPlan: found undefined at ${l(d,u)}, undefined cannot be generated, remove the property or use null.`);if(r(n)){let r=((r,t,n)=>{let o=t.trim();for(let e=0;e<r.length;e++){let t=r[e];if("eval"===t.kind&&t.code===o)return e}return r.push(e({kind:"eval",code:o,label:n})),r.length-1})(a,n.$eval,d);return e({kind:"slot",depIndex:r})}if(o(n)){let r=((r,t)=>{for(let e=0;e<r.length;e++){let n=r[e];if("read"===n.kind&&n.target===t)return e}return r.push(e({kind:"read",target:t})),r.length-1})(a,n.$target);return e({kind:"slot",depIndex:r})}if(t(n))return e({kind:"msg",marker:n});if(null===n||"object"!=typeof n)return e({kind:"literal",value:n});if(Array.isArray(n))return e({kind:"array",items:n.map((e,r)=>i(e,a,d,[...u,String(r)]))});if("object"!=typeof n||null===n)throw Error(`MemoEvalPlan: found unsupported value at ${l(d,u)}, remove it or use null.`);let s=[];for(let e in n){let r=n[e];s.push([e,i(r,a,d,[...u,e])])}return e({kind:"object",entries:s})};export const MemoEvalPlan=(r,t)=>{let o=[],l=i(r,o,t,[]),a=o.some(e=>"read"===e.kind||n(e.code));return e({deps:o,template:l,usesSelf:a})};
|
package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EvalExpressionParser, type ParseContext } from '../../../core/index.js';
|
|
2
2
|
import type { MergedExpressions } from '../../merge/index.js';
|
|
3
|
-
import type { ModelVersion } from '../model/index.js';
|
|
3
|
+
import type { ModelTypeResolution, ModelVersion } from '../model/index.js';
|
|
4
4
|
import type { Expression } from './expression.js';
|
|
5
5
|
/**
|
|
6
6
|
* Validates user-declared expressions from merged YAML.
|
|
@@ -15,6 +15,8 @@ import type { Expression } from './expression.js';
|
|
|
15
15
|
interface UserExpressionsContext {
|
|
16
16
|
readonly latestModel: ModelVersion;
|
|
17
17
|
readonly evalExpressionParser: EvalExpressionParser;
|
|
18
|
+
/** Resolves the refs of the declared schemas, for checking an inline value against its schema. */
|
|
19
|
+
readonly typeResolution: ModelTypeResolution;
|
|
18
20
|
readonly parsingContext: ParseContext;
|
|
19
21
|
}
|
|
20
22
|
export declare const UserExpressions: (rawExpressions: MergedExpressions, context: UserExpressionsContext) => readonly Expression[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{schemaFromValue as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{schemaFromValue as r}from"../../../enhanced-json/index.js";import{DiagnosticCode as t,diagnosticMessages as o}from"../../../errors/index.js";import{ValueType as s,formatValueType as m,isAssignableValueType as a}from"../common/index.js";import{ExpressionName as n}from"../model/index.js";import{expressionValueType as i}from"./expression-value-type.js";import{MemoEvalPlan as l}from"./memo-eval-plan.js";let c=(e,n,c,p,E)=>{if("user"===e.kind)return{schema:e.schema,implementation:{kind:"user"}};let h=l(e.value,n),u={kind:"value",constant:e.constant,value:e.value,plan:h};if(Object.keys(e.schema).length>0){var f,d;let r,l;return f=e.value,d=e.schema,r=i(f,E),a(r,l=s(d,{...E,author:"project"}))||c.error(t.EXPRESSION_VALUE_TYPE_MISMATCH,o.EXPRESSION_VALUE_TYPE_MISMATCH(n,m(r),m(l))),{schema:e.schema,implementation:u}}let N=r(e.value,c,p);if(void 0!==N)return{schema:N,implementation:u}};export const UserExpressions=(r,s)=>{let{latestModel:m,evalExpressionParser:a,typeResolution:i,parsingContext:l}=s,{allNames:p}=m,E=[...p].map(String),h=[];for(let[s,m]of Object.entries(r)){p.has(s)||l.error(t.EXPRESSION_UNKNOWN_ENTITY_KEY,o.EXPRESSION_UNKNOWN_ENTITY_KEY(s,E));let r=e(s);for(let[t,o]of Object.entries(m)){let m=l.at(s),p=n(t,m);if(!p)continue;let E=c(o,`${s}.${t}`,m.at(t),a,i);E&&h.push(e({entityKey:r,name:p,schema:E.schema,declaredSchema:E.schema,implementation:E.implementation}))}}if(!l.hasErrors)return h};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ParseContext } from '../../../core/index.js';
|
|
2
|
+
import type { ParseContext, PhoenixDefinitions } from '../../../core/index.js';
|
|
3
3
|
import type { MergedComponents, MergedExpressions, MergedInvariants, MergedRelations } from '../../merge/index.js';
|
|
4
4
|
import type { ComponentEntry } from '../components/index.js';
|
|
5
5
|
import type { Expression } from '../expressions/index.js';
|
|
@@ -22,5 +22,5 @@ interface InvariantsProps {
|
|
|
22
22
|
}
|
|
23
23
|
/** Explicit empty invariants aggregate for consumers that do not declare invariants. */
|
|
24
24
|
export declare const EmptyInvariants: () => Invariants;
|
|
25
|
-
export declare const Invariants: (props: InvariantsProps, latestModel: ModelVersion, ctx: ParseContext) => Invariants;
|
|
25
|
+
export declare const Invariants: (props: InvariantsProps, latestModel: ModelVersion, phxDefinitions: PhoenixDefinitions, ctx: ParseContext) => Invariants;
|
|
26
26
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as o}from"../../../errors/index.js";import{UserComponentEntry as r}from"../components/index.js";import{ExpressionName as n,InstanceName as i,getResolvedShape as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as o}from"../../../errors/index.js";import{UserComponentEntry as r}from"../components/index.js";import{ExpressionName as n,InstanceName as i,ModelTypeResolution as a,getResolvedShape as s}from"../model/index.js";import{Invariant as l}from"./invariant.js";let p="violations",N="$violations",m=(e,t)=>t.get(e)??[e],O=e=>"dynamic"===e.kind?e.violationTypes:[e.violationType],I=(t,o,r)=>{if(!r)return;let n=[...o.violationTypes].map(e=>`'${String(e)}'`).join(" | "),i={tsType:`ReadonlyArray<Violation<${n}>>`,import:[{module:"@salsita-ai/sdk/domain",member:"Violation"}]};return e({entityKey:t,name:r,schema:i,declaredSchema:i,implementation:{kind:"violations",params:[{entityType:String(t),invariants:o.declaredGroups}]}})},f=(e,t,o,n)=>{let l=i("default",String(e),p,n);if(l)return r({typeOrAlias:e,instanceName:l,componentName:p,rawProps:{violations:{$read:N}}},{resolvedShape:s(t.resolvedShapes,e),parsingContext:n,typeResolution:a(t,o)}).entry};export const EmptyInvariants=()=>e({entries:{},expressions:[],components:[]});export const Invariants=(r,i,a,s)=>{let{rawInvariants:T,rawExpressions:d,rawRelations:A,rawComponents:c}=r,{allNames:y,aliases:S}=i,_=[...y].map(String),u={},v=new Map;for(let[e,r]of Object.entries(T)){let n=s.at(e);if(!y.has(e)){n.error(t.INVARIANT_UNKNOWN_ENTITY_KEY,o.INVARIANT_UNKNOWN_ENTITY_KEY(e,_));continue}let i={};for(let[e,t]of Object.entries(r)){let o=l(e,t,n.at(e));o&&(i[String(o.name)]=o)}u[String(e)]=i;let a=Object.values(i);if(0!==a.length)for(let t of m(e,S)){let o=v.get(t);for(let r of(o||(o={violationTypes:new Set,declaredGroups:[]},v.set(t,o)),o.declaredGroups.push({typeOrAlias:e,invariants:a}),a))for(let e of O(r))o.violationTypes.add(e)}}let g=[],h=[],j=n(N,s);for(let[e,t]of v){let o=I(e,t,j),r=f(e,i,a,s);o&&g.push(o),r&&h.push(r)}for(let[e,r]of Object.entries(c))Object.hasOwn(r,p)&&s.at("components",e,p).error(t.INVARIANT_MANUAL_VIOLATIONS_COMPONENT,o.INVARIANT_MANUAL_VIOLATIONS_COMPONENT(e));return((e,r)=>{let{invariantEntityTypes:n,rawExpressions:i,rawRelations:a,aliases:s}=e,l=e=>{let t=s.get(e);return t?t.some(e=>n.has(String(e))):n.has(e)},p=(e,n)=>{for(let[i,a]of Object.entries(e))Object.hasOwn(a,N)&&l(i)&&r.at(n,i,N).error(t.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT,o.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT(i,n))};p(i,"expressions"),p(a,"relations")})({invariantEntityTypes:new Set([...v.keys()].map(String)),rawExpressions:d,rawRelations:A,aliases:S},s),e({entries:u,expressions:g,components:h})};
|
|
@@ -7,8 +7,8 @@ import { ShapePropertyName } from './names/shape-property-name.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* A map of shape property names to their default values inside a single entity block.
|
|
9
9
|
* Raw YAML values — markers intact — keyed by a validated {@link ShapePropertyName}.
|
|
10
|
-
* Codegen emits these as-is via `stringifyEnhancedJsonValue`;
|
|
11
|
-
*
|
|
10
|
+
* Codegen emits these as-is via `stringifyEnhancedJsonValue`; at run time
|
|
11
|
+
* `createRecipeFactory` makes the generated `createRecipe` factory from them.
|
|
12
12
|
*/
|
|
13
13
|
export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValue>>;
|
|
14
14
|
/**
|
|
@@ -19,6 +19,11 @@ export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValu
|
|
|
19
19
|
* flattened here to concrete entity entries so downstream codegen only serialises
|
|
20
20
|
* a runtime-ready per-entity map.
|
|
21
21
|
*
|
|
22
|
+
* A source key may state part of a shape, but the flattened entry of a concrete
|
|
23
|
+
* entity type states every property of its shape: `createRecipeFactory` validates
|
|
24
|
+
* each entry as a whole entity when the generated module loads. An entity type
|
|
25
|
+
* with no entry has no defaults and is not checked.
|
|
26
|
+
*
|
|
22
27
|
* Values are raw `EnhancedJsonValue` so codegen can emit them via
|
|
23
28
|
* `stringifyEnhancedJsonValue` with `$msg` markers preserved.
|
|
24
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{CONSTANT_CAPS as t
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{CONSTANT_CAPS as t}from"../../../core/index.js";import{resolveEnhancedJsonValue as r}from"../../../enhanced-json/index.js";import{DiagnosticCode as i,diagnosticMessages as n}from"../../../errors/index.js";import{ShapePropertyName as o}from"./names/shape-property-name.js";let s=(e,t,r,o,s)=>{for(let l of r.validatePartialShape(t).errors){let t=l.instancePath?l.instancePath:"(root)",r=l.instancePath.split("/").filter(Boolean)[0]??"";o.error(i.DEFAULTS_SCHEMA_VIOLATION,n[i.DEFAULTS_SCHEMA_VIOLATION](e,r,t,l.message,s))}};export const Defaults=(l,a,f)=>{let E=a.allNames,T=[...E].map(String),S=new Map,N=new Map;for(let e of a.entitySchemas)S.set(e.entityType,new Set(Object.keys(e.shapeProperties))),N.set(e.entityType,e);let g={},O=new Map;for(let[e,_]of Object.entries(l)){let l=f.at(e);if(!E.has(e)){f.error(i.DEFAULTS_UNKNOWN_ENTITY_KEY,n[i.DEFAULTS_UNKNOWN_ENTITY_KEY](e,T));continue}let c=a.aliases.get(e),p=void 0!==c,h={};for(let[t,r]of Object.entries(_)){let s=o(t,l);if(s){if(p){let t=[];for(let e of c){let r=S.get(e);r&&r.has(s)||t.push(String(e))}if(t.length>0){let r=c[0],o=r?[...S.get(r)??[]]:[];f.error(i.DEFAULTS_UNKNOWN_PROPERTY,n[i.DEFAULTS_UNKNOWN_PROPERTY](e,s,o,t));continue}}else{let t=S.get(e);if(!t||!t.has(s)){let r=t?[...t]:[];f.error(i.DEFAULTS_UNKNOWN_PROPERTY,n[i.DEFAULTS_UNKNOWN_PROPERTY](e,s,r));continue}}h[s]=r}}if(0===Object.keys(h).length)continue;let m=r(h,void 0,t,l);if(void 0!==m){if(p)for(let t of c){let r=N.get(t);r&&s(e,m,r,l,String(t))}else{let t=N.get(e);t&&s(e,m,t,l)}for(let t of c??[e])g[String(t)]={...g[String(t)],...h},O.set(t,[...O.get(t)??[],e])}}for(let[e,t]of O){let r=g[String(e)]??{},o=(N.get(e)?.shapeSchema.required??[]).filter(e=>!Object.hasOwn(r,e));if(0===o.length)continue;let s=t.includes(String(e))?String(e):t.at(-1);f.at(s).error(i.DEFAULTS_INCOMPLETE,n[i.DEFAULTS_INCOMPLETE](String(e),o,t))}if(Object.keys(l).length>0&&f.warning(i.DEFAULTS_DEPRECATED,n[i.DEFAULTS_DEPRECATED]()),!f.hasErrors)return e({entries:g})};
|
|
@@ -8,6 +8,7 @@ export * from './entity-schema.js';
|
|
|
8
8
|
export * from './entity-types.js';
|
|
9
9
|
export * from './model-version.js';
|
|
10
10
|
export * from './model-version-key.js';
|
|
11
|
+
export * from './model-type-resolution.js';
|
|
11
12
|
export * from './names/index.js';
|
|
12
13
|
export * from './presets.js';
|
|
13
14
|
export * from './resolved-shapes.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./aliases.js";export*from"./all-names.js";export*from"./common-types.js";export*from"./configuration-schema.js";export*from"./data-schemas.js";export*from"./defaults.js";export*from"./entity-schema.js";export*from"./entity-types.js";export*from"./model-version.js";export*from"./model-version-key.js";export*from"./names/index.js";export*from"./presets.js";export*from"./resolved-shapes.js";export*from"./session-data-schema.js";export*from"./shapes/index.js";
|
|
1
|
+
export*from"./aliases.js";export*from"./all-names.js";export*from"./common-types.js";export*from"./configuration-schema.js";export*from"./data-schemas.js";export*from"./defaults.js";export*from"./entity-schema.js";export*from"./entity-types.js";export*from"./model-version.js";export*from"./model-version-key.js";export*from"./model-type-resolution.js";export*from"./names/index.js";export*from"./presets.js";export*from"./resolved-shapes.js";export*from"./session-data-schema.js";export*from"./shapes/index.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PhoenixDefinitions } from '../../../core/index.js';
|
|
2
|
+
import { type ValueTypeResolution } from '../common/index.js';
|
|
3
|
+
import type { ModelVersion } from './model-version.js';
|
|
4
|
+
/** What reading the type of a schema of the model needs: its refs and its entity names. */
|
|
5
|
+
export type ModelTypeResolution = Omit<ValueTypeResolution, 'author' | 'definitions'>;
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the refs of a model's schemas (its common types and the phoenix definitions) and the
|
|
8
|
+
* entity types an entity type or alias name stands for.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ModelTypeResolution: (model: ModelVersion, phxDefinitions: PhoenixDefinitions) => ModelTypeResolution;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSchemaRefResolver as e}from"../common/index.js";export const ModelTypeResolution=(o,r)=>({resolveRef:e(o.commonTypes,r),entityTypes:e=>{for(let[r,t]of o.aliases)if(String(r)===e)return t.map(String);return[e]}});
|
package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type EnhancedJsonSchemaType, type PhoenixDefinitions } from '../../../core/index.js';
|
|
2
|
+
import type { ModelVersion } from '../model/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the type of a shape field means to a relation that reads its related entities from it.
|
|
5
|
+
*
|
|
6
|
+
* - `single`: the id of one entity of `entityTypes`, or `null` when `nullable`.
|
|
7
|
+
* - `array`: an array of ids of entities of `entityTypes`.
|
|
8
|
+
* - `other`: anything else, such as a string, an id without `references`, or a mix of the above.
|
|
9
|
+
* - `unknown`: the schema does not say, because it states its type as TypeScript text (`tsType`)
|
|
10
|
+
* or combines schemas with `allOf`.
|
|
11
|
+
*/
|
|
12
|
+
export type ReferenceFieldType = {
|
|
13
|
+
readonly kind: 'single';
|
|
14
|
+
readonly entityTypes: ReadonlySet<string>;
|
|
15
|
+
readonly nullable: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'array';
|
|
18
|
+
readonly entityTypes: ReadonlySet<string>;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'other';
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'unknown';
|
|
23
|
+
};
|
|
24
|
+
/** Classifies the schema of a shape field of the latest model by the reference it holds. */
|
|
25
|
+
export declare const referenceFieldType: (schema: EnhancedJsonSchemaType, latestModel: ModelVersion, phxDefinitions: PhoenixDefinitions) => ReferenceFieldType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{COMMON_SHORT_PREFIX as e,INTERNAL_REF_PATTERN as t,extractPhxDefName as n}from"../../../core/index.js";let r={entityTypes:new Set,hasNull:!1,arrays:[],hasOther:!1,hasUnknown:!1},s={...r,hasNull:!0},a={...r,hasOther:!0},y={...r,hasUnknown:!0},i=e=>({entityTypes:new Set(e.flatMap(e=>[...e.entityTypes])),hasNull:e.some(e=>e.hasNull),arrays:e.flatMap(e=>e.arrays),hasOther:e.some(e=>e.hasOther),hasUnknown:e.some(e=>e.hasUnknown)}),l=(o,p)=>{if(o.tsType)return y;if(o.$ref){let s,i=n(o.$ref);if(void 0!==i)return p.phxDefinitions[i]?.tsType==="DomainEntityId"&&o.references?{...r,entityTypes:new Set(((e,t)=>{for(let[n,r]of t.aliases)if(String(n)===e)return r.map(String);return[e]})(o.references,p.latestModel))}:a;let h=(s=o.$ref).startsWith(e)?s.slice(e.length):t.exec(s)?.[2];if(void 0===h)return a;let u=p.latestModel.commonTypes.get(h);return!u||p.openCommonTypes.has(h)?y:l(u.schema,{...p,openCommonTypes:new Set([...p.openCommonTypes,h])})}if(o.enum)return i(o.enum.map(e=>null===e?s:a));let h=o.anyOf??o.oneOf;if(h)return i(h.map(e=>l(e,p)));if(o.allOf)return y;let u=e=>"array"===e?(()=>{let{items:e}=o;return!e||Array.isArray(e)?a:{...r,arrays:[l(e,p)]}})():"null"===e?s:a;return"string"==typeof o.type?u(o.type):Array.isArray(o.type)?i(o.type.map(u)):a};export const referenceFieldType=(e,t,n)=>(e=>{if(e.hasUnknown||e.arrays.some(e=>e.hasUnknown))return{kind:"unknown"};if(e.hasOther)return{kind:"other"};let[t,...n]=e.arrays;if(!t)return e.entityTypes.size>0?{kind:"single",entityTypes:e.entityTypes,nullable:e.hasNull}:{kind:"other"};let r=e=>e.entityTypes.size>0&&!e.hasNull&&!e.hasOther&&0===e.arrays.length;return 0===e.entityTypes.size&&!e.hasNull&&r(t)&&n.every(e=>{let n,s;return r(e)&&(n=e.entityTypes,s=t.entityTypes,n.size===s.size&&[...n].every(e=>s.has(e)))})?{kind:"array",entityTypes:t.entityTypes}:{kind:"other"}})(l(e,{latestModel:t,phxDefinitions:n,openCommonTypes:new Set}));
|
package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReferenceFieldType } from './reference-field-type.js';
|
|
2
|
+
type Cardinality = '0-1' | '1-1' | '0-N' | '1-N';
|
|
3
|
+
/** How a field holds its reference: one id, one id or `null`, or an array of ids. */
|
|
4
|
+
export type ReferenceFieldShape = 'single' | 'nullableSingle' | 'array';
|
|
5
|
+
/**
|
|
6
|
+
* Why a relation cannot read its related entities from its field.
|
|
7
|
+
*
|
|
8
|
+
* - `notReference`: the field does not hold entity ids.
|
|
9
|
+
* - `otherEntityTypes`: the field holds ids of other entity types than the relation relates to.
|
|
10
|
+
* - `cardinality`: the field of a direct relation holds its ids in another shape than the
|
|
11
|
+
* cardinality of the relation needs.
|
|
12
|
+
*/
|
|
13
|
+
export type RelationFieldMismatch = {
|
|
14
|
+
readonly kind: 'notReference';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'otherEntityTypes';
|
|
17
|
+
readonly referenced: readonly string[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'cardinality';
|
|
20
|
+
readonly shape: ReferenceFieldShape;
|
|
21
|
+
readonly required: ReferenceFieldShape;
|
|
22
|
+
};
|
|
23
|
+
interface RelationReadingField {
|
|
24
|
+
readonly kind: 'direct' | 'indirect';
|
|
25
|
+
readonly cardinality: Cardinality;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Checks the field of a direct or indirect relation against what the relation reads from it.
|
|
29
|
+
*
|
|
30
|
+
* The field must reference exactly `relatedEntityTypes`: for a direct relation the entity types of
|
|
31
|
+
* its target, for an indirect relation the entity types it is declared on, because there the field
|
|
32
|
+
* belongs to the target and points back. A direct relation also fixes the shape of the field by
|
|
33
|
+
* its cardinality. An indirect relation reads every shape, since its cardinality counts the
|
|
34
|
+
* entities that point back and not the ids in the field.
|
|
35
|
+
*
|
|
36
|
+
* When an alias holds the field, the field can have another type in each entity type of the alias.
|
|
37
|
+
* The relation is accepted when the field fits in at least one of them. Requiring all of them
|
|
38
|
+
* would be the stricter reading, but projects whose specs type-check rely on the looser one, so
|
|
39
|
+
* it would reject working projects.
|
|
40
|
+
*
|
|
41
|
+
* @param fieldTypes The type of the field in each entity type that holds it.
|
|
42
|
+
* @returns The mismatch of the first entity type, or `undefined` when the field fits in one of
|
|
43
|
+
* them or its type there is unknown.
|
|
44
|
+
*/
|
|
45
|
+
export declare const relationFieldMismatch: (relation: RelationReadingField, fieldTypes: readonly ReferenceFieldType[], relatedEntityTypes: readonly string[]) => RelationFieldMismatch | undefined;
|
|
46
|
+
export {};
|
package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={"0-1":"nullableSingle","1-1":"single","0-N":"array","1-N":"array"};export const relationFieldMismatch=(n,i,r)=>{let t=i.map(i=>((n,i,r)=>{if("unknown"===i.kind)return;if("other"===i.kind)return{kind:"notReference"};let t=i.entityTypes;if(!(t.size===new Set(r).size&&r.every(e=>t.has(e))))return{kind:"otherEntityTypes",referenced:[...t]};if("indirect"===n.kind)return;let l="array"===i.kind?"array":i.nullable?"nullableSingle":"single",a=e[n.cardinality];return l===a?void 0:{kind:"cardinality",shape:l,required:a}})(n,i,r));return t.includes(void 0)?void 0:t[0]};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ParseContext } from '../../../core/index.js';
|
|
2
|
+
import type { ParseContext, PhoenixDefinitions } from '../../../core/index.js';
|
|
3
3
|
import type { MergedRelations } from '../../merge/index.js';
|
|
4
4
|
import type { ComponentEntry } from '../components/index.js';
|
|
5
5
|
import type { Expression } from '../expressions/index.js';
|
|
@@ -19,7 +19,8 @@ export type Relations = Branded<'Relations', {
|
|
|
19
19
|
* Validates merged relations against the latest model, then expands into components + expressions.
|
|
20
20
|
*
|
|
21
21
|
* Each relation is individually constructed via `Relation()` which builds its own expression
|
|
22
|
-
* and component entries. This factory validates
|
|
22
|
+
* and component entries. This factory validates the field a direct or indirect relation reads
|
|
23
|
+
* against the shape that holds it, validates cross-relation concerns (counterpart pairing,
|
|
23
24
|
* composition tree reachability) and aggregates the per-relation artifacts.
|
|
24
25
|
*/
|
|
25
|
-
export declare const Relations: (rawRelations: MergedRelations, latestModel: ModelVersion, ctx: ParseContext) => Relations;
|
|
26
|
+
export declare const Relations: (rawRelations: MergedRelations, latestModel: ModelVersion, phxDefinitions: PhoenixDefinitions, ctx: ParseContext) => Relations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as E}from"../model/index.js";import{referenceFieldType as n}from"./reference-field-type.js";import{relationFieldMismatch as f}from"./relation-field-mismatch.js";import{Relation as l}from"./relation.js";let T=(e,t,r)=>{let i=r[t.target];if(!i)return;let o="direct"===t.kind?"indirect":"indirect"===t.kind?"direct":"allOfType";for(let[r,E]of Object.entries(i))if(E.kind===o&&E.target===e&&("allOfType"===t.kind||"allOfType"===E.kind||t.field===E.field))return{entityKey:t.target,name:r,relation:E}},N=(e,t)=>{let r=t.aliases.get(e);return r||[e]},a=(e,i,o)=>{let{entityKey:E,relationName:n,field:f,fieldOwner:l,related:T,relatedEntityTypes:N,cardinality:a}=i;switch(e.kind){case"notReference":o.error(t.RELATION_FIELD_NOT_REFERENCE,r.RELATION_FIELD_NOT_REFERENCE(E,n,f,l));break;case"otherEntityTypes":o.error(t.RELATION_FIELD_REFERENCES_OTHER_TYPES,r.RELATION_FIELD_REFERENCES_OTHER_TYPES(E,n,f,l,e.referenced,T,N));break;case"cardinality":o.error(t.RELATION_FIELD_CARDINALITY_MISMATCH,r.RELATION_FIELD_CARDINALITY_MISMATCH(E,n,f,a,e.shape,e.required))}};export const Relations=(O,_,I,s)=>{let{allNames:d,resolvedShapes:R}=_,c=[...d].map(String),L=(e,t)=>E(R,e).fieldSchemas.has(t),A={};for(let[e,T]of Object.entries(O)){let O=s.at(e);if(!d.has(e)){O.error(t.RELATION_UNKNOWN_ENTITY_KEY,r.RELATION_UNKNOWN_ENTITY_KEY(e,c));continue}for(let[s,p]of Object.entries(T)){if(!o(s,O))continue;if(!d.has(p.target)){O.error(t.RELATION_UNKNOWN_TARGET,r.RELATION_UNKNOWN_TARGET(e,s,p.target,c));continue}if("direct"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,e));continue}if(!L(e,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_DIRECT,r.RELATION_UNKNOWN_FIELD_DIRECT(e,s,p.field));continue}}else if("indirect"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,p.target));continue}if(!L(p.target,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_INDIRECT,r.RELATION_UNKNOWN_FIELD_INDIRECT(e,s,p.field,p.target));continue}}if("allOfType"!==p.kind){let[t,r]="direct"===p.kind?[e,p.target]:[p.target,e],i=N(r,_).map(String),o=N(t,_).flatMap(e=>{let t=E(R,e).fieldSchemas.get(p.field);return t?[n(t,_,I)]:[]}),l=f(p,o,i);l&&a(l,{entityKey:e,relationName:s,field:p.field,fieldOwner:t,related:r,relatedEntityTypes:i,cardinality:p.cardinality},O.at(s))}let T=l(s,p,e,_.aliases,O);T&&(A[e]||(A[e]={}),A[e][T.name]=T)}}for(let[e,i]of Object.entries(A)){let o=s.at(e);for(let[E,n]of Object.entries(i)){if(n.target===e)continue;let i=T(e,n,A);if(!i){o.error(t.RELATION_MISSING_COUNTERPART,r.RELATION_MISSING_COUNTERPART(e,E,n.kind,n.target,"allOfType"===n.kind?void 0:n.field,n.composedOf));continue}n.composedOf&&i.relation.composedOf&&o.error(t.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH,r.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH(e,E,i.entityKey,i.name))}}((e,i,o)=>{let E=new Map;for(let[t,r]of Object.entries(e))for(let e of Object.values(r)){if(!e.composedOf)continue;let r=N(t,i),o=N(e.target,i);for(let e of r){let t=E.get(e);for(let r of(t||(t=new Set,E.set(e,t)),o))t.add(r)}}let n=new Set(i.rootEntityTypes),f=[...i.rootEntityTypes];for(;f.length>0;){let e=f.shift(),t=E.get(e);if(t)for(let e of t)n.has(e)||(n.add(e),f.push(e))}let l=i.rootEntityTypes.map(String);for(let e of i.entityTypes)n.has(e)||o.at(String(e)).error(t.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE,r.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE(String(e),l))})(A,_,s);let{components:p,expressions:m}=(e=>{let t=[],r=[];for(let i of Object.values(e))for(let e of Object.values(i))t.push(...e.components),r.push(e.expression);return{components:t,expressions:r}})(A);return e({entries:A,components:p,expressions:m})};
|