@salsita-ai/sdk 0.50.0-develop.9feae4851f → 0.50.0-develop.a4dde5f252
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 +2 -2
- package/dist/admin/create-admin-pages-from-spec.d.ts +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +36 -36
- 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.js +1 -1
- package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -6
- 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/sdk-content.d.ts +10 -12
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +6 -8
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/client/phoenix-api.d.ts +5 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +34 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +33 -6
- package/dist/docs/phoenix/expression-context.mdx +11 -3
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +17 -26
- package/dist/docs/phoenix/project-structure.mdx +5 -3
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +1 -1
- package/dist/docs/ux-guidelines/choosing-a-control.mdx +11 -0
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +10 -10
- package/dist/domain/admin-domain/index.d.ts +7 -2
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
- 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 +3 -24
- package/dist/domain/application/assistant-mutations.d.ts +2 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +1 -2
- package/dist/domain/application/index.d.ts +1 -4
- 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 +2 -2
- package/dist/domain/application/published-data/validate-sheet-data.d.ts +1 -1
- package/dist/domain/core/action/action-factory.d.ts +2 -2
- package/dist/domain/core/action/action.d.ts +19 -14
- package/dist/domain/core/component/domain-component-optic.d.ts +30 -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 +23 -18
- package/dist/domain/core/data-schema/data-cell-value.d.ts +4 -0
- package/dist/domain/core/data-schema/data-cell-value.js +1 -0
- package/dist/domain/core/data-schema/data-schema-array-field.d.ts +5 -0
- package/dist/domain/core/data-schema/data-schema-array-field.js +1 -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.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 +2 -2
- package/dist/domain/core/expression/constant-expressions.d.ts +2 -2
- package/dist/domain/core/expression/constant-expressions.js +1 -1
- package/dist/domain/core/expression/custom-expression.d.ts +6 -6
- package/dist/domain/core/expression/custom-expression.js +1 -1
- package/dist/domain/core/expression/expression.d.ts +15 -17
- package/dist/domain/core/index.d.ts +2 -0
- package/dist/domain/core/invariant/custom-invariants.d.ts +5 -5
- package/dist/domain/core/invariant/index.d.ts +1 -1
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/core/invariant/invariants.d.ts +4 -67
- package/dist/domain/core/invariant/invariants.js +1 -1
- package/dist/domain/core/invariant/violation.d.ts +1 -1
- package/dist/domain/core/relation/reference-component.d.ts +2 -2
- package/dist/domain/core/state/migrations.d.ts +14 -45
- package/dist/domain/core/state/migrations.js +1 -1
- package/dist/domain/domain-builder.d.ts +1 -1
- 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 +2 -2
- 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 -17
- 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 +1 -1
- 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/create-entity-refs.d.ts +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/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 -35
- 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 -3
- package/dist/domain/domain-context/transformers/context.js +1 -1
- 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/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/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 +5 -10
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +52 -52
- package/dist/domain/domain-runtime/spec/index.d.ts +2 -0
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +26 -0
- package/dist/domain/domain-runtime/spec/invariant-builder.js +1 -0
- 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 +0 -16
- 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/{application → domain-runtime/spec/module-checks}/resolve-imported-transformers.d.ts +4 -5
- 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/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/index.d.ts +0 -1
- package/dist/domain/index.js +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 +10 -10
- package/dist/domain/projections/blender-projections/blender-projections.d.ts +1 -2
- package/dist/domain/projections/blender-projections/camera.d.ts +1 -1
- package/dist/domain/projections/collision-projections.d.ts +1 -1
- package/dist/domain/projections/composition-projections.d.ts +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 -19
- package/dist/domain/sketching/sketching-projections.d.ts +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/utils/memo-eval.d.ts +2 -2
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +5 -3
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +1 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +4 -4
- 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/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +20 -20
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -5
- package/package.json +3 -3
- 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 -94
- 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/application/element-registration.js +0 -1
- package/dist/domain/application/handler-registration.js +0 -1
- package/dist/domain/application/resolve-imported-transformers.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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AnyActionImplementations } from '../../../core/index.js';
|
|
2
|
+
import { type ProjectModule } from './project-modules.js';
|
|
3
|
+
/** Validates the `src/actions/` files and merges their implementations by action name; a later file wins. */
|
|
4
|
+
export declare const resolveActionModules: (modules: readonly ProjectModule[]) => AnyActionImplementations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,createContractError as t,isRecord as o}from"./project-modules.js";let i={expected:"an object of action implementations keyed by action name",fix:`Create it with phx.domain.implementActions({ ... }), ${e}.`},n=e=>"function"==typeof e;export const resolveActionModules=e=>e.reduce((e,r)=>{let c;if(!(o(c=r.exports)&&Object.values(c).every(n)))throw t(r.origin,i,r.exports);return{...e,...r.exports}},{});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AnyDomainComponentOptic } from '../../../core/index.js';
|
|
2
|
+
import { type ProjectModule } from './project-modules.js';
|
|
3
|
+
/** Validates the `src/components/` files, or the optics a generated file lists, and flattens them. */
|
|
4
|
+
export declare const resolveComponentOpticModules: (modules: readonly ProjectModule[]) => readonly AnyDomainComponentOptic[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as t,isRecord as e,resolveListModule as n}from"./project-modules.js";let o={expected:"an attached component, or an array of them",fix:`Create it with phx.domain.attachComponent(...) (phx.domain.admin.attachComponent(...) under src/admin/), ${t}.`},a=t=>e(t)&&("simple"===t.kind||"dynamic"===t.kind)&&"string"==typeof t.instanceName&&"function"==typeof t.read;export const resolveComponentOpticModules=t=>t.flatMap(t=>n(t,o,a));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnonymousExpression } from '../../../core/index.js';
|
|
2
|
+
import { type ProjectModule } from './project-modules.js';
|
|
3
|
+
/** The expressions of one validated expression file, keyed by entity type or alias, then by expression name. */
|
|
4
|
+
export interface ExpressionModule {
|
|
5
|
+
readonly origin: string;
|
|
6
|
+
readonly expressions: Readonly<Record<string, Readonly<Record<string, AnyAnonymousExpression>>>>;
|
|
7
|
+
}
|
|
8
|
+
type AnyAnonymousExpression = AnonymousExpression<any, any, any, any, any, any, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Validates the `src/expressions/` files and rejects an expression that two files define for the
|
|
11
|
+
* same entity type. Merging stays with the caller, because the domain builder and the editor expand
|
|
12
|
+
* aliases at different points; within one file the builder's own duplicate check applies.
|
|
13
|
+
*/
|
|
14
|
+
export declare const resolveExpressionModules: (modules: readonly ProjectModule[], aliasMap: Readonly<Record<string, readonly string[]>>) => readonly ExpressionModule[];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,createContractError as o,isRecord as t}from"./project-modules.js";let i={expected:"an object of expressions keyed by entity type or alias, then by expression name",fix:`Create it with phx.domain.implementCustomExpressions({ ... }) (phx.domain.admin.implementCustomExpressions({ ... }) under src/admin/), ${e}.`},r=e=>t(e)&&"function"==typeof e.evaluate,n=e=>t(e)&&Object.values(e).every(r);export const resolveExpressionModules=(e,r)=>{let s=new Map;return e.map(e=>{let p;if(!(t(p=e.exports)&&Object.values(p).every(n)))throw o(e.origin,i,e.exports);for(let[o,t]of Object.entries(e.exports))for(let i of r[o]??[o])for(let o of Object.keys(t)){let t=`${i}.${o}`,r=s.get(t);if(void 0!==r&&r!==e.origin)throw Error(`Duplicate expression ${t}: it is defined in both ${r} and ${e.origin}, which would make its value depend on file order. Keep one definition and remove the other.`);s.set(t,e.origin)}return{origin:e.origin,expressions:e.exports}})};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { Transformers } from '
|
|
4
|
-
import { type ProjectModule } from '
|
|
5
|
-
import type { ImportedTransformer, SpecTransformer } from './application-config.js';
|
|
1
|
+
import type { ImportedTransformer, SpecTransformer } from '../../../application/index.js';
|
|
2
|
+
import type { $DomainEntity, DomainEntity } from '../../../core/index.js';
|
|
3
|
+
import type { DomainContextSystems, Transformers } from '../../../domain-context/index.js';
|
|
4
|
+
import { type ProjectModule } from './project-modules.js';
|
|
6
5
|
type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
|
|
7
6
|
/**
|
|
8
7
|
* The transformer of one `src/transformers/` file, named after the file. The spec's `transformers` section
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as r,createContractError as e,isRecord as t}from"./project-modules.js";let o={expected:"a transformer (a function of the domain context, or an object with a register method), or an array of them",fix:`Create it with phx.frontend.transformerBuilder, ${r}.`},n=r=>"function"==typeof r||t(r)&&"function"==typeof r.register;export const resolveTransformerModule=r=>{let t;if(!(Array.isArray(t=r.exports)?t.every(n):n(t)))throw e(r.origin,o,r.exports);return{name:r.origin.replace(/^.*\//,"").replace(/\.tsx?$/,""),transformer:r.exports}};export const resolveTransformerModules=r=>r.map(resolveTransformerModule);export const resolveImportedTransformers=(r,e,t)=>{let o=r.flatMap(({name:r,transformer:e})=>{if(Array.isArray(e))return e.map((e,o)=>{if("register"in e)return e.register(t);if("function"==typeof e)return{priority:1/0,transformer:e(t),name:`${r}[${o}]`};throw Error(`Transformer '${r}[${o}]' must be either a RegistrableTransformer (with register method) or a TransformerFactory (function)`)});if("register"in e)return e.register(t);if("function"==typeof e)return{priority:1/0,transformer:e(t),name:r};throw Error(`Transformer '${r}' must be either a RegistrableTransformer (with register method) or a TransformerFactory (function)`)}),n=[];for(let r of e){let e=o.find(e=>e.name===r.name);if(!e){let e=o.map(r=>r.name).filter(Boolean).join(", ");throw Error(`Transformer '${r.name}' not found in imported transformer files. Available transformers: ${e||"none"}`)}n.push({priority:r.priority??1/0,transformer:e.transformer,name:r.name})}return n};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Invariant } from '../../../core/index.js';
|
|
2
|
+
import { type ProjectModule } from './project-modules.js';
|
|
3
|
+
type AnyInvariant = Invariant<any, any, any, any, any, any, string>;
|
|
4
|
+
/** Validates the `src/invariants/` files and concatenates their invariants per entity type or alias. */
|
|
5
|
+
export declare const resolveInvariantModules: (modules: readonly ProjectModule[]) => Readonly<Record<string, readonly AnyInvariant[]>>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,createContractError as t,isRecord as r}from"./project-modules.js";let o={expected:"an object of invariant lists keyed by entity type or alias",fix:`Create it with phx.domain.implementCustomInvariants({ ... }) (phx.domain.admin.implementCustomInvariants({ ... }) under src/admin/), ${e}.`},i=e=>r(e)&&"function"==typeof e.evaluate,n=e=>r(e)&&Object.values(e).every(e=>Array.isArray(e)&&e.every(i));export const resolveInvariantModules=e=>{let r={};for(let i of e){if(!n(i.exports))throw t(i.origin,o,i.exports);for(let[e,t]of Object.entries(i.exports))r[e]=[...r[e]??[],...t]}return r};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type { PhoenixHandlerDefinition, SystemPhoenixAsyncHandlerDefinition, SystemPhoenixHandlerDefinition } from '../../application/handler-registration.js';
|
|
2
|
+
import { type CustomPhoenixEntityElementProps, type PhoenixHandlerDefinition, type SystemPhoenixAsyncHandlerDefinition, type SystemPhoenixHandlerDefinition } from './module-checks/index.js';
|
|
4
3
|
import type { ApplicationSpec } from './types.js';
|
|
5
4
|
/**
|
|
6
5
|
* Structural slice of the runtime state the spec selectors read. The selectors are keyed on this
|
|
@@ -35,7 +34,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
35
34
|
selectPrefetchTextureUrls: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly string[]>;
|
|
36
35
|
selectTextLanguages: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly string[]>;
|
|
37
36
|
selectHandlerHashes: import("@salsita-ai/common/utils").Selector<SpecSelectorState, Record<string, string>>;
|
|
38
|
-
selectHandlers: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly import("
|
|
37
|
+
selectHandlers: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly import("./index.js").HandlerRegistration<any, any>[]>;
|
|
39
38
|
selectHandlerSlots: import("@salsita-ai/common/utils").Selector<SpecSelectorState, {
|
|
40
39
|
handlers: Record<string, () => PhoenixHandlerDefinition>;
|
|
41
40
|
systemHandlers: Record<string, () => SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
@@ -43,7 +42,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
43
42
|
hashes: Record<string, string>;
|
|
44
43
|
}>;
|
|
45
44
|
selectElementHashes: import("@salsita-ai/common/utils").Selector<SpecSelectorState, Record<string, string>>;
|
|
46
|
-
selectElements: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly import("
|
|
45
|
+
selectElements: import("@salsita-ai/common/utils").Selector<SpecSelectorState, readonly import("./index.js").ElementRegistration[]>;
|
|
47
46
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<SpecSelectorState, {
|
|
48
47
|
entityElements: Record<string, (props: CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
49
48
|
layoutElements: Record<string, (props: PropsWithChildren) => JSX.Element>;
|
|
@@ -78,7 +77,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
78
77
|
getPrefetchTextureUrls: () => readonly string[];
|
|
79
78
|
getTextLanguages: () => readonly string[];
|
|
80
79
|
getHandlerHashes: () => Record<string, string>;
|
|
81
|
-
getHandlers: () => readonly import("
|
|
80
|
+
getHandlers: () => readonly import("./index.js").HandlerRegistration<any, any>[];
|
|
82
81
|
getHandlerSlots: () => {
|
|
83
82
|
handlers: Record<string, () => PhoenixHandlerDefinition>;
|
|
84
83
|
systemHandlers: Record<string, () => SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
@@ -86,7 +85,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
86
85
|
hashes: Record<string, string>;
|
|
87
86
|
};
|
|
88
87
|
getElementHashes: () => Record<string, string>;
|
|
89
|
-
getElements: () => readonly import("
|
|
88
|
+
getElements: () => readonly import("./index.js").ElementRegistration[];
|
|
90
89
|
getElementSlots: () => {
|
|
91
90
|
entityElements: Record<string, (props: CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
92
91
|
layoutElements: Record<string, (props: PropsWithChildren) => JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";import{systemElementRegistry as n}from"
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";import{systemElementRegistry as n}from"./module-checks/index.js";export const createSpecSelectors=a=>{let{getState:s}=a,r=e.withTypes(),o=r([r.leaf(e=>e.spec)],e=>e),l=r([o],e=>e.version),i=r([o],e=>e.baseResourcesUrl),m=r([o],e=>e.configurator),g=r([o],e=>e.dataConfig),p=r([o],e=>e.chunks),d=r([o],e=>e.publishedDataHash),c=r([o],e=>e.initialPublishedData),u=r([o],e=>e.canCreate),h=r([o],e=>e.enableAdminRelease),y=r([o],e=>e.textLanguages),f=r([m],e=>e.modelVersion),C=r([o],e=>e.admin),x=r([C],e=>e.preset),A=r([C],e=>e.modelVersion),E=r([m],e=>e.theme),b=r([m],e=>e.assistant),H=r([b],e=>e?t(e):null),D=r([m],e=>e.factory),P=r([C],e=>e.factory),S=r([m],e=>e.componentOptics),w=r([C],e=>e.componentOptics),O=r([m],e=>e.appLoader),T=r([m],e=>e.preview),V=r([m],e=>e.alwaysExpand),L=r([m],e=>e.presets),R=r([m],e=>e.deploymentQueryDisabled),U=r([m],e=>e.prefetchTextureUrls),k=r([m],e=>e.handlerHashes),v=r([m],e=>e.handlers),j=r([v,k],(e,t)=>({...(e=>{let t={},n={},a={};for(let s of e)"phoenix"===s.type&&(t[s.name]=s.handler),"system"===s.type&&(n[s.name]=s.handler),"system-async"===s.type&&(a[s.name]=s.handler);return{handlers:t,systemHandlers:n,systemAsyncHandlers:a}})(e),hashes:t})),F=r([m],e=>e.elementHashes),M=r([m],e=>e.elements),Q=r([M,F],(e,t)=>({...(e=>{let t={},a={};for(let n of e)"layout"===n.type&&(t[n.name]=n.element),"entity"===n.type&&(a[n.name]=n.element);return{entityElements:{...n.entityElements,...a},layoutElements:{...n.layoutElements,...t}}})(e),hashes:t}));return{selectSpec:o,selectVersion:l,selectBaseResourcesUrl:i,selectConfiguratorSpec:m,selectConfiguratorModelVersion:f,selectAdminSpec:C,selectAdminPreset:x,selectAdminModelVersion:A,selectThemeOptions:E,selectAssistant:H,selectConfiguratorFactory:D,selectAdminFactory:P,selectConfiguratorComponentOptics:S,selectAdminComponentOptics:w,selectAppLoader:O,selectPreview:T,selectAlwaysExpand:V,selectPresetSeed:L,selectDeploymentQueryDisabled:R,selectPrefetchTextureUrls:U,selectTextLanguages:y,selectHandlerHashes:k,selectHandlers:v,selectHandlerSlots:j,selectElementHashes:F,selectElements:M,selectElementSlots:Q,selectDataConfig:g,selectChunks:p,selectPublishedDataHash:d,selectInitialPublishedData:c,selectCanCreate:u,selectEnableAdminRelease:h,getVersion:()=>l(s()),getBaseResourcesUrl:()=>i(s()),getConfiguratorSpec:()=>m(s()),getConfiguratorModelVersion:()=>f(s()),getAdminSpec:()=>C(s()),getAdminPreset:()=>x(s()),getAdminModelVersion:()=>A(s()),getThemeOptions:()=>E(s()),getAssistant:()=>H(s()),getConfiguratorFactory:()=>D(s()),getAdminFactory:()=>P(s()),getConfiguratorComponentOptics:()=>S(s()),getAdminComponentOptics:()=>w(s()),getAppLoader:()=>O(s()),getPreview:()=>T(s()),getAlwaysExpand:()=>V(s()),getPresetSeed:()=>L(s()),getDeploymentQueryDisabled:()=>R(s()),getPrefetchTextureUrls:()=>U(s()),getTextLanguages:()=>y(s()),getHandlerHashes:()=>k(s()),getHandlers:()=>v(s()),getHandlerSlots:()=>j(s()),getElementHashes:()=>F(s()),getElements:()=>M(s()),getElementSlots:()=>Q(s()),getDataConfig:()=>g(s()),getChunks:()=>p(s()),getPublishedDataHash:()=>d(s()),getInitialPublishedData:()=>c(s()),getCanCreate:()=>u(s()),getEnableAdminRelease:()=>h(s())}};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ThemeOptions } from '@mui/material';
|
|
2
2
|
import type { SessionRole } from '@salsita-ai/contracts/api';
|
|
3
|
-
import type { AssistantResolvedManifest, ChunksSpec, DataSpec
|
|
3
|
+
import type { AssistantResolvedManifest, ChunksSpec, DataSpec } from '../../application/index.js';
|
|
4
4
|
import type { ActionDefinitions, Any$EntityReflections, AnyActionImplementations, AnyAliasMap, AnyAllowedRootEntityTypes, AnyDomainComponentOptic, AnyDomainFactory, AnyEntityReflections, AnyExpressions, AnyProductPreset, DomainEntity, MigrateFunction } from '../../core/index.js';
|
|
5
|
-
import type { AnyCreateTransformersFactory } from '../../domain-context/
|
|
5
|
+
import type { AnyCreateTransformersFactory } from '../../domain-context/index.js';
|
|
6
|
+
import type { ElementRegistration, HandlerRegistration } from './module-checks/index.js';
|
|
6
7
|
export interface ApplicationConfiguratorSpec {
|
|
7
8
|
readonly modelVersion: number;
|
|
8
9
|
readonly factory: AnyDomainFactory;
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export * from './sketching/index.js';
|
|
|
11
11
|
export * from './projections/index.js';
|
|
12
12
|
export * from './admin-domain/index.js';
|
|
13
13
|
export * from './application/index.js';
|
|
14
|
-
export { type ProjectModule, resolveActionModules, resolveExpressionModules } from './project-modules/index.js';
|
|
15
14
|
export * from './scene/index.js';
|
|
16
15
|
export { getAllPhxDefinitions } from './system-definitions.js';
|
|
17
16
|
export { availableSystemComponents, componentsByName } from './available-system-components.js';
|
package/dist/domain/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./core/index.js";export{DomainBuilder}from"./domain-builder.js";export{memoEval,isMemoizedArray,isMemoizedObject}from"./utils/memo-eval.js";export{cloneEvalCache,getEvalCache,setEvalCache,createEvalCacheToken}from"./utils/eval-cache.js";export{areProfilerLabelsEnabled,setProfilerLabelsEnabled}from"./utils/profiler-label.js";export*from"./dimensions/index.js";export*from"./domain-context/index.js";export*from"./system-components/index.js";export*from"./extensions/index.js";export*from"./sketching/index.js";export*from"./projections/index.js";export*from"./admin-domain/index.js";export*from"./application/index.js";export
|
|
1
|
+
export*from"./core/index.js";export{DomainBuilder}from"./domain-builder.js";export{memoEval,isMemoizedArray,isMemoizedObject}from"./utils/memo-eval.js";export{cloneEvalCache,getEvalCache,setEvalCache,createEvalCacheToken}from"./utils/eval-cache.js";export{areProfilerLabelsEnabled,setProfilerLabelsEnabled}from"./utils/profiler-label.js";export*from"./dimensions/index.js";export*from"./domain-context/index.js";export*from"./system-components/index.js";export*from"./extensions/index.js";export*from"./sketching/index.js";export*from"./projections/index.js";export*from"./admin-domain/index.js";export*from"./application/index.js";export*from"./scene/index.js";export{getAllPhxDefinitions}from"./system-definitions.js";export{availableSystemComponents,componentsByName}from"./available-system-components.js";export*from"./mocks/index.js";export*from"./domain-runtime/index.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DomainRuntimeServices } from '../domain-runtime/
|
|
1
|
+
import type { DomainRuntimeServices } from '../domain-runtime/index.js';
|
|
2
2
|
export declare const createMockDomainRuntimeServices: (overrides?: Partial<DomainRuntimeServices>) => DomainRuntimeServices;
|
|
@@ -371,7 +371,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
371
371
|
selectViewStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
372
372
|
selectToolStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
373
373
|
selectExportStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
374
|
-
selectCreateTransformers: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, undefined> | import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../
|
|
374
|
+
selectCreateTransformers: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, undefined> | import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").AnyCreateTransformersFactory>;
|
|
375
375
|
selectLatestLoadedData: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").ConfiguratorLoadedData | null>;
|
|
376
376
|
selectLoadedData: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").ConfiguratorLoadedData>;
|
|
377
377
|
selectInitialDomainState: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").DomainState<any>>;
|
|
@@ -413,7 +413,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
413
413
|
getViewStates: () => readonly string[];
|
|
414
414
|
getToolStates: () => readonly string[];
|
|
415
415
|
getExportStates: () => readonly string[];
|
|
416
|
-
getCreateTransformers: () => import("../
|
|
416
|
+
getCreateTransformers: () => import("../index.js").AnyCreateTransformersFactory | undefined;
|
|
417
417
|
getLoadedData: () => import("../index.js").ConfiguratorLoadedData;
|
|
418
418
|
getInitialDomainState: () => import("../index.js").DomainState<any>;
|
|
419
419
|
getFrontendData: () => Record<string, unknown>;
|
|
@@ -432,9 +432,9 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
432
432
|
getSnappingProjections: () => import("../index.js").AnySnappingProjections;
|
|
433
433
|
getConstraintProjections: () => import("../index.js").AnyConstraintProjections;
|
|
434
434
|
getProjectedEntitiesProjections: () => import("../index.js").AnyProjectedEntitiesProjections;
|
|
435
|
-
getStoreSystem: () => import("../
|
|
436
|
-
getNavigationSystem: () => import("../
|
|
437
|
-
getUndoSystem: () => import("../
|
|
435
|
+
getStoreSystem: () => import("../index.js").AnyStoreSystem;
|
|
436
|
+
getNavigationSystem: () => import("../index.js").AnyNavigationSystem;
|
|
437
|
+
getUndoSystem: () => import("../index.js").AnyUndoSystem;
|
|
438
438
|
getRecipeCookerSystem: () => import("../index.js").AnyRecipeCookerSystem;
|
|
439
439
|
getActionSystem: () => import("../index.js").AnyActionSystem;
|
|
440
440
|
getBlenderProjections: () => import("../index.js").AnyBlenderProjections;
|
|
@@ -480,7 +480,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
480
480
|
selectViewStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
481
481
|
selectToolStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
482
482
|
selectExportStates: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, readonly string[]>;
|
|
483
|
-
selectCreateTransformers: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, undefined> | import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../
|
|
483
|
+
selectCreateTransformers: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, undefined> | import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").AnyCreateTransformersFactory>;
|
|
484
484
|
selectLatestLoadedData: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").ConfiguratorLoadedData | null>;
|
|
485
485
|
selectLoadedData: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").ConfiguratorLoadedData>;
|
|
486
486
|
selectInitialDomainState: import("@salsita-ai/common/utils").Selector<import("../index.js").DomainContextSelectorState, import("../index.js").DomainState<any>>;
|
|
@@ -522,7 +522,7 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
522
522
|
getViewStates: () => readonly string[];
|
|
523
523
|
getToolStates: () => readonly string[];
|
|
524
524
|
getExportStates: () => readonly string[];
|
|
525
|
-
getCreateTransformers: () => import("../
|
|
525
|
+
getCreateTransformers: () => import("../index.js").AnyCreateTransformersFactory | undefined;
|
|
526
526
|
getLoadedData: () => import("../index.js").ConfiguratorLoadedData;
|
|
527
527
|
getInitialDomainState: () => import("../index.js").DomainState<any>;
|
|
528
528
|
getFrontendData: () => Record<string, unknown>;
|
|
@@ -541,9 +541,9 @@ export declare const createMockDomainRuntime: <ENTITIES extends DomainEntity<str
|
|
|
541
541
|
getSnappingProjections: () => import("../index.js").AnySnappingProjections;
|
|
542
542
|
getConstraintProjections: () => import("../index.js").AnyConstraintProjections;
|
|
543
543
|
getProjectedEntitiesProjections: () => import("../index.js").AnyProjectedEntitiesProjections;
|
|
544
|
-
getStoreSystem: () => import("../
|
|
545
|
-
getNavigationSystem: () => import("../
|
|
546
|
-
getUndoSystem: () => import("../
|
|
544
|
+
getStoreSystem: () => import("../index.js").AnyStoreSystem;
|
|
545
|
+
getNavigationSystem: () => import("../index.js").AnyNavigationSystem;
|
|
546
|
+
getUndoSystem: () => import("../index.js").AnyUndoSystem;
|
|
547
547
|
getRecipeCookerSystem: () => import("../index.js").AnyRecipeCookerSystem;
|
|
548
548
|
getActionSystem: () => import("../index.js").AnyActionSystem;
|
|
549
549
|
getBlenderProjections: () => import("../index.js").AnyBlenderProjections;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BlenderLight } from '@salsita-ai/contracts/webhook';
|
|
2
2
|
import { type DomainEntity, type DomainState } from '../../core/index.js';
|
|
3
|
-
import type { DomainContextSelectors } from '../../domain-runtime/
|
|
4
|
-
import type { DomainServicesSelectors } from '../../domain-runtime/domain-services/index.js';
|
|
3
|
+
import type { DomainContextSelectors, DomainServicesSelectors } from '../../domain-runtime/index.js';
|
|
5
4
|
import type { BlenderCamera, BlenderImageConfig, BlenderImageSize, BlenderSceneConfig, BlenderSceneObject, SceneEntityNode } from './types.js';
|
|
6
5
|
/**
|
|
7
6
|
* Constructor context of a `BlenderProjections`. It reaches its domain collaborators through the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DomainEntity, DomainState } from '../../core/index.js';
|
|
2
2
|
import type { AnyDimensionSystem } from '../../domain-context/index.js';
|
|
3
|
-
import type { AnyComponentReader } from '../../domain-runtime/
|
|
3
|
+
import type { AnyComponentReader } from '../../domain-runtime/index.js';
|
|
4
4
|
import type { AnyPositionProjections } from '../position-projections.js';
|
|
5
5
|
import type { BlenderCamera, BlenderImageSize } from './types.js';
|
|
6
6
|
export interface BlenderCameraProjectionContext {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Matrix4, Mesh, Vector3 } from 'three';
|
|
2
2
|
import { type DomainEntity, type DomainState, type EntityId } from '../core/index.js';
|
|
3
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
3
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
4
4
|
import { type AnyCollisionGeometrySnapshot } from '../system-components/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* DE-9IM-style classification of the spatial relationship between two
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Localizable } from '@salsita-ai/common/utils';
|
|
2
2
|
import { type DomainEntity, type DomainEntityId, type DomainState, type EntityId, type VirtualEntityId } from '../core/index.js';
|
|
3
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
3
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
4
4
|
export declare class CompositionCycleError extends Error {
|
|
5
5
|
constructor(entityId: DomainEntityId<string>);
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DomainEntity, DomainState } from '../core/index.js';
|
|
2
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
2
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
3
3
|
import { type SpatialPredicateName } from '../system-components/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor context of `ConstraintProjections`. It carries no `selectors` member because every
|
|
@@ -5,7 +5,7 @@ export { CollisionProjections, type CollisionMesh, type Collision, type SpatialR
|
|
|
5
5
|
export { ConstraintProjections, type AnyConstraintProjections } from './constraint-projections.js';
|
|
6
6
|
export { CompositionProjections, type AnyCompositionProjections, EntityCompositionNode, CompositionCycleError, EntityNotPartOfCompositionTreeError, type CompositionTreeWithIndex, } from './composition-projections.js';
|
|
7
7
|
export { SnappingProjections, type AnySnapMatch, type WorldSnapPoint, type SnapMatch, type FindSnapOptions, type WorldSnapEdge, type EdgeSnapMatch, type WorldSnapPlane, type PlaneSnapMatch, type WorldSnapAxis, type AxisSnapMatch, type AnySnappingProjections, } from './snapping-projections.js';
|
|
8
|
-
export { ValidationProjections, type AnyValidationProjections, type ValidationProjectionsContext, type
|
|
8
|
+
export { ValidationProjections, type AnyValidationProjections, type ValidationProjectionsContext, type SystemViolation, } from './validation-projections.js';
|
|
9
9
|
export { findBestPointSnap, findAllPointSnaps, findBestEdgeSnap, findBestPlaneSnap, findBestAxisSnap, snapScore, extractYRotationFromMatrix, type AutoRotateContext, } from './snap-matching.js';
|
|
10
10
|
export { computeWorldMatrix, computeWorldSnapPoints, computeWorldSnapEdges, computeWorldSnapPlanes, computeWorldSnapAxes, toMmBounds, } from './snap-utils.js';
|
|
11
11
|
export { ProjectedEntitiesProjections, type AnyProjectedEntitiesProjections } from './projected-entities-projections.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Euler, Matrix4, Quaternion, Vector3 } from 'three';
|
|
2
2
|
import type { DomainEntity, DomainEntityId, DomainState } from '../core/index.js';
|
|
3
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
3
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Override for an entity's position during an active drag or rotation.
|
|
6
6
|
* This is a simplified view of the dragging state — only the fields
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DomainEntity, DomainEntityId, DomainState } from '../core/index.js';
|
|
2
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
2
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Constructor context of `ProjectedEntitiesProjections`. It carries no `selectors` member because
|
|
5
5
|
* every registry read is transitive through collaborators that own their own registry window. A
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DomainEntity, type DomainState, type EntityId } from '../core/index.js';
|
|
2
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
2
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
3
3
|
import { type AnySnapMatch, type AxisSnapMatch, type EdgeSnapMatch, type FindSnapOptions, type PlaneSnapMatch, type SnapMatch, type WorldSnapAxis, type WorldSnapEdge, type WorldSnapPlane, type WorldSnapPoint } from './snap-matching.js';
|
|
4
4
|
export type { AnySnapMatch, WorldSnapPoint, SnapMatch, FindSnapOptions, WorldSnapEdge, EdgeSnapMatch, WorldSnapPlane, PlaneSnapMatch, WorldSnapAxis, AxisSnapMatch, };
|
|
5
5
|
/**
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import { type $DomainEntity, type DomainEntity, type DomainState, type
|
|
2
|
-
import type { AngleDimensionViolation, DistanceDimensionViolation, GenericDimensionViolation } from '../domain-context/
|
|
3
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
1
|
+
import { type $DomainEntity, type DomainEntity, type DomainState, type StateValidationResult, type ViolationTypesOf$Entity } from '../core/index.js';
|
|
2
|
+
import type { AngleDimensionViolation, DistanceDimensionViolation, GenericDimensionViolation } from '../domain-context/index.js';
|
|
3
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
4
4
|
export type SystemViolation = AngleDimensionViolation | DistanceDimensionViolation | GenericDimensionViolation;
|
|
5
|
-
export type StateValidationResult<ENTITIES extends DomainEntity<string>, VIOLATION_TYPE extends string> = {
|
|
6
|
-
readonly valid: true;
|
|
7
|
-
readonly severity: null;
|
|
8
|
-
} | {
|
|
9
|
-
readonly valid: true;
|
|
10
|
-
readonly severity: 'warning' | 'notice';
|
|
11
|
-
readonly entityViolations: ReadonlyArray<EntityViolation<ENTITIES, VIOLATION_TYPE>>;
|
|
12
|
-
} | {
|
|
13
|
-
readonly valid: false;
|
|
14
|
-
readonly severity: 'uncaught';
|
|
15
|
-
readonly error: Error;
|
|
16
|
-
} | {
|
|
17
|
-
readonly valid: false;
|
|
18
|
-
readonly severity: 'fatal' | 'fixable';
|
|
19
|
-
readonly entityViolations: ReadonlyArray<EntityViolation<ENTITIES, VIOLATION_TYPE>>;
|
|
20
|
-
};
|
|
21
5
|
/**
|
|
22
6
|
* Constructor context of `ValidationProjections`. Runtime dependencies are resolved through
|
|
23
7
|
* selectors on every read so a hot-reloaded spec is observed without rebuilding the projections.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DomainEntity, DomainState, EntityId } from '../core/index.js';
|
|
2
|
-
import type { DomainContextSelectors } from '../domain-runtime/
|
|
2
|
+
import type { DomainContextSelectors } from '../domain-runtime/index.js';
|
|
3
3
|
import { type Shape, type Sketching, type SketchingPoint } from './sketching.js';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor context of `SketchingProjections`. It carries no `selectors` member because every
|
package/dist/domain/system-components/phoenix-layout-elements/admin-connected-resource-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataCellValue, DataSchema } from '../../
|
|
1
|
+
import type { DataCellValue, DataSchema } from '../../core/index.js';
|
|
2
2
|
export interface AdminConnectedResourcePageSchema {
|
|
3
3
|
readonly kind: 'adminConnectedResourcePage';
|
|
4
4
|
readonly props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataCellValue, DataSchema } from '../../
|
|
1
|
+
import type { DataCellValue, DataSchema } from '../../core/index.js';
|
|
2
2
|
export interface AdminDataTableActionsSchema {
|
|
3
3
|
readonly kind: 'adminDataTableActions';
|
|
4
4
|
readonly props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { $DomainEntity, DomainEntity, DomainState,
|
|
1
|
+
import type { $DomainEntity, DomainEntity, DomainState, OpenExpressionContext } from '../core/index.js';
|
|
2
2
|
declare const MemoizedValueSymbol: unique symbol;
|
|
3
3
|
export type MemoizedArray<T extends readonly unknown[]> = {
|
|
4
4
|
readonly [MemoizedValueSymbol]: 'array';
|
|
@@ -19,7 +19,7 @@ export interface MemoEval {
|
|
|
19
19
|
* In addition to performance optimizations, this helper is useful for custom expressions that produce non-primitive
|
|
20
20
|
* results and therefore break any downstream memoization.
|
|
21
21
|
*/
|
|
22
|
-
<ENTITIES extends DomainEntity<string>, $ENTITY extends $DomainEntity<ENTITIES>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, const DEPS extends any[], RES>(calculateDeps: (self: $ENTITY, state: DomainState<ENTITIES>, ctx:
|
|
22
|
+
<ENTITIES extends DomainEntity<string>, $ENTITY extends $DomainEntity<ENTITIES>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, const DEPS extends any[], RES, CONTEXT_EXTENSION = unknown>(calculateDeps: (self: $ENTITY, state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>) => DEPS, evaluate: (...deps: DEPS) => RES): (self: $ENTITY, state: DomainState<ENTITIES>, ctx: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>) => RES;
|
|
23
23
|
/**
|
|
24
24
|
* Tags an array so that it is compared by contents rather than reference.
|
|
25
25
|
* Use in the deps collection phase.
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{DOMAIN_SDK_MODULE as
|
|
2
|
-
{}, // insert expression metas here, once ready
|
|
3
|
-
)(constants)
|
|
1
|
+
import{DOMAIN_SDK_MODULE as t}from"./imports.js";export const generateConstantExpressions=(n,s)=>(n.importMembers(t,"createConstantExpressionFactory"),n.importMembers(s?"./admin-model/index.js":"./model/index.js","AnyDomainEntity","Aliases","RootEntity"),n.importMembers(s?"./admin-enhanced-model.js":"./enhanced-model.js","constants"),`export const constantExpressions = createConstantExpressionFactory<AnyDomainEntity, RootEntity, PublishedData, SessionData, FrontendData, Aliases>()(constants)
|
|
4
2
|
`);
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import{generateConstantExpressions as t}from"./constant-expressions.js";import{generateDataExpressions as e}from"./data-expressions.js";import{generateDefaults as
|
|
2
|
-
export const attachAdminComponent = DomainComponentOpticBuilder.from<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases
|
|
3
|
-
export const attachComponent = DomainComponentOpticBuilder.from<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases
|
|
4
|
-
export const implementAdminCustomExpressions = createCustomExpressionFactory<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases
|
|
5
|
-
|
|
6
|
-
)`):D.push(`
|
|
7
|
-
export const implementCustomExpressions = createCustomExpressionFactory<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases>(
|
|
8
|
-
{} // TODO pass in meta-data once we have them
|
|
9
|
-
)`),D.push(e(m,d,u)),d?(u.importMembers(s,"commonAdminCustomExpressions","createMapPublishedRevisionDataHandlerFactory","createMapPublishedChunkedDataHandlerFactory"),D.push(`
|
|
1
|
+
import{generateConstantExpressions as t}from"./constant-expressions.js";import{generateDataExpressions as e}from"./data-expressions.js";import{generateDefaults as n}from"./defaults.js";import{DOMAIN_SDK_MODULE as s,Imports as i}from"./imports.js";import{generateInvariants as a}from"./invariants.js";import{generateRelations as o}from"./relations.js";export const generateImplementation=async(r,m,p,d,l)=>{let u=[],D=new i(d?"./admin-implementation.js":"./implementation.js",l);return D.importMembers("@salsita-ai/sdk/domain","AliasedExpressions","createConstantExpressionFactory","DomainComponentOpticBuilder","createCustomExpressionFactory","DomainBuilder","RuntimeExpressionContext"),D.importMembers(d?"./admin-enhanced-model.js":"./enhanced-model.js","$entityReflections","$Map"),D.importMembers(d?"./admin-model/index.js":"./model/index.js","AnyDomainEntity","Aliases","RootEntity","aliases","entities","RootEntity","modelVersion"),D.importMembers("./application-types.js","PublishedData","SessionData","FrontendData"),d||D.importMembers("./application-types.js","BackendData"),u.push(o(r.relations,D,d)),u.push(t(D,d)),u.push(n(r.defaults,D,d)),u.push(a(r.invariants,p,D,d)),d?u.push(`
|
|
2
|
+
export const attachAdminComponent = DomainComponentOpticBuilder.from<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases, RuntimeExpressionContext<AnyDomainEntity>>(aliases)`):u.push(`
|
|
3
|
+
export const attachComponent = DomainComponentOpticBuilder.from<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases, RuntimeExpressionContext<AnyDomainEntity>>(aliases)`),d?u.push(`
|
|
4
|
+
export const implementAdminCustomExpressions = createCustomExpressionFactory<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases, RuntimeExpressionContext<AnyDomainEntity>>()`):u.push(`
|
|
5
|
+
export const implementCustomExpressions = createCustomExpressionFactory<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases, RuntimeExpressionContext<AnyDomainEntity>>()`),u.push(e(m,d,D)),d?(D.importMembers(s,"commonAdminCustomExpressions","createMapPublishedRevisionDataHandlerFactory","createMapPublishedChunkedDataHandlerFactory"),u.push(`
|
|
10
6
|
export const createMapPublishedRevisionDataHandler = createMapPublishedRevisionDataHandlerFactory<
|
|
11
7
|
AnyDomainEntity,
|
|
12
8
|
RootEntity,
|
|
@@ -36,7 +32,7 @@ export const adminDomainBuilder = DomainBuilder.from<AnyDomainEntity, RootEntity
|
|
|
36
32
|
)
|
|
37
33
|
.withExpressions(constantExpressions)
|
|
38
34
|
.withExpressions(relationExpressions)
|
|
39
|
-
.withExpressions(implementAdminCustomExpressions(commonAdminCustomExpressions))`)):
|
|
35
|
+
.withExpressions(implementAdminCustomExpressions(commonAdminCustomExpressions))`)):u.push(`
|
|
40
36
|
export const domainBuilder = DomainBuilder.from<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases>(
|
|
41
37
|
entities,
|
|
42
38
|
aliases,
|
|
@@ -51,4 +47,4 @@ export const adminDomainBuilder = DomainBuilder.from<AnyDomainEntity, RootEntity
|
|
|
51
47
|
)
|
|
52
48
|
.withExpressions(constantExpressions)
|
|
53
49
|
.withExpressions(relationExpressions)
|
|
54
|
-
.withExpressions(dataExpressions)`),{modulePath:
|
|
50
|
+
.withExpressions(dataExpressions)`),{modulePath:D.targetModule,content:["/* eslint-disable */",D.toString(),...u].join("\n")}};
|
|
@@ -6,7 +6,8 @@ import{DOMAIN_SDK_MODULE as t}from"./imports.js";import{stringifyWithCodeRefsAnd
|
|
|
6
6
|
SessionData,
|
|
7
7
|
FrontendData,
|
|
8
8
|
Aliases,
|
|
9
|
-
CustomInvariantBlueprints
|
|
9
|
+
CustomInvariantBlueprints,
|
|
10
|
+
RuntimeExpressionContext<AnyDomainEntity>
|
|
10
11
|
>()(staticViolations)
|
|
11
12
|
`):o.push(`export const implementCustomInvariants = createCustomInvariantFactory<
|
|
12
13
|
AnyDomainEntity,
|
|
@@ -16,7 +17,8 @@ import{DOMAIN_SDK_MODULE as t}from"./imports.js";import{stringifyWithCodeRefsAnd
|
|
|
16
17
|
SessionData,
|
|
17
18
|
FrontendData,
|
|
18
19
|
Aliases,
|
|
19
|
-
CustomInvariantBlueprints
|
|
20
|
+
CustomInvariantBlueprints,
|
|
21
|
+
RuntimeExpressionContext<AnyDomainEntity>
|
|
20
22
|
>()(staticViolations)
|
|
21
|
-
`),e.importMembers(t,"createCustomInvariantFactory"),e.importMembers(s?"./admin-model/index.js":"./model/index.js","AnyDomainEntity","Aliases","RootEntity"),e.importMembers(s?"./admin-enhanced-model.js":"./enhanced-model.js","$Map"),s?(e.importMembers(t,"commonAdminViolationExpressions"),o.push(`export const adminInvariantBuilder = new InvariantBuilder<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases>(aliases)
|
|
23
|
+
`),e.importMembers(t,"createCustomInvariantFactory","RuntimeExpressionContext"),e.importMembers(s?"./admin-model/index.js":"./model/index.js","AnyDomainEntity","Aliases","RootEntity"),e.importMembers(s?"./admin-enhanced-model.js":"./enhanced-model.js","$Map"),s?(e.importMembers(t,"commonAdminViolationExpressions"),o.push(`export const adminInvariantBuilder = new InvariantBuilder<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases>(aliases)
|
|
22
24
|
.withInvariants(implementCustomAdminInvariants(commonAdminViolationExpressions))`)):o.push("export const invariantBuilder = new InvariantBuilder<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, Aliases>(aliases)"),e.importMembers(t,"InvariantBuilder"),o.join("\n")};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const cacheVersion =
|
|
1
|
+
export declare const cacheVersion = 761;
|
|
2
2
|
export declare const needsRebuild: (fileContents: string[], outputDirectory: string) => Promise<boolean>;
|
|
3
3
|
export declare const writeCacheInfo: (fileContents: string[], outputDirectory: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash as e}from"crypto";import{existsSync as r}from"fs";import{readFile as t}from"fs/promises";import{isEqualArray as o}from"@salsita-ai/common/utils";import{writeFormatted as i}from"../gen/write-formatted.js";export const cacheVersion=
|
|
1
|
+
import{createHash as e}from"crypto";import{existsSync as r}from"fs";import{readFile as t}from"fs/promises";import{isEqualArray as o}from"@salsita-ai/common/utils";import{writeFormatted as i}from"../gen/write-formatted.js";export const cacheVersion=761;let s=r=>({version:761,files:r.map(r=>e("md5").update(r).digest("base64")).sort()});export const needsRebuild=async(e,i)=>{let a=`${i}/cache.json`;if(!r(a))return!0;try{let r=JSON.parse(await t(a,"utf-8")),i=s(e);return 761!==r.version||!o(r.files,i.files)}catch(e){return console.error("Failed to read cache file, forcing rebuild",e),!0}};export const writeCacheInfo=async(e,r)=>{let t=`${r}/cache.json`,o=s(e);await i(t,JSON.stringify(o,null,2))};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const mergeClaudeMdContent: (existingContent: string | undefined) => string;
|
|
2
|
-
export declare const claudeMdFile = "[PHOENIX-SDK-START]\n## Phoenix Configurator Project\n\nDeclarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.\n\n## Build Commands\n- `pnpm phoenix build` \u2014 Full production build\n- `pnpm phoenix dev` \u2014 Development mode with hot reload\n- `pnpm phoenix sync` \u2014 Sync generated files without full build\n\n## 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)\n\n## Project Structure\n- `spec/` \u2014 Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` \u2014 Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/invariants/` \u2014 Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` \u2014 Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` \u2014 ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` \u2014 Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n- `src/handlers/` \u2014 Event & lifecycle handlers\n- `src/webhooks/` \u2014 Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` \u2014 Schema version migrations (v*.ts)\n- `src/locales/` \u2014 Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` \u2014 Admin interface (mirrors main src/ structure)\n- `src/_shared/` \u2014 Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` \u2014 Auto-generated files (DO NOT EDIT)\n- `public/` \u2014 Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` \u2014 Uploadable resources (PDF templates, email assets)\n\n## 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\n\n## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\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\n\n## File Conventions\n- Components: PascalCase (.tsx)\n- Utilities: kebab-case (.ts)\n- Expressions: entity-name.ts\n- Migrations: v*.ts (sequential)\n- Specs: kebab-case.yaml\n- Underscore folders (_shared/, _utils/) are NOT auto-imported\n\n## Export Rules\nAll files in src/expressions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\n\n## 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.\n\n## Do Not Edit\n- `.phoenix/` directory \u2014 completely regenerated on each build\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files \u2014 compiled from .po files\n\n## Code Review\nUse `/review` command to review code changes before committing.\n\n## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` \u2014 Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` \u2014 Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` \u2014 Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` \u2014 Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` \u2014 List docs in a category\n- `pnpm phoenix docs -l` \u2014 List all doc paths with titles\n\n### 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`\n\n### 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` \u2014 Output file path (default: `./screenshot.png`)\n- `--width, -w` \u2014 Width in pixels (default: 1920)\n- `--height` \u2014 Height in pixels (default: 1080)\n- `--format, -f` \u2014 Image format: PNG or JPEG (default: PNG)\n- `--port` \u2014 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\n\n### 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` \u2014 Output file path (prints to stdout if omitted)\n- `--sections, -s` \u2014 Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 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` \u2014 domain data loaded\n- `domainContextReady` \u2014 domain context initialized (entities available)\n- `configuratorReady` \u2014 3D configurator initialized\n- `sessionAuthenticated` \u2014 session service active\n- `editorMode` \u2014 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\n\n### Inspect: Data\n\nGet the current editor context data as JSON via `pnpm phoenix inspect:data`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` \u2014 Output file path (prints to stdout if omitted)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 WebSocket server port (default: 3020)\n\n**Returns:** publishedData, frontendData, backendData, sessionData, accessData, webComponentProperties\n\n**Example:** `pnpm phoenix inspect:data -o ./data.json`\n\n**Tips:** Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:data | head -30`).\n\n**Use cases:** AI agent context, debugging published/session/access data\n\n### Inspect: Scene\n\nGet the current Three.js scene graph as JSON via `pnpm phoenix inspect:scene`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` \u2014 Output file path (prints to stdout if omitted)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 WebSocket server port (default: 3020)\n\n**Returns:** Recursive scene tree with per-node: name, type, visible, position, rotation, scale, userData (entityId), and for meshes: geometry name, bounding box, material properties (color, metalness, roughness, opacity, textures), morph target influences. Lights include color, intensity, and type-specific properties.\n\n**Example:** `pnpm phoenix inspect:scene -o ./scene.json`\n\n**Tips:** Scene graphs can be large. Pipe through `head`/`tail` for partial output.\n\n**Use cases:** AI agent context, debugging 3D scene layout, inspecting materials and lighting\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` \u2014 Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` \u2014 End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` \u2014 Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` \u2014 ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` \u2014 Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` \u2014 YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` \u2014 Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` \u2014 Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` \u2014 Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` \u2014 Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` \u2014 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\"`\n\n### Playwright MCP Setup (for AI agents)\n\nTo interact with the 3D configurator in a browser, Playwright MCP needs GPU-enabled flags for WebGL rendering. Add to `~/.claude/.mcp.json`:\n\n```json\n{\n \"mcpServers\": {\n \"playwright\": {\n \"command\": \"npx\",\n \"args\": [\n \"@playwright/mcp@latest\",\n \"--headed\",\n \"--launch-options\",\n \"{\\\"args\\\":[\\\"--use-gl=swiftshader\\\",\\\"--enable-webgl\\\",\\\"--ignore-gpu-blocklist\\\"]}\"\n ]\n }\n }\n}\n```\n\nKey flags:\n- `--headed` \u2014 visible browser (required for GPU rendering)\n- `--use-gl=swiftshader` \u2014 software GPU fallback for environments without a physical GPU\n- `--enable-webgl` + `--ignore-gpu-blocklist` \u2014 ensure WebGL is available\n[PHOENIX-SDK-END]\n";
|
|
2
|
+
export declare const claudeMdFile = "[PHOENIX-SDK-START]\n## Phoenix Configurator Project\n\nDeclarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.\n\n## Build Commands\n- `pnpm phoenix build` \u2014 Full production build\n- `pnpm phoenix dev` \u2014 Development mode with hot reload\n- `pnpm phoenix sync` \u2014 Sync generated files without full build\n\n## 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)\n\n## Project Structure\n- `spec/` \u2014 Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` \u2014 Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/invariants/` \u2014 Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` \u2014 Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` \u2014 ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` \u2014 Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n - A layout element named `ConfiguratorLayout` replaces everything the built-in layout renders for a loaded configuration, the finalize page 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\n- `src/handlers/` \u2014 Event & lifecycle handlers\n- `src/webhooks/` \u2014 Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` \u2014 Schema version migrations (v*.ts)\n- `src/locales/` \u2014 Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` \u2014 Admin interface (mirrors main src/ structure)\n- `src/_shared/` \u2014 Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` \u2014 Auto-generated files (DO NOT EDIT)\n- `public/` \u2014 Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` \u2014 Uploadable resources (PDF templates, email assets)\n\n## 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\n\n## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\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\n\n## File Conventions\n- Components: PascalCase (.tsx)\n- Utilities: kebab-case (.ts)\n- Expressions: entity-name.ts\n- Migrations: v*.ts (sequential)\n- Specs: kebab-case.yaml\n- Underscore folders (_shared/, _utils/) are NOT auto-imported\n\n## Export Rules\nAll files in src/expressions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\n\n## 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.\n\n## Do Not Edit\n- `.phoenix/` directory \u2014 completely regenerated on each build\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files \u2014 compiled from .po files\n\n## Code Review\nUse `/review` command to review code changes before committing.\n\n## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` \u2014 Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` \u2014 Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` \u2014 Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` \u2014 Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` \u2014 List docs in a category\n- `pnpm phoenix docs -l` \u2014 List all doc paths with titles\n\n### 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`\n\n### 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` \u2014 Output file path (default: `./screenshot.png`)\n- `--width, -w` \u2014 Width in pixels (default: 1920)\n- `--height` \u2014 Height in pixels (default: 1080)\n- `--format, -f` \u2014 Image format: PNG or JPEG (default: PNG)\n- `--port` \u2014 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\n\n### 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` \u2014 Output file path (prints to stdout if omitted)\n- `--sections, -s` \u2014 Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 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` \u2014 domain data loaded\n- `domainContextReady` \u2014 domain context initialized (entities available)\n- `configuratorReady` \u2014 3D configurator initialized\n- `sessionAuthenticated` \u2014 session service active\n- `editorMode` \u2014 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\n\n### Inspect: Data\n\nGet the current editor context data as JSON via `pnpm phoenix inspect:data`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` \u2014 Output file path (prints to stdout if omitted)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 WebSocket server port (default: 3020)\n\n**Returns:** publishedData, frontendData, backendData, sessionData, accessData, webComponentProperties\n\n**Example:** `pnpm phoenix inspect:data -o ./data.json`\n\n**Tips:** Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:data | head -30`).\n\n**Use cases:** AI agent context, debugging published/session/access data\n\n### Inspect: Scene\n\nGet the current Three.js scene graph as JSON via `pnpm phoenix inspect:scene`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` \u2014 Output file path (prints to stdout if omitted)\n- `--pretty` \u2014 Pretty-print JSON (default: true)\n- `--port` \u2014 WebSocket server port (default: 3020)\n\n**Returns:** Recursive scene tree with per-node: name, type, visible, position, rotation, scale, userData (entityId), and for meshes: geometry name, bounding box, material properties (color, metalness, roughness, opacity, textures), morph target influences. Lights include color, intensity, and type-specific properties.\n\n**Example:** `pnpm phoenix inspect:scene -o ./scene.json`\n\n**Tips:** Scene graphs can be large. Pipe through `head`/`tail` for partial output.\n\n**Use cases:** AI agent context, debugging 3D scene layout, inspecting materials and lighting\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` \u2014 Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` \u2014 End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` \u2014 Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` \u2014 ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` \u2014 Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` \u2014 YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` \u2014 Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` \u2014 Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` \u2014 Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` \u2014 Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` \u2014 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\"`\n\n### Playwright MCP Setup (for AI agents)\n\nTo interact with the 3D configurator in a browser, Playwright MCP needs GPU-enabled flags for WebGL rendering. Add to `~/.claude/.mcp.json`:\n\n```json\n{\n \"mcpServers\": {\n \"playwright\": {\n \"command\": \"npx\",\n \"args\": [\n \"@playwright/mcp@latest\",\n \"--headed\",\n \"--launch-options\",\n \"{\\\"args\\\":[\\\"--use-gl=swiftshader\\\",\\\"--enable-webgl\\\",\\\"--ignore-gpu-blocklist\\\"]}\"\n ]\n }\n }\n}\n```\n\nKey flags:\n- `--headed` \u2014 visible browser (required for GPU rendering)\n- `--use-gl=swiftshader` \u2014 software GPU fallback for environments without a physical GPU\n- `--enable-webgl` + `--ignore-gpu-blocklist` \u2014 ensure WebGL is available\n[PHOENIX-SDK-END]\n";
|