@salsita-ai/sdk 0.50.0-develop.7d4723b0a5 → 0.50.0-develop.8c8c362f86
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 +3 -3
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +9 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +12 -0
- package/dist/application-spec/errors/diagnostic-messages.js +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.d.ts +8 -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/generate-defaults.d.ts +4 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +56 -56
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +5 -5
- package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -7
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.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 +93 -41
- 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 +10 -4
- 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 +39 -13
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -7
- 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/application-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +16 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
- package/dist/application-spec/parse-application-files/spec/relations/relations.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/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
- 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 +367 -30
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +247 -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 +30 -5
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/inject-assistant-lenses.js +1 -0
- 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/configurator-interface.d.ts +5 -1
- package/dist/configurator/common/configurator-interface.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/DefaultConfiguratorLayout.d.ts +6 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- 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/sidebar-keys/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.d.ts +11 -0
- package/dist/configurator/ui/configurator-layout/sidebar-keys/sidebar-keys.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.d.ts +101 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/index.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/slots/slots.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +0 -74
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- 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 +100 -117
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- package/dist/docs/index.json +32 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-layout.mdx +981 -0
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
- 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 +76 -45
- package/dist/docs/other-features/transformers.mdx +5 -1
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/admin.mdx +11 -26
- package/dist/docs/phoenix/configurator-interface.mdx +106 -65
- package/dist/docs/phoenix/deployments.mdx +1 -1
- package/dist/docs/phoenix/domain-model.mdx +4 -0
- package/dist/docs/phoenix/expression-context.mdx +11 -3
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
- package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
- package/dist/docs/phoenix/localization.mdx +3 -22
- package/dist/docs/phoenix/phoenix-cli.mdx +124 -49
- package/dist/docs/phoenix/project-structure.mdx +25 -11
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -11
- package/dist/docs/phoenix/testing.mdx +140 -0
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +2 -2
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
- package/dist/docs/relations/hierarchy.mdx +13 -2
- package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
- 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 +26 -14
- package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.d.ts +9 -5
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/admin-page-factories.d.ts +1 -2
- package/dist/domain/application/application-config.d.ts +28 -97
- package/dist/domain/application/assistant/assistant-fields.d.ts +12 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +71 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +131 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +14 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +5 -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/create-assistant-execution-schema.d.ts +32 -0
- package/dist/domain/application/assistant/create-assistant-execution-schema.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 +9 -0
- package/dist/domain/application/assistant/index.js +1 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/assistant-field-options.d.ts +2 -3
- package/dist/domain/application/assistant-mutations.d.ts +3 -5
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +3 -7
- package/dist/domain/application/configurator-builder.d.ts +33 -18
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +6 -7
- package/dist/domain/application/index.d.ts +3 -6
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/build-legend-data.d.ts +1 -1
- package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
- package/dist/domain/application/published-data/format-field-type.d.ts +1 -1
- package/dist/domain/application/published-data/map-data-to-sheet.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-chunked-data.d.ts +3 -3
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -4
- package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/core/action/action-factory.d.ts +11 -0
- package/dist/domain/core/{action.d.ts → action/action.d.ts} +22 -18
- 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/core/component/domain-component-optic.d.ts +65 -0
- 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 +4 -19
- 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 +38 -20
- 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/data-schema/data-cell-value.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-field-object.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.d.ts +4 -0
- package/dist/domain/core/data-schema/data-schema-localized-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-primitive-field.js +1 -0
- package/dist/domain/core/data-schema/data-schema.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema.js +1 -0
- package/dist/domain/core/data-schema/index.d.ts +7 -0
- package/dist/domain/core/data-schema/index.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/decoder.js +1 -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 +4 -5
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/emission/index.d.ts +8 -0
- package/dist/domain/core/emission/index.js +1 -0
- package/dist/domain/core/emission/reset-state-emission.d.ts +12 -0
- package/dist/domain/core/emission/reset-state-emission.js +1 -0
- package/dist/domain/core/emission/state-emission.d.ts +4 -0
- package/dist/domain/core/emission/state-emission.js +1 -0
- package/dist/domain/core/emission/state-update-emission.d.ts +14 -0
- package/dist/domain/core/emission/state-update-emission.js +1 -0
- package/dist/domain/core/emission/state-validation-result.d.ts +18 -0
- package/dist/domain/core/emission/state-validation-result.js +1 -0
- package/dist/domain/core/emission/transformation-log.d.ts +2 -0
- package/dist/domain/core/emission/transformation-log.js +1 -0
- package/dist/domain/core/emission/transformer-log-entry.d.ts +6 -0
- package/dist/domain/core/emission/transformer-log-entry.js +1 -0
- package/dist/domain/core/emission/transformer-log.d.ts +11 -0
- package/dist/domain/core/emission/transformer-log.js +1 -0
- package/dist/domain/core/emission/transformer-phase.d.ts +1 -0
- package/dist/domain/core/emission/transformer-phase.js +1 -0
- package/dist/domain/core/expression/aliased-expressions.d.ts +10 -0
- package/dist/domain/core/expression/aliased-expressions.js +1 -0
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -0
- package/dist/domain/core/expression/constant-expressions.js +1 -0
- package/dist/domain/core/expression/custom-expression.d.ts +25 -0
- package/dist/domain/core/expression/custom-expression.js +1 -0
- package/dist/domain/core/expression/expression.d.ts +46 -0
- package/dist/domain/core/expression/expression.js +1 -0
- 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 +13 -17
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -2
- package/dist/domain/core/invariant/custom-invariants.d.ts +13 -0
- 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/core/invariant/invariants.d.ts +10 -0
- 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/core/recipe/recipes.d.ts +23 -0
- package/dist/domain/core/recipe/recipes.js +1 -0
- package/dist/domain/core/relation/all-of-type-relation.d.ts +19 -0
- 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/core/relation/direct-relation.d.ts +17 -0
- package/dist/domain/core/relation/index.d.ts +8 -0
- package/dist/domain/core/relation/index.js +1 -0
- package/dist/domain/core/relation/indirect-relation.d.ts +25 -0
- 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/core/relation/relation-factory.d.ts +22 -0
- package/dist/domain/core/relation/relation-factory.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} +15 -47
- package/dist/domain/core/state/migrations.js +1 -0
- package/dist/domain/core/{state.d.ts → state/state.d.ts} +2 -3
- 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 +2 -4
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/action-system/index.d.ts +1 -0
- package/dist/domain/domain-context/action-system/index.js +1 -0
- package/dist/domain/domain-context/analytics-system/index.d.ts +2 -0
- package/dist/domain/domain-context/analytics-system/index.js +1 -0
- package/dist/domain/domain-context/create-transformer.d.ts +2 -2
- package/dist/domain/domain-context/dimension-system/dimension-state.js +1 -1
- package/dist/domain/domain-context/dimension-system/dimension-system.d.ts +3 -4
- package/dist/domain/domain-context/dimension-system/dimension-system.js +1 -1
- package/dist/domain/domain-context/dimension-system/index.d.ts +1 -0
- package/dist/domain/domain-context/dimension-system/index.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +8 -10
- package/dist/domain/domain-context/index.d.ts +8 -18
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/index.d.ts +3 -0
- package/dist/domain/domain-context/navigation-system/index.js +1 -0
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +5 -8
- 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 +2 -2
- package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
- package/dist/domain/domain-context/recipe-system/index.d.ts +1 -0
- package/dist/domain/domain-context/recipe-system/index.js +1 -0
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.d.ts +2 -4
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +3 -3
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +3 -3
- 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 +3 -3
- package/dist/domain/domain-context/relation-transformers/create-entity-refs.js +2 -2
- package/dist/domain/domain-context/relation-transformers/index.d.ts +4 -0
- package/dist/domain/domain-context/relation-transformers/index.js +1 -0
- package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +3 -3
- 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/index.d.ts +4 -0
- package/dist/domain/domain-context/store-system/index.js +1 -0
- 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 +2 -39
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +2 -4
- 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 +6 -10
- package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +3 -3
- package/dist/domain/domain-context/transformers/context.d.ts +2 -7
- package/dist/domain/domain-context/transformers/context.js +1 -1
- 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/index.d.ts +1 -1
- package/dist/domain/domain-context/transformers/index.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 +3 -9
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +2 -3
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +11 -0
- package/dist/domain/domain-runtime/domain-context/action-context.js +1 -0
- 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/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/expression-context.d.ts +8 -0
- package/dist/domain/domain-runtime/domain-context/expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/index.d.ts +3 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.d.ts +18 -0
- package/dist/domain/domain-runtime/domain-context/runtime-expression-context.js +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +19 -25
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +88 -72
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
- package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
- package/dist/domain/domain-runtime/errors/index.js +1 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/index.d.ts +1 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +5 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.d.ts +11 -0
- 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/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +6 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
- package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +5 -0
- package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +32 -0
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.d.ts +4 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +15 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
- 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 +7 -8
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +6 -6
- 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 +2 -32
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime-services.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +30 -21
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-mock-state.d.ts +2 -2
- package/dist/domain/mocks/create-test-application-config.d.ts +59 -0
- package/dist/domain/mocks/create-test-application-config.js +1 -0
- package/dist/domain/mocks/index.d.ts +1 -0
- package/dist/domain/mocks/index.js +1 -1
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +2 -3
- package/dist/domain/projections/blender-projections/blender-projections.js +1 -1
- package/dist/domain/projections/blender-projections/camera.d.ts +2 -2
- package/dist/domain/projections/collision-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.js +1 -1
- package/dist/domain/projections/constraint-projections.d.ts +1 -1
- package/dist/domain/projections/index.d.ts +1 -1
- package/dist/domain/projections/position-projections.d.ts +1 -1
- package/dist/domain/projections/projected-entities-projections.d.ts +2 -3
- package/dist/domain/projections/snap-matching.d.ts +1 -2
- package/dist/domain/projections/snap-utils.d.ts +1 -2
- package/dist/domain/projections/snapping-projections.d.ts +1 -1
- package/dist/domain/projections/validation-projections.d.ts +3 -20
- package/dist/domain/projections/validation-projections.js +1 -1
- package/dist/domain/sketching/sketching-projections.d.ts +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-entity-elements/admin-data-table-sidebar.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-actions.d.ts +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/admin-data-table-page.d.ts +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 +2 -3
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -4
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +8 -8
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/editor/mocks/EditorMockContext.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 +30 -16
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +7 -6
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +1 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- 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/init.d.ts +4 -4
- package/dist/phoenix/commands/init.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/prettier.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/phoenix/utils/git/index.d.ts +1 -0
- package/dist/phoenix/utils/git/index.js +1 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.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-access-service.d.ts +2 -0
- 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/routing/access-service.d.ts +1 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +57 -40
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +9 -9
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- 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/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
- package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/env-example.js +0 -90
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
- 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/action-factory.d.ts +0 -10
- package/dist/domain/actions/prepare-action-implementations.js +0 -5
- package/dist/domain/application/element-registration.js +0 -1
- package/dist/domain/application/handler-registration.js +0 -1
- package/dist/domain/application/resolve-imported-transformers.d.ts +0 -13
- package/dist/domain/application/resolve-imported-transformers.js +0 -1
- package/dist/domain/application/resource-builder.d.ts +0 -13
- package/dist/domain/application/resource-builder.js +0 -1
- package/dist/domain/components/debug-state-component.js +0 -1
- package/dist/domain/components/domain-component-optic.d.ts +0 -76
- 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/expression.d.ts +0 -50
- package/dist/domain/core/json-schema.js +0 -1
- package/dist/domain/core/migrations.js +0 -1
- package/dist/domain/core/reflection.js +0 -1
- package/dist/domain/domain-context/recipe-system/recipes.d.ts +0 -57
- package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
- package/dist/domain/expressions/constant-expressions.d.ts +0 -9
- package/dist/domain/expressions/constant-expressions.js +0 -1
- package/dist/domain/expressions/custom-expression.d.ts +0 -13
- 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.d.ts +0 -22
- package/dist/domain/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.d.ts +0 -68
- 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.d.ts +0 -33
- 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/direct-relation.d.ts +0 -29
- package/dist/domain/relations/indirect-relation.d.ts +0 -81
- package/dist/domain/relations/indirect-relation.js +0 -1
- package/dist/domain/relations/reference-component.js +0 -1
- package/dist/domain/relations/relation-factory.d.ts +0 -19
- package/dist/domain/relations/relation-factory.js +0 -1
- package/dist/domain/relations/relation-implementation.d.ts +0 -8
- 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/{actions → core/action}/action-factory.js +0 -0
- /package/dist/domain/core/{action.js → action/action.js} +0 -0
- /package/dist/domain/core/{enhanced-json-schema.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/{expression.js → data-schema/data-cell-value.js} +0 -0
- /package/dist/domain/core/{schema-validator.js → data-schema/data-schema-array-field.js} +0 -0
- /package/dist/domain/{relations/reference-field.js → core/data-schema/data-schema-field-object.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-field.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/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/{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
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
let
|
|
1
|
+
let t=t=>`webhookHandlers${t}`;export const generateApplicationSpecWebhookBuilders=(e,o)=>{let i=e.appMetadata.useClerk?` clerk: {
|
|
2
2
|
apiKey: phx.webhooksEnv.CLERK_API_KEY,
|
|
3
3
|
authorizedParties: [phx.webhooksEnv.FRONTEND_URL, phx.webhooksEnv.RESOURCES_URL],
|
|
4
4
|
jwtSecret: phx.webhooksEnv.JWT_SECRET_BASE64,
|
|
5
5
|
oauthClientId: phx.webhooksEnv.OAUTH_PROVIDER_CLIENT_ID,
|
|
6
6
|
oauthClientSecret: phx.webhooksEnv.OAUTH_PROVIDER_CLIENT_SECRET,
|
|
7
7
|
oauthProviderBaseUrl: phx.webhooksEnv.OAUTH_PROVIDER_BASE_URL,
|
|
8
|
-
},`:"",r=
|
|
9
|
-
.withHandlers(${
|
|
8
|
+
},`:"",r=o.map((e,o)=>{let i=t(o),r=e.replace(/\.tsx?$/,".js");return`import ${i} from '../${r}'`}).join("\n"),n=o.length>0,s=o.map((e,o)=>`{ origin: '${e}', exports: ${t(o)} }`),a=`[${s.join(", ")}]`,l=n?`
|
|
9
|
+
.withHandlers(${a})`:"";return`// Auto-generated by application-spec pipeline. Do not edit.
|
|
10
10
|
import { createDomainWebhook } from '@salsita-ai/sdk/webhook'
|
|
11
|
+
import type { DeploymentAssistant } from '@salsita-ai/sdk/contracts/assistant'
|
|
11
12
|
|
|
12
13
|
import { configuratorBuilder, createI18n } from './domain.js'
|
|
13
14
|
import { customComponentOptics } from './configurator-domain-code.js'
|
|
@@ -15,12 +16,14 @@ import { customAdminComponentOptics } from './admin-domain-code.js'
|
|
|
15
16
|
${r?`
|
|
16
17
|
${r}
|
|
17
18
|
`:""}
|
|
19
|
+
const $assistantServerSettings: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null = ${JSON.stringify(e.configurator.assistantServerSettings?{instructions:e.configurator.assistantServerSettings.instructions??void 0,ai:e.configurator.assistantServerSettings.ai}:null)}
|
|
20
|
+
|
|
18
21
|
const webhookConfiguratorBuilder = configuratorBuilder
|
|
19
22
|
.withComponentOptics(customComponentOptics)
|
|
20
23
|
.withAdminComponentOptics(customAdminComponentOptics)
|
|
21
24
|
.withDefaultEnvs({
|
|
22
25
|
isDev: phx.webhooksEnv.IS_DEV,
|
|
23
|
-
})${
|
|
26
|
+
})${l}
|
|
24
27
|
|
|
25
28
|
export const {
|
|
26
29
|
authHandlerBuilder,
|
|
@@ -33,6 +36,8 @@ export const {
|
|
|
33
36
|
} = createDomainWebhook({
|
|
34
37
|
configuratorBuilder: webhookConfiguratorBuilder,
|
|
35
38
|
createI18n,
|
|
39
|
+
assistantServerSettings: $assistantServerSettings,
|
|
40
|
+
assistantStrictThreads: phx.webhooksEnv.ASSISTANT_STRICT_THREADS,
|
|
36
41
|
${i}
|
|
37
42
|
})
|
|
38
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{generateEnvReader as e}from"../common/env-reader.js";import{autoHeader as r}from"../common/file-headers.js";let t={IS_DEV:{type:"bool",default:!1,devDefault:!0},AWS_S3_PUBLIC_RESOURCES_BUCKET:{type:"str",required:!0},AWS_S3_RESOURCES_REGION:{type:"str",required:!0},DEPLOYMENT_RESOURCES_PATH:{type:"str",default:"deployment-resources"}},o={CLERK_API_KEY:{type:"str",required:!0},FRONTEND_URL:{type:"str",required:!0},JWT_SECRET_BASE64:{type:"str",required:!0},OAUTH_PROVIDER_CLIENT_ID:{type:"str",required:!0},OAUTH_PROVIDER_CLIENT_SECRET:{type:"str",required:!0},OAUTH_PROVIDER_BASE_URL:{type:"str",required:!0},RESOURCES_URL:{type:"str",required:!0}};export const generateApplicationSpecWebhooksConfig=i=>{let n=i.infra.env?.webhook??{},R=i.appMetadata.useClerk?o:{},{imports:E,config:p}=e({...t,...R,...n}),
|
|
1
|
+
import{generateEnvReader as e}from"../common/env-reader.js";import{autoHeader as r}from"../common/file-headers.js";let t={IS_DEV:{type:"bool",default:!1,devDefault:!0},ASSISTANT_STRICT_THREADS:{type:"bool",default:!1},AWS_S3_PUBLIC_RESOURCES_BUCKET:{type:"str",required:!0},AWS_S3_RESOURCES_REGION:{type:"str",required:!0},DEPLOYMENT_RESOURCES_PATH:{type:"str",default:"deployment-resources"}},o={CLERK_API_KEY:{type:"str",required:!0},FRONTEND_URL:{type:"str",required:!0},JWT_SECRET_BASE64:{type:"str",required:!0},OAUTH_PROVIDER_CLIENT_ID:{type:"str",required:!0},OAUTH_PROVIDER_CLIENT_SECRET:{type:"str",required:!0},OAUTH_PROVIDER_BASE_URL:{type:"str",required:!0},RESOURCES_URL:{type:"str",required:!0}};export const generateApplicationSpecWebhooksConfig=i=>{let n=i.infra.env?.webhook??{},R=i.appMetadata.useClerk?o:{},{imports:E,config:p}=e({...t,...R,...n}),_=E.length>0?`import { ${E.join(", ")} } from 'envalid'
|
|
2
2
|
`:"";return`${r("webhooks.config.ts","Runtime environment config for the webhook server.")}
|
|
3
|
-
${
|
|
3
|
+
${_}import { createEnvReader } from '@salsita-ai/sdk/common/env'
|
|
4
4
|
|
|
5
5
|
const readRuntimeConfig = createEnvReader(${p})
|
|
6
6
|
|
|
@@ -6,7 +6,6 @@ import { AdminRuntime } from './admin-runtime/admin-runtime.js';
|
|
|
6
6
|
import { ConfiguratorRuntime } from './configurator-runtime/configurator-runtime.js';
|
|
7
7
|
import { DataRuntime } from './sections/data-runtime.js';
|
|
8
8
|
import type { ExpressionImplementations, InvariantImplementations, MissingExpression } from './sections/expression-runtime.js';
|
|
9
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
10
9
|
/**
|
|
11
10
|
* Runtime objects built from ApplicationSpec.
|
|
12
11
|
* Domain-specific fields mirror ApplicationSpec configurator/admin nesting.
|
|
@@ -31,5 +30,4 @@ export type ApplicationRuntimeResult = {
|
|
|
31
30
|
*
|
|
32
31
|
* Returns an error result when declared expressions are missing implementations.
|
|
33
32
|
*/
|
|
34
|
-
export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly
|
|
35
|
-
export {};
|
|
33
|
+
export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations?: InvariantImplementations, adminImplementations?: ExpressionImplementations) => ApplicationRuntimeResult;
|
|
@@ -11,7 +11,6 @@ import { ThemeRuntime } from '../sections/theme-runtime.js';
|
|
|
11
11
|
import { TransformersRuntime } from '../sections/transformers-runtime.js';
|
|
12
12
|
import { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
|
|
13
13
|
import { ConfiguratorStatesRuntime } from './states-runtime.js';
|
|
14
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
15
14
|
export type ConfiguratorRuntime = Branded<'ConfiguratorRuntime', {
|
|
16
15
|
readonly modelRuntime: ConfiguratorModelRuntime;
|
|
17
16
|
readonly componentOptics: ComponentOptics;
|
|
@@ -30,5 +29,4 @@ export type ConfiguratorRuntimeResult = {
|
|
|
30
29
|
readonly ok: false;
|
|
31
30
|
readonly missingExpressions: readonly MissingExpression[];
|
|
32
31
|
};
|
|
33
|
-
export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly
|
|
34
|
-
export {};
|
|
32
|
+
export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations?: InvariantImplementations) => ConfiguratorRuntimeResult;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { AssistantResolvedManifest } from '#package/domain';
|
|
2
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
3
|
-
import type { ApplicationSpec
|
|
4
|
-
/**
|
|
4
|
+
import type { ApplicationSpec } from '../../../parse-application-files/index.js';
|
|
5
|
+
/** Resolved assistant manifest with change tracking, carried to the runtime spec on hot reload. */
|
|
5
6
|
export type AssistantRuntime = Branded<'AssistantRuntime', {
|
|
6
|
-
readonly assistant:
|
|
7
|
+
readonly assistant: AssistantResolvedManifest | null;
|
|
7
8
|
readonly changed: boolean;
|
|
8
9
|
}>;
|
|
9
10
|
export declare const AssistantRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore) => AssistantRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";export const AssistantRuntime=(a,i)=>{let
|
|
1
|
+
import s from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";export const AssistantRuntime=(a,i)=>{let e=i.createBuilder("assistant",{build:s=>s,getKey:()=>"assistant",compare:(t,a)=>s(t,a)}).build({assistant:a.configurator.assistant?.resolved??null});return t({assistant:e.output.assistant,changed:e.changed})};
|
|
@@ -4,7 +4,8 @@ import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
|
4
4
|
import type { ComponentEntry } from '../../../parse-application-files/spec/index.js';
|
|
5
5
|
import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
|
|
6
6
|
import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
|
|
7
|
-
|
|
7
|
+
/** A component optic of any project, for any component type. */
|
|
8
|
+
export type AnyComponentOptic = DomainComponentOptic<any, any, any, any, any, any, SystemComponentTypeConstraint>;
|
|
8
9
|
/** A single built component optic with its identifying metadata. */
|
|
9
10
|
export type ComponentOptic = Branded<'ComponentOptic', {
|
|
10
11
|
readonly typeOrAlias: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as n}from"../../../core/index.js";import{isSdkExpressionImplementation as a}from"../../../parse-application-files/spec/index.js";import{generateMemoEvalPlanRuntime as r}from"./generate-memo-eval-plan-runtime.js";let l={},o=["0-1","1-1","0-N","1-N"],s={relation:(e,t)=>{let n=t[0];if(!("object"==typeof n&&null!==n&&"kind"in n&&"target"in n&&"string"==typeof n.target&&"cardinality"in n&&o.includes(n.cardinality)&&("allOfType"===n.kind||("direct"===n.kind||"indirect"===n.kind)&&"field"in n&&"string"==typeof n.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return i(e.aliasMap)(n)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},p=e=>{let t=r(e.plan);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},m=e=>({...(0,s[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(i,r,o,s,d=l)=>{let u={};for(let[e,t]of i.latestModel.aliases)u[String(e)]=t.map(String);let c=r.createBuilder(`${s}/sdk`,{build:m,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),f=r.createBuilder(`${s}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>e.impl===t.impl}),y=r.createBuilder(`${s}/value`,{build:p,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey}),g={},v=!1,S=new Set,k=new Set,b=new Set;for(let[e,t]of i.expressions.expressions)for(let[,i]of t){let t=u[String(e)]??[String(e)];if(a(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:u,invariantImplementations:d},a=c.build(n);for(let e of(a.changed&&(v=!0),S.add(c.getKey(n)),t))g[e]||(g[e]={}),g[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let a=i.implementation.value,r={entityOrAlias:String(e),name:String(i.name),valueKey:n(a),plan:i.implementation.plan},l=y.build(r);for(let e of(l.changed&&(v=!0),b.add(y.getKey(r)),t))g[e]||(g[e]={}),g[e][String(i.name)]=l.output;continue}}for(let[e,t]of Object.entries(o))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=f.build(t);a.changed&&(v=!0),k.add(f.getKey(t)),g[e]||(g[e]={}),g[e][i]=a.output}c.cleanup(S)&&(v=!0),f.cleanup(k)&&(v=!0),y.cleanup(b)&&(v=!0);let h=[];for(let[e,t]of i.expressions.entityExpressions)for(let n of t.shapeGroups){let t=i.expressions.expressions.get(n);if(t)for(let[i]of t)g[String(e)]?.[String(i)]||h.push({entityType:String(e),exprName:String(i)})}return h.length>0?{ok:!1,missing:h}:{ok:!0,runtime:t({merged:g,changed:v})}};
|
package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Branded } from '@salsita-ai/common/utils';
|
|
|
2
2
|
import type { ImportedTransformer } from '#package/domain';
|
|
3
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
4
|
import type { ApplicationSpec } from '../../../parse-application-files/index.js';
|
|
5
|
-
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
6
5
|
/**
|
|
7
6
|
* Runtime section for transformers. Combines two sources of truth:
|
|
8
7
|
* - `importedTransformers` — factory functions from src/transformers/*.ts
|
|
@@ -13,9 +12,8 @@ type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any,
|
|
|
13
12
|
* decide whether to push a fresh `createTransformers` factory into the registry.
|
|
14
13
|
*/
|
|
15
14
|
export type TransformersRuntime = Branded<'TransformersRuntime', {
|
|
16
|
-
readonly importedTransformers: readonly
|
|
15
|
+
readonly importedTransformers: readonly ImportedTransformer[];
|
|
17
16
|
readonly specTransformers: ApplicationSpec['configurator']['transformers'];
|
|
18
17
|
readonly changed: boolean;
|
|
19
18
|
}>;
|
|
20
|
-
export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly
|
|
21
|
-
export {};
|
|
19
|
+
export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly ImportedTransformer[]) => TransformersRuntime;
|
|
@@ -43,6 +43,6 @@ export declare const analyzeParsedModule: (module: Module) => ModuleAnalysis;
|
|
|
43
43
|
/** The explicit webhook classification of one authored file. */
|
|
44
44
|
export type WebhookMembership = 'pinned' | 'named-handler' | 'frontend';
|
|
45
45
|
/** Handler registrations that keep implicit webhook membership for legacy-CLI parity. */
|
|
46
|
-
export declare const WEBHOOK_HANDLER_REGISTRATIONS: readonly ['createMapPublishedRevisionDataHandler', 'createMapPublishedChunkedDataHandler', 'createDataRowValidatorHandler', 'createSheetValidatorHandler'];
|
|
46
|
+
export declare const WEBHOOK_HANDLER_REGISTRATIONS: readonly ['phx.domain.createAssistantSetupHandler', 'phx.domain.admin.createMapPublishedRevisionDataHandler', 'phx.domain.admin.createMapPublishedChunkedDataHandler', 'phx.domain.admin.createDataRowValidatorHandler', 'phx.domain.admin.createSheetValidatorHandler'];
|
|
47
47
|
/** Returns the named webhook handler registration a handler module calls, if any. */
|
|
48
48
|
export declare const findWebhookHandlerRegistration: (analysis: ModuleAnalysis) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Visitor as e}from"@swc/core/Visitor.js";export const getModuleParseOptions=()=>({syntax:"typescript",tsx:!0,target:"es2022"});let t=e=>{if("Identifier"===e.type)return e.value;if("ParenthesisExpression"===e.type)return t(e.expression);if("MemberExpression"!==e.type||"Identifier"!==e.property.type)return;let r=t(e.object);return void 0===r?void 0:`${r}.${e.property.value}`},r=e=>e.length>0&&e.every(e=>"isTypeOnly"in e&&!0===e.isTypeOnly),i=class ProjectSourceVisitor extends e{imports=[];calledMemberPaths=new Set;visitTsType(e){return e}visitImportDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),e}visitExportNamedDeclaration(e){return null!=e.source&&this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),super.visitExportNamedDeclaration(e)}visitExportAllDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:"typeOnly"in e&&!0===e.typeOnly}),e}visitCallExpression(e){var r;let i=(r=e.arguments[0]?.expression,r?.type==="StringLiteral"?r.value:r?.type==="TemplateLiteral"&&0===r.expressions.length?r.quasis[0]?.cooked??r.quasis[0]?.raw:void 0);if("Import"===e.callee.type&&void 0!==i)this.imports.push({specifier:i,typeOnly:!1});else if("Super"!==e.callee.type&&"Import"!==e.callee.type){let r=t(e.callee);void 0!==r&&this.calledMemberPaths.add(r),"require"===r&&void 0!==i&&this.imports.push({specifier:i,typeOnly:!1})}return super.visitCallExpression(e)}};export const analyzeParsedModule=e=>{let t=new i;t.visitModule(e);let r=e.body[0];return{imports:t.imports,calledMemberPaths:[...t.calledMemberPaths].sort(),hasUseWebhookDirective:r?.type==="ExpressionStatement"&&"StringLiteral"===r.expression.type&&"use webhook"===r.expression.value}};export const WEBHOOK_HANDLER_REGISTRATIONS=["createMapPublishedRevisionDataHandler","createMapPublishedChunkedDataHandler","createDataRowValidatorHandler","createSheetValidatorHandler"];export const findWebhookHandlerRegistration=e=>WEBHOOK_HANDLER_REGISTRATIONS.find(t=>e.calledMemberPaths.includes(
|
|
1
|
+
import{Visitor as e}from"@swc/core/Visitor.js";export const getModuleParseOptions=()=>({syntax:"typescript",tsx:!0,target:"es2022"});let t=e=>{if("Identifier"===e.type)return e.value;if("ParenthesisExpression"===e.type)return t(e.expression);if("MemberExpression"!==e.type||"Identifier"!==e.property.type)return;let r=t(e.object);return void 0===r?void 0:`${r}.${e.property.value}`},r=e=>e.length>0&&e.every(e=>"isTypeOnly"in e&&!0===e.isTypeOnly),i=class ProjectSourceVisitor extends e{imports=[];calledMemberPaths=new Set;visitTsType(e){return e}visitImportDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),e}visitExportNamedDeclaration(e){return null!=e.source&&this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),super.visitExportNamedDeclaration(e)}visitExportAllDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:"typeOnly"in e&&!0===e.typeOnly}),e}visitCallExpression(e){var r;let i=(r=e.arguments[0]?.expression,r?.type==="StringLiteral"?r.value:r?.type==="TemplateLiteral"&&0===r.expressions.length?r.quasis[0]?.cooked??r.quasis[0]?.raw:void 0);if("Import"===e.callee.type&&void 0!==i)this.imports.push({specifier:i,typeOnly:!1});else if("Super"!==e.callee.type&&"Import"!==e.callee.type){let r=t(e.callee);void 0!==r&&this.calledMemberPaths.add(r),"require"===r&&void 0!==i&&this.imports.push({specifier:i,typeOnly:!1})}return super.visitCallExpression(e)}};export const analyzeParsedModule=e=>{let t=new i;t.visitModule(e);let r=e.body[0];return{imports:t.imports,calledMemberPaths:[...t.calledMemberPaths].sort(),hasUseWebhookDirective:r?.type==="ExpressionStatement"&&"StringLiteral"===r.expression.type&&"use webhook"===r.expression.value}};export const WEBHOOK_HANDLER_REGISTRATIONS=["phx.domain.createAssistantSetupHandler","phx.domain.admin.createMapPublishedRevisionDataHandler","phx.domain.admin.createMapPublishedChunkedDataHandler","phx.domain.admin.createDataRowValidatorHandler","phx.domain.admin.createSheetValidatorHandler"];export const findWebhookHandlerRegistration=e=>WEBHOOK_HANDLER_REGISTRATIONS.find(t=>e.calledMemberPaths.includes(t));
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type AssistantAiSettings } from '@salsita-ai/contracts/assistant';
|
|
3
|
+
import { ASSISTANT_HINTS } from '#package/domain';
|
|
3
4
|
/**
|
|
4
5
|
* One whitelisted field in the assistant manifest. `description` overrides the JSON Schema
|
|
5
|
-
* description of the shape property; `as` exposes the field under a different GraphQL name
|
|
6
|
+
* description of the shape property; `as` exposes the field under a different GraphQL name; `lenses`
|
|
7
|
+
* names the lenses declared under `assistant.lenses` whose selection includes the field. An empty
|
|
6
8
|
* entry (`length:` in YAML) whitelists the field with its defaults.
|
|
7
9
|
*/
|
|
8
10
|
export interface RawAssistantField {
|
|
9
11
|
readonly description?: string;
|
|
10
12
|
readonly as?: string;
|
|
13
|
+
readonly lenses?: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One lens of the assistant `lenses` map, keyed by the name the agent spreads it by: a named
|
|
17
|
+
* selection made of the `entities` entries tagged with that name. `description` tells the agent when
|
|
18
|
+
* to use the lens; `maxDepth` is how many levels of tagged relations carry the same selection before
|
|
19
|
+
* they reduce to `id`, 1 by default.
|
|
20
|
+
*/
|
|
21
|
+
export interface RawAssistantLens {
|
|
22
|
+
readonly description: string;
|
|
23
|
+
readonly maxDepth?: number;
|
|
11
24
|
}
|
|
12
25
|
/**
|
|
13
26
|
* One entry of the assistant `deletable` map. It takes no options yet; an empty entry (`Cabinet:` in
|
|
@@ -23,7 +36,6 @@ export type AssistantOptionComponentType = (typeof ASSISTANT_OPTION_COMPONENT_TY
|
|
|
23
36
|
* does not change during a session. A hint only adds a sentence to a generated description; nothing
|
|
24
37
|
* verifies it.
|
|
25
38
|
*/
|
|
26
|
-
export declare const ASSISTANT_HINTS: readonly ['sameForAllInstances', 'constantDuringSession'];
|
|
27
39
|
export type AssistantHint = (typeof ASSISTANT_HINTS)[number];
|
|
28
40
|
/**
|
|
29
41
|
* The component that holds the choices of a writable field: the instance `instanceName` of the
|
|
@@ -89,7 +101,7 @@ export interface RawAssistantAction {
|
|
|
89
101
|
* with `addChild`. `replaceRecipes` names, per entity type or alias, the `replaceEntityRecipes`
|
|
90
102
|
* groups whose recipes the agent may list and replace the entity by with `replaceEntity`. `actions`
|
|
91
103
|
* names the declared actions the agent may run as custom mutations. Nothing is exposed without an
|
|
92
|
-
* entry.
|
|
104
|
+
* entry. `lenses` declares the named selections that `entities` entries are tagged with.
|
|
93
105
|
*
|
|
94
106
|
* `ai` and `instructions` are for the server only: the provider, model tier and reasoning level the
|
|
95
107
|
* deployment's assistant runs with, and the integrator's own guidance for it, appended to the system
|
|
@@ -102,6 +114,7 @@ export interface RawAssistant {
|
|
|
102
114
|
readonly childRecipes?: Readonly<Record<string, RawAssistantRecipes>>;
|
|
103
115
|
readonly replaceRecipes?: Readonly<Record<string, RawAssistantRecipes>>;
|
|
104
116
|
readonly actions?: Readonly<Record<string, RawAssistantAction | null>>;
|
|
117
|
+
readonly lenses?: Readonly<Record<string, RawAssistantLens>>;
|
|
105
118
|
readonly instructions?: string;
|
|
106
119
|
readonly ai: AssistantAiSettings;
|
|
107
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as
|
|
1
|
+
import{z as e}from"zod";import{ASSISTANT_AI_PROVIDERS as t,ASSISTANT_MODEL_TIERS as o,ASSISTANT_REASONING_LEVELS as i}from"@salsita-ai/contracts/assistant";import{ASSISTANT_HINTS as n}from"#package/domain";export const ASSISTANT_OPTION_COMPONENT_TYPES=["materialSwatch","attributeSelection","distanceDimensionSelect"];let r=e.string().regex(/^(?!__)[_A-Za-z][_0-9A-Za-z]*$/,'must be a GraphQL name: letters, digits and "_", not starting with a digit or "__"'),s=t=>e.enum(t,{errorMap:()=>({message:`must be one of: ${t.join(", ")}`})}),a=e.object({description:e.string().optional(),as:r.optional(),lenses:e.array(e.string()).optional()}).strict(),l="must be a whole number of at least 1; remove the key to nest tagged relations one level",c=e.object({description:e.string().trim().min(1,"must not be empty; say when the agent should use the lens"),maxDepth:e.number({invalid_type_error:l}).int(l).min(1,l).optional()}).strict(),p=r.refine(e=>!e.includes("__"),'must not contain "__", which names the generated copies of a lens'),m=e.array(s(n)),d=e.object({options:e.object({componentType:s(ASSISTANT_OPTION_COMPONENT_TYPES),instanceName:e.string().min(1,"must not be empty; name the component instance that holds the choices"),as:r.optional(),validate:e.boolean().optional(),allowDryRuns:e.boolean().optional(),hints:m.optional()}).strict().optional()}).strict(),u=e.object({as:e.string().trim().min(1,"must not be empty; remove the key to use the instance name").optional(),description:e.string().optional(),allowDryRuns:e.boolean().optional()}).strict(),h=t=>e.object({hints:m.optional(),groups:e.record(e.string(),u.nullable(),{required_error:`is required: the recipe groups of the type go under "groups", keyed by the instance name of a "${t}" component`})}).strict(),b=e.object({description:e.string().optional(),as:r.optional()}).strict(),g=`is required: declare provider (${t.join(", ")}), model (${o.join(", ")}) and reasoning (${i.join(", ")})`,_="must be a positive whole number of input tokens; remove the key to use the default of the server",y=e.object({provider:s(t),model:s(o),reasoning:s(i),maxThreadSize:e.number({invalid_type_error:_}).int(_).positive(_).optional()},{required_error:g,invalid_type_error:g}).strict();export const rawAssistantSchema=e.object({entities:e.record(e.string(),e.record(e.string(),a.nullable())).optional(),deletable:e.record(e.string(),e.object({}).strict().nullable()).optional(),writable:e.record(e.string(),e.record(e.string(),d.nullable())).optional(),childRecipes:e.record(e.string(),h("childEntityRecipes")).optional(),replaceRecipes:e.record(e.string(),h("replaceEntityRecipes")).optional(),actions:e.record(e.string(),b.nullable()).optional(),lenses:e.record(p,c).optional(),instructions:e.string().trim().min(1,"must not be empty; remove the key when there are no instructions").optional(),ai:y}).strict();
|
package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as s}from"../../../../errors/index.js";import{Components as n,UserComponents as r}from"../../components/index.js";import{Expressions as o}from"../../expressions/index.js";import{Invariants as i}from"../../invariants/index.js";import{ConfigurationSchema as a,Defaults as m,ModelVersion as l,Presets as p}from"../../model/index.js";import{Relations as d}from"../../relations/index.js";import{ResolvedVersions as f}from"../resolved-versions.js";import{AdminPages as S}from"./admin-pages.js";import{AdminStates as v}from"./states.js";export const AdminSpec=(g,x)=>{let{rawModel:u,rawPresets:I,rawExpressions:N,rawInvariants:T,rawRelations:_,rawDefaults:c,migrationFiles:j,rawComponents:A,rawAdminPages:C,dataSpec:E,phxDefinitions:M,evalExpressionParser:h,label:L,requireMigrationFiles:y}=g;if(0===Object.keys(u).length)return void x.at(L).error(t.MISSING_MODEL,s.MISSING_MODEL(L));u.latest||x.at(L).error(t.MISSING_LATEST,s.MISSING_LATEST(L));let G=new Map;for(let[e,t]of Object.entries(u)){let s=l(e,t,M,x.at(L,e));s&&G.set(s.versionKey,s)}if(x.hasErrors)return;let O=f(G,j,x,{requireMigrationFiles:y});if(!O)return;let D=O.versionedModels.find(e=>e.isLatest)?.modelVersion;if(!D)return;let V=O.latestVersion,P=a(D,V),b=d(_,D,x),w=i({rawInvariants:T,rawExpressions:N,rawRelations:_,rawComponents:A},D,x),F=p(I,D,b,x),k=S(C,{latestModel:D,parsingContext:x.at(L,"$adminPages")},E);if(!k)return;let K=r(A,{allNames:D.allNames,resolvedShapes:D.resolvedShapes,parsingContext:x}),$=m(c,D,x.at(L,"defaults")),q=o({rawExpressions:N,inferredExpressions:[...b.expressions,...w.expressions,...K.expressions]},{latestModel:D,aliases:D.aliases,entityTypes:D.entityTypes,evalExpressionParser:h,parsingContext:x}),z=n({userComponents:K.components,generatedComponents:[...b.components,...k.components],invariantComponents:w.components},{aliases:D.aliases,parsingContext:x});if(void 0!==$&&void 0!==q&&void 0!==z)return e({latestModel:D,schemaVersion:V,resolvedVersions:O,components:z,configurationSchema:P,presets:F,expressions:q,invariants:w,defaults:$,states:v(((n,r,o)=>{if(0===r.length)return n;let i=1===n.navigationStates.length&&"Default"===n.navigationStates[0]?[]:n.navigationStates,a=i.filter(e=>r.includes(e));return a.length>0&&o.error(t.ADMIN_PAGES_NAV_STATE_CONFLICT,s.ADMIN_PAGES_NAV_STATE_CONFLICT(a)),e({...n,navigationStates:[...i,...r]})})(g.rawStates,k.navigationStates,x),x),adminPages:k})};
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as s}from"../../../../errors/index.js";import{Components as n,UserComponents as r}from"../../components/index.js";import{Expressions as o}from"../../expressions/index.js";import{Invariants as i}from"../../invariants/index.js";import{ConfigurationSchema as a,Defaults as m,ModelVersion as l,Presets as p}from"../../model/index.js";import{Relations as d}from"../../relations/index.js";import{ResolvedVersions as f}from"../resolved-versions.js";import{AdminPages as S}from"./admin-pages.js";import{AdminStates as v}from"./states.js";export const AdminSpec=(g,x)=>{let{rawModel:u,rawPresets:I,rawExpressions:N,rawInvariants:T,rawRelations:_,rawDefaults:c,migrationFiles:j,rawComponents:A,rawAdminPages:C,dataSpec:E,phxDefinitions:M,evalExpressionParser:h,label:L,requireMigrationFiles:y}=g;if(0===Object.keys(u).length)return void x.at(L).error(t.MISSING_MODEL,s.MISSING_MODEL(L));u.latest||x.at(L).error(t.MISSING_LATEST,s.MISSING_LATEST(L));let G=new Map;for(let[e,t]of Object.entries(u)){let s=l(e,t,M,x.at(L,e));s&&G.set(s.versionKey,s)}if(x.hasErrors)return;let O=f(G,j,x,{requireMigrationFiles:y});if(!O)return;let D=O.versionedModels.find(e=>e.isLatest)?.modelVersion;if(!D)return;let V=O.latestVersion,P=a(D,V),b=d(_,D,M,x),w=i({rawInvariants:T,rawExpressions:N,rawRelations:_,rawComponents:A},D,x),F=p(I,D,b,x),k=S(C,{latestModel:D,parsingContext:x.at(L,"$adminPages")},E);if(!k)return;let K=r(A,{allNames:D.allNames,resolvedShapes:D.resolvedShapes,parsingContext:x}),$=m(c,D,x.at(L,"defaults")),q=o({rawExpressions:N,inferredExpressions:[...b.expressions,...w.expressions,...K.expressions]},{latestModel:D,aliases:D.aliases,entityTypes:D.entityTypes,evalExpressionParser:h,parsingContext:x}),z=n({userComponents:K.components,generatedComponents:[...b.components,...k.components],invariantComponents:w.components},{aliases:D.aliases,parsingContext:x});if(void 0!==$&&void 0!==q&&void 0!==z)return e({latestModel:D,schemaVersion:V,resolvedVersions:O,components:z,configurationSchema:P,presets:F,expressions:q,invariants:w,defaults:$,states:v(((n,r,o)=>{if(0===r.length)return n;let i=1===n.navigationStates.length&&"Default"===n.navigationStates[0]?[]:n.navigationStates,a=i.filter(e=>r.includes(e));return a.length>0&&o.error(t.ADMIN_PAGES_NAV_STATE_CONFLICT,s.ADMIN_PAGES_NAV_STATE_CONFLICT(a)),e({...n,navigationStates:[...i,...r]})})(g.rawStates,k.navigationStates,x),x),adminPages:k})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as s,diagnosticMessages as t}from"../../../../errors/index.js";import{Components as o,UserComponents as r}from"../../components/index.js";import{Expressions as i}from"../../expressions/index.js";import{Invariants as n}from"../../invariants/index.js";import{ConfigurationSchema as a,DataSchemas as m,Defaults as p,ModelVersion as l,Presets as d}from"../../model/index.js";import{Relations as f}from"../../relations/index.js";import{Actions as x,AssistantServerSettings as S,AssistantSpec as v,Theme as c,Transformers as j,Ui as u}from"../../sections/index.js";import{ResolvedVersions as g}from"../resolved-versions.js";import{ConfiguratorStates as C}from"./states.js";export const ConfiguratorSpec=(I,M)=>{let{rawModel:h,rawPresets:y,rawExpressions:E,rawActions:N,rawInvariants:T,rawRelations:L,rawDefaults:G,dataSchemas:O,dataSpec:_,appMetadata:b,rawTheme:w,rawUi:A,rawTransformers:D,rawAssistant:V,migrationFiles:k,transformerFiles:K,rawComponents:q,phxDefinitions:z,evalExpressionParser:B,label:F}=I;if(0===Object.keys(h).length)return void M.at(F).error(s.MISSING_MODEL,t.MISSING_MODEL(F));h.latest||M.at(F).error(s.MISSING_LATEST,t.MISSING_LATEST(F));let H=new Map;for(let[e,s]of Object.entries(h)){let t=l(e,s,z,M.at(F,e));t&&H.set(t.versionKey,t)}if(M.hasErrors)return;let J=g(H,k,M);if(!J)return;let P=J.versionedModels.find(e=>e.isLatest)?.modelVersion;if(!P)return;let Q=J.latestVersion,R=a(P,Q),U=f(L,P,M),W=n({rawInvariants:T,rawExpressions:E,rawRelations:L,rawComponents:q},P,M),X=d(y,P,U,M),Y=r(q,{allNames:P.allNames,resolvedShapes:P.resolvedShapes,parsingContext:M}),Z=p(G,P,M.at(F,"defaults")),$=j(D,K,M),ee=i({rawExpressions:E,inferredExpressions:[...U.expressions,...W.expressions,...Y.expressions]},{latestModel:P,aliases:P.aliases,entityTypes:P.entityTypes,evalExpressionParser:B,parsingContext:M}),es=o({userComponents:Y.components,generatedComponents:U.components,invariantComponents:W.components},{aliases:P.aliases,parsingContext:M}),et=m({merged:O,dataSpec:_,appMetadata:b,phxDefinitions:z,parsingContext:M}),eo=C(I.rawStates,M.at("states")),er=x(N,{latestModel:P,phxDefinitions:z},M.at("actions"));if(void 0!==Z&&void 0!==ee&&void 0!==er&&void 0!==es&&void 0!==et)return e({latestModel:P,schemaVersion:Q,dataSchemas:et,resolvedVersions:J,components:es,configurationSchema:R,presets:X,expressions:ee,actions:er,invariants:W,defaults:Z,states:eo,theme:c(w),ui:u(A),transformers:$,assistant:v(V,{model:P,states:eo,phxDefinitions:z,expressions:ee,components:es,actions:er},M),assistantServerSettings:S(V)})};
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as s,diagnosticMessages as t}from"../../../../errors/index.js";import{Components as o,UserComponents as r}from"../../components/index.js";import{Expressions as i}from"../../expressions/index.js";import{Invariants as n}from"../../invariants/index.js";import{ConfigurationSchema as a,DataSchemas as m,Defaults as p,ModelVersion as l,Presets as d}from"../../model/index.js";import{Relations as f}from"../../relations/index.js";import{Actions as x,AssistantServerSettings as S,AssistantSpec as v,Theme as c,Transformers as j,Ui as u}from"../../sections/index.js";import{ResolvedVersions as g}from"../resolved-versions.js";import{ConfiguratorStates as C}from"./states.js";export const ConfiguratorSpec=(I,M)=>{let{rawModel:h,rawPresets:y,rawExpressions:E,rawActions:N,rawInvariants:T,rawRelations:L,rawDefaults:G,dataSchemas:O,dataSpec:_,appMetadata:b,rawTheme:w,rawUi:A,rawTransformers:D,rawAssistant:V,migrationFiles:k,transformerFiles:K,rawComponents:q,phxDefinitions:z,evalExpressionParser:B,label:F}=I;if(0===Object.keys(h).length)return void M.at(F).error(s.MISSING_MODEL,t.MISSING_MODEL(F));h.latest||M.at(F).error(s.MISSING_LATEST,t.MISSING_LATEST(F));let H=new Map;for(let[e,s]of Object.entries(h)){let t=l(e,s,z,M.at(F,e));t&&H.set(t.versionKey,t)}if(M.hasErrors)return;let J=g(H,k,M);if(!J)return;let P=J.versionedModels.find(e=>e.isLatest)?.modelVersion;if(!P)return;let Q=J.latestVersion,R=a(P,Q),U=f(L,P,z,M),W=n({rawInvariants:T,rawExpressions:E,rawRelations:L,rawComponents:q},P,M),X=d(y,P,U,M),Y=r(q,{allNames:P.allNames,resolvedShapes:P.resolvedShapes,parsingContext:M}),Z=p(G,P,M.at(F,"defaults")),$=j(D,K,M),ee=i({rawExpressions:E,inferredExpressions:[...U.expressions,...W.expressions,...Y.expressions]},{latestModel:P,aliases:P.aliases,entityTypes:P.entityTypes,evalExpressionParser:B,parsingContext:M}),es=o({userComponents:Y.components,generatedComponents:U.components,invariantComponents:W.components},{aliases:P.aliases,parsingContext:M}),et=m({merged:O,dataSpec:_,appMetadata:b,phxDefinitions:z,parsingContext:M}),eo=C(I.rawStates,M.at("states")),er=x(N,{latestModel:P,phxDefinitions:z},M.at("actions"));if(void 0!==Z&&void 0!==ee&&void 0!==er&&void 0!==es&&void 0!==et)return e({latestModel:P,schemaVersion:Q,dataSchemas:et,resolvedVersions:J,components:es,configurationSchema:R,presets:X,expressions:ee,actions:er,invariants:W,defaults:Z,states:eo,theme:c(w),ui:u(A),transformers:$,assistant:v(V,{model:P,states:eo,phxDefinitions:z,expressions:ee,components:es,actions:er},M),assistantServerSettings:S(V)})};
|
|
@@ -7,8 +7,8 @@ import { ShapePropertyName } from './names/shape-property-name.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* A map of shape property names to their default values inside a single entity block.
|
|
9
9
|
* Raw YAML values — markers intact — keyed by a validated {@link ShapePropertyName}.
|
|
10
|
-
* Codegen emits these as-is via `stringifyEnhancedJsonValue`;
|
|
11
|
-
*
|
|
10
|
+
* Codegen emits these as-is via `stringifyEnhancedJsonValue`; at run time
|
|
11
|
+
* `createRecipeFactory` makes the generated `createRecipe` factory from them.
|
|
12
12
|
*/
|
|
13
13
|
export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValue>>;
|
|
14
14
|
/**
|
|
@@ -19,6 +19,11 @@ export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValu
|
|
|
19
19
|
* flattened here to concrete entity entries so downstream codegen only serialises
|
|
20
20
|
* a runtime-ready per-entity map.
|
|
21
21
|
*
|
|
22
|
+
* A source key may state part of a shape, but the flattened entry of a concrete
|
|
23
|
+
* entity type states every property of its shape: `createRecipeFactory` validates
|
|
24
|
+
* each entry as a whole entity when the generated module loads. An entity type
|
|
25
|
+
* with no entry has no defaults and is not checked.
|
|
26
|
+
*
|
|
22
27
|
* Values are raw `EnhancedJsonValue` so codegen can emit them via
|
|
23
28
|
* `stringifyEnhancedJsonValue` with `$msg` markers preserved.
|
|
24
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{CONSTANT_CAPS as t,resolveEnhancedJsonValue as r}from"../../../core/index.js";import{DiagnosticCode as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{CONSTANT_CAPS as t,resolveEnhancedJsonValue as r}from"../../../core/index.js";import{DiagnosticCode as i,diagnosticMessages as o}from"../../../errors/index.js";import{ShapePropertyName as n}from"./names/shape-property-name.js";let l=(e,t,r,n,l)=>{for(let s of r.validatePartialShape(t).errors){let t=s.instancePath?s.instancePath:"(root)",r=s.instancePath.split("/").filter(Boolean)[0]??"";n.error(i.DEFAULTS_SCHEMA_VIOLATION,o[i.DEFAULTS_SCHEMA_VIOLATION](e,r,t,s.message,l))}};export const Defaults=(s,a,f)=>{let E=a.allNames,T=[...E].map(String),S=new Map,N=new Map;for(let e of a.entitySchemas)S.set(e.entityType,new Set(Object.keys(e.shapeProperties))),N.set(e.entityType,e);let g={},O=new Map;for(let[e,_]of Object.entries(s)){let s=f.at(e);if(!E.has(e)){f.error(i.DEFAULTS_UNKNOWN_ENTITY_KEY,o[i.DEFAULTS_UNKNOWN_ENTITY_KEY](e,T));continue}let c=a.aliases.get(e),p=void 0!==c,h={};for(let[t,r]of Object.entries(_)){let l=n(t,s);if(l){if(p){let t=[];for(let e of c){let r=S.get(e);r&&r.has(l)||t.push(String(e))}if(t.length>0){let r=c[0],n=r?[...S.get(r)??[]]:[];f.error(i.DEFAULTS_UNKNOWN_PROPERTY,o[i.DEFAULTS_UNKNOWN_PROPERTY](e,l,n,t));continue}}else{let t=S.get(e);if(!t||!t.has(l)){let r=t?[...t]:[];f.error(i.DEFAULTS_UNKNOWN_PROPERTY,o[i.DEFAULTS_UNKNOWN_PROPERTY](e,l,r));continue}}h[l]=r}}if(0===Object.keys(h).length)continue;let A=r(h,void 0,t,s);if(void 0!==A){if(p)for(let t of c){let r=N.get(t);r&&l(e,A,r,s,String(t))}else{let t=N.get(e);t&&l(e,A,t,s)}for(let t of c??[e])g[String(t)]={...g[String(t)],...h},O.set(t,[...O.get(t)??[],e])}}for(let[e,t]of O){let r=g[String(e)]??{},n=(N.get(e)?.shapeSchema.required??[]).filter(e=>!Object.hasOwn(r,e));if(0===n.length)continue;let l=t.includes(String(e))?String(e):t.at(-1);f.at(l).error(i.DEFAULTS_INCOMPLETE,o[i.DEFAULTS_INCOMPLETE](String(e),n,t))}if(Object.keys(s).length>0&&f.warning(i.DEFAULTS_DEPRECATED,o[i.DEFAULTS_DEPRECATED]()),!f.hasErrors)return e({entries:g})};
|
package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type EnhancedJsonSchemaType, type PhoenixDefinitions } from '../../../core/index.js';
|
|
2
|
+
import type { ModelVersion } from '../model/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the type of a shape field means to a relation that reads its related entities from it.
|
|
5
|
+
*
|
|
6
|
+
* - `single`: the id of one entity of `entityTypes`, or `null` when `nullable`.
|
|
7
|
+
* - `array`: an array of ids of entities of `entityTypes`.
|
|
8
|
+
* - `other`: anything else, such as a string, an id without `references`, or a mix of the above.
|
|
9
|
+
* - `unknown`: the schema does not say, because it states its type as TypeScript text (`tsType`)
|
|
10
|
+
* or combines schemas with `allOf`.
|
|
11
|
+
*/
|
|
12
|
+
export type ReferenceFieldType = {
|
|
13
|
+
readonly kind: 'single';
|
|
14
|
+
readonly entityTypes: ReadonlySet<string>;
|
|
15
|
+
readonly nullable: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: 'array';
|
|
18
|
+
readonly entityTypes: ReadonlySet<string>;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'other';
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'unknown';
|
|
23
|
+
};
|
|
24
|
+
/** Classifies the schema of a shape field of the latest model by the reference it holds. */
|
|
25
|
+
export declare const referenceFieldType: (schema: EnhancedJsonSchemaType, latestModel: ModelVersion, phxDefinitions: PhoenixDefinitions) => ReferenceFieldType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{COMMON_SHORT_PREFIX as e,INTERNAL_REF_PATTERN as t,extractPhxDefName as n}from"../../../core/index.js";let r={entityTypes:new Set,hasNull:!1,arrays:[],hasOther:!1,hasUnknown:!1},s={...r,hasNull:!0},a={...r,hasOther:!0},y={...r,hasUnknown:!0},i=e=>({entityTypes:new Set(e.flatMap(e=>[...e.entityTypes])),hasNull:e.some(e=>e.hasNull),arrays:e.flatMap(e=>e.arrays),hasOther:e.some(e=>e.hasOther),hasUnknown:e.some(e=>e.hasUnknown)}),l=(o,p)=>{if(o.tsType)return y;if(o.$ref){let s,i=n(o.$ref);if(void 0!==i)return p.phxDefinitions[i]?.tsType==="DomainEntityId"&&o.references?{...r,entityTypes:new Set(((e,t)=>{for(let[n,r]of t.aliases)if(String(n)===e)return r.map(String);return[e]})(o.references,p.latestModel))}:a;let h=(s=o.$ref).startsWith(e)?s.slice(e.length):t.exec(s)?.[2];if(void 0===h)return a;let u=p.latestModel.commonTypes.get(h);return!u||p.openCommonTypes.has(h)?y:l(u.schema,{...p,openCommonTypes:new Set([...p.openCommonTypes,h])})}if(o.enum)return i(o.enum.map(e=>null===e?s:a));let h=o.anyOf??o.oneOf;if(h)return i(h.map(e=>l(e,p)));if(o.allOf)return y;let u=e=>"array"===e?(()=>{let{items:e}=o;return!e||Array.isArray(e)?a:{...r,arrays:[l(e,p)]}})():"null"===e?s:a;return"string"==typeof o.type?u(o.type):Array.isArray(o.type)?i(o.type.map(u)):a};export const referenceFieldType=(e,t,n)=>(e=>{if(e.hasUnknown||e.arrays.some(e=>e.hasUnknown))return{kind:"unknown"};if(e.hasOther)return{kind:"other"};let[t,...n]=e.arrays;if(!t)return e.entityTypes.size>0?{kind:"single",entityTypes:e.entityTypes,nullable:e.hasNull}:{kind:"other"};let r=e=>e.entityTypes.size>0&&!e.hasNull&&!e.hasOther&&0===e.arrays.length;return 0===e.entityTypes.size&&!e.hasNull&&r(t)&&n.every(e=>{let n,s;return r(e)&&(n=e.entityTypes,s=t.entityTypes,n.size===s.size&&[...n].every(e=>s.has(e)))})?{kind:"array",entityTypes:t.entityTypes}:{kind:"other"}})(l(e,{latestModel:t,phxDefinitions:n,openCommonTypes:new Set}));
|
package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReferenceFieldType } from './reference-field-type.js';
|
|
2
|
+
type Cardinality = '0-1' | '1-1' | '0-N' | '1-N';
|
|
3
|
+
/** How a field holds its reference: one id, one id or `null`, or an array of ids. */
|
|
4
|
+
export type ReferenceFieldShape = 'single' | 'nullableSingle' | 'array';
|
|
5
|
+
/**
|
|
6
|
+
* Why a relation cannot read its related entities from its field.
|
|
7
|
+
*
|
|
8
|
+
* - `notReference`: the field does not hold entity ids.
|
|
9
|
+
* - `otherEntityTypes`: the field holds ids of other entity types than the relation relates to.
|
|
10
|
+
* - `cardinality`: the field of a direct relation holds its ids in another shape than the
|
|
11
|
+
* cardinality of the relation needs.
|
|
12
|
+
*/
|
|
13
|
+
export type RelationFieldMismatch = {
|
|
14
|
+
readonly kind: 'notReference';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'otherEntityTypes';
|
|
17
|
+
readonly referenced: readonly string[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'cardinality';
|
|
20
|
+
readonly shape: ReferenceFieldShape;
|
|
21
|
+
readonly required: ReferenceFieldShape;
|
|
22
|
+
};
|
|
23
|
+
interface RelationReadingField {
|
|
24
|
+
readonly kind: 'direct' | 'indirect';
|
|
25
|
+
readonly cardinality: Cardinality;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Checks the field of a direct or indirect relation against what the relation reads from it.
|
|
29
|
+
*
|
|
30
|
+
* The field must reference exactly `relatedEntityTypes`: for a direct relation the entity types of
|
|
31
|
+
* its target, for an indirect relation the entity types it is declared on, because there the field
|
|
32
|
+
* belongs to the target and points back. A direct relation also fixes the shape of the field by
|
|
33
|
+
* its cardinality. An indirect relation reads every shape, since its cardinality counts the
|
|
34
|
+
* entities that point back and not the ids in the field.
|
|
35
|
+
*
|
|
36
|
+
* When an alias holds the field, the field can have another type in each entity type of the alias.
|
|
37
|
+
* The relation is accepted when the field fits in at least one of them. Requiring all of them
|
|
38
|
+
* would be the stricter reading, but projects whose specs type-check rely on the looser one, so
|
|
39
|
+
* it would reject working projects.
|
|
40
|
+
*
|
|
41
|
+
* @param fieldTypes The type of the field in each entity type that holds it.
|
|
42
|
+
* @returns The mismatch of the first entity type, or `undefined` when the field fits in one of
|
|
43
|
+
* them or its type there is unknown.
|
|
44
|
+
*/
|
|
45
|
+
export declare const relationFieldMismatch: (relation: RelationReadingField, fieldTypes: readonly ReferenceFieldType[], relatedEntityTypes: readonly string[]) => RelationFieldMismatch | undefined;
|
|
46
|
+
export {};
|
package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={"0-1":"nullableSingle","1-1":"single","0-N":"array","1-N":"array"};export const relationFieldMismatch=(n,i,r)=>{let t=i.map(i=>((n,i,r)=>{if("unknown"===i.kind)return;if("other"===i.kind)return{kind:"notReference"};let t=i.entityTypes;if(!(t.size===new Set(r).size&&r.every(e=>t.has(e))))return{kind:"otherEntityTypes",referenced:[...t]};if("indirect"===n.kind)return;let l="array"===i.kind?"array":i.nullable?"nullableSingle":"single",a=e[n.cardinality];return l===a?void 0:{kind:"cardinality",shape:l,required:a}})(n,i,r));return t.includes(void 0)?void 0:t[0]};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ParseContext } from '../../../core/index.js';
|
|
2
|
+
import type { ParseContext, PhoenixDefinitions } from '../../../core/index.js';
|
|
3
3
|
import type { MergedRelations } from '../../merge/index.js';
|
|
4
4
|
import type { ComponentEntry } from '../components/index.js';
|
|
5
5
|
import type { Expression } from '../expressions/index.js';
|
|
@@ -19,7 +19,8 @@ export type Relations = Branded<'Relations', {
|
|
|
19
19
|
* Validates merged relations against the latest model, then expands into components + expressions.
|
|
20
20
|
*
|
|
21
21
|
* Each relation is individually constructed via `Relation()` which builds its own expression
|
|
22
|
-
* and component entries. This factory validates
|
|
22
|
+
* and component entries. This factory validates the field a direct or indirect relation reads
|
|
23
|
+
* against the shape that holds it, validates cross-relation concerns (counterpart pairing,
|
|
23
24
|
* composition tree reachability) and aggregates the per-relation artifacts.
|
|
24
25
|
*/
|
|
25
|
-
export declare const Relations: (rawRelations: MergedRelations, latestModel: ModelVersion, ctx: ParseContext) => Relations;
|
|
26
|
+
export declare const Relations: (rawRelations: MergedRelations, latestModel: ModelVersion, phxDefinitions: PhoenixDefinitions, ctx: ParseContext) => Relations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as E}from"../model/index.js";import{referenceFieldType as n}from"./reference-field-type.js";import{relationFieldMismatch as f}from"./relation-field-mismatch.js";import{Relation as l}from"./relation.js";let T=(e,t,r)=>{let i=r[t.target];if(!i)return;let o="direct"===t.kind?"indirect":"indirect"===t.kind?"direct":"allOfType";for(let[r,E]of Object.entries(i))if(E.kind===o&&E.target===e&&("allOfType"===t.kind||"allOfType"===E.kind||t.field===E.field))return{entityKey:t.target,name:r,relation:E}},N=(e,t)=>{let r=t.aliases.get(e);return r||[e]},a=(e,i,o)=>{let{entityKey:E,relationName:n,field:f,fieldOwner:l,related:T,relatedEntityTypes:N,cardinality:a}=i;switch(e.kind){case"notReference":o.error(t.RELATION_FIELD_NOT_REFERENCE,r.RELATION_FIELD_NOT_REFERENCE(E,n,f,l));break;case"otherEntityTypes":o.error(t.RELATION_FIELD_REFERENCES_OTHER_TYPES,r.RELATION_FIELD_REFERENCES_OTHER_TYPES(E,n,f,l,e.referenced,T,N));break;case"cardinality":o.error(t.RELATION_FIELD_CARDINALITY_MISMATCH,r.RELATION_FIELD_CARDINALITY_MISMATCH(E,n,f,a,e.shape,e.required))}};export const Relations=(O,_,I,s)=>{let{allNames:d,resolvedShapes:R}=_,c=[...d].map(String),L=(e,t)=>E(R,e).fieldSchemas.has(t),A={};for(let[e,T]of Object.entries(O)){let O=s.at(e);if(!d.has(e)){O.error(t.RELATION_UNKNOWN_ENTITY_KEY,r.RELATION_UNKNOWN_ENTITY_KEY(e,c));continue}for(let[s,p]of Object.entries(T)){if(!o(s,O))continue;if(!d.has(p.target)){O.error(t.RELATION_UNKNOWN_TARGET,r.RELATION_UNKNOWN_TARGET(e,s,p.target,c));continue}if("direct"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,e));continue}if(!L(e,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_DIRECT,r.RELATION_UNKNOWN_FIELD_DIRECT(e,s,p.field));continue}}else if("indirect"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,p.target));continue}if(!L(p.target,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_INDIRECT,r.RELATION_UNKNOWN_FIELD_INDIRECT(e,s,p.field,p.target));continue}}if("allOfType"!==p.kind){let[t,r]="direct"===p.kind?[e,p.target]:[p.target,e],i=N(r,_).map(String),o=N(t,_).flatMap(e=>{let t=E(R,e).fieldSchemas.get(p.field);return t?[n(t,_,I)]:[]}),l=f(p,o,i);l&&a(l,{entityKey:e,relationName:s,field:p.field,fieldOwner:t,related:r,relatedEntityTypes:i,cardinality:p.cardinality},O.at(s))}let T=l(s,p,e,_.aliases,O);T&&(A[e]||(A[e]={}),A[e][T.name]=T)}}for(let[e,i]of Object.entries(A)){let o=s.at(e);for(let[E,n]of Object.entries(i)){if(n.target===e)continue;let i=T(e,n,A);if(!i){o.error(t.RELATION_MISSING_COUNTERPART,r.RELATION_MISSING_COUNTERPART(e,E,n.kind,n.target,"allOfType"===n.kind?void 0:n.field,n.composedOf));continue}n.composedOf&&i.relation.composedOf&&o.error(t.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH,r.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH(e,E,i.entityKey,i.name))}}((e,i,o)=>{let E=new Map;for(let[t,r]of Object.entries(e))for(let e of Object.values(r)){if(!e.composedOf)continue;let r=N(t,i),o=N(e.target,i);for(let e of r){let t=E.get(e);for(let r of(t||(t=new Set,E.set(e,t)),o))t.add(r)}}let n=new Set(i.rootEntityTypes),f=[...i.rootEntityTypes];for(;f.length>0;){let e=f.shift(),t=E.get(e);if(t)for(let e of t)n.has(e)||(n.add(e),f.push(e))}let l=i.rootEntityTypes.map(String);for(let e of i.entityTypes)n.has(e)||o.at(String(e)).error(t.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE,r.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE(String(e),l))})(A,_,s);let{components:p,expressions:m}=(e=>{let t=[],r=[];for(let i of Object.values(e))for(let e of Object.values(i))t.push(...e.components),r.push(e.expression);return{components:t,expressions:r}})(A);return e({entries:A,components:p,expressions:m})};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { AssistantValueType } from '#package/domain';
|
|
2
2
|
import { type EnhancedJsonSchemaType } from '../../../../core/index.js';
|
|
3
3
|
import { type SchemaRefResolver } from '../../common/index.js';
|
|
4
|
-
/**
|
|
5
|
-
* Opaque scalar for values the assistant schema does not type: objects, custom TypeScript types and
|
|
6
|
-
* loose unions. A value is plain serializable data and passes through unchanged.
|
|
7
|
-
*/
|
|
8
|
-
export declare const GraphQLJSON: GraphQLScalarType<unknown, unknown>;
|
|
9
4
|
/**
|
|
10
5
|
* The GraphQL type of one whitelisted stored field or declared expression. `enumValues` lists the
|
|
11
6
|
* allowed values of a string enum, which the schema exposes as `String` and names in the field
|
|
12
7
|
* description.
|
|
13
8
|
*/
|
|
14
9
|
export interface AssistantFieldType {
|
|
15
|
-
readonly type:
|
|
10
|
+
readonly type: AssistantValueType;
|
|
16
11
|
readonly enumValues?: readonly string[];
|
|
17
12
|
/**
|
|
18
13
|
* The schema's own description, or without one that of the common type it references, directly or
|
|
@@ -30,4 +25,4 @@ export interface AssistantFieldType {
|
|
|
30
25
|
* `String` with their values, primitives → scalars, arrays of mappable items → lists, and everything
|
|
31
26
|
* else → `JSON`. Every type, `JSON` included, is non-null unless the schema admits `null`.
|
|
32
27
|
*/
|
|
33
|
-
export declare const
|
|
28
|
+
export declare const resolveAssistantFieldType: (schema: EnhancedJsonSchemaType, resolveRef: SchemaRefResolver) => AssistantFieldType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isArray as e}from"@salsita-ai/common/utils";import{extractPhxDefName as n}from"../../../../core/index.js";import{commonTypeRefName as t,isNullableSchema as l,phxDefinitionRefName as r}from"../../common/index.js";let i={number:{kind:"scalar",name:"Float",nonNull:!1},integer:{kind:"scalar",name:"Int",nonNull:!1},string:{kind:"scalar",name:"String",nonNull:!1},boolean:{kind:"scalar",name:"Boolean",nonNull:!1}},a={kind:"scalar",name:"String",nonNull:!1},o={kind:"scalar",name:"ID",nonNull:!1},u=new Set(["Localizable","EnhancedLocalizable","MessageDescriptor","EnhancedMessageDescriptor","MultilingualString"]),s={type:{kind:"scalar",name:"JSON",nonNull:!1}},d=({anyOf:e,oneOf:n})=>[...e??[],...n??[]].filter(e=>"null"!==e.type),f=e=>"scalar"===e.kind?"JSON"===e.name:f(e.item),p=(l,y,c)=>{let v;if(void 0!==(v=void 0===l.$ref?void 0:r(l.$ref))&&u.has(v))return{type:a,localized:!0};if(l.tsType)return s;if(l.$ref){var g=l.$ref;if("DomainEntityId"===n(g))return{type:o};let e=t(g),r=void 0===e||c.has(e)?void 0:y(g);return void 0!==e&&r?p(r,y,new Set([...c,e])):s}if(l.anyOf||l.oneOf)return((e,n,t)=>{let l=d(e).map(e=>p(e,n,t)),[r]=l;if(1===l.length&&r)return r;let i=l.flatMap(({type:e,enumValues:n})=>e===a&&n?[n]:[]);if(l.length<2||i.length!==l.length||e.anyOf&&e.oneOf)return s;let o=i.flatMap(e=>[...new Set(e)]);return{type:a,enumValues:e.oneOf?o.filter(e=>o.indexOf(e)===o.lastIndexOf(e)):[...new Set(o)]}})(l,y,c);if(l.enum){let e;return(e=l.enum.filter(e=>null!==e)).every(e=>"string"==typeof e)?{type:a,enumValues:e}:s}if(e(l.type)){let e=l.type.filter(e=>"null"!==e),[n]=e;return 1===e.length&&n?p({...l,type:n},y,c):s}if("array"===l.type){var S=l.items;if(!S||e(S))return s;let n=m(S,y,c);return f(n.type)?s:{type:{kind:"list",item:n.type,nonNull:!1},enumValues:n.enumValues,localized:n.localized}}let h="string"==typeof l.type?i[l.type]:void 0;return h?{type:h}:s},m=(e,n,t)=>{let r=p(e,n,t);return{...r,type:{...r.type,nonNull:!l(e,n)}}},y=e=>{let n=d(e);return e.$ref??(1===n.length?n[0]?.$ref:void 0)},c=(e,n,l)=>{let r=t(e),i=void 0===r||l.has(r)?void 0:n(e);if(void 0===r||!i)return;let a=y(i);return void 0===i.description&&a?c(a,n,new Set([...l,r])):i.description};export const resolveAssistantFieldType=(e,n)=>{let t=y(e),l=void 0===e.description&&t?c(t,n,new Set):e.description;return{...m(e,n,new Set),...void 0===l?{}:{description:l}}};
|
package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AssistantFieldSource, type AssistantManifest, type AssistantRecipeGroup, type AssistantResolvedManifest, type AssistantStates } from '#package/domain';
|
|
2
2
|
import type { ParseContext, PhoenixDefinitions } from '../../../../core/index.js';
|
|
3
3
|
import { type RawAssistant } from '../../../raw-spec/index.js';
|
|
4
4
|
import type { Components } from '../../components/index.js';
|
|
5
5
|
import type { Expressions } from '../../expressions/index.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ModelVersion } from '../../model/index.js';
|
|
7
7
|
import type { Actions } from '../actions.js';
|
|
8
8
|
/**
|
|
9
9
|
* The field sources of every entity object type: GraphQL object type name → GraphQL field name →
|
|
@@ -11,28 +11,11 @@ import type { Actions } from '../actions.js';
|
|
|
11
11
|
* a concrete type; `id` and `type` are implicit and never listed.
|
|
12
12
|
*/
|
|
13
13
|
export type AssistantFieldSources = Readonly<Record<string, Readonly<Record<string, AssistantFieldSource>>>>;
|
|
14
|
-
/**
|
|
15
|
-
* The stored property each delta field of a `modify<Type>` mutation writes: entity type → delta
|
|
16
|
-
* field name → shape property. Only entity types with at least one writable field appear, aliases
|
|
17
|
-
* expanded to their members.
|
|
18
|
-
*/
|
|
19
|
-
export type AssistantWritableFields = Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
20
14
|
/**
|
|
21
15
|
* The recipe groups of one kind per entity type, in manifest
|
|
22
16
|
* order. Only entity types with at least one group appear, aliases expanded to their members.
|
|
23
17
|
*/
|
|
24
18
|
export type AssistantRecipeGroups = Readonly<Record<string, readonly AssistantRecipeGroup[]>>;
|
|
25
|
-
/**
|
|
26
|
-
* The options edges `meta` exposes per entity type, which are also the choices `modify<Type>` checks
|
|
27
|
-
* a written value against, in manifest order. Only entity types with at least one edge appear,
|
|
28
|
-
* aliases expanded to their members.
|
|
29
|
-
*/
|
|
30
|
-
export type AssistantFieldOptionsByType = Readonly<Record<string, readonly AssistantFieldOptions[]>>;
|
|
31
|
-
/**
|
|
32
|
-
* The custom mutations the manifest exposes: `Mutation` field name → the declared action it runs,
|
|
33
|
-
* in manifest order. Empty when the manifest exposes no action.
|
|
34
|
-
*/
|
|
35
|
-
export type AssistantActions = Readonly<Record<string, string>>;
|
|
36
19
|
/**
|
|
37
20
|
* The printed assistant GraphQL schema, the field sources its runtime resolvers read through, the
|
|
38
21
|
* entity types `deleteEntity` may delete, the fields the `modify<Type>` mutations may write, the
|
|
@@ -40,16 +23,9 @@ export type AssistantActions = Readonly<Record<string, string>>;
|
|
|
40
23
|
* of writable fields, aliases expanded, and the actions the custom mutations run,
|
|
41
24
|
* so the runtime checks the same sets the schema describes.
|
|
42
25
|
*/
|
|
43
|
-
export
|
|
44
|
-
readonly
|
|
45
|
-
|
|
46
|
-
readonly deletableTypes: readonly EntityTypeName[];
|
|
47
|
-
readonly writableFields: AssistantWritableFields;
|
|
48
|
-
readonly childRecipes: AssistantRecipeGroups;
|
|
49
|
-
readonly replaceRecipes: AssistantRecipeGroups;
|
|
50
|
-
readonly fieldOptions: AssistantFieldOptionsByType;
|
|
51
|
-
readonly actions: AssistantActions;
|
|
52
|
-
}
|
|
26
|
+
export type AssistantSchema = Required<AssistantManifest> & {
|
|
27
|
+
readonly resolved: AssistantResolvedManifest;
|
|
28
|
+
};
|
|
53
29
|
/** What the assistant schema is built from, besides the manifest. */
|
|
54
30
|
export interface AssistantSchemaInput {
|
|
55
31
|
readonly model: ModelVersion;
|
|
@@ -63,17 +39,7 @@ export interface AssistantSchemaInput {
|
|
|
63
39
|
/** The declared actions, which `actions` manifest entries expose as custom mutations. */
|
|
64
40
|
readonly actions: Actions;
|
|
65
41
|
}
|
|
66
|
-
/**
|
|
67
|
-
export
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
readonly toolStates: readonly string[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Builds the assistant GraphQL schema from the manifest whitelist, the latest model and the
|
|
74
|
-
* configurator states: aliases become interfaces implementing `AnyDomainEntity`, entity types become
|
|
75
|
-
* object types implementing every alias that contains them, and `Query` exposes the root, entities,
|
|
76
|
-
* selection and navigation entry points. Returns `undefined` after reporting diagnostics when the
|
|
77
|
-
* manifest does not fit the model or the generated schema is not valid GraphQL.
|
|
78
|
-
*/
|
|
79
|
-
export declare const createAssistantSchema: (manifest: RawAssistant, { model, states, phxDefinitions, expressions, components, actions }: AssistantSchemaInput, ctx: ParseContext) => AssistantSchema | undefined;
|
|
42
|
+
/** Resolves the whitelist against parse-time models, keeping only JSON data needed to build its schema. */
|
|
43
|
+
export declare const resolveAssistantManifest: (manifest: RawAssistant, { model, states, phxDefinitions, expressions, components, actions }: AssistantSchemaInput, ctx: ParseContext) => AssistantResolvedManifest | undefined;
|
|
44
|
+
/** Builds at parse time as well, translating GraphQL construction failures into the existing diagnostic. */
|
|
45
|
+
export declare const createAssistantSchema: (manifest: RawAssistant, input: AssistantSchemaInput, ctx: ParseContext) => AssistantSchema | undefined;
|