@salsita-ai/sdk 0.50.0-develop.d87b28256e → 0.50.0-develop.d96df76afa
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/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/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 +90 -4
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +3 -3
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -1
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +4 -0
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
- package/dist/configurator/index.d.ts +1 -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/default-configurator-elements.d.ts +4 -3
- 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/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.js +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/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/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 +3516 -0
- package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -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 +2683 -0
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
- package/dist/docs/phoenix/configurator-interface.mdx +93 -10
- package/dist/docs/phoenix/layout-slots.mdx +4 -4
- 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/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
- package/dist/react-sdk/application-runtime/index.d.ts +1 -0
- 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/responsive/actions.d.ts +47 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
- 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 +91 -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 +9 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.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/tab-navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
- package/dist/react-sdk/index.d.ts +1 -1
- 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/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/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 +2 -2
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
- 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/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
- package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
- package/dist/react-sdk/responsive-state/index.d.ts +0 -5
- package/dist/react-sdk/responsive-state/index.js +0 -1
- package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
- package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
- package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
- package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
- /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/application-runtime/responsive/types.js} +0 -0
- /package/dist/react-sdk/{responsive-state/canvas-padding.js → scene-control-elements/scene-control-tooltip-visibility.js} +0 -0
|
@@ -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,{})]})};
|
|
@@ -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,useResponsiveActions 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}};
|
|
@@ -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:`${d} 1s linear infinite`,aspectRatio:1,background:e.palette.primary.main,height:36})),x=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
|
-
`,
|
|
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})});
|
|
@@ -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})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{Button as
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{Button as l,DialogActions as r,DialogContent as o,DialogTitle as n,FormControlLabel as s,LinearProgress as t,Stack as d,Switch as c,TextField as h}from"@mui/material";import{memo as m,useCallback as p,useState as b}from"react";import{useResolveLocalizable as g,useShareLinks as k}from"#package/react-sdk";import{Dialog as u,PhxIcon as x}from"#package/ui-sdk";let C=i=>{let{isLinkCopied:r,onCopy:o,disabled:n}=i;return r?e(l,{variant:"muted",color:"success",startIcon:e(x,{name:"Check"}),disabled:n,onClick:o,children:e(a,{id:"sdk.toolbar.share.linkCopied.label",message:"Copied"})}):e(l,{variant:"contained",disabled:n,onClick:o,children:e(a,{id:"sdk.toolbar.share.copyLink.label",message:"Copy link"})})},v={id:"sdk.toolbar.share.loading.label",message:"loading link..."},f=({link:a,onFocus:l})=>i(d,{sx:{display:"grid","& > *":{gridArea:"1 / 1"}},children:[e(h,{value:a??"",placeholder:g()(v),hiddenLabel:!0,InputProps:{readOnly:!0},onFocus:l}),e(t,{sx:{alignSelf:"end",visibility:null==a?"visible":"hidden"}})]});export const ShareModal=m(t=>{let{onClose:h}=t,{ownerLinkAvailable:m,readLinkAvailable:g,ownerLink:x,readLink:v}=k(),[y,w]=b(!g),[T,j]=b(null),L=(y?x:v)??void 0,S=void 0!==L&&L===T,A=p(async()=>{L&&(await navigator.clipboard.writeText(L),j(L))},[L]),F=p(e=>{e.currentTarget.select()},[]),I=p(e=>{w(e.currentTarget.checked)},[]);return i(u.Root,{sx:{maxWidth:"unset",width:"min(100%, 520px)"},isOpen:!0,onClose:h,children:[e(n,{children:e(a,{id:"sdk.toolbar.share.label",message:"Share configuration"})}),e(o,{children:i(d,{sx:{gap:2},children:[e(f,{link:L,onFocus:F}),m&&g&&e(s,{control:e(c,{value:y,disabled:!L,onChange:I}),label:e(a,{id:"sdk.toolbar.share.allowEdit.label",message:"Allow the recipient to edit configuration"})})]})}),i(r,{children:[e(l,{variant:"text",color:"inherit",onClick:h,children:e(a,{id:"sdk.toolbar.share.close.label",message:"Close"})}),e(C,{isLinkCopied:S,disabled:!L,onCopy:A})]})]})});
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import type { AccessLevel } from '@salsita-ai/contracts/api';
|
|
2
|
-
export interface GenerateShareLinkOptions {
|
|
3
|
-
access: AccessLevel;
|
|
4
|
-
expiration?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const useGenerateShareLink: () => (options: GenerateShareLinkOptions) => Promise<{
|
|
7
|
-
readonly link: string;
|
|
8
|
-
}>;
|
|
9
1
|
interface UseShareDataParams {
|
|
10
2
|
/**
|
|
11
3
|
* Expiration time in hours. When undefined, links do not expire.
|
|
@@ -14,6 +6,9 @@ interface UseShareDataParams {
|
|
|
14
6
|
ownerLinkDisabled: boolean;
|
|
15
7
|
readRevisionLinkDisabled: boolean;
|
|
16
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use useShareLinks() instead. This API will be removed in a future version.
|
|
11
|
+
*/
|
|
17
12
|
export declare const useShareData: (params: UseShareDataParams) => {
|
|
18
13
|
isLoadingOwnerData: boolean;
|
|
19
14
|
isLoadingRevisionData: boolean;
|
|
@@ -24,6 +19,10 @@ export declare const useShareData: (params: UseShareDataParams) => {
|
|
|
24
19
|
readonly link: string;
|
|
25
20
|
}> | undefined;
|
|
26
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use useShareLinks() instead, whose `available`, `ownerLinkAvailable` and `readLinkAvailable` say which
|
|
24
|
+
* links can be shared. This API will be removed in a future version.
|
|
25
|
+
*/
|
|
27
26
|
export declare const useShareSettings: () => {
|
|
28
27
|
disabled: boolean;
|
|
29
28
|
ownerLinkDisabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useQuery as e}from"@tanstack/react-query";import{
|
|
1
|
+
import{useQuery as e}from"@tanstack/react-query";import{applicationConfigComponent as a}from"#package/domain";import{useConfigurationId as t,useDomain as r,useFirstRootComponent as s,useGenerateShareLink as i}from"#package/react-sdk";export const useShareData=a=>{let{expiration:s,ownerLinkDisabled:n,readRevisionLinkDisabled:o}=a,d=i(),{storeSystem:c}=r(),l=t(),u=c.stateSlices.committed.value.state,{data:m,isLoading:h}=e({queryKey:["share-owner-link",l],staleTime:1/0,queryFn:()=>d({access:"o",expiration:s}),enabled:!n}),{data:k,isLoading:y,isFetchedAfterMount:p}=e({queryKey:["share-revision-link",l,u.entities,u.rootEntityId],queryFn:()=>d({access:"rr",expiration:s}),enabled:!o});return{isLoadingOwnerData:h,isLoadingRevisionData:y,ownerData:m,revisionData:p?k:void 0}};export const useShareSettings=()=>{let e=s(a),t=e?.state.shareDisabled??!1,r=t||(e?.state.shareOwnerLinkDisabled??!1),i=t||(e?.state.shareReadRevisionLinkDisabled??!1);return{disabled:r&&i,ownerLinkDisabled:r,readRevisionLinkDisabled:i}};
|
|
@@ -69,6 +69,8 @@ components:
|
|
|
69
69
|
|
|
70
70
|
The toolMenuFab is scene HTML rendered at the entity's position in the 3D scene. It supports positioning properties (`offsetX`, `offsetY`, `offsetZ`) and appearance properties like opacity and visibility.
|
|
71
71
|
|
|
72
|
+
The FAB and its menu are the entity element `ToolMenuFab`. A project replaces them by registering its own with `phx.frontend.createToolMenuFab`, which receives the `options` and `onSelectTool(toolState)`. See [Configurator Interface → In-Scene Controls](?path=/docs/phoenix-configurator-interface--docs#in-scene-controls).
|
|
73
|
+
|
|
72
74
|
### Step 3: Add exitToolModeFab component
|
|
73
75
|
|
|
74
76
|
The `exitToolModeFab` component renders a button in the call to action layout slot, providing a clear way to exit the current tool mode. This appears in the UI chrome, not in the scene:
|
package/dist/docs/fabs/basic.mdx
CHANGED
|
@@ -131,6 +131,10 @@ components:
|
|
|
131
131
|
- non-existent
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
+
### Your own FABs
|
|
135
|
+
|
|
136
|
+
The FABs are the entity elements `DeleteEntityFab` and `AddEntityFab`. A project replaces their look by registering its own with `phx.frontend.createDeleteEntityFab` or `phx.frontend.createAddEntityFab`; the spec's settings and positions above still apply. The delete FAB's replacement gets `onDelete`, `disabled` and `disabledHint`; the add FAB's reads its recipes with `phx.frontend.useGroupedRecipeOptions`. See [Configurator Interface → In-Scene Controls](?path=/docs/phoenix-configurator-interface--docs#in-scene-controls).
|
|
137
|
+
|
|
134
138
|
## Example
|
|
135
139
|
|
|
136
140
|
Here you can see the live example!
|
package/dist/docs/index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"generatedAt": "2026-10-17T07:11:27.274Z",
|
|
3
3
|
"categories": [
|
|
4
4
|
{
|
|
5
5
|
"name": "Phoenix",
|
|
@@ -881,6 +881,67 @@
|
|
|
881
881
|
],
|
|
882
882
|
"subcategories": []
|
|
883
883
|
},
|
|
884
|
+
{
|
|
885
|
+
"name": "Gallery",
|
|
886
|
+
"docs": [
|
|
887
|
+
{
|
|
888
|
+
"title": "Ardent Compressor",
|
|
889
|
+
"description": "Quote an engineered product from a form, with no 3D model at all. An industrial compressor maker, Ardent Air, lets plant engineers size a rotary screw compressor and ask for a firm quote. The...",
|
|
890
|
+
"path": "docs/layouts/gallery/ardent-compressor.mdx",
|
|
891
|
+
"category": [
|
|
892
|
+
"Layouts",
|
|
893
|
+
"Gallery",
|
|
894
|
+
"Ardent Compressor"
|
|
895
|
+
],
|
|
896
|
+
"source": "storybook-example"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"title": "Fenwick Window",
|
|
900
|
+
"description": "Show a made-to-measure product as the drawing a workshop would build it from. A joinery, Fenwick & Lowe, sells timber casement windows to order: the customer sets the overall size, the panes across,...",
|
|
901
|
+
"path": "docs/layouts/gallery/fenwick-window.mdx",
|
|
902
|
+
"category": [
|
|
903
|
+
"Layouts",
|
|
904
|
+
"Gallery",
|
|
905
|
+
"Fenwick Window"
|
|
906
|
+
],
|
|
907
|
+
"source": "storybook-example"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"title": "Ferrule Bar Station",
|
|
911
|
+
"description": "Let a bar designer lay out a commercial bartender station and hand the result straight to the workshop. A fictional maker, Ferrule Barworks, sells stainless underbar stations built from modules: ice...",
|
|
912
|
+
"path": "docs/layouts/gallery/ferrule-bar-station.mdx",
|
|
913
|
+
"category": [
|
|
914
|
+
"Layouts",
|
|
915
|
+
"Gallery",
|
|
916
|
+
"Ferrule Bar Station"
|
|
917
|
+
],
|
|
918
|
+
"source": "storybook-example"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"title": "Kestrel Kettle",
|
|
922
|
+
"description": "Sell a small product from one calm page that looks like the shop's own. A specialty-coffee shop, Aldermoor Coffee, sells its Kestrel pour-over kettle in three finishes, two handle woods and with or...",
|
|
923
|
+
"path": "docs/layouts/gallery/kestrel-kettle.mdx",
|
|
924
|
+
"category": [
|
|
925
|
+
"Layouts",
|
|
926
|
+
"Gallery",
|
|
927
|
+
"Kestrel Kettle"
|
|
928
|
+
],
|
|
929
|
+
"source": "storybook-example"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"title": "Sunfold Solar",
|
|
933
|
+
"description": "Help a household decide on a system by showing what it would do for them. A solar installer, Sunfold, lets a homeowner plan panels and a battery for their roof: the roof's area and direction, the...",
|
|
934
|
+
"path": "docs/layouts/gallery/sunfold-solar.mdx",
|
|
935
|
+
"category": [
|
|
936
|
+
"Layouts",
|
|
937
|
+
"Gallery",
|
|
938
|
+
"Sunfold Solar"
|
|
939
|
+
],
|
|
940
|
+
"source": "storybook-example"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
"subcategories": []
|
|
944
|
+
},
|
|
884
945
|
{
|
|
885
946
|
"name": "Header",
|
|
886
947
|
"docs": [
|
|
@@ -164,7 +164,7 @@ The components it uses live in `src/_shared/`, which Phoenix does not import by
|
|
|
164
164
|
## What the layout has to do
|
|
165
165
|
|
|
166
166
|
- **Position the root and cover the page.** `LayoutSlots.SharedCanvas` is absolutely positioned and fills its nearest positioned ancestor. The root here is `position: absolute; inset: 0`.
|
|
167
|
-
- **Mount the shared canvas.**
|
|
167
|
+
- **Mount the shared canvas.** It renders the scene, and the app loader stays on screen until the scene has loaded. A layout without a canvas is not held by the loader: it leaves once the configuration is up.
|
|
168
168
|
- **Put the UI above the canvas.** The canvas is opaque. Content that is positioned and comes after it in the markup is painted above it; unpositioned content is painted under it and cannot be seen.
|
|
169
169
|
- **Tell the camera where the free area is.** `useSceneSafeArea()` returns two refs. `containerRef` goes on the element that covers the whole canvas, `safeAreaRef` on the region the product should stay visible in, here everything right of the panel, or above the sheet on a phone. The camera then frames the product in that region. The hook measures again whenever either of the two elements resizes; for a change no resize reports, such as a `transform` on an ancestor settling at the end of an animation, it also returns `update` to call. Without the two refs the product is centred in the whole canvas and sits against the panel.
|
|
170
170
|
- **Let the pointer through.** The safe-area element lies over the canvas, so it sets `pointerEvents: 'none'`; otherwise the scene cannot be orbited. The fullscreen button inside it switches pointer events back on.
|
|
@@ -1032,6 +1032,8 @@ export default phx.frontend.createCustomPhoenixEntityElement('EdgeFinishHotspot'
|
|
|
1032
1032
|
|
|
1033
1033
|
[Html Hotspots](?path=/docs/controls-scene-html-hotspots--docs) describes the component and its other properties.
|
|
1034
1034
|
|
|
1035
|
+
The SDK's own controls on the product, such as `sceneEntityAddFab` and `sceneEntitySelectHotspot`, keep the SDK's look in a project layout too. Each is rendered through an entity element of its own name, so a project gives it the brand's look by registering that name, for example with `phx.frontend.createAddEntityFab`; see [Configurator Interface → In-Scene Controls](?path=/docs/phoenix-configurator-interface--docs#in-scene-controls). `htmlHotspot` is for a control the SDK has none of, like this one.
|
|
1036
|
+
|
|
1035
1037
|
## Control the scene
|
|
1036
1038
|
|
|
1037
1039
|
The four finishes differ by a few millimetres on a table two metres long, so from the default distance the difference is hard to judge. The layout offers two views, **Whole table** and **Edge close-up**, a close and low look at a corner of the top, and a **Reset view** button that brings back the framing after the customer has orbited, panned or zoomed.
|
|
@@ -1268,7 +1270,7 @@ The same layout in a frame 390 pixels wide, as on a phone. Opened on its own fro
|
|
|
1268
1270
|
A project layout has only what it renders. This one leaves out the following, each of which a product may need. [Layout Slots](?path=/docs/phoenix-layout-slots--docs) describes every `LayoutSlots` member named here.
|
|
1269
1271
|
|
|
1270
1272
|
- **Messages that stay snackbars.** The toast shows violations, side effects, errors and failed saves, and the finalize button shows its own error. Two kinds of message stay snackbars. An error of a built-in action, such as one from `LayoutSlots.DesktopToolbar`, renders into `LayoutSlots.DesktopSnackbarsRoot`; this layout mounts neither, and a layout that mounts such an action mounts the root too, or the snackbar appears outside the configurator. A failure to start from a preset appears on the preset screen, before this layout mounts; a project replaces that screen with `phx.frontend.createPresetUi`, see [Configurator Interface → Preset UI](?path=/docs/phoenix-configurator-interface--docs#preset-ui).
|
|
1271
|
-
- **Toolbar actions.** Undo and redo, measurements, sharing and language switching are not offered. A layout can mount `LayoutSlots.DesktopToolbar` for the toolbar the spec configures, or build its own buttons
|
|
1273
|
+
- **Toolbar actions.** Undo and redo, measurements, sharing and language switching are not offered. A layout can mount `LayoutSlots.DesktopToolbar` for the toolbar the spec configures, or build its own buttons: `phx.frontend.useToolbarActions()` returns the spec's toolbar as runnable entries, and `phx.frontend.useUndoRedo()`, `useMeasurements()`, `useShareLinks()` and `useLocaleSwitch()` serve single actions, pushing the same analytics events as the built-in buttons; see [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout).
|
|
1272
1274
|
- **The spec's view controls, tool controls and leaving a tool mode.** A spec can configure view controls and tool controls, and a tool mode has a button that leaves it. The built-in layout places them with `LayoutSlots.DesktopViewControls`, `LayoutSlots.DesktopToolControls` and `LayoutSlots.DesktopCallToAction`; this layout mounts none of them, so the spec's `viewControls` and `toolControls` do not appear. Its views come from its own buttons instead, see [Control the scene](#control-the-scene), and it has no tool modes.
|
|
1273
1275
|
- **A project's layout dialog.** A dialog the project registers with `phx.frontend.createLayoutDialog` is shown by `LayoutDialog`, which the built-in layout mounts. This layout does not; a layout that needs the dialog mounts `LayoutDialog` from `@salsita-ai/sdk/configurator`.
|
|
1274
1276
|
- **Selection.** The table has no parts to select. A product with selectable parts reads `phx.frontend.useSelectedDomainEntityId()` and shows the controls of the selected part.
|