@salsita-ai/sdk 0.50.0-develop.b9eb39baf0 → 0.50.0-develop.bc4bdb2ffc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +34 -34
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/env-example.js +4 -0
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +4 -3
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +34 -0
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +3 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +212 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +56 -2
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +2 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +13 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/deployments.mdx +1 -1
- package/dist/docs/phoenix/expression-context.mdx +11 -3
- package/dist/docs/phoenix/phoenix-cli.mdx +24 -21
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +6 -6
- package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +10 -11
- package/dist/domain/admin-domain/index.d.ts +4 -5
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/assistant/assistant-manifest.d.ts +2 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -11
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +1 -2
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -3
- package/dist/domain/application/index.d.ts +1 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/{actions → core/action}/action-factory.d.ts +3 -2
- package/dist/domain/core/{action.d.ts → action/action.d.ts} +15 -15
- package/dist/domain/core/action/index.d.ts +2 -0
- package/dist/domain/core/action/index.js +1 -0
- package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -1
- 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 +37 -36
- 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 -1
- 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 -1
- 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 -1
- package/dist/domain/core/component/system-component-builder.js +1 -0
- package/dist/domain/{components → core/component}/system-component-filter.d.ts +19 -17
- 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 -1
- 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/domain-factory.d.ts +3 -3
- package/dist/domain/core/domain.d.ts +3 -3
- package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
- package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -1
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +9 -7
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +17 -19
- package/dist/domain/core/expression/index.d.ts +4 -0
- package/dist/domain/core/expression/index.js +1 -0
- package/dist/domain/core/index.d.ts +7 -4
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -1
- package/dist/domain/{invariants → core/invariant}/custom-invariants.d.ts +7 -7
- package/dist/domain/core/invariant/custom-invariants.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +5 -0
- package/dist/domain/core/invariant/index.js +1 -0
- package/dist/domain/{invariants → core/invariant}/invariants.d.ts +6 -4
- package/dist/domain/core/invariant/invariants.js +1 -0
- package/dist/domain/core/invariant/violation-component.js +1 -0
- package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
- package/dist/domain/core/recipe/index.d.ts +1 -0
- package/dist/domain/core/recipe/index.js +1 -0
- package/dist/domain/{domain-context/recipe-system → core/recipe}/recipes.d.ts +1 -1
- package/dist/domain/core/recipe/recipes.js +1 -0
- package/dist/domain/{relations → core/relation}/all-of-type-relation.d.ts +3 -1
- package/dist/domain/core/relation/all-of-type-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -1
- package/dist/domain/core/relation/component-factories.js +1 -0
- package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
- package/dist/domain/core/relation/composed-of.js +1 -0
- package/dist/domain/{relations → core/relation}/direct-relation.d.ts +2 -1
- package/dist/domain/core/relation/index.d.ts +9 -0
- package/dist/domain/core/relation/index.js +1 -0
- package/dist/domain/{relations → core/relation}/indirect-relation.d.ts +3 -1
- package/dist/domain/core/relation/indirect-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -4
- package/dist/domain/core/relation/reference-component.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
- package/dist/domain/{relations → core/relation}/relation-factory.d.ts +2 -1
- package/dist/domain/{relations → core/relation}/relation-implementation.d.ts +3 -1
- package/dist/domain/core/relation/relation-implementation.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 -1
- package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -1
- package/dist/domain/domain-builder.d.ts +1 -4
- package/dist/domain/domain-context/action-system/action-system.d.ts +2 -2
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +1 -2
- package/dist/domain/domain-context/index.d.ts +1 -2
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -4
- 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/recipe-system/recipe-cooker-system.d.ts +1 -3
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +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 -2
- package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -12
- 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 -3
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -1
- 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/auto-snap-transformer.d.ts +1 -2
- package/dist/domain/domain-context/transformers/context.d.ts +1 -4
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
- package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -5
- package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -2
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/index.d.ts +2 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +3 -3
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +8 -8
- package/dist/domain/domain-runtime/spec/index.d.ts +3 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.d.ts +1 -1
- package/dist/domain/{actions → domain-runtime/spec}/prepare-action-implementations.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
- package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +1 -2
- package/dist/domain/extensions/angle-indicator.js +1 -0
- package/dist/domain/extensions/attribute-switch.js +1 -0
- package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +1 -1
- package/dist/domain/extensions/autorotate-camera-component.js +1 -0
- package/dist/domain/extensions/basic-sidebar-footer.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity-object.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity.js +1 -0
- package/dist/domain/extensions/canvas-config.js +1 -0
- package/dist/domain/extensions/canvas-custom-environment.js +1 -0
- package/dist/domain/extensions/canvas-padding.js +1 -0
- package/dist/domain/extensions/canvas-preset-environment.js +1 -0
- package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/client-side-image.js +1 -0
- package/dist/domain/extensions/color-value.js +1 -0
- package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
- package/dist/domain/extensions/common/index.d.ts +4 -0
- package/dist/domain/extensions/common/index.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-header.d.ts +1 -1
- package/dist/domain/extensions/custom-header.js +1 -0
- package/dist/domain/extensions/custom-price-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/custom-sidebar-footer.js +1 -0
- package/dist/domain/extensions/dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-angle-indicator.d.ts +2 -1
- package/dist/domain/extensions/editable-angle-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-distance-dimension-indicator.d.ts +2 -1
- package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-offset-indicator.d.ts +2 -1
- package/dist/domain/extensions/editable-offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-size-indicator.d.ts +2 -1
- package/dist/domain/extensions/editable-size-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/entity-header.d.ts +1 -1
- package/dist/domain/extensions/entity-header.js +1 -0
- package/dist/domain/extensions/exit-tool-mode-fab.js +1 -0
- package/dist/domain/extensions/finalize-action.js +1 -0
- package/dist/domain/extensions/finalize-component.js +1 -0
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -0
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -0
- package/dist/domain/extensions/fixed-header.js +1 -0
- package/dist/domain/extensions/floating-header.js +1 -0
- package/dist/domain/extensions/hidden-header.js +1 -0
- package/dist/domain/extensions/hidden-sidebar-footer.js +1 -0
- package/dist/domain/extensions/horizontal-tabs.js +1 -0
- package/dist/domain/extensions/index.d.ts +69 -0
- package/dist/domain/extensions/index.js +1 -0
- package/dist/domain/{system-components → extensions}/list-selector-dimension-indicator.d.ts +2 -1
- package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
- package/dist/domain/extensions/multilingual-text-value.js +1 -0
- package/dist/domain/extensions/navigation-steps.js +1 -0
- package/dist/domain/extensions/offset-anchors.js +1 -0
- package/dist/domain/extensions/offset-indicator.js +1 -0
- package/dist/domain/extensions/offset.js +1 -0
- package/dist/domain/extensions/other-action.js +1 -0
- package/dist/domain/{system-components → extensions}/property-page.d.ts +1 -1
- package/dist/domain/extensions/property-page.js +1 -0
- package/dist/domain/extensions/read-sidebar-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/rotatable.js +1 -0
- package/dist/domain/extensions/rotation-handle.js +1 -0
- package/dist/domain/extensions/save-template-thumbnail.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-add-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-animation.js +1 -0
- package/dist/domain/extensions/scene-entity-control.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-delete-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-floor-object.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-navigation-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-object-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-select-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-wall-object.js +1 -0
- package/dist/domain/extensions/selectable-component.js +1 -0
- package/dist/domain/extensions/sidebar-tabs.js +1 -0
- package/dist/domain/extensions/simple-summary.js +1 -0
- package/dist/domain/extensions/size.js +1 -0
- package/dist/domain/extensions/sketching-draw.js +1 -0
- package/dist/domain/{system-components → extensions}/sketching-edit.d.ts +1 -1
- package/dist/domain/extensions/sketching-edit.js +1 -0
- package/dist/domain/extensions/summary-component.js +1 -0
- package/dist/domain/extensions/text-value.js +1 -0
- package/dist/domain/extensions/tool-controls.js +1 -0
- package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +1 -1
- package/dist/domain/extensions/tool-menu-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/toolbar.d.ts +1 -1
- package/dist/domain/extensions/toolbar.js +1 -0
- package/dist/domain/extensions/universal-sidebar-footer.js +1 -0
- package/dist/domain/extensions/view-controls.js +1 -0
- package/dist/domain/index.d.ts +2 -32
- package/dist/domain/index.js +1 -1
- package/dist/domain/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/validation-projections.d.ts +1 -2
- package/dist/domain/projections/validation-projections.js +1 -1
- package/dist/domain/system-components/admin-sidebar.js +1 -1
- package/dist/domain/system-components/angle-dimension.js +1 -1
- package/dist/domain/system-components/application-config.js +1 -1
- package/dist/domain/system-components/attribute-selection.js +1 -1
- package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-box-component.js +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.js +1 -1
- package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipes.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-box-geometry.js +1 -1
- package/dist/domain/system-components/collision-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.js +1 -1
- package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-point-geometry.js +1 -1
- package/dist/domain/system-components/common/index.d.ts +0 -4
- package/dist/domain/system-components/common/index.js +1 -1
- package/dist/domain/system-components/common/recipes.d.ts +1 -2
- package/dist/domain/system-components/constraint.d.ts +1 -1
- package/dist/domain/system-components/constraint.js +1 -1
- package/dist/domain/system-components/custom-scene-entity.js +1 -1
- package/dist/domain/system-components/detail.js +1 -1
- package/dist/domain/system-components/distance-dimension-select.js +1 -1
- package/dist/domain/system-components/distance-dimension.js +1 -1
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/generic-dimension.js +1 -1
- package/dist/domain/system-components/hidden-entity.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/index.d.ts +0 -68
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/material-override-property-transition.js +1 -1
- package/dist/domain/system-components/material-override-transformer.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/navigation-page.js +1 -1
- package/dist/domain/system-components/navigation-panel-list.js +1 -1
- package/dist/domain/system-components/pivot-point.js +1 -1
- package/dist/domain/system-components/price.js +1 -1
- package/dist/domain/system-components/projected-entities.js +1 -1
- package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipes.js +1 -1
- package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
- package/dist/domain/system-components/scene-entity-box-object.js +1 -1
- package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
- package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
- package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-group.js +1 -1
- package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object.js +1 -1
- package/dist/domain/system-components/scene-entity-point-light.js +1 -1
- package/dist/domain/system-components/scene-entity-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
- package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/sketching-line.js +1 -1
- package/dist/domain/system-components/sketching-rectangle.js +1 -1
- package/dist/domain/system-components/sketching.js +1 -1
- package/dist/domain/system-components/snap-axis.js +1 -1
- package/dist/domain/system-components/snap-edge.js +1 -1
- package/dist/domain/system-components/snap-plane.js +1 -1
- package/dist/domain/system-components/snap-point.js +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -2
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/gen/implementation.js +5 -5
- package/dist/legacy/domain-cli/gen/invariants.js +5 -3
- 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/env-example.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
- package/dist/phoenix/scripts/build-admin.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/common.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +3 -3
- package/dist/domain/actions/prepare-action-implementations.js +0 -5
- 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/domain-context/recipe-system/recipes.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/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.js +0 -1
- package/dist/domain/invariants/violation-component.js +0 -1
- package/dist/domain/relations/all-of-type-relation.js +0 -1
- package/dist/domain/relations/component-factories.js +0 -1
- package/dist/domain/relations/composed-of.js +0 -1
- package/dist/domain/relations/indirect-relation.js +0 -1
- package/dist/domain/relations/reference-component.js +0 -1
- package/dist/domain/system-components/angle-indicator.js +0 -1
- package/dist/domain/system-components/attribute-switch.js +0 -1
- package/dist/domain/system-components/autorotate-camera-component.js +0 -1
- package/dist/domain/system-components/basic-sidebar-footer.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity-object.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity.js +0 -1
- package/dist/domain/system-components/canvas-config.js +0 -1
- package/dist/domain/system-components/canvas-custom-environment.js +0 -1
- package/dist/domain/system-components/canvas-padding.js +0 -1
- package/dist/domain/system-components/canvas-preset-environment.js +0 -1
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/client-side-image.js +0 -1
- package/dist/domain/system-components/color-value.js +0 -1
- package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
- package/dist/domain/system-components/custom-header.js +0 -1
- package/dist/domain/system-components/custom-price-footer.js +0 -1
- package/dist/domain/system-components/custom-sidebar-footer.js +0 -1
- package/dist/domain/system-components/dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-angle-indicator.js +0 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-offset-indicator.js +0 -1
- package/dist/domain/system-components/editable-size-indicator.js +0 -1
- package/dist/domain/system-components/entity-header.js +0 -1
- package/dist/domain/system-components/exit-tool-mode-fab.js +0 -1
- package/dist/domain/system-components/finalize-action.js +0 -1
- package/dist/domain/system-components/finalize-component.js +0 -1
- package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +0 -1
- package/dist/domain/system-components/fit-selection-perspective-camera-component.js +0 -1
- package/dist/domain/system-components/fixed-header.js +0 -1
- package/dist/domain/system-components/floating-header.js +0 -1
- package/dist/domain/system-components/hidden-header.js +0 -1
- package/dist/domain/system-components/hidden-sidebar-footer.js +0 -1
- package/dist/domain/system-components/horizontal-tabs.js +0 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
- package/dist/domain/system-components/multilingual-text-value.js +0 -1
- package/dist/domain/system-components/navigation-steps.js +0 -1
- package/dist/domain/system-components/offset-anchors.js +0 -1
- package/dist/domain/system-components/offset-indicator.js +0 -1
- package/dist/domain/system-components/offset.js +0 -1
- package/dist/domain/system-components/other-action.js +0 -1
- package/dist/domain/system-components/property-page.js +0 -1
- package/dist/domain/system-components/read-sidebar-footer.js +0 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/rotatable.js +0 -1
- package/dist/domain/system-components/rotation-handle.js +0 -1
- package/dist/domain/system-components/save-template-thumbnail.js +0 -1
- package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-animation.js +0 -1
- package/dist/domain/system-components/scene-entity-control.js +0 -1
- package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-floor-object.js +0 -1
- package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-wall-object.js +0 -1
- package/dist/domain/system-components/selectable-component.js +0 -1
- package/dist/domain/system-components/sidebar-tabs.js +0 -1
- package/dist/domain/system-components/simple-summary.js +0 -1
- package/dist/domain/system-components/size.js +0 -1
- package/dist/domain/system-components/sketching-draw.js +0 -1
- package/dist/domain/system-components/sketching-edit.js +0 -1
- package/dist/domain/system-components/summary-component.js +0 -1
- package/dist/domain/system-components/text-value.js +0 -1
- package/dist/domain/system-components/tool-controls.js +0 -1
- package/dist/domain/system-components/tool-menu-fab.js +0 -1
- package/dist/domain/system-components/toolbar.js +0 -1
- package/dist/domain/system-components/universal-sidebar-footer.js +0 -1
- package/dist/domain/system-components/view-controls.js +0 -1
- /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
- /package/dist/domain/core/{action.js → action/action.js} +0 -0
- /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/{expression.js → expression/aliased-expressions.js} +0 -0
- /package/dist/domain/{relations/reference-field.js → core/expression/expression.js} +0 -0
- /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
- /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/relation/reference-field.js} +0 -0
- /package/dist/domain/{relations → core/relation}/relation-factory.js +0 -0
- /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
- /package/dist/domain/core/{state.js → state/state.js} +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.js +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
- /package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-config.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/client-side-image.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
- /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/dimension-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-action.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fixed-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/floating-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/navigation-steps.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/other-action.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/size.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type { DomainState } from './state.js';
|
|
2
|
+
import type { DomainContextSystems } from '../../domain-context/domain-context-systems.js';
|
|
3
|
+
import type { StateUpdate, UpdateFactory } from '../component/index.js';
|
|
4
|
+
import type { OpenExpressionContext } from '../expression/index.js';
|
|
5
|
+
import type { $DomainEntity, DomainEntity } from '../model/index.js';
|
|
6
|
+
import type { DomainState, IdSequence } from '../state/index.js';
|
|
8
7
|
/**
|
|
9
8
|
* The parameter and result types of the actions an application declares under `actions`, keyed by
|
|
10
9
|
* action name. Codegen derives it from the spec; `ActionSystem.prepareAction` and the
|
|
@@ -42,26 +41,27 @@ export interface PreparedAction<ENTITIES extends DomainEntity<string>, RESULT> {
|
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* What an action implementation reads besides its parameters and the state: the expression context
|
|
45
|
-
* (
|
|
46
|
-
*
|
|
44
|
+
* (core's part, and in `CONTEXT_EXTENSION` what whoever runs the action adds to it, such as the
|
|
45
|
+
* projections), the domain systems, an id sequence for entities it creates, and the update factory
|
|
46
|
+
* typed for the application's entities.
|
|
47
47
|
*/
|
|
48
|
-
export interface ActionContext<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> {
|
|
49
|
-
readonly expressionContext:
|
|
48
|
+
export interface ActionContext<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CONTEXT_EXTENSION = unknown> {
|
|
49
|
+
readonly expressionContext: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>;
|
|
50
50
|
readonly systems: DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
51
51
|
readonly getIdSequence: () => IdSequence<ENTITIES>;
|
|
52
52
|
readonly updates: UpdateFactory<ENTITIES>;
|
|
53
53
|
}
|
|
54
|
-
export type AnyActionContext = ActionContext<any, any, any, any, any, any, any, any, any, any>;
|
|
54
|
+
export type AnyActionContext = ActionContext<any, any, any, any, any, any, any, any, any, any, any>;
|
|
55
55
|
/**
|
|
56
56
|
* The implementation of one declared action. It must not change anything itself; a thrown error
|
|
57
57
|
* fails the call, and its message reaches whoever asked for the action, so it says what went wrong
|
|
58
58
|
* and how to fix the request.
|
|
59
59
|
*/
|
|
60
|
-
export type ActionImplementation<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, PARAMS, RESULT> = (params: PARAMS, state: DomainState<ENTITIES>, context: ActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>) => PreparedAction<ENTITIES, RESULT>;
|
|
61
|
-
export type AnyActionImplementation = ActionImplementation<any, any, any, any, any, any, any, any, any, any, any, unknown>;
|
|
60
|
+
export type ActionImplementation<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, PARAMS, RESULT, CONTEXT_EXTENSION = unknown> = (params: PARAMS, state: DomainState<ENTITIES>, context: ActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CONTEXT_EXTENSION>) => PreparedAction<ENTITIES, RESULT>;
|
|
61
|
+
export type AnyActionImplementation = ActionImplementation<any, any, any, any, any, any, any, any, any, any, any, unknown, any>;
|
|
62
62
|
/** The implementations of every declared action by name, as `DomainBuilder.withActionModules` merges them from `src/actions/`. */
|
|
63
|
-
export type ActionImplementations<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes> = {
|
|
64
|
-
readonly [NAME in keyof ACTION_TYPES]: ActionImplementation<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES[NAME]['params'], ACTION_TYPES[NAME]['result']>;
|
|
63
|
+
export type ActionImplementations<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>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes, CONTEXT_EXTENSION = unknown> = {
|
|
64
|
+
readonly [NAME in keyof ACTION_TYPES]: ActionImplementation<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES[NAME]['params'], ACTION_TYPES[NAME]['result'], CONTEXT_EXTENSION>;
|
|
65
65
|
};
|
|
66
66
|
/** The action implementations of an application with their types erased, as the runtime spec slice holds them. */
|
|
67
67
|
export type AnyActionImplementations = Readonly<Record<string, AnyActionImplementation>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./action-factory.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentInstance, EntityId, SystemComponentTypeConstraint } from '../
|
|
1
|
+
import type { ComponentInstance, EntityId, SystemComponentTypeConstraint } from '../model/index.js';
|
|
2
2
|
import type { ComponentSystemFilterState, FilterMismatchReason } from './system-component-filter.js';
|
|
3
3
|
/**
|
|
4
4
|
* Filter for reading a single attachment of a component on one entity.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isSnapshotInstance as e}from"../model/index.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const debugStateComponent=t.component("debugState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isDebugStateComponentSnapshot=t=>e(t,"singleton",debugStateComponent);export const isSystemDebugStateComponentSnapshot=e(o,"singleton",debugStateComponent);
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
import {
|
|
2
|
+
import { type ProjectModule } from '../../project-modules/index.js';
|
|
3
|
+
import { type CustomExpression, type OpenExpressionContext } from '../expression/index.js';
|
|
4
|
+
import type { $DomainEntity, AliasMap, DomainEntity, EntityByType, StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../model/index.js';
|
|
5
|
+
import type { DomainState } from '../state/index.js';
|
|
5
6
|
import { type ComponentSystemFilter, type NavigationFilterOptic } from './legacy-filter.js';
|
|
6
7
|
import type { GradualComponentSystemFilter, IdOrWithId } from './system-component-filter.js';
|
|
7
8
|
import type { Viewport } from './viewport-state-component.js';
|
|
8
|
-
type CustomOpticRead<ENTITIES extends DomainEntity<string>, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_STATE extends Record<string, unknown>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown
|
|
9
|
-
type CustomOpticAttach<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint> = (read: CustomOpticRead<ENTITIES, $ENTITY, StateOfComponent<COMPONENT_TYPE>, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>, write?: DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE>['write']) => DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE>;
|
|
10
|
-
export interface DomainComponentSimpleOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
9
|
+
type CustomOpticRead<ENTITIES extends DomainEntity<string>, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_STATE extends Record<string, unknown>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, CONTEXT_EXTENSION> = (self: $ENTITY, state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>) => COMPONENT_STATE;
|
|
10
|
+
type CustomOpticAttach<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint, CONTEXT_EXTENSION> = (read: CustomOpticRead<ENTITIES, $ENTITY, StateOfComponent<COMPONENT_TYPE>, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>, write?: DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION>['write']) => DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
11
|
+
export interface DomainComponentSimpleOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, COMPONENT_TYPE extends SystemComponentTypeConstraint, CONTEXT_EXTENSION = unknown> {
|
|
11
12
|
readonly kind: 'simple';
|
|
12
13
|
readonly instanceName: string;
|
|
13
14
|
readonly componentType: COMPONENT_TYPE;
|
|
14
15
|
readonly entityTypes: ReadonlySet<ENTITIES['type']>;
|
|
15
16
|
readonly generated?: boolean;
|
|
16
|
-
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>>;
|
|
17
|
-
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx:
|
|
17
|
+
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>>;
|
|
18
|
+
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>): StateOfComponent<COMPONENT_TYPE>;
|
|
18
19
|
write(writableState: WritableStateOfComponent<COMPONENT_TYPE>): Partial<Omit<ENTITY, 'id' | 'type'>>;
|
|
19
20
|
}
|
|
20
|
-
export interface DomainComponentDynamicOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
21
|
+
export interface DomainComponentDynamicOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, COMPONENT_TYPE extends SystemComponentTypeConstraint, CONTEXT_EXTENSION = unknown> {
|
|
21
22
|
readonly kind: 'dynamic';
|
|
22
23
|
readonly instanceName: string;
|
|
23
24
|
readonly componentType: COMPONENT_TYPE;
|
|
24
25
|
readonly entityTypes: ReadonlySet<ENTITIES['type']>;
|
|
25
26
|
readonly generated?: boolean;
|
|
26
|
-
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>>;
|
|
27
|
-
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx:
|
|
27
|
+
readonly navigationFilters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>>;
|
|
28
|
+
read(entityId: ENTITIES['id'], state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>): ReadonlyArray<StateOfComponent<COMPONENT_TYPE> & {
|
|
28
29
|
key: string;
|
|
29
30
|
}>;
|
|
30
31
|
}
|
|
31
|
-
export type DomainComponentOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, COMPONENT_TYPE extends SystemComponentTypeConstraint> = DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE> | DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE>;
|
|
32
|
+
export type DomainComponentOptic<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ENTITY extends ENTITIES, COMPONENT_TYPE extends SystemComponentTypeConstraint, CONTEXT_EXTENSION = unknown> = DomainComponentSimpleOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION> | DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
32
33
|
export type AnyDomainComponentOptic = DomainComponentOptic<any, any, any, any, any, any, any>;
|
|
33
34
|
/** Validates the `src/components/` files, or the optics a generated file lists, and flattens them. */
|
|
34
35
|
export declare const resolveComponentOpticModules: (modules: readonly ProjectModule[]) => readonly AnyDomainComponentOptic[];
|
|
35
|
-
export declare class DomainComponentOpticBuilder<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
36
|
+
export declare class DomainComponentOpticBuilder<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, ENTITY extends ENTITIES, $ENTITY extends $DomainEntity<ENTITIES>, COMPONENT_TYPE extends SystemComponentTypeConstraint, CONTEXT_EXTENSION = unknown> {
|
|
36
37
|
private readonly aliasMap;
|
|
37
38
|
private readonly entityTypes;
|
|
38
39
|
private readonly componentType?;
|
|
@@ -41,35 +42,35 @@ export declare class DomainComponentOpticBuilder<ENTITIES extends DomainEntity<s
|
|
|
41
42
|
private readonly generated;
|
|
42
43
|
private readonly entityTypeOrAliasNames;
|
|
43
44
|
private constructor();
|
|
44
|
-
static from<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES
|
|
45
|
-
withEntity<TYPE extends ENTITIES['type']>(entityType: TYPE): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | EntityByType<ENTITIES, TYPE>, $ENTITY | $MAP[TYPE], COMPONENT_TYPE>;
|
|
46
|
-
withAlias<ALIAS extends keyof ALIASES & keyof $MAP>(alias: ALIAS): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | ALIASES[ALIAS], $ENTITY | $MAP[ALIAS], COMPONENT_TYPE>;
|
|
47
|
-
withComponent<NEW_COMPONENT_TYPE extends SystemComponentType<any, any, any>>(componentType: NEW_COMPONENT_TYPE, instanceName: string, generated?: boolean): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, NEW_COMPONENT_TYPE>;
|
|
45
|
+
static from<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ALIASES extends Record<string, ENTITIES>, CONTEXT_EXTENSION = unknown>(aliasMap: AliasMap<ALIASES>): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, never, never, never, CONTEXT_EXTENSION>;
|
|
46
|
+
withEntity<TYPE extends ENTITIES['type']>(entityType: TYPE): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | EntityByType<ENTITIES, TYPE>, $ENTITY | $MAP[TYPE], COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
47
|
+
withAlias<ALIAS extends keyof ALIASES & keyof $MAP>(alias: ALIAS): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY | ALIASES[ALIAS], $ENTITY | $MAP[ALIAS], COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
48
|
+
withComponent<NEW_COMPONENT_TYPE extends SystemComponentType<any, any, any>>(componentType: NEW_COMPONENT_TYPE, instanceName: string, generated?: boolean): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, NEW_COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
48
49
|
/**
|
|
49
50
|
* @deprecated Use withGradualFilter instead
|
|
50
51
|
*/
|
|
51
|
-
withFilter(filter: ComponentSystemFilter | NavigationFilterOptic<ENTITIES, $ENTITY>): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
52
|
+
withFilter(filter: ComponentSystemFilter | NavigationFilterOptic<ENTITIES, $ENTITY>): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
52
53
|
withGradualFilter(filter: {
|
|
53
|
-
readonly navigationStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
54
|
-
readonly selectedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
55
|
-
readonly hoveredEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
56
|
-
readonly draggedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
57
|
-
readonly exportedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
58
|
-
readonly viewStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
59
|
-
readonly toolStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
60
|
-
readonly exportStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined>;
|
|
61
|
-
readonly modes?: ReadonlyArray<'owner' | 'read' | 'finalize'> | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, ReadonlyArray<'owner' | 'read' | 'finalize'> | undefined>;
|
|
62
|
-
readonly roles?: readonly SessionRole[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly SessionRole[] | undefined>;
|
|
63
|
-
readonly active?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
64
|
-
readonly fullscreen?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
65
|
-
readonly debug?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined>;
|
|
66
|
-
readonly viewports?: readonly Viewport[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly Viewport[] | undefined>;
|
|
67
|
-
}): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
54
|
+
readonly navigationStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
55
|
+
readonly selectedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
56
|
+
readonly hoveredEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
57
|
+
readonly draggedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
58
|
+
readonly exportedEntityIds?: readonly IdOrWithId[] | IdOrWithId | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
59
|
+
readonly viewStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
60
|
+
readonly toolStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
61
|
+
readonly exportStates?: readonly string[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
62
|
+
readonly modes?: ReadonlyArray<'owner' | 'read' | 'finalize'> | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, ReadonlyArray<'owner' | 'read' | 'finalize'> | undefined, CONTEXT_EXTENSION>;
|
|
63
|
+
readonly roles?: readonly SessionRole[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly SessionRole[] | undefined, CONTEXT_EXTENSION>;
|
|
64
|
+
readonly active?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined, CONTEXT_EXTENSION>;
|
|
65
|
+
readonly fullscreen?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined, CONTEXT_EXTENSION>;
|
|
66
|
+
readonly debug?: boolean | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, boolean | undefined, CONTEXT_EXTENSION>;
|
|
67
|
+
readonly viewports?: readonly Viewport[] | CustomExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, $ENTITY, readonly Viewport[] | undefined, CONTEXT_EXTENSION>;
|
|
68
|
+
}): DomainComponentOpticBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ALIASES, ENTITY, $ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
68
69
|
private validate;
|
|
69
70
|
private _getProfilerLabel;
|
|
70
|
-
attach: CustomOpticAttach<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, $ENTITY, COMPONENT_TYPE>;
|
|
71
|
-
attachMany: (read: (entity: $ENTITY, state: DomainState<ENTITIES>, ctx:
|
|
71
|
+
attach: CustomOpticAttach<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITY, $ENTITY, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
72
|
+
attachMany: (read: (entity: $ENTITY, state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>) => ReadonlyArray<StateOfComponent<COMPONENT_TYPE> & {
|
|
72
73
|
key: string;
|
|
73
|
-
}>) => DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE>;
|
|
74
|
+
}>) => DomainComponentDynamicOptic<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, COMPONENT_TYPE, CONTEXT_EXTENSION>;
|
|
74
75
|
}
|
|
75
76
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{SHARED_FOLDER_HINT as i,isRecord as n,resolveListModule as a}from"../../project-modules/index.js";import{withProfilerLabel as s}from"../../utils/profiler-label.js";import{createCustomExpression as o}from"../expression/index.js";let r={expected:"an attached component, or an array of them",fix:`Create it with phx.domain.attachComponent(...) (phx.domain.admin.attachComponent(...) under src/admin/), ${i}.`},d=t=>n(t)&&("simple"===t.kind||"dynamic"===t.kind)&&"string"==typeof t.instanceName&&"function"==typeof t.read;export const resolveComponentOpticModules=t=>t.flatMap(t=>a(t,r,d));export class DomainComponentOpticBuilder{aliasMap;entityTypes;componentType;instanceName;navigationFilters;generated;entityTypeOrAliasNames;constructor(t,e,i,n,a=[],s=!1,o=[]){this.aliasMap=t,this.entityTypes=e,this.componentType=i,this.instanceName=n,this.navigationFilters=a,this.generated=s,this.entityTypeOrAliasNames=o}static from(t){return new DomainComponentOpticBuilder(t,[])}withEntity(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,t],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,t])}withAlias(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,...this.aliasMap[t]],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,String(t)])}withComponent(t,e,i=!1){return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,t,e,this.navigationFilters,i,this.entityTypeOrAliasNames)}withFilter(i){if(console.warn(`Component ${this.componentType?.name}#${this.instanceName} on entity ${this.entityTypes.join(", ")} uses a legacy filter with full filter evaluation. This is a suboptimal variant and is deprecated in favor of per-criterion evaluation.
|
|
2
|
+
|
|
3
|
+
In your TS files, replace
|
|
4
|
+
withFilter()
|
|
5
|
+
->
|
|
6
|
+
withGradualFilter()
|
|
7
|
+
|
|
8
|
+
In YAML, replace
|
|
9
|
+
$filter:
|
|
10
|
+
$read: $falseOrFilterExpression
|
|
11
|
+
->
|
|
12
|
+
$filter:
|
|
13
|
+
active:
|
|
14
|
+
$read: $trueOrFalseExpression
|
|
15
|
+
# ... other eventual criteria
|
|
16
|
+
`),"function"==typeof i){let n=t(),a=t=>({evaluate:(a,s,o)=>{let r=e(s,n),d=r.get(a);if(!d){if(void 0===(d=i(o.domain.get$Entity(a,s),s)))throw Error(`Dynamic filter on component ${this.componentType?.name}.${this.instanceName} on entity ${a} returned 'undefined'. This is likely a bug in the component definition, check whether you are referencing a correct expression or field!`);r.put(a,d)}return"boolean"==typeof d?"active"===t?d:void 0:d[t]},meta:{}});return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:a("navigationStates"),selectedEntityIds:a("selectedEntityIds"),hoveredEntityIds:a("hoveredEntityIds"),draggedEntityIds:a("draggedEntityIds"),viewStates:a("viewStates"),toolStates:a("toolStates"),modes:a("modes"),roles:a("roles"),active:a("active"),fullscreen:a("fullscreen"),debug:a("debug"),viewports:a("viewports"),exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames)}return"boolean"==typeof i?new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{active:i,navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames):new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,active:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0,...i}],this.generated,this.entityTypeOrAliasNames)}withGradualFilter(t){let e=t=>"function"==typeof t?o(t,{}):t,i={navigationStates:e(t.navigationStates),selectedEntityIds:e(t.selectedEntityIds),hoveredEntityIds:e(t.hoveredEntityIds),draggedEntityIds:e(t.draggedEntityIds),exportedEntityIds:e(t.exportedEntityIds),viewStates:e(t.viewStates),toolStates:e(t.toolStates),exportStates:e(t.exportStates),modes:e(t.modes),roles:e(t.roles),active:e(t.active),fullscreen:e(t.fullscreen),debug:e(t.debug),viewports:e(t.viewports)};return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,i],this.generated,this.entityTypeOrAliasNames)}validate(){if(!this.componentType||!this.instanceName)throw Error("Use withComponent before attaching");if(!this.entityTypes.length)throw Error("Use withEntity and/or withAlias before attaching")}_getProfilerLabel(){return[...this.entityTypeOrAliasNames,this.componentType.name,this.instanceName].join("_")}attach=(i,n)=>{var a,o;let r,d;return this.validate(),a={kind:"simple",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n),write:n??(()=>({})),generated:this.generated},o=this._getProfilerLabel(),r=t(),d=s(o,a.read),{...a,read:(t,i,n)=>{let a=e(i,r),s=a.get(t);if(s)return s;let o=d(t,i,n);return a.put(t,o),o}}};attachMany=i=>{var n,a;let o,r;return this.validate(),n={kind:"dynamic",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n)},a=this._getProfilerLabel(),o=t(),r=s(a,n.read),{...n,read:(t,i,n)=>{let a=e(i,o),s=a.get(t);if(s)return s;let d=r(t,i,n);return a.put(t,d),d}}}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DomainEntityId, type EntityId } from '../
|
|
1
|
+
import { type DomainEntityId, type EntityId } from '../model/index.js';
|
|
2
2
|
export type DragStateComponentState = {
|
|
3
3
|
/** The entity currently being dragged in the scene, or `null` while nothing is dragged. */
|
|
4
4
|
readonly draggedEntityId: DomainEntityId<string> | null;
|
|
@@ -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 dragStateComponent=e.component("dragState").withState({type:"object",properties:{draggedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["draggedEntityId"],additionalProperties:!1,tsType:"DragStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"DragStateComponentState"}]}).withWritableKeys(["draggedEntityId"]).build();export const isDragStateComponentSnapshot=e=>t(e,"singleton",dragStateComponent);export const isSystemDragStateComponentSnapshot=t(o,"singleton",dragStateComponent);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DomainEntityId, type EntityId } from '../
|
|
1
|
+
import { type DomainEntityId, type EntityId } from '../model/index.js';
|
|
2
2
|
export type ExportStateComponentState = {
|
|
3
3
|
readonly activeState: string;
|
|
4
4
|
readonly exportedEntityId: DomainEntityId<string>;
|
|
@@ -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 exportStateComponent=e.component("exportState").withState({type:"object",properties:{activeState:{type:"string"},exportedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["activeState","exportedEntityId"],additionalProperties:!1}).withWritableKeys(["activeState","exportedEntityId"]).build();export const isExportStateComponentSnapshot=e=>t(e,"singleton",exportStateComponent);export const isSystemExportStateComponentSnapshot=t(o,"singleton",exportStateComponent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isSnapshotInstance as e}from"../model/index.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const fullscreenStateComponent=t.component("fullscreenState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isFullscreenStateComponentSnapshot=t=>e(t,"singleton",fullscreenStateComponent);export const isSystemFullscreenStateComponentSnapshot=e(o,"singleton",fullscreenStateComponent);
|
package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentSnapshot, type EntityId, type SystemComponentTypeConstraint } from '../
|
|
1
|
+
import { type ComponentSnapshot, type EntityId, type SystemComponentTypeConstraint } from '../model/index.js';
|
|
2
2
|
export type GroupedComponentSnapshots<COMPONENT_TYPE extends SystemComponentTypeConstraint> = {
|
|
3
3
|
[NAME in COMPONENT_TYPE['name']]: ReadonlyArray<ComponentSnapshot<Extract<COMPONENT_TYPE, {
|
|
4
4
|
name: NAME;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isArray as o,isShallowEqual as t}from"@salsita-ai/common/utils";import{areEqualComponentSnapshots as n,isEqualComponentSnapshot as e}from"../model/index.js";export const isEqualGroupedComponentSnapshots=(p,m)=>t(p,m,(t,p)=>t===p||void 0!==t&&void 0!==p&&(o(t)&&o(p)?n(t,p):!(o(t)||o(p))&&e(t,p)));export const groupComponentsByEntityIdAndName=o=>{let t=new Map;return o.forEach(o=>{let n=o.componentInstance.entityId,e=o.componentInstance.componentType.name,p=t.get(n);p||(p={},t.set(n,p));let m=p[e]??[];p[e]=m,m.push(o)}),t};
|
|
@@ -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 hoverStateComponent=e.component("hoverState").withState({type:"object",properties:{hoveredEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["hoveredEntityId"],additionalProperties:!1,tsType:"HoverStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"HoverStateComponentState"}]}).withWritableKeys(["hoveredEntityId"]).build();export const isHoverStateComponentSnapshot=e=>t(e,"singleton",hoverStateComponent);export const isSystemHoverStateComponentSnapshot=t(o,"singleton",hoverStateComponent);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type * from './component-reader-types.js';
|
|
2
|
+
export * from './debug-state-component.js';
|
|
3
|
+
export * from './domain-component-optic.js';
|
|
4
|
+
export * from './drag-state-component.js';
|
|
5
|
+
export * from './export-state-component.js';
|
|
6
|
+
export * from './fullscreen-state-component.js';
|
|
7
|
+
export * from './group-components-by-entity-id-and-name.js';
|
|
8
|
+
export * from './hover-state-component.js';
|
|
9
|
+
export * from './legacy-filter.js';
|
|
10
|
+
export * from './navigation-state-component.js';
|
|
11
|
+
export * from './selection-state-component.js';
|
|
12
|
+
export * from './system-component-builder.js';
|
|
13
|
+
export * from './system-component-filter.js';
|
|
14
|
+
export * from './system-virtual-entity.js';
|
|
15
|
+
export * from './tool-state-component.js';
|
|
16
|
+
export * from './updates.js';
|
|
17
|
+
export * from './view-state-component.js';
|
|
18
|
+
export * from './viewport-state-component.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./debug-state-component.js";export*from"./domain-component-optic.js";export*from"./drag-state-component.js";export*from"./export-state-component.js";export*from"./fullscreen-state-component.js";export*from"./group-components-by-entity-id-and-name.js";export*from"./hover-state-component.js";export*from"./legacy-filter.js";export*from"./navigation-state-component.js";export*from"./selection-state-component.js";export*from"./system-component-builder.js";export*from"./system-component-filter.js";export*from"./system-virtual-entity.js";export*from"./tool-state-component.js";export*from"./updates.js";export*from"./view-state-component.js";export*from"./viewport-state-component.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { $DomainEntity, DomainEntity
|
|
2
|
+
import type { $DomainEntity, DomainEntity } from '../model/index.js';
|
|
3
|
+
import type { DomainState } from '../state/index.js';
|
|
3
4
|
import { type IdOrWithId } from './system-component-filter.js';
|
|
4
5
|
import type { Viewport } from './viewport-state-component.js';
|
|
5
6
|
export type DeclarativeComponentSystemFilter = {
|
|
@@ -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 navigationStateComponent=e.component("navigationState").withState({type:"object",properties:{activeState:{type:"string"},historyStack:{type:"array",items:{type:"string"}}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState","historyStack"]).build();export const isNavigationComponentSnapshot=e=>t(e,"singleton",navigationStateComponent);export const isSystemNavigationComponentSnapshot=t(o,"singleton",navigationStateComponent);
|
|
@@ -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 selectionStateComponent=e.component("selectionState").withState({type:"object",properties:{selectedEntityId:{type:"string"}},required:["selectedEntityId"],additionalProperties:!1,tsType:"SelectionStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"SelectionStateComponentState"}]}).withWritableKeys(["selectedEntityId"]).build();export const isSelectionComponentSnapshot=e=>t(e,"singleton",selectionStateComponent);export const isSystemSelectionComponentSnapshot=t(o,"singleton",selectionStateComponent);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SchemaOfObject, SystemComponentType } from '../model/index.js';
|
|
2
2
|
export declare class SystemComponentBuilder<NAME extends string, COMPONENT_STATE extends Record<string, unknown>, WRITABLE_KEYS extends keyof COMPONENT_STATE> {
|
|
3
3
|
private readonly name;
|
|
4
4
|
private readonly writableKeys;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"lodash-es/pick.js";import{getCommonPhxDefinitions as t}from"../model/index.js";import{extendedSchemaValidator as i}from"../schema/index.js";export class SystemComponentBuilder{name;writableKeys;jsonSchema;constructor(e,t,i){this.name=e,this.writableKeys=t,this.jsonSchema=i}static component(e){return new SystemComponentBuilder(e,[],{type:"object",properties:{},required:[],additionalProperties:!1})}withState(e){return new SystemComponentBuilder(this.name,[],e)}withWritableKeys(e){return new SystemComponentBuilder(this.name,e,this.jsonSchema)}build(){let s=t(),r={...this.jsonSchema,definitions:{...s,...this.jsonSchema.definitions}};return{name:this.name,writableKeys:this.writableKeys,schema:this.jsonSchema,validateState:i.compile(r),validateWritableState:i.compile({...r,properties:e(this.jsonSchema.properties,this.writableKeys),required:this.jsonSchema.required?.filter(e=>this.writableKeys.includes(e))})}}}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
2
|
-
import type { AnonymousExpression,
|
|
2
|
+
import type { AnonymousExpression, OpenExpressionContext } from '../expression/index.js';
|
|
3
|
+
import type { DomainEntity, DomainEntityId } from '../model/index.js';
|
|
4
|
+
import type { DomainState } from '../state/index.js';
|
|
3
5
|
import { type Viewport } from './viewport-state-component.js';
|
|
4
6
|
export interface ComponentSystemFilterState {
|
|
5
7
|
navigationState: string | undefined;
|
|
@@ -36,21 +38,21 @@ export type ComponentSystemFilterProps = {
|
|
|
36
38
|
debug?: boolean;
|
|
37
39
|
viewports?: readonly Viewport[];
|
|
38
40
|
};
|
|
39
|
-
export interface GradualComponentSystemFilter<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
|
|
40
|
-
navigationStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined>;
|
|
41
|
-
selectedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
42
|
-
hoveredEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
43
|
-
draggedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
44
|
-
exportedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined>;
|
|
45
|
-
viewStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined>;
|
|
46
|
-
toolStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined>;
|
|
47
|
-
exportStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined>;
|
|
48
|
-
modes: undefined | ReadonlyArray<'owner' | 'read' | 'finalize'> | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, ReadonlyArray<'owner' | 'read' | 'finalize'> | undefined>;
|
|
49
|
-
roles: undefined | readonly SessionRole[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly SessionRole[] | undefined>;
|
|
50
|
-
active: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined>;
|
|
51
|
-
fullscreen: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined>;
|
|
52
|
-
debug: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined>;
|
|
53
|
-
viewports: undefined | readonly Viewport[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly Viewport[] | undefined>;
|
|
41
|
+
export interface GradualComponentSystemFilter<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>, CONTEXT_EXTENSION = unknown> {
|
|
42
|
+
navigationStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
43
|
+
selectedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
44
|
+
hoveredEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
45
|
+
draggedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
46
|
+
exportedEntityIds: undefined | readonly IdOrWithId[] | IdOrWithId | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly IdOrWithId[] | IdOrWithId | undefined, CONTEXT_EXTENSION>;
|
|
47
|
+
viewStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
48
|
+
toolStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
49
|
+
exportStates: undefined | readonly string[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly string[] | undefined, CONTEXT_EXTENSION>;
|
|
50
|
+
modes: undefined | ReadonlyArray<'owner' | 'read' | 'finalize'> | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, ReadonlyArray<'owner' | 'read' | 'finalize'> | undefined, CONTEXT_EXTENSION>;
|
|
51
|
+
roles: undefined | readonly SessionRole[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly SessionRole[] | undefined, CONTEXT_EXTENSION>;
|
|
52
|
+
active: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined, CONTEXT_EXTENSION>;
|
|
53
|
+
fullscreen: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined, CONTEXT_EXTENSION>;
|
|
54
|
+
debug: undefined | boolean | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, boolean | undefined, CONTEXT_EXTENSION>;
|
|
55
|
+
viewports: undefined | readonly Viewport[] | AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ENTITIES, readonly Viewport[] | undefined, CONTEXT_EXTENSION>;
|
|
54
56
|
}
|
|
55
57
|
export interface FilterMismatchReason {
|
|
56
58
|
readonly modes?: ReadonlyArray<'owner' | 'read' | 'finalize'>;
|
|
@@ -68,7 +70,7 @@ export interface FilterMismatchReason {
|
|
|
68
70
|
readonly draggedEntityIds?: readonly IdOrWithId[] | IdOrWithId;
|
|
69
71
|
readonly active?: boolean;
|
|
70
72
|
}
|
|
71
|
-
export declare const isComponentActive: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, SELF extends ENTITIES>(filterState: ComponentSystemFilterState, filters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA>>, id: SELF['id'], domainState: DomainState<ENTITIES>, context:
|
|
73
|
+
export declare const isComponentActive: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, SELF extends ENTITIES, CONTEXT_EXTENSION = unknown>(filterState: ComponentSystemFilterState, filters: ReadonlyArray<GradualComponentSystemFilter<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>>, id: SELF['id'], domainState: DomainState<ENTITIES>, context: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>, reportReason?: boolean) => boolean | readonly FilterMismatchReason[];
|
|
72
74
|
export declare const ComponentSystemFilterPropsSchema: {
|
|
73
75
|
readonly tsType: 'ComponentSystemFilterProps';
|
|
74
76
|
readonly import: [{
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import type { Localizable } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ComponentInstance, DomainEntity, EntityByType, EntityId, StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../
|
|
2
|
+
import type { ComponentInstance, DomainEntity, EntityByType, EntityId, StateOfComponent, SystemComponentType, SystemComponentTypeConstraint, WritableStateOfComponent } from '../model/index.js';
|
|
3
3
|
import type { OneComponentFilter } from './component-reader-types.js';
|
|
4
4
|
export interface ComponentModification<COMPONENT_TYPE extends SystemComponentTypeConstraint> {
|
|
5
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 EntityId } from '../
|
|
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);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ActionDefinitions, AnyActionImplementations } from './action.js';
|
|
3
|
-
import type { Expression } from './expression.js';
|
|
4
|
-
import type { MigrateFunction } from './migrations.js';
|
|
2
|
+
import type { ActionDefinitions, AnyActionImplementations } from './action/index.js';
|
|
3
|
+
import type { Expression } from './expression/index.js';
|
|
5
4
|
import type { $DomainEntity, $DomainEntityReflection, DomainEntity, EntityByType, EntityReflections, SchemaOfObject } from './model/index.js';
|
|
5
|
+
import type { MigrateFunction } from './state/index.js';
|
|
6
6
|
type $EntityReflections<ENTITIES extends DomainEntity<string>> = {
|
|
7
7
|
[TYPE in ENTITIES['type']]: $DomainEntityReflection<$DomainEntity<EntityByType<ENTITIES, TYPE>>>;
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AnyExpressions,
|
|
1
|
+
import type { AnyExpressions, OpenExpressionContext } from './expression/index.js';
|
|
2
2
|
import { type $DomainEntity, type AnyEntityReflections, type DomainEntity, type DomainEntityId, type EntityByType } from './model/index.js';
|
|
3
|
-
import type { DomainState } from './state.js';
|
|
3
|
+
import type { DomainState } from './state/index.js';
|
|
4
4
|
export type AllowedRootEntityTypes<ALLOWED_ROOT_ENTITIES extends DomainEntity<string>> = ReadonlyArray<ALLOWED_ROOT_ENTITIES['type']>;
|
|
5
5
|
export type AnyAllowedRootEntityTypes = AllowedRootEntityTypes<DomainEntity<string>>;
|
|
6
6
|
/**
|
|
@@ -12,7 +12,7 @@ export interface DomainSelectors {
|
|
|
12
12
|
readonly getDomainExpressions: () => AnyExpressions;
|
|
13
13
|
readonly getAllowedRootEntityTypes: () => ReadonlyArray<string>;
|
|
14
14
|
readonly getEntityReflections: () => AnyEntityReflections;
|
|
15
|
-
readonly getExpressionContext: () =>
|
|
15
|
+
readonly getExpressionContext: () => OpenExpressionContext<any, any, any, any, any>;
|
|
16
16
|
}
|
|
17
17
|
/** Effective mode used by domain expressions and systems. */
|
|
18
18
|
export type DomainMode = 'owner' | 'read' | 'finalize';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
|
|
2
|
+
import type { AnonymousExpression } from './expression.js';
|
|
3
|
+
/**
|
|
4
|
+
* The expressions a project implements, keyed by entity type or alias and then by expression name.
|
|
5
|
+
* It is what `implementCustomExpressions` returns and what the domain is built from; an alias key
|
|
6
|
+
* stands for every entity type the alias expands to.
|
|
7
|
+
*/
|
|
8
|
+
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>, CONTEXT_EXTENSION = unknown> = {
|
|
9
|
+
[K in TypeOrAlias<ENTITIES, ALIASES>]?: Record<string, AnonymousExpression<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ExpandAlias<ENTITIES, ALIASES, K>, unknown, CONTEXT_EXTENSION>>;
|
|
10
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DomainEntity, ExpandAlias, TypeOrAlias } from '../model/index.js';
|
|
2
|
+
import type { AnonymousExpression, ExpressionMetas } from './expression.js';
|
|
2
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>>>> = {
|
|
3
4
|
readonly [TYPE_OR_ALIAS in keyof CONSTANTS & string]: {
|
|
4
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}]]);
|