@salsita-ai/sdk 0.50.0-develop.f6390cb584 → 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/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 +33 -2
- package/dist/configurator/common/configurator-interface.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/pages/default-configurator-elements.d.ts +3 -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/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 +1 -0
- package/dist/configurator/toolbar-actions/index.js +1 -1
- 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/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/index.d.ts +1 -0
- package/dist/configurator/ui/index.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 +3 -1
- 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/navigation-hotspot.mdx +2 -0
- package/dist/docs/phoenix/configurator-interface.mdx +64 -8
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
- 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/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/system-hooks/undo-redo-hooks.js +1 -1
- package/dist/react-sdk/index.d.ts +1 -0
- package/dist/react-sdk/index.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/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/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/scene-control-elements/scene-control-tooltip-visibility.js} +0 -0
package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AssistantFormAttribute, type PhxValidateFunction, type SchemaValidator } from '#package/domain';
|
|
2
2
|
import type { FormElementDefinition } from './form-element-definition.js';
|
|
3
3
|
/** A declared attribute of a form element with the validator of its coerced value. */
|
|
4
4
|
export interface RegisteredFormAttribute {
|
|
5
5
|
readonly attribute: AssistantFormAttribute;
|
|
6
6
|
readonly validate: PhxValidateFunction;
|
|
7
7
|
}
|
|
8
|
-
/** A form element with its declared attributes, the built-in `label`
|
|
8
|
+
/** A form element with its declared attributes, the built-in `label` included. */
|
|
9
9
|
export interface RegisteredFormElement {
|
|
10
10
|
readonly definition: FormElementDefinition;
|
|
11
11
|
readonly attributes: ReadonlyMap<string, RegisteredFormAttribute>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ASSISTANT_FORM_NAME_PATTERN as e,isHtmlElementName as t}from"#package/domain";let r={type:"string"},n=e=>Object.entries({label:r,...e.attributes}),o=(e,t)=>{let r=e.get(t);if(r?.definition.role!==t)throw Error(`The form registry has no "${t}" element with the role "${t}". Forms wrap implicit content in it. Register the built-in "${t}".`);return r};export const createFormRegistry=(r,{schemaValidator:a})=>{let i=new Map;for(let o of r){if(!e.test(o.name)||t(o.name))throw Error(`The form element "${o.name}" cannot be registered: its name must be lowercase and must not be an HTML element name, so form markup is never read as HTML. Rename the element.`);if(i.has(o.name))throw Error(`The form element "${o.name}" is registered twice. Each tag names one element. Remove or rename one of them.`);let r=new Map(n(o).map(([e,t])=>[e,{attribute:t,validate:a.compile(t)}]));i.set(o.name,{definition:o,attributes:r})}return{group:o(i,"group"),choice:o(i,"choice"),choices:o(i,"choices"),get:e=>i.get(e)}};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BUILT_IN_FORM_ELEMENTS } from './built-in-form-elements.js';
|
|
2
|
+
export type { AssistantFormElementRoleProps, AssistantFormElementType, CreateAssistantFormElement, } from './create-assistant-form-element.js';
|
|
3
|
+
export { createAssistantFormElementFactory } from './create-assistant-form-element.js';
|
|
4
|
+
export { type FormElementDefinition, createFormElementDefinition } from './form-element-definition.js';
|
|
5
|
+
export { type FormRegistry, type FormRegistryContext, type RegisteredFormAttribute, type RegisteredFormElement, createFormRegistry, } from './form-registry.js';
|
|
6
|
+
export { useFormRegistry } from './use-form-registry.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BUILT_IN_FORM_ELEMENTS}from"./built-in-form-elements.js";export{createAssistantFormElementFactory}from"./create-assistant-form-element.js";export{createFormElementDefinition}from"./form-element-definition.js";export{createFormRegistry}from"./form-registry.js";export{useFormRegistry}from"./use-form-registry.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FormRegistry } from './form-registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* The registry the application's forms are read with. It is built when a form renders rather than
|
|
4
|
+
* when the bundle loads, since compiling validators then would break a configurator on a page whose
|
|
5
|
+
* CSP forbids eval, even one without an assistant; and rebuilt when the YAML or a component
|
|
6
|
+
* changes, so hot reload reaches the forms.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useFormRegistry: () => FormRegistry;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as r}from"react";import{extendedSchemaValidator as e}from"#package/domain";import{usePhoenixElementSlots as t,useSpecAssistant as m}from"#package/react-sdk";import{BUILT_IN_FORM_ELEMENTS as o}from"./built-in-form-elements.js";import{createFormElementDefinition as i}from"./form-element-definition.js";import{createFormRegistry as a}from"./form-registry.js";let f=[];export const useFormRegistry=()=>{let n=m()?.formElements??f,{assistantFormElements:s}=t();return r(()=>a([...o,...n.flatMap(r=>{let e=Object.entries(s).find(([e])=>e===r.name)?.[1];return e?[i(r,e)]:[]})],{schemaValidator:e}),[n,s])};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
2
|
+
import type { FormOptionProps } from './form-element-props.js';
|
|
3
|
+
type FormCardProps = FormOptionProps<AssistantBuiltInFormElementAttributes<'card'>>;
|
|
4
|
+
/**
|
|
5
|
+
* A `card`: a tile with its picture on top, then its label and description, outlined and checked
|
|
6
|
+
* while it is picked. A picture that is not a resource path or fails to load is left out.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FormCard: ({ attributes, label, disabled, selected, onSelect }: FormCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{styled as i}from"@mui/material";import{useCallback as o,useState as t}from"react";import{PhxIcon as a}from"#package/ui-sdk";import{useResourceImageUrl as n}from"../resource-image/index.js";import{AssistantPanelName as d}from"../theme.js";let l=i("button",{name:d,slot:"formCard"})(({theme:{palette:e,shape:r,spacing:i}})=>({alignContent:"start",background:e.background.paper,border:`1px solid ${e.divider}`,borderRadius:r.borderRadius,color:e.text.primary,cursor:"pointer",display:"grid",flex:"1 1 140px",font:"inherit",gap:i(.25),margin:0,maxInlineSize:220,padding:i(.75),position:"relative",textAlign:"start","&:hover:not(:disabled)":{background:e.action.hover},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1},"&:disabled":{color:e.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{borderColor:e.primary.main,boxShadow:`inset 0 0 0 1px ${e.primary.main}`}})),s=i("img",{name:d,slot:"formCardImage"})(({theme:{shape:e,spacing:r}})=>({aspectRatio:"4 / 3",borderRadius:e.borderRadius,display:"block",inlineSize:"100%",marginBlockEnd:r(.5),objectFit:"contain"})),m=i("span",{name:d,slot:"formCardLabel"})(({theme:{typography:e}})=>({...e.body2,fontWeight:e.fontWeightMedium})),p=i("span",{name:d,slot:"formCardDescription"})(({theme:{palette:e,typography:r}})=>({...r.caption,color:e.text.secondary})),c=i("span",{name:d,slot:"formCardCheck"})(({theme:{palette:e,spacing:r}})=>({alignItems:"center",background:e.primary.main,borderRadius:"50%",color:e.primary.contrastText,display:"flex",fontSize:14,insetBlockStart:r(.5),insetInlineEnd:r(.5),justifyContent:"center",padding:2,position:"absolute"}));export const FormCard=({attributes:i,label:d,disabled:u,selected:b,onSelect:f})=>{let{value:g,image:h}=i,x=[d,g].find(Boolean),y=""===i.description?void 0:i.description,k=n()(h),[C,j]=t(),v=o(()=>{j(k)},[k]);return r(l,{type:"button","aria-label":null==x&&null==y?h:void 0,disabled:u,"aria-pressed":b,onClick:()=>f([g,d,y,h].find(Boolean)??""),children:[null!=k&&k!==C&&e(s,{src:k,alt:"",loading:"lazy",onError:v}),null!=x&&e(m,{children:x}),null!=y&&e(p,{children:y}),b&&e(c,{"aria-hidden":!0,children:e(a,{name:"Check",fontSize:"inherit"})})]})};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
2
|
+
import type { FormInputProps } from './form-element-props.js';
|
|
3
|
+
type FormConfirmProps = FormInputProps<boolean, AssistantBuiltInFormElementAttributes<'confirm'>>;
|
|
4
|
+
/**
|
|
5
|
+
* A `confirm`: a yes or no question as ✓ and ✗ buttons. Its state is the pick, and it answers with
|
|
6
|
+
* the user's own words for yes and no, as the answer is their own message.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FormConfirm: ({ label, disabled, state, onChange }: FormConfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{alpha as i,styled as a}from"@mui/material";import{useLocalizable as o}from"#package/react-sdk";import{PhxIcon as t}from"#package/ui-sdk";import{AssistantPanelName as n}from"../theme.js";let s={id:"sdk.assistant.form.confirm.yes",message:"Yes"},l={id:"sdk.assistant.form.confirm.no",message:"No"},d=a("div",{name:n,slot:"formConfirm"})(({theme:{palette:e,spacing:r,typography:i}})=>({...i.caption,color:e.text.secondary,display:"grid",gap:r(.75)})),m=a("div",{name:n,slot:"formConfirmButtons"})(({theme:{spacing:e}})=>({display:"flex",gap:e(.75)})),c=a("button",{name:n,slot:"formConfirmButton"})(({theme:{palette:e,spacing:r}})=>({alignItems:"center",background:e.background.paper,border:`1px solid ${e.divider}`,borderRadius:"calc(infinity * 1px)",color:e.text.primary,cursor:"pointer",display:"inline-flex",justifyContent:"center",margin:0,paddingBlock:r(.5),paddingInline:r(1.5),"&:hover:not(:disabled)":{background:e.action.hover},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:1},"&:disabled":{color:e.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:i(e.primary.main,e.action.selectedOpacity),borderColor:e.primary.main}}));export const FormConfirm=({label:i,disabled:a,state:n,onChange:p})=>{let f=o(s),u=o(l);return r(d,{role:"group","aria-label":i,children:[null!=i&&e("span",{"aria-hidden":!0,children:i}),r(m,{children:[e(c,{type:"button","aria-label":f,title:f,disabled:a,"aria-pressed":!0===n,onClick:()=>p(!0,f),children:e(t,{name:"Check",fontSize:"small"})}),e(c,{type:"button","aria-label":u,title:u,disabled:a,"aria-pressed":!1===n,onClick:()=>p(!1,u),children:e(t,{name:"X",fontSize:"small"})})]})]})};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { AssistantBuiltInFormElementAttributes } from '#package/domain';
|
|
1
2
|
import type { FormContainerProps } from './form-element-props.js';
|
|
3
|
+
type FormGroupProps = FormContainerProps<AssistantBuiltInFormElementAttributes<'group'>>;
|
|
2
4
|
/** A `group`: its children stacked under its label, which heads them. */
|
|
3
|
-
export declare const FormGroup: ({ label, children }:
|
|
5
|
+
export declare const FormGroup: ({ label, children }: FormGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -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}};
|
|
@@ -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,{})]})};
|
|
@@ -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";
|
|
@@ -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-17T06:40:12.837Z",
|
|
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": [
|
|
@@ -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: `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).
|
|
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.
|