@salsita-ai/sdk 0.50.0-develop.f81ab6ac76 → 0.50.0-develop.fbe43b9a2d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +10 -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/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
- package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +5 -0
- package/dist/configurator/app-loader-content/app-loader-content-name.js +1 -0
- package/dist/configurator/app-loader-content/index.d.ts +2 -0
- package/dist/configurator/app-loader-content/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +12 -2
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
- 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 +14 -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 +45 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +107 -4
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.d.ts +9 -0
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +1 -0
- package/dist/configurator/configuration-not-found-page/index.d.ts +1 -0
- package/dist/configurator/configuration-not-found-page/index.js +1 -1
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
- package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +10 -0
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +12 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
- package/dist/configurator/configurator-error-page/create-configurator-error-page.d.ts +9 -0
- package/dist/configurator/configurator-error-page/create-configurator-error-page.js +1 -0
- package/dist/configurator/configurator-error-page/index.d.ts +3 -0
- package/dist/configurator/configurator-error-page/index.js +1 -0
- package/dist/configurator/index.d.ts +3 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/default-configurator-elements.d.ts +4 -2
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/default-elements/index.d.ts +1 -0
- package/dist/configurator/pages/default-elements/index.js +1 -1
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/scene/index.d.ts +1 -0
- package/dist/configurator/scene/index.js +1 -1
- package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
- package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
- package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
- package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
- package/dist/configurator/toolbar-actions/index.d.ts +3 -0
- package/dist/configurator/toolbar-actions/index.js +1 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
- package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
- package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
- package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/alert/index.js +1 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
- package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -1
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +14 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/index.d.ts +1 -0
- package/dist/configurator/ui/index.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
- package/dist/docs/fabs/basic.mdx +4 -0
- package/dist/docs/index.json +62 -1
- package/dist/docs/layouts/custom-layout.mdx +4 -2
- package/dist/docs/layouts/gallery/ardent-compressor.mdx +3515 -0
- package/dist/docs/layouts/gallery/fenwick-window.mdx +2732 -0
- package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
- package/dist/docs/layouts/gallery/sunfold-solar.mdx +2671 -0
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/error-5xx.mdx +1 -1
- package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
- package/dist/docs/other-features/not-found-404.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +199 -66
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +5 -5
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
- package/dist/docs/phoenix/testing.mdx +2 -2
- package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
- package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
- package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
- package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
- package/dist/domain/application/assistant/form/index.d.ts +4 -0
- package/dist/domain/application/assistant/form/index.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +2 -3
- package/dist/domain/application/assistant/index.js +1 -1
- 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 +2 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -0
- package/dist/domain/domain-runtime/environment/types.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +2 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +3 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +24 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
- package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
- package/dist/domain/extensions/export-images/client-side-image.js +1 -0
- package/dist/domain/extensions/export-images/index.d.ts +3 -0
- package/dist/domain/extensions/export-images/index.js +1 -0
- package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
- package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -2
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +2 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +8 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
- package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.d.ts +4 -0
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
- package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
- package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
- package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
- package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -2
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/index.d.ts +8 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +4 -0
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
- package/dist/react-sdk/elements/configurator-error-page-props.d.ts +20 -0
- package/dist/react-sdk/elements/index.d.ts +1 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
- package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
- package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
- package/dist/react-sdk/handlers/index.d.ts +5 -0
- package/dist/react-sdk/handlers/index.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-action.d.ts +3 -2
- package/dist/react-sdk/handlers/use-finalize-action.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
- package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
- package/dist/react-sdk/index.d.ts +2 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +5 -0
- package/dist/react-sdk/loading-state/loading-state-manager.js +1 -1
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +25 -0
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +1 -0
- package/dist/react-sdk/responsive-state/canvas-padding.d.ts +14 -0
- package/dist/react-sdk/responsive-state/canvas-padding.js +1 -0
- package/dist/react-sdk/responsive-state/index.d.ts +5 -0
- package/dist/react-sdk/responsive-state/index.js +1 -0
- package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +111 -0
- package/dist/react-sdk/responsive-state/responsive-state-manager.js +1 -0
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +10 -0
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +1 -0
- package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +11 -0
- package/dist/react-sdk/responsive-state/use-responsive-state.js +1 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
- package/dist/react-sdk/scene-control-elements/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
- package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
- package/dist/react-sdk/web-component/god-mode/index.js +1 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
- package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
- package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +57 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +5 -1
- package/package.json +13 -3
- package/schema/domain-spec.json +140 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
- package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
- package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
- package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
- package/dist/domain/extensions/client-side-image.js +0 -1
- package/dist/domain/extensions/save-template-thumbnail.js +0 -1
- package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
- package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
- /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/elements/configurator-error-page-props.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
2
|
+
import type { FormInputProps } from './form-element-props.js';
|
|
3
|
+
type FormNumberProps = FormInputProps<number, AssistantBuiltInFormElementAttributes<'number'>>;
|
|
4
|
+
/**
|
|
5
|
+
* A `number`: a field with its unit, and a slider beside it when both `min` and `max` are given. It
|
|
6
|
+
* stays unanswered until the user enters a number, even while the slider rests at `min`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FormNumber: ({ attributes: { value, min, max, step, unit }, label, disabled, state, onChange, }: FormNumberProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Trans as e}from"@lingui/react";import{styled as o}from"@mui/material";import{useCallback as t,useEffect as a}from"react";import{NumericalInput as m}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";import{clampFormNumber as s}from"./clamp-form-number.js";let l=o("div",{name:n,slot:"formNumber"})(({theme:{palette:r,spacing:i,typography:e}})=>({alignSelf:"stretch",color:r.text.secondary,display:"grid",gap:i(.5),...e.caption})),d=(r,i)=>i?`${r} ${i}`:String(r),u=r=>""===r.trim()?null:Number(r);export const FormNumber=({attributes:{value:o,min:n,max:p,step:v,unit:c},label:f,disabled:g,state:b,onChange:h})=>{let x=void 0===o?void 0:s(o,{min:n,max:p}),j=b??x;a(()=>{void 0===b&&void 0!==x&&h(x,d(x,c))},[b,x,c,h]);let N=t(r=>h(r,d(r,c)),[h,c]),S=t(()=>{if(void 0===j)return;let r=s(j,{min:n,max:p});r!==j&&N(r)},[j,n,p,N]),k=t(r=>void 0===j?"":String(r),[j]);return i(l,{role:"group","aria-label":f,children:[null!=f&&r("span",{"aria-hidden":!0,children:f}),r(m,{value:j??n??0,min:n,max:p,unit:c,size:"small",disabled:g,withSlider:void 0!==n&&void 0!==p,sliderProps:void 0===v?void 0:{step:v},inputFieldProps:{parseValue:u,formatValue:k,invalidNumberErrorMessage:r(e,{id:"sdk.assistant.form.number.invalid",message:"Enter a number."})},onChange:N,onChanged:S})]})};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
1
2
|
import type { FormContainerProps } from './form-element-props.js';
|
|
3
|
+
type FormOptionsProps = FormContainerProps<AssistantBuiltInFormElementAttributes<'choice' | 'choices'>>;
|
|
2
4
|
/** A `choice` or `choices`: its options in a wrapping row under its label. */
|
|
3
|
-
export declare const FormOptions: ({ label, children }:
|
|
5
|
+
export declare const FormOptions: ({ label, children }: FormOptionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
1
2
|
import type { FormOptionProps } from './form-element-props.js';
|
|
3
|
+
type FormReplyProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'reply'>>;
|
|
2
4
|
/** A `reply`: a short answer as a small pill, marked while it is picked. */
|
|
3
|
-
export declare const FormReply: ({ label, disabled, selected, onSelect }:
|
|
5
|
+
export declare const FormReply: ({ attributes, label, disabled, selected, onSelect }: FormReplyProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{alpha as e,styled as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{alpha as e,styled as o}from"@mui/material";import{AssistantPanelName as i}from"../theme.js";let a=o("button",{name:i,slot:"formReply"})(({theme:{palette:r,spacing:o,typography:i}})=>({...i.body2,background:r.background.paper,border:`1px solid ${r.divider}`,borderRadius:"calc(infinity * 1px)",color:r.text.primary,cursor:"pointer",margin:0,paddingBlock:o(.25),paddingInline:o(1.25),textAlign:"start","&:hover:not(:disabled)":{background:r.action.hover},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},"&:disabled":{color:r.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:e(r.primary.main,r.action.selectedOpacity),borderColor:r.primary.main}}));export const FormReply=({attributes:e,label:o,disabled:i,selected:t,onSelect:d})=>r(a,{type:"button",disabled:i,"aria-pressed":t,onClick:()=>d([e.value,o].find(Boolean)??""),children:o});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
2
|
+
import type { FormOptionProps } from './form-element-props.js';
|
|
3
|
+
type FormSwatchProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'swatch'>>;
|
|
4
|
+
/**
|
|
5
|
+
* A `swatch`: a small square filled with its color or covered by its picture, its label in a
|
|
6
|
+
* tooltip, ringed and checked while it is picked. A picture that is not a resource path or fails to
|
|
7
|
+
* load leaves the color, or a neutral tile.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FormSwatch: ({ attributes, label, disabled, selected, onSelect }: FormSwatchProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Tooltip as r,styled as o}from"@mui/material";import{useCallback as a,useState as t}from"react";import{PhxIcon as n}from"#package/ui-sdk";import{useResourceImageUrl as l}from"../resource-image/index.js";import{AssistantPanelName as s}from"../theme.js";let d=o("button",{name:s,slot:"formSwatch"})(({theme:{palette:e,shape:i}})=>({background:e.action.hover,blockSize:36,border:`1px solid ${e.divider}`,borderRadius:i.borderRadius,cursor:"pointer",flex:"none",inlineSize:36,margin:0,overflow:"hidden",padding:0,position:"relative","&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:3},"&:disabled":{cursor:"default",opacity:e.action.disabledOpacity},'&[aria-pressed="true"]':{boxShadow:`0 0 0 2px ${e.background.paper}, 0 0 0 4px ${e.primary.main}`}})),m=o("img",{name:s,slot:"formSwatchImage"})({blockSize:"100%",display:"block",inlineSize:"100%",objectFit:"cover"}),c=o("span",{name:s,slot:"formSwatchCheck"})(({theme:{palette:e}})=>({alignItems:"center",background:e.primary.main,borderRadius:"50%",color:e.primary.contrastText,display:"flex",fontSize:14,inset:"50% auto auto 50%",justifyContent:"center",padding:2,position:"absolute",transform:"translate(-50%, -50%)"})),p=o("span")({display:"inline-flex"});export const FormSwatch=({attributes:o,label:s,disabled:u,selected:f,onSelect:b})=>{let{value:h,color:x,image:g}=o,y=l()(g),[k,S]=t(),j=[s,h,x,g].find(Boolean),v=a(()=>{S(y)},[y]);return e(r,{title:j??"",placement:"top",children:e(p,{children:i(d,{type:"button","aria-label":j,disabled:u,"aria-pressed":f,onClick:()=>b([h,s,x,g].find(Boolean)??""),style:null==x?void 0:{background:x},children:[null!=y&&y!==k&&e(m,{src:y,alt:"",loading:"lazy",onError:v}),f&&e(c,{"aria-hidden":!0,children:e(n,{name:"Check",fontSize:"inherit"})})]})})})};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
1
2
|
import type { FormInputProps } from './form-element-props.js';
|
|
3
|
+
type FormTextProps = FormInputProps<string, AssistantBuiltInFormElementAttributes<'text'>>;
|
|
2
4
|
/** A `text`: a single line the user types, with its label above it. */
|
|
3
|
-
export declare const FormText: ({ attributes,
|
|
5
|
+
export declare const FormText: ({ attributes: { value, placeholder }, label, disabled, state, onChange }: FormTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{InputBase as t,styled as o}from"@mui/material";import{useCallback as i}from"react";import{AssistantPanelName as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{InputBase as t,styled as o}from"@mui/material";import{useCallback as i,useEffect as a}from"react";import{AssistantPanelName as d}from"../theme.js";let m=o("label",{name:d,slot:"formText"})(({theme:{palette:e,spacing:r,typography:t}})=>({alignSelf:"stretch",color:e.text.secondary,display:"grid",gap:r(.5),...t.caption})),l=e=>""===e.trim()?void 0:e.trim(),n=o(t,{name:d,slot:"formTextInput"})(({theme:{palette:e,spacing:r,typography:t}})=>({...t.body2,border:`1px solid ${e.divider}`,borderRadius:12,color:e.text.primary,paddingBlock:r(.75),paddingInline:r(1.5),"&.Mui-focused":{borderColor:e.primary.main},"& .MuiInputBase-input":{padding:0}}));export const FormText=({attributes:{value:t,placeholder:o},label:d,disabled:s,state:p,onChange:c})=>(a(()=>{void 0===p&&void 0!==t&&""!==t&&c(t,l(t))},[p,t,c]),r(m,{children:[d,e(n,{value:p??t??"",placeholder:o,disabled:s,onChange:i(e=>{let r=e.target.value;c(r,l(r))},[c])})]}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The limits a `number` keeps its value within, from its attributes. */
|
|
2
|
+
export interface FormNumberLimits {
|
|
3
|
+
readonly min?: number;
|
|
4
|
+
readonly max?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The value a `number` settles on once the user leaves the field: within `min` and `max`. The
|
|
8
|
+
* `step` is left out: it moves the slider, and a typed value between steps stays as typed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const clampFormNumber: (value: number, { min, max }: FormNumberLimits) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const clampFormNumber=(m,{min:a,max:t})=>Math.min(t??1/0,Math.max(a??-1/0,m));
|
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
/** Validated and coerced attributes of an element, without the built-in `label
|
|
2
|
+
/** Validated and coerced attributes of an element, without the built-in `label`: what any element gets. */
|
|
3
3
|
export type FormElementAttributes = Readonly<Record<string, unknown>>;
|
|
4
4
|
/** Props of a `group`, `choice` or `choices` element: it lays out the children the form renders for it. */
|
|
5
|
-
export interface FormContainerProps {
|
|
6
|
-
readonly attributes:
|
|
5
|
+
export interface FormContainerProps<ATTRIBUTES = FormElementAttributes> {
|
|
6
|
+
readonly attributes: ATTRIBUTES;
|
|
7
7
|
readonly label?: string;
|
|
8
8
|
readonly disabled: boolean;
|
|
9
9
|
readonly children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Props of an option.
|
|
13
|
-
*
|
|
12
|
+
* Props of an option. It reports what it answers with when the user picks it, as an input reports
|
|
13
|
+
* its answer: by convention its `value` attribute, or else its label. Its container decides what a
|
|
14
|
+
* pick does: in a `choice` it replaces the previous pick, in a `choices` it toggles, and in a form
|
|
15
|
+
* that asks one question it sends at once. An empty answer counts as unanswered.
|
|
14
16
|
*/
|
|
15
|
-
export interface FormOptionProps {
|
|
16
|
-
readonly attributes:
|
|
17
|
+
export interface FormOptionProps<ATTRIBUTES = FormElementAttributes> {
|
|
18
|
+
readonly attributes: ATTRIBUTES;
|
|
17
19
|
readonly label?: string;
|
|
18
20
|
readonly disabled: boolean;
|
|
19
21
|
readonly selected: boolean;
|
|
20
|
-
onSelect(): void;
|
|
22
|
+
onSelect(answer: string): void;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
|
-
* Props of an input. Its state is its own: the form stores it and hands it back.
|
|
24
|
-
* text the answer shows for it, or `undefined` while there is none.
|
|
25
|
+
* Props of an input. Its state is its own: the form stores what it reports and hands it back.
|
|
26
|
+
* `answer` is the text the answer shows for it, or `undefined` while there is none. An input that
|
|
27
|
+
* starts with a `value` attribute reports its starting answer when it mounts, since an input that
|
|
28
|
+
* never reports is unanswered and only the input knows how its value reads in the answer, such as
|
|
29
|
+
* a number with its unit. A quick input, which a lone form sends on its first report, reports only
|
|
30
|
+
* what the user did.
|
|
25
31
|
*/
|
|
26
|
-
export interface FormInputProps {
|
|
27
|
-
readonly attributes:
|
|
32
|
+
export interface FormInputProps<STATE = unknown, ATTRIBUTES = FormElementAttributes> {
|
|
33
|
+
readonly attributes: ATTRIBUTES;
|
|
28
34
|
readonly label?: string;
|
|
29
|
-
/** What the field starts with. */
|
|
30
|
-
readonly value?: string;
|
|
31
35
|
readonly disabled: boolean;
|
|
32
|
-
readonly state:
|
|
33
|
-
onChange(state:
|
|
36
|
+
readonly state: STATE | undefined;
|
|
37
|
+
onChange(state: STATE, answer: string | undefined): void;
|
|
34
38
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type { FormContainerProps, FormElementAttributes, FormInputProps, FormOptionProps, } from './form-element-props.js';
|
|
2
|
+
export { FormCard } from './FormCard.js';
|
|
3
|
+
export { FormConfirm } from './FormConfirm.js';
|
|
2
4
|
export { FormGroup } from './FormGroup.js';
|
|
3
5
|
export { FormOptions } from './FormOptions.js';
|
|
6
|
+
export { FormNumber } from './FormNumber.js';
|
|
4
7
|
export { FormReply } from './FormReply.js';
|
|
8
|
+
export { FormSwatch } from './FormSwatch.js';
|
|
5
9
|
export { FormText } from './FormText.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FormGroup}from"./FormGroup.js";export{FormOptions}from"./FormOptions.js";export{FormReply}from"./FormReply.js";export{FormText}from"./FormText.js";
|
|
1
|
+
export{FormCard}from"./FormCard.js";export{FormConfirm}from"./FormConfirm.js";export{FormGroup}from"./FormGroup.js";export{FormOptions}from"./FormOptions.js";export{FormNumber}from"./FormNumber.js";export{FormReply}from"./FormReply.js";export{FormSwatch}from"./FormSwatch.js";export{FormText}from"./FormText.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { AssistantPanel, ASSISTANT_PANEL_SLOT } from './AssistantPanel.js';
|
|
2
2
|
export { useIsAssistantPanelOpen } from './use-is-assistant-panel-open.js';
|
|
3
|
+
export type { AssistantFormElementRoleProps, AssistantFormElementType, CreateAssistantFormElement, } from './form/index.js';
|
|
4
|
+
export { createAssistantFormElementFactory } from './form/index.js';
|
|
5
|
+
export type { FormContainerProps, FormInputProps, FormOptionProps } from './form-elements/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AssistantPanel,ASSISTANT_PANEL_SLOT}from"./AssistantPanel.js";export{useIsAssistantPanelOpen}from"./use-is-assistant-panel-open.js";
|
|
1
|
+
export{AssistantPanel,ASSISTANT_PANEL_SLOT}from"./AssistantPanel.js";export{useIsAssistantPanelOpen}from"./use-is-assistant-panel-open.js";export{createAssistantFormElementFactory}from"./form/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AssistantImage}from"./AssistantImage.js";export{
|
|
1
|
+
export{AssistantImage}from"./AssistantImage.js";export{isResourcePath}from"./resource-path.js";export{useResourceImageUrl}from"./use-resource-image-url.js";
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A path into the project's resources, the kind stored on `imageUrl` fields: no scheme and no host,
|
|
3
|
-
* so resolving it never leaves the resources origin. A backslash, a control character or leading
|
|
4
|
-
* whitespace is refused too, because the URL parser reads a backslash as a slash and strips the
|
|
5
|
-
* others, which would turn `\\host` or ` //host` into an address on another host.
|
|
6
|
-
*
|
|
7
|
-
* Written as a JSON Schema `pattern`, so attribute schemas can apply the same rule.
|
|
8
|
-
*/
|
|
9
|
-
export declare const RESOURCE_PATH_PATTERN: string;
|
|
10
1
|
/** True when the image source the model wrote may be requested: a path into the project's resources. */
|
|
11
2
|
export declare const isResourcePath: (src: string | undefined) => src is string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ASSISTANT_RESOURCE_PATH_PATTERN as e}from"#package/domain";let t=RegExp(e,"u");export const isResourcePath=e=>null!=e&&t.test(e);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AssistantToolScreenshot } from './tool-screenshots.js';
|
|
2
|
+
interface ScreenshotThumbnailsProps {
|
|
3
|
+
readonly screenshots: readonly AssistantToolScreenshot[];
|
|
4
|
+
/** Called once a picture has loaded, which changes the size of the popover. */
|
|
5
|
+
readonly onImageLoad: () => void;
|
|
6
|
+
}
|
|
7
|
+
/** The pictures of a tool call's screenshots, each captioned by its view and entity id. */
|
|
8
|
+
export declare const ScreenshotThumbnails: ({ screenshots, onImageLoad }: ScreenshotThumbnailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{styled as r}from"@mui/material";import{AssistantPanelName as o}from"../theme.js";let a=r("span",{name:o,slot:"screenshots"})(({theme:{palette:e,shape:i,shadows:r,spacing:o,typography:a}})=>({...a.caption,background:e.background.paper,borderRadius:i.borderRadius,boxShadow:r[4],color:e.text.secondary,display:"grid",gap:o(1.5),gridTemplateColumns:"repeat(auto-fill, minmax(140px, 1fr))",inlineSize:"min(80vw, 480px)",padding:o(1.5)})),n=r("span")(({theme:{spacing:e}})=>({display:"flex",flexDirection:"column",gap:e(.5),minInlineSize:0})),t=r("img")(({theme:{palette:e,shape:i}})=>({blockSize:"auto",borderRadius:i.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,inlineSize:"100%"})),s=r("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});export const ScreenshotThumbnails=({screenshots:r,onImageLoad:o})=>e(a,{children:r.map(({label:r,entityId:a,view:d,src:l})=>i(n,{children:[e(t,{src:l,alt:"",onLoad:o}),i(s,{title:r,children:[d," \xb7 ",a]})]},r))});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ScreenshotThumbnails}from"./ScreenshotThumbnails.js";export{readToolScreenshots}from"./tool-screenshots.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** A screenshot a `query` or `apply` call took, as the panel shows it. */
|
|
2
|
+
export interface AssistantToolScreenshot {
|
|
3
|
+
/** The label the call's `image` field returned, such as `Cabinet-2/doorLayout#2`. */
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly entityId: string;
|
|
6
|
+
readonly view: string;
|
|
7
|
+
/** The picture as a data URL. */
|
|
8
|
+
readonly src: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The screenshots of a tool result: the image parts that follow the result's JSON, each after the
|
|
12
|
+
* text part with its label. A result without them, such as plain JSON or an error, has none.
|
|
13
|
+
*/
|
|
14
|
+
export declare const readToolScreenshots: (result: unknown) => readonly AssistantToolScreenshot[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";let t=e.object({type:e.literal("text"),content:e.string()}),a=e.object({type:e.literal("image"),source:e.object({type:e.literal("data"),value:e.string(),mimeType:e.string()})}),s=/^([^/]+)\/([^#]+)(?:#\d+)?$/;export const readToolScreenshots=e=>Array.isArray(e)?e.slice(1).flatMap((e,r,c)=>{let l=a.safeParse(e),o=t.safeParse(c[r-1]),n=o.success?s.exec(o.data.content):null;if(!l.success||!o.success||!n?.[1]||!n[2])return[];let{value:i,mimeType:d}=l.data.source;return[{label:o.data.content,entityId:n[1],view:n[2],src:`data:${d};base64,${i}`}]}):[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const hasOpenFence: (text: string) => boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Makes the Markdown of a reply that is still streaming renderable as it stands, so half-written
|
|
5
|
-
* markup does not flash as raw characters: an open code fence is closed, an inline code span, a link
|
|
6
|
-
* or a table header the model has not finished is held back, and open bold text is closed.
|
|
5
|
+
* markup does not flash as raw characters: an open code fence is closed, an inline code span, a link,
|
|
6
|
+
* an alert marker or a table header the model has not finished is held back, and open bold text is closed.
|
|
7
7
|
*/
|
|
8
8
|
export declare const completeStreamedMarkdown: (text: string) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s
|
|
2
|
-
\`\`\``;let
|
|
1
|
+
let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/,l=/(^|\n) {0,3}>[ \t]*\[![a-z]*$/i,n=/(^|\n) {0,3}>[ \t]*\[![a-z]+\][ \t]*$/i;export const hasOpenFence=t=>e(t,"```")%2==1;export const completeStreamedMarkdown=s=>{var r;let a;if(hasOpenFence(s))return`${s}
|
|
2
|
+
\`\`\``;let i=s.lastIndexOf("```"),c=-1===i?"":s.slice(0,i+3),{head:$,marker:h}=(r=s.slice(c.length),null==(a=n.exec(r))?{head:r.replace(l,"$1"),marker:""}:{head:r.slice(0,a.index),marker:r.slice(a.index)}),p=(e=>{let l=e.split("\n"),n=l.length;for(;n>0&&l[n-1]?.trimStart().startsWith("|");)n-=1;let s=l.slice(n),r=s[1],a=null!=r&&s.length>2&&t.test(r);return 0===s.length||a?e:l.slice(0,n).join("\n")})((e($,"`")%2==1?$.slice(0,$.lastIndexOf("`")):$).replace(/!?\[([^\]\n]*)\](?:\([^)\n]*)?$/,"$1").replace(/!?\[[^\]\n]*$/,"")),d=e(p,"**")%2==1?`${p}**`:p;return`${c}${d}${h}`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Kind as e,parse as t}from"graphql";import{z as n}from"zod";import{ASSISTANT_TOOL_ERROR_CODES as r,AssistantToolError as a,applyTool as
|
|
1
|
+
import{Kind as e,parse as t}from"graphql";import{z as n}from"zod";import{ASSISTANT_TOOL_ERROR_CODES as r,AssistantToolError as a,applyTool as s,queryTool as o}from"@salsita-ai/contracts/assistant";let i=n.object({operations:n.array(n.object({query:n.string(),operationName:n.string().nullish()}))}),l=n.object({results:n.array(n.object({errors:n.array(n.unknown()).optional()})),committed:n.boolean()}),u=n.tuple([n.object({type:n.literal("text"),content:n.string()})]).rest(n.unknown());export const describeToolCall=n=>{let d=(({name:n,input:r})=>{let a,l=(a=i.safeParse(r)).success?a.data.operations.flatMap(({query:n,operationName:r})=>r??(n=>{try{let r=t(n).definitions.find(t=>t.kind===e.OPERATION_DEFINITION);return r?.kind===e.OPERATION_DEFINITION?r.name?.value:void 0}catch{return}})(n)??[]):[];return l.length>0?{kind:"text",text:l.join(", ")}:n===s.name?{kind:"updateDesign"}:n===o.name?{kind:"readDesign"}:{kind:"text",text:n}})(n);if(null==n.result&&null==n.error)return{label:d,state:n.isReplyRunning?"running":"done",errorCode:void 0};let c=(e=>{let t=a.safeParse(e);if(t.success)return r.find(e=>e===t.data.code)})(n.result);return{label:d,state:(({name:e,result:t,error:n},r)=>{if(null!=n||null!=r)return e===o.name?"flawed":"failed";if(e!==s.name&&e!==o.name)return"done";let a=l.safeParse((e=>{let t=u.safeParse(e);if(!t.success)return e;try{return JSON.parse(t.data[0].content)}catch{return e}})(t));if(!a.success)return e===o.name?"flawed":"failed";let{results:i,committed:d}=a.data;return e===s.name?d?"done":"failed":i.some(({errors:e})=>(e?.length??0)>0)||0===i.length?"flawed":"done"})(n,c),errorCode:c}};
|
|
@@ -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 l,useEffect as p,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 l,useEffect as p,useMemo as c,useState as f}from"react";import{BuiltInLoadingPhase as m,useExpectPhase as d,useLoadingPhase as h,useLoadingStateManager as u,useStoreSelector as g}from"#package/react-sdk";import{useResponsive as x}from"#package/ui-sdk";import{useConfigurator as v}from"../../../../application-runtime/index.js";import{Scene as C,SceneEnvironment as P}from"../../../../scene/index.js";import{CanvasLoader as w}from"../../../phoenix-layout-elements/index.js";import{GPUIssuePage as j}from"./GPUIssuePage.js";let D=e=>{let{onCanNotLoad:t}=e,r=n(e=>e.gl);return p(()=>{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),[E,B]=f(!0),{canvasSystem:L}=v(),y=g(e=>L.getCanvasConfig(e.state),[L]),k=i(),{canvasPadding:A}=x(),M=null!==u();d(m.SceneAssets),h({id:m.SceneAssets,label:"Loading 3D scene…"},E);let $=l(()=>{B(!1),L.reportFirstLoadFinished()},[L]),_=l(e=>{L.onCanvasClick$.next(e)},[L]),b=l(e=>{L.onCanvasPointerMove$.next(e)},[L]),I=c(()=>{let e={};return y?.precision&&(e.precision=y.precision),y?.alpha&&(e.alpha=y.alpha),y?.premultipliedAlpha&&(e.premultipliedAlpha=y.premultipliedAlpha),y?.antialias&&(e.antialias=y.antialias),y?.stencil&&(e.stencil=y.stencil),y?.preserveDrawingBuffer&&(e.preserveDrawingBuffer=y.preserveDrawingBuffer),y?.powerPreference&&(e.powerPreference=y.powerPreference),y?.depth&&(e.depth=y.depth),y?.logarithmicDepthBuffer&&(e.logarithmicDepthBuffer=y.logarithmicDepthBuffer),y?.failIfMajorPerformanceCaveat&&(e.failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat),e},[y]);return(p(()=>{"WEBGL_UNSUPPORTED"===k.type&&s("no-gpu")},[k,s]),n)?e(j,{issue:n}):t(r,{children:[e(a,{component:"div",sx:{transition:"opacity 0.3s ease-in",opacity:+!E,width:"100%",height:"100%"},children:t(o,{gl:I,onClick:_,onPointerMove:b,frameloop:y?.frameloop,shadows:y?.shadows,children:[e(C,{onFirstLoad:$}),e(D,{onCanNotLoad:s}),e(P,{})]})}),!M&&e(a,{component:"div",sx:{position:"absolute",top:A.top,left:A.left,width:`calc(100% - ${A.left}px - ${A.right}px)`,height:`calc(100% - ${A.top}px - ${A.bottom}px)`,display:"flex",justifyContent:"center",alignItems:"center",transition:"opacity 0.3s ease-in",opacity:+!!E,pointerEvents:"none"},children:e(w,{})})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material";import{Suspense as o,memo as r,useEffect as i,useRef as n,useState as a}from"react";import{useLoadingStateManager as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{styled as e}from"@mui/material";import{Suspense as o,memo as r,useEffect as i,useRef as n,useState as a}from"react";import{BuiltInLoadingPhase as s,useExpectPhase as l,useLoadingStateManager as m}from"#package/react-sdk";import{usePreview as c}from"../../../../configurator-context/index.js";import{CanvasLoader as p}from"../../../phoenix-layout-elements/index.js";import{Canvas as u}from"./LayoutCanvas.js";let d=e("div",{shouldForwardProp:t=>"masked"!==t})(({masked:t,theme:{palette:e}})=>({backgroundColor:e.background.scene,inset:0,position:"absolute",isolation:"isolate",maxBlockSize:"var(--phx-app-height)","&::after":{backgroundColor:"inherit",content:'""',display:"block",inset:"inherit",opacity:+!!t,pointerEvents:"none",position:"absolute",transitionDuration:t?"0ms":"100ms",transitionProperty:"opacity",transitionTimingFunction:"linear"}})),h=e("div")({display:"grid",inset:0,placeItems:"center",pointerEvents:"none",position:"absolute"}),f=()=>null!==m()?null:t(h,{children:t(p,{})});export const SharedCanvas=r(()=>{l(s.SceneAssets);let{isExpanded:e}=c(),[r,m]=a(!1),p=n(e);return i(()=>{if(e===p.current)return;p.current=e,m(!0);let t=setTimeout(()=>m(!1),600);return()=>clearTimeout(t)},[e]),t(d,{masked:r,children:t(o,{fallback:t(f,{}),children:t(u,{})})})});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Covers the configurator while an export runs, which keeps it inert: a press anywhere shows for a
|
|
3
|
+
* moment why nothing responds, instead of a configurator that silently ignores the user.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ExportingOverlay: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{styled as t}from"@mui/material";import{useCallback as o,useEffect as i,useState as a}from"react";let n=t("div",{name:"PhxExportingOverlay",slot:"root"})(({theme:{zIndex:e}})=>({alignItems:"center",cursor:"wait",display:"flex",inset:0,justifyContent:"center",position:"absolute",zIndex:e.modal+1})),l=t("div",{name:"PhxExportingOverlay",slot:"message"})(({theme:{palette:e,shape:r,shadows:t,spacing:o,typography:i}})=>({...i.body2,background:e.background.paper,borderRadius:r.borderRadius,boxShadow:t[4],color:e.text.primary,padding:o(1,2)}));export const ExportingOverlay=()=>{let[t,s]=a(null),m=o(()=>s(Date.now()),[]);return i(()=>{if(null===t)return;let e=setTimeout(()=>s(null),2e3);return()=>clearTimeout(e)},[t]),e(n,{onPointerDown:m,children:null!==t&&e(l,{role:"status",children:e(r,{id:"sdk.layout.exporting.message",message:"Configurator is exporting… please wait"})})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{useEffect as i}from"react";import{useEagerObservableValue as m}from"#package/react-sdk";import{useResponsive as n}from"#package/ui-sdk";import{useConfigurator as a}from"../../../application-runtime/index.js";import{LayoutSlots as s}from"../slots/index.js";import{DesktopLayout as c}from"./DesktopLayout.js";import{ExportingOverlay as p}from"./ExportingOverlay.js";import{MobileLayout as d}from"./MobileLayout.js";let l=o("div")({display:"contents"});export const Layout=()=>{let{isDesktop:o}=n(),{exportSystem:u}=a(),f=m(u.exporting$);return i(()=>{if(!f)return;let t=document.activeElement;return()=>{t instanceof HTMLElement&&t.isConnected&&document.activeElement===document.body&&t.focus()}},[f]),e(r,{children:[e(l,{...{inert:f?"":void 0},children:[t(s.Services,{}),t(s.SharedCanvas,{}),o?t(c,{}):t(d,{})]}),f&&t(p,{})]})};
|
|
@@ -7,7 +7,7 @@ export interface LayoutSceneSafeAreaOptions {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Measures the gap between a full-area container and an inner "safe area" element,
|
|
10
|
-
* and writes the resulting gaps to the responsive
|
|
10
|
+
* and writes the resulting gaps to the responsive state as canvas padding — letting the
|
|
11
11
|
* 3D scene render only in the region not covered by overlay UI (preview body, sidebar, etc.).
|
|
12
12
|
*
|
|
13
13
|
* The implementation behind `useSceneSafeArea`, with the two things only the built-in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as t,useEffect as e,useRef as r}from"react";import{canvasPaddingComponent as n}from"#package/domain";import{useFirstComponent as o
|
|
1
|
+
import{useCallback as t,useEffect as e,useRef as r}from"react";import{canvasPaddingComponent as n}from"#package/domain";import{useFirstComponent as o,useResponsiveStateManager as a}from"#package/react-sdk";export const useLayoutSceneSafeArea=c=>{let{enabled:u,hasMiniSidebar:i}=c,{setCanvasPadding:l}=a(),m=r(null),s=r(null),f=r(null),h=r(null),g=r(0),p=r(()=>{}),b=o({componentTypes:[n]}),d=t(()=>{let t=s.current,e=f.current;if(!u||!t||!e)return;let r=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(Math.abs(r.width-t.offsetWidth)>1||Math.abs(r.height-t.offsetHeight)>1){if(g.current+=1,g.current>60){g.current=0;return}m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>p.current());return}g.current=0;let o={bottom:Math.max(0,r.bottom-n.bottom),left:Math.max(0,n.left-r.left),right:Math.max(0,r.right-n.right),top:Math.max(0,n.top-r.top)},a=i?.3:1,c=b?.state.bottom??1,h=b?.state.left??1,d=b?.state.right??a,A=b?.state.top??1;l({bottom:o.bottom*c,left:o.left*h,right:o.right*d,top:o.top*A})},[u,i,b?.state.bottom,b?.state.left,b?.state.right,b?.state.top,l]);p.current=d;let A=t(()=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(d)},[d]),M=t(()=>{h.current?.disconnect(),h.current=null},[]),x=t(()=>{let t=s.current,e=f.current;if(!u||!t||!e)return void M();M();let r=new ResizeObserver(A);r.observe(t),r.observe(e),h.current=r},[M,u,A]),F=t(t=>{s.current=t,x()},[x]),v=t(t=>{f.current=t,x()},[x]);return e(()=>(x(),()=>{M(),m.current&&cancelAnimationFrame(m.current)}),[x,M]),{containerRef:F,safeAreaRef:v,update:A}};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A layout attaches `containerRef` to the element that covers the whole canvas and `safeAreaRef`
|
|
5
5
|
* to the region the scene should stay visible in. The hook measures the gap between the two,
|
|
6
|
-
* again whenever either element resizes, and writes it to the responsive
|
|
6
|
+
* again whenever either element resizes, and writes it to the responsive state as the canvas
|
|
7
7
|
* padding the camera frames the scene with.
|
|
8
8
|
*
|
|
9
9
|
* Returns:
|
|
@@ -4,3 +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 AssistantFormElementRoleProps, type AssistantFormElementType, type CreateAssistantFormElement, type FormContainerProps, type FormInputProps, type FormOptionProps, createAssistantFormElementFactory, } from './assistant/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./configurator-layout/index.js";export*from"./phoenix-entity-elements/index.js";export*from"./phoenix-layout-elements/index.js";export*from"./preset-layout/index.js";export*as Legacy from"./legacy/index.js";export*from"./ConfiguratorEncapsulatedTheme.js";
|
|
1
|
+
export*from"./configurator-layout/index.js";export*from"./phoenix-entity-elements/index.js";export*from"./phoenix-layout-elements/index.js";export*from"./preset-layout/index.js";export*as Legacy from"./legacy/index.js";export*from"./ConfiguratorEncapsulatedTheme.js";export{createAssistantFormElementFactory}from"./assistant/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{Box as i,styled as r}from"@mui/material";import{AnimatePresence as a}from"motion/react";import{Suspense as n,memo as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{Box as i,styled as r}from"@mui/material";import{AnimatePresence as a}from"motion/react";import{Suspense as n,memo as s,useEffect as l,useState as m}from"react";import{BuiltInLoadingPhase as c,useExpectPhase as d,useIsFullscreenActive as p,useLoadingStateManager as u,useResolveLocalizable as f}from"#package/react-sdk";import{useResponsive as b}from"#package/ui-sdk";import{usePreview as g}from"../../../../configurator-context/index.js";import{CanvasLoader as v}from"../../../phoenix-layout-elements/index.js";import{InterfaceLayout as x}from"../old/InterfaceLayout.js";import{PreviewLayout as h}from"../old/PreviewLayout.js";let k=({overlay:t})=>e("div",{style:{position:"absolute"},children:t}),y=r("div")({display:"grid",inset:0,placeItems:"center",pointerEvents:"none",position:"absolute"}),j=()=>null!==u()?null:e(y,{children:e(v,{})}),C=({canvas:t})=>{d(c.SceneAssets);let[o,r]=m(!0),{isPreview:a}=g();return l(()=>{r(!1);let e=setTimeout(()=>{r(!0)},400);return()=>{clearTimeout(e)}},[a]),e(i,{component:"div",sx:{backgroundColor:"background.scene",inset:0,isolation:"isolate",maxBlockSize:"var(--phx-app-height)",position:"absolute"},children:e(n,{fallback:e(j,{}),children:o&&t})})},S={id:"sdk.preview.customize.title",message:"Customize product"},L={id:"sdk.preview.start.button.label",message:"Start configuring"};export const ReactiveInterfaceLayout=s(i=>{let{canvas:r,sidebar:n,topNavigation:s,branding:l,toolbar:m,fullScreenToolbar:c,viewControls:d,toolControls:u,overlay:v,mobileControls:y,mobileTopNavigation:j,mobileHeaderActionButton:w,mobileHeaderCenter:z,footer:B,sideEffects:I,LayoutContainer:P}=i,{setCanvasPadding:T}=b(),A=p(),{isPreview:E,isHidden:F}=g(),H=f();return t(o,{children:[e(C,{canvas:r}),e(k,{overlay:v}),t(a,{children:[!F&&E&&e(h,{title:H(S),startButtonLabel:H(L),updateScenePadding:T}),!F&&!E&&e(x,{sidebar:n,topNavigation:s,branding:l,toolbar:m,toolbarSecondary:c,mobileControls:y,mobileTopNavigation:j,mobileHeaderActionButton:w,mobileHeaderCenter:z,footer:B,sideEffects:I,isFullScreen:A,updateScenePadding:T,LayoutContainer:P,viewControls:d,toolControls:u})]})]})});
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{keyframes as
|
|
2
|
-
0% { transform: perspective(200px) rotateX(0deg) rotateY(0deg) }
|
|
3
|
-
50% { transform: perspective(200px) rotateX(-180deg) rotateY(0deg) }
|
|
4
|
-
100% { transform: perspective(200px) rotateX(-180deg) rotateY(-180deg) }
|
|
5
|
-
`,g=o("span")(({theme:e})=>({animation:`${l} 1s linear infinite`,aspectRatio:1,background:e.palette.primary.main,height:36})),f=a`
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{keyframes as o,styled as a}from"@mui/material";import{useRef as s}from"react";import{createCustomPhoenixLayoutElement as i}from"#package/domain";import{BuiltInLoadingPhase as n,PhoenixLayoutElement as p,useLoadingStateValue as m,useResponsiveState as c}from"#package/react-sdk";import{AppLoaderContentName as l}from"../../app-loader-content/index.js";export const createAppLoader=t=>[i(l,()=>{let{phases:r}=m();return e(t,{phases:r})})];let d=o`
|
|
6
2
|
from { opacity: 0 }
|
|
7
3
|
to { opacity: 1 }
|
|
8
|
-
`,x=
|
|
4
|
+
`,x=a("div")({animation:`${d} 1000ms linear 300ms forwards`,opacity:0,display:"grid",inset:0,maxBlockSize:"var(--phx-app-height)",placeItems:"center",pointerEvents:"none",position:"absolute",transition:"inset 100ms ease-in-out",zIndex:9999});export const AppLoader=({mode:o="universal",children:a})=>{let{isLoading:i,hasError:d,phases:f,expectedPhaseIds:u}=m(),{canvasPadding:h}=c(),g=s(!1);if(f.some(e=>e.id===n.SceneAssets)&&(g.current=!0),"legacy"===o)return a;let y=u.has(n.SceneAssets)&&!g.current;return t(r,{children:[a,!d&&(i||y)&&e(x,{style:{inset:`${h.top}px ${h.right}px ${h.bottom}px ${h.left}px`},children:e(p,{name:l,elementProps:{phases:f}})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Badge as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Badge as o}from"@mui/material";import{memo as r,useCallback as a}from"react";import{assistantToolbarButtonSchema as s,createPhoenixLayoutElement as i}from"#package/domain";import{useLocalizable as e}from"#package/react-sdk";import{DesktopToolbar as m,PhxIcon as n,useResponsive as l}from"#package/ui-sdk";import{useAssistantPanel as c}from"../../toolbar-actions/index.js";let p={id:"sdk.assistant.toolbarButton.label",message:"Assistant"};export const AssistantToolbarButton=i({schema:s,component:r(r=>{let{icon:s,showTitle:i=!0}=r,{available:d,open:u,hasUnreadReply:k,setOpen:f}=c(),b=e(p),{isPhone:A,isTablet:g}=l(),x=a(()=>{f(!u)},[f,u]);return d?t(m.Button,{title:b,onClick:x,showTitle:i&&!A&&!g,"aria-pressed":u,sx:{'&[aria-pressed="true"]':{backgroundColor:"action.selected"}},children:t(o,{color:"primary",variant:"dot",overlap:"circular",invisible:!k,children:t(n,{name:s??(u?"CustomAiAssistantBold":"CustomAiAssistant")})})}):null})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as n}from"@lingui/react";import{Button as o,DialogActions as r,DialogContent as i,DialogTitle as l,ListItemText as t,MenuItem as m,MenuList as s,menuItemClasses as c,styled as g}from"@mui/material";import{memo as u,useCallback as d}from"react";import{createPhoenixLayoutElement as p,languageMenuActionSchema as h}from"#package/domain";import{useLocaleSwitch as x}from"#package/react-sdk";import{LocaleIcon as f}from"./language/LocaleIcon.js";import{useMenuRouting as C}from"./menu-actions/MenuRoutingContext.js";import{RoutingMenuAction as k}from"./menu-actions/RoutingMenuAction.js";let y=g(s)(({theme:{spacing:e}})=>({columnGap:e(2),display:"grid",gridTemplateColumns:"min-content auto",[`.${c.root}`]:{display:"grid",gridColumn:"1 / -1",gridTemplateColumns:"subgrid"}}));export const LanguageMenuAction=p({schema:h,component:u(()=>{let{locales:s,locale:c,setLocale:g}=x(),{close:u}=C(),p=d(e=>{g(e),u()},[g,u]);return a(k,{label:e(n,{id:"sdk.layout.hamburgerMenu.language.label",message:"Change Language"}),icon:e(f,{children:c}),children:[e(l,{children:e(n,{id:"sdk.layout.hamburgerMenu.language.dialogTitle",message:"Change Language"})}),e(i,{sx:{px:0},children:e(y,{children:s.map(n=>a(m,{onClick:()=>{p(n.locale)},children:[e(f,{sx:{color:"text.secondary"},children:n.locale}),e(t,{children:n.displayName})]},n.locale))})}),e(r,{children:e(o,{variant:"text",color:"inherit",onClick:u,children:e(n,{id:"sdk.layout.menu.language.close.label",message:"Close"})})})]})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as o}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as o}from"react/jsx-runtime";import{ListItemButton as r,ListItemText as l,List as t,listItemButtonClasses as i,styled as n}from"@mui/material";import{memo as m,useCallback as c}from"react";import{createPhoenixLayoutElement as s,languageToolbarButtonSchema as p}from"#package/domain";import{useLocaleSwitch as d,useResolveLocalizable as g}from"#package/react-sdk";import{DesktopToolbar as u}from"#package/ui-sdk";import{LocaleIcon as h}from"./language/LocaleIcon.js";let x=n(t)(({theme:{spacing:e}})=>({columnGap:e(2),display:"grid",gridTemplateColumns:"min-content auto",maxBlockSize:"calc(100cqb - 50px)",overflowY:"auto",[`.${i.root}`]:{display:"grid",gridColumn:"1 / -1",gridTemplateColumns:"subgrid"}})),f={id:"sdk.toolbar.language.title",message:"Switch language"},k="language-toolbar";export const LanguageToolbarButton=s({schema:p,component:m(()=>{let{locales:t,locale:i,setLocale:n}=d(),{ref:m,handleClose:s,handleToggle:p,openedKey:b}=u.useToolbarPopper(),C=g(),y=c(()=>{p("language-toolbar")},[p]),T=c(e=>{n(e),y()},[n,y]);return a(o,{children:[e(u.Button,{ref:m,title:C(f),size:"small","aria-expanded":b===k?"true":void 0,"aria-haspopup":"menu",onClick:y,children:e(h,{sx:{minInlineSize:24},children:i})}),e(u.Popper,{placement:"top-start",anchorEl:m.current,isOpen:b===k,onClose:s,children:e(x,{children:t.map(o=>a(r,{onClick:()=>{T(o.locale)},children:[e(h,{sx:{color:"text.secondary"},children:o.locale}),e(l,{primary:o.displayName})]},o.locale))})})]})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Trans as m}from"@lingui/react";import{Button as r,DialogActions as s,DialogContent as t,DialogTitle as o,Stack as i}from"@mui/material";import{memo as a}from"react";import{createPhoenixLayoutElement as u,measurementsMenuActionSchema as c}from"#package/domain";import{useMeasurements as l}from"../../toolbar-actions/index.js";import{DimensionUnitSelector as d}from"./measurements/DimensionUnitSelector.js";import{MeasurementsIcon as p}from"./measurements/MeasurementsIcon.js";import{MeasurementsIndicatorsSwitch as f}from"./measurements/MeasurementsIndicatorsSwitch.js";import{useMenuRouting as h}from"./menu-actions/MenuRoutingContext.js";import{RoutingMenuAction as g}from"./menu-actions/RoutingMenuAction.js";export const MeasurementsMenuAction=u({schema:c,component:a(a=>{let{showIndicatorSwitch:u,icons:c}=a,{unit:j,hasIndicatorSwitch:x,available:M}=l({showIndicatorSwitch:u}),{close:b}=h();return M?n(g,{label:e(m,{id:"sdk.layout.menu.measurements.label",message:"Change measure"}),icon:e(p,{unit:j,icons:c}),children:[e(o,{children:e(m,{id:"sdk.layout.menu.measurements.label",message:"Change measure"})}),e(t,{children:n(i,{spacing:2,direction:"column",children:[x&&e(f,{}),e(d,{})]})}),e(s,{children:e(r,{variant:"text",color:"inherit",onClick:b,children:e(m,{id:"sdk.layout.menu.measurements.close.label",message:"Close"})})})]}):null})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as s}from"react/jsx-runtime";import{Box as
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as s}from"react/jsx-runtime";import{Box as o,Stack as a}from"@mui/material";import{memo as n,useCallback as t}from"react";import{createPhoenixLayoutElement as m,measurementsToolbarButtonSchema as i}from"#package/domain";import{FrontendAnalyticsFactory as u,useAnalyticsService as p,useLocalizable as l}from"#package/react-sdk";import{DesktopToolbar as c}from"#package/ui-sdk";import{useMeasurements as d}from"../../toolbar-actions/index.js";import{DimensionUnitSelector as h}from"./measurements/DimensionUnitSelector.js";import{MeasurementsIcon as g}from"./measurements/MeasurementsIcon.js";import{MeasurementsIndicatorsSwitch as f}from"./measurements/MeasurementsIndicatorsSwitch.js";let k="measurements",j={id:"sdk.measurements",message:"Change measure"},x={id:"sdk.toolbar.measurements.change.aria",message:"open measure menu"};export const MeasurementsToolbarButton=m({schema:i,component:n(n=>{let{showIndicatorSwitch:m,icons:i}=n,{ref:M,handleClose:b,handleToggle:C,openedKey:T}=c.useToolbarPopper(),v=p(),{unit:B,hasIndicatorSwitch:I,available:P}=d({showIndicatorSwitch:m}),S=t(()=>{v.push(u.MeasurementsMenuToggled()),C(k)},[v,C]),w=t(e=>{v.push(u.MeasurementsMenuClosed()),b(e)},[v,b]),z=l(j),D=l(x);return P?r(s,{children:[e(c.Button,{ref:M,title:z,size:"small","aria-expanded":T===k?"true":void 0,"aria-label":D,"aria-haspopup":"menu",onClick:S,children:e(g,{unit:B,icons:i})}),e(c.Popper,{placement:"top-start",anchorEl:M.current,isOpen:T===k,onClose:w,children:e(o,{component:"div",sx:{p:2},children:r(a,{spacing:2,direction:"column",children:[I&&e(f,{}),e(h,{})]})})})]}):null})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import{memo as a,useCallback as t,useState as m}from"react";import{createPhoenixLayoutElement as s,shareToolbarButtonSchema as l}from"#package/domain";import{useResolveLocalizable as n,useShareLinks as i}from"#package/react-sdk";import{DesktopToolbar as p,PhxIcon as c}from"#package/ui-sdk";import{ShareModal as d}from"./share/ShareModal.js";let h={id:"sdk.toolbar.share.open.label",message:"Share"};export const ShareToolbarButton=s({schema:l,component:a(a=>{let{icon:s}=a,[l,k]=m(!1),{available:f}=i({enabled:!1}),u=t(()=>{k(!0)},[]),g=t(()=>{k(!1)},[]),x=n();return f?r(o,{children:[e(p.Button,{title:x(h),size:"small",onClick:u,children:e(c,{name:s??"Export"})}),l&&e(d,{onClose:g})]}):null})});
|
|
@@ -38,7 +38,7 @@ export interface ThemeableDesktopNavigationStepsProps extends OwnerState {
|
|
|
38
38
|
* - Renders horizontal step navigation for desktop layouts.
|
|
39
39
|
* - Hides when no navigation steps are available.
|
|
40
40
|
* - Integrates with MUI theming for customizable width behavior.
|
|
41
|
-
* - Retrieves steps
|
|
41
|
+
* - Retrieves the steps and moves between them with `useStepNavigation`.
|
|
42
42
|
*/
|
|
43
43
|
export declare const DesktopNavigationSteps: () => import("react/jsx-runtime").JSX.Element | null;
|
|
44
44
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{stepClasses as o,stepperClasses as e,styled as i,useThemeProps as r}from"@mui/material";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{stepClasses as o,stepperClasses as e,styled as i,useThemeProps as r}from"@mui/material";import{useStepNavigation as n}from"#package/react-sdk";import{StepsNavigation as a}from"./StepsNavigation.js";let l="PhxDesktopStepsNavigation",d=i("div",{name:l,slot:"root",shouldForwardProp:t=>"ownerState"!==t})(({ownerState:t,theme:{spacing:i}})=>({flexGrow:1,marginBlock:i(1),marginInline:"auto",maxInlineSize:t.fullWidth?void 0:856,[`.${e.horizontal}`]:{overflow:"hidden"},[`.${o.horizontal}`]:{"&:first-child":{paddingInlineStart:0},"&:last-child":{paddingInlineEnd:0}}}));export const DesktopNavigationSteps=()=>{let{fullWidth:o=!1}=r({props:{fullWidth:void 0},name:l}),{steps:e,activeIndex:i,goTo:s}=n();return 0===e.length?null:t(d,{ownerState:{fullWidth:o},children:t(a,{steps:e,activeIndex:i,goTo:s})})};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export
|
|
3
|
-
readonly navigationStates: readonly string[];
|
|
4
|
-
label: Localizable;
|
|
5
|
-
}
|
|
6
|
-
export interface StepsNavigationComponentProps {
|
|
7
|
-
steps: readonly TopNavigationStep[];
|
|
8
|
-
}
|
|
1
|
+
import { type UseStepNavigationResult } from '#package/react-sdk';
|
|
2
|
+
export type StepsNavigationComponentProps = Pick<UseStepNavigationResult, 'steps' | 'activeIndex' | 'goTo'>;
|
|
9
3
|
export declare const StepsNavigation: import("react").MemoExoticComponent<(props: StepsNavigationComponentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as o}from"@lingui/react";import{memo as a,useCallback as i}from"react";import{FrontendAnalyticsFactory as r,useAnalyticsService as s,usePresetEmbeddedState as c}from"#package/react-sdk";import{TopNavigation as p,useResponsive as l}from"#package/ui-sdk";import{useConfiguratorRouting as n,usePresetSelection as m}from"../../../../../configurator-context/index.js";export const StepsNavigation=a(a=>{let{steps:d,activeIndex:u,goTo:f}=a,g=s(),k=n(),{presetCategories:x}=m(),h=c(),C=x.flatMap(t=>t.presets).length>1,b=!h&&C,{isTablet:j}=l(),v=i(()=>{g.push(r.GoToProductsClicked()),k.goToIndex()},[g,k]);return e(p.Root,{activeStep:u+ +!!b,nonLinear:!0,compact:j,fullWidth:!0,children:[b&&t(p.Step,{isCompleted:!0,onClick:v,compact:j,children:t(o,{id:"sdk.layout.navigation.steps.first.label",message:"Products"})}),d.map(e=>{let o="complete"===e.status;return t(p.Step,{isCompleted:o,isDisabled:!o,compact:j,onClick:()=>f(e.index),children:e.label},e.label)})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import{match as i}from"ts-pattern";import{DimensionUnit as m}from"#package/domain";import{useLocalizable as r}from"#package/react-sdk";import{ToggleSelector as a}from"#package/ui-sdk";import{useMeasurements as o}from"../../../toolbar-actions/index.js";let n=r=>{let{value:o,onSelect:n}=r,l=e(()=>i(o).with(m.mm,()=>"mm").with(m.cm,()=>"cm").with(m.m,()=>"m").with(m.inch,()=>"in").with(m.feet,()=>"ft").exhaustive(),[o]),s=e(()=>i(o).with(m.mm,()=>"millimeter").with(m.cm,()=>"centimeter").with(m.m,()=>"meter").with(m.inch,()=>"inches").with(m.feet,()=>"feet").exhaustive(),[o]);return t(a.Item,{value:o,"aria-label":s,onClick:()=>n(o),children:l})},l={id:"sdk.toolbar.measurements.units.aria",message:"Measurement unit setup"};export const DimensionUnitSelector=()=>{let{units:e,unit:i,setUnit:m}=o(),s=r(l);return e.length<=1?null:t(a.Root,{"aria-label":s,value:i,exclusive:!0,columnCount:"auto-fit",sx:{maxWidth:500},children:e.map(e=>t(n,{value:e,onSelect:m},e))})};
|
package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Trans as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{Switch as r}from"@mui/material";import{useLocalizable as a}from"#package/react-sdk";import{MobileToolbar as i}from"#package/ui-sdk";import{useMeasurements as o}from"../../../toolbar-actions/index.js";let s={id:"sdk.toolbar.measurements.input.aria",message:"Switch measurements"};export const MeasurementsIndicatorsSwitch=()=>{let{indicatorsShown:m,toggleIndicators:n}=o(),c=a(s);return e(i.SectionItem,{title:e(t,{id:"sdk.toolbar.measurements.indicators.label",message:"Dimension indicators"}),content:e(r,{inputProps:{"aria-label":c},checked:m,onChange:n})})};
|