@salsita-ai/sdk 0.50.0-develop.bc08a38ffe → 0.50.0-develop.bd84173265
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 +14 -13
- package/dist/application-spec/caching/content-diff.js +1 -1
- package/dist/application-spec/core/application-file.d.ts +0 -2
- package/dist/application-spec/core/application-file.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +4 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +4 -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/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +11 -8
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +0 -3
- package/dist/application-spec/generate-application/code/templates/globals.js +3 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +4 -4
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -7
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -3
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +13 -5
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +6 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +4 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +3 -2
- package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +3 -3
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.d.ts +9 -0
- package/dist/application-spec/generate-application/runtime-spec/decode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.d.ts +8 -0
- package/dist/application-spec/generate-application/runtime-spec/encode-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +27 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/index.d.ts +4 -0
- package/dist/application-spec/generate-application/runtime-spec/index.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +68 -0
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- 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/value-type/format-value-type.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +6 -0
- 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 +7 -4
- package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +19 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +6 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
- package/dist/client/phoenix-api.d.ts +367 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +36 -1
- 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 +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +16 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/index.d.ts +2 -0
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.d.ts +31 -0
- package/dist/configurator/common/use-finalize-action.js +1 -0
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +8 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/index.d.ts +4 -0
- package/dist/configurator/pages/default-elements/index.js +1 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +8 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +19 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +10 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.d.ts +14 -0
- package/dist/configurator/ui/assistant/form/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +38 -0
- package/dist/configurator/ui/assistant/form/form-model.js +1 -0
- package/dist/configurator/ui/assistant/form/form-registry.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/form-registry.js +8 -0
- package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
- package/dist/configurator/ui/assistant/form/form-state.js +1 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +3 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +34 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +5 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +16 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +8 -1
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/docs/controls/select-child-entity/cardselect.mdx +1 -0
- package/dist/docs/fabs/basic.mdx +2 -2
- package/dist/docs/index.json +1 -1
- package/dist/docs/layouts/custom-layout.mdx +1466 -196
- package/dist/docs/phoenix/components.mdx +6 -0
- package/dist/docs/phoenix/configurator-interface.mdx +66 -13
- package/dist/docs/phoenix/deployments.mdx +2 -6
- package/dist/docs/phoenix/domain-model.mdx +2 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +2 -1
- package/dist/docs/phoenix/layout-slots.mdx +4 -2
- package/dist/docs/phoenix/localization.mdx +8 -6
- package/dist/docs/phoenix/migration-guide.mdx +21 -8
- package/dist/docs/phoenix/phoenix-cli.mdx +46 -10
- package/dist/docs/phoenix/project-structure.mdx +31 -12
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +21 -4
- package/dist/domain/application/application-config.d.ts +3 -1
- package/dist/domain/application/assistant/assistant-form-elements.d.ts +28 -0
- package/dist/domain/application/assistant/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +2 -0
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +3 -1
- package/dist/domain/application/configurator-builder.d.ts +4 -1
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/core/schema/extended-schema-validator.js +1 -1
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +28 -1
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
- package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
- package/dist/globals/index.d.ts +2 -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-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +79 -80
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/bin.d.ts +2 -0
- package/dist/phoenix/bin.js +2 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
- package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
- package/dist/phoenix/check-configs/eslint-config.js +1 -0
- package/dist/phoenix/check-configs/index.d.ts +8 -0
- package/dist/phoenix/check-configs/index.js +1 -0
- package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
- package/dist/phoenix/check-configs/typescript-project.js +1 -0
- package/dist/phoenix/cli.d.ts +0 -1
- package/dist/phoenix/cli.js +1 -2
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/deps/deps.d.ts +52 -0
- package/dist/phoenix/commands/deps/deps.js +3 -0
- package/dist/phoenix/commands/deps/index.d.ts +1 -0
- package/dist/phoenix/commands/deps/index.js +1 -0
- package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -0
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/lingui.d.ts +8 -0
- package/dist/phoenix/services/lingui.js +1 -1
- package/dist/phoenix/services/swc.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/utils/index.d.ts +2 -1
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/node-version/index.d.ts +1 -0
- package/dist/phoenix/utils/node-version/index.js +1 -0
- package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
- package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
- package/dist/phoenix/utils/run-command.d.ts +11 -0
- package/dist/phoenix/utils/run-command.js +1 -1
- package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
- package/dist/phoenix/utils/sdk-tool/index.js +1 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/package.json +46 -35
- package/schema/domain-spec.json +86 -8
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BuiltFormModel } from './form-model.js';
|
|
2
|
+
import type { FormAnswers, FormState } from './form-state.js';
|
|
3
|
+
/** Stands for anything left unanswered, so every question keeps its line. */
|
|
4
|
+
export declare const FORM_PLACEHOLDER = "\u2014";
|
|
5
|
+
/**
|
|
6
|
+
* The user's answer to a form, sent as their message: one line per labelled container or input as
|
|
7
|
+
* `Label: value`, a bare line for an unlabelled one, two spaces of indentation per labelled
|
|
8
|
+
* container, and the placeholder for anything unanswered. Unlabelled groups are flattened into
|
|
9
|
+
* their parent, and a picked option answers with its value, or its label without one.
|
|
10
|
+
*/
|
|
11
|
+
export declare const composeAnswer: (model: BuiltFormModel, state: FormState, answers: FormAnswers) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{match as t}from"ts-pattern";export const FORM_PLACEHOLDER="—";let e=(t,e)=>`${" ".repeat(t)}${e}`,n=(t,e)=>null==t?e:`${t}: ${e}`,r=({value:t,label:e})=>t??e??"",i=({children:t},{state:e})=>t.filter(({id:t})=>!0===e.get(t)).map(r),o=(r,l,p)=>{let{label:h}=r;return t(r.definition.role).with("group",()=>{if(null==h)return r.children.flatMap(t=>o(t,l,p));let t=r.children.flatMap(t=>o(t,l+1,p));return t.length>0?[e(l,`${h}:`),...t]:[e(l,`${h}: —`)]}).with("choice",()=>[e(l,n(h,i(r,p)[0]??"—"))]).with("choices",()=>{let t=i(r,p);return 0===t.length?[e(l,n(h,"—"))]:null==h?t.map(t=>e(l,t)):[e(l,`${h}:`),...t.map(t=>e(l+1,t))]}).with("input",()=>[e(l,n(h,(({id:t,value:e},{answers:n})=>n.has(t)?n.get(t):""===e?void 0:e)(r,p)??"—"))]).with("option",()=>[]).exhaustive()};export const composeAnswer=(t,e,n)=>o(t.root,0,{state:e,answers:n}).join("\n");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FormBuildError } from './form-model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The message Fix it sends for a form that could not be built: every error, with the element named
|
|
4
|
+
* by its tag and its label or its position, then the request to write the form again.
|
|
5
|
+
*/
|
|
6
|
+
export declare const describeBuildErrors: (errors: readonly FormBuildError[]) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const describeBuildErrors=e=>["Your form could not be built:",...e.map(e=>`- ${(({element:e,label:l,position:n})=>null==l?`<${e}> (element ${n})`:`<${e} label="${l}">`)(e)}: ${e.message}.`),"Send it again."].join("\n");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { AssistantFormElementDescriptor } from '#package/domain';
|
|
3
|
+
import type { FormContainerProps, FormInputProps, FormOptionProps } from '../form-elements/index.js';
|
|
4
|
+
/** An element a form can render: what the prompt knows of it, and the component that renders it for its role. */
|
|
5
|
+
export type FormElementDefinition = (AssistantFormElementDescriptor & {
|
|
6
|
+
readonly role: 'group' | 'choice' | 'choices';
|
|
7
|
+
readonly component: ComponentType<FormContainerProps>;
|
|
8
|
+
}) | (AssistantFormElementDescriptor & {
|
|
9
|
+
readonly role: 'option';
|
|
10
|
+
readonly component: ComponentType<FormOptionProps>;
|
|
11
|
+
}) | (AssistantFormElementDescriptor & {
|
|
12
|
+
readonly role: 'input';
|
|
13
|
+
readonly component: ComponentType<FormInputProps>;
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FormElementDefinition } from './form-element-definition.js';
|
|
2
|
+
/**
|
|
3
|
+
* An element of a parsed form. Options outside a `choice` or `choices` are already wrapped in an
|
|
4
|
+
* implicit container, and the top level of the block is an implicit group without a label.
|
|
5
|
+
*/
|
|
6
|
+
export interface FormNode {
|
|
7
|
+
/** Unique within its block: the element's position in the markup, or what an implicit container wraps. */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly definition: FormElementDefinition;
|
|
10
|
+
readonly label?: string;
|
|
11
|
+
readonly value?: string;
|
|
12
|
+
readonly attributes: Readonly<Record<string, unknown>>;
|
|
13
|
+
readonly children: readonly FormNode[];
|
|
14
|
+
}
|
|
15
|
+
/** Why an element made its block unbuildable, named by its tag and its label or its position in the block. */
|
|
16
|
+
export interface FormBuildError {
|
|
17
|
+
readonly element: string;
|
|
18
|
+
readonly label?: string;
|
|
19
|
+
/** The element's place in the block, counting elements in document order from 1. */
|
|
20
|
+
readonly position: number;
|
|
21
|
+
readonly message: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A form fence as the panel renders it, or every reason it cannot. A quick form asks one question:
|
|
25
|
+
* the first pick sends it, and it has no submit button.
|
|
26
|
+
*/
|
|
27
|
+
export type FormModel = {
|
|
28
|
+
readonly ok: true;
|
|
29
|
+
readonly root: FormNode;
|
|
30
|
+
readonly isQuick: boolean;
|
|
31
|
+
} | {
|
|
32
|
+
readonly ok: false;
|
|
33
|
+
readonly errors: readonly FormBuildError[];
|
|
34
|
+
};
|
|
35
|
+
/** A form that could be built. */
|
|
36
|
+
export type BuiltFormModel = Extract<FormModel, {
|
|
37
|
+
readonly ok: true;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AssistantFormAttribute, PhxValidateFunction, SchemaValidator } from '#package/domain';
|
|
2
|
+
import type { FormElementDefinition } from './form-element-definition.js';
|
|
3
|
+
/** A declared attribute of a form element with the validator of its coerced value. */
|
|
4
|
+
export interface RegisteredFormAttribute {
|
|
5
|
+
readonly attribute: AssistantFormAttribute;
|
|
6
|
+
readonly validate: PhxValidateFunction;
|
|
7
|
+
}
|
|
8
|
+
/** A form element with its declared attributes, the built-in `label` and `value` included. */
|
|
9
|
+
export interface RegisteredFormElement {
|
|
10
|
+
readonly definition: FormElementDefinition;
|
|
11
|
+
readonly attributes: ReadonlyMap<string, RegisteredFormAttribute>;
|
|
12
|
+
}
|
|
13
|
+
/** The elements forms can use, and the containers a form puts around what the model left implicit. */
|
|
14
|
+
export interface FormRegistry {
|
|
15
|
+
/** The container of a block's top level. */
|
|
16
|
+
readonly group: RegisteredFormElement;
|
|
17
|
+
/** The container of options that are a block's only content. */
|
|
18
|
+
readonly choice: RegisteredFormElement;
|
|
19
|
+
/** The container of a run of options outside any choice. */
|
|
20
|
+
readonly choices: RegisteredFormElement;
|
|
21
|
+
get(name: string): RegisteredFormElement | undefined;
|
|
22
|
+
}
|
|
23
|
+
/** What a registry is built with: the shared validator, which follows the project's CSP switch. */
|
|
24
|
+
export interface FormRegistryContext {
|
|
25
|
+
readonly schemaValidator: SchemaValidator;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Compiles a validator for every declared attribute of the given elements, each its own small
|
|
29
|
+
* schema, so every failing attribute is reported whichever validator the project uses.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createFormRegistry: (definitions: readonly FormElementDefinition[], { schemaValidator }: FormRegistryContext) => FormRegistry;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
let e=new Set(`a abbr acronym address applet area article aside audio b base basefont bdi bdo big blink blockquote body br
|
|
2
|
+
button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl dt em
|
|
3
|
+
embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html
|
|
4
|
+
i iframe image img input ins kbd keygen label legend li link main map mark marquee math menu menuitem meta
|
|
5
|
+
meter nav nobr noembed noframes noscript object ol optgroup option output p param picture plaintext pre
|
|
6
|
+
progress q rb rp rt rtc ruby s samp script search section select slot small source span strike strong style
|
|
7
|
+
sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr
|
|
8
|
+
xmp`.split(/\s+/)),t=/^[a-z][a-z0-9-]*$/,r={type:"string"},a=({role:e,attributes:t})=>Object.entries({label:r,..."option"===e||"input"===e?{value:r}:{},...t}),o=(e,t)=>{let r=e.get(t);if(r?.definition.role!==t)throw Error(`The form registry has no "${t}" element with the role "${t}". Forms wrap implicit content in it. Register the built-in "${t}".`);return r};export const createFormRegistry=(r,{schemaValidator:n})=>{let i=new Map;for(let o of r){if(!t.test(o.name)||e.has(o.name))throw Error(`The form element "${o.name}" cannot be registered: its name must be lowercase and must not be an HTML element name, so form markup is never read as HTML. Rename the element.`);if(i.has(o.name))throw Error(`The form element "${o.name}" is registered twice. Each tag names one element. Remove or rename one of them.`);let r=new Map(a(o).map(([e,t])=>[e,{attribute:t,validate:n.compile({type:t.type,...t.enum?{enum:t.enum}:{}})}]));i.set(o.name,{definition:o,attributes:r})}return{group:o(i,"group"),choice:o(i,"choice"),choices:o(i,"choices"),get:e=>i.get(e)}};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** What the user did in a form, by node id: `true` for a picked option, the input's own state for an input. */
|
|
2
|
+
export type FormState = ReadonlyMap<string, unknown>;
|
|
3
|
+
/** The answer text each input reported, by node id; an input that never reported is missing. */
|
|
4
|
+
export type FormAnswers = ReadonlyMap<string, string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AssistantForm}from"./AssistantForm.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormModel } from './form-model.js';
|
|
2
|
+
import type { FormRegistry } from './form-registry.js';
|
|
3
|
+
/**
|
|
4
|
+
* Builds a form from the markup of a ```` ```form ```` fence. A block whose only content is loose
|
|
5
|
+
* options asks one question, so they form an implicit `choice`; elsewhere loose options form an
|
|
6
|
+
* implicit `choices`. A block with any unknown element, invalid attribute or misplaced element is
|
|
7
|
+
* not built at all, and every such error is returned.
|
|
8
|
+
*/
|
|
9
|
+
export declare const parseFormBlock: (source: string, registry: FormRegistry) => FormModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Parser as e}from"htmlparser2";import{readFormAttributes as o}from"./read-form-attributes.js";let r=({name:e,attributes:o,position:r})=>({element:e,label:o.label,position:r}),t=({definition:e},o,r)=>({id:o,definition:e,attributes:{},children:r}),i=(e,o)=>{let r=[],i=[],n=()=>{i.length>0&&(r.push(t(o.registry.choices,`choices-${i[0]?.id}`,i)),i=[])};for(let o of e)"option"===o.definition.role?i.push(o):(n(),r.push(o));return n(),r},n=(e,t,l)=>e.flatMap(e=>((e,t,l)=>{var s;let a=l.registry.get(e.name);if(!a){l.errors.push({...r(e),message:"not a form element"}),n(e.children,void 0,l);return}let{definition:h}=a,p=(s=h.role,t?.role==="option"||t?.role==="input"?`cannot be inside <${t.name}>, which holds no elements`:(t?.role==="choice"||t?.role==="choices")&&"option"!==s?`cannot be inside <${t.name}>, which holds only options`:void 0);p&&l.errors.push({...r(e),message:p});let{attributes:c,errors:u}=o(a,e.attributes);for(let o of u)l.errors.push({...r(e),message:o});let{label:d,value:g,...m}=c,f=n(e.children,{name:e.name,role:h.role},l);return{id:String(e.position),definition:h,label:"string"==typeof d?d:void 0,value:"string"==typeof g?g:void 0,attributes:m,children:"group"===h.role?i(f,l):f}})(e,t,l)??[]),l=e=>{if("choice"===e.definition.role)return!0;let[o,...r]=e.children;return"group"===e.definition.role&&null!=o&&0===r.length&&l(o)};export const parseFormBlock=(o,r)=>{let s,a,h,p,c={registry:r,errors:[]},u={name:r.group.definition.name,role:"group"},d=n((a=[s=[]],h=0,(p=new e({onopentag:(e,o)=>{let r={name:e,attributes:o,position:h+=1,children:[]};a.at(-1)?.push(r),a.push(r.children)},onclosetag:()=>{a.length>1&&a.pop()}},{xmlMode:!0,lowerCaseTags:!0,lowerCaseAttributeNames:!0,recognizeSelfClosing:!0})).write(o),p.end(),s),u,c);if(c.errors.length>0)return{ok:!1,errors:c.errors};let g=d.length>0&&d.every(e=>"option"===e.definition.role)?[t(r.choice,"choice",d)]:i(d,c),m=t(r.group,"root",g);return{ok:!0,root:m,isQuick:l(m)}};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RegisteredFormElement } from './form-registry.js';
|
|
2
|
+
/** The attributes of an element converted to their declared types, and what was wrong with them. */
|
|
3
|
+
export interface FormAttributesReading {
|
|
4
|
+
readonly attributes: Readonly<Record<string, unknown>>;
|
|
5
|
+
/** Each problem worded to follow the element's tag, e.g. `the attribute "step" must be an integer`. */
|
|
6
|
+
readonly errors: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reads the attributes of an element against its declarations. Undeclared and missing required
|
|
10
|
+
* attributes are found by name; each declared one is coerced and checked by its own validator, and
|
|
11
|
+
* the error is worded from the declaration, never from the validator, whose errors differ by mode.
|
|
12
|
+
*/
|
|
13
|
+
export declare const readFormAttributes: ({ definition, attributes: declared }: RegisteredFormElement, markup: Readonly<Record<string, string>>) => FormAttributesReading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{match as t}from"ts-pattern";let e=t=>{if(""===t.trim())return;let e=Number(t);return Number.isFinite(e)?e:void 0},r=(r,{type:i})=>t(i).with("string",()=>r).with("number",()=>e(r)??r).with("integer",()=>{let t=e(r);return null!=t&&Number.isInteger(t)?t:r}).with("boolean",()=>""===r||"true"===r||"false"!==r&&r).exhaustive(),i={string:"a string",number:"a number",integer:"an integer",boolean:"true or false"},u=(t,{type:e,enum:r})=>r?`the attribute "${t}" must be one of ${r.map(t=>`"${t}"`).join(", ")}`:`the attribute "${t}" must be ${i[e]}`;export const readFormAttributes=({definition:t,attributes:e},i)=>{let n={},a=[];for(let[t,o]of Object.entries(i)){let i=e.get(t);if(!i){a.push(`the attribute "${t}" is not declared`);continue}let s=r(o,i.attribute);i.validate(s)?n[t]=s:a.push(u(t,i.attribute))}for(let e of t.required??[])e in i||a.push(`the attribute "${e}" is required`);return{attributes:n,errors:a}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{styled as o}from"@mui/material";import{AssistantPanelName as m}from"../theme.js";let t=o("div",{name:m,slot:"formGroup"})(({theme:{spacing:r}})=>({display:"flex",flexDirection:"column",gap:r(1.5)})),i=o("div",{name:m,slot:"formGroupLabel"})(({theme:{palette:r,typography:e}})=>({...e.subtitle2,color:r.text.primary}));export const FormGroup=({label:o,children:m})=>e(t,{role:"group","aria-label":o,children:[null!=o&&r(i,{"aria-hidden":!0,children:o}),m]});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{styled as r}from"@mui/material";import{AssistantPanelName as i}from"../theme.js";let t=r("div",{name:i,slot:"formOptions"})(({theme:{spacing:e}})=>({display:"grid",gap:e(.75)})),a=r("div",{name:i,slot:"formOptionsLabel"})(({theme:{palette:e,typography:o}})=>({...o.caption,color:e.text.secondary})),m=r("div",{name:i,slot:"formOptionsRow"})(({theme:{spacing:e}})=>({display:"flex",flexWrap:"wrap",gap:e(.75)}));export const FormOptions=({label:r,children:i})=>o(t,{role:"group","aria-label":r,children:[null!=r&&e(a,{"aria-hidden":!0,children:r}),e(m,{children:i})]});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FormOptionProps } from './form-element-props.js';
|
|
2
|
+
/** A `reply`: a short answer as a small pill, marked while it is picked. */
|
|
3
|
+
export declare const FormReply: ({ label, disabled, selected, onSelect }: FormOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{alpha as e,styled as i}from"@mui/material";import{AssistantPanelName as o}from"../theme.js";let t=i("button",{name:o,slot:"formReply"})(({theme:{palette:r,spacing:i,typography:o}})=>({...o.body2,background:r.background.paper,border:`1px solid ${r.divider}`,borderRadius:"calc(infinity * 1px)",color:r.text.primary,cursor:"pointer",margin:0,paddingBlock:i(.25),paddingInline:i(1.25),textAlign:"start","&:hover:not(:disabled)":{background:r.action.hover},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},"&:disabled":{color:r.text.disabled,cursor:"default"},'&[aria-pressed="true"]':{background:e(r.primary.main,r.action.selectedOpacity),borderColor:r.primary.main}}));export const FormReply=({label:e,disabled:i,selected:o,onSelect:a})=>r(t,{type:"button",disabled:i,"aria-pressed":o,onClick:a,children:e});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FormInputProps } from './form-element-props.js';
|
|
2
|
+
/** A `text`: a single line the user types, with its label above it. */
|
|
3
|
+
export declare const FormText: ({ attributes, label, value, disabled, state, onChange }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{InputBase as t,styled as o}from"@mui/material";import{useCallback as i}from"react";import{AssistantPanelName as a}from"../theme.js";let d=o("label",{name:a,slot:"formText"})(({theme:{palette:e,spacing:r,typography:t}})=>({alignSelf:"stretch",color:e.text.secondary,display:"grid",gap:r(.5),...t.caption})),m=o(t,{name:a,slot:"formTextInput"})(({theme:{palette:e,spacing:r,typography:t}})=>({...t.body2,border:`1px solid ${e.divider}`,borderRadius:12,color:e.text.primary,paddingBlock:r(.75),paddingInline:r(1.5),"&.Mui-focused":{borderColor:e.primary.main},"& .MuiInputBase-input":{padding:0}}));export const FormText=({attributes:t,label:o,value:a,disabled:l,state:n,onChange:p})=>{let{placeholder:s}=t;return r(d,{children:[o,e(m,{value:"string"==typeof n?n:a??"",placeholder:"string"==typeof s?s:void 0,disabled:l,onChange:i(e=>{let r=e.target.value;p(r,""===r.trim()?void 0:r.trim())},[p])})]})};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** Validated and coerced attributes of an element, without the built-in `label` and `value`. */
|
|
3
|
+
export type FormElementAttributes = Readonly<Record<string, unknown>>;
|
|
4
|
+
/** Props of a `group`, `choice` or `choices` element: it lays out the children the form renders for it. */
|
|
5
|
+
export interface FormContainerProps {
|
|
6
|
+
readonly attributes: FormElementAttributes;
|
|
7
|
+
readonly label?: string;
|
|
8
|
+
readonly disabled: boolean;
|
|
9
|
+
readonly children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Props of an option. Its container decides what a pick does: in a `choice` it replaces the
|
|
13
|
+
* previous pick, in a `choices` it toggles, and in a form that asks one question it sends at once.
|
|
14
|
+
*/
|
|
15
|
+
export interface FormOptionProps {
|
|
16
|
+
readonly attributes: FormElementAttributes;
|
|
17
|
+
readonly label?: string;
|
|
18
|
+
readonly disabled: boolean;
|
|
19
|
+
readonly selected: boolean;
|
|
20
|
+
onSelect(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props of an input. Its state is its own: the form stores it and hands it back. `answer` is the
|
|
24
|
+
* text the answer shows for it, or `undefined` while there is none.
|
|
25
|
+
*/
|
|
26
|
+
export interface FormInputProps {
|
|
27
|
+
readonly attributes: FormElementAttributes;
|
|
28
|
+
readonly label?: string;
|
|
29
|
+
/** What the field starts with. */
|
|
30
|
+
readonly value?: string;
|
|
31
|
+
readonly disabled: boolean;
|
|
32
|
+
readonly state: unknown;
|
|
33
|
+
onChange(state: unknown, answer: string | undefined): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { FormContainerProps, FormElementAttributes, FormInputProps, FormOptionProps, } from './form-element-props.js';
|
|
2
|
+
export { FormGroup } from './FormGroup.js';
|
|
3
|
+
export { FormOptions } from './FormOptions.js';
|
|
4
|
+
export { FormReply } from './FormReply.js';
|
|
5
|
+
export { FormText } from './FormText.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{FormGroup}from"./FormGroup.js";export{FormOptions}from"./FormOptions.js";export{FormReply}from"./FormReply.js";export{FormText}from"./FormText.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { AssistantReferenceTarget } from './assistant-link-target.js';
|
|
3
|
+
export interface AssistantReferenceLinkProps {
|
|
4
|
+
readonly target: AssistantReferenceTarget;
|
|
5
|
+
/** The text the assistant gave the link; the target itself is never shown. */
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const ReferenceLinkView: ({ target, children }: AssistantReferenceLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* A recipe or an option the assistant named in a reply, shown as its label. Hovering, focusing or
|
|
11
|
+
* tapping it opens a popover with its picture or color, name and description, read from the
|
|
12
|
+
* current state at that moment; leaving it, tapping outside or Escape closes it. A click does
|
|
13
|
+
* nothing else.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AssistantReferenceLink: import("react").MemoExoticComponent<typeof ReferenceLinkView>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Trans as n}from"@lingui/react";import{ClickAwayListener as t,Tooltip as a,styled as i}from"@mui/material";import{memo as o,useCallback as l,useEffect as s,useRef as d,useState as c}from"react";import{isShallowEqual as p}from"@salsita-ai/common/utils";import{useResourceUrl as m}from"#package/react-sdk";import{AssistantPanelName as u}from"../theme.js";import{assistantReferenceStyles as f}from"./reference-styles.js";import{useAssistantReferenceDetails as h}from"./use-assistant-reference-details.js";let b=i("span",{name:u,slot:"referenceLink"})(f),x=i("span",{name:u,slot:"referenceDetails"})(({theme:{palette:e,shape:r,shadows:n,spacing:t,typography:a}})=>({...a.body2,background:e.background.paper,borderRadius:r.borderRadius,boxShadow:n[4],color:e.text.primary,display:"flex",gap:t(1.5),maxInlineSize:320,padding:t(1.5),'&[data-reference-details="unavailable"]':{color:e.text.secondary}})),g=i("img")(({theme:{shape:e}})=>({alignSelf:"flex-start",blockSize:"auto",borderRadius:e.borderRadius/2,flexShrink:0,inlineSize:64,maxBlockSize:96,objectFit:"contain"})),k=i("span")(({theme:{palette:e,shape:r}})=>({blockSize:32,borderRadius:r.borderRadius/2,boxShadow:`inset 0 0 0 1px ${e.divider}`,flexShrink:0,inlineSize:32})),y=i("span")(({theme:{palette:e,spacing:r}})=>({display:"flex",flexDirection:"column",gap:r(.5),minInlineSize:0,"& > :first-of-type":{fontWeight:600},"& > :not(:first-of-type)":{color:e.text.secondary}})),S=({target:t,onResolve:a,onImageLoad:i})=>{let o=h(t),{getResourceUrl:l}=m(),d=null!=o;if(s(()=>{a(d)},[d,a]),!o)return e(x,{"data-reference-details":"unavailable",children:e(n,{id:"sdk.assistant.reference.unavailable.message",message:"Not available right now"})});let{name:c,description:p,imageUrl:u,color:f}=o;return r(x,{children:[null!=u&&e(g,{src:l(u),alt:"",onLoad:i}),null==u&&null!=f&&e(k,{style:{background:f}}),r(y,{children:[e("span",{children:c}),null!=p&&e("span",{children:p})]})]})};export const AssistantReferenceLink=o(({target:r,children:n})=>{let[i,o]=c(!1),[s,p]=c(!1),m=l(()=>o(!0),[]),u=l(()=>o(!1),[]),f=l(e=>p(!e),[]),h=d(null),x=l(e=>{h.current=e},[]),g=l(()=>{h.current?.update()},[]),k=l(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),o(!0))},[]);return e(t,{onClickAway:u,mouseEvent:!!i&&"onClick",touchEvent:!!i&&"onTouchEnd",children:e(a,{open:i,onOpen:m,onClose:u,title:e(S,{target:r,onResolve:f,onImageLoad:g}),placement:"top-start",describeChild:!0,disableTouchListener:!0,PopperProps:{popperRef:x},slotProps:{tooltip:{sx:{background:"none",maxInlineSize:"none",padding:0}}},children:e(b,{role:"button",tabIndex:0,"aria-expanded":i,"data-reference":s?"muted":void 0,onClick:m,onKeyDown:k,children:n})})})},(e,r)=>e.children===r.children&&p(e.target,r.target));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DomainEntityId } from '#package/domain';
|
|
2
|
+
/** A recipe of a recipe group on an entity, as the assistant read it under `meta`: `recipe:<entityId>/<groupId>/<key>`. */
|
|
3
|
+
export interface AssistantRecipeTarget {
|
|
4
|
+
readonly kind: 'recipe';
|
|
5
|
+
readonly entityId: DomainEntityId<string>;
|
|
6
|
+
readonly groupId: string;
|
|
7
|
+
readonly key: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A choice of a writable field on an entity, as the assistant read it under `meta`:
|
|
11
|
+
* `option:<entityId>/<edgeName>/<value>`. The edge is the options field the assistant queried, such
|
|
12
|
+
* as `finishOptions`, and the value is the option's value in its string form.
|
|
13
|
+
*/
|
|
14
|
+
export interface AssistantOptionTarget {
|
|
15
|
+
readonly kind: 'option';
|
|
16
|
+
readonly entityId: DomainEntityId<string>;
|
|
17
|
+
readonly edgeName: string;
|
|
18
|
+
readonly value: string;
|
|
19
|
+
}
|
|
20
|
+
/** What a reference points at: something the configurator offers, shown by its details rather than selected. */
|
|
21
|
+
export type AssistantReferenceTarget = AssistantRecipeTarget | AssistantOptionTarget;
|
|
22
|
+
/** Where a link the assistant wrote in a reply points: an entity of the configuration, or a reference. */
|
|
23
|
+
export type AssistantLinkTarget = {
|
|
24
|
+
readonly kind: 'entity';
|
|
25
|
+
readonly id: DomainEntityId<string>;
|
|
26
|
+
} | AssistantReferenceTarget;
|
|
27
|
+
/** True for the target of a link the assistant wrote with one of its schemes, whatever follows the scheme. */
|
|
28
|
+
export declare const isAssistantLinkHref: (href: string) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* What a link the assistant wrote points at, or `null` when what follows its scheme is not a
|
|
31
|
+
* well-formed target. An entity link holds the id as it is; the parts of a reference are decoded,
|
|
32
|
+
* so a key the model encoded as in a URL and one Markdown encoded from angle brackets read the same.
|
|
33
|
+
*/
|
|
34
|
+
export declare const parseAssistantLinkTarget: (href: string) => AssistantLinkTarget | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DomainEntityIdSchema as t}from"#package/domain";let e="entity:",n="recipe:",i="option:",l=[e,n,i],r=new RegExp(t.pattern),s=t=>{try{let e=decodeURIComponent(t);return""===e?null:e}catch{return null}},u=t=>{let e=t.split("/").map(s);if(3!==e.length)return null;let[n,i,l]=e;return null!=n&&r.test(n)&&null!=i&&null!=l?{entityId:n,first:i,second:l}:null};export const isAssistantLinkHref=t=>l.some(e=>t.startsWith(e));export const parseAssistantLinkTarget=t=>{if(t.startsWith(e)){let n=t.slice(e.length);return r.test(n)?{kind:"entity",id:n}:null}if(t.startsWith(n)){let e=u(t.slice(n.length));return e&&{kind:"recipe",entityId:e.entityId,groupId:e.first,key:e.second}}if(t.startsWith(i)){let e=u(t.slice(i.length));return e&&{kind:"option",entityId:e.entityId,edgeName:e.first,value:e.second}}return null};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type AssistantManifest, type AssistantRecipeContext, type DomainEntity, type DomainState } from '#package/domain';
|
|
2
|
+
import type { AssistantReferenceTarget } from './assistant-link-target.js';
|
|
3
|
+
type AnyDomainState = DomainState<DomainEntity<string>>;
|
|
4
|
+
/** What the popover of a reference shows of the recipe or option it points at, texts in the current language. */
|
|
5
|
+
export interface AssistantReferenceDetails {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly description: string | null;
|
|
8
|
+
readonly imageUrl: string | null;
|
|
9
|
+
readonly color: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* What reading a reference needs: the manifest of the session and the readers `meta` resolves
|
|
13
|
+
* through, so the popover shows what the agent read.
|
|
14
|
+
*/
|
|
15
|
+
export interface AssistantReferenceContext extends Pick<AssistantRecipeContext, 'componentReader' | 'resolveLocalizable'> {
|
|
16
|
+
readonly manifest: AssistantManifest;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The details of what a reference points at on the given state, read the way `meta` reads them:
|
|
20
|
+
* only what the session's manifest exposes, from a component that is active on the entity there.
|
|
21
|
+
* `null` when the target does not resolve: the entity, the group or options edge, or the key or value is
|
|
22
|
+
* unknown, or the component is not active.
|
|
23
|
+
*/
|
|
24
|
+
export declare const readAssistantReferenceDetails: (target: AssistantReferenceTarget, state: AnyDomainState, context: AssistantReferenceContext) => AssistantReferenceDetails | null;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{match as e}from"ts-pattern";import{findAssistantFieldOptions as i,findAssistantRecipeGroups as t,readAssistantFieldOptions as n,readAssistantRecipeGroup as r}from"#package/domain";let l=["child","replace"];export const readAssistantReferenceDetails=(o,a,d)=>{let u=a.entities.find(e=>e.id===o.entityId);return u?e(o).with({kind:"recipe"},e=>((e,i,n,o)=>{let a=(({entityId:e,groupId:i,key:n},o,a,d)=>{for(let u of l)for(let l of t(d.manifest,u,o)){if(l.groupId!==i)continue;let t=r(u,l,e,a,d)?.recipes.find(e=>e.key===n);if(t)return t}return null})(e,i,n,o);if(!a)return null;let{title:d,description:u,thumbnailUrl:f}=a.item,{resolveLocalizable:m}=o;return{name:m(d),description:void 0===u?null:m(u),imageUrl:void 0===f?null:m(f),color:null}})(e,u.type,a,d)).with({kind:"option"},e=>(({entityId:e,edgeName:t,value:r},l,o,a)=>{let d=i(a.manifest,l).find(e=>e.edgeName===t),u=d?n(d,e,o,a)?.find(e=>String(e.value)===r):void 0;return u?{name:u.name??u.description??String(u.value),description:null==u.name?null:u.description,imageUrl:u.imageUrl,color:u.color}:null})(e,u.type,a,d)).exhaustive():null};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AssistantReferenceLink}from"./AssistantReferenceLink.js";export{isAssistantLinkHref,parseAssistantLinkTarget}from"./assistant-link-target.js";export{assistantReferenceStyles}from"./reference-styles.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CSSObject, type Theme } from '@mui/material';
|
|
2
|
+
/**
|
|
3
|
+
* How a link in a reply reads: a glossary reference, text that flows with the sentence and wraps
|
|
4
|
+
* with it, in the reference color with a dashed underline. Entity links and the references to
|
|
5
|
+
* recipes and options share it, so every link of a reply looks alike.
|
|
6
|
+
*
|
|
7
|
+
* - `data-reference="plain"`: something that exists but does nothing on a click, in the text color;
|
|
8
|
+
* - `data-reference="muted"`: something that is gone or cannot be read right now.
|
|
9
|
+
*/
|
|
10
|
+
export declare const assistantReferenceStyles: ({ theme: { palette, shape } }: {
|
|
11
|
+
readonly theme: Theme;
|
|
12
|
+
}) => CSSObject;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{alpha as e}from"@mui/material";export const assistantReferenceStyles=({theme:{palette:r,shape:o}})=>({background:"none",border:"none",borderRadius:o.borderRadius/2,boxDecorationBreak:"clone",color:r.primary.main,cursor:"pointer",font:"inherit",margin:0,padding:0,textDecorationLine:"underline",textDecorationStyle:"dashed",textDecorationThickness:1,textUnderlineOffset:"0.2em",WebkitBoxDecorationBreak:"clone",'&:hover, &:focus-visible, &[data-hovered="true"], &[aria-expanded="true"]':{background:e(r.primary.main,r.action.hoverOpacity)},"&:focus-visible":{outline:`2px solid ${r.primary.main}`,outlineOffset:1},'&[data-reference="plain"]':{color:"inherit",cursor:"auto"},'&[data-reference="muted"]':{color:r.text.disabled}});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AssistantReferenceTarget } from './assistant-link-target.js';
|
|
2
|
+
import { type AssistantReferenceDetails } from './assistant-reference-details.js';
|
|
3
|
+
/**
|
|
4
|
+
* The details of what a reference points at, read from the committed state and followed while the
|
|
5
|
+
* caller is mounted; `null` when it does not resolve there. Only the open popover of a reference
|
|
6
|
+
* calls it, so a reply full of references reads nothing until one is opened.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useAssistantReferenceDetails: (target: AssistantReferenceTarget) => AssistantReferenceDetails | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useDomain as e,useResolveLocalizable as t,useStoreSelector as r}from"#package/react-sdk";import{useConfigurator as s}from"../../../application-runtime/index.js";import{readAssistantReferenceDetails as i}from"./assistant-reference-details.js";export const useAssistantReferenceDetails=a=>{let{assistantSystem:n}=s(),{componentReader:o}=e(),l=t();return r(({state:e})=>{let t=n.getSessionManifest();return t?i(a,e,{manifest:t,componentReader:o,resolveLocalizable:e=>l(e)}):null},[n,o,l,a])};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** True when the text has a code fence the model has not closed yet. */
|
|
2
|
+
export declare const hasOpenFence: (text: string) => boolean;
|
|
1
3
|
/**
|
|
2
4
|
* Makes the Markdown of a reply that is still streaming renderable as it stands, so half-written
|
|
3
5
|
* markup does not flash as raw characters: an open code fence is closed, an inline code span, a link
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/;export const
|
|
2
|
-
\`\`\``;let n
|
|
1
|
+
let e=(e,t)=>e.split(t).length-1,t=/^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/;export const hasOpenFence=t=>e(t,"```")%2==1;export const completeStreamedMarkdown=n=>{if(hasOpenFence(n))return`${n}
|
|
2
|
+
\`\`\``;let l=n.lastIndexOf("```"),s=-1===l?"":n.slice(0,l+3),r=n.slice(s.length),c=(e=>{let n=e.split("\n"),l=n.length;for(;l>0&&n[l-1]?.trimStart().startsWith("|");)l-=1;let s=n.slice(l),r=s[1],c=null!=r&&s.length>2&&t.test(r);return 0===s.length||c?e:n.slice(0,l).join("\n")})((e(r,"`")%2==1?r.slice(0,r.lastIndexOf("`")):r).replace(/!?\[([^\]\n]*)\]\([^)\n]*$/,"$1").replace(/!?\[[^\]\n]*$/,"")),i=e(c,"**")%2==1?`${c}**`:c;return`${s}${i}`};
|
|
@@ -8,6 +8,12 @@ export interface AssistantToolItem {
|
|
|
8
8
|
readonly input: unknown;
|
|
9
9
|
readonly result: unknown;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* What the forms in a stretch of assistant text are: shown only in the last message of the thread,
|
|
13
|
+
* and usable only once its reply has ended. A form in any earlier message has been answered or
|
|
14
|
+
* passed over, so it is not shown at all.
|
|
15
|
+
*/
|
|
16
|
+
export type AssistantFormsVisibility = 'hidden' | 'disabled' | 'enabled';
|
|
11
17
|
/**
|
|
12
18
|
* One block of the thread, in reading order: a user bubble, a stretch of assistant Markdown, a row
|
|
13
19
|
* of chips for the tool calls that follow each other without text in between, or the line that
|
|
@@ -22,6 +28,7 @@ export type AssistantThreadItem = {
|
|
|
22
28
|
readonly id: string;
|
|
23
29
|
readonly markdown: string;
|
|
24
30
|
readonly isStreaming: boolean;
|
|
31
|
+
readonly forms: AssistantFormsVisibility;
|
|
25
32
|
} | {
|
|
26
33
|
readonly kind: 'tools';
|
|
27
34
|
readonly id: string;
|
|
@@ -39,7 +46,7 @@ export interface AssistantThreadView {
|
|
|
39
46
|
* Lays the messages of the chat out as the blocks the thread renders. Reasoning is left out; tool
|
|
40
47
|
* results are not shown on their own but decide the state of the chip of their call.
|
|
41
48
|
*/
|
|
42
|
-
export declare const buildThreadView: (messages: ReadonlyArray<UIMessage>, isReplying: boolean) => AssistantThreadView;
|
|
49
|
+
export declare const buildThreadView: (messages: ReadonlyArray<UIMessage>, isReplying: boolean, isResuming: boolean) => AssistantThreadView;
|
|
43
50
|
/**
|
|
44
51
|
* Lays the closed threads of the conversation out above the thread that continues them, oldest
|
|
45
52
|
* first, each ended by a separator: the assistant read on from a summary of it, not from the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{match as t}from"ts-pattern";import{describeToolCall as e}from"./tool-chip.js";let r=t=>{try{return JSON.parse(t)}catch{return t}},i=t=>t.map(t=>"text"===t.type?t.content:"").join("").trim();export const buildThreadView=(o,n,s)=>{let l=(t=>{let e=new Map;for(let i of t)for(let t of i.parts)"tool-result"===t.type&&e.set(t.toolCallId,{result:"string"==typeof t.content?r(t.content):t.content,error:"error"===t.state?t.error??"The tool call failed.":void 0});return e})(o),a=[],d=o.at(-1),p=t=>{let e=a.at(-1);e?.kind==="tools"?a[a.length-1]={...e,tools:[...e.tools,t]}:a.push({kind:"tools",id:t.id,tools:[t]})};for(let r of o){if("user"===r.role){let t=i(r.parts);t&&a.push({kind:"user",id:r.id,text:t});continue}let o=n&&r===d,u=t({isLast:r===d,isBusy:o||s}).with({isLast:!1},()=>"hidden").with({isBusy:!0},()=>"disabled").otherwise(()=>"enabled");r.parts.forEach((t,i)=>{let n=`${r.id}:${i}`;if("text"===t.type){if(t.content.trim()){let e=o&&i===r.parts.length-1;a.push({kind:"text",id:n,markdown:t.content,isStreaming:e,forms:u})}return}if("tool-call"!==t.type)return;let s=l.get(t.id),d=t.input,h=t.output??s?.result;p({id:t.id,input:d,result:h,chip:e({name:t.name,input:d,result:h,error:s?.error,isReplyRunning:o})})})}let u=a.at(-1),h=d?.role==="assistant"&&(u?.kind==="text"&&u.isStreaming||u?.kind==="tools");return{items:a,isThinking:n&&!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`}]);
|
|
@@ -189,6 +189,7 @@ interface ChildEntityCardSelectorSchema {
|
|
|
189
189
|
interface ChildEntitySelectionComponentState {
|
|
190
190
|
value: { $read: string } // Read-only - system manages DomainEntityId updates
|
|
191
191
|
options: { $read: string } // Expression returning ChildEntitySelectionOption[]
|
|
192
|
+
keepChildren?: boolean // Keep the children of the replaced entity; by default they are deleted
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
// Each selectable option configuration
|
package/dist/docs/fabs/basic.mdx
CHANGED
|
@@ -62,8 +62,8 @@ Lastly as both `sceneEntityDeleteFab` and `sceneEntityAddFab` are controls that
|
|
|
62
62
|
|
|
63
63
|
All on-scene controls allow definition of `azimuthAngleLimits`, `polarAngleLimits` and `distanceLimits` properties to limit the visibility of the control based on the camera position. These properties optionally take an object with the following properties:
|
|
64
64
|
|
|
65
|
-
- `min`, `max` - the range of the angle or distance where the control is visible
|
|
66
|
-
- `minOpacity` - the opacity of the control when the camera is out of the range (default is `0
|
|
65
|
+
- `min`, `max` (both required) - the range of the angle or distance where the control is visible
|
|
66
|
+
- `minOpacity` - the opacity of the control when the camera is out of the range (default is `0`)
|
|
67
67
|
- `smoothZone` - zone that eats from both sides of the range, where the opacity is interpolated from `minOpacity` to `1.0` (default is `(max - min) / 8`)
|
|
68
68
|
|
|
69
69
|
All three limits can be used separately or combined. The angle limits are in radians and the distance limits respect the `unit` defined on the component.
|
package/dist/docs/index.json
CHANGED