@salsita-ai/sdk 0.50.0-develop.be40f0cee8 → 0.50.0-develop.c1dcc73e88
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 +53 -54
- 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-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/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-feedback-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +2 -2
- 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 +37 -12
- 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/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/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +245 -13
- 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 +8 -3
- 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.d.ts +4 -0
- 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 +16 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +5 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +21 -21
- package/dist/configurator/index.d.ts +0 -1
- package/dist/configurator/index.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/scene/scene-analytics/scene-analytics.d.ts +2 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +3 -7
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +7 -8
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +14 -3
- 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/assistant/use-is-assistant-panel-open.d.ts +5 -0
- package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
- 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/Layout.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +2 -2
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.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 +1 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
- package/dist/docs/layouts/toolbar.mdx +3 -1
- package/dist/docs/other-features/domain-actions.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +76 -45
- 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 +104 -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 +124 -49
- 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/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-manifest.d.ts +63 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -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 +4 -0
- package/dist/domain/application/assistant/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 +17 -2
- 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-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema.js +1 -0
- package/dist/domain/core/data-schema/index.d.ts +7 -0
- package/dist/domain/core/data-schema/index.js +1 -0
- package/dist/domain/core/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/{expressions → core/expression}/constant-expressions.d.ts +3 -4
- 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/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-runtime.d.ts +72 -72
- 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 +25 -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 +21 -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-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/graphql/GraphQLPanel.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/deploy.js +2 -2
- 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/common-services/analytics/analytics-service.d.ts +2 -2
- package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
- package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
- 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/runtime/create-application-runtime.d.ts +40 -40
- 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/common/use-viewport-size.d.ts +4 -1
- package/dist/ui-sdk/common/use-viewport-size.js +1 -1
- package/dist/ui-sdk/components/mobile-controls/index.d.ts +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 +4 -4
- 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/configurator/assistant/index.d.ts +0 -1
- package/dist/configurator/assistant/index.js +0 -1
- package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -30
- package/dist/configurator/assistant/use-assistant-chat.js +0 -1
- package/dist/configurator/ui/assistant/AssistantPanelProvider.d.ts +0 -42
- package/dist/configurator/ui/assistant/AssistantPanelProvider.js +0 -1
- 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.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/{core/action.js → application/assistant/assistant-resolved-manifest.js} +0 -0
- /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
- /package/dist/domain/core/{enhanced-json-schema.js → action/action.js} +0 -0
- /package/dist/domain/core/{expression.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/{schema-validator.js → data-schema/data-cell-value.js} +0 -0
- /package/dist/domain/{relations/reference-field.js → core/data-schema/data-schema-array-field.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-field-object.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,76 +0,0 @@
|
|
|
1
|
-
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { AliasMap } from '../core/alias.js';
|
|
3
|
-
import type { StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../core/component.js';
|
|
4
|
-
import type { ExpressionContext } from '../core/expression.js';
|
|
5
|
-
import type { $DomainEntity, DomainEntity, EntityByType } from '../core/model.js';
|
|
6
|
-
import type { DomainState } from '../core/state.js';
|
|
7
|
-
import type { CustomExpression } from '../expressions/custom-expression.js';
|
|
8
|
-
import { type ComponentSystemFilter, type NavigationFilterOptic } from './legacy-filter.js';
|
|
9
|
-
import type { GradualComponentSystemFilter, IdOrWithId } from './system-component-filter.js';
|
|
10
|
-
import type { Viewport } from './viewport-state-component.js';
|
|
11
|
-
type CustomOpticRead<ENTITIES extends DomainEntity<string>, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_STATE extends Record<string, unknown>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>> = (self: $ENTITY, state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>) => COMPONENT_STATE;
|
|
12
|
-
type CustomOpticAttach<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, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint> = (read: CustomOpticRead<ENTITIES, $ENTITY, StateOfComponent<COMPONENT_TYPE>, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>, write?: DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE>['write']) => DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE>;
|
|
13
|
-
export interface DomainComponentSimpleOptic<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, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
14
|
-
readonly kind: 'simple';
|
|
15
|
-
readonly instanceName: string;
|
|
16
|
-
readonly componentType: COMPONENT_TYPE;
|
|
17
|
-
readonly entityTypes: ReadonlySet<ENTITIES['type']>;
|
|
18
|
-
readonly generated?: boolean;
|
|
19
|
-
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>>;
|
|
20
|
-
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>): StateOfComponent<COMPONENT_TYPE>;
|
|
21
|
-
write(writableState: WritableStateOfComponent<COMPONENT_TYPE>): Partial<Omit<ENTITY, 'id' | 'type'>>;
|
|
22
|
-
}
|
|
23
|
-
export interface DomainComponentDynamicOptic<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>, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
24
|
-
readonly kind: 'dynamic';
|
|
25
|
-
readonly instanceName: string;
|
|
26
|
-
readonly componentType: COMPONENT_TYPE;
|
|
27
|
-
readonly entityTypes: ReadonlySet<ENTITIES['type']>;
|
|
28
|
-
readonly generated?: boolean;
|
|
29
|
-
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>>;
|
|
30
|
-
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>): ReadonlyArray<StateOfComponent<COMPONENT_TYPE> & {
|
|
31
|
-
key: string;
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
|
-
export type DomainComponentOptic<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, COMPONENT_TYPE extends SystemComponentTypeConstraint> = DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE> | DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE>;
|
|
35
|
-
export type AnyDomainComponentOptic = DomainComponentOptic<any, any, any, any, any, any, any>;
|
|
36
|
-
export declare class DomainComponentOpticBuilder<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
37
|
-
private readonly aliasMap;
|
|
38
|
-
private readonly entityTypes;
|
|
39
|
-
private readonly componentType?;
|
|
40
|
-
private readonly instanceName?;
|
|
41
|
-
private readonly navigationFilters;
|
|
42
|
-
private readonly generated;
|
|
43
|
-
private readonly entityTypeOrAliasNames;
|
|
44
|
-
private constructor();
|
|
45
|
-
static from<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>>(aliasMap: AliasMap<ALIASES>): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, never, never, never>;
|
|
46
|
-
withEntity<TYPE extends ENTITIES['type']>(entityType: TYPE): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | EntityByType<ENTITIES, TYPE>, $ENTITY | $MAP[TYPE], COMPONENT_TYPE>;
|
|
47
|
-
withAlias<ALIAS extends keyof ALIASES & keyof $MAP>(alias: ALIAS): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | ALIASES[ALIAS], $ENTITY | $MAP[ALIAS], COMPONENT_TYPE>;
|
|
48
|
-
withComponent<NEW_COMPONENT_TYPE extends SystemComponentType<any, any, any>>(componentType: NEW_COMPONENT_TYPE, instanceName: string, generated?: boolean): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, NEW_COMPONENT_TYPE>;
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated Use withGradualFilter instead
|
|
51
|
-
*/
|
|
52
|
-
withFilter(filter: ComponentSystemFilter | NavigationFilterOptic<ENTITIES, $ENTITY>): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
53
|
-
withGradualFilter(filter: {
|
|
54
|
-
readonly navigationStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
55
|
-
readonly selectedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
56
|
-
readonly hoveredEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
57
|
-
readonly draggedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
58
|
-
readonly exportedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
59
|
-
readonly viewStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
60
|
-
readonly toolStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
61
|
-
readonly exportStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
62
|
-
readonly modes?: ReadonlyArray<'owner' | 'read' | 'finalize'> | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, ReadonlyArray<'owner' | 'read' | 'finalize'> | undefined>;
|
|
63
|
-
readonly roles?: readonly SessionRole[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly SessionRole[] | undefined>;
|
|
64
|
-
readonly active?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
65
|
-
readonly fullscreen?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
66
|
-
readonly debug?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
67
|
-
readonly viewports?: readonly Viewport[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly Viewport[] | undefined>;
|
|
68
|
-
}): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
69
|
-
private validate;
|
|
70
|
-
private _getProfilerLabel;
|
|
71
|
-
attach: CustomOpticAttach<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
72
|
-
attachMany: (read: (entity: $ENTITY, state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>) => ReadonlyArray<StateOfComponent<COMPONENT_TYPE> & {
|
|
73
|
-
key: string;
|
|
74
|
-
}>) => DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE>;
|
|
75
|
-
}
|
|
76
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{createCustomExpression as i}from"../expressions/custom-expression.js";import{withProfilerLabel as n}from"../utils/profiler-label.js";export class DomainComponentOpticBuilder{aliasMap;entityTypes;componentType;instanceName;navigationFilters;generated;entityTypeOrAliasNames;constructor(t,e,i,n,s=[],a=!1,o=[]){this.aliasMap=t,this.entityTypes=e,this.componentType=i,this.instanceName=n,this.navigationFilters=s,this.generated=a,this.entityTypeOrAliasNames=o}static from(t){return new DomainComponentOpticBuilder(t,[])}withEntity(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,t],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,t])}withAlias(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,...this.aliasMap[t]],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,String(t)])}withComponent(t,e,i=!1){return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,t,e,this.navigationFilters,i,this.entityTypeOrAliasNames)}withFilter(i){if(console.warn(`Component ${this.componentType?.name}#${this.instanceName} on entity ${this.entityTypes.join(", ")} uses a legacy filter with full filter evaluation. This is a suboptimal variant and is deprecated in favor of per-criterion evaluation.
|
|
2
|
-
|
|
3
|
-
In your TS files, replace
|
|
4
|
-
withFilter()
|
|
5
|
-
->
|
|
6
|
-
withGradualFilter()
|
|
7
|
-
|
|
8
|
-
In YAML, replace
|
|
9
|
-
$filter:
|
|
10
|
-
$read: $falseOrFilterExpression
|
|
11
|
-
->
|
|
12
|
-
$filter:
|
|
13
|
-
active:
|
|
14
|
-
$read: $trueOrFalseExpression
|
|
15
|
-
# ... other eventual criteria
|
|
16
|
-
`),"function"==typeof i){let n=t(),s=t=>({evaluate:(s,a,o)=>{let r=e(a,n),d=r.get(s);if(!d){if(void 0===(d=i(o.domain.get$Entity(s,a),a)))throw Error(`Dynamic filter on component ${this.componentType?.name}.${this.instanceName} on entity ${s} returned 'undefined'. This is likely a bug in the component definition, check whether you are referencing a correct expression or field!`);r.put(s,d)}return"boolean"==typeof d?"active"===t?d:void 0:d[t]},meta:{}});return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:s("navigationStates"),selectedEntityIds:s("selectedEntityIds"),hoveredEntityIds:s("hoveredEntityIds"),draggedEntityIds:s("draggedEntityIds"),viewStates:s("viewStates"),toolStates:s("toolStates"),modes:s("modes"),roles:s("roles"),active:s("active"),fullscreen:s("fullscreen"),debug:s("debug"),viewports:s("viewports"),exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames)}return"boolean"==typeof i?new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{active:i,navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames):new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,active:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0,...i}],this.generated,this.entityTypeOrAliasNames)}withGradualFilter(t){let e=t=>"function"==typeof t?i(t,{}):t,n={navigationStates:e(t.navigationStates),selectedEntityIds:e(t.selectedEntityIds),hoveredEntityIds:e(t.hoveredEntityIds),draggedEntityIds:e(t.draggedEntityIds),exportedEntityIds:e(t.exportedEntityIds),viewStates:e(t.viewStates),toolStates:e(t.toolStates),exportStates:e(t.exportStates),modes:e(t.modes),roles:e(t.roles),active:e(t.active),fullscreen:e(t.fullscreen),debug:e(t.debug),viewports:e(t.viewports)};return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,n],this.generated,this.entityTypeOrAliasNames)}validate(){if(!this.componentType||!this.instanceName)throw Error("Use withComponent before attaching");if(!this.entityTypes.length)throw Error("Use withEntity and/or withAlias before attaching")}_getProfilerLabel(){return[...this.entityTypeOrAliasNames,this.componentType.name,this.instanceName].join("_")}attach=(i,s)=>{var a,o;let r,d;return this.validate(),a={kind:"simple",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n),write:s??(()=>({})),generated:this.generated},o=this._getProfilerLabel(),r=t(),d=n(o,a.read),{...a,read:(t,i,n)=>{let s=e(i,r),a=s.get(t);if(a)return a;let o=d(t,i,n);return s.put(t,o),o}}};attachMany=i=>{var s,a;let o,r;return this.validate(),s={kind:"dynamic",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n)},a=this._getProfilerLabel(),o=t(),r=n(a,s.read),{...s,read:(t,i,n)=>{let s=e(i,o),a=s.get(t);if(a)return a;let d=r(t,i,n);return s.put(t,d),d}}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const dragStateComponent=e.component("dragState").withState({type:"object",properties:{draggedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["draggedEntityId"],additionalProperties:!1,tsType:"DragStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"DragStateComponentState"}]}).withWritableKeys(["draggedEntityId"]).build();export const isDragStateComponentSnapshot=e=>t(e,"singleton",dragStateComponent);export const isSystemDragStateComponentSnapshot=t(o,"singleton",dragStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const exportStateComponent=e.component("exportState").withState({type:"object",properties:{activeState:{type:"string"},exportedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["activeState","exportedEntityId"],additionalProperties:!1}).withWritableKeys(["activeState","exportedEntityId"]).build();export const isExportStateComponentSnapshot=e=>t(e,"singleton",exportStateComponent);export const isSystemExportStateComponentSnapshot=t(o,"singleton",exportStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as e}from"../core/component.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const fullscreenStateComponent=t.component("fullscreenState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isFullscreenStateComponentSnapshot=t=>e(t,"singleton",fullscreenStateComponent);export const isSystemFullscreenStateComponentSnapshot=e(o,"singleton",fullscreenStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isArray as o,isShallowEqual as t}from"@salsita-ai/common/utils";import{areEqualComponentSnapshots as n,isEqualComponentSnapshot as e}from"../core/component.js";export const isEqualGroupedComponentSnapshots=(p,m)=>t(p,m,(t,p)=>t===p||void 0!==t&&void 0!==p&&(o(t)&&o(p)?n(t,p):!(o(t)||o(p))&&e(t,p)));export const groupComponentsByEntityIdAndName=o=>{let t=new Map;return o.forEach(o=>{let n=o.componentInstance.entityId,e=o.componentInstance.componentType.name,p=t.get(n);p||(p={},t.set(n,p));let m=p[e]??[];p[e]=m,m.push(o)}),t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const hoverStateComponent=e.component("hoverState").withState({type:"object",properties:{hoveredEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["hoveredEntityId"],additionalProperties:!1,tsType:"HoverStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"HoverStateComponentState"}]}).withWritableKeys(["hoveredEntityId"]).build();export const isHoverStateComponentSnapshot=e=>t(e,"singleton",hoverStateComponent);export const isSystemHoverStateComponentSnapshot=t(o,"singleton",hoverStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{SystemComponentBuilder}from"./system-component-builder.js";export*from"./domain-component-optic.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const navigationStateComponent=o.component("navigationState").withState({type:"object",properties:{activeState:{type:"string"},historyStack:{type:"array",items:{type:"string"}}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState","historyStack"]).build();export const isNavigationComponentSnapshot=o=>t(o,"singleton",navigationStateComponent);export const isSystemNavigationComponentSnapshot=t(e,"singleton",navigationStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const selectionStateComponent=e.component("selectionState").withState({type:"object",properties:{selectedEntityId:{type:"string"}},required:["selectedEntityId"],additionalProperties:!1,tsType:"SelectionStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"SelectionStateComponentState"}]}).withWritableKeys(["selectedEntityId"]).build();export const isSelectionComponentSnapshot=e=>t(e,"singleton",selectionStateComponent);export const isSystemSelectionComponentSnapshot=t(o,"singleton",selectionStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/pick.js";import{getCommonPhxDefinitions as t}from"../core/index.js";import{extendedSchemaValidator as i}from"../core/json-schema.js";export class SystemComponentBuilder{name;writableKeys;jsonSchema;constructor(e,t,i){this.name=e,this.writableKeys=t,this.jsonSchema=i}static component(e){return new SystemComponentBuilder(e,[],{type:"object",properties:{},required:[],additionalProperties:!1})}withState(e){return new SystemComponentBuilder(this.name,[],e)}withWritableKeys(e){return new SystemComponentBuilder(this.name,e,this.jsonSchema)}build(){let s=t(),r={...this.jsonSchema,definitions:{...s,...this.jsonSchema.definitions}};return{name:this.name,writableKeys:this.writableKeys,schema:this.jsonSchema,validateState:i.compile(r),validateWritableState:i.compile({...r,properties:e(this.jsonSchema.properties,this.writableKeys),required:this.jsonSchema.required?.filter(e=>this.writableKeys.includes(e))})}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createVirtualEntityId as t}from"../core/model.js";export const systemVirtualEntityId=t("system");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const toolStateComponent=o.component("toolState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isToolStateComponentSnapshot=o=>t(o,"singleton",toolStateComponent);export const isSystemToolStateComponentSnapshot=t(e,"singleton",toolStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const viewStateComponent=e.component("viewState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isViewComponentSnapshot=e=>t(e,"singleton",viewStateComponent);export const isSystemViewComponentSnapshot=t(o,"singleton",viewStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const VIEWPORTS=["phone","mobile","tablet","desktop","landscape","portrait"];export const viewportStateComponent=e.component("viewportState").withState({type:"object",properties:{active:{oneOf:[{type:"array",items:{type:"string",enum:[...VIEWPORTS]}},{type:"null"}]}},required:["active"],additionalProperties:!1,tsType:"ViewportStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ViewportStateComponentState"}]}).withWritableKeys(["active"]).build();export const isViewportStateComponentSnapshot=e=>t(e,"singleton",viewportStateComponent);export const isSystemViewportStateComponentSnapshot=t(o,"singleton",viewportStateComponent);
|
|
@@ -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 +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 {};
|