@salsita-ai/sdk 0.50.0-develop.8f6deac646 → 0.50.0-develop.9267bdc12e
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/application-spec/errors/diagnostic-codes.d.ts +5 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +5 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +8 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +48 -48
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
- package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -7
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +9 -10
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -4
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
- package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
- package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
- package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
- package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
- package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
- package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +3 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +3 -1
- 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.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +5 -1
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
- package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +1 -75
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.d.ts +92 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.js +16 -0
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
- package/dist/docs/complex-use-cases/sketching.mdx +0 -38
- package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
- package/dist/docs/index.json +11 -1
- package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
- package/dist/docs/layouts/custom-layout.mdx +981 -0
- package/dist/docs/other-features/side-effects.mdx +8 -11
- package/dist/docs/other-features/violation-messages.mdx +52 -56
- package/dist/docs/phoenix/configurator-interface.mdx +105 -65
- package/dist/docs/phoenix/domain-model.mdx +4 -0
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +19 -26
- package/dist/docs/phoenix/project-structure.mdx +16 -10
- package/dist/docs/phoenix/quickstart.mdx +2 -2
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhook-membership.mdx +10 -9
- package/dist/docs/phoenix/webhooks.mdx +2 -2
- package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
- package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
- package/dist/domain/admin-domain/index.js +1 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +5 -3
- package/dist/domain/application/assistant/assistant-fields.d.ts +5 -0
- package/dist/domain/application/assistant/assistant-fields.js +1 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +27 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +4 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
- package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -0
- package/dist/domain/application/configurator-builder.d.ts +2 -2
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +6 -7
- package/dist/domain/application/index.d.ts +0 -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/map-published-chunked-data.d.ts +1 -1
- package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
- package/dist/domain/core/component/domain-component-optic.d.ts +11 -19
- package/dist/domain/core/component/domain-component-optic.js +2 -2
- package/dist/domain/core/component/legacy-filter.d.ts +2 -17
- package/dist/domain/core/component/system-component-filter.d.ts +36 -18
- package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
- package/dist/domain/core/expression/constant-expressions.js +1 -1
- package/dist/domain/core/expression/custom-expression.d.ts +17 -4
- package/dist/domain/core/expression/custom-expression.js +1 -1
- package/dist/domain/core/expression/expression.d.ts +1 -2
- package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
- package/dist/domain/core/invariant/invariants.d.ts +1 -4
- package/dist/domain/core/recipe/recipes.d.ts +18 -50
- package/dist/domain/core/recipe/recipes.js +1 -1
- package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
- package/dist/domain/core/relation/all-of-type-relation.js +1 -1
- package/dist/domain/core/relation/direct-relation.d.ts +13 -24
- package/dist/domain/core/relation/index.d.ts +0 -1
- package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
- package/dist/domain/core/relation/indirect-relation.js +1 -1
- package/dist/domain/core/relation/relation-factory.d.ts +19 -15
- package/dist/domain/core/relation/relation-factory.js +1 -1
- package/dist/domain/core/state/migrations.d.ts +14 -45
- package/dist/domain/core/state/migrations.js +1 -1
- package/dist/domain/core/state/state.d.ts +1 -1
- package/dist/domain/domain-builder.d.ts +1 -1
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
- package/dist/domain/domain-runtime/access/selectors.js +1 -1
- package/dist/domain/domain-runtime/access/types.d.ts +2 -0
- package/dist/domain/domain-runtime/access/types.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +14 -13
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +56 -40
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
- package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
- package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
- package/dist/domain/domain-runtime/errors/index.js +1 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
- package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
- package/dist/domain/domain-runtime/index.d.ts +1 -0
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +2 -5
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
- package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
- package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-action-modules.d.ts → module-checks/resolve-action-modules.d.ts} +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-component-optic-modules.d.ts → module-checks/resolve-component-optic-modules.d.ts} +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/{resolve-expression-modules.d.ts → module-checks/resolve-expression-modules.d.ts} +2 -2
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
- package/dist/domain/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 +2 -1
- package/dist/domain/index.d.ts +0 -1
- package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +18 -9
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
- package/dist/domain/mocks/create-mock-domain.js +1 -1
- package/dist/domain/mocks/create-mock-state.d.ts +2 -2
- package/dist/domain/projections/blender-projections/camera.d.ts +1 -1
- package/dist/domain/utils/eval-cache.d.ts +1 -1
- package/dist/domain/utils/map-nested-object.d.ts +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
- package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
- package/dist/legacy/domain-cli/gen/defaults.js +1 -7
- package/dist/legacy/domain-cli/gen/implementation.js +7 -11
- package/dist/legacy/domain-cli/gen/invariants.js +3 -4
- package/dist/legacy/domain-cli/gen/relations.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +1 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/commands/init.d.ts +4 -4
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/utils/git/index.d.ts +1 -0
- package/dist/phoenix/utils/git/index.js +1 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
- package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +33 -16
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +4 -4
- package/dist/react-sdk/domain-context/index.d.ts +1 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- 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/prettier-ignore.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
- package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
- package/dist/domain/application/element-registration.js +0 -1
- package/dist/domain/application/handler-registration.js +0 -1
- package/dist/domain/application/resolve-imported-transformers.d.ts +0 -22
- package/dist/domain/application/resolve-imported-transformers.js +0 -1
- package/dist/domain/application/resource-builder.d.ts +0 -13
- package/dist/domain/application/resource-builder.js +0 -1
- package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
- package/dist/domain/core/relation/relation-implementation.js +0 -1
- package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +0 -26
- package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-action-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-expression-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/resolve-invariant-modules.d.ts +0 -6
- package/dist/domain/domain-runtime/spec/resolve-invariant-modules.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
|
@@ -74,17 +74,17 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
74
74
|
selectPrefetchTextureUrls: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly string[]>;
|
|
75
75
|
selectTextLanguages: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly string[]>;
|
|
76
76
|
selectHandlerHashes: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Record<string, string>>;
|
|
77
|
-
selectHandlers: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("
|
|
77
|
+
selectHandlers: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("./index.js").HandlerRegistration<any, any>[]>;
|
|
78
78
|
selectHandlerSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
79
|
-
handlers: Record<string, () => import("
|
|
80
|
-
systemHandlers: Record<string, () => import("
|
|
81
|
-
systemAsyncHandlers: Record<string, () => import("
|
|
79
|
+
handlers: Record<string, () => import("./index.js").PhoenixHandlerDefinition>;
|
|
80
|
+
systemHandlers: Record<string, () => import("./index.js").SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
81
|
+
systemAsyncHandlers: Record<string, () => import("./index.js").SystemPhoenixAsyncHandlerDefinition<unknown, unknown>>;
|
|
82
82
|
hashes: Record<string, string>;
|
|
83
83
|
}>;
|
|
84
84
|
selectElementHashes: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Record<string, string>>;
|
|
85
|
-
selectElements: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("
|
|
85
|
+
selectElements: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("./index.js").ElementRegistration[]>;
|
|
86
86
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
87
|
-
entityElements: Record<string, (props: import("
|
|
87
|
+
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
88
88
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
89
89
|
hashes: Record<string, string>;
|
|
90
90
|
}>;
|
|
@@ -117,17 +117,17 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
117
117
|
getPrefetchTextureUrls: () => readonly string[];
|
|
118
118
|
getTextLanguages: () => readonly string[];
|
|
119
119
|
getHandlerHashes: () => Record<string, string>;
|
|
120
|
-
getHandlers: () => readonly import("
|
|
120
|
+
getHandlers: () => readonly import("./index.js").HandlerRegistration<any, any>[];
|
|
121
121
|
getHandlerSlots: () => {
|
|
122
|
-
handlers: Record<string, () => import("
|
|
123
|
-
systemHandlers: Record<string, () => import("
|
|
124
|
-
systemAsyncHandlers: Record<string, () => import("
|
|
122
|
+
handlers: Record<string, () => import("./index.js").PhoenixHandlerDefinition>;
|
|
123
|
+
systemHandlers: Record<string, () => import("./index.js").SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
124
|
+
systemAsyncHandlers: Record<string, () => import("./index.js").SystemPhoenixAsyncHandlerDefinition<unknown, unknown>>;
|
|
125
125
|
hashes: Record<string, string>;
|
|
126
126
|
};
|
|
127
127
|
getElementHashes: () => Record<string, string>;
|
|
128
|
-
getElements: () => readonly import("
|
|
128
|
+
getElements: () => readonly import("./index.js").ElementRegistration[];
|
|
129
129
|
getElementSlots: () => {
|
|
130
|
-
entityElements: Record<string, (props: import("
|
|
130
|
+
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
131
131
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
132
132
|
hashes: Record<string, string>;
|
|
133
133
|
};
|
|
@@ -272,24 +272,28 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
272
272
|
access: {
|
|
273
273
|
selectConfiguratorRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
274
274
|
raw: string;
|
|
275
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
275
276
|
viewMode: boolean;
|
|
276
277
|
revisionId: string | undefined;
|
|
277
278
|
configurationId: string;
|
|
278
279
|
} | null>;
|
|
279
280
|
selectAdminRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
280
281
|
raw: string;
|
|
282
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
281
283
|
viewMode: boolean;
|
|
282
284
|
revisionId: string | undefined;
|
|
283
285
|
configurationId: string;
|
|
284
286
|
} | null>;
|
|
285
287
|
selectConfiguratorAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
286
288
|
raw: string;
|
|
289
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
287
290
|
viewMode: boolean;
|
|
288
291
|
revisionId: string | undefined;
|
|
289
292
|
configurationId: string;
|
|
290
293
|
}>;
|
|
291
294
|
selectAdminAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
292
295
|
raw: string;
|
|
296
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
293
297
|
viewMode: boolean;
|
|
294
298
|
revisionId: string | undefined;
|
|
295
299
|
configurationId: string;
|
|
@@ -302,24 +306,28 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
302
306
|
selectAdminConfigurationId: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, string>;
|
|
303
307
|
getConfiguratorRawAccessInfo: () => {
|
|
304
308
|
raw: string;
|
|
309
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
305
310
|
viewMode: boolean;
|
|
306
311
|
revisionId: string | undefined;
|
|
307
312
|
configurationId: string;
|
|
308
313
|
} | null;
|
|
309
314
|
getAdminRawAccessInfo: () => {
|
|
310
315
|
raw: string;
|
|
316
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
311
317
|
viewMode: boolean;
|
|
312
318
|
revisionId: string | undefined;
|
|
313
319
|
configurationId: string;
|
|
314
320
|
} | null;
|
|
315
321
|
getConfiguratorAccessInfo: () => {
|
|
316
322
|
raw: string;
|
|
323
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
317
324
|
viewMode: boolean;
|
|
318
325
|
revisionId: string | undefined;
|
|
319
326
|
configurationId: string;
|
|
320
327
|
};
|
|
321
328
|
getAdminAccessInfo: () => {
|
|
322
329
|
raw: string;
|
|
330
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
323
331
|
viewMode: boolean;
|
|
324
332
|
revisionId: string | undefined;
|
|
325
333
|
configurationId: string;
|
|
@@ -365,9 +373,9 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
365
373
|
selectIsViewMode: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, boolean>;
|
|
366
374
|
selectInitializationState: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").DomainContextInitializationState>;
|
|
367
375
|
selectComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
368
|
-
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes
|
|
376
|
+
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes>;
|
|
369
377
|
selectStoreRuntimeDependencies: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, {
|
|
370
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
378
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
371
379
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
372
380
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
373
381
|
}>;
|
|
@@ -407,9 +415,9 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
407
415
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
408
416
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
409
417
|
getIsInitialized: () => boolean;
|
|
410
|
-
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes
|
|
418
|
+
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
411
419
|
getStoreRuntimeDependencies: () => {
|
|
412
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
420
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
413
421
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
414
422
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
415
423
|
};
|
|
@@ -474,9 +482,9 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
474
482
|
selectIsViewMode: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, boolean>;
|
|
475
483
|
selectInitializationState: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").DomainContextInitializationState>;
|
|
476
484
|
selectComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
477
|
-
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes
|
|
485
|
+
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes>;
|
|
478
486
|
selectStoreRuntimeDependencies: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, {
|
|
479
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
487
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
480
488
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
481
489
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
482
490
|
}>;
|
|
@@ -516,9 +524,9 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
516
524
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
517
525
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
518
526
|
getIsInitialized: () => boolean;
|
|
519
|
-
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes
|
|
527
|
+
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
520
528
|
getStoreRuntimeDependencies: () => {
|
|
521
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
529
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
522
530
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
523
531
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
524
532
|
};
|
|
@@ -664,17 +672,17 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
664
672
|
selectPrefetchTextureUrls: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly string[]>;
|
|
665
673
|
selectTextLanguages: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly string[]>;
|
|
666
674
|
selectHandlerHashes: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Record<string, string>>;
|
|
667
|
-
selectHandlers: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("
|
|
675
|
+
selectHandlers: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("./index.js").HandlerRegistration<any, any>[]>;
|
|
668
676
|
selectHandlerSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
669
|
-
handlers: Record<string, () => import("
|
|
670
|
-
systemHandlers: Record<string, () => import("
|
|
671
|
-
systemAsyncHandlers: Record<string, () => import("
|
|
677
|
+
handlers: Record<string, () => import("./index.js").PhoenixHandlerDefinition>;
|
|
678
|
+
systemHandlers: Record<string, () => import("./index.js").SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
679
|
+
systemAsyncHandlers: Record<string, () => import("./index.js").SystemPhoenixAsyncHandlerDefinition<unknown, unknown>>;
|
|
672
680
|
hashes: Record<string, string>;
|
|
673
681
|
}>;
|
|
674
682
|
selectElementHashes: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, Record<string, string>>;
|
|
675
|
-
selectElements: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("
|
|
683
|
+
selectElements: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, readonly import("./index.js").ElementRegistration[]>;
|
|
676
684
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
677
|
-
entityElements: Record<string, (props: import("
|
|
685
|
+
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
678
686
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
679
687
|
hashes: Record<string, string>;
|
|
680
688
|
}>;
|
|
@@ -707,17 +715,17 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
707
715
|
getPrefetchTextureUrls: () => readonly string[];
|
|
708
716
|
getTextLanguages: () => readonly string[];
|
|
709
717
|
getHandlerHashes: () => Record<string, string>;
|
|
710
|
-
getHandlers: () => readonly import("
|
|
718
|
+
getHandlers: () => readonly import("./index.js").HandlerRegistration<any, any>[];
|
|
711
719
|
getHandlerSlots: () => {
|
|
712
|
-
handlers: Record<string, () => import("
|
|
713
|
-
systemHandlers: Record<string, () => import("
|
|
714
|
-
systemAsyncHandlers: Record<string, () => import("
|
|
720
|
+
handlers: Record<string, () => import("./index.js").PhoenixHandlerDefinition>;
|
|
721
|
+
systemHandlers: Record<string, () => import("./index.js").SystemPhoenixHandlerDefinition<unknown, unknown>>;
|
|
722
|
+
systemAsyncHandlers: Record<string, () => import("./index.js").SystemPhoenixAsyncHandlerDefinition<unknown, unknown>>;
|
|
715
723
|
hashes: Record<string, string>;
|
|
716
724
|
};
|
|
717
725
|
getElementHashes: () => Record<string, string>;
|
|
718
|
-
getElements: () => readonly import("
|
|
726
|
+
getElements: () => readonly import("./index.js").ElementRegistration[];
|
|
719
727
|
getElementSlots: () => {
|
|
720
|
-
entityElements: Record<string, (props: import("
|
|
728
|
+
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
721
729
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
722
730
|
hashes: Record<string, string>;
|
|
723
731
|
};
|
|
@@ -862,24 +870,28 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
862
870
|
access: {
|
|
863
871
|
selectConfiguratorRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
864
872
|
raw: string;
|
|
873
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
865
874
|
viewMode: boolean;
|
|
866
875
|
revisionId: string | undefined;
|
|
867
876
|
configurationId: string;
|
|
868
877
|
} | null>;
|
|
869
878
|
selectAdminRawAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
870
879
|
raw: string;
|
|
880
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
871
881
|
viewMode: boolean;
|
|
872
882
|
revisionId: string | undefined;
|
|
873
883
|
configurationId: string;
|
|
874
884
|
} | null>;
|
|
875
885
|
selectConfiguratorAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
876
886
|
raw: string;
|
|
887
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
877
888
|
viewMode: boolean;
|
|
878
889
|
revisionId: string | undefined;
|
|
879
890
|
configurationId: string;
|
|
880
891
|
}>;
|
|
881
892
|
selectAdminAccessInfo: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, {
|
|
882
893
|
raw: string;
|
|
894
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
883
895
|
viewMode: boolean;
|
|
884
896
|
revisionId: string | undefined;
|
|
885
897
|
configurationId: string;
|
|
@@ -892,24 +904,28 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
892
904
|
selectAdminConfigurationId: import("@salsita-ai/common/utils").Selector<import("./index.js").AccessSelectorState, string>;
|
|
893
905
|
getConfiguratorRawAccessInfo: () => {
|
|
894
906
|
raw: string;
|
|
907
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
895
908
|
viewMode: boolean;
|
|
896
909
|
revisionId: string | undefined;
|
|
897
910
|
configurationId: string;
|
|
898
911
|
} | null;
|
|
899
912
|
getAdminRawAccessInfo: () => {
|
|
900
913
|
raw: string;
|
|
914
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
901
915
|
viewMode: boolean;
|
|
902
916
|
revisionId: string | undefined;
|
|
903
917
|
configurationId: string;
|
|
904
918
|
} | null;
|
|
905
919
|
getConfiguratorAccessInfo: () => {
|
|
906
920
|
raw: string;
|
|
921
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
907
922
|
viewMode: boolean;
|
|
908
923
|
revisionId: string | undefined;
|
|
909
924
|
configurationId: string;
|
|
910
925
|
};
|
|
911
926
|
getAdminAccessInfo: () => {
|
|
912
927
|
raw: string;
|
|
928
|
+
access: import("@salsita-ai/contracts/api").AccessLevel;
|
|
913
929
|
viewMode: boolean;
|
|
914
930
|
revisionId: string | undefined;
|
|
915
931
|
configurationId: string;
|
|
@@ -955,9 +971,9 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
955
971
|
selectIsViewMode: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, boolean>;
|
|
956
972
|
selectInitializationState: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").DomainContextInitializationState>;
|
|
957
973
|
selectComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
958
|
-
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes
|
|
974
|
+
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes>;
|
|
959
975
|
selectStoreRuntimeDependencies: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, {
|
|
960
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
976
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
961
977
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
962
978
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
963
979
|
}>;
|
|
@@ -997,9 +1013,9 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
997
1013
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
998
1014
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
999
1015
|
getIsInitialized: () => boolean;
|
|
1000
|
-
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes
|
|
1016
|
+
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
1001
1017
|
getStoreRuntimeDependencies: () => {
|
|
1002
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
1018
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
1003
1019
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
1004
1020
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
1005
1021
|
};
|
|
@@ -1064,9 +1080,9 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
1064
1080
|
selectIsViewMode: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, boolean>;
|
|
1065
1081
|
selectInitializationState: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").DomainContextInitializationState>;
|
|
1066
1082
|
selectComponentOptics: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, readonly import("../index.js").AnyDomainComponentOptic[]>;
|
|
1067
|
-
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes
|
|
1083
|
+
selectComponentReaderIndexes: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, import("./index.js").ComponentReaderIndexes>;
|
|
1068
1084
|
selectStoreRuntimeDependencies: import("@salsita-ai/common/utils").Selector<import("./index.js").DomainContextSelectorState, {
|
|
1069
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
1085
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
1070
1086
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
1071
1087
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
1072
1088
|
}>;
|
|
@@ -1106,9 +1122,9 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
1106
1122
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
1107
1123
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
1108
1124
|
getIsInitialized: () => boolean;
|
|
1109
|
-
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes
|
|
1125
|
+
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
1110
1126
|
getStoreRuntimeDependencies: () => {
|
|
1111
|
-
componentReaderIndexes: import("./index.js").ComponentReaderIndexes
|
|
1127
|
+
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
1112
1128
|
domainExpressions: import("../index.js").AnyExpressions;
|
|
1113
1129
|
allowedRootEntityTypes: import("../index.js").AnyAllowedRootEntityTypes;
|
|
1114
1130
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ImplementationError } from './implementation-error.js';
|
|
2
|
+
/**
|
|
3
|
+
* Gathers the implementation errors of one application start. Checks that do not depend on each
|
|
4
|
+
* other run through `attempt`, so that the failure of one does not hide the failures of the others.
|
|
5
|
+
*/
|
|
6
|
+
export interface ImplementationErrorCollector {
|
|
7
|
+
/**
|
|
8
|
+
* Runs one independent check. An implementation error it throws is recorded and `fallback` is
|
|
9
|
+
* returned, so the checks after it still run. Anything else it throws propagates.
|
|
10
|
+
*/
|
|
11
|
+
readonly attempt: <T>(check: () => T, fallback: T) => T;
|
|
12
|
+
readonly add: (error: ImplementationError) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Throws the recorded errors as one {@link ImplementationErrors}, in the order they were
|
|
15
|
+
* recorded. Does nothing when there are none.
|
|
16
|
+
*/
|
|
17
|
+
readonly throwIfAny: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const createImplementationErrorCollector: () => ImplementationErrorCollector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isImplementationError as r}from"./implementation-error.js";import{ImplementationErrors as t,isImplementationErrors as e}from"./implementation-errors.js";export const createImplementationErrorCollector=()=>{let o=[],n=r=>{o.push(r)};return{add:n,attempt:(t,o)=>{try{return t()}catch(t){if(e(t))return t.errors.forEach(n),o;if(r(t))return n(t),o;throw t}},throwIfAny:()=>{if(o.length>0)throw new t(o)}}};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What kind of mistake an {@link ImplementationError} reports. A host that shows the error, such as
|
|
3
|
+
* a webhook log, reads the code instead of parsing the message.
|
|
4
|
+
*
|
|
5
|
+
* - `MISSING_EXPORT`: a convention file exports nothing where its folder requires an export.
|
|
6
|
+
* - `INVALID_EXPORT`: a convention file exports a value that does not match its folder's contract.
|
|
7
|
+
* - `MISSING_IMPLEMENTATION`: the spec declares something that no project file implements.
|
|
8
|
+
* - `DUPLICATE_DEFINITION`: two files define what only one may define.
|
|
9
|
+
* - `INVALID_CONFIGURATION`: the application's configuration is incomplete or contradictory.
|
|
10
|
+
* - `STARTUP_FAILED`: project or SDK code threw while the application was starting.
|
|
11
|
+
*/
|
|
12
|
+
export type ImplementationErrorCode = 'MISSING_EXPORT' | 'INVALID_EXPORT' | 'MISSING_IMPLEMENTATION' | 'DUPLICATE_DEFINITION' | 'INVALID_CONFIGURATION' | 'STARTUP_FAILED';
|
|
13
|
+
/** The parts an {@link ImplementationError} is made of. Its message is built from them. */
|
|
14
|
+
export interface ImplementationErrorProps {
|
|
15
|
+
readonly code: ImplementationErrorCode;
|
|
16
|
+
/** Project-relative path of the file to fix, or `null` when the mistake belongs to no single file. */
|
|
17
|
+
readonly origin: string | null;
|
|
18
|
+
/** What went wrong, without the file name and without a full stop. */
|
|
19
|
+
readonly problem: string;
|
|
20
|
+
/** What the SDK requires at that place, when the mistake is a wrong value. */
|
|
21
|
+
readonly expected?: string;
|
|
22
|
+
/** What it found instead. It is part of the message only together with `expected`. */
|
|
23
|
+
readonly received?: string;
|
|
24
|
+
/** What the developer can do to fix it, as one or more full sentences. */
|
|
25
|
+
readonly fix: string;
|
|
26
|
+
/** What was thrown, when the error reports a failure of other code. */
|
|
27
|
+
readonly cause?: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A mistake in a project's implementation that stops its application from starting: a convention
|
|
31
|
+
* file with the wrong export, a definition made twice, a project file that throws.
|
|
32
|
+
*
|
|
33
|
+
* The checks the domain runtime runs on a project's files throw it, so that every host of the
|
|
34
|
+
* runtime (the web component, the editor, a webhook) can tell it from a defect of its own and report
|
|
35
|
+
* it in its own medium. `message` is the whole report as one text; the fields hold its parts.
|
|
36
|
+
*/
|
|
37
|
+
export declare class ImplementationError extends Error {
|
|
38
|
+
readonly code: ImplementationErrorCode;
|
|
39
|
+
readonly origin: string | null;
|
|
40
|
+
readonly problem: string;
|
|
41
|
+
readonly expected: string | null;
|
|
42
|
+
readonly received: string | null;
|
|
43
|
+
readonly fix: string;
|
|
44
|
+
constructor(props: ImplementationErrorProps);
|
|
45
|
+
}
|
|
46
|
+
export declare const isImplementationError: (error: unknown) => error is ImplementationError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class ImplementationError extends Error{code;origin;problem;expected;received;fix;constructor(e){let i,r,o;super((i=null===e.origin?"":` in ${e.origin}`,r=void 0===e.received?"":`, but got ${e.received}`,o=void 0===e.expected?"":`: expected ${e.expected}${r}`,`${e.problem}${i}${o}. ${e.fix}`),void 0===e.cause?void 0:{cause:e.cause}),this.name="ImplementationError",this.code=e.code,this.origin=e.origin,this.problem=e.problem,this.expected=e.expected??null,this.received=e.received??null,this.fix=e.fix}}export const isImplementationError=e=>e instanceof ImplementationError;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ImplementationError } from './implementation-error.js';
|
|
2
|
+
/**
|
|
3
|
+
* Every {@link ImplementationError} one start of an application found, reported together, so that a
|
|
4
|
+
* developer with four wrong files reads four errors instead of fixing them one reload at a time.
|
|
5
|
+
*
|
|
6
|
+
* The message of a list with one error is that error's message. The message of a longer list is a
|
|
7
|
+
* headline with the count, followed by one numbered line per error in the order of `errors`.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ImplementationErrors extends Error {
|
|
10
|
+
readonly errors: readonly ImplementationError[];
|
|
11
|
+
constructor(errors: readonly ImplementationError[]);
|
|
12
|
+
}
|
|
13
|
+
export declare const isImplementationErrors: (error: unknown) => error is ImplementationErrors;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class ImplementationErrors extends Error{errors;constructor(r){super((r=>{let[e]=r;return 1===r.length&&e?e.message:[`The application cannot start: ${r.length} implementation errors were found.`,...r.map((r,e)=>`${e+1}. ${r.message}`)].join("\n")})(r)),this.name="ImplementationErrors",this.errors=r}}export const isImplementationErrors=r=>r instanceof ImplementationErrors;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type ImplementationErrorCode, type ImplementationErrorProps, ImplementationError, isImplementationError, } from './implementation-error.js';
|
|
2
|
+
export { type ImplementationErrorCollector, createImplementationErrorCollector, } from './implementation-error-collector.js';
|
|
3
|
+
export { ImplementationErrors, isImplementationErrors } from './implementation-errors.js';
|
|
4
|
+
export { type StartupStage, toImplementationErrors } from './to-implementation-errors.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ImplementationError,isImplementationError}from"./implementation-error.js";export{createImplementationErrorCollector}from"./implementation-error-collector.js";export{ImplementationErrors,isImplementationErrors}from"./implementation-errors.js";export{toImplementationErrors}from"./to-implementation-errors.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ImplementationErrors } from './implementation-errors.js';
|
|
2
|
+
/** The step of an application start during which a failure that the SDK did not raise itself was caught. */
|
|
3
|
+
export type StartupStage = 'import' | 'initialize' | 'render';
|
|
4
|
+
/**
|
|
5
|
+
* Turns whatever stopped an application from starting into a list of implementation errors, so that
|
|
6
|
+
* a host handles one shape. A list is passed through and a single implementation error becomes a
|
|
7
|
+
* list of one. Anything else, such as a project file that throws while it loads, becomes one
|
|
8
|
+
* `STARTUP_FAILED` error that names the stage and keeps what was thrown as its `cause`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const toImplementationErrors: (error: unknown, stage: StartupStage) => ImplementationErrors;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ImplementationError as e,isImplementationError as i}from"./implementation-error.js";import{ImplementationErrors as t,isImplementationErrors as r}from"./implementation-errors.js";let n={import:"while its code was loading",initialize:"while its runtime was initializing",render:"while it was rendering"};export const toImplementationErrors=(o,a)=>r(o)?o:i(o)?new t([o]):new t([new e({code:"STARTUP_FAILED",origin:null,problem:`The application failed ${n[a]}: ${o instanceof Error?o.message:String(o)}`,fix:"Read the stack trace of the cause to find the file that threw, and fix the code it points to.",cause:o})]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './domain-runtime.js';
|
|
2
2
|
export * from './domain-context/index.js';
|
|
3
3
|
export * from './domain-services/index.js';
|
|
4
|
+
export { type ImplementationErrorCode, type ImplementationErrorProps, type StartupStage, ImplementationError, ImplementationErrors, isImplementationError, isImplementationErrors, toImplementationErrors, } from './errors/index.js';
|
|
4
5
|
export * from './spec/index.js';
|
|
5
6
|
export * from './environment/index.js';
|
|
6
7
|
export * from './access/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./domain-runtime.js";export*from"./domain-context/index.js";export*from"./domain-services/index.js";export*from"./spec/index.js";export*from"./environment/index.js";export*from"./access/index.js";export*from"./overrides/index.js";export*from"./loaded-data/index.js";export*from"./domain-data/index.js";export*from"./session-context/index.js";export*from"./web-component/index.js";
|
|
1
|
+
export*from"./domain-runtime.js";export*from"./domain-context/index.js";export*from"./domain-services/index.js";export{ImplementationError,ImplementationErrors,isImplementationError,isImplementationErrors,toImplementationErrors}from"./errors/index.js";export*from"./spec/index.js";export*from"./environment/index.js";export*from"./access/index.js";export*from"./overrides/index.js";export*from"./loaded-data/index.js";export*from"./domain-data/index.js";export*from"./session-context/index.js";export*from"./web-component/index.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AnonymousExpression, type AnyAliasMap, type Violation } from '../../core/index.js';
|
|
2
|
+
import { type AnyInvariant, type ProjectModule } from './module-checks/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `$violations` expression of every entity type that has invariants, keyed by entity type.
|
|
5
|
+
*
|
|
6
|
+
* The entity and data types are erased: the expression only passes its arguments on to the invariants,
|
|
7
|
+
* and `DomainBuilder.withExpressions` accepts it for any project.
|
|
8
|
+
*/
|
|
9
|
+
type ViolationExpressions = Readonly<Record<string, {
|
|
10
|
+
readonly $violations: AnonymousExpression<any, any, any, any, any, any, ReadonlyArray<Violation<string>>>;
|
|
11
|
+
}>>;
|
|
12
|
+
/**
|
|
13
|
+
* Creates the `$violations` expressions of a domain from its invariants.
|
|
14
|
+
*
|
|
15
|
+
* Takes the invariants of the `src/invariants/` files, as the generated barrel lists them, after
|
|
16
|
+
* checking each file against the folder's contract. An invariant declared for an alias applies to
|
|
17
|
+
* every entity type of the alias. The `$violations` expression of an entity type returns the
|
|
18
|
+
* violations of all its invariants: those of `commonInvariants` first, then those of the files in
|
|
19
|
+
* the order of the barrel.
|
|
20
|
+
*
|
|
21
|
+
* @param commonInvariants Invariants the SDK adds to the domain, such as the ones every admin domain has.
|
|
22
|
+
*/
|
|
23
|
+
export declare const createViolationExpressions: (aliasMap: AnyAliasMap, modules: readonly ProjectModule[], commonInvariants?: Readonly<Record<string, readonly AnyInvariant[]>>) => ViolationExpressions;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{expandAlias as e}from"../../core/index.js";import{resolveInvariantModules as t}from"./module-checks/index.js";export const createViolationExpressions=(o,r,l={})=>{let f={};for(let i of[l,t(r)])for(let[t,r]of Object.entries(i))for(let l of e(o,t))f[l]=[...f[l]??[],...r];let i={};for(let[e,t]of Object.entries(f))i[e]={$violations:{evaluate:(e,o,r)=>t.flatMap(t=>t.evaluate(e,o,r)),meta:{}}};return i};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
export * from './selectors.js';
|
|
2
2
|
export type * from './types.js';
|
|
3
3
|
export * from './actions.js';
|
|
4
|
+
export * from './create-violation-expressions.js';
|
|
4
5
|
export * from './initialize.js';
|
|
5
|
-
export * from './invariant-builder.js';
|
|
6
6
|
export * from './memoize-expression.js';
|
|
7
|
+
export { type PhoenixEntityElementProps, type PhoenixEntityElementRegistration, type PhoenixLayoutElementRegistration, type PhoenixIconRegistration, type ElementRegistration, type CustomPhoenixEntityElementProps, type PhoenixLayoutElementDefinition, type PhoenixEntityElementDefinition, type CreateCustomPhoenixLayoutElement, type CreateCustomPhoenixEntityElement, createPhoenixLayoutElement, createPhoenixEntityElement, createCustomPhoenixLayoutElement, createCustomPhoenixEntityElement, resolveElementModule, resolveElementModules, type PhoenixHandlerDefinition, type SystemPhoenixHandlerDefinition, type PhoenixHandlerRegistration, type SystemPhoenixHandlerRegistration, type SystemPhoenixAsyncHandlerDefinition, type SystemPhoenixAsyncHandlerRegistration, type HandlerRegistration, type CreatePhoenixHandler, createPhoenixHandler, createSystemPhoenixHandler, createSystemPhoenixAsyncHandler, resolveHandlerModule, resolveHandlerModules, type ProjectModule, resolveActionModules, resolveComponentOpticModules, type ExpressionModule, resolveExpressionModules, resolveImportedTransformers, resolveTransformerModule, resolveTransformerModules, resolveInvariantModules, } from './module-checks/index.js';
|
|
7
8
|
export * from './prepare-action-implementations.js';
|
|
8
9
|
export * from './prepare-domain-expressions.js';
|
|
9
|
-
export * from './resolve-action-modules.js';
|
|
10
|
-
export * from './resolve-component-optic-modules.js';
|
|
11
|
-
export * from './resolve-expression-modules.js';
|
|
12
|
-
export * from './resolve-invariant-modules.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./selectors.js";export*from"./actions.js";export*from"./
|
|
1
|
+
export*from"./selectors.js";export*from"./actions.js";export*from"./create-violation-expressions.js";export*from"./initialize.js";export*from"./memoize-expression.js";export{createPhoenixLayoutElement,createPhoenixEntityElement,createCustomPhoenixLayoutElement,createCustomPhoenixEntityElement,resolveElementModule,resolveElementModules,createPhoenixHandler,createSystemPhoenixHandler,createSystemPhoenixAsyncHandler,resolveHandlerModule,resolveHandlerModules,resolveActionModules,resolveComponentOpticModules,resolveExpressionModules,resolveImportedTransformers,resolveTransformerModule,resolveTransformerModules,resolveInvariantModules}from"./module-checks/index.js";export*from"./prepare-action-implementations.js";export*from"./prepare-domain-expressions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SessionRole as e}from"@salsita-ai/contracts/api";import{resolveElementModules as
|
|
1
|
+
import{SessionRole as e}from"@salsita-ai/contracts/api";import{resolveComponentOpticModules as t,resolveElementModules as a,resolveHandlerModules as n,resolveImportedTransformers as o,resolveTransformerModules as i}from"./module-checks/index.js";export const initializeSpec=s=>{let r=s.adminDomain.presets[0];if(!r)throw Error("Cannot register application spec because admin preset is required.");let m=n(s.handlers),c=a(s.elements),d=(e=>{let t={};for(let a of e)t[a.name]=(void 0)??a.name;return t})(m),l=(e=>{let t={},a=0;for(let n of e)if("entity"===n.type||"layout"===n.type)t[n.name]=(void 0)??n.name;else{let e=`icon:${a}`;t[e]=(void 0)??`${e}:${n.elements.length}`,a+=1}return t})(c),p=i(s.transformers?.importedTransformers??[]),y=s.transformers?.specTransformers??[];return{version:s.version,dataConfig:s.dataSpec??null,chunks:s.chunks,publishedDataHash:s.publishedDataHash,initialPublishedData:s.initialPublishedData,canCreate:s.features?.acl?.canCreate??Object.values(e),enableAdminRelease:s.features?.enableAdminRelease??!1,textLanguages:s.domain.textLanguages??s.adminDomain.textLanguages??["en"],baseResourcesUrl:s.resources?.baseResourcesUrl??s.defaultEnvs?.resourcesUrl??"",configurator:{factory:s.domain.domainFactory,presets:s.domain.presets,aliasMap:s.domain.domainFactory.context.aliasMap,entityReflections:s.domain.domainFactory.context.entityReflections,$entityReflections:s.domain.domainFactory.context.$entityReflections,expressions:s.domain.domainFactory.context.expressions,actions:s.domain.domainFactory.context.actions,actionImplementations:s.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:s.domain.domainFactory.context.allowedRootEntityTypes,migrate:s.domain.domainFactory.context.migrate,componentOptics:t(s.domain.componentOptics),createTransformers:e=>o(p,y,e),navigationStates:s.navigation?.navigationStates??[],viewStates:s.navigation?.viewStates??[],toolStates:s.navigation?.toolStates??[],exportStates:s.navigation?.exportStates??[],handlers:m,handlerHashes:d,elements:c,elementHashes:l,appLoader:s.ui?.appLoader??"universal",preview:s.ui?.preview??"auto",alwaysExpand:s.ui?.alwaysExpand??!1,theme:s.ui?.theme??{},assistant:s.assistant??null,deploymentQueryDisabled:s.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:s.resources?.prefetchTextureUrls??[],modelVersion:s.domain.domainFactory.modelVersion},admin:{factory:s.adminDomain.domainFactory,modelVersion:s.adminDomain.domainFactory.modelVersion,aliasMap:s.adminDomain.domainFactory.context.aliasMap,entityReflections:s.adminDomain.domainFactory.context.entityReflections,$entityReflections:s.adminDomain.domainFactory.context.$entityReflections,expressions:s.adminDomain.domainFactory.context.expressions,actions:s.adminDomain.domainFactory.context.actions,actionImplementations:s.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:s.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:s.adminDomain.domainFactory.context.migrate,preset:r,componentOptics:t(s.adminDomain.componentOptics),navigationStates:s.adminNavigation?.navigationStates??[],viewStates:s.adminNavigation?.viewStates??[],handlers:m,handlerHashes:d,elements:c,elementHashes:l}}};
|
package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SvgIconProps } from '@mui/material';
|
|
2
2
|
import type { PropsWithChildren, ReactNode } from 'react';
|
|
3
3
|
import type { ExtendedJsonSchema } from '@salsita-ai/common/utils';
|
|
4
|
-
import type { DomainEntityId } from '
|
|
5
|
-
import { type ProjectModule } from '
|
|
4
|
+
import type { DomainEntityId } from '../../../core/index.js';
|
|
5
|
+
import { type ProjectModule } from './project-modules.js';
|
|
6
6
|
export interface PhoenixEntityElementProps {
|
|
7
7
|
entityId: DomainEntityId<string>;
|
|
8
8
|
children?: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,isRecord as t,resolveListModule as n}from"./project-modules.js";export const systemElementRegistry={layoutElements:{},entityElements:{}};export const createPhoenixLayoutElement=e=>(systemElementRegistry.layoutElements[e.schema.properties.kind.enum[0]]=e.component,e.component);export const createCustomPhoenixLayoutElement=(e,t)=>({type:"layout",name:e,element:t});export const createPhoenixEntityElement=e=>(systemElementRegistry.entityElements[e.schema.properties.kind.enum[0]]=e.component,e.component);export const createCustomPhoenixEntityElement=(e,t)=>({type:"entity",name:e,element:t});let o={expected:"an element registration, or an array of them",fix:`Create it with phx.frontend.createCustomPhoenixLayoutElement(...) or phx.frontend.createCustomPhoenixEntityElement(...), ${e}.`},r=e=>!!t(e)&&("icon"===e.type?Array.isArray(e.elements):("entity"===e.type||"layout"===e.type)&&"string"==typeof e.name&&"function"==typeof e.element);export const resolveElementModule=e=>n(e,o,r);export const resolveElementModules=e=>e.flatMap(resolveElementModule);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,isRecord as t,resolveListModule as o}from"./project-modules.js";export const createPhoenixHandler=(e,t)=>({type:"phoenix",name:e,handler:t});export const createSystemPhoenixHandler=(e,t)=>({type:"system",name:e,handler:t});export const createSystemPhoenixAsyncHandler=(e,t)=>({type:"system-async",name:e,handler:t});let r={expected:"a handler registration, or an array of them",fix:`Create it with phx.frontend.createPhoenixHandler(...) or one of the other phx.frontend.create…Handler(...) factories, ${e}.`},n=e=>t(e)&&("phoenix"===e.type||"system"===e.type||"system-async"===e.type)&&"string"==typeof e.name&&"function"==typeof e.handler;export const resolveHandlerModule=e=>o(e,r,n);export const resolveHandlerModules=e=>e.flatMap(resolveHandlerModule);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { type PhoenixEntityElementProps, type PhoenixEntityElementRegistration, type PhoenixLayoutElementRegistration, type PhoenixIconRegistration, type ElementRegistration, type CustomPhoenixEntityElementProps, type PhoenixLayoutElementDefinition, type PhoenixEntityElementDefinition, type CreateCustomPhoenixLayoutElement, type CreateCustomPhoenixEntityElement, createPhoenixLayoutElement, createPhoenixEntityElement, createCustomPhoenixLayoutElement, createCustomPhoenixEntityElement, resolveElementModule, resolveElementModules, systemElementRegistry, } from './element-registration.js';
|
|
2
|
+
export { type PhoenixHandlerDefinition, type SystemPhoenixHandlerDefinition, type PhoenixHandlerRegistration, type SystemPhoenixHandlerRegistration, type SystemPhoenixAsyncHandlerDefinition, type SystemPhoenixAsyncHandlerRegistration, type HandlerRegistration, type CreatePhoenixHandler, createPhoenixHandler, createSystemPhoenixHandler, createSystemPhoenixAsyncHandler, resolveHandlerModule, resolveHandlerModules, } from './handler-registration.js';
|
|
3
|
+
export { type ProjectModule } from './project-modules.js';
|
|
4
|
+
export { resolveActionModules } from './resolve-action-modules.js';
|
|
5
|
+
export { resolveComponentOpticModules } from './resolve-component-optic-modules.js';
|
|
6
|
+
export { type ExpressionModule, resolveExpressionModules } from './resolve-expression-modules.js';
|
|
7
|
+
export { resolveImportedTransformers, resolveTransformerModule, resolveTransformerModules, } from './resolve-imported-transformers.js';
|
|
8
|
+
export { type AnyInvariant, resolveInvariantModules } from './resolve-invariant-modules.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createPhoenixLayoutElement,createPhoenixEntityElement,createCustomPhoenixLayoutElement,createCustomPhoenixEntityElement,resolveElementModule,resolveElementModules,systemElementRegistry}from"./element-registration.js";export{createPhoenixHandler,createSystemPhoenixHandler,createSystemPhoenixAsyncHandler,resolveHandlerModule,resolveHandlerModules}from"./handler-registration.js";export{resolveActionModules}from"./resolve-action-modules.js";export{resolveComponentOpticModules}from"./resolve-component-optic-modules.js";export{resolveExpressionModules}from"./resolve-expression-modules.js";export{resolveImportedTransformers,resolveTransformerModule,resolveTransformerModules}from"./resolve-imported-transformers.js";export{resolveInvariantModules}from"./resolve-invariant-modules.js";
|
package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ImplementationError } from '../../errors/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* The default export of one file in a project convention folder (`src/elements/`, `src/handlers/`,
|
|
3
4
|
* `src/expressions/`, …), paired with the project-relative path it was imported from.
|
|
@@ -17,7 +18,13 @@ export interface ProjectModuleContract {
|
|
|
17
18
|
}
|
|
18
19
|
export declare const SHARED_FOLDER_HINT = "or move the file to an underscore-prefixed folder such as src/_shared/ when it is shared code";
|
|
19
20
|
export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The error of a file whose default export does not match its folder's contract. `received` is the
|
|
23
|
+
* value the message reports: the export itself, or the item of an array export that fails. The
|
|
24
|
+
* code is `MISSING_EXPORT` when the file has no default export at all, and `INVALID_EXPORT`
|
|
25
|
+
* otherwise, also when an item of an array export is `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const createContractError: (module: ProjectModule, contract: ProjectModuleContract, received: unknown) => ImplementationError;
|
|
21
28
|
/**
|
|
22
29
|
* Checks a file of a folder whose contract is one item or an array of them, and returns its items.
|
|
23
30
|
* The first item that fails the check is the value the error reports.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ImplementationError as e}from"../../errors/index.js";export const SHARED_FOLDER_HINT="or move the file to an underscore-prefixed folder such as src/_shared/ when it is shared code";export const isRecord=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);export const createContractError=(r,t,o)=>new e({code:void 0===r.exports?"MISSING_EXPORT":"INVALID_EXPORT",origin:r.origin,problem:"Invalid default export",expected:t.expected,received:(e=>{if(void 0===e)return"nothing (the file has no default export)";if(null===e)return"null";if("function"==typeof e)return e.name?`the function "${e.name}"`:"an anonymous function";if(Array.isArray(e))return`an array of ${e.length} item(s)`;if(isRecord(e)){let r=Object.keys(e);return r.length>0?`an object with the keys ${r.join(", ")}`:"an empty object"}return`the ${typeof e} ${JSON.stringify(e)}`})(o),fix:`Every file in this folder is loaded by convention, so each one must default-export that shape. ${t.fix}`});export const resolveListModule=(e,r,t)=>{let o=Array.isArray(e.exports)?e.exports:[e.exports],n=[];for(let i of o){if(!t(i))throw createContractError(e,r,i);n.push(i)}return n};
|