@salsita-ai/sdk 0.50.0-develop.1162eef277 → 0.50.0-develop.1ddc7020fd
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/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/domain/actions/action-factory.d.ts +1 -2
- 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 +2 -3
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -1
- package/dist/domain/application/assistant-field-options.d.ts +1 -2
- package/dist/domain/application/assistant-mutations.d.ts +1 -4
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -5
- package/dist/domain/application/configurator-builder.d.ts +1 -1
- package/dist/domain/application/configurator-builder.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 +1 -1
- package/dist/domain/core/action.d.ts +4 -5
- package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
- package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
- package/dist/domain/core/component/debug-state-component.js +1 -0
- package/dist/domain/{components → core/component}/domain-component-optic.d.ts +4 -7
- package/dist/domain/core/component/domain-component-optic.js +16 -0
- package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
- package/dist/domain/core/component/drag-state-component.js +1 -0
- package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
- package/dist/domain/core/component/export-state-component.js +1 -0
- package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
- package/dist/domain/core/component/fullscreen-state-component.js +1 -0
- package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
- package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
- package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
- package/dist/domain/core/component/hover-state-component.js +1 -0
- package/dist/domain/core/component/index.d.ts +18 -0
- package/dist/domain/core/component/index.js +1 -0
- package/dist/domain/{components → core/component}/legacy-filter.d.ts +2 -2
- package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
- package/dist/domain/core/component/navigation-state-component.js +1 -0
- package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
- package/dist/domain/core/component/selection-state-component.js +1 -0
- package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
- package/dist/domain/core/component/system-component-builder.js +1 -0
- package/dist/domain/{components → core/component}/system-component-filter.d.ts +3 -3
- package/dist/domain/core/component/system-virtual-entity.js +1 -0
- package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
- package/dist/domain/core/component/tool-state-component.js +1 -0
- package/dist/domain/{components → core/component}/updates.d.ts +1 -2
- package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
- package/dist/domain/core/component/view-state-component.js +1 -0
- package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
- package/dist/domain/core/component/viewport-state-component.js +1 -0
- package/dist/domain/core/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/index.d.ts +2 -0
- package/dist/domain/core/decoder/index.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +3 -4
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/domain.d.ts +3 -4
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +4 -5
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +6 -8
- package/dist/domain/core/expression/index.d.ts +5 -0
- package/dist/domain/core/expression/index.js +1 -0
- package/dist/domain/{expressions → core/expression}/memoize-expression.d.ts +2 -2
- package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.d.ts +1 -1
- package/dist/domain/core/index.d.ts +8 -17
- package/dist/domain/core/index.js +1 -1
- 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/extended-schema-validator.js +1 -0
- package/dist/domain/core/schema/index.d.ts +3 -0
- package/dist/domain/core/schema/index.js +1 -0
- package/dist/domain/core/schema/schema-validator.js +1 -0
- package/dist/domain/core/state/id-sequence.d.ts +15 -0
- package/dist/domain/core/state/id-sequence.js +1 -0
- package/dist/domain/core/state/index.d.ts +3 -0
- package/dist/domain/core/state/index.js +1 -0
- package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
- package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
- package/dist/domain/domain-builder.d.ts +1 -7
- 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/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -5
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
- package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -2
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.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/cascade-ref-pruning.js +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
- package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
- package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
- package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
- package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +1 -4
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
- package/dist/domain/domain-context/store-system/system-state.js +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -3
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/context.d.ts +1 -4
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -4
- 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 -6
- 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 -4
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -3
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +1 -2
- package/dist/domain/index.d.ts +0 -19
- 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 -3
- package/dist/domain/invariants/invariants.d.ts +1 -4
- package/dist/domain/invariants/invariants.js +1 -1
- package/dist/domain/invariants/violation-component.js +1 -1
- package/dist/domain/invariants/violation.d.ts +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
- package/dist/domain/projections/composition-projections.js +1 -1
- 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 +3 -5
- 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-dimension.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/attribute-switch.js +1 -1
- package/dist/domain/system-components/autorotate-camera-component.d.ts +1 -1
- package/dist/domain/system-components/autorotate-camera-component.js +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-box-component.js +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.js +1 -1
- package/dist/domain/system-components/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-custom-environment.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-recipe-hierarchy.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +1 -1
- package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipes.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -1
- package/dist/domain/system-components/child-entity-selection.js +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-box-geometry.js +1 -1
- package/dist/domain/system-components/collision-geometries.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.js +1 -1
- package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-point-geometry.js +1 -1
- package/dist/domain/system-components/color-value.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +1 -1
- package/dist/domain/system-components/constraint.js +1 -1
- package/dist/domain/system-components/create-blueprint.d.ts +1 -1
- package/dist/domain/system-components/custom-header.d.ts +1 -1
- package/dist/domain/system-components/custom-header.js +1 -1
- package/dist/domain/system-components/custom-price-footer.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/detail.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/entity-header.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/finalize-component.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-selection-perspective-camera-component.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-entity.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 -2
- 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-override-property-transition.js +1 -1
- package/dist/domain/system-components/material-override-transformer.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/multilingual-text-value.js +1 -1
- package/dist/domain/system-components/navigation-page.js +1 -1
- package/dist/domain/system-components/navigation-panel-list.js +1 -1
- package/dist/domain/system-components/navigation-steps.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/replace-entity-recipe-hierarchy.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +1 -1
- package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipes.js +1 -1
- package/dist/domain/system-components/rotatable.js +1 -1
- package/dist/domain/system-components/rotation-handle.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-ambient-light.js +1 -1
- package/dist/domain/system-components/scene-entity-animation.js +1 -1
- package/dist/domain/system-components/scene-entity-box-object.js +1 -1
- package/dist/domain/system-components/scene-entity-control.js +1 -1
- package/dist/domain/system-components/scene-entity-delete-fab.js +1 -1
- package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
- package/dist/domain/system-components/scene-entity-floor-object.js +1 -1
- package/dist/domain/system-components/scene-entity-html-hotspot.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-clip.js +1 -1
- package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-group.js +1 -1
- package/dist/domain/system-components/scene-entity-object-html-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-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object.js +1 -1
- package/dist/domain/system-components/scene-entity-point-light.js +1 -1
- package/dist/domain/system-components/scene-entity-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
- package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-wall-object.js +1 -1
- package/dist/domain/system-components/selectable-component.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/static-orthographic-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/summary-component.js +1 -1
- package/dist/domain/system-components/text-value.js +1 -1
- package/dist/domain/system-components/tool-controls.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/system-components/view-controls.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/phoenix/scripts/build-admin.js +1 -1
- package/package.json +3 -3
- package/dist/domain/components/debug-state-component.js +0 -1
- package/dist/domain/components/domain-component-optic.js +0 -16
- package/dist/domain/components/drag-state-component.js +0 -1
- package/dist/domain/components/export-state-component.js +0 -1
- package/dist/domain/components/fullscreen-state-component.js +0 -1
- package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
- package/dist/domain/components/hover-state-component.js +0 -1
- package/dist/domain/components/index.d.ts +0 -2
- package/dist/domain/components/index.js +0 -1
- package/dist/domain/components/navigation-state-component.js +0 -1
- package/dist/domain/components/selection-state-component.js +0 -1
- package/dist/domain/components/system-component-builder.js +0 -1
- package/dist/domain/components/system-virtual-entity.js +0 -1
- package/dist/domain/components/tool-state-component.js +0 -1
- package/dist/domain/components/view-state-component.js +0 -1
- package/dist/domain/components/viewport-state-component.js +0 -1
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/reflection.js +0 -1
- package/dist/domain/expressions/constant-expressions.js +0 -1
- package/dist/domain/expressions/custom-expression.js +0 -1
- package/dist/domain/expressions/index.d.ts +0 -1
- package/dist/domain/expressions/index.js +0 -1
- /package/dist/domain/{components → core/component}/component-reader-types.js +0 -0
- /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
- /package/dist/domain/{components → core/component}/updates.js +0 -0
- /package/dist/domain/core/{enhanced-json-schema.js → decoder/decoder.js} +0 -0
- /package/dist/domain/core/{expression.js → expression/expression.js} +0 -0
- /package/dist/domain/{expressions → core/expression}/memoize-expression.js +0 -0
- /package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.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/{schema-validator.js → schema/enhanced-json-schema.js} +0 -0
- /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
- /package/dist/domain/core/{state.js → state/state.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { AnonymousExpression, ExpressionContext } from '../
|
|
3
|
-
import type { DomainEntity, DomainEntityId } from '../
|
|
4
|
-
import type { DomainState } from '../
|
|
2
|
+
import type { AnonymousExpression, ExpressionContext } from '../expression/index.js';
|
|
3
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
4
|
+
import type { DomainState } from '../state/index.js';
|
|
5
5
|
import { type Viewport } from './viewport-state-component.js';
|
|
6
6
|
export interface ComponentSystemFilterState {
|
|
7
7
|
navigationState: string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createVirtualEntityId as t}from"../model/index.js";export const systemVirtualEntityId=t("system");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isSnapshotInstance as t}from"../model/index.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const toolStateComponent=o.component("toolState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isToolStateComponentSnapshot=o=>t(o,"singleton",toolStateComponent);export const isSystemToolStateComponentSnapshot=t(e,"singleton",toolStateComponent);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Localizable } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ComponentInstance, StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../
|
|
3
|
-
import type { DomainEntity, EntityByType, EntityId } from '../core/model.js';
|
|
2
|
+
import type { ComponentInstance, DomainEntity, EntityByType, EntityId, StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../model/index.js';
|
|
4
3
|
import type { OneComponentFilter } from './component-reader-types.js';
|
|
5
4
|
export interface ComponentModification<COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
6
5
|
kind: 'modifyComponent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isSnapshotInstance as t}from"../model/index.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const viewStateComponent=e.component("viewState").withState({type:"object",properties:{activeState:{type:"string"}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState"]).build();export const isViewComponentSnapshot=e=>t(e,"singleton",viewStateComponent);export const isSystemViewComponentSnapshot=t(o,"singleton",viewStateComponent);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EntityId } from '../model/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* A responsive class the configurator container currently satisfies. The values mirror the
|
|
4
4
|
* responsive flags computed by the UI layer from the theme breakpoints (`isPhone`, `isMobile`,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isSnapshotInstance as t}from"../model/index.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const VIEWPORTS=["phone","mobile","tablet","desktop","landscape","portrait"];export const viewportStateComponent=e.component("viewportState").withState({type:"object",properties:{active:{oneOf:[{type:"array",items:{type:"string",enum:[...VIEWPORTS]}},{type:"null"}]}},required:["active"],additionalProperties:!1,tsType:"ViewportStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ViewportStateComponentState"}]}).withWritableKeys(["active"]).build();export const isViewportStateComponentSnapshot=e=>t(e,"singleton",viewportStateComponent);export const isSystemViewportStateComponentSnapshot=t(o,"singleton",viewportStateComponent);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Decoder } from './decoder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates the decoder of data that must match a JSON schema. `subject` is what the data is, as the
|
|
4
|
+
* error names it, for example `Session data`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const createDecoder: <DATA>(schema: object, subject: string) => Decoder<DATA>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{extendedSchemaValidator as r}from"../schema/index.js";export const createDecoder=(e,o)=>t=>{let i=r.compile(e);if(!i(t))throw Error(`${o} is not valid: ${r.errorsText(i.errors)}`);return t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turns data of unknown shape into data of a known type, and throws when the data does not match.
|
|
3
|
+
* Everything that enters a domain from outside goes through one: published, session, frontend and
|
|
4
|
+
* backend data.
|
|
5
|
+
*/
|
|
6
|
+
export type Decoder<DATA> = (data: unknown) => DATA;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createDecoder}from"./create-decoder.js";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
2
|
import type { ActionDefinitions, AnyActionImplementations } from './action.js';
|
|
3
|
-
import type { Expression } from './expression.js';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type { $DomainEntityReflection, EntityReflections, SchemaOfObject } from './reflection.js';
|
|
3
|
+
import type { Expression } from './expression/index.js';
|
|
4
|
+
import type { $DomainEntity, $DomainEntityReflection, DomainEntity, EntityByType, EntityReflections, SchemaOfObject } from './model/index.js';
|
|
5
|
+
import type { MigrateFunction } from './state/index.js';
|
|
7
6
|
type $EntityReflections<ENTITIES extends DomainEntity<string>> = {
|
|
8
7
|
[TYPE in ENTITIES['type']]: $DomainEntityReflection<$DomainEntity<EntityByType<ENTITIES, TYPE>>>;
|
|
9
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{migrateCommonAdminDomain as t}from"../admin-domain/implementation/common-admin-migrations.js";import{
|
|
1
|
+
import{migrateCommonAdminDomain as t}from"../admin-domain/implementation/common-admin-migrations.js";import{createDecoder as a}from"./decoder/index.js";export class DomainFactory{context;modelVersion;hasBackendData;constructor(t){this.context=t,this.modelVersion=t.modelVersion,this.hasBackendData=void 0!==t.backendData}parsePublishedData=t=>a(this.context.publishedData,"Admin data")(t);parseSessionData=t=>a(this.context.sessionData,"Session data")(t);parseFrontendData=t=>a(this.context.frontendData,"Frontend data")(t);parseBackendData=t=>{if(void 0===this.context.backendData)throw Error("Backend data is not supported for this domain");return a(this.context.backendData,"Backend data")(t)};validateAndMigrateState=(a,e)=>{let n=this.context.isAdminDomain?t(a):a;return this.context.migrate({state:n,version:e},{trimExtraProperties:!1})}}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { AnyExpressions, ExpressionContext } from './expression.js';
|
|
2
|
-
import { type $DomainEntity, type DomainEntity, type DomainEntityId, type EntityByType } from './model.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type { DomainState } from './state.js';
|
|
1
|
+
import type { AnyExpressions, ExpressionContext } from './expression/index.js';
|
|
2
|
+
import { type $DomainEntity, type AnyEntityReflections, type DomainEntity, type DomainEntityId, type EntityByType } from './model/index.js';
|
|
3
|
+
import type { DomainState } from './state/index.js';
|
|
5
4
|
export type AllowedRootEntityTypes<ALLOWED_ROOT_ENTITIES extends DomainEntity<string>> = ReadonlyArray<ALLOWED_ROOT_ENTITIES['type']>;
|
|
6
5
|
export type AnyAllowedRootEntityTypes = AllowedRootEntityTypes<DomainEntity<string>>;
|
|
7
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{domainEntityTypeFromId as i}from"./model.js";let r=t(),o=t();export class Domain{_context;constructor(t){this._context=t}getEntity=(t,i)=>{let r=e(i,o),n=r.get("entityMap");if(n)return n.get(t);let s=(t=>{let e=new Map;for(let i of t){if(e.has(i.id))throw Error(`Error while creating a UniqueEntityMap for caching of domain queries. Duplicate entity id ${i.id} encountered!`);e.set(i.id,i)}return e})(i.entities);return r.put("entityMap",s),s.get(t)};get$Entity=(t,i)=>{let o=e(i,r),n=o.get(t);if(n)return n;let s=this.getEntity(t,i);if(!s)throw Error(`Entity ${t} does not exist`);let a={...s},l=this._context.selectors.getDomainExpressions()[s.type];return l&&Object.entries(l).forEach(([t,e])=>{Object.defineProperty(a,t,{enumerable:!0,get:()=>e.evaluate(s.id,i,this._context.selectors.getExpressionContext())})}),Object.defineProperty(a,"_raw",{enumerable:!0,writable:!1,value:s}),Object.defineProperty(a,"_state",{enumerable:!0,writable:!1,value:i}),o.put(t,a),a};get$Entities=(t,e)=>t.map(t=>this.get$Entity(t,e));getRoot$Entity=t=>this.get$Entity(t.rootEntityId,t);validateExpressions=t=>{if(!this._context.selectors.getAllowedRootEntityTypes().includes(t.rootEntityType))throw Error(`Entity type ${t.rootEntityType} is not allowed as root entity`);if(!this.getEntity(t.rootEntityId,t))throw Error(`Root entity ${t.rootEntityId} was not found!`);t.entities.forEach(e=>{let i=this._context.selectors.getDomainExpressions()[e.type];void 0!==i&&Object.values(i).forEach(i=>{!0===i.meta.alwaysEvaluate&&i.evaluate(e.id,t,this._context.selectors.getExpressionContext())})})};validateEntity=t=>{let e=this._context.selectors.getEntityReflections()[t.type];if(!e)throw Error(`Unknown entity type ${t.type}`);return e._meta.validator(t)?{success:!0}:{success:!1,errors:e._meta.validator.errors?.map(t=>`${t.instancePath} ${t.message}`.trim())??[]}};getWritableEntityKeys=(t,e)=>{let r=i(t),o=this._context.selectors.getDomainExpressions()[r];return e.filter(t=>"id"!==t&&"type"!==t&&"_raw"!==t&&o?.[t]===void 0)}}
|
|
1
|
+
import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{domainEntityTypeFromId as i}from"./model/index.js";let r=t(),o=t();export class Domain{_context;constructor(t){this._context=t}getEntity=(t,i)=>{let r=e(i,o),n=r.get("entityMap");if(n)return n.get(t);let s=(t=>{let e=new Map;for(let i of t){if(e.has(i.id))throw Error(`Error while creating a UniqueEntityMap for caching of domain queries. Duplicate entity id ${i.id} encountered!`);e.set(i.id,i)}return e})(i.entities);return r.put("entityMap",s),s.get(t)};get$Entity=(t,i)=>{let o=e(i,r),n=o.get(t);if(n)return n;let s=this.getEntity(t,i);if(!s)throw Error(`Entity ${t} does not exist`);let a={...s},l=this._context.selectors.getDomainExpressions()[s.type];return l&&Object.entries(l).forEach(([t,e])=>{Object.defineProperty(a,t,{enumerable:!0,get:()=>e.evaluate(s.id,i,this._context.selectors.getExpressionContext())})}),Object.defineProperty(a,"_raw",{enumerable:!0,writable:!1,value:s}),Object.defineProperty(a,"_state",{enumerable:!0,writable:!1,value:i}),o.put(t,a),a};get$Entities=(t,e)=>t.map(t=>this.get$Entity(t,e));getRoot$Entity=t=>this.get$Entity(t.rootEntityId,t);validateExpressions=t=>{if(!this._context.selectors.getAllowedRootEntityTypes().includes(t.rootEntityType))throw Error(`Entity type ${t.rootEntityType} is not allowed as root entity`);if(!this.getEntity(t.rootEntityId,t))throw Error(`Root entity ${t.rootEntityId} was not found!`);t.entities.forEach(e=>{let i=this._context.selectors.getDomainExpressions()[e.type];void 0!==i&&Object.values(i).forEach(i=>{!0===i.meta.alwaysEvaluate&&i.evaluate(e.id,t,this._context.selectors.getExpressionContext())})})};validateEntity=t=>{let e=this._context.selectors.getEntityReflections()[t.type];if(!e)throw Error(`Unknown entity type ${t.type}`);return e._meta.validator(t)?{success:!0}:{success:!1,errors:e._meta.validator.errors?.map(t=>`${t.instancePath} ${t.message}`.trim())??[]}};getWritableEntityKeys=(t,e)=>{let r=i(t),o=this._context.selectors.getDomainExpressions()[r];return e.filter(t=>"id"!==t&&"type"!==t&&"_raw"!==t&&o?.[t]===void 0)}}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { ExpandAlias, TypeOrAlias } from '../
|
|
2
|
-
import type { AnonymousExpression, ExpressionMetas } from '
|
|
3
|
-
import type { DomainEntity } from '../core/model.js';
|
|
1
|
+
import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
|
|
2
|
+
import type { AnonymousExpression, ExpressionMetas } from './expression.js';
|
|
4
3
|
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
4
|
readonly [TYPE_OR_ALIAS in keyof CONSTANTS & string]: {
|
|
6
5
|
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]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mapNestedObject as t}from"../../utils/map-nested-object.js";export const createConstantExpressionFactory=e=>o=>t()(o,([t,o,a])=>[[t,o,{meta:e[t]?.[o]??{},evaluate:()=>a}]]);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { AliasedExpressions } from '../domain-builder.js';
|
|
1
|
+
import type { AliasedExpressions } from '../../domain-builder.js';
|
|
2
|
+
import type { $DomainEntity, DomainEntity, EntityByType, TypeOrAlias } from '../model/index.js';
|
|
3
|
+
import type { DomainState } from '../state/index.js';
|
|
4
|
+
import type { AnonymousExpression, ExpressionContext, ExpressionMeta, ExpressionMetas } from './expression.js';
|
|
6
5
|
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
6
|
export type PotentialCustomExpressions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>> = {
|
|
8
7
|
[TYPE_OR_ALIAS in keyof $MAP]?: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mapNestedObject as e}from"../../utils/map-nested-object.js";export const createCustomExpressionFactory=t=>o=>e()(o,([e,o,r])=>{if(!r)throw Error(`Custom expression for ${e}.${o} is of type undefined`);return[[e,o,createCustomExpression(r,t[e]?.[o]??{})]]});export const createCustomExpression=(e,t)=>({evaluate:(t,o,r)=>e(r.domain.get$Entity(t,o),o,r),meta:t});
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { ComponentReader } from '
|
|
3
|
-
import type { CollisionProjections, ConstraintProjections, PositionProjections, ProjectedEntitiesProjections, SnappingProjections } from '
|
|
4
|
-
import type { SketchingProjections } from '
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type { MigrateFunction } from '
|
|
8
|
-
import type { $DomainEntity, DomainEntity } from './model.js';
|
|
9
|
-
import type { DomainState } from './state.js';
|
|
2
|
+
import type { ComponentReader } from '../../domain-runtime/domain-context/index.js';
|
|
3
|
+
import type { CollisionProjections, ConstraintProjections, PositionProjections, ProjectedEntitiesProjections, SnappingProjections } from '../../projections/index.js';
|
|
4
|
+
import type { SketchingProjections } from '../../sketching/index.js';
|
|
5
|
+
import type { Domain } from '../domain.js';
|
|
6
|
+
import type { $DomainEntity, DomainEntity, TypeOrAlias } from '../model/index.js';
|
|
7
|
+
import type { DomainState, MigrateFunction } from '../state/index.js';
|
|
10
8
|
export interface ExpressionContext<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>> {
|
|
11
9
|
readonly mode: 'owner' | 'read' | 'finalize';
|
|
12
10
|
readonly role: SessionRole;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./constant-expressions.js";export*from"./custom-expression.js";export*from"./memoize-expression.js";export*from"./prepare-domain-expressions.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
2
|
+
import type { Expression, ExpressionOrigin } from './expression.js';
|
|
3
3
|
export interface ExpressionTrace {
|
|
4
4
|
origin: ExpressionOrigin;
|
|
5
5
|
entityId: DomainEntityId<string>;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export { _unsafeBuildDomainEntityId, domainEntityTypeFromId, createVirtualEntityId, isDomainEntityId, isVirtualEntityId, VirtualEntityIdSchema, isEqualEntityTypeAndId, parseDomainEntityId, DomainEntityIdSchema, DomainEntitySchema, $DomainEntitySchema, } from './model.js';
|
|
5
|
-
export type { $DomainEntity, DomainEntity, VirtualEntityId, DomainEntityId, EntityIdSchema, EntityByType, EntityId, } from './model.js';
|
|
6
|
-
export type { PartialSchemaOfObject, SchemaOfObject, EnumLike, EntityReflections } from './reflection.js';
|
|
7
|
-
export { type Migration, MigrateFunctionBuilder, type MigrateFunction, type VersionedState, type MigrateFunctionOptions, type AnyVersionedState, StateMigrationError, isStateMigrationError, } from './migrations.js';
|
|
8
|
-
export * from './reflection.js';
|
|
9
|
-
export type { ComponentInstance, StateOfComponent, WritableStateOfComponent, SystemComponentType, SystemComponentTypeConstraint, ComponentSnapshot, } from './component.js';
|
|
10
|
-
export { isEqualComponentInstance, areEqualComponentSnapshots, isEqualComponentSnapshot, isSnapshotOfComponentType, isInstanceOfComponentType, getComponentInstanceKey, getComponentSnapshotKey, } from './component.js';
|
|
11
|
-
export { type DomainState, type DomainStateFactory, createInitialDomainState } from './state.js';
|
|
12
|
-
export type * from './expression.js';
|
|
13
|
-
export * from './alias.js';
|
|
14
|
-
export * from './domain.js';
|
|
1
|
+
export type * from './action.js';
|
|
2
|
+
export * from './component/index.js';
|
|
3
|
+
export * from './decoder/index.js';
|
|
15
4
|
export * from './domain-factory.js';
|
|
16
|
-
export * from './
|
|
17
|
-
export
|
|
18
|
-
export
|
|
5
|
+
export * from './domain.js';
|
|
6
|
+
export * from './expression/index.js';
|
|
7
|
+
export * from './model/index.js';
|
|
8
|
+
export * from './schema/index.js';
|
|
9
|
+
export * from './state/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./component/index.js";export*from"./decoder/index.js";export*from"./domain-factory.js";export*from"./domain.js";export*from"./expression/index.js";export*from"./model/index.js";export*from"./schema/index.js";export*from"./state/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { PhxValidateFunction } from '../schema/index.js';
|
|
2
3
|
import type { EntityId } from './model.js';
|
|
3
|
-
import type { PhxValidateFunction } from './schema-validator.js';
|
|
4
4
|
/**
|
|
5
5
|
* Definition of how the component looks like, it's name, state and other properties. It is used to instantiate components.
|
|
6
6
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./alias.js";export*from"./common-definitions.js";export*from"./component.js";export*from"./model.js";export*from"./preset.js";export*from"./reflection.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
+
import { type PhxValidateFunction } from '../schema/index.js';
|
|
2
3
|
import { type $DomainEntity, type DomainEntity, type EntityByType, type EntityId } from './model.js';
|
|
3
|
-
import type { PhxValidateFunction } from './schema-validator.js';
|
|
4
4
|
type RequiredKeys<T> = {
|
|
5
5
|
[K in keyof T]: undefined extends T[K] ? never : K;
|
|
6
6
|
}[keyof T];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{extendedSchemaValidator as t}from"../schema/index.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAjvSchemaValidator as e}from"./create-ajv-schema-validator.js";import{createCspSchemaValidator as a}from"./create-csp-schema-validator.js";let t="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=t();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { EnhancedJsonObjectSchemaType, EnhancedJsonSchemaType, JsonSchemaType, MemberImport, } from './enhanced-json-schema.js';
|
|
2
|
+
export { extendedSchemaValidator, getExtendedSchemaValidator } from './extended-schema-validator.js';
|
|
3
|
+
export type { PhxValidateFunction, PhxValidationError, SchemaValidator } from './schema-validator.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{extendedSchemaValidator,getExtendedSchemaValidator}from"./extended-schema-validator.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Hands out the ids of entities that are about to be created, one sequence per entity type. An
|
|
4
|
+
* action or a transformer asks it for an id instead of computing one from the state.
|
|
5
|
+
*/
|
|
6
|
+
export type IdSequence<ENTITIES extends DomainEntity<string>> = {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the next available entity ID for the given type.
|
|
9
|
+
* This automatically increments the sequence number for the given type, so that the next call will return a new ID.
|
|
10
|
+
*
|
|
11
|
+
* @param type the entity type
|
|
12
|
+
* @returns a new domain entity ID for the given type
|
|
13
|
+
*/
|
|
14
|
+
nextId: <TYPE extends ENTITIES['type']>(type: TYPE) => DomainEntityId<TYPE>;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./migrations.js";export*from"./state.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Logger } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { DomainEntity } from '
|
|
3
|
-
import type { EntityReflections } from './reflection.js';
|
|
2
|
+
import type { DomainEntity, EntityReflections } from '../model/index.js';
|
|
4
3
|
/**
|
|
5
4
|
* Thrown when domain state cannot be validated/migrated to the latest model
|
|
6
5
|
* version: an entity is invalid against its schema, an entity type or model
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ComponentSnapshot, SystemComponentTypeConstraint } from '
|
|
2
|
-
import type { DomainEntity } from './model.js';
|
|
1
|
+
import type { ComponentSnapshot, DomainEntity, SystemComponentTypeConstraint } from '../model/index.js';
|
|
3
2
|
export interface DomainState<ENTITIES extends DomainEntity<string>> {
|
|
4
3
|
readonly rootEntityId: ENTITIES['id'];
|
|
5
4
|
readonly rootEntityType: ENTITIES['type'];
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { type ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
-
import type
|
|
3
|
-
import { type AliasMap, type ExpandAlias, type TypeOrAlias } from './core/alias.js';
|
|
4
|
-
import type { AnonymousExpression } from './core/expression.js';
|
|
5
|
-
import { DomainFactory } from './core/index.js';
|
|
6
|
-
import { type MigrateFunction } from './core/migrations.js';
|
|
7
|
-
import { type $DomainEntity, type DomainEntity, type EntityByType } from './core/model.js';
|
|
8
|
-
import type { $DomainEntityReflection, EntityReflections, SchemaOfObject } from './core/reflection.js';
|
|
2
|
+
import { type $DomainEntity, type $DomainEntityReflection, type ActionDefinition, type AliasMap, type AnonymousExpression, type AnyActionImplementations, type DomainEntity, DomainFactory, type EntityByType, type EntityReflections, type ExpandAlias, type MigrateFunction, type SchemaOfObject, type TypeOrAlias } from './core/index.js';
|
|
9
3
|
import { type ProjectModule } from './project-modules/index.js';
|
|
10
4
|
export type AliasedExpressions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>> = {
|
|
11
5
|
[K in TypeOrAlias<ENTITIES, ALIASES>]?: Record<string, AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DomainFactory as t,MigrateFunctionBuilder as i,expandAlias as e}from"./core/index.js";import{resolveActionModules as s,resolveExpressionModules as n}from"./project-modules/index.js";import{withProfilerLabel as a}from"./utils/profiler-label.js";export class DomainBuilder{entities;aliasMap;$entityReflections;allowedRootEntityTypes;implemented;modelVersion;publishedData;sessionData;frontendData;backendData;migrate;isAdminDomain;actions;actionImplementations;constructor(t,i,e,s,n,a,o,h,l,r,m,d,p,c){this.entities=t,this.aliasMap=i,this.$entityReflections=e,this.allowedRootEntityTypes=s,this.implemented=n,this.modelVersion=a,this.publishedData=o,this.sessionData=h,this.frontendData=l,this.backendData=r,this.migrate=m,this.isAdminDomain=d,this.actions=p,this.actionImplementations=c}static from(t,e,s,n,a,o,h,l,r,m){let d=i.fromVersions({1:t}).to(1).using({}).build();return new DomainBuilder(t,e,s,n,{},a,o,h,l,r,d,m,{},{})}withMigrate(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,t,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressions(t){let i={...this.implemented};return Object.entries(t).forEach(([t,s])=>{e(this.aliasMap,t).forEach(e=>{let n={...i[e]};i[e]=n,Object.entries(s).forEach(([i,s])=>{let o=n[i];if(o)throw Error(`Duplicate expression ${e}.${i}: The expression is defined on both ${t} and ${o.origin.typeOrAlias}, which would lead to ambiguous usage. Please ensure that expressions are only defined once.`);n[i]={...s,evaluate:a(`${e}_${i}`,s.evaluate),origin:{name:i,typeOrAlias:t}}})})}),new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,i,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,this.actionImplementations)}withExpressionModules(t){return n(t,this.aliasMap).reduce((t,i)=>t.withExpressions(i.expressions),this)}withActions(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,Object.fromEntries(t.map(t=>[t.name,t])),this.actionImplementations)}withActionModules(t){return this.withActionImplementations(s(t))}withActionImplementations(t){return new DomainBuilder(this.entities,this.aliasMap,this.$entityReflections,this.allowedRootEntityTypes,this.implemented,this.modelVersion,this.publishedData,this.sessionData,this.frontendData,this.backendData,this.migrate,this.isAdminDomain,this.actions,{...this.actionImplementations,...t})}build=()=>{let e=this.implemented,s=this.migrate??i.fromVersions({1:this.entities}).to(1).using({}).build();return new t({aliasMap:this.aliasMap,entityReflections:this.entities,$entityReflections:this.$entityReflections,expressions:e,allowedRootEntityTypes:this.allowedRootEntityTypes,modelVersion:this.modelVersion,migrate:s,publishedData:this.publishedData,sessionData:this.sessionData,frontendData:this.frontendData,backendData:this.backendData,isAdminDomain:this.isAdminDomain,actions:this.actions,actionImplementations:this.actionImplementations})}}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { $DomainEntity, DomainEntity } from '../../core/model.js';
|
|
3
|
-
import type { DomainState } from '../../core/state.js';
|
|
1
|
+
import { type $DomainEntity, type ActionContext, type ActionTypes, type DomainEntity, type DomainState, type PreparedAction } from '../../core/index.js';
|
|
4
2
|
import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
|
|
5
3
|
export interface ActionSystemContext {
|
|
6
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e
|
|
1
|
+
import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as s}from"../../core/index.js";import{getIdSequence as n}from"../store-system/next-domain-entity-id.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,s.compile(t.params)])));_updates=e();constructor(t){this._context=t}createContext=t=>({expressionContext:this._context.selectors.getExpressionContext(),systems:this._context.selectors.getDomainSystems(),getIdSequence:()=>n(t.entities,[]),updates:this._updates});prepareAction=(t,e,n)=>{let o=this._context.selectors.getActionDefinitions(),i=Object.values(o).find(e=>e.name===t);if(!i){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(i.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${s.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._context.selectors.getActionImplementations()).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { $DomainEntity, DomainEntity } from '../core/
|
|
1
|
+
import type { $DomainEntity, DomainEntity } from '../core/index.js';
|
|
2
2
|
import type { DomainContextSystems } from './domain-context-systems.js';
|
|
3
3
|
import type { UpdateTransformer } from './store-system/store-system.js';
|
|
4
4
|
export declare const createTransformer: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>(transformer: (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>) => (ctx: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => UpdateTransformer<ENTITIES>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemComponentBuilder as t}from"../../
|
|
1
|
+
import{SystemComponentBuilder as t}from"../../core/index.js";import{DimensionUnitSchema as e}from"../../dimensions/index.js";export const dimensionStateComponent=t.component("dimensionStateComponent").withState({type:"object",properties:{unit:e},required:["unit"],additionalProperties:!1}).withWritableKeys(["unit"]).build();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { ActionTypes } from '../core/
|
|
2
|
-
import type { Domain } from '../core/domain.js';
|
|
3
|
-
import type { $DomainEntity, DomainEntity } from '../core/model.js';
|
|
1
|
+
import type { $DomainEntity, ActionTypes, Domain, DomainEntity } from '../core/index.js';
|
|
4
2
|
import type { ComponentReader, DomainContextSelectors } from '../domain-runtime/domain-context/index.js';
|
|
5
3
|
import type { BlenderProjections, CollisionProjections, CompositionProjections, ConstraintProjections, PositionProjections, ProjectedEntitiesProjections, SnappingProjections, ValidationProjections } from '../projections/index.js';
|
|
6
4
|
import type { SketchingProjections } from '../sketching/sketching-projections.js';
|
|
@@ -4,7 +4,7 @@ export { NavigationUpdateTag, isInitialNavigationUpdate, isNavigationUpdate, isI
|
|
|
4
4
|
export { createAutoSelectionTransformer, NavigationSystem, type NavigationSystemContext, } from './navigation-system/navigation-system.js';
|
|
5
5
|
export { createResetSelectionOnNavigationTransformer, createNavigationOnSelectionTransformer, createNavigationOnDeselectTransformer, createSelectParentOnDeselectionTransformer, createNavigationOnSelectionChangeTransformer, } from './navigation-system/selection-transformers.js';
|
|
6
6
|
export { StoreSystem, type TransformerRegistration, type StateEmission, type UpdateTransformer, type TransformerLogFunction, type Transformers, type StateSliceName, type StateUpdateEmission, type StateEmissionKind, type CommitPreparedOutcome, } from './store-system/store-system.js';
|
|
7
|
-
export { nextDomainEntityId, getIdSequence
|
|
7
|
+
export { nextDomainEntityId, getIdSequence } from './store-system/next-domain-entity-id.js';
|
|
8
8
|
export { applyUpdates } from './store-system/apply-updates.js';
|
|
9
9
|
export { SystemState, SystemStateInitialUpdateTag, SystemStateUpdateTag, type SystemStateContext, } from './store-system/system-state.js';
|
|
10
10
|
export { createRefReplaceTransformer } from './relation-transformers/replace-refs.js';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type Viewport } from '../../
|
|
2
|
-
import type { DomainEntity } from '../../core/model.js';
|
|
3
|
-
import type { DomainState } from '../../core/state.js';
|
|
1
|
+
import { type DomainEntity, type DomainState, type Viewport } from '../../core/index.js';
|
|
4
2
|
import type { DomainContextSelectors } from '../../domain-runtime/domain-context/index.js';
|
|
5
3
|
import type { DomainServicesSelectors } from '../../domain-runtime/domain-services/index.js';
|
|
6
4
|
import type { UpdateTransformer } from '../store-system/store-system.js';
|
|
@@ -37,7 +35,7 @@ export declare class NavigationSystem<ENTITIES extends DomainEntity<string>, NAV
|
|
|
37
35
|
private get _initialExportState();
|
|
38
36
|
constructor(_context: NavigationSystemContext);
|
|
39
37
|
initialize: () => void;
|
|
40
|
-
getInitialUpdates: () => (import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"debugState", import("../../index.js").DebugStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"dragState", import("../../index.js").DragStateComponentState, "draggedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"exportState", import("../../
|
|
38
|
+
getInitialUpdates: () => (import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"debugState", import("../../index.js").DebugStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"dragState", import("../../index.js").DragStateComponentState, "draggedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"exportState", import("../../index.js").ExportStateComponentState, "activeState" | "exportedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"fullscreenState", import("../../index.js").FullscreenStateComponentState, "enabled">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"hoverState", import("../../index.js").HoverStateComponentState, "hoveredEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"navigationState", import("../../index.js").NavigationStateComponentState, "activeState" | "historyStack">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"toolState", import("../../index.js").ToolStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewState", import("../../index.js").ViewStateComponentState, "activeState">> | import("../../index.js").EphemeralRecordCreation<import("../../index.js").SystemComponentType<"viewportState", import("../../index.js").ViewportStateComponentState, "active">>)[];
|
|
41
39
|
/**
|
|
42
40
|
* Get the current navigation state from the provided system state. This method should be only used in transformers or other imperative contexts, for
|
|
43
41
|
* other use cases, use the observables provided by the NavigationSystem.
|
|
@@ -102,7 +100,7 @@ export declare class NavigationSystem<ENTITIES extends DomainEntity<string>, NAV
|
|
|
102
100
|
getPopNavigationUpdate: (state: DomainState<ENTITIES>) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"navigationState", import("../../index.js").NavigationStateComponentState, "activeState" | "historyStack">> | null;
|
|
103
101
|
getViewUpdate: (activeState: VIEW_STATES) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"viewState", import("../../index.js").ViewStateComponentState, "activeState">>;
|
|
104
102
|
getToolUpdate: (activeState: TOOL_STATES) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"toolState", import("../../index.js").ToolStateComponentState, "activeState">>;
|
|
105
|
-
getExportUpdate: (activeState: EXPORT_STATES, exportedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"exportState", import("../../
|
|
103
|
+
getExportUpdate: (activeState: EXPORT_STATES, exportedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"exportState", import("../../index.js").ExportStateComponentState, "activeState" | "exportedEntityId">>;
|
|
106
104
|
getSelectUpdate: (selectedEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">>;
|
|
107
105
|
getDeselectUpdate: () => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"selectionState", import("../../index.js").SelectionStateComponentState, "selectedEntityId">>;
|
|
108
106
|
getHoverInUpdate: (hoveredEntityId: ENTITIES['id']) => import("../../index.js").EphemeralRecordModification<import("../../index.js").SystemComponentType<"hoverState", import("../../index.js").HoverStateComponentState, "hoveredEntityId">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Subject as t,debounceTime as e,distinctUntilChanged as
|
|
1
|
+
import{Subject as t,debounceTime as e,distinctUntilChanged as i,map as n}from"rxjs";import{match as a}from"ts-pattern";import{isNonNullish as o}from"@salsita-ai/common/utils";import{debugStateComponent as r,dragStateComponent as c,exportStateComponent as s,fullscreenStateComponent as l,getComponentSystemFilterState as p,hoverStateComponent as d,navigationStateComponent as S,selectionStateComponent as g,systemUpdateFactory as m,systemVirtualEntityId as y,toolStateComponent as h,viewStateComponent as u,viewportStateComponent as I}from"../../core/index.js";import{AnalyticsEventFactory as v}from"../analytics-system/analytics-contracts.js";import{NavigationUpdateTag as T}from"./navigation-updates.js";export const createAutoSelectionTransformer=t=>(e,i)=>{let n=t.getActiveSelectionState(i),a=e.find(t=>"createDomainEntity"===t.kind);if(null!=a)return[...e,t.getSelectUpdate(a.entityId)];let o=e.find(t=>"replaceDomainEntity"===t.kind&&n===t.entityId);return null!=o?[...e,t.getSelectUpdate(o.replacementEntity.id)]:null!=e.find(t=>"deleteEntity"===t.kind&&n===t.entityId)?[...e,t.getDeselectUpdate()]:e};export class NavigationSystem{_context;_generation=null;_hoverSubject=new t;get _initialNavigationState(){return this._context.selectors.getNavigationStates()[0]}get _initialViewState(){return this._context.selectors.getViewStates()[0]}get _initialToolState(){return this._context.selectors.getToolStates()[0]}get _initialExportState(){return this._context.selectors.getExportStates()[0]}constructor(t){this._context=t,this._context.selectors.getStoreSystem().stateSlices.committed.pipe(n(t=>this.getActiveNavigationState(t.state)),i()).subscribe(t=>{this._context.domainServicesSelectors.getAnalyticsService().push(v.NavigationEvent({navigationState:t})),this._context.domainServicesSelectors.getLogger().appendToGlobalContext({navigationState:t})}),this._context.selectors.getStoreSystem().registerTransformer(100,createAutoSelectionTransformer(this),"AutoSelectionTransformer"),this._hoverSubject.pipe(e(20)).subscribe(({hoveredEntityId:t,generation:e})=>{if(e?.active===!0){if(t){if(this.getActiveHoverState(this._context.selectors.getStoreSystem().stateSlices.rendered.value.state)!==t){let e=this._context.selectors.getStoreSystem().prepareStateEmission([this.getHoverInUpdate(t)],this._context.selectors.getStoreSystem().stateSlices.rendered.value.state,"staged");this._context.selectors.getStoreSystem().emit(e)}}else if(this.getActiveHoverState(this._context.selectors.getStoreSystem().stateSlices.rendered.value.state)){let t=this._context.selectors.getStoreSystem().prepareStateEmission([this.getHoverOutUpdate()],this._context.selectors.getStoreSystem().stateSlices.rendered.value.state,"staged");this._context.selectors.getStoreSystem().emit(t)}}})}initialize=()=>{null!==this._generation&&(this._generation.active=!1),this._generation={active:!0},this._context.selectors.getStoreSystem().stageAndCommit(this.getInitialUpdates())};getInitialUpdates=()=>[this._initialNavigationState?m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:S},updateTag:T.Initial,initialState:{activeState:this._initialNavigationState,historyStack:[]}}):null,m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:g},updateTag:T.Initial,initialState:{selectedEntityId:this._context.selectors.getStoreSystem().stateSlices.committed.value.state.rootEntityId}}),m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:d},updateTag:T.Initial,initialState:{hoveredEntityId:null}}),m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:r},updateTag:T.Initial,initialState:{enabled:!1}}),this._initialViewState?m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:u},updateTag:T.Initial,initialState:{activeState:this._initialViewState}}):null,this._initialToolState?m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:h},updateTag:T.Initial,initialState:{activeState:this._initialToolState}}):null,this._initialExportState?m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:s},updateTag:T.Initial,initialState:{activeState:this._initialExportState,exportedEntityId:this._context.selectors.getStoreSystem().stateSlices.committed.value.state.rootEntityId}}):null,m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:l},updateTag:T.Initial,initialState:{enabled:!1}}),m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:c},updateTag:T.Initial,initialState:{draggedEntityId:null}}),m.EphemeralRecordCreation({componentInstance:{entityId:y,componentType:I},updateTag:T.Initial,initialState:{active:null}})].filter(o);getActiveNavigationState(t){return p(t).navigationState??this._initialNavigationState}getActiveSelectionState(t){return p(t).selectedEntityId??t.rootEntityId}getActiveHoverState(t){return p(t).hoveredEntityId??null}getActiveViewState(t){return p(t).viewState??this._initialViewState}getActiveToolState(t){return p(t).toolState??""}getActiveExportState(t){let e=p(t);return{activeState:e.exportState??this._initialExportState??"",exportedEntityId:e.exportedEntityId??t.rootEntityId}}getActiveFullscreenState(t){let e=this._context.selectors.getComponentReader().readOneComponent({entityId:y,componentType:l},t);return e?.state.enabled??!1}getActiveDragState(t){return p(t).draggedEntityId??null}getActiveViewportState(t){return p(t).viewports??null}getNavigationUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:S},updateTag:T.ReplaceNavigation,writableState:{activeState:t,historyStack:[]}});getPushNavigationUpdate=(t,e,i={})=>{let n=this.getActiveNavigationState(e),o=[...this.getHistoryStack(e),n],r=a(i.canStackOnto).with(void 0,()=>o).otherwise(t=>{let e;for(let i=o.length-1;i>=0;i--)if(t.includes(o[i])){e=i;break}return void 0===e?[]:o.slice(0,e+1)});return m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:S},updateTag:T.PushNavigation,writableState:{activeState:t,historyStack:r}})};getIsRootSelected=t=>this.getActiveSelectionState(t)===t.rootEntityId;getHistoryStack=t=>{let e=this._context.selectors.getComponentReader().readOneComponent({entityId:y,componentType:S},t);return e?.state.historyStack??[]};getHasStackToPop=t=>this.getHistoryStack(t).length>0;getPopNavigationUpdate=t=>{let e=this.getHistoryStack(t),i=e.at(-1);if(!i)return null;let n=e.slice(0,-1);return m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:S},updateTag:T.PopNavigation,writableState:{activeState:i,historyStack:n}})};getViewUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:u},updateTag:T.ActiveateView,writableState:{activeState:t}});getToolUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:h},updateTag:T.ActivateTool,writableState:{activeState:t}});getExportUpdate=(t,e)=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:s},updateTag:T.SetExportState,writableState:{activeState:t,exportedEntityId:e}});getSelectUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:g},updateTag:T.SelectEntity,writableState:{selectedEntityId:t}});getDeselectUpdate=()=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:g},updateTag:T.Deselect,writableState:{selectedEntityId:this._context.selectors.getStoreSystem().stateSlices.committed.value.state.rootEntityId}});getHoverInUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:d},updateTag:T.HoverIn,writableState:{hoveredEntityId:t}});getHoverOutUpdate=()=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:d},updateTag:T.HoverOut,writableState:{hoveredEntityId:null}});getFullscreenUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:l},updateTag:T.ToggleFullscreen,writableState:{enabled:t}});getDragStartUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:c},updateTag:T.DragStart,writableState:{draggedEntityId:t}});getDragEndUpdate=()=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:c},updateTag:T.DragEnd,writableState:{draggedEntityId:null}});getViewportUpdate=t=>m.EphemeralRecordModification({componentInstance:{entityId:y,componentType:I},updateTag:T.SetViewport,writableState:{active:t}});getToggleFullscreenUpdate=(t=this._context.selectors.getStoreSystem().stateSlices.committed.value.state)=>{let e=this.getActiveFullscreenState(t);return this.getFullscreenUpdate(!e)};debouncedToggleHover=t=>{this._hoverSubject.next({hoveredEntityId:t,generation:this._generation})};resetApplicationStates(){}}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import type { ValueOf } from '@salsita-ai/common/utils';
|
|
2
|
-
import { debugStateComponent } from '../../
|
|
3
|
-
import { dragStateComponent } from '../../components/drag-state-component.js';
|
|
4
|
-
import { exportStateComponent } from '../../components/export-state-component.js';
|
|
5
|
-
import { fullscreenStateComponent } from '../../components/fullscreen-state-component.js';
|
|
6
|
-
import { hoverStateComponent } from '../../components/hover-state-component.js';
|
|
7
|
-
import { navigationStateComponent } from '../../components/navigation-state-component.js';
|
|
8
|
-
import { selectionStateComponent } from '../../components/selection-state-component.js';
|
|
9
|
-
import { toolStateComponent } from '../../components/tool-state-component.js';
|
|
10
|
-
import type { EphemeralRecordCreation, EphemeralRecordModification, StateUpdate } from '../../components/updates.js';
|
|
11
|
-
import { viewStateComponent } from '../../components/view-state-component.js';
|
|
12
|
-
import { viewportStateComponent } from '../../components/viewport-state-component.js';
|
|
13
|
-
import type { DomainEntity } from '../../core/model.js';
|
|
2
|
+
import { type DomainEntity, type EphemeralRecordCreation, type EphemeralRecordModification, type StateUpdate, debugStateComponent, dragStateComponent, exportStateComponent, fullscreenStateComponent, hoverStateComponent, navigationStateComponent, selectionStateComponent, toolStateComponent, viewStateComponent, viewportStateComponent } from '../../core/index.js';
|
|
14
3
|
/**
|
|
15
4
|
* All updates performed by the navigation system.
|
|
16
5
|
*/
|