@salsita-ai/sdk 0.50.0-develop.b5d443db78 → 0.50.0-develop.b5dfdd9774
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/admin/common/admin-interface.d.ts +2 -2
- package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +9 -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/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +4 -3
- 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/application-types.js +5 -5
- 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 +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
- 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 +38 -41
- 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/editor.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +10 -11
- package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
- package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- 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 +8 -36
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +15 -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 +42 -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 +55 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -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/components.js +2 -2
- 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/variants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
- 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/phx-members-without-guide.js +1 -1
- 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 +3 -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/skills/sdk-content.d.ts +0 -7
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
- 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 +3 -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-actions.d.ts +3 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +67 -8
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +6 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.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/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.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-form-elements.d.ts +14 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
- 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/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/authorized-client.d.ts +1 -0
- package/dist/client/authorized-client.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/contract.d.ts +28 -10
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +1 -0
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +1 -0
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +7503 -2093
- package/dist/client/unauthenticated-client.js +1 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
- package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
- package/dist/configurator/agent-at-work/StudioMark.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
- package/dist/configurator/agent-at-work/index.d.ts +3 -0
- package/dist/configurator/agent-at-work/index.js +1 -0
- 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 +56 -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 +14 -8
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +246 -22
- 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 +63 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -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 +33 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.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 +18 -5
- 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 +46 -12
- 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/image-rendering-system/export-image-capture.d.ts +15 -4
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +8 -3
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +11 -9
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/index.d.ts +1 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/{ui/configurator-layout/universal → pages}/ExportingOverlay.d.ts +3 -2
- package/dist/configurator/pages/ExportingOverlay.js +1 -0
- package/dist/configurator/pages/InertRoot.d.ts +10 -0
- package/dist/configurator/pages/InertRoot.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.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/scene/resources/use-phx-gltf.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +78 -6
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +99 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +37 -3
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +51 -4
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +85 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +83 -6
- package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +35 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
- package/dist/configurator/ui/assistant/alert/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +34 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +2 -3
- 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/annotation-layout.d.ts +59 -5
- package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +40 -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/editor/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/annotation/index.d.ts +3 -2
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +9 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +49 -5
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
- package/dist/configurator/ui/assistant/attachments/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +7 -2
- package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -1
- package/dist/configurator/ui/assistant/composer/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/composer/index.js +1 -1
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/drawing/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +8 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +35 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +59 -2
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -1
- 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/create-assistant-form-element.d.ts +11 -7
- 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/registry/index.d.ts +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/FormConfirm.d.ts +51 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +47 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +43 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +56 -2
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +43 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +47 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.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 +8 -9
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
- package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/image-view/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +21 -10
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
- package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/panel/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +43 -1
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
- 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 +3 -2
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +49 -2
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +34 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +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 +17 -3
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +32 -7
- 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/assistant/voice/RecordingBar.d.ts +21 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
- package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/voice/index.js +1 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.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/Layout.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-layout-scene-safe-area.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/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/docs/index.json +130 -5
- package/dist/docs/integrations/woocommerce/overview.mdx +4 -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 +82 -55
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/admin.mdx +30 -34
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/assistant/actions.mdx +183 -0
- package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
- package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
- package/dist/docs/phoenix/assistant/overview.mdx +137 -0
- package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
- package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
- package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
- package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
- package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
- package/dist/docs/phoenix/blender-rendering.mdx +3 -1
- package/dist/docs/phoenix/configurator-interface.mdx +105 -10
- package/dist/docs/phoenix/data-sources.mdx +61 -37
- package/dist/docs/phoenix/finalization.mdx +2 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/integration/authentication-internal.mdx +2 -2
- package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +2 -2
- package/dist/docs/phoenix/localization.mdx +2 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +97 -57
- package/dist/docs/phoenix/project-structure.mdx +17 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +61 -30
- package/dist/docs/phoenix/sessions-and-access.mdx +62 -41
- package/dist/docs/phoenix/sharing.mdx +1 -1
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhook-membership.mdx +1 -1
- package/dist/docs/phoenix/webhooks.mdx +417 -241
- 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/admin-domain/index.d.ts +2 -2
- package/dist/domain/application/application-config.d.ts +8 -1
- 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 +18 -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 +30 -2
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
- package/dist/domain/application/assistant/session-setup/index.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 +45 -37
- 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/action/index.d.ts +0 -1
- package/dist/domain/core/action/index.js +1 -1
- 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/index.d.ts +1 -1
- package/dist/domain/core/index.js +1 -1
- 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 -4
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +19 -13
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
- package/dist/domain/domain-runtime/environment/actions.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.js +1 -1
- package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/environment/selectors.js +1 -1
- package/dist/domain/domain-runtime/environment/types.d.ts +6 -0
- 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/export-images/agent-screenshot.d.ts +5 -4
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- 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 +9 -6
- package/dist/domain/spec/expressions/relation-expression-params.d.ts +1 -1
- 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/actions.d.ts +3 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +3 -0
- package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
- package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +35 -2
- 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 +55 -13
- 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 +5 -2
- 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/Editor.d.ts +5 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorMode.d.ts +2 -0
- package/dist/editor/EditorMode.js +1 -1
- package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
- package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
- package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
- package/dist/editor/console-reporter/console-capture.d.ts +20 -0
- package/dist/editor/console-reporter/console-capture.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/editor/index.d.ts +1 -0
- package/dist/editor/index.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
- package/dist/editor/variants/VariantAnswerFooter.js +1 -1
- package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
- package/dist/editor/variants/VariantPageUnavailable.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -1
- package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
- package/dist/editor/variants/variant-preview-fonts.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
- package/dist/editor/variants/variant-preview-styles.js +493 -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/globals/index.d.ts +5 -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-cli/gen/configurator-builder.js +5 -4
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
- 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/application-spec-builder.d.ts +2 -2
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +2 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -3
- package/dist/phoenix/application-spec/generate-project-files.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +2 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
- package/dist/phoenix/application-spec/read-spec-project.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/build.d.ts +2 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/clean.d.ts +2 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +9 -3
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/dev.d.ts +2 -1
- package/dist/phoenix/commands/dev.js +4 -4
- 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/commands/sync.d.ts +2 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- 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/dev-experience/dev-experience.d.ts +31 -0
- package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
- package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
- package/dist/phoenix/services/dev-experience/index.js +1 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/frontend-config.d.ts +2 -0
- package/dist/phoenix/services/index.d.ts +6 -3
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
- 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.d.ts +2 -1
- package/dist/phoenix/services/session/phoenix-application.js +2 -2
- 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/vite-config.d.ts +2 -1
- package/dist/phoenix/services/vite-config.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/responsive/use-responsive-application.d.ts +2 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-environment.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/responsive/actions.d.ts +6 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +9 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +28 -12
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +2 -2
- 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 +3 -2
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
- 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/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
- package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- 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/snackbar/Snackbar.d.ts +3 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- 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/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +10 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +0 -4
- 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 +5 -3
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +11 -4
- package/schema/domain-spec.json +444 -65
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +0 -1
- 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/annotation-host-context.d.ts +0 -5
- package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +0 -1
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -9
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -10
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/configurator/ui/assistant/theme.d.ts +0 -2
- package/dist/configurator/ui/assistant/theme.js +0 -1
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +0 -1
- package/dist/domain/core/action/action-factory.d.ts +0 -11
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -38
- 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/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/core/action → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -1,9 +1,56 @@
|
|
|
1
|
+
import type { ButtonBaseProps, ComponentsOverrides } from '@mui/material';
|
|
2
|
+
import { type ElementType, type ImgHTMLAttributes, type ReactNode } from 'react';
|
|
3
|
+
declare const MuiComponentName: 'PhxAssistantImage';
|
|
4
|
+
declare module '@mui/material/styles' {
|
|
5
|
+
interface ComponentNameToClassKey {
|
|
6
|
+
[MuiComponentName]: 'root' | 'button';
|
|
7
|
+
}
|
|
8
|
+
interface ComponentsPropsList {
|
|
9
|
+
[MuiComponentName]: ThemeableAssistantImageProps;
|
|
10
|
+
}
|
|
11
|
+
interface Components {
|
|
12
|
+
[MuiComponentName]?: {
|
|
13
|
+
defaultProps?: ComponentsPropsList[typeof MuiComponentName];
|
|
14
|
+
styleOverrides?: ComponentsOverrides<Theme>[typeof MuiComponentName];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** The slots of an image in a reply. Read from the theme only. */
|
|
19
|
+
export interface ThemeableAssistantImageProps {
|
|
20
|
+
/**
|
|
21
|
+
* The components used for each slot.
|
|
22
|
+
*
|
|
23
|
+
* - `root` — The picture (`img`).
|
|
24
|
+
* - `button` — The button around the picture that opens it larger; none inside a link (`ButtonBase`).
|
|
25
|
+
*/
|
|
26
|
+
readonly slots?: Partial<Record<'root' | 'button', ElementType>>;
|
|
27
|
+
/**
|
|
28
|
+
* Props applied to each slot component.
|
|
29
|
+
*
|
|
30
|
+
* - `root` — Props for the picture.
|
|
31
|
+
* - `button` — Props for the button.
|
|
32
|
+
*/
|
|
33
|
+
readonly slotProps?: Partial<{
|
|
34
|
+
readonly root: ImgHTMLAttributes<HTMLImageElement>;
|
|
35
|
+
readonly button: ButtonBaseProps;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Marks the pictures among `children` as the content of a link, which they then leave to the link: they
|
|
40
|
+
* open nothing themselves, so a click follows the link or selects the entity, and no button nests in it.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AssistantImageLinkScope: ({ children }: {
|
|
43
|
+
readonly children: ReactNode;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
45
|
export interface AssistantImageProps {
|
|
2
46
|
readonly src: string | undefined;
|
|
3
47
|
readonly alt: string | undefined;
|
|
4
48
|
}
|
|
5
49
|
/**
|
|
6
|
-
* An image in a reply, loaded from the project's resources
|
|
7
|
-
*
|
|
50
|
+
* An image in a reply, loaded from the project's resources; a click opens it larger beside the panel,
|
|
51
|
+
* where the user can annotate it, unless it is inside a link (see {@link AssistantImageLinkScope}),
|
|
52
|
+
* whose click it leaves to the link. One the panel refuses to request or that fails to load shows its
|
|
53
|
+
* alt text instead, so the sentence around it still reads.
|
|
8
54
|
*/
|
|
9
55
|
export declare const AssistantImage: import("react").MemoExoticComponent<({ src, alt }: AssistantImageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
56
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,Fragment as r}from"react/jsx-runtime";import{ButtonBase as i,styled as o,useThemeProps as t}from"@mui/material";import{createContext as a,memo as n,useCallback as s,useContext as l,useState as m}from"react";import{useLocalizable as d}from"#package/react-sdk";import{useConfigurator as u}from"../../../application-runtime/index.js";import{useResourceImageUrl as c}from"./use-resource-image-url.js";let p="PhxAssistantImage",g={id:"sdk.assistant.image.open.label",message:"Open the image"},b=o("img",{name:p,slot:"root"})(({theme:{shape:e,spacing:r}})=>({blockSize:"auto",borderRadius:e.borderRadius,display:"block",maxInlineSize:"100%","& + &":{marginBlockStart:r(1)}})),k=o(i,{name:p,slot:"button"})(({theme:{palette:e,shape:r,spacing:i}})=>({borderRadius:r.borderRadius,cursor:"zoom-in",display:"block",maxInlineSize:"100%","& + &":{marginBlockStart:i(1)},"&:focus-visible":{outline:`2px solid ${e.primary.main}`,outlineOffset:2}})),f={},x=a(!1);export const AssistantImageLinkScope=({children:r})=>e(x.Provider,{value:!0,children:r});export const AssistantImage=n(({src:i,alt:o})=>{let{assistantSystem:a}=u(),n=c()(i),[h,v]=m(),I=l(x),S=d(g),{slots:z={},slotProps:j={}}=t({props:f,name:p}),y=""===o?void 0:o,R=s(()=>{null!=n&&a.viewImage({kind:"url",url:n,title:y})},[a,y,n]),A=s(()=>{v(n)},[n]);if(null==n||n===h)return e(r,{children:o});let B=z.root??b,O=z.button??k,P=e(B,{loading:"lazy",...j.root,src:n,alt:o??"",onError:A});return I?P:e(O,{...j.button,"aria-label":void 0===y?S:void 0,onClick:R,children:P})});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AssistantImage } from './AssistantImage.js';
|
|
1
|
+
export { AssistantImage, AssistantImageLinkScope, type ThemeableAssistantImageProps } from './AssistantImage.js';
|
|
2
2
|
export { isResourcePath } from './resource-path.js';
|
|
3
3
|
export { useResourceImageUrl } from './use-resource-image-url.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AssistantImage}from"./AssistantImage.js";export{isResourcePath}from"./resource-path.js";export{useResourceImageUrl}from"./use-resource-image-url.js";
|
|
1
|
+
export{AssistantImage,AssistantImageLinkScope}from"./AssistantImage.js";export{isResourcePath}from"./resource-path.js";export{useResourceImageUrl}from"./use-resource-image-url.js";
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
+
import type { ComponentsOverrides } from '@mui/material';
|
|
2
|
+
import type { ElementType, HTMLAttributes } from 'react';
|
|
1
3
|
import type { AssistantToolScreenshot } from './tool-screenshots.js';
|
|
4
|
+
declare const MuiComponentName: 'PhxAssistantScreenshots';
|
|
5
|
+
declare module '@mui/material/styles' {
|
|
6
|
+
interface ComponentNameToClassKey {
|
|
7
|
+
[MuiComponentName]: 'root';
|
|
8
|
+
}
|
|
9
|
+
interface ComponentsPropsList {
|
|
10
|
+
[MuiComponentName]: ThemeableAssistantScreenshotsProps;
|
|
11
|
+
}
|
|
12
|
+
interface Components {
|
|
13
|
+
[MuiComponentName]?: {
|
|
14
|
+
defaultProps?: ComponentsPropsList[typeof MuiComponentName];
|
|
15
|
+
styleOverrides?: ComponentsOverrides<Theme>[typeof MuiComponentName];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** The slots of the pictures of a tool call's screenshots, in their popover. Read from the theme only. */
|
|
20
|
+
export interface ThemeableAssistantScreenshotsProps {
|
|
21
|
+
/**
|
|
22
|
+
* The components used for each slot.
|
|
23
|
+
*
|
|
24
|
+
* - `root` — The grid of pictures (`span`); it gets the number of its columns in `ownerState`.
|
|
25
|
+
*/
|
|
26
|
+
readonly slots?: Partial<Record<'root', ElementType>>;
|
|
27
|
+
/**
|
|
28
|
+
* Props applied to each slot component.
|
|
29
|
+
*
|
|
30
|
+
* - `root` — Props for the grid.
|
|
31
|
+
*/
|
|
32
|
+
readonly slotProps?: Partial<{
|
|
33
|
+
readonly root: HTMLAttributes<HTMLSpanElement>;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
2
36
|
interface ScreenshotThumbnailsProps {
|
|
3
37
|
readonly screenshots: readonly AssistantToolScreenshot[];
|
|
4
38
|
/** Called once a picture has loaded, which changes the size of the popover. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{styled as o,useThemeProps as r}from"@mui/material";import{useScreenshotSrc as a}from"./use-screenshot-src.js";let t="PhxAssistantScreenshots",i=o("span",{name:t,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:{columns:e},theme:{palette:o,shape:r,shadows:a,spacing:t}})=>({background:o.background.paper,borderRadius:r.borderRadius,boxShadow:a[4],display:"grid",gap:t(1.5),gridTemplateColumns:`repeat(${e}, minmax(0, 200px))`,maxInlineSize:"80vw",padding:t(1.5)})),s=o("img")(({theme:{palette:e,shape:o}})=>({blockSize:"auto",borderRadius:o.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,display:"block",inlineSize:"100%"})),n=o("span")(({theme:{palette:e,shape:o}})=>({aspectRatio:"4 / 3",background:e.action.hover,borderRadius:o.borderRadius/2,display:"block"})),d={},m=({imageId:o,onImageLoad:r})=>{let t=a(o);return void 0===t?e(n,{}):e(s,{src:t,alt:"",onLoad:r})};export const ScreenshotThumbnails=({screenshots:o,onImageLoad:a})=>{let{slots:s={},slotProps:n={}}=r({props:d,name:t});return e(s.root??i,{...n.root,ownerState:{columns:Math.min(o.length,2)},children:o.map(({label:o,imageId:r})=>e(m,{imageId:r,onImageLoad:a},o))})};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ScreenshotThumbnails } from './ScreenshotThumbnails.js';
|
|
1
|
+
export { ScreenshotThumbnails, type ThemeableAssistantScreenshotsProps } from './ScreenshotThumbnails.js';
|
|
2
2
|
export { type AssistantToolScreenshot, readToolScreenshots } from './tool-screenshots.js';
|
|
3
3
|
export { useScreenshotSrc } from './use-screenshot-src.js';
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
/** Where the panel gets a screenshot's picture from: the server, by the id the browser uploaded it under. */
|
|
2
|
-
export interface AssistantScreenshotPicture {
|
|
3
|
-
readonly kind: 'stored';
|
|
4
|
-
readonly imageId: string;
|
|
5
|
-
}
|
|
6
1
|
/** A screenshot a `query` or `apply` call took, as the panel shows it. */
|
|
7
2
|
export interface AssistantToolScreenshot {
|
|
8
3
|
/** The label the call's `image` field returned, such as `Cabinet-2/doorLayout#2`. */
|
|
9
4
|
readonly label: string;
|
|
10
|
-
|
|
5
|
+
/** The id the browser uploaded the picture under, which the panel reads it back by. */
|
|
6
|
+
readonly imageId: string;
|
|
11
7
|
}
|
|
12
8
|
/**
|
|
13
9
|
* The screenshots of a tool result: the image parts that follow the result's JSON, each after the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as t}from"zod";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";let a=t.object({type:t.literal("text"),content:t.string()}),
|
|
1
|
+
import{z as t}from"zod";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";let a=t.object({type:t.literal("text"),content:t.string()}),s=t.object({type:t.literal("image"),source:t.object({type:t.literal("url"),value:t.string()})}),r=/^[^/]+\/[^#]+(?:#\d+)?$/;export const readToolScreenshots=t=>Array.isArray(t)?t.slice(1).flatMap((t,l,o)=>{let c=s.safeParse(t),n=a.safeParse(o[l-1]),i=c.success?e(c.data.source.value):null;return null!==i&&n.success&&r.test(n.data.content)?[{label:n.data.content,imageId:i}]:[]}):[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AssistantScreenshotPicture } from './tool-screenshots.js';
|
|
2
1
|
/**
|
|
3
|
-
* The `src` of a screenshot's or an attached image's picture: the object URL the
|
|
4
|
-
* reads the uploaded image into, once it has been read; `undefined` until then and
|
|
5
|
-
* fails. The screenshots of a call are read only while their popover is open; the
|
|
6
|
-
* attached are read as soon as their bubble shows.
|
|
2
|
+
* The `src` of a screenshot's or an attached image's picture, by its image id: the object URL the
|
|
3
|
+
* assistant system reads the uploaded image into, once it has been read; `undefined` until then and
|
|
4
|
+
* when the read fails. The screenshots of a call are read only while their popover is open; the
|
|
5
|
+
* images a user attached are read as soon as their bubble shows.
|
|
7
6
|
*/
|
|
8
|
-
export declare const useScreenshotSrc: (
|
|
7
|
+
export declare const useScreenshotSrc: (imageId: string) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as r,useState as e}from"react";import{useConfigurator as t}from"../../../application-runtime/index.js";export const useScreenshotSrc=o=>{let{assistantSystem:i}=t(),
|
|
1
|
+
import{useEffect as r,useState as e}from"react";import{useConfigurator as t}from"../../../application-runtime/index.js";export const useScreenshotSrc=o=>{let{assistantSystem:i}=t(),[n,c]=e();return r(()=>{let r=!0;return i.loadScreenshotUrl(o).then(e=>{r&&c({imageId:o,src:e})},()=>void 0),()=>{r=!1}},[i,o]),n?.imageId===o?n.src:void 0};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UIMessage } from '@tanstack/ai-client';
|
|
2
2
|
import { type AssistantMessageAnnotation } from '@salsita-ai/contracts/assistant';
|
|
3
|
-
import type
|
|
3
|
+
import { type AssistantEarlierThreadSnapshot } from '../../application-runtime/index.js';
|
|
4
4
|
import { type AssistantToolChip } from './tool-chip.js';
|
|
5
5
|
/** A tool call of the thread, with what its chip shows and what a click on the chip logs. */
|
|
6
6
|
export interface AssistantToolItem {
|
|
@@ -28,12 +28,20 @@ export type AssistantThreadItem = {
|
|
|
28
28
|
readonly imageIds: readonly string[];
|
|
29
29
|
/** The annotations the user attached, in their order among the message's images. */
|
|
30
30
|
readonly annotations: readonly AssistantMessageAnnotation[];
|
|
31
|
+
/** How the user spoke the message, when they did; nothing for a typed one. */
|
|
32
|
+
readonly voice: AssistantUserVoice | null;
|
|
31
33
|
} | {
|
|
32
34
|
readonly kind: 'text';
|
|
33
35
|
readonly id: string;
|
|
34
36
|
readonly markdown: string;
|
|
35
37
|
readonly isStreaming: boolean;
|
|
36
38
|
readonly forms: AssistantFormsVisibility;
|
|
39
|
+
/**
|
|
40
|
+
* The reply this text ends, by the id of its message, when the panel can read it aloud: voice is on, the reply
|
|
41
|
+
* has been written, and it has something to say within what the server reads. Its play button follows the text.
|
|
42
|
+
* Nothing on every other text.
|
|
43
|
+
*/
|
|
44
|
+
readonly playableReplyId: string | null;
|
|
37
45
|
} | {
|
|
38
46
|
readonly kind: 'tools';
|
|
39
47
|
readonly id: string;
|
|
@@ -42,6 +50,12 @@ export type AssistantThreadItem = {
|
|
|
42
50
|
readonly kind: 'separator';
|
|
43
51
|
readonly id: string;
|
|
44
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* How a user message was spoken:
|
|
55
|
+
* - `transcribing`: its recording was sent, and the server's transcript has not arrived yet
|
|
56
|
+
* - `spoken`: its text is the transcript the server made of the recording
|
|
57
|
+
*/
|
|
58
|
+
export type AssistantUserVoice = 'transcribing' | 'spoken';
|
|
45
59
|
export interface AssistantThreadView {
|
|
46
60
|
readonly items: readonly AssistantThreadItem[];
|
|
47
61
|
/** True while a reply runs and neither streaming text nor a row of tool chips shows that it does. */
|
|
@@ -51,10 +65,10 @@ export interface AssistantThreadView {
|
|
|
51
65
|
* Lays the messages of the chat out as the blocks the thread renders. Reasoning is left out; tool
|
|
52
66
|
* results are not shown on their own but decide the state of the chip of their call.
|
|
53
67
|
*/
|
|
54
|
-
export declare const buildThreadView: (messages: ReadonlyArray<UIMessage>, isReplying: boolean, isResuming: boolean) => AssistantThreadView;
|
|
68
|
+
export declare const buildThreadView: (messages: ReadonlyArray<UIMessage>, isReplying: boolean, isResuming: boolean, isVoiceEnabled: boolean) => AssistantThreadView;
|
|
55
69
|
/**
|
|
56
70
|
* Lays the closed threads of the conversation out above the thread that continues them, oldest
|
|
57
71
|
* first, each ended by a separator: the assistant read on from a summary of it, not from the
|
|
58
|
-
* messages themselves.
|
|
72
|
+
* messages themselves. Their replies are not read aloud: the server keeps no speech for a closed thread.
|
|
59
73
|
*/
|
|
60
74
|
export declare const buildEarlierThreadItems: (earlierThreads: ReadonlyArray<AssistantEarlierThreadSnapshot>) => readonly AssistantThreadItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{match as t}from"ts-pattern";import{AssistantMessageMetadata as e,banTool as r,readAssistantImageReference as
|
|
1
|
+
import{match as t}from"ts-pattern";import{AssistantMessageMetadata as e,banTool as r,readAssistantImageReference as a}from"@salsita-ai/contracts/assistant";import{isSpeakableReply as i}from"../../application-runtime/index.js";import{describeToolCall as o}from"./tool-chip.js";let s=t=>{try{return JSON.parse(t)}catch{return t}},n=t=>t.map(t=>"text"===t.type?t.content:"").join("").trim(),l=t=>t.flatMap(t=>"image"===t.type&&"url"===t.source.type?a(t.source.value)??[]:[]),d=(t,r)=>{let a=e.safeParse(t.metadata),i=a.success?a.data.annotations??[]:[];return r.flatMap(t=>i.filter(e=>e.imageId===t))},p=t=>t.parts.some(t=>"audio"===t.type)?"transcribing":e.safeParse(t.metadata).data?.spoken?"spoken":null;export const buildThreadView=(e,a,u,m)=>{let f=(t=>{let e=new Map;for(let r of t)for(let t of r.parts)"tool-result"===t.type&&e.set(t.toolCallId,{result:"string"==typeof t.content?s(t.content):t.content,error:"error"===t.state?t.error??"The tool call failed.":void 0});return e})(e),c=[],h=e.at(-1),g=a?e.map(t=>t.role).lastIndexOf("user")+1:e.length,k=t=>{let e=c.at(-1);e?.kind==="tools"?c[c.length-1]={...e,tools:[...e.tools,t]}:c.push({kind:"tools",id:t.id,tools:[t]})};for(let[s,y]of e.entries()){if("user"===y.role){let t=n(y.parts),e=l(y.parts),r=d(y,e),a=e.filter(t=>!r.some(e=>e.imageId===t)),i=p(y);(t||e.length>0||i)&&c.push({kind:"user",id:y.id,text:t,imageIds:a,annotations:r,voice:i});continue}let e=a&&y===h,x=t({isLast:y===h,isBusy:e||u}).with({isLast:!1},()=>"hidden").with({isBusy:!0},()=>"disabled").otherwise(()=>"enabled"),w=y.parts.map(t=>"text"===t.type&&""!==t.content.trim()).lastIndexOf(!0),$=m&&s<g&&i(y);y.parts.forEach((t,a)=>{let i=`${y.id}:${a}`;if("text"===t.type){if(t.content.trim()){let r=e&&a===y.parts.length-1,o=$&&a===w?y.id:null;c.push({kind:"text",id:i,markdown:t.content,isStreaming:r,forms:x,playableReplyId:o})}return}if("tool-call"!==t.type||t.name===r.name)return;let s=f.get(t.id),n=t.input,l=t.output??s?.result;k({id:t.id,input:n,result:l,chip:o({name:t.name,input:n,result:l,error:s?.error,isReplyRunning:e})})})}let y=c.at(-1),x=h?.role==="assistant"&&(y?.kind==="text"&&y.isStreaming||y?.kind==="tools");return{items:c,isThinking:a&&!x}};export const buildEarlierThreadItems=t=>t.flatMap(({threadId:t,messages:e})=>[...buildThreadView(e,!1,!1,!1).items.map(e=>"text"===e.kind?{...e,id:`${t}:${e.id}`,forms:"hidden"}:{...e,id:`${t}:${e.id}`}),{kind:"separator",id:`${t}:separator`}]);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type AssistantRecording } from './voice/index.js';
|
|
1
2
|
/** An image or an annotation attached to the message being written, as a composer shows it. */
|
|
2
3
|
export interface AssistantComposerAttachment {
|
|
3
4
|
readonly id: string;
|
|
4
5
|
/** Object URL of the prepared image for the thumbnail, valid while the attachment is attached. */
|
|
5
6
|
readonly previewUrl: string;
|
|
6
|
-
/** True for an annotation of the
|
|
7
|
+
/** True for an annotation, of the view or of an image; false for an image the user added. */
|
|
7
8
|
readonly isAnnotation: boolean;
|
|
8
9
|
/** How many comment pins an annotation has; 0 for an image. */
|
|
9
10
|
readonly pinCount: number;
|
|
@@ -19,8 +20,10 @@ export type AssistantComposerNotice = 'unreadable' | 'limit';
|
|
|
19
20
|
* - `draft` and `setDraft`: the text of the message.
|
|
20
21
|
* - `attachments`: the images and annotations attached to it, in their order.
|
|
21
22
|
* - `addFiles(files)`: prepares the files as images and attaches them, as many as `maxAttachments` allows.
|
|
22
|
-
* - `
|
|
23
|
-
*
|
|
23
|
+
* - `annotate()`: opens the annotation editor over the configurator; the annotation is attached once the user is
|
|
24
|
+
* done with it. Like a file too many, an annotation too many is not made, and `notice` says why.
|
|
25
|
+
* - `annotateAttachment(id)`: opens the annotation editor on an attached image; the annotation takes its place once
|
|
26
|
+
* the user is done with it, so it needs no free slot. An annotation is not annotated again.
|
|
24
27
|
* - `removeAttachment(id)`: takes an attachment off the message.
|
|
25
28
|
* - `isPreparing`: whether files added are still being prepared; the message cannot be sent meanwhile.
|
|
26
29
|
* - `notice`: why the files added last are not all attached, until the attachments change again.
|
|
@@ -33,14 +36,27 @@ export type AssistantComposerNotice = 'unreadable' | 'limit';
|
|
|
33
36
|
* - `canSend` and `send()`: whether the message can be sent, and sending it. The message is cleared once the chat
|
|
34
37
|
* takes it, and comes back, after what was written meanwhile, when the chat gives it back.
|
|
35
38
|
* - `inputFocusHandlers`: `onFocus` and `onBlur` for the message input, so a phone layout makes room for it.
|
|
39
|
+
* - `canAttach` and `canAnnotate`: whether the session's `assistant.features` let the user attach images and
|
|
40
|
+
* annotate; `addFiles`, `annotate()` and `annotateAttachment(id)` do nothing without them. Annotating an attached
|
|
41
|
+
* image needs both.
|
|
42
|
+
* - `canRecord`: whether the user may speak the message: the session has voice messages on, the browser can record,
|
|
43
|
+
* and the assistant takes messages here. A composer shows a mic in place of Send while the text is empty and nothing
|
|
44
|
+
* is attached then.
|
|
45
|
+
* - `recording`: the voice message being recorded, its status, how long it runs and how loud the microphone is.
|
|
46
|
+
* - `startRecording()`: starts recording, asking for the microphone; a microphone blocked for the page shows as the
|
|
47
|
+
* `refused` status, and starting again asks again.
|
|
48
|
+
* - `sendRecording()`: stops the recording and sends it as the message, with the images and annotations attached. A
|
|
49
|
+
* recording the server refuses comes back as `recorded`, to be sent again or dropped; one in which nothing was
|
|
50
|
+
* heard is dropped. A recording that reaches two minutes is sent on its own.
|
|
51
|
+
* - `cancelRecording()`: drops the recording, and the composer is as it was.
|
|
36
52
|
*/
|
|
37
53
|
export interface UseAssistantComposerResult {
|
|
38
54
|
readonly draft: string;
|
|
39
55
|
readonly setDraft: (draft: string) => void;
|
|
40
56
|
readonly attachments: readonly AssistantComposerAttachment[];
|
|
41
57
|
readonly addFiles: (files: ReadonlyArray<File>) => Promise<void>;
|
|
42
|
-
readonly canAnnotate: boolean;
|
|
43
58
|
readonly annotate: () => Promise<void>;
|
|
59
|
+
readonly annotateAttachment: (id: string) => Promise<void>;
|
|
44
60
|
readonly removeAttachment: (id: string) => void;
|
|
45
61
|
readonly isPreparing: boolean;
|
|
46
62
|
readonly notice: AssistantComposerNotice | undefined;
|
|
@@ -55,12 +71,21 @@ export interface UseAssistantComposerResult {
|
|
|
55
71
|
readonly onFocus: () => void;
|
|
56
72
|
readonly onBlur: () => void;
|
|
57
73
|
};
|
|
74
|
+
readonly canAttach: boolean;
|
|
75
|
+
readonly canAnnotate: boolean;
|
|
76
|
+
readonly canRecord: boolean;
|
|
77
|
+
readonly recording: AssistantRecording;
|
|
78
|
+
readonly startRecording: () => Promise<void>;
|
|
79
|
+
readonly sendRecording: () => Promise<void>;
|
|
80
|
+
readonly cancelRecording: () => void;
|
|
58
81
|
}
|
|
59
82
|
export type UseAssistantComposer = () => UseAssistantComposerResult;
|
|
60
83
|
/**
|
|
61
|
-
* Hook to write a message to the assistant, as the panel's composer does. The
|
|
62
|
-
* component that uses the hook
|
|
63
|
-
*
|
|
84
|
+
* Hook to write a message to the assistant, as the panel's composer does. The text of the message lives
|
|
85
|
+
* as long as the component that uses the hook; its attachments live in the assistant system
|
|
86
|
+
* (`composerAttachments$`), so an annotation made from elsewhere, such as a drawing, is attached here too.
|
|
87
|
+
* The thumbnails' object URLs are the hook's own, revoked once their attachment is gone or the component
|
|
88
|
+
* unmounts. It does not render again with every chunk of a reply.
|
|
64
89
|
*
|
|
65
90
|
* Images added are prepared at once and attached up to `maxAttachments` per message; one that cannot be prepared,
|
|
66
91
|
* or one too many, is not attached, and `notice` says why. The message keeps its text and images until the chat
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
${
|
|
1
|
+
import{useTheme as t}from"@mui/material";import{useCallback as e,useEffect as n,useMemo as a,useReducer as r,useRef as i,useState as o}from"react";import{skip as s}from"rxjs/operators";import{useApplicationRuntimeSelector as c,useEagerObservableSelector as l,useEagerObservableValue as u}from"#package/react-sdk";import{MAX_COMPOSER_ATTACHMENTS as m,useConfigurator as p}from"../../application-runtime/index.js";import{prepareImage as f}from"./attachments/index.js";import{useVoiceRecording as d}from"./voice/index.js";export const useAssistantComposer=()=>{let{assistantSystem:h}=p(),[y,g]=o(""),v=u(h.composerAttachments$),[b,k]=o(0),[A,w]=o(),[L,R]=o(!1),U=i(new Map),[j,x]=r(t=>t+1,0),S=i(v);S.current=v,n(()=>{let t=U.current;for(let[e,n]of t)v.some(t=>t.id===e)||(URL.revokeObjectURL(n),t.delete(e))},[v]),n(()=>{let t=U.current;return 0===t.size&&S.current.length>0&&x(),()=>{for(let e of t.values())URL.revokeObjectURL(e);t.clear()}},[]);let $=i(!1),P=e(t=>{$.current=!0;try{return t()}finally{$.current=!1}},[]);n(()=>{let t=h.composerAttachments$.pipe(s(1)).subscribe(()=>{$.current||w(void 0)});return()=>t.unsubscribe()},[h]);let{isReplying:F,isResuming:C,isLocked:E,isVoiceEnabled:I}=l(h.chat$,t=>({isReplying:t.isLoading,isResuming:t.isResuming,isLocked:t.isLocked,isVoiceEnabled:t.isVoiceEnabled}),[]),M=y.trim(),O=C||L,V=!F&&!O&&!E&&0===b&&(M.length>0||v.length>0),z=c(()=>h.getSessionManifest()?.features.images===!0),B=c(()=>h.getSessionManifest()?.features.annotations===!0),q=e(async t=>{if(!z||0===t.length)return;let e=[];for(let n of t){let t=h.reserveAttachmentSlot();if(!t)break;e.push(t)}let n=t.slice(0,e.length);w(n.length<t.length?"limit":void 0),0!==n.length&&(k(t=>t+n.length),await Promise.all(n.map(async(t,n)=>{let a;try{a=await f(t)}catch{w("unreadable")}finally{k(t=>t-1)}if(e[n]?.()&&a){let t=a;P(()=>h.attach(t))}})))},[h,z,P]),D=e(async()=>{if(B){if(!h.hasFreeAttachmentSlot$.value)return void w("limit");w(void 0),await h.annotate({type:"view"})}},[h,B]),{palette:G}=t(),H=G.background.default,J=e(async t=>{z&&B&&(w(void 0),await h.annotate({type:"attachment",attachmentId:t,background:H}))},[h,H,B,z]),K=e(t=>{h.removeAttachment(t),w(void 0)},[h]),N=i(!0);n(()=>(N.current=!0,()=>{N.current=!1}),[]);let Q=e(t=>{P(()=>t.forEach(({id:t})=>h.removeAttachment(t))),w(void 0),R(!1)},[h,P]),T=e(t=>{w(P(()=>h.restoreAttachments(t))?void 0:"limit")},[h,P]),W=e(async()=>{if(V){R(!0);try{await h.send(M,v,{onSent:()=>{g(""),Q(v)},onUnsent:()=>{g(t=>t.trim()?`${t}
|
|
2
|
+
${y}`:y),T(v)}})}finally{R(!1)}}},[h,v,V,M,y,T,Q]),X=i(async()=>{}),Y=d({onLimitReached:()=>void X.current()}),{recording:Z,finish:_,clear:tt,restore:te}=Y,{start:tn,cancel:ta}=Y,tr=I&&"unavailable"!==Z.status&&!E,ti=e(async()=>{if(!tr||F||O)return;h.unlockPlayback();let t=await _();if(t&&!(b>0)){R(!0);try{await h.send("",v,{audio:t,onSent:()=>{tt(),Q(v)},onUnsent:()=>{T(v),N.current&&te(t)}})}finally{R(!1)}}},[h,v,tr,tt,_,O,F,b,T,te,Q]);X.current=ti;let to=e(async()=>{!tr||F||O||(h.stopPlayback(),h.unlockPlayback(),await tn())},[h,tr,O,F,tn]),ts=e(()=>{h.stop()},[h]),tc=a(()=>({onFocus:()=>h.setInputFocused(!0),onBlur:()=>h.setInputFocused(!1)}),[h]);return{draft:y,setDraft:g,attachments:a(()=>v.map(t=>{let{id:e}=t,n=U.current.get(e);return void 0===n&&(n=URL.createObjectURL(t.blob),U.current.set(e,n)),"annotation"===t.type?{id:e,previewUrl:n,isAnnotation:!0,pinCount:t.pins.length}:{id:e,previewUrl:n,isAnnotation:!1,pinCount:0}}),[v,j]),addFiles:q,annotate:D,annotateAttachment:J,removeAttachment:K,isPreparing:b>0,notice:A,maxAttachments:m,isBusy:O,isLocked:E,isReplying:F,canSend:V,send:W,stop:ts,inputFocusHandlers:tc,canAttach:z,canAnnotate:B,canRecord:tr,recording:Z,startRecording:to,sendRecording:ti,cancelRecording:ta}};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { type AssistantFailure } from './assistant-failure.js';
|
|
2
2
|
import { type AssistantThreadItem } from './thread-items.js';
|
|
3
|
+
/**
|
|
4
|
+
* A ready-made first message offered while the thread is empty, in the current language: `title` is the text of its
|
|
5
|
+
* chip, `reply` the message a tap sends, which is the title when the project gives no reply.
|
|
6
|
+
*/
|
|
7
|
+
export interface AssistantThreadStarter {
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly reply: string;
|
|
10
|
+
}
|
|
3
11
|
/**
|
|
4
12
|
* The conversation with the assistant, laid out as the panel's thread renders it.
|
|
5
13
|
* - `items`: the blocks of the current thread in reading order: user messages, assistant text, rows of tool calls.
|
|
@@ -7,9 +15,13 @@ import { type AssistantThreadItem } from './thread-items.js';
|
|
|
7
15
|
* - `isLoaded` and `isLoadingThread`: whether the thread has been read, and whether the panel shows that it is
|
|
8
16
|
* being read.
|
|
9
17
|
* - `isEmpty`: whether there is nothing to show, so the panel greets the user.
|
|
18
|
+
* - `greeting` and `starters`: the project's greeting and starters from its `assistantGreeting` component, in the
|
|
19
|
+
* current language, shown while the thread is empty. `greeting` is `undefined` when the project gives none, and
|
|
20
|
+
* the panel greets with its own words. Send a starter with `useConfigurator().assistantSystem.send(starter.reply)`.
|
|
10
21
|
* - `isReplying`: whether a reply runs. `isThinking`: whether it runs with nothing in the thread showing that it
|
|
11
22
|
* does yet. `isResuming`: whether a thread this session may not continue is being resumed before a message.
|
|
12
|
-
* - `failure` and `retry()`: what went wrong with the assistant, and reading the thread again when that may help
|
|
23
|
+
* - `failure` and `retry()`: what went wrong with the assistant, and reading the thread again when that may help, or
|
|
24
|
+
* regenerating the reply when its run failed
|
|
13
25
|
* (`failure.canRetry`). A ban of the user on this configuration is a failure of kind `locked`, also when the thread
|
|
14
26
|
* read itself succeeded.
|
|
15
27
|
* - `hasOlderMessages`, `isLoadingOlderMessages` and `loadOlderMessages()`: the older pages of the current thread.
|
|
@@ -28,6 +40,8 @@ export interface UseAssistantThreadResult {
|
|
|
28
40
|
readonly isLoaded: boolean;
|
|
29
41
|
readonly isLoadingThread: boolean;
|
|
30
42
|
readonly isEmpty: boolean;
|
|
43
|
+
readonly greeting: string | undefined;
|
|
44
|
+
readonly starters: readonly AssistantThreadStarter[];
|
|
31
45
|
readonly isReplying: boolean;
|
|
32
46
|
readonly isThinking: boolean;
|
|
33
47
|
readonly isResuming: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{
|
|
1
|
+
import{useMemo as e}from"react";import{assistantGreetingComponent as a}from"#package/domain";import{useEagerObservableValue as s,useFirstComponent as r,useResolveLocalizable as d}from"#package/react-sdk";import{useConfigurator as i}from"../../application-runtime/index.js";import{describeAssistantFailure as o}from"./assistant-failure.js";import{buildEarlierThreadItems as t,buildThreadView as l}from"./thread-items.js";export const useAssistantThread=()=>{let{assistantSystem:n}=i(),g=s(n.chat$),{messages:m,isLoading:h,isResuming:p,earlierThreads:T,isVoiceEnabled:L}=g,u=s(n.undoTipToolCallId$),c=h?void 0:u,{items:f,isThinking:M}=e(()=>l(m,h,p,L),[m,h,p,L]),O=e(()=>t(T),[T]),v=m.at(-1),E=e(()=>v?{}:void 0,[v]),{error:j,failedStatus:k,retryAfterSeconds:y,isLocked:I,isNetworkLocked:x,runFailed:C}=g,$=e(()=>j||I||C?o(k,y,I,x,C):void 0,[j,k,y,I,x,C]),A=null!==g.earlierThreadId&&!g.hasOlderMessages&&!g.isLoadingEarlierThread,b=!g.isLoaded&&0===O.length&&!p&&!$,q=g.isLoaded&&0===f.length&&0===O.length&&!h&&!p&&!$,w=r({componentTypes:[a]}),z=d(),B=w?.state,D=e(()=>B?.message===void 0?void 0:z(B.message),[B?.message,z]),F=e(()=>(B?.starters??[]).map(({title:e,reply:a})=>{let s=z(e);return{title:s,reply:void 0===a?s:z(a)}}),[B?.starters,z]);return{items:f,earlierItems:O,isLoaded:g.isLoaded,isLoadingThread:b,isEmpty:q,greeting:D,starters:F,isReplying:h,isThinking:M,isResuming:p,failure:$,retry:C?n.regenerate:n.reloadThread,hasOlderMessages:g.hasOlderMessages,isLoadingOlderMessages:g.isLoadingOlderMessages,loadOlderMessages:n.loadOlderMessages,canLoadEarlierThread:A,isLoadingEarlierThread:g.isLoadingEarlierThread,loadEarlierThread:n.loadEarlierThread,undoableToolCallId:c,undo:n.undoToolCalls,newestMessageKey:E,firstMessageId:m[0]?.id}};
|
|
@@ -15,8 +15,8 @@ export interface LoadOlderOnTopOptions {
|
|
|
15
15
|
*
|
|
16
16
|
* The page lands above what the user reads, so the reading position is kept: the distance from the
|
|
17
17
|
* end of the thread is restored once the page is painted, before the browser shows it, and again
|
|
18
|
-
* each time an image
|
|
19
|
-
* height, so one that loads above the reader grows the thread there. CSS scroll
|
|
20
|
-
* the same, but Safari does not support it.
|
|
18
|
+
* each time an image above the visible top of the thread finishes loading, until the user scrolls:
|
|
19
|
+
* an image reserves no height, so one that loads above the reader grows the thread there. CSS scroll
|
|
20
|
+
* anchoring would do the same, but Safari does not support it.
|
|
21
21
|
*/
|
|
22
22
|
export declare const useLoadOlderOnTop: <SCROLLER extends HTMLElement, SENTINEL extends HTMLElement>(scrollerRef: RefObject<SCROLLER>, sentinelRef: RefObject<SENTINEL>, { enabled, onReachTop, firstItemKey }: LoadOlderOnTopOptions) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as r,useLayoutEffect as e,useRef as t}from"react";let n=Symbol("no attempt");export const useLoadOlderOnTop=(l,c,{enabled:o,onReachTop:u,firstItemKey:s})=>{let i=t(null),p=t(n),a=t(null),d=t({onReachTop:u,firstItemKey:s});d.current={onReachTop:u,firstItemKey:s},r(()=>{let r=l.current;if(!r)return;let e=()=>{null!==i.current&&(i.current=r.scrollHeight-r.scrollTop),a.current&&Math.abs(r.scrollTop-a.current.scrollTop)>1&&(a.current=null)},t=
|
|
1
|
+
import{useEffect as r,useLayoutEffect as e,useRef as t}from"react";let n=Symbol("no attempt");export const useLoadOlderOnTop=(l,c,{enabled:o,onReachTop:u,firstItemKey:s})=>{let i=t(null),p=t(n),a=t(null),d=t({onReachTop:u,firstItemKey:s});d.current={onReachTop:u,firstItemKey:s},r(()=>{let r=l.current;if(!r)return;let e=()=>{null!==i.current&&(i.current=r.scrollHeight-r.scrollTop),a.current&&Math.abs(r.scrollTop-a.current.scrollTop)>1&&(a.current=null)},t=e=>{a.current&&(e.target instanceof Element&&e.target.getBoundingClientRect().top<r.getBoundingClientRect().top&&(r.scrollTop=r.scrollHeight-a.current.distanceFromEnd),a.current={distanceFromEnd:r.scrollHeight-r.scrollTop,scrollTop:r.scrollTop})};return r.addEventListener("scroll",e,{passive:!0}),r.addEventListener("load",t,!0),()=>{r.removeEventListener("scroll",e),r.removeEventListener("load",t,!0)}},[l]),r(()=>{let r=l.current,e=c.current;if(!o||!r||!e)return;let t=new IntersectionObserver(([e])=>{if(!e?.isIntersecting){p.current=n;return}p.current!==d.current.firstItemKey&&(p.current=d.current.firstItemKey,a.current=null,i.current=r.scrollHeight-r.scrollTop,d.current.onReachTop())},{root:r});return t.observe(e),()=>t.disconnect()},[o,l,c]),e(()=>{let r=l.current;r&&null!==i.current&&(r.scrollTop=r.scrollHeight-i.current,a.current={distanceFromEnd:i.current,scrollTop:r.scrollTop}),i.current=null},[s,l])};
|
package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts}
RENAMED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* still ends. StrictMode unmounts and mounts a component again at once in development, so the end
|
|
4
4
|
* waits a task and is dropped when the component mounted again meanwhile.
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const useOnUnmount: (end: () => void) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as r,useRef as t}from"react";export const useOnUnmount=e=>{let n=t(e),u=t(!1);n.current=e,r(()=>(u.current=!0,()=>{u.current=!1,setTimeout(()=>{u.current||n.current()})}),[])};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ElementType, type HTMLAttributes } from 'react';
|
|
2
|
+
interface RecordingBarProps {
|
|
3
|
+
/** The composer's `recordingBar` slot and its props, which replace and extend the bar. */
|
|
4
|
+
readonly slot: ElementType | undefined;
|
|
5
|
+
readonly slotProps: HTMLAttributes<HTMLDivElement> | undefined;
|
|
6
|
+
/** True while the microphone is recorded; false for a recording that waits to be sent again. */
|
|
7
|
+
readonly isRecording: boolean;
|
|
8
|
+
readonly elapsedMs: number;
|
|
9
|
+
readonly level: number;
|
|
10
|
+
/** True while the recording is being sent; it cannot be dropped then. */
|
|
11
|
+
readonly disabled: boolean;
|
|
12
|
+
readonly onDiscard: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Stands in for the message input while a voice message is recorded: a control that drops the
|
|
16
|
+
* recording, the loudness of the microphone and how long the recording runs. A recording the server
|
|
17
|
+
* refused waits here to be sent again or dropped. It can take the focus, so the composer around it
|
|
18
|
+
* hears the keys that send or drop the recording.
|
|
19
|
+
*/
|
|
20
|
+
export declare const RecordingBar: import("react").ForwardRefExoticComponent<RecordingBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as i}from"react/jsx-runtime";import{styled as a}from"@mui/material";import{forwardRef as n,useEffect as o,useState as s}from"react";import{useLocalizable as t}from"#package/react-sdk";import{PhxIcon as l}from"#package/ui-sdk";import{AssistantComposerName as d,ComposerToolButton as m}from"../composer/index.js";let c={id:"sdk.assistant.composer.recording.discard",message:"Discard recording"},g={id:"sdk.assistant.composer.recording.label",message:"Recording a voice message"},p={id:"sdk.assistant.composer.recording.recorded",message:"Voice message not sent"},f=a("div",{name:d,slot:"recordingBar"})(({theme:{spacing:e}})=>({alignItems:"center",cursor:"default",display:"flex",gap:e(1),gridColumn:"1 / -1",minBlockSize:32,paddingInlineEnd:e(.75),"&:focus":{outline:"none"}})),u=a("div")(({theme:{spacing:e}})=>({alignItems:"center",blockSize:24,display:"flex",flex:1,gap:2,justifyContent:"flex-end",minInlineSize:0,overflow:"hidden",paddingInline:e(.5)})),h=a("span")(({theme:{palette:e}})=>({background:e.primary.main,borderRadius:2,flexShrink:0,inlineSize:3,transition:"block-size 100ms linear"})),x=Array.from({length:48},()=>0),k=a("span")(({theme:{palette:e,typography:r}})=>({...r.body2,color:e.text.secondary,flex:1})),b=a("span")(({theme:{palette:e,typography:r}})=>({...r.body2,color:e.text.secondary,fontVariantNumeric:"tabular-nums"}));export const RecordingBar=n(function({slot:a,slotProps:n,isRecording:d,elapsedMs:y,level:S,disabled:z,onDiscard:I},j){let v,B=t(c),C=t(g),M=t(p),R=((e,r)=>{let[i,a]=s(x);return o(()=>{a(i=>0===r?x:[...i.slice(1),e])},[r]),i})(S,y);return r(a??f,{ref:j,tabIndex:-1,role:"group","aria-label":d?C:M,...n,children:[e(m,{size:"small","aria-label":B,disabled:z,onClick:I,children:e(l,{name:"X",fontSize:"small"})}),d?r(i,{children:[e(u,{"aria-hidden":!0,children:R.map((r,i)=>e(h,{style:{blockSize:`${Math.max(12,100*r)}%`}},i))}),e(b,{children:(v=Math.floor(y/1e3),`${Math.floor(v/60)}:${String(v%60).padStart(2,"0")}`)})]}):e(k,{children:z?null:M})]})});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentsOverrides, IconButtonProps } from '@mui/material';
|
|
2
|
+
import { type ElementType } from 'react';
|
|
3
|
+
declare const MuiComponentName: 'PhxAssistantReplyPlayButton';
|
|
4
|
+
declare module '@mui/material/styles' {
|
|
5
|
+
interface ComponentNameToClassKey {
|
|
6
|
+
[MuiComponentName]: 'root';
|
|
7
|
+
}
|
|
8
|
+
interface ComponentsPropsList {
|
|
9
|
+
[MuiComponentName]: ThemeableAssistantReplyPlayButtonProps;
|
|
10
|
+
}
|
|
11
|
+
interface Components {
|
|
12
|
+
[MuiComponentName]?: {
|
|
13
|
+
defaultProps?: ComponentsPropsList[typeof MuiComponentName];
|
|
14
|
+
styleOverrides?: ComponentsOverrides<Theme>[typeof MuiComponentName];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export interface ThemeableAssistantReplyPlayButtonProps {
|
|
19
|
+
/**
|
|
20
|
+
* The components used for each slot inside the play button.
|
|
21
|
+
*
|
|
22
|
+
* - `root` — The button (`IconButton`).
|
|
23
|
+
*/
|
|
24
|
+
readonly slots?: Partial<Record<'root', ElementType>>;
|
|
25
|
+
/**
|
|
26
|
+
* Props applied to each slot component.
|
|
27
|
+
*
|
|
28
|
+
* - `root` — Props for the button.
|
|
29
|
+
*/
|
|
30
|
+
readonly slotProps?: Partial<{
|
|
31
|
+
readonly root: IconButtonProps;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
interface ReplyPlayButtonProps extends ThemeableAssistantReplyPlayButtonProps {
|
|
35
|
+
/** The reply to read aloud, by the id of its message. */
|
|
36
|
+
readonly messageId: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The control under a reply that reads it aloud, and stops it while it is read. It spins while the reply's speech
|
|
40
|
+
* is on its way, and stands out when the browser did not let the reply read itself aloud after a voice message.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ReplyPlayButton: (inProps: ReplyPlayButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CircularProgress as a,IconButton as t,Tooltip as r,styled as o,useThemeProps as i}from"@mui/material";import{useCallback as n}from"react";import{useEagerObservableValue as l,useLocalizable as s}from"#package/react-sdk";import{PhxIcon as d,hoverStyles as p}from"#package/ui-sdk";import{useConfigurator as m}from"../../../application-runtime/index.js";let c={id:"sdk.assistant.reply.play",message:"Read aloud"},k={id:"sdk.assistant.reply.stop",message:"Stop reading"},g={id:"sdk.assistant.reply.blocked",message:"Tap to hear the reply"},y="PhxAssistantReplyPlayButton",h=o(t,{name:y,slot:"root"})(({theme:{palette:e,spacing:a}})=>({alignSelf:"flex-start",background:"transparent",border:"none",borderRadius:6,boxShadow:"none",color:e.text.secondary,marginBlockStart:a(-1),marginInlineStart:-4,padding:4,"&:hover":{background:"transparent"},...p({"&:hover":{background:e.action.hover,color:e.text.primary}}),'&[data-blocked="true"], &[data-blocked="true"]:hover':{background:`hsl(from ${e.primary.main} h s l / 12%)`,color:e.primary.main}})),u=o("span")({alignItems:"center",blockSize:16,display:"inline-flex",inlineSize:16,justifyContent:"center"});export const ReplyPlayButton=t=>{let{messageId:o,slots:p={},slotProps:b={}}=i({props:t,name:y}),{assistantSystem:f}=m(),x=l(f.playback$),S=x.messageId===o?x.status:"idle",z=s("loading"===S||"playing"===S?k:"blocked"===S?g:c),R=n(()=>{f.playReply(o)},[f,o]);return e(r,{title:z,placement:"top",children:e(p.root??h,{size:"small","aria-label":z,"data-blocked":"blocked"===S,...b.root,onClick:R,children:e(u,{children:"loading"===S?e(a,{size:13,thickness:5,color:"inherit"}):e(d,{name:"playing"===S?"Stop":"SpeakerHigh",sx:{fontSize:16}})})})})};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { RecordingBar } from './RecordingBar.js';
|
|
2
|
+
export { useVoiceRecording } from './use-voice-recording.js';
|
|
3
|
+
export type { AssistantRecording, AssistantRecordingStatus } from './use-voice-recording.js';
|
|
4
|
+
export { ReplyPlayButton, type ThemeableAssistantReplyPlayButtonProps } from './ReplyPlayButton.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{RecordingBar}from"./RecordingBar.js";export{useVoiceRecording}from"./use-voice-recording.js";export{ReplyPlayButton}from"./ReplyPlayButton.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the voice message being recorded stands:
|
|
3
|
+
* - `idle`: nothing is recorded; the mic starts a recording.
|
|
4
|
+
* - `requesting`: the browser is asking the user for the microphone.
|
|
5
|
+
* - `recording`: the microphone is recorded; the recording can be sent or dropped.
|
|
6
|
+
* - `recorded`: a recording waits to be sent again or dropped, because the server refused it.
|
|
7
|
+
* - `refused`: the microphone is blocked for the page; the mic asks for it again.
|
|
8
|
+
* - `unavailable`: the browser cannot record at all, so there is no mic.
|
|
9
|
+
*/
|
|
10
|
+
export type AssistantRecordingStatus = 'idle' | 'requesting' | 'recording' | 'recorded' | 'refused' | 'unavailable';
|
|
11
|
+
/** The voice message being recorded, as a composer shows it. */
|
|
12
|
+
export interface AssistantRecording {
|
|
13
|
+
readonly status: AssistantRecordingStatus;
|
|
14
|
+
/** How long the recording runs, in ms; 0 when nothing is recorded. */
|
|
15
|
+
readonly elapsedMs: number;
|
|
16
|
+
/** The loudness of the microphone, from 0 for silence to 1; 0 when nothing is recorded. */
|
|
17
|
+
readonly level: number;
|
|
18
|
+
}
|
|
19
|
+
interface UseVoiceRecordingProps {
|
|
20
|
+
/** Called when the recording reaches {@link MAX_RECORDING_MS}: it is to be sent as it is. */
|
|
21
|
+
readonly onLimitReached: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Records a voice message from the microphone for the composer: the state it shows, and the steps a
|
|
25
|
+
* recording goes through. The recording is dropped when the component using the hook unmounts.
|
|
26
|
+
*
|
|
27
|
+
* Where the browser tells, the microphone's permission is read when the composer mounts and followed
|
|
28
|
+
* while it stays: a microphone blocked for the page shows as `refused` from the start, and one allowed
|
|
29
|
+
* meanwhile shows as `idle` again. Elsewhere the permission is learned when the user taps the mic.
|
|
30
|
+
*/
|
|
31
|
+
export declare const useVoiceRecording: ({ onLimitReached }: UseVoiceRecordingProps) => {
|
|
32
|
+
recording: AssistantRecording;
|
|
33
|
+
start: () => Promise<void>;
|
|
34
|
+
finish: () => Promise<Blob | null>;
|
|
35
|
+
cancel: () => void;
|
|
36
|
+
clear: () => void;
|
|
37
|
+
restore: (audio: Blob) => void;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e,useEffect as r,useRef as t,useState as n}from"react";import{canCaptureVoice as u,startVoiceCapture as l}from"./voice-capture.js";let c={status:"idle",elapsedMs:0,level:0},a=e=>({status:e,elapsedMs:0,level:0});export const useVoiceRecording=({onLimitReached:s})=>{let[i,d]=n(()=>u()?c:a("unavailable")),o=t(null),v=t(null),f=t(s),g=t(!0);f.current=s;let p="unavailable"!==i.status;r(()=>{if(!p)return;let e=null,r=()=>{let{state:r}=e??{};d(e=>"denied"===r&&"idle"===e.status?a("refused"):"granted"===r&&"refused"===e.status?c:e)};return g.current=!0,navigator.permissions?.query({name:"microphone"}).then(t=>{e=t,t.addEventListener("change",r),r()}).catch(()=>void 0),()=>{g.current=!1,e?.removeEventListener("change",r),o.current?.cancel(),o.current=null}},[p]),r(()=>{if("recording"!==i.status)return;let e=Date.now(),r=setInterval(()=>{let t=Date.now()-e,n=o.current;d(e=>n&&"recording"===e.status?{status:"recording",elapsedMs:t,level:n.readLevel()}:e),t>=12e4&&(clearInterval(r),f.current())},100);return()=>clearInterval(r)},[i.status]);let m=e(async()=>{if(!o.current){d(a("requesting"));try{let e=await l({onEnded:()=>{o.current=null,d(a("refused"))}});if(!g.current)return void e.cancel();o.current=e,v.current=null,d(a("recording"))}catch{d(a("refused"))}}},[]),h=e(async()=>{let e=o.current;return e&&(o.current=null,v.current=await e.stop(),d(a("recorded"))),v.current},[]),w=e(()=>{o.current?.cancel(),o.current=null,v.current=null,d(c)},[]);return{recording:i,start:m,finish:h,cancel:w,clear:e(()=>{v.current=null,o.current||d(c)},[]),restore:e(e=>{o.current||(v.current=e,d(a("recorded")))},[])}};
|