@salsita-ai/sdk 0.50.0-develop.c1dcc73e88 → 0.50.0-develop.ca72986c39
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 +13 -12
- package/dist/application-spec/core/components/component-filter.d.ts +53 -0
- package/dist/application-spec/core/components/component-filter.js +1 -0
- package/dist/application-spec/core/components/index.d.ts +2 -0
- package/dist/application-spec/core/components/index.js +1 -0
- package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
- package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
- package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/expressions/index.d.ts +2 -0
- package/dist/application-spec/core/expressions/index.js +1 -0
- package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
- package/dist/application-spec/core/expressions/relation-expression-params.js +1 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
- package/dist/application-spec/core/index.d.ts +2 -0
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-value.d.ts +1 -1
- package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
- package/dist/application-spec/enhanced-json/index.d.ts +4 -0
- package/dist/application-spec/enhanced-json/index.js +1 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
- package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +4 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +9 -4
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +41 -40
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -2
- package/dist/application-spec/generate-application/code/templates/globals.js +3 -3
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -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/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +9 -3
- 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 +15 -7
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +6 -2
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +8 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +5 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
- package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
- package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +1 -28
- package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/client/phoenix-api.d.ts +463 -0
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +32 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +20 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +22 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +2 -0
- package/dist/configurator/common/frontend-analytics.js +1 -1
- package/dist/configurator/common/index.d.ts +2 -0
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.d.ts +31 -0
- package/dist/configurator/common/use-finalize-action.js +1 -0
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +2 -2
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +7 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
- package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
- package/dist/configurator/ui/configurator-layout/{universal → slots/desktop-sidebar}/DesktopSidebar.d.ts +23 -14
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +2 -2
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
- package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
- package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/planes.mdx +1 -1
- package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
- package/dist/docs/index.json +42 -1
- package/dist/docs/layouts/custom-layout.mdx +2125 -0
- package/dist/docs/layouts/header/fixed.mdx +2 -2
- package/dist/docs/layouts/header/floating.mdx +2 -2
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
- package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/transformers.mdx +4 -0
- package/dist/docs/phoenix/application-states.mdx +9 -7
- package/dist/docs/phoenix/configurator-interface.mdx +136 -18
- package/dist/docs/phoenix/deployments.mdx +2 -6
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -0
- package/dist/docs/phoenix/layout-slots.mdx +116 -0
- package/dist/docs/phoenix/localization.mdx +4 -4
- package/dist/docs/phoenix/migration-guide.mdx +19 -8
- package/dist/docs/phoenix/phoenix-cli.mdx +44 -8
- package/dist/docs/phoenix/project-structure.mdx +23 -7
- 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 +21 -4
- package/dist/domain/application/application-config.d.ts +3 -1
- package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +9 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +5 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/create-assistant-execution-schema.d.ts +32 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +6 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/configurator-builder.d.ts +5 -2
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
- package/dist/domain/core/invariant/violation.d.ts +50 -2
- package/dist/domain/core/invariant/violation.js +1 -1
- package/dist/domain/core/model/model.d.ts +1 -1
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +28 -1
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
- package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
- package/dist/domain/domain-runtime/errors/index.js +1 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/index.d.ts +1 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +8 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
- package/dist/domain/extensions/attribute-switch.d.ts +1 -1
- package/dist/domain/extensions/attribute-switch.js +1 -1
- package/dist/domain/extensions/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/client-side-image.d.ts +2 -2
- package/dist/domain/extensions/client-side-image.js +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.js +1 -1
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
- package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/navigation-steps.d.ts +2 -2
- package/dist/domain/extensions/offset-indicator.js +1 -1
- package/dist/domain/extensions/rotation-handle.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.js +1 -1
- package/dist/domain/extensions/scene-entity-animation.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
- package/dist/domain/mocks/create-test-application-config.js +1 -0
- package/dist/domain/mocks/index.d.ts +1 -0
- package/dist/domain/mocks/index.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +2 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
- package/dist/domain/system-components/common/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +21 -3
- package/dist/domain/system-components/common/recipes.js +1 -1
- package/dist/domain/system-components/constraint.d.ts +10 -23
- package/dist/domain/system-components/drag-handle.d.ts +1 -1
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/globals/index.d.ts +2 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +81 -68
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/deps/deps.d.ts +52 -0
- package/dist/phoenix/commands/deps/deps.js +3 -0
- package/dist/phoenix/commands/deps/index.d.ts +1 -0
- package/dist/phoenix/commands/deps/index.js +1 -0
- package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -0
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.js +1 -1
- 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 +17 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +30 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
- package/dist/react-sdk/domain-context/index.d.ts +2 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +33 -29
- package/schema/domain-spec.json +1115 -209
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.js +0 -16
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e}from"react";import{useConfigurator as r}from"../application-runtime/index.js";export const useResetCamera=()=>{let{cameraControlSystem:t}=r();return e(()=>{t.resetCamera()},[t])};
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The built-in UI of a loaded configuration: the layout the spec's `layout` selects, in owner or
|
|
3
|
-
* read mode. `
|
|
4
|
-
*
|
|
3
|
+
* read mode. `defaultConfiguratorElements` registers it as `ConfiguratorLayout`, and
|
|
4
|
+
* `LoadedConfiguratorDetailPage` renders it when no layout element has that name.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DefaultConfiguratorLayout: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as r}from"react/jsx-runtime";import e from"mui-modal-provider";import{memo as i,useCallback as n,useEffect as t}from"react";import{InvalidAccessKeyError as a}from"#package/client";import{BuiltInLoadingPhase as d,CommonAnalyticsFactory as s,DomainLifecycleBoundary as l,LoadedDataProvider as
|
|
1
|
+
import{jsx as o,jsxs as r}from"react/jsx-runtime";import e from"mui-modal-provider";import{memo as i,useCallback as n,useEffect as t}from"react";import{InvalidAccessKeyError as a}from"#package/client";import{BuiltInLoadingPhase as d,CommonAnalyticsFactory as s,DomainLifecycleBoundary as l,LoadedDataProvider as c,PhoenixLayoutElement as u,useAccessService as f,useAnalyticsService as m,useAuthorizedClient as g,useConfiguratorDomainFactory as p,useConfiguratorLoadStatus as v,useConfiguratorRawLoadedData as I,useExpectPhase as h,useLoadedDataActions as j,useLoadingError as C,useLoadingPhase as k,useLogger as w,useRoutingService as y,useSpecAssistant as b}from"#package/react-sdk";import{useConfigurator as x}from"../application-runtime/index.js";import{IntegrationSubscription as E,OnConfiguratorReadyProvider as D,ViewportStateSync as L}from"../configurator-context/index.js";import{ConfiguratorNotFoundPage as M}from"./ConfiguratorNotFoundPage.js";import{DefaultConfiguratorLayout as F}from"./DefaultConfiguratorLayout.js";import{ConfiguratorLayoutName as S}from"./configurator-layout-name.js";import{DevContextFallback as T}from"./error-boundaries/DevContextFallback.js";import{DevLoadingFallback as A}from"./error-boundaries/DevLoadingFallback.js";import{LoadingErrorBoundary as P}from"./error-boundaries/LoadingErrorBoundary.js";import{useLoad as R}from"./use-load.js";let V=i(()=>((()=>{let{assistantSystem:o}=x(),r=null!=b();t(()=>{if(r)return o.activate()},[o,r])})(),o(e,{children:o(D,{children:o(u,{name:S,defaultSlot:F})})})));export const LoadedConfiguratorDetailPage=()=>{h(d.SceneAssets);let{configurationId:e,accessInfo:i}=f(),t=g(),u=y(),b=w(),x=m(),{startConfiguratorLoad:D,completeConfiguratorLoad:F,failConfiguratorLoad:S,resetConfiguratorLoad:q}=j(),{isLoading:B,isError:G}=v(),N=I(),z=p(),H=n(()=>i.viewMode&&void 0!==i.revisionId?t.getConfigurationRevision(e,i.revisionId):t.getConfiguration(e),[i.revisionId,i.viewMode,t,e]),J=n(()=>{D()},[D]),K=n(o=>{F({initialRevisionId:o.revisionId,initialEntities:o.data,modelVersion:o.modelVersion,rootEntityType:o.rootEntityType,schemaIdentity:z}),x.push(s.ConfigurationLoaded(o.configurationId,o.revisionId,i.viewMode?"read":"owner")),b.appendToGlobalContext({configurationId:o.configurationId,revisionId:o.revisionId,mode:i.viewMode}),b.info("Configuration loaded.")},[i.viewMode,x,F,z,b]),O=n(o=>{if(S(o),o instanceof a)return void u.rejectAccessToken(e,i.raw);let r=o instanceof Error?o:Error("Configuration loading failed with an unknown error.",{cause:o});b.error("Configuration loading failed because the API request did not succeed. Verify the configuration ID and access token.",{configurationId:e},r)},[i.raw,e,S,b,u]),Q=n(()=>{q()},[q]);return(R({key:[t,e,i.revisionId,i.viewMode],load:H,onStart:J,onSuccess:K,onError:O,onCleanup:Q}),k({id:d.DataFetch,label:"Loading configuration…"},B),C(G),G)?o(M,{}):null===N?null:o(c,{value:N,children:o(P,{fallbackRender:r=>o(A,{...r}),children:o(l,{type:"configurator",children:o(P,{FallbackComponent:T,children:r(E,{children:[o(L,{}),o(V,{})]})})})})})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ConfiguratorLayoutName="ConfiguratorLayout";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ElementRegistration } from '#package/domain';
|
|
2
|
+
/**
|
|
3
|
+
* The configurator's default element registrations, passed to `withDefaultElements`. A project
|
|
4
|
+
* element registered under the same name replaces one: `ConfiguratorLayout` is the built-in UI of a
|
|
5
|
+
* loaded configuration.
|
|
6
|
+
*/
|
|
7
|
+
export declare const defaultConfiguratorElements: readonly ElementRegistration[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCustomPhoenixLayoutElement as o}from"#package/domain";import{DefaultConfiguratorLayout as r}from"./DefaultConfiguratorLayout.js";import{ConfiguratorLayoutName as t}from"./configurator-layout-name.js";export const defaultConfiguratorElements=[o(t,r)];
|
|
@@ -4,6 +4,7 @@ export { RootPage } from './RootPage.js';
|
|
|
4
4
|
export { NewConfiguratorPage } from './NewConfiguratorPage.js';
|
|
5
5
|
export { ConfiguratorRootErrorPage } from './ConfiguratorErrorPage.js';
|
|
6
6
|
export { ConfiguratorNotFoundPage } from './ConfiguratorNotFoundPage.js';
|
|
7
|
+
export { defaultConfiguratorElements } from './default-configurator-elements.js';
|
|
7
8
|
export { DevContextFallback } from './error-boundaries/DevContextFallback.js';
|
|
8
9
|
export { DevLoadingFallback } from './error-boundaries/DevLoadingFallback.js';
|
|
9
10
|
export { GeneralErrorFallback, DevGeneralErrorFallback, ProdGeneralErrorFallback } from './error-boundaries/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ConfiguratorRoot}from"./ConfiguratorRoot.js";export{LoadedConfiguratorDetailPage}from"./LoadedConfiguratorDetailPage.js";export{RootPage}from"./RootPage.js";export{NewConfiguratorPage}from"./NewConfiguratorPage.js";export{ConfiguratorRootErrorPage}from"./ConfiguratorErrorPage.js";export{ConfiguratorNotFoundPage}from"./ConfiguratorNotFoundPage.js";export{DevContextFallback}from"./error-boundaries/DevContextFallback.js";export{DevLoadingFallback}from"./error-boundaries/DevLoadingFallback.js";export{GeneralErrorFallback,DevGeneralErrorFallback,ProdGeneralErrorFallback}from"./error-boundaries/index.js";export{LoadingErrorBoundary}from"./error-boundaries/LoadingErrorBoundary.js";
|
|
1
|
+
export{ConfiguratorRoot}from"./ConfiguratorRoot.js";export{LoadedConfiguratorDetailPage}from"./LoadedConfiguratorDetailPage.js";export{RootPage}from"./RootPage.js";export{NewConfiguratorPage}from"./NewConfiguratorPage.js";export{ConfiguratorRootErrorPage}from"./ConfiguratorErrorPage.js";export{ConfiguratorNotFoundPage}from"./ConfiguratorNotFoundPage.js";export{defaultConfiguratorElements}from"./default-configurator-elements.js";export{DevContextFallback}from"./error-boundaries/DevContextFallback.js";export{DevLoadingFallback}from"./error-boundaries/DevLoadingFallback.js";export{GeneralErrorFallback,DevGeneralErrorFallback,ProdGeneralErrorFallback}from"./error-boundaries/index.js";export{LoadingErrorBoundary}from"./error-boundaries/LoadingErrorBoundary.js";
|
|
@@ -2,7 +2,7 @@ import type { DraggableSurface } from '#package/domain';
|
|
|
2
2
|
import { HotspotDragHandleVariant } from '#package/domain';
|
|
3
3
|
import type { SceneEntitySpecificProps, SceneHtmlOpacityProps, SceneHtmlPositionProps, SceneHtmlVisibilityProps } from '../../scene-html/index.js';
|
|
4
4
|
export interface HotspotDragHandleProps extends SceneHtmlOpacityProps, SceneHtmlVisibilityProps, SceneHtmlPositionProps, SceneEntitySpecificProps {
|
|
5
|
-
readonly surfaces: DraggableSurface[];
|
|
5
|
+
readonly surfaces: readonly DraggableSurface[];
|
|
6
6
|
readonly instanceName: string;
|
|
7
7
|
readonly handleSize?: number;
|
|
8
8
|
readonly variant?: HotspotDragHandleVariant;
|
package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type DraggableSurface } from '#package/domain';
|
|
|
3
3
|
import { type SceneEntitySpecificProps, type SceneHtmlOpacityProps, type SceneHtmlPositionProps, type SceneHtmlVisibilityProps } from '../../scene-html/index.js';
|
|
4
4
|
export declare const useHotspotHovered: () => boolean;
|
|
5
5
|
export interface HotspotDragSceneHandleProps extends SceneHtmlOpacityProps, SceneHtmlVisibilityProps, SceneHtmlPositionProps, SceneEntitySpecificProps {
|
|
6
|
-
readonly surfaces: DraggableSurface[];
|
|
6
|
+
readonly surfaces: readonly DraggableSurface[];
|
|
7
7
|
readonly instanceName: string;
|
|
8
8
|
readonly children: ReactNode;
|
|
9
9
|
readonly handleSize?: number;
|
|
@@ -37,7 +37,7 @@ export interface DimensionIndicatorProps {
|
|
|
37
37
|
readonly labelDirection?: 'auto' | 'ltr' | 'rtl';
|
|
38
38
|
readonly labelFillOpacity?: number;
|
|
39
39
|
readonly labelFontStyle?: 'normal' | 'italic';
|
|
40
|
-
readonly labelFontWeight?: number |
|
|
40
|
+
readonly labelFontWeight?: number | string;
|
|
41
41
|
readonly labelLetterSpacing?: number;
|
|
42
42
|
readonly labelLineHeight?: number;
|
|
43
43
|
readonly labelMaxWidth?: number;
|
package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ interface DimensionIndicatorProps {
|
|
|
76
76
|
/** Font style. See https://protectwise.github.io/troika/troika-three-text/ */
|
|
77
77
|
labelFontStyle?: 'normal' | 'italic';
|
|
78
78
|
/** Font weight. See https://protectwise.github.io/troika/troika-three-text/ */
|
|
79
|
-
labelFontWeight?: number |
|
|
79
|
+
labelFontWeight?: number | string;
|
|
80
80
|
/** Spacing between letters. See https://protectwise.github.io/troika/troika-three-text/ */
|
|
81
81
|
labelLetterSpacing?: number;
|
|
82
82
|
/** Line height as a multiple of the font size. See https://protectwise.github.io/troika/troika-three-text/ */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Size } from '@react-three/fiber';
|
|
2
2
|
import { type Camera, Vector2, Vector3 } from 'three';
|
|
3
|
-
import type { DraggableSurface } from '#package/domain';
|
|
3
|
+
import type { DraggableSurface, RotatableSurface } from '#package/domain';
|
|
4
4
|
/**
|
|
5
5
|
* Converts mouse coordinates to normalized device coordinates
|
|
6
6
|
*/
|
|
@@ -20,7 +20,7 @@ export declare const findSurfaceClosestToPoint: (worldPoint: Vector3, surfaces:
|
|
|
20
20
|
* Projects the cursor ray onto a single specified surface. Returns null if the
|
|
21
21
|
* ray is parallel to or points away from the plane.
|
|
22
22
|
*/
|
|
23
|
-
export declare const projectMouseOntoSurface: (mouse: Vector2, surface: DraggableSurface, camera: Camera) => Vector3 | null;
|
|
23
|
+
export declare const projectMouseOntoSurface: (mouse: Vector2, surface: DraggableSurface | RotatableSurface, camera: Camera) => Vector3 | null;
|
|
24
24
|
/**
|
|
25
25
|
* Among the camera-facing surfaces the cursor ray actually hits, picks the
|
|
26
26
|
* intersection closest to the world origin. Used during multi-surface drag-move
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Object3D } from 'three';
|
|
2
2
|
import { type DomainEntityId, type DraggableSurface } from '#package/domain';
|
|
3
3
|
interface DragHandle {
|
|
4
|
-
surfaces: DraggableSurface[];
|
|
4
|
+
surfaces: readonly DraggableSurface[];
|
|
5
5
|
instanceName: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const useDragObject: (entityId: DomainEntityId<string>, object: Object3D | null, dragHandle: DragHandle | undefined, onUpdate: () => void, onDragStart?: () => void, onDragEnd?: () => void) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import s from"lodash-es/isNumber.js";import{memo as r,useEffect as n,useMemo as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import s from"lodash-es/isNumber.js";import{memo as r,useEffect as n,useMemo as o}from"react";import{Color as i,RepeatWrapping as l}from"three";import{isRemoteMaterialOverrideComponent as c}from"#package/domain";import{useResourceUrl as p}from"#package/react-sdk";import{useCombinedQueries as M,usePhxGltf as m,useResourceQueryFactories as d}from"../../resources/index.js";import{isPhysicalMaterial as h,isStandardMaterial as u,isWithColor as v}from"../../three/with-material.js";import{ReplacedMaterialTransformations as U}from"./ReplacedMaterialTransformer.js";import{ReplacedMaterialTransitions as y}from"./ReplacedMaterialTransition.js";export const applyRemoteMaterialOverride=(e,t,a,r)=>{let n=t=>{let{offsetX:a,offsetY:r,rotation:n,rotationCenterX:o,rotationCenterY:i,repeatX:c,repeatY:p}=e.state,M=s(a)||s(r),m=s(n),d=s(c)||s(p);return M&&t.offset.set(a??0,r??0),m&&(t.rotation=n,t.center.set(o??0,i??0)),d&&(t.repeat.set(c??1,p??1),t.wrapS=l,t.wrapT=l),t},o=(e,t)=>{if(null===e)t(null);else if(e){let s=r[a.findIndex(t=>t===e)];s&&t(n(s))}};if((u(t)||h(t))&&(o(e.state.textureUrl,e=>{t.map=e}),e.state.color&&t.color.set(new i(e.state.color)),o(e.state.roughnessMapUrl,e=>{t.roughnessMap=e}),s(e.state.roughness)&&(t.roughness=e.state.roughness),o(e.state.bumpMapUrl,e=>{t.bumpMap=e}),s(e.state.bumpScale)&&(t.bumpScale=e.state.bumpScale),o(e.state.metalnessMapUrl,e=>{t.metalnessMap=e}),s(e.state.metalness)&&(t.metalness=e.state.metalness),s(e.state.envMapIntensity)&&(t.envMapIntensity=e.state.envMapIntensity),void 0!==e.state.toneMapped&&(t.toneMapped=e.state.toneMapped),void 0!==e.state.emissive&&t.emissive.set(new i(e.state.emissive)),void 0!==e.state.emissiveIntensity&&(t.emissiveIntensity=e.state.emissiveIntensity),o(e.state.alphaMapUrl,e=>{t.alphaMap=e}),void 0!==e.state.transparent&&(t.transparent=e.state.transparent),s(e.state.opacity)&&(t.opacity=e.state.opacity),o(e.state.aoMapUrl,e=>{t.aoMap=e}),s(e.state.aoMapIntensity)&&(t.aoMapIntensity=e.state.aoMapIntensity),o(e.state.displacementMapUrl,e=>{t.displacementMap=e}),s(e.state.displacementScale)&&(t.displacementScale=e.state.displacementScale),o(e.state.lightMapUrl,e=>{t.lightMap=e}),s(e.state.lightMapIntensity)&&(t.lightMapIntensity=e.state.lightMapIntensity),o(e.state.envMapUrl,e=>{t.envMap=e}),s(e.state.envMapIntensity)&&(t.envMapIntensity=e.state.envMapIntensity),s(e.state.blendingMode)&&(t.blending=e.state.blendingMode),o(e.state.normalMapUrl,e=>{t.normalMap=e}),s(e.state.normalScale)&&t.normalScale.set(e.state.normalScale,e.state.normalScale),void 0!==e.state.wireframe&&(t.wireframe=e.state.wireframe)),h(t)){void 0!==e.state.clearcoat&&(t.clearcoat=e.state.clearcoat),void 0!==e.state.clearcoatRoughness&&(t.clearcoatRoughness=e.state.clearcoatRoughness),void 0!==e.state.iridescence&&(t.iridescence=e.state.iridescence),void 0!==e.state.iridescenceIor&&(t.iridescenceIOR=e.state.iridescenceIor),s(e.state.sheen)&&(t.sheen=e.state.sheen),void 0!==e.state.sheenColor&&v(t)&&t.sheenColor.set(new i(e.state.sheenColor)),s(e.state.sheenRoughness)&&(t.sheenRoughness=e.state.sheenRoughness),o(e.state.anisotropyMapUrl,e=>{t.anisotropyMap=e}),s(e.state.anisotropyStrength)&&(t.anisotropy=e.state.anisotropyStrength),s(e.state.anisotropyRotation)&&(t.anisotropyRotation=e.state.anisotropyRotation),s(e.state.ior)&&(t.ior=e.state.ior),s(e.state.reflectivity)&&(t.reflectivity=e.state.reflectivity),s(e.state.transmission)&&(t.transmission=e.state.transmission),s(e.state.thickness)&&(t.thickness=e.state.thickness),s(e.state.attenuationDistance)&&(t.attenuationDistance=e.state.attenuationDistance),void 0!==e.state.attenuationColor&&t.attenuationColor.set(new i(e.state.attenuationColor)),s(e.state.specularIntensity)&&(t.specularIntensity=e.state.specularIntensity),void 0!==e.state.specularColor&&t.specularColor.set(new i(e.state.specularColor)),o(e.state.specularIntensityMapUrl,e=>{t.specularIntensityMap=e}),o(e.state.specularColorMapUrl,e=>{t.specularColorMap=e}),o(e.state.clearcoatNormalMapUrl,e=>{t.clearcoatNormalMap=e}),s(e.state.clearcoatNormalScale)&&t.clearcoatNormalScale.set(e.state.clearcoatNormalScale,e.state.clearcoatNormalScale),o(e.state.clearcoatMapUrl,e=>{t.clearcoatMap=e}),o(e.state.clearcoatRoughnessMapUrl,e=>{t.clearcoatRoughnessMap=e}),o(e.state.iridescenceMapUrl,e=>{t.iridescenceMap=e});let[a,r]=e.state.iridescenceThicknessRange??[];void 0!==a&&void 0!==r&&(t.iridescenceThicknessRange=[a,r]),o(e.state.iridescenceThicknessMapUrl,e=>{t.iridescenceThicknessMap=e}),o(e.state.sheenColorMapUrl,e=>{t.sheenColorMap=e}),o(e.state.sheenRoughnessMapUrl,e=>{t.sheenRoughnessMap=e}),o(e.state.transmissionMapUrl,e=>{t.transmissionMap=e}),o(e.state.thicknessMapUrl,e=>{t.thicknessMap=e})}if(u(t)&&!h(t)){let a=[void 0!==e.state.clearcoat?"clearcoat":"",void 0!==e.state.clearcoatRoughness?"clearcoatRoughness":"",void 0!==e.state.iridescence?"iridescence":"",void 0!==e.state.iridescenceIor?"iridescenceIor":"",void 0!==e.state.sheen?"sheen":"",void 0!==e.state.sheenColor?"sheenColor":"",void 0!==e.state.sheenRoughness?"sheenRoughness":"",void 0!==e.state.anisotropyMapUrl?"anisotropyMapUrl":"",void 0!==e.state.anisotropyStrength?"anisotropyStrength":"",void 0!==e.state.anisotropyRotation?"anisotropyRotation":"",void 0!==e.state.ior?"ior":"",void 0!==e.state.reflectivity?"reflectivity":"",void 0!==e.state.transmission?"transmission":"",void 0!==e.state.thickness?"thickness":"",void 0!==e.state.attenuationDistance?"attenuationDistance":"",void 0!==e.state.attenuationColor?"attenuationColor":"",void 0!==e.state.specularIntensity?"specularIntensity":"",void 0!==e.state.specularColor?"specularColor":"",void 0!==e.state.specularIntensityMapUrl?"specularIntensityMapUrl":"",void 0!==e.state.specularColorMapUrl?"specularColorMapUrl":"",void 0!==e.state.clearcoatNormalMapUrl?"clearcoatNormalMapUrl":"",void 0!==e.state.clearcoatNormalScale?"clearcoatNormalScale":"",void 0!==e.state.clearcoatMapUrl?"clearcoatMapUrl":"",void 0!==e.state.clearcoatRoughnessMapUrl?"clearcoatRoughnessMapUrl":"",void 0!==e.state.iridescenceMapUrl?"iridescenceMapUrl":"",void 0!==e.state.iridescenceThicknessRange?"iridescenceThicknessRange":"",void 0!==e.state.iridescenceThicknessMapUrl?"iridescenceThicknessMapUrl":"",void 0!==e.state.sheenColorMapUrl?"sheenColorMapUrl":"",void 0!==e.state.sheenRoughnessMapUrl?"sheenRoughnessMapUrl":"",void 0!==e.state.transmissionMapUrl?"transmissionMapUrl":"",void 0!==e.state.thicknessMapUrl?"thicknessMapUrl":""].filter(Boolean);a.length>0&&console.warn(`[Phoenix] Material override properties [${a.join(", ")}] were ignored because the target material "${t.name}" is a MeshStandardMaterial, not a MeshPhysicalMaterial. These properties require MeshPhysicalMaterial. Ensure the source material in the override file uses a physical property (e.g. clearcoat) to trigger MeshPhysicalMaterial.`)}};let g=["textureUrl","roughnessMapUrl","bumpMapUrl","metalnessMapUrl","anisotropyMapUrl","normalMapUrl","alphaMapUrl","aoMapUrl","displacementMapUrl","lightMapUrl","envMapUrl","specularIntensityMapUrl","specularColorMapUrl","clearcoatNormalMapUrl","clearcoatMapUrl","clearcoatRoughnessMapUrl","iridescenceMapUrl","iridescenceThicknessMapUrl","sheenColorMapUrl","sheenRoughnessMapUrl","transmissionMapUrl","thicknessMapUrl"];export const getMaterialOverrideTextureNames=e=>g.flatMap(t=>{let a=e.state[t];return"string"==typeof a&&""!==a?[a]:[]});export const RemoteReplacedMaterial=r(s=>{let{overrideComponent:r,original:i,object:l}=s,{getResourceUrl:h}=p(),u=o(()=>[r].reduce((e,t)=>(c(t)&&e.push(t.state.fileUrl),e),[]),[r]),v=o(()=>getMaterialOverrideTextureNames(r),[r]),g=m(u.map(h)),{createTextureQuery:f}=d(),R=M(v.map(f)),I=o(()=>R.map(e=>e.clone()),[R]),C=o(()=>{let e=g[u.findIndex(e=>e===r.state.fileUrl)],t=e?.materials[r.state.materialName];if(null==t)throw Error(`Material with name '${r.state.materialName}' not found in '${r.state.fileUrl}'`);let a=t.clone();return applyRemoteMaterialOverride(r,a,v,I),a},[r,u,g,v,I]);return n(()=>(l.material=C,l.material.name=i.name,()=>{l.material=i}),[l,i,C]),t(a,{children:[e(U,{material:C,instanceName:r.componentInstance.instanceName}),e(y,{material:C,instanceName:r.componentInstance.instanceName})]})});
|
|
@@ -29,7 +29,7 @@ export interface SceneEntityTextDecalV2Props {
|
|
|
29
29
|
text: string;
|
|
30
30
|
textureUrl?: string | undefined;
|
|
31
31
|
roughnessMapUrl?: string | undefined;
|
|
32
|
-
preloadFonts?: string[] | undefined;
|
|
32
|
+
preloadFonts?: readonly string[] | undefined;
|
|
33
33
|
invertedBump?: boolean | undefined;
|
|
34
34
|
}
|
|
35
35
|
export interface SceneEntityObjectTextDecalProps {
|
|
@@ -3,9 +3,15 @@ export interface AssistantToolChipsProps {
|
|
|
3
3
|
readonly tools: readonly AssistantToolItem[];
|
|
4
4
|
/** True while the reply runs and this row is its newest block: the assistant is at work on it. */
|
|
5
5
|
readonly isActive: boolean;
|
|
6
|
+
/** True when the row offers Undo: no reply runs, and the step of the undo history the configuration is at is one of its changes. */
|
|
7
|
+
readonly canUndo: boolean;
|
|
8
|
+
/** Undoes the changes of the given tool calls while one of them is the step the configuration is at. */
|
|
9
|
+
readonly onUndo: (toolCallIds: ReadonlySet<string>) => void;
|
|
6
10
|
}
|
|
7
11
|
/**
|
|
8
12
|
* A row of notes on what the assistant did in a reply, one per tool call. A click on a note logs
|
|
9
|
-
* the input and the result of its call to the console.
|
|
13
|
+
* the input and the result of its call to the console. While one of the row's changes is the step
|
|
14
|
+
* of the undo history the configuration is at, an Undo after the notes takes the row's changes
|
|
15
|
+
* back, up to a change the user made in between.
|
|
10
16
|
*/
|
|
11
|
-
export declare const AssistantToolChips: import("react").MemoExoticComponent<({ tools, isActive }: AssistantToolChipsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
+
export declare const AssistantToolChips: import("react").MemoExoticComponent<({ tools, isActive, canUndo, onUndo }: AssistantToolChipsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{ButtonBase as i,Tooltip as a,styled as n}from"@mui/material";import{memo as o,useCallback as s}from"react";import{match as r}from"ts-pattern";import{useLocalizable as d}from"#package/react-sdk";import{PhxIcon as l}from"#package/ui-sdk";import{AssistantPanelName as m}from"./theme.js";let c={id:"sdk.assistant.tool.updateDesign.label",message:"Update design"},p={id:"sdk.assistant.tool.readDesign.label",message:"Read design"},h={id:"sdk.assistant.tool.mistake.hint",message:"The assistant made a mistake."},u={id:"sdk.assistant.tool.cancelled.hint",message:"Stopped before it finished."},f={id:"sdk.assistant.tool.noResult.hint",message:"The result of this step was lost. It may or may not have been done."},g={id:"sdk.assistant.tool.toolBudget.hint",message:"Not done: the assistant reached its limit of steps for one message."},k={id:"sdk.assistant.tool.undo.label",message:"Undo"},x=n("div",{name:m,slot:"chips"})(({theme:{palette:e,spacing:t,typography:i}})=>({...i.caption,alignItems:"start",color:e.text.secondary,display:"grid",gap:t(.75),gridTemplateColumns:"min-content minmax(0, 1fr)"})),y=n("span",{name:m,slot:"activity"})(({theme:{typography:e}})=>({blockSize:`calc(${e.caption.lineHeight} * 1em)`,display:"grid",placeItems:"center"})),w=n(l,{name:m,slot:"activityIcon"})({fontSize:14,'[data-chips="active"] &':{animation:"phx-assistant-turn 2.4s linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},"@keyframes phx-assistant-turn":{to:{rotate:"360deg"}}}),b=n("span",{name:m,slot:"chip"})(({theme:{palette:e,spacing:t}})=>({cursor:"default",display:"inline-block",whiteSpace:"nowrap","&:not(:last-of-type)::after":{color:e.text.secondary,content:'"\xb7"',display:"inline-block",marginInline:t(.75),textDecoration:"none"},'&[data-chip="failed"]':{color:e.error.main},'&[data-chip="flawed"]':{textDecoration:"line-through",textDecorationColor:e.error.main}})),v=n(i,{name:m,slot:"undoButton"})(({theme:{palette:e,shape:t,spacing:i}})=>({alignItems:"center",animation:"phx-assistant-undo-in 150ms ease-out",borderRadius:t.borderRadius,color:e.primary.main,display:"inline-flex",font:"inherit",gap:i(.5),marginInlineStart:i(1),verticalAlign:"top","&:hover":{textDecoration:"underline"},"@media (prefers-reduced-motion: reduce)":{animation:"none"},"@keyframes phx-assistant-undo-in":{from:{opacity:0}}})),C=o(({tool:t})=>{let{chip:i,input:n,result:o}=t,l=d(c),m=d(p),k=d(h),x=d(u),y=d(f),w=d(g),v=r(i.label).with({kind:"text"},({text:e})=>e).with({kind:"updateDesign"},()=>l).with({kind:"readDesign"},()=>m).exhaustive(),C=s(()=>{console.info(`Assistant tool call "${v}"`,{input:n,result:o})},[n,v,o]);return e(a,{title:r(i).with({errorCode:"cancelled"},()=>x).with({errorCode:"no_result"},()=>y).with({errorCode:"tool_budget"},()=>w).with({state:"failed"},{state:"flawed"},()=>k).otherwise(()=>""),placement:"top-start",children:e(b,{onClick:C,"data-chip":i.state,children:v})})});export const AssistantToolChips=o(({tools:i,isActive:a,canUndo:n,onUndo:o})=>{let r=d(k),m=s(()=>{o(new Set(i.map(({id:e})=>e)))},[o,i]);return t(x,{"data-chips":a?"active":"done","aria-busy":a,children:[e(y,{children:e(w,{name:"Gear"})}),t("div",{children:[i.map(t=>e(C,{tool:t},t.id)),n&&t(v,{onClick:m,children:[e(l,{name:"ArrowCounterClockwise",fontSize:"inherit"}),r]})]})]})});
|
|
@@ -3,5 +3,5 @@ export interface AssistantMarkdownProps {
|
|
|
3
3
|
/** True while the text is still arriving, so markup the model has not finished is completed. */
|
|
4
4
|
readonly isStreaming: boolean;
|
|
5
5
|
}
|
|
6
|
-
/** Assistant text of the thread: Markdown with lists, tables, links and code, without a bubble. */
|
|
6
|
+
/** Assistant text of the thread: Markdown with lists, tables, links, entity links and code, without a bubble. */
|
|
7
7
|
export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ markdown, isStreaming }: AssistantMarkdownProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{styled as
|
|
1
|
+
import{jsx as r,Fragment as e}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{memo as n}from"react";import i,{defaultUrlTransform as a}from"react-markdown";import t from"remark-gfm";import{AssistantEntityLink as l,isEntityLinkHref as d,parseEntityLinkTarget as m}from"./entity-link/index.js";import{completeStreamedMarkdown as s}from"./streamed-markdown.js";import{AssistantPanelName as c}from"./theme.js";let p=o("div",{name:c,slot:"assistantMessage"})(({theme:{palette:r,shape:e,spacing:o,typography:n}})=>({overflowWrap:"anywhere","& > :first-child":{marginBlockStart:0},"& > :last-child":{marginBlockEnd:0},"p, ul, ol, pre, blockquote":{marginBlock:o(1)},"h1, h2, h3, h4, h5, h6":{...n.subtitle2,marginBlock:o(1.5,.5)},"ul, ol":{paddingInlineStart:o(2.5)},a:{color:r.primary.main},code:{background:r.action.hover,borderRadius:e.borderRadius/2,fontFamily:"ui-monospace, Menlo, monospace",fontSize:"0.9em",paddingInline:o(.5)},pre:{background:r.action.hover,borderRadius:e.borderRadius,overflowX:"auto",padding:o(1),code:{background:"none",padding:0}},blockquote:{borderInlineStart:`2px solid ${r.divider}`,color:r.text.secondary,marginInline:0,paddingInlineStart:o(1.5)},"th, td":{borderBlockEnd:`1px solid ${r.divider}`,padding:o(.5,1),textAlign:"start",verticalAlign:"top"}})),u=o("div")({overflowX:"auto",table:{borderCollapse:"collapse",inlineSize:"100%"}}),g={a:({node:o,children:n,href:i,...a})=>{if(null==i||!d(i))return r("a",{...a,href:i,target:"_blank",rel:"noopener noreferrer",children:n});let t=m(i);return null==t?r(e,{children:n}):r(l,{id:t,children:n})},table:({node:e,children:o,...n})=>r(u,{children:r("table",{...n,children:o})})},h=[t],f=r=>d(r)?r:a(r),b=["img"];export const AssistantMarkdown=n(({markdown:e,isStreaming:o})=>r(p,{children:r(i,{components:g,remarkPlugins:h,disallowedElements:b,urlTransform:f,children:o?s(e):e})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as t,styled as s}from"@mui/material";import{useCallback as r,useMemo as n}from"react";import{match as o}from"ts-pattern";import{useEagerObservableValue as l}from"#package/react-sdk";import{PhxIcon as d}from"#package/ui-sdk";import{useConfigurator as m}from"../../application-runtime/index.js";import{AssistantToolChips as c}from"./AssistantChips.js";import{AssistantMarkdown as h}from"./AssistantMarkdown.js";import{describeAssistantFailure as p}from"./assistant-failure.js";import{EntityLinkSelectionProvider as g,useCreateEntityLinkSelection as u}from"./entity-link/index.js";import{AssistantPanelName as k}from"./theme.js";import{buildEarlierThreadItems as f,buildThreadView as v}from"./thread-items.js";import{useFollowStream as b}from"./use-follow-stream.js";let w=s("div",{name:k,slot:"thread"})({display:"grid",position:"relative"}),x=s("div",{name:k,slot:"messages"})(({theme:{spacing:e,typography:a}})=>({...a.body2,display:"flex",flexDirection:"column",gap:e(1.5),overflowY:"auto",overscrollBehavior:"contain",paddingBlock:e(2),paddingInline:`var(--phx-sidebar-padding, ${e(2)})`,"& > :first-child":{marginBlockStart:"auto"}})),y=s("div",{name:k,slot:"userMessage"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-end",background:`hsl(from ${e.primary.main} h s l / 12%)`,borderRadius:"14px 14px 4px 14px",maxInlineSize:"85%",overflowWrap:"anywhere",paddingBlock:a(1),paddingInline:a(1.5),whiteSpace:"pre-wrap"})),T=s("div",{name:k,slot:"greeting"})({}),C=s("div",{name:k,slot:"status"})(({theme:{palette:e,typography:a}})=>({...a.caption,color:e.text.secondary})),S=s("div",{name:k,slot:"separator"})(({theme:{palette:e,spacing:a,typography:i}})=>({...i.caption,alignItems:"center",color:e.text.secondary,display:"flex",gap:a(1),"&::before, &::after":{borderBlockStart:`1px solid ${e.divider}`,content:'""',flex:1}})),j=s(t,{name:k,slot:"earlierButton"})({alignSelf:"center"}),I=s("div",{name:k,slot:"notice"})(({theme:{palette:e,shape:a,spacing:i}})=>({alignItems:"center",background:e.action.hover,borderRadius:a.borderRadius,display:"flex",flexWrap:"wrap",gap:i(1),justifyContent:"space-between",paddingBlock:i(1),paddingInline:i(1.5)})),B=s(t,{name:k,slot:"newReplyButton"})(({theme:{palette:e,spacing:a}})=>({background:e.text.primary,borderRadius:"calc(infinity * 1px)",color:e.background.paper,insetBlockEnd:a(1),insetInlineStart:"50%",position:"absolute",translate:"-50% 0","&:hover":{background:e.text.secondary}})),E=({item:a,isActive:t,undoableToolCallId:s,onUndo:r})=>o(a).with({kind:"user"},({text:a})=>e(y,{children:a})).with({kind:"text"},({markdown:a,isStreaming:i})=>e(h,{markdown:a,isStreaming:i})).with({kind:"tools"},({tools:a})=>e(c,{tools:a,isActive:t,canUndo:a.some(({id:e})=>e===s),onUndo:r})).with({kind:"separator"},()=>e(S,{role:"separator",children:e(i,{id:"sdk.assistant.thread.earlierSummarized",message:"Earlier conversation summarized"})})).exhaustive();export const AssistantThread=()=>{let{assistantSystem:s}=m(),c=l(s.chat$),{messages:h,isLoading:k,isResuming:y,earlierThreads:S}=c,A=l(s.undoTipToolCallId$),R=k?void 0:A,{items:L,isThinking:z}=n(()=>v(h,k),[h,k]),$=n(()=>f(S),[S]),U=n(()=>L.filter(({kind:e})=>"user"===e).length,[L]),D=c.error?p(c.failedStatus):void 0,{scrollerRef:M,hasUnseenContent:W,handleScroll:q,scrollToEnd:H}=b(n(()=>({messages:h,isThinking:z,isResuming:y,failure:D?.kind}),[h,z,y,D?.kind]),U),N=u(),Y=r(e=>{e.target instanceof Element&&e.target.closest('a, button, input, select, textarea, [role="button"]')||window.getSelection()?.isCollapsed!==!1&&N.release()},[N]),F=!c.isLoaded&&0===$.length&&!y&&!D;return a(w,{children:[e(g,{selection:N,children:a(x,{ref:M,onScroll:q,onClick:Y,role:"log","aria-live":"polite",children:[c.isLoaded&&0===L.length&&0===$.length&&!k&&!y&&!D&&e(T,{children:e(i,{id:"sdk.assistant.thread.greeting",message:"Hi. I can answer questions about this design and change it with you. Tell me what you need."})}),F&&e(C,{children:e(i,{id:"sdk.assistant.thread.loading",message:"Loading the conversation…"})}),c.isLoadingEarlierThread&&e(C,{children:e(i,{id:"sdk.assistant.thread.loadingEarlier",message:"Loading the earlier conversation…"})}),c.hasEarlierThread&&!c.isLoadingEarlierThread&&e(j,{size:"small",color:"inherit",onClick:s.loadEarlierThread,children:e(i,{id:"sdk.assistant.thread.showEarlier.label",message:"Show earlier conversation"})}),$.map(a=>e(E,{item:a,isActive:!1,undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),L.map(a=>e(E,{item:a,isActive:k&&a===L.at(-1),undoableToolCallId:R,onUndo:s.undoToolCalls},a.id)),y&&e(C,{children:e(i,{id:"sdk.assistant.thread.resuming",message:"Resuming the conversation…"})}),z&&e(C,{children:e(i,{id:"sdk.assistant.thread.thinking",message:"Thinking…"})}),D&&a(I,{role:"alert",children:[e("span",{children:o(D.kind).with("notAvailable",()=>e(i,{id:"sdk.assistant.failure.notAvailable",message:"The assistant is not available here."})).with("busy",()=>e(i,{id:"sdk.assistant.failure.busy",message:"The assistant is still working on an earlier message."})).with("unavailable",()=>e(i,{id:"sdk.assistant.failure.unavailable",message:"The assistant is unavailable right now."})).exhaustive()}),D.canRetry&&e(t,{size:"small",variant:"outlined",color:"inherit",onClick:s.reloadThread,children:e(i,{id:"sdk.assistant.failure.retry.label",message:"Try again"})})]})]})}),W&&e(B,{size:"small",onClick:H,endIcon:e(d,{name:"CaretDown"}),children:e(i,{id:"sdk.assistant.thread.newReply.label",message:"New reply"})})]})};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DomainEntityId } from '#package/domain';
|
|
3
|
+
export interface AssistantEntityLinkProps {
|
|
4
|
+
readonly id: DomainEntityId<string>;
|
|
5
|
+
/** The text the assistant gave the link; the id itself is never shown. */
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* An entity the assistant named in a reply, shown as its label. It follows the configurator live:
|
|
10
|
+
* a click selects the entity when the scene can select it, the link shows when the entity is
|
|
11
|
+
* selected or hovered in the scene, and it is struck out once the entity is gone.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AssistantEntityLink: import("react").MemoExoticComponent<({ id, children }: AssistantEntityLinkProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{alpha as t,styled as i}from"@mui/material";import{memo as n,useCallback as r,useEffect as o,useRef as a}from"react";import{sceneEntitySelectHotspotComponent as l,selectableComponent as c}from"#package/domain";import{useDomain as d,useFirstRenderedComponent as s,useHoveredDomainEntityId as m,useRenderedSelector as u,useSelectEntity as p,useSelectedDomainEntityId as k,useStoreSelector as y}from"#package/react-sdk";import{FrontendAnalyticsFactory as h}from"../../../common/index.js";import{AssistantPanelName as b}from"../theme.js";import{useEntityLinkSelection as g}from"./entity-link-selection.js";import{resolveEntityLinkState as f}from"./entity-link-state.js";let v=({theme:{palette:e,shape:i,spacing:n}})=>({background:e.action.hover,border:"none",borderRadius:i.borderRadius/2,boxDecorationBreak:"clone",color:"inherit",font:"inherit",margin:0,paddingBlock:0,paddingInline:n(.5),textAlign:"inherit",WebkitBoxDecorationBreak:"clone",'&[data-entity-link="interactive"]':{background:t(e.primary.main,e.action.hoverOpacity),color:e.primary.main,cursor:"pointer",'&:hover, &:focus-visible, &[data-hovered="true"]':{background:t(e.primary.main,e.action.focusOpacity)},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1}},'&[data-entity-link="missing"]':{background:"none",color:e.text.disabled,paddingInline:0,textDecoration:"line-through"},'&[data-selected="true"]':{boxShadow:`inset 0 0 0 1px ${e.primary.main}`}}),x=i("span",{name:b,slot:"entityLink"})(v),S=i("button",{name:b,slot:"entityLink"})(v),j=({kind:t,isSelected:i,children:n})=>e(x,{"data-entity-link":t,"data-selected":i,children:n}),T=({id:t,isSelected:i,children:n})=>{let{navigationSystem:u}=d(),k=s({entityIds:[t],componentTypes:[c]}),y=s({entityIds:[t],componentTypes:[l]}),{kind:b,canHover:v}=f({isSelectable:null!=k,isHoverDisabled:k?.state.hoverable===!1,hasSelectHotspot:null!=y}),x=m()===t,T=p(h.AssistantEntityLinkClicked),B=g(),E=r(()=>{B?.remember(t),T(t)},[t,B,T]),L=a(!1),D=r(()=>{v&&(L.current=!0,u.debouncedToggleHover(t))},[v,t,u]),H=r(()=>{L.current&&(L.current=!1,u.debouncedToggleHover(null))},[u]),I=r(e=>{"touch"!==e.pointerType&&D()},[D]),A=r(e=>{e.currentTarget.matches(":focus-visible")&&D()},[D]);return(o(()=>H,[v,H,t]),"interactive"!==b)?e(j,{kind:b,isSelected:i,children:n}):e(S,{type:"button","data-entity-link":b,"data-selected":i,"data-hovered":v&&x,"aria-current":i?"true":void 0,onClick:E,onPointerEnter:I,onPointerLeave:H,onFocus:A,onBlur:H,children:n})};export const AssistantEntityLink=n(({id:t,children:i})=>{let{domain:n}=d(),r=y(e=>null!=n.getEntity(t,e.state),[n,t]),o=u(e=>null!=n.getEntity(t,e.state),[n,t]),a=k()===t;return r?o?e(T,{id:t,isSelected:a,children:i}):e(j,{kind:"plain",isSelected:a,children:i}):e(j,{kind:"missing",isSelected:!1,children:i})});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { DomainEntityId } from '#package/domain';
|
|
3
|
+
/**
|
|
4
|
+
* The selection an entity link made, held for the thread the links are in. A click elsewhere in
|
|
5
|
+
* the thread takes back what a link selected, so a user can look at an entity and let it go again.
|
|
6
|
+
* A selection made anywhere else, in the scene, a hotspot or the sidebar, is never taken back.
|
|
7
|
+
*/
|
|
8
|
+
export interface EntityLinkSelection {
|
|
9
|
+
/** Records that a link is selecting this entity; call it before the select update is committed. */
|
|
10
|
+
readonly remember: (id: DomainEntityId<string>) => void;
|
|
11
|
+
/** Deselects the entity a link selected, when it is still the selected one, and forgets it. */
|
|
12
|
+
readonly release: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** Creates the selection the entity links of one thread share; the thread provides it to them. */
|
|
15
|
+
export declare const useCreateEntityLinkSelection: () => EntityLinkSelection;
|
|
16
|
+
export interface EntityLinkSelectionProviderProps {
|
|
17
|
+
readonly selection: EntityLinkSelection;
|
|
18
|
+
readonly children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const EntityLinkSelectionProvider: ({ selection, children }: EntityLinkSelectionProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/** The selection of the thread the link is in, or `null` for a link rendered outside a thread. */
|
|
22
|
+
export declare const useEntityLinkSelection: () => EntityLinkSelection | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{createContext as e,useCallback as r,useContext as n,useEffect as l,useMemo as c,useRef as i}from"react";import{useDeselect as o,useDomain as u,useSelectedDomainEntityId as a}from"#package/react-sdk";let s=e(null);export const useCreateEntityLinkSelection=()=>{let{storeSystem:t,navigationSystem:e}=u(),n=o(),s=a(),m=i(null);l(()=>{s!==m.current&&(m.current=null)},[s]);let p=r(t=>{m.current=t},[]),S=r(()=>{let r=m.current;m.current=null,null!=r&&e.getActiveSelectionState(t.stateSlices.committed.value.state)===r&&n()},[n,e,t]);return c(()=>({remember:p,release:S}),[p,S])};export const EntityLinkSelectionProvider=({selection:e,children:r})=>t(s.Provider,{value:e,children:r});export const useEntityLinkSelection=()=>n(s);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** What is attached right now to an existing entity that an entity link points at. */
|
|
2
|
+
export interface EntityLinkFacts {
|
|
3
|
+
/** A `selectable` component is attached to the entity under the current filters. */
|
|
4
|
+
readonly isSelectable: boolean;
|
|
5
|
+
/** The attached `selectable` component switches hover off with `hoverable: false`. */
|
|
6
|
+
readonly isHoverDisabled: boolean;
|
|
7
|
+
/** A `sceneEntitySelectHotspot` component is attached to the entity under the current filters. */
|
|
8
|
+
readonly hasSelectHotspot: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* How an entity link shows and behaves:
|
|
12
|
+
*
|
|
13
|
+
* - `missing`: the entity is gone, the link is struck out;
|
|
14
|
+
* - `plain`: the entity exists but nothing in the scene selects it, so the link is only a label;
|
|
15
|
+
* - `interactive`: a click selects the entity, as a click on it or on its hotspot in the scene does.
|
|
16
|
+
*/
|
|
17
|
+
export type EntityLinkKind = 'missing' | 'plain' | 'interactive';
|
|
18
|
+
/** The state of a link to an entity that exists; a link to one that is gone is `missing` without it. */
|
|
19
|
+
export interface EntityLinkState {
|
|
20
|
+
readonly kind: Exclude<EntityLinkKind, 'missing'>;
|
|
21
|
+
/**
|
|
22
|
+
* The link sends its hover to the scene and shows the hover of the scene. Only an entity the
|
|
23
|
+
* scene itself can hover takes part, so one that is selected through a hotspot alone does not.
|
|
24
|
+
*/
|
|
25
|
+
readonly canHover: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const resolveEntityLinkState: (facts: EntityLinkFacts) => EntityLinkState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const resolveEntityLinkState=e=>{let{isSelectable:n,isHoverDisabled:t,hasSelectHotspot:i}=e;return n||i?{kind:"interactive",canHover:n&&!t}:{kind:"plain",canHover:!1}};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type DomainEntityId } from '#package/domain';
|
|
2
|
+
/** True for the target of a link the assistant wrote to point at an entity, `entity:<id>`, whatever follows the scheme. */
|
|
3
|
+
export declare const isEntityLinkHref: (href: string) => boolean;
|
|
4
|
+
/** The entity id an entity link points at, or `null` when what follows the scheme is not a well-formed entity id. */
|
|
5
|
+
export declare const parseEntityLinkTarget: (href: string) => DomainEntityId<string> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DomainEntityIdSchema as t}from"#package/domain";let e="entity:",n=new RegExp(t.pattern);export const isEntityLinkHref=t=>t.startsWith(e);export const parseEntityLinkTarget=t=>{let r=t.slice(e.length);return t.startsWith(e)&&n.test(r)?r:null};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AssistantEntityLink}from"./AssistantEntityLink.js";export{EntityLinkSelectionProvider,useCreateEntityLinkSelection}from"./entity-link-selection.js";export{isEntityLinkHref,parseEntityLinkTarget}from"./entity-link-target.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarKeys } from './sidebar-keys.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{SidebarKeys}from"./sidebar-keys.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Values of the desktop sidebar's `data-sidebar` attribute: its variants and states. The sidebar writes
|
|
3
|
+
* them; the built-in desktop layout's rules react to them.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SidebarKeys: {
|
|
6
|
+
readonly Minimalist: 'minimalist';
|
|
7
|
+
readonly Split: 'split';
|
|
8
|
+
readonly Visible: 'visible';
|
|
9
|
+
readonly Hidden: 'hidden';
|
|
10
|
+
readonly Assistant: 'assistant';
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SidebarKeys={Minimalist:"minimalist",Split:"split",Visible:"visible",Hidden:"hidden",Assistant:"assistant"};
|
|
@@ -25,13 +25,8 @@ declare module '@mui/material/styles' {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
readonly Split: 'split';
|
|
31
|
-
readonly Visible: 'visible';
|
|
32
|
-
readonly Hidden: 'hidden';
|
|
33
|
-
readonly Assistant: 'assistant';
|
|
34
|
-
};
|
|
28
|
+
/** Which side of its layout the sidebar is on. */
|
|
29
|
+
export type DesktopSidebarSide = 'start' | 'end';
|
|
35
30
|
interface SidebarOwnerState {
|
|
36
31
|
readonly isHeaderEmpty?: boolean;
|
|
37
32
|
readonly isContentEmpty?: boolean;
|
|
@@ -76,17 +71,31 @@ export interface ThemeableDesktopSidebarProps extends SidebarOwnerState {
|
|
|
76
71
|
*/
|
|
77
72
|
readonly scrollableIndicatorBackground?: CSSProperties['background'];
|
|
78
73
|
/**
|
|
79
|
-
* Inline size (width) of the sidebar.
|
|
80
|
-
*
|
|
81
|
-
* @default inherited from ThemeableDesktopLayoutProps.sidebarWidth
|
|
74
|
+
* Inline size (width) of the sidebar. Not read from the theme: the sidebar takes its width from its
|
|
75
|
+
* `width` prop, which the built-in desktop layout sets from `ThemeableDesktopLayoutProps.sidebarWidth`.
|
|
82
76
|
*/
|
|
83
77
|
readonly width?: CSSProperties['width'];
|
|
84
78
|
}
|
|
85
|
-
|
|
79
|
+
/** Props of the built-in desktop sidebar. */
|
|
80
|
+
export interface DesktopSidebarProps {
|
|
81
|
+
/**
|
|
82
|
+
* Inline size (width) of the sidebar. Without it the sidebar fills the width and height of its
|
|
83
|
+
* container, which the layout sizes and positions; with it the sidebar takes this width and the
|
|
84
|
+
* height of its content, unless its container stretches it.
|
|
85
|
+
*/
|
|
86
|
+
readonly width?: CSSProperties['width'];
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
+
* Which side of the layout the sidebar is on. The sidebar tabs sit outside the sidebar on the other
|
|
89
|
+
* side: to its left for `end`, to its right for `start`.
|
|
90
|
+
*
|
|
91
|
+
* @default 'end'
|
|
88
92
|
*/
|
|
89
|
-
readonly
|
|
93
|
+
readonly side?: DesktopSidebarSide;
|
|
90
94
|
}
|
|
91
|
-
|
|
95
|
+
/**
|
|
96
|
+
* The built-in desktop sidebar: tabs, back button, property page, footer and the assistant panel, with
|
|
97
|
+
* their spacing, scrolling and empty states. In fullscreen it stays in place, transparent and inert;
|
|
98
|
+
* the layout decides whether it keeps its space.
|
|
99
|
+
*/
|
|
100
|
+
export declare const DesktopSidebar: ({ width, side }: DesktopSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
92
101
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{jsx as r,jsxs as a}from"react/jsx-runtime";import{paperClasses as e,styled as d,tabsClasses as i,useTheme as t,useThemeProps as o}from"@mui/material";import{useMemo as n,useState as s}from"react";import{useIsFullscreenActive as b}from"#package/react-sdk";import{attrf as l,commonStyles as p,useInvalidateScrollTimeline as c,useIsEmpty as h}from"#package/ui-sdk";import{ASSISTANT_PANEL_SLOT as m,AssistantPanel as u,useIsAssistantPanelOpen as S}from"../../../assistant/index.js";import{SidebarKeys as g}from"../../sidebar-keys/index.js";import{DesktopSidebarBackButton as k}from"../sidebar-back-button/index.js";import{DesktopSidebarContent as x,useSidebarContent as E}from"../sidebar-contents/index.js";import{DesktopSidebarFooter as f}from"../sidebar-footer/index.js";import{DesktopSidebarTabs as v}from"../sidebar-tabs/index.js";let R="PhxDesktopSidebar",y={Root:d("div",{name:R,slot:"root",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>[`
|
|
2
|
+
--phx-sidebar-background: ${r.background};
|
|
3
|
+
--phx-sidebar-border: ${r.border};
|
|
4
|
+
--phx-sidebar-filter: ${r.filter};
|
|
5
|
+
--phx-sidebar-padding: ${r.padding};
|
|
6
|
+
--phx-sidebar-radius: ${r.borderRadius}px;
|
|
7
|
+
--phx-sidebar-scrollable-indicator-background: ${r.scrollableIndicatorBackground};
|
|
8
|
+
`,{borderRadius:"var(--phx-sidebar-radius)",display:"grid",filter:"var(--phx-sidebar-filter)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inlineSize:r.width,...void 0===r.width&&{blockSize:"100%",inlineSize:"100%"},position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{"--phx-sidebar-background":"hsl(from gold h s l / 50%)"},[`&[data-sidebar*="${g.Visible}"]`]:{opacity:1},[`&[data-sidebar*="${g.Hidden}"]`]:{opacity:0},[`&[data-sidebar*="${g.Assistant}"] > :not([data-sidebar="${m}"])`]:{visibility:"hidden"}}]),Tabs:d("div",{name:R,slot:"tabs",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({insetBlockStart:0,insetInlineEnd:"100%",maxInlineSize:150,paddingInlineEnd:a(2),position:"absolute",..."start"===r.side&&{insetInlineEnd:"auto",insetInlineStart:"100%",paddingInlineEnd:0,paddingInlineStart:a(2),[`.${i.indicator}`]:{left:0,right:"auto"}},"&:is(:empty)":{padding:0},[`.${e.root}`]:{boxShadow:"none"}})),Header:d("header",{name:R,slot:"header",shouldForwardProp:r=>"ownerState"!==r})({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockEnd:0,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlock:"calc(0.6 * var(--phx-sidebar-padding))",paddingInline:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0}}),Body:d("div",{name:R,slot:"body",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:0,borderBlockEnd:0,display:"grid",position:"relative","[data-sidebar] &":{...r.isHeaderEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlockStart:"var(--phx-sidebar-padding)"}},'&:has([data-sidebar*="slot[content]"]:empty)':{...r.isContentEmpty&&{paddingBlock:0}},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{border:0}},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockEnd:"var(--phx-sidebar-border)",borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",paddingBlockEnd:"var(--phx-sidebar-padding)"}})),Content:d("div",{name:R,slot:"content",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({...p.layout.normalizeScrollableContainer,alignContent:"start",borderRadius:"inherit",display:"grid",gap:a(3),padding:"var(--phx-sidebar-padding)","@supports (animation-timeline: scroll())":{"&[data-scrollable]":{scrollTimeline:"--phx-sidebar-timeline y","&::after, &::before":{animation:`${p.keyframes.fadeIn} both`,animationTimeline:"--phx-sidebar-timeline",background:"var(--phx-sidebar-scrollable-indicator-background)",backgroundRepeat:"no-repeat",content:'""',display:"block",insetInline:0,opacity:0,pointerEvents:"none",position:"absolute",zIndex:1},"&::after":{animationDirection:"reverse",animationRange:`calc(100% - ${a(4)}) 100%`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",insetBlockStart:"50%",insetBlockEnd:0,scale:"1 -1"},"&::before":{animationRange:`0 ${a(4)}`,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",insetBlockStart:0,insetBlockEnd:"50%"}}},"&:is(:empty)":{paddingBlock:0},"[data-sidebar] &":{...r.isHeaderEmpty&&{paddingBlockStart:0,"&::before":{borderStartStartRadius:0,borderStartEndRadius:0,insetBlockStart:"var(--phx-sidebar-padding)"}}},[`[data-sidebar*="${g.Split}"] &`]:{paddingBlockEnd:0,"&::after":{borderEndStartRadius:0,borderEndEndRadius:0,insetBlockEnd:"var(--phx-sidebar-padding)"}}})),Footer:d("footer",{name:R,slot:"footer",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{palette:a,spacing:e}})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:`1px solid ${a.divider}`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",padding:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit"}},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",marginBlockStart:e(2)}}))};export const DesktopSidebar=({width:e,side:d="end"})=>{let[i,p]=s(null),[m,B]=s(null),$=n(()=>({current:i}),[i]),w=n(()=>({current:m}),[m]),{palette:I,shape:j,spacing:C}=t(),{background:F=I.background.paper,border:H=0,borderRadius:P=j.sidebarBorderRadius??j.borderRadius,filter:z=`
|
|
9
|
+
drop-shadow(0 1px 1.5px hsl(from ${I.common.black} h s l / 12%))
|
|
10
|
+
drop-shadow(0 1px 0.5px hsl(from ${I.common.black} h s l / 14%))
|
|
11
|
+
drop-shadow(0 2px 0.5px hsl(from ${I.common.black} h s l / 20%))
|
|
12
|
+
`,padding:T=C(2.5),scrollableIndicatorBackground:D=`linear-gradient(
|
|
13
|
+
180deg,
|
|
14
|
+
hsl(from black h s l / 12%),
|
|
15
|
+
hsl(from black h s l / 0%) 8px
|
|
16
|
+
)`}=o({props:{},name:R}),{hasMiniSidebar:M,hasSplitSidebar:A}=E(),V=S(),q=!b(),G=h($,{disabled:!q}),J=h(w,{disabled:!q});c(w,{disabled:!q});let K={background:F,border:H,borderRadius:P,filter:z,isHeaderEmpty:G,isContentEmpty:J,padding:T,scrollableIndicatorBackground:D,width:e};return a(y.Root,{ownerState:K,"data-sidebar":l({variant:{[`${g.Minimalist}`]:M,[`${g.Split}`]:A},state:{[`${g.Visible}`]:q,[`${g.Hidden}`]:!q,[`${g.Assistant}`]:V}}),inert:q?void 0:"",children:[r(y.Tabs,{ownerState:{...K,side:d},"data-sidebar":"slot[tabs]",children:r(v,{})}),r(y.Header,{ref:p,ownerState:K,"data-sidebar":"slot[header]",children:r(k,{})}),r(y.Body,{ownerState:K,"data-sidebar":"slot[body]",children:r(y.Content,{ref:B,ownerState:K,"data-sidebar":"slot[content]",children:r(x,{})})}),r(y.Footer,{ownerState:K,"data-sidebar":"slot[footer]",children:r(f,{})}),r(u,{})]})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DesktopSidebar, type DesktopSidebarProps, type DesktopSidebarSide } from './DesktopSidebar.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{DesktopSidebar}from"./DesktopSidebar.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* InvariantViolations component that
|
|
3
|
-
*
|
|
2
|
+
* InvariantViolations component that shows the violation and error messages of
|
|
3
|
+
* `useConfiguratorMessages` as notistack snackbars.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* An uncaught error is also logged; each entity violation becomes one snackbar
|
|
6
|
+
* prefixed with the id of its entity.
|
|
7
7
|
*/
|
|
8
8
|
export declare const InvariantViolations: () => null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{useSnackbar as i}from"notistack";import{
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{useSnackbar as i}from"notistack";import{match as e}from"ts-pattern";import{useConfiguratorMessages as a,useLogger as n}from"#package/react-sdk";export const InvariantViolations=()=>{let{enqueueSnackbar:o}=i(),s=n();return a(i=>{e(i).with({kind:"error"},({error:i})=>{s.error("Uncaught error",i),o(r(t,{id:"sdk.messages.validation.uncaughtError.message",message:"Oops, something went wrong"}),{variant:"error"})}).with({kind:"violation"},({entityId:r,violation:t,text:i})=>{o(`${String(r)}: ${i}`,{variant:e(t.severity).with("notice",()=>"info").with("warning",()=>"warning").with("fixable",()=>"error").with("fatal",()=>"error").exhaustive()})}).with({kind:"sideEffect"},()=>{}).exhaustive()}),null};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SideEffects component that
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* This component renders nothing but subscribes to the committed state changes
|
|
6
|
-
* from the domain store system and shows user-friendly notifications for
|
|
7
|
-
* operations that provide feedback hints.
|
|
2
|
+
* SideEffects component that shows the side-effect messages of
|
|
3
|
+
* `useConfiguratorMessages`, the hints of committed updates, as informational
|
|
4
|
+
* notistack snackbars.
|
|
8
5
|
*/
|
|
9
6
|
export declare const SideEffects: () => null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSnackbar as t}from"notistack";import{
|
|
1
|
+
import{useSnackbar as t}from"notistack";import{useConfiguratorMessages as e}from"#package/react-sdk";export const SideEffects=()=>{let{enqueueSnackbar:r}=t();return e(t=>{"sideEffect"===t.kind&&r(t.text,{variant:"info"})}),null};
|