@salsita-ai/sdk 0.50.0-develop.da8d27f5d7 → 0.50.0-develop.dbf0122072
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 +19 -11
- package/dist/{phoenix/application-spec → application-spec/assistant}/generate-assistant-prompt.d.ts +6 -5
- package/dist/application-spec/assistant/generate-assistant-prompt.js +1 -0
- package/dist/application-spec/assistant/index.d.ts +1 -0
- package/dist/application-spec/assistant/index.js +1 -0
- package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +11 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +7 -7
- package/dist/application-spec/generate-application/code/templates/domain.js +2 -2
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
- package/dist/application-spec/generate-application/code/templates/index.d.ts +7 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -0
- package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.d.ts → skills/phoenix-create-configurator-skill.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.js → skills/phoenix-create-configurator-skill.js} +43 -13
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +54 -0
- package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.js → skills/phoenix-review-skill.js} +7 -5
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
- package/dist/application-spec/generate-application/code/templates/{common → skills}/sdk-content.d.ts +52 -3
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +82 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/index.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
- package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +14 -39
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -19
- package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +180 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
- package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
- package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
- 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 +16 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +21 -21
- package/dist/configurator/index.d.ts +0 -1
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/index.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
- package/dist/configurator/ui/assistant/theme.d.ts +2 -0
- package/dist/configurator/ui/assistant/theme.js +1 -0
- package/dist/configurator/ui/assistant/thread-items.d.ts +37 -0
- package/dist/configurator/ui/assistant/thread-items.js +1 -0
- package/dist/configurator/ui/assistant/tool-chip.d.ts +44 -0
- package/dist/configurator/ui/assistant/tool-chip.js +1 -0
- package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
- package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
- package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
- package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
- package/dist/docs/index.json +12 -2
- package/dist/docs/layouts/toolbar.mdx +6 -0
- package/dist/docs/other-features/domain-actions.mdx +418 -0
- package/dist/docs/other-features/side-effects.mdx +26 -0
- package/dist/docs/phoenix/admin.mdx +2 -2
- package/dist/docs/phoenix/best-practices.mdx +1 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
- package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
- package/dist/docs/phoenix/migrations.mdx +45 -5
- package/dist/docs/phoenix/phoenix-cli.mdx +139 -20
- package/dist/docs/phoenix/project-structure.mdx +7 -3
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -8
- package/dist/domain/actions/action-factory.d.ts +10 -0
- package/dist/domain/actions/action-factory.js +1 -0
- package/dist/domain/actions/prepare-action-implementations.d.ts +15 -0
- package/dist/domain/actions/prepare-action-implementations.js +5 -0
- package/dist/domain/application/application-config.d.ts +2 -60
- package/dist/domain/application/assistant/assistant-manifest.d.ts +61 -0
- package/dist/domain/application/assistant/assistant-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -0
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
- package/dist/domain/application/assistant/index.d.ts +3 -0
- package/dist/domain/application/assistant/index.js +1 -0
- package/dist/domain/application/assistant-field-options.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +16 -15
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +4 -3
- package/dist/domain/application/index.d.ts +2 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/components/updates.d.ts +16 -0
- package/dist/domain/core/action.d.ts +67 -0
- package/dist/domain/core/action.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -0
- package/dist/domain/core/index.d.ts +1 -0
- package/dist/domain/domain-builder.d.ts +7 -0
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +40 -0
- package/dist/domain/domain-context/action-system/action-system.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +5 -2
- package/dist/domain/domain-context/index.d.ts +2 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +4 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -4
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +18 -4
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +8 -2
- package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
- package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
- package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
- package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
- package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
- package/dist/editor/variants/VariantAnswerFooter.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
- package/dist/editor/variants/variant-preview-styles.js +1 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/build.d.ts +5 -0
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/deploy.js +2 -2
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/feedback.d.ts +2 -1
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/login.d.ts +24 -6
- package/dist/phoenix/commands/login.js +2 -2
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/variants.d.ts +35 -0
- package/dist/phoenix/commands/variants.js +1 -0
- package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
- package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/protocol.d.ts +1 -0
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +3 -0
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/index.d.ts +5 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-application.d.ts +21 -0
- package/dist/phoenix/services/phoenix-application.js +1 -0
- package/dist/phoenix/services/phoenix-store.d.ts +48 -0
- package/dist/phoenix/services/phoenix-store.js +1 -0
- package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
- package/dist/phoenix/services/phx-banner-plugin.js +1 -0
- package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
- package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
- package/dist/phoenix/services/variant-file-session.d.ts +36 -0
- package/dist/phoenix/services/variant-file-session.js +1 -0
- package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
- package/dist/phoenix/services/variant-preview-service.js +1 -0
- package/dist/phoenix/services/vite-config.d.ts +2 -0
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
- package/dist/phoenix/utils/read-git-commit.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
- package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
- package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +16 -4
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
- package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
- package/dist/ui-sdk/common/use-viewport-size.js +1 -1
- package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +4 -0
- package/package.json +5 -8
- package/schema/domain-spec.json +24 -0
- package/dist/application-spec/generate-application/code/templates/agents-md.js +0 -2
- package/dist/application-spec/generate-application/code/templates/common/sdk-content.js +0 -67
- package/dist/application-spec/generate-application/code/templates/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/phoenix-feedback-skill.js +0 -31
- package/dist/application-spec/generate-application/code/templates/phoenix-skill.js +0 -1
- package/dist/configurator/assistant/browser-details.js +0 -1
- package/dist/configurator/assistant/graphql-tools.js +0 -1
- package/dist/configurator/assistant/index.d.ts +0 -1
- package/dist/configurator/assistant/index.js +0 -1
- package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
- package/dist/configurator/assistant/use-assistant-chat.js +0 -1
- package/dist/extras/assistant/AssistantChat.d.ts +0 -6
- package/dist/extras/assistant/AssistantChat.js +0 -1
- package/dist/extras/assistant/index.d.ts +0 -1
- package/dist/extras/assistant/index.js +0 -1
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
- /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.d.ts +0 -0
- /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js +0 -0
- /package/dist/application-spec/generate-application/code/templates/{agents-md.d.ts → skills/agents-md.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-cli-skill.d.ts → skills/phoenix-cli-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-feedback-skill.d.ts → skills/phoenix-feedback-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.d.ts → skills/phoenix-review-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-skill.d.ts → skills/phoenix-skill.d.ts} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import type { Logger } from '../utils/index.js';
|
|
3
|
+
import type { ApplicationSpecProjectWatcher } from './application-spec-project-watcher.js';
|
|
4
|
+
import type { PhoenixStore, VariantPreviewOption, VariantPreviewRequest, VariantPreviewResult } from './phoenix-store.js';
|
|
5
|
+
import { type VariantFileEdit } from './variant-file-session.js';
|
|
6
|
+
/** What a command asks the editor to show, and how long it waits for the answer. */
|
|
7
|
+
export interface VariantPreviewInput {
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly variants: readonly VariantPreviewOption[];
|
|
11
|
+
readonly timeoutMs: number;
|
|
12
|
+
}
|
|
13
|
+
/** How a wait for the builder's answer ended. `waiting` leaves the comparison open. */
|
|
14
|
+
export type VariantPreviewOutcome = ({
|
|
15
|
+
readonly status: 'settled';
|
|
16
|
+
} & VariantPreviewResult) | {
|
|
17
|
+
readonly status: 'closed';
|
|
18
|
+
} | {
|
|
19
|
+
readonly status: 'waiting';
|
|
20
|
+
};
|
|
21
|
+
/** The files of one option, as the editor collected them from its script. */
|
|
22
|
+
export interface VariantFilesInput {
|
|
23
|
+
readonly requestId: string;
|
|
24
|
+
readonly choice: string | null;
|
|
25
|
+
readonly files: readonly VariantFileEdit[];
|
|
26
|
+
}
|
|
27
|
+
export interface VariantPreviewServiceProps {
|
|
28
|
+
readonly projectRoot: string;
|
|
29
|
+
}
|
|
30
|
+
export interface VariantPreviewServiceContext {
|
|
31
|
+
readonly store: PhoenixStore;
|
|
32
|
+
readonly logger: Logger;
|
|
33
|
+
readonly projectWatcher: Pick<ApplicationSpecProjectWatcher, 'suspend' | 'resume' | 'applyVariantFiles'>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Owns the variant comparison of a dev session: which one is open, the file session that rewrites and
|
|
37
|
+
* restores the source files for it, and the answer. Its state lives in the store; every operation that
|
|
38
|
+
* changes it runs one at a time.
|
|
39
|
+
*/
|
|
40
|
+
export declare class VariantPreviewService {
|
|
41
|
+
private readonly props;
|
|
42
|
+
private readonly context;
|
|
43
|
+
private readonly queue;
|
|
44
|
+
private readonly result$;
|
|
45
|
+
private readonly closed$;
|
|
46
|
+
private session;
|
|
47
|
+
private editors;
|
|
48
|
+
/**
|
|
49
|
+
* The comparison an editor has to show, or `null`. A subscriber counts as a connected editor, and gets
|
|
50
|
+
* the open comparison at once, so a reloaded browser tab shows it again.
|
|
51
|
+
*/
|
|
52
|
+
readonly request$: Observable<VariantPreviewRequest | null>;
|
|
53
|
+
constructor(props: VariantPreviewServiceProps, context: VariantPreviewServiceContext);
|
|
54
|
+
/** True while option edits may be in the source files, so nothing else should write or deploy them. */
|
|
55
|
+
get isOpen(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Opens the comparison in the editor and waits for the builder's answer. A wait that times out leaves
|
|
58
|
+
* it open, and a later call with the same options attaches to it again.
|
|
59
|
+
*/
|
|
60
|
+
open(input: VariantPreviewInput): Promise<VariantPreviewOutcome>;
|
|
61
|
+
getBaseline(requestId: string): {
|
|
62
|
+
readonly files: readonly VariantFileEdit[];
|
|
63
|
+
readonly choice: string | null;
|
|
64
|
+
};
|
|
65
|
+
applyFiles(input: VariantFilesInput): Promise<void>;
|
|
66
|
+
submit(result: VariantPreviewResult): Promise<void>;
|
|
67
|
+
/** Closes whichever comparison is open without an answer, for a command that gives up on it. */
|
|
68
|
+
close(): Promise<{
|
|
69
|
+
readonly closed: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
claim(requestId: string): void;
|
|
72
|
+
/** Restores the baseline when the dev session ends with a comparison still open. */
|
|
73
|
+
dispose(): Promise<void>;
|
|
74
|
+
private get state();
|
|
75
|
+
private setState;
|
|
76
|
+
/** Takes a comparison off the screen without an answer and ends the wait of the command that opened it. */
|
|
77
|
+
private forget;
|
|
78
|
+
private startSession;
|
|
79
|
+
private endSession;
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"promise-queue";import{Observable as t,Subject as s,distinctUntilChanged as i,filter as r,firstValueFrom as o,map as n,merge as a,of as h,timeout as l}from"rxjs";import{VariantFileSession as c}from"./variant-file-session.js";export class VariantPreviewService{props;context;queue=new e(1,1/0);result$=new s;closed$=new s;session=null;editors=0;request$=new t(e=>{this.editors+=1;let t=this.context.store.variantPreview$.pipe(n(e=>e.open),i()).subscribe(e);return()=>{this.editors-=1,t.unsubscribe()}});constructor(e,t){this.props=e,this.context=t}get isOpen(){return null!==this.session}async open(e){return(await this.queue.add(async()=>{let t=t=>JSON.stringify(t.variants)===JSON.stringify(e.variants),{open:s,unclaimed:i}=this.state;if(i&&t(i.request))return{outcome:Promise.resolve({status:"settled",...i.result})};if(0===this.editors)throw Error("No editor connected. Open the configurator in a browser");let c=s&&t(s)?s:{requestId:crypto.randomUUID(),title:e.title,description:e.description,variants:e.variants};if(c!==s)try{await this.endSession(!1),await this.startSession()}catch(e){throw this.forget(s),e}let u=o(a(this.result$.pipe(r(e=>e.requestId===c.requestId),n(e=>({status:"settled",...e}))),this.closed$.pipe(r(e=>e===c.requestId),n(()=>({status:"closed"})))).pipe(l({first:e.timeoutMs,with:()=>h({status:"waiting"})})));return c!==s&&(this.setState({open:c,activeChoice:null,unclaimed:null}),s&&this.closed$.next(s.requestId)),{outcome:u}})).outcome}getBaseline(e){if(this.state.open?.requestId!==e||!this.session)throw Error("This variant preview is no longer open");return{files:this.session.getFiles(),choice:this.state.activeChoice}}applyFiles(e){return this.queue.add(async()=>{let{open:t}=this.state;if(t?.requestId!==e.requestId||!this.session)throw Error("This variant preview is no longer open");let s=t.variants.find(t=>t.id===e.choice);if(null!==e.choice&&!s)throw Error("This option does not belong to the open variant preview");if(null===e.choice&&e.files.length>0)throw Error("The baseline cannot contain variant edits");if(s?.kind==="page"&&e.files.length>0)throw Error("HTML previews cannot override project files");await this.session.apply(e.files),this.setState({activeChoice:e.choice})})}submit(e){return this.queue.add(async()=>{let{open:t,activeChoice:s}=this.state;if(t?.requestId!==e.requestId)throw Error("This preview is no longer open. The agent closed it or replaced it with another one");if(!this.session||s!==e.choice||null!==e.choice&&!t.variants.some(t=>t.id===e.choice))throw Error("Apply this option before choosing it");await this.endSession(!0),this.setState({open:null,activeChoice:null,unclaimed:{request:t,result:e}}),this.result$.next(e)})}close(){return this.queue.add(async()=>{let{open:e}=this.state;try{await this.endSession(!1)}finally{this.forget(e)}return{closed:null!==e}})}claim(e){this.state.unclaimed?.result.requestId===e&&this.setState({unclaimed:null})}dispose(){return this.queue.add(()=>this.endSession(!1))}get state(){return this.context.store.variantPreview$.value}setState(e){this.context.store.variantPreview$.next({...this.state,...e})}forget(e){this.setState({open:null,activeChoice:null,unclaimed:null}),e&&this.closed$.next(e.requestId)}async startSession(){let{projectWatcher:e,logger:t}=this.context;e.suspend();try{this.session=await c.create({projectRoot:this.props.projectRoot,logger:t,onFilesChanged:t=>e.applyVariantFiles(t)})}catch(t){throw e.resume(),t}}async endSession(e){if(this.session)try{await this.session.finish(e)}finally{this.session=null,this.context.projectWatcher.resume()}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import
|
|
1
|
+
import{lingui as e}from"@lingui/vite-plugin";import i from"@vitejs/plugin-react";import{mkdir as t,readFile as n,writeFile as r}from"fs/promises";import o from"lodash-es/camelCase.js";import{createRequire as a}from"node:module";import{dirname as s,resolve as m}from"path";import{createLogger as l}from"vite";import p from"vite-plugin-css-injected-by-js";import{isUsingLocalSdk as d}from"../utils/package-info.js";import{loadFrontendConfigModule as f}from"./frontend-config.js";import{phxBannerPlugin as c}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as g}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as u}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as h}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as S}from"./phx-variant-previews-plugin.js";let b=null;export const setViteLogSink=(e,i={})=>{b={sink:e,echo:i.echo??!1}};let y=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],O=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async t=>{var n,r;let o,p,c=d(),g=f(),h=g.readRuntimeConfig(),x=g.frontendBuildConfig,D=Object.fromEntries((t?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...b&&{customLogger:(n=b.sink,r=b.echo,o=l(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...b.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...c&&{entries:["index.html","admin.html",...t?.templateFiles??[]],force:!0}},...c&&{resolve:{alias:(p=a(m(process.cwd(),"package.json")),y.flatMap(e=>{try{let i=s(p.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[i({babel:{plugins:["macros"]}}),e(),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=g.readRuntimeConfig(),t=g.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},u({getDeploymentId:()=>O(g.readRuntimeConfig())}),S()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(x.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(x.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...D}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async a=>{let l=f(),d=l.readRuntimeConfig(),S=l.frontendBuildConfig,b=h(),y=c({sdkVersion:a.sdkVersion,banner:a.banner}),x=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:a.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(f=>({plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),u({getDeploymentId:()=>O(l.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!f.htmlFiles.length)return;let e="iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`;for(let i of f.htmlFiles){if(f.main&&a.enableEditor&&"./index.html"===i)continue;let o=m("./.phoenix",i),l=m("./.phoenix/dist/frontend",i);await t(s(l),{recursive:!0});let p=(await n(o,"utf-8")).replace(f.mainScriptPath,e);await r(l,p,"utf-8")}}},b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:f.entryFile,name:o(f.name),formats:[f.format],fileName:()=>"iife"===f.format?`${f.name}.iife.js`:`${f.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${f.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}));return a.enableEditor?[...x,{plugins:[i({babel:{plugins:["macros"]}}),e(),p({useStrictCSP:!0}),g(),b,y],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(d),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)}}]:x};
|
|
@@ -7,5 +7,6 @@ export { FileLogger } from './file-logger.js';
|
|
|
7
7
|
export { type Logger, type CreateLoggerOptions, createLogger } from './logger.js';
|
|
8
8
|
export { addWorkspaceOverrides, ensureWorkspaceInstallSettings, getLocalOverrides, getSdkPackages, getWorkspaceDir, hasLocalOverrides, readPackageJson, removeWorkspaceOverrides, } from './package-info.js';
|
|
9
9
|
export { toPascalCase } from './pascal-case.js';
|
|
10
|
+
export { readGitCommit } from './read-git-commit.js';
|
|
10
11
|
export { type RunCommandProps, runCommand } from './run-command.js';
|
|
11
12
|
export { type FileUploadInfo, type UploadLinksData, uploadFilesWithPresignedUrls, readUploadLinks, } from './upload-utils.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,ensureWorkspaceInstallSettings,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{toPascalCase}from"./pascal-case.js";export{runCommand}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
|
|
1
|
+
export{askQuestion}from"./ask-question.js";export{checkBundleSizeBudgets}from"./check-bundle-size-budgets.js";export{formatEnvContent,formatEnvLine}from"./env-file.js";export{parseChangelog,getLatestVersion,getVersion,paginateVersions,getVersionNumbers}from"./changelog-parser.js";export{createDirectoryFromYaml,exists,scanFolderForFiles,syncChangedFiles,syncExistingFolders,validateFolders,writeFileIfNotExists,writeFilesIfNotExists,writeRawFiles}from"./file-system.js";export{FileLogger}from"./file-logger.js";export{createLogger}from"./logger.js";export{addWorkspaceOverrides,ensureWorkspaceInstallSettings,getLocalOverrides,getSdkPackages,getWorkspaceDir,hasLocalOverrides,readPackageJson,removeWorkspaceOverrides}from"./package-info.js";export{toPascalCase}from"./pascal-case.js";export{readGitCommit}from"./read-git-commit.js";export{runCommand}from"./run-command.js";export{uploadFilesWithPresignedUrls,readUploadLinks}from"./upload-utils.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ReadGitCommitProps {
|
|
2
|
+
readonly directory: string;
|
|
3
|
+
/**
|
|
4
|
+
* A file of the project, relative to `directory`, that its repository tracks. git looks for a repository in every
|
|
5
|
+
* parent folder, so sources unpacked inside an unrelated checkout would otherwise report that checkout's commit.
|
|
6
|
+
*/
|
|
7
|
+
readonly trackedFile: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Full SHA of the commit checked out in the project's own repository. Undefined when git cannot read one: no
|
|
11
|
+
* checkout, git missing or refusing the repository, no commit yet, or the project is not tracked by the repository
|
|
12
|
+
* around it. That is normal for a build from uploaded sources.
|
|
13
|
+
*/
|
|
14
|
+
export declare const readGitCommit: (props: ReadGitCommitProps) => Promise<string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{execFile as t}from"node:child_process";import{promisify as e}from"node:util";let r=e(t),i=/^[0-9a-f]{40,64}$/;export const readGitCommit=async t=>{let e={cwd:t.directory,timeout:5e3,windowsHide:!0};try{await r("git",["ls-files","--error-unmatch","--",t.trackedFile],e);let{stdout:o}=await r("git",["rev-parse","HEAD"],e),a=o.trim();return i.test(a)?a:void 0}catch{return}};
|
|
@@ -11,8 +11,8 @@ export declare class AnalyticsService {
|
|
|
11
11
|
constructor(_debug: boolean);
|
|
12
12
|
push: (event: AnalyticsEvent) => void;
|
|
13
13
|
}
|
|
14
|
-
declare const Initialized: (userId: string, configuratorName: string) => import("
|
|
15
|
-
declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("
|
|
14
|
+
declare const Initialized: (userId: string, configuratorName: string) => import("#package/domain").InitEvent;
|
|
15
|
+
declare const ConfigurationLoaded: (configurationId: string, revisionId: string, mode: 'read' | 'owner') => import("#package/domain").DataLoadedEvent;
|
|
16
16
|
export declare const CommonAnalyticsFactory: {
|
|
17
17
|
Initialized: typeof Initialized;
|
|
18
18
|
ConfigurationLoaded: typeof ConfigurationLoaded;
|
package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { MultilingualString } from '@salsita-ai/common/utils';
|
|
2
2
|
import { type DomainEntity, type DomainEntityId, type EntityId, type EntityRecipe } from '#package/domain';
|
|
3
|
-
declare const EntityChildrenListActionButtonClicked: (id: string) => import("
|
|
4
|
-
declare const EntityChildrenListItemClicked: (id: string) => import("
|
|
5
|
-
declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("
|
|
6
|
-
declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("
|
|
7
|
-
declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("
|
|
8
|
-
declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("
|
|
9
|
-
declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("
|
|
10
|
-
declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("
|
|
11
|
-
declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("
|
|
12
|
-
declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("
|
|
13
|
-
declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("
|
|
14
|
-
declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("
|
|
15
|
-
declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("
|
|
16
|
-
declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("
|
|
17
|
-
declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("
|
|
18
|
-
declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("
|
|
19
|
-
declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("
|
|
20
|
-
declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("
|
|
21
|
-
declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("
|
|
22
|
-
declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("
|
|
23
|
-
declare const EntityDeleteButtonClicked: (id: EntityId) => import("
|
|
3
|
+
declare const EntityChildrenListActionButtonClicked: (id: string) => import("#package/domain").UserActionEvent;
|
|
4
|
+
declare const EntityChildrenListItemClicked: (id: string) => import("#package/domain").UserActionEvent;
|
|
5
|
+
declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
6
|
+
declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
7
|
+
declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
8
|
+
declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
9
|
+
declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
10
|
+
declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
11
|
+
declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
12
|
+
declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
13
|
+
declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("#package/domain").UserActionEvent;
|
|
14
|
+
declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
|
|
15
|
+
declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
|
|
16
|
+
declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
|
|
17
|
+
declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
|
|
18
|
+
declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("#package/domain").UserActionEvent;
|
|
19
|
+
declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
|
|
20
|
+
declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
|
|
21
|
+
declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("#package/domain").UserActionEvent;
|
|
22
|
+
declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
|
|
23
|
+
declare const EntityDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
|
|
24
24
|
export declare const DomainControlsAnalytics: {
|
|
25
25
|
ColorPickerChanged: typeof ColorPickerChanged;
|
|
26
26
|
EntityChildrenListActionButtonClicked: typeof EntityChildrenListActionButtonClicked;
|
|
@@ -9,6 +9,6 @@ interface PublishedDataValueProviderProps extends PublishedDataValue {
|
|
|
9
9
|
}
|
|
10
10
|
export declare const PublishedDataValueProvider: (props: PublishedDataValueProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const useProvidedPublishedData: () => PublishedDataValue;
|
|
12
|
-
export declare const usePublishedData: () =>
|
|
12
|
+
export declare const usePublishedData: () => PublishedDataValue['publishedData'];
|
|
13
13
|
export type UsePublishedData<PUBLISHED_DATA extends CommonAdminPublishedData> = () => PUBLISHED_DATA;
|
|
14
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useConfiguratorSpec: () => import("../../../domain/index.js").ApplicationConfiguratorSpec;
|
|
2
2
|
/** The application spec's `assistant` manifest, or nothing when the spec has no `assistant` section. */
|
|
3
|
-
export declare const useSpecAssistant: () => import("../../../domain/index.js").AssistantManifest | null;
|
|
3
|
+
export declare const useSpecAssistant: () => Required<import("../../../domain/index.js").AssistantManifest> | null;
|
|
4
4
|
export declare const useSpecTextLanguages: () => readonly string[];
|
|
5
5
|
export declare const useSpecHandlerHashes: () => Record<string, string>;
|
|
6
6
|
export declare const useSpecHandlers: () => readonly import("../../../domain/index.js").HandlerRegistration<any, any>[];
|
|
@@ -67,7 +67,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
67
67
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
|
|
68
68
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
|
|
69
69
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
70
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
|
|
70
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
|
|
71
71
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
72
72
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
73
73
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
|
|
@@ -110,7 +110,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
110
110
|
getAdminPreset: () => import("#package/domain").AnyProductPreset;
|
|
111
111
|
getAdminModelVersion: () => number;
|
|
112
112
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
113
|
-
getAssistant: () => import("#package/domain").AssistantManifest | null;
|
|
113
|
+
getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
|
|
114
114
|
getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
|
|
115
115
|
getAdminFactory: () => import("#package/domain").AnyDomainFactory;
|
|
116
116
|
getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
|
|
@@ -404,6 +404,8 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
404
404
|
getActiveConfigurationId: () => string;
|
|
405
405
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
406
406
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
407
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
408
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
407
409
|
getModelVersion: () => number;
|
|
408
410
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
409
411
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -444,6 +446,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
444
446
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
445
447
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
446
448
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
449
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
447
450
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
448
451
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
449
452
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -510,6 +513,8 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
510
513
|
getActiveConfigurationId: () => string;
|
|
511
514
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
512
515
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
516
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
517
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
513
518
|
getModelVersion: () => number;
|
|
514
519
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
515
520
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -550,6 +555,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
550
555
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
551
556
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
552
557
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
558
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
553
559
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
554
560
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
555
561
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -721,7 +727,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
721
727
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
|
|
722
728
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
|
|
723
729
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
724
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
|
|
730
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
|
|
725
731
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
726
732
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
727
733
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
|
|
@@ -764,7 +770,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
764
770
|
getAdminPreset: () => import("#package/domain").AnyProductPreset;
|
|
765
771
|
getAdminModelVersion: () => number;
|
|
766
772
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
767
|
-
getAssistant: () => import("#package/domain").AssistantManifest | null;
|
|
773
|
+
getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
|
|
768
774
|
getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
|
|
769
775
|
getAdminFactory: () => import("#package/domain").AnyDomainFactory;
|
|
770
776
|
getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
|
|
@@ -1058,6 +1064,8 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1058
1064
|
getActiveConfigurationId: () => string;
|
|
1059
1065
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
1060
1066
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
1067
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
1068
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
1061
1069
|
getModelVersion: () => number;
|
|
1062
1070
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
1063
1071
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -1098,6 +1106,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1098
1106
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
1099
1107
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
1100
1108
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
1109
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
1101
1110
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
1102
1111
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
1103
1112
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -1164,6 +1173,8 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1164
1173
|
getActiveConfigurationId: () => string;
|
|
1165
1174
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
1166
1175
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
1176
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
1177
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
1167
1178
|
getModelVersion: () => number;
|
|
1168
1179
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
1169
1180
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -1204,6 +1215,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1204
1215
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
1205
1216
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
1206
1217
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
1218
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
1207
1219
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
1208
1220
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
1209
1221
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -60,6 +60,8 @@ export declare const useDomainContextSelectors: () => {
|
|
|
60
60
|
getActiveConfigurationId: () => string;
|
|
61
61
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
62
62
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
63
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
64
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
63
65
|
getModelVersion: () => number;
|
|
64
66
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
65
67
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -100,6 +102,7 @@ export declare const useDomainContextSelectors: () => {
|
|
|
100
102
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
101
103
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
102
104
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
105
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
103
106
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
104
107
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
105
108
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -13,8 +13,11 @@ export declare const getViewportSize: () => Size;
|
|
|
13
13
|
* Returns the viewport size. This can also be used as a dependency in a
|
|
14
14
|
* useEffect to trigger an update when the browser resizes.
|
|
15
15
|
*
|
|
16
|
+
* @param subscriptionActive if `false`, the viewport is neither measured nor followed, and the size
|
|
17
|
+
* returned is the last one measured, if any (useful for optimization)
|
|
18
|
+
*
|
|
16
19
|
* @see https://martijnhols.nl/gists/how-to-get-document-height-ios-safari-osk
|
|
17
20
|
* @todo: investigate if this can use `viewport$`
|
|
18
21
|
*/
|
|
19
|
-
export declare const useViewportSize: () => Size | undefined;
|
|
22
|
+
export declare const useViewportSize: (subscriptionActive?: boolean) => Size | undefined;
|
|
20
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let
|
|
1
|
+
import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let r="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=(t=!0)=>{let[o,w]=n(),d=e(()=>{let e=getViewportSize();w(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return r(()=>{t&&d()},[t,d]),i(()=>{if(!t)return;let e=()=>{d(),setTimeout(d,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[t,d]),o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps } from './MobileControls.js';
|
|
1
|
+
export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps, type ViewOnlyModeProps, } from './MobileControls.js';
|
|
@@ -44,6 +44,7 @@ declare module '@mui/material/styles' {
|
|
|
44
44
|
PhxChat: 'root';
|
|
45
45
|
PhxChatFooter: 'root' | 'formLayout' | 'input';
|
|
46
46
|
PhxChatMessage: 'base' | 'assistant' | 'user' | 'widget' | 'error' | 'helper';
|
|
47
|
+
PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'status' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
|
|
47
48
|
PhxTopNavigation: 'root' | 'stepper' | 'step';
|
|
48
49
|
PhxListSelector: 'root';
|
|
49
50
|
PhxListSelectorItem: 'root' | 'radio' | 'title' | 'description' | 'formControlLabel';
|
|
@@ -109,6 +110,9 @@ declare module '@mui/material/styles' {
|
|
|
109
110
|
PhxChatMessage?: {
|
|
110
111
|
styleOverrides?: ComponentsOverrides<Theme>['PhxChatMessage'];
|
|
111
112
|
};
|
|
113
|
+
PhxAssistantPanel?: {
|
|
114
|
+
styleOverrides?: ComponentsOverrides<Theme>['PhxAssistantPanel'];
|
|
115
|
+
};
|
|
112
116
|
PhxPreviewLayout?: {
|
|
113
117
|
styleOverrides?: ComponentsOverrides<Theme>['PhxPreviewLayout'];
|
|
114
118
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/sdk",
|
|
3
|
-
"version": "0.50.0-develop.
|
|
3
|
+
"version": "0.50.0-develop.dbf0122072",
|
|
4
4
|
"description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -149,10 +149,6 @@
|
|
|
149
149
|
"import": "./dist/extras/ai-preview/index.js",
|
|
150
150
|
"types": "./dist/extras/ai-preview/index.d.ts"
|
|
151
151
|
},
|
|
152
|
-
"./extras/assistant": {
|
|
153
|
-
"import": "./dist/extras/assistant/index.js",
|
|
154
|
-
"types": "./dist/extras/assistant/index.d.ts"
|
|
155
|
-
},
|
|
156
152
|
"./common/utils": {
|
|
157
153
|
"import": "./dist/common/utils.js",
|
|
158
154
|
"types": "./dist/common/utils.d.ts"
|
|
@@ -225,7 +221,7 @@
|
|
|
225
221
|
"@swc/core": "1.15.40",
|
|
226
222
|
"@swc/wasm-web": "1.15.40",
|
|
227
223
|
"@tanstack/ai": "0.64.0",
|
|
228
|
-
"@tanstack/ai-
|
|
224
|
+
"@tanstack/ai-client": "0.36.1",
|
|
229
225
|
"@trpc/client": "11.17.0",
|
|
230
226
|
"@trpc/react-query": "11.17.0",
|
|
231
227
|
"@trpc/server": "11.17.0",
|
|
@@ -275,6 +271,7 @@
|
|
|
275
271
|
"react-json-tree": "0.20.0",
|
|
276
272
|
"react-markdown": "9.0.1",
|
|
277
273
|
"remark": "15.0.1",
|
|
274
|
+
"remark-gfm": "4.0.0",
|
|
278
275
|
"rxjs": "7.8.2",
|
|
279
276
|
"semver": "7.6.3",
|
|
280
277
|
"spark-md5": "3.0.2",
|
|
@@ -295,8 +292,8 @@
|
|
|
295
292
|
"yaml": "2.9.0",
|
|
296
293
|
"yargs": "17.7.2",
|
|
297
294
|
"zod": "3.25.76",
|
|
298
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
299
|
-
"@salsita-ai/contracts": "0.50.0-develop.
|
|
295
|
+
"@salsita-ai/common": "0.50.0-develop.dbf0122072",
|
|
296
|
+
"@salsita-ai/contracts": "0.50.0-develop.dbf0122072"
|
|
300
297
|
},
|
|
301
298
|
"devDependencies": {
|
|
302
299
|
"@clerk/clerk-react": "5.61.8",
|
package/schema/domain-spec.json
CHANGED
|
@@ -18586,6 +18586,30 @@
|
|
|
18586
18586
|
"required": ["kind"],
|
|
18587
18587
|
"additionalProperties": false
|
|
18588
18588
|
},
|
|
18589
|
+
{
|
|
18590
|
+
"type": "object",
|
|
18591
|
+
"properties": {
|
|
18592
|
+
"kind": {
|
|
18593
|
+
"type": "string",
|
|
18594
|
+
"enum": ["assistantToolbarButton"]
|
|
18595
|
+
},
|
|
18596
|
+
"props": {
|
|
18597
|
+
"type": "object",
|
|
18598
|
+
"properties": {
|
|
18599
|
+
"showTitle": {
|
|
18600
|
+
"type": "boolean"
|
|
18601
|
+
},
|
|
18602
|
+
"icon": {
|
|
18603
|
+
"type": "string"
|
|
18604
|
+
}
|
|
18605
|
+
},
|
|
18606
|
+
"required": [],
|
|
18607
|
+
"additionalProperties": false
|
|
18608
|
+
}
|
|
18609
|
+
},
|
|
18610
|
+
"required": ["kind"],
|
|
18611
|
+
"additionalProperties": false
|
|
18612
|
+
},
|
|
18589
18613
|
{
|
|
18590
18614
|
"type": "object",
|
|
18591
18615
|
"properties": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{sdkGuidanceSections as e}from"./common/sdk-content.js";export const generateAgentsMd=()=>`${[e.projectIntro,e.buildCommands,e.doNotEdit,"Phoenix SDK guidance lives in the `phoenix`, `phoenix-cli`, `phoenix-create-configurator`, `phoenix-feedback` and `phoenix-review` skills under `.claude/skills/` and `.agents/skills/`. Phoenix rewrites them on every sync, removes anything else inside their folders and removes other `phoenix`-prefixed skill folders, so to customise a skill, copy it to a folder whose name does not start with `phoenix`."].join("\n\n")}
|
|
2
|
-
`;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export const sdkGuidanceSections={projectIntro:`## Phoenix Configurator Project
|
|
2
|
-
|
|
3
|
-
Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`,buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:"## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)",architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
|
|
4
|
-
- Components: PascalCase (.tsx)
|
|
5
|
-
- Utilities: kebab-case (.ts)
|
|
6
|
-
- Expressions: entity-name.ts
|
|
7
|
-
- Migrations: v*.ts (sequential)
|
|
8
|
-
- Specs: kebab-case.yaml
|
|
9
|
-
- Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:`## Export Rules
|
|
10
|
-
All files in src/expressions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.`,webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
|
|
11
|
-
|
|
12
|
-
Get the current editor context data as JSON via \`pnpm phoenix inspect:data\`.
|
|
13
|
-
|
|
14
|
-
**Prerequisites:** same as screenshot (dev server running + browser open)
|
|
15
|
-
|
|
16
|
-
**Options:**
|
|
17
|
-
- \`--output, -o\` — Output file path (prints to stdout if omitted)
|
|
18
|
-
- \`--pretty\` — Pretty-print JSON (default: true)
|
|
19
|
-
- \`--port\` — WebSocket server port (default: 3020)
|
|
20
|
-
|
|
21
|
-
**Returns:** publishedData, frontendData, backendData, sessionData, accessData, webComponentProperties
|
|
22
|
-
|
|
23
|
-
**Example:** \`pnpm phoenix inspect:data -o ./data.json\`
|
|
24
|
-
|
|
25
|
-
**Tips:** Pipe through \`head\`/\`tail\` for partial output (e.g., \`pnpm phoenix inspect:data | head -30\`).
|
|
26
|
-
|
|
27
|
-
**Use cases:** AI agent context, debugging published/session/access data`,inspectScene:`## Inspect: Scene
|
|
28
|
-
|
|
29
|
-
Get the current Three.js scene graph as JSON via \`pnpm phoenix inspect:scene\`.
|
|
30
|
-
|
|
31
|
-
**Prerequisites:** same as screenshot (dev server running + browser open)
|
|
32
|
-
|
|
33
|
-
**Options:**
|
|
34
|
-
- \`--output, -o\` — Output file path (prints to stdout if omitted)
|
|
35
|
-
- \`--pretty\` — Pretty-print JSON (default: true)
|
|
36
|
-
- \`--port\` — WebSocket server port (default: 3020)
|
|
37
|
-
|
|
38
|
-
**Returns:** Recursive scene tree with per-node: name, type, visible, position, rotation, scale, userData (entityId), and for meshes: geometry name, bounding box, material properties (color, metalness, roughness, opacity, textures), morph target influences. Lights include color, intensity, and type-specific properties.
|
|
39
|
-
|
|
40
|
-
**Example:** \`pnpm phoenix inspect:scene -o ./scene.json\`
|
|
41
|
-
|
|
42
|
-
**Tips:** Scene graphs can be large. Pipe through \`head\`/\`tail\` for partial output.
|
|
43
|
-
|
|
44
|
-
**Use cases:** AI agent context, debugging 3D scene layout, inspecting materials and lighting`,playwrightMcpSetup:`## Playwright MCP Setup (for AI agents)
|
|
45
|
-
|
|
46
|
-
To interact with the 3D configurator in a browser, Playwright MCP needs GPU-enabled flags for WebGL rendering. Add to \`~/.claude/.mcp.json\`:
|
|
47
|
-
|
|
48
|
-
\`\`\`json
|
|
49
|
-
{
|
|
50
|
-
"mcpServers": {
|
|
51
|
-
"playwright": {
|
|
52
|
-
"command": "npx",
|
|
53
|
-
"args": [
|
|
54
|
-
"@playwright/mcp@latest",
|
|
55
|
-
"--headed",
|
|
56
|
-
"--launch-options",
|
|
57
|
-
"{\\"args\\":[\\"--use-gl=swiftshader\\",\\"--enable-webgl\\",\\"--ignore-gpu-blocklist\\"]}"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
\`\`\`
|
|
63
|
-
|
|
64
|
-
Key flags:
|
|
65
|
-
- \`--headed\` — visible browser (required for GPU rendering)
|
|
66
|
-
- \`--use-gl=swiftshader\` — software GPU fallback for environments without a physical GPU
|
|
67
|
-
- \`--enable-webgl\` + \`--ignore-gpu-blocklist\` — ensure WebGL is available`};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as n}from"./common/agent-skill.js";import{sdkGuidanceSections as e}from"./common/sdk-content.js";export const generatePhoenixCliSkill=()=>n({name:"phoenix-cli",description:"Phoenix CLI tooling for building and inspecting this configurator, covering build, dev and sync commands, dev logs, glTF asset inspection, screenshots, runtime state, data and scene inspection, and Playwright MCP setup. Use when building, debugging build or runtime errors, checking 3D assets, or inspecting the running configurator.",sections:[e.buildCommands,e.devLogs,e.assetInspection,e.screenshotCli,e.inspectState,e.inspectData,e.inspectScene,e.playwrightMcpSetup]});
|