@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
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { ComponentReader } from '../domain-runtime/domain-context/index.js';
|
|
3
|
-
import type { CollisionProjections, ConstraintProjections, PositionProjections, ProjectedEntitiesProjections, SnappingProjections } from '../projections/index.js';
|
|
4
|
-
import type { SketchingProjections } from '../sketching/index.js';
|
|
5
|
-
import type { TypeOrAlias } from './alias.js';
|
|
6
|
-
import type { Domain } from './domain.js';
|
|
7
|
-
import type { MigrateFunction } from './migrations.js';
|
|
8
|
-
import type { $DomainEntity, DomainEntity } from './model.js';
|
|
9
|
-
import type { DomainState } from './state.js';
|
|
10
|
-
export interface ExpressionContext<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>> {
|
|
11
|
-
readonly mode: 'owner' | 'read' | 'finalize';
|
|
12
|
-
readonly role: SessionRole;
|
|
13
|
-
readonly publishedData: PUBLISHED_DATA;
|
|
14
|
-
readonly frontendData: FRONTEND_DATA;
|
|
15
|
-
readonly backendData: Record<string, unknown> | undefined;
|
|
16
|
-
readonly sessionData: SESSION_DATA;
|
|
17
|
-
readonly domain: Domain<ENTITIES, ALLOWED_ROOT_ENTITIES, Record<ENTITIES['type'], $DomainEntity<ENTITIES>>>;
|
|
18
|
-
readonly componentReader: ComponentReader<ENTITIES>;
|
|
19
|
-
readonly migrate: MigrateFunction<ENTITIES>;
|
|
20
|
-
readonly positionProjections: PositionProjections<ENTITIES>;
|
|
21
|
-
readonly sketchingProjections: SketchingProjections<ENTITIES>;
|
|
22
|
-
readonly collisionProjections: CollisionProjections<ENTITIES>;
|
|
23
|
-
readonly constraintProjections: ConstraintProjections<ENTITIES>;
|
|
24
|
-
readonly snappingProjections: SnappingProjections<ENTITIES>;
|
|
25
|
-
readonly projectedEntitiesProjections: ProjectedEntitiesProjections<ENTITIES>;
|
|
26
|
-
}
|
|
27
|
-
export type AnyExpressionContext = ExpressionContext<any, any, any, any, any>;
|
|
28
|
-
export interface ExpressionMeta {
|
|
29
|
-
/**
|
|
30
|
-
* By enabling this flag, expression will be run during validation. It is primarily used to check validity of relations.
|
|
31
|
-
*/
|
|
32
|
-
readonly alwaysEvaluate?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export type ExpressionMetas<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>> = Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, ExpressionMeta>>>;
|
|
35
|
-
/**
|
|
36
|
-
* Metadata used for debugging of expression exceptions.
|
|
37
|
-
*/
|
|
38
|
-
export interface ExpressionOrigin {
|
|
39
|
-
readonly typeOrAlias: string;
|
|
40
|
-
readonly name: string;
|
|
41
|
-
}
|
|
42
|
-
export interface AnonymousExpression<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>, SELF extends ENTITIES, T> {
|
|
43
|
-
evaluate(selfId: SELF['id'], state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>): T;
|
|
44
|
-
readonly meta: ExpressionMeta;
|
|
45
|
-
}
|
|
46
|
-
export interface Expression<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>, SELF extends ENTITIES, T> extends AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, SELF, T> {
|
|
47
|
-
readonly origin: ExpressionOrigin;
|
|
48
|
-
}
|
|
49
|
-
export type AnyExpression = Expression<any, any, any, any, any, any, any>;
|
|
50
|
-
export type AnyExpressions = Record<string, Record<string, AnyExpression>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createAjvSchemaValidator as e}from"./schema-validator-ajv.js";import{createCspSchemaValidator as a}from"./schema-validator-csp.js";let d="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=d();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/pick.js";export class StateMigrationError extends Error{constructor(e){super(e),this.name="StateMigrationError"}}export const isStateMigrationError=e=>e instanceof StateMigrationError;let t=(t,r,i,o)=>t.map(t=>{let n=r[t.type];if(!n)throw new StateMigrationError(`Unknown entity type "${t.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(t))return t;if(i){let r=e(t,Object.keys(n._meta.schema.properties));if(n._meta.validator(t))return o?.error(`Entity ${t.type}#${t.id} had extra fields that had to be trimmed: ${Object.keys(r)}`),r}throw new StateMigrationError(`Entity "${t.type}#${t.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 MigrateFunctionBuilder={fromVersions:e=>({to:r=>({using:i=>({build:()=>(o,{logger:n,trimExtraProperties:a})=>{let s=e[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 MigrateFunctionBuilder.fromVersions({ ... }), or correct the version stored on the state.`);let d=t(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=e[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 MigrateFunctionBuilder.fromVersions({ ... }).`);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 in MigrateFunctionBuilder.using({ ${s+1}: ... }).`);d=t(g(d),h,a,n)}if(!e[o.version])throw new StateMigrationError(`Unknown model version ${o.version}. The state declares a version that has no registered reflections. Fix: register the version in MigrateFunctionBuilder.fromVersions({ ... }), or correct the version stored on the state.`);return d}})})})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{extendedSchemaValidator as t}from"./json-schema.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { OmitEmpty, OmitNever, UnionToIntersection } from '@salsita-ai/common/utils';
|
|
2
|
-
import { type AliasMap, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../../core/alias.js';
|
|
3
|
-
import { type DomainEntity, type DomainEntityId, type EntityByType } from '../../core/model.js';
|
|
4
|
-
import type { DomainEntityReflection } from '../../core/reflection.js';
|
|
5
|
-
export type EntityDefaults<ENTITY extends DomainEntity<string>> = {
|
|
6
|
-
[K in Exclude<keyof ENTITY, 'id' | 'type'>]: ENTITY[K] extends DomainEntityId<any> ? null : ENTITY[K];
|
|
7
|
-
};
|
|
8
|
-
export type EntityRecipe<ENTITY extends DomainEntity<string>> = ENTITY;
|
|
9
|
-
export type EntityOverrides<ENTITIES extends DomainEntity<string>, TYPE extends ENTITIES['type']> = Partial<Omit<EntityByType<ENTITIES, TYPE>, 'type'>> & {
|
|
10
|
-
type: TYPE;
|
|
11
|
-
};
|
|
12
|
-
export type DeclaredEntitiesDefaults<ENTITIES extends DomainEntity<string>> = {
|
|
13
|
-
[K in ENTITIES['type']]: EntityDefaults<EntityByType<ENTITIES, K>>;
|
|
14
|
-
};
|
|
15
|
-
type ExpandDefaults<ENTITIES extends DomainEntity<string>, ALIASES extends Readonly<Record<string, ENTITIES>>, ALIASED_DEFAULTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, unknown>>>> = {
|
|
16
|
-
[K in ENTITIES['type']]: ExtractFromAliasedRecord<ENTITIES, ALIASES, ALIASED_DEFAULTS, EventualAlias<ENTITIES, ALIASES, K> | K> extends infer DEFAULTS_FROM_ALIAS ? [
|
|
17
|
-
DEFAULTS_FROM_ALIAS
|
|
18
|
-
] extends [never] ? Record<never, never> : unknown extends UnionToIntersection<DEFAULTS_FROM_ALIAS> ? never : UnionToIntersection<DEFAULTS_FROM_ALIAS> : never;
|
|
19
|
-
};
|
|
20
|
-
export type AliasedEntitiesDefaults<ENTITIES extends DomainEntity<string>, ALIASES extends Readonly<Record<string, ENTITIES>>> = {
|
|
21
|
-
[K in TypeOrAlias<ENTITIES, ALIASES>]?: Partial<EntityDefaults<ExpandAlias<ENTITIES, ALIASES, K>>>;
|
|
22
|
-
};
|
|
23
|
-
export type RecipeFactory<ENTITIES extends DomainEntity<string>> = <TYPE extends ENTITIES['type']>(overrides: EntityOverrides<ENTITIES, TYPE>) => EntityRecipe<EntityByType<ENTITIES, TYPE>>;
|
|
24
|
-
type ConflictingDefaults<PROVIDED extends Record<string, Record<string, unknown>>, EXPECTED extends Record<string, Record<string, unknown>>> = OmitEmpty<OmitNever<{
|
|
25
|
-
[TYPE in keyof PROVIDED | keyof EXPECTED]: TYPE extends keyof EXPECTED ? TYPE extends keyof PROVIDED ? PROVIDED[TYPE] extends EXPECTED[TYPE] ? never : OmitNever<Exclude<EXPECTED[TYPE], PROVIDED[TYPE]>> : EXPECTED[TYPE] : never;
|
|
26
|
-
}>>;
|
|
27
|
-
type Build<ENTITIES extends DomainEntity<string>, PROVIDED extends Record<string, Record<string, unknown>>, EXPECTED extends Record<string, Record<string, unknown>>> = Record<string, never> extends ConflictingDefaults<PROVIDED, EXPECTED> ? {
|
|
28
|
-
build: () => RecipeFactory<ENTITIES>;
|
|
29
|
-
} : {
|
|
30
|
-
/**
|
|
31
|
-
* DO NOT USE in runtime!
|
|
32
|
-
*
|
|
33
|
-
* This is just a dev-time tool to review which defaults you forgot to provide.
|
|
34
|
-
* Use your IDEs code-completion to see which entities have missing expressions
|
|
35
|
-
* and which expressions these are.
|
|
36
|
-
*
|
|
37
|
-
* Use the helper when you see the following error on the `.build()` method call:
|
|
38
|
-
* ```
|
|
39
|
-
* TS2349: This expression is not callable.
|
|
40
|
-
* Type never has no call signatures.
|
|
41
|
-
* ```
|
|
42
|
-
* simply
|
|
43
|
-
* ```ts
|
|
44
|
-
* .withDefaults({...})
|
|
45
|
-
* ._conflicts.Oven. // <- trigger code-completion here
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
_conflicts: ConflictingDefaults<PROVIDED, EXPECTED>;
|
|
49
|
-
};
|
|
50
|
-
export declare const RecipeFactoryBuilder: {
|
|
51
|
-
forAliases: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => {
|
|
52
|
-
forEntities: (entityReflections: ReadonlyArray<ENTITIES extends any ? DomainEntityReflection<ENTITIES> : never>) => {
|
|
53
|
-
withDefaults: <ALIASED_DEFAULTS extends AliasedEntitiesDefaults<ENTITIES, ALIASES>>(entitiesDefaults: ALIASED_DEFAULTS) => Build<ENTITIES, ExpandDefaults<ENTITIES, ALIASES, ALIASED_DEFAULTS>, DeclaredEntitiesDefaults<ENTITIES>>;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{expandAlias as r}from"../../core/alias.js";import{_unsafeBuildDomainEntityId as e}from"../../core/model.js";export const RecipeFactoryBuilder={forAliases:t=>({forEntities:o=>({withDefaults:i=>{let a={};Object.entries(i).forEach(([e,o])=>{r(t,e).forEach(r=>{a[r]={...a[r],...o}})});let f=new Map(o.map(r=>[r.type,r._meta.validator]));return Object.entries(a).forEach(([r,t])=>{let o=f.get(r);if(!o)throw Error(`Defaults provided for unknown entity ${r}`);if(!o({id:e(r,1),type:r,...t}))throw console.error(o.errors,t),Error(`Invalid defaults for ${r} entity.`)}),{build:()=>r=>({id:e(r.type,1),...a[r.type],...r})}}})})};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { AnonymousExpression, ExpressionMetas } from '../core/expression.js';
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
4
|
-
export type ConstantExpressions<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>, CONSTANTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, unknown>>>> = {
|
|
5
|
-
readonly [TYPE_OR_ALIAS in keyof CONSTANTS & string]: {
|
|
6
|
-
readonly [NAME in keyof CONSTANTS[TYPE_OR_ALIAS]]: AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, TYPE_OR_ALIAS>, CONSTANTS[TYPE_OR_ALIAS][NAME]>;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare const createConstantExpressionFactory: <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>>(metas: ExpressionMetas<ENTITIES, ALIASES>) => <CONSTANTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, unknown>>>>(constants: CONSTANTS) => ConstantExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, CONSTANTS>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mapNestedObject as t}from"../utils/map-nested-object.js";export const createConstantExpressionFactory=e=>o=>t()(o,([t,o,a])=>[[t,o,{meta:e[t]?.[o]??{},evaluate:()=>a}]]);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { AnonymousExpression, ExpressionContext, ExpressionMeta, ExpressionMetas } from '../core/expression.js';
|
|
3
|
-
import type { $DomainEntity, DomainEntity, EntityByType } from '../core/model.js';
|
|
4
|
-
import type { DomainState } from '../core/state.js';
|
|
5
|
-
import type { AliasedExpressions } from '../domain-builder.js';
|
|
6
|
-
export type CustomExpression<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>, SELF extends $DomainEntity<ENTITIES>, T> = (self: SELF, state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>) => T;
|
|
7
|
-
export type PotentialCustomExpressions<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>> = {
|
|
8
|
-
[TYPE_OR_ALIAS in keyof $MAP]?: {
|
|
9
|
-
[NAME in Extract<keyof $MAP[TYPE_OR_ALIAS], `$${string}`>]?: CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $MAP[TYPE_OR_ALIAS], $MAP[TYPE_OR_ALIAS][NAME]>;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const createCustomExpressionFactory: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $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>>(metas: ExpressionMetas<ENTITIES, ALIASES>) => (implementations: PotentialCustomExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>) => AliasedExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES>;
|
|
13
|
-
export declare const createCustomExpression: <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>, $SELF extends $DomainEntity<ENTITIES>, T>(evaluate: CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $SELF, T>, meta: ExpressionMeta) => AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, EntityByType<ENTITIES, $SELF['type']>, T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mapNestedObject as e}from"../utils/map-nested-object.js";export const createCustomExpressionFactory=t=>o=>e()(o,([e,o,r])=>{if(!r)throw Error(`Custom expression for ${e}.${o} is of type undefined`);return[[e,o,createCustomExpression(r,t[e]?.[o]??{})]]});export const createCustomExpression=(e,t)=>({evaluate:(t,o,r)=>e(r.domain.get$Entity(t,o),o,r),meta:t});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { prepareDomainExpressions } from './prepare-domain-expressions.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{prepareDomainExpressions}from"./prepare-domain-expressions.js";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { OmitEmpty, OmitNever } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/alias.js';
|
|
3
|
-
import type { $DomainEntity, DomainEntity } from '../core/model.js';
|
|
4
|
-
import type { CustomExpression } from '../expressions/custom-expression.js';
|
|
5
|
-
import type { Invariant } from './invariants.js';
|
|
6
|
-
import type { Violation } from './violation.js';
|
|
7
|
-
export type CustomInvariantsFromBlueprints<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>, BLUEPRINTS extends Partial<Record<keyof $MAP & string, Record<string, boolean | string>>>> = {
|
|
8
|
-
[TYPE_OR_ALIAS in keyof BLUEPRINTS]: {
|
|
9
|
-
[NAME in keyof BLUEPRINTS[TYPE_OR_ALIAS]]: TYPE_OR_ALIAS extends keyof $MAP ? CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $MAP[TYPE_OR_ALIAS], BLUEPRINTS[TYPE_OR_ALIAS][NAME] extends string ? ReadonlyArray<Violation<BLUEPRINTS[TYPE_OR_ALIAS][NAME]>> : BLUEPRINTS[TYPE_OR_ALIAS][NAME]> : never;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export type StaticallyDefinedViolations<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, BLUEPRINTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, boolean | string>>>> = OmitEmpty<{
|
|
13
|
-
[TYPE_OR_ALIAS in keyof BLUEPRINTS]: OmitNever<{
|
|
14
|
-
[NAME in keyof BLUEPRINTS[TYPE_OR_ALIAS]]: BLUEPRINTS[TYPE_OR_ALIAS][NAME] extends boolean ? Violation<string> : never;
|
|
15
|
-
}>;
|
|
16
|
-
}>;
|
|
17
|
-
export type InvariantsFromBlueprints<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>, BLUEPRINTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, boolean | string>>>, STATIC_VIOLATIONS extends StaticallyDefinedViolations<ENTITIES, ALIASES, BLUEPRINTS>, PICK extends keyof BLUEPRINTS = keyof BLUEPRINTS> = {
|
|
18
|
-
readonly [TYPE_OR_ALIAS in keyof BLUEPRINTS & string & PICK]: ReadonlyArray<{
|
|
19
|
-
[NAME in keyof BLUEPRINTS[TYPE_OR_ALIAS]]: Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, TYPE_OR_ALIAS>, BLUEPRINTS[TYPE_OR_ALIAS][NAME] extends boolean ? TYPE_OR_ALIAS extends keyof STATIC_VIOLATIONS ? NAME extends keyof STATIC_VIOLATIONS[TYPE_OR_ALIAS] ? STATIC_VIOLATIONS[TYPE_OR_ALIAS][NAME]['type'] : never : never : BLUEPRINTS[TYPE_OR_ALIAS][NAME] extends string ? BLUEPRINTS[TYPE_OR_ALIAS][NAME] : never>;
|
|
20
|
-
}[keyof BLUEPRINTS[TYPE_OR_ALIAS]]>;
|
|
21
|
-
};
|
|
22
|
-
export declare const createCustomInvariantFactory: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $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>, BLUEPRINTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, boolean | string>>>>() => <STATIC_VIOLATIONS extends StaticallyDefinedViolations<ENTITIES, ALIASES, BLUEPRINTS>>(staticViolations: STATIC_VIOLATIONS) => <TYPES_OR_ALIASES extends keyof BLUEPRINTS & string>(implementations: Pick<CustomInvariantsFromBlueprints<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, BLUEPRINTS>, TYPES_OR_ALIASES>) => InvariantsFromBlueprints<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, BLUEPRINTS, STATIC_VIOLATIONS, TYPES_OR_ALIASES>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{withProfilerLabel as t}from"../utils/profiler-label.js";export const createCustomInvariantFactory=()=>e=>r=>{let n={};return Object.entries(r).forEach(([r,o])=>{let a=Object.entries(o).map(([n,o])=>({evaluate:t(`${r}_invariant_${n}`,(t,a,i)=>{let l=o(i.domain.get$Entity(t,a),a,i);if("boolean"==typeof l){let t=e[r]?.[n];if(!t)throw Error(`Cannot find statically defined violation for ${r}.${n}`);return l?[]:[t]}return l})}));n[r]=a}),n};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { OmitNever } from '@salsita-ai/common/utils';
|
|
2
|
-
import { type AliasMap, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../core/alias.js';
|
|
3
|
-
import type { AnonymousExpression, ExpressionContext } from '../core/expression.js';
|
|
4
|
-
import type { $DomainEntity, DomainEntity, EntityByType } from '../core/model.js';
|
|
5
|
-
import type { DomainState } from '../core/state.js';
|
|
6
|
-
import { type Violation } from './violation.js';
|
|
7
|
-
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> {
|
|
8
|
-
evaluate(selfId: ENTITY['id'], state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>): ReadonlyArray<Violation<VIOLATION_TYPE>>;
|
|
9
|
-
}
|
|
10
|
-
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> = {
|
|
11
|
-
[K in TypeOrAlias<ENTITIES, ALIASES>]?: ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, VIOLATION_TYPES>>;
|
|
12
|
-
};
|
|
13
|
-
export type DeclaredInvariants<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>> = {
|
|
14
|
-
readonly [TYPE in ENTITIES['type']]: '$violations' extends keyof $MAP[TYPE] ? $MAP[TYPE]['$violations'] extends () => ReadonlyArray<Violation<infer VIOLATION_TYPE>> ? ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, VIOLATION_TYPE>> : never : never;
|
|
15
|
-
};
|
|
16
|
-
type ConflictingInvariants<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>, EXPECTED extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>, IMPLEMENTED extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>> = OmitNever<{
|
|
17
|
-
[K in keyof EXPECTED]: EXPECTED[K] extends [never] ? never : K extends keyof IMPLEMENTED ? ViolationTypeOfInvariants<EXPECTED[K]> extends ViolationTypeOfInvariants<IMPLEMENTED[K]> ? ViolationTypeOfInvariants<IMPLEMENTED[K]> extends ViolationTypeOfInvariants<EXPECTED[K]> ? never : {
|
|
18
|
-
missing: Exclude<ViolationTypeOfInvariants<EXPECTED[K]>, ViolationTypeOfInvariants<IMPLEMENTED[K]>>;
|
|
19
|
-
extra: Exclude<ViolationTypeOfInvariants<IMPLEMENTED[K]>, ViolationTypeOfInvariants<EXPECTED[K]>>;
|
|
20
|
-
} : {
|
|
21
|
-
missing: Exclude<ViolationTypeOfInvariants<EXPECTED[K]>, ViolationTypeOfInvariants<IMPLEMENTED[K]>>;
|
|
22
|
-
extra: Exclude<ViolationTypeOfInvariants<IMPLEMENTED[K]>, ViolationTypeOfInvariants<EXPECTED[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
missing: ViolationTypeOfInvariants<EXPECTED[K]>;
|
|
25
|
-
extra: never;
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
type ViolationOfInvariants<INVARIANTS> = INVARIANTS extends ReadonlyArray<infer INVARIANT> ? INVARIANT : never;
|
|
29
|
-
type ViolationTypeOfInvariants<INVARIANTS> = ViolationOfInvariants<INVARIANTS> extends Invariant<any, any, any, any, any, any, infer VIOLATION_TYPE> ? VIOLATION_TYPE : never;
|
|
30
|
-
type ExpandAndMergeInvariants<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 Readonly<Record<string, ENTITIES>>, EXPANDED extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>, ALIASED extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>> = {
|
|
31
|
-
[K in keyof EXPANDED | ExpandAlias<ENTITIES, ALIASES, keyof ALIASED & string>['type']]: K extends ENTITIES['type'] ? ExtractFromAliasedRecord<ENTITIES, ALIASES, ALIASED, EventualAlias<ENTITIES, ALIASES, K> | K> extends infer INVARIANTS_FROM_ALIAS ? [
|
|
32
|
-
INVARIANTS_FROM_ALIAS
|
|
33
|
-
] extends [never] ? K extends keyof EXPANDED ? EXPANDED[K] : never : K extends keyof EXPANDED ? ReadonlyArray<ViolationOfInvariants<EXPANDED[K]> | ViolationOfInvariants<INVARIANTS_FROM_ALIAS>> : ReadonlyArray<ViolationOfInvariants<INVARIANTS_FROM_ALIAS>> : never : never;
|
|
34
|
-
};
|
|
35
|
-
type ExpressionsFromInvariants<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>, INVARIANTS extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>> = {
|
|
36
|
-
[K in keyof INVARIANTS & ENTITIES['type']]: {
|
|
37
|
-
$violations: AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, EntityByType<ENTITIES, K>, ReadonlyArray<Violation<INVARIANTS[K] extends ReadonlyArray<infer ELEMENT> ? ELEMENT extends Invariant<any, any, any, any, any, any, infer VIOLATION_TYPE> ? VIOLATION_TYPE : never : never>>>;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
type BuildViolationExpressions<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>, INVARIANTS extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>>> = Record<never, never> extends ConflictingInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, DeclaredInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>, INVARIANTS> ? () => ExpressionsFromInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, INVARIANTS> : never;
|
|
41
|
-
export declare class InvariantBuilder<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>, INVARIANTS extends Partial<Record<ENTITIES['type'], ReadonlyArray<Invariant<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, string>>>> = Record<never, never>> {
|
|
42
|
-
private readonly aliasMap;
|
|
43
|
-
private readonly invariants;
|
|
44
|
-
constructor(aliasMap: AliasMap<ALIASES>, invariants?: INVARIANTS);
|
|
45
|
-
withInvariants<ALIASED_INVARIANTS extends AliasedInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, string>>(aliasedInvariants: ALIASED_INVARIANTS): InvariantBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ExpandAndMergeInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, INVARIANTS, ALIASED_INVARIANTS>>;
|
|
46
|
-
/**
|
|
47
|
-
* DO NOT USE in runtime!
|
|
48
|
-
*
|
|
49
|
-
* This is just a dev-time to review conflicts in declared and actually reportable violations.
|
|
50
|
-
* Use your IDEs code-completion to see which entities have conflicts and which violations are the conflicting ones.
|
|
51
|
-
*
|
|
52
|
-
* Use the helper when you see the following error on the `.buildViolationExpressions()` method call:
|
|
53
|
-
* ```
|
|
54
|
-
* TS2349: This expression is not callable.
|
|
55
|
-
* Type never has no call signatures.
|
|
56
|
-
* ```
|
|
57
|
-
* simply
|
|
58
|
-
* ```ts
|
|
59
|
-
* const violationExpressions = invariantBuilder
|
|
60
|
-
* .withInvariants(createBuiltinInvariants(domainComponentReader))
|
|
61
|
-
* .withInvariants(kitchenRangeInvariants)
|
|
62
|
-
* ._conflicts.Oven. // <- trigger code-completion here
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
_conflicts: ConflictingInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, DeclaredInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>, INVARIANTS>;
|
|
66
|
-
buildViolationExpressions: BuildViolationExpressions<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, INVARIANTS>;
|
|
67
|
-
}
|
|
68
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{expandAlias as a}from"../core/alias.js";export class InvariantBuilder{aliasMap;invariants;constructor(a,i={}){this.aliasMap=a,this.invariants=i}withInvariants(i){let t={...this.invariants};return Object.entries(i).forEach(([i,s])=>{a(this.aliasMap,i).forEach(a=>{t[a]=[...t[a]??[],...s]})}),new InvariantBuilder(this.aliasMap,t)}_conflicts={};buildViolationExpressions=()=>{let a={};return Object.entries(this.invariants).forEach(([i,t])=>{a[i]={$violations:{evaluate:(a,i,s)=>t.flatMap(t=>t.evaluate(a,i,s)),meta:{}}}}),a}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{ViolationSchema as t}from"./violation.js";export const violationsComponent=o.component("violations").withState({tsType:"ViolationComponentState",type:"object",properties:{violations:{type:"array",items:t}},required:["violations"],additionalProperties:!1}).build();
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { type AliasMap, type TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { ExpressionMeta } from '../core/expression.js';
|
|
3
|
-
import type { DomainEntity, DomainEntityId } from '../core/model.js';
|
|
4
|
-
import type { DomainState } from '../core/state.js';
|
|
5
|
-
interface AllOfType0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
6
|
-
kind: 'allOfType';
|
|
7
|
-
target: TARGET;
|
|
8
|
-
cardinality: '0-1';
|
|
9
|
-
meta?: ExpressionMeta;
|
|
10
|
-
}
|
|
11
|
-
interface AllOfType1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
12
|
-
kind: 'allOfType';
|
|
13
|
-
target: TARGET;
|
|
14
|
-
cardinality: '1-1';
|
|
15
|
-
meta?: ExpressionMeta;
|
|
16
|
-
}
|
|
17
|
-
interface AllOfTypeNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
18
|
-
kind: 'allOfType';
|
|
19
|
-
target: TARGET;
|
|
20
|
-
cardinality: '0-N' | '1-N';
|
|
21
|
-
meta?: ExpressionMeta;
|
|
22
|
-
}
|
|
23
|
-
export type AllOfTypeRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = AllOfType0Relation<ENTITIES, ALIASES, TARGET> | AllOfType1Relation<ENTITIES, ALIASES, TARGET> | AllOfTypeNRelation<ENTITIES, ALIASES, TARGET>;
|
|
24
|
-
/**
|
|
25
|
-
* Resolves `allOfType` relations from a per-state index. Relations targeting the same set of types
|
|
26
|
-
* share one bucket; the first resolution on a state walks the entities once to fill every bucket,
|
|
27
|
-
* and every later resolution on that state is a lookup. Registration closes once the first state
|
|
28
|
-
* has been indexed, so a bucket can never be missing from an index that was already built.
|
|
29
|
-
*/
|
|
30
|
-
export declare const createAllOfTypeRelation: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => (relation: {
|
|
31
|
-
readonly target: TypeOrAlias<ENTITIES, ALIASES>;
|
|
32
|
-
}) => (_selfId: DomainEntityId<string>, state: DomainState<ENTITIES>) => DomainEntityId<string>[];
|
|
33
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{expandAlias as e}from"../core/alias.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${String(o.target)} after evaluation started. Create all relation expressions before evaluating the domain state.`);let i=new Set(e(t,o.target)),l=[...i].sort().join("|");return r.set(l,i),(e,t)=>(e=>{let t=a.get(e);if(t)return t;n=!0;let o=new Map([...r.keys()].map(e=>[e,[]]));for(let t of e.entities)for(let[e,a]of r)a.has(t.type)&&o.get(e).push(t.id);return a.set(e,o),o})(t).get(l)}};
|
|
@@ -1 +0,0 @@
|
|
|
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=()=>()=>({});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/model.js";export const composedOfComponent=o.component("composedOf").withState({type:"object",properties:{childEntityIds:{type:"array",items:t}},required:["childEntityIds"],additionalProperties:!1}).build();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { ExpressionMeta } from '../core/expression.js';
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
4
|
-
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
5
|
-
import type { RelationImplementation } from './relation-implementation.js';
|
|
6
|
-
interface DirectArrayRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
7
|
-
kind: 'direct';
|
|
8
|
-
target: TARGET;
|
|
9
|
-
field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>>;
|
|
10
|
-
cardinality: '0-N' | '1-N';
|
|
11
|
-
meta?: ExpressionMeta;
|
|
12
|
-
}
|
|
13
|
-
interface DirectSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
14
|
-
kind: 'direct';
|
|
15
|
-
target: TARGET;
|
|
16
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>, never>;
|
|
17
|
-
cardinality: '1-1';
|
|
18
|
-
meta?: ExpressionMeta;
|
|
19
|
-
}
|
|
20
|
-
interface DirectSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
21
|
-
kind: 'direct';
|
|
22
|
-
target: TARGET;
|
|
23
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, SELF>, ExpandAlias<ENTITIES, ALIASES, TARGET>, null>;
|
|
24
|
-
cardinality: '0-1';
|
|
25
|
-
meta?: ExpressionMeta;
|
|
26
|
-
}
|
|
27
|
-
export type DirectRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = DirectArrayRelation<ENTITIES, ALIASES, SELF, TARGET> | DirectSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | DirectSingle0Relation<ENTITIES, ALIASES, SELF, TARGET>;
|
|
28
|
-
export declare const directRelation: RelationImplementation<'direct'>;
|
|
29
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type AliasMap, type ExpandAlias, type TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { ExpressionMeta } from '../core/expression.js';
|
|
3
|
-
import { type DomainEntity, type DomainEntityId } from '../core/model.js';
|
|
4
|
-
import type { DomainState } from '../core/state.js';
|
|
5
|
-
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
6
|
-
interface IndirectNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
7
|
-
kind: 'indirect';
|
|
8
|
-
target: TARGET;
|
|
9
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
|
|
10
|
-
cardinality: '0-1';
|
|
11
|
-
meta?: ExpressionMeta;
|
|
12
|
-
}
|
|
13
|
-
interface IndirectNonNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
14
|
-
kind: 'indirect';
|
|
15
|
-
target: TARGET;
|
|
16
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
|
|
17
|
-
cardinality: '0-1';
|
|
18
|
-
meta?: ExpressionMeta;
|
|
19
|
-
}
|
|
20
|
-
interface IndirectNullableSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
21
|
-
kind: 'indirect';
|
|
22
|
-
target: TARGET;
|
|
23
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
|
|
24
|
-
cardinality: '1-1';
|
|
25
|
-
meta?: ExpressionMeta;
|
|
26
|
-
}
|
|
27
|
-
interface IndirectNonNullableSingle1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
28
|
-
kind: 'indirect';
|
|
29
|
-
target: TARGET;
|
|
30
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
|
|
31
|
-
cardinality: '1-1';
|
|
32
|
-
meta?: ExpressionMeta;
|
|
33
|
-
}
|
|
34
|
-
interface IndirectSingleNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
35
|
-
kind: 'indirect';
|
|
36
|
-
target: TARGET;
|
|
37
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, never>;
|
|
38
|
-
cardinality: '0-N' | '1-N';
|
|
39
|
-
meta?: ExpressionMeta;
|
|
40
|
-
}
|
|
41
|
-
interface IndirectNullableSingleNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
42
|
-
kind: 'indirect';
|
|
43
|
-
target: TARGET;
|
|
44
|
-
field: SingleReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>, null>;
|
|
45
|
-
cardinality: '0-N' | '1-N';
|
|
46
|
-
meta?: ExpressionMeta;
|
|
47
|
-
}
|
|
48
|
-
interface IndirectArray0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
49
|
-
kind: 'indirect';
|
|
50
|
-
target: TARGET;
|
|
51
|
-
field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
|
|
52
|
-
cardinality: '0-1';
|
|
53
|
-
meta?: ExpressionMeta;
|
|
54
|
-
}
|
|
55
|
-
interface IndirectArray1Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
56
|
-
kind: 'indirect';
|
|
57
|
-
target: TARGET;
|
|
58
|
-
field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
|
|
59
|
-
cardinality: '1-1';
|
|
60
|
-
meta?: ExpressionMeta;
|
|
61
|
-
}
|
|
62
|
-
interface IndirectArrayNRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
63
|
-
kind: 'indirect';
|
|
64
|
-
target: TARGET;
|
|
65
|
-
field: ArrayReferenceField<ExpandAlias<ENTITIES, ALIASES, TARGET>, ExpandAlias<ENTITIES, ALIASES, SELF>>;
|
|
66
|
-
cardinality: '0-N' | '1-N';
|
|
67
|
-
meta?: ExpressionMeta;
|
|
68
|
-
}
|
|
69
|
-
export type IndirectRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = IndirectArray1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectArray0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectArrayNRelation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingle0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNonNullableSingle0Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNonNullableSingle1Relation<ENTITIES, ALIASES, SELF, TARGET> | IndirectSingleNRelation<ENTITIES, ALIASES, SELF, TARGET> | IndirectNullableSingleNRelation<ENTITIES, ALIASES, SELF, TARGET>;
|
|
70
|
-
/**
|
|
71
|
-
* Resolves `indirect` relations from a per-state reverse-reference index. Relations reading the
|
|
72
|
-
* same field on the same set of target types share one index mapping each referenced id to the
|
|
73
|
-
* entities that reference it; the first resolution on a state walks the entities once to fill
|
|
74
|
-
* every index, and every later resolution on that state is a lookup. Registration closes once the
|
|
75
|
-
* first state has been indexed, so an index can never be missing from a state already walked.
|
|
76
|
-
*/
|
|
77
|
-
export declare const createIndirectRelation: <ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>) => (relation: {
|
|
78
|
-
readonly target: TypeOrAlias<ENTITIES, ALIASES>;
|
|
79
|
-
readonly field: string;
|
|
80
|
-
}) => (sourceId: DomainEntityId<string>, state: DomainState<ENTITIES>) => DomainEntityId<string>[];
|
|
81
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../core/alias.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let a=new Map,n=new WeakMap,o=!1;return l=>{if(o)throw Error(`Cannot register indirect relation ${String(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 a.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=n.get(t);if(i)return i;o=!0;let l=new Map([...a.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:n,targetTypes:o}]of a){if(!o.has(i.type))continue;let a=i[n],s=e(a)?new Set(a.filter(r)):r(a)?[a]:[],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 n.set(t,l),l})(i).get(f).get(t)??[]}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/model.js";import{memoEval as r}from"../utils/memo-eval.js";export const referenceComponent=e.component("reference").withState({type:"object",properties:{referencedEntityIds:{type:"array",items:t}},required:["referencedEntityIds"],additionalProperties:!1}).withWritableKeys(["referencedEntityIds"]).build();export const attachSingleReferenceComponent=(e,t,n)=>e.attach(r(e=>[e[n]],e=>({referencedEntityIds:null===e?[]:[e]})),e=>{let r=e.referencedEntityIds[0];return r&&t.assertId(r),{[n]:r??null}});export const attachMultipleReferenceComponent=(e,t,n)=>e.attach(r(e=>[e[n]],e=>({referencedEntityIds:e})),e=>(t.assertIds(e.referencedEntityIds),{[n]:e.referencedEntityIds}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { AliasMap, ExpandAlias, TypeOrAlias } from '../core/alias.js';
|
|
2
|
-
import type { AnonymousExpression } from '../core/expression.js';
|
|
3
|
-
import type { $DomainEntity, DomainEntity } from '../core/model.js';
|
|
4
|
-
import { type AllOfTypeRelation } from './all-of-type-relation.js';
|
|
5
|
-
import type { DirectRelation } from './direct-relation.js';
|
|
6
|
-
import { type IndirectRelation } from './indirect-relation.js';
|
|
7
|
-
export type Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> = DirectRelation<ENTITIES, ALIASES, SELF, TARGET> | AllOfTypeRelation<ENTITIES, ALIASES, TARGET> | IndirectRelation<ENTITIES, ALIASES, SELF, TARGET>;
|
|
8
|
-
export interface RelationFactory<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $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>> {
|
|
9
|
-
<SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
|
|
10
|
-
cardinality: '0-1';
|
|
11
|
-
}>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, $MAP[TARGET] | null>;
|
|
12
|
-
<SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
|
|
13
|
-
cardinality: '1-1';
|
|
14
|
-
}>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, $MAP[TARGET]>;
|
|
15
|
-
<SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>>(relation: Extract<Relation<ENTITIES, ALIASES, SELF, TARGET>, {
|
|
16
|
-
cardinality: '0-N' | '1-N';
|
|
17
|
-
}>): AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, SELF>, ReadonlyArray<$MAP[TARGET]>>;
|
|
18
|
-
}
|
|
19
|
-
export declare const createRelationFactory: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<TypeOrAlias<ENTITIES, ALIASES>, $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>>(aliasMap: AliasMap<ALIASES>) => RelationFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{match as t}from"ts-pattern";import{createAllOfTypeRelation as e}from"./all-of-type-relation.js";import{directRelation as r}from"./direct-relation.js";import{createIndirectRelation as i}from"./indirect-relation.js";export const createRelationFactory=n=>{let a=e(n),o=i(n);return e=>{let i=t(e).with({kind:"direct"},t=>r(t,n)).with({kind:"indirect"},t=>o(t)).with({kind:"allOfType"},t=>a(t)).exhaustive(),l=t(e).with({cardinality:"0-1"},()=>t=>{if(t.length>1)throw Error(`Expected at most one entity, but got ${t.length}`);return t.length>0?t[0]:null}).with({cardinality:"1-1"},()=>t=>{if(1!==t.length)throw Error(`Expected exactly one entity, but got ${t.length}`);return t[0]}).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();return{meta:{alwaysEvaluate:!0,...e.meta},evaluate:(t,r,a)=>{let o=i(t,r,a.domain),d=a.domain.get$Entities(o,r);if(!d.every(t=>e.target in n?n[e.target].includes(t.type):t.type===e.target)){let t=d.map(t=>t.type).filter(t=>e.target in n?n[e.target].includes(t):t===e.target);throw Error(`Expected ${e.target} entities, but got ${t.join(", ")}`)}return l(d)}}}};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AliasMap } from '../core/alias.js';
|
|
2
|
-
import type { Domain } from '../core/index.js';
|
|
3
|
-
import type { DomainEntity, DomainEntityId } from '../core/model.js';
|
|
4
|
-
import type { DomainState } from '../core/state.js';
|
|
5
|
-
import type { Relation } from './relation-factory.js';
|
|
6
|
-
export type RelationImplementation<KIND extends Relation<any, any, any, any>['kind']> = (relation: Extract<Relation<any, any, any, any>, {
|
|
7
|
-
kind: KIND;
|
|
8
|
-
}>, aliasMap: AliasMap<Record<string, DomainEntity<string>>>) => (selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>, domain: Domain<any, any, any>) => Array<DomainEntityId<string>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EnhancedLocalizableSchema as o}from"@salsita-ai/common/utils";import{SystemComponentBuilder as t}from"../components/system-component-builder.js";import{isSnapshotOfComponentType as e}from"../core/component.js";import{AngleIndicatorProperties as n}from"./common/index.js";export const angleIndicatorComponent=t.component("angleIndicator").withState({tsType:"AngleIndicatorComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"AngleIndicatorComponentState"}],type:"object",properties:{...n,label:o,visible:{type:"boolean"},force:{type:"boolean"}},required:["positionX","positionY","positionZ","startAngle","sweepAngle"],additionalProperties:!1}).build();export const isAngleIndicatorSnapshot=e(angleIndicatorComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t}from"../components/system-component-builder.js";export const AttributeSwitchValueSchema={type:["string","number","boolean"]};export const attributeSwitchComponent=t.component("attributeSwitch").withState({type:"object",properties:{value:AttributeSwitchValueSchema},tsType:"AttributeSwitchComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"AttributeSwitchComponentState"}],required:["value"],additionalProperties:!1}).withWritableKeys(["value"]).build();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";export const AutorotateCameraComponentName="autorotateCamera";export const autorotateCameraComponent=e.component(AutorotateCameraComponentName).withState({type:"object",tsType:"AutorotateCameraComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"AutorotateCameraComponentState"}],properties:{speed:{type:"number"},pauseOnInteraction:{type:"boolean"},resumeDelay:{type:"number"}},required:[],additionalProperties:!1}).build();export const isAutorotateCameraComponent=e=>e.componentInstance.componentType.name===AutorotateCameraComponentName;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{isInstanceOfComponentType as e,isSnapshotOfComponentType as t}from"../core/component.js";export const basicSidebarFooterComponent=o.component("basicSidebarFooter").withState({type:"object",tsType:"BasicSidebarFooterComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"BasicSidebarFooterComponentState"}],properties:{},required:[],additionalProperties:!1}).build();export const isBasicSidebarFooterSnapshot=t(basicSidebarFooterComponent);export const isBasicSidebarFooterInstance=e(basicSidebarFooterComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{isSnapshotOfComponentType as t}from"../core/component.js";export const cameraBasedHiddenEntityObjectComponent=e.component("cameraBasedHiddenEntityObject").withState({type:"object",tsType:"CameraBasedHiddenEntityObjectComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CameraBasedHiddenEntityObjectComponentState"}],properties:{normal:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],additionalProperties:!1},constant:{type:"number"},behind:{type:"boolean"}},required:["normal","constant"],additionalProperties:!1}).build();export const isCameraBasedHiddenEntityObjectComponent=t(cameraBasedHiddenEntityObjectComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{isSnapshotOfComponentType as t}from"../core/component.js";export const cameraBasedHiddenEntityComponent=e.component("cameraBasedHiddenEntity").withState({type:"object",tsType:"CameraBasedHiddenEntityComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CameraBasedHiddenEntityComponentState"}],properties:{normal:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],additionalProperties:!1},constant:{type:"number"},behind:{type:"boolean"}},required:["normal","constant"],additionalProperties:!1}).build();export const isCameraBasedHiddenEntityComponent=t(cameraBasedHiddenEntityComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{isInstanceOfComponentType as o,isSnapshotOfComponentType as n}from"../core/component.js";export const canvasConfigComponent=e.component("canvasConfig").withState({type:"object",tsType:"CanvasConfigComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CanvasConfigComponentState"}],properties:{highlightingDisabled:{type:"boolean"},frameloop:{type:"string",enum:["always","demand","never"]},__doNotSuspendEnvironment:{type:"boolean"},precision:{type:"string",enum:["highp","mediump","lowp"]},alpha:{type:"boolean"},premultipliedAlpha:{type:"boolean"},antialias:{type:"boolean"},stencil:{type:"boolean"},preserveDrawingBuffer:{type:"boolean"},powerPreference:{type:"string",enum:["high-performance","low-power","default"]},depth:{type:"boolean"},logarithmicDepthBuffer:{type:"boolean"},failIfMajorPerformanceCaveat:{type:"boolean"},shadows:{type:"string",enum:["basic","percentage","soft","variance"]},enableFastHighlight:{type:"boolean"},fastHighlightColor:{type:"string"},fastHighlightIntensity:{type:"number"}},required:[],additionalProperties:!1}).build();export const isCanvasConfigSnapshot=n(canvasConfigComponent);export const isCanvasConfigInstance=o(canvasConfigComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as n}from"../components/index.js";import{isInstanceOfComponentType as t,isSnapshotOfComponentType as o}from"../core/index.js";export const canvasCustomEnvironmentComponent=n.component("canvasCustomEnvironment").withState({type:"object",tsType:"CanvasCustomEnvironmentComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CanvasCustomEnvironmentComponentState"}],properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}).build();export const isCanvasCustomEnvironmentSnapshot=o(canvasCustomEnvironmentComponent);export const isCanvasCustomEnvironmentInstance=t(canvasCustomEnvironmentComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as n}from"../components/system-component-builder.js";import{isInstanceOfComponentType as t,isSnapshotOfComponentType as e}from"../core/component.js";export const canvasPaddingComponent=n.component("canvasPadding").withState({type:"object",tsType:"CanvasPaddingComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CanvasPaddingComponentState"}],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},required:[],additionalProperties:!1}).build();export const isCanvasPaddingSnapshot=e(canvasPaddingComponent);export const isCanvasPaddingInstance=t(canvasPaddingComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{isInstanceOfComponentType as n,isSnapshotOfComponentType as t}from"../core/component.js";export const canvasPresetEnvironmentComponent=e.component("canvasPresetEnvironment").withState({type:"object",tsType:"CanvasPresetEnvironmentComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"CanvasPresetEnvironmentComponentState"}],properties:{ambientLightIntensity:{type:"number"},frames:{type:"number"},near:{type:"number"},far:{type:"number"},preset:{type:"string",enum:["apartment","city","dawn","forest","lobby","night","park","studio","sunset","warehouse"]},resolution:{type:"number"},blur:{type:"number"}},required:[],additionalProperties:!1}).build();export const isCanvasPresetEnvironmentSnapshot=t(canvasPresetEnvironmentComponent);export const isCanvasPresetEnvironmentInstance=n(canvasPresetEnvironmentComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{GroupedRecipeItemsSchema as t}from"./common/recipes.js";export const childEntityRecipeHierarchyComponent=e.component("childEntityRecipeHierarchy").withState({type:"object",tsType:"ChildEntityRecipeHierarchyComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ChildEntityRecipeHierarchyComponentState"}],properties:{recipes:t,fixableViolations:{type:"array",items:{type:"string"}}},definitions:{GroupedRecipeItems:t},required:["recipes"],additionalProperties:!1}).build();export const isChildEntityRecipeHierarchySnapshot=e=>e.componentInstance.componentType===childEntityRecipeHierarchyComponent;export const isChildEntityRecipeHierarchyInstance=e=>e.componentType===childEntityRecipeHierarchyComponent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t}from"../components/system-component-builder.js";import{isSnapshotOfComponentType as e}from"../core/component.js";export const clientSideImageComponent=t.component("clientSideImage").withState({type:"object",tsType:"ClientSideImageComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ClientSideImageComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$"},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isClientSideImageComponentSnapshot=e(clientSideImageComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";export const ColorValueSchema={type:"object",tsType:"ColorValueSchema",import:[{module:"@salsita-ai/sdk/domain",member:"ColorValueSchema"}],properties:{value:{type:"string"}},required:["value"],additionalProperties:!1};export const colorValueComponent=e.component("colorValue").withState(ColorValueSchema).withWritableKeys(["value"]).build();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EnhancedLocalizableSchema as e}from"@salsita-ai/common/utils";import{AngleUnitSchema as t}from"../../dimensions/angles.js";export const AngleIndicatorProperties={positionX:{type:"number"},positionY:{type:"number"},positionZ:{type:"number"},startAngle:{type:"number"},sweepAngle:{type:"number"},angleOffset:{type:"number"},arcDiameter:{type:"number"},lineWidth:{type:"number"},indicatorLineColor:{type:["string","number"]},indicatorLineDashed:{type:"boolean"},dashScale:{type:"number"},labelFont:{type:"string"},labelFontSize:{type:"number"},labelColor:{type:["string","number"]},labelDirection:{type:"string",enum:["auto","ltr","rtl"]},labelFillOpacity:{type:"number"},labelFontStyle:{type:"string",enum:["normal","italic"]},labelFontWeight:{type:["number","string"]},labelLetterSpacing:{type:"number"},labelLineHeight:{type:"number"},labelMaxWidth:{type:"number"},labelOutlineBlur:{type:["number","string"]},labelOutlineColor:{type:["string","number"]},labelOutlineOffsetX:{type:["number","string"]},labelOutlineOffsetY:{type:["number","string"]},labelOutlineOpacity:{type:"number"},labelOutlineWidth:{type:["number","string"]},labelOverflowWrap:{type:"string",enum:["normal","break-word"]},labelStrokeColor:{type:["string","number"]},labelStrokeOpacity:{type:"number"},labelStrokeWidth:{type:["number","string"]},labelWhiteSpace:{type:"string",enum:["normal","nowrap","pre-wrap"]},labelPrefix:e,labelPrefixFontColor:{type:["string","number"]},indicatorAlwaysVisible:{type:"boolean"},renderOrder:{type:"number"},screenSized:{type:"boolean"},angleUnit:t};
|