@salsita-ai/sdk 0.50.0-develop.aec0f535bf → 0.50.0-develop.af031dec0f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -2
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +1 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +26 -29
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +11 -12
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +3 -2
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -11
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +16 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +47 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +15 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +42 -5
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +4 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/cli-client/cli-api-client.d.ts +17 -0
- package/dist/client/cli-client/cli-api-client.js +1 -0
- package/dist/client/cli-client/index.d.ts +2 -0
- package/dist/client/cli-client/index.js +1 -0
- package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
- package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5290 -1754
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +44 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
- package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +7 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +91 -33
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +12 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +43 -37
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +29 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +14 -4
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +38 -9
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +9 -7
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +5 -5
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
- package/dist/configurator/ui/assistant/annotation/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/index.js +1 -1
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
- package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
- package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +7 -4
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
- package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -3
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +2 -2
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +2 -1
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +2 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +2 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
- package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
- package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
- package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
- package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
- package/dist/configurator/ui/index.d.ts +1 -1
- package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
- package/dist/docs/index.json +22 -2
- package/dist/docs/layouts/nested-view-controls.mdx +223 -0
- package/dist/docs/layouts/presets/custom.mdx +1 -0
- package/dist/docs/layouts/preview/always.mdx +22 -0
- package/dist/docs/layouts/view-controls.mdx +2 -0
- package/dist/docs/other-features/domain-actions.mdx +10 -11
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +81 -35
- package/dist/docs/phoenix/data-sources.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +1 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +89 -53
- package/dist/docs/phoenix/project-structure.mdx +7 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +56 -27
- package/dist/docs/phoenix/sessions-and-access.mdx +9 -6
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhooks.mdx +55 -3
- package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
- package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
- package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
- package/dist/docs/ux-guidelines/overview.mdx +11 -9
- package/dist/domain/application/application-config.d.ts +5 -0
- package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
- package/dist/domain/application/assistant/assistant-exposure.js +1 -0
- package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
- package/dist/domain/application/assistant/assistant-selection.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +14 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +5 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
- package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
- package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +17 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant-field-options.d.ts +2 -0
- package/dist/domain/application/assistant-field-options.js +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +17 -11
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
- package/dist/domain/application/assistant-recipe-groups.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +8 -0
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components/available-system-components.js +1 -1
- package/dist/domain/core/action/action.d.ts +0 -49
- package/dist/domain/core/component/system-component-filter.d.ts +1 -0
- package/dist/domain/core/component/system-component-filter.js +1 -1
- package/dist/domain/core/component/view-state-component.d.ts +4 -3
- package/dist/domain/core/component/view-state-component.js +1 -1
- package/dist/domain/core/domain-factory.d.ts +2 -3
- package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
- package/dist/domain/core/invariant/control-violation-hints.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +1 -0
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
- package/dist/domain/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -6
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
- package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
- package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
- package/dist/domain/extensions/assistant/index.d.ts +1 -0
- package/dist/domain/extensions/assistant/index.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -8
- package/dist/domain/spec/modules/index.d.ts +0 -1
- package/dist/domain/spec/modules/index.js +1 -1
- package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
- package/dist/domain/spec/phx/phx-domain.js +1 -1
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
- package/dist/domain/spec/runtime/create-application.d.ts +5 -2
- package/dist/domain/spec/runtime/create-application.js +1 -1
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +28 -1
- package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
- package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +30 -2
- package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
- package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
- package/dist/domain/spec/sections/assistant/index.d.ts +3 -1
- package/dist/domain/system-components/index.d.ts +1 -0
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/navigation/index.d.ts +1 -0
- package/dist/domain/system-components/navigation/index.js +1 -0
- package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
- package/dist/domain/system-components/navigation/view-controls.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/index.d.ts +1 -0
- package/dist/extras/cognito/index.js +1 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
- package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
- package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +24 -2
- package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
- package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
- package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +1 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/account/index.d.ts +1 -0
- package/dist/phoenix/commands/account/index.js +1 -0
- package/dist/phoenix/commands/account/whoami.d.ts +10 -0
- package/dist/phoenix/commands/account/whoami.js +4 -0
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +8 -2
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/feedback.d.ts +2 -2
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init-starter-spec.js +3 -4
- package/dist/phoenix/commands/init.d.ts +2 -2
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/login.d.ts +6 -3
- package/dist/phoenix/commands/login.js +3 -3
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/services/cli-credentials.d.ts +26 -7
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
- package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
- package/dist/phoenix/services/cli-server/index.d.ts +2 -0
- package/dist/phoenix/services/cli-server/index.js +1 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/index.d.ts +4 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/phoenix-application.js +1 -1
- package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
- package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
- package/dist/phoenix/services/spec-project/index.d.ts +3 -0
- package/dist/phoenix/services/spec-project/index.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
- package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
- package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +14 -16
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +2 -1
- package/dist/react-sdk/preset-selection/index.js +1 -1
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
- package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +3 -1
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +9 -4
- package/schema/domain-spec.json +440 -53
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
- package/dist/domain/domain-context/action-system/action-system.js +0 -1
- package/dist/domain/domain-context/action-system/index.d.ts +0 -1
- package/dist/domain/domain-context/action-system/index.js +0 -1
- package/dist/domain/domain-runtime/action-factory.d.ts +0 -11
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
- package/dist/domain/extensions/view-controls.d.ts +0 -25
- package/dist/domain/extensions/view-controls.js +0 -1
- package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
- /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
- /package/dist/{domain/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -45,6 +45,14 @@ preview: always # auto | always | never | hide
|
|
|
45
45
|
alwaysExpand: false # optional, true expands the configurator when users leave the preview, on desktop too
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
### Customize the start screen
|
|
49
|
+
|
|
50
|
+
To introduce a product before the visitor starts, provide a project translation for `sdk.preview.customize.message`. The desktop and mobile universal layouts show it between the heading and Start button. If the resolved text is missing or blank, the button follows the heading with the usual spacing.
|
|
51
|
+
|
|
52
|
+
This example declares three [Lingui messages](?path=/docs/phoenix-localization--docs) in `src/_shared/preview-messages.ts`. Run `pnpm phoenix sync` to extract them and compile your project’s `src/locales/<locale>/messages.po` catalogs. The heading uses `sdk.preview.customize.title` and the button uses `sdk.preview.start.button.label`. Each translation can be overridden independently, and the project’s usual locale fallbacks apply.
|
|
53
|
+
|
|
54
|
+
Style each part through `components.PhxPreview.styleOverrides` using the `title`, `description`, and `button` keys. For example, set `styleOverrides.description` to `{ maxWidth: '45ch' }` to limit the paragraph’s line length. [Try the long-text preview](?path=/story/design-system-components-preview--long-text).
|
|
55
|
+
|
|
48
56
|
## Test cases
|
|
49
57
|
|
|
50
58
|
- Preview mode always active regardless of breakpoint
|
|
@@ -160,6 +168,20 @@ components:
|
|
|
160
168
|
$read: $edgeFinishOptions
|
|
161
169
|
```
|
|
162
170
|
|
|
171
|
+
### ./src/\_shared/preview-messages.ts
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
import { msg } from '@lingui/core/macro'
|
|
175
|
+
|
|
176
|
+
// Lingui extracts these project overrides for the built-in universal preview.
|
|
177
|
+
msg({ id: 'sdk.preview.customize.title', message: 'Design your table' })
|
|
178
|
+
msg({
|
|
179
|
+
id: 'sdk.preview.customize.message',
|
|
180
|
+
message: 'Choose an edge finish for your tabletop and preview the result before you decide.',
|
|
181
|
+
})
|
|
182
|
+
msg({ id: 'sdk.preview.start.button.label', message: 'Start designing' })
|
|
183
|
+
```
|
|
184
|
+
|
|
163
185
|
### ./src/components/components.tsx
|
|
164
186
|
|
|
165
187
|
```tsx
|
|
@@ -17,6 +17,8 @@ Common use cases include:
|
|
|
17
17
|
- **Engineering drawings**: Standard mechanical drawing views (front, top, left, isometric)
|
|
18
18
|
- **3D model inspection**: Multiple angles for comprehensive object examination
|
|
19
19
|
|
|
20
|
+
For a menu of related views or runtime options within one view, see [Nested View Controls](?path=/docs/layouts-nested-view-controls--docs).
|
|
21
|
+
|
|
20
22
|
## Guide
|
|
21
23
|
|
|
22
24
|
### Step 1: Define view states
|
|
@@ -49,11 +49,13 @@ Generation derives the types `ActionTypes`, `ActionName`, `ActionParams<'nudgeHo
|
|
|
49
49
|
|
|
50
50
|
## Implement it
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Actions belong to the configurator and execute in the browser. Their implementation modules may import browser systems. Webhook assistant setup reads the shared action schemas without loading those modules. The generated `configurator-config.ts` registers the modules with `ConfiguratorBuilder.withActionModules`; a hand-written config calls it the same way, on the frontend builder only.
|
|
53
|
+
|
|
54
|
+
A file in `src/actions/` default-exports `phx.frontend.implementActions({...})` with any subset of the declared actions. The implementation receives the validated parameters, the state the action runs on, and a context with the `expressionContext`, the domain and registered configurator `systems`, `getIdSequence()` for entities it creates and the typed `updates` factory. It returns the updates it wants applied and `readResult`, which reads the result from the state those updates produced, including whatever the transformers added. It never stages or commits anything.
|
|
53
55
|
|
|
54
56
|
```ts
|
|
55
57
|
// src/actions/nudge-hole.ts
|
|
56
|
-
export default phx.
|
|
58
|
+
export default phx.frontend.implementActions({
|
|
57
59
|
nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
|
|
58
60
|
// `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
|
|
59
61
|
const hole = state.entities.find(entity => entity.id === holeId)
|
|
@@ -84,18 +86,16 @@ export default phx.domain.implementActions({
|
|
|
84
86
|
})
|
|
85
87
|
```
|
|
86
88
|
|
|
87
|
-
Throw to reject a call: the message reaches the user through the control's hint and the assistant through the failed mutation, so say what went wrong and what to send instead. An implementation of a name the spec does not declare is a type error. A declared action without an implementation is not: it stops the
|
|
89
|
+
Throw to reject a call: the message reaches the user through the control's hint and the assistant through the failed mutation, so say what went wrong and what to send instead. An implementation of a name the spec does not declare is a type error. A declared action without an implementation is not: it stops the configurator from initializing, and under `phoenix dev` the editor reports it as a `MISSING_ACTION_IMPLEMENTATIONS` diagnostic and does not apply the change; an implementation of an undeclared name is logged.
|
|
88
90
|
|
|
89
91
|
## Use registered systems
|
|
90
92
|
|
|
91
93
|
Actions execute in the browser, including custom mutations requested by the assistant. Their `systems` record combines the domain systems with the systems registered for that application slot, preserving the registered instances. Built-in extension capabilities are optional in the generated types because a runtime may omit the configurator extensions. Check that the capability is present before using it, and throw a clear error when the slot does not provide it.
|
|
92
94
|
|
|
93
|
-
Action modules are also loaded by the webhook's shared domain assembly. Keep runtime imports and module initialization server-safe, including imported helpers: browser-only SDK values can break the webhook even though the action runs only in the browser. Type-only imports from browser entry points are safe. Use structural guards for custom systems instead of importing a browser class for an `instanceof` check. See [Webhook Membership](?path=/docs/phoenix-webhook-membership--docs) for the shared-code boundary.
|
|
94
|
-
|
|
95
95
|
For a railing action with a `lineId` and `length` parameter, prepare a resize with the existing sketching operation. The project declares the action and binds a `sketchingLine` component to its line entity, with a `sketching` definition using the same `railing` key (see [Sketching](?path=/docs/complex-use-cases-sketching--docs)):
|
|
96
96
|
|
|
97
97
|
```ts
|
|
98
|
-
export default phx.
|
|
98
|
+
export default phx.frontend.implementActions({
|
|
99
99
|
resizeRailing: ({ lineId, length }, state, { systems }) => {
|
|
100
100
|
const { sketchingSystem } = systems
|
|
101
101
|
|
|
@@ -118,11 +118,11 @@ For a custom extension, check `'pricingSystem' in systems` and narrow `systems.p
|
|
|
118
118
|
|
|
119
119
|
## Run it from the UI
|
|
120
120
|
|
|
121
|
-
`phx.frontend.
|
|
121
|
+
`phx.frontend.useConfigurator().actionSystem.prepareAction(name, args, state)` checks the name and arguments against the generated `ActionTypes`, validates `args` at runtime, and returns `{ updates, readResult }`. Hand the updates to `useUpdateControl()` like any other change: it dry-runs them for hints and commits them on click.
|
|
122
122
|
|
|
123
123
|
```tsx
|
|
124
124
|
export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
|
|
125
|
-
const { actionSystem } = phx.frontend.
|
|
125
|
+
const { actionSystem } = phx.frontend.useConfigurator()
|
|
126
126
|
const state = phx.frontend.useCommittedState()
|
|
127
127
|
const prepare = phx.frontend.useUpdateControl()
|
|
128
128
|
|
|
@@ -165,7 +165,6 @@ The field runs the same `prepareAction`, applies the updates through the same va
|
|
|
165
165
|
|
|
166
166
|
- `references` on a `phx:DomainEntityId` param types the parameter and the GraphQL argument, but at runtime any entity id passes the params check: the implementation verifies that the id names an entity of the expected type, as the example does.
|
|
167
167
|
- Actions exist in the configurator domain only; the admin domain declares none.
|
|
168
|
-
- Action modules are included in the webhook bundle. The parse-time browser-import diagnostic does not currently cover them; runtime imports must still be server-safe.
|
|
169
168
|
- The result of `readResult` is not validated at runtime: the generated TypeScript type and the GraphQL coercion are the checks.
|
|
170
169
|
- The assistant cannot dry-run a custom mutation the way it dry-runs recipes and field options.
|
|
171
170
|
|
|
@@ -332,7 +331,7 @@ components:
|
|
|
332
331
|
/** How far a hole may sit from the plate's center on either axis, in plate units. */
|
|
333
332
|
const REACH = 150
|
|
334
333
|
|
|
335
|
-
export default phx.
|
|
334
|
+
export default phx.frontend.implementActions({
|
|
336
335
|
nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
|
|
337
336
|
// `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
|
|
338
337
|
const hole = state.entities.find(entity => entity.id === holeId)
|
|
@@ -374,7 +373,7 @@ const STEP = 20
|
|
|
374
373
|
|
|
375
374
|
/** Nudges the selected hole with the same `nudgeHole` action the assistant calls, one step at a time. */
|
|
376
375
|
export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
|
|
377
|
-
const { actionSystem } = phx.frontend.
|
|
376
|
+
const { actionSystem } = phx.frontend.useConfigurator()
|
|
378
377
|
const state = phx.frontend.useCommittedState()
|
|
379
378
|
const prepare = phx.frontend.useUpdateControl()
|
|
380
379
|
const hole = state.entities.find(entity => entity.id === entityId)
|
|
@@ -47,7 +47,9 @@ If multiple violations with the same priority exists, they are joined. If any vi
|
|
|
47
47
|
|
|
48
48
|
If the text is different for two messages of a certain violation type, but only one should be shown, priority can be set dynamically in TypeScript on the `controlViolationPriority` property.
|
|
49
49
|
In a more complex case, you can't change priority like this because you also want to show a different violation type with the same priority. To resolve this, you can use `formatControlViolationMessage` function,
|
|
50
|
-
where you have access to all entity violations (`stateEmission.validity.entityViolations`). Returning null in `formatControlViolationMessage` removes the current hint from tooltip.
|
|
50
|
+
where you have access to all entity violations (`stateEmission.validity.entityViolations`). Returning null in `formatControlViolationMessage` removes the current hint from tooltip. When that removes every hint, the tooltip shows the `message` of the first violation instead, so a disabled control always says why.
|
|
51
|
+
|
|
52
|
+
The AI assistant explains a change it cannot make by the same rules: each reason carries the violation's `message`, and the text `formatControlViolationMessage` returns as `details` when it differs.
|
|
51
53
|
|
|
52
54
|
### Domain Model (YAML)
|
|
53
55
|
|
|
@@ -213,7 +213,7 @@ viewStates:
|
|
|
213
213
|
- 'perspective' # Standard 3D perspective view
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
View states
|
|
216
|
+
View states can be selected through a `viewControls` component or programmatically. A two-level control can also set an ephemeral child choice within the active view. See [Nested View Controls](?path=/docs/layouts-nested-view-controls--docs).
|
|
217
217
|
|
|
218
218
|
**Camera Control Example**:
|
|
219
219
|
|
|
@@ -159,6 +159,7 @@ The hooks that return an entity or its id of one type take the enhanced reflecti
|
|
|
159
159
|
// Active states
|
|
160
160
|
const navigationState = phx.frontend.useActiveNavigationState()
|
|
161
161
|
const viewState = phx.frontend.useActiveViewState()
|
|
162
|
+
const viewChildState = phx.frontend.useActiveViewChildState() // Runtime choice within the view, or undefined
|
|
162
163
|
const toolState = phx.frontend.useActiveToolState()
|
|
163
164
|
|
|
164
165
|
// Navigation actions
|
|
@@ -562,10 +563,10 @@ export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout
|
|
|
562
563
|
- `phx.frontend.useSceneSafeArea()`, called without arguments, tells the camera which part of the canvas the UI leaves free. Attach `containerRef` to the element that covers the whole canvas and `safeAreaRef` to the region the scene should stay visible in: the hook measures the gap between the two and the camera frames the scene inside the safe area. Without it the scene is framed in the whole canvas. The safe-area element lies over the canvas, so it sets `pointerEvents: 'none'` to leave orbiting and clicking to the scene. A `canvasPadding` component in the spec scales the measured gaps, see [Canvas Padding](?path=/docs/layouts-canvas-padding--docs). Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it.
|
|
563
564
|
- With `LayoutSlots.SharedCanvas` mounted, the app loader stays on screen until the scene has loaded. A layout without a canvas is not held by the loader, see [App Loader](#app-loader).
|
|
564
565
|
- The layout composes the rest from what `@salsita-ai/sdk/configurator` exports: `LayoutSlots.Services` and the other members of `LayoutSlots`, which [Layout Slots](?path=/docs/phoenix-layout-slots--docs) lists with what each shows, what feeds it, what it renders when the spec configures nothing for it and what it does in read mode.
|
|
565
|
-
- `LayoutSlots.DesktopSidebar` is the built-in desktop sidebar as one piece: the spec's tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel. Use it when the spec's property pages are what the customer should see and only their place changes, for example a sidebar on the left; build the controls yourself when they have to look like the brand's own. Without `width` it fills its container, so the layout positions and sizes that container; `miniSidebar` does not shrink it, so a layout that honours it reads `LayoutSlots.useSidebarContent().hasMiniSidebar` and lets the container take the sidebar's height. Its tabs sit outside it on the left; `side="start"` puts them on its right, for a sidebar on the left. In fullscreen it stays in place, transparent and inert, so a layout that wants the space back removes it while `phx.frontend.useIsFullscreenActive()` is set. See [Sidebar in a Custom Layout](?path=/docs/layouts-sidebar-in-a-custom-layout--docs).
|
|
566
|
-
- Nothing of the built-in layouts is rendered for it. A project layout finalizes over the spec's `finalizeAction` components, see the finalize paragraph of [Hooks for a Project Layout](#hooks-for-a-project-layout). The `finalizePage` and `finalizeButton` components are legacy: they cannot be declared in YAML, only in TypeScript, and `Legacy.CommonFinalizePage`, which is deprecated, shows a `finalizePage` for projects that still have one. `LayoutDialog` renders only what the project registers with `createLayoutDialog` and is not part of the finalize flow. The preview start screen is `DesktopPreview` or `MobilePreview`, which the layout shows while `phx.frontend.usePreview().isPreview` is set. Both previews frame the scene themselves, so the layout renders the component that calls `phx.frontend.useSceneSafeArea()` only while `isPreview` is not set; it then measures when it mounts after the preview. The assistant panel is available to a project layout only inside `LayoutSlots.DesktopSidebar`. Its composer offers Annotate, which freezes the view for the user to draw and comment on. The configurator page, not the layout, shows the annotation editor and the exporting overlay over whichever layout it renders, a project layout included, and makes the layout inert meanwhile; a layout without a canvas has no view to freeze, so Annotate there attaches nothing. It also shows an image of the assistant chat the user opened (a drawing or a project picture of a reply, or an image of a sent message), inside the safe area the layout measures with `phx.frontend.useSceneSafeArea()` (the gaps its own UI leaves, before any `canvasPadding` fractions scale them), so the panel beside it stays usable, or over the whole configurator where that area is under 240 px in either direction; a layout that measures none, such as a legacy layout, places it inside its canvas padding; that view makes nothing inert, and Close, Escape or loading another configuration closes it. Its Annotate closes it too and opens the annotation editor on the image, whose result is attached to the message being written; it is disabled while that message is full, another annotation shows, or the assistant has banned the user, and a picture whose server does not let the page read it (no CORS headers) offers none.
|
|
566
|
+
- `LayoutSlots.DesktopSidebar` is the built-in desktop sidebar as one piece: the spec's tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel, which covers the tabs, back button and property pages and leaves the sidebar footer usable below it. Use it when the spec's property pages are what the customer should see and only their place changes, for example a sidebar on the left; build the controls yourself when they have to look like the brand's own. Without `width` it fills its container, so the layout positions and sizes that container; `miniSidebar` does not shrink it, so a layout that honours it reads `LayoutSlots.useSidebarContent().hasMiniSidebar` and lets the container take the sidebar's height. Its tabs sit outside it on the left; `side="start"` puts them on its right, for a sidebar on the left. In fullscreen it stays in place, transparent and inert, so a layout that wants the space back removes it while `phx.frontend.useIsFullscreenActive()` is set. See [Sidebar in a Custom Layout](?path=/docs/layouts-sidebar-in-a-custom-layout--docs).
|
|
567
|
+
- Nothing of the built-in layouts is rendered for it. A project layout finalizes over the spec's `finalizeAction` components, see the finalize paragraph of [Hooks for a Project Layout](#hooks-for-a-project-layout). The `finalizePage` and `finalizeButton` components are legacy: they cannot be declared in YAML, only in TypeScript, and `Legacy.CommonFinalizePage`, which is deprecated, shows a `finalizePage` for projects that still have one. `LayoutDialog` renders only what the project registers with `createLayoutDialog` and is not part of the finalize flow. The preview start screen is `DesktopPreview` or `MobilePreview`, which the layout shows while `phx.frontend.usePreview().isPreview` is set. Both previews frame the scene themselves, so the layout renders the component that calls `phx.frontend.useSceneSafeArea()` only while `isPreview` is not set; it then measures when it mounts after the preview. The assistant panel is available to a project layout only inside `LayoutSlots.DesktopSidebar`. Its composer offers Annotate, which freezes the view for the user to draw and comment on; the 3D canvas is paused while the editor is open, also on a canvas that draws every frame. The configurator page, not the layout, shows the annotation editor and the exporting overlay over whichever layout it renders, a project layout included, and makes the layout inert meanwhile; a layout without a canvas has no view to freeze, so Annotate there attaches nothing. It also shows an image of the assistant chat the user opened (a drawing or a project picture of a reply, or an image of a sent message), inside the safe area the layout measures with `phx.frontend.useSceneSafeArea()` (the gaps its own UI leaves, before any `canvasPadding` fractions scale them), so the panel beside it stays usable, or over the whole configurator where that area is under 240 px in either direction; a layout that measures none, such as a legacy layout, places it inside its canvas padding; that view makes nothing inert, and Close, Escape or loading another configuration closes it. Its Annotate closes it too and opens the annotation editor on the image, whose result is attached to the message being written; it is disabled while that message is full, another annotation shows, or the assistant has banned the user, and a picture whose server does not let the page read it (no CORS headers) offers none.
|
|
567
568
|
- The layout reads the state it has to react to from hooks, listed with what each returns in [Hooks for a Project Layout](#hooks-for-a-project-layout).
|
|
568
|
-
- Messages for the user come one of two ways. `LayoutSlots.Services` shows violations of a rejected change, side-effect hints, errors and failed saves as the built-in snackbars, which render into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot` wherever the layout mounts it; the theme styles them, see [Layout Slots → Styling the snackbars](?path=/docs/phoenix-layout-slots--docs#styling-the-snackbars). `phx.frontend.useConfiguratorMessages(onMessage)` hands the same messages to the layout's own UI instead, with their text resolved, as the toast in [Custom Layout](?path=/docs/layouts-custom-layout--docs#show-messages) does; mount one of the two, not both, or every message is shown twice. A failure to save the configuration, and the first successful save after it, are messages too, so a layout that mounts neither shows no sign of a failed save. An error of the built-in finalize and other actions stays a snackbar either way. It renders into the snackbar root, so a layout that mounts none shows it outside the configurator, in the page's `body`. A failure to start a configuration from a preset is not a message of the hook either: it happens on the preset screen, before any `ConfiguratorLayout` mounts.
|
|
569
|
+
- Messages for the user come one of two ways. `LayoutSlots.Services` shows violations of a rejected change, side-effect hints, errors and failed saves as the built-in snackbars, which render into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot` wherever the layout mounts it; the theme styles them, see [Layout Slots → Styling the snackbars](?path=/docs/phoenix-layout-slots--docs#styling-the-snackbars). `phx.frontend.useConfiguratorMessages(onMessage)` hands the same messages to the layout's own UI instead, with their text resolved, as the toast in [Custom Layout](?path=/docs/layouts-custom-layout--docs#show-messages) does; mount one of the two, not both, or every message is shown twice. A failure to save the configuration, and the first successful save after it, are messages too, so a layout that mounts neither shows no sign of a failed save. An error of the built-in finalize and other actions stays a snackbar either way. It renders into the snackbar root, so a layout that mounts none shows it outside the configurator, in the page's `body`. A failure to start a configuration from a preset is not a message of the hook either: it usually happens on the preset screen, before any `ConfiguratorLayout` mounts. A start from inside a configuration, such as one an AI agent makes through WebMCP, always shows the failure as a snackbar in the open layout and leaves `selectionError` `null`. On the preset screen, in production with more than one preset it is a snackbar there, also on a preset screen replaced with `createPresetUi` (see [Preset UI](#preset-ui)), which reads the error from `phx.frontend.usePresetSelection().selectionError` and mounts `PresetSnackbarsRoot` to keep the snackbar inside the configurator. With a single preset it is the [Configurator Error Page](#configurator-error-page). A finalize action the layout runs with `phx.frontend.useFinalizeActions` or `phx.frontend.useFinalizeAction` reports its error as the action's `error` instead, neither as a message nor as a snackbar.
|
|
569
570
|
- Any project layout element named `ConfiguratorLayout` takes over the page.
|
|
570
571
|
|
|
571
572
|
`defaultConfiguratorElements`, exported from `@salsita-ai/sdk/configurator`, holds the built-in UI as a `ConfiguratorLayout` registration that renders the layout the spec selects, the built-in not-found page as a `ConfigurationNotFoundPage` registration, the built-in not-authenticated page as a `NotAuthenticatedPage` registration, the built-in preset screen as a `PresetUi` registration, the built-in error page as a `ConfiguratorErrorPage` registration, the app loader's built-in content as an `AppLoaderContent` registration, and the built-in in-scene controls under the names of [In-Scene Controls](#in-scene-controls). Generated code registers these defaults with `withDefaultElements`, apart from the project's elements, so the built-in UI is a registration like any other; a project element registered under the same name wins over a default. The list also holds the configurator's built-in controls and layout elements under the kinds the spec names them by, such as `attributeSelect` or `undoToolbarButton`, so a project element registered under one of those names replaces the built-in one wherever the spec names that kind. A config assembled by hand, without generated code, calls `withDefaultElements(defaultConfiguratorElements)` too; the lists are the only way the built-in elements are registered, so without it the page shows a "not found" box instead of the configurator, and a project layout shows one in place of every built-in control. The defaults also hold the configurator's visual providers and the error page and dialog its runtime renders, and a config without them runs the lifecycle without them, with a plain error message in place of the error page. Without them nothing provides the responsive context, so an SDK layout slot that reads it, for example `LayoutSlots.SharedCanvas`, stops the configurator with that plain error message instead of showing a "not found" box, and snackbar messages have no host. The admin mounts a full configurator, so its list, `defaultAdminElements` from `@salsita-ai/sdk/admin`, holds the configurator's defaults followed by the admin's built-in pages, sidebars and actions; generated admin code passes it to `withDefaultElements` in place of `defaultConfiguratorElements`, because each call replaces the defaults passed before.
|
|
@@ -607,8 +608,8 @@ Texts from the spec, such as option titles and the `detail` fields, are `Localiz
|
|
|
607
608
|
| `phx.frontend.useCloseAction()` | The host's close action, `() => Promise<void>`, or `null` when the integration mode offers none. It dispatches the web component's `close` event and, depending on the integration mode, first leaves for the go-back URL of the page's query or puts the configurator on standby. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
|
|
608
609
|
| `phx.frontend.useActiveNavigationState()` | The active navigation state, one of the spec's `navigationStates`. |
|
|
609
610
|
| `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | `(state) => void`, which enters a state and remembers the active one, and `() => void`, which returns to the remembered state and does nothing when there is none. `phx.frontend.useNavigate()` returns `(state) => void`, which enters a state and forgets the history. |
|
|
610
|
-
| `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state.
|
|
611
|
-
| `phx.frontend.useSetViewState()` | `(state) => void
|
|
611
|
+
| `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state. `phx.frontend.useActiveViewChildState()` reads the runtime choice within the view, or `undefined`. |
|
|
612
|
+
| `phx.frontend.useSetViewState()` | `(state, viewChildState?) => void` activates a declared view and its optional runtime child. Omitting the child clears it. Cameras and components filtered by `viewStates` follow the declared view. |
|
|
612
613
|
| `phx.frontend.useResetCamera()` | `() => void`, which moves the camera back to the framing of the active camera configuration, undoing the user's orbit, pan and zoom, as the toolbar's reset button does. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
|
|
613
614
|
| `phx.frontend.useUndoRedo()` | `{ canUndo, canRedo, undo, redo }`: whether the undo history has a change to undo or to redo, and two `() => void` functions that undo or redo it, as the toolbar's undo and redo buttons do, pushing the same analytics events; each does nothing while there is nothing to undo or redo. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
|
|
614
615
|
| `phx.frontend.useTabNavigation(options?)` | `{ source, tabs, activeTab, select }` for the spec's tabs: `source` is `'sidebarTabs'` (every active `sidebarTabs` of the selected entity, in spec order) or `'horizontalTabs'` (the first active `horizontalTabs`), or `null` without tabs. Each tab is `{ index, label, icon, iconNode, navigationStates, state, isActive }`, with the label resolved, `icon` a PhxIcon name and `iconNode` a React node given by TypeScript spec code; `activeTab` is the first active tab or `null`. `select(index or navigation state)` enters the tab's first navigation state, as the built-in tabs do, pushing the same analytics event for `horizontalTabs`. `options.source` (`'auto'`, `'sidebarTabs'` or `'horizontalTabs'`) chooses the kind; `'auto'` prefers `sidebarTabs` when both are active, with a warning in development. `options.entityId` reads another entity's `sidebarTabs`. A tab without navigation states is left out, with a warning in development. It does not check read mode. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
|
|
@@ -663,10 +664,9 @@ A layout builds its toolbar from `phx.frontend.useToolbarActions()`, which retur
|
|
|
663
664
|
|
|
664
665
|
The assistant panel renders only inside `LayoutSlots.DesktopSidebar`. A project element that shows the conversation or takes a message itself, such as a thread in the layout's own drawer, reads the same state as the panel through two hooks, exported from `@salsita-ai/sdk/configurator` besides `phx.frontend`. They are separate so that a composer does not render again with every chunk of a reply.
|
|
665
666
|
|
|
666
|
-
| Hook
|
|
667
|
-
| ------------------------------------- |
|
|
668
|
-
| `phx.frontend.useAssistantThread()`
|
|
669
|
-
| `phx.frontend.useAssistantComposer()` | `{ draft, setDraft, attachments, addFiles, annotate, annotateAttachment, removeAttachment, isPreparing, notice, maxAttachments, isBusy, isLocked, isReplying, canSend, send, stop, inputFocusHandlers, canRecord, recording, startRecording, sendRecording, cancelRecording }` for one message being written. `attachments` are `{ id, previewUrl, isAnnotation, pinCount }`; `addFiles(files)` prepares and attaches images up to `maxAttachments` (four) per message, annotations included, and `removeAttachment(id)` takes one off. `notice` is `'limit'` for a file or annotation too many and `'unreadable'` for a file that is not an image the browser can read, until the attachments change. `annotate()` opens the annotation editor over the configurator, in every layout, and attaches the annotation; it calls `assistantSystem.annotate()`, which attaches what the user made itself and resolves with the attachment's id, or `null`, and which takes `{ image, background }` to annotate an image instead of the view, as the Annotate of an opened image does. `annotateAttachment(id)` opens the editor on an attached image that is not an annotation, as the Annotate of the built-in composer's thumbnail does, and the annotation takes that image's place, so it needs no free slot; it calls `assistantSystem.annotate({ attachmentId, background })`. `isBusy` is set while a send waits for the thread to be resumed or the images to upload, when the input should be read-only. `isLocked` is set while the assistant has banned the user on this configuration, or is paused for the user's network; `canSend` is false then, and nothing should be written or attached. `send()` sends the message when `canSend`, clears it once the chat takes it, and puts it back, after what was written meanwhile, when the chat gives it back; `stop()` ends a reply. Spread `inputFocusHandlers` onto the message input so a phone layout makes room for it. The text of the message lives as long as the component that calls the hook; its attachments live in the assistant system (`assistantSystem.composerAttachments$`), so an annotation made outside the composer is attached too, and a configuration load takes them off. Enter-to-send, pasting and dropping images, Enter sending and Escape dropping a recording, and the cursor put in the input when the panel opens on a desktop are the built-in composer's own: a project composer calls `send` and `addFiles` from its handlers. `canRecord` is set when the user may speak the message instead: the session takes voice messages (see below), the browser can record and no ban refuses the user; the built-in composer then shows a mic in place of Send while the text is empty. `recording` is `{ status, elapsedMs, level }`, with `status` `'idle'`, `'requesting'` while the browser asks for the microphone, `'recording'`, `'recorded'` for a recording the server refused, which waits to be sent again or dropped, `'refused'` while the microphone is blocked for the page, or `'unavailable'` where the browser cannot record; `level` is the loudness of the microphone from 0 to 1. `startRecording()` starts a recording, asking for the microphone, also again after a refusal; `sendRecording()` stops it and sends it, with the attachments, as the message; `cancelRecording()` drops it. A recording that reaches two minutes is sent on its own. |
|
|
667
|
+
| Hook | Returns |
|
|
668
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
669
|
+
| `phx.frontend.useAssistantThread()` | `{ items, earlierItems, isLoaded, isLoadingThread, isEmpty, greeting, starters, isReplying, isThinking, isResuming, failure, retry, hasOlderMessages, isLoadingOlderMessages, loadOlderMessages, canLoadEarlierThread, isLoadingEarlierThread, loadEarlierThread, undoableToolCallId, undo, newestMessageKey, firstMessageId }`. `items` is the current thread in reading order, each a `user` message with its `text`, `imageIds`, `annotations` and `voice` (`'transcribing'` while the transcript of a voice message is on its way, `'spoken'` once its text is the transcript, `null` for a typed message), a stretch of assistant `text` with its `markdown` and `playableReplyId` (the id of the reply it ends, when the panel can read that reply aloud, else `null`), a row of `tools` calls in a row, or a `separator`; `earlierItems` are the closed threads loaded above it, oldest first, each ended by a separator, whose replies are never playable. `isLoadingThread` is set while the thread is read and `isEmpty` when there is nothing to show, where the panel greets the user. `greeting` and `starters` come from the spec's root `assistantGreeting` component, in the current language, for an empty thread: `greeting` is its `message`, `undefined` without one, where the panel greets with its own words, and each starter is `{ title, reply }`, `reply` being the `title` when the spec gives none. A project thread sends a starter with `phx.frontend.useConfigurator().assistantSystem.send(starter.reply)`, as the panel's chips do. `isThinking` is set while a reply runs and nothing in the thread shows it yet. `failure` is `{ kind, canRetry }` with `kind` `'notAvailable'`, `'busy'`, `'resting'` (with `minutes` to wait), `'exhausted'`, `'locked'`, `'networkLocked'`, `'unheard'` (nothing was heard in a voice message, which was dropped), `'providerBusy'` (the AI service behind the assistant was overloaded and failed the reply) or `'unavailable'`, and `retry()`, where `canRetry` is set, regenerates the reply on the user's message when the reply's run failed, also one the thread read reports, and otherwise reads the thread again. `'locked'` means the assistant banned the user on this configuration, or on several of the customer's, and `'networkLocked'` that it is paused for the user's network address because of how it was used from there: both are failures even when the thread read succeeded, and neither offers a retry. `loadOlderMessages()` loads the previous page of the thread, which the panel does when its top scrolls into view, and `loadEarlierThread()` the closed thread before the loaded ones, offered by `canLoadEarlierThread` once the thread is loaded whole. `undoableToolCallId` is the tool call whose change a row may take back, never while a reply runs, and `undo(toolCallIds)` takes back a row's changes. A thread that scrolls follows two values: `newestMessageKey`, an opaque value compared by identity that changes with the newest message, also with every chunk of a reply, but not when an older page loads above it; and `firstMessageId`, which changes when one does, so the thread can keep the reader's place. It renders again with every chunk of a reply. | | `phx.frontend.useAssistantComposer()` | `{ draft, setDraft, attachments, addFiles, annotate, annotateAttachment, removeAttachment, isPreparing, notice, maxAttachments, isBusy, isLocked, isReplying, canSend, send, stop, inputFocusHandlers, canRecord, recording, startRecording, sendRecording, cancelRecording }` for one message being written. `attachments` are `{ id, previewUrl, isAnnotation, pinCount }`; `addFiles(files)` prepares and attaches images up to `maxAttachments` (four) per message, annotations included, and `removeAttachment(id)` takes one off. `notice` is `'limit'` for a file or annotation too many and `'unreadable'` for a file that is not an image the browser can read, until the attachments change. `annotate()` opens the annotation editor over the configurator, in every layout, and attaches the annotation; it calls `assistantSystem.annotate({ type: 'view' })`, which attaches what the user made itself and resolves with the attachment's id, or `null`, and whose `AssistantAnnotationTarget` argument takes `{ type: 'image', image, background }` to annotate an image instead of the view, as the Annotate of an opened image does. `annotateAttachment(id)` opens the editor on an attached image that is not an annotation, as the Annotate of the built-in composer's thumbnail does, and the annotation takes that image's place, so it needs no free slot; it calls `assistantSystem.annotate({ type: 'attachment', attachmentId, background })`. `isBusy` is set while a send waits for the thread to be resumed or the images to upload, when the input should be read-only. `isLocked` is set while the assistant has banned the user on this configuration, or is paused for the user's network; `canSend` is false then, and nothing should be written or attached. `send()` sends the message when `canSend`, clears it once the chat takes it, and puts it back, after what was written meanwhile, when the chat gives it back; `stop()` ends a reply. Spread `inputFocusHandlers` onto the message input so a phone layout makes room for it. The text of the message lives as long as the component that calls the hook; its attachments live in the assistant system (`assistantSystem.composerAttachments$`), so an annotation made outside the composer is attached too, and a configuration load takes them off. Enter-to-send, pasting and dropping images, Enter sending and Escape dropping a recording, and the cursor put in the input when the panel opens on a desktop are the built-in composer's own: a project composer calls `send` and `addFiles` from its handlers. `canRecord` is set when the user may speak the message instead: the session takes voice messages (see below), the browser can record and no ban refuses the user; the built-in composer then shows a mic in place of Send while the text is empty and nothing is attached; to send a voice message with attachments, attach while recording. `recording` is `{ status, elapsedMs, level }`, with `status` `'idle'`, `'requesting'` while the browser asks for the microphone, `'recording'`, `'recorded'` for a recording the server refused, which waits to be sent again or dropped, `'refused'` while the microphone is blocked for the page, or `'unavailable'` where the browser cannot record; `level` is the loudness of the microphone from 0 to 1. `startRecording()` starts a recording, asking for the microphone, also again after a refusal; `sendRecording()` stops it and sends it, with the attachments, as the message; `cancelRecording()` drops it. A recording that reaches two minutes is sent on its own. |
|
|
670
670
|
|
|
671
671
|
The panel renders `useAssistantThread`'s items with components that `@salsita-ai/sdk/configurator` exports too. `AssistantThreadItemView({ item, isActive, undoableToolCallId, onUndo })` renders any item as the panel does; `isActive` is set for the newest item while a reply runs, and `undoableToolCallId` and `onUndo` take the hook's `undoableToolCallId` and `undo`. It dispatches to `AssistantUserMessage({ text, imageIds, annotations, voice })`, `AssistantMarkdown({ markdown, isStreaming, forms })` followed by the reply's play button when `playableReplyId` is set, `AssistantToolChips({ tools, isActive, canUndo, onUndo })` and `AssistantSeparator()`, which a project thread can use one by one. `AssistantMarkdown` renders the project's assistant form elements, entity and reference links, alerts, pictures and drawings wherever it is inside the configurator, without further wiring. A drawing is SVG the model wrote in a fenced code block with the language `svg`; it shows framed in the thread as an image, so nothing in it runs or loads, and a click opens it larger beside the panel, as it does a picture of a reply and an image of a sent message. The assistant's prompt lets the model draw when a schematic explains better than words or when it is asked to; a project asks for more drawings, or for particular ones, in its `assistant.instructions`, for example "After reading a photo, draw the layout you deduced and ask the user to confirm it." A spoken message shows a placeholder until its transcript arrives, then the transcript in italics with a mic mark. An entity link selects its entity; inside `EntityLinkSelectionProvider`, given the selection `useCreateEntityLinkSelection()` creates, the thread can call that selection's `release()` on a click elsewhere in the thread to deselect what a link selected, as the panel does.
|
|
672
672
|
|
|
@@ -676,43 +676,89 @@ With voice on, the panel also reads replies aloud. Every reply that has somethin
|
|
|
676
676
|
|
|
677
677
|
A project thread or composer of its own drives the reading through `phx.frontend.useConfigurator().assistantSystem`: `playReply(messageId)` reads the reply with that id aloud, or stops it while it is read, `stopPlayback()` stops it, `playback$` holds `{ messageId, status }` with `status` `'idle'`, `'loading'`, `'playing'` or `'blocked'` (the browser did not start the reply on its own), and `muted$` and `setMuted(muted)` hold and change the user's choice to mute the replies that read themselves aloud. `isSpeakableReply(message)`, exported from `@salsita-ai/sdk/configurator`, tells whether the server reads a message aloud. A composer of its own calls `unlockPlayback()` on the tap that records or sends a voice message, so Safari lets the reply read itself aloud later, and `stopPlayback()` when the user starts to speak.
|
|
678
678
|
|
|
679
|
+
The panel greets an empty thread with its own words. A root `assistantGreeting` component greets in the project's instead, and offers starters: chips under the greeting that send a ready-made first message, `reply`, or `title` without one. Every text is localisable, and the first active instance counts, so `$filter` can switch between greetings. The greeting is shown only: the model never reads it, and both leave the thread with its first message, so keep it a statement of what the assistant can do and put concrete asks in the starters.
|
|
680
|
+
|
|
681
|
+
```yaml
|
|
682
|
+
components:
|
|
683
|
+
KitchenRange:
|
|
684
|
+
assistantGreeting:
|
|
685
|
+
main:
|
|
686
|
+
message:
|
|
687
|
+
$msg: Hi! I can change this range with you.
|
|
688
|
+
starters:
|
|
689
|
+
- title:
|
|
690
|
+
$msg: Add a griddle
|
|
691
|
+
- title:
|
|
692
|
+
$msg: Show me the colours
|
|
693
|
+
reply:
|
|
694
|
+
$msg: Which colours can the range have?
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
**Assistant tools for agents in the browser (WebMCP)**
|
|
698
|
+
|
|
699
|
+
A configurator whose spec has an `assistant` section also offers the assistant's tools to AI agents in the visitor's browser through [WebMCP](https://webmachinelearning.github.io/webmcp/), such as a chatbot that opens the page in its own browser on the user's behalf. The agent reads and changes the configuration through the same GraphQL schema as the panel's assistant, instead of clicking through the UI, and brings its own model: nothing runs on the server, so the deployment's assistant switches, hourly limits and monthly caps do not apply, and the chat panel need not be used.
|
|
700
|
+
|
|
701
|
+
The page registers three tools on `document.modelContext` once a configuration is loaded, and unregisters them when the configuration is left or another one is loaded:
|
|
702
|
+
|
|
703
|
+
| Tool | What the agent gets |
|
|
704
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
705
|
+
| `configurator_guide` | Read-only. How to use the other two tools, the GraphQL schema of the session and the spec's `instructions`, after the setup handler narrowed them. |
|
|
706
|
+
| `configurator_query` | Read-only. The panel's `query`: runs GraphQL operations, mutations on a copy that is discarded, and returns the results as MCP content, with the pictures of screenshots inline. |
|
|
707
|
+
| `configurator_apply` | The panel's `apply`: commits the operations' changes as one step of the configurator's undo, refused like the panel's in a finalize run and while the configuration is read-only. The edit gets no row in the panel and looks to the panel's assistant like the user's own. |
|
|
708
|
+
|
|
709
|
+
Screenshots taken for an agent stay in the browser; they are never uploaded. The spec's `instructions` are part of the application bundle, so a visitor and their agent can read them.
|
|
710
|
+
|
|
711
|
+
Two more tools let the agent start a configuration from a preset, as a visitor does on the preset screen. They are registered while the configurator's `power` is `on` and the project's `createOnRoutingReadyProvider` gate, if any, renders its children, on the preset screen and inside a configuration alike, and unregistered when it goes to `standby` or `off`:
|
|
712
|
+
|
|
713
|
+
| Tool | What the agent gets |
|
|
714
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
715
|
+
| `configurator_list_presets` | Read-only. The categories and presets the preset screen shows, filtered by `presetTags`, as JSON: ids, names, descriptions and image URLs, in the current locale. |
|
|
716
|
+
| `configurator_create_from_preset` | Takes a preset's `id` and starts a configuration from it as a click on its card does: analytics, the `onPresetLoaded` handler and the navigation included. Called inside a configuration, it leaves that one as it is and opens the new one. It returns once the new configuration is loaded and says whether `configurator_guide` is there; after 60 seconds it returns anyway and tells the agent to try the guide later. |
|
|
717
|
+
|
|
718
|
+
They are offered when the spec has an `assistant` section without `webmcp: false`, the visitor's role is in the spec's `canCreate` and the browser supports WebMCP. The setup handler does not take part, because it needs a loaded configuration, which the preset screen does not have, so it cannot turn these two off; it still decides whether the new configuration offers its own three tools. A project's own preset screen does not change what the two tools list or do.
|
|
719
|
+
|
|
720
|
+
WebMCP is on by default and needs the browser to support it:
|
|
721
|
+
|
|
722
|
+
- The ChatGPT desktop app's built-in browser (site tools) supports it and needs nothing from the site. Chrome and Edge expose it only on origins that serve their origin-trial token, which the integrator's site registers itself. Other browsers have no `document.modelContext`, and nothing is registered there.
|
|
723
|
+
- `webmcp: false` in the `assistant` section turns it off; `webmcp: true` says the default. The assistant setup handler can turn it off per session by returning `webmcp: false`, for example for a role, or by switching the assistant off; it cannot turn it back on.
|
|
724
|
+
- `Permissions-Policy: tools=()` turns it off for a whole origin. An embedded configurator needs the `tools` feature allowed by its iframe, as in `<iframe allow="tools">`.
|
|
725
|
+
|
|
679
726
|
**Assistant theme names and slots**
|
|
680
727
|
|
|
681
728
|
Every part of the assistant panel has its own theme name, set under `components` in the theme a project returns from `phx.frontend.createGetThemeHandler`. Each name takes `styleOverrides` keyed by its element slots, and `defaultProps` with `slots`, a component per slot, and `slotProps`, props per element slot. The props type of each name is exported from `@salsita-ai/sdk/configurator` as `Themeable…Props`, such as `ThemeableAssistantComposerProps`. A theme that sets none of them renders the panel as built in.
|
|
682
729
|
|
|
683
|
-
| Theme name | Element slots | Component slots
|
|
684
|
-
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
685
|
-
| `PhxAssistantPanel` | `root` | `header`, `thread`, `composer`
|
|
686
|
-
| `PhxAssistantPanelHeader` | `root`, `title`, `muteButton`, `closeButton` |
|
|
687
|
-
| `PhxAssistantThread` | `root`, `messages`, `greeting`, `status`, `olderStatus`, `earlierButton`, `notice`, `newReplyButton`
|
|
688
|
-
| `PhxAssistantUserMessage`, `PhxAssistantSeparator`, `PhxAssistantMarkdown` | `root`; `PhxAssistantUserMessage` also `voice` and `transcript` |
|
|
689
|
-
| `PhxAssistantReplyPlayButton` | `root` |
|
|
690
|
-
| `PhxAssistantMessageImages` | `root`, `image` |
|
|
691
|
-
| `PhxAssistantToolChips` | `root`, `activity`, `activityIcon`, `chip`, `chipLabel`, `screenshotsLink`, `undoButton`, `violation`, `fullLabel` |
|
|
692
|
-
| `PhxAssistantComposer` | `root`, `inputFrame`, `attachments`, `attachment`, `removeAttachment`, `annotateAttachment`, `input`, `toolButton`, `sendButton`, `micButton`, `recordingBar`, `stopButton`, `hint`, `attachmentNotice` |
|
|
693
|
-
| `PhxAssistantForm` | `root`, `submitButton`, `fixButton`, `note` | `group`, `choice`, `choices`, `reply`, `
|
|
694
|
-
| `PhxAssistantFormGroup`, `PhxAssistantFormOptions` | `root`, `label`; `PhxAssistantFormOptions` also `row` |
|
|
695
|
-
| `PhxAssistantFormReply`, `PhxAssistantFormNumber` | `root` |
|
|
696
|
-
| `
|
|
697
|
-
| `
|
|
698
|
-
| `
|
|
699
|
-
| `
|
|
700
|
-
| `
|
|
701
|
-
| `
|
|
702
|
-
| `
|
|
703
|
-
| `
|
|
704
|
-
| `
|
|
705
|
-
| `
|
|
706
|
-
| `PhxAssistantImageView` | `root`, `header`, `title`, `actions`, `annotateButton`, `closeButton`, `image` | |
|
|
730
|
+
| Theme name | Element slots | Component slots |
|
|
731
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
732
|
+
| `PhxAssistantPanel` | `root` | `header`, `thread`, `composer` |
|
|
733
|
+
| `PhxAssistantPanelHeader` | `root`, `title`, `muteButton`, `closeButton` | |
|
|
734
|
+
| `PhxAssistantThread` | `root`, `messages`, `greeting`, `starters`, `starter`, `status`, `olderStatus`, `earlierButton`, `notice`, `newReplyButton` | `userMessage`, `assistantMessage`, `toolChips`, `separator` |
|
|
735
|
+
| `PhxAssistantUserMessage`, `PhxAssistantSeparator`, `PhxAssistantMarkdown` | `root`; `PhxAssistantUserMessage` also `voice` and `transcript` | |
|
|
736
|
+
| `PhxAssistantReplyPlayButton` | `root` | |
|
|
737
|
+
| `PhxAssistantMessageImages` | `root`, `image` | |
|
|
738
|
+
| `PhxAssistantToolChips` | `root`, `activity`, `activityIcon`, `chip`, `chipLabel`, `screenshotsLink`, `undoButton`, `violation`, `fullLabel` | |
|
|
739
|
+
| `PhxAssistantComposer` | `root`, `inputFrame`, `attachments`, `attachment`, `removeAttachment`, `annotateAttachment`, `input`, `toolButton`, `sendButton`, `micButton`, `recordingBar`, `stopButton`, `hint`, `attachmentNotice` | |
|
|
740
|
+
| `PhxAssistantForm` | `root`, `submitButton`, `fixButton`, `note` | `group`, `choice`, `choices`, `reply`, `tile`, `text`, `number`, `confirm` |
|
|
741
|
+
| `PhxAssistantFormGroup`, `PhxAssistantFormOptions` | `root`, `label`; `PhxAssistantFormOptions` also `row` | |
|
|
742
|
+
| `PhxAssistantFormReply`, `PhxAssistantFormNumber` | `root` | |
|
|
743
|
+
| `PhxAssistantFormTile` | `root`, `image`, `label`, `description`, `check`; `root` carries `data-look` | |
|
|
744
|
+
| `PhxAssistantFormText` | `root`, `input` | |
|
|
745
|
+
| `PhxAssistantFormConfirm` | `root`, `buttons`, `button` | |
|
|
746
|
+
| `PhxAssistantEntityLink`, `PhxAssistantAlert`, `PhxAssistantScreenshots` | `root` | |
|
|
747
|
+
| `PhxAssistantReferenceLink` | `root`, `details` | |
|
|
748
|
+
| `PhxAssistantAnnotation` | `root`, `toolbar` | |
|
|
749
|
+
| `PhxAssistantAnnotationComment`, `PhxAssistantAnnotationBadge` | `root` | |
|
|
750
|
+
| `PhxAssistantDrawing` | `root`, `button`, `image`, `note` | |
|
|
751
|
+
| `PhxAssistantImage` | `root` (the picture), `button` (around it, none inside a link) | |
|
|
752
|
+
| `PhxAssistantImageView` | `root`, `header`, `title`, `actions`, `annotateButton`, `closeButton`, `image` | |
|
|
707
753
|
|
|
708
754
|
A component slot replaces a whole piece:
|
|
709
755
|
|
|
710
|
-
- The panel's `header`, `thread` and `composer` take no props. A replacement reads what it shows with `useAssistantPanel`, `useAssistantThread` or `useAssistantComposer`. The panel's shell stays the SDK's whatever replaces them, so the layouts still hide what
|
|
756
|
+
- The panel's `header`, `thread` and `composer` take no props. A replacement reads what it shows with `useAssistantPanel`, `useAssistantThread` or `useAssistantComposer`. The panel's shell stays the SDK's whatever replaces them, so the layouts still place it above the sidebar footer, hide what it covers and stretch the sidebar, and a press on a control keeps the input's focus on a phone. A component in `PhxAssistantPanel`'s `root` slot has to pass on the props it gets, `data-sidebar` and `onMouseDown` among them.
|
|
711
757
|
|
|
712
758
|
A component in an element slot gets that part's props and passes them on to the element it renders. Some slots also get a ref, which the replacement must forward to its element with `forwardRef`: the thread's `messages` (it scrolls), the composer's `input` (through `inputRef`, as an `InputBase`) and `stopButton`, the header's `closeButton`, the tool chips' `chip`, `chipLabel` and `screenshotsLink`, and the reference link's `root`. The controls with a tooltip or a popover are anchored by that ref, and a replacement that drops it loses scrolling, focus or the tooltip.
|
|
713
759
|
|
|
714
760
|
- The thread's item slots get the props of their item, as `AssistantThreadItemView` passes them to the exported components above. `separator` gets none. `AssistantThreadItemView` also takes them as `slots`, for a project thread that uses it.
|
|
715
|
-
- The form's slots are named after the built-in form elements, and each gets that element's props: `FormContainerProps` for `group`, `choice` and `choices`, `FormOptionProps` for `reply
|
|
761
|
+
- The form's slots are named after the built-in form elements, and each gets that element's props: `FormContainerProps` for `group`, `choice` and `choices`, `FormOptionProps` for `reply` and `tile` (a tile's attributes are its `ref` with the name, description, picture, color and look it resolved to), and `FormInputProps` for `text`, `number` and `confirm`, with the element's typed attributes. They change how a form looks, not what the assistant can write. The project's own form elements are registered with `createAssistantFormElement` instead.
|
|
716
762
|
|
|
717
763
|
The names of the form elements, the links, the alert, the image, the screenshots and the annotation are read from the theme only: their components take no `slots` of their own. A few parts are shared, so their style overrides reach more than one place. The composer's `inputFrame`, `input`, `toolButton` and `sendButton` also draw the comment of an annotation's pin, and `toolButton` is the Attach, the Annotate and the comment's Delete control. `PhxAssistantMessageImages`' `image` also draws the thumbnails of a message's annotations. `PhxAssistantToolChips`' `root`, `activity` and `activityIcon` also draw the "Thinking…" line. State a part is styled by is on its element, such as `data-chip` on a chip, `data-chips` on a row of chips, `data-alert` on an alert, `data-dragging` on the input frame, `data-blocked` on a mic whose microphone is blocked and `aria-pressed` on a picked form option, so a style override targets it with a selector.
|
|
718
764
|
|
|
@@ -465,7 +465,7 @@ The SDK provides comprehensive error handling for backend data:
|
|
|
465
465
|
|
|
466
466
|
Backend data is fetched using webhook handlers that you implement. This keeps sensitive operations on the server.
|
|
467
467
|
|
|
468
|
-
The handler reads its credentials as `phx.webhooksEnv.NAME`, never from `process.env`. Declare each variable under `env.webhook` in a spec file; its value is inlined when the webhook is built, from the environment variables a workspace
|
|
468
|
+
The handler reads its credentials as `phx.webhooksEnv.NAME`, never from `process.env`. Declare each variable under `env.webhook` in a spec file; its value is inlined when the webhook is built, from the environment variables a workspace or project Superadmin sets in Studio for a deployed build, and from `.env` under `phoenix dev`:
|
|
469
469
|
|
|
470
470
|
```yaml
|
|
471
471
|
# spec/application.yaml
|
|
@@ -74,7 +74,7 @@ We assume you have working knowledge of these technologies before starting with
|
|
|
74
74
|
Start with the [Project Structure](?path=/docs/phoenix-project-structure--docs) documentation to understand how phx-cli projects are organized. This is the standard layout used for production configurators.
|
|
75
75
|
|
|
76
76
|
**Step 2: Start a Project**
|
|
77
|
-
Run `phoenix init` to get a working starter configurator, sign in with `pnpm phoenix login
|
|
77
|
+
Run `phoenix init` to get a working starter configurator, sign in with `pnpm phoenix login` or paste the `.env` block of a Studio development environment, then run `pnpm phoenix dev` to see it. See [Starting a New Project](?path=/docs/phoenix-phoenix-cli--docs#starting-a-new-project).
|
|
78
78
|
|
|
79
79
|
**Step 3: Run a Maintained Demo**
|
|
80
80
|
The starter project that `phoenix init` writes uses the current Phoenix CLI and application-spec project structure, so it is the best starting point for tracing a complete configurator; the examples throughout this documentation extend it feature by feature.
|
|
@@ -69,7 +69,7 @@ const components: ThemeOptions['components'] = {
|
|
|
69
69
|
|
|
70
70
|
| Member | Shows | Fed by | With nothing configured | Read mode |
|
|
71
71
|
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
-
| `DesktopSidebar` | The whole built-in desktop sidebar: tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel. Props: `width`, and `side` (`'start'` or `'end'`, typed `DesktopSidebarSide`; `DesktopSidebarProps` types both)
|
|
72
|
+
| `DesktopSidebar` | The whole built-in desktop sidebar: tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel, which leaves the sidebar footer usable below it. Props: `width`, and `side` (`'start'` or `'end'`, typed `DesktopSidebarSide`; `DesktopSidebarProps` types both) | The members below | As its parts | As its parts. In fullscreen it stays in place, transparent and inert |
|
|
73
73
|
| `DesktopSidebarTabs` | Tabs that switch the navigation state | The `sidebarTabs` components of the selected entity; the `horizontalTabs` component is not shown here | Nothing; also nothing while the summary is shown | No change |
|
|
74
74
|
| `useSidebarTabs()` | A hook, `{ tabs, activeTab, onChange }`: each tab is `{ label, icon, value, isActive }`, `activeTab` is the active tab's value or `'none'`, and `onChange(value)` switches to that tab's first navigation state. A project layout reads its tabs with `phx.frontend.useTabNavigation()` instead, see [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout) | As `DesktopSidebarTabs` | `tabs` is empty | No change |
|
|
75
75
|
| `DesktopSidebarBackButton` | A "Back" button. Props: the MUI `Button` props and `icon`, also settable in the theme as `PhxDesktopSidebarBackButton`; the application config's `sidebarBackIcon` takes precedence over both | The sidebar's way back: a navigation state to pop, a stacked property page, or a selected entity other than the root, unless the application config sets `showSelectionBackButton` to `false` or sets `ignoreSelectionInSidebar` | Nothing while there is no way back | No change |
|
|
@@ -118,7 +118,7 @@ const toTableId = (id: ModelV1.Box['id']) =>
|
|
|
118
118
|
|
|
119
119
|
### Replacing the Model Entirely
|
|
120
120
|
|
|
121
|
-
When the new model has nothing in common with the deployed one, there is nothing to convert. This is the case when a project
|
|
121
|
+
When the new model has nothing in common with the deployed one, there is nothing to convert. This is the case when a project whose production was first deployed as the hello-world starter, which only early beta projects were, gets its real model: the starter's `Box` model is version 1 in production, and a deployed version cannot change. A project created since starts empty, so the model of its first deploy is version 1 and needs no such migration. Keep the deployed model as `v1`, define the real model in `latest`, and let the migration return the starting state of the new model, the `initialDomainEntities` of its preset:
|
|
122
122
|
|
|
123
123
|
```typescript
|
|
124
124
|
// src/migrations/v2.ts
|