@salsita-ai/sdk 0.50.0-develop.1ddc7020fd → 0.50.0-develop.26a71cda28
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/core/components/component-filter.d.ts +53 -0
- package/dist/application-spec/core/components/component-filter.js +1 -0
- package/dist/application-spec/core/components/index.d.ts +2 -0
- package/dist/application-spec/core/components/index.js +1 -0
- package/dist/application-spec/core/components/sdk-code-ref.d.ts +9 -0
- package/dist/application-spec/core/components/sdk-code-ref.js +1 -0
- package/dist/application-spec/core/enhanced-json-value.d.ts +0 -68
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -0
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-value.d.ts +1 -1
- package/dist/application-spec/{core → enhanced-json}/eval-to-constant.d.ts +1 -1
- package/dist/application-spec/enhanced-json/index.d.ts +4 -0
- package/dist/application-spec/enhanced-json/index.js +1 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.d.ts +2 -0
- package/dist/application-spec/enhanced-json/is-enhanced-json-array.js +1 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.d.ts +18 -0
- package/dist/application-spec/enhanced-json/resolve-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/schema-from-value.d.ts +24 -0
- package/dist/application-spec/enhanced-json/schema-from-value.js +1 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.d.ts +14 -0
- package/dist/application-spec/enhanced-json/stringify-enhanced-json-value.js +1 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.d.ts +12 -0
- package/dist/application-spec/enhanced-json/validate-enhanced-json-value-caps.js +1 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.d.ts +13 -0
- package/dist/application-spec/enhanced-json/validate-no-legacy-code-ref.js +1 -0
- 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/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/domain-spec/generate-component-optics.js +4 -4
- 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-defaults.js +1 -1
- 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 +3 -3
- package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -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-create-configurator-skill.js +66 -42
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +14 -14
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +6 -8
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +4 -3
- 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/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/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/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- 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/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +1 -9
- package/dist/application-spec/parse-application-files/spec/components/component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +1 -54
- package/dist/application-spec/parse-application-files/spec/components/component-filter.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.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-schema.js +1 -1
- 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 +311 -2
- 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 +92 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- 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 +14 -4
- 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/index.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
- 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 +2 -0
- package/dist/configurator/common/frontend-analytics.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +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-controls/hotspot-drag-handle/HotspotDragHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-controls/hotspot-drag-handle/HotspotDragSceneHandle.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicator.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/dimension-indicators/DimensionIndicatorInternal.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/drag-and-drop/shared.d.ts +2 -2
- package/dist/configurator/scene/scene-entity/drag-and-drop/use-drag-object.d.ts +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/objects/SceneEntityObjectTextDecal.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +2 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +13 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.d.ts +22 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-selection.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +27 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +5 -0
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -0
- package/dist/configurator/ui/assistant/thread-items.d.ts +13 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- 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.js +4 -4
- 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/layout/steps/StepsNavigation.d.ts +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -2
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- package/dist/docs/dimensions/3d-scene-integration/dimension-indicators.mdx +2 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +1 -1
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +1 -1
- package/dist/docs/drag-and-drop/drag-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +1 -1
- package/dist/docs/drag-and-drop/planes.mdx +1 -1
- package/dist/docs/drag-and-drop/rotatable.mdx +2 -2
- 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/header/fixed.mdx +2 -2
- package/dist/docs/layouts/header/floating.mdx +2 -2
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +380 -0
- package/dist/docs/layouts/sidebar-footer/basic.mdx +32 -77
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/side-effects.mdx +8 -11
- package/dist/docs/other-features/transformers.mdx +4 -0
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/configurator-interface.mdx +179 -80
- 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/phoenix-cli.mdx +48 -48
- package/dist/docs/phoenix/project-structure.mdx +18 -11
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +8 -8
- 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/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/implementation/common-admin-expressions.d.ts +26 -12
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.d.ts +8 -3
- 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 +7 -26
- 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 +11 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +38 -2
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/assistant-value-type.js +1 -1
- 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.js +1 -1
- 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 +1 -11
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +6 -1
- package/dist/domain/application/assistant/index.js +1 -1
- 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-mutations.d.ts +2 -1
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +2 -2
- 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 +2 -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/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 -3
- 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} +21 -16
- package/dist/domain/core/action/index.d.ts +2 -0
- package/dist/domain/core/action/index.js +1 -0
- package/dist/domain/core/component/domain-component-optic.d.ts +29 -40
- package/dist/domain/core/component/domain-component-optic.js +2 -2
- package/dist/domain/core/component/legacy-filter.d.ts +2 -17
- package/dist/domain/core/component/system-component-filter.d.ts +36 -18
- 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-object.js +1 -0
- package/dist/domain/core/data-schema/data-schema-field.d.ts +2 -0
- package/dist/domain/core/data-schema/data-schema-field.js +1 -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/domain-factory.d.ts +1 -1
- package/dist/domain/core/domain.d.ts +2 -2
- 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 -8
- package/dist/domain/core/expression/constant-expressions.js +1 -1
- package/dist/domain/core/expression/custom-expression.d.ts +21 -8
- package/dist/domain/core/expression/custom-expression.js +1 -1
- package/dist/domain/core/expression/expression.d.ts +15 -17
- package/dist/domain/core/expression/index.d.ts +1 -2
- package/dist/domain/core/expression/index.js +1 -1
- package/dist/domain/core/index.d.ts +6 -1
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/{invariants → core/invariant}/builtin-invariant.d.ts +2 -1
- 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 +52 -4
- package/dist/domain/core/invariant/violation.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 -1
- 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 -3
- 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/state/migrations.d.ts +14 -45
- package/dist/domain/core/state/migrations.js +1 -1
- package/dist/domain/core/state/state.d.ts +1 -1
- package/dist/domain/domain-builder.d.ts +2 -5
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +2 -2
- 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 +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 +7 -7
- 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 +2 -3
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +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 -3
- package/dist/domain/domain-context/recipe-system/recipe-cooker-system.js +1 -1
- package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +2 -2
- package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/domain/domain-context/relation-transformers/replace-refs.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/reconcile-projected-entities.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +2 -36
- package/dist/domain/domain-context/store-system/store-system.js +2 -2
- package/dist/domain/domain-context/store-system/system-state.d.ts +1 -1
- package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
- package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +5 -7
- package/dist/domain/domain-context/transformers/auto-snap-transformer.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
- package/dist/domain/domain-context/transformers/context.d.ts +2 -4
- package/dist/domain/domain-context/transformers/context.js +1 -1
- package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -2
- 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/when-builder.d.ts +2 -3
- 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/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 -23
- 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 +84 -68
- 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/{core/expression → domain-runtime/spec}/memoize-expression.d.ts +1 -2
- package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +2 -2
- 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 +1 -1
- 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/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -17
- 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/{core/expression → domain-runtime/spec}/prepare-domain-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -6
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +3 -2
- package/dist/domain/{system-components → extensions}/canvas-config.d.ts +1 -1
- package/dist/domain/{system-components → extensions}/child-entity-recipe-hierarchy.d.ts +1 -1
- package/dist/domain/extensions/child-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/{system-components → extensions}/client-side-image.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/client-side-image.js +1 -1
- package/dist/domain/{system-components → extensions}/common/angle-indicator-schema.d.ts +3 -3
- package/dist/domain/extensions/common/angle-indicator-schema.js +1 -0
- package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.d.ts +2 -2
- 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 +1 -1
- package/dist/domain/extensions/custom-header.js +1 -0
- package/dist/domain/{system-components → extensions}/custom-price-footer.js +1 -1
- package/dist/domain/{system-components → extensions}/custom-sidebar-footer.d.ts +1 -1
- package/dist/domain/extensions/custom-sidebar-footer.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 +2 -1
- 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}/finalize-component.js +1 -1
- package/dist/domain/{system-components → extensions}/horizontal-tabs.d.ts +2 -2
- 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/{system-components → extensions}/navigation-steps.d.ts +2 -2
- package/dist/domain/extensions/offset-indicator.js +1 -0
- package/dist/domain/{system-components → extensions}/property-page.d.ts +1 -1
- package/dist/domain/extensions/property-page.js +1 -0
- package/dist/domain/{system-components → extensions}/replace-entity-recipe-hierarchy.d.ts +1 -1
- package/dist/domain/extensions/replace-entity-recipe-hierarchy.js +1 -0
- package/dist/domain/{system-components → extensions}/rotation-handle.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/save-template-thumbnail.d.ts +2 -2
- package/dist/domain/{system-components → extensions}/save-template-thumbnail.js +1 -1
- 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/{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/{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/{system-components → extensions}/sketching-edit.d.ts +1 -1
- package/dist/domain/extensions/sketching-edit.js +1 -0
- package/dist/domain/{system-components → extensions}/summary-component.js +1 -1
- package/dist/domain/{system-components → extensions}/tool-menu-fab.d.ts +1 -1
- package/dist/domain/extensions/tool-menu-fab.js +1 -0
- package/dist/domain/{system-components → extensions}/toolbar.d.ts +1 -1
- package/dist/domain/extensions/toolbar.js +1 -0
- package/dist/domain/index.d.ts +2 -14
- 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 +28 -19
- 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 +1 -2
- 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 +1 -1
- 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/application-config.d.ts +2 -2
- package/dist/domain/system-components/child-entity-selection.d.ts +1 -2
- package/dist/domain/system-components/collision-box-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-geometry.d.ts +4 -2
- package/dist/domain/system-components/collision-point-geometry.d.ts +4 -2
- 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/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +1 -2
- package/dist/domain/system-components/constraint.d.ts +10 -23
- package/dist/domain/system-components/drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +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-swatch.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/scene-entity-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-text-decal.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-object-transimissive-material-override.d.ts +1 -1
- package/dist/domain/system-components/scene-entity-transimissive-material-override.d.ts +1 -1
- package/dist/domain/utils/eval-cache.d.ts +1 -1
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/domain/utils/memo-eval.d.ts +2 -2
- package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
- 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 +16 -5
- 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 +2 -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/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/init.d.ts +4 -4
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/scripts/build-admin.js +1 -1
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.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/hooks/use-access-service.d.ts +2 -0
- 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 +53 -36
- 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/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/dist/webhook/builders/common.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +3 -3
- package/schema/domain-spec.json +209 -16
- 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/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 -23
- 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/domain-context/recipe-system/recipes.d.ts +0 -55
- package/dist/domain/domain-context/recipe-system/recipes.js +0 -1
- package/dist/domain/invariants/custom-invariants.d.ts +0 -20
- package/dist/domain/invariants/custom-invariants.js +0 -1
- package/dist/domain/invariants/invariants.d.ts +0 -74
- package/dist/domain/invariants/invariants.js +0 -1
- package/dist/domain/invariants/violation-component.js +0 -1
- package/dist/domain/invariants/violation.js +0 -1
- package/dist/domain/project-modules/index.d.ts +0 -1
- package/dist/domain/project-modules/index.js +0 -1
- package/dist/domain/project-modules/project-modules.js +0 -1
- package/dist/domain/relations/all-of-type-relation.d.ts +0 -30
- 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 -27
- package/dist/domain/relations/indirect-relation.d.ts +0 -78
- 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 -17
- package/dist/domain/relations/relation-factory.js +0 -1
- package/dist/domain/relations/relation-implementation.d.ts +0 -5
- package/dist/domain/system-components/child-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/common/angle-indicator-schema.js +0 -1
- package/dist/domain/system-components/custom-header.js +0 -1
- package/dist/domain/system-components/custom-sidebar-footer.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/list-selector-dimension-indicator.js +0 -1
- package/dist/domain/system-components/offset-indicator.js +0 -1
- package/dist/domain/system-components/property-page.js +0 -1
- package/dist/domain/system-components/replace-entity-recipe-hierarchy.js +0 -1
- package/dist/domain/system-components/scene-entity-add-fab.js +0 -1
- package/dist/domain/system-components/scene-entity-delete-fab.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/sketching-edit.js +0 -1
- package/dist/domain/system-components/tool-menu-fab.js +0 -1
- package/dist/domain/system-components/toolbar.js +0 -1
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.d.ts +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-code-uses-self.js +0 -0
- /package/dist/application-spec/{core → enhanced-json}/eval-to-constant.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/{relations/reference-field.js → core/data-schema/data-cell-value.js} +0 -0
- /package/dist/domain/{relations/relation-implementation.js → core/data-schema/data-schema-array-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/{relations → core/relation}/direct-relation.js +0 -0
- /package/dist/domain/{core/expression → domain-runtime/spec}/memoize-expression.js +0 -0
- /package/dist/domain/{core/expression → domain-runtime/spec}/prepare-domain-expressions.js +0 -0
- /package/dist/domain/{system-components → extensions}/angle-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/angle-indicator.js +0 -0
- /package/dist/domain/{system-components → extensions}/attribute-switch.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/attribute-switch.js +0 -0
- /package/dist/domain/{system-components → extensions}/autorotate-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/autorotate-camera-component.js +0 -0
- /package/dist/domain/{system-components → extensions}/basic-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/basic-sidebar-footer.js +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-object.js +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/camera-based-hidden-entity.js +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-config.js +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-custom-environment.js +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-padding.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-padding.js +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-preset-environment.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/canvas-preset-environment.js +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/color-value.js +0 -0
- /package/dist/domain/{system-components → extensions}/common/dimension-indicator-schema.js +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}/dimension-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/dimension-indicator.js +0 -0
- /package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/exit-tool-mode-fab.js +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-action.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/finalize-action.js +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-orthographic-camera-component.js +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fit-selection-perspective-camera-component.js +0 -0
- /package/dist/domain/{system-components → extensions}/fixed-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/fixed-header.js +0 -0
- /package/dist/domain/{system-components → extensions}/floating-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/floating-header.js +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-header.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-header.js +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/hidden-sidebar-footer.js +0 -0
- /package/dist/domain/{system-components → extensions}/horizontal-tabs.js +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/multilingual-text-value.js +0 -0
- /package/dist/domain/{system-components → extensions}/navigation-steps.js +0 -0
- /package/dist/domain/{system-components → extensions}/offset-anchors.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset-anchors.js +0 -0
- /package/dist/domain/{system-components → extensions}/offset-indicator.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/offset.js +0 -0
- /package/dist/domain/{system-components → extensions}/other-action.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/other-action.js +0 -0
- /package/dist/domain/{system-components → extensions}/read-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/read-sidebar-footer.js +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/rotatable.js +0 -0
- /package/dist/domain/{system-components → extensions}/rotation-handle.js +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-animation.js +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-control.js +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-floor-object.js +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/scene-entity-wall-object.js +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/selectable-component.js +0 -0
- /package/dist/domain/{system-components → extensions}/sidebar-tabs.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/sidebar-tabs.js +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/simple-summary.js +0 -0
- /package/dist/domain/{system-components → extensions}/size.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/size.js +0 -0
- /package/dist/domain/{system-components → extensions}/sketching-draw.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/sketching-draw.js +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}/text-value.js +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/tool-controls.js +0 -0
- /package/dist/domain/{system-components → extensions}/universal-sidebar-footer.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/universal-sidebar-footer.js +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.d.ts +0 -0
- /package/dist/domain/{system-components → extensions}/view-controls.js +0 -0
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Documented Phoenix SDK guidance, one Markdown section per entry.
|
|
3
3
|
*
|
|
4
|
-
* The agent guidance shipped into generated projects — the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The agent guidance shipped into generated projects — the Phoenix-owned agent skills — is composed
|
|
5
|
+
* from these sections, so each documented fact has exactly one home and the generated files differ
|
|
6
|
+
* only in which sections they carry.
|
|
7
7
|
*/
|
|
8
8
|
export declare const sdkGuidanceSections: {
|
|
9
|
-
/** Opening description of what a Phoenix configurator project is. */
|
|
10
|
-
readonly projectIntro: `## Phoenix Configurator Project
|
|
11
|
-
|
|
12
|
-
Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`;
|
|
13
9
|
/** The three everyday `phoenix` package scripts. */
|
|
14
10
|
readonly buildCommands: `## Build Commands
|
|
15
11
|
- \`pnpm phoenix build\` — Full production build
|
|
@@ -30,6 +26,8 @@ Declarative 3D product configurator built with Phoenix SDK. Domain model defined
|
|
|
30
26
|
- \`src/transformers/\` — Automatic state fixers (\`phx.frontend.transformerBuilder\`)
|
|
31
27
|
- \`src/components/\` — ECS system components (\`phx.domain.attachComponent.withEntity()\`)
|
|
32
28
|
- \`src/elements/\` — Page-level React components (\`phx.frontend.createCustomPhoenixLayoutElement()\`)
|
|
29
|
+
- A layout element named \`ConfiguratorLayout\` replaces everything the built-in layout renders for a loaded configuration, finalization included, so prefer arranging the layout in the spec; when you register it, mount \`LayoutSlots.SharedCanvas\` (from \`@salsita-ai/sdk/configurator\`) in it, or the app loader stays on screen, and call \`useSceneSafeArea()\` (same import) with its \`containerRef\` on the element covering the whole canvas and its \`safeAreaRef\` on the region the layout's UI leaves free, so the camera frames the scene there, and to keep the spec's tabs, property pages, sidebar footer and assistant panel while moving them, mount \`LayoutSlots.DesktopSidebar\` (same import) in a positioned container that sets its size, with \`side="start"\` when it is on the left
|
|
30
|
+
- The hooks such a layout reads, with what each returns, are listed under "Hooks for a Project Layout" in \`docs/phoenix/configurator-interface.mdx\` (read it with \`pnpm phoenix docs -r docs/phoenix/configurator-interface.mdx\`); it finalizes over the spec's \`finalizeAction\` components, since \`finalizePage\` and \`finalizeButton\` are legacy
|
|
33
31
|
- \`src/handlers/\` — Event & lifecycle handlers
|
|
34
32
|
- \`src/webhooks/\` — Server-side webhook handlers (\`phx.webhooks.*Builder\`)
|
|
35
33
|
- \`src/migrations/\` — Schema version migrations (v*.ts)
|
|
@@ -70,15 +68,17 @@ The default export must be what the folder's phx factory returns (for example \`
|
|
|
70
68
|
/** Which components and handlers are bundled into the webhook. */
|
|
71
69
|
readonly webhookMembership: `## Webhook Membership
|
|
72
70
|
- User-authored components, admin components, and handlers are frontend-only by default.
|
|
73
|
-
- A handler that registers \`createMapPublishedRevisionDataHandler\`, \`createMapPublishedChunkedDataHandler\`, \`createDataRowValidatorHandler\`, or \`createSheetValidatorHandler\` is included in the webhook automatically.
|
|
71
|
+
- A handler that registers \`phx.domain.createAssistantSetupHandler\`, \`createMapPublishedRevisionDataHandler\`, \`createMapPublishedChunkedDataHandler\`, \`createDataRowValidatorHandler\`, or \`createSheetValidatorHandler\` is included in the webhook automatically.
|
|
72
|
+
- An assistant setup handler receives the declaration-shaped whitelist and { role, sessionData, access }. Keep the exact entity/alias split from YAML; inherited fields and expanded member entries are absent. Narrow original declarations, then the SDK expands them. Use project-defined role/session data for per-user customization. Keep the handler synchronous, pure and deterministic. The handler runs in the browser and webhook. Return null to disable assistant execution, or omit whitelist entries to restrict them. Button and panel visibility use spec presence; project developers own dynamic UI filtering through normal layout mechanics such as $filter. Leaves expose optional descriptions; writable options allow only validate: true and allowDryRuns: false; recipe groups allow descriptions and allowDryRuns: false. Deletable entries are {}. Names, component bindings, hints and types are internal. Omitted overrides retain baseline values. Existing entity, enhanced-entity and action types constrain the handler; no separate generated manifest types. Browser GraphQL, tools and change recording use the session-derived manifest; rejected setup fails closed. UI reads the pure spec selector. Omitted server instructions or AI fields preserve the baseline. An empty server instructions string clears it.
|
|
74
73
|
- To include another component or handler in the webhook, put \`'use webhook'\` as its first statement (leading comments are allowed).
|
|
75
74
|
- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (\`application\`, \`admin\`, \`configurator\`, \`editor\`, \`react\`, \`ui\`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.
|
|
76
75
|
- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.`;
|
|
77
76
|
/** Generated files a project must not edit. */
|
|
78
77
|
readonly doNotEdit: `## Do Not Edit
|
|
79
78
|
- \`.phoenix/\` directory — completely regenerated on each build. The one exception is \`.phoenix/variants/\`, where the \`phoenix-variants\` skill has you write option files; a rebuild keeps it
|
|
80
|
-
- \`tsconfig.json\`, \`eslint.config.js\`, \`prettier.config.js\`, \`.
|
|
81
|
-
- \`src/locales/\` .ts files — compiled from .po files
|
|
79
|
+
- \`tsconfig.json\`, \`eslint.config.js\`, \`prettier.config.js\`, \`.linguirc\`, \`.nvmrc\`
|
|
80
|
+
- \`src/locales/\` .ts files — compiled from .po files
|
|
81
|
+
- \`phoenix\` and \`phoenix-*\` folders under \`.claude/skills/\` and \`.agents/skills/\` — Phoenix rewrites its skills on every sync, removes anything else inside their folders and removes any other \`phoenix-*\` skill folder. To customise a skill, copy it to a folder whose name does not start with \`phoenix\``;
|
|
82
82
|
/** When and how a deployed domain model gets a new version and a migration, with the recipe for replacing the starter. */
|
|
83
83
|
readonly modelVersioning: `## Version the Domain Model Once It Is Deployed
|
|
84
84
|
A deployed model version cannot change, because saved configurations depend on it. \`pnpm phoenix deploy\` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: \`model.latest\` is always the highest numbered version plus one, so a spec with only \`latest\` is v1, and \`applicationVersion\` plays no part. \`pnpm phoenix dev\` accepts every model change, so a working preview does not show that the deploy will pass.
|
|
@@ -284,10 +284,10 @@ Rendered appearance is a deliverable, not a side effect. Before presenting any p
|
|
|
284
284
|
Inspect and report:
|
|
285
285
|
|
|
286
286
|
1. Geometry. Every part rests on its support. Name where the product meets the ground and confirm its shadow and any selection indicator sit there too. Nothing floats, intersects, or protrudes. Scale and orientation are consistent between parts and match the stated dimensions. Each part is complete and present.
|
|
287
|
-
2.
|
|
288
|
-
3.
|
|
289
|
-
|
|
290
|
-
|
|
287
|
+
2. Response. Every configurable surface of every part reacts to its control, not only the parts you just changed.
|
|
288
|
+
3. Loading. How long until a meaningful first frame, and whether anything indicates progress meanwhile.
|
|
289
|
+
|
|
290
|
+
This covers what follows from the change you just made, in the state you are already in. Fidelity against the client's own material, the density of the controls, and every state you did not open belong to an independent reviewer, which the \`phoenix-create-configurator\` skill's Appearance review covers.
|
|
291
291
|
|
|
292
292
|
Report defects you are deferring as defects. Do not call work done, verified, or complete while any of the above is unchecked or failing: say which, and recommend fixing now or later.
|
|
293
293
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export const sdkGuidanceSections={
|
|
2
|
-
|
|
3
|
-
Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`,buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:"## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/actions/` — Domain operations declared under `actions:` in the spec (`phx.domain.implementActions()`), run by controls and exposed to the assistant\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT, except the option files in `.phoenix/variants/`)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)",architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Actions = named domain operations (`actions:` in YAML with `params` and `result` schemas), implemented in src/actions/, prepared through `actionSystem.prepareAction()` and exposed as assistant mutations through `assistant.actions`\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
|
|
1
|
+
export const sdkGuidanceSections={buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:'## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/actions/` — Domain operations declared under `actions:` in the spec (`phx.domain.implementActions()`), run by controls and exposed to the assistant\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n - A layout element named `ConfiguratorLayout` replaces everything the built-in layout renders for a loaded configuration, finalization included, so prefer arranging the layout in the spec; when you register it, mount `LayoutSlots.SharedCanvas` (from `@salsita-ai/sdk/configurator`) in it, or the app loader stays on screen, and call `useSceneSafeArea()` (same import) with its `containerRef` on the element covering the whole canvas and its `safeAreaRef` on the region the layout\'s UI leaves free, so the camera frames the scene there, and to keep the spec\'s tabs, property pages, sidebar footer and assistant panel while moving them, mount `LayoutSlots.DesktopSidebar` (same import) in a positioned container that sets its size, with `side="start"` when it is on the left\n - The hooks such a layout reads, with what each returns, are listed under "Hooks for a Project Layout" in `docs/phoenix/configurator-interface.mdx` (read it with `pnpm phoenix docs -r docs/phoenix/configurator-interface.mdx`); it finalizes over the spec\'s `finalizeAction` components, since `finalizePage` and `finalizeButton` are legacy\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT, except the option files in `.phoenix/variants/`)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)',architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Actions = named domain operations (`actions:` in YAML with `params` and `result` schemas), implemented in src/actions/, prepared through `actionSystem.prepareAction()` and exposed as assistant mutations through `assistant.actions`\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
|
|
4
2
|
- Components: PascalCase (.tsx)
|
|
5
3
|
- Utilities: kebab-case (.ts)
|
|
6
4
|
- Expressions: entity-name.ts
|
|
7
5
|
- Migrations: v*.ts (sequential)
|
|
8
6
|
- Specs: kebab-case.yaml
|
|
9
|
-
- Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:'## Export Rules\nAll files in src/expressions/, src/actions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/elements/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\nThe default export must be what the folder\'s phx factory returns (for example `phx.frontend.createCustomPhoenixLayoutElement()` in src/elements/). Any other value, such as a plain React component, stops the application at start with an "Invalid default export in <file>" error. Put plain components and helpers in an underscore folder.',webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build. The one exception is `.phoenix/variants/`, where the `phoenix-variants` skill has you write option files; a rebuild keeps it\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files",modelVersioning:"## Version the Domain Model Once It Is Deployed\nA deployed model version cannot change, because saved configurations depend on it. `pnpm phoenix deploy` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: `model.latest` is always the highest numbered version plus one, so a spec with only `latest` is v1, and `applicationVersion` plays no part. `pnpm phoenix dev` accepts every model change, so a working preview does not show that the deploy will pass.\n\nTo change a model that has been deployed as v<N>:\n1. Keep the deployed model, unchanged, as `model.v<N>` in the spec. A file of its own, such as `spec/model-v<N>.yaml`, keeps `latest` readable.\n2. Make the change in `model.latest`, which is now v<N+1>.\n3. Add `src/migrations/v<N+1>.ts` exporting `migrateToV<N+1>`. It receives the saved entities of v<N> and returns entities that are valid in v<N+1>; `ModelV<N>` and `ModelV<N+1>` are generated global namespaces.\n\nThe admin model is versioned on its own, under `src/admin/migrations/`, with its types in `AdminV<N>`.\n\n**Replacing the starter.** When the first deployment of the workspace was the starter, its `Box` model is v1 in production. When the real model replaces it, keep the starter's model as `model.v1` and define the real model in `latest`. Configurations saved from the starter are not worth converting, so the migration returns the starting state of the new model, the `initialDomainEntities` of its preset, and drops the boxes:\n```typescript\n// src/migrations/v2.ts\nimport type { Migration } from '@salsita-ai/sdk/domain'\n\nexport const migrateToV2: Migration<ModelV1.AnyDomainEntity, ModelV2.AnyDomainEntity> = () => [\n // the entities of the new model's preset\n]\n```\nAn entity of a type the new version no longer has must not stay in the returned state. An entity id starts with its type (`Box-1`), so an entity that keeps its data under a new type name needs a new id and every relation pointing at it rewritten. Read `docs/phoenix/migrations.mdx` before writing any other migration.",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
|
|
7
|
+
- Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:'## Export Rules\nAll files in src/expressions/, src/actions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/elements/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\nThe default export must be what the folder\'s phx factory returns (for example `phx.frontend.createCustomPhoenixLayoutElement()` in src/elements/). Any other value, such as a plain React component, stops the application at start with an "Invalid default export in <file>" error. Put plain components and helpers in an underscore folder.',webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `phx.domain.createAssistantSetupHandler`, `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- An assistant setup handler receives the declaration-shaped whitelist and { role, sessionData, access }. Keep the exact entity/alias split from YAML; inherited fields and expanded member entries are absent. Narrow original declarations, then the SDK expands them. Use project-defined role/session data for per-user customization. Keep the handler synchronous, pure and deterministic. The handler runs in the browser and webhook. Return null to disable assistant execution, or omit whitelist entries to restrict them. Button and panel visibility use spec presence; project developers own dynamic UI filtering through normal layout mechanics such as $filter. Leaves expose optional descriptions; writable options allow only validate: true and allowDryRuns: false; recipe groups allow descriptions and allowDryRuns: false. Deletable entries are {}. Names, component bindings, hints and types are internal. Omitted overrides retain baseline values. Existing entity, enhanced-entity and action types constrain the handler; no separate generated manifest types. Browser GraphQL, tools and change recording use the session-derived manifest; rejected setup fails closed. UI reads the pure spec selector. Omitted server instructions or AI fields preserve the baseline. An empty server instructions string clears it.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build. The one exception is `.phoenix/variants/`, where the `phoenix-variants` skill has you write option files; a rebuild keeps it\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files\n- `phoenix` and `phoenix-*` folders under `.claude/skills/` and `.agents/skills/` — Phoenix rewrites its skills on every sync, removes anything else inside their folders and removes any other `phoenix-*` skill folder. To customise a skill, copy it to a folder whose name does not start with `phoenix`",modelVersioning:"## Version the Domain Model Once It Is Deployed\nA deployed model version cannot change, because saved configurations depend on it. `pnpm phoenix deploy` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: `model.latest` is always the highest numbered version plus one, so a spec with only `latest` is v1, and `applicationVersion` plays no part. `pnpm phoenix dev` accepts every model change, so a working preview does not show that the deploy will pass.\n\nTo change a model that has been deployed as v<N>:\n1. Keep the deployed model, unchanged, as `model.v<N>` in the spec. A file of its own, such as `spec/model-v<N>.yaml`, keeps `latest` readable.\n2. Make the change in `model.latest`, which is now v<N+1>.\n3. Add `src/migrations/v<N+1>.ts` exporting `migrateToV<N+1>`. It receives the saved entities of v<N> and returns entities that are valid in v<N+1>; `ModelV<N>` and `ModelV<N+1>` are generated global namespaces.\n\nThe admin model is versioned on its own, under `src/admin/migrations/`, with its types in `AdminV<N>`.\n\n**Replacing the starter.** When the first deployment of the workspace was the starter, its `Box` model is v1 in production. When the real model replaces it, keep the starter's model as `model.v1` and define the real model in `latest`. Configurations saved from the starter are not worth converting, so the migration returns the starting state of the new model, the `initialDomainEntities` of its preset, and drops the boxes:\n```typescript\n// src/migrations/v2.ts\nimport type { Migration } from '@salsita-ai/sdk/domain'\n\nexport const migrateToV2: Migration<ModelV1.AnyDomainEntity, ModelV2.AnyDomainEntity> = () => [\n // the entities of the new model's preset\n]\n```\nAn entity of a type the new version no longer has must not stay in the returned state. An entity id starts with its type (`Box-1`), so an entity that keeps its data under a new type name needs a new id and every relation pointing at it rewritten. Read `docs/phoenix/migrations.mdx` before writing any other migration.",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
|
|
10
8
|
|
|
11
9
|
Get the current editor context data as JSON via \`pnpm phoenix inspect:data\`.
|
|
12
10
|
|
|
@@ -71,10 +69,10 @@ Rendered appearance is a deliverable, not a side effect. Before presenting any p
|
|
|
71
69
|
Inspect and report:
|
|
72
70
|
|
|
73
71
|
1. Geometry. Every part rests on its support. Name where the product meets the ground and confirm its shadow and any selection indicator sit there too. Nothing floats, intersects, or protrudes. Scale and orientation are consistent between parts and match the stated dimensions. Each part is complete and present.
|
|
74
|
-
2.
|
|
75
|
-
3.
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
2. Response. Every configurable surface of every part reacts to its control, not only the parts you just changed.
|
|
73
|
+
3. Loading. How long until a meaningful first frame, and whether anything indicates progress meanwhile.
|
|
74
|
+
|
|
75
|
+
This covers what follows from the change you just made, in the state you are already in. Fidelity against the client's own material, the density of the controls, and every state you did not open belong to an independent reviewer, which the \`phoenix-create-configurator\` skill's Appearance review covers.
|
|
78
76
|
|
|
79
77
|
Report defects you are deferring as defects. Do not call work done, verified, or complete while any of the above is unchecked or failing: say which, and recommend fixing now or later.
|
|
80
78
|
|
|
@@ -1,11 +1,11 @@
|
|
|
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=o.map((
|
|
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
9
|
.withHandlers(${a})`:"";return`// Auto-generated by application-spec pipeline. Do not edit.
|
|
10
10
|
import { createDomainWebhook } from '@salsita-ai/sdk/webhook'
|
|
11
11
|
import type { DeploymentAssistant } from '@salsita-ai/sdk/contracts/assistant'
|
|
@@ -16,7 +16,7 @@ import { customAdminComponentOptics } from './admin-domain-code.js'
|
|
|
16
16
|
${r?`
|
|
17
17
|
${r}
|
|
18
18
|
`:""}
|
|
19
|
-
const $assistantServerSettings: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null = ${JSON.stringify(
|
|
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
20
|
|
|
21
21
|
const webhookConfiguratorBuilder = configuratorBuilder
|
|
22
22
|
.withComponentOptics(customComponentOptics)
|
|
@@ -37,6 +37,7 @@ export const {
|
|
|
37
37
|
configuratorBuilder: webhookConfiguratorBuilder,
|
|
38
38
|
createI18n,
|
|
39
39
|
assistantServerSettings: $assistantServerSettings,
|
|
40
|
+
assistantStrictThreads: phx.webhooksEnv.ASSISTANT_STRICT_THREADS,
|
|
40
41
|
${i}
|
|
41
42
|
})
|
|
42
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentEntry, ComponentImplementation } from '../../../parse-application-files/spec/index.js';
|
|
2
2
|
import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
|
|
3
3
|
import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
|
|
4
4
|
import type { ComponentOptic } from './component-optic.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as t,adminSidebarComponent as a,attributeSelectionComponent as i,componentsByName as r,composedOfComponent as n,navigationPageComponent as o,navigationPanelListComponent as d,referenceComponent as c}from"#package/domain";import*as m from"#package/domain";import{FILTER_CRITERION_KEYS as s,isSdkCodeRef as l}from"../../../
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as t,adminSidebarComponent as a,attributeSelectionComponent as i,componentsByName as r,composedOfComponent as n,navigationPageComponent as o,navigationPanelListComponent as d,referenceComponent as c}from"#package/domain";import*as m from"#package/domain";import{FILTER_CRITERION_KEYS as s,isSdkCodeRef as l}from"../../../core/index.js";let g=new Map([["reference",c],["composedOf",n],["adminSidebar",a],["attributeSelection",i],["navigationPage",o],["navigationPanelList",d]]),R={createAdminCustomPageRead:m.createAdminCustomPageRead,createAdminCustomSidebarRead:m.createAdminCustomSidebarRead,createAdminDataPageRead:m.createAdminDataPageRead,createAdminDataTableSidebarRead:m.createAdminDataTableSidebarRead,createAdminNavigationPanelRead:m.createAdminNavigationPanelRead,createAdminPresetCategoryPageRead:m.createAdminPresetCategoryPageRead,createAdminPresetCategorySelectionRead:m.createAdminPresetCategorySelectionRead,createAdminPresetCategorySelectionWrite:m.createAdminPresetCategorySelectionWrite,createAdminPresetCategorySidebarRead:m.createAdminPresetCategorySidebarRead,createAdminPresetListPageRead:m.createAdminPresetListPageRead,createAdminPresetSidebarRead:m.createAdminPresetSidebarRead,createAdminRecipeCollectionPageRead:m.createAdminRecipeCollectionPageRead,createAdminRecipeSidebarRead:m.createAdminRecipeSidebarRead},p=(e,t)=>{let a=R[e.sdkFunction]??m[e.sdkFunction];if("function"!=typeof a)throw Error(`SDK factory function "${e.sdkFunction}" not found. Make sure it is exported from the package.`);return a(...e.params.map(e=>{if(l(e)){let a=t.entities[e.$codeRef]??t.aliasReflections[e.$codeRef];if(!a)throw Error(`Reflection "${e.$codeRef}" not found in ModelRuntime. This is a bug — the target was validated at parse time.`);return a}return e}))};export const buildSdkOptic=(a,i,n,o)=>{let d=t.from(n),c=r.get(a.componentName)??g.get(a.componentName);if(!c)throw Error(`SDK component "${a.componentName}" not found. This is a bug — the component was validated at parse time.`);let m=d.withComponent(c,a.instanceName,!0),l=a.isAlias?m.withAlias(String(a.typeOrAlias)):m.withEntity(String(a.typeOrAlias));for(let e of i.filters.items){if("root"===e.kind){let t=e.target,a=e=>e[t];l=l.withFilter(a);continue}let t={};for(let a of s){let i=e[a];void 0!==i&&("dynamic"===i.kind?t[a]=e=>e[i.target]:"eval"===i.kind?t[a]=Function("self",`return (${i.code})`):t[a]=i.value)}l=l.withGradualFilter(t)}let R=p(i.readFactory,o),A=p(i.writeFactory,o),f=l.attach(R,A);return e({typeOrAlias:String(a.typeOrAlias),componentName:a.componentName,instanceName:String(a.instanceName),optic:f})};
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./core/index.js";export*from"./caching/index.js";export*from"./errors/index.js";export*from"./generate-application/index.js";export*from"./parse-application-files/index.js";export*from"./webhook-boundary.js";
|
|
1
|
+
export*from"./core/index.js";export*from"./enhanced-json/index.js";export*from"./caching/index.js";export*from"./errors/index.js";export*from"./generate-application/index.js";export*from"./parse-application-files/index.js";export*from"./webhook-boundary.js";
|
|
@@ -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();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"zod";import{Branded as a}from"@salsita-ai/common/utils";import{enhancedJsonObjectSchema as t
|
|
1
|
+
import{z as o}from"zod";import{Branded as a}from"@salsita-ai/common/utils";import{enhancedJsonObjectSchema as t}from"../../core/index.js";import{validateNoLegacyCodeRef as e}from"../../enhanced-json/index.js";import{DiagnosticCode as n,diagnosticMessages as i}from"../../errors/index.js";import{rawAclSchema as r}from"./raw-acl.js";import{rawActionsSchema as s}from"./raw-actions.js";import{rawAdminPagesSchema as l}from"./raw-admin-pages.js";import{rawAssistantSchema as p}from"./raw-assistant.js";import{rawBudgetsSchema as m}from"./raw-budgets.js";import{rawChunksSchema as c}from"./raw-chunks.js";import{rawComponentsSchema as f}from"./raw-components.js";import{rawConstantsSchema as d}from"./raw-constants.js";import{rawDataSpecSchema as j}from"./raw-data.js";import{rawDefaultsSchema as u}from"./raw-defaults.js";import{rawEnvSchema as w}from"./raw-env.js";import{rawExpressionsSchema as b}from"./raw-expressions.js";import{rawInvariantsSchema as g}from"./raw-invariants.js";import{rawModelSchema as S}from"./raw-model.js";import{rawPresetsSchema as h}from"./raw-presets.js";import{rawRelationsSchema as D}from"./raw-relations.js";import{rawResourcesConfigSchema as v,rawResourcesSchema as O}from"./raw-resources.js";import{rawStateValuesSchema as E}from"./raw-states.js";import{rawTransformersSchema as R}from"./raw-transformers.js";export const DATA_SCHEMA_KEYS=["publishedData","sessionData","frontendData","backendData","finalizeData","prefetchedFinalizeData","finalizeResult","callbackData"];let k=o.object({$admin:o.boolean().optional(),model:S.optional(),components:f.optional(),presets:h.optional(),$data:j.optional(),expressions:b.optional(),actions:s.optional(),invariants:g.optional(),constants:d.optional(),relations:D.optional(),defaults:u.optional(),publishedData:t.optional(),sessionData:t.optional(),frontendData:t.optional(),backendData:t.optional(),finalizeData:t.optional(),prefetchedFinalizeData:t.optional(),finalizeResult:t.optional(),callbackData:t.optional(),navigationStates:E.optional(),viewStates:E.optional(),toolStates:E.optional(),exportStates:E.optional(),themePreset:o.string().optional(),themeOptions:o.record(o.unknown()).optional(),preview:o.enum(["always","never","auto","hide"]).optional(),alwaysExpand:o.boolean().optional(),availableLocales:o.array(o.string()).optional(),textLanguages:o.array(o.string()).optional(),transformers:R.optional(),project:o.string().regex(/^[a-z0-9-]{3,}$/,"must be a project slug (lowercase letters, digits and dashes, at least 3) or `default`").optional(),applicationVersion:o.string().optional(),workspace:o.boolean().optional(),webComponentTag:o.string().optional(),pageTitle:o.string().optional(),useAuthHook:o.boolean().optional(),useClerk:o.boolean().optional(),enableAdminRelease:o.boolean().optional(),jsonSchemaValidator:o.enum(["ajv","csp-compatible"]).optional(),gltfDecoder:o.enum(["js","wasm"]).optional(),appLoader:o.enum(["legacy","universal"]).optional(),collectFinalizeData:o.boolean().optional(),env:w.optional(),acl:r.optional(),resources:O.optional(),resourcesConfig:v.optional(),budgets:m.optional(),chunks:c.optional(),assistant:p.optional(),$adminPages:l.optional()}).strict();export const parseRawSpecFile=(o,t)=>{e(o.content,t);let r=k.safeParse(o.content);if(!r.success){for(let o of r.error.issues)t.error(n.SCHEMA_PARSE_ERROR,i.SCHEMA_PARSE_ERROR(o.path.join("."),o.message));return}let{constants:s,...l}=r.data,p=((o,a)=>{let t=Object.fromEntries(Object.entries(o.expressions??{}).map(([o,a])=>[o,{...a}]));if(void 0===o.constants)return Object.keys(t).length>0?t:void 0;for(let[e,r]of Object.entries(o.constants))for(let[o,s]of(t[e]||(t[e]={}),Object.entries(r))){if(void 0!==t[e][o]){a.at("constants",e,o).error(n.CONSTANTS_EXPRESSION_CONFLICT,i[n.CONSTANTS_EXPRESSION_CONFLICT](e,o));continue}t[e][o]={kind:"value",constant:!0,value:s,schema:{}}}return Object.keys(t).length>0?t:void 0})(r.data,t);return a({name:o.name,content:{...l,expressions:p}})};
|
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)})};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { SdkCodeRef } from '../../../core/index.js';
|
|
2
3
|
import type { MemoEvalPlan, MemoEvalPlanInput } from '../expressions/memo-eval-plan.js';
|
|
3
4
|
import type { EntityOrAliasName, InstanceName } from '../model/index.js';
|
|
4
5
|
import type { ComponentReadBinding, ComponentWriteBinding } from './bindings/index.js';
|
|
@@ -46,15 +47,6 @@ interface UserBoundImplementation {
|
|
|
46
47
|
readonly plan: MemoEvalPlan;
|
|
47
48
|
readonly implementation: RootReadImplementation | CompositeImplementation;
|
|
48
49
|
}
|
|
49
|
-
/**
|
|
50
|
-
* A parameter that should be emitted as an unquoted code reference in codegen
|
|
51
|
-
* (e.g. an entity reflection variable like `Top`).
|
|
52
|
-
* At runtime, the string value is resolved to the actual object (e.g. entity reflection).
|
|
53
|
-
*/
|
|
54
|
-
export interface SdkCodeRef {
|
|
55
|
-
readonly $codeRef: string;
|
|
56
|
-
}
|
|
57
|
-
export declare const isSdkCodeRef: (value: unknown) => value is SdkCodeRef;
|
|
58
50
|
export type SdkFactoryParam = SdkCodeRef | string | number | boolean | null | readonly SdkFactoryParam[] | {
|
|
59
51
|
readonly [key: string]: SdkFactoryParam;
|
|
60
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export{};
|
|
@@ -1,58 +1,5 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import { type EnhancedJsonSchemaType, type EnhancedJsonValue } from '../../../core/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* A single filter criterion — static value, dynamic `$read` reference, or
|
|
5
|
-
* inline `$eval` expression evaluated against `self` at runtime.
|
|
6
|
-
*
|
|
7
|
-
* The `target` field on the `'dynamic'` variant is a bare name (matches the
|
|
8
|
-
* same pattern as prop-level reads); codegen emits `self.target`, runtime
|
|
9
|
-
* reads `self[target]`.
|
|
10
|
-
*/
|
|
11
|
-
export type FilterCriterion<T> = {
|
|
12
|
-
readonly kind: 'static';
|
|
13
|
-
readonly value: T;
|
|
14
|
-
} | {
|
|
15
|
-
readonly kind: 'dynamic';
|
|
16
|
-
readonly target: string;
|
|
17
|
-
} | {
|
|
18
|
-
readonly kind: 'eval';
|
|
19
|
-
readonly code: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Parsed component filter controlling when the component is active. Two
|
|
23
|
-
* mutually-exclusive shapes:
|
|
24
|
-
*
|
|
25
|
-
* - `'gradual'` — zero or more per-criterion fields; compiles to one entry per
|
|
26
|
-
* set key inside `.withGradualFilter({…})`. The preferred form.
|
|
27
|
-
* - `'root'` — the entire filter is a single `$read` at the root (legacy
|
|
28
|
-
* form `$filter: { $read: '$x' }`); compiles to `.withFilter(self => (self.target))`.
|
|
29
|
-
* Distinct codegen because the SDK's `withFilter` and `withGradualFilter`
|
|
30
|
-
* methods have different evaluation semantics (whole-closure vs per-key).
|
|
31
|
-
*
|
|
32
|
-
* See `components.md §"Simple expression filter"` / `§"Declarative filter"`.
|
|
33
|
-
*/
|
|
34
|
-
export type ComponentFilter = {
|
|
35
|
-
readonly kind: 'gradual';
|
|
36
|
-
readonly navigationStates?: FilterCriterion<readonly string[]>;
|
|
37
|
-
readonly viewStates?: FilterCriterion<readonly string[]>;
|
|
38
|
-
readonly toolStates?: FilterCriterion<readonly string[]>;
|
|
39
|
-
readonly exportStates?: FilterCriterion<readonly string[]>;
|
|
40
|
-
readonly modes?: FilterCriterion<readonly string[]>;
|
|
41
|
-
readonly roles?: FilterCriterion<readonly string[]>;
|
|
42
|
-
readonly selectedEntityIds?: FilterCriterion<unknown>;
|
|
43
|
-
readonly hoveredEntityIds?: FilterCriterion<unknown>;
|
|
44
|
-
readonly draggedEntityIds?: FilterCriterion<unknown>;
|
|
45
|
-
readonly exportedEntityIds?: FilterCriterion<unknown>;
|
|
46
|
-
readonly active?: FilterCriterion<boolean>;
|
|
47
|
-
readonly fullscreen?: FilterCriterion<boolean>;
|
|
48
|
-
readonly debug?: FilterCriterion<boolean>;
|
|
49
|
-
readonly viewports?: FilterCriterion<unknown>;
|
|
50
|
-
} | {
|
|
51
|
-
readonly kind: 'root';
|
|
52
|
-
readonly target: string;
|
|
53
|
-
};
|
|
54
|
-
/** Criterion field names on the gradual variant — used for parse and iteration. */
|
|
55
|
-
export declare const FILTER_CRITERION_KEYS: readonly ["navigationStates", "viewStates", "toolStates", "exportStates", "modes", "roles", "selectedEntityIds", "hoveredEntityIds", "draggedEntityIds", "exportedEntityIds", "active", "fullscreen", "debug", "viewports"];
|
|
2
|
+
import { type ComponentFilter, type EnhancedJsonSchemaType, type EnhancedJsonValue } from '../../../core/index.js';
|
|
56
3
|
/**
|
|
57
4
|
* Schema types for each filter criterion, used for expression inference.
|
|
58
5
|
* When `$read: '$expr'` appears in a filter criterion, the expression is
|