@salsita-ai/sdk 0.50.0-develop.9cf426b400 → 0.50.0-develop.9feae4851f
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 +1 -1
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
- package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
- 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/admin-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
- 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.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/env-example.js +4 -0
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +1 -1
- 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-create-configurator-skill.js +41 -13
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- 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/skills/sdk-content.d.ts +30 -3
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -5
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +9 -4
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -2
- 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/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -8
- 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 +9 -43
- 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 +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -21
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +34 -0
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +3 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +269 -30
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +212 -13
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- 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/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +8 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +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 -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 +7 -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 +10 -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 +48 -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/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
- package/dist/docs/index.json +1 -1
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
- package/dist/docs/layouts/toolbar.mdx +6 -0
- package/dist/docs/other-features/domain-actions.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +68 -34
- package/dist/docs/other-features/transformers.mdx +1 -1
- package/dist/docs/phoenix/admin.mdx +9 -24
- package/dist/docs/phoenix/deployments.mdx +1 -1
- package/dist/docs/phoenix/localization.mdx +3 -22
- package/dist/docs/phoenix/phoenix-cli.mdx +105 -23
- package/dist/docs/phoenix/project-structure.mdx +9 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +10 -9
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
- package/dist/docs/relations/hierarchy.mdx +13 -2
- package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -2
- package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
- package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
- package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +1 -4
- package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
- package/dist/domain/admin-domain/index.d.ts +3 -4
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +25 -75
- package/dist/domain/application/assistant/assistant-manifest.d.ts +63 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -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/generate-assistant-prompt.d.ts +3 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
- package/dist/domain/application/assistant/index.d.ts +4 -0
- package/dist/domain/application/assistant/index.js +1 -0
- package/dist/domain/application/assistant-field-options.d.ts +2 -3
- package/dist/domain/application/assistant-mutations.d.ts +2 -5
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +2 -6
- package/dist/domain/application/configurator-builder.d.ts +33 -18
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/element-registration.d.ts +5 -0
- package/dist/domain/application/element-registration.js +1 -1
- package/dist/domain/application/handler-registration.d.ts +5 -0
- package/dist/domain/application/handler-registration.js +1 -1
- package/dist/domain/application/index.d.ts +6 -5
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
- package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
- package/dist/domain/application/resolve-imported-transformers.js +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/{actions → core/action}/action-factory.d.ts +5 -4
- package/dist/domain/core/{action.d.ts → action/action.d.ts} +6 -7
- package/dist/domain/core/action/index.d.ts +2 -0
- package/dist/domain/core/action/index.js +1 -0
- package/dist/domain/{components → core/component}/component-reader-types.d.ts +1 -2
- package/dist/domain/{components → core/component}/debug-state-component.d.ts +1 -1
- package/dist/domain/core/component/debug-state-component.js +1 -0
- package/dist/domain/{components → core/component}/domain-component-optic.d.ts +6 -6
- package/dist/domain/core/component/domain-component-optic.js +16 -0
- package/dist/domain/{components → core/component}/drag-state-component.d.ts +1 -1
- package/dist/domain/core/component/drag-state-component.js +1 -0
- package/dist/domain/{components → core/component}/export-state-component.d.ts +1 -1
- package/dist/domain/core/component/export-state-component.js +1 -0
- package/dist/domain/{components → core/component}/fullscreen-state-component.d.ts +1 -1
- package/dist/domain/core/component/fullscreen-state-component.js +1 -0
- package/dist/domain/{components → core/component}/group-components-by-entity-id-and-name.d.ts +1 -2
- package/dist/domain/core/component/group-components-by-entity-id-and-name.js +1 -0
- package/dist/domain/{components → core/component}/hover-state-component.d.ts +1 -1
- package/dist/domain/core/component/hover-state-component.js +1 -0
- package/dist/domain/core/component/index.d.ts +18 -0
- package/dist/domain/core/component/index.js +1 -0
- package/dist/domain/{components → core/component}/legacy-filter.d.ts +2 -2
- package/dist/domain/{components → core/component}/navigation-state-component.d.ts +1 -1
- package/dist/domain/core/component/navigation-state-component.js +1 -0
- package/dist/domain/{components → core/component}/selection-state-component.d.ts +1 -1
- package/dist/domain/core/component/selection-state-component.js +1 -0
- package/dist/domain/{components → core/component}/system-component-builder.d.ts +1 -2
- package/dist/domain/core/component/system-component-builder.js +1 -0
- package/dist/domain/{components → core/component}/system-component-filter.d.ts +3 -3
- package/dist/domain/core/component/system-virtual-entity.js +1 -0
- package/dist/domain/{components → core/component}/tool-state-component.d.ts +1 -1
- package/dist/domain/core/component/tool-state-component.js +1 -0
- package/dist/domain/{components → core/component}/updates.d.ts +17 -2
- package/dist/domain/{components → core/component}/view-state-component.d.ts +1 -1
- package/dist/domain/core/component/view-state-component.js +1 -0
- package/dist/domain/{components → core/component}/viewport-state-component.d.ts +1 -1
- package/dist/domain/core/component/viewport-state-component.js +1 -0
- package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
- package/dist/domain/core/decoder/create-decoder.js +1 -0
- package/dist/domain/core/decoder/decoder.d.ts +6 -0
- package/dist/domain/core/decoder/index.d.ts +2 -0
- package/dist/domain/core/decoder/index.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -5
- package/dist/domain/core/domain-factory.js +1 -1
- package/dist/domain/core/domain.d.ts +3 -4
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
- package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +4 -5
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +6 -8
- package/dist/domain/core/expression/index.d.ts +4 -0
- package/dist/domain/core/expression/index.js +1 -0
- package/dist/domain/core/index.d.ts +11 -17
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
- package/dist/domain/{invariants → core/invariant}/custom-invariants.d.ts +2 -3
- package/dist/domain/core/invariant/custom-invariants.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +5 -0
- package/dist/domain/core/invariant/index.js +1 -0
- package/dist/domain/{invariants → core/invariant}/invariants.d.ts +12 -4
- package/dist/domain/core/invariant/invariants.js +1 -0
- package/dist/domain/core/invariant/violation-component.js +1 -0
- package/dist/domain/{invariants → core/invariant}/violation.d.ts +2 -2
- package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
- package/dist/domain/core/model/index.d.ts +6 -0
- package/dist/domain/core/model/index.js +1 -0
- package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
- package/dist/domain/core/model/reflection.js +1 -0
- package/dist/domain/core/recipe/index.d.ts +1 -0
- package/dist/domain/core/recipe/index.js +1 -0
- package/dist/domain/{domain-context/recipe-system → core/recipe}/recipes.d.ts +1 -3
- package/dist/domain/core/recipe/recipes.js +1 -0
- package/dist/domain/{relations → core/relation}/all-of-type-relation.d.ts +3 -4
- package/dist/domain/core/relation/all-of-type-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/component-factories.d.ts +1 -2
- package/dist/domain/core/relation/component-factories.js +1 -0
- package/dist/domain/{relations → core/relation}/composed-of.d.ts +1 -1
- package/dist/domain/core/relation/composed-of.js +1 -0
- package/dist/domain/{relations → core/relation}/direct-relation.d.ts +2 -3
- package/dist/domain/core/relation/index.d.ts +9 -0
- package/dist/domain/core/relation/index.js +1 -0
- package/dist/domain/{relations → core/relation}/indirect-relation.d.ts +3 -4
- package/dist/domain/core/relation/indirect-relation.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-component.d.ts +4 -5
- package/dist/domain/core/relation/reference-component.js +1 -0
- package/dist/domain/{relations → core/relation}/reference-field.d.ts +1 -1
- package/dist/domain/core/relation/reference-field.js +1 -0
- package/dist/domain/{relations → core/relation}/relation-factory.d.ts +2 -3
- package/dist/domain/{relations → core/relation}/relation-implementation.d.ts +3 -4
- package/dist/domain/core/relation/relation-implementation.js +1 -0
- package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
- package/dist/domain/core/schema/extended-schema-validator.js +1 -0
- package/dist/domain/core/schema/index.d.ts +3 -0
- package/dist/domain/core/schema/index.js +1 -0
- package/dist/domain/core/schema/schema-validator.js +1 -0
- package/dist/domain/core/state/id-sequence.d.ts +15 -0
- package/dist/domain/core/state/id-sequence.js +1 -0
- package/dist/domain/core/state/index.d.ts +3 -0
- package/dist/domain/core/state/index.js +1 -0
- package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
- package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
- package/dist/domain/domain-builder.d.ts +11 -11
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +1 -3
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/create-transformer.d.ts +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +1 -2
- package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
- package/dist/domain/domain-context/index.d.ts +2 -3
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +3 -5
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -12
- package/dist/domain/domain-context/navigation-system/navigation-updates.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +1 -3
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.js +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
- package/dist/domain/domain-context/relation-transformers/replace-refs.js +1 -1
- package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -3
- package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
- package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -13
- package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -2
- package/dist/domain/domain-context/store-system/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +1 -5
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
- package/dist/domain/domain-context/store-system/system-state.js +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -3
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
- package/dist/domain/domain-context/transformers/context.d.ts +1 -5
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -5
- package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
- package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -2
- package/dist/domain/domain-context/transformers/then-builder.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -6
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -4
- package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +2 -4
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -4
- package/dist/domain/domain-runtime/spec/index.d.ts +3 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.d.ts +1 -2
- package/dist/domain/{actions → domain-runtime/spec}/prepare-action-implementations.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/prepare-action-implementations.js +5 -0
- package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.d.ts +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 +4 -5
- package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/angle-indicator.js +1 -0
- package/dist/domain/extensions/attribute-switch.js +1 -0
- package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +1 -1
- package/dist/domain/extensions/autorotate-camera-component.js +1 -0
- package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/basic-sidebar-footer.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity-object.js +1 -0
- package/dist/domain/extensions/camera-based-hidden-entity.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/canvas-config.js +1 -0
- package/dist/domain/extensions/canvas-custom-environment.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +1 -1
- package/dist/domain/extensions/canvas-padding.js +1 -0
- package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +1 -1
- package/dist/domain/extensions/canvas-preset-environment.js +1 -0
- package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/client-side-image.js +1 -0
- package/dist/domain/extensions/color-value.js +1 -0
- package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
- package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +1 -1
- package/dist/domain/extensions/common/dimension-indicator-schema.js +1 -0
- package/dist/domain/extensions/common/index.d.ts +4 -0
- package/dist/domain/extensions/common/index.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-header.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/custom-header.js +1 -1
- package/dist/domain/extensions/custom-price-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.js +1 -1
- package/dist/domain/{system-components → extensions}/dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-angle-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-angle-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-distance-dimension-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-distance-dimension-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-offset-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/editable-size-indicator.d.ts +3 -2
- package/dist/domain/extensions/editable-size-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/entity-header.d.ts +1 -1
- package/dist/domain/extensions/entity-header.js +1 -0
- package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +1 -1
- package/dist/domain/extensions/exit-tool-mode-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/finalize-action.d.ts +1 -1
- package/dist/domain/extensions/finalize-action.js +1 -0
- package/dist/domain/extensions/finalize-component.js +1 -0
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -0
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -0
- package/dist/domain/{system-components → extensions}/fixed-header.d.ts +1 -1
- package/dist/domain/extensions/fixed-header.js +1 -0
- package/dist/domain/{system-components → extensions}/floating-header.d.ts +1 -1
- package/dist/domain/extensions/floating-header.js +1 -0
- package/dist/domain/{system-components → extensions}/hidden-header.d.ts +1 -1
- package/dist/domain/extensions/hidden-header.js +1 -0
- package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/hidden-sidebar-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +1 -1
- package/dist/domain/extensions/horizontal-tabs.js +1 -0
- package/dist/domain/extensions/index.d.ts +69 -0
- package/dist/domain/extensions/index.js +1 -0
- package/dist/domain/{system-components → extensions}/list-selector-dimension-indicator.d.ts +3 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.js +1 -0
- package/dist/domain/extensions/multilingual-text-value.js +1 -0
- package/dist/domain/extensions/navigation-steps.js +1 -0
- package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +1 -1
- package/dist/domain/extensions/offset-anchors.js +1 -0
- package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +1 -2
- package/dist/domain/extensions/offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/offset.d.ts +1 -1
- package/dist/domain/extensions/offset.js +1 -0
- package/dist/domain/{system-components → extensions}/other-action.d.ts +1 -1
- package/dist/domain/extensions/other-action.js +1 -0
- package/dist/domain/{system-components → extensions}/property-page.d.ts +2 -2
- package/dist/domain/extensions/property-page.js +1 -0
- package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/read-sidebar-footer.js +1 -0
- package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +2 -2
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/extensions/rotatable.js +1 -0
- package/dist/domain/extensions/rotation-handle.js +1 -0
- package/dist/domain/extensions/save-template-thumbnail.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-add-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-add-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-animation.js +1 -0
- package/dist/domain/extensions/scene-entity-control.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-delete-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-delete-fab.js +1 -0
- package/dist/domain/extensions/scene-entity-floor-object.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-navigation-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-navigation-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-object-html-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-object-html-hotspot.js +1 -0
- package/dist/domain/{system-components → extensions}/scene-entity-select-hotspot.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-select-hotspot.js +1 -0
- package/dist/domain/extensions/scene-entity-wall-object.js +1 -0
- package/dist/domain/extensions/selectable-component.js +1 -0
- package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +1 -1
- package/dist/domain/extensions/sidebar-tabs.js +1 -0
- package/dist/domain/extensions/simple-summary.js +1 -0
- package/dist/domain/{system-components → extensions}/size.d.ts +1 -1
- package/dist/domain/extensions/size.js +1 -0
- package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +1 -1
- package/dist/domain/extensions/sketching-draw.js +1 -0
- package/dist/domain/{system-components → extensions}/sketching-edit.d.ts +2 -2
- package/dist/domain/extensions/sketching-edit.js +1 -0
- package/dist/domain/extensions/summary-component.js +1 -0
- package/dist/domain/extensions/text-value.js +1 -0
- package/dist/domain/extensions/tool-controls.js +1 -0
- package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +2 -2
- package/dist/domain/extensions/tool-menu-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/toolbar.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/toolbar.js +1 -1
- package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/universal-sidebar-footer.js +1 -0
- package/dist/domain/extensions/view-controls.js +1 -0
- package/dist/domain/index.d.ts +3 -32
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +3 -3
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/project-modules/index.d.ts +1 -0
- package/dist/domain/project-modules/index.js +1 -0
- package/dist/domain/project-modules/project-modules.d.ts +41 -0
- package/dist/domain/project-modules/project-modules.js +1 -0
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
- package/dist/domain/projections/composition-projections.js +1 -1
- package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
- package/dist/domain/projections/snap-matching.d.ts +1 -2
- package/dist/domain/projections/snap-utils.d.ts +1 -2
- package/dist/domain/projections/validation-projections.d.ts +1 -2
- package/dist/domain/projections/validation-projections.js +1 -1
- package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
- package/dist/domain/system-components/admin-sidebar.js +1 -1
- package/dist/domain/system-components/angle-dimension.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +1 -1
- package/dist/domain/system-components/application-config.js +1 -1
- package/dist/domain/system-components/attribute-selection.js +1 -1
- package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-box-component.js +1 -1
- package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
- package/dist/domain/system-components/bounding-sphere-component.js +1 -1
- package/dist/domain/system-components/child-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/child-entity-recipes.js +1 -1
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-box-geometry.js +1 -1
- package/dist/domain/system-components/collision-geometries.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-geometry.js +1 -1
- package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
- package/dist/domain/system-components/collision-point-geometry.js +1 -1
- package/dist/domain/system-components/common/index.d.ts +0 -4
- package/dist/domain/system-components/common/index.js +1 -1
- package/dist/domain/system-components/common/recipes.d.ts +1 -2
- package/dist/domain/system-components/constraint.d.ts +1 -1
- package/dist/domain/system-components/constraint.js +1 -1
- package/dist/domain/system-components/create-blueprint.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
- package/dist/domain/system-components/custom-scene-entity.js +1 -1
- package/dist/domain/system-components/detail.js +1 -1
- package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension-select.js +1 -1
- package/dist/domain/system-components/distance-dimension.d.ts +1 -1
- package/dist/domain/system-components/distance-dimension.js +1 -1
- package/dist/domain/system-components/drag-handle.d.ts +1 -1
- package/dist/domain/system-components/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/generic-dimension.d.ts +1 -1
- package/dist/domain/system-components/generic-dimension.js +1 -1
- package/dist/domain/system-components/hidden-entity.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -2
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/index.d.ts +0 -68
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/material-override-property-transition.js +1 -1
- package/dist/domain/system-components/material-override-transformer.js +1 -1
- package/dist/domain/system-components/material-swatch.js +1 -1
- package/dist/domain/system-components/navigation-page.js +1 -1
- package/dist/domain/system-components/navigation-panel-list.js +1 -1
- 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/domain/system-components/pivot-point.d.ts +1 -1
- package/dist/domain/system-components/pivot-point.js +1 -1
- package/dist/domain/system-components/price.js +1 -1
- package/dist/domain/system-components/projected-entities.d.ts +1 -1
- package/dist/domain/system-components/projected-entities.js +1 -1
- package/dist/domain/system-components/replace-entity-recipes.d.ts +1 -1
- package/dist/domain/system-components/replace-entity-recipes.js +1 -1
- package/dist/domain/system-components/scene-entity-ambient-light.js +1 -1
- package/dist/domain/system-components/scene-entity-box-object.js +1 -1
- package/dist/domain/system-components/scene-entity-directional-light.js +1 -1
- package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-clip.js +1 -1
- package/dist/domain/system-components/scene-entity-object-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-group.js +1 -1
- package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transformer.js +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-object.js +1 -1
- package/dist/domain/system-components/scene-entity-point-light.js +1 -1
- package/dist/domain/system-components/scene-entity-properties.js +1 -1
- package/dist/domain/system-components/scene-entity-rect-area-light.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
- package/dist/domain/system-components/scene-entity-remote-object.js +1 -1
- package/dist/domain/system-components/scene-entity-spot-light.js +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
- package/dist/domain/system-components/sketching-line.d.ts +1 -1
- package/dist/domain/system-components/sketching-line.js +1 -1
- package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
- package/dist/domain/system-components/sketching-rectangle.js +1 -1
- package/dist/domain/system-components/sketching.d.ts +1 -1
- package/dist/domain/system-components/sketching.js +1 -1
- package/dist/domain/system-components/snap-axis.d.ts +1 -1
- package/dist/domain/system-components/snap-axis.js +1 -1
- package/dist/domain/system-components/snap-edge.d.ts +1 -1
- package/dist/domain/system-components/snap-edge.js +1 -1
- package/dist/domain/system-components/snap-plane.d.ts +1 -1
- package/dist/domain/system-components/snap-plane.js +1 -1
- package/dist/domain/system-components/snap-point.d.ts +1 -1
- package/dist/domain/system-components/snap-point.js +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.d.ts +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.js +1 -1
- package/dist/domain/utils/eval-cache.d.ts +1 -2
- package/dist/domain/utils/memo-eval.d.ts +1 -3
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -6
- 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-cli/gen/configurator-builder.js +21 -8
- 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 +6 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/env-example.js +4 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/deploy.js +2 -2
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/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/scripts/build-admin.js +1 -1
- 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 +4 -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-variant-previews-plugin.d.ts +9 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- 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.js +1 -1
- 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-domain-application-props.d.ts +5 -2
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -4
- 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/dist/webhook/builders/common.d.ts +8 -0
- package/dist/webhook/builders/webhook-builder.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +5 -8
- package/schema/domain-spec.json +24 -0
- 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/domain/actions/prepare-action-implementations.js +0 -5
- package/dist/domain/components/debug-state-component.js +0 -1
- package/dist/domain/components/domain-component-optic.js +0 -16
- package/dist/domain/components/drag-state-component.js +0 -1
- package/dist/domain/components/export-state-component.js +0 -1
- package/dist/domain/components/fullscreen-state-component.js +0 -1
- package/dist/domain/components/group-components-by-entity-id-and-name.js +0 -1
- package/dist/domain/components/hover-state-component.js +0 -1
- package/dist/domain/components/index.d.ts +0 -2
- package/dist/domain/components/index.js +0 -1
- package/dist/domain/components/navigation-state-component.js +0 -1
- package/dist/domain/components/selection-state-component.js +0 -1
- package/dist/domain/components/system-component-builder.js +0 -1
- package/dist/domain/components/system-virtual-entity.js +0 -1
- package/dist/domain/components/tool-state-component.js +0 -1
- package/dist/domain/components/view-state-component.js +0 -1
- package/dist/domain/components/viewport-state-component.js +0 -1
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/reflection.js +0 -1
- package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
- package/dist/domain/expressions/constant-expressions.js +0 -1
- package/dist/domain/expressions/custom-expression.js +0 -1
- package/dist/domain/expressions/index.d.ts +0 -1
- package/dist/domain/expressions/index.js +0 -1
- package/dist/domain/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.js +0 -1
- package/dist/domain/invariants/violation-component.js +0 -1
- package/dist/domain/relations/all-of-type-relation.js +0 -1
- package/dist/domain/relations/component-factories.js +0 -1
- package/dist/domain/relations/composed-of.js +0 -1
- package/dist/domain/relations/indirect-relation.js +0 -1
- package/dist/domain/relations/reference-component.js +0 -1
- package/dist/domain/system-components/angle-indicator.js +0 -1
- package/dist/domain/system-components/attribute-switch.js +0 -1
- package/dist/domain/system-components/autorotate-camera-component.js +0 -1
- package/dist/domain/system-components/basic-sidebar-footer.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity-object.js +0 -1
- package/dist/domain/system-components/camera-based-hidden-entity.js +0 -1
- package/dist/domain/system-components/canvas-config.js +0 -1
- package/dist/domain/system-components/canvas-custom-environment.js +0 -1
- package/dist/domain/system-components/canvas-padding.js +0 -1
- package/dist/domain/system-components/canvas-preset-environment.js +0 -1
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/client-side-image.js +0 -1
- package/dist/domain/system-components/color-value.js +0 -1
- package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
- package/dist/domain/system-components/common/dimension-indicator-schema.js +0 -1
- package/dist/domain/system-components/custom-price-footer.js +0 -1
- package/dist/domain/system-components/dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-angle-indicator.js +0 -1
- package/dist/domain/system-components/editable-distance-dimension-indicator.js +0 -1
- package/dist/domain/system-components/editable-offset-indicator.js +0 -1
- package/dist/domain/system-components/editable-size-indicator.js +0 -1
- package/dist/domain/system-components/entity-header.js +0 -1
- package/dist/domain/system-components/exit-tool-mode-fab.js +0 -1
- package/dist/domain/system-components/finalize-action.js +0 -1
- package/dist/domain/system-components/finalize-component.js +0 -1
- package/dist/domain/system-components/fit-selection-orthographic-camera-component.js +0 -1
- package/dist/domain/system-components/fit-selection-perspective-camera-component.js +0 -1
- package/dist/domain/system-components/fixed-header.js +0 -1
- package/dist/domain/system-components/floating-header.js +0 -1
- package/dist/domain/system-components/hidden-header.js +0 -1
- package/dist/domain/system-components/hidden-sidebar-footer.js +0 -1
- package/dist/domain/system-components/horizontal-tabs.js +0 -1
- package/dist/domain/system-components/list-selector-dimension-indicator.js +0 -1
- package/dist/domain/system-components/multilingual-text-value.js +0 -1
- package/dist/domain/system-components/navigation-steps.js +0 -1
- package/dist/domain/system-components/offset-anchors.js +0 -1
- package/dist/domain/system-components/offset-indicator.js +0 -1
- package/dist/domain/system-components/offset.js +0 -1
- package/dist/domain/system-components/other-action.js +0 -1
- package/dist/domain/system-components/property-page.js +0 -1
- package/dist/domain/system-components/read-sidebar-footer.js +0 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/rotatable.js +0 -1
- package/dist/domain/system-components/rotation-handle.js +0 -1
- package/dist/domain/system-components/save-template-thumbnail.js +0 -1
- package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-animation.js +0 -1
- package/dist/domain/system-components/scene-entity-control.js +0 -1
- package/dist/domain/system-components/scene-entity-delete-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-floor-object.js +0 -1
- package/dist/domain/system-components/scene-entity-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-navigation-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-object-html-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-select-hotspot.js +0 -1
- package/dist/domain/system-components/scene-entity-wall-object.js +0 -1
- package/dist/domain/system-components/selectable-component.js +0 -1
- package/dist/domain/system-components/sidebar-tabs.js +0 -1
- package/dist/domain/system-components/simple-summary.js +0 -1
- package/dist/domain/system-components/size.js +0 -1
- package/dist/domain/system-components/sketching-draw.js +0 -1
- package/dist/domain/system-components/sketching-edit.js +0 -1
- package/dist/domain/system-components/summary-component.js +0 -1
- package/dist/domain/system-components/text-value.js +0 -1
- package/dist/domain/system-components/tool-controls.js +0 -1
- package/dist/domain/system-components/tool-menu-fab.js +0 -1
- package/dist/domain/system-components/universal-sidebar-footer.js +0 -1
- package/dist/domain/system-components/view-controls.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.d.ts +0 -12
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
- /package/dist/domain/{components/component-reader-types.js → application/assistant/assistant-manifest.js} +0 -0
- /package/dist/domain/{core/action.js → application/assistant/assistant-resolved-manifest.js} +0 -0
- /package/dist/domain/{actions → core/action}/action-factory.js +0 -0
- /package/dist/domain/core/{enhanced-json-schema.js → action/action.js} +0 -0
- /package/dist/domain/core/{expression.js → component/component-reader-types.js} +0 -0
- /package/dist/domain/{components → core/component}/legacy-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-component-filter.js +0 -0
- /package/dist/domain/{components → core/component}/system-virtual-entity.d.ts +0 -0
- /package/dist/domain/{components → core/component}/updates.js +0 -0
- /package/dist/domain/core/{schema-validator.js → decoder/decoder.js} +0 -0
- /package/dist/domain/{relations/reference-field.js → core/expression/aliased-expressions.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/expression/expression.js} +0 -0
- /package/dist/domain/{invariants → core/invariant}/builtin-invariant.js +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation-component.d.ts +0 -0
- /package/dist/domain/{invariants → core/invariant}/violation.js +0 -0
- /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
- /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
- /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
- /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
- /package/dist/domain/core/{component.js → model/component.js} +0 -0
- /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
- /package/dist/domain/core/{model.js → model/model.js} +0 -0
- /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
- /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
- /package/dist/domain/{relations → core/relation}/direct-relation.js +0 -0
- /package/dist/domain/{relations → core/relation}/relation-factory.js +0 -0
- /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
- /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
- /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
- /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
- /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
- /package/dist/domain/core/{state.js → state/state.js} +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/memoize-expression.js +0 -0
- /package/dist/domain/{expressions → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
- /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/client-side-image.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicators.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/common/editable-indicator-button-variant.js +0 -0
- /package/dist/domain/{system-components → extensions}/custom-price-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-orthographic-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/navigation-steps.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/summary-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.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};
|
|
@@ -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,8 +1,11 @@
|
|
|
1
|
-
import type { AclConfig, DomainConfig, PersistenceConfig } from '#package/domain';
|
|
1
|
+
import type { AclConfig, AnyDomainComponentOptic, DomainConfig, PersistenceConfig } from '#package/domain';
|
|
2
2
|
interface DomainApplicationProps {
|
|
3
3
|
readonly deploymentId: string;
|
|
4
4
|
readonly persistenceConfig: PersistenceConfig;
|
|
5
|
-
|
|
5
|
+
/** The domain config as the runtime spec holds it: component optics already validated, never project modules. */
|
|
6
|
+
readonly domainConfig: Omit<DomainConfig<any, any, any, any, any, any>, 'componentOptics'> & {
|
|
7
|
+
readonly componentOptics: readonly AnyDomainComponentOptic[];
|
|
8
|
+
};
|
|
6
9
|
readonly canCreate: AclConfig['canCreate'];
|
|
7
10
|
readonly enableAdminRelease: boolean;
|
|
8
11
|
}
|
|
@@ -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>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { $DomainEntity, ApplicationConfig, DomainEntity, RegistrableTransformer, WebComponentOptions } from '#package/domain';
|
|
2
2
|
import type { ApplicationRuntime } from '../runtime/react-runtime.js';
|
|
3
3
|
import { type WebComponentApi } from '../web-component/index.js';
|
|
4
|
-
export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(
|
|
4
|
+
export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(config: ApplicationConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>, mocks: {
|
|
5
5
|
frontendData: FRONTEND_DATA;
|
|
6
6
|
publishedData: PUBLISHED_DATA;
|
|
7
7
|
sessionData: SESSION_DATA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as
|
|
1
|
+
import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as p}from"../routing/index.js";import{SessionService as l,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(f,C)=>{var x;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=C,z=o(),q=(x={webComponentOptions:C.webComponentOptions??f.mount.options,webComponentApi:C.webComponentApi??u()},w=v(),A=t({config:f,services:z,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=p(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:x.webComponentOptions,webComponentApi:x.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new l({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}}),B=q.getState().spec;return q.actions.spec.updateSpec({...B,configurator:{...B.configurator,createTransformers:e=>C.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),q.actions.sessionContext.setSessionContext(n(V,M)),q.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),q.actions.domainData.setDomainData({publishedData:C.publishedData,frontendData:C.frontendData,backendData:C.backendData}),q.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:C.entities,modelVersion:f.domain.domainFactory.modelVersion,rootEntityType:C.rootEntityType,schemaIdentity:f.domain.domainFactory}),q};
|
|
@@ -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[];
|
|
@@ -727,7 +727,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
727
727
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
|
|
728
728
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
|
|
729
729
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
730
|
-
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>;
|
|
731
731
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
732
732
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
733
733
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
|
|
@@ -770,7 +770,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
770
770
|
getAdminPreset: () => import("#package/domain").AnyProductPreset;
|
|
771
771
|
getAdminModelVersion: () => number;
|
|
772
772
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
773
|
-
getAssistant: () => import("#package/domain").AssistantManifest | null;
|
|
773
|
+
getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
|
|
774
774
|
getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
|
|
775
775
|
getAdminFactory: () => import("#package/domain").AnyDomainFactory;
|
|
776
776
|
getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
|
|
@@ -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' | 'separator' | 'earlierButton' | '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
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { I18n } from '@lingui/core';
|
|
2
|
+
import type { DeploymentAssistant } from '@salsita-ai/contracts/assistant';
|
|
2
3
|
import type { $DomainEntity, ConfiguratorBuilder, DomainEntity } from '#package/domain';
|
|
3
4
|
export interface ClerkConfig {
|
|
4
5
|
apiKey: string;
|
|
@@ -11,6 +12,13 @@ export interface ClerkConfig {
|
|
|
11
12
|
}
|
|
12
13
|
export interface BuilderDomainContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
|
|
13
14
|
configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
15
|
+
/** Server-only settings supplied by the generated webhook bundle. */
|
|
16
|
+
assistantServerSettings?: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null;
|
|
17
|
+
/**
|
|
18
|
+
* Asks a development environment to lock an assistant thread when the setup changes, as every
|
|
19
|
+
* other environment does. The generated webhook bundle sets it from `ASSISTANT_STRICT_THREADS`.
|
|
20
|
+
*/
|
|
21
|
+
assistantStrictThreads?: boolean;
|
|
14
22
|
createI18n: () => I18n;
|
|
15
23
|
clerk?: ClerkConfig;
|
|
16
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type $DomainEntity, type DomainEntity } from '#package/domain';
|
|
2
2
|
import type { FetchBackendDataHandler } from '../backend-data-handler.js';
|
|
3
3
|
import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
|
|
4
4
|
import { CallbackBuilder } from './callback-builder.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initConsoleLogger as
|
|
1
|
+
import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{routeWebhookRequests as e}from"@salsita-ai/contracts/webhook";import{buildAssistantManifest as n,generateAssistantPrompt as o}from"#package/domain";import{AdminFinalizeHandlerBuilder as i}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as s}from"./auth-handler-builder.js";import{CallbackBuilder as a}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as r}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as d}from"./dynamic-resources-factory.js";import{PrefetchBuilder as l}from"./prefetch-builder.js";import{TaskFactory as h}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(t,e){this._context=t,this._handlers=e}withAuthHook(t){return new WebhookBuilder(this._context,{...this._handlers,onAuth:t})}withConfiguratorFinalize(t){return new WebhookBuilder(this._context,{...this._handlers,...t})}withFetchBackendData(t){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:t})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let s=t(),a=new i(this._context).build();return e({onAuth:this._handlers?.onAuth!==void 0?(t,e)=>this._handlers.onAuth(t,{logger:s},e):void 0,admin:{onFinalize:(t,e)=>a(t,{logger:s},e)},configurator:{onAssistantSetup:this._context.assistantServerSettings?async()=>{let t=this._context.configuratorBuilder.buildConfig().assistant;if(!t)throw Error("Assistant setup operation is not configured for this webhook!");let e=n(t),i=this._context.assistantServerSettings;return{setup:{sdl:e.sdl,prompt:o(e),...i},...this._context.assistantStrictThreads&&{threadLock:"strict"}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(t,e)=>this._handlers.onFetchBackendData(t,{logger:s},e):void 0,onFinalize:this._handlers?.onFinalize?async(t,e)=>{let n=await this._handlers?.onFetchBackendData?.({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls},{logger:s},e);return this._handlers.onFinalize({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls,data:t.data,locale:t.locale,configurationId:t.configurationId,entities:t.entities,modelVersion:t.modelVersion,revisionId:t.revisionId,rootEntityType:t.rootEntityType,backendData:n?.backendData},{logger:s},e)}:void 0,onCallback:this._handlers?.onCallback?(t,e)=>this._handlers.onCallback(t,{logger:s},e):void 0}},s)}}export const createDomainWebhook=t=>{let e=new s(t),n=new WebhookBuilder(t),o=new h(t),i=new d(t),c=new r(t,[]);return{authHandlerBuilder:e,webhookBuilder:n,taskFactory:o,finalizeHandlerBuilder:c,callbackBuilder:new a(t),dynamicResourcesFactory:i,prefetchBuilder:new l(t)}};
|
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.9feae4851f",
|
|
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.9feae4851f",
|
|
296
|
+
"@salsita-ai/contracts": "0.50.0-develop.9feae4851f"
|
|
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 +0,0 @@
|
|
|
1
|
-
export { useAssistantChat, type AssistantChatState } from './use-assistant-chat.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{useAssistantChat}from"./use-assistant-chat.js";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type UIMessage } from '@tanstack/ai-react';
|
|
2
|
-
/** Experimental assistant chat state and actions of the current configuration. */
|
|
3
|
-
export interface AssistantChatState {
|
|
4
|
-
/** The thread as painted: hydrated from the server, then streamed. */
|
|
5
|
-
readonly messages: ReadonlyArray<UIMessage>;
|
|
6
|
-
/** True while a reply streams or a browser tool runs. */
|
|
7
|
-
readonly isLoading: boolean;
|
|
8
|
-
readonly error: Error | undefined;
|
|
9
|
-
/** Sends a user message stamped with its send time. */
|
|
10
|
-
readonly send: (content: string) => Promise<void>;
|
|
11
|
-
/** Stops the current reply in the browser and on the server. */
|
|
12
|
-
readonly stop: () => Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Experimental: the conversational assistant of the current configuration. The server owns the
|
|
16
|
-
* thread — the chat hydrates from it on mount and rejoins a reply still streaming — so the hook
|
|
17
|
-
* keeps nothing in browser storage. Each message carries its send time for the model. The model's
|
|
18
|
-
* `query` and `apply` calls run here, in the browser, against the configurator this hook is rendered in.
|
|
19
|
-
*/
|
|
20
|
-
export declare const useAssistantChat: () => AssistantChatState;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fetchServerSentEvents as t,useChat as e}from"@tanstack/ai-react";import{useCallback as a,useMemo as n}from"react";import{useApplicationRuntimeSelector as s,useAuthorizedClient as r,useConfigurationId as o}from"#package/react-sdk";import{useConfigurator as i}from"../application-runtime/index.js";export const useAssistantChat=()=>{let c=o(),p=r(),l=n(()=>p.getAssistantChatConnection(c),[p,c]),u=n(()=>{let e=async()=>({headers:await l.headers()}),a=t(l.url,e),n=t(`${l.url}/runs`,e);return{...a,joinRun:n.joinRun}},[l]),{assistantSystem:d}=i(),{messages:m,isLoading:h,error:f,sendMessage:g,stop:w,runId:y}=e({threadId:`assistant:${c}`,connection:u,persistence:!0,history:{pageSize:50},tools:s(d.getTools)});return{messages:m,isLoading:h,error:f,send:a(async t=>{let e={sentAt:new Date().toISOString()};await g({content:t,metadata:e})},[g]),stop:a(async()=>{w(),null!=y&&await fetch(`${l.url}/runs/${encodeURIComponent(y)}/cancel`,{method:"POST",headers:await l.headers()})},[l,y,w])}};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const findActionImplementationConflicts=(e,n)=>{let t=Object.keys(n);return{missing:e.filter(e=>!t.includes(e)),extra:t.filter(n=>!e.includes(n))}};export const prepareActionImplementations=(e,n)=>{let{missing:t,extra:i}=findActionImplementationConflicts(Object.values(e).map(e=>e.name),n);if(0===t.length&&0===i.length)return n;let o=Error("Domain cannot be instantiated because there are conflicts between declared and implemented actions."+(t.length>0?`
|
|
2
|
-
|
|
3
|
-
Missing actions: ${t.join(", ")}. Add each to a default export of phx.domain.implementActions({ ... }) in src/actions/.`:"")+(i.length>0?`
|
|
4
|
-
|
|
5
|
-
Extra actions: ${i.join(", ")}. Declare each under "actions" in a spec file or remove its implementation.`:"")+"\n");if(t.length>0)throw o;return console.error(o),n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as e}from"../core/component.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const debugStateComponent=t.component("debugState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isDebugStateComponentSnapshot=t=>e(t,"singleton",debugStateComponent);export const isSystemDebugStateComponentSnapshot=e(o,"singleton",debugStateComponent);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{createCacheToken as t,getStickyCache as e}from"@salsita-ai/common/utils";import{createCustomExpression as i}from"../expressions/custom-expression.js";import{withProfilerLabel as n}from"../utils/profiler-label.js";export class DomainComponentOpticBuilder{aliasMap;entityTypes;componentType;instanceName;navigationFilters;generated;entityTypeOrAliasNames;constructor(t,e,i,n,s=[],a=!1,o=[]){this.aliasMap=t,this.entityTypes=e,this.componentType=i,this.instanceName=n,this.navigationFilters=s,this.generated=a,this.entityTypeOrAliasNames=o}static from(t){return new DomainComponentOpticBuilder(t,[])}withEntity(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,t],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,t])}withAlias(t){return new DomainComponentOpticBuilder(this.aliasMap,[...this.entityTypes,...this.aliasMap[t]],this.componentType,this.instanceName,this.navigationFilters,this.generated,[...this.entityTypeOrAliasNames,String(t)])}withComponent(t,e,i=!1){return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,t,e,this.navigationFilters,i,this.entityTypeOrAliasNames)}withFilter(i){if(console.warn(`Component ${this.componentType?.name}#${this.instanceName} on entity ${this.entityTypes.join(", ")} uses a legacy filter with full filter evaluation. This is a suboptimal variant and is deprecated in favor of per-criterion evaluation.
|
|
2
|
-
|
|
3
|
-
In your TS files, replace
|
|
4
|
-
withFilter()
|
|
5
|
-
->
|
|
6
|
-
withGradualFilter()
|
|
7
|
-
|
|
8
|
-
In YAML, replace
|
|
9
|
-
$filter:
|
|
10
|
-
$read: $falseOrFilterExpression
|
|
11
|
-
->
|
|
12
|
-
$filter:
|
|
13
|
-
active:
|
|
14
|
-
$read: $trueOrFalseExpression
|
|
15
|
-
# ... other eventual criteria
|
|
16
|
-
`),"function"==typeof i){let n=t(),s=t=>({evaluate:(s,a,o)=>{let r=e(a,n),d=r.get(s);if(!d){if(void 0===(d=i(o.domain.get$Entity(s,a),a)))throw Error(`Dynamic filter on component ${this.componentType?.name}.${this.instanceName} on entity ${s} returned 'undefined'. This is likely a bug in the component definition, check whether you are referencing a correct expression or field!`);r.put(s,d)}return"boolean"==typeof d?"active"===t?d:void 0:d[t]},meta:{}});return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:s("navigationStates"),selectedEntityIds:s("selectedEntityIds"),hoveredEntityIds:s("hoveredEntityIds"),draggedEntityIds:s("draggedEntityIds"),viewStates:s("viewStates"),toolStates:s("toolStates"),modes:s("modes"),roles:s("roles"),active:s("active"),fullscreen:s("fullscreen"),debug:s("debug"),viewports:s("viewports"),exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames)}return"boolean"==typeof i?new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{active:i,navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0}],this.generated,this.entityTypeOrAliasNames):new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,{navigationStates:void 0,selectedEntityIds:void 0,hoveredEntityIds:void 0,draggedEntityIds:void 0,viewStates:void 0,toolStates:void 0,modes:void 0,roles:void 0,active:void 0,fullscreen:void 0,debug:void 0,viewports:void 0,exportedEntityIds:void 0,exportStates:void 0,...i}],this.generated,this.entityTypeOrAliasNames)}withGradualFilter(t){let e=t=>"function"==typeof t?i(t,{}):t,n={navigationStates:e(t.navigationStates),selectedEntityIds:e(t.selectedEntityIds),hoveredEntityIds:e(t.hoveredEntityIds),draggedEntityIds:e(t.draggedEntityIds),exportedEntityIds:e(t.exportedEntityIds),viewStates:e(t.viewStates),toolStates:e(t.toolStates),exportStates:e(t.exportStates),modes:e(t.modes),roles:e(t.roles),active:e(t.active),fullscreen:e(t.fullscreen),debug:e(t.debug),viewports:e(t.viewports)};return new DomainComponentOpticBuilder(this.aliasMap,this.entityTypes,this.componentType,this.instanceName,[...this.navigationFilters,n],this.generated,this.entityTypeOrAliasNames)}validate(){if(!this.componentType||!this.instanceName)throw Error("Use withComponent before attaching");if(!this.entityTypes.length)throw Error("Use withEntity and/or withAlias before attaching")}_getProfilerLabel(){return[...this.entityTypeOrAliasNames,this.componentType.name,this.instanceName].join("_")}attach=(i,s)=>{var a,o;let r,d;return this.validate(),a={kind:"simple",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n),write:s??(()=>({})),generated:this.generated},o=this._getProfilerLabel(),r=t(),d=n(o,a.read),{...a,read:(t,i,n)=>{let s=e(i,r),a=s.get(t);if(a)return a;let o=d(t,i,n);return s.put(t,o),o}}};attachMany=i=>{var s,a;let o,r;return this.validate(),s={kind:"dynamic",entityTypes:new Set(this.entityTypes),componentType:this.componentType,instanceName:this.instanceName,navigationFilters:this.navigationFilters,read:(t,e,n)=>i(n.domain.get$Entity(t,e),e,n)},a=this._getProfilerLabel(),o=t(),r=n(a,s.read),{...s,read:(t,i,n)=>{let s=e(i,o),a=s.get(t);if(a)return a;let d=r(t,i,n);return s.put(t,d),d}}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const dragStateComponent=e.component("dragState").withState({type:"object",properties:{draggedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["draggedEntityId"],additionalProperties:!1,tsType:"DragStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"DragStateComponentState"}]}).withWritableKeys(["draggedEntityId"]).build();export const isDragStateComponentSnapshot=e=>t(e,"singleton",dragStateComponent);export const isSystemDragStateComponentSnapshot=t(o,"singleton",dragStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const exportStateComponent=e.component("exportState").withState({type:"object",properties:{activeState:{type:"string"},exportedEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["activeState","exportedEntityId"],additionalProperties:!1}).withWritableKeys(["activeState","exportedEntityId"]).build();export const isExportStateComponentSnapshot=e=>t(e,"singleton",exportStateComponent);export const isSystemExportStateComponentSnapshot=t(o,"singleton",exportStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as e}from"../core/component.js";import{SystemComponentBuilder as t}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const fullscreenStateComponent=t.component("fullscreenState").withState({type:"object",properties:{enabled:{type:"boolean"}},required:["enabled"],additionalProperties:!1}).withWritableKeys(["enabled"]).build();export const isFullscreenStateComponentSnapshot=t=>e(t,"singleton",fullscreenStateComponent);export const isSystemFullscreenStateComponentSnapshot=e(o,"singleton",fullscreenStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isArray as o,isShallowEqual as t}from"@salsita-ai/common/utils";import{areEqualComponentSnapshots as n,isEqualComponentSnapshot as e}from"../core/component.js";export const isEqualGroupedComponentSnapshots=(p,m)=>t(p,m,(t,p)=>t===p||void 0!==t&&void 0!==p&&(o(t)&&o(p)?n(t,p):!(o(t)||o(p))&&e(t,p)));export const groupComponentsByEntityIdAndName=o=>{let t=new Map;return o.forEach(o=>{let n=o.componentInstance.entityId,e=o.componentInstance.componentType.name,p=t.get(n);p||(p={},t.set(n,p));let m=p[e]??[];p[e]=m,m.push(o)}),t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as e}from"./system-component-builder.js";import{systemVirtualEntityId as o}from"./system-virtual-entity.js";export const hoverStateComponent=e.component("hoverState").withState({type:"object",properties:{hoveredEntityId:{oneOf:[{type:"string"},{type:"null"}]}},required:["hoveredEntityId"],additionalProperties:!1,tsType:"HoverStateComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"HoverStateComponentState"}]}).withWritableKeys(["hoveredEntityId"]).build();export const isHoverStateComponentSnapshot=e=>t(e,"singleton",hoverStateComponent);export const isSystemHoverStateComponentSnapshot=t(o,"singleton",hoverStateComponent);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{SystemComponentBuilder}from"./system-component-builder.js";export*from"./domain-component-optic.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isSnapshotInstance as t}from"../core/component.js";import{SystemComponentBuilder as o}from"./system-component-builder.js";import{systemVirtualEntityId as e}from"./system-virtual-entity.js";export const navigationStateComponent=o.component("navigationState").withState({type:"object",properties:{activeState:{type:"string"},historyStack:{type:"array",items:{type:"string"}}},required:["activeState"],additionalProperties:!1}).withWritableKeys(["activeState","historyStack"]).build();export const isNavigationComponentSnapshot=o=>t(o,"singleton",navigationStateComponent);export const isSystemNavigationComponentSnapshot=t(e,"singleton",navigationStateComponent);
|