@salsita-ai/sdk 0.50.0-develop.c1dcc73e88 → 0.50.0-develop.c28cfb7ded
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application-spec/core/components/component-filter.d.ts +53 -0
- package/dist/application-spec/core/components/component-filter.js +1 -0
- package/dist/application-spec/core/components/index.d.ts +2 -0
- package/dist/application-spec/core/components/index.js +1 -0
- package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
- package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
- package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/expressions/index.d.ts +2 -0
- package/dist/application-spec/core/expressions/index.js +1 -0
- package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
- package/dist/application-spec/core/expressions/relation-expression-params.js +1 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
- package/dist/application-spec/core/index.d.ts +2 -0
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-value.d.ts +1 -1
- package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
- package/dist/application-spec/enhanced-json/index.d.ts +4 -0
- package/dist/application-spec/enhanced-json/index.js +1 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
- package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +4 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +41 -40
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +10 -3
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +6 -2
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +8 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +5 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +6 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
- package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
- package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
- package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/client/phoenix-api.d.ts +96 -0
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +32 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +20 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +22 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +2 -0
- package/dist/configurator/common/frontend-analytics.js +1 -1
- package/dist/configurator/common/index.d.ts +2 -0
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.d.ts +31 -0
- package/dist/configurator/common/use-finalize-action.js +1 -0
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +2 -2
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +7 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
- package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
- package/dist/configurator/ui/configurator-layout/{universal → slots/desktop-sidebar}/DesktopSidebar.d.ts +23 -14
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +2 -2
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
- package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
- package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/planes.mdx +1 -1
- package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
- package/dist/docs/index.json +42 -1
- package/dist/docs/layouts/custom-layout.mdx +2125 -0
- package/dist/docs/layouts/header/fixed.mdx +2 -2
- package/dist/docs/layouts/header/floating.mdx +2 -2
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
- package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/transformers.mdx +4 -0
- package/dist/docs/phoenix/application-states.mdx +9 -7
- package/dist/docs/phoenix/configurator-interface.mdx +136 -18
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +116 -0
- package/dist/docs/phoenix/phoenix-cli.mdx +8 -2
- package/dist/docs/phoenix/project-structure.mdx +6 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
- package/dist/docs/phoenix/testing.mdx +140 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +17 -0
- package/dist/domain/application/application-config.d.ts +3 -1
- package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +9 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +6 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/configurator-builder.d.ts +5 -2
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
- package/dist/domain/core/invariant/violation.d.ts +50 -2
- package/dist/domain/core/invariant/violation.js +1 -1
- package/dist/domain/core/model/model.d.ts +1 -1
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +28 -1
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
- package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
- package/dist/domain/domain-runtime/errors/index.js +1 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/index.d.ts +1 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +8 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
- package/dist/domain/extensions/attribute-switch.d.ts +1 -1
- package/dist/domain/extensions/attribute-switch.js +1 -1
- package/dist/domain/extensions/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/client-side-image.d.ts +2 -2
- package/dist/domain/extensions/client-side-image.js +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.js +1 -1
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
- package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/navigation-steps.d.ts +2 -2
- package/dist/domain/extensions/offset-indicator.js +1 -1
- package/dist/domain/extensions/rotation-handle.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.js +1 -1
- package/dist/domain/extensions/scene-entity-animation.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
- package/dist/domain/mocks/create-test-application-config.js +1 -0
- package/dist/domain/mocks/index.d.ts +1 -0
- package/dist/domain/mocks/index.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +2 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
- package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +21 -3
- package/dist/domain/system-components/common/recipes.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +10 -23
- package/dist/domain/system-components/drag-handle.d.ts +1 -1
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.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.js +1 -1
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- 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/constant-expressions.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +81 -68
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +17 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +30 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
- package/dist/react-sdk/domain-context/index.d.ts +2 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +33 -26
- package/schema/domain-spec.json +1115 -209
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.js +0 -16
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const projectAssistantSetupManifest=(e,i)=>{let t=e=>Object.fromEntries(Object.entries(e).map(([e,i])=>[e,{groups:Object.fromEntries(i.groups.map(e=>[e.instanceName,{...void 0===e.description?{}:{description:e.description},...!e.dryRuns?{allowDryRuns:!1}:{}}]))}])),s=e.declarations;return{entities:Object.fromEntries(Object.entries(s.entities).map(([e,i])=>[e,Object.fromEntries(i.map(e=>[e.source,{...!e.describedByManifest||void 0===e.valueDescription?{}:{description:e.valueDescription}}]))])),deletable:Object.fromEntries(s.deletable.map(e=>[e,{}])),writable:Object.fromEntries(Object.entries(s.writable).map(([e,i])=>[e,Object.fromEntries(Object.entries(i).map(([e,i])=>{let t=Object.values(i.members).find(e=>e.options)?.options?.options;return[e,t?{options:{...t.validate?{validate:!0}:{},...!t.dryRuns?{allowDryRuns:!1}:{}}}:{}]}))])),childRecipes:t(s.childRecipes),replaceRecipes:t(s.replaceRecipes),actions:Object.fromEntries(e.actionFields.map(e=>[e.actionName,void 0===e.description?{}:{description:e.description}])),...i?{instructions:i.instructions??void 0,ai:{...i.ai}}:{}}};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AssistantManifest } from '../assistant-manifest.js';
|
|
2
|
+
import type { AssistantResolvedManifest } from '../assistant-resolved-manifest.js';
|
|
3
|
+
import type { AssistantSetupHandlerProps, TypedCreateAssistantSetupHandler } from './AssistantSetupHandler.js';
|
|
4
|
+
/** Session-derived browser manifest; a rejected setup retains its error without exposing the baseline. */
|
|
5
|
+
export interface SessionAssistantSetup {
|
|
6
|
+
readonly manifest: AssistantManifest | null;
|
|
7
|
+
readonly error: Error | null;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
readonly resolved: AssistantResolvedManifest | null;
|
|
11
|
+
readonly handler: ReturnType<TypedCreateAssistantSetupHandler<Record<string, unknown>>> | undefined;
|
|
12
|
+
readonly inputs: AssistantSetupHandlerProps<Record<string, unknown>>['inputs'] | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const createSessionAssistant: ({ resolved, handler, inputs }: Props) => SessionAssistantSetup;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildAssistantManifest as r}from"../build-assistant-manifest.js";import{applyAssistantSetup as n}from"./apply-assistant-setup.js";import{projectAssistantSetupManifest as t}from"./assistant-setup-manifest.js";export const createSessionAssistant=({resolved:e,handler:s,inputs:l})=>{if(!e)return{manifest:null,error:null};try{if(!s)return{manifest:r(e),error:null};if(!l)return{manifest:null,error:null};let i=n(e,null,s.handler().handler({manifest:t(e,null),inputs:l}));return{manifest:i?r(i.resolved):null,error:null}}catch(r){return{manifest:null,error:r instanceof Error?r:Error(String(r))}}};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './assistant-setup-manifest.js';
|
|
2
|
+
export * from './AssistantSetupHandler.js';
|
|
3
|
+
export { applyAssistantSetup, AssistantSetupError } from './apply-assistant-setup.js';
|
|
4
|
+
export { createSessionAssistant, type SessionAssistantSetup } from './create-session-assistant.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./assistant-setup-manifest.js";export*from"./AssistantSetupHandler.js";export{applyAssistantSetup,AssistantSetupError}from"./apply-assistant-setup.js";export{createSessionAssistant}from"./create-session-assistant.js";
|
|
@@ -3,9 +3,9 @@ import type { ThemeOptions } from '@mui/material';
|
|
|
3
3
|
import type { z } from 'zod';
|
|
4
4
|
import type { FinalizeTaskResource } from '@salsita-ai/contracts/webhook';
|
|
5
5
|
import { type $DomainEntity, type DomainEntity, type DomainFactory, type EnumLike, type ProductPreset, type SchemaOfObject } from '../core/index.js';
|
|
6
|
-
import { type ProjectModule } from '../domain-runtime/index.js';
|
|
6
|
+
import { type ElementRegistration, type ProjectModule } from '../domain-runtime/index.js';
|
|
7
7
|
import type { AclConfig, ApplicationConfig, DataSpec, DefaultEnvs, ResourcesConfig, SpecTransformer, TransformersConfig, UserInterfaceConfig } from './application-config.js';
|
|
8
|
-
import type
|
|
8
|
+
import { type AssistantResolvedManifest } from './assistant/index.js';
|
|
9
9
|
interface ConfiguratorBuilderContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
|
|
10
10
|
version?: string;
|
|
11
11
|
textLanguages?: string[];
|
|
@@ -44,6 +44,7 @@ interface ConfiguratorBuilderContext<ENTITIES extends DomainEntity<string> = nev
|
|
|
44
44
|
tagName?: string;
|
|
45
45
|
handlers?: readonly ProjectModule[];
|
|
46
46
|
elements?: readonly ProjectModule[];
|
|
47
|
+
defaultElements?: readonly ElementRegistration[];
|
|
47
48
|
}
|
|
48
49
|
export declare class ConfiguratorBuilder<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
|
|
49
50
|
private readonly _context;
|
|
@@ -87,6 +88,8 @@ export declare class ConfiguratorBuilder<ENTITIES extends DomainEntity<string> =
|
|
|
87
88
|
withHandlers(handlers: readonly ProjectModule[]): ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
88
89
|
/** Sets the elements as project modules, one per `src/elements/` file, for the runtime spec to validate. */
|
|
89
90
|
withElements(elements: readonly ProjectModule[]): ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
91
|
+
/** Sets the SDK's default element registrations; a project element with the same name replaces one. */
|
|
92
|
+
withDefaultElements(defaultElements: readonly ElementRegistration[]): ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
90
93
|
withResources<NEW_RESOURCE extends string>(resources: ReadonlyArray<FinalizeTaskResource<NEW_RESOURCE>>): ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, NEW_RESOURCE>;
|
|
91
94
|
withWebComponentTag(tagName: string): ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
92
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{defaultI18n as e}from"#package/i18n";import{extendedSchemaValidator as i}from"../core/index.js";import{NoopAnalyticsSystem as r}from"../domain-context/index.js";import{createDomainRuntime as n}from"../domain-runtime/index.js";import{isGetApplicationWrapperHandler as o}from"./GetApplicationWrapperHandler.js";import{isGetWebComponentOptionsHandler as a}from"./GetWebComponentOptions.js";import{
|
|
1
|
+
import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{defaultI18n as e}from"#package/i18n";import{extendedSchemaValidator as i}from"../core/index.js";import{NoopAnalyticsSystem as r}from"../domain-context/index.js";import{createDomainRuntime as n}from"../domain-runtime/index.js";import{isGetApplicationWrapperHandler as o}from"./GetApplicationWrapperHandler.js";import{isGetWebComponentOptionsHandler as a}from"./GetWebComponentOptions.js";import{isAssistantSetupHandler as s}from"./assistant/index.js";import{createInitialPublishedData as l}from"./create-initial-published-data.js";import{isDataRowValidatorHandler as h}from"./published-data/DataRowValidatorHandler.js";import{isFilterPublishedChunksHandler as u}from"./published-data/FilterPublishedChunksHandler.js";import{isMapPublishedChunkedDataHandler as d}from"./published-data/MapPublishedChunkedDataHandler.js";import{isMapPublishedRevisionDataHandler as c}from"./published-data/MapPublishedRevisionDataHandler.js";import{isSheetValidatorHandler as f}from"./published-data/SheetValidatorHandler.js";export class ConfiguratorBuilder{_context;constructor(t){this._context=t}withDefaultEnvs(t){return new ConfiguratorBuilder({...this._context,defaultEnvs:t})}withVersion(t){return new ConfiguratorBuilder({...this._context,version:t})}withTextLanguages(t){return new ConfiguratorBuilder({...this._context,textLanguages:t})}withAcl(t){return new ConfiguratorBuilder({...this._context,acl:t})}withAdminRelease(t){return new ConfiguratorBuilder({...this._context,enableAdminRelease:t})}withUi(t){return new ConfiguratorBuilder({...this._context,ui:t})}withResourcesConfig(t){return new ConfiguratorBuilder({...this._context,resourcesConfig:t})}withChunks(t){return new ConfiguratorBuilder({...this._context,chunks:t})}withPublishedDataHash(t){return new ConfiguratorBuilder({...this._context,publishedDataHash:t})}withAssistant(t){return new ConfiguratorBuilder({...this._context,assistant:t})}withTheme(t){return new ConfiguratorBuilder({...this._context,theme:t})}withDomainFactory(t){return new ConfiguratorBuilder({...this._context,domainFactory:t})}withAdminDomainFactory(t){return new ConfiguratorBuilder({...this._context,adminDomainFactory:t})}withI18n=t=>new ConfiguratorBuilder({...this._context,i18n:t});withPrefetchedFinalizeData(t){return new ConfiguratorBuilder({...this._context,prefetchedFinalizeData:t})}withFinalizeData(t){return new ConfiguratorBuilder({...this._context,finalizeData:t})}withFinalizeResult(t){return new ConfiguratorBuilder({...this._context,finalizeResult:t})}withCallbackData(t){return new ConfiguratorBuilder({...this._context,callbackData:t})}withNavigationState(t){return new ConfiguratorBuilder({...this._context,navigationState:t})}withViewState(t){return new ConfiguratorBuilder({...this._context,viewState:t})}withToolState(t){return new ConfiguratorBuilder({...this._context,toolState:t})}withExportState(t){return new ConfiguratorBuilder({...this._context,exportState:t})}withAdminNavigationState(t){return new ConfiguratorBuilder({...this._context,adminNavigationState:t})}withAdminViewState(t){return new ConfiguratorBuilder({...this._context,adminViewState:t})}withPresets(t){return new ConfiguratorBuilder({...this._context,presets:t})}withAdminPresets(t){return new ConfiguratorBuilder({...this._context,adminPresets:t})}withComponentOptics(t){return new ConfiguratorBuilder({...this._context,componentOptics:[...this._context.componentOptics,...t]})}withAdminComponentOptics(t){return new ConfiguratorBuilder({...this._context,adminComponentOptics:[...this._context.adminComponentOptics??[],...t]})}withHandlers(t){return new ConfiguratorBuilder({...this._context,handlers:t})}withElements(t){return new ConfiguratorBuilder({...this._context,elements:t})}withDefaultElements(t){return new ConfiguratorBuilder({...this._context,defaultElements:t})}withResources(t){return new ConfiguratorBuilder({...this._context,resources:t})}withWebComponentTag(t){return new ConfiguratorBuilder({...this._context,tagName:t})}withTransformers(t,e){return new ConfiguratorBuilder({...this._context,transformers:{importedTransformers:t,specTransformers:e}})}withInterface(t){return this}withDataSpec=t=>new ConfiguratorBuilder({...this._context,dataSpec:t});_computeInitialPublishedData(t,e,i){if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");return l({adminDomainFactory:this._context.adminDomainFactory,domainRuntime:e,adminPresets:this._context.adminPresets??[],handlers:i,dataSpec:this._context.dataSpec,chunks:this._context.chunks,logger:t})}buildConfig(){return this._buildConfigWithHandlers().config}_buildConfigWithHandlers(){if(!this._context.domainFactory)throw Error("Can not create application config, domainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.presets)throw Error("Can not create application config, presets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminDomainFactory)throw Error("Can not create application config, adminDomainFactory is required! Is it registered with the ConfiguratorBuilder?");if(!this._context.adminPresets)throw Error("Can not create application config, adminPresets are required! Is it registered with the ConfiguratorBuilder?");if(!this._context.version)throw Error("Can not create application config, version is required!");let i=this._context.tagName??"salsita-configurator",l={defaultEnvs:this._context.defaultEnvs,services:{i18n:this._context.i18n},version:this._context.version,initialPublishedData:{},domain:{textLanguages:this._context.textLanguages,componentOptics:this._context.componentOptics,presets:this._context.presets,domainFactory:this._context.domainFactory},navigation:{navigationStates:this._context.navigationState?.values(),viewStates:this._context.viewState?.values(),toolStates:this._context.toolState?.values(),exportStates:this._context.exportState?.values()},adminNavigation:{navigationStates:this._context.adminNavigationState?.values(),viewStates:this._context.adminViewState?.values()},adminDomain:{textLanguages:this._context.textLanguages,componentOptics:this._context.adminComponentOptics??[],presets:this._context.adminPresets,domainFactory:this._context.adminDomainFactory},mount:{tag:i,options:{}},handlers:this._context.handlers??[],elements:this._context.elements??[],defaultElements:this._context.defaultElements??[],transformers:this._context.transformers,features:{acl:this._context.acl,enableAdminRelease:this._context.enableAdminRelease},ui:{preview:this._context.ui?.preview,alwaysExpand:this._context.ui?.alwaysExpand,theme:this._context.theme},resources:this._context.resourcesConfig,chunks:this._context.chunks,publishedDataHash:this._context.publishedDataHash,assistant:this._context.assistant,dataSpec:this._context.dataSpec},d=t(),c=n({config:l,services:{analyticsService:new r,i18n:e,logger:d}}),m=c.getState().spec.configurator.handlers;if(m.filter(s).length>1)throw Error("Multiple createAssistantSetupHandler handlers found. Only one handler is allowed.");if(m.filter(t=>u(t)).length>1)throw Error("Multiple createFilterPublishedChunksHandler handlers found. Only one handler is allowed.");if(m.filter(t=>h(t)).length>1)throw Error("Multiple createDataRowValidatorHandler handlers found. Only one handler is allowed.");if(m.filter(t=>f(t)).length>1)throw Error("Multiple createSheetValidatorHandler handlers found. Only one handler is allowed.");let w=m.find(o)?.handler().handler,x=m.find(a)?.handler().handler(void 0),_=this._computeInitialPublishedData(d,c,m);return{config:{...l,mount:{tag:i,options:x??{},Application:w},initialPublishedData:_},handlers:m}}buildWebhookContext(){if(!this._context.domainFactory)throw Error("domainFactory is required!");if(!this._context.adminDomainFactory)throw Error("adminDomainFactory is required!");if(!this._context.adminPresets)throw Error("adminPresets are required!");let{config:t,handlers:e}=this._buildConfigWithHandlers(),r=t=>{if(null==this._context.finalizeData)return{};let e=i.compile(this._context.finalizeData);if(!e(t))throw console.error("Finalize data validation errors:",e.errors),Error("Invalid finalize data!");return t},n=t=>{if(null==this._context.finalizeResult)return{};let e=i.compile(this._context.finalizeResult);if(!e(t))throw console.error("Finalize result validation errors:",e.errors),Error("Invalid finalize result!");return t},o=t=>{if(null==this._context.callbackData)return{};let e=i.compile(this._context.callbackData);if(!e(t))throw console.error("Callback data validation errors:",e.errors),Error("Invalid callback data!");return t},a=e.find(c)?.handler().handler,s=e.find(d)?.handler().handler,l=e.find(h)?.handler().handler,u=e.find(f)?.handler().handler;return{config:t,parseFinalizeData:r,parseFinalizeResult:n,resources:this._context.resources??[],parseCallbackData:o,mapPublishedRevisionData:a,mapPublishedChunkedData:s,dataRowValidator:l,sheetValidator:u}}}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import type { ExpressionMeta } from './expression.js';
|
|
2
|
+
/**
|
|
3
|
+
* The constant expressions of a domain, keyed by entity type or alias and then by the name of the
|
|
4
|
+
* constant. A constant expression takes no argument: it reads neither the entity nor the state, so
|
|
5
|
+
* the domain of any project accepts it.
|
|
6
|
+
*/
|
|
7
|
+
export type ConstantExpressions = Readonly<Record<string, Readonly<Record<string, {
|
|
8
|
+
evaluate(): unknown;
|
|
9
|
+
readonly meta: ExpressionMeta;
|
|
10
|
+
}>>>>;
|
|
11
|
+
/**
|
|
12
|
+
* Makes the function that turns the constants of a spec into expressions: every constant becomes an
|
|
13
|
+
* expression that returns its value. The type a project reads from a constant is the one its
|
|
14
|
+
* generated model declares for the property, not the type of the expression.
|
|
15
|
+
*/
|
|
16
|
+
export declare const createConstantExpressionFactory: () => (constants: Readonly<Record<string, Readonly<Record<string, unknown>>>>) => ConstantExpressions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { I18n } from '@lingui/core';
|
|
2
|
-
import type
|
|
2
|
+
import { type Localizable } from '@salsita-ai/common/utils';
|
|
3
3
|
import type { StateEmission } from '../emission/index.js';
|
|
4
4
|
import type { $DomainEntity, DomainEntity, EntityId } from '../model/index.js';
|
|
5
5
|
/**
|
|
@@ -66,7 +66,55 @@ export declare const ViolationSchema: {
|
|
|
66
66
|
readonly enum: ("fatal" | "fixable" | "notice" | "warning")[];
|
|
67
67
|
};
|
|
68
68
|
readonly message: {
|
|
69
|
-
readonly
|
|
69
|
+
readonly anyOf: [{
|
|
70
|
+
readonly type: 'string';
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: 'object';
|
|
73
|
+
readonly properties: {
|
|
74
|
+
readonly id: {
|
|
75
|
+
readonly type: 'string';
|
|
76
|
+
};
|
|
77
|
+
readonly comment: {
|
|
78
|
+
readonly type: 'string';
|
|
79
|
+
};
|
|
80
|
+
readonly message: {
|
|
81
|
+
readonly type: 'string';
|
|
82
|
+
};
|
|
83
|
+
readonly values: {
|
|
84
|
+
readonly type: 'object';
|
|
85
|
+
readonly additionalProperties: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly required: ["id"];
|
|
89
|
+
readonly additionalProperties: false;
|
|
90
|
+
readonly import: [{
|
|
91
|
+
readonly module: '@lingui/core';
|
|
92
|
+
readonly member: 'MessageDescriptor';
|
|
93
|
+
}];
|
|
94
|
+
readonly tsType: 'MessageDescriptor';
|
|
95
|
+
}, {
|
|
96
|
+
readonly import: [{
|
|
97
|
+
readonly module: '@salsita-ai/sdk/common/utils';
|
|
98
|
+
readonly member: 'MultilingualString';
|
|
99
|
+
}];
|
|
100
|
+
readonly tsType: 'MultilingualString';
|
|
101
|
+
readonly type: 'object';
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly $lang: {
|
|
104
|
+
readonly type: 'object';
|
|
105
|
+
readonly additionalProperties: {
|
|
106
|
+
readonly type: 'string';
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly required: ["$lang"];
|
|
111
|
+
readonly additionalProperties: false;
|
|
112
|
+
}];
|
|
113
|
+
readonly tsType: 'Localizable';
|
|
114
|
+
readonly import: [{
|
|
115
|
+
readonly module: '@salsita-ai/sdk/common/utils';
|
|
116
|
+
readonly member: 'Localizable';
|
|
117
|
+
}];
|
|
70
118
|
};
|
|
71
119
|
readonly controlViolationPriority: {
|
|
72
120
|
readonly type: 'number';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let
|
|
1
|
+
import{MessageDescriptorSchema as e,MultilingualStringSchema as t}from"@salsita-ai/common/utils";let i=["fatal","fixable","warning","notice"];export const compareSeverity=(e,t)=>i.indexOf(e)-i.indexOf(t);export const ViolationSchema={type:"object",properties:{type:{type:"string"},severity:{enum:i.slice()},message:{anyOf:[{type:"string"},e,t],tsType:"Localizable",import:[{module:"@salsita-ai/sdk/common/utils",member:"Localizable"}]},controlViolationPriority:{type:"number"}},required:["type","severity"],additionalProperties:!1};
|
|
@@ -25,7 +25,7 @@ export declare const VirtualEntityIdSchema: {
|
|
|
25
25
|
};
|
|
26
26
|
export declare const createVirtualEntityId: (name: string) => VirtualEntityId;
|
|
27
27
|
export declare const isVirtualEntityId: (value: EntityId<any>) => value is VirtualEntityId;
|
|
28
|
-
export type DomainEntityId<TYPE extends string> = `${TYPE}-${number}` & {
|
|
28
|
+
export type DomainEntityId<TYPE extends string = string> = `${TYPE}-${number}` & {
|
|
29
29
|
__brand: TYPE;
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
@@ -2,7 +2,7 @@ export { type AnalyticsSystem, NoopAnalyticsSystem, type AnalyticsEvent, Analyti
|
|
|
2
2
|
export { NavigationUpdateTag, isInitialNavigationUpdate, isNavigationUpdate, isInitialViewUpdate, isViewUpdate, isInitialSelectionUpdate, isSelectUpdate, isDeselectUpdate, isInitialFullscreenUpdate, isToggleFullscreenUpdate, isInitialDebugUpdate, isInitialViewportUpdate, isSetViewportUpdate, isInitialDragUpdate, isDragStartUpdate, isDragEndUpdate, isInitialToolUpdate, isToolUpdate, isExportUpdate, createAutoSelectionTransformer, NavigationSystem, type NavigationSystemContext, createResetSelectionOnNavigationTransformer, createNavigationOnSelectionTransformer, createNavigationOnDeselectTransformer, createSelectParentOnDeselectionTransformer, createNavigationOnSelectionChangeTransformer, type AnyNavigationSystem, } from './navigation-system/index.js';
|
|
3
3
|
export { StoreSystem, type TransformerRegistration, type UpdateTransformer, type TransformerLogFunction, type Transformers, type StateSliceName, type StateEmissionKind, type CommitPreparedOutcome, nextDomainEntityId, getIdSequence, applyUpdates, SystemState, SystemStateInitialUpdateTag, SystemStateUpdateTag, type SystemStateContext, type AnyCreateTransformersFactory, type AnyStoreSystem, type Unregister, } from './store-system/index.js';
|
|
4
4
|
export { createRefReplaceTransformer, createCascadeDeletesTransformer, createCascadeRefPruningTransformer, createCreateEntityRefsTransformer, } from './relation-transformers/index.js';
|
|
5
|
-
export { type CanBeUndonePredicate, type CanBeUndoneContext, type UndoCapabilities, UndoSystem, UNDO_REDO_RESET_TAG, isUndoRedoReset, type AnyUndoSystem, } from './undo-system.js';
|
|
5
|
+
export { type CanBeUndonePredicate, type CanBeUndoneContext, type UndoCapabilities, type UndoStep, UndoSystem, UNDO_REDO_RESET_TAG, isUndoRedoReset, type AnyUndoSystem, } from './undo-system.js';
|
|
6
6
|
export { DimensionSystem, type AnyDimensionSystem, type DimensionSystemContext, type AngleDimensionViolation, type DistanceDimensionViolation, type GenericDimensionViolation, } from './dimension-system/index.js';
|
|
7
7
|
export { ActionSystem, type AnyActionSystem, type ActionSystemContext } from './action-system/index.js';
|
|
8
8
|
export { RecipeCookerSystem, type AnyRecipeCookerSystem, type RecipeCookerSystemContext, ReplaceRecipeUpdateTag, isReplaceEntityUpdate, type IsReplaceRecipeUpdate, CreateRecipeUpdateTag, isCreateEntityUpdate, type IsCreateRecipeUpdate, } from './recipe-system/index.js';
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import type { ObservableWithLastValue } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { $DomainEntity, DomainEntity, ResetStateEmission, StateEmission } from '../core/index.js';
|
|
2
|
+
import type { $DomainEntity, DomainEntity, DomainState, ResetStateEmission, StateEmission } from '../core/index.js';
|
|
3
3
|
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
4
4
|
export interface UndoCapabilities {
|
|
5
5
|
readonly canUndo: boolean;
|
|
6
6
|
readonly canRedo: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* One step of the undo history: a state that undo and redo return to.
|
|
10
|
+
*
|
|
11
|
+
* A step is made by an undoable change. The non-undoable commits made on top of it afterwards, such
|
|
12
|
+
* as a selection or a navigation, do not make steps of their own; returning to the step keeps them,
|
|
13
|
+
* so undoing a later change does not also take back what the user selected since. A step therefore
|
|
14
|
+
* holds two states: the one that identifies it and the one it returns to.
|
|
15
|
+
*/
|
|
16
|
+
export interface UndoStep<ENTITIES extends DomainEntity<string>> {
|
|
17
|
+
/**
|
|
18
|
+
* The state the undoable change committed. It identifies the step and never changes, so a caller
|
|
19
|
+
* that knows which state its own change committed can tell whether that change is the step the
|
|
20
|
+
* configuration is at.
|
|
21
|
+
*/
|
|
22
|
+
readonly committedState: DomainState<ENTITIES>;
|
|
23
|
+
/**
|
|
24
|
+
* What undo or redo resets the store to: `committedState` plus the non-undoable commits made on
|
|
25
|
+
* top of it before the next undoable change.
|
|
26
|
+
*/
|
|
27
|
+
readonly restoreState: DomainState<ENTITIES>;
|
|
28
|
+
}
|
|
8
29
|
export interface CanBeUndoneContext<ENTITIES extends DomainEntity<string>, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>> {
|
|
9
30
|
oldEmission: StateEmission<ENTITIES, $MAP>;
|
|
10
31
|
newEmission: StateEmission<ENTITIES, $MAP>;
|
|
@@ -39,6 +60,12 @@ export declare class UndoSystem<ENTITIES extends DomainEntity<string>, $MAP exte
|
|
|
39
60
|
private _activeIsUndoable;
|
|
40
61
|
private readonly _canSubject;
|
|
41
62
|
readonly can$: ObservableWithLastValue<UndoCapabilities>;
|
|
63
|
+
private readonly _tipSubject;
|
|
64
|
+
/**
|
|
65
|
+
* The step the configuration is at: the top of the stack, or the step an undo or redo returned to.
|
|
66
|
+
* Nothing while the stack is empty, before the first undoable change and after a reset.
|
|
67
|
+
*/
|
|
68
|
+
readonly tip$: ObservableWithLastValue<UndoStep<ENTITIES> | undefined>;
|
|
42
69
|
constructor(_context: UndoSystemContext);
|
|
43
70
|
initialize: () => void;
|
|
44
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BehaviorSubject as t,pairwise as e}from"rxjs";let s=t=>t.oldEmission.state.entities!==t.newEmission.state.entities;export const UNDO_REDO_RESET_TAG={};export const isUndoRedoReset=t=>"reset"===t.kind&&t.tag===UNDO_REDO_RESET_TAG;export class UndoSystem{_context;_stack=[];_currentIndex=-1;_activeIsUndoable;_canSubject=new t({canUndo:!1,canRedo:!1});can$=this._canSubject;constructor(t){this._context=t,this._context.selectors.getStoreSystem().stateSlices.committed.pipe(e()).subscribe(([t,e])=>{if("reset"===e.kind&&e.tag!==UNDO_REDO_RESET_TAG)return void this.resetStack();let
|
|
1
|
+
import{BehaviorSubject as t,pairwise as e}from"rxjs";let s=t=>t.oldEmission.state.entities!==t.newEmission.state.entities;export const UNDO_REDO_RESET_TAG={};export const isUndoRedoReset=t=>"reset"===t.kind&&t.tag===UNDO_REDO_RESET_TAG;export class UndoSystem{_context;_stack=[];_currentIndex=-1;_activeIsUndoable;_canSubject=new t({canUndo:!1,canRedo:!1});can$=this._canSubject;_tipSubject=new t(void 0);tip$=this._tipSubject;constructor(t){this._context=t,this._context.selectors.getStoreSystem().stateSlices.committed.pipe(e()).subscribe(([t,e])=>{if("reset"===e.kind&&e.tag!==UNDO_REDO_RESET_TAG)return void this.resetStack();let i=this._activeIsUndoable?.handler??s;if("reset"===e.kind&&e.tag===UNDO_REDO_RESET_TAG||!i({oldEmission:t,newEmission:e}))return;let r=this._stack[this._currentIndex],n={committedState:r?.committedState??t.state,restoreState:t.state},c={committedState:e.state,restoreState:e.state};this._stack=[...this._stack.slice(0,this._currentIndex),n,c],this._currentIndex=this._stack.length-1,this._refresh()})}initialize=()=>{this.resetStack()};registerIsUndoable(t){let e={handler:t};return this._activeIsUndoable=e,()=>{this._activeIsUndoable===e&&(this._activeIsUndoable=void 0)}}resetStack(){this._stack=[],this._currentIndex=-1,this._refresh()}_refresh(){this._canSubject.next({canUndo:this.canUndo(),canRedo:this.canRedo()}),this._tipSubject.next(this._stack[this._currentIndex])}canUndo(){return this._currentIndex>0}canRedo(){return this._currentIndex<this._stack.length-1}undo(){let t=this._stack[this._currentIndex-1];void 0!==t&&(this._currentIndex--,this._context.selectors.getStoreSystem().reset(t.restoreState,UNDO_REDO_RESET_TAG),this._refresh())}redo(){let t=this._stack[this._currentIndex+1];void 0!==t&&(this._currentIndex++,this._context.selectors.getStoreSystem().reset(t.restoreState,UNDO_REDO_RESET_TAG),this._refresh())}}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AccessLevel } from '@salsita-ai/contracts/api';
|
|
1
2
|
import type { OverridesSelectorState, OverridesSelectors } from '../overrides/index.js';
|
|
2
3
|
import type { AccessService, ApplicationAccessInfo } from './types.js';
|
|
3
4
|
/**
|
|
@@ -17,24 +18,28 @@ export declare const requireAccessService: (applicationName: 'configurator' | 'a
|
|
|
17
18
|
export declare const createAccessInfoSelectors: (context: Context) => {
|
|
18
19
|
selectConfiguratorRawAccessInfo: import("@salsita-ai/common/utils").Selector<AccessSelectorState, {
|
|
19
20
|
raw: string;
|
|
21
|
+
access: AccessLevel;
|
|
20
22
|
viewMode: boolean;
|
|
21
23
|
revisionId: string | undefined;
|
|
22
24
|
configurationId: string;
|
|
23
25
|
} | null>;
|
|
24
26
|
selectAdminRawAccessInfo: import("@salsita-ai/common/utils").Selector<AccessSelectorState, {
|
|
25
27
|
raw: string;
|
|
28
|
+
access: AccessLevel;
|
|
26
29
|
viewMode: boolean;
|
|
27
30
|
revisionId: string | undefined;
|
|
28
31
|
configurationId: string;
|
|
29
32
|
} | null>;
|
|
30
33
|
selectConfiguratorAccessInfo: import("@salsita-ai/common/utils").Selector<AccessSelectorState, {
|
|
31
34
|
raw: string;
|
|
35
|
+
access: AccessLevel;
|
|
32
36
|
viewMode: boolean;
|
|
33
37
|
revisionId: string | undefined;
|
|
34
38
|
configurationId: string;
|
|
35
39
|
}>;
|
|
36
40
|
selectAdminAccessInfo: import("@salsita-ai/common/utils").Selector<AccessSelectorState, {
|
|
37
41
|
raw: string;
|
|
42
|
+
access: AccessLevel;
|
|
38
43
|
viewMode: boolean;
|
|
39
44
|
revisionId: string | undefined;
|
|
40
45
|
configurationId: string;
|
|
@@ -47,24 +52,28 @@ export declare const createAccessInfoSelectors: (context: Context) => {
|
|
|
47
52
|
selectAdminConfigurationId: import("@salsita-ai/common/utils").Selector<AccessSelectorState, string>;
|
|
48
53
|
getConfiguratorRawAccessInfo: () => {
|
|
49
54
|
raw: string;
|
|
55
|
+
access: AccessLevel;
|
|
50
56
|
viewMode: boolean;
|
|
51
57
|
revisionId: string | undefined;
|
|
52
58
|
configurationId: string;
|
|
53
59
|
} | null;
|
|
54
60
|
getAdminRawAccessInfo: () => {
|
|
55
61
|
raw: string;
|
|
62
|
+
access: AccessLevel;
|
|
56
63
|
viewMode: boolean;
|
|
57
64
|
revisionId: string | undefined;
|
|
58
65
|
configurationId: string;
|
|
59
66
|
} | null;
|
|
60
67
|
getConfiguratorAccessInfo: () => {
|
|
61
68
|
raw: string;
|
|
69
|
+
access: AccessLevel;
|
|
62
70
|
viewMode: boolean;
|
|
63
71
|
revisionId: string | undefined;
|
|
64
72
|
configurationId: string;
|
|
65
73
|
};
|
|
66
74
|
getAdminAccessInfo: () => {
|
|
67
75
|
raw: string;
|
|
76
|
+
access: AccessLevel;
|
|
68
77
|
viewMode: boolean;
|
|
69
78
|
revisionId: string | undefined;
|
|
70
79
|
configurationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";let
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{AccessLevel as c}from"@salsita-ai/contracts/api";let i=e=>Error(`Cannot read ${e} access info because valid access is not loaded. Access info is written by the ${e} lifecycle after token validation. Move this read into the loaded ${e} lifecycle.`),n=e=>({accessInfo:e,configurationId:e.configurationId});export const requireAccessService=(e,c)=>{if(null===c)throw i(e);return c};export const createAccessInfoSelectors=o=>{let{getState:r,overridesSelectors:s}=o,t=e.withTypes(),a=t([t.leaf(e=>e.access.configuratorAccessInfo)],e=>e),l=t([t.leaf(e=>e.access.adminAccessInfo)],e=>e),f=t([a],e=>{if(null===e)throw i("configurator");return e}),u=t([l],e=>{if(null===e)throw i("admin");return e}),d=t([a,s.selectAccessService,s.selectAccessLevel],(e,i,o)=>{var r;let s,t,a=i??(null===e?null:n(e));return null===a||null===o?a:(r={configurationId:a.configurationId,...void 0===a.accessInfo.revisionId?{}:{revisionId:a.accessInfo.revisionId},access:o},s=e=>btoa(JSON.stringify(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),t=`${s({alg:"none",typ:"JWT"})}.${s(r)}.`,{configurationId:a.configurationId,accessInfo:{raw:t,access:"owner"===o?c.Owner:"read-revision"===o?c.ReadRevision:c.Read,viewMode:"read-revision"===o,revisionId:a.accessInfo.revisionId,configurationId:a.configurationId}})}),g=t([l,s.selectAccessService],(e,c)=>null!==c?c:null===e?null:n(e)),I=t([d],e=>requireAccessService("configurator",e)),v=t([g],e=>requireAccessService("admin",e)),A=t([I],e=>e.configurationId),m=t([v],e=>e.configurationId);return{selectConfiguratorRawAccessInfo:a,selectAdminRawAccessInfo:l,selectConfiguratorAccessInfo:f,selectAdminAccessInfo:u,selectConfiguratorRawAccessService:d,selectAdminRawAccessService:g,selectConfiguratorAccessService:I,selectAdminAccessService:v,selectConfiguratorConfigurationId:A,selectAdminConfigurationId:m,getConfiguratorRawAccessInfo:()=>a(r()),getAdminRawAccessInfo:()=>l(r()),getConfiguratorAccessInfo:()=>f(r()),getAdminAccessInfo:()=>u(r()),getConfiguratorRawAccessService:()=>d(r()),getAdminRawAccessService:()=>g(r()),getConfiguratorAccessService:()=>I(r()),getAdminAccessService:()=>v(r()),getConfiguratorConfigurationId:()=>A(r()),getAdminConfigurationId:()=>m(r())}};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AccessLevel } from '@salsita-ai/contracts/api';
|
|
1
2
|
export declare const decodeAccessInfo: (accessToken: string, configurationId: string) => {
|
|
2
3
|
raw: string;
|
|
4
|
+
access: AccessLevel;
|
|
3
5
|
viewMode: boolean;
|
|
4
6
|
revisionId: string | undefined;
|
|
5
7
|
configurationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jwtDecode as
|
|
1
|
+
import{jwtDecode as e}from"jwt-decode";import{AccessLevel as o}from"@salsita-ai/contracts/api";export const decodeAccessInfo=(i,r)=>{try{let c=e(i),n=c.exp;if(void 0!==n&&n<Date.now()/1e3||c.configurationId!==r)return null;return{raw:i,access:c.access,viewMode:c.access===o.ReadRevision,revisionId:c.revisionId,configurationId:c.configurationId}}catch(e){return null}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";import{Domain as t,createInitialDomainState as n}from"../../core/index.js";import{ActionSystem as o,DimensionSystem as i,NavigationSystem as a,RecipeCookerSystem as s,StoreSystem as r,UndoSystem as c}from"../../domain-context/index.js";import{BlenderProjections as l,CollisionProjections as m,CompositionProjections as d,ConstraintProjections as g,PositionProjections as f,ProjectedEntitiesProjections as u,SnappingProjections as p,ValidationProjections as y}from"../../projections/index.js";import{SketchingProjections as w}from"../../sketching/sketching-projections.js";import{requireAccessService as h}from"../access/index.js";import{prepareActionImplementations as S,prepareDomainExpressions as x}from"../spec/index.js";import{ComponentReader as C}from"./component-reader.js";import{DomainContext as D}from"./domain-context.js";let j=e.withTypes(),v=[],I={},P={role:"admin",data:I},M=e=>{if(null!==e)return e;throw Error("Cannot read the session role and data because the domain session context is not set. The session context is written into the domain runtime by the session lifecycle after authentication. Move this read into the loaded session lifecycle.")};export const createDomainContextSelectors=e=>{let{applicationType:A,getState:R,actions:E,specSelectors:T,accessSelectors:b,webComponentSelectors:$,domainDataSelectors:k,sessionContextSelectors:N,domainServicesSelectors:z,environmentSelectors:L,getExtensionSystems:V}=e,B="configurator"===A?T.selectConfiguratorSpec:T.selectAdminSpec,F="configurator"===A?b.selectConfiguratorRawAccessService:b.selectAdminRawAccessService,W=j.leaf(e=>e.domainContext[A]),_=j([W],e=>e.initializationContext),q=j([_],e=>{if(null===e)throw Error(`Domain lifecycle context is not available for ${A}! Read it from an active domain lifecycle.`);return e}),O=j([W],e=>e.executionMode),U=j([W],e=>e.isInitialized),G=j([B],e=>e.factory),H=j([B],e=>e.expressions),J=j([B],e=>e.actions),K=j([B],e=>e.actionImplementations),Q=j([J,K],S),X=j([B],e=>e.$entityReflections),Y=j([H,X],(e,t)=>x({expressions:e,$entityReflections:t})),Z=j([B],e=>e.modelVersion),ee=j([B],e=>e.aliasMap),et=j([B],e=>e.allowedRootEntityTypes),en=j([B],e=>e.entityReflections),eo=j([B],e=>e.migrate),ei=j([O,$.selectReadonly,F],(e,t,n)=>"finalize"===e?"finalize":h(A,n).accessInfo.viewMode||t?"read":"owner"),ea=j([F],e=>e?.configurationId??null),es="configurator"===A?N.selectSessionContext:j([],()=>P),er=j([es],e=>e?.role??null),ec=j([es],e=>e?.data??null),el=j([j.leaf(e=>e.loadedData)],e=>"configurator"===A?e.configuratorLoadedData:e.adminLoadedData),em=j([el],e=>e?.schemaIdentity??null),ed=j([el,G],(e,t)=>{if(null===e)return"coherent";let n=e.schemaIdentity;return void 0===n?"missing-stamp":n===t?"coherent":"schema-mismatch"}),eg=j([ea,er,ec,em,ed],(e,t,n,o,i)=>null===e||null===t||null===n||null===o||"coherent"!==i?null:{configurationId:e,role:t,schemaIdentity:o,sessionData:n}),ef=j([F,$.selectReadonly],(e,t)=>e?.accessInfo.viewMode===!0||t),eu=j([eg,_,U,ef],(e,t,n,o)=>{let i=null!==e&&null!==t&&n&&t.configurationId===e.configurationId&&t.role===e.role&&t.schemaIdentity===e.schemaIdentity&&t.sessionData===e.sessionData;return{identity:e,isCurrent:i,isViewMode:o}}),ep=j([B],e=>e.componentOptics),ey=j([ep],e=>(e=>{let t=new Map,n=new Map,o=new Map,i=new Map;for(let n of e)for(let e of n.entityTypes){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n.componentType);if(a||(a=new Map,o.set(n.componentType,a)),a.has(n.instanceName))throw Error(`Component instance ${n.instanceName} already exists for type ${n.componentType.name} in entity ${e}. This is likely a bug in the component definition! InstanceNames must be unique within an entity and component.`);if(a.set(n.instanceName,n),"dynamic"===n.kind){let t=i.get(e);t||(t=new Map,i.set(e,t));let o=t.get(n.componentType)??[],a=o.find(e=>{var t;return t=n.instanceName,e.startsWith(`${t}_`)||t.startsWith(`${e}_`)});if(a)throw Error(`Cannot register dynamic component instance ${n.instanceName} for component ${n.componentType.name} on entity ${e} because it overlaps with dynamic instance ${a}. Rename one dynamic instance so compound names cannot be ambiguous.`);t.set(n.componentType,[...o,n.instanceName])}}for(let[e,i]of t.entries()){n.set(e,new Set(i.keys()));let t=new Map;for(let[n,a]of(o.set(e,t),i.entries()))t.set(n,new Set(a.keys()))}return{opticMap:t,allComponentTypes:n,allComponentInstanceNames:o,dynamicInstanceNames:i}})(e)),ew=j([ey,Y,et],(e,t,n)=>({componentReaderIndexes:e,domainExpressions:t,allowedRootEntityTypes:n})),eh=j([B],e=>e.navigationStates),eS=j([B],e=>e.viewStates),ex="configurator"===A?j([T.selectConfiguratorSpec],e=>e.toolStates):j([],()=>v),eC="configurator"===A?j([T.selectConfiguratorSpec],e=>e.exportStates):j([],()=>v),eD="configurator"===A?j([T.selectConfiguratorSpec],e=>e.createTransformers):j([],()=>void 0),ej=j([el],e=>{if(null===e)throw Error(`Loaded data is not available for ${A}! Loaded data is written after the configuration fetch succeeds and before the domain context initialization starts.`);return e}),ev=j([ej,G],(e,t)=>n(t.validateAndMigrateState(e.initialEntities,e.modelVersion),e.rootEntityType)),eI="configurator"===A?k.selectConfiguratorFrontendData:k.selectAdminFrontendData,eP="configurator"===A?k.selectConfiguratorBackendData:k.selectAdminBackendData,eM="configurator"===A?k.selectConfiguratorPublishedData:k.selectAdminPublishedData,eA="configurator"===A?j([N.selectSessionContext],e=>M(e).role):j([],()=>"admin"),eR="configurator"===A?j([N.selectSessionContext],e=>M(e).data):j([],()=>I),eE=j([ea,ei,eA,eR,ej],(e,t,n,o,i)=>({configurationId:e,mode:t,role:n,schemaIdentity:i.schemaIdentity,sessionData:o})),eT=j([q],e=>e.mode),eb=j([q],e=>{let t=e.configurationId;if(null===t)throw Error(`Configuration id is not available for ${A}! Read it from an active interactive domain lifecycle.`);return t}),e$=j([q],e=>e.role),ek=j([q],e=>e.sessionData),eN=j([eT,e$,ek,eI,eP,eM,eo],(e,t,n,o,i,a,s)=>({mode:e,role:t,sessionData:n,frontendData:o,backendData:i,publishedData:a,migrate:s,domain:eL,componentReader:eV,positionProjections:eq,sketchingProjections:e_,collisionProjections:eO,constraintProjections:eG,snappingProjections:eU,projectedEntitiesProjections:eH})),ez={selectApplicationSpec:B,selectRawAccessService:F,selectDomainContextState:W,selectInitializationContext:_,selectActiveInitializationContext:q,selectExecutionMode:O,selectIsInitialized:U,selectFactory:G,selectSpecExpressions:H,select$SpecEntityReflections:X,selectDomainExpressions:Y,selectModelVersion:Z,selectAliasMap:ee,selectAllowedRootEntityTypes:et,selectEntityReflections:en,selectMigrate:eo,selectLatestMode:ei,selectLatestConfigurationId:ea,selectLatestSessionContext:es,selectLatestRoleOrNull:er,selectLatestSessionDataOrNull:ec,selectLatestSchemaIdentity:em,selectSchemaCoherence:ed,selectInitializationIdentity:eg,selectIsViewMode:ef,selectInitializationState:eu,selectComponentOptics:ep,selectComponentReaderIndexes:ey,selectStoreRuntimeDependencies:ew,selectNavigationStates:eh,selectViewStates:eS,selectToolStates:ex,selectExportStates:eC,selectCreateTransformers:eD,selectLatestLoadedData:el,selectLoadedData:ej,selectInitialDomainState:ev,selectFrontendData:eI,selectBackendData:eP,selectPublishedData:eM,selectLatestRole:eA,selectLatestSessionData:eR,selectNextInitializationContext:eE,selectActiveMode:eT,selectActiveConfigurationId:eb,selectActiveRole:e$,selectActiveSessionData:ek,selectExpressionContext:eN,getInitializationContext:()=>_(R()),getInitializationState:()=>eu(R()),getNextInitializationContext:()=>eE(R()),getLatestLoadedData:()=>el(R()),getSchemaCoherence:()=>ed(R()),getActiveConfigurationId:()=>eb(R()),getFactory:()=>G(R()),getDomainExpressions:()=>Y(R()),getActionDefinitions:()=>J(R()),getActionImplementations:()=>Q(R()),getModelVersion:()=>Z(R()),getAliasMap:()=>ee(R()),getAllowedRootEntityTypes:()=>et(R()),getEntityReflections:()=>en(R()),getMigrate:()=>eo(R()),getActiveMode:()=>eT(R()),getIsInitialized:()=>U(R()),getComponentReaderIndexes:()=>ey(R()),getStoreRuntimeDependencies:()=>ew(R()),getNavigationStates:()=>eh(R()),getViewStates:()=>eS(R()),getToolStates:()=>ex(R()),getExportStates:()=>eC(R()),getCreateTransformers:()=>eD(R()),getLoadedData:()=>ej(R()),getInitialDomainState:()=>ev(R()),getFrontendData:()=>eI(R()),getBackendData:()=>eP(R()),getPublishedData:()=>eM(R()),getActiveRole:()=>e$(R()),getActiveSessionData:()=>ek(R()),getDomain:()=>eL,getComponentReader:()=>eV,getCompositionProjections:()=>eB,getDimensionSystem:()=>eF,getValidationProjections:()=>eW,getSketchingProjections:()=>e_,getPositionProjections:()=>eq,getCollisionProjections:()=>eO,getSnappingProjections:()=>eU,getConstraintProjections:()=>eG,getProjectedEntitiesProjections:()=>eH,getStoreSystem:()=>eJ,getNavigationSystem:()=>eK,getUndoSystem:()=>eQ,getRecipeCookerSystem:()=>eX,getActionSystem:()=>eY,getBlenderProjections:()=>eZ,getExpressionContext:()=>eN(R()),getDomainSystems:function(){return e0},getDomainContext:function(){return e1}},eL=new t({selectors:ez}),eV=new C({selectors:ez}),eB=new d({selectors:ez}),eF=new i({selectors:ez}),eW=new y({selectors:ez}),e_=new w({selectors:ez}),eq=new f({selectors:ez}),eO=new m({selectors:ez}),eU=new p({selectors:ez}),eG=new g({selectors:ez}),eH=new u({selectors:ez}),eJ=new r({selectors:ez,domainServicesSelectors:z,environmentSelectors:L}),eK=new a({selectors:ez,domainServicesSelectors:z}),eQ=new c({selectors:ez}),eX=new s({selectors:ez}),eY=new o({selectors:ez}),eZ=new l({selectors:ez,domainServicesSelectors:z}),e0={domainContextSelectors:ez,domain:eL,componentReader:eV,compositionProjections:eB,blenderProjections:eZ,validationProjections:eW,storeSystem:eJ,navigationSystem:eK,dimensionSystem:eF,undoSystem:eQ,recipeCooker:eX,actionSystem:eY,sketchingProjections:e_,collisionProjections:eO,positionProjections:eq,snappingProjections:eU,projectedEntitiesProjections:eH,constraintProjections:eG},e1=new D({selectors:ez,actions:E,getExtensionSystems:V});return ez};
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{Domain as t,createInitialDomainState as n}from"../../core/index.js";import{ActionSystem as o,DimensionSystem as i,NavigationSystem as a,RecipeCookerSystem as s,StoreSystem as r,UndoSystem as c}from"../../domain-context/index.js";import{BlenderProjections as l,CollisionProjections as m,CompositionProjections as d,ConstraintProjections as g,PositionProjections as f,ProjectedEntitiesProjections as u,SnappingProjections as p,ValidationProjections as y}from"../../projections/index.js";import{SketchingProjections as w}from"../../sketching/sketching-projections.js";import{requireAccessService as h}from"../access/index.js";import{prepareActionImplementations as S,prepareDomainExpressions as x}from"../spec/index.js";import{ComponentReader as C}from"./component-reader.js";import{DomainContext as D}from"./domain-context.js";let j=e.withTypes(),I=[],v={},P={role:"admin",data:v},M=e=>{if(null!==e)return e;throw Error("Cannot read the session role and data because the domain session context is not set. The session context is written into the domain runtime by the session lifecycle after authentication. Move this read into the loaded session lifecycle.")};export const createDomainContextSelectors=e=>{let{applicationType:A,getState:R,actions:E,specSelectors:T,accessSelectors:b,webComponentSelectors:$,domainDataSelectors:k,sessionContextSelectors:N,domainServicesSelectors:z,environmentSelectors:L,getExtensionSystems:V}=e,B="configurator"===A?T.selectConfiguratorSpec:T.selectAdminSpec,F="configurator"===A?b.selectConfiguratorRawAccessService:b.selectAdminRawAccessService,W=j.leaf(e=>e.domainContext[A]),_=j([W],e=>e.initializationContext),q=j([_],e=>{if(null===e)throw Error(`Domain lifecycle context is not available for ${A}! Read it from an active domain lifecycle.`);return e}),O=j([W],e=>e.executionMode),U=j([W],e=>e.isInitialized),G=j([B],e=>e.factory),H=j([B],e=>e.expressions),J=j([B],e=>e.actions),K=j([B],e=>e.actionImplementations),Q=j([J,K],S),X=j([B],e=>e.$entityReflections),Y=j([H,X],(e,t)=>x({expressions:e,$entityReflections:t})),Z=j([B],e=>e.modelVersion),ee=j([B],e=>e.aliasMap),et=j([B],e=>e.allowedRootEntityTypes),en=j([B],e=>e.entityReflections),eo=j([B],e=>e.migrate),ei=j([O,$.selectReadonly,F],(e,t,n)=>"finalize"===e?"finalize":h(A,n).accessInfo.viewMode||t?"read":"owner"),ea=j([F],e=>e?.configurationId??null),es="configurator"===A?N.selectSessionContext:j([],()=>P),er=j([es],e=>e?.role??null),ec=j([es],e=>e?.data??null),el=j([j.leaf(e=>e.loadedData)],e=>"configurator"===A?e.configuratorLoadedData:e.adminLoadedData),em=j([el],e=>e?.schemaIdentity??null),ed=j([el,G],(e,t)=>{if(null===e)return"coherent";let n=e.schemaIdentity;return void 0===n?"missing-stamp":n===t?"coherent":"schema-mismatch"}),eg=j([ea,er,ec,em,ed,F],(e,t,n,o,i,a)=>null===e||null===a||null===t||null===n||null===o||"coherent"!==i?null:{access:a.accessInfo.access,configurationId:e,role:t,schemaIdentity:o,sessionData:n}),ef=j([F,$.selectReadonly],(e,t)=>e?.accessInfo.viewMode===!0||t),eu=j([eg,_,U,ef],(e,t,n,o)=>{let i=null!==e&&null!==t&&n&&t.access===e.access&&t.configurationId===e.configurationId&&t.role===e.role&&t.schemaIdentity===e.schemaIdentity&&t.sessionData===e.sessionData;return{identity:e,isCurrent:i,isViewMode:o}}),ep=j([B],e=>e.componentOptics),ey=j([ep],e=>(e=>{let t=new Map,n=new Map,o=new Map,i=new Map;for(let n of e)for(let e of n.entityTypes){let o=t.get(e);o||(o=new Map,t.set(e,o));let a=o.get(n.componentType);if(a||(a=new Map,o.set(n.componentType,a)),a.has(n.instanceName))throw Error(`Component instance ${n.instanceName} already exists for type ${n.componentType.name} in entity ${e}. This is likely a bug in the component definition! InstanceNames must be unique within an entity and component.`);if(a.set(n.instanceName,n),"dynamic"===n.kind){let t=i.get(e);t||(t=new Map,i.set(e,t));let o=t.get(n.componentType)??[],a=o.find(e=>{var t;return t=n.instanceName,e.startsWith(`${t}_`)||t.startsWith(`${e}_`)});if(a)throw Error(`Cannot register dynamic component instance ${n.instanceName} for component ${n.componentType.name} on entity ${e} because it overlaps with dynamic instance ${a}. Rename one dynamic instance so compound names cannot be ambiguous.`);t.set(n.componentType,[...o,n.instanceName])}}for(let[e,i]of t.entries()){n.set(e,new Set(i.keys()));let t=new Map;for(let[n,a]of(o.set(e,t),i.entries()))t.set(n,new Set(a.keys()))}return{opticMap:t,allComponentTypes:n,allComponentInstanceNames:o,dynamicInstanceNames:i}})(e)),ew=j([ey,Y,et],(e,t,n)=>({componentReaderIndexes:e,domainExpressions:t,allowedRootEntityTypes:n})),eh=j([B],e=>e.navigationStates),eS=j([B],e=>e.viewStates),ex="configurator"===A?j([T.selectConfiguratorSpec],e=>e.toolStates):j([],()=>I),eC="configurator"===A?j([T.selectConfiguratorSpec],e=>e.exportStates):j([],()=>I),eD="configurator"===A?j([T.selectConfiguratorSpec],e=>e.createTransformers):j([],()=>void 0),ej=j([el],e=>{if(null===e)throw Error(`Loaded data is not available for ${A}! Loaded data is written after the configuration fetch succeeds and before the domain context initialization starts.`);return e}),eI=j([ej,G],(e,t)=>n(t.validateAndMigrateState(e.initialEntities,e.modelVersion),e.rootEntityType)),ev="configurator"===A?k.selectConfiguratorFrontendData:k.selectAdminFrontendData,eP="configurator"===A?k.selectConfiguratorBackendData:k.selectAdminBackendData,eM="configurator"===A?k.selectConfiguratorPublishedData:k.selectAdminPublishedData,eA="configurator"===A?j([N.selectSessionContext],e=>M(e).role):j([],()=>"admin"),eR="configurator"===A?j([N.selectSessionContext],e=>M(e).data):j([],()=>v),eE=j([ea,ei,eA,eR,ej,F],(e,t,n,o,i,a)=>({access:a?.accessInfo.access??null,configurationId:e,mode:t,role:n,schemaIdentity:i.schemaIdentity,sessionData:o})),eT=j([q],e=>e.mode),eb=j([q],e=>{let t=e.configurationId;if(null===t)throw Error(`Configuration id is not available for ${A}! Read it from an active interactive domain lifecycle.`);return t}),e$=j([q],e=>e.role),ek=j([q],e=>e.sessionData),eN=j([eT,e$,ek,ev,eP,eM,eo],(e,t,n,o,i,a,s)=>({mode:e,role:t,sessionData:n,frontendData:o,backendData:i,publishedData:a,migrate:s,domain:eL,componentReader:eV,positionProjections:eq,sketchingProjections:e_,collisionProjections:eO,constraintProjections:eG,snappingProjections:eU,projectedEntitiesProjections:eH})),ez={selectApplicationSpec:B,selectRawAccessService:F,selectDomainContextState:W,selectInitializationContext:_,selectActiveInitializationContext:q,selectExecutionMode:O,selectIsInitialized:U,selectFactory:G,selectSpecExpressions:H,select$SpecEntityReflections:X,selectDomainExpressions:Y,selectModelVersion:Z,selectAliasMap:ee,selectAllowedRootEntityTypes:et,selectEntityReflections:en,selectMigrate:eo,selectLatestMode:ei,selectLatestConfigurationId:ea,selectLatestSessionContext:es,selectLatestRoleOrNull:er,selectLatestSessionDataOrNull:ec,selectLatestSchemaIdentity:em,selectSchemaCoherence:ed,selectInitializationIdentity:eg,selectIsViewMode:ef,selectInitializationState:eu,selectComponentOptics:ep,selectComponentReaderIndexes:ey,selectStoreRuntimeDependencies:ew,selectNavigationStates:eh,selectViewStates:eS,selectToolStates:ex,selectExportStates:eC,selectCreateTransformers:eD,selectLatestLoadedData:el,selectLoadedData:ej,selectInitialDomainState:eI,selectFrontendData:ev,selectBackendData:eP,selectPublishedData:eM,selectLatestRole:eA,selectLatestSessionData:eR,selectNextInitializationContext:eE,selectActiveMode:eT,selectActiveConfigurationId:eb,selectActiveRole:e$,selectActiveSessionData:ek,selectExpressionContext:eN,getInitializationContext:()=>_(R()),getInitializationState:()=>eu(R()),getNextInitializationContext:()=>eE(R()),getLatestLoadedData:()=>el(R()),getSchemaCoherence:()=>ed(R()),getActiveConfigurationId:()=>eb(R()),getFactory:()=>G(R()),getDomainExpressions:()=>Y(R()),getActionDefinitions:()=>J(R()),getActionImplementations:()=>Q(R()),getModelVersion:()=>Z(R()),getAliasMap:()=>ee(R()),getAllowedRootEntityTypes:()=>et(R()),getEntityReflections:()=>en(R()),getMigrate:()=>eo(R()),getActiveMode:()=>eT(R()),getIsInitialized:()=>U(R()),getComponentReaderIndexes:()=>ey(R()),getStoreRuntimeDependencies:()=>ew(R()),getNavigationStates:()=>eh(R()),getViewStates:()=>eS(R()),getToolStates:()=>ex(R()),getExportStates:()=>eC(R()),getCreateTransformers:()=>eD(R()),getLoadedData:()=>ej(R()),getInitialDomainState:()=>eI(R()),getFrontendData:()=>ev(R()),getBackendData:()=>eP(R()),getPublishedData:()=>eM(R()),getActiveRole:()=>e$(R()),getActiveSessionData:()=>ek(R()),getDomain:()=>eL,getComponentReader:()=>eV,getCompositionProjections:()=>eB,getDimensionSystem:()=>eF,getValidationProjections:()=>eW,getSketchingProjections:()=>e_,getPositionProjections:()=>eq,getCollisionProjections:()=>eO,getSnappingProjections:()=>eU,getConstraintProjections:()=>eG,getProjectedEntitiesProjections:()=>eH,getStoreSystem:()=>eJ,getNavigationSystem:()=>eK,getUndoSystem:()=>eQ,getRecipeCookerSystem:()=>eX,getActionSystem:()=>eY,getBlenderProjections:()=>eZ,getExpressionContext:()=>eN(R()),getDomainSystems:function(){return e0},getDomainContext:function(){return e1}},eL=new t({selectors:ez}),eV=new C({selectors:ez}),eB=new d({selectors:ez}),eF=new i({selectors:ez}),eW=new y({selectors:ez}),e_=new w({selectors:ez}),eq=new f({selectors:ez}),eO=new m({selectors:ez}),eU=new p({selectors:ez}),eG=new g({selectors:ez}),eH=new u({selectors:ez}),eJ=new r({selectors:ez,domainServicesSelectors:z,environmentSelectors:L}),eK=new a({selectors:ez,domainServicesSelectors:z}),eQ=new c({selectors:ez}),eX=new s({selectors:ez}),eY=new o({selectors:ez}),eZ=new l({selectors:ez,domainServicesSelectors:z}),e0={domainContextSelectors:ez,domain:eL,componentReader:eV,compositionProjections:eB,blenderProjections:eZ,validationProjections:eW,storeSystem:eJ,navigationSystem:eK,dimensionSystem:eF,undoSystem:eQ,recipeCooker:eX,actionSystem:eY,sketchingProjections:e_,collisionProjections:eO,positionProjections:eq,snappingProjections:eU,projectedEntitiesProjections:eH,constraintProjections:eG},e1=new D({selectors:ez,actions:E,getExtensionSystems:V});return ez};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
1
|
+
import type { AccessLevel, SessionRole } from '@salsita-ai/contracts/api';
|
|
2
2
|
import type { AnyDomainFactory, DomainMode } from '../../core/index.js';
|
|
3
3
|
/** A retained system that refreshes its configuration-owned state on every initialization. */
|
|
4
4
|
export interface InitializableSystem {
|
|
@@ -26,6 +26,7 @@ export type DomainExecutionMode = 'interactive' | 'finalize';
|
|
|
26
26
|
export type SchemaCoherence = 'coherent' | 'schema-mismatch' | 'missing-stamp';
|
|
27
27
|
/** Runtime inputs that identify the interactive configuration rendered by a lifecycle host. */
|
|
28
28
|
export interface DomainContextInitializationIdentity {
|
|
29
|
+
readonly access: AccessLevel;
|
|
29
30
|
readonly configurationId: string;
|
|
30
31
|
readonly role: SessionRole;
|
|
31
32
|
readonly schemaIdentity: AnyDomainFactory;
|
|
@@ -33,6 +34,8 @@ export interface DomainContextInitializationIdentity {
|
|
|
33
34
|
}
|
|
34
35
|
/** Inputs captured by the latest successful domain-context initialization. */
|
|
35
36
|
export interface DomainContextInitializationContext {
|
|
37
|
+
/** Token access captured with the session inputs; finalization has no interactive access. */
|
|
38
|
+
readonly access: AccessLevel | null;
|
|
36
39
|
/** Finalization has no interactive access and therefore no configuration id. */
|
|
37
40
|
readonly configurationId: string | null;
|
|
38
41
|
readonly mode: DomainMode;
|
|
@@ -272,24 +272,28 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
272
272
|
access: {
|
|
273
273
|
selectConfiguratorRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
274
274
|
raw: string;
|
|
275
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
275
276
|
viewMode: boolean;
|
|
276
277
|
revisionId: string | undefined;
|
|
277
278
|
configurationId: string;
|
|
278
279
|
} | null>;
|
|
279
280
|
selectAdminRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
280
281
|
raw: string;
|
|
282
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
281
283
|
viewMode: boolean;
|
|
282
284
|
revisionId: string | undefined;
|
|
283
285
|
configurationId: string;
|
|
284
286
|
} | null>;
|
|
285
287
|
selectConfiguratorAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
286
288
|
raw: string;
|
|
289
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
287
290
|
viewMode: boolean;
|
|
288
291
|
revisionId: string | undefined;
|
|
289
292
|
configurationId: string;
|
|
290
293
|
}>;
|
|
291
294
|
selectAdminAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
292
295
|
raw: string;
|
|
296
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
293
297
|
viewMode: boolean;
|
|
294
298
|
revisionId: string | undefined;
|
|
295
299
|
configurationId: string;
|
|
@@ -302,24 +306,28 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
302
306
|
selectAdminConfigurationId: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, string>;
|
|
303
307
|
getConfiguratorRawAccessInfo: () => {
|
|
304
308
|
raw: string;
|
|
309
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
305
310
|
viewMode: boolean;
|
|
306
311
|
revisionId: string | undefined;
|
|
307
312
|
configurationId: string;
|
|
308
313
|
} | null;
|
|
309
314
|
getAdminRawAccessInfo: () => {
|
|
310
315
|
raw: string;
|
|
316
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
311
317
|
viewMode: boolean;
|
|
312
318
|
revisionId: string | undefined;
|
|
313
319
|
configurationId: string;
|
|
314
320
|
} | null;
|
|
315
321
|
getConfiguratorAccessInfo: () => {
|
|
316
322
|
raw: string;
|
|
323
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
317
324
|
viewMode: boolean;
|
|
318
325
|
revisionId: string | undefined;
|
|
319
326
|
configurationId: string;
|
|
320
327
|
};
|
|
321
328
|
getAdminAccessInfo: () => {
|
|
322
329
|
raw: string;
|
|
330
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
323
331
|
viewMode: boolean;
|
|
324
332
|
revisionId: string | undefined;
|
|
325
333
|
configurationId: string;
|
|
@@ -862,24 +870,28 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
862
870
|
access: {
|
|
863
871
|
selectConfiguratorRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
864
872
|
raw: string;
|
|
873
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
865
874
|
viewMode: boolean;
|
|
866
875
|
revisionId: string | undefined;
|
|
867
876
|
configurationId: string;
|
|
868
877
|
} | null>;
|
|
869
878
|
selectAdminRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
870
879
|
raw: string;
|
|
880
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
871
881
|
viewMode: boolean;
|
|
872
882
|
revisionId: string | undefined;
|
|
873
883
|
configurationId: string;
|
|
874
884
|
} | null>;
|
|
875
885
|
selectConfiguratorAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
876
886
|
raw: string;
|
|
887
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
877
888
|
viewMode: boolean;
|
|
878
889
|
revisionId: string | undefined;
|
|
879
890
|
configurationId: string;
|
|
880
891
|
}>;
|
|
881
892
|
selectAdminAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
882
893
|
raw: string;
|
|
894
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
883
895
|
viewMode: boolean;
|
|
884
896
|
revisionId: string | undefined;
|
|
885
897
|
configurationId: string;
|
|
@@ -892,24 +904,28 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
892
904
|
selectAdminConfigurationId: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, string>;
|
|
893
905
|
getConfiguratorRawAccessInfo: () => {
|
|
894
906
|
raw: string;
|
|
907
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
895
908
|
viewMode: boolean;
|
|
896
909
|
revisionId: string | undefined;
|
|
897
910
|
configurationId: string;
|
|
898
911
|
} | null;
|
|
899
912
|
getAdminRawAccessInfo: () => {
|
|
900
913
|
raw: string;
|
|
914
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
901
915
|
viewMode: boolean;
|
|
902
916
|
revisionId: string | undefined;
|
|
903
917
|
configurationId: string;
|
|
904
918
|
} | null;
|
|
905
919
|
getConfiguratorAccessInfo: () => {
|
|
906
920
|
raw: string;
|
|
921
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
907
922
|
viewMode: boolean;
|
|
908
923
|
revisionId: string | undefined;
|
|
909
924
|
configurationId: string;
|
|
910
925
|
};
|
|
911
926
|
getAdminAccessInfo: () => {
|
|
912
927
|
raw: string;
|
|
928
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
913
929
|
viewMode: boolean;
|
|
914
930
|
revisionId: string | undefined;
|
|
915
931
|
configurationId: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ImplementationError } from './implementation-error.js';
|
|
2
|
+
/**
|
|
3
|
+
* Gathers the implementation errors of one application start. Checks that do not depend on each
|
|
4
|
+
* other run through `attempt`, so that the failure of one does not hide the failures of the others.
|
|
5
|
+
*/
|
|
6
|
+
export interface ImplementationErrorCollector {
|
|
7
|
+
/**
|
|
8
|
+
* Runs one independent check. An implementation error it throws is recorded and `fallback` is
|
|
9
|
+
* returned, so the checks after it still run. Anything else it throws propagates.
|
|
10
|
+
*/
|
|
11
|
+
readonly attempt: <T>(check: () => T, fallback: T) => T;
|
|
12
|
+
readonly add: (error: ImplementationError) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Throws the recorded errors as one {@link ImplementationErrors}, in the order they were
|
|
15
|
+
* recorded. Does nothing when there are none.
|
|
16
|
+
*/
|
|
17
|
+
readonly throwIfAny: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const createImplementationErrorCollector: () => ImplementationErrorCollector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isImplementationError as r}from"./implementation-error.js";import{ImplementationErrors as t,isImplementationErrors as e}from"./implementation-errors.js";export const createImplementationErrorCollector=()=>{let o=[],n=r=>{o.push(r)};return{add:n,attempt:(t,o)=>{try{return t()}catch(t){if(e(t))return t.errors.forEach(n),o;if(r(t))return n(t),o;throw t}},throwIfAny:()=>{if(o.length>0)throw new t(o)}}};
|