@salsita-ai/sdk 0.50.0-develop.c33986dc44 → 0.50.0-develop.c402728d10
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 +5 -1
- package/dist/admin/AdminShell.js +1 -1
- package/dist/admin/legacy-admin/Application.js +1 -1
- package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -3
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -1
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
- package/dist/application-spec/generate-application/implementations/phx-model.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +96 -31
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
- package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +25 -20
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
- package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
- package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
- 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.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
- package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
- package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
- package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +30 -1
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +4 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +259 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +64 -6
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +21 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
- 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 +30 -9
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
- package/dist/configurator/common/configurator-interface.d.ts +2 -2
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -5
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +11 -0
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
- package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/attachments/index.js +1 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +19 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +12 -4
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
- package/dist/configurator/ui/assistant/thread-items.d.ts +2 -0
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
- package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
- package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +1 -1
- package/dist/docs/phoenix/domain-model.mdx +4 -1
- package/dist/docs/phoenix/layout-slots.mdx +21 -0
- package/dist/docs/phoenix/migration-guide.mdx +3 -3
- package/dist/docs/phoenix/phoenix-cli.mdx +40 -7
- package/dist/docs/phoenix/project-structure.mdx +23 -19
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +9 -1
- package/dist/domain/application/application-config.d.ts +6 -24
- package/dist/domain/application/assistant/assistant-manifest.d.ts +13 -3
- package/dist/domain/application/assistant/assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +5 -9
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +3 -3
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -4
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
- package/dist/domain/available-system-components/available-system-components.js +1 -0
- package/dist/domain/available-system-components/index.d.ts +1 -0
- package/dist/domain/available-system-components/index.js +1 -0
- package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +2 -2
- package/dist/domain/domain-builder/domain-builder.js +1 -0
- package/dist/domain/domain-builder/index.d.ts +1 -0
- package/dist/domain/domain-builder/index.js +1 -0
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- package/dist/domain/extensions/export-images/index.d.ts +1 -1
- package/dist/domain/extensions/export-images/index.js +1 -1
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +3 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
- package/dist/domain/spec/application/admin-pages.d.ts +26 -0
- package/dist/domain/spec/application/admin-states.d.ts +5 -0
- package/dist/domain/spec/application/configurator-states.d.ts +8 -0
- package/dist/domain/spec/application/configurator-states.js +1 -0
- package/dist/domain/spec/application/index.d.ts +5 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/domain/spec/components/bindings/index.d.ts +2 -0
- package/dist/domain/spec/components/bindings/index.js +1 -0
- package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
- package/dist/domain/spec/components/bindings/read-binding.js +1 -0
- package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
- package/dist/domain/spec/components/bindings/write-binding.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
- package/dist/domain/spec/components/component-entry.js +1 -0
- package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
- package/dist/domain/spec/components/component-filters.d.ts +10 -0
- package/dist/domain/spec/components/component-filters.js +1 -0
- package/dist/domain/spec/components/components.d.ts +4 -0
- package/dist/domain/spec/components/components.js +1 -0
- package/dist/domain/spec/components/index.d.ts +6 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
- package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
- package/dist/domain/spec/enhanced-json/index.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
- package/dist/domain/spec/expressions/expression.js +1 -0
- package/dist/domain/spec/expressions/expressions.d.ts +27 -0
- package/dist/domain/spec/expressions/expressions.js +1 -0
- package/dist/domain/spec/expressions/index.d.ts +5 -0
- package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
- package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
- package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
- package/dist/domain/spec/index.d.ts +9 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/invariants/index.d.ts +2 -0
- package/dist/domain/spec/invariants/index.js +1 -0
- package/dist/domain/spec/invariants/invariant.d.ts +24 -0
- package/dist/domain/spec/invariants/invariant.js +1 -0
- package/dist/domain/spec/invariants/invariants.d.ts +14 -0
- package/dist/domain/spec/invariants/invariants.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +3 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/domain/spec/sections/actions.d.ts +23 -0
- package/dist/domain/spec/sections/actions.js +1 -0
- package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
- package/dist/domain/spec/sections/app-metadata.js +1 -0
- package/dist/domain/spec/sections/application-version.d.ts +7 -0
- package/dist/domain/spec/sections/application-version.js +1 -0
- package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
- package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
- package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
- package/dist/domain/spec/sections/data-spec/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +9 -0
- package/dist/domain/spec/sections/index.js +1 -0
- package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
- package/dist/domain/spec/sections/infra/acl.js +1 -0
- package/dist/domain/spec/sections/infra/index.d.ts +3 -0
- package/dist/domain/spec/sections/infra/index.js +1 -0
- package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
- package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
- package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
- package/dist/domain/spec/sections/infra/resources-config.js +1 -0
- package/dist/domain/spec/sections/state-value.d.ts +7 -0
- package/dist/domain/spec/sections/state-value.js +1 -0
- package/dist/domain/spec/sections/theme.d.ts +10 -0
- package/dist/domain/spec/sections/theme.js +1 -0
- package/dist/domain/spec/sections/transformers.d.ts +15 -0
- package/dist/domain/spec/sections/transformers.js +1 -0
- package/dist/domain/spec/sections/ui.d.ts +12 -0
- package/dist/domain/spec/sections/ui.js +1 -0
- package/dist/domain/system-definitions.js +1 -1
- package/dist/domain/utils/index.d.ts +2 -0
- package/dist/domain/utils/index.js +1 -0
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
- package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/bin.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/activate-deployment.js +1 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/changelog.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/cleanup-environment.js +2 -2
- package/dist/phoenix/commands/create-environment.js +1 -1
- package/dist/phoenix/commands/data.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/dev.js +4 -5
- package/dist/phoenix/commands/docs.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -1
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/inspect-assets.js +1 -1
- package/dist/phoenix/commands/list-environments.js +1 -1
- package/dist/phoenix/commands/login.d.ts +4 -1
- package/dist/phoenix/commands/login.js +2 -2
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/register-deployment.js +1 -1
- package/dist/phoenix/commands/scene.js +1 -1
- package/dist/phoenix/commands/screenshot.js +1 -1
- package/dist/phoenix/commands/state.js +1 -1
- package/dist/phoenix/commands/story-build.js +3 -3
- package/dist/phoenix/commands/story-create.js +1 -1
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/commands/variants.js +1 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +2 -12
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/lingui/lingui.d.ts +18 -0
- package/dist/phoenix/lingui/lingui.js +1 -0
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -6
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/cli-credentials.d.ts +3 -0
- package/dist/phoenix/services/cli-credentials.js +1 -1
- package/dist/phoenix/services/cli-exit.d.ts +5 -0
- package/dist/phoenix/services/cli-exit.js +1 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
- package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +1 -0
- package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
- package/dist/phoenix/services/deployment/index.d.ts +2 -0
- package/dist/phoenix/services/deployment/index.js +1 -0
- package/dist/phoenix/services/index.d.ts +5 -1
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/phoenix-store.d.ts +3 -0
- package/dist/phoenix/services/phoenix-store.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
- package/dist/phoenix/services/session/editor-server-handle.js +1 -0
- package/dist/phoenix/services/session/index.d.ts +2 -0
- package/dist/phoenix/services/session/index.js +1 -0
- package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
- package/dist/phoenix/services/session/phoenix-application.js +2 -0
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
- package/dist/phoenix/services/telemetry/index.d.ts +3 -0
- package/dist/phoenix/services/telemetry/index.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
- package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
- package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
- package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
- package/dist/react-sdk/index.d.ts +5 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/dist/react-sdk/notifications/index.d.ts +1 -0
- package/dist/react-sdk/notifications/index.js +1 -0
- package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
- package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +1 -0
- package/dist/react-sdk/preset-selection/index.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +2 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/watch/glob-matcher.d.ts +4 -4
- package/dist/watch/glob-matcher.js +1 -1
- package/dist/watch/watch.d.ts +4 -4
- package/dist/watch/watch.js +1 -1
- package/package.json +3 -3
- package/schema/domain-spec.json +22 -4
- package/dist/application-spec/core/components/index.d.ts +0 -2
- package/dist/application-spec/core/expressions/index.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- package/dist/domain/available-system-components.d.ts +0 -11
- package/dist/domain/available-system-components.js +0 -1
- package/dist/domain/domain-builder.js +0 -1
- package/dist/phoenix/commands/generated-env-markers.js +0 -1
- package/dist/phoenix/services/lingui.d.ts +0 -15
- package/dist/phoenix/services/lingui.js +0 -1
- package/dist/phoenix/services/phoenix-application.d.ts +0 -21
- package/dist/phoenix/services/phoenix-application.js +0 -1
- /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AssistantScreenshotPicture } from './tool-screenshots.js';
|
|
2
|
+
/**
|
|
3
|
+
* The `src` of a screenshot's or an attached image's picture: the data URL of an inline one at
|
|
4
|
+
* once, and for an uploaded one the object URL the assistant system reads it into, once it has been
|
|
5
|
+
* read; `undefined` until then and when the read fails. The screenshots of a call are read only
|
|
6
|
+
* while their popover is open; the images a user attached are read as soon as their bubble shows.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useScreenshotSrc: (picture: AssistantScreenshotPicture) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as r,useState as e}from"react";import{useConfigurator as n}from"../../../application-runtime/index.js";export const useScreenshotSrc=t=>{let{assistantSystem:i}=n(),o="stored"===t.kind?t.imageId:null,[l,d]=e();return(r(()=>{if(null===o)return;let r=!0;return i.loadScreenshotUrl(o).then(e=>{r&&d({imageId:o,src:e})},()=>void 0),()=>{r=!1}},[i,o]),"inline"===t.kind)?t.src:l?.imageId===o?l.src:void 0};
|
|
@@ -23,6 +23,8 @@ export type AssistantThreadItem = {
|
|
|
23
23
|
readonly kind: 'user';
|
|
24
24
|
readonly id: string;
|
|
25
25
|
readonly text: string;
|
|
26
|
+
/** The images the user attached, by the ids the message references them by. */
|
|
27
|
+
readonly imageIds: readonly string[];
|
|
26
28
|
} | {
|
|
27
29
|
readonly kind: 'text';
|
|
28
30
|
readonly id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{match as t}from"ts-pattern";import{
|
|
1
|
+
import{match as t}from"ts-pattern";import{readAssistantImageReference as e}from"@salsita-ai/contracts/assistant";import{describeToolCall as r}from"./tool-chip.js";let i=t=>{try{return JSON.parse(t)}catch{return t}},o=t=>t.map(t=>"text"===t.type?t.content:"").join("").trim(),s=t=>t.flatMap(t=>"image"===t.type&&"url"===t.source.type?e(t.source.value)??[]:[]);export const buildThreadView=(e,a,l)=>{let n=(t=>{let e=new Map;for(let r of t)for(let t of r.parts)"tool-result"===t.type&&e.set(t.toolCallId,{result:"string"==typeof t.content?i(t.content):t.content,error:"error"===t.state?t.error??"The tool call failed.":void 0});return e})(e),d=[],p=e.at(-1),u=t=>{let e=d.at(-1);e?.kind==="tools"?d[d.length-1]={...e,tools:[...e.tools,t]}:d.push({kind:"tools",id:t.id,tools:[t]})};for(let i of e){if("user"===i.role){let t=o(i.parts),e=s(i.parts);(t||e.length>0)&&d.push({kind:"user",id:i.id,text:t,imageIds:e});continue}let e=a&&i===p,c=t({isLast:i===p,isBusy:e||l}).with({isLast:!1},()=>"hidden").with({isBusy:!0},()=>"disabled").otherwise(()=>"enabled");i.parts.forEach((t,o)=>{let s=`${i.id}:${o}`;if("text"===t.type){if(t.content.trim()){let r=e&&o===i.parts.length-1;d.push({kind:"text",id:s,markdown:t.content,isStreaming:r,forms:c})}return}if("tool-call"!==t.type)return;let a=n.get(t.id),l=t.input,p=t.output??a?.result;u({id:t.id,input:l,result:p,chip:r({name:t.name,input:l,result:p,error:a?.error,isReplyRunning:e})})})}let c=d.at(-1),h=p?.role==="assistant"&&(c?.kind==="text"&&c.isStreaming||c?.kind==="tools");return{items:d,isThinking:a&&!h}};export const buildEarlierThreadItems=t=>t.flatMap(({threadId:t,messages:e})=>[...buildThreadView(e,!1,!1).items.map(e=>"text"===e.kind?{...e,id:`${t}:${e.id}`,forms:"hidden"}:{...e,id:`${t}:${e.id}`}),{kind:"separator",id:`${t}:separator`}]);
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type AssistantToolErrorCode } from '@salsita-ai/contracts/assistant';
|
|
2
2
|
/**
|
|
3
|
-
* How a tool call of the assistant looks in the thread: still running, finished,
|
|
4
|
-
*
|
|
5
|
-
* the
|
|
3
|
+
* How a tool call of the assistant looks in the thread: still running, finished, or gone wrong
|
|
4
|
+
* (`failed`): a change that was not kept, or a read that answered with errors. Both look the same,
|
|
5
|
+
* since the reply says what came of them.
|
|
6
|
+
*/
|
|
7
|
+
export type AssistantToolChipState = 'running' | 'done' | 'failed';
|
|
8
|
+
/**
|
|
9
|
+
* What a tool chip is called: the title or the operation names the model gave, a fixed text, or the
|
|
10
|
+
* tool's name.
|
|
6
11
|
*/
|
|
7
|
-
export type AssistantToolChipState = 'running' | 'done' | 'failed' | 'flawed';
|
|
8
|
-
/** What a tool chip is called: the operation names the model gave, a fixed text, or the tool's name. */
|
|
9
12
|
export type AssistantToolChipLabel = {
|
|
10
13
|
readonly kind: 'text';
|
|
11
14
|
readonly text: string;
|
|
@@ -22,6 +25,12 @@ export interface AssistantToolChip {
|
|
|
22
25
|
* panel knows. Nothing for a call that went wrong for any other reason.
|
|
23
26
|
*/
|
|
24
27
|
readonly errorCode: AssistantToolErrorCode | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The messages of the violations a failed call failed on, written for the user, in result order.
|
|
30
|
+
* Empty for a call that did not fail, that failed for any other reason, or whose violations have
|
|
31
|
+
* no message.
|
|
32
|
+
*/
|
|
33
|
+
readonly violations: readonly string[];
|
|
25
34
|
}
|
|
26
35
|
/** A tool call of a message as the chip reads it. */
|
|
27
36
|
export interface AssistantToolCall {
|
|
@@ -36,9 +45,10 @@ export interface AssistantToolCall {
|
|
|
36
45
|
readonly isReplyRunning: boolean;
|
|
37
46
|
}
|
|
38
47
|
/**
|
|
39
|
-
* Describes one tool call for its chip: the label in the order operation names, fixed text
|
|
40
|
-
* `apply` and `query` tools, tool name; and whether the call runs, finished, or went wrong.
|
|
41
|
-
* went wrong is part of it only as the code of an error the server recorded
|
|
42
|
-
*
|
|
48
|
+
* Describes one tool call for its chip: the label in the order title, operation names, fixed text
|
|
49
|
+
* for the `apply` and `query` tools, tool name; and whether the call runs, finished, or went wrong.
|
|
50
|
+
* Why it went wrong is part of it only as the code of an error the server recorded, or as the
|
|
51
|
+
* messages of the violations it failed on, which are written for the user: the rest of a tool result
|
|
52
|
+
* is worded for the model.
|
|
43
53
|
*/
|
|
44
54
|
export declare const describeToolCall: (call: AssistantToolCall) => AssistantToolChip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Kind as e,parse as t}from"graphql";import{z as
|
|
1
|
+
import{Kind as e,parse as t}from"graphql";import{z as r}from"zod";import{ASSISTANT_TOOL_ERROR_CODES as a,AssistantToolError as n,applyTool as s,queryTool as i}from"@salsita-ai/contracts/assistant";let l=r.object({title:r.string().nullish().catch(void 0),operations:r.array(r.object({query:r.string(),operationName:r.string().nullish()}))}),o=r.object({results:r.array(r.object({errors:r.array(r.unknown()).optional()})),committed:r.boolean()}),u=r.tuple([r.object({type:r.literal("text"),content:r.string()})]).rest(r.unknown()),d=e=>{let t=u.safeParse(e);if(!t.success)return e;try{return JSON.parse(t.data[0].content)}catch{return e}},c=r.object({message:r.string(),extensions:r.object({code:r.literal("VIOLATION"),type:r.string()})});export const describeToolCall=r=>{var u;let f,m=(({name:r,input:a})=>{let n,o,u=(n=l.safeParse(a)).success&&n.data.title?.trim()||void 0;if(null!=u)return{kind:"text",text:u};let d=(o=l.safeParse(a)).success?o.data.operations.flatMap(({query:r,operationName:a})=>a??(r=>{try{let a=t(r).definitions.find(t=>t.kind===e.OPERATION_DEFINITION);return a?.kind===e.OPERATION_DEFINITION?a.name?.value:void 0}catch{return}})(r)??[]):[];return d.length>0?{kind:"text",text:d.join(", ")}:r===s.name?{kind:"updateDesign"}:r===i.name?{kind:"readDesign"}:{kind:"text",text:r}})(r);if(null==r.result&&null==r.error)return{label:m,state:r.isReplyRunning?"running":"done",errorCode:void 0,violations:[]};let p=(e=>{let t=n.safeParse(e);if(t.success)return a.find(e=>e===t.data.code)})(r.result),g=(({name:e,result:t,error:r},a)=>{if(null!=r||null!=a)return"failed";if(e!==s.name&&e!==i.name)return"done";let n=o.safeParse(d(t));if(!n.success)return"failed";let{results:l,committed:u}=n.data;return e===s.name?u?"done":"failed":l.some(({errors:e})=>(e?.length??0)>0)||0===l.length?"failed":"done"})(r,p);return{label:m,state:g,errorCode:p,violations:"failed"===g?(u=r.result,(f=o.safeParse(d(u))).success?f.data.results.flatMap(({errors:e})=>(e??[]).flatMap(e=>{let t=c.safeParse(e);return t.success&&t.data.message!==t.data.extensions.type?[t.data.message]:[]})):[]):[]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as i}from"@lingui/react";import{Button as a,Typography as t,styled as s}from"@mui/material";import{useConfiguratorRouting as o}from"#package/react-sdk";import{PhxIcon as n}from"#package/ui-sdk";let c=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),m=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const GPUAccelerationDisabled=()=>{let{goToIndex:s}=o();return e(c,{children:r(m,{children:[e(n,{name:"CubeDuotone",sx:{fontSize:48}}),e(t,{component:"h1",variant:"h4",sx:{my:4},children:e(i,{id:"sdk.messages.error.gpuDisabled.title",message:"GPU acceleration disabled"})}),e(t,{color:"text.secondary",children:e(i,{id:"sdk.messages.error.gpuDisabled.message",message:"Your browser has GPU acceleration disabled, which prevents the configurator from working correctly. 3D performance is severely impacted. Enabled this option in your browser settings to use the configurator."})}),e(a,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(i,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as t}from"@lingui/react";import{Button as o,Typography as i,styled as s}from"@mui/material";import{useConfiguratorRouting as a}from"#package/react-sdk";import{PhxIcon as n}from"#package/ui-sdk";let m=s("div")(({theme:{spacing:e}})=>({display:"grid",minBlockSize:"100cqb",padding:e(2),placeItems:"center",position:"relative"})),d=s("div")({maxInlineSize:"80ch",textAlign:"center",textWrap:"pretty"});export const WebGLNotSupported=()=>{let{goToIndex:s}=a();return e(m,{children:r(d,{children:[e(n,{name:"CubeDuotone",sx:{fontSize:48}}),e(i,{component:"h1",variant:"h4",sx:{my:4},children:e(t,{id:"sdk.messages.error.webglNotSupported.title",message:"WebGL is not supported or cannot be initialized"})}),e(i,{color:"text.secondary",children:e(t,{id:"sdk.messages.error.webglNotSupported.message",message:"Your device or browser does not support WebGL, which is required for the configurator to function. Try a different browser or device that supports WebGL"})}),e(o,{variant:"text",color:"primary",size:"large",sx:{mt:6.5},onClick:s,children:e(t,{id:"sdk.messages.navigation.goToHomepage.label",message:"Go To Homepage"})})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Trans as n}from"@lingui/react";import{Button as o,DialogActions as r,DialogContent as i,DialogContentText as t,DialogTitle as l,Dialog as s,dialogClasses as c,styled as d}from"@mui/material";import{useMutation as m}from"@tanstack/react-query";import{useCallback as u}from"react";import{useAuthorizedClient as p,useConfigurationId as g,useConfiguratorRouting as k,useDomainApplication as y}from"#package/react-sdk";import{LoadingButton as f}from"#package/ui-sdk";let h=d(s)(()=>({[`.${c.paper}`]:{inlineSize:"min(480px, 100%)",maxWidth:"unset"}}));export const CloneToEditDialog=s=>{let{onClose:c,open:d}=s,{goToConfigurationDetail:b}=k(),C=p(),x=g(),{configurationPersistSystem:v}=y(),{mutate:j,isPending:T}=m({mutationFn:()=>C.cloneConfiguration(x,v.revisionId$.value),onSuccess:e=>{c(),b(e.configurationId,e.accessToken)}}),D=u(()=>{j()},[j]);return a(h,{open:d,onClose:c,children:[e(l,{children:e(n,{id:"sdk.layout.banner.readonly.clone.title",message:"Edit configuration"})}),e(i,{children:e(t,{children:e(n,{id:"sdk.layout.banner.readonly.clone.message",message:"You're about to create an editable copy of this setup. Changes you make won't affect the original shared link."})})}),a(r,{children:[e(o,{variant:"text",color:"inherit",onClick:c,children:e(n,{id:"sdk.layout.banner.readonly.cancel.label",message:"Cancel"})}),e(f,{variant:"contained",color:"primary",busy:T,onClick:D,children:e(n,{id:"sdk.layout.banner.readonly.clone.label",message:"Create editable copy"})})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{useResolveLocalizable as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as a,useResolveLocalizable as i}from"#package/react-sdk";import{Preview as r,useResponsive as n}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as p}from"./use-layout-scene-safe-area.js";let u={id:"sdk.preview.customize.title",message:"Customize product"},m={id:"sdk.preview.start.button.label",message:"Start configuring"},c={layoutId:"ui-layout",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{layout:{type:"spring",bounce:.2,duration:.6},opacity:{duration:.2,ease:"linear"}}};export const DesktopPreview=l=>{let{slotProps:d={},slots:f}=l,{enter:y}=s(),{hasMultiplePresets:g}=a(),{setAnimating:b}=n(),{containerRef:k,safeAreaRef:x,update:S}=p({enabled:!0,hasMiniSidebar:!1}),j=i(),w=e(()=>{b(!0)},[b]),v=e(()=>{b(!1),S()},[b,S]),A=o(()=>({...d,root:{...c,onLayoutAnimationStart:w,onLayoutAnimationComplete:v,...d.root}}),[v,w,d]);return t(r,{title:j(u),buttonLabel:j(m),containerRef:k,safeAreaRef:x,withScene:!g,slots:f,slotProps:A,onStart:y})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{useResolveLocalizable as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useCallback as e,useMemo as o}from"react";import{usePresetSelection as i,useResolveLocalizable as a}from"#package/react-sdk";import{Preview as r}from"#package/ui-sdk";import{usePreview as s}from"../../../configurator-context/index.js";import{useLayoutSceneSafeArea as n}from"./use-layout-scene-safe-area.js";let m={id:"sdk.preview.customize.title",message:"Customize product"},p={id:"sdk.preview.start.button.label",message:"Start configuring"},c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{opacity:{duration:.1,ease:"linear"}}};export const MobilePreview=l=>{let{slotProps:u={},slots:d}=l,{enter:f,isPreview:b}=s(),{hasMultiplePresets:g}=i(),{containerRef:k,safeAreaRef:x,update:y}=n({enabled:b,hasMiniSidebar:!1}),j=a(),w=e(()=>{y()},[y]),S=o(()=>({...u,root:{...c,onLayoutAnimationComplete:w,...u.root}}),[w,u]);return t(r,{title:j(m),buttonLabel:j(p),containerRef:k,safeAreaRef:x,withScene:!g,slots:d,slotProps:S,onStart:f})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as
|
|
1
|
+
import{jsx as a,jsxs as e,Fragment as r}from"react/jsx-runtime";import{useCallback as t,useState as o}from"react";import{useChatEnabled as i,useLocalizable as n}from"#package/react-sdk";import{ExperimentalChatUi as l,MobileChat as m}from"#package/ui-sdk";import{Chat as s}from"./Chat.js";export const MobileChat=c=>{let{icon:h,label:p,heading:d}=c,[b,f]=o(!1),g=i(),u=n(p),C=t(()=>{f(!0)},[]),j=t(()=>{f(!1)},[]);return g?e(r,{children:[a(m.Button,{icon:h,ariaLabel:u,handleOpen:C}),a(m.Dialog,{isOpen:b,handleClose:j,heading:d,children:a(l.ChatRoot,{variant:"mobile",children:a(s,{variant:"mobile"})})})]}):null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as t}from"@mui/material";import{memo as e,useCallback as i}from"react";import{FrontendAnalyticsFactory as a,useAnalyticsService as m,useIntegrationState as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as t}from"@mui/material";import{memo as e,useCallback as i}from"react";import{FrontendAnalyticsFactory as a,useAnalyticsService as m,useConfiguratorRouting as n,useIntegrationState as s,usePresetSelection as c}from"#package/react-sdk";import{PhxIcon as l}from"#package/ui-sdk";import{usePreview as p}from"../../../../configurator-context/index.js";import{CloseConfiguratorButton as d}from"./CloseConfiguratorButton.js";export const CommonTopNavigation=e(()=>{let e=m(),f=n(),{presetCategories:u}=c(),{isPreview:g,isPreviewEnabled:k}=p(),x=u.flatMap(o=>o.presets).length>1,C=s(),j=i(()=>{e.push(a.GoToProductsClicked()),f.goToIndex()},[e,f]);if(!C.embeddedView)return x||!k||g?x?o(t,{size:"small",startIcon:o(l,{name:"ArrowLeft"}),onClick:j,children:o(r,{id:"sdk.layout.navigation.common.product.label",message:"Website"})}):null:o(d,{})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{AnimatePresence as e,motion as r}from"motion/react";import{
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{AnimatePresence as e,motion as r}from"motion/react";import{useChatEnabled as m}from"#package/react-sdk";import{AnimationTarget as a,Sidebar as i}from"#package/ui-sdk";import{ChatInteractionContainer as n}from"../../chat/ChatInteractionContainer.js";import{CommonFinalizeButton as c}from"../common/CommonFinalizeButton.js";import{CommonSidebarFooter as s}from"../common/CommonSidebarFooter.js";import{DesktopSummaryButton as p}from"../common/DesktopSummaryButton.js";import{SimpleSidebarContent as u}from"./SimpleSidebarContent.js";let d={transition:{type:"spring",duration:.3},variants:{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16}}};export const SimpleSidebar=l=>{let{summaryPage:y,customPriceNode:S,onEnterSummary:f,onLeaveSummary:h,price:B,isSummaryActive:j,hasSummary:v}=l,P=m();return t(i.Layout,{content:t(u,{isSummaryActive:j,summaryPage:y,onLeaveSummary:h}),chat:P&&t(n,{}),footer:o(e,{initial:!1,mode:"wait",children:[!v&&t(s,{customPriceNode:S,formattedPrice:B,actionButton:t(c,{}),showTemplateButton:!0,showSaveTemplateButton:!0}),v&&!j&&t(r.div,{...d,...a,children:t(s,{customPriceNode:S,actionButton:t(p,{onEnterSummary:f}),formattedPrice:B,showSaveTemplateButton:!1})},"sidebarFooterSummary"),v&&j&&t(r.div,{...d,...a,children:t(s,{customPriceNode:S,actionButton:t(c,{}),formattedPrice:B,showTemplateButton:!0,showSaveTemplateButton:!0})},"sidebarFooterSummary")]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as t}from"@mui/material";import{memo as e,useCallback as i}from"react";import{FrontendAnalyticsFactory as a,useAnalyticsService as m,usePresetEmbeddedState as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{Button as t}from"@mui/material";import{memo as e,useCallback as i}from"react";import{FrontendAnalyticsFactory as a,useAnalyticsService as m,useConfiguratorRouting as s,usePresetEmbeddedState as n,usePresetSelection as l}from"#package/react-sdk";import{PhxIcon as p}from"#package/ui-sdk";import{usePreview as c}from"../../../../configurator-context/index.js";import{CloseConfiguratorButton as f}from"../common/CloseConfiguratorButton.js";export const SimpleMobileTopNavigation=e(()=>{let e=m(),u=s(),{presetCategories:d}=l(),{isPreview:g,isPreviewEnabled:k}=c(),x=d.flatMap(o=>o.presets).length>1,b=i(()=>{e.push(a.GoToProductsClicked()),u.goToIndex()},[e,u]);if(!n())return x||g||!k?x?o(t,{size:"small",startIcon:o(p,{name:"ArrowLeft"}),onClick:b,children:o(r,{id:"sdk.layout.navigation.mobile.product.label",message:"Website"})}):null:o(f,{})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{memo as i,useCallback as o}from"react";import{FrontendAnalyticsFactory as s,useActiveNavigationState as n,useAnalyticsService as r,
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{memo as i,useCallback as o}from"react";import{FrontendAnalyticsFactory as s,useActiveNavigationState as n,useAnalyticsService as r,useConfiguratorRouting as p,useDomain as c,usePresetEmbeddedState as l,usePresetSelection as d,useResolveLocalizable as m}from"#package/react-sdk";import{TopNavigation as g,useResponsive as u}from"#package/ui-sdk";export const StepsNavigation=i(i=>{let{steps:f}=i,k=r(),{navigationSystem:v,storeSystem:h}=c(),C=n(),S=p(),x=m(),{presetCategories:T}=d(),N=l(),b=T.flatMap(t=>t.presets).length>1,j=!N&&b,I=f.findIndex(t=>t.navigationStates.includes(C))+ +!!j,{isTablet:P}=u(),y=o(()=>{k.push(s.GoToProductsClicked()),S.goToIndex()},[k,S]);return e(g.Root,{activeStep:I,nonLinear:!0,compact:P,fullWidth:!0,children:[j&&t(g.Step,{isCompleted:!0,onClick:y,compact:P,children:t(a,{id:"sdk.layout.navigation.steps.first.label",message:"Products"})}),f.map((e,a)=>{let i=j?a<I-1:a<I,o=x(e.label);return t(g.Step,{isCompleted:i,isDisabled:!i,compact:P,onClick:()=>{let t=e.navigationStates[0];t&&(k.push(s.TopNavigationStepClicked(t)),h.stageAndCommit([v.getNavigationUpdate(t)]))},children:o},o)})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useCallback as a,useMemo as i}from"react";import{customPriceFooterComponent as n,navigationStepsComponent as r,sidebarTabsComponent as s}from"#package/domain";import{useActiveNavigationState as m,useComponents as l,
|
|
1
|
+
import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useCallback as a,useMemo as i}from"react";import{customPriceFooterComponent as n,navigationStepsComponent as r,sidebarTabsComponent as s}from"#package/domain";import{useActiveNavigationState as m,useComponents as l,useConfiguratorRouting as p,useDomain as c,useFirstRootComponent as f,usePresetEmbeddedState as d,usePresetSelection as g,useResolveLocalizable as u,useRootEntityPrice as v,useSelectedDomainEntityId as b,useStoreSelector as j}from"#package/react-sdk";import{MobileControls as S}from"#package/ui-sdk";import{LayoutSlots as x}from"../../../configurator-layout/index.js";import{LayoutDialog as C}from"../../../phoenix-layout-elements/LayoutDialog.js";import{LayoutFooter as y,LayoutToolbarDesktop as k,LayoutToolbarDesktopFullScreen as T}from"../../../phoenix-layout-elements/index.js";import{SaveMessageSnackbars as I}from"../../../save-message-snackbars/index.js";import{FullscreenDesktopToolbar as h}from"../../toolbar/desktop-toolbar/FullscreenDesktopToolbar.js";import{CommonDesktopToolbar as N}from"../common/CommonDesktopToolbar.js";import{CommonFinalizePage as w}from"../common/CommonFinalizePage.js";import{DefaultViewOnlyMessage as A}from"../common/DefaultViewOnlyMessage.js";import{InvariantViolations as D}from"../common/InvariantViolations.js";import{ReactiveInterfaceLayout as E}from"../common/ReactiveInterfaceLayout.js";import{SideEffects as L}from"../common/SideEffects.js";import{ToolControls as M}from"../common/ToolControls.js";import{ViewControls as P}from"../common/ViewControls.js";import{StepsNavigation as V}from"./StepsNavigation.js";import{StepsSideBar as F}from"./StepsSideBar.js";export const StepsOwnerLayout=()=>{let{storeSystem:O,navigationSystem:B}=c(),H=u(),R=m(),U=b(),z=f(r),$=f(n),q=l({componentTypes:[s],entityIds:[U]}),G=i(()=>z?.state.steps??[],[z]),J=i(()=>(q??[]).flatMap(o=>o.state.tabs).map(o=>{let t=o.navigationStates[0];if(!t)throw Error(`Tab ${t} has no navigation states!`);return{label:H(o.label),icon:o.icon,value:t,isActive:o.navigationStates.includes(R)}}),[q,R,H]),K=i(()=>{let o=J.find(o=>o.isActive);return o?.value??"none"},[J]),Q=j(o=>U===o.state.rootEntityId,[U]),W=v(),X=p(),{presetCategories:Y}=g(),Z=d(),_=Y.flatMap(o=>o.presets).length>1,oo=!Z&&_,ot=a(()=>{let o=G.findIndex(o=>o.navigationStates.includes(R)),t=G[o-1];if(!t){oo&&X.goToIndex();return}let e=t.navigationStates[0];e&&O.stageAndCommit([B.getNavigationUpdate(e)])},[B,R,G,oo,X,O]),oe=a(()=>{let o=G.findIndex(o=>o.navigationStates.includes(R)),t=G[o+1];if(!t)return;let e=t.navigationStates[0];e&&O.stageAndCommit([B.getNavigationUpdate(e)])},[B,R,G,O]),oa=i(()=>G.findIndex(o=>o.navigationStates.includes(R))===G.length-1,[G,R]);return o(E,{canvas:o(x.Canvas,{}),sidebar:o(F,{price:W,tabs:J,activeTab:K,isRootPage:Q,customPriceNode:$?.state.node,isLastStep:oa,onNextStepClick:oe,onPreviousStepClick:ot}),viewControls:o(P,{}),toolControls:o(M,{}),topNavigation:o(V,{steps:G}),branding:null,toolbar:o(k,{defaultSlot:()=>o(N,{})}),fullScreenToolbar:o(T,{defaultSlot:()=>o(h,{})}),overlay:t(e,{children:[o(D,{}),o(I,{}),o(w,{}),o(C,{})]}),mobileControls:o(S.ViewOnlyMode,{message:o(A,{})}),mobileTopNavigation:null,mobileHeaderActionButton:null,mobileHeaderCenter:null,sideEffects:o(L,{}),footer:o(y,{})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{AnimatePresence as e}from"motion/react";import{memo as o,useCallback as r}from"react";import{useDomain as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{AnimatePresence as e}from"motion/react";import{memo as o,useCallback as r}from"react";import{useChatEnabled as a,useDomain as i}from"#package/react-sdk";import{Sidebar as m,TabNavigation as n}from"#package/ui-sdk";import{ChatInteractionContainer as p}from"../../chat/ChatInteractionContainer.js";import{PropertyPagePanel as s}from"../../property-page/PropertyPagePanel.js";import{StepsSidebarFooter as c}from"./StepsSidebarFooter.js";export const StepsSideBar=o(o=>{let{price:d,activeTab:f,tabs:g,isRootPage:l,customPriceNode:u,isLastStep:h,onNextStepClick:P,onPreviousStepClick:S}=o,k=a(),{navigationSystem:C,storeSystem:j}=i(),x=r(t=>{j.stageAndCommit([C.getNavigationUpdate(t)])},[C,j]);return t(m.Layout,{header:null,content:t(s,{isRootPage:l}),footer:t(e,{initial:!1,mode:"wait",children:t(c,{customPriceNode:u,formattedPrice:d,isLastStep:h,onNextStepClick:P,onPreviousStepClick:S})}),chat:k&&t(p,{}),aside:g.length>1&&t(n,{onChange:x,value:f,tabs:g})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{AnimatePresence as e,motion as a}from"motion/react";import{memo as r,useCallback as
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{AnimatePresence as e,motion as a}from"motion/react";import{memo as r,useCallback as m}from"react";import{useChatEnabled as i,useDomain as n}from"#package/react-sdk";import{AnimationTarget as s,Sidebar as c,TabNavigation as u}from"#package/ui-sdk";import{ChatInteractionContainer as p}from"../../chat/ChatInteractionContainer.js";import{CommonFinalizeButton as d}from"../common/CommonFinalizeButton.js";import{CommonSidebarFooter as l}from"../common/CommonSidebarFooter.js";import{DesktopSummaryButton as y}from"../common/DesktopSummaryButton.js";import{TabsSidebarContent as f}from"./TabsSidebarContent.js";let h={transition:{type:"spring",duration:.3},variants:{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16}}};export const TabsSidebar=r(r=>{let{price:S,isSummaryActive:g,onEnterSummary:v,activeTab:B,tabs:b,summaryPage:j,onLeaveSummary:P,isRootPage:C,customPriceNode:T,hasSummary:w}=r,k=i(),{navigationSystem:x,storeSystem:F}=n(),N=m(t=>{F.stageAndCommit([x.getNavigationUpdate(t)])},[x,F]);return t(c.Layout,{header:null,content:t(f,{summaryPage:j,isSummaryActive:g,onLeaveSummary:P,isRootPage:C}),footer:o(e,{initial:!1,mode:"wait",children:[!w&&t(l,{customPriceNode:T,formattedPrice:S,actionButton:t(d,{}),showTemplateButton:!0,showSaveTemplateButton:!0}),w&&!g&&t(a.div,{...h,...s,children:t(l,{customPriceNode:T,actionButton:t(y,{onEnterSummary:v}),formattedPrice:S,showSaveTemplateButton:!1})},"sidebarFooterSummary"),w&&g&&t(a.div,{...h,...s,children:t(l,{customPriceNode:T,actionButton:t(d,{}),formattedPrice:S,showTemplateButton:!0,showSaveTemplateButton:!0})},"sidebarFooterSummary")]}),chat:k&&t(p,{}),aside:b.length>1&&t(u,{onChange:N,value:B,tabs:b})})});
|
package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{FrontendAnalyticsFactory as o,useAccessService as t,useAnalyticsService as i,
|
|
1
|
+
import{useMemo as e}from"react";import{FrontendAnalyticsFactory as o,useAccessService as t,useAnalyticsService as i,useConfiguratorRouting as a,useDomainApplication as r,useIntegrationState as d,usePresetSelection as n}from"#package/react-sdk";import{usePreview as s}from"../../../../../configurator-context/index.js";import{useCloseAction as c}from"../../../../../integration/index.js";export const useGoBackAction=()=>{let l=i(),{configurationPersistSystem:p}=r(),u=a(),{presetCategories:m}=n(),{isPreview:w,isPreviewEnabled:f,leave:g}=s(),{accessInfo:x}=t(),k=m.flatMap(e=>e.presets).length>1,v=d(),C=c();return e(()=>v.embeddedView?null:k?async()=>{l.push(o.GoToProductsClicked()),x.viewMode||await p.save(),u.goToIndex()}:null!==C?async()=>{l.push(o.CloseConfiguratorClicked()),x.viewMode||await p.save(),await C()}:f&&!w?()=>{l.push(o.ExpandedViewClosed()),g()}:null,[l,p,k,v.embeddedView,w,f,g,u,C,x.viewMode])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Trans as a}from"@lingui/react";import{memo as o,useCallback as i}from"react";import{FrontendAnalyticsFactory as s,useAnalyticsService as r,useConfiguratorRouting as l,usePresetEmbeddedState as p,usePresetSelection as c}from"#package/react-sdk";import{TopNavigation as n,useResponsive as m}from"#package/ui-sdk";export const StepsNavigation=o(o=>{let{steps:d,activeIndex:u,goTo:g}=o,f=r(),k=l(),{presetCategories:h}=c(),x=p(),C=h.flatMap(t=>t.presets).length>1,b=!x&&C,{isTablet:v}=m(),S=i(()=>{f.push(s.GoToProductsClicked()),k.goToIndex()},[f,k]);return e(n.Root,{activeStep:u+ +!!b,nonLinear:!0,compact:v,fullWidth:!0,children:[b&&t(n.Step,{isCompleted:!0,onClick:S,compact:v,children:t(a,{id:"sdk.layout.navigation.steps.first.label",message:"Products"})}),d.map(e=>{let a="complete"===e.status;return t(n.Step,{isCompleted:a,isDisabled:!a,compact:v,onClick:()=>g(e.index),children:e.label},e.label)})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{customPriceFooterComponent as o,navigationStepsComponent as i}from"#package/domain";import{useAccessService as a,useActiveNavigationState as r,useFirstRootComponent as s,usePresetEmbeddedState as n,useRootEntityPrice as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{customPriceFooterComponent as o,navigationStepsComponent as i}from"#package/domain";import{useAccessService as a,useActiveNavigationState as r,useFirstRootComponent as s,usePresetEmbeddedState as n,usePresetSelection as d,useRootEntityPrice as m}from"#package/react-sdk";import{useHasSidebarSummary as p,useIsSidebarSummaryActive as c}from"../../../../configurator-context/index.js";import{EnterSummaryButton as l,SaveTemplateButton as f}from"../common/index.js";import{BasicFinalizeButton as u}from"./BasicFinalizeButton.js";export const PRICE_LABEL={id:"sdk.layout.sidebar.price.label",message:"Total price"};export const useBasicSidebarFooter=()=>{let g=r(),v=s(i),x=s(o),B=t(()=>v?.state.steps??[],[v]),S=m(),{presetCategories:b}=d(),h=!!n(),j=b.flatMap(e=>e.presets).length>1,k=B.length>1,M=B.find(e=>e.navigationStates.includes(g)),w=t(()=>B.findIndex(e=>e.navigationStates.includes(g)),[B,g]),P=t(()=>0===w,[w]),D=t(()=>w===B.length-1,[w,B.length]),E=h?e(f,{}):e(u,{}),F=c(),I=p(),L=k||!I||F?E:e(l,{}),{accessInfo:y}=a(),z=!y.viewMode&&k&&(!D||!L),A=!y.viewMode&&k,C=!y.viewMode&&(!k||D);return{currentStep:M,currentStepIndex:w,customPriceNode:x?.state.node??void 0,finalizeOrSummaryButton:L,formattedPrice:x?.state.node?void 0:S??void 0,hasSteps:k,nextStepButtonDisabled:D,previousStepButtonDisabled:P&&!(!h&&j),showFinalizeButton:C,showNextStepButton:z,showPreviousStepButton:A,totalSteps:B.length}};
|
package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{IconButton as t,Tooltip as r}from"@mui/material";import{memo as o,useCallback as i}from"react";import{createPhoenixLayoutElement as a,previousStepButtonSchema as m}from"#package/domain";import{FrontendAnalyticsFactory as s,useAnalyticsService as n,
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{IconButton as t,Tooltip as r}from"@mui/material";import{memo as o,useCallback as i}from"react";import{createPhoenixLayoutElement as a,previousStepButtonSchema as m}from"#package/domain";import{FrontendAnalyticsFactory as s,useAnalyticsService as n,useConfiguratorRouting as l,useLocalizable as p,useStepNavigation as c}from"#package/react-sdk";import{PhxIcon as d,useResponsive as u}from"#package/ui-sdk";import{useBackToPresetEnabled as f,useSteps as k}from"../../../../configurator-context/index.js";let g={id:"sdk.layout.sidebar.previousStep.label",message:"Previous step"};export const PreviousStepButton=a({schema:m,component:o(o=>{let{icon:a}=o,m=p(g),x=n(),h=f(),v=l(),{canGoPrevious:S,previous:b}=c(),{isDesktop:j}=u(),{previousStepDisabled:C}=k();return e(r,{title:m,placement:"top",children:e("span",{style:{alignSelf:"center"},children:e(t,{variant:"muted",color:"default",size:j?"medium":"small",disabled:C,onClick:i(()=>{S?b():(x.push(s.PreviousStepButtonClicked()),h&&v.goToIndex())},[x,h,S,b,v]),children:e(d,{name:a??"CaretLeft"})})})})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useCallback as r,useState as s}from"react";import{
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useCallback as r,useState as s}from"react";import{usePresetSelection as o,useResolveLocalizable as l,useResourceUrl as n}from"#package/react-sdk";import{Preset as a}from"#package/ui-sdk";import{ConfigurationNotFoundPageElement as d}from"../../configuration-not-found-page/index.js";import{usePreview as m}from"../../configurator-context/index.js";import{ClosePresetScreenButton as c}from"./ClosePresetScreenButton.js";import{PresetBackButton as g}from"./PresetBackButton.js";import{PresetPreviewLayout as p}from"./PresetPreviewLayout.js";import{PresetSnackbarsRoot as u}from"./PresetSnackbarsRoot.js";let f={id:"sdk.presets.select.button.label",message:"Select"},k={id:"sdk.presets.detail.close.label",message:"Close"},S={id:"sdk.presets.detail.learnMore.label",message:"Learn more"},h={id:"sdk.presets.detail.select.label",message:"Select"},B=t=>{let{id:i,name:s,description:d,img:m,imgAlt:c,detailTitle:g,detailDescription:p}=t,{selectPreset:u,creatingPresetId:B}=o(),b=l(),{getResourceUrl:C}=n(),T=r(()=>{u(i)},[u,i]),j=(m&&C(m))??"",y=B===i;return e(a.Card,{title:b(s),description:b(d),imgSrc:j,imgAlt:b(c),selectButtonTitle:b(f),loading:y,disabled:null!==B&&!y,onSelect:T,additionalInfoButton:void 0!==g&&void 0!==p&&e(a.DetailDialog,{img:j,imgAlt:b(c),detailTitle:b(g),detailDescription:b(p),closeButtonTitle:b(k),learnMoreLinkTitle:b(S),selectButtonTitle:b(h),onSelect:T})},b(s))},b=t=>{let{id:i,name:s,description:o,img:d,imgAlt:m,onSelect:c}=t,g=l(),{getResourceUrl:p}=n(),u=r(()=>{c(i)},[c,i]);return e(a.Card,{title:g(s),description:g(o),imgSrc:(d&&p(d))??"",imgAlt:g(m),selectButtonTitle:g(f),onSelect:u},g(s))},C={id:"sdk.presets.category.count.message",message:"{presetCount, plural, one {# preset} other {# presets}}"},T=t=>{let{selectedCategory:r,onCategorySelected:s}=t,{presetCategories:n}=o(),a=l();if(1===n.length)return e(i,{children:n[0].presets.map(t=>e(B,{id:t.id,name:t.name,description:t.description,img:t.img,imgAlt:t.imgAlt,detailTitle:t.detailTitle,detailDescription:t.detailDescription},t.id))});if(null!==r){let t=n.find(e=>e.id===r);if(void 0===t)throw Error(`Category with id ${r} not found!`);return e(i,{children:t.presets.map(t=>e(B,{id:t.id,name:t.name,description:t.description,img:t.img,imgAlt:t.imgAlt,detailTitle:t.detailTitle,detailDescription:t.detailDescription},t.id))})}return e(i,{children:n.map(t=>e(b,{id:t.id,name:t.name,description:t.description??a({...C,values:{presetCount:t.presets.length}}),img:t.img,imgAlt:t.imgAlt,onSelect:s},t.id))})},j={id:"sdk.presets.category.heading.title",message:"Select starting preset"},y={id:"sdk.presets.preview.title",message:"Customize product"},A={id:"sdk.presets.start.button.label",message:"Start configuring"};export const CategoryPresetUi=n=>{let{action:f,footer:k,overlay:S}=n,[h,B]=s(null),{isPreview:b}=m(),C=l(),v=r(()=>{B(null)},[]),{presetCategories:x}=o();return b?e(p,{title:C(y),startButtonLabel:C(A)}):0===x.length?e(d,{}):t(i,{children:[e(a.ScreenLayout,{heading:C(j),action:f,footer:k,overlay:S,backButton:h&&e(g,{onBack:v}),closeButton:!h&&e(c,{}),children:e(T,{selectedCategory:h,onCategorySelected:B})}),e(u,{})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Trans as r}from"@lingui/react";import{useSnackbar as s}from"notistack";import{useEffect as t}from"react";import{useApplicationRuntime as i,useApplicationRuntimeSelector as o,useConfiguratorMessages as a}from"#package/react-sdk";let n="phx-configuration-persist-system-failure";export const SaveMessageSnackbars=()=>{let m=o(i().selectors.domainContext.configurator.getIsViewMode),{enqueueSnackbar:c,closeSnackbar:d}=s();return t(()=>{m&&d(n)},[m,d]),a(s=>{m||("saveError"===s.kind&&c(e(r,{id:"sdk.persist.system.error.message",message:"An error occured when trying to update a configuration"}),{variant:"error",key:n,persist:!0,preventDuplicate:!0,actionButton:{label:e(r,{id:"sdk.persist.system.error.dismiss",message:"Dismiss"}),onClick:e=>{d(e)}}}),"saveRecovery"===s.kind&&(d(n),c(e(r,{id:"sdk.persist.system.error.recovered",message:"Configuration updated"}),{variant:"info"})))}),null};
|
|
@@ -49,7 +49,8 @@ Custom camera behavior is implemented via `scheduleCameraTransition` inside an `
|
|
|
49
49
|
```tsx
|
|
50
50
|
import { useEffect } from 'react'
|
|
51
51
|
|
|
52
|
-
import { CameraControlType,
|
|
52
|
+
import { CameraControlType, useConfigurator } from '@salsita-ai/sdk/configurator'
|
|
53
|
+
import { createOnConfiguratorReadyProvider } from '@salsita-ai/sdk/react'
|
|
53
54
|
|
|
54
55
|
export default createOnConfiguratorReadyProvider(({ children }) => {
|
|
55
56
|
const { cameraControlSystem } = useConfigurator()
|
|
@@ -238,7 +239,8 @@ components:
|
|
|
238
239
|
```tsx
|
|
239
240
|
import { useEffect } from 'react'
|
|
240
241
|
|
|
241
|
-
import { CameraControlType,
|
|
242
|
+
import { CameraControlType, useConfigurator } from '@salsita-ai/sdk/configurator'
|
|
243
|
+
import { createOnConfiguratorReadyProvider } from '@salsita-ai/sdk/react'
|
|
242
244
|
|
|
243
245
|
export default createOnConfiguratorReadyProvider(({ children }) => {
|
|
244
246
|
const { cameraControlSystem } = useConfigurator()
|
|
@@ -777,7 +777,7 @@ components:
|
|
|
777
777
|
autoRotate: true
|
|
778
778
|
# Back-to-back snap: the dragged cabinet's back snaps onto another
|
|
779
779
|
# cabinet's back face (the snapPlane below). autoRotate orients it
|
|
780
|
-
# 180° so the two cabinets face away from each other.
|
|
780
|
+
# 180° so the two cabinets face away from each other. This is the
|
|
781
781
|
# shape that drives the within-MTV bug when the target is flush
|
|
782
782
|
# against a wall — AutoSnap puts the dragged cabinet behind the
|
|
783
783
|
# wall, Pass 1 within clamps it back into the room, and Pass 2
|
package/dist/docs/index.json
CHANGED
|
@@ -547,7 +547,7 @@ export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout
|
|
|
547
547
|
- `LayoutSlots.DesktopSidebar` is the built-in desktop sidebar as one piece: the spec's tabs, back button, property pages and sidebar footer with their spacing, scrolling and empty states, and the assistant panel. Use it when the spec's property pages are what the customer should see and only their place changes, for example a sidebar on the left; build the controls yourself when they have to look like the brand's own. Without `width` it fills its container, so the layout positions and sizes that container; `miniSidebar` does not shrink it, so a layout that honours it reads `LayoutSlots.useSidebarContent().hasMiniSidebar` and lets the container take the sidebar's height. Its tabs sit outside it on the left; `side="start"` puts them on its right, for a sidebar on the left. In fullscreen it stays in place, transparent and inert, so a layout that wants the space back removes it while `phx.frontend.useIsFullscreenActive()` is set. See [Sidebar in a Custom Layout](?path=/docs/layouts-sidebar-in-a-custom-layout--docs).
|
|
548
548
|
- Nothing of the built-in layouts is rendered for it. A project layout finalizes over the spec's `finalizeAction` components, see the finalize paragraph of [Hooks for a Project Layout](#hooks-for-a-project-layout). The `finalizePage` and `finalizeButton` components are legacy: they cannot be declared in YAML, only in TypeScript, and `Legacy.CommonFinalizePage`, which is deprecated, shows a `finalizePage` for projects that still have one. `LayoutDialog` renders only what the project registers with `createLayoutDialog` and is not part of the finalize flow. The preview start screen is `DesktopPreview` or `MobilePreview`, which the layout shows while `phx.frontend.usePreview().isPreview` is set. Both previews frame the scene themselves, so the layout renders the component that calls `phx.frontend.useSceneSafeArea()` only while `isPreview` is not set; it then measures when it mounts after the preview. The assistant panel is available to a project layout only inside `LayoutSlots.DesktopSidebar`.
|
|
549
549
|
- The layout reads the state it has to react to from hooks, listed with what each returns in [Hooks for a Project Layout](#hooks-for-a-project-layout).
|
|
550
|
-
- Messages for the user come one of two ways. `LayoutSlots.Services` shows violations of a rejected change, side-effect hints, errors and failed saves as the built-in snackbars, which render into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot` wherever the layout mounts it. `phx.frontend.useConfiguratorMessages(onMessage)` hands the same messages to the layout's own UI instead, with their text resolved, as the toast in [Custom Layout](?path=/docs/layouts-custom-layout--docs#show-messages) does; mount one of the two, not both, or every message is shown twice. A failure to save the configuration, and the first successful save after it, are messages too, so a layout that mounts neither shows no sign of a failed save. An error of the built-in finalize and other actions stays a snackbar either way. It renders into the snackbar root, so a layout that mounts none shows it outside the configurator, in the page's `body`. A failure to start a configuration from a preset is not a message of the hook either: it happens on the preset screen, before any `ConfiguratorLayout` mounts. In production with more than one preset it is a snackbar there, also on a preset screen replaced with `createPresetUi` (see [Preset UI](#preset-ui)), which reads the error from `phx.frontend.usePresetSelection().selectionError` and mounts `PresetSnackbarsRoot` to keep the snackbar inside the configurator. With a single preset it is the [Configurator Error Page](#configurator-error-page). A finalize action the layout runs with `phx.frontend.useFinalizeActions` or `phx.frontend.useFinalizeAction` reports its error as the action's `error` instead, neither as a message nor as a snackbar.
|
|
550
|
+
- Messages for the user come one of two ways. `LayoutSlots.Services` shows violations of a rejected change, side-effect hints, errors and failed saves as the built-in snackbars, which render into `LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot` wherever the layout mounts it; the theme styles them, see [Layout Slots → Styling the snackbars](?path=/docs/phoenix-layout-slots--docs#styling-the-snackbars). `phx.frontend.useConfiguratorMessages(onMessage)` hands the same messages to the layout's own UI instead, with their text resolved, as the toast in [Custom Layout](?path=/docs/layouts-custom-layout--docs#show-messages) does; mount one of the two, not both, or every message is shown twice. A failure to save the configuration, and the first successful save after it, are messages too, so a layout that mounts neither shows no sign of a failed save. An error of the built-in finalize and other actions stays a snackbar either way. It renders into the snackbar root, so a layout that mounts none shows it outside the configurator, in the page's `body`. A failure to start a configuration from a preset is not a message of the hook either: it happens on the preset screen, before any `ConfiguratorLayout` mounts. In production with more than one preset it is a snackbar there, also on a preset screen replaced with `createPresetUi` (see [Preset UI](#preset-ui)), which reads the error from `phx.frontend.usePresetSelection().selectionError` and mounts `PresetSnackbarsRoot` to keep the snackbar inside the configurator. With a single preset it is the [Configurator Error Page](#configurator-error-page). A finalize action the layout runs with `phx.frontend.useFinalizeActions` or `phx.frontend.useFinalizeAction` reports its error as the action's `error` instead, neither as a message nor as a snackbar.
|
|
551
551
|
- Any project layout element named `ConfiguratorLayout` takes over the page.
|
|
552
552
|
|
|
553
553
|
`defaultConfiguratorElements`, exported from `@salsita-ai/sdk/configurator`, holds the built-in UI as a `ConfiguratorLayout` registration that renders the layout the spec selects, the built-in not-found page as a `ConfigurationNotFoundPage` registration, the built-in not-authenticated page as a `NotAuthenticatedPage` registration, the built-in preset screen as a `PresetUi` registration, the built-in error page as a `ConfiguratorErrorPage` registration, the app loader's built-in content as an `AppLoaderContent` registration, and the built-in in-scene controls under the names of [In-Scene Controls](#in-scene-controls). Generated code registers these defaults with `withDefaultElements`, apart from the project's elements, so the built-in UI is a registration like any other; a project element registered under the same name wins over a default. The list also holds the configurator's built-in controls and layout elements under the kinds the spec names them by, such as `attributeSelect` or `undoToolbarButton`, so a project element registered under one of those names replaces the built-in one wherever the spec names that kind. A config assembled by hand, without generated code, calls `withDefaultElements(defaultConfiguratorElements)` too; the lists are the only way the built-in elements are registered, so without it the page shows a "not found" box instead of the configurator, and a project layout shows one in place of every built-in control. The admin mounts a full configurator, so its list, `defaultAdminElements` from `@salsita-ai/sdk/admin`, holds the configurator's defaults followed by the admin's built-in pages, sidebars and actions; generated admin code passes it to `withDefaultElements` in place of `defaultConfiguratorElements`, because each call replaces the defaults passed before.
|
|
@@ -842,7 +842,10 @@ Phoenix automatically:
|
|
|
842
842
|
During `phoenix dev`, schema-compatible configurator changes can refresh the mounted application in
|
|
843
843
|
place. Changes to the domain model itself are rejected from live application and require a restart;
|
|
844
844
|
this preserves the last valid runtime and loaded configuration until migration and deployment can be
|
|
845
|
-
coordinated atomically.
|
|
845
|
+
coordinated atomically. With server persistence, restart `phoenix dev` itself: it logs an error that
|
|
846
|
+
asks for the restart, and registers the changed model with its development deployment when it starts
|
|
847
|
+
again. Then open the preview address it prints rather than a tab whose address has `?cid=`, which
|
|
848
|
+
loads a configuration saved with the earlier model.
|
|
846
849
|
|
|
847
850
|
### The phx Global Namespace
|
|
848
851
|
|
|
@@ -44,6 +44,27 @@ export const Toolbar = () => (
|
|
|
44
44
|
- `SharedCanvas` fills its nearest positioned ancestor and paints an opaque background, so the layout positions its own UI after it in the markup.
|
|
45
45
|
- Snackbars are raised by `Services`, for violations, side-effect hints, validation errors and a failed save, and also by the built-in finalize and footer actions when their handler fails. A layout that shows these messages its own way calls `phx.frontend.useConfiguratorMessages(onMessage)` instead of mounting `Services`, and then shows the failed save too, see [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout); the other snackbars still need a root. They render into the snackbar root the layout mounts; with no root mounted they render into the page's `document.body`, outside the configurator. The desktop root is a zero-height element the snackbars stack upwards from, so the layout places it where their bottom edge belongs. The phone root leaves them fixed to the viewport, see `MobileSnackbarsRoot`. A finalize action the layout runs with `phx.frontend.useFinalizeActions` or `phx.frontend.useFinalizeAction` raises no snackbar; its error is the action's `error`.
|
|
46
46
|
|
|
47
|
+
### Styling the snackbars
|
|
48
|
+
|
|
49
|
+
Every snackbar of the configurator and the admin, raised by `Services`, a failed save, a failed preset creation or a built-in action, renders as `PhxSnackbar` from `@salsita-ai/sdk/ui`: an MUI `Alert` with the snackbar's variant as its severity, inside notistack's `SnackbarContent`. A project restyles the configurator's snackbars in its theme, from [`createGetThemeHandler`](?path=/docs/layouts-custom-theme-handler--docs), under `components.PhxSnackbar` (the admin's snackbars follow the admin's own theme, which ignores the theme handler):
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// Part of the ThemeOptions a theme handler returns
|
|
53
|
+
const components: ThemeOptions['components'] = {
|
|
54
|
+
PhxSnackbar: {
|
|
55
|
+
styleOverrides: {
|
|
56
|
+
alert: ({ theme }) => ({ borderRadius: 0, boxShadow: theme.shadows[3] }),
|
|
57
|
+
actionButton: { fontWeight: 600, textTransform: 'none' },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- `styleOverrides` styles three slots: `content`, notistack's outer element; `alert`, the `Alert` with the message; and `actionButton`, a button such as **Dismiss**.
|
|
64
|
+
- `defaultProps.slotProps` passes props to the slots, such as `{ alert: { variant: 'filled' } }`, and `defaultProps.slots` replaces a slot's component. The `MuiAlert` and `MuiButton` overrides of the theme reach the snackbars too.
|
|
65
|
+
- A snackbar's button is described as data, not as an element: the code that raises it passes `actionButton: { label, onClick }` to notistack's `enqueueSnackbar`, and `PhxSnackbar` renders it in the `actionButton` slot, an MUI `Button` with `color="inherit"` and `size="small"`, after the snackbar's notistack `action` if it has one. `onClick` receives the snackbar's key, to close it with `closeSnackbar`. A project's own snackbars take the same option, typed by `SnackbarActionButton` from `@salsita-ai/sdk/react`, so their buttons follow the theme; an element passed as `action` renders as it is.
|
|
66
|
+
- Where the snackbars appear is the snackbar root's job, see `DesktopSnackbarsRoot` and `MobileSnackbarsRoot`.
|
|
67
|
+
|
|
47
68
|
## Desktop sidebar
|
|
48
69
|
|
|
49
70
|
| Member | Shows | Fed by | With nothing configured | Read mode |
|
|
@@ -371,14 +371,14 @@ pnpm phoenix build
|
|
|
371
371
|
|
|
372
372
|
**Error:** Custom gitignore entries disappear after Phoenix update
|
|
373
373
|
|
|
374
|
-
**Solution:** Place custom entries
|
|
374
|
+
**Solution:** Place custom entries outside the Phoenix markers. Sync replaces the generated block and preserves everything outside it:
|
|
375
375
|
|
|
376
376
|
```gitignore
|
|
377
|
-
#
|
|
377
|
+
# ===== BEGIN PHOENIX AUTO-GENERATED =====
|
|
378
378
|
# Auto-generated by Phoenix - DO NOT EDIT
|
|
379
379
|
.phoenix/
|
|
380
380
|
.env.generated
|
|
381
|
-
#
|
|
381
|
+
# ===== END PHOENIX AUTO-GENERATED =====
|
|
382
382
|
|
|
383
383
|
# Your custom entries below
|
|
384
384
|
my-custom-folder/
|