@salsita-ai/sdk 0.50.0-develop.aff4f8dd6d → 0.50.0-develop.b9eb39baf0
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/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/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.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -2
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -4
- 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/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/client/phoenix-api.d.ts +58 -30
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
- package/dist/docs/index.json +1 -1
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
- package/dist/docs/other-features/domain-actions.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +42 -34
- package/dist/docs/other-features/transformers.mdx +1 -1
- package/dist/docs/phoenix/admin.mdx +9 -24
- package/dist/docs/phoenix/localization.mdx +3 -22
- package/dist/docs/phoenix/project-structure.mdx +6 -0
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
- package/dist/docs/relations/hierarchy.mdx +13 -2
- package/dist/domain/actions/action-factory.d.ts +4 -4
- package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -1
- 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 +1 -3
- package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
- package/dist/domain/admin-domain/index.d.ts +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +25 -75
- package/dist/domain/application/assistant/assistant-manifest.d.ts +61 -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/{phoenix/application-spec → domain/application/assistant}/generate-assistant-prompt.d.ts +3 -3
- package/dist/{phoenix/application-spec → domain/application/assistant}/generate-assistant-prompt.js +1 -1
- 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 +2 -4
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +2 -4
- package/dist/domain/application/configurator-builder.d.ts +33 -18
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/element-registration.d.ts +5 -0
- package/dist/domain/application/element-registration.js +1 -1
- package/dist/domain/application/handler-registration.d.ts +5 -0
- package/dist/domain/application/handler-registration.js +1 -1
- package/dist/domain/application/index.d.ts +5 -4
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
- package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
- package/dist/domain/application/resolve-imported-transformers.js +1 -1
- package/dist/domain/components/component-reader-types.d.ts +1 -2
- package/dist/domain/components/debug-state-component.d.ts +1 -1
- package/dist/domain/components/debug-state-component.js +1 -1
- package/dist/domain/components/domain-component-optic.d.ts +4 -5
- package/dist/domain/components/domain-component-optic.js +2 -2
- package/dist/domain/components/drag-state-component.d.ts +1 -1
- package/dist/domain/components/drag-state-component.js +1 -1
- package/dist/domain/components/export-state-component.d.ts +1 -1
- package/dist/domain/components/export-state-component.js +1 -1
- package/dist/domain/components/fullscreen-state-component.d.ts +1 -1
- package/dist/domain/components/fullscreen-state-component.js +1 -1
- package/dist/domain/components/group-components-by-entity-id-and-name.d.ts +1 -2
- package/dist/domain/components/group-components-by-entity-id-and-name.js +1 -1
- package/dist/domain/components/hover-state-component.d.ts +1 -1
- package/dist/domain/components/hover-state-component.js +1 -1
- package/dist/domain/components/legacy-filter.d.ts +1 -2
- package/dist/domain/components/navigation-state-component.d.ts +1 -1
- package/dist/domain/components/navigation-state-component.js +1 -1
- package/dist/domain/components/selection-state-component.d.ts +1 -1
- package/dist/domain/components/selection-state-component.js +1 -1
- package/dist/domain/components/system-component-builder.d.ts +1 -2
- package/dist/domain/components/system-component-builder.js +1 -1
- package/dist/domain/components/system-component-filter.d.ts +1 -3
- package/dist/domain/components/system-virtual-entity.js +1 -1
- package/dist/domain/components/tool-state-component.d.ts +1 -1
- package/dist/domain/components/tool-state-component.js +1 -1
- package/dist/domain/components/updates.d.ts +1 -2
- package/dist/domain/components/view-state-component.d.ts +1 -1
- package/dist/domain/components/view-state-component.js +1 -1
- package/dist/domain/components/viewport-state-component.d.ts +1 -1
- package/dist/domain/components/viewport-state-component.js +1 -1
- package/dist/domain/core/action.d.ts +2 -2
- 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 +1 -2
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/domain.d.ts +1 -2
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/expression.d.ts +1 -2
- package/dist/domain/core/index.d.ts +8 -17
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/core/migrations.d.ts +1 -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/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.d.ts +1 -2
- package/dist/domain/domain-builder.d.ts +11 -8
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +1 -3
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/create-transformer.d.ts +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +1 -2
- package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
- package/dist/domain/domain-context/recipe-system/recipes.d.ts +1 -3
- package/dist/domain/domain-context/recipe-system/recipes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
- package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -2
- package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
- package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -2
- 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 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +1 -3
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
- package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -2
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
- package/dist/domain/domain-context/transformers/context.d.ts +1 -2
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
- package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/then-builder.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -3
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -2
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -4
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +3 -3
- package/dist/domain/expressions/constant-expressions.d.ts +1 -3
- package/dist/domain/expressions/custom-expression.d.ts +1 -4
- package/dist/domain/expressions/memoize-expression.d.ts +1 -2
- package/dist/domain/expressions/prepare-domain-expressions.d.ts +1 -1
- package/dist/domain/index.d.ts +3 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/invariants/builtin-invariant.d.ts +1 -2
- package/dist/domain/invariants/custom-invariants.d.ts +1 -2
- package/dist/domain/invariants/invariants.d.ts +10 -4
- package/dist/domain/invariants/invariants.js +1 -1
- package/dist/domain/invariants/violation.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +3 -3
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/project-modules/index.d.ts +1 -0
- package/dist/domain/project-modules/index.js +1 -0
- package/dist/domain/project-modules/project-modules.d.ts +41 -0
- package/dist/domain/project-modules/project-modules.js +1 -0
- package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
- package/dist/domain/projections/snap-matching.d.ts +1 -2
- package/dist/domain/projections/snap-utils.d.ts +1 -2
- package/dist/domain/relations/all-of-type-relation.d.ts +1 -4
- package/dist/domain/relations/all-of-type-relation.js +1 -1
- package/dist/domain/relations/component-factories.d.ts +1 -2
- package/dist/domain/relations/composed-of.d.ts +1 -1
- package/dist/domain/relations/composed-of.js +1 -1
- package/dist/domain/relations/direct-relation.d.ts +1 -3
- package/dist/domain/relations/indirect-relation.d.ts +1 -4
- package/dist/domain/relations/indirect-relation.js +1 -1
- package/dist/domain/relations/reference-component.d.ts +1 -2
- package/dist/domain/relations/reference-component.js +1 -1
- package/dist/domain/relations/reference-field.d.ts +1 -1
- package/dist/domain/relations/relation-factory.d.ts +1 -3
- package/dist/domain/relations/relation-implementation.d.ts +1 -4
- 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-indicator.d.ts +1 -1
- package/dist/domain/system-components/angle-indicator.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/autorotate-camera-component.d.ts +1 -1
- package/dist/domain/system-components/basic-sidebar-footer.d.ts +1 -1
- package/dist/domain/system-components/basic-sidebar-footer.js +1 -1
- package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/camera-based-hidden-entity-object.js +1 -1
- package/dist/domain/system-components/camera-based-hidden-entity.js +1 -1
- package/dist/domain/system-components/canvas-config.d.ts +1 -1
- package/dist/domain/system-components/canvas-config.js +1 -1
- package/dist/domain/system-components/canvas-padding.d.ts +1 -1
- package/dist/domain/system-components/canvas-padding.js +1 -1
- package/dist/domain/system-components/canvas-preset-environment.d.ts +1 -1
- package/dist/domain/system-components/canvas-preset-environment.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -1
- package/dist/domain/system-components/client-side-image.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +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-point-geometry.d.ts +1 -1
- package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +1 -1
- package/dist/domain/system-components/common/dimension-indicator-schema.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +1 -1
- package/dist/domain/system-components/create-blueprint.d.ts +1 -1
- package/dist/domain/system-components/custom-header.d.ts +1 -1
- package/dist/domain/system-components/custom-header.js +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/custom-sidebar-footer.d.ts +1 -1
- package/dist/domain/system-components/custom-sidebar-footer.js +1 -1
- package/dist/domain/system-components/dimension-indicator.d.ts +1 -1
- package/dist/domain/system-components/dimension-indicator.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/editable-angle-indicator.d.ts +1 -1
- package/dist/domain/system-components/editable-angle-indicator.js +1 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +1 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.js +1 -1
- package/dist/domain/system-components/editable-offset-indicator.d.ts +1 -1
- package/dist/domain/system-components/editable-offset-indicator.js +1 -1
- package/dist/domain/system-components/editable-size-indicator.d.ts +1 -1
- package/dist/domain/system-components/editable-size-indicator.js +1 -1
- package/dist/domain/system-components/exit-tool-mode-fab.d.ts +1 -1
- package/dist/domain/system-components/exit-tool-mode-fab.js +1 -1
- package/dist/domain/system-components/finalize-action.d.ts +1 -1
- package/dist/domain/system-components/finalize-action.js +1 -1
- package/dist/domain/system-components/fixed-header.d.ts +1 -1
- package/dist/domain/system-components/fixed-header.js +1 -1
- package/dist/domain/system-components/floating-header.d.ts +1 -1
- package/dist/domain/system-components/floating-header.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-header.d.ts +1 -1
- package/dist/domain/system-components/hidden-header.js +1 -1
- package/dist/domain/system-components/hidden-sidebar-footer.d.ts +1 -1
- package/dist/domain/system-components/hidden-sidebar-footer.js +1 -1
- package/dist/domain/system-components/horizontal-tabs.d.ts +1 -1
- package/dist/domain/system-components/horizontal-tabs.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +1 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/offset-anchors.d.ts +1 -1
- package/dist/domain/system-components/offset-anchors.js +1 -1
- package/dist/domain/system-components/offset-indicator.d.ts +1 -2
- package/dist/domain/system-components/offset-indicator.js +1 -1
- package/dist/domain/system-components/offset.d.ts +1 -1
- package/dist/domain/system-components/offset.js +1 -1
- package/dist/domain/system-components/other-action.d.ts +1 -1
- package/dist/domain/system-components/other-action.js +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/property-page.d.ts +1 -1
- package/dist/domain/system-components/property-page.js +1 -1
- package/dist/domain/system-components/read-sidebar-footer.d.ts +1 -1
- package/dist/domain/system-components/read-sidebar-footer.js +1 -1
- package/dist/domain/system-components/save-template-thumbnail.js +1 -1
- package/dist/domain/system-components/scene-entity-add-fab.js +1 -1
- package/dist/domain/system-components/scene-entity-delete-fab.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-navigation-hotspot.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-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/sidebar-tabs.d.ts +1 -1
- package/dist/domain/system-components/sidebar-tabs.js +1 -1
- package/dist/domain/system-components/simple-summary.js +1 -1
- package/dist/domain/system-components/size.d.ts +1 -1
- package/dist/domain/system-components/size.js +1 -1
- package/dist/domain/system-components/sketching-draw.d.ts +1 -1
- package/dist/domain/system-components/sketching-draw.js +1 -1
- package/dist/domain/system-components/sketching-edit.d.ts +1 -1
- package/dist/domain/system-components/sketching-edit.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/summary-component.js +1 -1
- package/dist/domain/system-components/tool-menu-fab.d.ts +1 -1
- package/dist/domain/system-components/tool-menu-fab.js +1 -1
- package/dist/domain/system-components/toolbar.d.ts +1 -1
- package/dist/domain/system-components/toolbar.js +1 -1
- package/dist/domain/system-components/universal-sidebar-footer.d.ts +1 -1
- package/dist/domain/system-components/universal-sidebar-footer.js +1 -1
- package/dist/domain/utils/eval-cache.d.ts +1 -2
- package/dist/domain/utils/memo-eval.d.ts +1 -3
- package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -6
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
- 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/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/resolve-deployment-data.d.ts +4 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/scripts/build-admin.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/variant-file-session.js +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 +4 -4
- package/dist/webhook/builders/common.d.ts +3 -0
- package/dist/webhook/builders/webhook-builder.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +3 -3
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/reflection.js +0 -1
- /package/dist/domain/{core/enhanced-json-schema.js → application/assistant/assistant-manifest.js} +0 -0
- /package/dist/domain/{core/schema-validator.js → application/assistant/assistant-resolved-manifest.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/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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DomainComponentOptic } from '../../components/index.js';
|
|
2
|
-
import { type AnyDomain } from '../../core/
|
|
3
|
-
import type { AnyDomainFactory, AnyExpressionContext, DomainEntity, DomainMode, SystemComponentTypeConstraint } from '../../core/index.js';
|
|
2
|
+
import { type AnyDomain, type AnyDomainFactory, type AnyExpressionContext, type DomainEntity, type DomainMode, type SystemComponentTypeConstraint } from '../../core/index.js';
|
|
4
3
|
import { type AnyActionSystem } from '../../domain-context/action-system/action-system.js';
|
|
5
4
|
import { type AnyDimensionSystem } from '../../domain-context/dimension-system/dimension-system.js';
|
|
6
5
|
import type { AnyDomainContextSystems } from '../../domain-context/domain-context-systems.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";import{prepareActionImplementations as t}from"../../actions/prepare-action-implementations.js";import{Domain as n}from"../../core/domain.js";import{createInitialDomainState as o}from"../../core/state.js";import{ActionSystem as i}from"../../domain-context/action-system/action-system.js";import{DimensionSystem as a}from"../../domain-context/dimension-system/dimension-system.js";import{NavigationSystem as s}from"../../domain-context/navigation-system/navigation-system.js";import{RecipeCookerSystem as r}from"../../domain-context/recipe-system/recipe-cooker-system.js";import{StoreSystem as c}from"../../domain-context/store-system/store-system.js";import{UndoSystem as m}from"../../domain-context/undo-system.js";import{prepareDomainExpressions as l}from"../../expressions/index.js";import{BlenderProjections as d,CollisionProjections as g,CompositionProjections as f,ConstraintProjections as p,PositionProjections as u,ProjectedEntitiesProjections as y,SnappingProjections as w,ValidationProjections as h}from"../../projections/index.js";import{SketchingProjections as S}from"../../sketching/sketching-projections.js";import{requireAccessService as x}from"../access/index.js";import{ComponentReader as j}from"./component-reader.js";import{DomainContext as C}from"./domain-context.js";let D=e.withTypes(),v=[],I={},P={role:"admin",data:I},M=e=>{if(null!==e)return e;throw Error("Cannot read the session role and data because the domain session context is not set. The session context is written into the domain runtime by the session lifecycle after authentication. Move this read into the loaded session lifecycle.")};export const createDomainContextSelectors=e=>{let{applicationType:A,getState:R,actions:E,specSelectors:T,accessSelectors:b,webComponentSelectors:k,domainDataSelectors:$,sessionContextSelectors:N,domainServicesSelectors:z,environmentSelectors:L,getExtensionSystems:V}=e,B="configurator"===A?T.selectConfiguratorSpec:T.selectAdminSpec,F="configurator"===A?b.selectConfiguratorRawAccessService:b.selectAdminRawAccessService,W=D.leaf(e=>e.domainContext[A]),_=D([W],e=>e.initializationContext),q=D([_],e=>{if(null===e)throw Error(`Domain lifecycle context is not available for ${A}! Read it from an active domain lifecycle.`);return e}),O=D([W],e=>e.executionMode),U=D([W],e=>e.isInitialized),G=D([B],e=>e.factory),H=D([B],e=>e.expressions),J=D([B],e=>e.actions),K=D([B],e=>e.actionImplementations),Q=D([J,K],t),X=D([B],e=>e.$entityReflections),Y=D([H,X],(e,t)=>l({expressions:e,$entityReflections:t})),Z=D([B],e=>e.modelVersion),ee=D([B],e=>e.aliasMap),et=D([B],e=>e.allowedRootEntityTypes),en=D([B],e=>e.entityReflections),eo=D([B],e=>e.migrate),ei=D([O,k.selectReadonly,F],(e,t,n)=>"finalize"===e?"finalize":x(A,n).accessInfo.viewMode||t?"read":"owner"),ea=D([F],e=>e?.configurationId??null),es="configurator"===A?N.selectSessionContext:D([],()=>P),er=D([es],e=>e?.role??null),ec=D([es],e=>e?.data??null),em=D([D.leaf(e=>e.loadedData)],e=>"configurator"===A?e.configuratorLoadedData:e.adminLoadedData),el=D([em],e=>e?.schemaIdentity??null),ed=D([em,G],(e,t)=>{if(null===e)return"coherent";let n=e.schemaIdentity;return void 0===n?"missing-stamp":n===t?"coherent":"schema-mismatch"}),eg=D([ea,er,ec,el,ed],(e,t,n,o,i)=>null===e||null===t||null===n||null===o||"coherent"!==i?null:{configurationId:e,role:t,schemaIdentity:o,sessionData:n}),ef=D([F,k.selectReadonly],(e,t)=>e?.accessInfo.viewMode===!0||t),ep=D([eg,_,U,ef],(e,t,n,o)=>{let i=null!==e&&null!==t&&n&&t.configurationId===e.configurationId&&t.role===e.role&&t.schemaIdentity===e.schemaIdentity&&t.sessionData===e.sessionData;return{identity:e,isCurrent:i,isViewMode:o}}),eu=D([B],e=>e.componentOptics),ey=D([eu],e=>(e=>{let t=new Map,n=new Map,o=new Map,i=new Map;for(let n of e)for(let e of n.entityTypes){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n.componentType);if(a||(a=new Map,o.set(n.componentType,a)),a.has(n.instanceName))throw Error(`Component instance ${n.instanceName} already exists for type ${n.componentType.name} in entity ${e}. This is likely a bug in the component definition! InstanceNames must be unique within an entity and component.`);if(a.set(n.instanceName,n),"dynamic"===n.kind){let t=i.get(e);t||(t=new Map,i.set(e,t));let o=t.get(n.componentType)??[],a=o.find(e=>{var t;return t=n.instanceName,e.startsWith(`${t}_`)||t.startsWith(`${e}_`)});if(a)throw Error(`Cannot register dynamic component instance ${n.instanceName} for component ${n.componentType.name} on entity ${e} because it overlaps with dynamic instance ${a}. Rename one dynamic instance so compound names cannot be ambiguous.`);t.set(n.componentType,[...o,n.instanceName])}}for(let[e,i]of t.entries()){n.set(e,new Set(i.keys()));let t=new Map;for(let[n,a]of(o.set(e,t),i.entries()))t.set(n,new Set(a.keys()))}return{opticMap:t,allComponentTypes:n,allComponentInstanceNames:o,dynamicInstanceNames:i}})(e)),ew=D([ey,Y,et],(e,t,n)=>({componentReaderIndexes:e,domainExpressions:t,allowedRootEntityTypes:n})),eh=D([B],e=>e.navigationStates),eS=D([B],e=>e.viewStates),ex="configurator"===A?D([T.selectConfiguratorSpec],e=>e.toolStates):D([],()=>v),ej="configurator"===A?D([T.selectConfiguratorSpec],e=>e.exportStates):D([],()=>v),eC="configurator"===A?D([T.selectConfiguratorSpec],e=>e.createTransformers):D([],()=>void 0),eD=D([em],e=>{if(null===e)throw Error(`Loaded data is not available for ${A}! Loaded data is written after the configuration fetch succeeds and before the domain context initialization starts.`);return e}),ev=D([eD,G],(e,t)=>o(t.validateAndMigrateState(e.initialEntities,e.modelVersion),e.rootEntityType)),eI="configurator"===A?$.selectConfiguratorFrontendData:$.selectAdminFrontendData,eP="configurator"===A?$.selectConfiguratorBackendData:$.selectAdminBackendData,eM="configurator"===A?$.selectConfiguratorPublishedData:$.selectAdminPublishedData,eA="configurator"===A?D([N.selectSessionContext],e=>M(e).role):D([],()=>"admin"),eR="configurator"===A?D([N.selectSessionContext],e=>M(e).data):D([],()=>I),eE=D([ea,ei,eA,eR,eD],(e,t,n,o,i)=>({configurationId:e,mode:t,role:n,schemaIdentity:i.schemaIdentity,sessionData:o})),eT=D([q],e=>e.mode),eb=D([q],e=>{let t=e.configurationId;if(null===t)throw Error(`Configuration id is not available for ${A}! Read it from an active interactive domain lifecycle.`);return t}),ek=D([q],e=>e.role),e$=D([q],e=>e.sessionData),eN=D([eT,ek,e$,eI,eP,eM,eo],(e,t,n,o,i,a,s)=>({mode:e,role:t,sessionData:n,frontendData:o,backendData:i,publishedData:a,migrate:s,domain:eL,componentReader:eV,positionProjections:eq,sketchingProjections:e_,collisionProjections:eO,constraintProjections:eG,snappingProjections:eU,projectedEntitiesProjections:eH})),ez={selectApplicationSpec:B,selectRawAccessService:F,selectDomainContextState:W,selectInitializationContext:_,selectActiveInitializationContext:q,selectExecutionMode:O,selectIsInitialized:U,selectFactory:G,selectSpecExpressions:H,select$SpecEntityReflections:X,selectDomainExpressions:Y,selectModelVersion:Z,selectAliasMap:ee,selectAllowedRootEntityTypes:et,selectEntityReflections:en,selectMigrate:eo,selectLatestMode:ei,selectLatestConfigurationId:ea,selectLatestSessionContext:es,selectLatestRoleOrNull:er,selectLatestSessionDataOrNull:ec,selectLatestSchemaIdentity:el,selectSchemaCoherence:ed,selectInitializationIdentity:eg,selectIsViewMode:ef,selectInitializationState:ep,selectComponentOptics:eu,selectComponentReaderIndexes:ey,selectStoreRuntimeDependencies:ew,selectNavigationStates:eh,selectViewStates:eS,selectToolStates:ex,selectExportStates:ej,selectCreateTransformers:eC,selectLatestLoadedData:em,selectLoadedData:eD,selectInitialDomainState:ev,selectFrontendData:eI,selectBackendData:eP,selectPublishedData:eM,selectLatestRole:eA,selectLatestSessionData:eR,selectNextInitializationContext:eE,selectActiveMode:eT,selectActiveConfigurationId:eb,selectActiveRole:ek,selectActiveSessionData:e$,selectExpressionContext:eN,getInitializationContext:()=>_(R()),getInitializationState:()=>ep(R()),getNextInitializationContext:()=>eE(R()),getLatestLoadedData:()=>em(R()),getSchemaCoherence:()=>ed(R()),getActiveConfigurationId:()=>eb(R()),getFactory:()=>G(R()),getDomainExpressions:()=>Y(R()),getActionDefinitions:()=>J(R()),getActionImplementations:()=>Q(R()),getModelVersion:()=>Z(R()),getAliasMap:()=>ee(R()),getAllowedRootEntityTypes:()=>et(R()),getEntityReflections:()=>en(R()),getMigrate:()=>eo(R()),getActiveMode:()=>eT(R()),getIsInitialized:()=>U(R()),getComponentReaderIndexes:()=>ey(R()),getStoreRuntimeDependencies:()=>ew(R()),getNavigationStates:()=>eh(R()),getViewStates:()=>eS(R()),getToolStates:()=>ex(R()),getExportStates:()=>ej(R()),getCreateTransformers:()=>eC(R()),getLoadedData:()=>eD(R()),getInitialDomainState:()=>ev(R()),getFrontendData:()=>eI(R()),getBackendData:()=>eP(R()),getPublishedData:()=>eM(R()),getActiveRole:()=>ek(R()),getActiveSessionData:()=>e$(R()),getDomain:()=>eL,getComponentReader:()=>eV,getCompositionProjections:()=>eB,getDimensionSystem:()=>eF,getValidationProjections:()=>eW,getSketchingProjections:()=>e_,getPositionProjections:()=>eq,getCollisionProjections:()=>eO,getSnappingProjections:()=>eU,getConstraintProjections:()=>eG,getProjectedEntitiesProjections:()=>eH,getStoreSystem:()=>eJ,getNavigationSystem:()=>eK,getUndoSystem:()=>eQ,getRecipeCookerSystem:()=>eX,getActionSystem:()=>eY,getBlenderProjections:()=>eZ,getExpressionContext:()=>eN(R()),getDomainSystems:function(){return e0},getDomainContext:function(){return e1}},eL=new n({selectors:ez}),eV=new j({selectors:ez}),eB=new f({selectors:ez}),eF=new a({selectors:ez}),eW=new h({selectors:ez}),e_=new S({selectors:ez}),eq=new u({selectors:ez}),eO=new g({selectors:ez}),eU=new w({selectors:ez}),eG=new p({selectors:ez}),eH=new y({selectors:ez}),eJ=new c({selectors:ez,domainServicesSelectors:z,environmentSelectors:L}),eK=new s({selectors:ez,domainServicesSelectors:z}),eQ=new m({selectors:ez}),eX=new r({selectors:ez}),eY=new i({selectors:ez}),eZ=new d({selectors:ez,domainServicesSelectors:z}),e0={domainContextSelectors:ez,domain:eL,componentReader:eV,compositionProjections:eB,blenderProjections:eZ,validationProjections:eW,storeSystem:eJ,navigationSystem:eK,dimensionSystem:eF,undoSystem:eQ,recipeCooker:eX,actionSystem:eY,sketchingProjections:e_,collisionProjections:eO,positionProjections:eq,snappingProjections:eU,projectedEntitiesProjections:eH,constraintProjections:eG},e1=new C({selectors:ez,actions:E,getExtensionSystems:V});return ez};
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{prepareActionImplementations as t}from"../../actions/prepare-action-implementations.js";import{Domain as n,createInitialDomainState as o}from"../../core/index.js";import{ActionSystem as i}from"../../domain-context/action-system/action-system.js";import{DimensionSystem as a}from"../../domain-context/dimension-system/dimension-system.js";import{NavigationSystem as s}from"../../domain-context/navigation-system/navigation-system.js";import{RecipeCookerSystem as r}from"../../domain-context/recipe-system/recipe-cooker-system.js";import{StoreSystem as c}from"../../domain-context/store-system/store-system.js";import{UndoSystem as m}from"../../domain-context/undo-system.js";import{prepareDomainExpressions as l}from"../../expressions/index.js";import{BlenderProjections as d,CollisionProjections as g,CompositionProjections as f,ConstraintProjections as p,PositionProjections as u,ProjectedEntitiesProjections as y,SnappingProjections as w,ValidationProjections as h}from"../../projections/index.js";import{SketchingProjections as S}from"../../sketching/sketching-projections.js";import{requireAccessService as x}from"../access/index.js";import{ComponentReader as j}from"./component-reader.js";import{DomainContext as C}from"./domain-context.js";let D=e.withTypes(),v=[],I={},P={role:"admin",data:I},M=e=>{if(null!==e)return e;throw Error("Cannot read the session role and data because the domain session context is not set. The session context is written into the domain runtime by the session lifecycle after authentication. Move this read into the loaded session lifecycle.")};export const createDomainContextSelectors=e=>{let{applicationType:A,getState:R,actions:E,specSelectors:T,accessSelectors:b,webComponentSelectors:k,domainDataSelectors:$,sessionContextSelectors:N,domainServicesSelectors:z,environmentSelectors:L,getExtensionSystems:V}=e,B="configurator"===A?T.selectConfiguratorSpec:T.selectAdminSpec,F="configurator"===A?b.selectConfiguratorRawAccessService:b.selectAdminRawAccessService,W=D.leaf(e=>e.domainContext[A]),_=D([W],e=>e.initializationContext),q=D([_],e=>{if(null===e)throw Error(`Domain lifecycle context is not available for ${A}! Read it from an active domain lifecycle.`);return e}),O=D([W],e=>e.executionMode),U=D([W],e=>e.isInitialized),G=D([B],e=>e.factory),H=D([B],e=>e.expressions),J=D([B],e=>e.actions),K=D([B],e=>e.actionImplementations),Q=D([J,K],t),X=D([B],e=>e.$entityReflections),Y=D([H,X],(e,t)=>l({expressions:e,$entityReflections:t})),Z=D([B],e=>e.modelVersion),ee=D([B],e=>e.aliasMap),et=D([B],e=>e.allowedRootEntityTypes),en=D([B],e=>e.entityReflections),eo=D([B],e=>e.migrate),ei=D([O,k.selectReadonly,F],(e,t,n)=>"finalize"===e?"finalize":x(A,n).accessInfo.viewMode||t?"read":"owner"),ea=D([F],e=>e?.configurationId??null),es="configurator"===A?N.selectSessionContext:D([],()=>P),er=D([es],e=>e?.role??null),ec=D([es],e=>e?.data??null),em=D([D.leaf(e=>e.loadedData)],e=>"configurator"===A?e.configuratorLoadedData:e.adminLoadedData),el=D([em],e=>e?.schemaIdentity??null),ed=D([em,G],(e,t)=>{if(null===e)return"coherent";let n=e.schemaIdentity;return void 0===n?"missing-stamp":n===t?"coherent":"schema-mismatch"}),eg=D([ea,er,ec,el,ed],(e,t,n,o,i)=>null===e||null===t||null===n||null===o||"coherent"!==i?null:{configurationId:e,role:t,schemaIdentity:o,sessionData:n}),ef=D([F,k.selectReadonly],(e,t)=>e?.accessInfo.viewMode===!0||t),ep=D([eg,_,U,ef],(e,t,n,o)=>{let i=null!==e&&null!==t&&n&&t.configurationId===e.configurationId&&t.role===e.role&&t.schemaIdentity===e.schemaIdentity&&t.sessionData===e.sessionData;return{identity:e,isCurrent:i,isViewMode:o}}),eu=D([B],e=>e.componentOptics),ey=D([eu],e=>(e=>{let t=new Map,n=new Map,o=new Map,i=new Map;for(let n of e)for(let e of n.entityTypes){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n.componentType);if(a||(a=new Map,o.set(n.componentType,a)),a.has(n.instanceName))throw Error(`Component instance ${n.instanceName} already exists for type ${n.componentType.name} in entity ${e}. This is likely a bug in the component definition! InstanceNames must be unique within an entity and component.`);if(a.set(n.instanceName,n),"dynamic"===n.kind){let t=i.get(e);t||(t=new Map,i.set(e,t));let o=t.get(n.componentType)??[],a=o.find(e=>{var t;return t=n.instanceName,e.startsWith(`${t}_`)||t.startsWith(`${e}_`)});if(a)throw Error(`Cannot register dynamic component instance ${n.instanceName} for component ${n.componentType.name} on entity ${e} because it overlaps with dynamic instance ${a}. Rename one dynamic instance so compound names cannot be ambiguous.`);t.set(n.componentType,[...o,n.instanceName])}}for(let[e,i]of t.entries()){n.set(e,new Set(i.keys()));let t=new Map;for(let[n,a]of(o.set(e,t),i.entries()))t.set(n,new Set(a.keys()))}return{opticMap:t,allComponentTypes:n,allComponentInstanceNames:o,dynamicInstanceNames:i}})(e)),ew=D([ey,Y,et],(e,t,n)=>({componentReaderIndexes:e,domainExpressions:t,allowedRootEntityTypes:n})),eh=D([B],e=>e.navigationStates),eS=D([B],e=>e.viewStates),ex="configurator"===A?D([T.selectConfiguratorSpec],e=>e.toolStates):D([],()=>v),ej="configurator"===A?D([T.selectConfiguratorSpec],e=>e.exportStates):D([],()=>v),eC="configurator"===A?D([T.selectConfiguratorSpec],e=>e.createTransformers):D([],()=>void 0),eD=D([em],e=>{if(null===e)throw Error(`Loaded data is not available for ${A}! Loaded data is written after the configuration fetch succeeds and before the domain context initialization starts.`);return e}),ev=D([eD,G],(e,t)=>o(t.validateAndMigrateState(e.initialEntities,e.modelVersion),e.rootEntityType)),eI="configurator"===A?$.selectConfiguratorFrontendData:$.selectAdminFrontendData,eP="configurator"===A?$.selectConfiguratorBackendData:$.selectAdminBackendData,eM="configurator"===A?$.selectConfiguratorPublishedData:$.selectAdminPublishedData,eA="configurator"===A?D([N.selectSessionContext],e=>M(e).role):D([],()=>"admin"),eR="configurator"===A?D([N.selectSessionContext],e=>M(e).data):D([],()=>I),eE=D([ea,ei,eA,eR,eD],(e,t,n,o,i)=>({configurationId:e,mode:t,role:n,schemaIdentity:i.schemaIdentity,sessionData:o})),eT=D([q],e=>e.mode),eb=D([q],e=>{let t=e.configurationId;if(null===t)throw Error(`Configuration id is not available for ${A}! Read it from an active interactive domain lifecycle.`);return t}),ek=D([q],e=>e.role),e$=D([q],e=>e.sessionData),eN=D([eT,ek,e$,eI,eP,eM,eo],(e,t,n,o,i,a,s)=>({mode:e,role:t,sessionData:n,frontendData:o,backendData:i,publishedData:a,migrate:s,domain:eL,componentReader:eV,positionProjections:eq,sketchingProjections:e_,collisionProjections:eO,constraintProjections:eG,snappingProjections:eU,projectedEntitiesProjections:eH})),ez={selectApplicationSpec:B,selectRawAccessService:F,selectDomainContextState:W,selectInitializationContext:_,selectActiveInitializationContext:q,selectExecutionMode:O,selectIsInitialized:U,selectFactory:G,selectSpecExpressions:H,select$SpecEntityReflections:X,selectDomainExpressions:Y,selectModelVersion:Z,selectAliasMap:ee,selectAllowedRootEntityTypes:et,selectEntityReflections:en,selectMigrate:eo,selectLatestMode:ei,selectLatestConfigurationId:ea,selectLatestSessionContext:es,selectLatestRoleOrNull:er,selectLatestSessionDataOrNull:ec,selectLatestSchemaIdentity:el,selectSchemaCoherence:ed,selectInitializationIdentity:eg,selectIsViewMode:ef,selectInitializationState:ep,selectComponentOptics:eu,selectComponentReaderIndexes:ey,selectStoreRuntimeDependencies:ew,selectNavigationStates:eh,selectViewStates:eS,selectToolStates:ex,selectExportStates:ej,selectCreateTransformers:eC,selectLatestLoadedData:em,selectLoadedData:eD,selectInitialDomainState:ev,selectFrontendData:eI,selectBackendData:eP,selectPublishedData:eM,selectLatestRole:eA,selectLatestSessionData:eR,selectNextInitializationContext:eE,selectActiveMode:eT,selectActiveConfigurationId:eb,selectActiveRole:ek,selectActiveSessionData:e$,selectExpressionContext:eN,getInitializationContext:()=>_(R()),getInitializationState:()=>ep(R()),getNextInitializationContext:()=>eE(R()),getLatestLoadedData:()=>em(R()),getSchemaCoherence:()=>ed(R()),getActiveConfigurationId:()=>eb(R()),getFactory:()=>G(R()),getDomainExpressions:()=>Y(R()),getActionDefinitions:()=>J(R()),getActionImplementations:()=>Q(R()),getModelVersion:()=>Z(R()),getAliasMap:()=>ee(R()),getAllowedRootEntityTypes:()=>et(R()),getEntityReflections:()=>en(R()),getMigrate:()=>eo(R()),getActiveMode:()=>eT(R()),getIsInitialized:()=>U(R()),getComponentReaderIndexes:()=>ey(R()),getStoreRuntimeDependencies:()=>ew(R()),getNavigationStates:()=>eh(R()),getViewStates:()=>eS(R()),getToolStates:()=>ex(R()),getExportStates:()=>ej(R()),getCreateTransformers:()=>eC(R()),getLoadedData:()=>eD(R()),getInitialDomainState:()=>ev(R()),getFrontendData:()=>eI(R()),getBackendData:()=>eP(R()),getPublishedData:()=>eM(R()),getActiveRole:()=>ek(R()),getActiveSessionData:()=>e$(R()),getDomain:()=>eL,getComponentReader:()=>eV,getCompositionProjections:()=>eB,getDimensionSystem:()=>eF,getValidationProjections:()=>eW,getSketchingProjections:()=>e_,getPositionProjections:()=>eq,getCollisionProjections:()=>eO,getSnappingProjections:()=>eU,getConstraintProjections:()=>eG,getProjectedEntitiesProjections:()=>eH,getStoreSystem:()=>eJ,getNavigationSystem:()=>eK,getUndoSystem:()=>eQ,getRecipeCookerSystem:()=>eX,getActionSystem:()=>eY,getBlenderProjections:()=>eZ,getExpressionContext:()=>eN(R()),getDomainSystems:function(){return e0},getDomainContext:function(){return e1}},eL=new n({selectors:ez}),eV=new j({selectors:ez}),eB=new f({selectors:ez}),eF=new a({selectors:ez}),eW=new h({selectors:ez}),e_=new S({selectors:ez}),eq=new u({selectors:ez}),eO=new g({selectors:ez}),eU=new w({selectors:ez}),eG=new p({selectors:ez}),eH=new y({selectors:ez}),eJ=new c({selectors:ez,domainServicesSelectors:z,environmentSelectors:L}),eK=new s({selectors:ez,domainServicesSelectors:z}),eQ=new m({selectors:ez}),eX=new r({selectors:ez}),eY=new i({selectors:ez}),eZ=new d({selectors:ez,domainServicesSelectors:z}),e0={domainContextSelectors:ez,domain:eL,componentReader:eV,compositionProjections:eB,blenderProjections:eZ,validationProjections:eW,storeSystem:eJ,navigationSystem:eK,dimensionSystem:eF,undoSystem:eQ,recipeCooker:eX,actionSystem:eY,sketchingProjections:e_,collisionProjections:eO,positionProjections:eq,snappingProjections:eU,projectedEntitiesProjections:eH,constraintProjections:eG},e1=new C({selectors:ez,actions:E,getExtensionSystems:V});return ez};
|
|
@@ -61,7 +61,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
61
61
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyProductPreset>;
|
|
62
62
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, number>;
|
|
63
63
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
64
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AssistantManifest | null>;
|
|
64
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Required<import("../index.js").AssistantManifest> | null>;
|
|
65
65
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
66
66
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
67
67
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
@@ -104,7 +104,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
104
104
|
getAdminPreset: () => import("../index.js").AnyProductPreset;
|
|
105
105
|
getAdminModelVersion: () => number;
|
|
106
106
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
107
|
-
getAssistant: () => import("../index.js").AssistantManifest | null;
|
|
107
|
+
getAssistant: () => Required<import("../index.js").AssistantManifest> | null;
|
|
108
108
|
getConfiguratorFactory: () => import("../index.js").AnyDomainFactory;
|
|
109
109
|
getAdminFactory: () => import("../index.js").AnyDomainFactory;
|
|
110
110
|
getConfiguratorComponentOptics: () => readonly import("../index.js").AnyDomainComponentOptic[];
|
|
@@ -651,7 +651,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
651
651
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyProductPreset>;
|
|
652
652
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, number>;
|
|
653
653
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
654
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AssistantManifest | null>;
|
|
654
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Required<import("../index.js").AssistantManifest> | null>;
|
|
655
655
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
656
656
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
657
657
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
@@ -694,7 +694,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
694
694
|
getAdminPreset: () => import("../index.js").AnyProductPreset;
|
|
695
695
|
getAdminModelVersion: () => number;
|
|
696
696
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
697
|
-
getAssistant: () => import("../index.js").AssistantManifest | null;
|
|
697
|
+
getAssistant: () => Required<import("../index.js").AssistantManifest> | null;
|
|
698
698
|
getConfiguratorFactory: () => import("../index.js").AnyDomainFactory;
|
|
699
699
|
getAdminFactory: () => import("../index.js").AnyDomainFactory;
|
|
700
700
|
getConfiguratorComponentOptics: () => readonly import("../index.js").AnyDomainComponentOptic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SessionRole as
|
|
1
|
+
import{SessionRole as t}from"@salsita-ai/contracts/api";import{resolveElementModules as e}from"../../application/element-registration.js";import{resolveHandlerModules as a}from"../../application/handler-registration.js";import{resolveImportedTransformers as n,resolveTransformerModules as o}from"../../application/resolve-imported-transformers.js";import{resolveComponentOpticModules as i}from"../../components/domain-component-optic.js";export const initializeSpec=s=>{let r=s.adminDomain.presets[0];if(!r)throw Error("Cannot register application spec because admin preset is required.");let m=a(s.handlers),c=e(s.elements),d=(t=>{let e={};for(let a of t)e[a.name]=(void 0)??a.name;return e})(m),l=(t=>{let e={},a=0;for(let n of t)if("entity"===n.type||"layout"===n.type)e[n.name]=(void 0)??n.name;else{let t=`icon:${a}`;e[t]=(void 0)??`${t}:${n.elements.length}`,a+=1}return e})(c),p=o(s.transformers?.importedTransformers??[]),y=s.transformers?.specTransformers??[];return{version:s.version,dataConfig:s.dataSpec??null,chunks:s.chunks,publishedDataHash:s.publishedDataHash,initialPublishedData:s.initialPublishedData,canCreate:s.features?.acl?.canCreate??Object.values(t),enableAdminRelease:s.features?.enableAdminRelease??!1,textLanguages:s.domain.textLanguages??s.adminDomain.textLanguages??["en"],baseResourcesUrl:s.resources?.baseResourcesUrl??s.defaultEnvs?.resourcesUrl??"",configurator:{factory:s.domain.domainFactory,presets:s.domain.presets,aliasMap:s.domain.domainFactory.context.aliasMap,entityReflections:s.domain.domainFactory.context.entityReflections,$entityReflections:s.domain.domainFactory.context.$entityReflections,expressions:s.domain.domainFactory.context.expressions,actions:s.domain.domainFactory.context.actions,actionImplementations:s.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:s.domain.domainFactory.context.allowedRootEntityTypes,migrate:s.domain.domainFactory.context.migrate,componentOptics:i(s.domain.componentOptics),createTransformers:t=>n(p,y,t),navigationStates:s.navigation?.navigationStates??[],viewStates:s.navigation?.viewStates??[],toolStates:s.navigation?.toolStates??[],exportStates:s.navigation?.exportStates??[],handlers:m,handlerHashes:d,elements:c,elementHashes:l,appLoader:s.ui?.appLoader??"universal",preview:s.ui?.preview??"auto",alwaysExpand:s.ui?.alwaysExpand??!1,theme:s.ui?.theme??{},assistant:s.assistant??null,deploymentQueryDisabled:s.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:s.resources?.prefetchTextureUrls??[],modelVersion:s.domain.domainFactory.modelVersion},admin:{factory:s.adminDomain.domainFactory,modelVersion:s.adminDomain.domainFactory.modelVersion,aliasMap:s.adminDomain.domainFactory.context.aliasMap,entityReflections:s.adminDomain.domainFactory.context.entityReflections,$entityReflections:s.adminDomain.domainFactory.context.$entityReflections,expressions:s.adminDomain.domainFactory.context.expressions,actions:s.adminDomain.domainFactory.context.actions,actionImplementations:s.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:s.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:s.adminDomain.domainFactory.context.migrate,preset:r,componentOptics:i(s.adminDomain.componentOptics),navigationStates:s.adminNavigation?.navigationStates??[],viewStates:s.adminNavigation?.viewStates??[],handlers:m,handlerHashes:d,elements:c,elementHashes:l}}};
|
|
@@ -22,7 +22,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
22
22
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("../../index.js").AnyProductPreset>;
|
|
23
23
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<SpecSelectorState, number>;
|
|
24
24
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
25
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("../../index.js").AssistantManifest | null>;
|
|
25
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<SpecSelectorState, Required<import("../../index.js").AssistantManifest> | null>;
|
|
26
26
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("../../index.js").AnyDomainFactory>;
|
|
27
27
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("../../index.js").AnyDomainFactory>;
|
|
28
28
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly import("../../index.js").AnyDomainComponentOptic[]>;
|
|
@@ -65,7 +65,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
65
65
|
getAdminPreset: () => import("../../index.js").AnyProductPreset;
|
|
66
66
|
getAdminModelVersion: () => number;
|
|
67
67
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
68
|
-
getAssistant: () => import("../../index.js").AssistantManifest | null;
|
|
68
|
+
getAssistant: () => Required<import("../../index.js").AssistantManifest> | null;
|
|
69
69
|
getConfiguratorFactory: () => import("../../index.js").AnyDomainFactory;
|
|
70
70
|
getAdminFactory: () => import("../../index.js").AnyDomainFactory;
|
|
71
71
|
getConfiguratorComponentOptics: () => readonly import("../../index.js").AnyDomainComponentOptic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";import{
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";import{systemElementRegistry as n}from"../../application/element-registration.js";export const createSpecSelectors=a=>{let{getState:s}=a,r=e.withTypes(),o=r([r.leaf(e=>e.spec)],e=>e),l=r([o],e=>e.version),i=r([o],e=>e.baseResourcesUrl),m=r([o],e=>e.configurator),g=r([o],e=>e.dataConfig),p=r([o],e=>e.chunks),d=r([o],e=>e.publishedDataHash),c=r([o],e=>e.initialPublishedData),u=r([o],e=>e.canCreate),y=r([o],e=>e.enableAdminRelease),h=r([o],e=>e.textLanguages),f=r([m],e=>e.modelVersion),C=r([o],e=>e.admin),A=r([C],e=>e.preset),E=r([C],e=>e.modelVersion),b=r([m],e=>e.theme),x=r([m],e=>e.assistant),H=r([x],e=>e?t(e):null),D=r([m],e=>e.factory),P=r([C],e=>e.factory),S=r([m],e=>e.componentOptics),w=r([C],e=>e.componentOptics),O=r([m],e=>e.appLoader),T=r([m],e=>e.preview),V=r([m],e=>e.alwaysExpand),L=r([m],e=>e.presets),R=r([m],e=>e.deploymentQueryDisabled),U=r([m],e=>e.prefetchTextureUrls),v=r([m],e=>e.handlerHashes),j=r([m],e=>e.handlers),k=r([j,v],(e,t)=>({...(e=>{let t={},n={},a={};for(let s of e)"phoenix"===s.type&&(t[s.name]=s.handler),"system"===s.type&&(n[s.name]=s.handler),"system-async"===s.type&&(a[s.name]=s.handler);return{handlers:t,systemHandlers:n,systemAsyncHandlers:a}})(e),hashes:t})),F=r([m],e=>e.elementHashes),M=r([m],e=>e.elements),Q=r([M,F],(e,t)=>({...(e=>{let t={},a={};for(let n of e)"layout"===n.type&&(t[n.name]=n.element),"entity"===n.type&&(a[n.name]=n.element);return{entityElements:{...n.entityElements,...a},layoutElements:{...n.layoutElements,...t}}})(e),hashes:t}));return{selectSpec:o,selectVersion:l,selectBaseResourcesUrl:i,selectConfiguratorSpec:m,selectConfiguratorModelVersion:f,selectAdminSpec:C,selectAdminPreset:A,selectAdminModelVersion:E,selectThemeOptions:b,selectAssistant:H,selectConfiguratorFactory:D,selectAdminFactory:P,selectConfiguratorComponentOptics:S,selectAdminComponentOptics:w,selectAppLoader:O,selectPreview:T,selectAlwaysExpand:V,selectPresetSeed:L,selectDeploymentQueryDisabled:R,selectPrefetchTextureUrls:U,selectTextLanguages:h,selectHandlerHashes:v,selectHandlers:j,selectHandlerSlots:k,selectElementHashes:F,selectElements:M,selectElementSlots:Q,selectDataConfig:g,selectChunks:p,selectPublishedDataHash:d,selectInitialPublishedData:c,selectCanCreate:u,selectEnableAdminRelease:y,getVersion:()=>l(s()),getBaseResourcesUrl:()=>i(s()),getConfiguratorSpec:()=>m(s()),getConfiguratorModelVersion:()=>f(s()),getAdminSpec:()=>C(s()),getAdminPreset:()=>A(s()),getAdminModelVersion:()=>E(s()),getThemeOptions:()=>b(s()),getAssistant:()=>H(s()),getConfiguratorFactory:()=>D(s()),getAdminFactory:()=>P(s()),getConfiguratorComponentOptics:()=>S(s()),getAdminComponentOptics:()=>w(s()),getAppLoader:()=>O(s()),getPreview:()=>T(s()),getAlwaysExpand:()=>V(s()),getPresetSeed:()=>L(s()),getDeploymentQueryDisabled:()=>R(s()),getPrefetchTextureUrls:()=>U(s()),getTextLanguages:()=>h(s()),getHandlerHashes:()=>v(s()),getHandlers:()=>j(s()),getHandlerSlots:()=>k(s()),getElementHashes:()=>F(s()),getElements:()=>M(s()),getElementSlots:()=>Q(s()),getDataConfig:()=>g(s()),getChunks:()=>p(s()),getPublishedDataHash:()=>d(s()),getInitialPublishedData:()=>c(s()),getCanCreate:()=>u(s()),getEnableAdminRelease:()=>y(s())}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ThemeOptions } from '@mui/material';
|
|
2
2
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AssistantResolvedManifest, ChunksSpec, DataSpec, ElementRegistration, HandlerRegistration } from '../../application/index.js';
|
|
4
4
|
import type { AnyDomainComponentOptic } from '../../components/index.js';
|
|
5
5
|
import type { ActionDefinitions, Any$EntityReflections, AnyActionImplementations, AnyAliasMap, AnyAllowedRootEntityTypes, AnyDomainFactory, AnyEntityReflections, AnyExpressions, AnyProductPreset, DomainEntity, MigrateFunction } from '../../core/index.js';
|
|
6
6
|
import type { AnyCreateTransformersFactory } from '../../domain-context/store-system/store-system.js';
|
|
@@ -46,10 +46,10 @@ export interface ApplicationConfiguratorSpec {
|
|
|
46
46
|
readonly alwaysExpand: boolean;
|
|
47
47
|
readonly theme: ThemeOptions;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Resolved assistant manifest used to rebuild GraphQL SDL, or `null` when the application
|
|
50
50
|
* spec declares no `assistant` section. Replaced by editor hot reload when the section changes.
|
|
51
51
|
*/
|
|
52
|
-
readonly assistant:
|
|
52
|
+
readonly assistant: AssistantResolvedManifest | null;
|
|
53
53
|
/**
|
|
54
54
|
* When true, resource urls are not suffixed with the `?did=<deploymentId>` cache-busting
|
|
55
55
|
* query — useful for demos serving local blob urls.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/
|
|
2
|
-
import type { AnonymousExpression, ExpressionMetas } from '../core/expression.js';
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
1
|
+
import type { AnonymousExpression, DomainEntity, ExpandAlias, ExpressionMetas, TypeOrAlias } from '../core/index.js';
|
|
4
2
|
export type ConstantExpressions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, CONSTANTS extends Partial<Record<TypeOrAlias<ENTITIES, ALIASES>, Record<string, unknown>>>> = {
|
|
5
3
|
readonly [TYPE_OR_ALIAS in keyof CONSTANTS & string]: {
|
|
6
4
|
readonly [NAME in keyof CONSTANTS[TYPE_OR_ALIAS]]: AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, TYPE_OR_ALIAS>, CONSTANTS[TYPE_OR_ALIAS][NAME]>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { TypeOrAlias } from '../core/
|
|
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';
|
|
1
|
+
import type { $DomainEntity, AnonymousExpression, DomainEntity, DomainState, EntityByType, ExpressionContext, ExpressionMeta, ExpressionMetas, TypeOrAlias } from '../core/index.js';
|
|
5
2
|
import type { AliasedExpressions } from '../domain-builder.js';
|
|
6
3
|
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
4
|
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>> = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Expression, ExpressionOrigin } from '../core/
|
|
2
|
-
import type { DomainEntity, DomainEntityId } from '../core/model.js';
|
|
1
|
+
import type { DomainEntity, DomainEntityId, Expression, ExpressionOrigin } from '../core/index.js';
|
|
3
2
|
export interface ExpressionTrace {
|
|
4
3
|
origin: ExpressionOrigin;
|
|
5
4
|
entityId: DomainEntityId<string>;
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { type ActionImplementationConflicts, findActionImplementationConflicts,
|
|
|
4
4
|
export { createConstantExpressionFactory } from './expressions/constant-expressions.js';
|
|
5
5
|
export { createCustomExpressionFactory } from './expressions/custom-expression.js';
|
|
6
6
|
export { createCustomInvariantFactory, type StaticallyDefinedViolations } from './invariants/custom-invariants.js';
|
|
7
|
-
export { InvariantBuilder } from './invariants/invariants.js';
|
|
7
|
+
export { InvariantBuilder, resolveInvariantModules } from './invariants/invariants.js';
|
|
8
8
|
export type { AliasedInvariants, Invariant } from './invariants/invariants.js';
|
|
9
9
|
export type { Violation, ViolationSeverity, ViolationTypesOf$Entity, EntityViolation } from './invariants/violation.js';
|
|
10
10
|
export { compareSeverity } from './invariants/violation.js';
|
|
@@ -26,7 +26,7 @@ export { viewportStateComponent, isViewportStateComponentSnapshot, isSystemViewp
|
|
|
26
26
|
export { type ComponentSystemFilterState, type ComponentSystemFilterProps, ComponentSystemFilterPropsSchema, getComponentSystemFilterState, CombinedComponentFilterSchema, type GradualComponentSystemFilter, type FilterMismatchReason, type IdOrWithId, } from './components/system-component-filter.js';
|
|
27
27
|
export { ComponentSystemFilterSchema, type ComponentSystemFilter, type DeclarativeComponentSystemFilter, } from './components/legacy-filter.js';
|
|
28
28
|
export type { OneComponentFilter, ManyComponentFilter, ComponentFilter, FilteredOutComponentSnapshot, FilteredOutFilterContext, } from './components/component-reader-types.js';
|
|
29
|
-
export { DomainComponentOpticBuilder, type AnyDomainComponentOptic, type DomainComponentOptic, } from './components/domain-component-optic.js';
|
|
29
|
+
export { DomainComponentOpticBuilder, type AnyDomainComponentOptic, type DomainComponentOptic, resolveComponentOpticModules, } from './components/domain-component-optic.js';
|
|
30
30
|
export { groupComponentsByEntityIdAndName, isEqualGroupedComponentSnapshots, type GroupedComponentSnapshots, } from './components/group-components-by-entity-id-and-name.js';
|
|
31
31
|
export { SystemComponentBuilder } from './components/system-component-builder.js';
|
|
32
32
|
export { type DataUpdate, type StateUpdate, type ComponentModification, isComponentModificationOfType, type DomainEntityCreation, type EntityDeletion, type DomainEntityReplacement, type DomainEntityModification, type EphemeralRecordCreation, type EphemeralRecordDeletion, type EphemeralRecordModification, type DomainEntityStateDelta, systemUpdateFactory, type UpdateFactory, createUpdateFactory, } from './components/updates.js';
|
|
@@ -41,6 +41,7 @@ export * from './sketching/index.js';
|
|
|
41
41
|
export * from './projections/index.js';
|
|
42
42
|
export * from './admin-domain/index.js';
|
|
43
43
|
export * from './application/index.js';
|
|
44
|
+
export { type ProjectModule, resolveActionModules, resolveExpressionModules } from './project-modules/index.js';
|
|
44
45
|
export * from './scene/index.js';
|
|
45
46
|
export { getAllPhxDefinitions } from './system-definitions.js';
|
|
46
47
|
export { availableSystemComponents, componentsByName } from './available-system-components.js';
|
package/dist/domain/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./core/index.js";export{createActionFactory}from"./actions/action-factory.js";export{findActionImplementationConflicts}from"./actions/prepare-action-implementations.js";export{createConstantExpressionFactory}from"./expressions/constant-expressions.js";export{createCustomExpressionFactory}from"./expressions/custom-expression.js";export{createCustomInvariantFactory}from"./invariants/custom-invariants.js";export{InvariantBuilder}from"./invariants/invariants.js";export{compareSeverity}from"./invariants/violation.js";export{violationsComponent}from"./invariants/violation-component.js";export{createRelationFactory}from"./relations/relation-factory.js";export{attachMultipleReferenceComponent,attachSingleReferenceComponent,referenceComponent}from"./relations/reference-component.js";export{composedOfComponent}from"./relations/composed-of.js";export{createSingleReferenceRead,createSingleReferenceWrite,createMultipleReferenceRead,createMultipleReferenceWrite,createSingleCompositionRead,createMultipleCompositionRead,createEmptyWrite}from"./relations/component-factories.js";export{systemVirtualEntityId}from"./components/system-virtual-entity.js";export{navigationStateComponent,isNavigationComponentSnapshot,isSystemNavigationComponentSnapshot}from"./components/navigation-state-component.js";export{hoverStateComponent,isHoverStateComponentSnapshot,isSystemHoverStateComponentSnapshot}from"./components/hover-state-component.js";export{selectionStateComponent,isSelectionComponentSnapshot,isSystemSelectionComponentSnapshot}from"./components/selection-state-component.js";export{viewStateComponent,isViewComponentSnapshot,isSystemViewComponentSnapshot}from"./components/view-state-component.js";export{toolStateComponent,isToolStateComponentSnapshot,isSystemToolStateComponentSnapshot}from"./components/tool-state-component.js";export{debugStateComponent,isDebugStateComponentSnapshot,isSystemDebugStateComponentSnapshot}from"./components/debug-state-component.js";export{fullscreenStateComponent,isFullscreenStateComponentSnapshot,isSystemFullscreenStateComponentSnapshot}from"./components/fullscreen-state-component.js";export{dragStateComponent,isDragStateComponentSnapshot,isSystemDragStateComponentSnapshot}from"./components/drag-state-component.js";export{viewportStateComponent,isViewportStateComponentSnapshot,isSystemViewportStateComponentSnapshot,VIEWPORTS}from"./components/viewport-state-component.js";export{ComponentSystemFilterPropsSchema,getComponentSystemFilterState,CombinedComponentFilterSchema}from"./components/system-component-filter.js";export{ComponentSystemFilterSchema}from"./components/legacy-filter.js";export{DomainComponentOpticBuilder}from"./components/domain-component-optic.js";export{groupComponentsByEntityIdAndName,isEqualGroupedComponentSnapshots}from"./components/group-components-by-entity-id-and-name.js";export{SystemComponentBuilder}from"./components/system-component-builder.js";export{isComponentModificationOfType,systemUpdateFactory,createUpdateFactory}from"./components/updates.js";export{DomainBuilder}from"./domain-builder.js";export{memoEval,isMemoizedArray,isMemoizedObject}from"./utils/memo-eval.js";export{cloneEvalCache,getEvalCache,setEvalCache,createEvalCacheToken}from"./utils/eval-cache.js";export{areProfilerLabelsEnabled,setProfilerLabelsEnabled}from"./utils/profiler-label.js";export*from"./dimensions/index.js";export*from"./domain-context/index.js";export*from"./system-components/index.js";export*from"./sketching/index.js";export*from"./projections/index.js";export*from"./admin-domain/index.js";export*from"./application/index.js";export*from"./scene/index.js";export{getAllPhxDefinitions}from"./system-definitions.js";export{availableSystemComponents,componentsByName}from"./available-system-components.js";export*from"./mocks/index.js";export*from"./domain-runtime/index.js";
|
|
1
|
+
export*from"./core/index.js";export{createActionFactory}from"./actions/action-factory.js";export{findActionImplementationConflicts}from"./actions/prepare-action-implementations.js";export{createConstantExpressionFactory}from"./expressions/constant-expressions.js";export{createCustomExpressionFactory}from"./expressions/custom-expression.js";export{createCustomInvariantFactory}from"./invariants/custom-invariants.js";export{InvariantBuilder,resolveInvariantModules}from"./invariants/invariants.js";export{compareSeverity}from"./invariants/violation.js";export{violationsComponent}from"./invariants/violation-component.js";export{createRelationFactory}from"./relations/relation-factory.js";export{attachMultipleReferenceComponent,attachSingleReferenceComponent,referenceComponent}from"./relations/reference-component.js";export{composedOfComponent}from"./relations/composed-of.js";export{createSingleReferenceRead,createSingleReferenceWrite,createMultipleReferenceRead,createMultipleReferenceWrite,createSingleCompositionRead,createMultipleCompositionRead,createEmptyWrite}from"./relations/component-factories.js";export{systemVirtualEntityId}from"./components/system-virtual-entity.js";export{navigationStateComponent,isNavigationComponentSnapshot,isSystemNavigationComponentSnapshot}from"./components/navigation-state-component.js";export{hoverStateComponent,isHoverStateComponentSnapshot,isSystemHoverStateComponentSnapshot}from"./components/hover-state-component.js";export{selectionStateComponent,isSelectionComponentSnapshot,isSystemSelectionComponentSnapshot}from"./components/selection-state-component.js";export{viewStateComponent,isViewComponentSnapshot,isSystemViewComponentSnapshot}from"./components/view-state-component.js";export{toolStateComponent,isToolStateComponentSnapshot,isSystemToolStateComponentSnapshot}from"./components/tool-state-component.js";export{debugStateComponent,isDebugStateComponentSnapshot,isSystemDebugStateComponentSnapshot}from"./components/debug-state-component.js";export{fullscreenStateComponent,isFullscreenStateComponentSnapshot,isSystemFullscreenStateComponentSnapshot}from"./components/fullscreen-state-component.js";export{dragStateComponent,isDragStateComponentSnapshot,isSystemDragStateComponentSnapshot}from"./components/drag-state-component.js";export{viewportStateComponent,isViewportStateComponentSnapshot,isSystemViewportStateComponentSnapshot,VIEWPORTS}from"./components/viewport-state-component.js";export{ComponentSystemFilterPropsSchema,getComponentSystemFilterState,CombinedComponentFilterSchema}from"./components/system-component-filter.js";export{ComponentSystemFilterSchema}from"./components/legacy-filter.js";export{DomainComponentOpticBuilder,resolveComponentOpticModules}from"./components/domain-component-optic.js";export{groupComponentsByEntityIdAndName,isEqualGroupedComponentSnapshots}from"./components/group-components-by-entity-id-and-name.js";export{SystemComponentBuilder}from"./components/system-component-builder.js";export{isComponentModificationOfType,systemUpdateFactory,createUpdateFactory}from"./components/updates.js";export{DomainBuilder}from"./domain-builder.js";export{memoEval,isMemoizedArray,isMemoizedObject}from"./utils/memo-eval.js";export{cloneEvalCache,getEvalCache,setEvalCache,createEvalCacheToken}from"./utils/eval-cache.js";export{areProfilerLabelsEnabled,setProfilerLabelsEnabled}from"./utils/profiler-label.js";export*from"./dimensions/index.js";export*from"./domain-context/index.js";export*from"./system-components/index.js";export*from"./sketching/index.js";export*from"./projections/index.js";export*from"./admin-domain/index.js";export*from"./application/index.js";export{resolveActionModules,resolveExpressionModules}from"./project-modules/index.js";export*from"./scene/index.js";export{getAllPhxDefinitions}from"./system-definitions.js";export{availableSystemComponents,componentsByName}from"./available-system-components.js";export*from"./mocks/index.js";export*from"./domain-runtime/index.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { DomainEntity, DomainEntityId } from '../core/
|
|
2
|
-
import type { DomainState } from '../core/state.js';
|
|
1
|
+
import type { DomainEntity, DomainEntityId, DomainState } from '../core/index.js';
|
|
3
2
|
import type { Invariant } from './invariants.js';
|
|
4
3
|
import type { Violation } from './violation.js';
|
|
5
4
|
export declare const createInvariant: <VIOLATION_TYPE extends string>(evaluate: (selfId: DomainEntityId<string>, state: DomainState<DomainEntity<string>>) => ReadonlyArray<Violation<VIOLATION_TYPE>>) => Invariant<DomainEntity<string>, DomainEntity<string>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, DomainEntity<string>, VIOLATION_TYPE>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { OmitEmpty, OmitNever } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/
|
|
3
|
-
import type { $DomainEntity, DomainEntity } from '../core/model.js';
|
|
2
|
+
import type { $DomainEntity, DomainEntity, ExpandAlias, TypeOrAlias } from '../core/index.js';
|
|
4
3
|
import type { CustomExpression } from '../expressions/custom-expression.js';
|
|
5
4
|
import type { Invariant } from './invariants.js';
|
|
6
5
|
import type { Violation } from './violation.js';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { OmitNever } from '@salsita-ai/common/utils';
|
|
2
|
-
import { type AliasMap, type EventualAlias, type ExpandAlias, type ExtractFromAliasedRecord, type TypeOrAlias } from '../core/
|
|
3
|
-
import
|
|
4
|
-
import type { $DomainEntity, DomainEntity, EntityByType } from '../core/model.js';
|
|
5
|
-
import type { DomainState } from '../core/state.js';
|
|
2
|
+
import { type $DomainEntity, type AliasMap, type AnonymousExpression, type DomainEntity, type DomainState, type EntityByType, type EventualAlias, type ExpandAlias, type ExpressionContext, type ExtractFromAliasedRecord, type TypeOrAlias } from '../core/index.js';
|
|
3
|
+
import { type ProjectModule } from '../project-modules/index.js';
|
|
6
4
|
import { type Violation } from './violation.js';
|
|
7
5
|
export interface Invariant<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, VIOLATION_TYPE extends string> {
|
|
8
6
|
evaluate(selfId: ENTITY['id'], state: DomainState<ENTITIES>, ctx: ExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>): ReadonlyArray<Violation<VIOLATION_TYPE>>;
|
|
@@ -38,10 +36,18 @@ type ExpressionsFromInvariants<ENTITIES extends DomainEntity<string>, ALLOWED_RO
|
|
|
38
36
|
};
|
|
39
37
|
};
|
|
40
38
|
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;
|
|
39
|
+
type AnyInvariant = Invariant<any, any, any, any, any, any, string>;
|
|
40
|
+
/** Validates the `src/invariants/` files and concatenates their invariants per entity type or alias. */
|
|
41
|
+
export declare const resolveInvariantModules: (modules: readonly ProjectModule[]) => Readonly<Record<string, readonly AnyInvariant[]>>;
|
|
41
42
|
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
43
|
private readonly aliasMap;
|
|
43
44
|
private readonly invariants;
|
|
44
45
|
constructor(aliasMap: AliasMap<ALIASES>, invariants?: INVARIANTS);
|
|
46
|
+
/**
|
|
47
|
+
* Adds the invariants of the `src/invariants/` files, as the generated barrel lists them, after
|
|
48
|
+
* checking each file against the folder's contract.
|
|
49
|
+
*/
|
|
50
|
+
withInvariantModules(modules: readonly ProjectModule[]): 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, AliasedInvariants<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, string>>>;
|
|
45
51
|
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
52
|
/**
|
|
47
53
|
* DO NOT USE in runtime!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expandAlias as
|
|
1
|
+
import{expandAlias as t}from"../core/index.js";import{SHARED_FOLDER_HINT as e,createContractError as a,isRecord as i}from"../project-modules/index.js";let r={expected:"an object of invariant lists keyed by entity type or alias",fix:`Create it with phx.domain.implementCustomInvariants({ ... }) (phx.domain.admin.implementCustomInvariants({ ... }) under src/admin/), ${e}.`},n=t=>i(t)&&"function"==typeof t.evaluate,s=t=>i(t)&&Object.values(t).every(t=>Array.isArray(t)&&t.every(n));export const resolveInvariantModules=t=>{let e={};for(let i of t){if(!s(i.exports))throw a(i.origin,r,i.exports);for(let[t,a]of Object.entries(i.exports))e[t]=[...e[t]??[],...a]}return e};export class InvariantBuilder{aliasMap;invariants;constructor(t,e={}){this.aliasMap=t,this.invariants=e}withInvariantModules(t){return this.withInvariants(resolveInvariantModules(t))}withInvariants(e){let a={...this.invariants};return Object.entries(e).forEach(([e,i])=>{t(this.aliasMap,e).forEach(t=>{a[t]=[...a[t]??[],...i]})}),new InvariantBuilder(this.aliasMap,a)}_conflicts={};buildViolationExpressions=()=>{let t={};return Object.entries(this.invariants).forEach(([e,a])=>{t[e]={$violations:{evaluate:(t,e,i)=>a.flatMap(a=>a.evaluate(t,e,i)),meta:{}}}}),t}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { I18n } from '@lingui/core';
|
|
2
2
|
import type { Localizable } from '@salsita-ai/common/utils';
|
|
3
|
-
import type { $DomainEntity, DomainEntity, EntityId } from '../core/
|
|
3
|
+
import type { $DomainEntity, DomainEntity, EntityId } from '../core/index.js';
|
|
4
4
|
import type { StateEmission } from '../domain-context/store-system/store-system.js';
|
|
5
5
|
/**
|
|
6
6
|
* An **ORDERED** list of violation severities.
|
|
@@ -15,7 +15,7 @@ import type { RegistrableTransformer } from '../domain-context/index.js';
|
|
|
15
15
|
*
|
|
16
16
|
* Contributing no extension systems is the same shape webhook and finalize hosts run in.
|
|
17
17
|
*/
|
|
18
|
-
export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(
|
|
18
|
+
export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(config: ApplicationConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>, mocks: {
|
|
19
19
|
frontendData: FRONTEND_DATA;
|
|
20
20
|
publishedData: PUBLISHED_DATA;
|
|
21
21
|
sessionData: SESSION_DATA;
|
|
@@ -57,7 +57,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
57
57
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, import("../index.js").AnyProductPreset>;
|
|
58
58
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, number>;
|
|
59
59
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
60
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, import("../index.js").AssistantManifest | null>;
|
|
60
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, Required<import("../index.js").AssistantManifest> | null>;
|
|
61
61
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
62
62
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, import("../index.js").AnyDomainFactory>;
|
|
63
63
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("../index.js").SpecSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
@@ -100,7 +100,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
100
100
|
getAdminPreset: () => import("../index.js").AnyProductPreset;
|
|
101
101
|
getAdminModelVersion: () => number;
|
|
102
102
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
103
|
-
getAssistant: () => import("../index.js").AssistantManifest | null;
|
|
103
|
+
getAssistant: () => Required<import("../index.js").AssistantManifest> | null;
|
|
104
104
|
getConfiguratorFactory: () => import("../index.js").AnyDomainFactory;
|
|
105
105
|
getAdminFactory: () => import("../index.js").AnyDomainFactory;
|
|
106
106
|
getConfiguratorComponentOptics: () => readonly import("../index.js").AnyDomainComponentOptic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createDomainRuntime as o}from"../domain-runtime/index.js";import{createMockDomainRuntimeServices as
|
|
1
|
+
import{createDomainRuntime as o}from"../domain-runtime/index.js";import{createMockDomainRuntimeServices as t}from"./create-mock-domain-runtime-services.js";import{createMockSessionContext as e}from"./create-mock-session-context.js";export const createMockDomainRuntime=(a,i)=>{let{sessionData:n,mode:r,role:s}=i,c=o({config:a,services:t()}),m=c.getState().spec;return c.actions.spec.updateSpec({...m,configurator:{...m.configurator,createTransformers:o=>i.transformers.map(t=>t.transformer.register(o,t.priority??1/0))}}),c.actions.sessionContext.setSessionContext(e(s,n)),c.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===r,revisionId:void 0,configurationId:"mock"}),c.actions.domainData.setDomainData({publishedData:i.publishedData,frontendData:i.frontendData,backendData:i.backendData}),c.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:i.entities,modelVersion:a.domain.domainFactory.modelVersion,rootEntityType:i.rootEntityType,schemaIdentity:a.domain.domainFactory}),c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ExpressionModule, type ProjectModule, type ProjectModuleContract, SHARED_FOLDER_HINT, createContractError, isRecord, resolveActionModules, resolveExpressionModules, resolveListModule, } from './project-modules.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{SHARED_FOLDER_HINT,createContractError,isRecord,resolveActionModules,resolveExpressionModules,resolveListModule}from"./project-modules.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AnonymousExpression, AnyActionImplementations } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The default export of one file in a project convention folder (`src/elements/`, `src/handlers/`,
|
|
4
|
+
* `src/expressions/`, …), paired with the project-relative path it was imported from.
|
|
5
|
+
*
|
|
6
|
+
* Generated barrels and the editor's hot reload hand project code to the SDK in this shape, without
|
|
7
|
+
* inspecting it. Each folder's resolver then checks the export against the folder's contract, so an
|
|
8
|
+
* invalid file fails with an error naming it instead of an unrelated crash later.
|
|
9
|
+
*/
|
|
10
|
+
export interface ProjectModule {
|
|
11
|
+
readonly origin: string;
|
|
12
|
+
readonly exports: unknown;
|
|
13
|
+
}
|
|
14
|
+
/** The expressions of one validated expression file, keyed by entity type or alias, then by expression name. */
|
|
15
|
+
export interface ExpressionModule {
|
|
16
|
+
readonly origin: string;
|
|
17
|
+
readonly expressions: Readonly<Record<string, Readonly<Record<string, AnyAnonymousExpression>>>>;
|
|
18
|
+
}
|
|
19
|
+
type AnyAnonymousExpression = AnonymousExpression<any, any, any, any, any, any, unknown>;
|
|
20
|
+
/** What a convention folder requires of its files, in the words used by the contract error. */
|
|
21
|
+
export interface ProjectModuleContract {
|
|
22
|
+
readonly expected: string;
|
|
23
|
+
readonly fix: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const SHARED_FOLDER_HINT = "or move the file to an underscore-prefixed folder such as src/_shared/ when it is shared code";
|
|
26
|
+
export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
27
|
+
export declare const createContractError: (origin: string, contract: ProjectModuleContract, received: unknown) => Error;
|
|
28
|
+
/**
|
|
29
|
+
* Checks a file of a folder whose contract is one item or an array of them, and returns its items.
|
|
30
|
+
* The first item that fails the check is the value the error reports.
|
|
31
|
+
*/
|
|
32
|
+
export declare const resolveListModule: <Item>(module: ProjectModule, contract: ProjectModuleContract, isItem: (value: unknown) => value is Item) => readonly Item[];
|
|
33
|
+
/**
|
|
34
|
+
* Validates the `src/expressions/` files and rejects an expression that two files define for the
|
|
35
|
+
* same entity type. Merging stays with the caller, because the domain builder and the editor expand
|
|
36
|
+
* aliases at different points; within one file the builder's own duplicate check applies.
|
|
37
|
+
*/
|
|
38
|
+
export declare const resolveExpressionModules: (modules: readonly ProjectModule[], aliasMap: Readonly<Record<string, readonly string[]>>) => readonly ExpressionModule[];
|
|
39
|
+
/** Validates the `src/actions/` files and merges their implementations by action name; a later file wins. */
|
|
40
|
+
export declare const resolveActionModules: (modules: readonly ProjectModule[]) => AnyActionImplementations;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SHARED_FOLDER_HINT="or move the file to an underscore-prefixed folder such as src/_shared/ when it is shared code";let e={expected:"an object of expressions keyed by entity type or alias, then by expression name",fix:`Create it with phx.domain.implementCustomExpressions({ ... }) (phx.domain.admin.implementCustomExpressions({ ... }) under src/admin/), ${SHARED_FOLDER_HINT}.`},t={expected:"an object of action implementations keyed by action name",fix:`Create it with phx.domain.implementActions({ ... }), ${SHARED_FOLDER_HINT}.`};export const isRecord=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);export const createContractError=(e,t,r)=>Error(`Invalid default export in ${e}: expected ${t.expected}, but got ${(e=>{if(void 0===e)return"nothing (the file has no default export)";if(null===e)return"null";if("function"==typeof e)return e.name?`the function "${e.name}"`:"an anonymous function";if(Array.isArray(e))return`an array of ${e.length} item(s)`;if(isRecord(e)){let t=Object.keys(e);return t.length>0?`an object with the keys ${t.join(", ")}`:"an empty object"}return`the ${typeof e} ${JSON.stringify(e)}`})(r)}. Every file in this folder is loaded by convention, so each one must default-export that shape. ${t.fix}`);export const resolveListModule=(e,t,r)=>{let o=Array.isArray(e.exports)?e.exports:[e.exports],n=[];for(let i of o){if(!r(i))throw createContractError(e.origin,t,i);n.push(i)}return n};let r=e=>isRecord(e)&&"function"==typeof e.evaluate,o=e=>isRecord(e)&&Object.values(e).every(r),n=e=>"function"==typeof e;export const resolveExpressionModules=(t,r)=>{let n=new Map;return t.map(t=>{let i;if(i=t.exports,!(isRecord(i)&&Object.values(i).every(o)))throw createContractError(t.origin,e,t.exports);for(let[e,o]of Object.entries(t.exports))for(let i of r[e]??[e])for(let e of Object.keys(o)){let r=`${i}.${e}`,o=n.get(r);if(void 0!==o&&o!==t.origin)throw Error(`Duplicate expression ${r}: it is defined in both ${o} and ${t.origin}, which would make its value depend on file order. Keep one definition and remove the other.`);n.set(r,t.origin)}return{origin:t.origin,expressions:t.exports}})};export const resolveActionModules=e=>e.reduce((e,r)=>{let o;if(o=r.exports,!(isRecord(o)&&Object.values(o).every(n)))throw createContractError(r.origin,t,r.exports);return{...e,...r.exports}},{});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { DomainEntity, DomainEntityId } from '../core/
|
|
2
|
-
import type { DomainState } from '../core/state.js';
|
|
1
|
+
import type { DomainEntity, DomainEntityId, DomainState } from '../core/index.js';
|
|
3
2
|
import type { DomainContextSelectors } from '../domain-runtime/domain-context/index.js';
|
|
4
3
|
/**
|
|
5
4
|
* Constructor context of `ProjectedEntitiesProjections`. It carries no `selectors` member because
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Matrix4 } from 'three';
|
|
2
2
|
import { Vector3 } from 'three';
|
|
3
|
-
import type { ComponentSnapshot } from '../core/
|
|
4
|
-
import type { DomainEntity } from '../core/model.js';
|
|
3
|
+
import type { ComponentSnapshot, DomainEntity } from '../core/index.js';
|
|
5
4
|
import type { SnapAxisComponent, SnapEdgeComponent, SnapPlaneComponent, SnapPointComponent } from '../system-components/index.js';
|
|
6
5
|
/**
|
|
7
6
|
* Common fields shared by all world-space snap primitives (points, edges, planes, axes).
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Euler, Matrix4, Vector3 } from 'three';
|
|
2
|
-
import type { ComponentSnapshot } from '../core/
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
2
|
+
import type { ComponentSnapshot, DomainEntity } from '../core/index.js';
|
|
4
3
|
import type { DimensionUnit } from '../dimensions/dimensions.js';
|
|
5
4
|
import type { SnapAxisComponent, SnapEdgeComponent, SnapPlaneComponent, SnapPointComponent } from '../system-components/index.js';
|
|
6
5
|
import type { SnapAxisComponentState } from '../system-components/snap-axis.js';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { type AliasMap, type TypeOrAlias } from '../core/
|
|
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';
|
|
1
|
+
import { type AliasMap, type DomainEntity, type DomainEntityId, type DomainState, type ExpressionMeta, type TypeOrAlias } from '../core/index.js';
|
|
5
2
|
interface AllOfType0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
6
3
|
kind: 'allOfType';
|
|
7
4
|
target: TARGET;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expandAlias as e}from"../core/
|
|
1
|
+
import{expandAlias as e}from"../core/index.js";export const createAllOfTypeRelation=t=>{let r=new Map,a=new WeakMap,n=!1;return o=>{if(n)throw Error(`Cannot register all-of-type relation targeting ${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,5 +1,4 @@
|
|
|
1
|
-
import type { DomainEntity, DomainEntityId } from '../core/
|
|
2
|
-
import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
|
|
1
|
+
import type { DomainEntity, DomainEntityId, DomainEntityReflection, RawAliasReflection } from '../core/index.js';
|
|
3
2
|
import type { ComposedOfComponentState } from './composed-of.js';
|
|
4
3
|
import type { ReferenceComponentState } from './reference-component.js';
|
|
5
4
|
export declare const createSingleReferenceRead: <TARGET extends DomainEntity<string>>(_targetReflection: DomainEntityReflection<TARGET> | RawAliasReflection<TARGET>, field: string) => (self: object, state: unknown, ctx: unknown) => ReferenceComponentState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/
|
|
1
|
+
import{SystemComponentBuilder as o}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/index.js";export const composedOfComponent=o.component("composedOf").withState({type:"object",properties:{childEntityIds:{type:"array",items:t}},required:["childEntityIds"],additionalProperties:!1}).build();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ExpandAlias, TypeOrAlias } from '../core/
|
|
2
|
-
import type { ExpressionMeta } from '../core/expression.js';
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
1
|
+
import type { DomainEntity, ExpandAlias, ExpressionMeta, TypeOrAlias } from '../core/index.js';
|
|
4
2
|
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
5
3
|
import type { RelationImplementation } from './relation-implementation.js';
|
|
6
4
|
interface DirectArrayRelation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { type AliasMap, type ExpandAlias, type TypeOrAlias } from '../core/
|
|
2
|
-
import type { ExpressionMeta } from '../core/expression.js';
|
|
3
|
-
import { type DomainEntity, type DomainEntityId } from '../core/model.js';
|
|
4
|
-
import type { DomainState } from '../core/state.js';
|
|
1
|
+
import { type AliasMap, type DomainEntity, type DomainEntityId, type DomainState, type ExpandAlias, type ExpressionMeta, type TypeOrAlias } from '../core/index.js';
|
|
5
2
|
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
6
3
|
interface IndirectNullableSingle0Relation<ENTITIES extends DomainEntity<string>, ALIASES extends Record<string, ENTITIES>, SELF extends TypeOrAlias<ENTITIES, ALIASES>, TARGET extends TypeOrAlias<ENTITIES, ALIASES>> {
|
|
7
4
|
kind: 'indirect';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../core/
|
|
1
|
+
import{isArray as e}from"@salsita-ai/common/utils";import{expandAlias as t}from"../core/index.js";let r=e=>"string"==typeof e;export const createIndirectRelation=i=>{let n=new Map,o=new WeakMap,a=!1;return l=>{if(a)throw Error(`Cannot register indirect relation ${String(l.target)}#${l.field} after evaluation started. Create all relation expressions before evaluating the domain state.`);let s=new Set(t(i,l.target)),f=`${l.field}|${[...s].sort().join("|")}`;return n.set(f,{field:l.field,targetTypes:s}),(t,i)=>(t=>{let i=o.get(t);if(i)return i;a=!0;let l=new Map([...n.keys()].map(e=>[e,new Map]));for(let i of t.entities)for(let[t,{field:o,targetTypes:a}]of n){if(!a.has(i.type))continue;let n=i[o],s=e(n)?new Set(n.filter(r)):r(n)?[n]:[],f=l.get(t);for(let e of s){let t=f.get(e);t||(t=[],f.set(e,t)),t.push(i.id)}}return o.set(t,l),l})(i).get(f).get(t)??[]}};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DomainComponentOpticBuilder } from '../components/domain-component-optic.js';
|
|
2
|
-
import type
|
|
3
|
-
import type { DomainEntityReflection, RawAliasReflection } from '../core/reflection.js';
|
|
2
|
+
import { type $DomainEntity, type DomainEntity, type DomainEntityId, type DomainEntityReflection, type RawAliasReflection } from '../core/index.js';
|
|
4
3
|
import type { ArrayReferenceField, SingleReferenceField } from './reference-field.js';
|
|
5
4
|
export type ReferenceComponentState = {
|
|
6
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/
|
|
1
|
+
import{SystemComponentBuilder as e}from"../components/system-component-builder.js";import{EntityIdSchema as t}from"../core/index.js";import{memoEval as r}from"../utils/memo-eval.js";export const referenceComponent=e.component("reference").withState({type:"object",properties:{referencedEntityIds:{type:"array",items:t}},required:["referencedEntityIds"],additionalProperties:!1}).withWritableKeys(["referencedEntityIds"]).build();export const attachSingleReferenceComponent=(e,t,n)=>e.attach(r(e=>[e[n]],e=>({referencedEntityIds:null===e?[]:[e]})),e=>{let r=e.referencedEntityIds[0];return r&&t.assertId(r),{[n]:r??null}});export const attachMultipleReferenceComponent=(e,t,n)=>e.attach(r(e=>[e[n]],e=>({referencedEntityIds:e})),e=>(t.assertIds(e.referencedEntityIds),{[n]:e.referencedEntityIds}));
|