@salsita-ai/sdk 0.50.0-develop.11a39afa73 → 0.50.0-develop.12744a81f2
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 +10 -3
- package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +9 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -2
- package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +1 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +26 -29
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +11 -12
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +3 -2
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -11
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +3 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +66 -7
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +6 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.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/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/cli-client/cli-api-client.d.ts +17 -0
- package/dist/client/cli-client/cli-api-client.js +1 -0
- package/dist/client/cli-client/index.d.ts +2 -0
- package/dist/client/cli-client/index.js +1 -0
- package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
- package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
- package/dist/client/contract.d.ts +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5263 -1723
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +56 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
- package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +7 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +99 -35
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +12 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +33 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +14 -4
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +46 -12
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +9 -7
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +5 -5
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
- package/dist/configurator/ui/assistant/annotation/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/index.js +1 -1
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
- package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
- package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +7 -4
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
- package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -3
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +2 -2
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +2 -1
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +2 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +7 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
- package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
- package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
- package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
- package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
- package/dist/configurator/ui/index.d.ts +1 -1
- package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/docs/index.json +128 -3
- package/dist/docs/layouts/nested-view-controls.mdx +223 -0
- package/dist/docs/layouts/presets/custom.mdx +1 -0
- package/dist/docs/layouts/preview/always.mdx +22 -0
- package/dist/docs/layouts/view-controls.mdx +2 -0
- package/dist/docs/other-features/domain-actions.mdx +58 -62
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/assistant/actions.mdx +183 -0
- package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
- package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
- package/dist/docs/phoenix/assistant/overview.mdx +137 -0
- package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
- package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
- package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
- package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
- package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
- package/dist/docs/phoenix/configurator-interface.mdx +68 -39
- package/dist/docs/phoenix/data-sources.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +2 -2
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +90 -54
- package/dist/docs/phoenix/project-structure.mdx +17 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +57 -28
- package/dist/docs/phoenix/sessions-and-access.mdx +10 -7
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhook-membership.mdx +1 -1
- package/dist/docs/phoenix/webhooks.mdx +56 -4
- package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
- package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
- package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
- package/dist/docs/ux-guidelines/overview.mdx +11 -9
- package/dist/domain/application/application-config.d.ts +5 -0
- package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
- package/dist/domain/application/assistant/assistant-exposure.js +1 -0
- package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
- package/dist/domain/application/assistant/assistant-selection.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +18 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +5 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
- package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
- package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +30 -2
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -1
- package/dist/domain/application/assistant-field-options.d.ts +2 -0
- package/dist/domain/application/assistant-field-options.js +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +17 -11
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
- package/dist/domain/application/assistant-recipe-groups.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +8 -0
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components/available-system-components.js +1 -1
- package/dist/domain/core/action/action.d.ts +0 -49
- package/dist/domain/core/component/system-component-filter.d.ts +1 -0
- package/dist/domain/core/component/system-component-filter.js +1 -1
- package/dist/domain/core/component/view-state-component.d.ts +4 -3
- package/dist/domain/core/component/view-state-component.js +1 -1
- package/dist/domain/core/domain-factory.d.ts +2 -3
- package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
- package/dist/domain/core/invariant/control-violation-hints.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +1 -0
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
- package/dist/domain/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -6
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
- package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
- package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
- package/dist/domain/extensions/assistant/index.d.ts +1 -0
- package/dist/domain/extensions/assistant/index.js +1 -0
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -8
- package/dist/domain/spec/modules/index.d.ts +0 -1
- package/dist/domain/spec/modules/index.js +1 -1
- package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
- package/dist/domain/spec/phx/phx-domain.js +1 -1
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
- package/dist/domain/spec/runtime/create-application.d.ts +5 -2
- package/dist/domain/spec/runtime/create-application.js +1 -1
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
- package/dist/domain/spec/sections/actions.d.ts +3 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +3 -0
- package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
- package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +34 -1
- package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
- package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +45 -4
- package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
- package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
- package/dist/domain/spec/sections/assistant/index.d.ts +4 -1
- package/dist/domain/system-components/index.d.ts +1 -0
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/navigation/index.d.ts +1 -0
- package/dist/domain/system-components/navigation/index.js +1 -0
- package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
- package/dist/domain/system-components/navigation/view-controls.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/index.d.ts +1 -0
- package/dist/extras/cognito/index.js +1 -0
- package/dist/globals/index.d.ts +5 -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/deployment-cli/commands/create-environment.js +1 -1
- package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
- package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
- package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
- package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
- package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +1 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/account/index.d.ts +1 -0
- package/dist/phoenix/commands/account/index.js +1 -0
- package/dist/phoenix/commands/account/whoami.d.ts +10 -0
- package/dist/phoenix/commands/account/whoami.js +4 -0
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +8 -2
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/feedback.d.ts +2 -2
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init-starter-spec.js +3 -4
- package/dist/phoenix/commands/init.d.ts +2 -2
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/login.d.ts +6 -3
- package/dist/phoenix/commands/login.js +3 -3
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/services/cli-credentials.d.ts +26 -7
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
- package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
- package/dist/phoenix/services/cli-server/index.d.ts +2 -0
- package/dist/phoenix/services/cli-server/index.js +1 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/frontend-config.d.ts +2 -0
- package/dist/phoenix/services/index.d.ts +4 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/phoenix-application.js +1 -1
- package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
- package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
- package/dist/phoenix/services/spec-project/index.d.ts +3 -0
- package/dist/phoenix/services/spec-project/index.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
- package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
- package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +14 -16
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +3 -2
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +2 -1
- package/dist/react-sdk/preset-selection/index.js +1 -1
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
- package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +3 -1
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +9 -4
- package/schema/domain-spec.json +444 -65
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
- package/dist/domain/domain-context/action-system/action-system.js +0 -1
- package/dist/domain/domain-context/action-system/index.d.ts +0 -1
- package/dist/domain/domain-context/action-system/index.js +0 -1
- package/dist/domain/domain-runtime/action-factory.d.ts +0 -11
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
- package/dist/domain/extensions/view-controls.d.ts +0 -25
- package/dist/domain/extensions/view-controls.js +0 -1
- package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
- /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
- /package/dist/{domain/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { AnimationSystem, type AnimationSystemContext } from './animation-system.js';
|
|
2
|
-
export type { AssistantAnnotation, AssistantAnnotationOverlay } from './assistant-system/assistant-annotation.js';
|
|
2
|
+
export type { AssistantAnnotation, AssistantAnnotationDrawing, AssistantAnnotationOverlay, } from './assistant-system/assistant-annotation.js';
|
|
3
3
|
export type { AssistantImageView } from './assistant-system/assistant-image-view.js';
|
|
4
|
-
export { type AssistantDraftAttachment, MAX_COMPOSER_ATTACHMENTS } from './assistant-system/composer-attachments.js';
|
|
5
|
-
export { type
|
|
4
|
+
export { type AssistantAttachment, type AssistantDraftAttachment, MAX_COMPOSER_ATTACHMENTS, } from './assistant-system/composer-attachments.js';
|
|
5
|
+
export { type AssistantAnnotationTarget, type AssistantChatSnapshot, type AssistantEarlierThreadSnapshot, type AssistantClientTool, type AssistantPanelSnapshot, AssistantSystem, type AssistantSystemContext, } from './assistant-system/assistant-system.js';
|
|
6
6
|
export type { AssistantPlayback, AssistantPlaybackStatus } from './assistant-system/assistant-speech-player.js';
|
|
7
7
|
export { isSpeakableReply } from './assistant-system/speakable-reply.js';
|
|
8
8
|
export { CameraControlSystem, CameraControlType } from './camera-control-system/camera-control-system.js';
|
|
@@ -11,10 +11,11 @@ export { createCameraControls } from './camera-control-system/create-camera-cont
|
|
|
11
11
|
export { type AnyCanvasSystem, CanvasSystem, type EntityObjectFilter, type FlushToken } from './canvas-system.js';
|
|
12
12
|
export { type AnyDragAndDropSystem, DragAndDropSystem, type DragAndDropSystemContext, type DraggableState, type DraggingState, type RotationDraggingState, } from './drag-and-drop-system/drag-and-drop-system.js';
|
|
13
13
|
export { type AnyExportSystem, ExportSystem, type ExportSystemContext } from './export-system/export-system.js';
|
|
14
|
-
export { type GraphQLExecution, type GraphQLScreenshot, type GraphQLOperation, GraphQLSystem, type GraphQLSystemContext, type PreparedOperation, SCREENSHOT_NOT_TAKEN, } from './graphql-system/graphql-system.js';
|
|
14
|
+
export { type GraphQLExecution, type GraphQLExecutionOptions, type GraphQLScreenshot, type GraphQLScreenshotStorage, type GraphQLOperation, GraphQLSystem, type GraphQLSystemContext, type PreparedOperation, SCREENSHOT_NOT_TAKEN, } from './graphql-system/graphql-system.js';
|
|
15
15
|
export type * from './image-rendering-system/image-renderer.js';
|
|
16
16
|
export { type AnyImageRenderingSystem, ImageRenderingSystem, type ImageRenderingSystemContext, } from './image-rendering-system/image-rendering-system.js';
|
|
17
17
|
export { type AnyLayoutSystem, LayoutSystem, type LayoutSystemContext } from './layout-system/layout-system.js';
|
|
18
18
|
export { toolbarHelpElementName } from './layout-system/toolbar-help-element.js';
|
|
19
19
|
export { type AnySketchingSystem, SketchingSystem } from './sketching-system/sketching-system.js';
|
|
20
20
|
export { LineEndPointUpdateTag, LineLengthUpdateTag, LineLineConnectionUpdateTag, LineRectangleBottomLeftConnectionUpdateTag, LineRectangleBottomRightConnectionUpdateTag, LineRectangleTopLeftConnectionUpdateTag, LineRectangleTopRightConnectionUpdateTag, LineSketchingPointUpdateTag, LineStartPointUpdateTag, RectangleBottomLeftCornerUpdateTag, RectangleBottomRightCornerUpdateTag, RectangleDepthUpdateTag, RectangleSketchingPointUpdateTag, RectangleTopLeftCornerUpdateTag, RectangleTopRightCornerUpdateTag, RectangleWidthUpdateTag, SetInitialSketchingPointPositionTag, SketchingFixTransformationTag, isAnySketchingPointUpdate, isLineEndPointUpdate, isLineLengthUpdate, isLineLineConnectionUpdate, isLineRectangleBottomLeftConnectionUpdate, isLineRectangleBottomRightConnectionUpdate, isLineRectangleTopLeftConnectionUpdate, isLineRectangleTopRightConnectionUpdate, isLineSketchingPointUpdate, isLineStartPointUpdate, isRectangleBottomLeftCornerUpdate, isRectangleBottomRightCornerUpdate, isRectangleDepthUpdate, isRectangleSketchingPointUpdate, isRectangleTopLeftCornerUpdate, isRectangleTopRightCornerUpdate, isRectangleWidthUpdate, isSetInitialLinePositionUpdate, isSetInitialRectanglePositionUpdate, isSketchingFixTransformationUpdate, } from './sketching-system/sketching-updates.js';
|
|
21
|
+
export * from './action-system/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AnimationSystem}from"./animation-system.js";export{MAX_COMPOSER_ATTACHMENTS}from"./assistant-system/composer-attachments.js";export{AssistantSystem}from"./assistant-system/assistant-system.js";export{isSpeakableReply}from"./assistant-system/speakable-reply.js";export{CameraControlSystem,CameraControlType}from"./camera-control-system/camera-control-system.js";export{CameraSystem}from"./camera-control-system/camera-system.js";export{createCameraControls}from"./camera-control-system/create-camera-controls.js";export{CanvasSystem}from"./canvas-system.js";export{DragAndDropSystem}from"./drag-and-drop-system/drag-and-drop-system.js";export{ExportSystem}from"./export-system/export-system.js";export{GraphQLSystem,SCREENSHOT_NOT_TAKEN}from"./graphql-system/graphql-system.js";export{ImageRenderingSystem}from"./image-rendering-system/image-rendering-system.js";export{LayoutSystem}from"./layout-system/layout-system.js";export{toolbarHelpElementName}from"./layout-system/toolbar-help-element.js";export{SketchingSystem}from"./sketching-system/sketching-system.js";export{LineEndPointUpdateTag,LineLengthUpdateTag,LineLineConnectionUpdateTag,LineRectangleBottomLeftConnectionUpdateTag,LineRectangleBottomRightConnectionUpdateTag,LineRectangleTopLeftConnectionUpdateTag,LineRectangleTopRightConnectionUpdateTag,LineSketchingPointUpdateTag,LineStartPointUpdateTag,RectangleBottomLeftCornerUpdateTag,RectangleBottomRightCornerUpdateTag,RectangleDepthUpdateTag,RectangleSketchingPointUpdateTag,RectangleTopLeftCornerUpdateTag,RectangleTopRightCornerUpdateTag,RectangleWidthUpdateTag,SetInitialSketchingPointPositionTag,SketchingFixTransformationTag,isAnySketchingPointUpdate,isLineEndPointUpdate,isLineLengthUpdate,isLineLineConnectionUpdate,isLineRectangleBottomLeftConnectionUpdate,isLineRectangleBottomRightConnectionUpdate,isLineRectangleTopLeftConnectionUpdate,isLineRectangleTopRightConnectionUpdate,isLineSketchingPointUpdate,isLineStartPointUpdate,isRectangleBottomLeftCornerUpdate,isRectangleBottomRightCornerUpdate,isRectangleDepthUpdate,isRectangleSketchingPointUpdate,isRectangleTopLeftCornerUpdate,isRectangleTopRightCornerUpdate,isRectangleWidthUpdate,isSetInitialLinePositionUpdate,isSetInitialRectanglePositionUpdate,isSketchingFixTransformationUpdate}from"./sketching-system/sketching-updates.js";
|
|
1
|
+
export{AnimationSystem}from"./animation-system.js";export{MAX_COMPOSER_ATTACHMENTS}from"./assistant-system/composer-attachments.js";export{AssistantSystem}from"./assistant-system/assistant-system.js";export{isSpeakableReply}from"./assistant-system/speakable-reply.js";export{CameraControlSystem,CameraControlType}from"./camera-control-system/camera-control-system.js";export{CameraSystem}from"./camera-control-system/camera-system.js";export{createCameraControls}from"./camera-control-system/create-camera-controls.js";export{CanvasSystem}from"./canvas-system.js";export{DragAndDropSystem}from"./drag-and-drop-system/drag-and-drop-system.js";export{ExportSystem}from"./export-system/export-system.js";export{GraphQLSystem,SCREENSHOT_NOT_TAKEN}from"./graphql-system/graphql-system.js";export{ImageRenderingSystem}from"./image-rendering-system/image-rendering-system.js";export{LayoutSystem}from"./layout-system/layout-system.js";export{toolbarHelpElementName}from"./layout-system/toolbar-help-element.js";export{SketchingSystem}from"./sketching-system/sketching-system.js";export{LineEndPointUpdateTag,LineLengthUpdateTag,LineLineConnectionUpdateTag,LineRectangleBottomLeftConnectionUpdateTag,LineRectangleBottomRightConnectionUpdateTag,LineRectangleTopLeftConnectionUpdateTag,LineRectangleTopRightConnectionUpdateTag,LineSketchingPointUpdateTag,LineStartPointUpdateTag,RectangleBottomLeftCornerUpdateTag,RectangleBottomRightCornerUpdateTag,RectangleDepthUpdateTag,RectangleSketchingPointUpdateTag,RectangleTopLeftCornerUpdateTag,RectangleTopRightCornerUpdateTag,RectangleWidthUpdateTag,SetInitialSketchingPointPositionTag,SketchingFixTransformationTag,isAnySketchingPointUpdate,isLineEndPointUpdate,isLineLengthUpdate,isLineLineConnectionUpdate,isLineRectangleBottomLeftConnectionUpdate,isLineRectangleBottomRightConnectionUpdate,isLineRectangleTopLeftConnectionUpdate,isLineRectangleTopRightConnectionUpdate,isLineSketchingPointUpdate,isLineStartPointUpdate,isRectangleBottomLeftCornerUpdate,isRectangleBottomRightCornerUpdate,isRectangleDepthUpdate,isRectangleSketchingPointUpdate,isRectangleTopLeftCornerUpdate,isRectangleTopRightCornerUpdate,isRectangleWidthUpdate,isSetInitialLinePositionUpdate,isSetInitialRectanglePositionUpdate,isSketchingFixTransformationUpdate}from"./sketching-system/sketching-updates.js";export*from"./action-system/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { $DomainEntity, DomainEntity } from '#package/domain';
|
|
1
|
+
import type { $DomainEntity, ActionTypes, DomainEntity } from '#package/domain';
|
|
2
2
|
import { type ConfiguratorExtensionSystems } from '../extensions/index.js';
|
|
3
|
-
export type UseConfiguratorExtensions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> = () => ConfiguratorExtensionSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
3
|
+
export type UseConfiguratorExtensions<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes = ActionTypes> = () => ConfiguratorExtensionSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>;
|
|
4
4
|
/**
|
|
5
5
|
* Reads the runtime-owned configurator systems. The graph is available before a configuration
|
|
6
6
|
* lifecycle so bootstrap flows such as preset selection can use it.
|
|
@@ -8,4 +8,4 @@ export type UseConfiguratorExtensions<ENTITIES extends DomainEntity<string>, ALL
|
|
|
8
8
|
* The application runtime provider erases its generic system extension. This hook is the generated
|
|
9
9
|
* configurator boundary that restores the application's entity-aware configurator system graph.
|
|
10
10
|
*/
|
|
11
|
-
export declare const useConfigurator: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>() => ConfiguratorExtensionSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
11
|
+
export declare const useConfigurator: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes = ActionTypes>() => ConfiguratorExtensionSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type $DomainEntity, type ActionTypes, 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 CreateAddEntityFab, type CreateAppLoader, type CreateCollectFrontendDataHandler, type CreateConfigurationNotFoundPage, type CreateConfiguratorErrorPage, type CreateDeleteEntityFab, type CreateFilterPublishedChunksHandler, type CreateNavigationHotspot, type CreateNotAuthenticatedPage, type CreateOnApplicationStartProvider, type CreateOnBackendDataReadyProvider, type CreateOnConfiguratorReadyProvider, type CreateOnFrontendDataReadyProvider, type CreateOnGoToIndexHandler, type CreateOnPresetLoadedHandler, type CreateOnPublishedDataReadyProvider, type CreateOnRoutingReadyProvider, type CreateOnSessionReadyProvider, type CreatePresetUi, type CreateSelectionHotspot, type CreateToolMenuFab, 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 UseActiveViewports, 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 UseConfigurationSaveState, type UseConfiguratorMessages, type UseConfiguratorRouting, 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 UseFinalizeAction, type UseFinalizeActions, 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 UseLocaleSwitch, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePresetSelection, 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 UseSetViewState, type UseShareLinks, type UseSlice, type UseState, type UseStateValidity, type UseStepNavigation, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTabNavigation, type UseTextValue, type UseUndoRedo, type UseUpdateControl, type UseUpdatedControl, useGenerateShareLink, useLoadingStateValue, useLocalizable, useResolveLocalizable } from '#package/react-sdk';
|
|
2
|
+
import { type CreateAddEntityFab, type CreateAppLoader, type CreateCollectFrontendDataHandler, type CreateConfigurationNotFoundPage, type CreateConfiguratorErrorPage, type CreateDeleteEntityFab, type CreateFilterPublishedChunksHandler, type CreateNavigationHotspot, type CreateNotAuthenticatedPage, type CreateOnApplicationStartProvider, type CreateOnBackendDataReadyProvider, type CreateOnConfiguratorReadyProvider, type CreateOnFrontendDataReadyProvider, type CreateOnGoToIndexHandler, type CreateOnPresetLoadedHandler, type CreateOnPublishedDataReadyProvider, type CreateOnRoutingReadyProvider, type CreateOnSessionReadyProvider, type CreatePresetUi, type CreateSelectionHotspot, type CreateToolMenuFab, 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 UseActiveViewports, 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 UseConfigurationSaveState, type UseConfiguratorMessages, type UseConfiguratorRouting, 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 UseFinalizeAction, type UseFinalizeActions, 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 UseLocaleSwitch, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePresetSelection, 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 UseSetViewState, type UseShareLinks, type UseSlice, type UseState, type UseStateValidity, type UseStepNavigation, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTabNavigation, type UseTextValue, type UseUndoRedo, type UseUpdateControl, type UseUpdatedControl, useActiveViewChildState, useGenerateShareLink, useLoadingStateValue, useLocalizable, useResolveLocalizable } from '#package/react-sdk';
|
|
3
3
|
import { type CreatePhoenixIconSet } from '#package/ui-sdk';
|
|
4
|
-
import { type UseConfiguratorExtensions } from '../application-runtime/index.js';
|
|
4
|
+
import { type UseConfiguratorExtensions, createActionFactory } from '../application-runtime/index.js';
|
|
5
5
|
import { usePreview, usePropertyPageStack, usePropertyPageState } from '../configurator-context/index.js';
|
|
6
6
|
import { useCloseAction } from '../integration/index.js';
|
|
7
7
|
import { type CreateGetTextureProcessingMapHandler } from '../scene/index.js';
|
|
@@ -264,16 +264,16 @@ export interface ConfiguratorInterface<ENTITIES extends DomainEntity<string>, AL
|
|
|
264
264
|
/**
|
|
265
265
|
* Domain context with all typesd domain systems
|
|
266
266
|
*/
|
|
267
|
-
useDomain: UseDomainContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES
|
|
267
|
+
useDomain: UseDomainContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
268
268
|
/**
|
|
269
269
|
* Domain application context with all typed domain application systems
|
|
270
270
|
*/
|
|
271
271
|
useDomainApplication: UseDomainApplicationContext;
|
|
272
272
|
/** Configurator runtime extensions with all typed configurator systems. */
|
|
273
|
-
useConfigurator: UseConfiguratorExtensions<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
274
|
-
/**
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
useConfigurator: UseConfiguratorExtensions<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>;
|
|
274
|
+
/** Implements configurator actions with project-typed parameters, results and systems. */
|
|
275
|
+
readonly implementActions: ReturnType<typeof createActionFactory<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ACTION_TYPES>>;
|
|
276
|
+
/** Routing service used to navigate in the configurator. */
|
|
277
277
|
useConfiguratorRouting: UseConfiguratorRouting;
|
|
278
278
|
/**
|
|
279
279
|
* Preset selection service used to select a preset
|
|
@@ -517,6 +517,8 @@ export interface ConfiguratorInterface<ENTITIES extends DomainEntity<string>, AL
|
|
|
517
517
|
* Get the currently active view state
|
|
518
518
|
*/
|
|
519
519
|
useActiveViewState: UseActiveViewState<VIEW_STATES>;
|
|
520
|
+
/** Current runtime choice within the declared view. */
|
|
521
|
+
useActiveViewChildState: typeof useActiveViewChildState;
|
|
520
522
|
/**
|
|
521
523
|
* Make the given view state the active one
|
|
522
524
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as t,createGetThemeHandler as
|
|
1
|
+
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as t,createGetThemeHandler as o,createGetWebComponentOptionsHandler as r,createPhoenixHandler as i,createTransformer as n,createTransformerBuilder as s,createUpdateFactory as m,getIdSequence as a,isCreateEntityUpdate as p,isReplaceEntityUpdate as d}from"#package/domain";import{createAddEntityFab as c,createAppLoader as u,createCollectFrontendDataHandler as f,createConfigurationNotFoundPage as l,createConfiguratorErrorPage as g,createDeleteEntityFab as j,createFilterPublishedChunksHandler as x,createNavigationHotspot as k,createNotAuthenticatedPage as y,createOnApplicationStartProvider as A,createOnBackendDataReadyProvider as I,createOnConfiguratorReadyProvider as C,createOnFrontendDataReadyProvider as S,createOnGoToIndexHandler as w,createOnPresetLoadedHandler as E,createOnPublishedDataReadyProvider as b,createOnRoutingReadyProvider as q,createOnSessionReadyProvider as B,createPresetUi as P,createSelectionHotspot as R,createToolMenuFab as U,isAngleDimensionUpdate as h,isAttributeSelectionUpdate as v,isAttributeSwitchUpdate as z,isDeleteEntityUpdate as D,isDistanceDimensionUpdate as F,isGenericDimensionUpdate as G,isSwatchSelectionUpdate as H,isTextValueUpdate as J,useAccessService as K,useActiveNavigationState as L,useActiveToolState as M,useActiveViewChildState as N,useActiveViewState as O,useActiveViewports as Q,useAnalyticsService as T,useAngleDimension as V,useAttributeSelection as W,useAttributeSwitch as X,useAuthenticatedClient as Y,useAuthorizedClient as Z,useBackendData as $,useChildEntitySelection as _,useCommittedSlice as ee,useCommittedState as et,useComponent as eo,useComponents as er,useComposition as ei,useConfigurationId as en,useConfigurationSaveState as es,useConfiguratorMessages as em,useConfiguratorRouting as ea,useControlViolations as ep,useCookRecipes as ed,useCookReplaceRecipes as ec,useCookedRecipes as eu,useCookedReplaceRecipes as ef,useCreateAuthorizedClient as el,useDeleteEntity as eg,useDeletedEntity as ej,useDeselect as ex,useDistanceDimension as ek,useDistanceDimensionSelection as ey,useDomain as eA,useDomainApplication as eI,useDomainApplicationProps as eC,useDomainEntityRenderedState as eS,useDomainEntityState as ew,useEntityPrice as eE,useEntitySelector as eb,useFinalizeAction as eq,useFinalizeActions as eB,useFinalizeViolations as eP,useFirstComponent as eR,useFirstRenderedComponent as eU,useFirstRootComponent as eh,useFirstRootRenderedComponent as ev,useFrontendData as ez,useGenerateShareLink as eD,useGenericDimension as eF,useGroupedRecipeOptions as eG,useHoveredDomainEntityId as eH,useHoveredEntity as eJ,useHoveredEntityId as eK,useIntegrationService as eL,useIntegrationState as eM,useIsFullscreenActive as eN,useLoadedData as eO,useLoadingState as eQ,useLoadingStateValue as eT,useLocaleSwitch as eV,useLocalizable as eW,useMapViolationHints as eX,useNavigate as eY,usePopNavigate as eZ,usePresetEmbeddedState as e$,usePresetSelection as e_,usePublishedData as e0,usePushNavigate as e1,useRecipeEmbeddedState as e2,useRenderedComponent as e3,useRenderedComponents as e4,useRenderedEntitySelector as e5,useRenderedRootEntitySelector as e6,useRenderedSelector as e7,useRenderedSelector$ as e8,useRenderedSlice as e9,useRenderedState as te,useReplaceEntityRecipeOptions as tt,useResolveLocalizable as to,useRootComponents as tr,useRootEntityId as ti,useRootEntityPrice as tn,useRootEntityRenderedId as ts,useRootEntityRenderedState as tm,useRootEntitySelector as ta,useRootEntityState as tp,useRootRenderedComponents as td,useSelectEntity as tc,useSelectParent as tu,useSelectedDomainEntityId as tf,useSelectedEntity as tl,useSelectedEntityId as tg,useSession as tj,useSessionRole as tx,useSessionService as tk,useSetFullscreen as ty,useSetViewState as tA,useShareLinks as tI,useStateValidity as tC,useStepNavigation as tS,useStoreSelector as tw,useStoreSelector$ as tE,useSwatchSelection as tb,useTabNavigation as tq,useTextValue as tB,useUndoRedo as tP,useUpdateControl as tR,useUpdatedControl as tU}from"#package/react-sdk";import{createPhoenixIconSet as th}from"#package/ui-sdk";import{createActionFactory as tv,useConfigurator as tz}from"../application-runtime/index.js";import{usePreview as tD,usePropertyPageStack as tF,usePropertyPageState as tG}from"../configurator-context/index.js";import{useCloseAction as tH}from"../integration/index.js";import{createGetTextureProcessingMapHandler as tJ}from"../scene/index.js";import{useUpdateEntityObjectSelection as tK}from"../scene/scene-entity/drag-and-drop/use-updated-selection.js";import{useAssistantPanel as tL,useMeasurements as tM,useToolbarActions as tN}from"../toolbar-actions/index.js";import{LayoutSlots as tO,createCanvasLoader as tQ,createLayoutAdminUi as tT,createLayoutCustomOwnerUi as tV,createLayoutCustomReadUi as tW,createLayoutDialog as tX,createLayoutFooter as tY,createLayoutToolbarDesktop as tZ,createLayoutToolbarDesktopFullScreen as t$,createLayoutToolbarReadDesktop as t_,createLayoutToolbarReadDesktopFullScreen as t0,createLayoutUserUi as t1,createToolbarHelp as t2,useAssistantComposer as t3,useAssistantThread as t4,useSceneSafeArea as t5}from"../ui/index.js";import{createPresetDeviceNotSupported as t6,createPresetPageAction as t7}from"../ui/preset-layout/PresetUi.js";import{useResetCamera as t8}from"./use-reset-camera.js";export const createConfiguratorInterface=t9=>({updates:m(),getIdSequence:a,createGetWebComponentOptionsHandler:r,createGetThemeHandler:o,createPhoenixHandler:i,createCustomPhoenixEntityElement:e,createCustomPhoenixLayoutElement:t,createPhoenixIconSet:th,createGetTextureProcessingMapHandler:tJ,createCollectFrontendDataHandler:f,createFilterPublishedChunksHandler:x,createOnGoToIndexHandler:w,createOnApplicationStartProvider:A,createOnSessionReadyProvider:B,createOnPublishedDataReadyProvider:b,createOnFrontendDataReadyProvider:S,createOnBackendDataReadyProvider:I,createOnRoutingReadyProvider:q,createOnConfiguratorReadyProvider:C,createOnPresetLoadedHandler:E,createPresetUi:P,createPresetPageAction:t7,createPresetDeviceNotSupported:t6,createLayoutFooter:tY,createAppLoader:u,createCanvasLoader:tQ,createLayoutDialog:tX,createLayoutToolbarDesktop:tZ,createLayoutToolbarDesktopFullScreen:t$,createLayoutToolbarReadDesktop:t_,createLayoutToolbarReadDesktopFullScreen:t0,createLayoutCustomOwnerUi:tV,createLayoutCustomReadUi:tW,createLayoutAdminUi:tT,createLayoutUserUi:t1,createToolbarHelp:t2,createNotAuthenticatedPage:y,createConfigurationNotFoundPage:l,createConfiguratorErrorPage:g,createAddEntityFab:c,createDeleteEntityFab:j,createSelectionHotspot:R,createNavigationHotspot:k,createToolMenuFab:U,createTransformer:n,transformerBuilder:s(),useAnalytics:T,useAuthenticatedClient:Y,useAuthorizedClient:Z,useCreateAuthorizedClient:el,useAccessService:K,useConfigurationId:en,useSession:tj,useSessionRole:tx,useSessionService:tk,useDomain:eA,useDomainApplication:eI,useConfigurator:tz,implementActions:tv(),useConfiguratorRouting:ea,usePresetSelection:e_,usePublishedData:e0,useFrontendData:ez,useBackendData:$,useDomainApplicationProps:eC,useLoadedData:eO,useIntegrationService:eL,useIntegrationState:eM,usePresetEmbeddedState:e$,useRecipeEmbeddedState:e2,useCommittedSlice:ee,useRenderedSlice:e9,useCommittedState:et,useRenderedState:te,useStoreSelector:tw,useRenderedSelector:e7,useStoreSelector$:tE,useRenderedSelector$:e8,useEntitySelector:eb,useRenderedEntitySelector:e5,useRootEntitySelector:ta,useRenderedRootEntitySelector:e6,useStateValidity:tC,useMapViolationHints:eX,useNavigate:eY,usePopNavigate:eZ,usePushNavigate:e1,useControlViolations:ep,useFinalizeViolations:eP,useConfiguratorMessages:em,useConfigurationSaveState:es,useFinalizeAction:eq,useFinalizeActions:eB,useComponent:eo,useRenderedComponent:e3,useComponents:er,useRenderedComponents:e4,useFirstComponent:eR,useFirstRenderedComponent:eU,useRootComponents:tr,useRootRenderedComponents:td,useFirstRootComponent:eh,useFirstRootRenderedComponent:ev,useEntityState:ew,useEntityRenderedState:eS,useRootEntityState:tp,useRootEntityRenderedState:tm,useRootEntityId:ti,useRootEntityRenderedId:ts,useEntityPrice:eE,useRootEntityPrice:tn,useSelectedEntity:tl,useSelectedEntityId:tg,useSelectedDomainEntityId:tf,useSelectEntity:tc,useDeselect:ex,useSelectParent:tu,useHoveredEntity:eJ,useHoveredEntityId:eK,useHoveredDomainEntityId:eH,useActiveNavigationState:L,useActiveViewState:O,useActiveViewChildState:N,useSetViewState:tA,useActiveToolState:M,useIsFullscreenActive:eN,useSetFullscreen:ty,useResetCamera:t8,useUndoRedo:tP,useTabNavigation:tq,useStepNavigation:tS,useSceneSafeArea:t5,useActiveViewports:Q,usePreview:tD,useCloseAction:tH,useIsCloningAllowed:tO.useIsCloningAllowed,useResolveLocalizable:to,useLocalizable:eW,useToolbarActions:tN,useMeasurements:tM,useLocaleSwitch:eV,useShareLinks:tI,useAssistantPanel:tL,useAssistantThread:t4,useAssistantComposer:t3,useComposition:ei,useUpdateControl:tR,useUpdatedControl:tU,useCookRecipes:ed,useCookedRecipes:eu,useCookReplaceRecipes:ec,useCookedReplaceRecipes:ef,useDeleteEntity:eg,useDeletedEntity:ej,useSwatchSelection:tb,useTextValue:tB,useAttributeSelection:W,useAttributeSwitch:X,useDistanceDimension:ek,useDistanceDimensionSelection:ey,useGenericDimension:eF,useAngleDimension:V,useChildEntitySelection:_,useGroupedRecipeOptions:eG,useReplaceEntityRecipeOptions:tt,useUpdateEntityObjectSelection:tK,useGenerateShareLink:eD,useLoadingState:eQ,useLoadingStateValue:eT,usePropertyPageStack:tF,usePropertyPageState:tG,isCreateEntityUpdate:p,isReplaceEntityUpdate:d,isDeleteEntityUpdate:D,isAngleDimensionUpdate:h,isDistanceDimensionUpdate:F,isGenericDimensionUpdate:G,isAttributeSelectionUpdate:v,isAttributeSwitchUpdate:z,isTextValueUpdate:J,isSwatchSelectionUpdate:H});
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pushes the layout's canvas padding into `CameraControlSystem`, which fits the camera against it and
|
|
3
|
+
* eases the view offset toward it, so the scene glides into a new framing (preview/layout transition,
|
|
4
|
+
* resize, sidebar toggle) instead of snapping.
|
|
5
|
+
*/
|
|
1
6
|
export declare const CameraPadding: () => null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useEffect as r}from"react";import{useResponsive as a}from"#package/ui-sdk";import{useConfigurator as t}from"../../application-runtime/index.js";export const CameraPadding=()=>{let{cameraControlSystem:i}=t(),{canvasPadding:e}=a();return r(()=>{i.setCanvasPadding(e)},[i,e]),null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLoader as e}from"@react-three/fiber";import{DRACOLoader as t,GLTFLoader as r,MeshoptDecoder as
|
|
1
|
+
import{useLoader as e}from"@react-three/fiber";import{DRACOLoader as t,GLTFLoader as r,MeshoptDecoder as o}from"three-stdlib";let s={wasm:null,js:null},l=e=>{let r="js"===globalThis.PHX_GLTF_DECODER?"js":"wasm";e.setDRACOLoader((e=>{let r=s[e];if(!r){let o,l,i,c,a;(l=new t).setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.5.7/"),void 0!==globalThis.PHX_GLTF_DECODER_WORKER_LIMIT&&l.setWorkerLimit(globalThis.PHX_GLTF_DECODER_WORKER_LIMIT),"js"===e&&l.setDecoderConfig({type:"js"}),i=l.decodeGeometry.bind(l),c=0,a=()=>{0==(c-=1)&&(o=setTimeout(()=>l.dispose(),1e3))},l.decodeGeometry=(e,t)=>{let r;clearTimeout(o),c+=1;try{r=i(e,t)}catch(e){throw a(),e}return r.then(a,a),r},r=l,s[e]=r}return r})(r)),"wasm"===r&&e.setMeshoptDecoder("function"==typeof o?o():o)};export const usePhxGltf=Object.assign(function(t){return e(r,t,l)},{preload(t){e.preload(r,t,l)},clear(t){e.clear(r,t)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import{memo as t,useEffect as m,useMemo as o}from"react";import{MeshPhysicalMaterial as
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import{memo as t,useEffect as m,useMemo as o}from"react";import{MeshPhysicalMaterial as i,MeshStandardMaterial as n}from"three";import{useCombinedQueries as s,useResourceQueryFactories as c}from"../../resources/index.js";import{applyRemoteMaterialOverride as l,cloneReplacementTexture as p,getMaterialOverrideTextureNames as f}from"./RemoteReplacedMaterial.js";import{ReplacedMaterialTransformations as d}from"./ReplacedMaterialTransformer.js";import{ReplacedMaterialTransitions as j}from"./ReplacedMaterialTransition.js";import{MATERIAL_KEEP_MS as x,useDisposeReplaced as M}from"./use-dispose-replaced.js";export const createLocalMaterial=(e,a,r)=>{let t="physical"===e.state.materialType?new i:new n;return l(e,t,a,r),t};export const LocalCreatedMaterial=t(t=>{let{overrideComponent:i,original:n,object:l}=t,u=o(()=>f(i),[i]),{createTextureQuery:N}=c(),R=s(u.map(N)),h=o(()=>R.map(p),[R]),L=o(()=>createLocalMaterial(i,u,h),[i,u,h]);return m(()=>(l.material=L,l.material.name=n.name,()=>{l.material=n}),[l,n,L]),M(L,x),M(h),a(r,{children:[e(d,{material:L,instanceName:i.componentInstance.instanceName}),e(j,{material:L,instanceName:i.componentInstance.instanceName})]})});
|
|
@@ -5,6 +5,11 @@ export type DeclarativeMaterialOverrideComponent = SceneEntityRemoteMaterialOver
|
|
|
5
5
|
export type DeclarativeMaterialOverrideSnapshot = ComponentSnapshot<DeclarativeMaterialOverrideComponent>;
|
|
6
6
|
export declare const applyRemoteMaterialOverride: (override: DeclarativeMaterialOverrideSnapshot, material: Material, textureNames: readonly string[], textures: readonly Texture[]) => void;
|
|
7
7
|
export declare const getMaterialOverrideTextureNames: (override: DeclarativeMaterialOverrideSnapshot) => string[];
|
|
8
|
+
/**
|
|
9
|
+
* Clones a cached texture for one replaced material. `Texture.clone()` marks the shared image source
|
|
10
|
+
* as changed, which makes three.js upload the cached image again; keep its version so it is not.
|
|
11
|
+
*/
|
|
12
|
+
export declare const cloneReplacementTexture: (texture: Texture) => Texture;
|
|
8
13
|
export interface RemoteReplacedMaterialProps {
|
|
9
14
|
overrideComponent: ComponentSnapshot<SceneEntityRemoteMaterialOverrideComponent | SceneEntityObjectRemoteMaterialOverrideComponent>;
|
|
10
15
|
original: Material;
|
|
@@ -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 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
|
|
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";import{MATERIAL_KEEP_MS as g,useDisposeReplaced as R}from"./use-dispose-replaced.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 f=["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=>f.flatMap(t=>{let a=e.state[t];return"string"==typeof a&&""!==a?[a]:[]});export const cloneReplacementTexture=e=>{let t=e.source.version,a=e.clone();return e.source.version=t,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]),f=m(u.map(h)),{createTextureQuery:I}=d(),C=M(v.map(I)),k=o(()=>C.map(cloneReplacementTexture),[C]),S=o(()=>{let e=f[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,k),a},[r,u,f,v,k]);return n(()=>(l.material=S,l.material.name=i.name,()=>{l.material=i}),[l,i,S]),R(S,g),R(k),t(a,{children:[e(U,{material:S,instanceName:r.componentInstance.instanceName}),e(y,{material:S,instanceName:r.componentInstance.instanceName})]})});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface Disposable {
|
|
2
|
+
dispose(): void;
|
|
3
|
+
}
|
|
4
|
+
/** How long the texture clones of an unmounted material stay alive before they are disposed. */
|
|
5
|
+
export declare const UNMOUNTED_DISPOSE_DELAY_MS = 10000;
|
|
6
|
+
/** How long a replaced or unmounted material stays alive before it is disposed. */
|
|
7
|
+
export declare const MATERIAL_KEEP_MS = 60000;
|
|
8
|
+
/**
|
|
9
|
+
* Disposes `resource` (a material, or the texture clones of one) once it has been replaced or its
|
|
10
|
+
* component has unmounted, late enough that what replaces it reuses its GPU state.
|
|
11
|
+
*
|
|
12
|
+
* Disposing a material releases its shader program, and a texture its GPU texture, once nothing
|
|
13
|
+
* else uses them; the next material with the same program then compiles it again, and the next
|
|
14
|
+
* texture of the same image uploads it again. Replaced materials often come back: an image export
|
|
15
|
+
* swaps scene objects to their export-state twins and back, a visitor tries finishes back and
|
|
16
|
+
* forth, and StrictMode remounts every component. So:
|
|
17
|
+
*
|
|
18
|
+
* - With `keepMs` (materials, cheap to keep), a replaced or unmounted resource stays alive for that
|
|
19
|
+
* long, and a material that returns meanwhile reuses its program.
|
|
20
|
+
* - Without it (texture clones, large), a replaced resource is disposed once its replacement has
|
|
21
|
+
* rendered a frame and holds the GPU texture, and an unmounted one after
|
|
22
|
+
* {@link UNMOUNTED_DISPOSE_DELAY_MS}.
|
|
23
|
+
*
|
|
24
|
+
* A remount of the same resources keeps them.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useDisposeReplaced: (resource: Disposable | readonly Disposable[], keepMs?: number) => void;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e;import{useFrame as r}from"@react-three/fiber";import{useEffect as t,useRef as o}from"react";export const UNMOUNTED_DISPOSE_DELAY_MS=1e4;export const MATERIAL_KEEP_MS=6e4;let s=new Map,a=()=>{e=void 0;let r=Date.now();for(let[e,t]of s)t<=r&&(s.delete(e),e.dispose());s.size>0&&(e=setTimeout(a,Math.max(0,Math.min(...s.values())-r)))},c=(r,t)=>{let o=Date.now()+t,c=s.size>0?Math.min(...s.values()):1/0;r.forEach(e=>s.set(e,o)),(void 0===e||o<c)&&(clearTimeout(e),e=setTimeout(a,t))};export const useDisposeReplaced=(e,a)=>{let n=o([]),u=o(!1);t(()=>(u.current=!1,()=>{u.current=!0,n.current.forEach(e=>c(e.resources,1e4)),n.current=[]}),[]),t(()=>{let r=Array.isArray(e)?e:[e];return r.forEach(e=>s.delete(e)),()=>{void 0!==a?c(r,a):u.current?c(r,1e4):n.current.push({resources:r,framesSeen:0})}},[e,a]),r(()=>{0!==n.current.length&&(n.current=n.current.filter(e=>(e.framesSeen+=1,!!(e.framesSeen<2)||(e.resources.forEach(e=>e.dispose()),!1))))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useCallback as t,useEffect as n,useMemo as a,useRef as o}from"react";import{P as r,match as s}from"ts-pattern";import{FrontendAnalyticsFactory as l,PhoenixLayoutElementWithChildren as i,PhoenixLayoutElements as u,useAnalyticsService as d,useIsDev as m,useIsFullscreenActive as p,useLocaleSwitch as b,useResolveLocalizable as c,useSetFullscreen as g,useShareLinks as h,useStoreSelector as k,useUndoRedo as T}from"#package/react-sdk";import{useConfigurator as B}from"../application-runtime/index.js";import{useAssistantPanel as f}from"./use-assistant-panel.js";import{useMeasurements as w}from"./use-measurements.js";import{useToolbarHelp as A}from"./use-toolbar-help.js";let v={undo:{id:"sdk.toolbar.undoRedo.undo.label",message:"Undo"},redo:{id:"sdk.toolbar.undoRedo.redo.label",message:"Redo"},enterFullscreen:{id:"sdk.toolbar.fullscreen.enter.label",message:"Open fullscreen"},exitFullscreen:{id:"sdk.toolbar.fullscreen.exit.label",message:"Exit fullscreen"},resetCamera:{id:"sdk.toolbar.camera.reset.label",message:"Reset camera"},shareToolbarButton:{id:"sdk.toolbar.share.open.label",message:"Share"},shareMenuAction:{id:"sdk.layout.menu.hamburger.share.label",message:"Share configuration"},measurementsToolbarButton:{id:"sdk.measurements",message:"Change measure"},measurementsMenuAction:{id:"sdk.layout.menu.measurements.label",message:"Change measure"},languageToolbarButton:{id:"sdk.toolbar.language.title",message:"Switch language"},languageMenuAction:{id:"sdk.layout.hamburgerMenu.language.label",message:"Change Language"},helpToolbarButton:{id:"sdk.toolbar.help.label",message:"Help"},helpMenuAction:{id:"sdk.layout.menu.hamburger.help.label",message:"Show help"},assistant:{id:"sdk.assistant.toolbarButton.label",message:"
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useCallback as t,useEffect as n,useMemo as a,useRef as o}from"react";import{P as r,match as s}from"ts-pattern";import{FrontendAnalyticsFactory as l,PhoenixLayoutElementWithChildren as i,PhoenixLayoutElements as u,useAnalyticsService as d,useIsDev as m,useIsFullscreenActive as p,useLocaleSwitch as b,useResolveLocalizable as c,useSetFullscreen as g,useShareLinks as h,useStoreSelector as k,useUndoRedo as T}from"#package/react-sdk";import{useConfigurator as B}from"../application-runtime/index.js";import{useAssistantPanel as f}from"./use-assistant-panel.js";import{useMeasurements as w}from"./use-measurements.js";import{useToolbarHelp as A}from"./use-toolbar-help.js";let v={undo:{id:"sdk.toolbar.undoRedo.undo.label",message:"Undo"},redo:{id:"sdk.toolbar.undoRedo.redo.label",message:"Redo"},enterFullscreen:{id:"sdk.toolbar.fullscreen.enter.label",message:"Open fullscreen"},exitFullscreen:{id:"sdk.toolbar.fullscreen.exit.label",message:"Exit fullscreen"},resetCamera:{id:"sdk.toolbar.camera.reset.label",message:"Reset camera"},shareToolbarButton:{id:"sdk.toolbar.share.open.label",message:"Share"},shareMenuAction:{id:"sdk.layout.menu.hamburger.share.label",message:"Share configuration"},measurementsToolbarButton:{id:"sdk.measurements",message:"Change measure"},measurementsMenuAction:{id:"sdk.layout.menu.measurements.label",message:"Change measure"},languageToolbarButton:{id:"sdk.toolbar.language.title",message:"Switch language"},languageMenuAction:{id:"sdk.layout.hamburgerMenu.language.label",message:"Change Language"},helpToolbarButton:{id:"sdk.toolbar.help.label",message:"Help"},helpMenuAction:{id:"sdk.layout.menu.hamburger.help.label",message:"Show help"},assistant:{id:"sdk.assistant.toolbarButton.label",message:"AI assistant"}},C=(e,t,n=!1)=>({key:e,icon:t?.icon,showTitle:t?.showTitle??n});export const useToolbarActions=(M="desktop")=>{let{layoutSystem:P,cameraControlSystem:x}=B(),S=k(e=>P.getToolbarState(e.state),[P])[M],y=d(),$=c(),F=m(),R=T(),j=p(),L=g(),E=h({enabled:!1}),G=w(),I=b(),D=f(),O=A(),U=t(()=>{y.push(l.FullScreenModeToggled()),L(!j)},[y,L,j]),H=t(()=>{x.resetCamera()},[x]),W=t(()=>{D.setOpen(!D.open)},[D]),q=o(new WeakMap),z=t((e,t)=>{let n=q.current.get(e);if(n)return n;let a=()=>t();return q.current.set(e,a),a},[]),J=a(()=>{let t=[],n=(n,a)=>s(n).returnType().with({kind:"undoToolbarButton"},e=>({...C(a,e.props),kind:"undo",label:$(v.undo),disabled:!R.canUndo,run:R.undo})).with({kind:"redoToolbarButton"},e=>({...C(a,e.props),kind:"redo",label:$(v.redo),disabled:!R.canRedo,run:R.redo})).with({kind:r.union("enterFullscreenToolbarButton","exitFullscreenToolbarButton")},e=>({...C(a,e.props),kind:"fullscreen",label:$(j?v.exitFullscreen:v.enterFullscreen),active:j,run:U})).with({kind:"resetCameraToolbarButton"},e=>({...C(a,e.props),kind:"resetCamera",label:$(v.resetCamera),run:H})).with({kind:r.union("shareToolbarButton","shareMenuAction")},e=>E.available?{...C(a,e.props),kind:"share",label:$(v[e.kind])}:null).with({kind:r.union("measurementsToolbarButton","measurementsMenuAction")},e=>{let t=e.props?.showIndicatorSwitch??G.hasIndicatorSwitch,n=G.units.length>1||t;return n?{...C(a,void 0),kind:"measurements",label:$(v[e.kind]),measurements:{...G,hasIndicatorSwitch:t,available:n},icons:e.props?.icons}:null}).with({kind:r.union("languageToolbarButton","languageMenuAction")},e=>I.available?{...C(a,void 0),kind:"language",label:$(v[e.kind]),language:I}:null).with({kind:r.union("helpToolbarButton","helpMenuAction")},t=>{let{children:n}=t,o=void 0!==n?z(t,()=>e(u,{elements:n})):O;return o?{...C(a,t.props),kind:"help",label:$(v[t.kind]),Content:o}:null}).with({kind:"assistantToolbarButton"},e=>D.available?{...C(a,e.props,!0),kind:"assistant",label:$(v.assistant),assistant:D,run:W}:null).with({kind:"customLayoutElement"},t=>({...C(a,void 0),kind:"custom",label:t.props.name,name:t.props.name,Element:z(t,()=>e(i,{kind:t.kind,elementProps:t.props,children:t.children}))})).with({kind:r.union("toolbarButtonGroup","adminConnectedResourcePage","adminDataTableActions","adminDataTablePage","adminPresetActions","adminPresetCategoryActions","adminPresetCategoryPage","adminPresetListPage","adminRecipeActions","adminRecipeCollectionPage","enterSummaryButton","footerPrice","mainFooterActions","nextStepButton","otherActions","previousStepButton","saveTemplateButton","stepLabel","stepProgress")},e=>(t.push(e.kind),null)).exhaustive(),a=(e,t)=>{if("toolbarButtonGroup"!==e.kind){let a=n(e,`${t}-0`);return a?[a]:[]}return(e.children??[]).flatMap((e,o)=>"toolbarButtonGroup"===e.kind?a(e,`${t}-${o}`):n(e,`${t}-${o}`)??[])},o=(S??[]).map((e,t)=>a(e,`${M}-${t}`)).filter(e=>e.length>0);return{groups:o,actions:o.flat(),unsupported:t}},[S,M,$,R,j,U,H,E.available,G,I,D,W,O,z]),K=J.unsupported.join(", ");return n(()=>{F&&K&&console.warn(`useToolbarActions('${M}') leaves out elements that are not toolbar entries: ${K}.`)},[F,M,K]),a(()=>({groups:J.groups,actions:J.actions}),[J])};
|
|
@@ -35,12 +35,12 @@ export interface ThemeableAssistantToolChipsProps {
|
|
|
35
35
|
* The components used for each slot inside a row of tool calls.
|
|
36
36
|
*
|
|
37
37
|
* - `root` — The row (`div`).
|
|
38
|
-
* - `activity` — The frame of the turning icon (`span`).
|
|
38
|
+
* - `activity` — The frame of the turning icon, or of Undo in its place (`span`).
|
|
39
39
|
* - `activityIcon` — The icon that turns while the assistant works on the row (`PhxIcon`).
|
|
40
40
|
* - `chip` — The note of one call, or of its screenshots (`span`).
|
|
41
41
|
* - `chipLabel` — The text of a call's note (`span`).
|
|
42
42
|
* - `screenshotsLink` — The label that opens a call's screenshots (`span`).
|
|
43
|
-
* - `undoButton` — The Undo control
|
|
43
|
+
* - `undoButton` — The Undo control in place of the resting icon, with its tooltip (`ButtonBase`).
|
|
44
44
|
* - `violation` — A line of a failed call's tooltip, one per violation (`span`).
|
|
45
45
|
* - `fullLabel` — The full text of a cut note, at the top of its tooltip (`span`).
|
|
46
46
|
*/
|
|
@@ -82,9 +82,9 @@ export interface AssistantToolChipsProps {
|
|
|
82
82
|
/**
|
|
83
83
|
* A row of notes on what the assistant did in a reply, one per tool call, and one for the
|
|
84
84
|
* screenshots of a call that took any. A click on a call's note logs the input and the result of
|
|
85
|
-
* its call to the console. While one of the row's changes is the step
|
|
86
|
-
*
|
|
87
|
-
*
|
|
85
|
+
* its call to the console. While one of the row's changes is the step of the undo history the
|
|
86
|
+
* configuration is at, an Undo in place of the row's icon takes the row's changes back, up to a
|
|
87
|
+
* change the user made in between.
|
|
88
88
|
*/
|
|
89
89
|
export declare const AssistantToolChips: import("react").MemoExoticComponent<(inProps: AssistantToolChipsProps & ThemeableAssistantToolChipsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
90
90
|
export interface AssistantActivityRowProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as i}from"react/jsx-runtime";import{ButtonBase as o,Tooltip as
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as i}from"react/jsx-runtime";import{ButtonBase as o,Tooltip as s,styled as n,useThemeProps as a}from"@mui/material";import{memo as l,useCallback as r,useMemo as c,useRef as d,useState as h}from"react";import{match as m}from"ts-pattern";import{useLocalizable as p}from"#package/react-sdk";import{PhxIcon as u,hoverStyles as f}from"#package/ui-sdk";import{AssistantPopover as v}from"./popover/index.js";import{assistantReferenceStyles as g}from"./reference-link/index.js";import{ScreenshotThumbnails as y,readToolScreenshots as k}from"./screenshots/index.js";let b="PhxAssistantToolChips",x={id:"sdk.assistant.tool.updateDesign.label",message:"Update design"},w={id:"sdk.assistant.tool.readDesign.label",message:"Read design"},L={id:"sdk.assistant.tool.mistake.hint",message:"The assistant made a mistake."},C={id:"sdk.assistant.tool.cancelled.hint",message:"Stopped before it finished."},A={id:"sdk.assistant.tool.noResult.hint",message:"The result of this step was lost. It may or may not have been done."},I={id:"sdk.assistant.tool.toolBudget.hint",message:"Not done: the assistant reached its limit of steps for one message."},S={id:"sdk.assistant.tool.undo.label",message:"Undo what the assistant did"},B={id:"sdk.assistant.tool.screenshots.label",message:"{count, plural, one {# screenshot} other {# screenshots}}"},D=n("div",{name:b,slot:"root"})(({theme:{palette:t,spacing:e,typography:i}})=>({...i.caption,alignItems:"start",color:t.text.secondary,display:"grid",gap:e(.75),gridTemplateColumns:"min-content minmax(0, 1fr)"})),P=n("span",{name:b,slot:"activity"})(({theme:{typography:t}})=>({blockSize:`calc(${t.caption.lineHeight} * 1em)`,display:"grid",placeItems:"center"})),R=n(u,{name:b,slot:"activityIcon"})({fontSize:14,'[data-chips="active"] &':{animation:"phx-assistant-turn 2400ms linear infinite","@media (prefers-reduced-motion: reduce)":{animation:"none"}},"@keyframes phx-assistant-turn":{to:{rotate:"360deg"}}}),j={},z=t=>{let{slots:e={},slotProps:i=j}=a({props:t,name:b});return{slots:c(()=>({Root:e.root??D,Activity:e.activity??P,ActivityIcon:e.activityIcon??R,Chip:e.chip??U,ChipLabel:e.chipLabel??V,ScreenshotsLink:e.screenshotsLink??$,UndoButton:e.undoButton??F,Violation:e.violation??W,FullLabel:e.fullLabel??_}),[e.root,e.activity,e.activityIcon,e.chip,e.chipLabel,e.screenshotsLink,e.undoButton,e.violation,e.fullLabel]),slotProps:i}},T=({isActive:e,slots:i,slotProps:o})=>{let s=c(()=>e?-(performance.now()%2400):0,[e]);return t(i.ActivityIcon,{name:"Gear",...o.activityIcon,style:{...o.activityIcon?.style,animationDelay:`${s}ms`}})},U=n("span",{name:b,slot:"chip"})(({theme:{palette:t,spacing:e}})=>({cursor:"default",display:"inline-flex",maxInlineSize:"100%",verticalAlign:"top",whiteSpace:"nowrap","&:not(:last-of-type)::after":{color:t.text.secondary,content:'"\xb7"',flexShrink:0,marginInline:e(.75)}})),$=n("span",{name:b,slot:"screenshotsLink"})(g),F=n(o,{name:b,slot:"undoButton"})(({theme:{palette:t}})=>({animation:"phx-assistant-undo-in 150ms ease-out",borderRadius:"50%",color:t.primary.main,fontSize:14,margin:-3,padding:3,...f({"&:hover":{background:t.action.hover}}),"&:focus-visible":{outline:`2px solid ${t.primary.main}`},"@media (prefers-reduced-motion: reduce)":{animation:"none"},"@keyframes phx-assistant-undo-in":{from:{opacity:0}}})),V=n("span",{name:b,slot:"chipLabel"})(({theme:{palette:t}})=>({minInlineSize:0,overflow:"hidden",textOverflow:"ellipsis",'[data-chip="failed"] > &':{textDecoration:"line-through",textDecorationColor:t.error.main}})),W=n("span",{name:b,slot:"violation"})({display:"block"}),_=n("span",{name:b,slot:"fullLabel"})({display:"block"}),E=l(({tool:o,slots:n,slotProps:a})=>{let{chip:l,input:c,result:u}=o,f=p(x),v=p(w),g=p(L),y=p(C),k=p(A),b=p(I),S=d(null),[B,D]=h(!1),P=m(l.label).with({kind:"text"},({text:t})=>t).with({kind:"updateDesign"},()=>f).with({kind:"readDesign"},()=>v).exhaustive(),R=r(()=>{console.info(`Assistant tool call "${P}"`,{input:c,result:u})},[c,P,u]),j=r(()=>{let t=S.current;D(null!=t&&t.scrollWidth>t.clientWidth)},[]),z=m(l).with({errorCode:"cancelled"},()=>y).with({errorCode:"no_result"},()=>k).with({errorCode:"tool_budget"},()=>b).when(({violations:t})=>t.length>0,({violations:e})=>e.map((e,i)=>t(n.Violation,{...a.violation,children:e},i))).with({state:"failed"},()=>g).otherwise(()=>""),T=B?e(i,{children:[t(n.FullLabel,{...a.fullLabel,children:P}),z]}):z;return t(s,{title:T,placement:"top-start",children:t(n.Chip,{...a.chip,onClick:R,onPointerEnter:j,"data-chip":l.state,children:t(n.ChipLabel,{...a.chipLabel,ref:S,children:P})})})}),G=l(({screenshots:e,slots:i,slotProps:o})=>{let s=p({...B,values:{count:e.length}});return t(i.Chip,{...o.chip,"data-chip":"screenshots",children:t(v,{title:i=>t(y,{screenshots:e,onImageLoad:i}),children:e=>t(i.ScreenshotsLink,{...o.screenshotsLink,...e,children:s})})})}),H=({tool:o,slots:s,slotProps:n})=>{let a=c(()=>k(o.result),[o.result]);return e(i,{children:[t(E,{tool:o,slots:s,slotProps:n}),a.length>0&&t(G,{screenshots:a,slots:s,slotProps:n})]})};export const AssistantToolChips=l(i=>{let{tools:o,isActive:n,canUndo:a,onUndo:l,...c}=i,{slots:d,slotProps:h}=z(c),m=p(S),f=r(()=>{l(new Set(o.map(({id:t})=>t)))},[l,o]);return e(d.Root,{...h.root,"data-chips":n?"active":"done","aria-busy":n,children:[t(d.Activity,{...h.activity,children:a?t(s,{title:m,placement:"top",children:t(d.UndoButton,{"aria-label":m,...h.undoButton,onClick:f,children:t(u,{name:"ArrowCounterClockwise",fontSize:"inherit"})})}):t(T,{isActive:n,slots:d,slotProps:h})}),t("div",{children:o.map(e=>t(H,{tool:e,slots:d,slotProps:h},e.id))})]})});export const AssistantActivityRow=({label:i})=>{let{slots:o,slotProps:s}=z({});return e(o.Root,{...s.root,"data-chips":"active","aria-busy":!0,children:[t(o.Activity,{...s.activity,children:t(T,{isActive:!0,slots:o,slotProps:s})}),t("div",{children:i})]})};
|
|
@@ -46,7 +46,7 @@ export interface ThemeableAssistantComposerProps {
|
|
|
46
46
|
* - `input` — The message input (`InputBase`).
|
|
47
47
|
* - `toolButton` — The Attach and Annotate controls (`IconButton`).
|
|
48
48
|
* - `sendButton` — The Send control, of a message and of a recording (`IconButton`).
|
|
49
|
-
* - `micButton` — The control that records a voice message, in place of Send while the input is empty (`IconButton`).
|
|
49
|
+
* - `micButton` — The control that records a voice message, in place of Send while the input is empty and nothing is attached (`IconButton`).
|
|
50
50
|
* - `recordingBar` — The bar that stands in for the input while a voice message is recorded (`div`). It takes the
|
|
51
51
|
* focus while it stands in, so Enter sends and Escape drops the recording: a replacement forwards its `ref` and
|
|
52
52
|
* `tabIndex` to its element.
|
|
@@ -100,8 +100,9 @@ export interface ThemeableAssistantComposerProps {
|
|
|
100
100
|
* and shown as thumbnails that can be removed; the message, its attachments and their limit are
|
|
101
101
|
* `useAssistantComposer`'s.
|
|
102
102
|
*
|
|
103
|
-
* When the session takes voice messages, a mic stands in for Send while the input is empty
|
|
104
|
-
*
|
|
103
|
+
* When the session takes voice messages, a mic stands in for Send while the input is empty and
|
|
104
|
+
* nothing is attached: an attachment alone is sent with Send. A recording replaces the input with a
|
|
105
|
+
* bar that can drop it, and Send sends it with the attachments, which can be added while it runs.
|
|
105
106
|
* A microphone blocked for the page is crossed out, with a note where to allow it.
|
|
106
107
|
*/
|
|
107
108
|
export declare const AssistantComposer: (inProps: ThemeableAssistantComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{IconButton as n,Tooltip as o,styled as i,useThemeProps as r}from"@mui/material";import{useCallback as s,useEffect as l,useRef as d,useState as c}from"react";import{useLocalizable as m}from"#package/react-sdk";import{PhxIcon as p,hoverStyles as u,useResponsive as h}from"#package/ui-sdk";import{AnnotationBadge as g}from"./annotation/index.js";import{AssistantComposerName as b,ComposerField as f,ComposerFrame as k,ComposerInput as v,ComposerPrimaryButton as y,ComposerToolButton as S}from"./composer/index.js";import{AssistantDisclaimerDialog as B,AssistantDisclaimerLine as x}from"./disclaimer/index.js";import{useAssistantComposer as z}from"./use-assistant-composer.js";import{RecordingBar as D}from"./voice/index.js";let w={id:"sdk.assistant.composer.placeholder",message:"Ask or tell me what to change…"},C={id:"sdk.assistant.composer.send.label",message:"Send"},A={id:"sdk.assistant.composer.stop.label",message:"Stop"},E={id:"sdk.assistant.composer.attach.label",message:"Attach images"},R={id:"sdk.assistant.composer.annotate.label",message:"Annotate with drawings and comments"},P={id:"sdk.assistant.composer.attachment.remove",message:"Remove image"},j={id:"sdk.assistant.composer.attachment.annotate",message:"Annotate image"},T={id:"sdk.assistant.composer.annotation.remove",message:"Remove annotation"},M={id:"sdk.assistant.composer.attachment.unreadable",message:"Unsupported image format."},F={id:"sdk.assistant.composer.record.label",message:"Record a voice message"},N={id:"sdk.assistant.composer.recording.send",message:"Send voice message"},L={id:"sdk.assistant.composer.record.blocked",message:"Microphone access is blocked. Allow it in your browser's site settings."},K={id:"sdk.assistant.composer.attachment.limit",message:"You can attach up to {max} images."},I=i("form",{name:b,slot:"root"})(({theme:{palette:e,spacing:t}})=>({borderBlockStart:`1px solid ${e.divider}`,display:"grid",gap:t(.75),paddingBlock:t(1.25),paddingInline:`var(--phx-sidebar-padding, ${t(2)})`})),O=i("div",{name:b,slot:"attachments"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(1),gridColumn:"1 / -1",paddingBlockStart:e(.75)})),$=i("div")({cursor:"default",display:"flex",justifySelf:"start"}),U=i("div",{name:b,slot:"attachment"})(({theme:{palette:e,shape:t}})=>({blockSize:56,border:`1px solid ${e.divider}`,borderRadius:t.borderRadius,inlineSize:56,overflow:"hidden",position:"relative"})),W=i("img")({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),q=i(n,{name:b,slot:"removeAttachment"})(({theme:{palette:e}})=>({background:e.background.paper,insetBlockStart:2,insetInlineEnd:2,padding:2,position:"absolute","&:hover":{background:e.background.paper}})),H=i(n,{name:b,slot:"annotateAttachment"})(({theme:{palette:e}})=>({background:e.background.paper,insetBlockEnd:2,insetInlineStart:2,padding:2,position:"absolute","&:hover":{background:e.background.paper}})),X=i(n,{name:b,slot:"stopButton"})(({theme:{palette:e}})=>({background:e.text.primary,borderRadius:8,color:e.background.paper,padding:4,"&:hover":{background:e.text.primary},...u({"&:hover":{background:e.text.secondary}})})),Y=i("span")({background:"currentColor",blockSize:10,borderRadius:2,inlineSize:10,margin:5}),G=i("div",{name:b,slot:"hint"})(({theme:{palette:e,typography:t}})=>({...t.caption,color:e.text.secondary})),J=i("div",{name:b,slot:"attachmentNotice"})(({theme:{palette:e,typography:t}})=>({...t.caption,color:e.error.main})),Q=i("input")({display:"none"}),V=i(y,{name:b,slot:"micButton"})(({theme:{palette:e}})=>({'&[data-blocked="true"], &[data-blocked="true"]:hover':{background:e.action.disabledBackground,color:e.text.secondary}}));export const AssistantComposer=n=>{let{slots:i={},slotProps:u={}}=r({props:n,name:b}),{draft:Z,setDraft:_,attachments:ee,addFiles:et,annotate:ea,annotateAttachment:en,removeAttachment:eo,notice:ei,maxAttachments:er,isBusy:es,isPreparing:el,isLocked:ed,isReplying:ec,canSend:em,send:ep,stop:eu,inputFocusHandlers:eh,canAttach:eg,canAnnotate:eb,canRecord:ef,recording:ek,startRecording:ev,sendRecording:ey,cancelRecording:eS}=z(),[eB,ex]=c(!1),ez=d(null),eD=d(null),{isDesktop:ew}=h(),eC=m(w),eA=m(C),eE=m(A),eR=m(E),eP=m(R),ej=m(j),eT=m(P),eM=m(T),eF=m(M),eN=m({...K,values:{max:er}}),eL=m(F),eK=m(N),eI=m(L),eO="recording"===ek.status||"recorded"===ek.status,e$=ef&&!Z.trim()&&0===ee.length,eU=ef&&"refused"===ek.status,eW=s(async()=>{em&&!ew&&ez.current?.blur(),await ep()},[em,ew,ep]),eq=s(e=>{e.preventDefault(),eO?ey():eW()},[eO,eW,ey]);l(()=>{ew&&ez.current?.focus()},[]);let eH=d(null),eX=d(null),eY=d(eO);l(()=>{var e;let t,a=(e=eH.current,(t=e?.getRootNode())instanceof ShadowRoot?t.activeElement??(document.activeElement===document.body?null:document.activeElement):document.activeElement===document.body?null:document.activeElement),n=null===a||(eH.current?.contains(a)??!1);n&&eO&&!eX.current?.contains(a)?eX.current?.focus():n&&!eO&&eY.current&&ew&&ez.current?.focus(),eY.current=eO},[eO,es,ew]);let eG=u.root?.onKeyDown,eJ=s(e=>{if(eG?.(e),!e.defaultPrevented&&eO&&!e.nativeEvent.isComposing){if("Escape"===e.key){e.preventDefault(),e.stopPropagation(),es||eS();return}"Enter"===e.key&&!(e.target instanceof HTMLButtonElement)&&(e.preventDefault(),e.repeat||es||el||ey())}},[eS,eO,es,el,eG,ey]),eQ=s(e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),eW())},[eW]),[eV,eZ]=c(!1),e_=s(()=>eZ(!0),[]),e1=s(()=>eZ(!1),[]),e0=s(e=>{e.target===e.currentTarget&&(e.preventDefault(),ez.current?.focus())},[]),e2=s(e=>{let t=[...e.target.files??[]];e.target.value="",et(t)},[et]),e5=s(e=>{let t=[...e.clipboardData.files].filter(e=>e.type.startsWith("image/"));eg&&0!==t.length&&(e.preventDefault(),et(t))},[et,eg]),e6=s(e=>{eg&&!ed&&e.dataTransfer.types.includes("Files")&&(e.preventDefault(),e.dataTransfer.dropEffect="copy",ex(!0))},[eg,ed]),e7=s(e=>{e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget)||ex(!1)},[]),e4=s(e=>{eg&&!ed&&0!==e.dataTransfer.files.length&&(e.preventDefault(),ex(!1),et([...e.dataTransfer.files]))},[et,eg,ed]),e8=i.root??I,e3=i.inputFrame??k,e9=i.attachments??O,te=i.attachment??U,tt=i.removeAttachment??q,ta=i.annotateAttachment??H,tn=i.input??v,to=i.toolButton??S,ti=i.sendButton??y,tr=i.micButton??V,ts=i.stopButton??X,tl=i.hint??G,td=i.attachmentNotice??J;return t(a,{children:[t(e8,{...u.root,ref:eH,onSubmit:eq,onKeyDown:eJ,onDragOver:e6,onDragLeave:e7,onDrop:e4,children:[t(e3,{...u.inputFrame,"data-dragging":eB,onMouseDown:e0,children:[ee.length>0&&e(e9,{...u.attachments,children:ee.map(a=>t(te,{...u.attachment,children:[e(W,{src:a.previewUrl,alt:""}),a.isAnnotation?e(g,{count:a.pinCount}):eg&&eb&&e(ta,{size:"small","aria-label":ej,...u.annotateAttachment,disabled:es||ed,onClick:()=>void en(a.id),children:e(p,{name:"PencilSimpleLine",sx:{fontSize:12}})}),e(tt,{size:"small","aria-label":a.isAnnotation?eM:eT,...u.removeAttachment,disabled:es,onClick:()=>eo(a.id),children:e(p,{name:"X",sx:{fontSize:12}})})]},a.id))}),eO?e(D,{ref:eX,slot:i.recordingBar,slotProps:u.recordingBar,isRecording:"recording"===ek.status,elapsedMs:ek.elapsedMs,level:ek.level,disabled:es,onDiscard:eS}):e(f,{children:e(tn,{multiline:!0,maxRows:6,placeholder:eC,...u.input,inputProps:{...u.input?.inputProps,"aria-label":eC},value:Z,readOnly:es,disabled:ed,inputRef:ez,onChange:e=>_(e.target.value),onKeyDown:eQ,onPaste:e5,onFocus:eh.onFocus,onBlur:eh.onBlur})}),t($,{children:[eg&&e(o,{title:eR,placement:"top",children:e("span",{children:e(to,{size:"small","aria-label":eR,...u.toolButton,disabled:es||ed,onClick:()=>eD.current?.click(),children:e(p,{name:"Paperclip",fontSize:"small"})})})}),eb&&e(o,{title:eP,placement:"top",children:e("span",{children:e(to,{size:"small","aria-label":eP,...u.toolButton,disabled:es||ed,onClick:()=>void ea(),children:e(p,{name:"PencilSimpleLine",fontSize:"small"})})})})]}),eg&&e(Q,{ref:eD,type:"file",accept:"image/*",multiple:!0,onChange:e2}),ec?e(o,{title:eE,placement:"top",children:e(ts,{size:"small","aria-label":eE,...u.stopButton,onClick:eu,children:e(Y,{})})}):eO?e(o,{title:eK,placement:"top",children:e("span",{children:e(ti,{size:"small","aria-label":eK,...u.sendButton,type:"submit",disabled:es||el,children:e(p,{name:"PaperPlaneRightBold",fontSize:"small"})})})}):e$?e(o,{title:eL,placement:"top",children:e("span",{children:e(tr,{size:"small","aria-label":eL,...u.micButton,"data-blocked":eU,disabled:es||"requesting"===ek.status,onClick:()=>void ev(),children:e(p,{name:eU?"MicrophoneSlash":"Microphone",fontSize:"small"})})})}):e(o,{title:eA,placement:"top",children:e("span",{children:e(ti,{size:"small","aria-label":eA,...u.sendButton,type:"submit",disabled:!em,children:e(p,{name:"PaperPlaneRightBold",fontSize:"small"})})})})]}),ei?e(td,{role:"status",...u.attachmentNotice,children:"limit"===ei?eN:eF}):eU&&e$?e(td,{role:"status",...u.attachmentNotice,children:eI}):e(tl,{...u.hint,children:e(x,{onLearnMore:e_})})]}),e(B,{isOpen:eV,onClose:e1})]})};
|
|
@@ -16,15 +16,16 @@ declare module '@mui/material/styles' {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* The attribute the panel carries on its root. The layouts key their styles on it:
|
|
20
|
-
*
|
|
19
|
+
* The attribute the panel carries on its root. The layouts key their styles on it: they place the panel
|
|
20
|
+
* over the sidebar's tabs, header and property pages and leave the sidebar footer below it, hide what
|
|
21
|
+
* the panel covers, and stretch a sidebar shorter than its slot to the height the panel needs.
|
|
21
22
|
*/
|
|
22
23
|
export declare const ASSISTANT_PANEL_SLOT = "slot[assistant]";
|
|
23
24
|
export interface ThemeableAssistantPanelProps {
|
|
24
25
|
/**
|
|
25
26
|
* The components used for each slot inside the panel.
|
|
26
27
|
*
|
|
27
|
-
* - `root` — The panel's shell (`section`), which covers the sidebar it is rendered in.
|
|
28
|
+
* - `root` — The panel's shell (`section`), which covers the sidebar it is rendered in, all but its footer.
|
|
28
29
|
* - `header` — The title and the close control. Takes no props; a replacement closes the panel with `useAssistantPanel`.
|
|
29
30
|
* - `thread` — The conversation. Takes no props; a replacement reads it with `useAssistantThread`.
|
|
30
31
|
* - `composer` — The message input. Takes no props; a replacement writes and sends with `useAssistantComposer`.
|
|
@@ -46,7 +47,8 @@ export interface ThemeableAssistantPanelProps {
|
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* The built-in assistant panel: a header with the title and a close control, the thread and the
|
|
49
|
-
* composer. It covers the sidebar it is rendered in,
|
|
50
|
+
* composer. It covers the sidebar it is rendered in, all but the sidebar footer, which stays usable below
|
|
51
|
+
* it (hidden on a phone while the message input has focus), and renders nothing while it is closed or when
|
|
50
52
|
* the application spec has no `assistant` section.
|
|
51
53
|
*
|
|
52
54
|
* The shell stays the panel's whatever its slots are: it carries the attribute the layouts hide and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{styled as s,useThemeProps as r}from"@mui/material";import{useLocalizable as a}from"#package/react-sdk";import{AssistantComposer as o}from"./AssistantComposer.js";import{AssistantThread as n}from"./AssistantThread.js";import{AssistantPanelHeader as i}from"./panel/index.js";import{useIsAssistantPanelOpen as m}from"./use-is-assistant-panel-open.js";let l="PhxAssistantPanel",p={id:"sdk.assistant.panel.title",message:"
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{styled as s,useThemeProps as r}from"@mui/material";import{useLocalizable as a}from"#package/react-sdk";import{AssistantComposer as o}from"./AssistantComposer.js";import{AssistantThread as n}from"./AssistantThread.js";import{AssistantPanelHeader as i}from"./panel/index.js";import{useIsAssistantPanelOpen as m}from"./use-is-assistant-panel-open.js";let l="PhxAssistantPanel",p={id:"sdk.assistant.panel.title",message:"AI assistant"};export const ASSISTANT_PANEL_SLOT="slot[assistant]";let d=s("section",{name:l,slot:"root"})(({theme:{palette:t}})=>({background:`var(--phx-sidebar-background, ${t.background.paper})`,border:"var(--phx-sidebar-border, 0)",borderRadius:"inherit",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inset:0,overflow:"hidden",position:"absolute",zIndex:1})),u=t=>{t.target instanceof Element&&t.target.closest('button, [role="button"]')&&t.preventDefault()};export const AssistantPanel=s=>{let{slots:c={},slotProps:b={}}=r({props:s,name:l}),f=m(),x=a(p);if(!f)return null;let g=c.root??d,h=c.header??i,A=c.thread??n,j=c.composer??o;return e(g,{"aria-label":x,...b.root,"data-sidebar":"slot[assistant]",onMouseDown:u,children:[t(h,{}),t(A,{}),t(j,{})]})};
|