@salsita-ai/sdk 0.50.0-develop.aec0f535bf → 0.50.0-develop.af031dec0f
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 +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -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/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/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 +16 -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 +47 -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 +15 -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 +23 -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 +1 -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-assistant.d.ts +42 -5
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +4 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.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/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +2 -2
- 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/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/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5290 -1754
- 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 +44 -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 +91 -33
- 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 +43 -37
- 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 +2 -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 +29 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.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 +38 -9
- 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/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/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/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/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/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/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 +2 -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/docs/index.json +22 -2
- 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 +10 -11
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +81 -35
- 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 +1 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +89 -53
- package/dist/docs/phoenix/project-structure.mdx +7 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +56 -27
- package/dist/docs/phoenix/sessions-and-access.mdx +9 -6
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhooks.mdx +55 -3
- 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 +14 -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 +17 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.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/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/app-metadata.d.ts +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +28 -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 +30 -2
- 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 +3 -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/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 +24 -2
- 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/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/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 +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- 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/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 +440 -53
- 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 +1 @@
|
|
|
1
|
-
import{useEffect as r,useLayoutEffect as e,useRef as t}from"react";let n=Symbol("no attempt");export const useLoadOlderOnTop=(l,c,{enabled:o,onReachTop:u,firstItemKey:s})=>{let i=t(null),p=t(n),a=t(null),d=t({onReachTop:u,firstItemKey:s});d.current={onReachTop:u,firstItemKey:s},r(()=>{let r=l.current;if(!r)return;let e=()=>{null!==i.current&&(i.current=r.scrollHeight-r.scrollTop),a.current&&Math.abs(r.scrollTop-a.current.scrollTop)>1&&(a.current=null)},t=
|
|
1
|
+
import{useEffect as r,useLayoutEffect as e,useRef as t}from"react";let n=Symbol("no attempt");export const useLoadOlderOnTop=(l,c,{enabled:o,onReachTop:u,firstItemKey:s})=>{let i=t(null),p=t(n),a=t(null),d=t({onReachTop:u,firstItemKey:s});d.current={onReachTop:u,firstItemKey:s},r(()=>{let r=l.current;if(!r)return;let e=()=>{null!==i.current&&(i.current=r.scrollHeight-r.scrollTop),a.current&&Math.abs(r.scrollTop-a.current.scrollTop)>1&&(a.current=null)},t=e=>{a.current&&(e.target instanceof Element&&e.target.getBoundingClientRect().top<r.getBoundingClientRect().top&&(r.scrollTop=r.scrollHeight-a.current.distanceFromEnd),a.current={distanceFromEnd:r.scrollHeight-r.scrollTop,scrollTop:r.scrollTop})};return r.addEventListener("scroll",e,{passive:!0}),r.addEventListener("load",t,!0),()=>{r.removeEventListener("scroll",e),r.removeEventListener("load",t,!0)}},[l]),r(()=>{let r=l.current,e=c.current;if(!o||!r||!e)return;let t=new IntersectionObserver(([e])=>{if(!e?.isIntersecting){p.current=n;return}p.current!==d.current.firstItemKey&&(p.current=d.current.firstItemKey,a.current=null,i.current=r.scrollHeight-r.scrollTop,d.current.onReachTop())},{root:r});return t.observe(e),()=>t.disconnect()},[o,l,c]),e(()=>{let r=l.current;r&&null!==i.current&&(r.scrollTop=r.scrollHeight-i.current,a.current={distanceFromEnd:i.current,scrollTop:r.scrollTop}),i.current=null},[s,l])};
|
package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts}
RENAMED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* still ends. StrictMode unmounts and mounts a component again at once in development, so the end
|
|
4
4
|
* waits a task and is dropped when the component mounted again meanwhile.
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const useOnUnmount: (end: () => void) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as r,useRef as t}from"react";export const useOnUnmount=e=>{let n=t(e),u=t(!1);n.current=e,r(()=>(u.current=!0,()=>{u.current=!1,setTimeout(()=>{u.current||n.current()})}),[])};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { LayoutSlots } from './slots/index.js';
|
|
2
2
|
export * from './universal/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{LayoutSlots}from"./slots/index.js";export*from"./universal/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{Box as a}from"@mui/material";import{useDetectGPU as i}from"@react-three/drei";import{Canvas as o,useThree as n}from"@react-three/fiber";import{memo as s,useCallback as p,useEffect as l,useMemo as c,useState as f}from"react";import{BuiltInLoadingPhase as m,
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{Box as a}from"@mui/material";import{useDetectGPU as i}from"@react-three/drei";import{Canvas as o,useThree as n}from"@react-three/fiber";import{memo as s,useCallback as p,useEffect as l,useMemo as c,useState as f}from"react";import{BuiltInLoadingPhase as m,useEagerObservableValue as d,useExpectPhase as h,useIsLoaderHosted as u,useLoadingPhase as g,useStoreSelector as x}from"#package/react-sdk";import{useResponsive as v}from"#package/ui-sdk";import{useConfigurator as C}from"../../../../application-runtime/index.js";import{Scene as P,SceneEnvironment as w}from"../../../../scene/index.js";import{CanvasLoader as j}from"../../../phoenix-layout-elements/index.js";import{GPUIssuePage as D}from"./GPUIssuePage.js";let E=e=>{let{onCanNotLoad:t}=e,r=n(e=>e.gl);return l(()=>{let e=r.getContext(),a=e.getExtension("WEBGL_debug_renderer_info");a?e.getParameter(a.UNMASKED_RENDERER_WEBGL).toLocaleLowerCase().includes("swiftshader")&&t?.("no-acceleration"):t?.("no-acceleration")},[r,t]),null};export const Canvas=s(()=>{let[n,s]=f(null),[B,L]=f(!0),{canvasSystem:y,exportSystem:$}=C(),k=d($.frameloopPaused$),A=x(e=>y.getCanvasConfig(e.state),[y]),M=i(),{canvasPadding:_}=v(),b=u();h(m.SceneAssets),g({id:m.SceneAssets,label:"Loading 3D scene…"},B);let I=p(()=>{L(!1),y.reportFirstLoadFinished()},[y]),F=p(e=>{y.onCanvasClick$.next(e)},[y]),G=p(e=>{y.onCanvasPointerMove$.next(e)},[y]),N=c(()=>{let e={};return A?.precision&&(e.precision=A.precision),A?.alpha&&(e.alpha=A.alpha),A?.premultipliedAlpha&&(e.premultipliedAlpha=A.premultipliedAlpha),A?.antialias&&(e.antialias=A.antialias),A?.stencil&&(e.stencil=A.stencil),A?.preserveDrawingBuffer&&(e.preserveDrawingBuffer=A.preserveDrawingBuffer),A?.powerPreference&&(e.powerPreference=A.powerPreference),A?.depth&&(e.depth=A.depth),A?.logarithmicDepthBuffer&&(e.logarithmicDepthBuffer=A.logarithmicDepthBuffer),A?.failIfMajorPerformanceCaveat&&(e.failIfMajorPerformanceCaveat=A.failIfMajorPerformanceCaveat),e},[A]);return(l(()=>{"WEBGL_UNSUPPORTED"===M.type&&s("no-gpu")},[M,s]),n)?e(D,{issue:n}):t(r,{children:[e(a,{component:"div",sx:{transition:"opacity 0.3s ease-in",opacity:+!B,width:"100%",height:"100%"},children:t(o,{gl:N,onClick:F,onPointerMove:G,frameloop:k?"never":A?.frameloop,shadows:A?.shadows,children:[e(P,{onFirstLoad:I}),e(E,{onCanNotLoad:s}),e(w,{})]})}),!b&&e(a,{component:"div",sx:{position:"absolute",top:_.top,left:_.left,width:`calc(100% - ${_.left}px - ${_.right}px)`,height:`calc(100% - ${_.top}px - ${_.bottom}px)`,display:"flex",justifyContent:"center",alignItems:"center",transition:"opacity 0.3s ease-in",opacity:+!!B,pointerEvents:"none"},children:e(j,{})})]})});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{jsx as r,jsxs as a}from"react/jsx-runtime";import{paperClasses as
|
|
1
|
+
import{jsx as r,jsxs as a}from"react/jsx-runtime";import{paperClasses as d,styled as e,tabsClasses as t,useTheme as i,useThemeProps as o}from"@mui/material";import{useMemo as n,useState as s}from"react";import{useIsFullscreenActive as b}from"#package/react-sdk";import{attrf as l,commonStyles as p,useInvalidateScrollTimeline as c,useIsEmpty as m}from"#package/ui-sdk";import{ASSISTANT_PANEL_SLOT as h,AssistantPanel as u,useIsAssistantPanelOpen as S}from"../../../assistant/index.js";import{SidebarKeys as g}from"../../sidebar-keys/index.js";import{DesktopSidebarBackButton as k}from"../sidebar-back-button/index.js";import{DesktopSidebarContent as x,useSidebarContent as E}from"../sidebar-contents/index.js";import{DesktopSidebarFooter as f}from"../sidebar-footer/index.js";import{DesktopSidebarTabs as $}from"../sidebar-tabs/index.js";let v="PhxDesktopSidebar",R={Root:e("div",{name:v,slot:"root",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>[`
|
|
2
2
|
--phx-sidebar-background: ${r.background};
|
|
3
3
|
--phx-sidebar-border: ${r.border};
|
|
4
4
|
--phx-sidebar-filter: ${r.filter};
|
|
5
5
|
--phx-sidebar-padding: ${r.padding};
|
|
6
6
|
--phx-sidebar-radius: ${r.borderRadius}px;
|
|
7
7
|
--phx-sidebar-scrollable-indicator-background: ${r.scrollableIndicatorBackground};
|
|
8
|
-
`,{borderRadius:"var(--phx-sidebar-radius)",display:"grid",filter:"var(--phx-sidebar-filter)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inlineSize:r.width,...void 0===r.width&&{blockSize:"100%",inlineSize:"100%"},position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{"--phx-sidebar-background":"hsl(from gold h s l / 50%)"},[`&[data-sidebar*="${g.Visible}"]`]:{opacity:1},[`&[data-sidebar*="${g.Hidden}"]`]:{opacity:0},[`&[data-sidebar*="${g.Assistant}"] > :not([data-sidebar="${
|
|
8
|
+
`,{borderRadius:"var(--phx-sidebar-radius)",display:"grid",filter:"var(--phx-sidebar-filter)",gridTemplateRows:"min-content minmax(0, 1fr) min-content",inlineSize:r.width,...void 0===r.width&&{blockSize:"100%",inlineSize:"100%"},position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{"--phx-sidebar-background":"hsl(from gold h s l / 50%)"},[`&[data-sidebar*="${g.Visible}"]`]:{opacity:1},[`&[data-sidebar*="${g.Hidden}"]`]:{opacity:0},[`&[data-sidebar*="${g.Assistant}"] > :not([data-sidebar="${h}"], [data-sidebar="slot[footer]"])`]:{visibility:"hidden"},[`& > [data-sidebar="${h}"]`]:{gridColumn:"1",gridRow:"1 / 3"},[`&:not([data-sidebar*="${g.Split}"]) > [data-sidebar="slot[footer]"]:not(:empty) ~ [data-sidebar="${h}"]`]:{borderBlockEnd:0,borderEndStartRadius:0,borderEndEndRadius:0}}]),Tabs:e("div",{name:v,slot:"tabs",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({insetBlockStart:0,insetInlineEnd:"100%",maxInlineSize:150,paddingInlineEnd:a(2),position:"absolute",..."start"===r.side&&{insetInlineEnd:"auto",insetInlineStart:"100%",paddingInlineEnd:0,paddingInlineStart:a(2),[`.${t.indicator}`]:{left:0,right:"auto"}},"&:is(:empty)":{padding:0},[`.${d.root}`]:{boxShadow:"none"}})),Header:e("header",{name:v,slot:"header",shouldForwardProp:r=>"ownerState"!==r})({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockEnd:0,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlock:"calc(0.6 * var(--phx-sidebar-padding))",paddingInline:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0}}),Body:e("div",{name:v,slot:"body",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:0,borderBlockEnd:0,display:"grid",position:"relative","[data-sidebar] &":{...r.isHeaderEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",paddingBlockStart:"var(--phx-sidebar-padding)"}},'&:has([data-sidebar*="slot[content]"]:empty)':{...r.isContentEmpty&&{paddingBlock:0}},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{border:0}},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockEnd:"var(--phx-sidebar-border)",borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",paddingBlockEnd:"var(--phx-sidebar-padding)"}})),Content:e("div",{name:v,slot:"content",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{spacing:a}})=>({...p.layout.normalizeScrollableContainer,alignContent:"start",borderRadius:"inherit",display:"grid",gap:a(3),padding:"var(--phx-sidebar-padding)","@supports (animation-timeline: scroll())":{"&[data-scrollable]":{scrollTimeline:"--phx-sidebar-timeline y","&::after, &::before":{animation:`${p.keyframes.fadeIn} both`,animationTimeline:"--phx-sidebar-timeline",background:"var(--phx-sidebar-scrollable-indicator-background)",backgroundRepeat:"no-repeat",content:'""',display:"block",insetInline:0,opacity:0,pointerEvents:"none",position:"absolute",zIndex:1},"&::after":{animationDirection:"reverse",animationRange:`calc(100% - ${a(4)}) 100%`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",insetBlockStart:"50%",insetBlockEnd:0,scale:"1 -1"},"&::before":{animationRange:`0 ${a(4)}`,borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",insetBlockStart:0,insetBlockEnd:"50%"}}},"&:is(:empty)":{paddingBlock:0},"[data-sidebar] &":{...r.isHeaderEmpty&&{paddingBlockStart:0,"&::before":{borderStartStartRadius:0,borderStartEndRadius:0,insetBlockStart:"var(--phx-sidebar-padding)"}}},[`[data-sidebar*="${g.Split}"] &`]:{paddingBlockEnd:0,"&::after":{borderEndStartRadius:0,borderEndEndRadius:0,insetBlockEnd:"var(--phx-sidebar-padding)"}}})),Footer:e("footer",{name:v,slot:"footer",shouldForwardProp:r=>"ownerState"!==r})(({ownerState:r,theme:{palette:a,spacing:d}})=>({background:"var(--phx-sidebar-background)",border:"var(--phx-sidebar-border)",borderBlockStart:`1px solid ${a.divider}`,borderEndStartRadius:"inherit",borderEndEndRadius:"inherit",padding:"var(--phx-sidebar-padding)","&:is(:empty)":{border:0,paddingBlock:0},[`[data-sidebar*="${g.Minimalist}"] &`]:{...r.isContentEmpty&&{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit"}},[`[data-sidebar*="${g.Minimalist}"][data-sidebar*="${g.Assistant}"]:not([data-sidebar*="${g.Split}"]) &:not(:empty)`]:{...r.isContentEmpty&&{borderBlockStart:`1px solid ${a.divider}`,borderStartStartRadius:0,borderStartEndRadius:0}},[`[data-sidebar*="${g.Minimalist}"][data-sidebar*="${g.Assistant}"]:not([data-sidebar*="${g.Split}"]) &:empty`]:{border:0},[`[data-sidebar*="${g.Split}"] &`]:{borderBlockStart:"var(--phx-sidebar-border)",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",marginBlockStart:d(2)}}))};export const DesktopSidebar=({width:d,side:e="end"})=>{let[t,p]=s(null),[h,y]=s(null),B=n(()=>({current:t}),[t]),w=n(()=>({current:h}),[h]),{palette:I,shape:C,spacing:j}=i(),{background:F=I.background.paper,border:H=0,borderRadius:P=C.sidebarBorderRadius??C.borderRadius,filter:z=`
|
|
9
9
|
drop-shadow(0 1px 1.5px hsl(from ${I.common.black} h s l / 12%))
|
|
10
10
|
drop-shadow(0 1px 0.5px hsl(from ${I.common.black} h s l / 14%))
|
|
11
11
|
drop-shadow(0 2px 0.5px hsl(from ${I.common.black} h s l / 20%))
|
|
12
|
-
`,padding:
|
|
12
|
+
`,padding:M=j(2.5),scrollableIndicatorBackground:T=`linear-gradient(
|
|
13
13
|
180deg,
|
|
14
14
|
hsl(from black h s l / 12%),
|
|
15
15
|
hsl(from black h s l / 0%) 8px
|
|
16
|
-
)`}=o({props:{},name:
|
|
16
|
+
)`}=o({props:{},name:v}),{hasMiniSidebar:A,hasSplitSidebar:D}=E(),V=S(),q=!b(),G=m(B,{disabled:!q}),J=m(w,{disabled:!q});c(w,{disabled:!q});let K={background:F,border:H,borderRadius:P,filter:z,isHeaderEmpty:G,isContentEmpty:J,padding:M,scrollableIndicatorBackground:T,width:d};return a(R.Root,{ownerState:K,"data-sidebar":l({variant:{[`${g.Minimalist}`]:A,[`${g.Split}`]:D},state:{[`${g.Visible}`]:q,[`${g.Hidden}`]:!q,[`${g.Assistant}`]:V}}),inert:q?void 0:"",children:[r(R.Tabs,{ownerState:{...K,side:e},"data-sidebar":"slot[tabs]",children:r($,{})}),r(R.Header,{ref:p,ownerState:K,"data-sidebar":"slot[header]",children:r(k,{})}),r(R.Body,{ownerState:K,"data-sidebar":"slot[body]",children:r(R.Content,{ref:y,ownerState:K,"data-sidebar":"slot[content]",children:r(x,{})})}),r(R.Footer,{ownerState:K,"data-sidebar":"slot[footer]",children:r(f,{})}),r(u,{})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*as LayoutSlots from"./slots.js";
|
|
1
|
+
export*as LayoutSlots from"./slots.js";export{NestedViewControls}from"./view-controls/NestedViewControls.js";export{hasOnlyFlatViewControls,useHasNestedViewControls,useViewControlItems}from"./view-controls/use-view-control-items.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{memo as t,useCallback as o}from"react";import{useActiveViewState as r,useDomain as l,useLocalizable as a}from"#package/react-sdk";import{ViewControls as i}from"#package/ui-sdk";import{NestedViewControls as m}from"./NestedViewControls.js";import{hasOnlyFlatViewControls as s,useViewControlItems as n}from"./use-view-control-items.js";let c=t=>{let{icon:o,label:r,value:l}=t,m=a(r);return e(i.Item,{value:l,icon:o,label:m})};export const DesktopViewControls=t(()=>{let{storeSystem:t,navigationSystem:a}=l(),p=r(),u=n(),v=o((e,o)=>{o&&t.stageAndCommit([a.getViewUpdate(o)])},[t,a]);return u&&!s(u)?e(m,{items:u}):p&&u?e(i.Root,{value:p,exclusive:!0,onChange:v,children:u.map(t=>e(c,{value:t.value,label:t.label,icon:t.icon},t.value))}):null});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as i,Fragment as r}from"react/jsx-runtime";import{List as o,ListItemButton as t,ListItemIcon as n,ListItemText as l}from"@mui/material";import{memo as a,useCallback as m,useMemo as s}from"react";import{useActiveViewState as c,useDomain as p,useResolveLocalizable as d}from"#package/react-sdk";import{DesktopToolbar as u,PhxIcon as h}from"#package/ui-sdk";import{NestedViewControls as v}from"./NestedViewControls.js";import{hasOnlyFlatViewControls as f,useViewControlItems as g}from"./use-view-control-items.js";let w=({name:i})=>e(h,{name:i}),k=r=>{let{icon:o,label:a,onClick:s,value:c}=r,u=d(),{navigationSystem:h,storeSystem:v}=p();return i(t,{onClick:m(()=>{v.stageAndCommit([h.getViewUpdate(c)]),s()},[h,s,v,c]),children:[e(n,{sx:{minWidth:0,paddingInlineEnd:1.5},children:e(w,{name:o})}),e(l,{primary:u(a)})]})},C={id:"sdk.toolbar.viewControls.title",message:"Switch view"},b="view-controls";export const MobileViewControls=a(()=>{let t=c(),n=g(),l=d(),{handleClose:a,handleToggle:p,openedKey:h,ref:x}=u.useToolbarPopper(),j=s(()=>n?.find(e=>e.value===t)?.icon,[t,n]),V=m(()=>{p(b)},[p]),B=m(()=>{V()},[V]),E=h===b;return n&&!f(n)?e(v,{items:n,mobile:!0}):n&&t&&j?i(r,{children:[e(u.ButtonGroup,{ref:x,children:e(u.Button,{title:l(C),size:"small","aria-expanded":E?"true":void 0,"aria-label":"view selection menu","aria-haspopup":"menu",onClick:V,children:e(w,{name:j})})}),e(u.Popper,{anchorEl:x.current,placement:"top-start",isOpen:E,onClose:a,children:e(o,{dense:!0,children:n.map(i=>e(k,{value:i.value,label:i.label,icon:i.icon,onClick:B},i.value))})})]}):null});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ViewControlItem } from '#package/domain';
|
|
2
|
+
interface Props {
|
|
3
|
+
readonly items: readonly ViewControlItem[];
|
|
4
|
+
readonly mobile?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const NestedViewControls: ({ items, mobile }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as l}from"react/jsx-runtime";import{ListItemIcon as t,ListItemText as o,MenuItem as i,MenuList as r,listItemTextClasses as n,menuItemClasses as u}from"@mui/material";import{useEffect as s,useId as c,useState as d}from"react";import{useActiveViewChildState as m,useActiveViewState as p,useResolveLocalizable as v,useSetViewState as h}from"#package/react-sdk";import{DesktopToolbar as g,PhxIcon as f,ViewControls as b}from"#package/ui-sdk";let y={id:"sdk.toolbar.viewControls.title",message:"Switch view"},k=e=>{if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;let a=Array.from(e.currentTarget.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')),l=a.findIndex(a=>a.contains(e.target));if(l<0)return;e.preventDefault(),e.stopPropagation();let t="ArrowDown"===e.key?1:-1;a[(l+t+a.length)%a.length]?.focus()};export const NestedViewControls=({items:w,mobile:C})=>{let x=v(),D=p(),A=m(),O=h(),S=c(),[P,B]=d(null),E=new Map,j=w.map((e,a)=>{let l=e.value===D,t=e.items?.find(a=>void 0===e.value?a.value===D:l&&a.value===A),o=x(e.label),i=void 0===e.value?JSON.stringify([a,o]):JSON.stringify(e.value);return!C&&e.items?.length&&E.set(i,[o,...e.items.map(e=>x(e.label))]),{item:e,key:i,label:t?x(t.label):o,active:l||void 0!==t,child:t,hasOptions:!!e.items?.length}}),q=j.find(e=>e.active),z=j.find(e=>e.key===P?.group),F=P?.group!==void 0&&!z?.hasOptions,I=()=>{B(null),P?.anchor.focus()};s(()=>{F&&(B(null),P?.anchor.focus())},[F,P]);let M=(e,a)=>{e.preventDefault();let l=e.currentTarget;B(e=>e?.anchor===l?null:{anchor:l,group:a})},N=(e,a)=>{(e!==D||a!==A)&&O(e,a),I();let l=P?.anchor;l?.closest('[data-view-controls*="compact"], [data-view-controls*="minimal"]')&&requestAnimationFrame(()=>{"true"===l.getAttribute("aria-hidden")&&l.closest("[data-view-controls]")?.querySelector('button:not([aria-hidden="true"])')?.focus()})},T=e=>({"aria-haspopup":"menu","aria-expanded":e,"aria-controls":e?S:void 0});return a(l,{children:[C?e(g.ButtonGroup,{children:a(g.Button,{size:"small",title:x(y),"aria-label":q?.label??x(y),...T(null!==P),onClick:e=>M(e),children:[e(f,{name:q?.item.icon??"Eye"}),e(f,{name:"CaretDown",fontSize:"small"})]})}):e(b.Root,{value:q?.key??null,sizingLabelsByValue:E,onOpenMenu:e=>M(e),compactMenuProps:T(null!==P),children:j.map(({item:a,key:l,label:t,hasOptions:o})=>e(b.Item,{value:l,label:t,icon:a.icon,disabled:a.items?.length===0,...o&&T(P?.group===l),onClick:e=>{o?M(e,l):void 0!==a.value&&N(a.value)}},l))}),P&&!F&&e(g.Popper,{anchorEl:P.anchor,placement:C?"auto":"top",verticalBoundary:C?P.anchor.closest('[data-layout="slot[body]"]'):void 0,isOpen:!0,onClose:e=>{e.composedPath().includes(P.anchor)||B(null)},children:e(r,{id:S,"aria-label":z?x(z.item.label):x(y),autoFocusItem:!0,dense:!0,sx:{maxHeight:"min(50dvh, 24rem, var(--phx-toolbar-popper-available-height, 50dvh))",overflowY:"auto",[`& .${u.selected} .${n.primary}`]:{fontWeight:600},[`& .${u.root}:focus-visible`]:{outline:"2px solid currentColor",outlineOffset:-2}},onKeyDownCapture:k,onKeyDown:e=>{("Escape"===e.key||"Tab"===e.key)&&("Escape"===e.key&&(e.preventDefault(),e.stopPropagation()),I())},children:z?z.item.items?.map(l=>a(i,{role:"menuitemradio","aria-checked":z.child?.value===l.value,selected:z.child?.value===l.value,onClick:()=>N(z.item.value??l.value,void 0===z.item.value?void 0:l.value),children:[l.icon&&e(t,{children:e(f,{name:l.icon})}),e(o,{children:x(l.label)})]},l.value)):j.map(({item:l,key:r,label:n,active:u,hasOptions:s})=>a(i,{selected:u,disabled:l.items?.length===0,...s&&{"aria-haspopup":"menu"},onClick:()=>{s?B({...P,group:r}):void 0!==l.value&&N(l.value)},children:[e(t,{children:e(f,{name:l.icon})}),e(o,{children:n}),s&&e(f,{name:"CaretRight"})]},r))},P.group??S)})]})};
|
package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ViewControlItem } from '#package/domain';
|
|
2
|
+
export declare const useViewControlItems: () => readonly ViewControlItem[] | undefined;
|
|
3
|
+
export declare const hasOnlyFlatViewControls: (items: readonly ViewControlItem[]) => items is readonly (ViewControlItem & {
|
|
4
|
+
value: string;
|
|
5
|
+
})[];
|
|
6
|
+
export declare const useHasNestedViewControls: () => boolean;
|
package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{viewControlsComponent as t}from"#package/domain";import{useDomain as e,useStoreSelector as o}from"#package/react-sdk";export const useViewControlItems=()=>{let{componentReader:s}=e();return o(e=>s.readFirstRootComponent({componentTypes:[t]},e.state)?.state.items,[s])};export const hasOnlyFlatViewControls=t=>t.every(t=>void 0===t.items);export const useHasNestedViewControls=()=>{let{componentReader:s}=e();return o(e=>{let o=s.readFirstRootComponent({componentTypes:[t]},e.state)?.state.items;return void 0!==o&&!hasOnlyFlatViewControls(o)},[s])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as i,useResolveLocalizable as a}from"#package/react-sdk";import{Preview as r,useResponsive as n}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as p}from"./use-layout-scene-safe-area.js";import{usePreviewDescription as m}from"./use-preview-description.js";let u={id:"sdk.preview.customize.title",message:"Customize product"},c={id:"sdk.preview.start.button.label",message:"Start configuring"},l={layoutId:"ui-layout",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{layout:{type:"spring",bounce:.2,duration:.6},opacity:{duration:.2,ease:"linear"}}};export const DesktopPreview=d=>{let{slotProps:f={},slots:y}=d,{enter:g}=s(),{hasMultiplePresets:b}=i(),{setAnimating:k}=n(),{containerRef:x,safeAreaRef:j,update:w}=p({enabled:!0,hasMiniSidebar:!1}),S=a(),v=m(),A=e(()=>{k(!0)},[k]),L=e(()=>{k(!1),w()},[k,w]),h=o(()=>({...f,root:{...l,onLayoutAnimationStart:A,onLayoutAnimationComplete:L,...f.root}}),[L,A,f]);return t(r,{title:S(u),description:v,buttonLabel:S(c),containerRef:x,safeAreaRef:j,withScene:!b,slots:y,slotProps:h,onStart:g})};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsx as t,jsxs as a,Fragment as e}from"react/jsx-runtime";import{snackbarClasses as o,styled as i,useTheme as r,useThemeProps as n}from"@mui/material";import{AnimatePresence as
|
|
1
|
+
import{jsx as t,jsxs as a,Fragment as e}from"react/jsx-runtime";import{snackbarClasses as o,styled as i,useTheme as r,useThemeProps as n}from"@mui/material";import{AnimatePresence as s}from"motion/react";import{useRef as d}from"react";import{useAccessService as l,useEagerObservableSelector as m,useIsFullscreenActive as c}from"#package/react-sdk";import{attrf as u,commonStyles as p,numToPx as b,useIsEmpty as h,useViewportSize as g}from"#package/ui-sdk";import{useConfigurator as f}from"../../../application-runtime/index.js";import{usePreview as y}from"../../../configurator-context/index.js";import{ASSISTANT_PANEL_SLOT as x,AssistantPanel as v,useIsAssistantPanelOpen as w}from"../../assistant/index.js";import{LayoutSlots as S,useHasNestedViewControls as $}from"../slots/index.js";import{MobileHeader as k}from"../slots/slots.js";import{MobilePreview as F}from"./MobilePreview.js";import{useLayoutSceneSafeArea as C}from"./use-layout-scene-safe-area.js";let M="visible",T="hidden",I=i("div",{name:"PhxMobileHeader",slot:"root"})(({theme:{spacing:t}})=>({...p.transition.fadeInFrom,alignItems:"center",display:"flex",gap:t(1),justifyContent:"space-between",position:"relative","@container style(--inspect: on)":{background:"hsl(from tomato h s l / 50%)"},'[data-header*="slot"]':{display:"flex",gap:t(2),"& > *":{pointerEvents:"auto"}},'[data-header="slot[center]"]':{display:"grid",inset:0,placeItems:"center",position:"absolute"},[`&[data-header*="${M}"]`]:{opacity:1,transitionDuration:"200ms, 300ms",transitionTimingFunction:"linear, ease-out",translate:"0 0"},[`&[data-header*="${T}"]`]:{opacity:0,transitionDuration:"100ms, 100ms",transitionTimingFunction:"linear, ease-in",translate:"0 -60%"}})),R="visible",B="hidden",D=i("div",{name:"PhxMobileControls",slot:"root"})(({theme:{spacing:t}})=>({alignItems:"end",display:"flex",position:"relative","@container style(--inspect: on)":{background:"hsl(from tomato h s l / 50%)"},'[data-controls*="slot"]':{"& > *":{pointerEvents:"auto"}},'[data-controls="slot[toolControls]"]':{...p.transition.fadeInFrom,"&:not(:empty)":{marginInlineEnd:t(2)},"& > *":{...p.transition.fadeIn,transitionDelay:"300ms",transitionDuration:"300ms"}},'[data-controls="slot[viewControls]"]':{...p.transition.fadeInFrom,marginInlineStart:"auto"},'[data-controls="slot[toolbar]"]':{"&:not(:empty)":{marginInlineStart:t(2)}},'[data-controls="slot[viewControls]"][data-visible="true"]':{opacity:1,translate:"0 0",transitionDuration:"200ms, 300ms",transitionTimingFunction:"linear, ease-out"},'[data-controls="slot[viewControls]"][data-visible="false"]':{opacity:0,translate:"0 60%",transitionDuration:"100ms, 100ms",transitionTimingFunction:"linear, ease-in"},[`&[data-controls*="${R}"]`]:{'[data-controls="slot[toolControls]"]':{opacity:1,transitionDuration:"200ms, 300ms",transitionTimingFunction:"linear, ease-out",translate:"0 0"}},[`&[data-controls*="${B}"]`]:{'[data-controls="slot[toolControls]"]':{opacity:0,transitionDuration:"100ms, 100ms",transitionTimingFunction:"linear, ease-in",translate:"0 60%"}}})),E="PhxMobileSidebar",P="visible",j="hidden",A="assistant",z="assistant-focused",H={Root:i("div",{name:E,slot:"root",shouldForwardProp:t=>"ownerState"!==t})(({ownerState:t})=>[`
|
|
2
2
|
--phx-sidebar-background: ${t.background};
|
|
3
3
|
--phx-sidebar-padding: ${t.padding};
|
|
4
4
|
--phx-sidebar-radius: ${t.borderRadius}px;
|
|
5
|
-
`,{...
|
|
5
|
+
`,{...p.transition.fadeInFrom,background:"var(--phx-sidebar-background)",borderStartStartRadius:"var(--phx-sidebar-radius)",borderStartEndRadius:"var(--phx-sidebar-radius)",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"min-content minmax(0, 1fr) min-content min-content",position:"relative","& > *":{pointerEvents:"auto"},"@container style(--inspect: on)":{background:"hsl(from gold h s l / 50%)"},'&:has([data-sidebar*="slot[content]"])':{...t.isContentEmpty&&{"--phx-sidebar-radius":0,'[data-sidebar*="slot[header]"]':{paddingBlock:0,"& > *":{display:"none"}}}},[`&[data-sidebar*="${P}"]`]:{opacity:1,transitionDuration:"200ms, 300ms",transitionTimingFunction:"linear, ease-out",translate:"0 0"},[`&[data-sidebar*="${j}"]`]:{opacity:0,transitionDuration:"100ms, 100ms",transitionTimingFunction:"linear, ease-in",translate:"0 60%"},[`&[data-sidebar*="${A}"] > :not([data-sidebar="${x}"], [data-sidebar="slot[footer]"])`]:{visibility:"hidden"},[`& > [data-sidebar="${x}"]`]:{gridColumn:"1",gridRow:"1 / 4"},[`&[data-sidebar*="${z}"] > [data-sidebar="slot[footer]"]`]:{display:"none"}}]),Header:i("header",{name:E,slot:"header",shouldForwardProp:t=>"ownerState"!==t})(({theme:{spacing:t}})=>({alignItems:"center",borderStartStartRadius:"inherit",borderStartEndRadius:"inherit",display:"grid",gap:t(1),gridTemplateColumns:"repeat(2, minmax(0, 1fr))",paddingBlock:"calc(var(--phx-sidebar-padding) * 0.5)",paddingInline:"var(--phx-sidebar-padding)","& > *":{...p.transition.fadeIn,transitionDelay:"100ms",transitionDuration:"300ms"},'[data-sidebar="slot[header.start]"]':{},'[data-sidebar="slot[header.end]"]':{justifySelf:"end"}})),Body:i("div",{name:E,slot:"body",shouldForwardProp:t=>"ownerState"!==t})({display:"grid",gridTemplateRows:"minmax(0, 1fr)"}),Content:i("div",{name:E,slot:"content",shouldForwardProp:t=>"ownerState"!==t})(({theme:{spacing:t}})=>({...p.layout.normalizeScrollableContainer,display:"grid",gap:t(2),gridAutoRows:"min-content",paddingBlock:"calc(var(--phx-sidebar-padding) * 0.5)",paddingInline:"var(--phx-sidebar-padding)","&:empty":{paddingBlock:0}})),Tabs:i("div",{name:E,slot:"tabs",shouldForwardProp:t=>"ownerState"!==t})(({theme:{palette:t}})=>({borderBlockStart:`1px solid ${t.divider}`,paddingBlock:"calc(var(--phx-sidebar-padding) * 0.5)",paddingInline:"calc(var(--phx-sidebar-padding) * 0.75)","&:is(:empty)":{border:0,padding:0}})),Footer:i("footer",{name:E,slot:"footer",shouldForwardProp:t=>"ownerState"!==t})(({theme:{palette:t}})=>({borderBlockStart:`1px solid ${t.divider}`,paddingBlock:"calc(var(--phx-sidebar-padding) * 0.5)",paddingInline:"var(--phx-sidebar-padding)","&:is(:empty)":{borderColor:"transparent",paddingBlock:0}}))};export const PhxMobileLayoutName="PhxMobileLayout";let L="initial",q="fullscreen",N="min(480px, 50cqb)",V=["auto","min-content","max-content","fit-content"],G=i("div",{name:"PhxMobileLayout",slot:"root",shouldForwardProp:t=>"ownerState"!==t})(({ownerState:t,theme:{spacing:a}})=>[`
|
|
6
6
|
--inspect: off; // 🕹️ inspection mode toggle
|
|
7
7
|
|
|
8
8
|
--phx-layout-sidebar-track-size: ${b(t.sidebarHeight)};
|
|
@@ -39,4 +39,4 @@ import{jsx as t,jsxs as a,Fragment as e}from"react/jsx-runtime";import{snackbarC
|
|
|
39
39
|
[footer-end]
|
|
40
40
|
var(--phx-layout-gutter)
|
|
41
41
|
[full-end]
|
|
42
|
-
`},'[data-layout*="slot[body.header]"]':{gridArea:"header-start / main-start / header-end / main-end"},'[data-layout*="slot[body.footer]"]':{gridArea:"footer-start / main-start / footer-end / main-end",position:"relative"},'[data-layout*="slot[body.safeSceneArea]"]':{gridArea:"full","@container style(--inspect: on)":{background:"hsl(from lime h s l / 50%)"}},'[data-layout="slot[body.sideEffects]"]':{insetBlockEnd:`calc(100% + ${a(2)})`,position:"absolute"},'[data-layout*="slot[sidebar]"]':{display:"grid",gridArea:"sidebar-start / full-start / sidebar-end / full-end",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, auto)"},'[data-layout*="slot[footer]"]':{gridArea:"footer-start / full-start / footer-end / full-end",zIndex:1},'&:has([data-sidebar*="slot[content]"])':{...t.isContentEmpty&&{"--phx-layout-sidebar-track-size":"min-content"}},[`&[data-layout*="${
|
|
42
|
+
`},'[data-layout*="slot[body.header]"]':{gridArea:"header-start / main-start / header-end / main-end"},'[data-layout*="slot[body.footer]"]':{gridArea:"footer-start / main-start / footer-end / main-end",position:"relative"},'[data-layout*="slot[body.safeSceneArea]"]':{gridArea:"full","@container style(--inspect: on)":{background:"hsl(from lime h s l / 50%)"}},'[data-layout="slot[body.sideEffects]"]':{insetBlockEnd:`calc(100% + ${a(2)})`,position:"absolute"},'[data-layout*="slot[sidebar]"]':{display:"grid",gridArea:"sidebar-start / full-start / sidebar-end / full-end",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, auto)"},'[data-layout*="slot[footer]"]':{gridArea:"footer-start / full-start / footer-end / full-end",zIndex:1},'&:has([data-sidebar*="slot[content]"])':{...t.isContentEmpty&&{"--phx-layout-sidebar-track-size":"min-content"}},[`&[data-layout*="${L}"]`]:{transitionDelay:"200ms",transitionDuration:"300ms"},[`&[data-layout*="${q}"]`]:{transitionDelay:"0ms",transitionDuration:"300ms"},[`&:has([data-sidebar*="${j}"])[class]`]:{"--phx-layout-sidebar-track-size":0}},null!=t.assistantFocusHeight&&{'[data-layout*="slot[sidebar]"]':{alignSelf:"start",blockSize:`min(100%, ${t.assistantFocusHeight}px)`,gridRow:"full-start / full-end",zIndex:2}}]),J=i("div")({gridArea:"1 / 1 / -1 / -1"}),K=t=>({inert:t?"":void 0});export const MobileLayout=()=>{let o=d(null),{palette:i,shape:p,spacing:b}=r(),{sidebarHeight:x=N}=n({props:{},name:"PhxMobileLayout"}),{background:O=i.background.paper,borderRadius:Q=p.sidebarBorderRadius??p.borderRadius,padding:U=b(2)}=n({props:{},name:E}),{accessInfo:W}=l(),X=c(),{isPreview:Y,isHidden:Z}=y(),_=!Z&&!Y,tt=!X&&_,ta=!X&&_,te=$(),to=ta||_&&te,ti=!X,{containerRef:tr,safeAreaRef:tn}=C({enabled:_,hasMiniSidebar:!1}),ts=h(o,{disabled:!ti}),{assistantSystem:td}=f(),tl=w(),tm=m(td.panel$,t=>t.isInputFocused,[]),tc=tl&&ti&&tm,tu=g(tc),tp=ts&&!tl,tb={isContentEmpty:tp,sidebarHeight:tl?V.includes(x)?N:x:x,assistantFocusHeight:tc?tu?.[1]:void 0},th={background:O,borderRadius:Q,padding:U,isContentEmpty:tp};return a(e,{children:[t(s,{initial:!1,children:!Z&&Y&&t(F,{})}),a(G,{ownerState:tb,"data-layout":u({state:{[`${L}`]:!X,[`${q}`]:X}}),...K(!_),children:[t(J,{ref:tr}),t("div",{"data-layout":"slot[sideEffects]",children:t(S.MobileSnackbarsRoot,{})}),a("main",{"data-layout":"slot[body]",children:[t("header",{"data-layout":"slot[body.header]",children:a(I,{"data-header":u({state:{[`${M}`]:tt,[`${T}`]:!tt}}),...K(!tt),children:[t("div",{"data-header":"slot[start]",children:t(k,{})}),t("div",{"data-header":"slot[center]",children:t(S.MobileCallToAction,{})}),a("div",{"data-header":"slot[end]",children:[W.viewMode&&!X&&t(S.MobileReadonlyBanner,{}),t(S.MobileHamburgerMenu,{})]})]})}),t("div",{ref:tn,"data-layout":"slot[body.safeSceneArea]"}),t("div",{"data-layout":"slot[body.footer] interactive",children:a(D,{"data-controls":u({state:{[`${R}`]:ta,[`${B}`]:!ta}}),children:[t("div",{"data-controls":"slot[toolControls]",...K(!ta),children:t(S.MobileToolControls,{})}),t("div",{"data-controls":"slot[viewControls]","data-visible":to,...K(!to),children:t(S.MobileViewControls,{})}),t("div",{"data-controls":"slot[toolbar]",children:_&&t(S.MobileToolbar,{})})]})})]}),t("aside",{"data-layout":"slot[sidebar]",children:a(H.Root,{ownerState:th,"data-sidebar":u({state:{[`${P}`]:ti,[`${j}`]:!ti,[`${A}`]:tl,[`${z}`]:tc}}),...K(!ti),children:[a(H.Header,{ownerState:th,"data-sidebar":"slot[header]",children:[t("div",{"data-sidebar":"slot[header.start]",children:t(S.MobileSidebarBackButton,{})}),t("div",{"data-sidebar":"slot[header.end]",children:t(S.MobilePoweredBy,{})})]}),t(H.Body,{ownerState:th,"data-sidebar":"slot[body]",children:t(H.Content,{ref:o,ownerState:th,"data-sidebar":"slot[content]",children:t(S.MobileSidebarContent,{})})}),t(H.Tabs,{ownerState:th,"data-sidebar":"slot[tabs]",children:t(S.MobileTabs,{})}),t(H.Footer,{ownerState:th,"data-sidebar":"slot[footer]",children:t(S.MobileSidebarFooter,{})}),t(v,{})]})}),t("footer",{"data-layout":"slot[footer] interactive",children:t(S.MobileFooter,{})})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as i}from"react";import{usePresetSelection as o,useResolveLocalizable as r}from"#package/react-sdk";import{Preview as a}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as n}from"./use-layout-scene-safe-area.js";import{usePreviewDescription as p}from"./use-preview-description.js";let m={id:"sdk.preview.customize.title",message:"Customize product"},c={id:"sdk.preview.start.button.label",message:"Start configuring"},u={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{opacity:{duration:.1,ease:"linear"}}};export const MobilePreview=l=>{let{slotProps:d={},slots:f}=l,{enter:b,isPreview:g}=s(),{hasMultiplePresets:k}=o(),{containerRef:x,safeAreaRef:y,update:j}=n({enabled:g,hasMiniSidebar:!1}),w=r(),v=p(),S=e(()=>{j()},[j]),h=i(()=>({...d,root:{...u,onLayoutAnimationComplete:S,...d.root}}),[S,d]);return t(a,{title:w(m),description:v,buttonLabel:w(c),containerRef:x,safeAreaRef:y,withScene:!k,slots:f,slotProps:h,onStart:b})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePreviewDescription: () => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLingui as e}from"@lingui/react";let i="sdk.preview.customize.message";export const usePreviewDescription=()=>{let{i18n:s,_:r}=e(),t=s.messages[i]?r(i):void 0;return t===i?void 0:t};
|
|
@@ -4,4 +4,4 @@ export * from './phoenix-layout-elements/index.js';
|
|
|
4
4
|
export * from './preset-layout/index.js';
|
|
5
5
|
export * as Legacy from './legacy/index.js';
|
|
6
6
|
export * from './ConfiguratorEncapsulatedTheme.js';
|
|
7
|
-
export { type AssistantComposerAttachment, type AssistantComposerNotice, type AssistantFailure, type AssistantFailureKind, type AssistantFormsVisibility, type AssistantMarkdownProps, type AssistantRecording, type AssistantRecordingStatus, type AssistantThreadItem, type AssistantThreadItemViewProps, type AssistantToolChip, type AssistantToolChipLabel, type AssistantToolChipState, type AssistantToolChipsProps, type AssistantToolItem, type AssistantUserMessageProps, type AssistantUserVoice, type EntityLinkSelection, type EntityLinkSelectionProviderProps, type ThemeableAssistantComposerProps, type ThemeableAssistantPanelHeaderProps, type ThemeableAssistantPanelProps, type ThemeableAssistantReplyPlayButtonProps, type AssistantBuiltInFormSlots, type AssistantThreadItemSlots, type ThemeableAssistantAlertProps, type ThemeableAssistantAnnotationBadgeProps, type ThemeableAssistantAnnotationCommentProps, type ThemeableAssistantAnnotationProps, type ThemeableAssistantDrawingProps, type ThemeableAssistantImageViewProps, type ThemeableAssistantEntityLinkProps, type
|
|
7
|
+
export { type AssistantComposerAttachment, type AssistantComposerNotice, type AssistantFailure, type AssistantFailureKind, type AssistantFormsVisibility, type AssistantMarkdownProps, type AssistantRecording, type AssistantRecordingStatus, type AssistantThreadItem, type AssistantThreadStarter, type AssistantThreadItemViewProps, type AssistantToolChip, type AssistantToolChipLabel, type AssistantToolChipState, type AssistantToolChipsProps, type AssistantToolItem, type AssistantUserMessageProps, type AssistantUserVoice, type EntityLinkSelection, type EntityLinkSelectionProviderProps, type ThemeableAssistantComposerProps, type ThemeableAssistantPanelHeaderProps, type ThemeableAssistantPanelProps, type ThemeableAssistantReplyPlayButtonProps, type AssistantBuiltInFormSlots, type AssistantThreadItemSlots, type ThemeableAssistantAlertProps, type ThemeableAssistantAnnotationBadgeProps, type ThemeableAssistantAnnotationCommentProps, type ThemeableAssistantAnnotationProps, type ThemeableAssistantDrawingProps, type ThemeableAssistantImageViewProps, type ThemeableAssistantEntityLinkProps, type ThemeableAssistantFormConfirmProps, type ThemeableAssistantFormGroupProps, type ThemeableAssistantFormNumberProps, type ThemeableAssistantFormOptionsProps, type ThemeableAssistantFormProps, type ThemeableAssistantFormReplyProps, type ThemeableAssistantFormTextProps, type ThemeableAssistantFormTileProps, type ThemeableAssistantImageProps, type ThemeableAssistantMarkdownProps, type ThemeableAssistantMessageImagesProps, type ThemeableAssistantReferenceLinkProps, type ThemeableAssistantScreenshotsProps, type ThemeableAssistantSeparatorProps, type ThemeableAssistantThreadProps, type ThemeableAssistantToolChipsProps, type ThemeableAssistantUserMessageProps, type UseAssistantComposer, type UseAssistantComposerResult, type UseAssistantThread, type UseAssistantThreadResult, AssistantMarkdown, AssistantSeparator, AssistantThreadItemView, AssistantToolChips, AssistantUserMessage, EntityLinkSelectionProvider, useAssistantComposer, useAssistantThread, useCreateEntityLinkSelection, type AssistantFormElementRoleProps, type AssistantFormElementType, type CreateAssistantFormElement, type AssistantFormTileAttributes, type AssistantFormTileData, type AssistantFormTileLook, type FormContainerProps, type FormInputProps, type FormOptionProps, createAssistantFormElementFactory, } from './assistant/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{ToggleButton as e,ToggleButtonGroup as a,Tooltip as r,Paper as n,Typography as i,styled as l,typographyClasses as s}from"@mui/material";import{useCallback as m}from"react";import{useActiveViewState as p,useDomain as d,useLocalizable as c}from"#package/react-sdk";import{PhxIcon as u,attrf as g,useTruncationTooltip as f}from"#package/ui-sdk";import{NestedViewControls as v,hasOnlyFlatViewControls as h,useViewControlItems as w}from"../../../configurator-layout/slots/index.js";let b=({name:o})=>t(u,{name:o}),x=l(r,{name:"PhxDesktopToolbarButton",slot:"tooltip"})({}),T=l(e)(({theme:{shape:t,spacing:o}})=>({display:"grid",gap:o(.5),gridTemplateColumns:"min-content 1fr",margin:0,padding:5,textTransform:"none",transitionDuration:"200ms",transitionProperty:"gap, grid-template-columns","&[class][class]":{border:0,borderRadius:t.borderRadius},[`.${s.root}`]:{overflow:"hidden",whiteSpace:"nowrap"},'[data-view-controls]:has([data-view-controls*="compact"]) &':{gap:0,gridTemplateColumns:"min-content 0fr"}})),k=e=>{let{icon:a,label:r,value:n}=e,{navigationSystem:l,storeSystem:s}=d(),p=c(r),{ref:u,shouldRenderTitle:v}=f(),h=m(()=>{s.stageAndCommit([l.getViewUpdate(n)])},[s,l,n]);return t(x,{title:v?p:void 0,placement:"top",children:o(T,{value:n,"data-view-controls":g({"component[button]":!0,compact:v}),onClick:h,children:[t(b,{name:a}),t(i,{ref:u,component:"span",variant:"body1",children:p})]})})},y=l(a)(({theme:t})=>({display:"flex",gap:t.spacing(.25),padding:t.spacing(.5)}));export const ViewControls=()=>{let o=p(),e=w();return e&&!h(e)?t(v,{items:e}):o&&e?t(n,{"data-view-controls":!0,children:t(y,{value:o,children:e.map(o=>t(k,{value:o.value,label:o.label,icon:o.icon},o.value))})}):null};
|
package/dist/docs/index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-
|
|
2
|
+
"generatedAt": "2026-11-13T09:40:49.403Z",
|
|
3
3
|
"categories": [
|
|
4
4
|
{
|
|
5
5
|
"name": "Phoenix",
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
"title": "Theming",
|
|
319
|
-
"description": "
|
|
319
|
+
"description": "Use Phoenix themes to give the configurator consistent brand colors, typography and component styling. Start from a preset and customize it for the product's visual identity.",
|
|
320
320
|
"path": "docs/phoenix/theming.mdx",
|
|
321
321
|
"category": [
|
|
322
322
|
"Phoenix",
|
|
@@ -554,6 +554,16 @@
|
|
|
554
554
|
],
|
|
555
555
|
"source": "storybook-root"
|
|
556
556
|
},
|
|
557
|
+
{
|
|
558
|
+
"title": "Designing the Configuration Journey",
|
|
559
|
+
"description": "Help buyers understand and configure the product: determine how it is structured, the order in which users make decisions, how those decisions are displayed and how users interact with the...",
|
|
560
|
+
"path": "docs/ux-guidelines/designing-the-configuration-journey.mdx",
|
|
561
|
+
"category": [
|
|
562
|
+
"UX Guidelines",
|
|
563
|
+
"Designing the Configuration Journey"
|
|
564
|
+
],
|
|
565
|
+
"source": "storybook-root"
|
|
566
|
+
},
|
|
557
567
|
{
|
|
558
568
|
"title": "Interaction Modes",
|
|
559
569
|
"description": "Modes remove controls that do not apply to the user's current task. Treat each mode as an explicit visibility and interaction contract rather than a collection of one-off filters.",
|
|
@@ -736,6 +746,16 @@
|
|
|
736
746
|
],
|
|
737
747
|
"source": "storybook-example"
|
|
738
748
|
},
|
|
749
|
+
{
|
|
750
|
+
"title": "Nested View Controls",
|
|
751
|
+
"description": "Use a two-level view control to choose a presentation within one camera view or group several cameras under one button. The caret opens a menu. Choosing an option updates the button label and...",
|
|
752
|
+
"path": "docs/layouts/nested-view-controls.mdx",
|
|
753
|
+
"category": [
|
|
754
|
+
"Layouts",
|
|
755
|
+
"Nested View Controls"
|
|
756
|
+
],
|
|
757
|
+
"source": "storybook-example"
|
|
758
|
+
},
|
|
739
759
|
{
|
|
740
760
|
"title": "Phoenix Elements",
|
|
741
761
|
"description": "Use this pattern when you need both kinds of Phoenix UI in the same configurator:",
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Nested View Controls
|
|
2
|
+
|
|
3
|
+
Use a two-level view control to choose a presentation within one camera view or group several cameras under one button. The caret opens a menu. Choosing an option updates the button label and highlights the selection. The button reserves space for the widest label in the group, so the toolbar stays still as you switch options.
|
|
4
|
+
|
|
5
|
+
## Assembly
|
|
6
|
+
|
|
7
|
+
Give the group a declared view value when its children are choices within that view. Opening Assembly leaves the scene alone. Choose Exploded to separate the cover and insert, then Overview to clear the selection.
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
viewControls:
|
|
11
|
+
default:
|
|
12
|
+
items:
|
|
13
|
+
- { label: Overview, icon: Cube, value: overview }
|
|
14
|
+
- label: Assembly
|
|
15
|
+
icon: CubeDuotone
|
|
16
|
+
value: assembly
|
|
17
|
+
items:
|
|
18
|
+
- { label: Assembled, value: assembled }
|
|
19
|
+
- { label: Exploded, value: exploded }
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Both choices activate `assembly`, so components filtered to that view stay active. A project expression can read `getComponentSystemFilterState(state).viewChildState` to distinguish them. Child values may be created at runtime. This example supplies the same array shape via `items: { $read: $assemblyOptions }`. Change the option count to see the menu update. Removing the current option clears the child selection.
|
|
23
|
+
|
|
24
|
+
## Standard views
|
|
25
|
+
|
|
26
|
+
Omit the group's value to organize declared views. Choose Side to activate the side camera. The readout shows `side` as the active view and an empty child state.
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
viewControls:
|
|
30
|
+
default:
|
|
31
|
+
items:
|
|
32
|
+
- { label: Overview, icon: Cube, value: overview }
|
|
33
|
+
- label: Standard views
|
|
34
|
+
icon: GridFour
|
|
35
|
+
items:
|
|
36
|
+
- { label: Front, value: front }
|
|
37
|
+
- { label: Side, value: side }
|
|
38
|
+
- { label: Top, value: top }
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Declare each child value in `viewStates`. In both examples, opening or dismissing the menu preserves the selection. Use the arrow keys to move through options, Enter to select, or Escape to dismiss.
|
|
42
|
+
|
|
43
|
+
## Complete Implementation
|
|
44
|
+
|
|
45
|
+
{/* AUTO-GENERATED SECTION: This section is automatically updated by 'phoenix story build' */}
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary>Click to view the complete implementation files</summary>
|
|
49
|
+
|
|
50
|
+
### ./spec/domain.yaml
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
model:
|
|
54
|
+
latest:
|
|
55
|
+
entityTypes: [Scene]
|
|
56
|
+
aliases:
|
|
57
|
+
RootEntity: [Scene]
|
|
58
|
+
shapes:
|
|
59
|
+
Scene:
|
|
60
|
+
standardViews: { type: boolean }
|
|
61
|
+
optionCount: { type: integer, minimum: 0, maximum: 3 }
|
|
62
|
+
|
|
63
|
+
expressions:
|
|
64
|
+
Scene:
|
|
65
|
+
$insertHeight: { type: number }
|
|
66
|
+
$showOptionCount: { type: boolean, $eval: '!self.standardViews' }
|
|
67
|
+
|
|
68
|
+
viewStates: [overview, assembly, front, side, top]
|
|
69
|
+
|
|
70
|
+
presets:
|
|
71
|
+
- rootEntityType: Scene
|
|
72
|
+
initialDomainEntities:
|
|
73
|
+
- { id: Scene-1, type: Scene, standardViews: false, optionCount: 2 }
|
|
74
|
+
|
|
75
|
+
components:
|
|
76
|
+
Scene:
|
|
77
|
+
applicationConfig:
|
|
78
|
+
default:
|
|
79
|
+
layout: universal
|
|
80
|
+
miniSidebar: true
|
|
81
|
+
viewControls:
|
|
82
|
+
assembly:
|
|
83
|
+
$filter:
|
|
84
|
+
active: { $eval: '!self.standardViews' }
|
|
85
|
+
items:
|
|
86
|
+
- { label: Overview, icon: Cube, value: overview }
|
|
87
|
+
- label: Assembly
|
|
88
|
+
icon: CubeDuotone
|
|
89
|
+
value: assembly
|
|
90
|
+
items: { $read: $assemblyOptions }
|
|
91
|
+
standard:
|
|
92
|
+
$filter:
|
|
93
|
+
active: { $read: standardViews }
|
|
94
|
+
items:
|
|
95
|
+
- { label: Overview, icon: Cube, value: overview }
|
|
96
|
+
- label: Standard views
|
|
97
|
+
icon: GridFour
|
|
98
|
+
items:
|
|
99
|
+
- { label: Front, value: front }
|
|
100
|
+
- { label: Side, value: side }
|
|
101
|
+
- { label: Top, value: top }
|
|
102
|
+
staticPerspectiveCamera:
|
|
103
|
+
overview:
|
|
104
|
+
fov: 38
|
|
105
|
+
distance: 2400
|
|
106
|
+
azimuthAngle: 0.68
|
|
107
|
+
polarAngle: 1.03
|
|
108
|
+
$filter:
|
|
109
|
+
viewStates: [overview, assembly]
|
|
110
|
+
staticOrthographicCamera:
|
|
111
|
+
front:
|
|
112
|
+
frustumSize: 1450
|
|
113
|
+
distance: 2400
|
|
114
|
+
polarAngle: 1.5708
|
|
115
|
+
azimuthAngle: 0
|
|
116
|
+
$filter:
|
|
117
|
+
viewStates: [front]
|
|
118
|
+
side:
|
|
119
|
+
frustumSize: 1450
|
|
120
|
+
distance: 2400
|
|
121
|
+
polarAngle: 1.5708
|
|
122
|
+
azimuthAngle: 1.5708
|
|
123
|
+
$filter:
|
|
124
|
+
viewStates: [side]
|
|
125
|
+
top:
|
|
126
|
+
frustumSize: 1450
|
|
127
|
+
distance: 2400
|
|
128
|
+
polarAngle: 0
|
|
129
|
+
azimuthAngle: 0
|
|
130
|
+
$filter:
|
|
131
|
+
viewStates: [top]
|
|
132
|
+
sceneEntityBoxObject:
|
|
133
|
+
base: { width: 920, height: 160, depth: 570, materialName: Base, anchor: center }
|
|
134
|
+
insert: { width: 850, height: 64, depth: 500, materialName: Insert, anchor: center }
|
|
135
|
+
cover: { width: 920, height: 48, depth: 570, materialName: Cover, anchor: center }
|
|
136
|
+
sceneEntityObjectProperties:
|
|
137
|
+
insert:
|
|
138
|
+
offsetY: { $read: $insertHeight }
|
|
139
|
+
cover:
|
|
140
|
+
offsetY: { $read: $coverHeight }
|
|
141
|
+
sceneEntityLocalMaterialOverride:
|
|
142
|
+
base: { materialsToOverride: [Base], color: '#34485b', roughness: 0.68 }
|
|
143
|
+
insert: { materialsToOverride: [Insert], color: '#d59a51', roughness: 0.62 }
|
|
144
|
+
cover: { materialsToOverride: [Cover], color: '#7b9b9a', roughness: 0.58 }
|
|
145
|
+
propertyPage:
|
|
146
|
+
default:
|
|
147
|
+
children:
|
|
148
|
+
- kind: propertyContainerGroup
|
|
149
|
+
children:
|
|
150
|
+
- kind: customElement
|
|
151
|
+
props: { name: ViewStateReadout }
|
|
152
|
+
- kind: propertyContainerItem
|
|
153
|
+
visible: { $read: $showOptionCount }
|
|
154
|
+
props: { title: Available options }
|
|
155
|
+
children:
|
|
156
|
+
- kind: genericDimensionSlider
|
|
157
|
+
props: { instanceName: count, step: 1 }
|
|
158
|
+
genericDimension:
|
|
159
|
+
count:
|
|
160
|
+
$filter:
|
|
161
|
+
active: { $eval: '!self.standardViews' }
|
|
162
|
+
unit: ''
|
|
163
|
+
min: 0
|
|
164
|
+
max: 3
|
|
165
|
+
value: { $bind: optionCount }
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### ./src/elements/ViewStateReadout.tsx
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
import { Box } from '@mui/material'
|
|
172
|
+
|
|
173
|
+
import { PropertyContainer } from '@salsita-ai/sdk/ui'
|
|
174
|
+
|
|
175
|
+
export default phx.frontend.createCustomPhoenixEntityElement('ViewStateReadout', () => {
|
|
176
|
+
const viewState = phx.frontend.useActiveViewState()
|
|
177
|
+
const viewChildState = phx.frontend.useActiveViewChildState()
|
|
178
|
+
return (
|
|
179
|
+
<PropertyContainer.Item title="View selection">
|
|
180
|
+
<Box
|
|
181
|
+
component="dl"
|
|
182
|
+
sx={{
|
|
183
|
+
display: 'grid',
|
|
184
|
+
gridTemplateColumns: 'max-content 1fr',
|
|
185
|
+
gap: 1,
|
|
186
|
+
m: 0,
|
|
187
|
+
'& dd': { m: 0, fontFamily: 'monospace' },
|
|
188
|
+
}}
|
|
189
|
+
>
|
|
190
|
+
<dt>viewState</dt>
|
|
191
|
+
<dd>{viewState}</dd>
|
|
192
|
+
<dt>viewChildState</dt>
|
|
193
|
+
<dd>{viewChildState ?? '—'}</dd>
|
|
194
|
+
</Box>
|
|
195
|
+
</PropertyContainer.Item>
|
|
196
|
+
)
|
|
197
|
+
})
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### ./src/expressions/scene.ts
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import { getComponentSystemFilterState } from '@salsita-ai/sdk/domain'
|
|
204
|
+
|
|
205
|
+
const options = [
|
|
206
|
+
{ label: 'Assembled', value: 'assembled' },
|
|
207
|
+
{ label: 'Exploded', value: 'exploded' },
|
|
208
|
+
{ label: 'Fully separated', value: 'separated' },
|
|
209
|
+
]
|
|
210
|
+
|
|
211
|
+
export default phx.domain.implementCustomExpressions({
|
|
212
|
+
Scene: {
|
|
213
|
+
$assemblyOptions: self => options.slice(0, self.optionCount),
|
|
214
|
+
$insertHeight: (_self, state) => {
|
|
215
|
+
const { viewChildState } = getComponentSystemFilterState(state)
|
|
216
|
+
return viewChildState === 'separated' ? 300 : viewChildState === 'exploded' ? 210 : 112
|
|
217
|
+
},
|
|
218
|
+
$coverHeight: self => 2 * self.$insertHeight - 56,
|
|
219
|
+
},
|
|
220
|
+
})
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
</details>
|
|
@@ -51,6 +51,7 @@ Inside `CustomPresetScreen`, call `phx.frontend.usePresetSelection()`:
|
|
|
51
51
|
|
|
52
52
|
- `presetCategories` holds the published presets when any are published, otherwise the seed presets from `domain.yaml` in one `Default` category.
|
|
53
53
|
- `selectPreset(id)` opens the chosen configuration.
|
|
54
|
+
- `createFromPreset(id)` does the same and returns a promise of `{ configurationId }`, which resolves once the new configuration is being opened and rejects when no preset has the id or the creation fails.
|
|
54
55
|
- `creatingPresetId` identifies the card in flight; use it for the busy indicator and to disable the other cards.
|
|
55
56
|
- `selectionError` reports a failed creation so the replacement can render a recoverable message.
|
|
56
57
|
|