@salsita-ai/sdk 0.50.0-develop.801a817d3f → 0.50.0-develop.9267bdc12e
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 +3 -3
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +5 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +5 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- 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/project-module-list.d.ts +8 -0
- package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +8 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
- 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-domain-block.js +56 -56
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +5 -5
- package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -7
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +93 -41
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +10 -4
- 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.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +39 -13
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -7
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +9 -4
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -2
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
- package/dist/application-spec/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/raw-assistant.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.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/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/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-field-type.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +9 -43
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -21
- 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/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +34 -0
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +3 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +271 -30
- 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 +123 -8
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +5 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +9 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +5 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +2 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +13 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +8 -1
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +1 -75
- 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/DesktopSidebar.d.ts +92 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.js +16 -0
- 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/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +100 -117
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- package/dist/docs/index.json +11 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-layout.mdx +981 -0
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
- package/dist/docs/other-features/domain-actions.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +58 -48
- package/dist/docs/other-features/transformers.mdx +1 -1
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/admin.mdx +9 -24
- package/dist/docs/phoenix/configurator-interface.mdx +105 -65
- package/dist/docs/phoenix/deployments.mdx +1 -1
- package/dist/docs/phoenix/domain-model.mdx +4 -0
- package/dist/docs/phoenix/expression-context.mdx +11 -3
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/localization.mdx +3 -22
- package/dist/docs/phoenix/phoenix-cli.mdx +123 -48
- package/dist/docs/phoenix/project-structure.mdx +24 -11
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -11
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +2 -2
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
- package/dist/docs/relations/hierarchy.mdx +13 -2
- package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
- package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
- package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
- package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -14
- package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.d.ts +9 -5
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -2
- package/dist/domain/application/application-config.d.ts +28 -97
- package/dist/domain/application/assistant/assistant-fields.d.ts +5 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +63 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +121 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -0
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
- package/dist/domain/application/assistant/index.d.ts +7 -0
- package/dist/domain/application/assistant/index.js +1 -0
- 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-field-options.d.ts +2 -3
- package/dist/domain/application/assistant-mutations.d.ts +3 -5
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +3 -7
- package/dist/domain/application/configurator-builder.d.ts +33 -18
- 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 +3 -6
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
- package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
- package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
- package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +3 -3
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -4
- package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/core/action/action-factory.d.ts +11 -0
- package/dist/domain/core/{action.d.ts → action/action.d.ts} +22 -18
- package/dist/domain/core/action/index.d.ts +2 -0
- package/dist/domain/core/action/index.js +1 -0
- package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
- package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
- package/dist/domain/core/component/debug-state-component.js +1 -0
- package/dist/domain/core/component/domain-component-optic.d.ts +65 -0
- package/dist/domain/core/component/domain-component-optic.js +16 -0
- package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
- package/dist/domain/core/component/drag-state-component.js +1 -0
- package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
- package/dist/domain/core/component/export-state-component.js +1 -0
- package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
- package/dist/domain/core/component/fullscreen-state-component.js +1 -0
- package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
- package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
- package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
- package/dist/domain/core/component/hover-state-component.js +1 -0
- package/dist/domain/core/component/index.d.ts +18 -0
- package/dist/domain/core/component/index.js +1 -0
- package/dist/domain/{components → core/component}/legacy-filter.d.ts +4 -19
- package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
- package/dist/domain/core/component/navigation-state-component.js +1 -0
- package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
- package/dist/domain/core/component/selection-state-component.js +1 -0
- package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
- package/dist/domain/core/component/system-component-builder.js +1 -0
- package/dist/domain/{components → core/component}/system-component-filter.d.ts +38 -20
- package/dist/domain/core/component/system-virtual-entity.js +1 -0
- package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
- package/dist/domain/core/component/tool-state-component.js +1 -0
- package/dist/domain/{components → core/component}/updates.d.ts +9 -10
- package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
- package/dist/domain/core/component/view-state-component.js +1 -0
- package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
- package/dist/domain/core/component/viewport-state-component.js +1 -0
- package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema.js +1 -0
- package/dist/domain/core/data-schema/index.d.ts +7 -0
- package/dist/domain/core/data-schema/index.js +1 -0
- package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
- package/dist/domain/core/decoder/create-decoder.js +1 -0
- package/dist/domain/core/decoder/decoder.d.ts +6 -0
- package/dist/domain/core/decoder/decoder.js +1 -0
- package/dist/domain/core/decoder/index.d.ts +2 -0
- package/dist/domain/core/decoder/index.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -5
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/domain.d.ts +4 -5
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/emission/index.d.ts +8 -0
- package/dist/domain/core/emission/index.js +1 -0
- package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
- package/dist/domain/core/emission/reset-state-emission.js +1 -0
- package/dist/domain/core/emission/state-emission.d.ts +4 -0
- package/dist/domain/core/emission/state-emission.js +1 -0
- package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
- package/dist/domain/core/emission/state-update-emission.js +1 -0
- package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
- package/dist/domain/core/emission/state-validation-result.js +1 -0
- package/dist/domain/core/emission/transformation-log.d.ts +2 -0
- package/dist/domain/core/emission/transformation-log.js +1 -0
- package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
- package/dist/domain/core/emission/transformer-log-entry.js +1 -0
- package/dist/domain/core/emission/transformer-log.d.ts +11 -0
- package/dist/domain/core/emission/transformer-log.js +1 -0
- package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
- package/dist/domain/core/emission/transformer-phase.js +1 -0
- package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
- package/dist/domain/core/expression/aliased-expressions.js +1 -0
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -0
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/core/expression/custom-expression.d.ts +25 -0
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/expression/expression.d.ts +46 -0
- package/dist/domain/core/expression/expression.js +1 -0
- package/dist/domain/core/expression/index.d.ts +4 -0
- package/dist/domain/core/expression/index.js +1 -0
- package/dist/domain/core/index.d.ts +13 -17
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
- package/dist/domain/core/invariant/custom-invariants.d.ts +13 -0
- package/dist/domain/core/invariant/custom-invariants.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +5 -0
- package/dist/domain/core/invariant/index.js +1 -0
- package/dist/domain/core/invariant/invariants.d.ts +10 -0
- package/dist/domain/core/invariant/invariants.js +1 -0
- package/dist/domain/core/invariant/violation-component.js +1 -0
- package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
- package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
- package/dist/domain/core/model/index.d.ts +6 -0
- package/dist/domain/core/model/index.js +1 -0
- package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
- package/dist/domain/core/model/reflection.js +1 -0
- package/dist/domain/core/recipe/index.d.ts +1 -0
- package/dist/domain/core/recipe/index.js +1 -0
- package/dist/domain/core/recipe/recipes.d.ts +23 -0
- package/dist/domain/core/recipe/recipes.js +1 -0
- package/dist/domain/core/relation/all-of-type-relation.d.ts +19 -0
- package/dist/domain/core/relation/all-of-type-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -2
- package/dist/domain/core/relation/component-factories.js +1 -0
- package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
- package/dist/domain/core/relation/composed-of.js +1 -0
- package/dist/domain/core/relation/direct-relation.d.ts +17 -0
- package/dist/domain/core/relation/index.d.ts +8 -0
- package/dist/domain/core/relation/index.js +1 -0
- package/dist/domain/core/relation/indirect-relation.d.ts +25 -0
- package/dist/domain/core/relation/indirect-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -5
- package/dist/domain/core/relation/reference-component.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
- package/dist/domain/core/relation/reference-field.js +1 -0
- package/dist/domain/core/relation/relation-factory.d.ts +22 -0
- package/dist/domain/core/relation/relation-factory.js +1 -0
- package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
- package/dist/domain/core/schema/extended-schema-validator.js +1 -0
- package/dist/domain/core/schema/index.d.ts +3 -0
- package/dist/domain/core/schema/index.js +1 -0
- package/dist/domain/core/schema/schema-validator.js +1 -0
- package/dist/domain/core/state/id-sequence.d.ts +15 -0
- package/dist/domain/core/state/id-sequence.js +1 -0
- package/dist/domain/core/state/index.d.ts +3 -0
- package/dist/domain/core/state/index.js +1 -0
- package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +15 -47
- package/dist/domain/core/state/migrations.js +1 -0
- package/dist/domain/core/{state.d.ts → state/state.d.ts} +2 -3
- package/dist/domain/domain-builder.d.ts +11 -11
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +2 -4
- 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 +2 -2
- package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +3 -4
- 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 +8 -10
- package/dist/domain/domain-context/index.d.ts +8 -18
- 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 +5 -8
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
- package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +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 +2 -4
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +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 +3 -3
- package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
- package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
- package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
- 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/next-domain-entity-id.d.ts +1 -13
- package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +2 -39
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +2 -4
- package/dist/domain/domain-context/store-system/system-state.js +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +6 -10
- package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +3 -3
- package/dist/domain/domain-context/transformers/context.d.ts +2 -7
- package/dist/domain/domain-context/transformers/context.js +1 -1
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
- 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/then-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/then-builder.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.d.ts +3 -9
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +2 -3
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
- package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +19 -25
- 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 +88 -72
- 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 +5 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.d.ts +1 -2
- package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +6 -1
- 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 +5 -0
- 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/domain-runtime/spec/module-checks/project-modules.d.ts +32 -0
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +15 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
- package/dist/domain/{actions → domain-runtime/spec}/prepare-action-implementations.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
- package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +7 -8
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +6 -6
- package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/angle-indicator.js +1 -0
- package/dist/domain/extensions/attribute-switch.js +1 -0
- package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +1 -1
- package/dist/domain/extensions/autorotate-camera-component.js +1 -0
- package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/basic-sidebar-footer.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity-object.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/canvas-config.js +1 -0
- package/dist/domain/extensions/canvas-custom-environment.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +1 -1
- package/dist/domain/extensions/canvas-padding.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +1 -1
- package/dist/domain/extensions/canvas-preset-environment.js +1 -0
- package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/client-side-image.js +1 -0
- package/dist/domain/extensions/color-value.js +1 -0
- package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
- package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +1 -1
- package/dist/domain/extensions/common/dimension-indicator-schema.js +1 -0
- package/dist/domain/extensions/common/index.d.ts +4 -0
- package/dist/domain/extensions/common/index.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-header.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/custom-header.js +1 -1
- package/dist/domain/extensions/custom-price-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.js +1 -1
- package/dist/domain/{system-components → extensions}/dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-angle-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-angle-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-distance-dimension-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-offset-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-size-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-size-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/entity-header.d.ts +1 -1
- package/dist/domain/extensions/entity-header.js +1 -0
- package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +1 -1
- package/dist/domain/extensions/exit-tool-mode-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/finalize-action.d.ts +1 -1
- package/dist/domain/extensions/finalize-action.js +1 -0
- package/dist/domain/extensions/finalize-component.js +1 -0
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -0
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -0
- package/dist/domain/{system-components → extensions}/fixed-header.d.ts +1 -1
- package/dist/domain/extensions/fixed-header.js +1 -0
- package/dist/domain/{system-components → extensions}/floating-header.d.ts +1 -1
- package/dist/domain/extensions/floating-header.js +1 -0
- package/dist/domain/{system-components → extensions}/hidden-header.d.ts +1 -1
- package/dist/domain/extensions/hidden-header.js +1 -0
- package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/hidden-sidebar-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +1 -1
- package/dist/domain/extensions/horizontal-tabs.js +1 -0
- package/dist/domain/extensions/index.d.ts +69 -0
- package/dist/domain/extensions/index.js +1 -0
- package/dist/domain/{system-components → extensions}/list-selector-dimension-indicator.d.ts +3 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
- package/dist/domain/extensions/multilingual-text-value.js +1 -0
- package/dist/domain/extensions/navigation-steps.js +1 -0
- package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +1 -1
- package/dist/domain/extensions/offset-anchors.js +1 -0
- package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +1 -2
- package/dist/domain/extensions/offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/offset.d.ts +1 -1
- package/dist/domain/extensions/offset.js +1 -0
- package/dist/domain/{system-components → extensions}/other-action.d.ts +1 -1
- package/dist/domain/extensions/other-action.js +1 -0
- package/dist/domain/{system-components → extensions}/property-page.d.ts +2 -2
- package/dist/domain/extensions/property-page.js +1 -0
- package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/read-sidebar-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/rotatable.js +1 -0
- package/dist/domain/extensions/rotation-handle.js +1 -0
- package/dist/domain/extensions/save-template-thumbnail.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-add-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-animation.js +1 -0
- package/dist/domain/extensions/scene-entity-control.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-delete-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-floor-object.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-navigation-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-object-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-select-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-wall-object.js +1 -0
- package/dist/domain/extensions/selectable-component.js +1 -0
- package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +1 -1
- package/dist/domain/extensions/sidebar-tabs.js +1 -0
- package/dist/domain/extensions/simple-summary.js +1 -0
- package/dist/domain/{system-components → extensions}/size.d.ts +1 -1
- package/dist/domain/extensions/size.js +1 -0
- package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +1 -1
- package/dist/domain/extensions/sketching-draw.js +1 -0
- package/dist/domain/{system-components → extensions}/sketching-edit.d.ts +2 -2
- package/dist/domain/extensions/sketching-edit.js +1 -0
- package/dist/domain/extensions/summary-component.js +1 -0
- package/dist/domain/extensions/text-value.js +1 -0
- package/dist/domain/extensions/tool-controls.js +1 -0
- package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +2 -2
- package/dist/domain/extensions/tool-menu-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/toolbar.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/toolbar.js +1 -1
- package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/universal-sidebar-footer.js +1 -0
- package/dist/domain/extensions/view-controls.js +1 -0
- package/dist/domain/index.d.ts +2 -32
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +30 -21
- 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/projections/blender-projections/blender-projections.d.ts +2 -3
- package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
- 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/composition-projections.js +1 -1
- package/dist/domain/projections/constraint-projections.d.ts +1 -1
- package/dist/domain/projections/index.d.ts +1 -1
- package/dist/domain/projections/position-projections.d.ts +1 -1
- package/dist/domain/projections/projected-entities-projections.d.ts +2 -3
- package/dist/domain/projections/snap-matching.d.ts +1 -2
- package/dist/domain/projections/snap-utils.d.ts +1 -2
- package/dist/domain/projections/snapping-projections.d.ts +1 -1
- package/dist/domain/projections/validation-projections.d.ts +3 -20
- package/dist/domain/projections/validation-projections.js +1 -1
- package/dist/domain/sketching/sketching-projections.d.ts +1 -1
- package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
- package/dist/domain/system-components/admin-sidebar.js +1 -1
- package/dist/domain/system-components/angle-dimension.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +1 -1
- package/dist/domain/system-components/application-config.js +1 -1
- package/dist/domain/system-components/attribute-selection.js +1 -1
- package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-box-component.js +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.js +1 -1
- package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipes.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-box-geometry.js +1 -1
- package/dist/domain/system-components/collision-geometries.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.js +1 -1
- package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-point-geometry.js +1 -1
- package/dist/domain/system-components/common/index.d.ts +0 -4
- package/dist/domain/system-components/common/index.js +1 -1
- package/dist/domain/system-components/common/recipes.d.ts +1 -2
- package/dist/domain/system-components/constraint.d.ts +1 -1
- package/dist/domain/system-components/constraint.js +1 -1
- package/dist/domain/system-components/create-blueprint.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.js +1 -1
- package/dist/domain/system-components/detail.js +1 -1
- package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension-select.js +1 -1
- package/dist/domain/system-components/distance-dimension.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension.js +1 -1
- 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/generic-dimension.d.ts +1 -1
- package/dist/domain/system-components/generic-dimension.js +1 -1
- package/dist/domain/system-components/hidden-entity.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/index.d.ts +0 -68
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/material-override-property-transition.js +1 -1
- package/dist/domain/system-components/material-override-transformer.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/navigation-page.js +1 -1
- package/dist/domain/system-components/navigation-panel-list.js +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/admin-data-table-sidebar.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +1 -1
- package/dist/domain/system-components/pivot-point.d.ts +1 -1
- package/dist/domain/system-components/pivot-point.js +1 -1
- package/dist/domain/system-components/price.js +1 -1
- package/dist/domain/system-components/projected-entities.d.ts +1 -1
- package/dist/domain/system-components/projected-entities.js +1 -1
- package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipes.js +1 -1
- package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
- package/dist/domain/system-components/scene-entity-box-object.js +1 -1
- package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
- package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
- package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-group.js +1 -1
- package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object.js +1 -1
- package/dist/domain/system-components/scene-entity-point-light.js +1 -1
- package/dist/domain/system-components/scene-entity-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
- package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/sketching-line.d.ts +1 -1
- package/dist/domain/system-components/sketching-line.js +1 -1
- package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
- package/dist/domain/system-components/sketching-rectangle.js +1 -1
- package/dist/domain/system-components/sketching.d.ts +1 -1
- package/dist/domain/system-components/sketching.js +1 -1
- package/dist/domain/system-components/snap-axis.d.ts +1 -1
- package/dist/domain/system-components/snap-axis.js +1 -1
- package/dist/domain/system-components/snap-edge.d.ts +1 -1
- package/dist/domain/system-components/snap-edge.js +1 -1
- package/dist/domain/system-components/snap-plane.d.ts +1 -1
- package/dist/domain/system-components/snap-plane.js +1 -1
- package/dist/domain/system-components/snap-point.d.ts +1 -1
- package/dist/domain/system-components/snap-point.js +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.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.d.ts +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/utils/eval-cache.d.ts +2 -3
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -4
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +8 -8
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
- package/dist/editor/variants/VariantAnswerFooter.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
- package/dist/editor/variants/variant-preview-styles.js +1 -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 +30 -16
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +7 -6
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/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 +1 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init.d.ts +4 -4
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/variants.d.ts +35 -0
- package/dist/phoenix/commands/variants.js +1 -0
- package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
- package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/protocol.d.ts +1 -0
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +3 -0
- package/dist/phoenix/scripts/build-admin.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/index.d.ts +4 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-application.d.ts +21 -0
- package/dist/phoenix/services/phoenix-application.js +1 -0
- package/dist/phoenix/services/phoenix-store.d.ts +48 -0
- package/dist/phoenix/services/phoenix-store.js +1 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/variant-file-session.d.ts +36 -0
- package/dist/phoenix/services/variant-file-session.js +1 -0
- package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
- package/dist/phoenix/services/variant-preview-service.js +1 -0
- 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 +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
- package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
- 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 +57 -40
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +9 -9
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/common.d.ts +8 -0
- package/dist/webhook/builders/webhook-builder.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +3 -3
- package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
- package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-example.js +0 -90
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
- package/dist/domain/actions/action-factory.d.ts +0 -10
- package/dist/domain/actions/prepare-action-implementations.js +0 -5
- 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 -13
- 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/components/debug-state-component.js +0 -1
- package/dist/domain/components/domain-component-optic.d.ts +0 -76
- package/dist/domain/components/domain-component-optic.js +0 -16
- package/dist/domain/components/drag-state-component.js +0 -1
- package/dist/domain/components/export-state-component.js +0 -1
- package/dist/domain/components/fullscreen-state-component.js +0 -1
- package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
- package/dist/domain/components/hover-state-component.js +0 -1
- package/dist/domain/components/index.d.ts +0 -2
- package/dist/domain/components/index.js +0 -1
- package/dist/domain/components/navigation-state-component.js +0 -1
- package/dist/domain/components/selection-state-component.js +0 -1
- package/dist/domain/components/system-component-builder.js +0 -1
- package/dist/domain/components/system-virtual-entity.js +0 -1
- package/dist/domain/components/tool-state-component.js +0 -1
- package/dist/domain/components/view-state-component.js +0 -1
- package/dist/domain/components/viewport-state-component.js +0 -1
- package/dist/domain/core/expression.d.ts +0 -50
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/migrations.js +0 -1
- package/dist/domain/core/reflection.js +0 -1
- package/dist/domain/domain-context/recipe-system/recipes.d.ts +0 -57
- package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
- package/dist/domain/expressions/constant-expressions.d.ts +0 -9
- package/dist/domain/expressions/constant-expressions.js +0 -1
- package/dist/domain/expressions/custom-expression.d.ts +0 -13
- package/dist/domain/expressions/custom-expression.js +0 -1
- package/dist/domain/expressions/index.d.ts +0 -1
- package/dist/domain/expressions/index.js +0 -1
- package/dist/domain/invariants/custom-invariants.d.ts +0 -22
- package/dist/domain/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.d.ts +0 -68
- package/dist/domain/invariants/invariants.js +0 -1
- package/dist/domain/invariants/violation-component.js +0 -1
- package/dist/domain/relations/all-of-type-relation.d.ts +0 -33
- package/dist/domain/relations/all-of-type-relation.js +0 -1
- package/dist/domain/relations/component-factories.js +0 -1
- package/dist/domain/relations/composed-of.js +0 -1
- package/dist/domain/relations/direct-relation.d.ts +0 -29
- package/dist/domain/relations/indirect-relation.d.ts +0 -81
- package/dist/domain/relations/indirect-relation.js +0 -1
- package/dist/domain/relations/reference-component.js +0 -1
- package/dist/domain/relations/relation-factory.d.ts +0 -19
- package/dist/domain/relations/relation-factory.js +0 -1
- package/dist/domain/relations/relation-implementation.d.ts +0 -8
- package/dist/domain/system-components/angle-indicator.js +0 -1
- package/dist/domain/system-components/attribute-switch.js +0 -1
- package/dist/domain/system-components/autorotate-camera-component.js +0 -1
- package/dist/domain/system-components/basic-sidebar-footer.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity-object.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity.js +0 -1
- package/dist/domain/system-components/canvas-config.js +0 -1
- package/dist/domain/system-components/canvas-custom-environment.js +0 -1
- package/dist/domain/system-components/canvas-padding.js +0 -1
- package/dist/domain/system-components/canvas-preset-environment.js +0 -1
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/client-side-image.js +0 -1
- package/dist/domain/system-components/color-value.js +0 -1
- package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
- package/dist/domain/system-components/common/dimension-indicator-schema.js +0 -1
- package/dist/domain/system-components/custom-price-footer.js +0 -1
- package/dist/domain/system-components/dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-angle-indicator.js +0 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-offset-indicator.js +0 -1
- package/dist/domain/system-components/editable-size-indicator.js +0 -1
- package/dist/domain/system-components/entity-header.js +0 -1
- package/dist/domain/system-components/exit-tool-mode-fab.js +0 -1
- package/dist/domain/system-components/finalize-action.js +0 -1
- package/dist/domain/system-components/finalize-component.js +0 -1
- package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +0 -1
- package/dist/domain/system-components/fit-selection-perspective-camera-component.js +0 -1
- package/dist/domain/system-components/fixed-header.js +0 -1
- package/dist/domain/system-components/floating-header.js +0 -1
- package/dist/domain/system-components/hidden-header.js +0 -1
- package/dist/domain/system-components/hidden-sidebar-footer.js +0 -1
- package/dist/domain/system-components/horizontal-tabs.js +0 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
- package/dist/domain/system-components/multilingual-text-value.js +0 -1
- package/dist/domain/system-components/navigation-steps.js +0 -1
- package/dist/domain/system-components/offset-anchors.js +0 -1
- package/dist/domain/system-components/offset-indicator.js +0 -1
- package/dist/domain/system-components/offset.js +0 -1
- package/dist/domain/system-components/other-action.js +0 -1
- package/dist/domain/system-components/property-page.js +0 -1
- package/dist/domain/system-components/read-sidebar-footer.js +0 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/rotatable.js +0 -1
- package/dist/domain/system-components/rotation-handle.js +0 -1
- package/dist/domain/system-components/save-template-thumbnail.js +0 -1
- package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-animation.js +0 -1
- package/dist/domain/system-components/scene-entity-control.js +0 -1
- package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-floor-object.js +0 -1
- package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-wall-object.js +0 -1
- package/dist/domain/system-components/selectable-component.js +0 -1
- package/dist/domain/system-components/sidebar-tabs.js +0 -1
- package/dist/domain/system-components/simple-summary.js +0 -1
- package/dist/domain/system-components/size.js +0 -1
- package/dist/domain/system-components/sketching-draw.js +0 -1
- package/dist/domain/system-components/sketching-edit.js +0 -1
- package/dist/domain/system-components/summary-component.js +0 -1
- package/dist/domain/system-components/text-value.js +0 -1
- package/dist/domain/system-components/tool-controls.js +0 -1
- package/dist/domain/system-components/tool-menu-fab.js +0 -1
- package/dist/domain/system-components/universal-sidebar-footer.js +0 -1
- package/dist/domain/system-components/view-controls.js +0 -1
- package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +0 -12
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
- /package/dist/domain/{components/component-reader-types.js → application/assistant/assistant-manifest.js} +0 -0
- /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
- /package/dist/domain/core/{action.js → action/action.js} +0 -0
- /package/dist/domain/core/{enhanced-json-schema.js → component/component-reader-types.js} +0 -0
- /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
- /package/dist/domain/{components → core/component}/updates.js +0 -0
- /package/dist/domain/core/{expression.js → data-schema/data-cell-value.js} +0 -0
- /package/dist/domain/core/{schema-validator.js → data-schema/data-schema-array-field.js} +0 -0
- /package/dist/domain/{relations/reference-field.js → core/data-schema/data-schema-field-object.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-field.js} +0 -0
- /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
- /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
- /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
- /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
- /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
- /package/dist/domain/core/{component.js → model/component.js} +0 -0
- /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
- /package/dist/domain/core/{model.js → model/model.js} +0 -0
- /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
- /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
- /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
- /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
- /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
- /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
- /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{state.js → state/state.js} +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.js +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
- /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/client-side-image.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
- /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/navigation-steps.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{withProfilerLabel as t}from"../../utils/profiler-label.js";export const createCustomInvariantFactory=()=>e=>r=>{let n={};return Object.entries(r).forEach(([r,o])=>{let a=Object.entries(o).map(([n,o])=>({evaluate:t(`${r}_invariant_${n}`,(t,a,i)=>{let l=o(i.domain.get$Entity(t,a),a,i);if("boolean"==typeof l){let t=e[r]?.[n];if(!t)throw Error(`Cannot find statically defined violation for ${r}.${n}`);return l?[]:[t]}return l})}));n[r]=a}),n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./builtin-invariant.js";export*from"./custom-invariants.js";export*from"./violation-component.js";export*from"./violation.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OpenExpressionContext } from '../expression/index.js';
|
|
2
|
+
import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
|
|
3
|
+
import type { DomainState } from '../state/index.js';
|
|
4
|
+
import { type Violation } from './violation.js';
|
|
5
|
+
export interface Invariant<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, VIOLATION_TYPE extends string, CONTEXT_EXTENSION = unknown> {
|
|
6
|
+
evaluate(selfId: ENTITY['id'], state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>): ReadonlyArray<Violation<VIOLATION_TYPE>>;
|
|
7
|
+
}
|
|
8
|
+
export type AliasedInvariants<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, VIOLATION_TYPES extends string> = {
|
|
9
|
+
[K in TypeOrAlias<ENTITIES, ALIASES>]?: ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, VIOLATION_TYPES>>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SystemComponentBuilder as o}from"../component/index.js";import{ViolationSchema as t}from"./violation.js";export const violationsComponent=o.component("violations").withState({tsType:"ViolationComponentState",type:"object",properties:{violations:{type:"array",items:t}},required:["violations"],additionalProperties:!1}).build();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { I18n } from '@lingui/core';
|
|
2
2
|
import type { Localizable } from '@salsita-ai/common/utils';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { StateEmission } from '../emission/index.js';
|
|
4
|
+
import type { $DomainEntity, DomainEntity, EntityId } from '../model/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* An **ORDERED** list of violation severities.
|
|
7
7
|
* Do not change the order of the items in this list.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { PhxValidateFunction } from '../schema/index.js';
|
|
2
3
|
import type { EntityId } from './model.js';
|
|
3
|
-
import type { PhxValidateFunction } from './schema-validator.js';
|
|
4
4
|
/**
|
|
5
5
|
* Definition of how the component looks like, it's name, state and other properties. It is used to instantiate components.
|
|
6
6
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./alias.js";export*from"./common-definitions.js";export*from"./component.js";export*from"./model.js";export*from"./preset.js";export*from"./reflection.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
+
import { type PhxValidateFunction } from '../schema/index.js';
|
|
2
3
|
import { type $DomainEntity, type DomainEntity, type EntityByType, type EntityId } from './model.js';
|
|
3
|
-
import type { PhxValidateFunction } from './schema-validator.js';
|
|
4
4
|
type RequiredKeys<T> = {
|
|
5
5
|
[K in keyof T]: undefined extends T[K] ? never : K;
|
|
6
6
|
}[keyof T];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{extendedSchemaValidator as t}from"../schema/index.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './recipes.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./recipes.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type AnyAliasMap, type DomainEntity, type DomainEntityReflection, type EntityByType } from '../model/index.js';
|
|
2
|
+
/** The entity a recipe yields: a whole entity, which the recipe system gives a new id when it cooks the recipe. */
|
|
3
|
+
export type EntityRecipe<ENTITY extends DomainEntity<string>> = ENTITY;
|
|
4
|
+
/** What a project passes to its recipe factory: the entity type, and the properties that differ from the defaults. */
|
|
5
|
+
export type EntityOverrides<ENTITIES extends DomainEntity<string>, TYPE extends ENTITIES['type']> = Partial<Omit<EntityByType<ENTITIES, TYPE>, 'type'>> & {
|
|
6
|
+
type: TYPE;
|
|
7
|
+
};
|
|
8
|
+
/** The function a project creates recipes with, `phx.domain.createRecipe`. */
|
|
9
|
+
export type RecipeFactory<ENTITIES extends DomainEntity<string>> = <TYPE extends ENTITIES['type']>(overrides: EntityOverrides<ENTITIES, TYPE>) => EntityRecipe<EntityByType<ENTITIES, TYPE>>;
|
|
10
|
+
/**
|
|
11
|
+
* Creates the recipe factory of a domain from the `defaults` of its spec.
|
|
12
|
+
*
|
|
13
|
+
* Defaults declared for an alias apply to every entity type of the alias, and a later key overrides
|
|
14
|
+
* an earlier one. The defaults of an entity type must be a whole entity of that type: they are
|
|
15
|
+
* validated here against the entity's schema, so a domain with invalid defaults fails when its
|
|
16
|
+
* module loads. An entity type without defaults is not checked.
|
|
17
|
+
*
|
|
18
|
+
* `ENTITIES` is the only type the result depends on, and no argument determines it, so the caller
|
|
19
|
+
* states it.
|
|
20
|
+
*
|
|
21
|
+
* @param defaults Property values by entity type or alias.
|
|
22
|
+
*/
|
|
23
|
+
export declare const createRecipeFactory: <ENTITIES extends DomainEntity<string>>(aliasMap: AnyAliasMap, entityReflections: ReadonlyArray<ENTITIES extends unknown ? DomainEntityReflection<ENTITIES> : never>, defaults: Readonly<Record<string, Readonly<Record<string, unknown>>>>) => RecipeFactory<ENTITIES>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_unsafeBuildDomainEntityId as e,expandAlias as r}from"../model/index.js";export const createRecipeFactory=(t,o,i)=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(e=>{a[e]={...a[e],...o}})});let n=new Map(o.map(e=>[e.type,e._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=n.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),r=>({id:e(r.type,1),...a[r.type],...r})};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExpressionMeta } from '../expression/index.js';
|
|
2
|
+
import { type AnyAliasMap, type DomainEntity, type DomainEntityId } from '../model/index.js';
|
|
3
|
+
import type { DomainState } from '../state/index.js';
|
|
4
|
+
/** A relation whose related entities are all entities of the target type or alias. */
|
|
5
|
+
export interface AllOfTypeRelation {
|
|
6
|
+
kind: 'allOfType';
|
|
7
|
+
target: string;
|
|
8
|
+
cardinality: '0-1' | '1-1' | '0-N' | '1-N';
|
|
9
|
+
meta?: ExpressionMeta;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolves `allOfType` relations from a per-state index. Relations targeting the same set of types
|
|
13
|
+
* share one bucket; the first resolution on a state walks the entities once to fill every bucket,
|
|
14
|
+
* and every later resolution on that state is a lookup. Registration closes once the first state
|
|
15
|
+
* has been indexed, so a bucket can never be missing from an index that was already built.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createAllOfTypeRelation: (aliasMap: AnyAliasMap) => (relation: {
|
|
18
|
+
readonly target: string;
|
|
19
|
+
}) => (_selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>) => DomainEntityId<string>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{expandAlias as e}from"../model/index.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${o.target} after evaluation started. Create all relation expressions before evaluating the domain state.`);let l=new Set(e(t,o.target)),i=[...l].sort().join("|");return r.set(i,l),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(i)}};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { DomainEntity, DomainEntityId } from '../
|
|
2
|
-
import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
|
|
1
|
+
import type { DomainEntity, DomainEntityId, DomainEntityReflection, RawAliasReflection } from '../model/index.js';
|
|
3
2
|
import type { ComposedOfComponentState } from './composed-of.js';
|
|
4
3
|
import type { ReferenceComponentState } from './reference-component.js';
|
|
5
4
|
export declare const createSingleReferenceRead: <TARGET extends DomainEntity<string>>(_targetReflection: DomainEntityReflection<TARGET> | RawAliasReflection<TARGET>, field: string) => (self: object, state: unknown, ctx: unknown) => ReferenceComponentState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{memoEval as e}from"../../utils/memo-eval.js";export const createSingleReferenceRead=(t,r)=>e(e=>[e[r]],e=>({referencedEntityIds:null===e?[]:[e]}));export const createSingleReferenceWrite=(e,t)=>r=>{let n=r.referencedEntityIds[0];return n&&e.assertId(n),{[t]:n??null}};export const createMultipleReferenceRead=(t,r)=>e(e=>[e[r]],e=>({referencedEntityIds:e}));export const createMultipleReferenceWrite=(e,t)=>r=>(e.assertIds(r.referencedEntityIds),{[t]:r.referencedEntityIds});export const createSingleCompositionRead=t=>e(e=>[e[t]?.id??null],e=>({childEntityIds:null===e?[]:[e]}));export const createMultipleCompositionRead=t=>e(e=>e[t].map(e=>e.id),(...e)=>({childEntityIds:e}));export const createEmptyWrite=()=>()=>({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SystemComponentBuilder as o}from"../component/index.js";import{EntityIdSchema as t}from"../model/index.js";export const composedOfComponent=o.component("composedOf").withState({type:"object",properties:{childEntityIds:{type:"array",items:t}},required:["childEntityIds"],additionalProperties:!1}).build();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AnyDomain } from '../domain.js';
|
|
2
|
+
import type { ExpressionMeta } from '../expression/index.js';
|
|
3
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
4
|
+
import type { DomainState } from '../state/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* A relation whose related entities are the ones a field of the entity itself references. The
|
|
7
|
+
* application-spec parser checks that `field` is a reference field of the entity that fits the
|
|
8
|
+
* target and the cardinality.
|
|
9
|
+
*/
|
|
10
|
+
export interface DirectRelation {
|
|
11
|
+
kind: 'direct';
|
|
12
|
+
target: string;
|
|
13
|
+
field: string;
|
|
14
|
+
cardinality: '0-1' | '1-1' | '0-N' | '1-N';
|
|
15
|
+
meta?: ExpressionMeta;
|
|
16
|
+
}
|
|
17
|
+
export declare const directRelation: (relation: DirectRelation) => (selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>, domain: AnyDomain) => Array<DomainEntityId<string>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './all-of-type-relation.js';
|
|
2
|
+
export * from './component-factories.js';
|
|
3
|
+
export * from './composed-of.js';
|
|
4
|
+
export * from './direct-relation.js';
|
|
5
|
+
export * from './indirect-relation.js';
|
|
6
|
+
export * from './reference-component.js';
|
|
7
|
+
export type * from './reference-field.js';
|
|
8
|
+
export * from './relation-factory.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./all-of-type-relation.js";export*from"./component-factories.js";export*from"./composed-of.js";export*from"./direct-relation.js";export*from"./indirect-relation.js";export*from"./reference-component.js";export*from"./relation-factory.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ExpressionMeta } from '../expression/index.js';
|
|
2
|
+
import { type AnyAliasMap, type DomainEntity, type DomainEntityId } from '../model/index.js';
|
|
3
|
+
import type { DomainState } from '../state/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* A relation whose related entities are the ones that reference the entity in their `field`. The
|
|
6
|
+
* application-spec parser checks that `field` is a reference field of the target that points back.
|
|
7
|
+
*/
|
|
8
|
+
export interface IndirectRelation {
|
|
9
|
+
kind: 'indirect';
|
|
10
|
+
target: string;
|
|
11
|
+
field: string;
|
|
12
|
+
cardinality: '0-1' | '1-1' | '0-N' | '1-N';
|
|
13
|
+
meta?: ExpressionMeta;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolves `indirect` relations from a per-state reverse-reference index. Relations reading the
|
|
17
|
+
* same field on the same set of target types share one index mapping each referenced id to the
|
|
18
|
+
* entities that reference it; the first resolution on a state walks the entities once to fill
|
|
19
|
+
* every index, and every later resolution on that state is a lookup. Registration closes once the
|
|
20
|
+
* first state has been indexed, so an index can never be missing from a state already walked.
|
|
21
|
+
*/
|
|
22
|
+
export declare const createIndirectRelation: (aliasMap: AnyAliasMap) => (relation: {
|
|
23
|
+
readonly target: string;
|
|
24
|
+
readonly field: string;
|
|
25
|
+
}) => (sourceId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>) => DomainEntityId<string>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../model/index.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let n=new Map,o=new WeakMap,a=!1;return l=>{if(a)throw Error(`Cannot register indirect relation ${l.target}#${l.field} after evaluation started. Create all relation expressions before evaluating the domain state.`);let s=new Set(t(i,l.target)),f=`${l.field}|${[...s].sort().join("|")}`;return n.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=o.get(t);if(i)return i;a=!0;let l=new Map([...n.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:o,targetTypes:a}]of n){if(!a.has(i.type))continue;let n=i[o],s=e(n)?new Set(n.filter(r)):r(n)?[n]:[],f=l.get(t);for(let e of s){let t=f.get(e);t||(t=[],f.set(e,t)),t.push(i.id)}}return o.set(t,l),l})(i).get(f).get(t)??[]}};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
|
|
1
|
+
import { type DomainComponentOpticBuilder } from '../component/index.js';
|
|
2
|
+
import { type $DomainEntity, type DomainEntity, type DomainEntityId, type DomainEntityReflection, type RawAliasReflection } from '../model/index.js';
|
|
4
3
|
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
5
4
|
export type ReferenceComponentState = {
|
|
6
5
|
/**
|
|
@@ -14,5 +13,5 @@ export type ReferenceComponentState = {
|
|
|
14
13
|
*/
|
|
15
14
|
export declare const referenceComponent: import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">;
|
|
16
15
|
export type ReferenceComponent = typeof referenceComponent;
|
|
17
|
-
export declare const attachSingleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: SingleReferenceField<ENTITY, TARGET_ENTITY, any>) => import("../
|
|
18
|
-
export declare const attachMultipleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: ArrayReferenceField<ENTITY, TARGET_ENTITY>) => import("../
|
|
16
|
+
export declare const attachSingleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES, CONTEXT_EXTENSION = unknown>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent, CONTEXT_EXTENSION>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: SingleReferenceField<ENTITY, TARGET_ENTITY, any>) => import("../index.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">, CONTEXT_EXTENSION>;
|
|
17
|
+
export declare const attachMultipleReferenceComponent: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITY>, TARGET_ENTITY extends ENTITIES, CONTEXT_EXTENSION = unknown>(attachComponent: DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, typeof referenceComponent, CONTEXT_EXTENSION>, targetReflection: DomainEntityReflection<TARGET_ENTITY> | RawAliasReflection<TARGET_ENTITY>, field: ArrayReferenceField<ENTITY, TARGET_ENTITY>) => import("../index.js").DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, import("../index.js").SystemComponentType<"reference", ReferenceComponentState, "referencedEntityIds">, CONTEXT_EXTENSION>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{memoEval as e}from"../../utils/memo-eval.js";import{SystemComponentBuilder as t}from"../component/index.js";import{EntityIdSchema as r}from"../model/index.js";export const referenceComponent=t.component("reference").withState({type:"object",properties:{referencedEntityIds:{type:"array",items:r}},required:["referencedEntityIds"],additionalProperties:!1}).withWritableKeys(["referencedEntityIds"]).build();export const attachSingleReferenceComponent=(t,r,n)=>t.attach(e(e=>[e[n]],e=>({referencedEntityIds:null===e?[]:[e]})),e=>{let t=e.referencedEntityIds[0];return t&&r.assertId(t),{[n]:t??null}});export const attachMultipleReferenceComponent=(t,r,n)=>t.attach(e(e=>[e[n]],e=>({referencedEntityIds:e})),e=>(r.assertIds(e.referencedEntityIds),{[n]:e.referencedEntityIds}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DomainEntity } from '../
|
|
1
|
+
import type { DomainEntity } from '../model/index.js';
|
|
2
2
|
export type SingleReferenceField<FROM extends DomainEntity<string>, TO extends DomainEntity<string>, OPTIONALITY extends null | never> = {
|
|
3
3
|
[K in keyof FROM]: TO['id'] | OPTIONALITY extends FROM[K] ? FROM[K] extends TO['id'] | OPTIONALITY ? K & string : never : never;
|
|
4
4
|
}[keyof FROM];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AnonymousExpression } from '../expression/index.js';
|
|
2
|
+
import { type $DomainEntity, type AnyAliasMap, type DomainEntity } from '../model/index.js';
|
|
3
|
+
import { type AllOfTypeRelation } from './all-of-type-relation.js';
|
|
4
|
+
import { type DirectRelation } from './direct-relation.js';
|
|
5
|
+
import { type IndirectRelation } from './indirect-relation.js';
|
|
6
|
+
/** A relation as a spec declares it: where the related entities are found and how many there may be. */
|
|
7
|
+
export type Relation = DirectRelation | AllOfTypeRelation | IndirectRelation;
|
|
8
|
+
type RelatedEntity = $DomainEntity<DomainEntity<string>>;
|
|
9
|
+
/**
|
|
10
|
+
* The expression of a relation as a domain takes it. The entity and data types are erased, so that
|
|
11
|
+
* the domain of any project accepts it: an expression typed with the base entity type is not
|
|
12
|
+
* assignable to one typed with a project's entities. The type a project reads from a relation is
|
|
13
|
+
* the one its generated model declares for the relation's property.
|
|
14
|
+
*/
|
|
15
|
+
type RelationExpression = AnonymousExpression<any, any, any, any, any, any, RelatedEntity | null | ReadonlyArray<RelatedEntity>>;
|
|
16
|
+
/**
|
|
17
|
+
* Makes the expression of one relation: it collects the related entities of an entity and returns
|
|
18
|
+
* them as the cardinality says, one entity, one entity or `null`, or an array.
|
|
19
|
+
*/
|
|
20
|
+
export type RelationFactory = (relation: Relation) => RelationExpression;
|
|
21
|
+
export declare const createRelationFactory: (aliasMap: AnyAliasMap) => RelationFactory;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{match as t}from"ts-pattern";import{expandAlias as e}from"../model/index.js";import{createAllOfTypeRelation as r}from"./all-of-type-relation.js";import{directRelation as i}from"./direct-relation.js";import{createIndirectRelation as n}from"./indirect-relation.js";export const createRelationFactory=o=>{let a=r(o),l=n(o);return r=>{let n=t(r).with({kind:"direct"},t=>i(t)).with({kind:"indirect"},t=>l(t)).with({kind:"allOfType"},t=>a(t)).exhaustive(),d=t(r).with({cardinality:"0-1"},()=>t=>{if(t.length>1)throw Error(`Expected at most one entity, but got ${t.length}`);return t[0]??null}).with({cardinality:"1-1"},()=>t=>{let[e,...r]=t;if(void 0===e||r.length>0)throw Error(`Expected exactly one entity, but got ${t.length}`);return e}).with({cardinality:"0-N"},()=>t=>t).with({cardinality:"1-N"},()=>t=>{if(0===t.length)throw Error("Expected at least one entity, but got none");return t}).exhaustive(),c=e(o,r.target);return{meta:{alwaysEvaluate:!0,...r.meta},evaluate:(t,e,i)=>{let o=n(t,e,i.domain),a=i.domain.get$Entities(o,e);if(!a.every(t=>c.includes(t.type))){let t=a.map(t=>t.type).filter(t=>!c.includes(t));throw Error(`Expected ${r.target} entities, but got ${t.join(", ")}`)}return d(a)}}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=t();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { EnhancedJsonObjectSchemaType, EnhancedJsonSchemaType, JsonSchemaType, MemberImport, } from './enhanced-json-schema.js';
|
|
2
|
+
export { extendedSchemaValidator, getExtendedSchemaValidator } from './extended-schema-validator.js';
|
|
3
|
+
export type { PhxValidateFunction, PhxValidationError, SchemaValidator } from './schema-validator.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{extendedSchemaValidator,getExtendedSchemaValidator}from"./extended-schema-validator.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Hands out the ids of entities that are about to be created, one sequence per entity type. An
|
|
4
|
+
* action or a transformer asks it for an id instead of computing one from the state.
|
|
5
|
+
*/
|
|
6
|
+
export type IdSequence<ENTITIES extends DomainEntity<string>> = {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the next available entity ID for the given type.
|
|
9
|
+
* This automatically increments the sequence number for the given type, so that the next call will return a new ID.
|
|
10
|
+
*
|
|
11
|
+
* @param type the entity type
|
|
12
|
+
* @returns a new domain entity ID for the given type
|
|
13
|
+
*/
|
|
14
|
+
nextId: <TYPE extends ENTITIES['type']>(type: TYPE) => DomainEntityId<TYPE>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./migrations.js";export*from"./state.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Logger } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { DomainEntity } from '
|
|
3
|
-
import type { EntityReflections } from './reflection.js';
|
|
2
|
+
import type { DomainEntity, EntityReflections } from '../model/index.js';
|
|
4
3
|
/**
|
|
5
4
|
* Thrown when domain state cannot be validated/migrated to the latest model
|
|
6
5
|
* version: an entity is invalid against its schema, an entity type or model
|
|
@@ -49,51 +48,20 @@ export type MigrateFunction<LATEST_ENTITIES extends DomainEntity<string>> = (ver
|
|
|
49
48
|
state: ReadonlyArray<DomainEntity<string>>;
|
|
50
49
|
}, options: MigrateFunctionOptions) => readonly LATEST_ENTITIES[];
|
|
51
50
|
/**
|
|
52
|
-
*
|
|
51
|
+
* Creates the function that migrates a state of any registered version of the model to the latest
|
|
52
|
+
* one. The state is validated against the reflections of its own version, and again after every
|
|
53
|
+
* migration against the reflections of the version that migration yields.
|
|
54
|
+
*
|
|
55
|
+
* @param modelVersions the entity reflections of every version of the model, keyed by version
|
|
56
|
+
* @param latestVersion the version the state is migrated to
|
|
57
|
+
* @param migrations the migration to each version above the first: the one under key `n` takes a
|
|
58
|
+
* state of version `n - 1` to version `n`
|
|
53
59
|
* @example
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
1: v1Reflections,
|
|
60
|
-
2: v2Reflections,
|
|
61
|
-
3: v3Reflections,
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
// the latest version of the model
|
|
65
|
-
.to(2)
|
|
66
|
-
|
|
67
|
-
// the migrations between the versions
|
|
68
|
-
.using({
|
|
69
|
-
2: migrationToV2,
|
|
70
|
-
3: migrationToV3,
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
.build()
|
|
74
|
-
|
|
60
|
+
* export const migrate = createMigrateFunction(
|
|
61
|
+
* { 1: v1Reflections, 2: v2Reflections, 3: v3Reflections },
|
|
62
|
+
* 3,
|
|
63
|
+
* { 2: migrationToV2, 3: migrationToV3 }
|
|
64
|
+
* )
|
|
75
65
|
*/
|
|
76
|
-
export declare const
|
|
77
|
-
/**
|
|
78
|
-
* Provide the entity reflections for all versions of the model.
|
|
79
|
-
*/
|
|
80
|
-
fromVersions: <VERSIONS extends Record<number, EntityReflections<any>>>(modelVersions: VERSIONS) => {
|
|
81
|
-
/**
|
|
82
|
-
* Specify the latest version of the model. I.e. the version to which the state will be migrated.
|
|
83
|
-
*/
|
|
84
|
-
to: <LATEST extends keyof VERSIONS & number>(latestVersion: LATEST) => {
|
|
85
|
-
/**
|
|
86
|
-
* Provide the migrations between each consecutive version of the model.
|
|
87
|
-
*
|
|
88
|
-
* Migration with index `i` should migrate the state from version `i - 1` to version `i`.
|
|
89
|
-
*/
|
|
90
|
-
using: (migrations: Record<Exclude<keyof VERSIONS, 1>, Migration<any, any>>) => {
|
|
91
|
-
/**
|
|
92
|
-
* Finally, build the migration function.
|
|
93
|
-
*/
|
|
94
|
-
build: () => MigrateFunction<EntitiesOfReflections<VERSIONS[LATEST]>>;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
66
|
+
export declare const createMigrateFunction: <VERSIONS extends Record<number, EntityReflections<any>>, LATEST extends keyof VERSIONS & number>(modelVersions: VERSIONS, latestVersion: LATEST, migrations: Record<Exclude<keyof VERSIONS, 1>, Migration<any, any>>) => MigrateFunction<EntitiesOfReflections<VERSIONS[LATEST]>>;
|
|
99
67
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"lodash-es/pick.js";export class StateMigrationError extends Error{constructor(t){super(t),this.name="StateMigrationError"}}export const isStateMigrationError=t=>t instanceof StateMigrationError;let e=(e,r,i,o)=>e.map(e=>{let n=r[e.type];if(!n)throw new StateMigrationError(`Unknown entity type "${e.type}". The state contains an entity whose type is not registered in the domain model for this version. Fix: register the entity type in the domain spec, or remove/migrate the stale entity from the preset or configuration data.`);if(n._meta.validator(e))return e;if(i){let r=t(e,Object.keys(n._meta.schema.properties));if(n._meta.validator(e))return o?.error(`Entity ${e.type}#${e.id} had extra fields that had to be trimmed: ${Object.keys(r)}`),r}throw new StateMigrationError(`Entity "${e.type}#${e.id}" does not match its schema in the current domain model. Validation errors: ${JSON.stringify(n._meta.validator.errors)}. Fix: update the entity data to match the schema, add a migration that transforms older data into the current shape, or re-register the schema if it changed.`)});export const createMigrateFunction=(t,r,i)=>(o,{logger:n,trimExtraProperties:a})=>{let s=t[o.version];if(!s)throw new StateMigrationError(`Unknown model version ${o.version}. The state declares a version that has no registered reflections. Fix: register the version in the model versions passed to createMigrateFunction, or correct the version stored on the state.`);let d=e(o.state,s,a,n);o.version===r?n?.debug(`State is already in the latest version ${r}`):n?.debug(`Migrating state from version ${o.version} to ${r}`);for(let s=o.version;s<r;s++){n?.debug(`Applying intermediate migration to version ${s+1}`);let h=t[s+1];if(!h)throw new StateMigrationError(`Unknown model version ${s+1} while migrating from ${o.version} to ${r}. An intermediate version has no registered reflections. Fix: register version ${s+1} in the model versions passed to createMigrateFunction.`);let g=i[s+1];if(!g)throw new StateMigrationError(`Missing migration from version ${s} to ${s+1}. No migration is registered for this step while migrating to ${r}. Fix: add the migration under key ${s+1} in the migrations passed to createMigrateFunction.`);d=e(g(d),h,a,n)}return d};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ComponentSnapshot, SystemComponentTypeConstraint } from '
|
|
2
|
-
import type { DomainEntity } from './model.js';
|
|
1
|
+
import type { ComponentSnapshot, DomainEntity, SystemComponentTypeConstraint } from '../model/index.js';
|
|
3
2
|
export interface DomainState<ENTITIES extends DomainEntity<string>> {
|
|
4
3
|
readonly rootEntityId: ENTITIES['id'];
|
|
5
4
|
readonly rootEntityType: ENTITIES['type'];
|
|
@@ -7,4 +6,4 @@ export interface DomainState<ENTITIES extends DomainEntity<string>> {
|
|
|
7
6
|
readonly ephemeralRecords: ReadonlyArray<ComponentSnapshot<SystemComponentTypeConstraint>>;
|
|
8
7
|
}
|
|
9
8
|
export type DomainStateFactory<ENTITIES extends DomainEntity<string>> = (entities: readonly ENTITIES[], ephemeralRecords: ReadonlyArray<ComponentSnapshot<SystemComponentTypeConstraint>>, rootEntityType: ENTITIES['type']) => DomainState<ENTITIES>;
|
|
10
|
-
export declare const createInitialDomainState: <ENTITIES extends DomainEntity<string
|
|
9
|
+
export declare const createInitialDomainState: <ENTITIES extends DomainEntity<string>>(entities: readonly ENTITIES[], rootEntityType: ENTITIES['type']) => DomainState<ENTITIES>;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
-
import type
|
|
3
|
-
import { type
|
|
4
|
-
import type { AnonymousExpression } from './core/expression.js';
|
|
5
|
-
import { DomainFactory } from './core/index.js';
|
|
6
|
-
import { type MigrateFunction } from './core/migrations.js';
|
|
7
|
-
import { type $DomainEntity, type DomainEntity, type EntityByType } from './core/model.js';
|
|
8
|
-
import type { $DomainEntityReflection, EntityReflections, SchemaOfObject } from './core/reflection.js';
|
|
9
|
-
export type AliasedExpressions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>> = {
|
|
10
|
-
[K in TypeOrAlias<ENTITIES, ALIASES>]?: Record<string, AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, unknown>>;
|
|
11
|
-
};
|
|
2
|
+
import { type $DomainEntity, type $DomainEntityReflection, type ActionDefinition, type AliasMap, type AliasedExpressions, type AnyActionImplementations, type DomainEntity, DomainFactory, type EntityByType, type EntityReflections, type MigrateFunction, type SchemaOfObject } from './core/index.js';
|
|
3
|
+
import { type ProjectModule } from './domain-runtime/index.js';
|
|
12
4
|
type $EntityReflections<ENTITIES extends DomainEntity<string>> = {
|
|
13
5
|
[TYPE in ENTITIES['type']]: $DomainEntityReflection<$DomainEntity<EntityByType<ENTITIES, TYPE>>>;
|
|
14
6
|
};
|
|
@@ -31,9 +23,17 @@ export declare class DomainBuilder<ENTITIES extends DomainEntity<string>, ALLOWE
|
|
|
31
23
|
static from<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Readonly<Record<string, ENTITIES>>>(entities: EntityReflections<ENTITIES>, aliasMap: AliasMap<ALIASES>, $entityReflections: $EntityReflections<ENTITIES>, allowedRootEntityTypes: ReadonlyArray<ALLOWED_ROOT_ENTITIES['type']>, modelVersion: number, publishedData: SchemaOfObject<PUBLISHED_DATA>, sessionData: SchemaOfObject<SESSION_DATA>, frontendData: SchemaOfObject<FRONTEND_DATA>, backendData: ExtendedJsonSchema | undefined, isAdminDomain: boolean): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
32
24
|
withMigrate(migration: MigrateFunction<ENTITIES>): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
33
25
|
withExpressions(implementation: AliasedExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES>): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
26
|
+
/**
|
|
27
|
+
* Adds the expressions of the `src/expressions/` files, as the generated barrel lists them. Each file
|
|
28
|
+
* is checked against the folder's contract and added on its own, so an expression defined twice is
|
|
29
|
+
* reported with both files instead of being overwritten by file order.
|
|
30
|
+
*/
|
|
31
|
+
withExpressionModules(modules: readonly ProjectModule[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
34
32
|
/** Declares the actions of the domain, as the generated `domain-spec.ts` reads them from the spec's `actions` section. */
|
|
35
33
|
withActions(actions: readonly ActionDefinition[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
36
|
-
/** Adds the implementations of the
|
|
34
|
+
/** Adds the action implementations of the `src/actions/` files, as the generated barrel lists them, after checking each file against the folder's contract. */
|
|
35
|
+
withActionModules(modules: readonly ProjectModule[]): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
36
|
+
/** Adds the implementations of the declared actions, already merged by action name. */
|
|
37
37
|
withActionImplementations(implementations: AnyActionImplementations): DomainBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, ALIASES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
38
38
|
build: () => DomainFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>;
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DomainFactory as t,createMigrateFunction as i,expandAlias as e}from"./core/index.js";import{resolveActionModules as s,resolveExpressionModules as n}from"./domain-runtime/index.js";import{withProfilerLabel as a}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;actions;actionImplementations;constructor(t,i,e,s,n,a,o,h,l,m,r,d,p,c){this.entities=t,this.aliasMap=i,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=n,this.modelVersion=a,this.publishedData=o,this.sessionData=h,this.frontendData=l,this.backendData=m,this.migrate=r,this.isAdminDomain=d,this.actions=p,this.actionImplementations=c}static from(t,e,s,n,a,o,h,l,m,r){let d=i({1:t},1,{});return new DomainBuilder(t,e,s,n,{},a,o,h,l,m,d,r,{},{})}withMigrate(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,t,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressions(t){let i={...this.implemented};return Object.entries(t).forEach(([t,s])=>{e(this.aliasMap,t).forEach(e=>{let n={...i[e]};i[e]=n,Object.entries(s).forEach(([i,s])=>{let o=n[i];if(o)throw Error(`Duplicate expression ${e}.${i}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[i]={...s,evaluate:a(`${e}_${i}`,s.evaluate),origin:{name:i,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,i,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressionModules(t){return n(t,this.aliasMap).reduce((t,i)=>t.withExpressions(i.expressions),this)}withActions(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,Object.fromEntries(t.map(t=>[t.name,t])),this.actionImplementations)}withActionModules(t){return this.withActionImplementations(s(t))}withActionImplementations(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,{...this.actionImplementations,...t})}build=()=>{let e=this.implemented,s=this.migrate??i({1:this.entities},1,{});return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:e,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain,actions:this.actions,actionImplementations:this.actionImplementations})}}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type { DomainState } from '../../core/state.js';
|
|
4
|
-
import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
|
|
1
|
+
import { type $DomainEntity, type ActionTypes, type DomainEntity, type DomainState, type PreparedAction } from '../../core/index.js';
|
|
2
|
+
import type { ActionContext, DomainContextSelectors } from '../../domain-runtime/index.js';
|
|
5
3
|
export interface ActionSystemContext {
|
|
6
4
|
/**
|
|
7
5
|
* The action system's window into the runtime registry: the declared actions and their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e
|
|
1
|
+
import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as s}from"../../core/index.js";import{getIdSequence as n}from"../store-system/index.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,s.compile(t.params)])));_updates=e();constructor(t){this._context=t}createContext=t=>({expressionContext:this._context.selectors.getExpressionContext(),systems:this._context.selectors.getDomainSystems(),getIdSequence:()=>n(t.entities,[]),updates:this._updates});prepareAction=(t,e,n)=>{let o=this._context.selectors.getActionDefinitions(),i=Object.values(o).find(e=>e.name===t);if(!i){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(i.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${s.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._context.selectors.getActionImplementations()).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActionSystem, type ActionSystemContext, type AnyActionSystem } from './action-system.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ActionSystem}from"./action-system.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { type AnalyticsEvent, AnalyticsEventFactory, AnalyticsEventType, type DataLoadedEvent, type InitEvent, type NavigationEvent, type SessionAuthenticatedEvent, type SystemEvent, type UserActionEvent, } from './analytics-contracts.js';
|
|
2
|
+
export { type AnalyticsSystem, NoopAnalyticsSystem } from './analytics-system.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AnalyticsEventFactory,AnalyticsEventType}from"./analytics-contracts.js";export{NoopAnalyticsSystem}from"./analytics-system.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { $DomainEntity, DomainEntity } from '../core/
|
|
1
|
+
import type { $DomainEntity, DomainEntity } from '../core/index.js';
|
|
2
2
|
import type { DomainContextSystems } from './domain-context-systems.js';
|
|
3
|
-
import type { UpdateTransformer } from './store-system/
|
|
3
|
+
import type { UpdateTransformer } from './store-system/index.js';
|
|
4
4
|
export declare const createTransformer: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>(transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
|
|
5
5
|
export type TransformerFactory<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> = (transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t}from"../../
|
|
1
|
+
import{SystemComponentBuilder as t}from"../../core/index.js";import{DimensionUnitSchema as e}from"../../dimensions/index.js";export const dimensionStateComponent=t.component("dimensionStateComponent").withState({type:"object",properties:{unit:e},required:["unit"],additionalProperties:!1}).withWritableKeys(["unit"]).build();
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { DomainEntity, DomainState } from '../../core/index.js';
|
|
1
|
+
import type { DomainEntity, DomainState, EntityViolation } from '../../core/index.js';
|
|
2
2
|
import { DimensionUnit, type UnitsConfig } from '../../dimensions/index.js';
|
|
3
|
-
import type { DomainContextSelectors } from '../../domain-runtime/
|
|
4
|
-
import
|
|
5
|
-
import { SystemState } from '../store-system/system-state.js';
|
|
3
|
+
import type { DomainContextSelectors } from '../../domain-runtime/index.js';
|
|
4
|
+
import { SystemState } from '../store-system/index.js';
|
|
6
5
|
import { type DimensionStateComponent } from './dimension-state.js';
|
|
7
6
|
export type DistanceDimensionViolation = `${string}.distanceDimension.tooLarge` | `${string}.distanceDimension.tooSmall`;
|
|
8
7
|
export type GenericDimensionViolation = `${string}.genericDimension.tooLarge` | `${string}.genericDimension.tooSmall`;
|