@salsita-ai/sdk 0.50.0-develop.aec0f535bf → 0.50.0-develop.af031dec0f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -2
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +1 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +26 -29
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +11 -12
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +3 -2
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -11
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +16 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +47 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +15 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +42 -5
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +4 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/cli-client/cli-api-client.d.ts +17 -0
- package/dist/client/cli-client/cli-api-client.js +1 -0
- package/dist/client/cli-client/index.d.ts +2 -0
- package/dist/client/cli-client/index.js +1 -0
- package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
- package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5290 -1754
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +44 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
- package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +7 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +91 -33
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +12 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +43 -37
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +29 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +14 -4
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +38 -9
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +9 -7
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +5 -5
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
- package/dist/configurator/ui/assistant/annotation/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/index.js +1 -1
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
- package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
- package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +7 -4
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
- package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -3
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +2 -2
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +2 -1
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +2 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +2 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
- package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
- package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
- package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
- package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
- package/dist/configurator/ui/index.d.ts +1 -1
- package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
- package/dist/docs/index.json +22 -2
- package/dist/docs/layouts/nested-view-controls.mdx +223 -0
- package/dist/docs/layouts/presets/custom.mdx +1 -0
- package/dist/docs/layouts/preview/always.mdx +22 -0
- package/dist/docs/layouts/view-controls.mdx +2 -0
- package/dist/docs/other-features/domain-actions.mdx +10 -11
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +81 -35
- package/dist/docs/phoenix/data-sources.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +1 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +89 -53
- package/dist/docs/phoenix/project-structure.mdx +7 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +56 -27
- package/dist/docs/phoenix/sessions-and-access.mdx +9 -6
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhooks.mdx +55 -3
- package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
- package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
- package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
- package/dist/docs/ux-guidelines/overview.mdx +11 -9
- package/dist/domain/application/application-config.d.ts +5 -0
- package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
- package/dist/domain/application/assistant/assistant-exposure.js +1 -0
- package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
- package/dist/domain/application/assistant/assistant-selection.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +14 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +5 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
- package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
- package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +17 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant-field-options.d.ts +2 -0
- package/dist/domain/application/assistant-field-options.js +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +17 -11
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
- package/dist/domain/application/assistant-recipe-groups.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +8 -0
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components/available-system-components.js +1 -1
- package/dist/domain/core/action/action.d.ts +0 -49
- package/dist/domain/core/component/system-component-filter.d.ts +1 -0
- package/dist/domain/core/component/system-component-filter.js +1 -1
- package/dist/domain/core/component/view-state-component.d.ts +4 -3
- package/dist/domain/core/component/view-state-component.js +1 -1
- package/dist/domain/core/domain-factory.d.ts +2 -3
- package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
- package/dist/domain/core/invariant/control-violation-hints.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +1 -0
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
- package/dist/domain/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -6
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
- package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
- package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
- package/dist/domain/extensions/assistant/index.d.ts +1 -0
- package/dist/domain/extensions/assistant/index.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -8
- package/dist/domain/spec/modules/index.d.ts +0 -1
- package/dist/domain/spec/modules/index.js +1 -1
- package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
- package/dist/domain/spec/phx/phx-domain.js +1 -1
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
- package/dist/domain/spec/runtime/create-application.d.ts +5 -2
- package/dist/domain/spec/runtime/create-application.js +1 -1
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +28 -1
- package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
- package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +30 -2
- package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
- package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
- package/dist/domain/spec/sections/assistant/index.d.ts +3 -1
- package/dist/domain/system-components/index.d.ts +1 -0
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/navigation/index.d.ts +1 -0
- package/dist/domain/system-components/navigation/index.js +1 -0
- package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
- package/dist/domain/system-components/navigation/view-controls.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/index.d.ts +1 -0
- package/dist/extras/cognito/index.js +1 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
- package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
- package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +24 -2
- package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
- package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
- package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +1 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/account/index.d.ts +1 -0
- package/dist/phoenix/commands/account/index.js +1 -0
- package/dist/phoenix/commands/account/whoami.d.ts +10 -0
- package/dist/phoenix/commands/account/whoami.js +4 -0
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +8 -2
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/feedback.d.ts +2 -2
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init-starter-spec.js +3 -4
- package/dist/phoenix/commands/init.d.ts +2 -2
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/login.d.ts +6 -3
- package/dist/phoenix/commands/login.js +3 -3
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/services/cli-credentials.d.ts +26 -7
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
- package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
- package/dist/phoenix/services/cli-server/index.d.ts +2 -0
- package/dist/phoenix/services/cli-server/index.js +1 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/index.d.ts +4 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/phoenix-application.js +1 -1
- package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
- package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
- package/dist/phoenix/services/spec-project/index.d.ts +3 -0
- package/dist/phoenix/services/spec-project/index.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
- package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
- package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +14 -16
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +2 -1
- package/dist/react-sdk/preset-selection/index.js +1 -1
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
- package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +3 -1
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +9 -4
- package/schema/domain-spec.json +440 -53
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
- package/dist/domain/domain-context/action-system/action-system.js +0 -1
- package/dist/domain/domain-context/action-system/index.d.ts +0 -1
- package/dist/domain/domain-context/action-system/index.js +0 -1
- package/dist/domain/domain-runtime/action-factory.d.ts +0 -11
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
- package/dist/domain/extensions/view-controls.d.ts +0 -25
- package/dist/domain/extensions/view-controls.js +0 -1
- package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
- /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
- /package/dist/{domain/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { $DomainEntity,
|
|
1
|
+
import type { $DomainEntity, DomainContextSystems, DomainEntity } from '#package/domain';
|
|
2
2
|
export declare const useDomainContextSelectors: () => {
|
|
3
3
|
selectApplicationSpec: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").ApplicationAdminSpec> | import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").ApplicationConfiguratorSpec>;
|
|
4
4
|
selectRawAccessService: import("@salsita-ai/common/utils").Selector<import("#package/domain").AccessSelectorState, import("#package/domain").AccessService | null>;
|
|
@@ -38,6 +38,7 @@ export declare const useDomainContextSelectors: () => {
|
|
|
38
38
|
selectToolStates: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, readonly string[]>;
|
|
39
39
|
selectExportStates: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, readonly string[]>;
|
|
40
40
|
selectCreateTransformers: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, undefined> | import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, import("#package/domain").AnyCreateTransformersFactory>;
|
|
41
|
+
selectActionModules: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, readonly import("#package/domain").ProjectModule[]>;
|
|
41
42
|
selectLatestLoadedData: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, import("#package/domain").ConfiguratorLoadedData | null>;
|
|
42
43
|
selectLoadedData: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, import("#package/domain").ConfiguratorLoadedData>;
|
|
43
44
|
selectInitialDomainState: import("@salsita-ai/common/utils").Selector<import("#package/domain").DomainContextSelectorState, import("#package/domain").DomainState<any>>;
|
|
@@ -61,7 +62,6 @@ export declare const useDomainContextSelectors: () => {
|
|
|
61
62
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
62
63
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
63
64
|
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
64
|
-
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
65
65
|
getModelVersion: () => number;
|
|
66
66
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
67
67
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -81,6 +81,7 @@ export declare const useDomainContextSelectors: () => {
|
|
|
81
81
|
getToolStates: () => readonly string[];
|
|
82
82
|
getExportStates: () => readonly string[];
|
|
83
83
|
getCreateTransformers: () => import("#package/domain").AnyCreateTransformersFactory | undefined;
|
|
84
|
+
getActionModules: () => readonly import("#package/domain").ProjectModule[];
|
|
84
85
|
getLoadedData: () => import("#package/domain").ConfiguratorLoadedData;
|
|
85
86
|
getInitialDomainState: () => import("#package/domain").DomainState<any>;
|
|
86
87
|
getFrontendData: () => Record<string, unknown>;
|
|
@@ -103,17 +104,15 @@ export declare const useDomainContextSelectors: () => {
|
|
|
103
104
|
getNavigationSystem: () => import("#package/domain").AnyNavigationSystem;
|
|
104
105
|
getUndoSystem: () => import("#package/domain").AnyUndoSystem;
|
|
105
106
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
106
|
-
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
107
107
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
108
108
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
109
109
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
110
|
-
getHostSystems: () => object;
|
|
111
110
|
getDomainContext: () => import("#package/domain").DomainContext;
|
|
112
111
|
};
|
|
113
|
-
export type UseDomainContext<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string
|
|
112
|
+
export type UseDomainContext<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> = () => DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
114
113
|
/**
|
|
115
114
|
* Reads the stable runtime-owned system graph for the current application slot. Consumers are
|
|
116
115
|
* mounted by `DomainLifecycleBoundary`, which initializes the retained graph before rendering
|
|
117
116
|
* descendants, so the hook does not need another readiness subscription or provider.
|
|
118
117
|
*/
|
|
119
|
-
export declare const useDomain: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string
|
|
118
|
+
export declare const useDomain: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string>() => DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type $DomainEntity, type DomainEntity, type EntityViolation, type StateEmission, type StateValidationResult, type ViolationTypesOf$Entity } from '#package/domain';
|
|
2
2
|
/** The validity of the last committed emission, as `useStateValidity` returns it. */
|
|
3
3
|
export type UseStateValidity<ENTITIES extends DomainEntity<string>, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>> = StateValidationResult<ENTITIES, ViolationTypesOf$Entity<$MAP[ENTITIES['type']]>>;
|
|
4
4
|
export declare const useStateValidity: () => StateValidationResult<DomainEntity<string>, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLingui as i}from"@lingui/react";import{useCallback as t,useMemo as e}from"react";import{P as o,match as
|
|
1
|
+
import{useLingui as i}from"@lingui/react";import{useCallback as t,useMemo as e}from"react";import{P as o,match as a}from"ts-pattern";import{isNonNullish as n}from"@salsita-ai/common/utils";import{CONTROL_VIOLATION_SEVERITIES as l,selectControlViolationHints as s}from"#package/domain";import{useDomainApplication as r}from"../../application-runtime/index.js";import{useResolveLocalizable as d}from"../../localizable/index.js";import{useEagerObservableValue as v}from"./use-observable-selector.js";import{useStoreSelector as u}from"./use-store-selector.js";export const useStateValidity=()=>u(i=>i.validity,[]);export const useMapViolationHints=e=>{let o=d(),{i18n:a}=i();return t((i,t)=>{let l=s({violations:i,stateEmission:t,ignoreViolationTypes:e??[]},{i18n:a,resolveLocalizable:o}).map(({hint:i})=>i).filter(n);return l.length<=1?l.join(""):l.map(i=>i.replace(/([^.]|\S)\.?\s*$/,"$1.")).join(" ")},[e,o,a])};export const useControlViolations=i=>{let t=useMapViolationHints(i);return e(()=>i=>a(i).with({validity:{severity:null}},()=>({disabled:!1,hints:void 0,violations:void 0})).with({validity:{severity:o.union("notice","warning")}},({validity:{entityViolations:i}})=>({disabled:!1,hints:void 0,violations:i})).with({validity:{severity:o.union("fixable","fatal")}},({validity:{entityViolations:e}})=>({disabled:!0,hints:t(e.filter(i=>l.includes(i.violation.severity)),i),violations:e})).with({validity:{severity:"uncaught"}},()=>({disabled:!0,hints:void 0,violations:void 0})).exhaustive(),[t])};let h={id:"sdk.finalize.outOfSync.hint",message:"Configuration is out of sync. Some changes have not been properly saved."},y=["warning","fixable","fatal"];export const useFinalizeViolations=()=>{let i=useMapViolationHints(),t=(()=>{let{configurationPersistSystem:i}=r(),t=v(i.failure$),n=d();return e(()=>a(t).returnType().with(null,()=>({disabled:!1,hints:void 0})).with(o.not(null),()=>({disabled:!0,hints:n(h)})).exhaustive(),[t,n])})();return u(e=>a(e).when(()=>t.disabled,()=>({...t,violations:void 0})).with({validity:{severity:null}},()=>({disabled:!1,hints:void 0,violations:void 0})).with({validity:{severity:"notice"}},({validity:{entityViolations:t}})=>({disabled:!1,hints:i(t,e),violations:t})).with({validity:{severity:o.union("warning","fixable","fatal")}},({validity:{entityViolations:t}})=>({disabled:!0,hints:i(t.filter(i=>y.includes(i.violation.severity)),e),violations:t})).with({validity:{severity:"uncaught"}},()=>({disabled:!0,hints:void 0,violations:void 0})).exhaustive(),[i,t])};
|
|
@@ -9,7 +9,7 @@ export { useCommittedState, useCommittedSlice, useRenderedSlice, useRenderedStat
|
|
|
9
9
|
export { useDomainEntityState, useDomainEntityRenderedState, type UseDomainEntityState, } from './entity-hooks/use-domain-entity-state.js';
|
|
10
10
|
export { useEntityPrice, useRootEntityPrice, type UseEntityPrice, type UseRootEntityPrice, } from './entity-hooks/use-entity-price.js';
|
|
11
11
|
export { useSelectEntity, type UseSelectEntity, useSelectedEntity, type UseSelectedEntity, useSelectedEntityId, type UseSelectedEntityId, useSelectedDomainEntityId, type UseSelectedDomainEntityId, useDeselect, type UseDeselect, useSelectParent, type UseSelectParent, } from './system-hooks/selection-hooks.js';
|
|
12
|
-
export { useActiveNavigationState, type UseActiveNavigationState, useActiveViewState, type UseActiveViewState, useSetViewState, type UseSetViewState, useActiveToolState, type UseActiveToolState, useIsFullscreenActive, type UseIsFullscreenActive, useSetFullscreen, type UseSetFullscreen, useActiveViewports, type UseActiveViewports, useDraggedDomainEntityId, type UseDraggedDomainEntityId, useNavigate, type UseNavigate, usePushNavigate, type UsePushNavigate, usePopNavigate, type UsePopNavigate, } from './system-hooks/navigation-hooks.js';
|
|
12
|
+
export { useActiveNavigationState, type UseActiveNavigationState, useActiveViewState, type UseActiveViewState, useActiveViewChildState, useSetViewState, type UseSetViewState, useActiveToolState, type UseActiveToolState, useIsFullscreenActive, type UseIsFullscreenActive, useSetFullscreen, type UseSetFullscreen, useActiveViewports, type UseActiveViewports, useDraggedDomainEntityId, type UseDraggedDomainEntityId, useNavigate, type UseNavigate, usePushNavigate, type UsePushNavigate, usePopNavigate, type UsePopNavigate, } from './system-hooks/navigation-hooks.js';
|
|
13
13
|
export { useComposition, type UseComposition } from './system-hooks/composition-hooks.js';
|
|
14
14
|
export { useUndoRedo, type UseUndoRedo, type UseUndoRedoResult } from './system-hooks/undo-redo-hooks.js';
|
|
15
15
|
export { useTabNavigation, type TabEntry, type TabSource, type UseTabNavigation, type UseTabNavigationOptions, type UseTabNavigationResult, } from './system-hooks/tab-navigation-hooks.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useDomain}from"./common-hooks/use-domain-context.js";export{useStoreSelector,useRenderedSelector,useRenderedSelector$,useStoreSelector$}from"./common-hooks/use-store-selector.js";export{useEagerObservableSelector,usePatientObservableSelector,usePatientObservableValue,useEagerObservableValue}from"./common-hooks/use-observable-selector.js";export{useStateValidity,useMapViolationHints,useControlViolations,useFinalizeViolations}from"./common-hooks/use-state-validity.js";export{useConfigurationSaveState}from"./common-hooks/use-configuration-save-state.js";export{useConfiguratorMessages}from"./common-hooks/use-configurator-messages.js";export{useComponent,useRenderedComponent,useComponents,useDynamicComponents,useRenderedComponents,useRootComponents,useRootRenderedComponents,useFirstComponent,useFirstRenderedComponent,useFirstRootComponent,useFirstRootRenderedComponent}from"./component-hooks/use-component.js";export{useCommittedState,useCommittedSlice,useRenderedSlice,useRenderedState}from"./common-hooks/use-slices.js";export{useDomainEntityState,useDomainEntityRenderedState}from"./entity-hooks/use-domain-entity-state.js";export{useEntityPrice,useRootEntityPrice}from"./entity-hooks/use-entity-price.js";export{useSelectEntity,useSelectedEntity,useSelectedEntityId,useSelectedDomainEntityId,useDeselect,useSelectParent}from"./system-hooks/selection-hooks.js";export{useActiveNavigationState,useActiveViewState,useSetViewState,useActiveToolState,useIsFullscreenActive,useSetFullscreen,useActiveViewports,useDraggedDomainEntityId,useNavigate,usePushNavigate,usePopNavigate}from"./system-hooks/navigation-hooks.js";export{useComposition}from"./system-hooks/composition-hooks.js";export{useUndoRedo}from"./system-hooks/undo-redo-hooks.js";export{useTabNavigation}from"./system-hooks/tab-navigation-hooks.js";export{useStepNavigation}from"./system-hooks/step-navigation-hooks.js";export{useLocaleSwitch}from"./system-hooks/locale-switch-hooks.js";export{useGenerateShareLink}from"./system-hooks/generate-share-link-hooks.js";export{useShareLinks}from"./system-hooks/share-links-hooks.js";export{useHoveredDomainEntityId,useHoveredEntity,useHoveredEntityId}from"./system-hooks/hover-hooks.js";export{useRootEntityState,useRootEntityRenderedState}from"./entity-hooks/use-root-entity-state.js";export{useRootEntityId,useRootEntityRenderedId}from"./entity-hooks/use-root-entity-id.js";export{useEntitySelector,useRootEntitySelector,useRenderedEntitySelector,useRenderedRootEntitySelector}from"./common-hooks/use-entity-selector.js";export{useDimensionState,useDimensions,useDimensionConfig}from"./system-hooks/dimension-hooks.js";
|
|
1
|
+
export{useDomain}from"./common-hooks/use-domain-context.js";export{useStoreSelector,useRenderedSelector,useRenderedSelector$,useStoreSelector$}from"./common-hooks/use-store-selector.js";export{useEagerObservableSelector,usePatientObservableSelector,usePatientObservableValue,useEagerObservableValue}from"./common-hooks/use-observable-selector.js";export{useStateValidity,useMapViolationHints,useControlViolations,useFinalizeViolations}from"./common-hooks/use-state-validity.js";export{useConfigurationSaveState}from"./common-hooks/use-configuration-save-state.js";export{useConfiguratorMessages}from"./common-hooks/use-configurator-messages.js";export{useComponent,useRenderedComponent,useComponents,useDynamicComponents,useRenderedComponents,useRootComponents,useRootRenderedComponents,useFirstComponent,useFirstRenderedComponent,useFirstRootComponent,useFirstRootRenderedComponent}from"./component-hooks/use-component.js";export{useCommittedState,useCommittedSlice,useRenderedSlice,useRenderedState}from"./common-hooks/use-slices.js";export{useDomainEntityState,useDomainEntityRenderedState}from"./entity-hooks/use-domain-entity-state.js";export{useEntityPrice,useRootEntityPrice}from"./entity-hooks/use-entity-price.js";export{useSelectEntity,useSelectedEntity,useSelectedEntityId,useSelectedDomainEntityId,useDeselect,useSelectParent}from"./system-hooks/selection-hooks.js";export{useActiveNavigationState,useActiveViewState,useActiveViewChildState,useSetViewState,useActiveToolState,useIsFullscreenActive,useSetFullscreen,useActiveViewports,useDraggedDomainEntityId,useNavigate,usePushNavigate,usePopNavigate}from"./system-hooks/navigation-hooks.js";export{useComposition}from"./system-hooks/composition-hooks.js";export{useUndoRedo}from"./system-hooks/undo-redo-hooks.js";export{useTabNavigation}from"./system-hooks/tab-navigation-hooks.js";export{useStepNavigation}from"./system-hooks/step-navigation-hooks.js";export{useLocaleSwitch}from"./system-hooks/locale-switch-hooks.js";export{useGenerateShareLink}from"./system-hooks/generate-share-link-hooks.js";export{useShareLinks}from"./system-hooks/share-links-hooks.js";export{useHoveredDomainEntityId,useHoveredEntity,useHoveredEntityId}from"./system-hooks/hover-hooks.js";export{useRootEntityState,useRootEntityRenderedState}from"./entity-hooks/use-root-entity-state.js";export{useRootEntityId,useRootEntityRenderedId}from"./entity-hooks/use-root-entity-id.js";export{useEntitySelector,useRootEntitySelector,useRenderedEntitySelector,useRenderedRootEntitySelector}from"./common-hooks/use-entity-selector.js";export{useDimensionState,useDimensions,useDimensionConfig}from"./system-hooks/dimension-hooks.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DomainEntityId, type Viewport } from '#package/domain';
|
|
2
2
|
export type UseActiveNavigationState<NAVIGATION_STATE extends string> = () => NAVIGATION_STATE;
|
|
3
3
|
/**
|
|
4
4
|
* Get the currently active navigation state
|
|
@@ -9,11 +9,13 @@ export type UseActiveViewState<VIEW_STATE extends string> = () => VIEW_STATE;
|
|
|
9
9
|
* Get the currently active view state
|
|
10
10
|
*/
|
|
11
11
|
export declare const useActiveViewState: () => string;
|
|
12
|
-
|
|
12
|
+
/** The runtime choice within the active view, when one has been selected. */
|
|
13
|
+
export declare const useActiveViewChildState: () => string | undefined;
|
|
14
|
+
export type UseSetViewState<VIEW_STATE extends string> = () => (state: VIEW_STATE, viewChildState?: string) => void;
|
|
13
15
|
/**
|
|
14
16
|
* Hook to make the given view state the active one. Setting the state that is already active keeps it
|
|
15
17
|
*/
|
|
16
|
-
export declare const useSetViewState: () => (state: string) => void;
|
|
18
|
+
export declare const useSetViewState: () => (state: string, viewChildState?: string) => void;
|
|
17
19
|
export type UseActiveToolState<TOOL_STATE extends string> = () => TOOL_STATE;
|
|
18
20
|
/**
|
|
19
21
|
* Get the currently active tool state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as t}from"react";import{useDomain as
|
|
1
|
+
import{useCallback as t}from"react";import{getComponentSystemFilterState as e}from"#package/domain";import{useDomain as a,useStoreSelector as o}from"../common-hooks/index.js";export const useActiveNavigationState=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveNavigationState(e.state),[t])};export const useActiveViewState=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveViewState(e.state),[t])};export const useActiveViewChildState=()=>o(t=>e(t.state).viewChildState,[]);export const useSetViewState=()=>{let{storeSystem:e,navigationSystem:o}=a();return t((t,a)=>{e.stageAndCommit([o.getViewUpdate(t,a)])},[e,o])};export const useActiveToolState=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveToolState(e.state),[t])};export const useIsFullscreenActive=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveFullscreenState(e.state),[t])};export const useSetFullscreen=()=>{let{storeSystem:e,navigationSystem:o}=a();return t(t=>{e.stageAndCommit([o.getFullscreenUpdate(t)])},[e,o])};export const useDraggedDomainEntityId=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveDragState(e.state),[t])};export const useActiveViewports=()=>{let{navigationSystem:t}=a();return o(e=>t.getActiveViewportState(e.state),[t])};export const useNavigate=()=>{let{storeSystem:e,navigationSystem:o}=a();return t(t=>{e.stageAndCommit([o.getNavigationUpdate(t)])},[e,o])};export const usePushNavigate=()=>{let{storeSystem:e,navigationSystem:o}=a();return t(t=>{e.stageAndCommit([o.getPushNavigationUpdate(t,e.stateSlices.committed.value.state)])},[e,o])};export const usePopNavigate=()=>{let{storeSystem:e,navigationSystem:o}=a();return t(()=>{let t=o.getPopNavigationUpdate(e.stateSlices.committed.value.state);t&&e.stageAndCommit([t])},[e,o])};
|
|
@@ -26,6 +26,13 @@ export interface PresetSelection {
|
|
|
26
26
|
readonly presetCategories: UIPresetCategory[];
|
|
27
27
|
readonly hasMultiplePresets: boolean;
|
|
28
28
|
readonly selectPreset: (id: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a configuration from the preset with this id exactly as `selectPreset` does, the UI's
|
|
31
|
+
* busy state, error handling and navigation to the new configuration included, and resolves with
|
|
32
|
+
* the new configuration's id once the navigation started. Rejects when no preset has the id or the
|
|
33
|
+
* creation fails.
|
|
34
|
+
*/
|
|
35
|
+
readonly createFromPreset: (id: string) => Promise<PresetCreation>;
|
|
29
36
|
/**
|
|
30
37
|
* Error from the last preset-creation attempt, or `null` if none failed.
|
|
31
38
|
*
|
|
@@ -43,6 +50,10 @@ export interface PresetSelection {
|
|
|
43
50
|
*/
|
|
44
51
|
readonly creatingPresetId: string | null;
|
|
45
52
|
}
|
|
53
|
+
/** The configuration a preset was turned into; see {@link PresetSelection.createFromPreset}. */
|
|
54
|
+
export interface PresetCreation {
|
|
55
|
+
readonly configurationId: string;
|
|
56
|
+
}
|
|
46
57
|
export declare const PresetSelectionContext: import("react").Context<PresetSelection | null>;
|
|
47
58
|
export declare const usePresetSelection: () => PresetSelection;
|
|
48
59
|
export type UsePresetSelection = typeof usePresetSelection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMutation as t}from"@tanstack/react-query";import{useSnackbar as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMutation as t}from"@tanstack/react-query";import{useSnackbar as r}from"notistack";import{useSubscription as i}from"observable-hooks";import{createContext as o,useCallback as n,useContext as s,useEffect as a,useMemo as l,useState as m}from"react";import{skip as d}from"rxjs";import{match as p}from"ts-pattern";import{AuthorizedClient as c,LocalStorageAuthorizedPhoenixApiClient as g,MemoryAuthorizedPhoenixApiClient as u}from"#package/client";import{SYSTEM_CHUNK_KEY as f,standardWebComponentProperties as h}from"#package/domain";import{ApplicationRoutes as y,FrontendAnalyticsFactory as x,useAnalyticsService as P,useAuthenticatedClient as w,useConfiguratorDomainFactory as v,useIsDev as C,useLogger as T,usePersistenceConfig as S,usePublishedData as D,useRoutingSelectors as k,useSessionService as b,useSpecPresetSeed as E,useWebComponentProperty$ as j}from"../application-runtime/index.js";import{useConfiguratorRouting as A}from"../configurator-routing/index.js";import{useOnPresetLoadedHandler as I}from"../domain-application-context/index.js";import{useEagerObservableValue as V}from"../domain-context/index.js";import{useResolveLocalizable as $}from"../localizable/index.js";let R={id:"sdk.presets.create.error.message",message:"Could not start configuring from this preset. Please try again."},F={id:"sdk.presets.create.error.dismiss.label",message:"Dismiss"},M="phx-preset-creation-error";export const PresetSelectionContext=o(null);export const usePresetSelection=()=>{let e=s(PresetSelectionContext);if(null===e)throw Error("usePresetSelection must be used within a PresetSelectionProvider!");return e};let q=e=>t=>null===e||void 0!==t.tags&&t.tags.some(t=>e.includes(t));export const PresetSelectionProvider=o=>{let{children:s}=o,[z,B]=m(null),[U,G]=m(null),H=E(),J=w(),K=P(),L=S(),N=v(),O=C(),Q=$(),{requestSessionToken:W}=b(),X=T(),Y=A(),Z=k(),_=D(),{enqueueSnackbar:ee,closeSnackbar:et}=r(),er=j(h.presetTags),ei=V(er),eo=I();i(l(()=>er.pipe(d(1)),[er]),()=>{Z.getRoutingState().route!==y.Index&&Y.goToIndex()}),a(()=>{G(null),et(M)},[O,et]);let{mutateAsync:en}=t({mutationFn:n(async e=>{let{getData:t,name:r}=e,{rootEntityType:i,entities:o,modelVersion:n}=await t(),s=N.validateAndMigrateState(o,n);K.push(x.ProductSelected(i,Q(r)));let a=eo?await eo(s):s;return J.createConfiguration({rootEntityType:i,data:a})},[N,K,Q,J,eo]),onSuccess:e=>{Y.goToConfigurationDetail(e.configurationId,e.accessToken)},onError:(e,t)=>{X.error("Failed to create a new configuration from a preset!",{name:t.name},e),G(e)},onSettled:()=>{B(null)}}),es=l(()=>{let e,t=(e=f in _?_[f].presetCategories:_.presetCategories,{publishedPresetCategories:(e??[]).map(e=>({...e,presets:e.presets.filter(q(ei))})).filter(e=>e.presets.length>0),seedPresets:H.filter(q(ei))});return t.publishedPresetCategories.length>0?t.publishedPresetCategories.map(e=>({id:e.id,name:e.name,description:e.description,img:e.img,imgAlt:e.imgAlt,presets:e.presets.map(e=>({id:e.configurationId,name:e.name,description:e.description,img:e?.img,imgAlt:e?.imgAlt,detailTitle:e?.detailTitle,detailDescription:e?.detailDescription,getData:async()=>{let t=p(L).with({type:"server"},t=>new c(t.serverUrl,()=>e.readToken,W)).with({type:"local-storage"},()=>new g(N.modelVersion)).with({type:"memory"},()=>new u(N.modelVersion)).exhaustive(),r=await t.getConfigurationRevision(e.configurationId,e.revisionId);return{entities:r.data,rootEntityType:r.rootEntityType,modelVersion:r.modelVersion}}}))})):t.seedPresets.length>0?[{id:"Default",name:"Default Category",presets:t.seedPresets.map((e,t)=>({id:`${t}`,name:e.name??`${e.rootEntityType} preset - ${t}`,description:e.description??"",img:e.img,imgAlt:e.imgAlt,detailTitle:e.detailTitle,detailDescription:e.detailDescription,getData:async()=>({entities:e.initialDomainEntities,rootEntityType:e.rootEntityType,modelVersion:N.modelVersion})}))}]:[]},[_,W,L,N,ei,H]),ea=l(()=>es.flatMap(e=>e.presets),[es]),el=n(e=>{let t=ea.find(t=>t.id===e);if(void 0===t)throw Error(`Preset with id ${e} not found!`);return t},[ea]),em=n(async e=>{let{id:t,getData:r,name:i}=e,o=Z.getRoutingState().route===y.Index,n=!o||!O&&ea.length>1;G(null),B(t);try{let{configurationId:e}=await en({getData:r,name:i});return{configurationId:e}}catch(e){throw n&&(et(M),ee(Q(R),{variant:"error",key:M,persist:!0,preventDuplicate:!0,actionButton:{label:Q(F),onClick:e=>{G(null),et(e)}}})),o||G(null),e}},[ea,O,Z,en,ee,et,Q]),ed=n(async e=>em(el(e)),[em,el]),ep=n(e=>{em(el(e)).catch(()=>{})},[em,el]),ec=ea.length>1,eg=l(()=>({hasMultiplePresets:ec,presetCategories:es,selectPreset:ep,createFromPreset:ed,selectionError:U,creatingPresetId:z}),[ep,ed,ec,es,U,z]);return e(PresetSelectionContext.Provider,{value:eg,children:s})};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal Rendered by the SDK's configurator app inside `PresetSelectionProvider`; not part of a project's API.
|
|
3
|
+
*
|
|
4
|
+
* Offers the preset tools to the AI agents in the visitor's browser through WebMCP while the
|
|
5
|
+
* configurator is on, on the preset screen and inside a configuration alike: rendered inside the
|
|
6
|
+
* preset selection, which is mounted only while the power is `on`. They are registered while the spec
|
|
7
|
+
* has an `assistant` section that does not turn WebMCP off, the session's role may create a
|
|
8
|
+
* configuration and the browser has WebMCP. No session setup handler takes part: it needs a loaded
|
|
9
|
+
* configuration, which the preset screen does not have.
|
|
10
|
+
*
|
|
11
|
+
* The tools read the selection, the locale and the image URLs through a ref when called, so they are
|
|
12
|
+
* registered again only when the gate flips, never because the presets changed.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PresetWebMcpTools: () => null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as e,useRef as r}from"react";import{SessionRole as t}from"@salsita-ai/contracts/api";import{useLogger as o,useResourceUrl as l,useSession as n,useSpecAssistant as i,useSpecCanCreate as s,useWebMcpHost as a}from"../application-runtime/index.js";import{useResolveLocalizable as c}from"../localizable/index.js";import{usePresetSelection as m}from"./PresetSelectionProvider.js";import{registerPresetWebMcpTools as p}from"./register-preset-webmcp-tools.js";export const PresetWebMcpTools=()=>{let g=a(),u=o(),b=m(),d=c(),{getResourceUrl:f}=l(),x=i(),j=s(),{sessionPayload:v}=n(),w=v?.role??t.Anonymous,I=null!=x&&!1!==x.webmcp&&j.includes(w),P=r({selection:b,resolveText:d,getImageUrl:f});return e(()=>{P.current={selection:b,resolveText:d,getImageUrl:f}},[b,d,f]),e(()=>{let{modelContext:e}=g;if(!I||!e)return;let r=new AbortController;return p({modelContext:e,getSelection:()=>P.current.selection,resolveText:e=>P.current.resolveText(e),getImageUrl:e=>P.current.getImageUrl(e),loads$:g.loads$,signal:r.signal}).catch(e=>{r.abort(),u.warn("The WebMCP preset tools could not be registered",{},e instanceof Error?e:void 0)}),()=>{r.abort()}},[g,u,I]),null};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { usePresetSelection, type UsePresetSelection, PresetSelectionProvider, type PresetSelectionProviderProps, } from './PresetSelectionProvider.js';
|
|
1
|
+
export { usePresetSelection, type UsePresetSelection, type PresetCreation, type PresetSelection, PresetSelectionProvider, type PresetSelectionProviderProps, } from './PresetSelectionProvider.js';
|
|
2
|
+
export { PresetWebMcpTools } from './PresetWebMcpTools.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePresetSelection,PresetSelectionProvider}from"./PresetSelectionProvider.js";
|
|
1
|
+
export{usePresetSelection,PresetSelectionProvider}from"./PresetSelectionProvider.js";export{PresetWebMcpTools}from"./PresetWebMcpTools.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Observable } from 'rxjs';
|
|
2
|
+
import type { Localizable } from '@salsita-ai/common/utils';
|
|
3
|
+
import type { WebMcpLoad, WebMcpModelContext } from '../application-runtime/index.js';
|
|
4
|
+
import type { PresetSelection } from './PresetSelectionProvider.js';
|
|
5
|
+
/** How long `configurator_create_from_preset` waits for the new configuration to settle its tools. */
|
|
6
|
+
export declare const PRESET_LOAD_TIMEOUT_MS = 60000;
|
|
7
|
+
/** What {@link registerPresetWebMcpTools} registers, what its tools read when called, and until when. */
|
|
8
|
+
export interface RegisterPresetWebMcpToolsProps {
|
|
9
|
+
readonly modelContext: WebMcpModelContext;
|
|
10
|
+
/** The preset screen's selection as it is when a tool is called, so a changed list needs no new registration. */
|
|
11
|
+
readonly getSelection: () => PresetSelection;
|
|
12
|
+
/** Resolves a preset text in the current locale. */
|
|
13
|
+
readonly resolveText: (text: Localizable) => string;
|
|
14
|
+
/** The URL a preset image is shown from. */
|
|
15
|
+
readonly getImageUrl: (image: string) => string;
|
|
16
|
+
/** The configuration loads that settled their tools, the latest first. */
|
|
17
|
+
readonly loads$: Observable<WebMcpLoad>;
|
|
18
|
+
/** Unregisters both tools once aborted. */
|
|
19
|
+
readonly signal: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Offers the preset screen to the AI agents in the visitor's browser through WebMCP, until `signal`
|
|
23
|
+
* aborts: `configurator_list_presets` lists the presets the screen shows, and
|
|
24
|
+
* `configurator_create_from_preset` starts a configuration from one as a click on its card does,
|
|
25
|
+
* then waits until the new configuration settled its own tools, at most
|
|
26
|
+
* {@link PRESET_LOAD_TIMEOUT_MS}. Settles once both tools are registered, and rejects when the
|
|
27
|
+
* browser refuses one, such as a name that is still registered.
|
|
28
|
+
*
|
|
29
|
+
* The wait matches the created configuration's id, so a load the agent left behind never answers it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const registerPresetWebMcpTools: (props: RegisterPresetWebMcpToolsProps) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{filter as e,firstValueFrom as t,map as r,of as i,timeout as o}from"rxjs";export const PRESET_LOAD_TIMEOUT_MS=6e4;let s="configurator_list_presets",a="configurator_create_from_preset",n="configurator_guide",l=e=>({content:[{type:"text",text:e}]}),p=e=>({content:[{type:"text",text:e}],isError:!0});export const registerPresetWebMcpTools=async d=>{let{modelContext:c,getSelection:g,resolveText:f,getImageUrl:h,loads$:m,signal:u}=d,y=!1,w=async a=>{let d=g();if(!d.presetCategories.some(e=>e.presets.some(e=>e.id===a)))return p(`No preset has the id "${a}". Call \`${s}\` for the ids of the presets offered now.`);if(y||null!==d.creatingPresetId)return p("A configuration is already being created from a preset. Wait until that call returns before starting another.");y=!0;try{var c;let s,{configurationId:p}=await d.createFromPreset(a);return l((c=await t(m.pipe(e(e=>e.configurationId===p),r(e=>e.tools),o({first:6e4,with:()=>i(null)}))),s=`Created configuration "${p}" from preset "${a}" and opened it.`,null===c?`${s} It is still loading, so whether it offers its tools is not known yet. Call \`${n}\` again later; if it is still not there, this configuration does not offer its tools.`:c?`${s} Its tools are registered now: call \`${n}\` to learn how to read and change it.`:`${s} This page does not offer its tools to agents, so it can only be changed in the page itself.`))}catch(t){let e=t instanceof Error?` (${t.message})`:"";return p(`The configuration could not be created from preset "${a}"${e}. The page shows the error too. Try again, or pick another preset.`)}finally{y=!1}},$=[{name:s,title:"List the presets",description:`The presets a new configuration can start from, grouped in categories as the page shows them, as JSON: \`{ categories: [{ id, name, description?, imageUrl?, presets: [{ id, name, description?, detailTitle?, detailDescription?, imageUrl?, imageAlt? }] }] }\`. Pass a preset's \`id\` to \`${a}\`.`,execute:async()=>{var e;let t,r,i;return l(JSON.stringify({categories:(e=g().presetCategories,t=e=>{let t=void 0===e?"":f(e);return""===t?void 0:t},r=e=>e&&h(e)||void 0,i=e=>({id:e.id,name:f(e.name),description:t(e.description),detailTitle:t(e.detailTitle),detailDescription:t(e.detailDescription),imageUrl:r(e.img),imageAlt:t(e.imgAlt)}),e.map(e=>({id:e.id,name:f(e.name),description:t(e.description),imageUrl:r(e.img),presets:e.presets.map(i)})))}))},annotations:{readOnlyHint:!0}},{name:a,title:"Start a configuration from a preset",description:`Starts a new configuration from a preset, as choosing it on the page does, and opens it; a configuration that is open now is left as it is. Returns once the new configuration is loaded, and says whether \`${n}\` and the tools to read and change it are available.`,inputSchema:{type:"object",properties:{presetId:{type:"string",description:`The \`id\` of a preset from \`${s}\`.`}},required:["presetId"],additionalProperties:!1},execute:async e=>"object"==typeof e&&null!==e&&"presetId"in e&&"string"==typeof e.presetId?w(e.presetId):p(`Pass the \`presetId\` of a preset from \`${s}\`.`)}];await Promise.all($.map(e=>c.registerTool(e,{signal:u})))};
|
|
@@ -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})]})]})};
|
|
@@ -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))})]})})};
|
|
@@ -13,6 +13,7 @@ export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> =
|
|
|
13
13
|
private readonly _handlers?;
|
|
14
14
|
private readonly _clerkTokenService?;
|
|
15
15
|
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?: {
|
|
16
|
+
cognito?: boolean;
|
|
16
17
|
onClerkCode?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
17
18
|
onClerkSession?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
18
19
|
onClerkRefresh?: (data: RefreshPayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
|
|
@@ -29,6 +30,8 @@ export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> =
|
|
|
29
30
|
private handleAnonymous;
|
|
30
31
|
private handleCode;
|
|
31
32
|
private handleRefresh;
|
|
33
|
+
/** Enables shared-pool identities resolved and authorized by the Phoenix server. */
|
|
34
|
+
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
35
|
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>;
|
|
33
36
|
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>;
|
|
34
37
|
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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{match as e}from"ts-pattern";import{ClerkTokenService as r,isClerkSessionToken as o}from"@salsita-ai/contracts/clerk";import{AuthPayload as
|
|
1
|
+
import{match as e}from"ts-pattern";import{ClerkTokenService as r,isClerkSessionToken as o}from"@salsita-ai/contracts/clerk";import{AuthPayload as n}from"@salsita-ai/contracts/webhook";import{SYSTEM_CHUNK_SCOPE as s}from"#package/domain";import{createClerkAuthCodeHandler as t}from"./clerk-auth-handlers/clerk-code-handler.js";import{createClerkRefreshHandler as i}from"./clerk-auth-handlers/clerk-refresh-handler.js";import{createClerkSessionHandler as h}from"./clerk-auth-handlers/clerk-session-handler.js";export class AuthHandlerBuilder{_context;_handlers;_clerkTokenService;constructor(e,o){this._context=e,this._handlers=o,e.clerk&&(this._clerkTokenService=new r(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}async handleAnonymous(e,r){if(!this._handlers?.onAnonymous)throw Error("Can not authorize anonymous request, the anonymous handler is not configured!");return r.logger.debug("Anonymous flow."),{response:await this._handlers.onAnonymous(e,r),userIdSource:"custom"}}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"};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"};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=t(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=h({...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=i(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,o)=>{let t=n.parse(r),{response:i,userIdSource:h}=await e(t).with({type:"phoenix"},e=>{if(!this._handlers?.cognito&&!this._context.useCognito)throw Error("Cognito authentication is not configured. Enable useCognito or withCognitoHandlers().");return{response:{success:!0,data:this._context.configuratorBuilder.buildWebhookContext().config.domain.domainFactory.parseSessionData(e.data),role:e.role,userId:e.userId,expirationTime:e.expirationTime},userIdSource:"phoenix"}}).with({type:"code"},e=>this.handleCode(e,o)).with({type:"refresh"},e=>this.handleRefresh(e,o)).with({type:"anonymous"},e=>this.handleAnonymous(e,o)).exhaustive(),l=this._context.configuratorBuilder.buildWebhookContext();if(!i.success)return{success:!1};{let e=l.config.domain.domainFactory.parseSessionData(i.data),r=this._handlers?.scopeResolver?this._handlers.scopeResolver({role:i.role,data:e}):[];return{success:i.success,data:e,role:i.role,refreshToken:i.refreshToken,expirationTime:i.expirationTime,scopes:[...new Set([...r,s])],userId:i.userId,userIdSource:h}}}}}
|
|
@@ -13,13 +13,15 @@ export interface ClerkConfig {
|
|
|
13
13
|
export interface BuilderDomainContext<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> {
|
|
14
14
|
configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ActionTypes, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
15
15
|
/** Server-only settings supplied by the generated webhook bundle. */
|
|
16
|
-
assistantServerSettings?: Pick<DeploymentAssistant, '
|
|
16
|
+
assistantServerSettings?: Pick<DeploymentAssistant, 'ai'> | null;
|
|
17
17
|
/**
|
|
18
18
|
* Asks a development environment to lock an assistant thread when the setup changes, as every
|
|
19
19
|
* other environment does. The generated webhook bundle sets it from `ASSISTANT_STRICT_THREADS`.
|
|
20
20
|
*/
|
|
21
21
|
assistantStrictThreads?: boolean;
|
|
22
22
|
createI18n: () => I18n;
|
|
23
|
+
/** Accept server-resolved Phoenix identities over the authenticated webhook transport. */
|
|
24
|
+
useCognito?: boolean;
|
|
23
25
|
clerk?: ClerkConfig;
|
|
24
26
|
}
|
|
25
27
|
export type ResourceMap<RESOURCE extends string> = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ConfigurationInsightField } from '@salsita-ai/contracts/domain';
|
|
2
|
+
import { type ConfigurationInsightsPayload, type ConfigurationInsightsResponse } from '@salsita-ai/contracts/webhook';
|
|
1
3
|
import { type $DomainEntity, type DomainEntity } from '#package/domain';
|
|
2
4
|
import type { FetchBackendDataHandler } from '../backend-data-handler.js';
|
|
3
5
|
import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
|
|
@@ -11,11 +13,14 @@ export declare class WebhookBuilder<ENTITIES extends DomainEntity<string> = neve
|
|
|
11
13
|
private readonly _context;
|
|
12
14
|
private readonly _handlers?;
|
|
13
15
|
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?: {
|
|
16
|
+
onConfigurationInsights?: (data: ConfigurationInsightsPayload) => Promise<ConfigurationInsightsResponse>;
|
|
14
17
|
onAuth?: AuthHandler<SESSION_DATA>;
|
|
15
18
|
onFinalize?: ConfiguratorFinalizeHandler<FINALIZE_DATA, ENTITIES, SESSION_DATA, FRONTEND_DATA>;
|
|
16
19
|
onCallback?: ConfiguratorCallbackHandler<CALLBACK_DATA, FINALIZE_RESULT, RESOURCE>;
|
|
17
20
|
onFetchBackendData?: FetchBackendDataHandler<SESSION_DATA, FRONTEND_DATA>;
|
|
18
21
|
} | undefined);
|
|
22
|
+
/** Publish only expressions reproducible from saved entities and versioned catalog data. */
|
|
23
|
+
withConfigurationInsights(definitions: readonly ConfigurationInsightField[]): WebhookBuilder<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>;
|
|
19
24
|
withAuthHook(handler: AuthHandler<SESSION_DATA>): WebhookBuilder<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>;
|
|
20
25
|
withConfiguratorFinalize(handlers: {
|
|
21
26
|
onFinalize: ConfiguratorFinalizeHandler<FINALIZE_DATA, ENTITIES, SESSION_DATA, FRONTEND_DATA>;
|