@salsita-ai/sdk 0.50.0-develop.8c8c362f86 → 0.50.0-develop.8e3768cb11
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/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/expressions/index.d.ts +2 -0
- package/dist/application-spec/core/expressions/index.js +1 -0
- package/dist/application-spec/core/expressions/relation-expression-params.d.ts +11 -0
- package/dist/application-spec/core/expressions/relation-expression-params.js +1 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.d.ts +24 -0
- package/dist/application-spec/core/expressions/sdk-expression-implementation.js +1 -0
- package/dist/application-spec/core/index.d.ts +2 -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/generate-application/code/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +9 -4
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +4 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js +1 -1
- package/dist/application-spec/generate-application/code/templates/gitignore.js +1 -2
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +1 -1
- 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 +10 -4
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +6 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +6 -2
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +8 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +5 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +43 -0
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.d.ts +3 -0
- package/dist/application-spec/generate-application/runtime/factory-data/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/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/expression-runtime.js +1 -1
- package/dist/application-spec/index.d.ts +1 -0
- package/dist/application-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.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/expression.d.ts +1 -28
- package/dist/application-spec/parse-application-files/spec/expressions/expression.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/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.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +29 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +7 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/drag-and-drop-system/drag-and-drop-system.d.ts +3 -3
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -2
- package/dist/configurator/common/configurator-interface.d.ts +22 -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/common/index.d.ts +2 -0
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-finalize-action.d.ts +31 -0
- package/dist/configurator/common/use-finalize-action.js +1 -0
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +2 -2
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +7 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.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/AssistantChips.d.ts +8 -2
- package/dist/configurator/ui/assistant/AssistantChips.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.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/configurator-layout/slots/services/InvariantViolations.d.ts +4 -4
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.d.ts +3 -6
- package/dist/configurator/ui/configurator-layout/slots/services/SideEffects.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/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 +11 -1
- package/dist/docs/layouts/custom-layout.mdx +1323 -179
- 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 +2 -2
- 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/phoenix/application-states.mdx +9 -7
- package/dist/docs/phoenix/configurator-interface.mdx +134 -18
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +116 -0
- package/dist/docs/phoenix/migration-guide.mdx +19 -8
- package/dist/docs/phoenix/phoenix-cli.mdx +26 -8
- package/dist/docs/phoenix/project-structure.mdx +20 -5
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +17 -0
- package/dist/domain/application/application-config.d.ts +3 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +4 -1
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/core/invariant/violation.d.ts +50 -2
- package/dist/domain/core/invariant/violation.js +1 -1
- package/dist/domain/core/model/model.d.ts +1 -1
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/undo-system.d.ts +28 -1
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -0
- package/dist/domain/extensions/attribute-switch.d.ts +1 -1
- package/dist/domain/extensions/attribute-switch.js +1 -1
- package/dist/domain/extensions/canvas-config.d.ts +1 -1
- package/dist/domain/extensions/client-side-image.d.ts +2 -2
- package/dist/domain/extensions/client-side-image.js +1 -1
- package/dist/domain/extensions/common/angle-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/common/dimension-indicator-schema.d.ts +2 -2
- package/dist/domain/extensions/editable-angle-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-distance-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.d.ts +1 -1
- package/dist/domain/extensions/editable-offset-indicator.js +1 -1
- package/dist/domain/extensions/fit-selection-orthographic-camera-component.js +1 -1
- package/dist/domain/extensions/fit-selection-perspective-camera-component.js +1 -1
- package/dist/domain/extensions/horizontal-tabs.d.ts +2 -2
- package/dist/domain/extensions/list-selector-dimension-indicator.d.ts +1 -1
- package/dist/domain/extensions/navigation-steps.d.ts +2 -2
- package/dist/domain/extensions/offset-indicator.js +1 -1
- package/dist/domain/extensions/rotation-handle.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.d.ts +2 -2
- package/dist/domain/extensions/save-template-thumbnail.js +1 -1
- package/dist/domain/extensions/scene-entity-animation.js +1 -1
- package/dist/domain/system-components/application-config.d.ts +2 -2
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- 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/material-override-schema.d.ts +2 -2
- package/dist/domain/system-components/common/recipes.d.ts +21 -3
- package/dist/domain/system-components/common/recipes.js +1 -1
- 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/drag-handle.js +1 -1
- package/dist/domain/system-components/fit-entity-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-entity-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/fit-root-perspective-camera-component.js +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
- package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
- package/dist/domain/system-components/material-swatch.js +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/system-components/static-orthographic-camera-component.js +1 -1
- package/dist/domain/system-components/static-perspective-camera-component.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/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 +81 -68
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +7 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +2 -0
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/source-archive.d.ts +1 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +30 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -0
- package/dist/react-sdk/domain-context/index.d.ts +2 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-controls/hooks/use-angle-dimension.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/package.json +33 -29
- package/schema/domain-spec.json +1115 -209
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- /package/dist/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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single filter criterion — static value, dynamic `$read` reference, or
|
|
3
|
+
* inline `$eval` expression evaluated against `self` at runtime.
|
|
4
|
+
*
|
|
5
|
+
* The `target` field on the `'dynamic'` variant is a bare name (matches the
|
|
6
|
+
* same pattern as prop-level reads); codegen emits `self.target`, runtime
|
|
7
|
+
* reads `self[target]`.
|
|
8
|
+
*/
|
|
9
|
+
export type FilterCriterion<T> = {
|
|
10
|
+
readonly kind: 'static';
|
|
11
|
+
readonly value: T;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'dynamic';
|
|
14
|
+
readonly target: string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'eval';
|
|
17
|
+
readonly code: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Parsed component filter controlling when the component is active. Two
|
|
21
|
+
* mutually-exclusive shapes:
|
|
22
|
+
*
|
|
23
|
+
* - `'gradual'` — zero or more per-criterion fields; compiles to one entry per
|
|
24
|
+
* set key inside `.withGradualFilter({…})`. The preferred form.
|
|
25
|
+
* - `'root'` — the entire filter is a single `$read` at the root (legacy
|
|
26
|
+
* form `$filter: { $read: '$x' }`); compiles to `.withFilter(self => (self.target))`.
|
|
27
|
+
* Distinct codegen because the SDK's `withFilter` and `withGradualFilter`
|
|
28
|
+
* methods have different evaluation semantics (whole-closure vs per-key).
|
|
29
|
+
*
|
|
30
|
+
* See `components.md §"Simple expression filter"` / `§"Declarative filter"`.
|
|
31
|
+
*/
|
|
32
|
+
export type ComponentFilter = {
|
|
33
|
+
readonly kind: 'gradual';
|
|
34
|
+
readonly navigationStates?: FilterCriterion<readonly string[]>;
|
|
35
|
+
readonly viewStates?: FilterCriterion<readonly string[]>;
|
|
36
|
+
readonly toolStates?: FilterCriterion<readonly string[]>;
|
|
37
|
+
readonly exportStates?: FilterCriterion<readonly string[]>;
|
|
38
|
+
readonly modes?: FilterCriterion<readonly string[]>;
|
|
39
|
+
readonly roles?: FilterCriterion<readonly string[]>;
|
|
40
|
+
readonly selectedEntityIds?: FilterCriterion<unknown>;
|
|
41
|
+
readonly hoveredEntityIds?: FilterCriterion<unknown>;
|
|
42
|
+
readonly draggedEntityIds?: FilterCriterion<unknown>;
|
|
43
|
+
readonly exportedEntityIds?: FilterCriterion<unknown>;
|
|
44
|
+
readonly active?: FilterCriterion<boolean>;
|
|
45
|
+
readonly fullscreen?: FilterCriterion<boolean>;
|
|
46
|
+
readonly debug?: FilterCriterion<boolean>;
|
|
47
|
+
readonly viewports?: FilterCriterion<unknown>;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: 'root';
|
|
50
|
+
readonly target: string;
|
|
51
|
+
};
|
|
52
|
+
/** Criterion field names on the gradual variant — used for parse and iteration. */
|
|
53
|
+
export declare const FILTER_CRITERION_KEYS: readonly ["navigationStates", "viewStates", "toolStates", "exportStates", "modes", "roles", "selectedEntityIds", "hoveredEntityIds", "draggedEntityIds", "exportedEntityIds", "active", "fullscreen", "debug", "viewports"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const FILTER_CRITERION_KEYS=["navigationStates","viewStates","toolStates","exportStates","modes","roles","selectedEntityIds","hoveredEntityIds","draggedEntityIds","exportedEntityIds","active","fullscreen","debug","viewports"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./component-filter.js";export*from"./sdk-code-ref.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A parameter that should be emitted as an unquoted code reference in codegen
|
|
3
|
+
* (e.g. an entity reflection variable like `Top`).
|
|
4
|
+
* At runtime, the string value is resolved to the actual object (e.g. entity reflection).
|
|
5
|
+
*/
|
|
6
|
+
export interface SdkCodeRef {
|
|
7
|
+
readonly $codeRef: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const isSdkCodeRef: (value: unknown) => value is SdkCodeRef;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isSdkCodeRef=e=>"object"==typeof e&&null!==e&&"$codeRef"in e&&"string"==typeof e.$codeRef;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type EnhancedJsonSchemaType } from './enhanced-json-schema.js';
|
|
3
|
-
import type { EvalExpressionParser } from './eval-expression-parser.js';
|
|
4
2
|
import { type EvalMarker } from './markers/eval-marker.js';
|
|
5
3
|
import { type MsgMarker } from './markers/msg-marker.js';
|
|
6
|
-
import type { ParseContext } from './spec-diagnostic.js';
|
|
7
4
|
/**
|
|
8
5
|
* A JSON-serialisable value augmented with Phoenix structural markers:
|
|
9
6
|
* `$msg` (i18n) and `$eval` (self-scoped code).
|
|
@@ -81,68 +78,3 @@ export declare const isEnhancedJsonObject: (value: EnhancedJsonValue) => value i
|
|
|
81
78
|
* used for components).
|
|
82
79
|
*/
|
|
83
80
|
export declare const canonicalEnhancedJsonValueKey: (value: EnhancedJsonValue) => string;
|
|
84
|
-
/**
|
|
85
|
-
* Lowers an {@link EnhancedJsonValue} to its runtime form.
|
|
86
|
-
*
|
|
87
|
-
* - `$msg` → `{ id?, message }` i18n descriptor
|
|
88
|
-
* - `$eval` → `new Function('self', 'return (…)')` invoked with `self`
|
|
89
|
-
*
|
|
90
|
-
* Validates caps up front via {@link validateEnhancedJsonValueCaps}; any
|
|
91
|
-
* disallowed marker produces a parse diagnostic via `ctx.error(...)` and
|
|
92
|
-
* causes this function to return `undefined`. Non-marker values recurse
|
|
93
|
-
* (arrays, objects) or pass through (primitives).
|
|
94
|
-
*
|
|
95
|
-
* Note: a successful resolution may also return `undefined` legitimately
|
|
96
|
-
* (e.g. `$eval: 'self.missing'` evaluates to `undefined`). Callers that need
|
|
97
|
-
* to distinguish "capability violation" from "value is undefined" should
|
|
98
|
-
* check `ctx.hasErrors` after the call.
|
|
99
|
-
*/
|
|
100
|
-
export declare const resolveEnhancedJsonValue: (value: EnhancedJsonValue, self: SelfAccessor | undefined, caps: EnhancedJsonValueCaps, ctx: ParseContext) => unknown | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* Serializes an {@link EnhancedJsonValue} to a TypeScript literal, lowering
|
|
103
|
-
* markers:
|
|
104
|
-
*
|
|
105
|
-
* - `$msg` → `` msg`…` `` (or `msg({ id, message })` with `$msgId`); registers
|
|
106
|
-
* `msg` from `@lingui/core/macro` via the supplied {@link ImportSink}.
|
|
107
|
-
* - `$eval` → the code verbatim. Callers are responsible for deciding whether
|
|
108
|
-
* the emitted code belongs in a self-scoped wrapper.
|
|
109
|
-
*
|
|
110
|
-
* Validates caps up front; on any violation, emits a parse diagnostic via
|
|
111
|
-
* `ctx.error(...)` and returns `undefined`.
|
|
112
|
-
*/
|
|
113
|
-
export declare const stringifyEnhancedJsonValue: (value: EnhancedJsonValue, imports: ImportSink, caps: EnhancedJsonValueCaps, ctx: ParseContext) => string | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* Derives an `EnhancedJsonSchemaType` that describes the runtime shape of an
|
|
116
|
-
* {@link EnhancedJsonValue}. Used by `UserExpressions()` to synthesise an
|
|
117
|
-
* expression schema from a YAML value without leaking codegen-output paths
|
|
118
|
-
* into the spec layer.
|
|
119
|
-
*
|
|
120
|
-
* Primitives become `{ type }`. Arrays become JSON-Schema tuples. Objects
|
|
121
|
-
* become `{ type: 'object', properties, required, additionalProperties: false }`.
|
|
122
|
-
*
|
|
123
|
-
* Marker-aware branches:
|
|
124
|
-
* - `$msg` (with or without `$msgId`) → `{ $ref: 'phx:MessageDescriptor' }`, a ref to the
|
|
125
|
-
* phoenix definition that codegen resolves to the `MessageDescriptor` type emitted via `msg\`…\``.
|
|
126
|
-
* - `$eval` → when the code references `self`, returns `{}` (intentional
|
|
127
|
-
* "no static info" fallback — the value depends on runtime state).
|
|
128
|
-
* Otherwise the injected SWC parser and static folder infer literals,
|
|
129
|
-
* constant operators, and deterministic `Math` expressions without executing
|
|
130
|
-
* authored code. Anything else emits
|
|
131
|
-
* `ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE` and returns `undefined`.
|
|
132
|
-
*
|
|
133
|
-
* `$importRef` is intentionally unsupported at the value level; an object
|
|
134
|
-
* with that shape serializes structurally.
|
|
135
|
-
*/
|
|
136
|
-
export declare const schemaFromValue: (value: InferableValue, ctx: ParseContext, parseEvalExpression: EvalExpressionParser) => EnhancedJsonSchemaType | undefined;
|
|
137
|
-
/**
|
|
138
|
-
* Walks raw spec content and reports every legacy `$codeRef: { code: … }` block.
|
|
139
|
-
*
|
|
140
|
-
* That shape was documented as an inline static-math escape hatch but no parser stage ever
|
|
141
|
-
* evaluated it: it validates as an ordinary nested object and serializes verbatim, so a spec using
|
|
142
|
-
* it silently ships `{ "$codeRef": { "code": "4 * 25.4" } }` where the author expected a number.
|
|
143
|
-
* `$eval` now covers the use case, so the shape is rejected outright rather than left inert.
|
|
144
|
-
*
|
|
145
|
-
* Only the object form is reported. `{ $codeRef: <string> }` is a live internal codegen shape for
|
|
146
|
-
* SDK factory params (see `SdkCodeRef`), produced by the parser itself and never authored in YAML.
|
|
147
|
-
*/
|
|
148
|
-
export declare const validateNoLegacyCodeRef: (value: unknown, ctx: ParseContext) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";import{
|
|
1
|
+
import{z as e}from"zod";import{evalMarkerSchema as r,isEvalMarker as o}from"./markers/eval-marker.js";import{isMsgMarker as t,msgMarkerSchema as n}from"./markers/msg-marker.js";let s=e.object({$importRef:e.object({module:e.string(),member:e.string()}).strict()}).strict();export const isImportRefShaped=e=>s.safeParse(e).success;export const enhancedJsonValueSchema=e.lazy(()=>e.union([e.string(),e.number(),e.boolean(),e.null(),n,r,e.array(enhancedJsonValueSchema),e.record(e.string(),enhancedJsonValueSchema)]));export const CONSTANT_CAPS={selfScoped:!1,localizable:!0};export const isEnhancedJsonObject=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&!t(e)&&!o(e);export const canonicalEnhancedJsonValueKey=e=>{let r=e=>{if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(r);let o={};for(let t of Object.keys(e).sort())o[t]=r(e[t]);return o};return JSON.stringify(r(e))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./sdk-expression-implementation.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The relation factory's single positional param: the relation's kind, the entity type or alias it
|
|
3
|
+
* points to and its cardinality, plus the id field for `direct` and `indirect` relations. The
|
|
4
|
+
* assistant schema reads `target` and `cardinality` to type a relation edge.
|
|
5
|
+
*/
|
|
6
|
+
export interface RelationExpressionParams {
|
|
7
|
+
readonly kind: 'direct' | 'indirect' | 'allOfType';
|
|
8
|
+
readonly target: string;
|
|
9
|
+
readonly cardinality: '0-1' | '1-1' | '0-N' | '1-N';
|
|
10
|
+
readonly field?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RelationExpressionParams } from './relation-expression-params.js';
|
|
2
|
+
/**
|
|
3
|
+
* An expression implementation built by an SDK factory at runtime. The kind is the
|
|
4
|
+
* semantic source of the expression, declared by the section that generated it —
|
|
5
|
+
* codegen and runtime dispatch on it instead of inspecting factory-function names.
|
|
6
|
+
* - `relation`: generated from a `relations:` declaration
|
|
7
|
+
* - `violations`: generated from `invariants:` declarations (the `$violations` expression)
|
|
8
|
+
*/
|
|
9
|
+
export type SdkExpressionImplementation = {
|
|
10
|
+
readonly kind: 'relation';
|
|
11
|
+
readonly params: readonly [RelationExpressionParams];
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'violations';
|
|
14
|
+
readonly params: readonly unknown[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Narrows to implementations that are built by an SDK expression factory at runtime. It checks
|
|
18
|
+
* `kind` only, so it narrows to the members of the caller's own type that are SDK implementations,
|
|
19
|
+
* such as those of the parser's `ExpressionImplementation`, and never adds the `params` a value
|
|
20
|
+
* of another type does not have.
|
|
21
|
+
*/
|
|
22
|
+
export declare const isSdkExpressionImplementation: <IMPLEMENTATION extends {
|
|
23
|
+
readonly kind: string;
|
|
24
|
+
}>(implementation: IMPLEMENTATION) => implementation is Extract<IMPLEMENTATION, SdkExpressionImplementation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isSdkExpressionImplementation=i=>"relation"===i.kind||"violations"===i.kind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./application-file.js";export*from"./specification-files.js";export*from"./application-instance.js";export*from"./spec-diagnostic.js";export*from"./enhanced-json-schema.js";export*from"./enhanced-json-value.js";export*from"./eval-expression-parser.js";export*from"./json-schema.js";export*from"./json-value.js";export*from"./markers/index.js";export*from"./phoenix-definitions.js";export*from"./project-path.js";
|
|
1
|
+
export*from"./application-file.js";export*from"./components/index.js";export*from"./expressions/index.js";export*from"./specification-files.js";export*from"./application-instance.js";export*from"./spec-diagnostic.js";export*from"./enhanced-json-schema.js";export*from"./enhanced-json-value.js";export*from"./eval-expression-parser.js";export*from"./json-schema.js";export*from"./json-value.js";export*from"./markers/index.js";export*from"./phoenix-definitions.js";export*from"./project-path.js";
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* A plain JSON-serialisable value — no Phoenix markers, no functions, no
|
|
4
4
|
* symbols. Output shape of `$codeRef` evaluation and of
|
|
5
|
-
* {@link
|
|
5
|
+
* {@link ../enhanced-json/resolve-enhanced-json-value.ts} `resolveEnhancedJsonValue`. Pure subset of
|
|
6
6
|
* `EnhancedJsonValue`.
|
|
7
7
|
*/
|
|
8
8
|
export type JsonValue = string | number | boolean | null | JsonArray | JsonObject;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvalExpressionParser } from '
|
|
1
|
+
import type { EvalExpressionParser } from '../core/index.js';
|
|
2
2
|
type FoldedValue = string | number | boolean | null | undefined | readonly FoldedValue[] | {
|
|
3
3
|
readonly [key: string]: FoldedValue;
|
|
4
4
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { resolveEnhancedJsonValue } from './resolve-enhanced-json-value.js';
|
|
2
|
+
export { schemaFromValue } from './schema-from-value.js';
|
|
3
|
+
export { stringifyEnhancedJsonValue } from './stringify-enhanced-json-value.js';
|
|
4
|
+
export { validateNoLegacyCodeRef } from './validate-no-legacy-code-ref.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{resolveEnhancedJsonValue}from"./resolve-enhanced-json-value.js";export{schemaFromValue}from"./schema-from-value.js";export{stringifyEnhancedJsonValue}from"./stringify-enhanced-json-value.js";export{validateNoLegacyCodeRef}from"./validate-no-legacy-code-ref.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const isEnhancedJsonArray=r=>Array.isArray(r);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type EnhancedJsonValue, type EnhancedJsonValueCaps, type ParseContext, type SelfAccessor } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lowers an {@link EnhancedJsonValue} to its runtime form.
|
|
4
|
+
*
|
|
5
|
+
* - `$msg` → `{ id?, message }` i18n descriptor
|
|
6
|
+
* - `$eval` → `new Function('self', 'return (…)')` invoked with `self`
|
|
7
|
+
*
|
|
8
|
+
* Validates caps up front via {@link validateEnhancedJsonValueCaps}; any
|
|
9
|
+
* disallowed marker produces a parse diagnostic via `ctx.error(...)` and
|
|
10
|
+
* causes this function to return `undefined`. Non-marker values recurse
|
|
11
|
+
* (arrays, objects) or pass through (primitives).
|
|
12
|
+
*
|
|
13
|
+
* Note: a successful resolution may also return `undefined` legitimately
|
|
14
|
+
* (e.g. `$eval: 'self.missing'` evaluates to `undefined`). Callers that need
|
|
15
|
+
* to distinguish "capability violation" from "value is undefined" should
|
|
16
|
+
* check `ctx.hasErrors` after the call.
|
|
17
|
+
*/
|
|
18
|
+
export declare const resolveEnhancedJsonValue: (value: EnhancedJsonValue, self: SelfAccessor | undefined, caps: EnhancedJsonValueCaps, ctx: ParseContext) => unknown | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createMessageDescriptor as e,isEvalMarker as r,isMsgMarker as n}from"../core/index.js";import{isEnhancedJsonArray as t}from"./is-enhanced-json-array.js";import{validateEnhancedJsonValueCaps as o}from"./validate-enhanced-json-value-caps.js";let i=(o,a)=>{if(null===o||"object"!=typeof o)return o;if(n(o))return e(o);if(r(o))return Function("self",`return (${o.$eval})`)(a??{});if(t(o))return o.map(e=>i(e,a));let f={};for(let[e,r]of Object.entries(o))f[e]=i(r,a);return f};export const resolveEnhancedJsonValue=(e,r,n,t)=>{if(o(e,n,t))return i(e,r)};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type EnhancedJsonSchemaType, type EvalExpressionParser, type InferableValue, type ParseContext } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Derives an `EnhancedJsonSchemaType` that describes the runtime shape of an
|
|
4
|
+
* {@link EnhancedJsonValue}. Used by `UserExpressions()` to synthesise an
|
|
5
|
+
* expression schema from a YAML value without leaking codegen-output paths
|
|
6
|
+
* into the spec layer.
|
|
7
|
+
*
|
|
8
|
+
* Primitives become `{ type }`. Arrays become JSON-Schema tuples. Objects
|
|
9
|
+
* become `{ type: 'object', properties, required, additionalProperties: false }`.
|
|
10
|
+
*
|
|
11
|
+
* Marker-aware branches:
|
|
12
|
+
* - `$msg` (with or without `$msgId`) → `{ $ref: 'phx:MessageDescriptor' }`, a ref to the
|
|
13
|
+
* phoenix definition that codegen resolves to the `MessageDescriptor` type emitted via `msg\`…\``.
|
|
14
|
+
* - `$eval` → when the code references `self`, returns `{}` (intentional
|
|
15
|
+
* "no static info" fallback — the value depends on runtime state).
|
|
16
|
+
* Otherwise the injected SWC parser and static folder infer literals,
|
|
17
|
+
* constant operators, and deterministic `Math` expressions without executing
|
|
18
|
+
* authored code. Anything else emits
|
|
19
|
+
* `ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE` and returns `undefined`.
|
|
20
|
+
*
|
|
21
|
+
* `$importRef` is intentionally unsupported at the value level; an object
|
|
22
|
+
* with that shape serializes structurally.
|
|
23
|
+
*/
|
|
24
|
+
export declare const schemaFromValue: (value: InferableValue, ctx: ParseContext, parseEvalExpression: EvalExpressionParser) => EnhancedJsonSchemaType | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PHX_SHORT_PREFIX as e,isEvalMarker as r,isMsgMarker as t}from"../core/index.js";import{DiagnosticCode as o,diagnosticMessages as i}from"../errors/index.js";import{evalCodeUsesSelf as n}from"./eval-code-uses-self.js";import{evalToConstant as a}from"./eval-to-constant.js";export const schemaFromValue=(f,l,s)=>{if(t(f))return{$ref:`${e}MessageDescriptor`};if(r(f)){if(n(f.$eval))return{};let e=a(f.$eval,s);return e.ok?schemaFromValue(e.value,l,s):void l.error(o.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE,i[o.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE](f.$eval))}if(null===f)return{type:"null"};if("string"==typeof f)return{type:"string"};if("number"==typeof f)return{type:"number"};if("boolean"==typeof f)return{type:"boolean"};if(Array.isArray(f)){let e=[];for(let[r,t]of f.entries()){let o=schemaFromValue(t,l.at(String(r)),s);if(void 0===o)return;e.push(o)}return{type:"array",items:e}}if("object"==typeof f){let e=Object.entries(f),r={};for(let[t,o]of e){let e=schemaFromValue(o,l.at(t),s);if(void 0===e)return;r[t]=e}return{type:"object",properties:r,required:e.map(([e])=>e),additionalProperties:!1}}return{}};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type EnhancedJsonValue, type EnhancedJsonValueCaps, type ImportSink, type ParseContext } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Serializes an {@link EnhancedJsonValue} to a TypeScript literal, lowering
|
|
4
|
+
* markers:
|
|
5
|
+
*
|
|
6
|
+
* - `$msg` → `` msg`…` `` (or `msg({ id, message })` with `$msgId`); registers
|
|
7
|
+
* `msg` from `@lingui/core/macro` via the supplied {@link ImportSink}.
|
|
8
|
+
* - `$eval` → the code verbatim. Callers are responsible for deciding whether
|
|
9
|
+
* the emitted code belongs in a self-scoped wrapper.
|
|
10
|
+
*
|
|
11
|
+
* Validates caps up front; on any violation, emits a parse diagnostic via
|
|
12
|
+
* `ctx.error(...)` and returns `undefined`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const stringifyEnhancedJsonValue: (value: EnhancedJsonValue, imports: ImportSink, caps: EnhancedJsonValueCaps, ctx: ParseContext) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEvalMarker as e,isMsgMarker as r,stringifyMsgMacroCode as n}from"../core/index.js";import{validateEnhancedJsonValueCaps as i}from"./validate-enhanced-json-value-caps.js";let t="__ENHANCED_JSON_VALUE_PLACEHOLDER__",a=RegExp(`"${t}(\\d+)"`,"g");export const stringifyEnhancedJsonValue=(o,s,l,c)=>{if(!i(o,l,c))return;let d=[],g=e=>(d.push(e),`${t}${d.length-1}`);return JSON.stringify(o,(i,t)=>r(t)?(s.addImport("@lingui/core/macro","msg"),g(n(t))):e(t)?g(t.$eval):t,2).replaceAll(a,(e,r)=>{let n=d[Number(r)];if(void 0===n)throw Error(`stringifyEnhancedJsonValue: missing replacement for placeholder index ${r}. This is a logic bug in the serialiser — replacements array shorter than referenced index.`);return n})};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type EnhancedJsonValue, type EnhancedJsonValueCaps, type ParseContext } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walks an {@link EnhancedJsonValue} and emits a parse diagnostic for every
|
|
4
|
+
* `$msg` / `$eval` marker that violates the supplied caps. Returns `true` if
|
|
5
|
+
* no violation was found. Each diagnostic is scoped to the offending position
|
|
6
|
+
* via `ctx.at(...)` so users see the full path (e.g. `Table.color`).
|
|
7
|
+
*
|
|
8
|
+
* Called as the first step of {@link resolveEnhancedJsonValue} and
|
|
9
|
+
* {@link stringifyEnhancedJsonValue} — once this passes, the downstream
|
|
10
|
+
* recursion is free of capability checks and never throws for user input.
|
|
11
|
+
*/
|
|
12
|
+
export declare const validateEnhancedJsonValueCaps: (value: EnhancedJsonValue, caps: EnhancedJsonValueCaps, ctx: ParseContext) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEvalMarker as e,isMsgMarker as r}from"../core/index.js";import{DiagnosticCode as t,diagnosticMessages as n}from"../errors/index.js";import{isEnhancedJsonArray as o}from"./is-enhanced-json-array.js";export const validateEnhancedJsonValueCaps=(a,E,_)=>{if(r(a))return!!E.localizable||(_.error(t.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED,n[t.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED]()),!1);if(e(a))return!!E.selfScoped||(_.error(t.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED,n[t.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED]()),!1);if(null===a||"object"!=typeof a)return!0;if(o(a)){let e=!0;for(let[r,t]of a.entries())validateEnhancedJsonValueCaps(t,E,_.at(String(r)))||(e=!1);return e}let i=!0;for(let[e,r]of Object.entries(a))validateEnhancedJsonValueCaps(r,E,_.at(e))||(i=!1);return i};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParseContext } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Walks raw spec content and reports every legacy `$codeRef: { code: … }` block.
|
|
4
|
+
*
|
|
5
|
+
* That shape was documented as an inline static-math escape hatch but no parser stage ever
|
|
6
|
+
* evaluated it: it validates as an ordinary nested object and serializes verbatim, so a spec using
|
|
7
|
+
* it silently ships `{ "$codeRef": { "code": "4 * 25.4" } }` where the author expected a number.
|
|
8
|
+
* `$eval` now covers the use case, so the shape is rejected outright rather than left inert.
|
|
9
|
+
*
|
|
10
|
+
* Only the object form is reported. `{ $codeRef: <string> }` is a live internal codegen shape for
|
|
11
|
+
* SDK factory params (see `SdkCodeRef`), produced by the parser itself and never authored in YAML.
|
|
12
|
+
*/
|
|
13
|
+
export declare const validateNoLegacyCodeRef: (value: unknown, ctx: ParseContext) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DiagnosticCode as e,diagnosticMessages as o}from"../errors/index.js";export const validateNoLegacyCodeRef=(r,t)=>{if(null!==r&&"object"==typeof r){if(Array.isArray(r))return void r.forEach((e,o)=>validateNoLegacyCodeRef(e,t.at(String(o))));for(let[a,i]of Object.entries(r)){if("$codeRef"===a&&null!==i&&"object"==typeof i&&"code"in i){t.at(a).error(e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED,o[e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED]());continue}validateNoLegacyCodeRef(i,t.at(a))}}};
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Each group module documents the criterion that decides its membership, so a new template
|
|
12
12
|
* self-classifies into exactly one of them. This module owns only the aggregate and adds no files of
|
|
13
|
-
* its own: it concatenates the two application-file groups
|
|
14
|
-
* output, and spreads the scaffolding group's project-root
|
|
13
|
+
* its own: it concatenates the two application-file groups and the scaffolding group's `.phoenix`
|
|
14
|
+
* files, in that order, into the `.phoenix` output, and spreads the scaffolding group's project-root
|
|
15
|
+
* buckets alongside them.
|
|
15
16
|
*
|
|
16
17
|
* Generated projects always bind phx globally, so the aggregate selects `globalPhxBindingStrategy`.
|
|
17
18
|
* A module-scoped binding is only meaningful to a consumer calling the domain-runtime group on its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GeneratedApplication as o}from"../../core/index.js";import{generateDomainRuntimeFiles as e,globalPhxBindingStrategy as
|
|
1
|
+
import{GeneratedApplication as o}from"../../core/index.js";import{generateDomainRuntimeFiles as e,globalPhxBindingStrategy as r}from"./domain-runtime-files.js";import{generateProjectScaffolding as i}from"./project-scaffolding.js";import{generateStandaloneAppFiles as t}from"./standalone-app-files.js";export const generateApplicationCode=m=>{let{phoenixFiles:n,...p}=i(m);return o({files:[...e(m,r),...t(m),...n],...p})};
|
|
@@ -27,8 +27,9 @@ export declare const agentSkillRoots: readonly ['.claude/skills', '.agents/skill
|
|
|
27
27
|
* The SDK version pins the generated `package.json` dependency, `cliUseWorkspace` lets an explicit
|
|
28
28
|
* CLI flag override the spec's workspace mode, and the optional name and description populate the
|
|
29
29
|
* project metadata. The categorized files carry the project's existing `package.json` and `.gitignore`
|
|
30
|
-
* so those templates can merge rather than clobber,
|
|
31
|
-
* SDK block can be stripped from them.
|
|
30
|
+
* so those templates can merge rather than clobber, the legacy cursor rules and `CLAUDE.md` so the
|
|
31
|
+
* SDK block can be stripped from them, and whether the root `tsconfig.json` is the one earlier SDK
|
|
32
|
+
* versions generated, so it can be replaced.
|
|
32
33
|
*
|
|
33
34
|
* `projectInGitRepository` says whether the project folder is inside a git work tree. `.gitignore` is
|
|
34
35
|
* generated only then: a project that is not under git has no use for the file, and one it already
|
|
@@ -46,10 +47,13 @@ export interface GenerateProjectScaffoldingOptions {
|
|
|
46
47
|
readonly description?: string;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
|
-
* Project-root file buckets produced independently from the application runtime files
|
|
50
|
+
* Project-root file buckets produced independently from the application runtime files, and the
|
|
51
|
+
* project configuration that lives in `.phoenix/`.
|
|
50
52
|
*
|
|
51
53
|
* The buckets are kept apart because they carry different write intent, which the caching layer
|
|
52
|
-
* acts on: `
|
|
54
|
+
* acts on: `phoenixFiles` are paths relative to `.phoenix/` and join the application files there,
|
|
55
|
+
* rewritten whenever they differ and removed with the rest of the folder's stale output;
|
|
56
|
+
* `generatedProjectFiles` are content-diffed and rewritten whenever they differ,
|
|
53
57
|
* `initialProjectFiles` are written only when absent and are the project's to edit afterwards, and
|
|
54
58
|
* `prettierFiles` are separated so a writer can emit the formatting configuration ahead of the
|
|
55
59
|
* output it formats. `removedProjectFiles` lists project-relative paths of files earlier SDK versions
|
|
@@ -57,6 +61,7 @@ export interface GenerateProjectScaffoldingOptions {
|
|
|
57
61
|
* into, they express that intent without implementing the write behavior themselves.
|
|
58
62
|
*/
|
|
59
63
|
export interface GeneratedProjectScaffolding {
|
|
64
|
+
readonly phoenixFiles: readonly GeneratedApplicationFile[];
|
|
60
65
|
readonly generatedProjectFiles: readonly GeneratedApplicationFile[];
|
|
61
66
|
readonly initialProjectFiles: readonly GeneratedApplicationFile[];
|
|
62
67
|
readonly prettierFiles: readonly GeneratedApplicationFile[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as t,generateApplicationSpecEslintConfig as n,generateApplicationSpecFavicon as
|
|
1
|
+
import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as t,generateApplicationSpecEslintConfig as n,generateApplicationSpecFavicon as i,generateApplicationSpecGitignore as r,generateApplicationSpecNvmrc as o,generateApplicationSpecPackageJson as a,generateApplicationSpecPrettierConfig as s,generateApplicationSpecRobotsTxt as c,generateApplicationSpecRootTsconfig as l,generateApplicationSpecTsconfig as p,generateLinguiRcFile as f,generatePhoenixCliSkill as m,generatePhoenixCreateConfiguratorSkill as d,generatePhoenixCreateConfiguratorSkillReferences as g,generatePhoenixFeedbackSkill as j,generatePhoenixReviewSkill as u,generatePhoenixSkill as x,generatePhoenixVariantsSkill as h,stripSdkMarkerContent as F}from"./templates/index.js";export const agentSkillRoots=[".claude/skills",".agents/skills"];let P=[{path:"CLAUDE.md",generatedPrefix:""},{path:".cursor/rules/phoenix.mdc",generatedPrefix:`---
|
|
2
2
|
description: Phoenix SDK project rules
|
|
3
3
|
globs:
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
---
|
|
6
|
-
`}],
|
|
6
|
+
`}],v=[".claude/commands/review.md",".cursor/commands/review.md"],k=(e,t)=>e.projectFiles.find(e=>e.file.name===t)?.file.content;export const generateProjectScaffolding=b=>{let w,C,{applicationSpec:L,categorizedFiles:S,sdkVersion:$,projectInGitRepository:y=!0,cliUseWorkspace:M,name:A,description:D}=b,E=k(S,"package.json"),K=k(S,".gitignore"),R=void 0!==M?M:L.appMetadata.workspace,G=(t=>{let n=[],i=[...v];for(let{path:r,generatedPrefix:o}of P){let a=k(t,r);if(void 0===a)continue;let s=F(a,o);void 0===s?i.push(r):s!==a&&n.push(e(r,s,{format:!1}))}return{strippedFiles:n,removedFiles:i}})(S),I=(w=e("tsconfig.json",l()),S.hasEarlierGeneratedTsconfig?{generatedProjectFiles:[w],initialProjectFiles:[]}:{generatedProjectFiles:[],initialProjectFiles:[w]});return{phoenixFiles:[e("tsconfig.json",p())],generatedProjectFiles:[e("package.json",a({sdkVersion:$,useWorkspace:R,useClerk:L.appMetadata.useClerk??!1,name:A,description:D,existingContent:E})),e(".nvmrc",o(),{format:!1}),e(".linguirc",f(L.configurator.ui.availableLocales),{format:!1}),...I.generatedProjectFiles,e("eslint.config.js",n()),...y?[e(".gitignore",r(K))]:[],...(C=[{name:"phoenix",content:x({checkLatestCanary:t({useWorkspace:R,sdkVersion:$})}),references:[]},{name:"phoenix-cli",content:m(),references:[]},{name:"phoenix-create-configurator",content:d(),references:g()},{name:"phoenix-feedback",content:j(),references:[]},{name:"phoenix-review",content:u(),references:[]},{name:"phoenix-variants",content:h(),references:[]}],agentSkillRoots.flatMap(t=>C.flatMap(n=>[e(`${t}/${n.name}/SKILL.md`,n.content),...n.references.map(i=>e(`${t}/${n.name}/${i.path}`,i.content))]))),...G.strippedFiles],initialProjectFiles:[...I.initialProjectFiles,e("public/favicon.ico",i(),{binary:!0}),e("public/robots.txt",c(),{format:!1})],prettierFiles:[e("prettier.config.js",s())],removedProjectFiles:G.removedFiles}};
|
|
@@ -18,8 +18,8 @@ import type { ApplicationSpec, CategorizedFiles, RawMockTemplates } from '../../
|
|
|
18
18
|
* The project and environment slugs address the deployed environment the embedding bootstraps talk
|
|
19
19
|
* to, and `enableEditor` together with `inlineTemplates` and the raw mock templates decide whether
|
|
20
20
|
* and how the optional editor entry point is emitted. The categorized files are needed only to find
|
|
21
|
-
* the authored handlers that are implicitly registered or explicitly pinned into the webhook,
|
|
22
|
-
* to bind the runtime.
|
|
21
|
+
* the authored handlers that are implicitly registered or explicitly pinned into the webhook, and
|
|
22
|
+
* to read whether the project has its own webhook entry, not to bind the runtime.
|
|
23
23
|
*/
|
|
24
24
|
export interface GenerateStandaloneAppFilesOptions {
|
|
25
25
|
readonly applicationSpec: ApplicationSpec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GeneratedApplicationFile as e}from"../../core/index.js";import{generateApplicationSpecAdminConfig as t,generateApplicationSpecAdminFile as a,generateApplicationSpecConfiguratorFile as o,generateApplicationSpecEditorFile as n,generateApplicationSpecEmbeddedAdmin as
|
|
1
|
+
import{GeneratedApplicationFile as e}from"../../core/index.js";import{generateApplicationSpecAdminConfig as t,generateApplicationSpecAdminFile as a,generateApplicationSpecConfiguratorFile as o,generateApplicationSpecEditorFile as n,generateApplicationSpecEmbeddedAdmin as s,generateApplicationSpecEmbeddedConfigurator as d,generateApplicationSpecFrontendConfig as p,generateApplicationSpecHtmlAdminIndex as i,generateApplicationSpecHtmlIndex as r,generateApplicationSpecWebhookBuilders as m,generateApplicationSpecWebhookIndex as b,generateApplicationSpecWebhooksConfig as l}from"./templates/index.js";import{getWebhookHandlerFileNames as f}from"./webhook-safe-files.js";export const generateStandaloneAppFiles=g=>{let{applicationSpec:h,categorizedFiles:c,projectSlug:w,environmentSlug:k,enableEditor:x,inlineTemplates:M,rawMockTemplates:T}=g,u=T.templates,j=f(c.handlers);return[e("index.html",r(h.appMetadata.webComponentTag,x,h.appMetadata.pageTitle)),e("configurator.ts",o(h.appMetadata.webComponentTag)),e("admin.html",i(h.appMetadata.pageTitle)),e("admin.ts",a()),e("admin-config.ts",t()),e("frontend.config.ts",p(h)),e("webhooks.config.ts",l(h)),e("webhook.ts",b({hasWebhookEntry:c.hasWebhookEntry})),e("webhook-builders.ts",m(h,j)),e("embedded-admin.ts",s(w,k)),e("embedded-configurator.ts",d(w,k)),...x?[e("editor.tsx",n(h.appMetadata.webComponentTag,M,u,k))]:[]]};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{autoHeader as e}from"../common/file-headers.js";export const generateApplicationSpecConfiguratorConfig=(o
|
|
1
|
+
import{autoHeader as e}from"../common/file-headers.js";export const generateApplicationSpecConfiguratorConfig=(t,o)=>{let n=t.configurator.transformers,r=o?.includeDefaultEnvs===!1?"":`
|
|
2
2
|
.withDefaultEnvs({
|
|
3
3
|
isDev: phx.frontendEnv.IS_DEV,
|
|
4
4
|
deploymentId: phx.frontendEnv.DEPLOYMENT_ID,
|
|
@@ -13,6 +13,7 @@ import{autoHeader as e}from"../common/file-headers.js";export const generateAppl
|
|
|
13
13
|
gtmDebug: phx.frontendEnv.GTM_DEBUG,
|
|
14
14
|
})`;return`${e("configurator-config.ts","Configurator config — builds the interface and wires handlers, elements, transformers, components and theme.")}
|
|
15
15
|
import { getPhoenixThemes } from '@salsita-ai/sdk/ui'
|
|
16
|
+
import { defaultConfiguratorElements } from '@salsita-ai/sdk/configurator'
|
|
16
17
|
|
|
17
18
|
// Import order matters — each step sets globals needed by the next:
|
|
18
19
|
// 1. domain.js → domain-spec.ts runs → sets phx.domain
|
|
@@ -28,9 +29,10 @@ export const configuratorConfig = configuratorBuilder
|
|
|
28
29
|
.withComponentOptics(customComponentOptics)
|
|
29
30
|
.withComponentOptics(customFrontendComponentOptics)
|
|
30
31
|
.withHandlers(customHandlers)
|
|
32
|
+
.withDefaultElements(defaultConfiguratorElements)
|
|
31
33
|
.withElements(customElements)
|
|
32
|
-
.withTransformers(customTransformers, ${JSON.stringify(
|
|
33
|
-
${(e=>{let{theme:
|
|
34
|
-
.withUi({ ${
|
|
34
|
+
.withTransformers(customTransformers, ${JSON.stringify(n)})${r}
|
|
35
|
+
${(e=>{let{theme:t}=e.configurator;return Object.keys(t.options).length>0?`.withTheme({ ...getPhoenixThemes().${t.preset}, ...${JSON.stringify(t.options)} })`:`.withTheme(getPhoenixThemes().${t.preset})`})(t)}${(e=>{let{ui:t}=e.configurator,o=[];return(void 0!==t.preview&&o.push(`preview: '${t.preview}'`),void 0!==t.alwaysExpand&&o.push(`alwaysExpand: ${t.alwaysExpand}`),void 0!==t.appLoader&&o.push(`appLoader: '${t.appLoader}'`),0===o.length)?"":`
|
|
36
|
+
.withUi({ ${o.join(", ")} })`})(t)}${!t.appMetadata.enableAdminRelease?"":`
|
|
35
37
|
.withAdminRelease(true)`}
|
|
36
38
|
`};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{match as e}from"ts-pattern";import{isSdkCodeRef as t}from"../../../../
|
|
2
|
-
${l}`);o.push(`${
|
|
1
|
+
import{match as e}from"ts-pattern";import{isSdkCodeRef as t}from"../../../../core/index.js";import{generateMemoEvalPlanCode as i}from"./generate-memo-eval-plan-code.js";let a="@salsita-ai/sdk/domain",r={createAdminCustomPageRead:a,createAdminCustomSidebarRead:a,createAdminDataPageRead:a,createAdminDataTableSidebarRead:a,createAdminNavigationPanelRead:a,createAdminPresetCategoryPageRead:a,createAdminPresetCategorySelectionRead:a,createAdminPresetCategorySelectionWrite:a,createAdminPresetCategorySidebarRead:a,createAdminPresetListPageRead:a,createAdminPresetSidebarRead:a,createAdminRecipeCollectionPageRead:a,createAdminRecipeSidebarRead:a},n=(e,i)=>{i.addImport(r[e.sdkFunction]??a,e.sdkFunction);let n=e.params.map(e=>t(e)?e.$codeRef:"string"==typeof e?`'${e}'`:JSON.stringify(e));return`${e.sdkFunction}(${n.join(", ")})`},d=e=>0===e.length?"":e.map(e=>{if("root"===e.kind)return`.withFilter(self => (self.${e.target}))`;let t=Object.entries(e).filter(([e,t])=>"kind"!==e&&void 0!==t).map(([e,t])=>`${e}: ${"dynamic"===t.kind?`self => (self.${t.target})`:"eval"===t.kind?`self => (${t.code})`:JSON.stringify(t.value)}`);return`.withGradualFilter({ ${t.join(", ")} })`}).join(""),o=(t,i)=>e(t).with({kind:"primitive"},({assertFn:e})=>`typeof ${i} === '${"assertNumber"===e?"number":"assertBoolean"===e?"boolean":"string"}'`).with({kind:"declaredType"},({typeName:e})=>`${e}.is(${i})`).with({kind:"declaredTypeId"},({referencedType:e})=>`${e}.isId(${i})`).with({kind:"literal"},({value:e})=>`${i} === ${JSON.stringify(e)}`).with({kind:"anyOf"},({assertions:e})=>e.map(e=>`(${o(e,i)})`).join(" || ")).with({kind:"none"},()=>"true").exhaustive(),s=(t,i)=>{if(0===t.length)return"() => ({})";let r=t.map(t=>e(t.assertion).with({kind:"primitive"},({assertFn:e})=>(i.addImport(a,e),`${e}(state.${t.propKey})`)).with({kind:"declaredType"},({typeName:e})=>`${e}.assert(state.${t.propKey})`).with({kind:"declaredTypeId"},({referencedType:e})=>`${e}.assertId(state.${t.propKey})`).with({kind:"literal"},e=>{let i=o(e,`state.${t.propKey}`);return`if (!(${i})) throw new Error('Expected ${t.propKey} to match its declared schema')`}).with({kind:"anyOf"},e=>{let i=o(e,`state.${t.propKey}`);return`if (!(${i})) throw new Error('Expected ${t.propKey} to match one of its declared schemas')`}).with({kind:"none"},()=>void 0).exhaustive()).filter(e=>void 0!==e),n=t.map(e=>`${JSON.stringify(e.entityField)}: state.${e.propKey}`).join(", ");return 0===r.length?`(state) => ({ ${n} })`:`(state) => { ${r.join("; ")}; return { ${n} } }`},l=" ";export const generateComponentOpticsCode=(t,r)=>{let o=[];for(let m of t){let t=m.isAlias?"withAlias":"withEntity",p=`${m.componentName}Component`;r.addImport(a,p);let $=` attachComponent.withComponent(${p}, '${m.instanceName}', true).${t}('${m.typeOrAlias}')`;e(m.implementation).with({kind:"userBound"},({implementation:e,filters:t,plan:a})=>{let n=d(t.items),m=`${$}${n}`,p=s("composite"===e.kind?e.writeBindings:[],r),c=i(a,r).replaceAll("\n",`
|
|
2
|
+
${l}`);o.push(`${m}.attach(
|
|
3
3
|
${l}${c},
|
|
4
|
-
${l}${
|
|
5
|
-
)`)}).with({kind:"sdk"},({readFactory:e,writeFactory:t})=>{let i=d(
|
|
4
|
+
${l}${p}
|
|
5
|
+
)`)}).with({kind:"sdk"},({readFactory:e,writeFactory:t})=>{let i=d(m.implementation.filters.items),a=`${$}${i}`,s=n(e,r),l=n(t,r);o.push(`${a}.attach(
|
|
6
6
|
${s},
|
|
7
7
|
${l}
|
|
8
8
|
)`)}).exhaustive()}return 0===o.length?"[] as const":`[
|
package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONSTANT_CAPS as e,ParseContext as t
|
|
1
|
+
import{CONSTANT_CAPS as e,ParseContext as t}from"../../../../core/index.js";import{stringifyEnhancedJsonValue as n}from"../../../../enhanced-json/index.js";export const generateDefaultsBlock=(r,o)=>{let s=new t,a=n({...r.entries},o,e,s);if(void 0===a){let e=s.errors.map(e=>`${e.code}: ${e.message}`).join("; ");throw Error(`generateDefaultsBlock: stringifyEnhancedJsonValue returned undefined. Parse-time capability validation should have caught this — caps: CONSTANT_CAPS. ${e}`)}return`const defaults = ${a} as const`};
|
|
@@ -53,9 +53,8 @@ phoenix-api.yaml
|
|
|
53
53
|
phoenix.config.ts
|
|
54
54
|
prettier.config.js
|
|
55
55
|
eslint.config.js
|
|
56
|
-
tsconfig.json
|
|
57
56
|
.prettierignore
|
|
58
57
|
.linguirc
|
|
59
58
|
public/robots.txt
|
|
60
59
|
${gitignoreEndMarker}
|
|
61
|
-
`;export const generateApplicationSpecGitignore=t=>{if(!t)return e;let
|
|
60
|
+
`;export const generateApplicationSpecGitignore=t=>{if(!t)return e;let i=t.includes("\r\n")?"\r\n":"\n",n=t.replace(/\r?\n/g,i),r=e.replace(/\r?\n/g,i),o=n.indexOf(gitignoreStartMarker),s=n.indexOf(gitignoreEndMarker);if(-1!==o&&-1!==s&&s>o){let e=n.substring(0,o),t=n.substring(s+gitignoreEndMarker.length);return(t=t.replace(/^(?:\r?\n)+/,"")).trim().length>0?e+r+i+t:e+r}return n.trim()?r+`${i}# Custom entries${i}`+n:r};
|
|
@@ -47,9 +47,9 @@ export { type PhoenixSkillOptions, followsCanaryBuilds, generatePhoenixSkill } f
|
|
|
47
47
|
export { generatePhoenixVariantsSkill } from './skills/phoenix-variants-skill.js';
|
|
48
48
|
export { generateApplicationSpecPrettierConfig } from './prettier-config.js';
|
|
49
49
|
export { generateApplicationSpecRobotsTxt } from './robots-txt.js';
|
|
50
|
+
export { generateApplicationSpecRootTsconfig } from './root-tsconfig.js';
|
|
50
51
|
export { generateApplicationSpecStoryDevDeclaration, generateApplicationSpecStoryPhxModule, generateApplicationSpecStoryRawProjectFiles, generateApplicationSpecStoryWrapper, } from './story/index.js';
|
|
51
52
|
export { generateApplicationSpecTsconfig } from './tsconfig.js';
|
|
52
53
|
export { generateApplicationSpecWebhookBuilders } from './webhook-builders.js';
|
|
53
|
-
export { generateApplicationSpecWebhookImplementation } from './webhook-implementation.js';
|
|
54
54
|
export { generateApplicationSpecWebhookIndex } from './webhook-index.js';
|
|
55
55
|
export { generateApplicationSpecWebhooksConfig } from './webhooks-config.js';
|