@salsita-ai/sdk 0.50.0-develop.b5d443db78 → 0.50.0-develop.b65a5a9c66
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 +13 -3
- package/dist/admin/common/admin-interface.js +1 -1
- package/dist/admin/ui/layout/UserProfile.d.ts +1 -1
- package/dist/admin/ui/layout/UserProfile.js +1 -1
- package/dist/admin/ui/maintenance/ImportPresets.js +1 -1
- package/dist/application/mount-application.js +1 -1
- package/dist/application/mount-configurator.js +1 -1
- package/dist/application/studio-embedding.d.ts +6 -0
- package/dist/application/studio-embedding.js +1 -0
- package/dist/application-spec/core/enhanced-json-schema.d.ts +5 -6
- package/dist/application-spec/core/enhanced-json-schema.js +1 -1
- package/dist/application-spec/core/markers/index.d.ts +1 -0
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/set-in-studio-marker.d.ts +15 -0
- package/dist/application-spec/core/markers/set-in-studio-marker.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +22 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +23 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +3 -3
- 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 -15
- 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 +5 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +4 -3
- package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +8 -6
- 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.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +19 -3
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- 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 +12 -13
- package/dist/application-spec/generate-application/code/templates/globals.js +21 -12
- 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/sign-in-page-options.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/sign-in-page-options.js +1 -0
- 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/custom-layout/sign-in.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.js +19 -0
- 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 +48 -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 +36 -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/session-fields.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.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 +2 -2
- 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 +8 -6
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -6
- package/dist/application-spec/generate-application/code/webhook-safe-files.d.ts +3 -1
- package/dist/application-spec/generate-application/code/webhook-safe-files.js +1 -1
- package/dist/application-spec/parse-application-files/access/access-handler-kinds.d.ts +18 -0
- package/dist/application-spec/parse-application-files/access/access-handler-kinds.js +1 -0
- package/dist/application-spec/parse-application-files/access/analyzed-file.d.ts +7 -0
- package/dist/application-spec/parse-application-files/access/check-access-handler-files.d.ts +20 -0
- package/dist/application-spec/parse-application-files/access/check-access-handler-files.js +1 -0
- package/dist/application-spec/parse-application-files/access/check-auth-hook-files.d.ts +17 -0
- package/dist/application-spec/parse-application-files/access/check-auth-hook-files.js +1 -0
- package/dist/application-spec/parse-application-files/access/index.d.ts +5 -0
- package/dist/application-spec/parse-application-files/access/index.js +1 -0
- package/dist/application-spec/parse-application-files/access/sign-in-control.d.ts +7 -0
- package/dist/application-spec/parse-application-files/access/sign-in-control.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +2 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +30 -4
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/webhook-safety.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +17 -1
- 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/merge/merged-spec.d.ts +7 -1
- package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/parse-common-admin-spec.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 +12 -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/application/configurator-spec/configurator-spec.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.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/index.d.ts +2 -1
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.d.ts +5 -2
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-fields/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.d.ts +15 -0
- package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.js +1 -0
- 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/authenticated-client.d.ts +5 -1
- package/dist/client/authenticated-client.js +1 -1
- package/dist/client/authorized-client.d.ts +4 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/base-client.d.ts +15 -1
- package/dist/client/base-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 +53 -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 +8470 -2127
- package/dist/client/unauthenticated-client.d.ts +1 -0
- 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-context.js +1 -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 +252 -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 +21 -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 +25 -64
- 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/clerk-sign-in.mdx +9 -5
- package/dist/docs/phoenix/configurator-interface.mdx +105 -10
- package/dist/docs/phoenix/data-sources.mdx +71 -51
- package/dist/docs/phoenix/deployments.mdx +3 -3
- package/dist/docs/phoenix/finalization.mdx +2 -2
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/integration/authentication-external.mdx +5 -5
- package/dist/docs/phoenix/integration/authentication-internal.mdx +3 -3
- package/dist/docs/phoenix/integration/finalization-internal.mdx +2 -5
- package/dist/docs/phoenix/integration/integration-modes-internal.mdx +9 -0
- 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 +100 -60
- package/dist/docs/phoenix/project-structure.mdx +30 -15
- package/dist/docs/phoenix/publishing.mdx +21 -28
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +61 -30
- package/dist/docs/phoenix/sessions-and-access.mdx +180 -153
- package/dist/docs/phoenix/sharing.mdx +1 -1
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhook-membership.mdx +4 -1
- package/dist/docs/phoenix/webhooks.mdx +449 -296
- 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/access/access-handlers.d.ts +19 -0
- package/dist/domain/application/access/access-handlers.js +1 -0
- package/dist/domain/application/access/anonymous-handler.d.ts +16 -0
- package/dist/domain/application/access/anonymous-handler.js +1 -0
- package/dist/domain/application/access/chunk-scopes-handler.d.ts +27 -0
- package/dist/domain/application/access/chunk-scopes-handler.js +1 -0
- package/dist/domain/application/access/code-handler.d.ts +16 -0
- package/dist/domain/application/access/code-handler.js +1 -0
- package/dist/domain/application/access/index.d.ts +7 -0
- package/dist/domain/application/access/index.js +1 -0
- package/dist/domain/application/access/refresh-handler.d.ts +16 -0
- package/dist/domain/application/access/refresh-handler.js +1 -0
- package/dist/domain/application/access/signed-in-handler.d.ts +44 -0
- package/dist/domain/application/access/signed-in-handler.js +1 -0
- package/dist/domain/application/access/visitor-handler.d.ts +23 -0
- package/dist/domain/application/access/visitor-handler.js +1 -0
- package/dist/domain/application/application-config.d.ts +37 -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 +47 -37
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/index.d.ts +2 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/standard-properties.d.ts +1 -1
- package/dist/domain/application/standard-properties.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 +8 -3
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/fit-session-data.d.ts +16 -0
- package/dist/domain/core/fit-session-data.js +1 -0
- 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/actions.d.ts +4 -0
- package/dist/domain/domain-runtime/domain-context/actions.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +9 -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 +6 -4
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +8 -4
- package/dist/domain/domain-runtime/domain-runtime.d.ts +27 -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 +13 -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 +13 -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/clerk/index.d.ts +6 -0
- package/dist/extras/cognito/AccountAvatar.d.ts +7 -0
- package/dist/extras/cognito/AccountAvatar.js +1 -0
- package/dist/extras/cognito/AccountControl.d.ts +13 -0
- package/dist/extras/cognito/AccountControl.js +1 -0
- package/dist/extras/cognito/AdminSignInPage.d.ts +26 -0
- package/dist/extras/cognito/AdminSignInPage.js +1 -0
- package/dist/extras/cognito/CognitoSignInPage.d.ts +8 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/ConfiguratorSignInPage.d.ts +19 -0
- package/dist/extras/cognito/ConfiguratorSignInPage.js +1 -0
- package/dist/extras/cognito/SignInFailurePage.d.ts +11 -0
- package/dist/extras/cognito/SignInFailurePage.js +1 -0
- package/dist/extras/cognito/SignInGateLayout.d.ts +25 -0
- package/dist/extras/cognito/SignInGateLayout.js +1 -0
- package/dist/extras/cognito/SignInNotice.d.ts +8 -0
- package/dist/extras/cognito/SignInNotice.js +1 -0
- package/dist/extras/cognito/index.d.ts +5 -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 +10 -2
- 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/deps/deps.js +2 -2
- 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 +2 -2
- 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/configuration-persist-system.d.ts +6 -0
- package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.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/host-properties/selectors.d.ts +2 -2
- package/dist/react-sdk/application-runtime/integration/integration-mode.d.ts +30 -0
- package/dist/react-sdk/application-runtime/integration/integration-mode.js +1 -1
- 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 +48 -18
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/session/actions.d.ts +2 -1
- package/dist/react-sdk/application-runtime/session/actions.js +1 -1
- package/dist/react-sdk/application-runtime/session/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/session/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/session/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-service.d.ts +34 -1
- package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-token.d.ts +8 -0
- package/dist/react-sdk/application-runtime/session/session-token.js +1 -1
- package/dist/react-sdk/application-runtime/session/types.d.ts +6 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -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/AccessDeniedAdminPage.d.ts +13 -0
- package/dist/react-sdk/session/AccessDeniedAdminPage.js +1 -0
- package/dist/react-sdk/session/AccessDeniedPage.d.ts +20 -0
- package/dist/react-sdk/session/AccessDeniedPage.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/react-sdk/session/index.d.ts +3 -0
- package/dist/react-sdk/session/index.js +1 -1
- package/dist/react-sdk/session/sign-in-address.d.ts +13 -0
- package/dist/react-sdk/session/sign-in-address.js +1 -0
- package/dist/react-sdk/session/studio-frame.d.ts +7 -0
- package/dist/react-sdk/session/studio-frame.js +1 -0
- package/dist/react-sdk/session/use-sign-in.d.ts +50 -0
- package/dist/react-sdk/session/use-sign-in.js +1 -0
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/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 +24 -1
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +14 -3
- package/dist/webhook/builders/webhook-builder.d.ts +18 -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/action-context.js → application-spec/parse-application-files/access/analyzed-file.js} +0 -0
- /package/dist/{domain/core/action → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type SignInAccount, type SignInOutcome } from '#package/domain';
|
|
2
|
+
/** How `SignIn.signIn` opens the Studio sign-in form. */
|
|
3
|
+
export interface SignInOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the form asks which account continues even though the person is signed in to Studio, as "Sign in with
|
|
6
|
+
* another account" needs. Without it Studio signs its own account back in without a form.
|
|
7
|
+
*/
|
|
8
|
+
readonly anotherAccount?: boolean | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface SignIn {
|
|
11
|
+
/**
|
|
12
|
+
* Where the latest Studio-account sign-in on this page stands: `idle` (none, or it completed), `signing-in`,
|
|
13
|
+
* `refused` (the account is not invited, or the project's signed-in handler refused it) or `failed` (it did not
|
|
14
|
+
* finish, see `failure`).
|
|
15
|
+
*/
|
|
16
|
+
readonly state: SignInOutcome['state'];
|
|
17
|
+
/** The person signed in now, null for a visitor. `name` is their Studio display name, null when they have none. */
|
|
18
|
+
readonly person: SignInAccount | null;
|
|
19
|
+
/** With `state: 'refused'`, the account that was refused, when the server named it. */
|
|
20
|
+
readonly refusedAccount: SignInAccount | null;
|
|
21
|
+
/**
|
|
22
|
+
* With `state: 'failed'`: `not-completed` when the person came back without being signed in, such as with a code
|
|
23
|
+
* that was already used or expired; `unavailable` when the server could not complete the sign-in right now and
|
|
24
|
+
* trying again may help. `message` is the technical detail.
|
|
25
|
+
*/
|
|
26
|
+
readonly failure: {
|
|
27
|
+
readonly reason: 'not-completed' | 'unavailable';
|
|
28
|
+
readonly message: string;
|
|
29
|
+
} | null;
|
|
30
|
+
/** Whether the person signed out on this page and has not signed in since; a sign-in page then waits for a click. */
|
|
31
|
+
readonly signedOut: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether sign-in elements stay hidden: in Studio's frame, where Studio shows the account, and where the
|
|
34
|
+
* configurator has no server to sign in with.
|
|
35
|
+
*/
|
|
36
|
+
readonly hidden: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Sends the person to the Studio sign-in form, after saving the configuration's latest change, and back to this
|
|
39
|
+
* address. After a sign-out or a refusal, or with `anotherAccount`, the form asks which account continues.
|
|
40
|
+
*/
|
|
41
|
+
readonly signIn: (options?: SignInOptions) => Promise<void>;
|
|
42
|
+
/** Ends this configurator's sign-in; where visitors may use the configurator, the person continues as one. */
|
|
43
|
+
readonly signOut: () => void;
|
|
44
|
+
}
|
|
45
|
+
export type UseSignIn = () => SignIn;
|
|
46
|
+
/**
|
|
47
|
+
* The Studio-account sign-in of the configurator or its admin: its outcome, the person signed in, and the actions a
|
|
48
|
+
* sign-in page or an account control needs.
|
|
49
|
+
*/
|
|
50
|
+
export declare const useSignIn: UseSignIn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e,useEffect as s,useMemo as t,useState as n}from"react";import{SessionRole as a}from"@salsita-ai/contracts/api";import{standardWebComponentProperties as o}from"#package/domain";import{ApplicationType as i,INTEGRATION_MODE_SETTINGS as r,useApplicationRuntime as l,useApplicationRuntimeSelector as d,useDomainApplicationProps as u,useOptionalApplicationType as m,useRawSession as c,useSessionService as g,useWebComponentPropertyValue as f}from"../application-runtime/index.js";import{signInAddress as p}from"./sign-in-address.js";export const useSignIn=()=>{let w=l(),y=g(),h=c(),P=d(w.selectors.session.getSignIn),{deploymentId:S,persistenceConfig:v}=u(),A=f(o.integrationMode),I=m(),L="server"===v.type?v.serverUrl:null,x=r[A].hideSignInElements||null===L,[E]=n(()=>y.hasLoggedOutFlag());s(()=>{let e=e=>{e.persisted&&y.cancelSignIn()};return window.addEventListener("pageshow",e),()=>window.removeEventListener("pageshow",e)},[y]);let j=e(async()=>{I!==i.Admin&&await Promise.race([Promise.resolve().then(()=>w.selectors.domainApplicationContext.configurator.getSystems().configurationPersistSystem.flush()).catch(()=>void 0),new Promise(e=>setTimeout(e,5e3))])},[I,w]),F=e(async e=>{if(x||null===L)return;let s=e?.anotherAccount===!0||y.hasLoggedOutFlag()||"refused"===P.state;y.startSignIn(),await j();let t=p({serverUrl:L,deploymentId:S,pageHref:window.location.href,selectAccount:s,admin:I===i.Admin});window.location.assign(t)},[x,L,y,P.state,j,S,I]),O=e(()=>{y.clearSession()},[y]),k=null===h.sessionPayload||h.sessionPayload.role===a.Anonymous;return t(()=>({state:P.state,person:k?null:(e=>{let s=e?.emailAddress;if("string"!=typeof s||""===s)return null;let t=e?.fullName;return{email:s,name:"string"==typeof t&&""!==t?t:null}})(h.sessionPayload?.data),refusedAccount:"refused"===P.state?P.account:null,failure:"failed"===P.state?{reason:P.reason,message:P.message}:null,signedOut:E,hidden:x,signIn:F,signOut:O}),[P,k,h.sessionPayload,E,x,F,O])};
|
|
@@ -7,6 +7,7 @@ declare const Slots: {
|
|
|
7
7
|
readonly Root: 'root';
|
|
8
8
|
readonly Body: 'body';
|
|
9
9
|
readonly Title: 'title';
|
|
10
|
+
readonly Description: 'description';
|
|
10
11
|
readonly Button: 'button';
|
|
11
12
|
};
|
|
12
13
|
type PreviewSlots = ValueOf<typeof Slots>;
|
|
@@ -50,8 +51,9 @@ export interface ThemeablePreviewProps extends OwnerState {
|
|
|
50
51
|
* Each slot maps to a structural part of the UI:
|
|
51
52
|
*
|
|
52
53
|
* - `root` — The outer container (`motion.div`).
|
|
53
|
-
* - `body` — The content area
|
|
54
|
+
* - `body` — The content area for the preview copy and start button (`motion.div`).
|
|
54
55
|
* - `title` — The heading element (MUI `Typography`).
|
|
56
|
+
* - `description` — The optional paragraph (MUI `Typography`).
|
|
55
57
|
* - `button` — The start configuring button (MUI `Button`).
|
|
56
58
|
*
|
|
57
59
|
* @default {}
|
|
@@ -67,6 +69,7 @@ export interface ThemeablePreviewProps extends OwnerState {
|
|
|
67
69
|
* animation props (`transition`, `layout`, `initial`, `animate`, etc.) in addition
|
|
68
70
|
* to standard HTML div attributes.
|
|
69
71
|
* - `title` — Props for the heading (`TypographyProps`).
|
|
72
|
+
* - `description` — Props for the optional paragraph (`TypographyProps`).
|
|
70
73
|
* - `button` — Props for the start button (`ButtonProps`).
|
|
71
74
|
*
|
|
72
75
|
* @default {}
|
|
@@ -75,6 +78,7 @@ export interface ThemeablePreviewProps extends OwnerState {
|
|
|
75
78
|
readonly [Slots.Root]: HTMLMotionProps<'div'>;
|
|
76
79
|
readonly [Slots.Body]: HTMLMotionProps<'div'>;
|
|
77
80
|
readonly [Slots.Title]: TypographyProps;
|
|
81
|
+
readonly [Slots.Description]: TypographyProps;
|
|
78
82
|
readonly [Slots.Button]: ButtonProps;
|
|
79
83
|
}>;
|
|
80
84
|
}
|
|
@@ -83,6 +87,10 @@ export interface PreviewProps extends ThemeablePreviewProps {
|
|
|
83
87
|
* The heading shown in the body.
|
|
84
88
|
*/
|
|
85
89
|
readonly title: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optional paragraph between the heading and the start button. Blank text is omitted.
|
|
92
|
+
*/
|
|
93
|
+
readonly description?: string;
|
|
86
94
|
/**
|
|
87
95
|
* The label of the start button.
|
|
88
96
|
*/
|
|
@@ -113,14 +121,14 @@ export interface PreviewProps extends ThemeablePreviewProps {
|
|
|
113
121
|
* when `true` the layout splits into a `scene | body` grid (vertical split on narrow
|
|
114
122
|
* widths, horizontal above the `compact` breakpoint), letting the configurator scene
|
|
115
123
|
* loaded behind show through the `scene` cell.
|
|
116
|
-
* - Renders a
|
|
117
|
-
* - Exposes `root` / `body` / `title` / `button` slots plus `containerRef` /
|
|
124
|
+
* - Renders a title, an optional description and a "start" button that invokes `onStart`.
|
|
125
|
+
* - Exposes `root` / `body` / `title` / `description` / `button` slots plus `containerRef` /
|
|
118
126
|
* `safeAreaRef` so smart wrappers can wire up animation and scene-safe-area
|
|
119
127
|
* measurement.
|
|
120
128
|
* - Integrates with MUI theming via the `PhxPreview` key.
|
|
121
129
|
*
|
|
122
130
|
* Typically wrapped by domain-aware components (`DesktopPreview`, `MobilePreview`) that
|
|
123
|
-
* resolve the
|
|
131
|
+
* resolve the preview copy, attach refs for scene safe-area measurement, and
|
|
124
132
|
* supply variant-specific animation via `slotProps.root`.
|
|
125
133
|
*
|
|
126
134
|
* @example
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as o,Typography as n,styled as r,useThemeProps as i}from"@mui/material";import{motion as a}from"motion/react";let d="PhxPreview",s={Root:r(a.div,{name:d,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t}})=>({display:"grid",gridTemplateAreas:`
|
|
2
2
|
'body body'
|
|
3
3
|
'body body'
|
|
4
4
|
`,gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",inset:0,position:"absolute",zIndex:1,...e.withScene&&{gridTemplateAreas:`
|
|
@@ -7,4 +7,4 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as n,Typography
|
|
|
7
7
|
`,[`@container app (width > ${t.values.md}px)`]:{gridTemplateAreas:`
|
|
8
8
|
'scene body'
|
|
9
9
|
'scene body'
|
|
10
|
-
`}}})),Body:r(
|
|
10
|
+
`}}})),Body:r(a.div,{name:d,slot:"body",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t,palette:o,spacing:n}})=>({alignContent:"center",alignItems:"center",background:o.background.scene,display:"grid",gap:n(3),gridArea:"body",justifyItems:"center",padding:n(3),textAlign:"center",zIndex:1,"@container app (width >= 560px)":{gap:n(4),paddingInline:n(5)},...e.withScene&&{alignContent:"start",[`@container app (width > ${t.values.md}px)`]:{alignContent:"center",background:"none",gap:n(4),justifyItems:"start",paddingInline:n(5),textAlign:"unset"}}})),Title:r(n,{name:d,slot:"title",shouldForwardProp:e=>"ownerState"!==e})(({theme:{palette:e,typography:t}})=>({...t.h5,color:e.text.primary,textWrap:"balance","@container app (width >= 560px)":{...t.h4}})),Description:r(n,{name:d,slot:"description",shouldForwardProp:e=>"ownerState"!==e})(({theme:e})=>({color:e.palette.text.secondary,overflowWrap:"anywhere"})),Button:r(o,{name:d,slot:"button",shouldForwardProp:e=>"ownerState"!==e})(()=>({}))},p=r("div")({gridArea:"1 / 1 / -1 / -1"}),l=r("div")(({ownerState:e,theme:{palette:t,spacing:o}})=>({gridArea:"1 / 1 / -1 / -1",inset:o(3),"@container app (width >= 560px)":{inset:o(5)},...e.withScene&&{gridArea:"scene",minBlockSize:80,position:"absolute"},"@container style(--inspect: on)":{border:`1px dashed ${t.info.light}`}}));export const Preview=o=>{let{buttonLabel:n,containerRef:r,description:a,onStart:c,safeAreaRef:m,slotProps:h={},slots:w={},title:g,withScene:u=!1}=i({props:o,name:d}),y=w.root??s.Root,b=w.body??s.Body,x=w.title??s.Title,S=w.description??s.Description,f=w.button??s.Button,v={withScene:u};return t(y,{...h.root,layout:!0,ownerState:v,children:[e(p,{ref:r}),e(l,{ref:m,ownerState:v}),t(b,{...h.body,ownerState:v,children:[e(x,{component:"h1",...h.title,ownerState:v,children:g}),a?.trim()&&e(S,{component:"p",...h.description,ownerState:v,children:a}),e(f,{variant:"contained",size:"large",...h.button,ownerState:v,onClick:c,children:n})]})]})};
|
|
@@ -31,7 +31,7 @@ declare module '@mui/material/styles' {
|
|
|
31
31
|
}
|
|
32
32
|
interface Components {
|
|
33
33
|
[MuiComponentName]?: {
|
|
34
|
-
defaultProps?: ComponentsPropsList[typeof MuiComponentName]
|
|
34
|
+
defaultProps?: Partial<ComponentsPropsList[typeof MuiComponentName]>;
|
|
35
35
|
styleOverrides?: ComponentsOverrides<Theme>[typeof MuiComponentName];
|
|
36
36
|
variants?: ComponentsVariants<Theme>[typeof MuiComponentName];
|
|
37
37
|
};
|
|
@@ -89,7 +89,8 @@ export interface SnackbarProps extends Readonly<CustomContentProps> {
|
|
|
89
89
|
*
|
|
90
90
|
* Available slot keys:
|
|
91
91
|
* - `content` — Props for the snackbar content wrapper.
|
|
92
|
-
* - `alert` — Props for the alert component (severity, variant, etc.).
|
|
92
|
+
* - `alert` — Props for the alert component (severity, variant, etc.). Its `iconMapping` and `icon` replace the
|
|
93
|
+
* snackbar's icons, including the success icon, which otherwise wins over the theme's `MuiAlert` `iconMapping`.
|
|
93
94
|
* - `actionButton` — Props for the button of `actionButton`.
|
|
94
95
|
*
|
|
95
96
|
* @default { alert: { variant: 'standard' } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as n,Fragment as a}from"react/jsx-runtime";import{Alert as r,Button as
|
|
1
|
+
import{jsx as t,jsxs as n,Fragment as a}from"react/jsx-runtime";import{Alert as r,Button as e,SvgIcon as i,styled as o,useTheme as c,useThemeProps as s}from"@mui/material";import{SnackbarContent as l}from"notistack";import{forwardRef as p,useId as u,useMemo as k}from"react";import{match as m}from"ts-pattern";export const notistackSnackbarClasses={container:"notistack-SnackbarContainer",snackbar:"notistack-Snackbar"};let f="PhxSnackbar",h={Content:o(l,{name:f,slot:"content"})({display:"block"}),Alert:o(r,{name:f,slot:"alert"})({userSelect:"none"}),ActionButton:o(e,{name:f,slot:"actionButton"})({})};export const SnackbarVariant={Default:"default",Info:"info",Success:"success",Warning:"warning",Error:"error"};let d=a=>{let r=`phx-snackbar-success-${u().replace(/[^\w-]/g,"")}`;return n(i,{"data-testid":"PhxSnackbarSuccessIcon",viewBox:"0 0 18 18",...a,children:[n("mask",{id:r,children:[t("rect",{width:"18",height:"18",fill:"white"}),t("path",{d:"m5 12.5 4.5 4.5L19 7.5",fill:"none",stroke:"black",strokeWidth:3,transform:"translate(3.5 3.5) scale(0.458333)"})]}),t("circle",{cx:"9",cy:"9",r:"9",mask:`url(#${r})`})]})};export const Snackbar=p((r,e)=>{let{action:i,actionButton:o,id:l,message:p,slotProps:u={alert:{variant:"standard"}},slots:b={},variant:S="info"}=s({props:r,name:f}),g=c(),x=b.content??h.Content,w=b.alert??h.Alert,B=b.actionButton??h.ActionButton,M=k(()=>{if(i)return"function"==typeof i?i(l):i},[i,l]),A=k(()=>void 0===o?M:n(a,{children:[M,t(B,{color:"inherit",size:"small",...u.actionButton,onClick:()=>{o.onClick(l)},children:o.label})]}),[B,o,l,M,u.actionButton]),C=k(()=>({...g.components?.MuiAlert?.defaultProps?.iconMapping,success:t(d,{fontSize:"inherit"}),...u.alert?.iconMapping}),[u.alert?.iconMapping,g.components?.MuiAlert?.defaultProps?.iconMapping]);return t(x,{...u.content,ref:e,children:t(w,{...u.alert,iconMapping:C,severity:m(S).with(SnackbarVariant.Error,()=>S).with(SnackbarVariant.Info,()=>S).with(SnackbarVariant.Success,()=>S).with(SnackbarVariant.Warning,()=>S).otherwise(()=>SnackbarVariant.Info),action:A,"aria-atomic":"true","aria-live":"polite",children:p})})});
|
|
@@ -4,6 +4,8 @@ export interface ToolbarPopperProps {
|
|
|
4
4
|
anchorEl: HTMLElement | null;
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
placement: PopperPlacementType;
|
|
7
|
+
/** Limit automatic placement to the space above or below the anchor within this element. */
|
|
8
|
+
verticalBoundary?: HTMLElement | null;
|
|
7
9
|
children?: ReactNode;
|
|
8
10
|
onClose: (event: Event) => void;
|
|
9
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ClickAwayListener as o,Grow as t,Paper as r,Popper as l,styled as n}from"@mui/material";import{detectOverflow as p}from"@popperjs/core";import{useCallback as a,useRef as i,useState as s}from"react";let m=n(l,{name:"PhxDesktopToolbarPopper",slot:"popper"})(()=>({zIndex:1})),c="--phx-toolbar-popper-available-height";export const ToolbarPopper=l=>{let{anchorEl:n,children:a,isOpen:i,onClose:s,placement:d,verticalBoundary:h}=l;return e(m,{modifiers:[{name:"offset",options:{offset:[0,16]}},...h?[{name:"flip",options:{boundary:h,allowedAutoPlacements:["top","bottom"]}},{name:"preventOverflow",options:{boundary:h}},{name:"availableHeight",enabled:!0,phase:"write",fn:({state:e})=>{let o=e.placement.startsWith("top")?"top":"bottom",t=p(e,{boundary:h}),r=Math.max(0,Math.floor(e.rects.popper.height-t[o]));e.elements.popper.style.setProperty(c,`${r}px`)},effect:({instance:e,state:o})=>{let t=new ResizeObserver(()=>void e.update());return t.observe(h),()=>{t.disconnect(),o.elements.popper.style.removeProperty(c)}}}]:[]],open:i,disablePortal:!0,transition:!0,anchorEl:n,role:void 0,placement:d,children:({TransitionProps:l,placement:n})=>e(t,{...l,style:{transformOrigin:"bottom"===n?"left top":"left bottom"},children:e(r,{children:e(o,{onClickAway:s,children:e("div",{children:a})})})})})};export const useToolbarPopper=()=>{let[e,o]=s(null),t=i(null);return{handleToggle:a(e=>{o(o=>o===e?null:e)},[]),handleClose:a(e=>{t.current?.contains(e.target)||o(null)},[]),ref:t,openedKey:e}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MouseEvent, ReactNode } from 'react';
|
|
1
|
+
import type { HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import type { ValueOf } from '@salsita-ai/common/utils';
|
|
3
3
|
import type { PhxIconName } from '../../icons/index.js';
|
|
4
4
|
/**
|
|
@@ -52,7 +52,9 @@ export interface ViewControlsItemEntry {
|
|
|
52
52
|
*/
|
|
53
53
|
export interface ViewControlsContextValue {
|
|
54
54
|
readonly variant: ViewControlsVariant;
|
|
55
|
+
readonly sizingLabelsByValue?: ReadonlyMap<string, readonly string[]>;
|
|
55
56
|
readonly activeValue: string | null;
|
|
57
|
+
readonly compactMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
|
|
56
58
|
readonly isMenuOpen: boolean;
|
|
57
59
|
readonly register: (value: string, entry: ViewControlsItemEntry) => () => void;
|
|
58
60
|
readonly openMenu: (event: MouseEvent<HTMLElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{ToggleButton as o,Tooltip as i,Typography as n,styled as r,useThemeProps as a}from"@mui/material";import{useCallback as s,useLayoutEffect as d,useMemo as l}from"react";import{match as m}from"ts-pattern";import{PhxIcon as p}from"../../icons/index.js";import{VariantKeys as c,useViewControlsContext as h}from"./ViewControlsContext.js";import{useIsRegisteredIcon as w}from"./useIsRegisteredIcon.js";let g="PhxViewControlsItem",u=r("span")({display:"grid","& > span":{gridArea:"1 / 1"},"& > [aria-hidden]":{visibility:"hidden"}}),f={Root:r(o,{name:g,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{shape:t,spacing:o,transitions:i}})=>({display:"grid",gap:o(1),gridTemplateColumns:m(e).with({isTrigger:!0,showIcon:!0,showLabel:!0},()=>"min-content 1fr min-content").with({isTrigger:!0,showIcon:!0,showLabel:!1},()=>"min-content min-content").with({isTrigger:!0,showIcon:!1,showLabel:!0},()=>"1fr min-content").with({isTrigger:!1,showIcon:!0},()=>"min-content 1fr").otherwise(()=>"1fr"),alignItems:"center",margin:0,minBlockSize:34,padding:`5px ${o(.5)}`,textTransform:"none",transitionDuration:`${i.duration.short}ms`,transitionProperty:"grid-template-columns",transitionTimingFunction:i.easing.easeOut,flexShrink:0,"&[class][class]":{border:0,borderRadius:t.borderRadius,margin:0},...e.isHidden&&{display:"none"}})),Icon:r(p,{name:g,slot:"icon",shouldForwardProp:e=>"ownerState"!==e})({fontSize:24}),Label:r(n,{name:g,slot:"label",shouldForwardProp:e=>"ownerState"!==e})({whiteSpace:"nowrap"}),Indicator:r(p,{name:g,slot:"indicator",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{transitions:t}})=>({fontSize:12,transition:t.create(["rotate"],{duration:t.duration.short}),...e.isMenuOpen&&{rotate:"-180deg"}})),Tooltip:r(i,{name:g,slot:"tooltip"})({})};export const ViewControlsItem=o=>{let{icon:i,label:n,onClick:r,slotProps:p={},slots:S={},value:I,...x}=a({props:o,name:g}),b=S.root??f.Root,T=S.icon??f.Icon,v=S.label??f.Label,C=S.indicator??f.Indicator,j=S.tooltip??f.Tooltip,{activeValue:y,compactMenuProps:P,isMenuOpen:F,openMenu:L,register:R,sizingLabelsByValue:k,variant:z}=h(),A=y===I,M=k?.get(I),O=w()(i),V=s(e=>{z!==c.Expanded&&A?L(e):r?.(e,I)},[A,r,L,I,z]),D=l(()=>({label:n,icon:O?i:void 0}),[n,i,O]);d(()=>R(I,D),[R,I,D]);let E=m({variant:z,isActive:A}).with({variant:c.Expanded},()=>"item").with({isActive:!0},()=>"trigger").otherwise(()=>"hidden"),$="trigger"===E||"menu"===x["aria-haspopup"],B="hidden"===E,H=z===c.Minimal,q=!B&&!($&&H&&O),G={isActive:A,isHidden:B,isMenuOpen:F||("trigger"===E?P:x)?.["aria-expanded"]===!0,isTrigger:$,showIcon:O,showLabel:q,variant:z},J=$&&H&&O?n:void 0;return e(j,{placement:"top",...p.tooltip,title:J,ownerState:G,children:t(b,{...p.root,...x,value:I,..."trigger"===E&&{selected:!1,...P},ownerState:G,"aria-hidden":B||void 0,onClick:V,children:[!B&&O&&e(T,{...p.icon,name:i,ownerState:G}),q&&e(v,{component:"span",variant:"caption",...p.label,ownerState:G,children:M?t(u,{children:[e("span",{children:n}),Array.from(new Set(M),t=>e("span",{"aria-hidden":"true",children:t},t))]}):n}),$&&e(C,{name:"CaretDown",...p.indicator,ownerState:G})]})})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentsOverrides, ComponentsVariants, MenuItemProps, MenuProps, ToggleButtonGroupProps } from '@mui/material';
|
|
2
|
-
import type { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { ElementType, HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
3
3
|
import type { ValueOf } from '@salsita-ai/common/utils';
|
|
4
4
|
declare const MuiComponentName: 'PhxViewControls';
|
|
5
5
|
declare module '@mui/material/styles' {
|
|
@@ -50,6 +50,11 @@ export interface ThemeableViewControlsRootProps {
|
|
|
50
50
|
}
|
|
51
51
|
export interface ViewControlsRootProps extends ThemeableViewControlsRootProps, Omit<ToggleButtonGroupProps, 'children'> {
|
|
52
52
|
readonly children: ReactNode;
|
|
53
|
+
/** Reserve space in each listed button for its widest possible label. */
|
|
54
|
+
readonly sizingLabelsByValue?: ReadonlyMap<string, readonly string[]>;
|
|
55
|
+
/** Supply the compact menu when the available choices have multiple levels. */
|
|
56
|
+
readonly compactMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
|
|
57
|
+
readonly onOpenMenu?: (event: MouseEvent<HTMLElement>) => void;
|
|
53
58
|
}
|
|
54
59
|
/**
|
|
55
60
|
* `ViewControls` — a responsive group of toggle buttons.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ListItemIcon as n,ListItemText as t,Menu as o,MenuItem as a,ToggleButtonGroup as i,menuClasses as l,styled as m,useTheme as u,useThemeProps as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ListItemIcon as n,ListItemText as t,Menu as o,MenuItem as a,ToggleButtonGroup as i,menuClasses as l,styled as m,useTheme as u,useThemeProps as d}from"@mui/material";import{useCallback as p,useEffect as c,useLayoutEffect as s,useMemo as h,useRef as x,useState as f}from"react";import{flushSync as w}from"react-dom";import{match as v}from"ts-pattern";import{useResizeObserver as y}from"usehooks-ts";import{attrf as S}from"../../common/index.js";import{PhxIcon as g}from"../../icons/index.js";import{VariantKeys as C,ViewControlsContext as M}from"./ViewControlsContext.js";let P="PhxViewControls",E={Root:m("div",{name:P,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e})=>({display:"flex",...e.variant===C.Expanded&&{justifyContent:"center"}})),Paper:m(i,{name:P,slot:"paper",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{palette:r,shape:n,shadows:t,spacing:o}})=>({background:r.background.paper,borderRadius:n.borderRadius,display:"inline-flex",flexWrap:"nowrap",gap:o(.5),maxInlineSize:"100%",minInlineSize:60,padding:o(.5),..."elevation"===e.paperVariant&&{boxShadow:t[e.elevation]},..."outlined"===e.paperVariant&&{border:`1px solid ${r.divider}`}})),Menu:m(o,{name:P,slot:"menu",shouldForwardProp:e=>"ownerState"!==e})(({theme:{spacing:e}})=>({[`.${l.paper}`]:{translate:`0 ${e(-2)}`}})),MenuItem:m(a,{name:P,slot:"menuItem",shouldForwardProp:e=>"ownerState"!==e})({})};export const ViewControlsRoot=o=>{let{children:a,compactMenuProps:i,onChange:l,onOpenMenu:m,sizingLabelsByValue:b,slotProps:I={},slots:j={},value:R,...z}=d({props:o,name:P}),{components:V}=u(),{elevation:k=1,variant:F="elevation"}=V?.MuiPaper?.defaultProps??{},O=j.root??E.Root,W=j.paper??E.Paper,$=j.menu??E.Menu,A=j.menuItem??E.MenuItem,[J,N]=f(C.Expanded),T=x({expanded:0,compact:0}),q=x(null),B=x(null),D=x(new Map),[G,H]=f(0),K=p((e,r)=>(D.current.set(e,r),H(e=>e+1),()=>{D.current.delete(e),H(e=>e+1)}),[]),[L,Q]=f(null),U=p(e=>{Q(e.currentTarget)},[]),X=p(()=>{Q(null)},[]),Y=p((e,r)=>{l?.(e,r),X()},[l,X]),Z=x(null),_=p(e=>{let r=q.current,n=B.current;if(!r||!n)return;if(null==Z.current)return void N(C.Expanded);let t=n.scrollWidth,o=r.clientWidth,a=t>o+2,i=()=>{N(e=>v(e).with(C.Expanded,e=>a?(T.current.expanded=t,C.Compact):e).with(C.Compact,e=>a?(T.current.compact=t,C.Minimal):o+2>=T.current.expanded?C.Expanded:e).with(C.Minimal,e=>o+2>=T.current.compact?C.Compact:e).exhaustive())};e.commitSynchronously?w(i):i()},[]),ee=b&&JSON.stringify(Array.from(b)),er=x(ee);s(()=>{er.current!==ee&&(er.current=ee,T.current={expanded:0,compact:0},J!==C.Expanded)?N(C.Expanded):void 0!==ee&&_({commitSynchronously:!1})},[ee,J,_]),y({ref:q,onResize:()=>{_({commitSynchronously:!0})}}),y({ref:B,onResize:()=>{_({commitSynchronously:!0})}});let en="string"==typeof R?R:null,et=x(null);c(()=>{let e=null==et.current,r=null==en;et.current=en,Z.current=en,e!==r&&_({commitSynchronously:!1})},[en,_]);let eo=null!==L,ea=h(()=>({activeValue:en,dispatchChange:Y,isMenuOpen:eo,compactMenuProps:i,openMenu:m??U,register:K,sizingLabelsByValue:b,variant:J}),[en,i,Y,eo,m,U,K,b,J]),ei=h(()=>Array.from(D.current.entries()),[G]),el={variant:J,elevation:k,paperVariant:F};return e(M.Provider,{value:ea,children:r(O,{ref:q,...I.root,"data-view-controls":S({variant:{[J]:!0}}),ownerState:el,children:[e(W,{...I.paper,...z,ref:B,exclusive:!0,value:R,ownerState:el,onChange:l,children:a}),e($,{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},...I.menu,anchorEl:L,open:null!==L&&J!==C.Expanded,onClose:X,children:ei.map(([o,a])=>r(A,{...I.menuItem,selected:o===en,onClick:e=>{Y(e,o)},children:[a.icon&&e(n,{children:e(g,{name:a.icon})}),e(t,{children:a.label})]},o))})]})})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{SvgIcon as a}from"@mui/material";export default(t=>r(a,{...t,children:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:r("path",{d:"M128 176a48.05 48.05 0 0 0 48-48V64a48 48 0 0 0-96 0v64a48.05 48.05 0 0 0 48 48M96 64a32 32 0 0 1 64 0v64a32 32 0 0 1-64 0Zm40 143.6V240a8 8 0 0 1-16 0v-32.4A80.11 80.11 0 0 1 48 128a8 8 0 0 1 16 0 64 64 0 0 0 128 0 8 8 0 0 1 16 0 80.11 80.11 0 0 1-72 79.6"})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{SvgIcon as r}from"@mui/material";export default(l=>a(r,{...l,children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:a("path",{d:"m213.92 218.62-160-176a8 8 0 0 0-11.84 10.76L80 95.09V128a48 48 0 0 0 69.11 43.12l11.1 12.2A63.4 63.4 0 0 1 128 192a64.07 64.07 0 0 1-64-64 8 8 0 0 0-16 0 80.11 80.11 0 0 0 72 79.6V240a8 8 0 0 0 16 0v-32.41a78.8 78.8 0 0 0 35.16-12.22l30.92 34a8 8 0 1 0 11.84-10.76ZM128 160a32 32 0 0 1-32-32v-15.31l41.66 45.82A32 32 0 0 1 128 160m57.52-3.91A63.3 63.3 0 0 0 192 128a8 8 0 0 1 16 0 79.16 79.16 0 0 1-8.11 35.12 8 8 0 0 1-7.19 4.49 7.9 7.9 0 0 1-3.51-.82 8 8 0 0 1-3.67-10.7M84 44.87A48 48 0 0 1 176 64v64a49 49 0 0 1-.26 5 8 8 0 0 1-8 7.17 8 8 0 0 1-.84 0 8 8 0 0 1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64a32 32 0 0 0-61.31-12.75A8 8 0 1 1 84 44.87"})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{SvgIcon as a}from"@mui/material";export default(t=>r(a,{...t,children:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:r("path",{d:"M155.51 24.81a8 8 0 0 0-8.42.88L77.25 80H32a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h45.25l69.84 54.31A8 8 0 0 0 160 224V32a8 8 0 0 0-4.49-7.19M32 96h40v64H32Zm112 111.64-56-43.55V91.91l56-43.55Zm54-106.08a40 40 0 0 1 0 52.88 8 8 0 0 1-12-10.58 24 24 0 0 0 0-31.72 8 8 0 0 1 12-10.58M248 128a79.9 79.9 0 0 1-20.37 53.34 8 8 0 0 1-11.92-10.67 64 64 0 0 0 0-85.33 8 8 0 1 1 11.92-10.67A79.83 79.83 0 0 1 248 128"})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{SvgIcon as r}from"@mui/material";export default(l=>a(r,{...l,children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:a("path",{d:"M53.92 34.62a8 8 0 1 0-11.84 10.76L73.55 80H32a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h45.25l69.84 54.31A8 8 0 0 0 160 224v-48.91l42.08 46.29a8 8 0 1 0 11.84-10.76ZM32 96h40v64H32Zm112 111.64-56-43.55v-68.2l56 61.6Zm42-63.77a24 24 0 0 0 0-31.72 8 8 0 1 1 12-10.57 40 40 0 0 1 0 52.88 8 8 0 0 1-12-10.59m-80.16-76a8 8 0 0 1 1.4-11.23l39.85-31A8 8 0 0 1 160 32v74.83a8 8 0 0 1-16 0V48.36l-26.94 21a8 8 0 0 1-11.22-1.45ZM248 128a79.9 79.9 0 0 1-20.37 53.34 8 8 0 0 1-11.92-10.67 64 64 0 0 0 0-85.33 8 8 0 1 1 11.92-10.67A79.83 79.83 0 0 1 248 128"})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{SvgIcon as t}from"@mui/material";export default(a=>r(t,{...a,children:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 256 256",children:r("path",{d:"M200 40H56a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 160H56V56h144z"})})}));
|
|
@@ -69,6 +69,8 @@ import ListChecks from './ListChecks.js';
|
|
|
69
69
|
import Lock from './Lock.js';
|
|
70
70
|
import MagicWand from './MagicWand.js';
|
|
71
71
|
import MagnifyingGlassBold from './MagnifyingGlassBold.js';
|
|
72
|
+
import Microphone from './Microphone.js';
|
|
73
|
+
import MicrophoneSlash from './MicrophoneSlash.js';
|
|
72
74
|
import NavigationArrow from './NavigationArrow.js';
|
|
73
75
|
import PaintBrush from './PaintBrush.js';
|
|
74
76
|
import Palette from './Palette.js';
|
|
@@ -96,6 +98,9 @@ import SignOut from './SignOut.js';
|
|
|
96
98
|
import SignOutBold from './SignOutBold.js';
|
|
97
99
|
import SlidersBold from './SlidersBold.js';
|
|
98
100
|
import SlidersHorizontal from './SlidersHorizontal.js';
|
|
101
|
+
import SpeakerHigh from './SpeakerHigh.js';
|
|
102
|
+
import SpeakerSlash from './SpeakerSlash.js';
|
|
103
|
+
import Stop from './Stop.js';
|
|
99
104
|
import SubsetOfRaw from './SubsetOfRaw.js';
|
|
100
105
|
import TagBold from './TagBold.js';
|
|
101
106
|
import Trash from './Trash.js';
|
|
@@ -181,6 +186,8 @@ export declare const Icon: {
|
|
|
181
186
|
readonly Lock: typeof Lock;
|
|
182
187
|
readonly MagicWand: typeof MagicWand;
|
|
183
188
|
readonly MagnifyingGlassBold: typeof MagnifyingGlassBold;
|
|
189
|
+
readonly Microphone: typeof Microphone;
|
|
190
|
+
readonly MicrophoneSlash: typeof MicrophoneSlash;
|
|
184
191
|
readonly NavigationArrow: typeof NavigationArrow;
|
|
185
192
|
readonly PaintBrush: typeof PaintBrush;
|
|
186
193
|
readonly Palette: typeof Palette;
|
|
@@ -208,6 +215,9 @@ export declare const Icon: {
|
|
|
208
215
|
readonly SignOutBold: typeof SignOutBold;
|
|
209
216
|
readonly SlidersBold: typeof SlidersBold;
|
|
210
217
|
readonly SlidersHorizontal: typeof SlidersHorizontal;
|
|
218
|
+
readonly SpeakerHigh: typeof SpeakerHigh;
|
|
219
|
+
readonly SpeakerSlash: typeof SpeakerSlash;
|
|
220
|
+
readonly Stop: typeof Stop;
|
|
211
221
|
readonly SubsetOfRaw: typeof SubsetOfRaw;
|
|
212
222
|
readonly TagBold: typeof TagBold;
|
|
213
223
|
readonly Trash: typeof Trash;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./Alarm.js";import r from"./ArrowClockwise.js";import m from"./ArrowCounterClockwise.js";import i from"./ArrowLeft.js";import t from"./ArrowRight.js";import s from"./ArrowRightBold.js";import p from"./ArrowsHorizontal.js";import f from"./ArrowsIn.js";import j from"./ArrowsOut.js";import e from"./ArrowsOutCardinal.js";import l from"./Basketball.js";import a from"./BoundingBox.js";import n from"./BracketsCurly.js";import u from"./BuildingBold.js";import C from"./CameraRotate.js";import d from"./CaretDown.js";import B from"./CaretLeft.js";import c from"./CaretLeftBold.js";import g from"./CaretRight.js";import h from"./CaretRightBold.js";import
|
|
1
|
+
import o from"./Alarm.js";import r from"./ArrowClockwise.js";import m from"./ArrowCounterClockwise.js";import i from"./ArrowLeft.js";import t from"./ArrowRight.js";import s from"./ArrowRightBold.js";import p from"./ArrowsHorizontal.js";import f from"./ArrowsIn.js";import j from"./ArrowsOut.js";import e from"./ArrowsOutCardinal.js";import l from"./Basketball.js";import a from"./BoundingBox.js";import n from"./BracketsCurly.js";import u from"./BuildingBold.js";import C from"./CameraRotate.js";import d from"./CaretDown.js";import B from"./CaretLeft.js";import c from"./CaretLeftBold.js";import g from"./CaretRight.js";import h from"./CaretRightBold.js";import S from"./ChatCircleText.js";import P from"./Check.js";import A from"./CheckCircle.js";import w from"./CheckCircleDuotone.js";import k from"./Circle.js";import D from"./Cloud.js";import L from"./CloudArrowUp.js";import M from"./CopySimpleBold.js";import y from"./Cube.js";import F from"./CubeDuotone.js";import R from"./CurrencyDollar.js";import T from"./CurrencyEur.js";import I from"./CursorClick.js";import b from"./CustomAiAssistant.js";import x from"./CustomAiAssistantBold.js";import O from"./CustomAr.js";import W from"./CustomBigAiAssistant.js";import H from"./CustomMeasureCm.js";import E from"./CustomMeasureFt.js";import G from"./CustomMeasureIn.js";import U from"./CustomMeasureM.js";import V from"./CustomMeasureMm.js";import X from"./DotsSixVerticalBold.js";import v from"./DotsThreeVertical.js";import z from"./DotsThreeVerticalBold.js";import Q from"./Export.js";import q from"./EyeBold.js";import K from"./EyeClosedBold.js";import N from"./FileArrowUp.js";import J from"./FilePlus.js";import Y from"./FileText.js";import Z from"./FireBold.js";import $ from"./Flame.js";import _ from"./FolderOpen.js";import oo from"./FolderStarBold.js";import or from"./Gear.js";import om from"./GridFour.js";import oi from"./HardDrives.js";import ot from"./House.js";import os from"./Image.js";import op from"./ImageSquareBold.js";import of from"./Info.js";import oj from"./InfoBold.js";import oe from"./Key.js";import ol from"./Lightbulb.js";import oa from"./List.js";import on from"./ListBullets.js";import ou from"./ListChecks.js";import oC from"./Lock.js";import od from"./MagicWand.js";import oB from"./MagnifyingGlassBold.js";import oc from"./Microphone.js";import og from"./MicrophoneSlash.js";import oh from"./NavigationArrow.js";import oS from"./PaintBrush.js";import oP from"./Palette.js";import oA from"./PaletteBold.js";import ow from"./PaperPlaneRightBold.js";import ok from"./PaperPlaneTilt.js";import oD from"./Paperclip.js";import oL from"./PauseBold.js";import oM from"./PencilSimpleBold.js";import oy from"./PencilSimpleLine.js";import oF from"./PlayBold.js";import oR from"./Plus.js";import oT from"./PlusBold.js";import oI from"./PlusCircle.js";import ob from"./PlusCircleBold.js";import ox from"./PushPin.js";import oO from"./PushPinSlash.js";import oW from"./Question.js";import oH from"./QuestionDuotone.js";import oE from"./RocketLaunchBold.js";import oG from"./SalsitaLogo.js";import oU from"./Scan.js";import oV from"./ShoppingCartSimple.js";import oX from"./SignOut.js";import ov from"./SignOutBold.js";import oz from"./SlidersBold.js";import oQ from"./SlidersHorizontal.js";import oq from"./SpeakerHigh.js";import oK from"./SpeakerSlash.js";import oN from"./Stop.js";import oJ from"./SubsetOfRaw.js";import oY from"./TagBold.js";import oZ from"./Trash.js";import o$ from"./TrashSimpleBold.js";import o_ from"./UsersBold.js";import o0 from"./Warning.js";import o1 from"./WarningCircle.js";import o2 from"./WarningCircleBold.js";import o3 from"./WarningCircleDuotone.js";import o4 from"./WarningDuotone.js";import o5 from"./X.js";import o6 from"./XBold.js";import o7 from"./XCircle.js";export const Icon={Alarm:o,ArrowClockwise:r,ArrowCounterClockwise:m,ArrowLeft:i,ArrowRight:t,ArrowRightBold:s,ArrowsHorizontal:p,ArrowsIn:f,ArrowsOut:j,ArrowsOutCardinal:e,Basketball:l,BoundingBox:a,BracketsCurly:n,BuildingBold:u,CameraRotate:C,CaretDown:d,CaretLeft:B,CaretLeftBold:c,CaretRight:g,CaretRightBold:h,ChatCircleText:S,Check:P,CheckCircle:A,CheckCircleDuotone:w,Circle:k,Cloud:D,CloudArrowUp:L,CopySimpleBold:M,Cube:y,CubeDuotone:F,CurrencyDollar:R,CurrencyEur:T,CursorClick:I,CustomAiAssistant:b,CustomAiAssistantBold:x,CustomAr:O,CustomBigAiAssistant:W,CustomMeasureCm:H,CustomMeasureFt:E,CustomMeasureIn:G,CustomMeasureM:U,CustomMeasureMm:V,DotsSixVerticalBold:X,DotsThreeVertical:v,DotsThreeVerticalBold:z,Export:Q,EyeBold:q,EyeClosedBold:K,FileArrowUp:N,FilePlus:J,FileText:Y,FireBold:Z,Flame:$,FolderOpen:_,FolderStarBold:oo,Gear:or,GridFour:om,HardDrives:oi,House:ot,Image:os,ImageSquareBold:op,Info:of,InfoBold:oj,Key:oe,Lightbulb:ol,List:oa,ListBullets:on,ListChecks:ou,Lock:oC,MagicWand:od,MagnifyingGlassBold:oB,Microphone:oc,MicrophoneSlash:og,NavigationArrow:oh,PaintBrush:oS,Palette:oP,PaletteBold:oA,PaperPlaneRightBold:ow,PaperPlaneTilt:ok,Paperclip:oD,PauseBold:oL,PencilSimpleBold:oM,PencilSimpleLine:oy,PlayBold:oF,Plus:oR,PlusBold:oT,PlusCircle:oI,PlusCircleBold:ob,PushPin:ox,PushPinSlash:oO,Question:oW,QuestionDuotone:oH,RocketLaunchBold:oE,SalsitaLogo:oG,Scan:oU,ShoppingCartSimple:oV,SignOut:oX,SignOutBold:ov,SlidersBold:oz,SlidersHorizontal:oQ,SpeakerHigh:oq,SpeakerSlash:oK,Stop:oN,SubsetOfRaw:oJ,TagBold:oY,Trash:oZ,TrashSimpleBold:o$,UsersBold:o_,Warning:o0,WarningCircle:o1,WarningCircleBold:o2,WarningCircleDuotone:o3,WarningDuotone:o4,X:o5,XBold:o6,XCircle:o7};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CustomIcons=["custom-ai-assistant","custom-ai-assistant-bold","custom-ar","custom-big-ai-assistant","custom-measure-cm","custom-measure-ft","custom-measure-in","custom-measure-m","custom-measure-mm","SalsitaLogo","subset-of-raw"];export const PhosphorIcons={bold:["arrow-right","building","caret-left","caret-right","copy-simple","dots-six-vertical","dots-three-vertical","eye-closed","eye","fire","folder-star","image-square","info","magnifying-glass","palette","paper-plane-right","pause","pencil-simple","play","plus","plus-circle","rocket-launch","sign-out","sliders","tag","trash-simple","users","warning-circle","x"],duotone:["check-circle","cube","question","warning-circle","warning"],regular:["alarm","arrow-clockwise","arrow-counter-clockwise","arrow-left","arrow-left","arrow-right","arrows-horizontal","arrows-in","arrows-out","arrows-out-cardinal","basketball","bounding-box","brackets-curly","camera-rotate","caret-down","caret-left","caret-right","check","check-circle","chat-circle-text","circle","cloud","cloud-arrow-up","cube","currency-dollar","currency-eur","cursor-click","dots-three-vertical","export","file-arrow-up","file-plus","file-text","flame","gear","folder-open","grid-four","hard-drives","house","image","info","key","lightbulb","list","list-bullets","list-checks","lock","magic-wand","navigation-arrow","paint-brush","palette","paperclip","paper-plane-tilt","pencil-simple-line","plus","plus-circle","push-pin","push-pin-slash","question","scan","shopping-cart-simple","sign-out","sliders-horizontal","trash","warning","warning-circle","x","x-circle"]};
|
|
1
|
+
export const CustomIcons=["custom-ai-assistant","custom-ai-assistant-bold","custom-ar","custom-big-ai-assistant","custom-measure-cm","custom-measure-ft","custom-measure-in","custom-measure-m","custom-measure-mm","SalsitaLogo","subset-of-raw"];export const PhosphorIcons={bold:["arrow-right","building","caret-left","caret-right","copy-simple","dots-six-vertical","dots-three-vertical","eye-closed","eye","fire","folder-star","image-square","info","magnifying-glass","palette","paper-plane-right","pause","pencil-simple","play","plus","plus-circle","rocket-launch","sign-out","sliders","tag","trash-simple","users","warning-circle","x"],duotone:["check-circle","cube","question","warning-circle","warning"],regular:["alarm","arrow-clockwise","arrow-counter-clockwise","arrow-left","arrow-left","arrow-right","arrows-horizontal","arrows-in","arrows-out","arrows-out-cardinal","basketball","bounding-box","brackets-curly","camera-rotate","caret-down","caret-left","caret-right","check","check-circle","chat-circle-text","circle","cloud","cloud-arrow-up","cube","currency-dollar","currency-eur","cursor-click","dots-three-vertical","export","file-arrow-up","file-plus","file-text","flame","gear","folder-open","grid-four","hard-drives","house","image","info","key","lightbulb","list","list-bullets","list-checks","lock","magic-wand","microphone","microphone-slash","navigation-arrow","paint-brush","palette","paperclip","paper-plane-tilt","pencil-simple-line","plus","plus-circle","push-pin","push-pin-slash","question","scan","shopping-cart-simple","sign-out","sliders-horizontal","speaker-high","speaker-slash","stop","trash","warning","warning-circle","x","x-circle"]};
|
|
@@ -44,7 +44,6 @@ declare module '@mui/material/styles' {
|
|
|
44
44
|
PhxChat: 'root';
|
|
45
45
|
PhxChatFooter: 'root' | 'formLayout' | 'input';
|
|
46
46
|
PhxChatMessage: 'base' | 'assistant' | 'user' | 'widget' | 'error' | 'helper';
|
|
47
|
-
PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'messageImages' | 'messageImage' | 'assistantMessage' | 'alert' | 'entityLink' | 'referenceLink' | 'referenceDetails' | 'image' | 'screenshotsLink' | 'screenshots' | 'form' | 'formGroup' | 'formGroupLabel' | 'formOptions' | 'formOptionsLabel' | 'formOptionsRow' | 'formReply' | 'formCard' | 'formCardImage' | 'formCardLabel' | 'formCardDescription' | 'formCardCheck' | 'formSwatch' | 'formSwatchImage' | 'formSwatchCheck' | 'formText' | 'formTextInput' | 'formNumber' | 'formConfirm' | 'formConfirmButtons' | 'formConfirmButton' | 'formSubmit' | 'formNote' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'undoButton' | 'status' | 'separator' | 'earlierButton' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'attachButton' | 'attachments' | 'attachment' | 'removeAttachment' | 'input' | 'sendButton' | 'stopButton' | 'hint' | 'attachmentNotice';
|
|
48
47
|
PhxExportingOverlay: 'root' | 'message';
|
|
49
48
|
PhxTopNavigation: 'root' | 'stepper' | 'step';
|
|
50
49
|
PhxListSelector: 'root';
|
|
@@ -111,9 +110,6 @@ declare module '@mui/material/styles' {
|
|
|
111
110
|
PhxChatMessage?: {
|
|
112
111
|
styleOverrides?: ComponentsOverrides<Theme>['PhxChatMessage'];
|
|
113
112
|
};
|
|
114
|
-
PhxAssistantPanel?: {
|
|
115
|
-
styleOverrides?: ComponentsOverrides<Theme>['PhxAssistantPanel'];
|
|
116
|
-
};
|
|
117
113
|
PhxExportingOverlay?: {
|
|
118
114
|
styleOverrides?: ComponentsOverrides<Theme>['PhxExportingOverlay'];
|
|
119
115
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { APIGatewayProxyEventV2 } from 'aws-lambda';
|
|
2
2
|
import type { Logger } from '@salsita-ai/common/utils';
|
|
3
|
-
import {
|
|
3
|
+
import { SessionRole } from '@salsita-ai/contracts/api';
|
|
4
4
|
import { type AnonymousPayload, type AuthHandlerResponse, type CodePayload, type RefreshPayload } from '@salsita-ai/contracts/webhook';
|
|
5
5
|
import type { $DomainEntity, DomainEntity } from '#package/domain';
|
|
6
6
|
import { type BuilderDomainContext } from './common.js';
|
|
@@ -8,11 +8,16 @@ export interface AuthHandlerContext {
|
|
|
8
8
|
logger: Logger;
|
|
9
9
|
}
|
|
10
10
|
export type AuthHandler<SESSION_DATA extends Record<string, unknown>> = (body: unknown, ctx: AuthHandlerContext, e: APIGatewayProxyEventV2) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
11
|
+
/** How long the signed-in handler has to answer before the sign-in fails with a try-again message. */
|
|
12
|
+
export declare const SIGNED_IN_HANDLER_TIMEOUT_MS = 10000;
|
|
11
13
|
export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
|
|
12
14
|
private readonly _context;
|
|
13
15
|
private readonly _handlers?;
|
|
14
16
|
private readonly _clerkTokenService?;
|
|
15
17
|
constructor(_context: BuilderDomainContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>, _handlers?: {
|
|
18
|
+
/** Set on the hook the SDK builds for the access mode when the project registers none of its own. */
|
|
19
|
+
builtIn?: boolean;
|
|
20
|
+
cognito?: boolean;
|
|
16
21
|
onClerkCode?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
17
22
|
onClerkSession?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
18
23
|
onClerkRefresh?: (data: RefreshPayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
@@ -26,13 +31,31 @@ export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> =
|
|
|
26
31
|
} | undefined);
|
|
27
32
|
private _isClerkIdToken;
|
|
28
33
|
private _isClerkRefreshToken;
|
|
34
|
+
/** The access handler files of the project, which customise whatever the builder does not handle itself. */
|
|
35
|
+
private _accessHandlers;
|
|
36
|
+
/**
|
|
37
|
+
* A visitor of Public or Public with sign-in: always let in as an anonymous session, with the data the project's
|
|
38
|
+
* visitor handler adds, if it has one.
|
|
39
|
+
*/
|
|
40
|
+
private _handleVisitor;
|
|
41
|
+
/**
|
|
42
|
+
* A person the server signed in with a Studio account: the identity, role and values set in Studio the server
|
|
43
|
+
* resolved, with what the project's signed-in handler adds, if it has one. The handler may refuse the person; a throw
|
|
44
|
+
* or no answer within ten seconds fails the sign-in, which never falls back to letting the person in.
|
|
45
|
+
*/
|
|
46
|
+
private _handleSignedIn;
|
|
29
47
|
private handleAnonymous;
|
|
30
48
|
private handleCode;
|
|
31
49
|
private handleRefresh;
|
|
50
|
+
/** Enables shared-pool identities resolved and authorized by the Phoenix server. */
|
|
51
|
+
withCognitoHandlers(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
32
52
|
withCodeHandler(handler: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
53
|
+
/** Legacy: one of the built-in Clerk handlers `access: legacy-clerk` signs people in with. Its behaviour is kept as it is. */
|
|
33
54
|
withClerkCodeHandler(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
55
|
+
/** Legacy: one of the built-in Clerk handlers `access: legacy-clerk` signs people in with. Its behaviour is kept as it is. */
|
|
34
56
|
withClerkSessionHandler(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
35
57
|
withRefreshHandler(handler: (data: RefreshPayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
58
|
+
/** Legacy: one of the built-in Clerk handlers `access: legacy-clerk` signs people in with. Its behaviour is kept as it is. */
|
|
36
59
|
withClerkRefreshHandler(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
37
60
|
withAnonymousHandler(handler: (data: AnonymousPayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
38
61
|
withPublishedChunkScopes(resolver: (params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{match as e}from"ts-pattern";import{ClerkTokenService as
|
|
1
|
+
import{match as e}from"ts-pattern";import{SessionRole as r}from"@salsita-ai/contracts/api";import{ClerkTokenService as s,isClerkSessionToken as o}from"@salsita-ai/contracts/clerk";import{AccessMode as n,isStudioAccountMode as t}from"@salsita-ai/contracts/domain";import{AuthPayload as i}from"@salsita-ai/contracts/webhook";import{SYSTEM_CHUNK_SCOPE as a}from"#package/domain";import{createClerkAuthCodeHandler as l}from"./clerk-auth-handlers/clerk-code-handler.js";import{createClerkRefreshHandler as h}from"./clerk-auth-handlers/clerk-refresh-handler.js";import{createClerkSessionHandler as d}from"./clerk-auth-handlers/clerk-session-handler.js";export const SIGNED_IN_HANDLER_TIMEOUT_MS=1e4;let c=async(e,r)=>{let s;try{return await Promise.race([e,new Promise((e,o)=>{s=setTimeout(()=>o(Error(`It did not answer within ${r} ms.`)),r)})])}finally{clearTimeout(s)}};export class AuthHandlerBuilder{_context;_handlers;_clerkTokenService;constructor(e,r){this._context=e,this._handlers=r,e.clerk&&(this._clerkTokenService=new s(e.clerk.apiKey))}_isClerkIdToken(e){let r;if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{r=this._clerkTokenService.parseIdToken(e)}catch(e){return!1}return r.iss.replace(/\/$/,"")===this._context.clerk?.oauthProviderBaseUrl.replace(/\/$/,"")}_isClerkRefreshToken(e){if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{this._clerkTokenService.parseRefreshToken(e)}catch(e){return!1}return!0}_accessHandlers(){return this._context.configuratorBuilder.buildWebhookContext().accessHandlers}async _handleVisitor(e){let s=this._context.configuratorBuilder.buildWebhookContext(),o=s.config.domain.domainFactory.parseSessionData({}),n=s.accessHandlers.visitor;return e.logger.debug(n?"Anonymous flow, visitor handler.":"Anonymous flow, built-in visitor handler."),{response:{success:!0,role:r.Anonymous,data:n?(await n({data:o})).data:o},userIdSource:"custom"}}async _handleSignedIn(e,r){let s,o=this._context.configuratorBuilder.buildWebhookContext(),{domainFactory:n}=o.config.domain,t=n.parseSessionData(e.data),i=o.accessHandlers.signedIn,a=r=>({response:{success:!0,data:r,role:e.role,userId:e.userId,expirationTime:e.expirationTime},userIdSource:"phoenix"});if(!i)return a(t);r.logger.debug("Studio-account sign-in, signed-in handler.");try{s=await c(i({user:{id:e.data.id,email:e.data.emailAddress,name:e.data.fullName},role:e.role,data:t}),1e4)}catch(e){return r.logger.error("The signed-in handler failed, so the sign-in is refused with a try-again message.",{},e instanceof Error?e:Error(String(e))),{response:{success:!1,reason:"handler-failed"},userIdSource:"phoenix"}}let l=s,h=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);if(h(l)&&!1===l.allow)return r.logger.debug("Studio-account sign-in refused by the signed-in handler."),{response:{success:!1,reason:"refused"},userIdSource:"phoenix"};if(!h(l)||!h(l.data))return r.logger.error("The signed-in handler answered neither { data } nor { allow: false }, so the sign-in is refused with a try-again message."),{response:{success:!1,reason:"handler-failed"},userIdSource:"phoenix"};let{data:d,dropped:u}=n.fitSessionData(t,l.data);return u.length>0&&r.logger.warn(`The signed-in handler returned session data that does not fit the sessionData schema, so it was left out: ${u.join(", ")}.`,{dropped:u}),a(d)}async handleAnonymous(e,r){if(this._handlers?.onAnonymous)return r.logger.debug("Anonymous flow."),{response:await this._handlers.onAnonymous(e,r),userIdSource:"custom"};let s=this._accessHandlers().anonymous;if(s)return r.logger.debug("Anonymous flow, anonymous handler."),{response:await s(e),userIdSource:"custom"};if(this._context.access===n.Public||this._context.access===n.PublicWithSignIn||this._handlers?.builtIn&&this._context.access===n.LegacyClerk)return this._handleVisitor(r);if(this._handlers?.builtIn&&this._context.access===n.Invited)return r.logger.debug("Anonymous flow, refused: the project is invited only."),{response:{success:!1},userIdSource:"custom"};throw Error("Can not authorize anonymous request, the anonymous handler is not configured!")}async handleCode(e,r){if(this._handlers?.onClerkCode&&e.idToken&&this._isClerkIdToken(e.idToken))return r.logger.debug("Clerk code flow."),{response:await this._handlers.onClerkCode(e,r),userIdSource:"clerk"};if(this._handlers?.onClerkSession&&!e.idToken&&this._context.clerk&&o(e.accessToken,this._context.clerk.oauthProviderBaseUrl))return r.logger.debug("Clerk session flow."),{response:await this._handlers.onClerkSession(e,r),userIdSource:"clerk"};if(this._handlers?.onCode)return r.logger.debug("Custom code flow."),{response:await this._handlers.onCode(e,r),userIdSource:"custom"};let s=this._accessHandlers().code;if(s)return r.logger.debug("Custom code flow, code handler."),{response:await s(e),userIdSource:"custom"};throw Error("Can not authorize code request, the code handler is not configured!")}async handleRefresh(e,r){if(this._handlers?.onClerkRefresh&&this._isClerkRefreshToken(e.refreshToken))return r.logger.debug("Clerk refresh flow."),{response:await this._handlers.onClerkRefresh(e,r),userIdSource:"clerk"};if(this._handlers?.onRefresh)return r.logger.debug("Custom refresh flow."),{response:await this._handlers.onRefresh(e,r),userIdSource:"custom"};let s=this._accessHandlers().refresh;if(s)return r.logger.debug("Custom refresh flow, refresh handler."),{response:await s(e),userIdSource:"custom"};throw Error("Refresh handler is not configured!")}withCognitoHandlers(){return new AuthHandlerBuilder(this._context,{...this._handlers,cognito:!0})}withCodeHandler(e){if(this._handlers?.onCode)throw Error("Code handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onCode:e})}withClerkCodeHandler(){if(this._handlers?.onClerkCode)throw Error("Clerk code handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=l(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkCode:e})}withClerkSessionHandler(){if(this._handlers?.onClerkSession)throw Error("Clerk session handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let{authorizedParties:e}=this._context.clerk;if(!e||0===e.length)throw Error("Clerk session handler authorized parties are not configured!");let r=d({...this._context.clerk,authorizedParties:e});return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkSession:r})}withRefreshHandler(e){if(this._handlers?.onRefresh)throw Error("Refresh handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onRefresh:e})}withClerkRefreshHandler(){if(this._handlers?.onClerkRefresh)throw Error("Clerk refresh handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=h(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkRefresh:e})}withAnonymousHandler(e){if(this._handlers?.onAnonymous)throw Error("Anonymous handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onAnonymous:e})}withPublishedChunkScopes(e){if(this._handlers?.scopeResolver)throw Error("Published chunk scopes resolver is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,scopeResolver:e})}build(){return async(r,s)=>{let o=i.parse(r),{response:n,userIdSource:l}=await e(o).with({type:"phoenix"},e=>{if(!this._handlers?.cognito&&!this._context.useCognito&&(void 0===this._context.access||!t(this._context.access)))throw Error('Studio-account sign-in is not configured. Choose "access: public", "invited" or "public-with-sign-in", or call withCognitoHandlers().');return this._handleSignedIn(e,s)}).with({type:"code"},e=>this.handleCode(e,s)).with({type:"refresh"},e=>this.handleRefresh(e,s)).with({type:"anonymous"},e=>this.handleAnonymous(e,s)).exhaustive(),h=this._context.configuratorBuilder.buildWebhookContext();if(!n.success)return"phoenix"===o.type&&n.reason?{success:!1,reason:n.reason}:{success:!1};{let e=h.config.domain.domainFactory.parseSessionData(n.data),r=this._handlers?.scopeResolver??h.accessHandlers.chunkScopes,s=r?r({role:n.role,data:e}):[];return{success:n.success,data:e,role:n.role,refreshToken:n.refreshToken,expirationTime:n.expirationTime,scopes:[...new Set([...s,a])],userId:n.userId,userIdSource:l}}}}}
|