@salsita-ai/sdk 0.50.0-develop.abef6d86a1 → 0.50.0-develop.ae9a830ef0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- 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/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 +9 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +12 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +7 -0
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- 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.d.ts +4 -2
- 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 +48 -48
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- 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 +5 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/sections/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/component-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.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/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/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.d.ts +7 -2
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
- package/dist/client/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 +3 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.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 +14 -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 +11 -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/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/scene/scene-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/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/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
- 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 +0 -74
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- package/dist/configurator/ui/legacy/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/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- 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/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-layout.mdx +1164 -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/side-effects.mdx +8 -11
- package/dist/docs/other-features/transformers.mdx +4 -0
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/application-states.mdx +9 -7
- package/dist/docs/phoenix/configurator-interface.mdx +184 -80
- package/dist/docs/phoenix/domain-model.mdx +4 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +114 -0
- package/dist/docs/phoenix/phoenix-cli.mdx +24 -27
- package/dist/docs/phoenix/project-structure.mdx +14 -9
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/testing.mdx +140 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +2 -2
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +4 -2
- 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 +1 -1
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +5 -5
- package/dist/domain/application/index.d.ts +0 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
- package/dist/domain/core/component/domain-component-optic.d.ts +11 -19
- package/dist/domain/core/component/domain-component-optic.js +2 -2
- package/dist/domain/core/component/legacy-filter.d.ts +2 -17
- package/dist/domain/core/component/system-component-filter.d.ts +36 -18
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
- package/dist/domain/core/expression/custom-expression.d.ts +16 -3
- package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
- package/dist/domain/core/invariant/invariants.d.ts +1 -4
- 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/core/recipe/recipes.d.ts +18 -50
- package/dist/domain/core/recipe/recipes.js +1 -1
- package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
- package/dist/domain/core/relation/all-of-type-relation.js +1 -1
- package/dist/domain/core/relation/direct-relation.d.ts +13 -24
- package/dist/domain/core/relation/index.d.ts +0 -1
- package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
- package/dist/domain/core/relation/indirect-relation.js +1 -1
- package/dist/domain/core/relation/relation-factory.d.ts +19 -15
- package/dist/domain/core/relation/relation-factory.js +1 -1
- package/dist/domain/core/state/migrations.d.ts +14 -45
- package/dist/domain/core/state/migrations.js +1 -1
- package/dist/domain/core/state/state.d.ts +1 -1
- package/dist/domain/domain-builder.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.d.ts +14 -13
- 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 +32 -16
- 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/create-violation-expressions.d.ts +24 -0
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/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/index.d.ts +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.d.ts +7 -7
- 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.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -1
- 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-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +18 -9
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-mock-state.d.ts +2 -2
- 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/projections/blender-projections/camera.d.ts +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/domain/utils/eval-cache.d.ts +1 -1
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -1
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/invariants.js +3 -4
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/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 +2 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/init.d.ts +4 -4
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/utils/git/index.d.ts +1 -0
- package/dist/phoenix/utils/git/index.js +1 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/react-sdk/application-runtime/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 +33 -16
- 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/common-hooks/use-domain-context.d.ts +4 -4
- 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 +6 -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 +3 -3
- package/schema/domain-spec.json +1115 -209
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/domain/application/resource-builder.d.ts +0 -13
- package/dist/domain/application/resource-builder.js +0 -1
- package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
- package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +0 -26
- package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
- /package/dist/{domain/core/relation/relation-implementation.js → application-spec/core/expressions/relation-expression-params.js} +0 -0
- /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
|
@@ -55,6 +55,23 @@ export interface paths {
|
|
|
55
55
|
readonly patch?: never
|
|
56
56
|
readonly trace?: never
|
|
57
57
|
}
|
|
58
|
+
readonly '/auth/identity': {
|
|
59
|
+
readonly parameters: {
|
|
60
|
+
readonly query?: never
|
|
61
|
+
readonly header?: never
|
|
62
|
+
readonly path?: never
|
|
63
|
+
readonly cookie?: never
|
|
64
|
+
}
|
|
65
|
+
readonly get?: never
|
|
66
|
+
readonly put?: never
|
|
67
|
+
/** @description Resolve a verified customer Cognito identity to a stable Phoenix account and its active workspaces. Creates an empty account on first use; does not grant project or system access. */
|
|
68
|
+
readonly post: operations['resolveIdentity']
|
|
69
|
+
readonly delete?: never
|
|
70
|
+
readonly options?: never
|
|
71
|
+
readonly head?: never
|
|
72
|
+
readonly patch?: never
|
|
73
|
+
readonly trace?: never
|
|
74
|
+
}
|
|
58
75
|
readonly '/auth/me': {
|
|
59
76
|
readonly parameters: {
|
|
60
77
|
readonly query?: never
|
|
@@ -1603,6 +1620,85 @@ export interface operations {
|
|
|
1603
1620
|
}
|
|
1604
1621
|
}
|
|
1605
1622
|
}
|
|
1623
|
+
readonly resolveIdentity: {
|
|
1624
|
+
readonly parameters: {
|
|
1625
|
+
readonly query?: never
|
|
1626
|
+
readonly header?: never
|
|
1627
|
+
readonly path?: never
|
|
1628
|
+
readonly cookie?: never
|
|
1629
|
+
}
|
|
1630
|
+
readonly requestBody?: never
|
|
1631
|
+
readonly responses: {
|
|
1632
|
+
/** @description The Phoenix account and its active Cognito customer memberships. */
|
|
1633
|
+
readonly 200: {
|
|
1634
|
+
headers: {
|
|
1635
|
+
readonly [name: string]: unknown
|
|
1636
|
+
}
|
|
1637
|
+
content: {
|
|
1638
|
+
readonly 'application/json': {
|
|
1639
|
+
/** Format: uuid */
|
|
1640
|
+
readonly userId: string
|
|
1641
|
+
readonly workspaces: readonly {
|
|
1642
|
+
/** Format: uuid */
|
|
1643
|
+
readonly customerId: string
|
|
1644
|
+
readonly name: string
|
|
1645
|
+
/** @enum {string} */
|
|
1646
|
+
readonly role: 'user' | 'admin' | 'superadmin'
|
|
1647
|
+
readonly slug: string
|
|
1648
|
+
readonly tags: readonly string[]
|
|
1649
|
+
/** @enum {string} */
|
|
1650
|
+
readonly type: 'standard' | 'sdk_builder'
|
|
1651
|
+
}[]
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
/** @description Unauthorized! */
|
|
1656
|
+
readonly 401: {
|
|
1657
|
+
headers: {
|
|
1658
|
+
readonly [name: string]: unknown
|
|
1659
|
+
}
|
|
1660
|
+
content: {
|
|
1661
|
+
readonly 'application/json': components['schemas']['UnauthorizedError']
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
/** @description Forbidden! */
|
|
1665
|
+
readonly 403: {
|
|
1666
|
+
headers: {
|
|
1667
|
+
readonly [name: string]: unknown
|
|
1668
|
+
}
|
|
1669
|
+
content: {
|
|
1670
|
+
readonly 'application/json': components['schemas']['ForbiddenError']
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
/** @description Not Found! */
|
|
1674
|
+
readonly 404: {
|
|
1675
|
+
headers: {
|
|
1676
|
+
readonly [name: string]: unknown
|
|
1677
|
+
}
|
|
1678
|
+
content: {
|
|
1679
|
+
readonly 'application/json': components['schemas']['NotFoundError']
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
/** @description Service Unavailable! */
|
|
1683
|
+
readonly 503: {
|
|
1684
|
+
headers: {
|
|
1685
|
+
readonly [name: string]: unknown
|
|
1686
|
+
}
|
|
1687
|
+
content: {
|
|
1688
|
+
readonly 'application/json': components['schemas']['ServiceUnavailableError']
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
/** @description An unexpected error occurred! */
|
|
1692
|
+
readonly default: {
|
|
1693
|
+
headers: {
|
|
1694
|
+
readonly [name: string]: unknown
|
|
1695
|
+
}
|
|
1696
|
+
content: {
|
|
1697
|
+
readonly 'application/json': components['schemas']['DefaultResponse']
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1606
1702
|
readonly getApiSession: {
|
|
1607
1703
|
readonly parameters: {
|
|
1608
1704
|
readonly query?: never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createApplicationRuntimeExtension as e}from"#package/react-sdk";import{createConfiguratorExtensionSelectors as s}from"./selectors.js";export const createConfiguratorExtensions=o=>[e(s({domainContextSelectors:o.selectors.domainContext.configurator,specSelectors:o.selectors.spec,domainServicesSelectors:o.selectors.domainServices,accessSelectors:o.selectors.access,commonServicesSelectors:o.selectors.commonServices}).getSystems())];
|
|
1
|
+
import{createApplicationRuntimeExtension as e}from"#package/react-sdk";import{createConfiguratorExtensionSelectors as s}from"./selectors.js";export const createConfiguratorExtensions=o=>[e(s({getState:o.getState,domainContextSelectors:o.selectors.domainContext.configurator,specSelectors:o.selectors.spec,domainServicesSelectors:o.selectors.domainServices,accessSelectors:o.selectors.access,commonServicesSelectors:o.selectors.commonServices}).getSystems())];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AccessInfoSelectors, type DomainContextSelectorState, type DomainContextSelectors, type DomainServicesSelectors, type SpecSelectors } from '#package/domain';
|
|
2
2
|
import type { CommonServicesSelectors } from '#package/react-sdk';
|
|
3
3
|
import type { AnyConfiguratorExtensionSystems } from './configurator-extension-systems.js';
|
|
4
4
|
import { AnimationSystem, type AnyCameraSystem, type AnyCanvasSystem, type AnyDragAndDropSystem, type AnyExportSystem, type AnyImageRenderingSystem, type AnyLayoutSystem, type AnySketchingSystem, AssistantSystem, CameraControlSystem, GraphQLSystem } from './systems/index.js';
|
|
5
5
|
interface Context {
|
|
6
|
+
readonly getState: () => DomainContextSelectorState;
|
|
6
7
|
readonly domainContextSelectors: DomainContextSelectors;
|
|
7
8
|
readonly specSelectors: SpecSelectors;
|
|
8
9
|
readonly domainServicesSelectors: DomainServicesSelectors;
|
|
@@ -18,6 +19,7 @@ interface Context {
|
|
|
18
19
|
* matching the domain layer. Every configurator system reads the domain through
|
|
19
20
|
* `domainContextSelectors` and its same-layer peers through this slice's own selectors, so no
|
|
20
21
|
* system is handed a constructed instance and construction order stops being a dependency graph.
|
|
22
|
+
* The exceptions are the narrowed getters of `systemContext`, each with its reason there.
|
|
21
23
|
*/
|
|
22
24
|
export declare const createConfiguratorExtensionSelectors: (context: Context) => {
|
|
23
25
|
getSystems: () => AnyConfiguratorExtensionSystems;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{createSessionAssistant as t,isAssistantSetupHandler as n}from"#package/domain";import{AnimationSystem as s,AssistantSystem as o,CameraControlSystem as r,CameraSystem as a,CanvasSystem as i,DragAndDropSystem as g,ExportSystem as m,GraphQLSystem as c,ImageRenderingSystem as l,LayoutSystem as S,SketchingSystem as u}from"./systems/index.js";export const createConfiguratorExtensionSelectors=y=>{let{getState:C,domainContextSelectors:d,specSelectors:f,domainServicesSelectors:p,accessSelectors:w,commonServicesSelectors:h}=y,x=e.withTypes()([f.selectConfiguratorSpec,d.selectInitializationContext],(e,s)=>t({resolved:e.assistant,handler:e.handlers.find(n),inputs:s&&s.access?{role:s.role,sessionData:s.sessionData,access:s.access}:null})),A={getConfigurationId:()=>w.getConfiguratorConfigurationId(),getAuthorizedClient:()=>h.getConfiguratorAuthorizedClient(),getAssistantSetup:()=>x(C()),domainContextSelectors:d,domainServicesSelectors:p,specSelectors:f},D={getSystems:()=>q,getCanvasSystem:()=>I,getCameraControlSystem:()=>z,getAnimationSystem:()=>v,getDragAndDropSystem:()=>k,getImageRenderingSystem:()=>b,getLayoutSystem:()=>Q,getSketchingSystem:()=>R,getExportSystem:()=>L,getCameraSystem:()=>T,getGraphQLSystem:()=>j,getAssistantSystem:()=>G},E={...A,configuratorExtensionSelectors:D},I=new i(A),z=new r({configuratorExtensionSelectors:D}),k=new g(E),v=new s(A),L=new m(E),j=new c(A),G=new o(E),Q=new S(A),R=new u(E),T=new a(E),b=new l(E),q={cameraControlSystem:z,layoutSystem:Q,sketchingSystem:R,dragAndDropSystem:k,canvasSystem:I,cameraSystem:T,exportSystem:L,imageRenderingSystem:b,animationSystem:v,graphQLSystem:j,assistantSystem:G};return D};
|
|
@@ -2,7 +2,7 @@ import type { AnyClientTool } from '@tanstack/ai';
|
|
|
2
2
|
import { type UIMessage } from '@tanstack/ai-client';
|
|
3
3
|
import { type ObservableWithLastValue } from '@salsita-ai/common/utils';
|
|
4
4
|
import { type AuthorizedPhoenixApiClient } from '#package/client';
|
|
5
|
-
import type { DomainContextSelectors, DomainServicesSelectors, InitializableSystem, SpecSelectors } from '#package/domain';
|
|
5
|
+
import type { DomainContextSelectors, DomainServicesSelectors, InitializableSystem, SessionAssistantSetup, SpecSelectors } from '#package/domain';
|
|
6
6
|
import type { ConfiguratorExtensionSelectors } from '../../selectors.js';
|
|
7
7
|
/** A tool of the assistant that the model calls and the browser runs, as the chat client accepts it. */
|
|
8
8
|
export type AssistantClientTool = AnyClientTool;
|
|
@@ -18,6 +18,8 @@ export interface AssistantSystemContext {
|
|
|
18
18
|
readonly specSelectors: SpecSelectors;
|
|
19
19
|
readonly getConfigurationId: () => string;
|
|
20
20
|
readonly getAuthorizedClient: () => AuthorizedPhoenixApiClient<any, any, any>;
|
|
21
|
+
/** The assistant the initialized session runs: its tools, its exposed fields and whether chat runs at all. */
|
|
22
|
+
readonly getAssistantSetup: () => SessionAssistantSetup;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* The conversation with the assistant as the panel paints it. One value is published per change, so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChatClient as e,fetchServerSentEvents as t}from"@tanstack/ai-client";import{BehaviorSubject as i}from"rxjs";import{skip as s}from"rxjs/operators";import{isShallowEqual as a}from"@salsita-ai/common/utils";import{AssistantRequestError as r}from"#package/client";import{createBrowserDetailsClientTool as n}from"./browser-details.js";import{ChangeRecorder as h}from"./change-recorder.js";import{createApplyClientTool as o,createQueryClientTool as l}from"./graphql-tools.js";let c=Object.freeze({messages:Object.freeze([]),isLoading:!1,error:void 0,failedStatus:void 0,isContinuable:!0,isLoaded:!1,isResuming:!1,earlierThreads:Object.freeze([]),hasEarlierThread:!1,isLoadingEarlierThread:!1}),d=Object.freeze({open:!1,hasUnreadReply:!1,isInputFocused:!1}),u=Object.freeze({}),_=Object.freeze({results:Object.freeze([]),committed:!1,sideEffects:Object.freeze([]),message:"Nothing was run, because the user closed the configurator while this reply was being written. Do not call any more tools in this reply and end it now. The tools work again as soon as the user writes the next message."}),g=e=>{if(e.getError())return!0;let t=e.getMessages().at(-1)?.parts.at(-1);return t?.type!=="tool-call"&&t?.type!=="tool-result"};export class AssistantSystem{_context;_tools;_chat=new i(c);_panel=new i(d);_activation=null;_current=null;_finishing=new Set;_olderThreadId=null;_resuming=null;_refused=null;_firstAttempt=null;_chain={};_loadingThreadId=null;_recorder;_recording=null;constructor(e){this._context=e;let{configuratorExtensionSelectors:t,domainContextSelectors:i,domainServicesSelectors:s,
|
|
1
|
+
import{ChatClient as e,fetchServerSentEvents as t}from"@tanstack/ai-client";import{BehaviorSubject as i}from"rxjs";import{skip as s}from"rxjs/operators";import{isShallowEqual as a}from"@salsita-ai/common/utils";import{AssistantRequestError as r}from"#package/client";import{createBrowserDetailsClientTool as n}from"./browser-details.js";import{ChangeRecorder as h}from"./change-recorder.js";import{createApplyClientTool as o,createQueryClientTool as l}from"./graphql-tools.js";let c=Object.freeze({messages:Object.freeze([]),isLoading:!1,error:void 0,failedStatus:void 0,isContinuable:!0,isLoaded:!1,isResuming:!1,earlierThreads:Object.freeze([]),hasEarlierThread:!1,isLoadingEarlierThread:!1}),d=Object.freeze({open:!1,hasUnreadReply:!1,isInputFocused:!1}),u=Object.freeze({}),_=Object.freeze({results:Object.freeze([]),committed:!1,sideEffects:Object.freeze([]),message:"Nothing was run, because the user closed the configurator while this reply was being written. Do not call any more tools in this reply and end it now. The tools work again as soon as the user writes the next message."}),g=e=>{if(e.getError())return!0;let t=e.getMessages().at(-1)?.parts.at(-1);return t?.type!=="tool-call"&&t?.type!=="tool-result"};export class AssistantSystem{_context;_tools;_chat=new i(c);_panel=new i(d);_activation=null;_current=null;_finishing=new Set;_olderThreadId=null;_resuming=null;_refused=null;_firstAttempt=null;_chain={};_loadingThreadId=null;_recorder;_recording=null;constructor(e){this._context=e;let{configuratorExtensionSelectors:t,domainContextSelectors:i,domainServicesSelectors:s,getAssistantSetup:a}=e;this._recorder=new h({maxEntities:30},{readers:{selectedEntityId:e=>i.getNavigationSystem().getActiveSelectionState(e),navigationState:e=>i.getNavigationSystem().getActiveNavigationState(e),viewState:e=>i.getNavigationSystem().getActiveViewState(e),toolState:e=>i.getNavigationSystem().getActiveToolState(e)},getExposedFields:()=>a().manifest?.fields??u,resolveLocalizable:e=>s.getResolveLocalizable()(e)});let r={getGraphQLSystem:()=>t.getGraphQLSystem(),getStoreSystem:()=>i.getStoreSystem(),getActiveMode:()=>i.getActiveMode(),clearChanges:()=>this._recorder.clear(this._committedState())};this._tools=[n(),l(r),o(r)]}chat$=this._chat;panel$=this._panel;initialize=()=>{let{committed:e}=this._context.domainContextSelectors.getStoreSystem().stateSlices;this._recording??=e.pipe(s(1)).subscribe(this._recorder.record),this._recorder.reset(e.value.state),this._endChat(),this._patchPanel(d),this._activation&&this._startClient()};activate=()=>{this._endChat();let e={};return this._activation=e,this._startClient(),()=>{this._activation===e&&(this._activation=null,this._endChat())}};send=async e=>{if(!this._chat.value.isContinuable&&!await this.resume())return;let t=this._current;if(!t)return;let i={changes:this._recorder.take(this._committedState())};this._firstAttempt=t;try{await this._sendOn(t,e,i);let s=this._findRefusedMessageIndex(t);if(-1===s)return;this._refused={chat:t,index:s}}finally{this._firstAttempt===t&&(this._firstAttempt=null)}if(!await this.resume())return;let s=this._current;s&&await this._sendOn(s,e,i)};resume=async()=>{let e=this._current;if(!e)return!1;if(this._chat.value.isContinuable)return!0;if(this._resuming)return this._resuming;let t=this._resume(e).finally(()=>{this._resuming===t&&(this._resuming=null)});return this._resuming=t,t};loadEarlierThread=async()=>{let e=this._current,t=this._olderThreadId;if(!e||null===t||this._loadingThreadId===t)return;let i=this._chain;this._loadingThreadId=t,this._chat.next({...this._chat.value,isLoadingEarlierThread:!0});try{let s=await e.authorizedClient.getAssistantEarlierThread(e.configurationId,t,50);if(this._chain!==i||this._olderThreadId!==t)return;this._olderThreadId=s.previousThreadId,this._chat.next({...this._chat.value,earlierThreads:[{threadId:t,messages:s.messages},...this._chat.value.earlierThreads],hasEarlierThread:null!==s.previousThreadId})}catch(e){this._context.domainServicesSelectors.getLogger().warn("Could not load the earlier assistant conversation",{error:e})}finally{this._chain===i&&this._loadingThreadId===t&&(this._loadingThreadId=null,this._chat.next({...this._chat.value,isLoadingEarlierThread:!1}))}};stop=async()=>{let e=this._current;if(!e)return;let t=e.client.getCurrentRunId();if(e.client.stop(),null!=t)try{let i=e.getConnection();await fetch(`${i.url}/runs/${encodeURIComponent(t)}/cancel`,{method:"POST",headers:await i.headers()})}catch(e){this._context.domainServicesSelectors.getLogger().warn("Could not cancel the assistant run on the server",{error:e})}};reloadThread=()=>{if(!this._activation)return;let e=this._retireChat();e?.client.stop(),e?.dispose(),this._recorder.reset(this._committedState()),this._startClient()};setOpen=e=>{this._patchPanel(e?{open:e,hasUnreadReply:!1}:{open:e,isInputFocused:!1})};setInputFocused=e=>{this._patchPanel({isInputFocused:e})};_findRefusedMessageIndex=e=>{var t;let i,{failedStatus:s,isContinuable:a}=this._chat.value;return this._firstAttempt===e&&e.generation.active&&409===s&&!a?(i=(t=e.client.getMessages()).map(e=>e.role).lastIndexOf("user"),t.slice(i+1).every(e=>0===e.parts.length)?i:-1):-1};_sendOn=async(e,t,i)=>{let{client:s}=e;s.getIsLoading()||null===s.getResumeState()||s.stop();try{await s.sendMessage({content:t,metadata:i})}catch(i){let t=i instanceof Error?i:Error(String(i));e.generation.active&&this._chat.next({...this._chat.value,error:t}),this._context.domainServicesSelectors.getLogger().error("The assistant message could not be sent",{},t)}};_resume=async e=>{this._chat.next({...this._chat.value,isResuming:!0,error:void 0,failedStatus:void 0});try{let{previousThreadId:t}=await e.authorizedClient.compactAssistantThread(e.configurationId);if(!e.generation.active)return!1;let{messages:i,earlierThreads:s,hasEarlierThread:a}=this._chat.value,r=this._refused?.chat===e?i.slice(0,this._refused.index):i;return e.generation.active=!1,this._current=null,e.client.stop(),e.dispose(),this._chat.next({...c,earlierThreads:[...s,{threadId:t,messages:r}],hasEarlierThread:a,isLoadingEarlierThread:null!==this._loadingThreadId}),this._startClient(),!0}catch(i){let t=i instanceof Error?i:Error(String(i));if(t instanceof r&&409===t.status)return e.generation.active&&this.reloadThread(),!1;return e.generation.active&&this._chat.next({...this._chat.value,isResuming:!1,error:t,failedStatus:t instanceof r?t.status:void 0}),this._context.domainServicesSelectors.getLogger().error("The assistant thread could not be resumed",{},t),!1}};_committedState=()=>this._context.domainContextSelectors.getStoreSystem().stateSlices.committed.value.state;_patchPanel=e=>{let t={...this._panel.value,...e};a(t,this._panel.value)||this._panel.next(t)};_takeOverThread=e=>{for(let t of this._finishing)t.configurationId===e&&(t.client.stop(),t.dispose())};_startClient=()=>{let i={active:!0},s=this._context.getConfigurationId();this._takeOverThread(s);let r=this._context.getAuthorizedClient(),n=()=>{if(i.active){let{manifest:e,error:t}=this._context.getAssistantSetup();if(t)throw t;if(!e)throw Error("The assistant is disabled for this session.")}return r.getAssistantChatConnection(s)},h=e=>{if(!i.active)return;let t={...this._chat.value,...e};a(t,this._chat.value)||this._chat.next(t)},o=async(e,t)=>{let s=await fetch(e,t).finally(()=>h({isLoaded:!0})),a=s.headers.get("x-assistant-thread-continuable");return null!=a&&s.ok&&i.active&&0===this._chat.value.earlierThreads.length&&(this._olderThreadId=s.headers.get("x-assistant-previous-thread")),h({failedStatus:s.ok?void 0:s.status,...null!=a&&{isContinuable:"false"!==a,hasEarlierThread:null!==this._olderThreadId}}),s},l=async()=>({headers:await n().headers(),fetchClient:o}),c=t(()=>n().url,l),d=t(()=>`${n().url}/runs`,l),u=this._tools.map(e=>({...e,execute:(t,s)=>{if(!i.active)return _;let{manifest:a,error:r}=this._context.getAssistantSetup();return r||!a?{error:r?.message??"The assistant is disabled for this session."}:e.execute?.(t,s)}})),f=new e({threadId:`assistant:${s}`,connection:{...c,joinRun:d.joinRun},persistence:!0,history:{pageSize:50},tools:u,onMessagesChange:e=>h({messages:e}),onLoadingChange:e=>{let t=i.active&&this._chat.value.isLoading;h({isLoading:e}),!e&&g(f)&&(i.active?t&&!this._panel.value.open&&this._patchPanel({hasUnreadReply:!0}):v())},onErrorChange:e=>{i.active&&e!==this._chat.value.error&&(!e||-1===this._findRefusedMessageIndex(p))&&(h({error:e}),e&&this._context.domainServicesSelectors.getLogger().error("The assistant request failed",{status:this._chat.value.failedStatus},e))}}),m=!1,v=()=>{m||(m=!0,this._finishing.delete(p),f.dispose())},p={client:f,configurationId:s,generation:i,authorizedClient:r,getConnection:n,dispose:v};this._current=p,f.attach()};_retireChat=()=>{let e=this._current;return this._current=null,e&&(e.generation.active=!1),this._chain={},this._olderThreadId=null,this._resuming=null,this._refused=null,this._loadingThreadId=null,this._chat.value!==c&&this._chat.next(c),e};_endChat=()=>{let e=this._retireChat();if(e){if(!e.client.getIsLoading()&&g(e.client))return void e.dispose();this._finishing.add(e)}}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Object3D, Vector2, Vector3 } from 'three';
|
|
2
2
|
import type { ObservableWithLastValue } from '@salsita-ai/common/utils';
|
|
3
|
-
import type { DomainContextSelectors, DomainEntity, DomainEntityId, DomainServicesSelectors, DomainState, DraggableSurface } from '#package/domain';
|
|
3
|
+
import type { DomainContextSelectors, DomainEntity, DomainEntityId, DomainServicesSelectors, DomainState, DraggableSurface, RotatableSurface } from '#package/domain';
|
|
4
4
|
import type { ConfiguratorExtensionSelectors } from '../../selectors.js';
|
|
5
5
|
/**
|
|
6
6
|
* Constructor context of a `DragAndDropSystem`. Same-layer configurator peers are reached through
|
|
@@ -17,7 +17,7 @@ export interface DraggableState {
|
|
|
17
17
|
readonly type: 'draggable';
|
|
18
18
|
readonly entityId: DomainEntityId<string>;
|
|
19
19
|
readonly originalMouseDiff: Vector3;
|
|
20
|
-
readonly draggingPlanes: DraggableSurface[];
|
|
20
|
+
readonly draggingPlanes: readonly DraggableSurface[];
|
|
21
21
|
readonly dragHandleInstance: string;
|
|
22
22
|
readonly newWorldPosition: Vector3;
|
|
23
23
|
readonly originalWorldPosition: Vector3;
|
|
@@ -28,7 +28,7 @@ export interface RotationDraggingState {
|
|
|
28
28
|
readonly type: 'rotation';
|
|
29
29
|
readonly entityId: DomainEntityId<string>;
|
|
30
30
|
readonly originalMouseVector: Vector2;
|
|
31
|
-
readonly draggingPlane:
|
|
31
|
+
readonly draggingPlane: RotatableSurface;
|
|
32
32
|
readonly originalEntityVector: Vector3;
|
|
33
33
|
readonly initialAngle: number;
|
|
34
34
|
readonly dragHandleTarget: string;
|
package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ExecutionResult } from 'graphql';
|
|
2
2
|
import { type Localizable } from '@salsita-ai/common/utils';
|
|
3
|
-
import { type $DomainEntity, type DomainContextSelectors, type DomainEntity, type DomainServicesSelectors, type DomainState, type SpecSelectors, type StateUpdateEmission } from '#package/domain';
|
|
3
|
+
import { type $DomainEntity, type DomainContextSelectors, type DomainEntity, type DomainServicesSelectors, type DomainState, type SessionAssistantSetup, type SpecSelectors, type StateUpdateEmission } from '#package/domain';
|
|
4
4
|
/** One single-operation GraphQL document with its own variables, as executed by {@link GraphQLSystem}. */
|
|
5
5
|
export interface GraphQLOperation {
|
|
6
6
|
readonly document: string;
|
|
@@ -8,6 +8,8 @@ export interface GraphQLOperation {
|
|
|
8
8
|
readonly operationName?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface GraphQLSystemContext {
|
|
11
|
+
/** The assistant the initialized session runs: the operations are validated and executed against its schema. */
|
|
12
|
+
readonly getAssistantSetup: () => SessionAssistantSetup;
|
|
11
13
|
readonly specSelectors: SpecSelectors;
|
|
12
14
|
readonly domainContextSelectors: DomainContextSelectors;
|
|
13
15
|
readonly domainServicesSelectors: DomainServicesSelectors;
|
|
@@ -51,10 +53,12 @@ export declare const localize: (value: unknown, resolveLocalizable: (message: Lo
|
|
|
51
53
|
export declare class GraphQLSystem {
|
|
52
54
|
private readonly _context;
|
|
53
55
|
/**
|
|
54
|
-
* Compiles the manifest's SDL and checks
|
|
55
|
-
* that parses but is not valid GraphQL fails every operation with an error result.
|
|
56
|
+
* Compiles the execution schema of the manifest's SDL and checks its semantic rules, once per SDL
|
|
57
|
+
* text, so a schema that parses but is not valid GraphQL fails every operation with an error result.
|
|
56
58
|
*/
|
|
57
59
|
private readonly _selectSchema;
|
|
60
|
+
/** Parses the manifest's lens definitions, which the builder has validated, once per text. */
|
|
61
|
+
private readonly _selectLenses;
|
|
58
62
|
/**
|
|
59
63
|
* Query fields call the root resolvers; entity fields read the stored field or expression their
|
|
60
64
|
* GraphQL name maps to. Rebuilt only when the manifest's field sources change.
|
|
@@ -78,10 +82,16 @@ export declare class GraphQLSystem {
|
|
|
78
82
|
private readonly _resolveMutation;
|
|
79
83
|
private readonly _runMutation;
|
|
80
84
|
private readonly _setup;
|
|
85
|
+
/**
|
|
86
|
+
* Parses, validates and executes one operation document. Validation adds the rule against
|
|
87
|
+
* introspection to the standard ones: the agent reads the schema from its prompt, and the schema
|
|
88
|
+
* operations run against is the widened execution schema, which is not the one to describe.
|
|
89
|
+
*/
|
|
90
|
+
private readonly _run;
|
|
81
91
|
/**
|
|
82
92
|
* Runs the operations in order through one working state that starts at `originalState`: a query
|
|
83
93
|
* reads the current working state, and each mutation field advances it with its own emission.
|
|
84
|
-
* Nothing is committed. The first operation that fails stops the list; every later one gets a
|
|
94
|
+
* The lenses an operation spreads are injected into its document first. Nothing is committed. The first operation that fails stops the list; every later one gets a
|
|
85
95
|
* "not run" error instead.
|
|
86
96
|
*/
|
|
87
97
|
prepare: (originalState: AnyDomainState, operations: readonly GraphQLOperation[]) => Promise<readonly PreparedOperation[]>;
|
package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GraphQLError as e,
|
|
1
|
+
import{GraphQLError as e,NoSchemaIntrospectionCustomRule as t,defaultFieldResolver as i,execute as o,getNamedType as n,parse as r,specifiedRules as a,validate as s,validateSchema as l}from"graphql";import{assertExistence as c,createSelector as d,isMessageDescriptor as h,isMultilingualString as u}from"@salsita-ai/common/utils";import{DomainEntityIdSchema as m,createAssistantExecutionSchema as f,findAssistantMutation as p}from"#package/domain";import{createEntityMeta as g}from"./entity-meta.js";import{injectAssistantLenses as y}from"./inject-assistant-lenses.js";import{readSideEffects as v}from"./side-effects.js";let S={errors:[new e("The configurator does not provide this request. This is a fault in the configurator, not in your request. Tell the user this is not available.")]},_={errors:[new e("The configuration is not loaded yet, so there is no state to query. Run the query again once the configurator has finished loading.")]},x=new RegExp(m.pattern),w=[...a,t],E=e=>"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type&&"id"in e&&"string"==typeof e.id,$=(e,t)=>"object"==typeof e&&null!==e?Reflect.get(e,t):void 0,b=e=>e instanceof Error?e.message:String(e),T=e=>/[.!?]$/.test(e)?e:`${e}.`,C=e=>"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype,R=(e,t)=>{let i=C(e)?e._raw:void 0;if(E(i))return i;if(!Array.isArray(e)&&!C(e))return e;if(t.has(e))throw Error("The value contains itself.");let o=new Set([...t,e]);return Array.isArray(e)?e.map(e=>R(e,o)):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,R(t,o)]))};export const localize=(e,t)=>Array.isArray(e)?e.map(e=>localize(e,t)):"string"==typeof e||h(e)||u(e)?t(e):e;let j=t=>new e(`The configurator cannot handle this request: ${T(t)} This is a fault in the configurator, not in your request. Tell the user this is not available.`),A=e=>(e.errors?.length??0)>0,M=t=>({errors:[new e(`Not run: operation ${t+1} failed, so the operations after it were skipped and no change of the list takes effect. Fix the failing operation and send the whole list again.`)]});export class GraphQLSystem{_context;_selectSchema=d([d.leaf(e=>e)],e=>{try{let t=f(e),i=l(t);return i.length>0?j(i.map(e=>e.message).join(" ")):t}catch(e){return j(b(e))}});_selectLenses=d([d.leaf(e=>e)],e=>r(e));_selectFieldResolver=d([d.leaf(e=>e)],t=>(o,r,a,s)=>{if(s.parentType===s.schema.getQueryType())return i(o,r,a,s);if(s.parentType===s.schema.getMutationType())return this._resolveMutation(s.fieldName,String(s.path.key),r,a);if(!E(o))return i(o,r,a,s);if("meta"===s.fieldName){let e;return g({entity:o,state:("object"==typeof(e=$(o,"_state"))&&null!==e&&"entities"in e&&"rootEntityId"in e?e:void 0)??a.state},{manifest:a.manifest,recipes:this._recipeContext(),prepareStateEmission:(e,t,i)=>this._context.domainContextSelectors.getStoreSystem().prepareStateEmission(e,t,i),find$Entity:(e,t)=>this._find$Entity(e,t),validateEntity:e=>this._context.domainContextSelectors.getDomain().validateEntity(e)})}let{source:l,localized:c}=t[s.parentType.name]?.[s.fieldName]??{source:s.fieldName},d=((t,i)=>{try{return $(t,i)}catch(o){throw new e(`Expression "${i}" failed on ${E(t)?t.id:"an entity"}: ${T(b(o))} This is a fault in the configurator, not in your request. Tell the user this is not available.`,{originalError:o instanceof Error?o:void 0})}})(o,l);return c?localize(d,this._context.domainServicesSelectors.getResolveLocalizable()):l.startsWith("$")&&"JSON"===n(s.returnType).name?((t,i,o)=>{try{return R(o,new Set)}catch(o){throw new e(`Expression "${i}" returned a value that is not plain serializable data on ${E(t)?t.id:"an entity"}: ${T(b(o))} This is a fault in the configurator, not in your request. Tell the user this is not available.`,{originalError:o instanceof Error?o:void 0})}})(o,l,d):d});constructor(e){this._context=e}_get$Entity=(e,t)=>this._context.domainContextSelectors.getDomain().get$Entity(e,t);_find$Entity=(e,t)=>this._context.domainContextSelectors.getDomain().getEntity(e,t)?this._get$Entity(e,t):null;_recipeContext=()=>({componentReader:this._context.domainContextSelectors.getComponentReader(),recipeCooker:this._context.domainContextSelectors.getRecipeCookerSystem(),resolveLocalizable:this._context.domainServicesSelectors.getResolveLocalizable()});_rootValue={root:(e,{state:t})=>this._get$Entity(t.rootEntityId,t),entities:({ids:t},{state:i})=>{if(null==t)return i.entities.map(e=>this._get$Entity(e.id,i));var o=i.rootEntityId;let n=t.filter(e=>!x.test(e));if(n.length>0)throw new e(`${n.map(e=>`"${e}"`).join(", ")} ${1===n.length?"is not an entity id":"are not entity ids"}. Entity ids have the form "<Type>-<number>", e.g. "${o}". Use ids as returned by the "id" field.`);return t.map(e=>x.test(e)?this._find$Entity(e,i):null)},selectedEntity:(e,{state:t})=>this._find$Entity(this._context.domainContextSelectors.getNavigationSystem().getActiveSelectionState(t),t),navigation:(e,{state:t})=>{let i=this._context.domainContextSelectors.getNavigationSystem();return{navigationState:i.getActiveNavigationState(t),viewState:i.getActiveViewState(t),toolState:i.getActiveToolState(t)}}};_resolveType=e=>E(e)?e.type:void 0;initialize=()=>{};_resolveMutation=(t,i,o,n)=>{if(void 0!==n.failedMutationField)throw new e(`Not run: the earlier field "${n.failedMutationField}" of this operation failed, so "${i}" was skipped and no change of the operation takes effect. Fix the failing field and send the operation again.`);try{return this._runMutation(t,o,n)}catch(e){throw n.failedMutationField=i,e}};_runMutation=(t,i,o)=>{let n=p(t,o.manifest);if(!n)throw new e(`The schema declares the mutation "${t}", but the configurator has no implementation for it. This is a fault in the configurator, not in your request. Tell the user this is not available.`);let r=o.state,a=n.implementation(i,r,{manifest:o.manifest,action:this._context.domainContextSelectors.getActionSystem().createContext(r),resolveLocalizable:this._context.domainServicesSelectors.getResolveLocalizable()});if(a.updates.length>0){let i=this._context.domainContextSelectors.getStoreSystem().prepareStateEmission(a.updates,r,"committed");if(!i.validity.valid)throw new e(`The changes of "${t}" were not applied, because the resulting configuration is invalid: ${(e=>{if("uncaught"===e.severity)return`validating it threw: ${T(b(e.error))}`;let t=[...new Set(e.entityViolations.filter(({violation:t})=>t.severity===e.severity).map(({entityId:e})=>e))];return`it has ${e.severity} violations on ${t.join(", ")}.`})(i.validity)} Change the request so the configuration stays valid.`);o.emissions.push(i),o.state=i.state}return a.readResult({previousState:r,state:o.state})};_setup=()=>{let{manifest:t,error:i}=this._context.getAssistantSetup();if(i)return{ready:!1,result:{errors:[new e(i.message,{originalError:i})]}};if(!t)return{ready:!1,result:S};let o=this._selectSchema(t.sdl);return o instanceof e?{ready:!1,result:{errors:[o]}}:{ready:!0,assistant:t,schema:o,lenses:t.lenses?.definitions?this._selectLenses(t.lenses.definitions):void 0,fieldResolver:this._selectFieldResolver(t.fields)}};_run=(t,i,n,a)=>{let l;try{l=r(t)}catch(t){return{errors:[t instanceof e?t:new e(b(t))]}}let c=s(n.schema,l,w);return c.length>0?{errors:c}:o({schema:n.schema,document:l,rootValue:this._rootValue,contextValue:a,variableValues:i.variables,operationName:i.operationName,fieldResolver:n.fieldResolver,typeResolver:this._resolveType})};prepare=async(t,i)=>{let o,n=this._setup();if(!n.ready)return i.map(()=>({result:n.result,emissions:[]}));let r={manifest:n.assistant,state:t,emissions:[],failedMutationField:void 0},a=[];for(let[t,s]of i.entries())if(void 0===o){let i=r.emissions.length;r.failedMutationField=void 0;let l=n.lenses?y(s.document,n.lenses):s.document,c=l instanceof e?{errors:[l]}:await this._run(l,s,n,r);a.push({result:c,emissions:r.emissions.slice(i)}),A(c)&&(o=t)}else a.push({result:M(o),emissions:[]});return a};readSideEffects=e=>{let t=this._context.domainServicesSelectors.getResolveLocalizable();return e.flatMap(({emissions:e})=>e.flatMap(e=>v(e.updates,t)))};_prepareAndCommit=async e=>{let t,i,o,n=this._context.domainContextSelectors.getStoreSystem(),r=await this.prepare(n.stateSlices.committed.value.state,e),a=r.map(({result:e})=>e),s=this.readSideEffects(r),l=r.flatMap(e=>e.emissions);return a.some(A)||0===l.length?{results:a,sideEffects:s,outcome:"none"}:{results:a,sideEffects:s,outcome:n.commitPrepared((t=c(l[0]),i=c(l[l.length-1]),o=l.some(e=>void 0!==e.transformationLog),{kind:"committed",previousState:t.previousState,state:i.state,updates:l.flatMap(e=>e.updates),validity:i.validity,transformationLog:o?l.flatMap(e=>e.transformationLog??[]):void 0}))}};execute=async e=>{if(!this._context.domainContextSelectors.getStoreSystem().isInitialized)return{results:e.map(()=>_),committed:!1,sideEffects:[]};let t=await this._prepareAndCommit(e),{results:i,sideEffects:o,outcome:n}="conflict"===t.outcome?await this._prepareAndCommit(e):t;return"committed"===n?{results:i,committed:!0,sideEffects:o}:"held"===n?{results:i,committed:!1,message:"The changes wait for the user's approval and are not applied yet. Do not send them again; the next `[changes]` block lists them once approved.",sideEffects:o}:"conflict"===n?{results:i,committed:!1,message:"The changes were not committed, because the configuration changed while they were being applied. The results describe a state that was discarded. Query the current configuration and send the operations again if they still make sense.",sideEffects:o}:{results:i,committed:!1,sideEffects:o}}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DocumentNode, GraphQLError } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* Makes the lenses an operation document spreads available to it: appends the definition of every
|
|
4
|
+
* lens the document spreads, with the copies that definition spreads in turn, taken from the
|
|
5
|
+
* manifest's lens `definitions`. Appending keeps the positions GraphQL reports for the caller's own
|
|
6
|
+
* text. A document that defines a fragment under the name of a lens, or of a copy of one, is
|
|
7
|
+
* rejected, since the caller would silently read its own selection instead of the lens. A document
|
|
8
|
+
* that does not parse is returned as it is, so GraphQL reports the syntax error; a spread that names
|
|
9
|
+
* no lens is left for GraphQL to report as an unknown fragment.
|
|
10
|
+
*/
|
|
11
|
+
export declare const injectAssistantLenses: (document: string, definitions: DocumentNode) => string | GraphQLError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GraphQLError as e,Kind as n,parse as t,print as a,visit as i}from"graphql";let r=e=>{let n=[];return i(e,{FragmentSpread:e=>{n.push(e.name.value)}}),n};export const injectAssistantLenses=(i,o)=>{let l,s=new Map;for(let e of o.definitions)e.kind===n.FRAGMENT_DEFINITION&&s.set(e.name.value,e);try{l=t(i)}catch{return i}for(let t of l.definitions)if(t.kind===n.FRAGMENT_DEFINITION&&s.has(t.name.value)){let n=t.name.value.split("__")[0];return new e(`A built-in fragment named "${n}" already exists, so "${t.name.value}" cannot be defined. Remove the definition and spread "...${n}", or give your fragment another name.`)}let m=new Map,u=[...r(l)];for(;u.length>0;){let e=u.pop(),n=void 0===e?void 0:s.get(e);n&&!m.has(n.name.value)&&(m.set(n.name.value,n),u.push(...r(n)))}return 0===m.size?i:[i,...[...m.values()].map(a)].join("\n\n")};
|
package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare class LayoutSystem<ENTITIES extends DomainEntity<string>> {
|
|
|
36
36
|
splitSidebar: boolean;
|
|
37
37
|
showSelectionBackButton: boolean;
|
|
38
38
|
shareDisabled: boolean;
|
|
39
|
-
availableLocales: string[];
|
|
39
|
+
availableLocales: readonly string[];
|
|
40
40
|
indicatorSwitch: boolean;
|
|
41
41
|
};
|
|
42
42
|
getSidebarSummaryPage: (state: DomainState<ENTITIES>) => {
|
|
@@ -71,5 +71,5 @@ export declare class LayoutSystem<ENTITIES extends DomainEntity<string>> {
|
|
|
71
71
|
hasSplitSidebar: boolean;
|
|
72
72
|
};
|
|
73
73
|
getToolbarState: (state: DomainState<ENTITIES>) => ToolbarComponentState;
|
|
74
|
-
getNavigationSteps: (state: DomainState<ENTITIES>) => import("#package/domain").NavigationStep[];
|
|
74
|
+
getNavigationSteps: (state: DomainState<ENTITIES>) => readonly import("#package/domain").NavigationStep[];
|
|
75
75
|
}
|
package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as t,match as e}from"ts-pattern";import{SystemState as o,applicationConfigComponent as n,customSummaryPageComponent as a,entityHeaderComponent as i,navigationStepsComponent as r,propertyPageComponent as s,sidebarTabsComponent as l,simpleSummaryComponent as d,toolbarComponent as c}from"#package/domain";import{layoutStateComponent as g}from"./layout-state.js";import{toolbarHelpElementName as u}from"./toolbar-help-element.js";export class LayoutSystem{_context;_toolbarCache=new WeakMap;state;constructor(t){this._context=t,this.state=new o({...this._context,selectors:this._context.domainContextSelectors,componentType:g,getInitialState:()=>({propertyPageStates:{}})})}get _toolbarHelpExists(){return void 0!==this._context.specSelectors.getElementSlots().layoutElements[u]}get _hasAssistant(){return
|
|
1
|
+
import{P as t,match as e}from"ts-pattern";import{SystemState as o,applicationConfigComponent as n,customSummaryPageComponent as a,entityHeaderComponent as i,navigationStepsComponent as r,propertyPageComponent as s,sidebarTabsComponent as l,simpleSummaryComponent as d,toolbarComponent as c}from"#package/domain";import{layoutStateComponent as g}from"./layout-state.js";import{toolbarHelpElementName as u}from"./toolbar-help-element.js";export class LayoutSystem{_context;_toolbarCache=new WeakMap;state;constructor(t){this._context=t,this.state=new o({...this._context,selectors:this._context.domainContextSelectors,componentType:g,getInitialState:()=>({propertyPageStates:{}})})}get _toolbarHelpExists(){return void 0!==this._context.specSelectors.getElementSlots().layoutElements[u]}get _hasAssistant(){return null!=this._context.specSelectors.getAssistant()}initialize=()=>{this.state.initialize()};getCleanUpPropertyPageStateUpdates=(t,e)=>this.state.getUpdates(e=>{if(!e.propertyPageStates[t])return null;let o={...e.propertyPageStates};return delete o[t],{...e,propertyPageStates:o}},e);getLayoutConfig=t=>{let e=this._context.domainContextSelectors.getComponentReader().readFirstRootComponent({componentTypes:[n]},t),o=e?.state.shareDisabled??!1,a=o||(e?.state.shareOwnerLinkDisabled??!1),i=o||(e?.state.shareReadRevisionLinkDisabled??!1);return{layout:e?.state.layout??"universal",ignoreSelectionInSidebar:e?.state.ignoreSelectionInSidebar??!1,miniSidebar:e?.state.miniSidebar??!1,splitSidebar:e?.state.splitSidebar??!1,showSelectionBackButton:e?.state.showSelectionBackButton??!0,shareDisabled:a&&i,availableLocales:e?.state.availableLocales??["en"],indicatorSwitch:e?.state.indicatorSwitch??!0}};getSidebarSummaryPage=t=>{let e=this._context.domainContextSelectors.getNavigationSystem().getActiveNavigationState(t),o=this._context.domainContextSelectors.getComponentReader().readFirstRootComponent({componentTypes:[a,d]},t),n=e===o?.state.summaryNavigationState,i=o?.state.summaryNavigationState;return{page:o,isSummaryActive:n,summaryNavigationState:i}};getEnterSidebarSummaryUpdates=t=>{let{summaryNavigationState:e}=this.getSidebarSummaryPage(t);return e?[this._context.domainContextSelectors.getNavigationSystem().getPushNavigationUpdate(e,t)]:[]};getLeaveSidebarSummaryUpdates=t=>{let e=this._context.domainContextSelectors.getNavigationSystem().getPopNavigationUpdate(t);if(e)return[e];let o=this._context.domainContextSelectors.getNavigationStates().at(0);return o?(this._context.domainServicesSelectors.getLogger().error("There is no navigation state to pop, falling back to the initial navigation state. Check whether the history stack is not broken by some custom navigation logic."),[this._context.domainContextSelectors.getNavigationSystem().getNavigationUpdate(o)]):(this._context.domainServicesSelectors.getLogger().error("There is no navigation state to pop and no initial navigation state to fallback to, this should not happen"),[])};getPushSidebarStackPageUpdates=(t,e,o,n)=>this.state.getUpdates(n=>{let a=n.propertyPageStates[t]??{customState:{},stackPages:[]};return{...n,propertyPageStates:{...n.propertyPageStates,[t]:{...a,stackPages:[...a.stackPages,{props:o,component:e}]}}}},n);getPopSidebarStackPageUpdates=(t,e)=>this.state.getUpdates(e=>{let o=e.propertyPageStates[t]??{customState:{},stackPages:[]};return{...e,propertyPageStates:{...e.propertyPageStates,[t]:{...o,stackPages:o.stackPages.slice(0,-1)}}}},e);getSidebarBackUpdates=t=>{let e=this._context.domainContextSelectors.getNavigationSystem().getHasStackToPop(t),o=this._context.domainContextSelectors.getNavigationSystem().getIsRootSelected(t),{renderedStackedPage:n,summaryPage:a,activePropertyPageId:i}=this.getSidebarContent(t);if(a)return this.getLeaveSidebarSummaryUpdates(t);if(n&&i)return this.getPopSidebarStackPageUpdates(i,t);if(e){let e=this._context.domainContextSelectors.getNavigationSystem().getPopNavigationUpdate(t);return e?[e]:[]}return o?[]:[this._context.domainContextSelectors.getNavigationSystem().getDeselectUpdate()]};getSidebarContent=t=>{let e=this._context.domainContextSelectors.getNavigationSystem().getActiveSelectionState(t),o=this.state.get(t),n=this.getLayoutConfig(t),a=this._context.domainContextSelectors.getComponentReader().readManyComponents({componentTypes:[l],entityIds:[e]},t).some(t=>t.state.tabs.length>0),r=n.miniSidebar&&!a;r&&a&&this._context.domainServicesSelectors.getLogger().warn("Mini sidebar is not active because the layout contains tabs. Only layouts without tabs can have mini sidebar.");let d=this._context.domainContextSelectors.getComponentReader().readManyComponents({componentTypes:[s]},t),{isSummaryActive:c,page:g}=this.getSidebarSummaryPage(t),u=this._context.domainContextSelectors.getComponentReader().readManyComponents({componentTypes:[i]},t),p=this._context.domainContextSelectors.getCompositionProjections().getTree(t).map.get(e);if(!p)throw Error(`Selected entity ${e} not found in composition tree`);let m=this._context.domainContextSelectors.getCompositionProjections().getTree(t).map.get(t.rootEntityId);if(!m)throw Error(`Root entity ${t.rootEntityId} not found in composition tree`);let h=(n.ignoreSelectionInSidebar?[m]:[p,...p.ancestors()]).map(t=>{let e=n.ignoreSelectionInSidebar?d:d.filter(e=>e.componentInstance.entityId===t.id),o=u.filter(e=>e.componentInstance.entityId===t.id);return{id:t.id,propertyPages:e,header:o[0]??null}}),S=h[0]?.id,b=(S?o.propertyPageStates[S]?.stackPages??[]:[]).at(-1)??null,k=this._context.domainContextSelectors.getNavigationSystem().getHasStackToPop(t),x=this._context.domainContextSelectors.getNavigationSystem().getIsRootSelected(t),y=c&&k||k||!!b||!x&&n.showSelectionBackButton&&!n.ignoreSelectionInSidebar;return c?{summaryPage:g,propertyPages:[],isBackAvailable:y,hasMiniSidebar:r,hasSplitSidebar:n.splitSidebar}:{summaryPage:null,propertyPages:h,renderedStackedPage:b,activePropertyPageId:S,isBackAvailable:y,hasMiniSidebar:r,hasSplitSidebar:n.splitSidebar}};getToolbarState=o=>{let n=this._toolbarHelpExists,a=this._hasAssistant,i=this._toolbarCache.get(o);if(i&&i.toolbarHelpExists===n&&i.hasAssistant===a)return i.result;let r=this._context.domainContextSelectors.getExpressionContext(),s=this._context.domainContextSelectors.getNavigationSystem().getActiveFullscreenState(o),l="read"===r.mode,d=this._context.domainContextSelectors.getComponentReader().readFirstRootComponent({componentTypes:[c]},o),g=this._context.domainContextSelectors.getDimensionSystem().getDimensionConfig(o),u=this.getLayoutConfig(o),p="read"===this._context.domainContextSelectors.getExpressionContext().mode,m=u.availableLocales.length>1,h=!p&&!u.shareDisabled,S=u.indicatorSwitch,b=g.availableDimensions.length>1||S,k=a?[{kind:"toolbarButtonGroup",children:[{kind:"assistantToolbarButton"}]}]:[],x=e(d).returnType().with(t.nonNullable,t=>t.state).with(t.nullish,()=>e([s,l]).returnType().with([!1,!1],()=>({desktop:[{kind:"toolbarButtonGroup",children:[{kind:"enterFullscreenToolbarButton"}]},{kind:"toolbarButtonGroup",children:[{kind:"resetCameraToolbarButton"}]},...m?[{kind:"toolbarButtonGroup",children:[{kind:"languageToolbarButton"}]}]:[],...h||b?[{kind:"toolbarButtonGroup",children:[...h?[{kind:"shareToolbarButton"}]:[],...b?[{kind:"measurementsToolbarButton"}]:[],...n?[{kind:"helpToolbarButton"}]:[]]}]:[],{kind:"toolbarButtonGroup",children:[{kind:"undoToolbarButton"},{kind:"redoToolbarButton"}]},...k],mobile:[{kind:"toolbarButtonGroup",children:[{kind:"undoToolbarButton"},{kind:"redoToolbarButton"}]},{kind:"toolbarButtonGroup",children:[{kind:"resetCameraToolbarButton"}]},{kind:"toolbarButtonGroup",children:[{kind:"enterFullscreenToolbarButton"}]},...k],mobileMenu:[...h?[{kind:"shareMenuAction"}]:[],...b?[{kind:"measurementsMenuAction"}]:[],...m?[{kind:"languageMenuAction"}]:[],...n?[{kind:"helpMenuAction"}]:[]]})).with([!0,!1],()=>({desktop:[{kind:"toolbarButtonGroup",children:[{kind:"exitFullscreenToolbarButton"}]}],mobile:[{kind:"toolbarButtonGroup",children:[{kind:"exitFullscreenToolbarButton"}]}],mobileMenu:[]})).with([!1,!0],()=>({desktop:[{kind:"toolbarButtonGroup",children:[{kind:"enterFullscreenToolbarButton"}]},{kind:"toolbarButtonGroup",children:[{kind:"resetCameraToolbarButton"}]},...m?[{kind:"toolbarButtonGroup",children:[{kind:"languageToolbarButton"}]}]:[],...b?[{kind:"toolbarButtonGroup",children:[...b?[{kind:"measurementsToolbarButton"}]:[]]}]:[],...n?[{kind:"helpToolbarButton"}]:[],...k],mobile:[{kind:"toolbarButtonGroup",children:[{kind:"resetCameraToolbarButton"}]},{kind:"toolbarButtonGroup",children:[{kind:"enterFullscreenToolbarButton"}]},...k],mobileMenu:[...b?[{kind:"measurementsMenuAction"}]:[],...m?[{kind:"languageMenuAction"}]:[],...n?[{kind:"helpMenuAction"}]:[]]})).with([!0,!0],()=>({desktop:[{kind:"toolbarButtonGroup",children:[{kind:"exitFullscreenToolbarButton"}]}],mobile:[{kind:"toolbarButtonGroup",children:[{kind:"exitFullscreenToolbarButton"}]}],mobileMenu:[]})).exhaustive()).exhaustive();return this._toolbarCache.set(o,{toolbarHelpExists:n,hasAssistant:a,result:x}),x};getNavigationSteps=t=>{let e=this._context.domainContextSelectors.getComponentReader().readFirstRootComponent({componentTypes:[r]},t);return e?.state.steps??[]}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type $DomainEntity, type ConfiguratorBuilder, type CreateCustomPhoenixEntityElement, type CreateCustomPhoenixLayoutElement, type CreateGetThemeHandler, type CreateGetWebComponentOptionsHandler, type CreatePhoenixHandler, type DomainEntity, type IsCreateRecipeUpdate, type IsReplaceRecipeUpdate, type TransformerBuilder, type TransformerFactory, type UpdateFactory, getIdSequence } from '#package/domain';
|
|
2
|
-
import { type CreateCollectFrontendDataHandler, type CreateFilterPublishedChunksHandler, type CreateNotAuthenticatedPage, type IsAngleDimensionUpdate, type IsAttributeSelectionUpdate, type IsAttributeSwitchUpdate, type IsDeleteEntityUpdate, type IsDistanceDimensionUpdate, type IsGenericDimensionUpdate, type IsSwatchSelectionUpdate, type IsTextValueUpdate, type UseAccessService, type UseActiveNavigationState, type UseActiveToolState, type UseActiveViewState, type UseAnalyticsService, type UseAngleDimension, type UseAttributeSelection, type UseAttributeSwitch, type UseAuthenticatedClient, type UseAuthorizedClient, type UseBackendData, type UseChildEntitySelection, type UseComponent, type UseComponents, type UseComposition, type UseConfigurationId, type UseControlViolations, type UseCookRecipes, type UseCookReplaceRecipes, type UseCookedRecipes, type UseCookedReplaceRecipes, type UseCreateAuthorizedClient, type UseDeleteEntity, type UseDeletedEntity, type UseDeselect, type UseDistanceDimension, type UseDistanceDimensionSelection, type UseDomainApplicationContext, type UseDomainApplicationProps, type UseDomainContext, type UseDomainEntityState, type UseEntityPrice, type UseEntitySelector, type UseFinalizeViolations, type UseFirstComponent, type UseFirstRootComponent, type UseFrontendData, type UseGenericDimension, type UseGroupedRecipeOptions, type UseHoveredDomainEntityId, type UseHoveredEntity, type UseHoveredEntityId, type UseIntegrationService, type UseIntegrationState, type UseIsFullscreenActive, type UseLoadedData, type UseLoadingState, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePublishedData, type UsePushNavigate, type UseRecipeEmbeddedState, type UseReplaceEntityRecipeOptions, type UseRootComponents, type UseRootEntityId, type UseRootEntityPrice, type UseRootEntitySelector, type UseRootEntityState, type UseSelectEntity, type UseSelectParent, type UseSelectedDomainEntityId, type UseSelectedEntity, type UseSelectedEntityId, type UseSession, type UseSessionRole, type UseSessionService, type UseSlice, type UseState, type UseStateValidity, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTextValue, type UseUpdateControl, type UseUpdatedControl, useLoadingStateValue } from '#package/react-sdk';
|
|
2
|
+
import { type CreateCollectFrontendDataHandler, type CreateFilterPublishedChunksHandler, type CreateNotAuthenticatedPage, type IsAngleDimensionUpdate, type IsAttributeSelectionUpdate, type IsAttributeSwitchUpdate, type IsDeleteEntityUpdate, type IsDistanceDimensionUpdate, type IsGenericDimensionUpdate, type IsSwatchSelectionUpdate, type IsTextValueUpdate, type UseAccessService, type UseActiveNavigationState, type UseActiveToolState, type UseActiveViewState, type UseAnalyticsService, type UseAngleDimension, type UseAttributeSelection, type UseAttributeSwitch, type UseAuthenticatedClient, type UseAuthorizedClient, type UseBackendData, type UseChildEntitySelection, type UseComponent, type UseComponents, type UseComposition, type UseConfigurationId, type UseConfiguratorMessages, type UseControlViolations, type UseCookRecipes, type UseCookReplaceRecipes, type UseCookedRecipes, type UseCookedReplaceRecipes, type UseCreateAuthorizedClient, type UseDeleteEntity, type UseDeletedEntity, type UseDeselect, type UseDistanceDimension, type UseDistanceDimensionSelection, type UseDomainApplicationContext, type UseDomainApplicationProps, type UseDomainContext, type UseDomainEntityState, type UseEntityPrice, type UseEntitySelector, type UseFinalizeViolations, type UseFirstComponent, type UseFirstRootComponent, type UseFrontendData, type UseGenericDimension, type UseGroupedRecipeOptions, type UseHoveredDomainEntityId, type UseHoveredEntity, type UseHoveredEntityId, type UseIntegrationService, type UseIntegrationState, type UseIsFullscreenActive, type UseLoadedData, type UseLoadingState, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePublishedData, type UsePushNavigate, type UseRecipeEmbeddedState, type UseReplaceEntityRecipeOptions, type UseRootComponents, type UseRootEntityId, type UseRootEntityPrice, type UseRootEntitySelector, type UseRootEntityState, type UseSelectEntity, type UseSelectParent, type UseSelectedDomainEntityId, type UseSelectedEntity, type UseSelectedEntityId, type UseSession, type UseSessionRole, type UseSessionService, type UseSetFullscreen, type UseSlice, type UseState, type UseStateValidity, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTextValue, type UseUpdateControl, type UseUpdatedControl, useLoadingStateValue } from '#package/react-sdk';
|
|
3
3
|
import { type CreatePhoenixIconSet } from '#package/ui-sdk';
|
|
4
4
|
import { type UseConfiguratorExtensions } from '../application-runtime/index.js';
|
|
5
5
|
import { type CreateOnApplicationStartProvider, type CreateOnBackendDataReadyProvider, type CreateOnConfiguratorReadyProvider, type CreateOnFrontendDataReadyProvider, type CreateOnGoToIndexHandler, type CreateOnPresetLoadedHandler, type CreateOnPublishedDataReadyProvider, type CreateOnRoutingReadyProvider, type CreateOnSessionReadyProvider, type UseConfiguratorRouting, type UsePresetSelection, usePropertyPageStack, usePropertyPageState } from '../configurator-context/index.js';
|
|
@@ -341,6 +341,12 @@ export interface ConfiguratorInterface<ENTITIES extends DomainEntity<string>, AL
|
|
|
341
341
|
* Returns finalize properties based on the validity of the provided emission used for dry running finalize button
|
|
342
342
|
*/
|
|
343
343
|
useFinalizeViolations: UseFinalizeViolations<ENTITIES, $MAP>;
|
|
344
|
+
/**
|
|
345
|
+
* Calls the given function once for every violation, side-effect hint and validation error: the violations of a
|
|
346
|
+
* rejected change, the hints of a committed change and an error thrown while a change was validated, with the
|
|
347
|
+
* text resolved
|
|
348
|
+
*/
|
|
349
|
+
useConfiguratorMessages: UseConfiguratorMessages<ENTITIES, $MAP>;
|
|
344
350
|
/**
|
|
345
351
|
* Returns component based on a filter specified
|
|
346
352
|
*/
|
|
@@ -466,6 +472,10 @@ export interface ConfiguratorInterface<ENTITIES extends DomainEntity<string>, AL
|
|
|
466
472
|
* Get the currently active fullscreen state
|
|
467
473
|
*/
|
|
468
474
|
useIsFullscreenActive: UseIsFullscreenActive;
|
|
475
|
+
/**
|
|
476
|
+
* Turn the fullscreen state on or off. The state is a flag the layout reads with `useIsFullscreenActive`
|
|
477
|
+
*/
|
|
478
|
+
useSetFullscreen: UseSetFullscreen;
|
|
469
479
|
/**
|
|
470
480
|
* Returns composition tree of the domain
|
|
471
481
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as t,createGetThemeHandler as r,createGetWebComponentOptionsHandler as o,createPhoenixHandler as i,createTransformer as s,createTransformerBuilder as a,createUpdateFactory as n,getIdSequence as m,isCreateEntityUpdate as p,isReplaceEntityUpdate as u}from"#package/domain";import{createCollectFrontendDataHandler as d,createFilterPublishedChunksHandler as c,createNotAuthenticatedPage as f,isAngleDimensionUpdate as g,isAttributeSelectionUpdate as j,isAttributeSwitchUpdate as l,isDeleteEntityUpdate as x,isDistanceDimensionUpdate as y,isGenericDimensionUpdate as k,isSwatchSelectionUpdate as h,isTextValueUpdate as S,useAccessService as E,useActiveNavigationState as I,useActiveToolState as q,useActiveViewState as A,useAnalyticsService as B,useAngleDimension as C,useAttributeSelection as P,useAttributeSwitch as R,useAuthenticatedClient as U,useAuthorizedClient as b,useBackendData as v,useChildEntitySelection as w,useCommittedSlice as z,useCommittedState as D,useComponent as F,useComponents as G,useComposition as H,useConfigurationId as J,
|
|
1
|
+
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as t,createGetThemeHandler as r,createGetWebComponentOptionsHandler as o,createPhoenixHandler as i,createTransformer as s,createTransformerBuilder as a,createUpdateFactory as n,getIdSequence as m,isCreateEntityUpdate as p,isReplaceEntityUpdate as u}from"#package/domain";import{createCollectFrontendDataHandler as d,createFilterPublishedChunksHandler as c,createNotAuthenticatedPage as f,isAngleDimensionUpdate as g,isAttributeSelectionUpdate as j,isAttributeSwitchUpdate as l,isDeleteEntityUpdate as x,isDistanceDimensionUpdate as y,isGenericDimensionUpdate as k,isSwatchSelectionUpdate as h,isTextValueUpdate as S,useAccessService as E,useActiveNavigationState as I,useActiveToolState as q,useActiveViewState as A,useAnalyticsService as B,useAngleDimension as C,useAttributeSelection as P,useAttributeSwitch as R,useAuthenticatedClient as U,useAuthorizedClient as b,useBackendData as v,useChildEntitySelection as w,useCommittedSlice as z,useCommittedState as D,useComponent as F,useComponents as G,useComposition as H,useConfigurationId as J,useConfiguratorMessages as K,useControlViolations as L,useCookRecipes as M,useCookReplaceRecipes as N,useCookedRecipes as O,useCookedReplaceRecipes as Q,useCreateAuthorizedClient as T,useDeleteEntity as V,useDeletedEntity as W,useDeselect as X,useDistanceDimension as Y,useDistanceDimensionSelection as Z,useDomain as $,useDomainApplication as _,useDomainApplicationProps as ee,useDomainEntityRenderedState as et,useDomainEntityState as er,useEntityPrice as eo,useEntitySelector as ei,useFinalizeViolations as es,useFirstComponent as ea,useFirstRenderedComponent as en,useFirstRootComponent as em,useFirstRootRenderedComponent as ep,useFrontendData as eu,useGenericDimension as ed,useGroupedRecipeOptions as ec,useHoveredDomainEntityId as ef,useHoveredEntity as eg,useHoveredEntityId as ej,useIntegrationService as el,useIntegrationState as ex,useIsFullscreenActive as ey,useLoadedData as ek,useLoadingState as eh,useLoadingStateValue as eS,useMapViolationHints as eE,useNavigate as eI,usePopNavigate as eq,usePresetEmbeddedState as eA,usePublishedData as eB,usePushNavigate as eC,useRecipeEmbeddedState as eP,useRenderedComponent as eR,useRenderedComponents as eU,useRenderedEntitySelector as eb,useRenderedRootEntitySelector as ev,useRenderedSelector as ew,useRenderedSelector$ as ez,useRenderedSlice as eD,useRenderedState as eF,useReplaceEntityRecipeOptions as eG,useRootComponents as eH,useRootEntityId as eJ,useRootEntityPrice as eK,useRootEntityRenderedId as eL,useRootEntityRenderedState as eM,useRootEntitySelector as eN,useRootEntityState as eO,useRootRenderedComponents as eQ,useSelectEntity as eT,useSelectParent as eV,useSelectedDomainEntityId as eW,useSelectedEntity as eX,useSelectedEntityId as eY,useSession as eZ,useSessionRole as e$,useSessionService as e_,useSetFullscreen as e0,useStateValidity as e1,useStoreSelector as e2,useStoreSelector$ as e3,useSwatchSelection as e4,useTextValue as e5,useUpdateControl as e6,useUpdatedControl as e7}from"#package/react-sdk";import{createPhoenixIconSet as e8}from"#package/ui-sdk";import{useConfigurator as e9}from"../application-runtime/index.js";import{createOnApplicationStartProvider as te,createOnBackendDataReadyProvider as tt,createOnConfiguratorReadyProvider as tr,createOnFrontendDataReadyProvider as to,createOnGoToIndexHandler as ti,createOnPresetLoadedHandler as ts,createOnPublishedDataReadyProvider as ta,createOnRoutingReadyProvider as tn,createOnSessionReadyProvider as tm,useConfiguratorRouting as tp,usePresetSelection as tu,usePropertyPageStack as td,usePropertyPageState as tc}from"../configurator-context/index.js";import{createGetTextureProcessingMapHandler as tf}from"../scene/index.js";import{useUpdateEntityObjectSelection as tg}from"../scene/scene-entity/drag-and-drop/use-updated-selection.js";import{createAppLoader as tj,createCanvasLoader as tl,createLayoutAdminUi as tx,createLayoutCustomOwnerUi as ty,createLayoutCustomReadUi as tk,createLayoutDialog as th,createLayoutFooter as tS,createLayoutToolbarDesktop as tE,createLayoutToolbarDesktopFullScreen as tI,createLayoutToolbarReadDesktop as tq,createLayoutToolbarReadDesktopFullScreen as tA,createLayoutUserUi as tB,createToolbarHelp as tC}from"../ui/index.js";import{useGenerateShareLink as tP}from"../ui/phoenix-layout-elements/share/use-share.js";import{createPresetDeviceNotSupported as tR,createPresetPageAction as tU,createPresetUi as tb}from"../ui/preset-layout/PresetUi.js";export const createConfiguratorInterface=tv=>({updates:n(),getIdSequence:m,createGetWebComponentOptionsHandler:o,createGetThemeHandler:r,createPhoenixHandler:i,createCustomPhoenixEntityElement:e,createCustomPhoenixLayoutElement:t,createPhoenixIconSet:e8,createGetTextureProcessingMapHandler:tf,createCollectFrontendDataHandler:d,createFilterPublishedChunksHandler:c,createOnGoToIndexHandler:ti,createOnApplicationStartProvider:te,createOnSessionReadyProvider:tm,createOnPublishedDataReadyProvider:ta,createOnFrontendDataReadyProvider:to,createOnBackendDataReadyProvider:tt,createOnRoutingReadyProvider:tn,createOnConfiguratorReadyProvider:tr,createOnPresetLoadedHandler:ts,createPresetUi:tb,createPresetPageAction:tU,createPresetDeviceNotSupported:tR,createLayoutFooter:tS,createAppLoader:tj,createCanvasLoader:tl,createLayoutDialog:th,createLayoutToolbarDesktop:tE,createLayoutToolbarDesktopFullScreen:tI,createLayoutToolbarReadDesktop:tq,createLayoutToolbarReadDesktopFullScreen:tA,createLayoutCustomOwnerUi:ty,createLayoutCustomReadUi:tk,createLayoutAdminUi:tx,createLayoutUserUi:tB,createToolbarHelp:tC,createNotAuthenticatedPage:f,createTransformer:s,transformerBuilder:a(),useAnalytics:B,useAuthenticatedClient:U,useAuthorizedClient:b,useCreateAuthorizedClient:T,useAccessService:E,useConfigurationId:J,useSession:eZ,useSessionRole:e$,useSessionService:e_,useDomain:$,useDomainApplication:_,useConfigurator:e9,useConfiguratorRouting:tp,usePresetSelection:tu,usePublishedData:eB,useFrontendData:eu,useBackendData:v,useDomainApplicationProps:ee,useLoadedData:ek,useIntegrationService:el,useIntegrationState:ex,usePresetEmbeddedState:eA,useRecipeEmbeddedState:eP,useCommittedSlice:z,useRenderedSlice:eD,useCommittedState:D,useRenderedState:eF,useStoreSelector:e2,useRenderedSelector:ew,useStoreSelector$:e3,useRenderedSelector$:ez,useEntitySelector:ei,useRenderedEntitySelector:eb,useRootEntitySelector:eN,useRenderedRootEntitySelector:ev,useStateValidity:e1,useMapViolationHints:eE,useNavigate:eI,usePopNavigate:eq,usePushNavigate:eC,useControlViolations:L,useFinalizeViolations:es,useConfiguratorMessages:K,useComponent:F,useRenderedComponent:eR,useComponents:G,useRenderedComponents:eU,useFirstComponent:ea,useFirstRenderedComponent:en,useRootComponents:eH,useRootRenderedComponents:eQ,useFirstRootComponent:em,useFirstRootRenderedComponent:ep,useEntityState:er,useEntityRenderedState:et,useRootEntityState:eO,useRootEntityRenderedState:eM,useRootEntityId:eJ,useRootEntityRenderedId:eL,useEntityPrice:eo,useRootEntityPrice:eK,useSelectedEntity:eX,useSelectedEntityId:eY,useSelectedDomainEntityId:eW,useSelectEntity:eT,useDeselect:X,useSelectParent:eV,useHoveredEntity:eg,useHoveredEntityId:ej,useHoveredDomainEntityId:ef,useActiveNavigationState:I,useActiveViewState:A,useActiveToolState:q,useIsFullscreenActive:ey,useSetFullscreen:e0,useComposition:H,useUpdateControl:e6,useUpdatedControl:e7,useCookRecipes:M,useCookedRecipes:O,useCookReplaceRecipes:N,useCookedReplaceRecipes:Q,useDeleteEntity:V,useDeletedEntity:W,useSwatchSelection:e4,useTextValue:e5,useAttributeSelection:P,useAttributeSwitch:R,useDistanceDimension:Y,useDistanceDimensionSelection:Z,useGenericDimension:ed,useAngleDimension:C,useChildEntitySelection:w,useGroupedRecipeOptions:ec,useReplaceEntityRecipeOptions:eG,useUpdateEntityObjectSelection:tg,useGenerateShareLink:tP,useLoadingState:eh,useLoadingStateValue:eS,usePropertyPageStack:td,usePropertyPageState:tc,isCreateEntityUpdate:p,isReplaceEntityUpdate:u,isDeleteEntityUpdate:x,isAngleDimensionUpdate:g,isDistanceDimensionUpdate:y,isGenericDimensionUpdate:k,isAttributeSelectionUpdate:j,isAttributeSwitchUpdate:l,isTextValueUpdate:S,isSwatchSelectionUpdate:h});
|
|
@@ -10,6 +10,7 @@ declare const GoToProductsClicked: () => import("#package/domain").UserActionEve
|
|
|
10
10
|
declare const ExpandedViewClosed: () => import("#package/domain").UserActionEvent;
|
|
11
11
|
declare const ProductSelected: (productType: string, productName: string) => import("#package/domain").UserActionEvent;
|
|
12
12
|
declare const SelectionHotspotClicked: (id: string) => import("#package/domain").UserActionEvent;
|
|
13
|
+
declare const AssistantEntityLinkClicked: (id: string) => import("#package/domain").UserActionEvent;
|
|
13
14
|
declare const RedoButtonClicked: () => import("#package/domain").UserActionEvent;
|
|
14
15
|
declare const UndoButtonClicked: () => import("#package/domain").UserActionEvent;
|
|
15
16
|
declare const GlobalDimensionsButtonClicked: (dimensionUnit: string) => import("#package/domain").UserActionEvent;
|
|
@@ -31,6 +32,7 @@ export declare const FrontendAnalyticsFactory: {
|
|
|
31
32
|
GoToProductsClicked: typeof GoToProductsClicked;
|
|
32
33
|
ProductSelected: typeof ProductSelected;
|
|
33
34
|
SelectionHotspotClicked: typeof SelectionHotspotClicked;
|
|
35
|
+
AssistantEntityLinkClicked: typeof AssistantEntityLinkClicked;
|
|
34
36
|
RedoButtonClicked: typeof RedoButtonClicked;
|
|
35
37
|
UndoButtonClicked: typeof UndoButtonClicked;
|
|
36
38
|
GlobalDimensionsButtonClicked: typeof GlobalDimensionsButtonClicked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AnalyticsEventFactory as e,domainEntityTypeFromId as t,isVirtualEntityId as o}from"#package/domain";export const FrontendAnalyticsFactory={CloseConfiguratorClicked:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to close the configurator."}),PreviousStepButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"previousStepButton",action:"click",result:"User clicked on previous step button."}),NextStepButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"nextStepButton",action:"click",result:"User clicked on next step button."}),FinalizeButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"finalizeButton",action:"click",result:"User clicked on finalize button."}),SummaryButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"summaryButton",action:"click",result:"User clicked go to summary button."}),TopNavigationStepClicked:t=>e.UserActionEvent({section:"topNavigation",element:"step",action:"click",result:"User clicked on top navigation step.",data:{step:t}}),HorizontalTabClicked:t=>e.UserActionEvent({section:"topNavigation",element:"horizontalTab",action:"click",result:"User clicked on horizontal tab.",data:{tab:t}}),GoToProductsClicked:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to go to the product page."}),ProductSelected:(t,o)=>e.UserActionEvent({section:"productPage",element:"selectCardButton",action:"click",data:{productType:t,productName:o},result:"User has selected a product."}),SelectionHotspotClicked:t=>e.UserActionEvent({section:"canvas",element:"selectionHotspot",action:"click",result:"User clicked on selection hotspot of an entity.",data:{id:t}}),RedoButtonClicked:()=>e.UserActionEvent({section:"bottomToolbar",element:"redoButton",action:"click",result:"User clicked on redo button."}),UndoButtonClicked:()=>e.UserActionEvent({section:"bottomToolbar",element:"undoButton",action:"click",result:"User clicked on undo button."}),GlobalDimensionsButtonClicked:t=>e.UserActionEvent({section:"bottomToolbar",element:"measurementUnitButton",action:"click",data:{dimensionUnit:t},result:"Global measurement units were changed."}),MeasurementsMenuToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"measurementsMenu",action:"click",result:"User opened the measurements menu."}),MeasurementsMenuClosed:()=>e.UserActionEvent({section:"bottomToolbar",element:"measurementsMenu",action:"click",result:"User closed the measurements menu."}),DimensionIndicatorsToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"dimensionIndicatorsToggle",action:"click",result:"User toggled dimension indicators visibility."}),FullScreenModeToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"fullscreenButton",action:"click",result:"User toggled fullscreen mode."}),HelpDialogOpened:()=>e.UserActionEvent({section:"bottomToolbar",element:"helpButton",action:"click",result:"Help dialog opened."}),HelpDialogClosed:()=>e.UserActionEvent({section:"bottomToolbar",element:"helpDialog",action:"click",result:"Help dialog closed."}),EntityDeleteHotspotClicked:n=>{let i=o(n)?"":t(n);return e.UserActionEvent({section:"canvas",element:"deleteEntityHotspot",action:"click",data:{id:n,type:i},result:"User has deleted an entity."})},ExpandedViewClosed:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to close the expanded view."})};
|
|
1
|
+
import{AnalyticsEventFactory as e,domainEntityTypeFromId as t,isVirtualEntityId as o}from"#package/domain";export const FrontendAnalyticsFactory={CloseConfiguratorClicked:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to close the configurator."}),PreviousStepButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"previousStepButton",action:"click",result:"User clicked on previous step button."}),NextStepButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"nextStepButton",action:"click",result:"User clicked on next step button."}),FinalizeButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"finalizeButton",action:"click",result:"User clicked on finalize button."}),SummaryButtonClicked:()=>e.UserActionEvent({section:"sidebar",element:"summaryButton",action:"click",result:"User clicked go to summary button."}),TopNavigationStepClicked:t=>e.UserActionEvent({section:"topNavigation",element:"step",action:"click",result:"User clicked on top navigation step.",data:{step:t}}),HorizontalTabClicked:t=>e.UserActionEvent({section:"topNavigation",element:"horizontalTab",action:"click",result:"User clicked on horizontal tab.",data:{tab:t}}),GoToProductsClicked:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to go to the product page."}),ProductSelected:(t,o)=>e.UserActionEvent({section:"productPage",element:"selectCardButton",action:"click",data:{productType:t,productName:o},result:"User has selected a product."}),SelectionHotspotClicked:t=>e.UserActionEvent({section:"canvas",element:"selectionHotspot",action:"click",result:"User clicked on selection hotspot of an entity.",data:{id:t}}),AssistantEntityLinkClicked:t=>e.UserActionEvent({section:"chat",element:"entityLink",action:"click",result:"User clicked on a link to an entity in a reply of the assistant.",data:{id:t}}),RedoButtonClicked:()=>e.UserActionEvent({section:"bottomToolbar",element:"redoButton",action:"click",result:"User clicked on redo button."}),UndoButtonClicked:()=>e.UserActionEvent({section:"bottomToolbar",element:"undoButton",action:"click",result:"User clicked on undo button."}),GlobalDimensionsButtonClicked:t=>e.UserActionEvent({section:"bottomToolbar",element:"measurementUnitButton",action:"click",data:{dimensionUnit:t},result:"Global measurement units were changed."}),MeasurementsMenuToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"measurementsMenu",action:"click",result:"User opened the measurements menu."}),MeasurementsMenuClosed:()=>e.UserActionEvent({section:"bottomToolbar",element:"measurementsMenu",action:"click",result:"User closed the measurements menu."}),DimensionIndicatorsToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"dimensionIndicatorsToggle",action:"click",result:"User toggled dimension indicators visibility."}),FullScreenModeToggled:()=>e.UserActionEvent({section:"bottomToolbar",element:"fullscreenButton",action:"click",result:"User toggled fullscreen mode."}),HelpDialogOpened:()=>e.UserActionEvent({section:"bottomToolbar",element:"helpButton",action:"click",result:"Help dialog opened."}),HelpDialogClosed:()=>e.UserActionEvent({section:"bottomToolbar",element:"helpDialog",action:"click",result:"Help dialog closed."}),EntityDeleteHotspotClicked:n=>{let i=o(n)?"":t(n);return e.UserActionEvent({section:"canvas",element:"deleteEntityHotspot",action:"click",data:{id:n,type:i},result:"User has deleted an entity."})},ExpandedViewClosed:()=>e.UserActionEvent({section:"topNavigation",element:"button",action:"click",result:"User requested to close the expanded view."})};
|
|
@@ -5,7 +5,7 @@ export declare const useLayoutSystemConfig: () => {
|
|
|
5
5
|
splitSidebar: boolean;
|
|
6
6
|
showSelectionBackButton: boolean;
|
|
7
7
|
shareDisabled: boolean;
|
|
8
|
-
availableLocales: string[];
|
|
8
|
+
availableLocales: readonly string[];
|
|
9
9
|
indicatorSwitch: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const useEnterSidebarSummary: () => () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in UI of a loaded configuration: the layout the spec's `layout` selects, in owner or
|
|
3
|
+
* read mode. `LoadedConfiguratorDetailPage` renders it when the project registers no layout element
|
|
4
|
+
* named `ConfiguratorLayout`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DefaultConfiguratorLayout: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e,Fragment as t}from"react/jsx-runtime";import{useMemo as a}from"react";import{match as o}from"ts-pattern";import{useAccessService as i}from"#package/react-sdk";import{useLayoutSystemConfig as m}from"../configurator-context/index.js";import{Layout as n,LayoutCustomOwnerUi as u,LayoutCustomReadUi as s,LayoutDialog as d,Legacy as w}from"../ui/index.js";export const DefaultConfiguratorLayout=()=>{let{accessInfo:p}=i(),y=m(),{ownerUi:l,readUi:c}=a(()=>o(y.layout).with("simple",()=>({ownerUi:r(w.SimpleOwnerLayout,{}),readUi:r(w.SummaryReadLayout,{})})).with("tabs",()=>({ownerUi:r(w.TabsOwnerLayout,{}),readUi:r(w.SummaryReadLayout,{})})).with("steps",()=>({ownerUi:r(w.StepsOwnerLayout,{}),readUi:r(w.SummaryReadLayout,{})})).with("universal",()=>({ownerUi:r(n,{}),readUi:r(n,{})})).with("custom",()=>({ownerUi:r(u,{}),readUi:r(s,{})})).exhaustive(),[y.layout]);return e(t,{children:[p.viewMode?c:l,"universal"===y.layout&&e(t,{children:[r(w.CommonFinalizePage,{}),r(d,{})]})]})};
|