@salsita-ai/sdk 0.50.0-develop.3ca14b02a8 → 0.50.0-develop.3f44338ee8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application/index.d.ts +1 -0
- package/dist/application/index.js +1 -1
- package/dist/application/mount-application.d.ts +1 -1
- package/dist/application/mount-application.js +1 -1
- package/dist/application/mount-configurator.d.ts +19 -0
- package/dist/application/mount-configurator.js +1 -0
- package/dist/application/mounted-application-runtime.d.ts +4 -0
- package/dist/application/mounted-application-runtime.js +1 -0
- package/dist/application/register-web-component.d.ts +2 -0
- package/dist/application/register-web-component.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +11 -5
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
- package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
- package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
- package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
- package/dist/application-spec/generate-application/implementations/phx.js +1 -0
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +3 -3
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +7 -4
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +17 -4
- package/dist/application-spec/generate-application/runtime/application-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/application-spec-slice.d.ts +71 -0
- package/dist/application-spec/generate-application/runtime/application-spec-slice.js +1 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +3 -3
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +7 -5
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/create-application.d.ts +57 -0
- package/dist/application-spec/generate-application/runtime/create-application.js +1 -0
- package/dist/application-spec/generate-application/runtime/index.d.ts +8 -0
- package/dist/application-spec/generate-application/runtime/index.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +9 -3
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/spec-runtime.d.ts +21 -0
- package/dist/application-spec/generate-application/runtime/spec-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime-spec/encoded-runtime-spec.d.ts +3 -2
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +44 -9
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.js +1 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/app-loader-content/index.d.ts +0 -1
- package/dist/configurator/app-loader-content/index.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +3 -5
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +0 -6
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -1
- package/dist/configurator/configuration-not-found-page/index.d.ts +2 -2
- package/dist/configurator/configuration-not-found-page/index.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +3 -3
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -1
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +0 -5
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -1
- package/dist/configurator/configurator-error-page/index.d.ts +1 -2
- package/dist/configurator/configurator-error-page/index.js +1 -1
- package/dist/configurator/index.d.ts +9 -2
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
- package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
- package/dist/configurator/ui/preset-layout/PresetUi.d.ts +0 -2
- package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
- package/dist/configurator/ui/preset-layout/index.js +1 -1
- package/dist/docs/index.json +34 -1
- package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
- package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
- package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
- package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
- package/dist/docs/phoenix/configurator-interface.mdx +5 -4
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +4 -2
- package/dist/domain/application/configurator-builder.d.ts +7 -1
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/index.d.ts +1 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/standard-properties.js +1 -1
- package/dist/domain/application/web-component-property.d.ts +3 -1
- package/dist/domain/application/web-component-property.js +1 -1
- package/dist/domain/domain-builder.d.ts +9 -3
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-runtime/application.d.ts +39 -0
- package/dist/domain/domain-runtime/application.js +1 -0
- package/dist/domain/domain-runtime/domain-runtime.d.ts +36 -4
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +2 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
- package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
- package/dist/domain/domain-runtime/web-component/actions.js +1 -1
- package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
- package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
- package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
- package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +5 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +2 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
- package/dist/editor/domain-editors/use-implementation-files.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 +11 -5
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
- package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
- package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
- package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
- package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
- package/dist/react-sdk/application-runtime/index.d.ts +2 -0
- package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
- package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
- package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
- package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
- package/dist/react-sdk/application-runtime/loading/types.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +218 -8
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/elements/index.d.ts +0 -1
- package/dist/react-sdk/index.d.ts +1 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
- package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
- package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
- package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
- package/dist/react-sdk/loading-state/index.d.ts +4 -2
- package/dist/react-sdk/loading-state/index.js +1 -1
- package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
- package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
- package/dist/{configurator/configuration-not-found-page → react-sdk/page-elements}/create-configuration-not-found-page.d.ts +7 -1
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
- package/dist/{configurator/configurator-error-page → react-sdk/page-elements}/create-configurator-error-page.d.ts +6 -1
- package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
- package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
- package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
- package/dist/react-sdk/page-elements/index.d.ts +6 -0
- package/dist/react-sdk/page-elements/index.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/package.json +3 -3
- package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +0 -5
- package/dist/configurator/app-loader-content/app-loader-content-name.js +0 -1
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +0 -1
- package/dist/configurator/configurator-error-page/create-configurator-error-page.js +0 -1
- package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -37
- package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
- /package/dist/react-sdk/{elements/configurator-error-page-props.js → application-runtime/host-properties/types.js} +0 -0
- /package/dist/react-sdk/{elements → page-elements}/configurator-error-page-props.d.ts +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { ImportedTransformer } from '#package/domain';
|
|
2
|
+
import type { ImplementationErrorCollector, ImportedTransformer, ProjectModule } from '#package/domain';
|
|
3
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
4
|
import type { RuntimeSpec } from '../../runtime-spec/index.js';
|
|
5
|
-
import { FactoryDataRuntime } from '../factory-data/index.js';
|
|
5
|
+
import type { FactoryDataRuntime } from '../factory-data/index.js';
|
|
6
6
|
import { type MigrationModules, MigrationRuntime } from '../migrations/index.js';
|
|
7
7
|
import { ActionsRuntime } from '../sections/actions-runtime.js';
|
|
8
8
|
import { AssistantRuntime } from '../sections/assistant-runtime.js';
|
|
9
9
|
import { ComponentOptics } from '../sections/component-optic.js';
|
|
10
|
-
import {
|
|
10
|
+
import { ExpressionRuntime, type InvariantImplementations, type MissingExpression } from '../sections/expression-runtime.js';
|
|
11
11
|
import { PresetRuntime } from '../sections/preset-runtime.js';
|
|
12
12
|
import { ThemeRuntime } from '../sections/theme-runtime.js';
|
|
13
13
|
import { TransformersRuntime } from '../sections/transformers-runtime.js';
|
|
14
14
|
import type { SpecCodeMap } from '../spec-code/index.js';
|
|
15
|
-
import { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
|
|
15
|
+
import type { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
|
|
16
16
|
import { ConfiguratorStatesRuntime } from './states-runtime.js';
|
|
17
17
|
export type ConfiguratorRuntime = Branded<'ConfiguratorRuntime', {
|
|
18
18
|
readonly modelRuntime: ConfiguratorModelRuntime;
|
|
@@ -33,5 +33,7 @@ export type ConfiguratorRuntimeResult = {
|
|
|
33
33
|
} | {
|
|
34
34
|
readonly ok: false;
|
|
35
35
|
readonly missingExpressions: readonly MissingExpression[];
|
|
36
|
+
/** The migrations the migration modules do not export, as `migrationRuntime.missingMigrations` lists them. */
|
|
37
|
+
readonly missingMigrations: readonly string[];
|
|
36
38
|
};
|
|
37
|
-
export declare const ConfiguratorRuntime: (spec: RuntimeSpec, referenceStore: RuntimeReferenceStore,
|
|
39
|
+
export declare const ConfiguratorRuntime: (spec: RuntimeSpec, referenceStore: RuntimeReferenceStore, expressionModules: readonly ProjectModule[], importedTransformers: readonly ImportedTransformer[], invariantImplementations: InvariantImplementations | undefined, migrationModules: MigrationModules, code: SpecCodeMap | undefined, errors: ImplementationErrorCollector) => ConfiguratorRuntimeResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as t}from"@salsita-ai/common/utils";import{
|
|
1
|
+
import{Branded as t}from"@salsita-ai/common/utils";import{MigrationRuntime as e}from"../migrations/index.js";import{ActionsRuntime as i}from"../sections/actions-runtime.js";import{AssistantRuntime as o}from"../sections/assistant-runtime.js";import{ComponentOptics as s}from"../sections/component-optic.js";import{ExpressionRuntime as r}from"../sections/expression-runtime.js";import{PresetRuntime as n}from"../sections/preset-runtime.js";import{ThemeRuntime as m}from"../sections/theme-runtime.js";import{TransformersRuntime as c}from"../sections/transformers-runtime.js";import{ConfiguratorSpecRuntime as u}from"./configurator-spec-runtime.js";import{ConfiguratorStatesRuntime as p}from"./states-runtime.js";export const ConfiguratorRuntime=(a,f,g,R,j,l,x,d)=>{let{modelRuntime:k,factoryDataRuntime:E}=u(a,f,x),S=r(a.configurator,f,g,"configuratorExpressionRuntime",j,x,d),h=e(f,{referenceScope:"configuratorRuntime/migrationRuntime",resolvedVersions:a.configurator.resolvedVersions,latestEntities:k.entities,migrationModules:l});return S.ok?{ok:!0,runtime:t({modelRuntime:k,componentOptics:s(f,{components:a.configurator.components,referenceScope:"configuratorRuntime/componentOptics",modelRuntime:k,code:x}),presetRuntime:n(f,{referenceScope:"configuratorRuntime/presetRuntime",presets:a.configurator.presets.presets}),statesRuntime:p(a,f),expressionRuntime:S.runtime,themeRuntime:m(a,f),transformersRuntime:c(a,f,R),assistantRuntime:o(a,f),actionsRuntime:i(a.configurator.actions,f),migrationRuntime:h,factoryDataRuntime:E})}:{ok:!1,missingExpressions:S.missing,missingMigrations:h.missingMigrations}};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
3
|
+
import type { RuntimeSpec } from '../../runtime-spec/index.js';
|
|
4
|
+
import { FactoryDataRuntime } from '../factory-data/index.js';
|
|
5
|
+
import type { SpecCodeMap } from '../spec-code/index.js';
|
|
6
|
+
import { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
|
|
7
|
+
/**
|
|
8
|
+
* The sections of the configurator domain that the spec alone determines: its model and the data
|
|
9
|
+
* of its `phx.domain` factories. `ConfiguratorRuntime` builds its own from this function, so a
|
|
10
|
+
* build of either in the same reference store returns the same objects.
|
|
11
|
+
*/
|
|
12
|
+
export type ConfiguratorSpecRuntime = Branded<'ConfiguratorSpecRuntime', {
|
|
13
|
+
readonly modelRuntime: ConfiguratorModelRuntime;
|
|
14
|
+
readonly factoryDataRuntime: FactoryDataRuntime;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const ConfiguratorSpecRuntime: (spec: RuntimeSpec, referenceStore: RuntimeReferenceStore, code: SpecCodeMap | undefined) => ConfiguratorSpecRuntime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Branded as t}from"@salsita-ai/common/utils";import{FactoryDataRuntime as r}from"../factory-data/index.js";import{ConfiguratorModelRuntime as a}from"./configurator-model-runtime.js";export const ConfiguratorSpecRuntime=(i,o,e)=>{let n=a(i.configurator,o,e);return t({modelRuntime:n,factoryDataRuntime:r(o,{referenceScope:"configuratorRuntime/factoryDataRuntime",invariants:i.configurator.invariants,defaults:i.configurator.defaults,aliases:n.aliases,entities:n.entities})})};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type Messages } from '@lingui/core';
|
|
2
|
+
import { type Application, type ElementRegistration, type ProjectModule } from '#package/domain';
|
|
3
|
+
import type { RuntimeReferenceStore } from '../../caching/index.js';
|
|
4
|
+
import type { RuntimeSpec } from '../runtime-spec/index.js';
|
|
5
|
+
import { type ThemePresets } from './application-spec-slice.js';
|
|
6
|
+
import type { MigrationModules } from './migrations/index.js';
|
|
7
|
+
import type { SpecCodeModule } from './spec-code/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* The project modules of an application, as the generated barrels list them: each file of a
|
|
10
|
+
* convention folder as `{ origin, exports }`, unchecked; the migration modules of both domains keyed
|
|
11
|
+
* by project path (`src/migrations/v2.ts`); and the message catalogs of `src/locales/<locale>/`,
|
|
12
|
+
* keyed by locale. `components` holds the files of `src/components/` and the frontend component
|
|
13
|
+
* files, in that order, and `elements` every element file the application mounts.
|
|
14
|
+
*/
|
|
15
|
+
export interface ApplicationModules {
|
|
16
|
+
readonly expressions: readonly ProjectModule[];
|
|
17
|
+
readonly invariants: readonly ProjectModule[];
|
|
18
|
+
readonly actions: readonly ProjectModule[];
|
|
19
|
+
readonly components: readonly ProjectModule[];
|
|
20
|
+
readonly handlers: readonly ProjectModule[];
|
|
21
|
+
readonly elements: readonly ProjectModule[];
|
|
22
|
+
readonly transformers: readonly ProjectModule[];
|
|
23
|
+
readonly adminExpressions: readonly ProjectModule[];
|
|
24
|
+
readonly adminInvariants: readonly ProjectModule[];
|
|
25
|
+
readonly adminComponents: readonly ProjectModule[];
|
|
26
|
+
readonly migrations: MigrationModules;
|
|
27
|
+
readonly catalogs: Readonly<Record<string, Messages>>;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateApplicationInput {
|
|
30
|
+
/** The runtime spec, `.phoenix/application-spec.json` decoded with `decodeRuntimeSpec`. */
|
|
31
|
+
readonly spec: RuntimeSpec;
|
|
32
|
+
/** The store `createPhx` built the `phx` values in. */
|
|
33
|
+
readonly referenceStore: RuntimeReferenceStore;
|
|
34
|
+
/** The generated `.phoenix/spec-code.ts` module of the same generation as `spec`. */
|
|
35
|
+
readonly specCode?: SpecCodeModule | undefined;
|
|
36
|
+
readonly modules: ApplicationModules;
|
|
37
|
+
/** The SDK's default elements of the application kind; a project element with the same name replaces one. */
|
|
38
|
+
readonly defaultElements: readonly ElementRegistration[];
|
|
39
|
+
/** The SDK's theme presets by name, `getPhoenixThemes()`. */
|
|
40
|
+
readonly themePresets: ThemePresets;
|
|
41
|
+
readonly environment?: Application['environment'] | undefined;
|
|
42
|
+
/** The services a host provides; i18n is built from the catalogs. */
|
|
43
|
+
readonly services?: Omit<Application['services'], 'i18n'> | undefined;
|
|
44
|
+
/** The tag the web component mounts as; by default the spec's `webComponentTag`, else `salsita-configurator`. */
|
|
45
|
+
readonly tag?: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Builds an application from its runtime spec and its project modules, ready to mount, with no
|
|
49
|
+
* `ConfiguratorBuilder` and no `ApplicationConfig`: the full `ApplicationRuntime` in the store
|
|
50
|
+
* `createPhx` built the `phx` values in, the spec slice of the domain runtime, the initial published
|
|
51
|
+
* data and i18n.
|
|
52
|
+
*
|
|
53
|
+
* Every mistake of the project's files is reported at once, as one `ImplementationErrors`: a file
|
|
54
|
+
* that breaks its folder's contract, an expression defined twice or one the spec already gives a
|
|
55
|
+
* value, a declared expression no file implements and a migration no file exports.
|
|
56
|
+
*/
|
|
57
|
+
export declare const createApplication: <TYPES = unknown>(input: CreateApplicationInput) => Application<TYPES>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{setupI18n as e}from"@lingui/core";import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{ImplementationError as i,NoopAnalyticsSystem as n,checkSingleInstanceHandlers as o,createDomainRuntime as a,createImplementationErrorCollector as r,createInitialPublishedData as s,resolveActionModules as m,resolveComponentOpticModules as c,resolveElementModule as l,resolveHandlerModule as p,resolveInvariantModules as u,resolveTransformerModule as d}from"#package/domain";import{defaultI18n as f,mergeCatalogs as g,sdkCatalog as h}from"#package/i18n";import{ApplicationRuntime as v}from"./application-runtime.js";import{applicationSpecSlice as E}from"./application-spec-slice.js";let M=(e,t,i)=>e.filter(e=>i.attempt(()=>(t(e),!0),!1)),w=(e,t,i)=>e.flatMap(e=>i.attempt(()=>t(e),[]));export const createApplication=I=>{let{spec:T,referenceStore:b,specCode:k,modules:x,environment:A={}}=I,C=r(),R=w(x.handlers,p,C),y=w(x.elements,l,C),N=w(x.transformers,e=>[d(e)],C),P=w(x.components,e=>c([e]),C),S=w(x.adminComponents,e=>c([e]),C),O=M(x.invariants,e=>u([e]),C),j=M(x.adminInvariants,e=>u([e]),C),L=M(x.actions,e=>m([e]),C),U=v(T,b,x.expressions,N,u(O),x.adminExpressions,u(j),x.migrations,k,C);if((U.ok?[...U.runtime.configurator.migrationRuntime.missingMigrations,...U.runtime.admin.migrationRuntime.missingMigrations]:U.missingMigrations).forEach(e=>C.add((e=>{let[t=e,n="migrateToVN"]=e.split("#");return new i({code:"MISSING_IMPLEMENTATION",origin:t,problem:`The migration ${n} is missing`,fix:`The spec declares the model version this file migrates to, so the file must export ${n}, the function that turns a state of the previous version into one of this version; without it a saved configuration of an earlier version cannot load. Add or rename the export.`})})(e))),C.throwIfAny(),!U.ok)throw Error("The application runtime could not be built, but no implementation error was recorded.");o(R);let $=E({runtime:U.runtime,spec:T,modules:{handlers:{handlers:R},elements:{elements:y},customComponentOptics:P,actionImplementations:m(L)},customAdminComponentOptics:S,defaultElements:I.defaultElements,themePresets:I.themePresets,environmentResourcesUrl:A.defaultEnvs?.resourcesUrl}),D=t(),F=s({adminDomainFactory:$.admin.factory,domainRuntime:a({application:{spec:$,environment:A},services:{analyticsService:new n,i18n:f,logger:D}}),adminPresets:U.runtime.admin.presetRuntime.presets,handlers:$.configurator.handlers,dataSpec:$.dataConfig??void 0,chunks:$.chunks,logger:D});return{spec:{...$,initialPublishedData:F},environment:A,services:{...I.services,i18n:e({messages:g([h,x.catalogs]),locale:T.configurator.ui.availableLocales[0]})},tag:I.tag??T.appMetadata.webComponentTag??"salsita-configurator"}};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ApplicationRuntime, type ApplicationRuntimeResult } from './application-runtime.js';
|
|
2
|
+
export { AdminModelRuntime } from './admin-runtime/admin-model-runtime.js';
|
|
3
|
+
export { ConfiguratorModelRuntime } from './configurator-runtime/configurator-model-runtime.js';
|
|
4
|
+
export { SpecRuntime } from './spec-runtime.js';
|
|
5
|
+
export * from './factory-data/index.js';
|
|
6
|
+
export * from './migrations/index.js';
|
|
7
|
+
export * from './sections/index.js';
|
|
8
|
+
export * from './spec-code/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ApplicationRuntime}from"./application-runtime.js";export{AdminModelRuntime}from"./admin-runtime/admin-model-runtime.js";export{ConfiguratorModelRuntime}from"./configurator-runtime/configurator-model-runtime.js";export{SpecRuntime}from"./spec-runtime.js";export*from"./factory-data/index.js";export*from"./migrations/index.js";export*from"./sections/index.js";export*from"./spec-code/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
-
import type { DomainEntity, Expression as DomainExpression, Invariant as DomainInvariant } from '#package/domain';
|
|
2
|
+
import type { DomainEntity, Expression as DomainExpression, Invariant as DomainInvariant, ImplementationErrorCollector, ProjectModule } from '#package/domain';
|
|
3
3
|
import type { RuntimeReferenceStore } from '../../../caching/index.js';
|
|
4
4
|
import type { Expressions } from '../../../parse-application-files/index.js';
|
|
5
5
|
import { type RuntimeModelVersion } from '../../runtime-spec/index.js';
|
|
@@ -39,11 +39,17 @@ interface ExpressionRuntimeSpec {
|
|
|
39
39
|
*
|
|
40
40
|
* Dispatches on `expression.implementation.kind`:
|
|
41
41
|
* - `relation` / `violations` — calls the matching SDK factory with params + runtime context
|
|
42
|
-
* - `user` — uses the
|
|
42
|
+
* - `user` — uses the implementation of the project files `expressionModules` (`src/expressions/`,
|
|
43
|
+
* or `src/admin/expressions/`), merged with the spec's aliases by `mergeExpressionModules`, or the
|
|
44
|
+
* one `builtIn` holds
|
|
43
45
|
* - `value` — evaluates the parsed {@link MemoEvalPlan}; stabilized per
|
|
44
46
|
* {@link canonicalEnhancedJsonValueKey} so identical values reuse the same
|
|
45
47
|
* evaluator across rebuilds. Its `$eval` code comes from `code`, the domain's map of the generated
|
|
46
48
|
* code module, when that holds it.
|
|
49
|
+
*
|
|
50
|
+
* A file that is wrong, or that defines an expression another file, the spec or `builtIn` already
|
|
51
|
+
* defines, is recorded in `errors` as an `ImplementationError` and left out. So is every declared
|
|
52
|
+
* expression without an implementation, which also makes the result an error.
|
|
47
53
|
*/
|
|
48
|
-
export declare const ExpressionRuntime: (spec: ExpressionRuntimeSpec, referenceStore: RuntimeReferenceStore,
|
|
54
|
+
export declare const ExpressionRuntime: (spec: ExpressionRuntimeSpec, referenceStore: RuntimeReferenceStore, expressionModules: readonly ProjectModule[], referenceScopePrefix: string, invariantImplementations: InvariantImplementations | undefined, code: SpecCodeMap | undefined, errors: ImplementationErrorCollector, builtIn?: ExpressionImplementations) => ExpressionRuntimeResult;
|
|
49
55
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{ImplementationError as i,createRelationFactory as n,mergeExpressionModules as a}from"#package/domain";import{canonicalEnhancedJsonValueKey as r,isSdkExpressionImplementation as o}from"../../../core/index.js";import{specCodeExpressionKey as l}from"../../runtime-spec/index.js";import{generateMemoEvalPlanRuntime as s}from"./generate-memo-eval-plan-runtime.js";let p={},m=["0-1","1-1","0-N","1-N"],d={relation:(e,t)=>{let i=t[0];if(!("object"==typeof i&&null!==i&&"kind"in i&&"target"in i&&"string"==typeof i.target&&"cardinality"in i&&m.includes(i.cardinality)&&("allOfType"===i.kind||("direct"===i.kind||"indirect"===i.kind)&&"field"in i&&"string"==typeof i.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return n(e.aliasMap)(i)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},f=e=>{let t=s(e.plan,l(e.entityOrAlias,e.name),e.code);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},u=e=>({...(0,d[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(n,l,s,m,d=p,c,g,y={})=>{let v={};for(let[e,t]of n.latestModel.aliases)v[String(e)]=t.map(String);let x={...y};for(let[e,t]of Object.entries(a(s,v,g,((e,t,i)=>{let n=new Map,a=(e,t)=>{n.set(e,(n.get(e)??new Set).add(t))};for(let[i,n]of e.expressions.expressions)for(let[e,r]of n)if("user"!==r.implementation.kind)for(let n of t[String(i)]??[String(i)])a(n,String(e));for(let[e,t]of Object.entries(i))for(let i of Object.keys(t))a(e,i);return n})(n,v,y))))x[e]={...x[e],...t};let S=l.createBuilder(`${m}/sdk`,{build:u,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),h=l.createBuilder(`${m}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>{let i,n;return(i=e.impl)===(n=t.impl)||i.evaluate===n.evaluate&&i.meta===n.meta&&i.origin.name===n.origin.name&&i.origin.typeOrAlias===n.origin.typeOrAlias}}),O=l.createBuilder(`${m}/value`,{build:f,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey&&e.code===t.code}),b={},k=!1,$=new Set,M=new Set,j=new Set;for(let[e,t]of n.expressions.expressions)for(let[,i]of t){let t=v[String(e)]??[String(e)];if(o(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:v,invariantImplementations:d},a=S.build(n);for(let e of(a.changed&&(k=!0),$.add(S.getKey(n)),t))b[e]||(b[e]={}),b[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let n=i.implementation.value,a={entityOrAlias:String(e),name:String(i.name),valueKey:r(n),plan:i.implementation.plan,code:c},o=O.build(a);for(let e of(o.changed&&(k=!0),j.add(O.getKey(a)),t))b[e]||(b[e]={}),b[e][String(i.name)]=o.output;continue}}for(let[e,t]of Object.entries(x))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=h.build(t);a.changed&&(k=!0),M.add(h.getKey(t)),b[e]||(b[e]={}),b[e][i]=a.output}S.cleanup($)&&(k=!0),h.cleanup(M)&&(k=!0),O.cleanup(j)&&(k=!0);let A=[];for(let[e,t]of n.expressions.entityExpressions)for(let i of t.shapeGroups){let t=n.expressions.expressions.get(i);if(t)for(let[i]of t)b[String(e)]?.[String(i)]||A.push({entityType:String(e),exprName:String(i)})}return A.length>0?(A.forEach(e=>g.add(new i({code:"MISSING_IMPLEMENTATION",origin:null,problem:`Missing implementation of expression ${e.entityType}.${e.exprName}`,fix:"The spec declares it without a value of its own ($eval, $msg or a read), so a project file implements it: a default export of phx.domain.implementCustomExpressions({ ... }) in src/expressions/, or of phx.domain.admin.implementCustomExpressions({ ... }) in src/admin/expressions/ for an admin entity type. Implement it, or remove the declaration from the spec."}))),{ok:!1,missing:A}):{ok:!0,runtime:t({merged:b,changed:k})}};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { RuntimeReferenceStore } from '../../caching/index.js';
|
|
3
|
+
import type { RuntimeSpec } from '../runtime-spec/index.js';
|
|
4
|
+
import { AdminSpecRuntime } from './admin-runtime/admin-spec-runtime.js';
|
|
5
|
+
import { ConfiguratorSpecRuntime } from './configurator-runtime/configurator-spec-runtime.js';
|
|
6
|
+
import type { SpecCodeModule } from './spec-code/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* The sections of both domains that the spec alone determines, without a project module: each
|
|
9
|
+
* domain's model and the data of its `phx.domain` factories.
|
|
10
|
+
*
|
|
11
|
+
* An application is built in two steps in one reference store. This is the first: it runs before
|
|
12
|
+
* the project's modules load, because they call the `phx.domain` factories while they are evaluated.
|
|
13
|
+
* The second, `ApplicationRuntime` with the loaded modules, builds the same sections through the
|
|
14
|
+
* same functions, so it returns the same objects: `phx.domain.model.X` is the reflection the
|
|
15
|
+
* application's domain validates with.
|
|
16
|
+
*/
|
|
17
|
+
export type SpecRuntime = Branded<'SpecRuntime', {
|
|
18
|
+
readonly configurator: ConfiguratorSpecRuntime;
|
|
19
|
+
readonly admin: AdminSpecRuntime;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const SpecRuntime: (spec: RuntimeSpec, referenceStore: RuntimeReferenceStore, specCode: SpecCodeModule | undefined) => SpecRuntime;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Branded as i}from"@salsita-ai/common/utils";import{AdminSpecRuntime as r}from"./admin-runtime/admin-spec-runtime.js";import{ConfiguratorSpecRuntime as o}from"./configurator-runtime/configurator-spec-runtime.js";export const SpecRuntime=(m,t,n)=>i({configurator:o(m,t,n?.configurator),admin:r(m,t,n?.admin)});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The version of the JSON format `encodeRuntimeSpec` writes. Raise it with every change to the
|
|
3
|
-
* format or to the shape of `RuntimeSpec
|
|
4
|
-
* or newer SDK wrote instead of building a
|
|
3
|
+
* format or to the shape of `RuntimeSpec` once a released SDK has written the current version, so
|
|
4
|
+
* that `decodeRuntimeSpec` refuses an artifact an older or newer SDK wrote instead of building a
|
|
5
|
+
* runtime from data it does not understand.
|
|
5
6
|
*/
|
|
6
7
|
export declare const RUNTIME_SPEC_FORMAT_VERSION = 1;
|
|
7
8
|
/** One step from a value into a part of it: an object key or an array index. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdminSpec, ApplicationSpec, ConfiguratorSpec, EntitySchema, Infra, ModelVersion, ResolvedModelVersion, ResolvedVersions } from '../../parse-application-files/index.js';
|
|
1
|
+
import type { AdminSpec, ApplicationSpec, AssistantSpec, ConfiguratorSpec, DataSchemaEntry, DataSchemas, DataSpec, EntitySchema, Infra, ModelVersion, ResolvedModelVersion, ResolvedVersions, Shape } from '../../parse-application-files/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* The part of a parsed entity schema the runtime reads: the entity type and the schema of its
|
|
4
4
|
* shape, from which it builds the entity's reflection. The full schema with `id` and `type` is
|
|
@@ -8,12 +8,22 @@ import type { AdminSpec, ApplicationSpec, ConfiguratorSpec, EntitySchema, Infra,
|
|
|
8
8
|
export type RuntimeEntitySchema = Pick<EntitySchema, 'entityType' | 'shapeSchema'>;
|
|
9
9
|
/**
|
|
10
10
|
* The part of a parsed model version the runtime reads: the entity types, the aliases, the common
|
|
11
|
-
* types and the schema of every entity's shape. The
|
|
12
|
-
* parser and the type generator
|
|
11
|
+
* types and the schema of every entity's shape. The shapes and the resolved shapes only serve the
|
|
12
|
+
* parser and the type generator, except the runtime schemas of the latest version's shapes (see
|
|
13
|
+
* `RuntimeLatestModelVersion`).
|
|
13
14
|
*/
|
|
14
15
|
export type RuntimeModelVersion = Pick<ModelVersion, 'versionKey' | 'entityTypes' | 'rootEntityTypes' | 'aliases' | 'commonTypes'> & {
|
|
15
16
|
readonly entitySchemas: readonly RuntimeEntitySchema[];
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* The latest model version of a domain as the runtime reads it: a model version plus the runtime
|
|
20
|
+
* schema of every shape, which `phx.domain.model` reflects as `<Name>Shape`.
|
|
21
|
+
*/
|
|
22
|
+
export type RuntimeLatestModelVersion = RuntimeModelVersion & {
|
|
23
|
+
readonly shapes: ReadonlyMap<Shape['name'], RuntimeShapeSchema>;
|
|
24
|
+
};
|
|
25
|
+
/** The part of a parsed shape the runtime reads: its name and its runtime JSON schema. */
|
|
26
|
+
export type RuntimeShapeSchema = Pick<Shape, 'name' | 'runtimeSchema'>;
|
|
17
27
|
/** One model version of a domain as the runtime reads it, with the migration file that leads to it. */
|
|
18
28
|
export type RuntimeResolvedModelVersion = Omit<ResolvedModelVersion, 'modelVersion'> & {
|
|
19
29
|
readonly modelVersion: RuntimeModelVersion;
|
|
@@ -24,15 +34,39 @@ export type RuntimeResolvedVersions = Pick<ResolvedVersions, 'latestVersion'> &
|
|
|
24
34
|
};
|
|
25
35
|
/** The model of a domain as the runtime reads it: the latest version and every earlier one. */
|
|
26
36
|
interface RuntimeDomainModel {
|
|
27
|
-
readonly latestModel:
|
|
37
|
+
readonly latestModel: RuntimeLatestModelVersion;
|
|
28
38
|
readonly resolvedVersions: RuntimeResolvedVersions;
|
|
29
39
|
}
|
|
40
|
+
/** The part of a parsed data schema the runtime reads: the JSON schema it validates the data with. */
|
|
41
|
+
export type RuntimeDataSchemaEntry = Pick<DataSchemaEntry, 'runtimeSchema'>;
|
|
42
|
+
/**
|
|
43
|
+
* The data schemas as the runtime reads them: the JSON schema of each kind of data and the hash of
|
|
44
|
+
* the published data. The enhanced schemas, with Phoenix references, only serve the type generator.
|
|
45
|
+
*/
|
|
46
|
+
export type RuntimeDataSchemas = Pick<DataSchemas, 'publishedDataHash'> & {
|
|
47
|
+
readonly [KIND in Exclude<keyof DataSchemas, 'publishedDataHash' | 'backendData'>]: RuntimeDataSchemaEntry;
|
|
48
|
+
} & {
|
|
49
|
+
readonly backendData: RuntimeDataSchemaEntry | undefined;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The assistant as the runtime reads it: its resolved manifest. The parsed assistant schema the
|
|
53
|
+
* manifest is resolved from only serves the parser.
|
|
54
|
+
*/
|
|
55
|
+
export type RuntimeAssistantSpec = Pick<NonNullable<AssistantSpec>, 'resolved'> | null;
|
|
56
|
+
/**
|
|
57
|
+
* The data spec as the runtime reads it: the data entries and their chunks. The data entries and
|
|
58
|
+
* admin data pages the parser derives from them only serve the admin spec and the type generator.
|
|
59
|
+
*/
|
|
60
|
+
export type RuntimeDataSpec = Pick<DataSpec, 'entries' | 'chunks'>;
|
|
30
61
|
/**
|
|
31
62
|
* The configurator part of the runtime spec. It leaves out the configuration schema and its
|
|
32
63
|
* version, which only a deployment registers, and the assistant's server settings (instructions
|
|
33
64
|
* and AI settings), which must never reach the browser of a customer.
|
|
34
65
|
*/
|
|
35
|
-
export type RuntimeConfiguratorSpec = Pick<ConfiguratorSpec, 'components' | 'presets' | 'expressions' | 'actions' | 'invariants' | '
|
|
66
|
+
export type RuntimeConfiguratorSpec = Pick<ConfiguratorSpec, 'components' | 'presets' | 'expressions' | 'actions' | 'invariants' | 'defaults' | 'states' | 'theme' | 'ui' | 'transformers'> & RuntimeDomainModel & {
|
|
67
|
+
readonly dataSchemas: RuntimeDataSchemas;
|
|
68
|
+
readonly assistant: RuntimeAssistantSpec;
|
|
69
|
+
};
|
|
36
70
|
/**
|
|
37
71
|
* The admin part of the runtime spec. It leaves out the configuration schema and its version, which
|
|
38
72
|
* only a deployment registers.
|
|
@@ -54,15 +88,16 @@ export type RuntimeInfra = Pick<Infra, 'acl' | 'resources' | 'resourcesConfig'>;
|
|
|
54
88
|
* leaves out what only the parser, the type generator or a deployment use, and holds plain data,
|
|
55
89
|
* Maps and Sets only, so it can be encoded as JSON.
|
|
56
90
|
*/
|
|
57
|
-
export interface RuntimeSpec extends Pick<ApplicationSpec, 'appMetadata'
|
|
91
|
+
export interface RuntimeSpec extends Pick<ApplicationSpec, 'appMetadata'> {
|
|
92
|
+
readonly dataSpec: RuntimeDataSpec;
|
|
58
93
|
readonly configurator: RuntimeConfiguratorSpec;
|
|
59
94
|
readonly admin: RuntimeAdminSpec;
|
|
60
95
|
readonly infra: RuntimeInfra;
|
|
61
96
|
}
|
|
62
97
|
/**
|
|
63
|
-
* Takes from a parsed application spec the part the runtime reads.
|
|
64
|
-
*
|
|
65
|
-
* runtime does not read.
|
|
98
|
+
* Takes from a parsed application spec the part the runtime reads. It reuses the sections it keeps
|
|
99
|
+
* whole, and builds trimmed copies of the model versions, data schemas, assistant and data spec
|
|
100
|
+
* without what the runtime does not read.
|
|
66
101
|
*/
|
|
67
102
|
export declare const toRuntimeSpec: (spec: ApplicationSpec) => RuntimeSpec;
|
|
68
103
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=e=>({versionKey:e.versionKey,entityTypes:e.entityTypes,rootEntityTypes:e.rootEntityTypes,aliases:e.aliases,commonTypes:e.commonTypes,entitySchemas:e.entitySchemas.map(e=>({entityType:e.entityType,shapeSchema:e.shapeSchema}))}),s=
|
|
1
|
+
let e=e=>({versionKey:e.versionKey,entityTypes:e.entityTypes,rootEntityTypes:e.rootEntityTypes,aliases:e.aliases,commonTypes:e.commonTypes,entitySchemas:e.entitySchemas.map(e=>({entityType:e.entityType,shapeSchema:e.shapeSchema}))}),s=e=>({runtimeSchema:e.runtimeSchema}),a=s=>{let a;return{latestModel:{...e(a=s.latestModel),shapes:new Map([...a.shapes].map(([e,s])=>[e,{name:s.name,runtimeSchema:s.runtimeSchema}]))},resolvedVersions:{latestVersion:s.resolvedVersions.latestVersion,versionedModels:s.resolvedVersions.versionedModels.map(s=>({version:s.version,key:s.key,isLatest:s.isLatest,migrationFile:s.migrationFile,modelVersion:e(s.modelVersion)}))}}};export const toRuntimeSpec=e=>{let t,{configurator:n,admin:i,infra:r}=e;return{configurator:{components:n.components,presets:n.presets,expressions:n.expressions,actions:n.actions,invariants:n.invariants,dataSchemas:{publishedDataHash:(t=n.dataSchemas).publishedDataHash,publishedData:s(t.publishedData),sessionData:s(t.sessionData),frontendData:s(t.frontendData),backendData:t.backendData&&s(t.backendData),finalizeData:s(t.finalizeData),prefetchedFinalizeData:s(t.prefetchedFinalizeData),finalizeResult:s(t.finalizeResult),callbackData:s(t.callbackData)},defaults:n.defaults,states:n.states,theme:n.theme,ui:n.ui,transformers:n.transformers,assistant:n.assistant&&{resolved:n.assistant.resolved},...a(n)},admin:{components:i.components,presets:i.presets,expressions:i.expressions,invariants:i.invariants,defaults:i.defaults,states:i.states,adminPages:i.adminPages,...a(i)},appMetadata:e.appMetadata,infra:{acl:r.acl,resources:r.resources,resourcesConfig:r.resourcesConfig},dataSpec:{entries:e.dataSpec.entries,chunks:e.dataSpec.chunks}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{I18nProvider as o}from"@lingui/react";import{QueryClientProvider as i}from"@tanstack/react-query";import n from"mui-modal-provider";import{useEffect as t}from"react";import{standardWebComponentProperties as c}from"#package/domain";import{getAvailableLocales as a,resolveLocale as m}from"#package/i18n";import{ApplicationType as l,ApplicationTypeProvider as d,InvalidDeploymentReload as p,
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{I18nProvider as o}from"@lingui/react";import{QueryClientProvider as i}from"@tanstack/react-query";import n from"mui-modal-provider";import{useEffect as t}from"react";import{standardWebComponentProperties as c}from"#package/domain";import{getAvailableLocales as a,resolveLocale as m}from"#package/i18n";import{ApplicationType as l,ApplicationTypeProvider as d,InvalidDeploymentReload as p,LoaderHost as s,SessionServiceProvider as f,useApplicationQueryClient as u,useI18n as h,useSpecAlwaysExpand as g,useSpecAppLoader as x,useSpecPrefetchTextureUrls as j,useSpecPreview as k,useWebComponentProperty$ as v,useWebComponentPropertySetter as b,useWebComponentPropertyValue as y}from"#package/react-sdk";import{SnackbarProvider as C}from"#package/ui-sdk";import{ConfiguratorDataProvider as w}from"./configurator-context/ConfiguratorDataProvider.js";import{ConfiguratorResponsiveProvider as E}from"./configurator-context/ConfiguratorResponsiveProvider.js";import{usePowerRoutingLifecycle as I}from"./configurator-context/configurator-routing/use-power-routing-lifecycle.js";import{ConfiguratorRoutingProvider as L,OnApplicationStartProvider as P,OnRoutingReadyProvider as Z,OnSessionReadyProvider as q,PresetSelectionProvider as A,PreviewApplicationProvider as B}from"./configurator-context/index.js";import{LoadingErrorBoundary as D}from"./pages/error-boundaries/LoadingErrorBoundary.js";import{GeneralErrorFallback as F,RootPage as R}from"./pages/index.js";import{SceneResourcesProvider as S}from"./scene/index.js";import{EncapsulatedConfiguratorTheme as T}from"./ui/index.js";import{AppLoader as U}from"./ui/phoenix-layout-elements/index.js";export const ConfiguratorApp=()=>{let z=u(),G=h(),H=x(),J=k(),K=g(),M=j(),N=b(c.locale),O=v(c.locale);t(()=>{let r=O.subscribe(r=>{let e=m(r,a(G));G.activate(e)}),e=()=>{N(G.locale)};return G.on("change",e),()=>{r.unsubscribe(),G.removeListener("change",e)}},[O,G,N]);let Q=y(c.containerZIndex),V=y(c.power);return(I(),"off"===V)?null:r(d,{type:l.Configurator,children:r(i,{client:z,children:r(T,{children:r(s,{children:r(E,{containerZIndex:Q,children:r(U,{mode:H,children:r(B,{alwaysExpand:K,preview:J,children:r(o,{i18n:G,children:r(C,{maxSnack:5,children:r(D,{FallbackComponent:F,children:r(S,{prefetchTextureUrls:M,children:r(P,{children:r(f,{children:r(q,{children:"on"===V&&r(L,{children:r(w,{children:r(A,{children:r(Z,{children:e(n,{children:[r(p,{}),r(R,{})]})})})})})})})})})})})})})})})})})})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{DefaultAppLoaderContent}from"./DefaultAppLoaderContent.js";
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { type $DomainEntity, type ConfiguratorBuilder, type CreateCustomPhoenixEntityElement, type CreateCustomPhoenixLayoutElement, type CreateGetThemeHandler, type CreateGetWebComponentOptionsHandler, type CreatePhoenixHandler, type DomainEntity, type IsCreateRecipeUpdate, type IsReplaceRecipeUpdate, type TransformerBuilder, type TransformerFactory, type UpdateFactory, getIdSequence } from '#package/domain';
|
|
2
|
-
import { type CreateAddEntityFab, type CreateCollectFrontendDataHandler, type CreateDeleteEntityFab, type CreateFilterPublishedChunksHandler, type CreateNavigationHotspot, type CreateNotAuthenticatedPage, type CreateSelectionHotspot, type CreateToolMenuFab, type IsAngleDimensionUpdate, type IsAttributeSelectionUpdate, type IsAttributeSwitchUpdate, type IsDeleteEntityUpdate, type IsDistanceDimensionUpdate, type IsGenericDimensionUpdate, type IsSwatchSelectionUpdate, type IsTextValueUpdate, type UseAccessService, type UseActiveNavigationState, type UseActiveToolState, type UseActiveViewState, type UseActiveViewports, type UseAnalyticsService, type UseAngleDimension, type UseAttributeSelection, type UseAttributeSwitch, type UseAuthenticatedClient, type UseAuthorizedClient, type UseBackendData, type UseChildEntitySelection, type UseComponent, type UseComponents, type UseComposition, type UseConfigurationId, type UseConfigurationSaveState, type UseConfiguratorMessages, type UseControlViolations, type UseCookRecipes, type UseCookReplaceRecipes, type UseCookedRecipes, type UseCookedReplaceRecipes, type UseCreateAuthorizedClient, type UseDeleteEntity, type UseDeletedEntity, type UseDeselect, type UseDistanceDimension, type UseDistanceDimensionSelection, type UseDomainApplicationContext, type UseDomainApplicationProps, type UseDomainContext, type UseDomainEntityState, type UseEntityPrice, type UseEntitySelector, type UseFinalizeAction, type UseFinalizeActions, type UseFinalizeViolations, type UseFirstComponent, type UseFirstRootComponent, type UseFrontendData, type UseGenericDimension, type UseGroupedRecipeOptions, type UseHoveredDomainEntityId, type UseHoveredEntity, type UseHoveredEntityId, type UseIntegrationService, type UseIntegrationState, type UseIsFullscreenActive, type UseLoadedData, type UseLoadingState, type UseLocaleSwitch, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePublishedData, type UsePushNavigate, type UseRecipeEmbeddedState, type UseReplaceEntityRecipeOptions, type UseRootComponents, type UseRootEntityId, type UseRootEntityPrice, type UseRootEntitySelector, type UseRootEntityState, type UseSelectEntity, type UseSelectParent, type UseSelectedDomainEntityId, type UseSelectedEntity, type UseSelectedEntityId, type UseSession, type UseSessionRole, type UseSessionService, type UseSetFullscreen, type UseSetViewState, type UseShareLinks, type UseSlice, type UseState, type UseStateValidity, type UseStepNavigation, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTabNavigation, type UseTextValue, type UseUndoRedo, type UseUpdateControl, type UseUpdatedControl, useGenerateShareLink, useLoadingStateValue, useLocalizable, useResolveLocalizable } from '#package/react-sdk';
|
|
2
|
+
import { type CreateAddEntityFab, type CreateAppLoader, type CreateCollectFrontendDataHandler, type CreateConfigurationNotFoundPage, type CreateConfiguratorErrorPage, type CreateDeleteEntityFab, type CreateFilterPublishedChunksHandler, type CreateNavigationHotspot, type CreateNotAuthenticatedPage, type CreatePresetUi, type CreateSelectionHotspot, type CreateToolMenuFab, type IsAngleDimensionUpdate, type IsAttributeSelectionUpdate, type IsAttributeSwitchUpdate, type IsDeleteEntityUpdate, type IsDistanceDimensionUpdate, type IsGenericDimensionUpdate, type IsSwatchSelectionUpdate, type IsTextValueUpdate, type UseAccessService, type UseActiveNavigationState, type UseActiveToolState, type UseActiveViewState, type UseActiveViewports, type UseAnalyticsService, type UseAngleDimension, type UseAttributeSelection, type UseAttributeSwitch, type UseAuthenticatedClient, type UseAuthorizedClient, type UseBackendData, type UseChildEntitySelection, type UseComponent, type UseComponents, type UseComposition, type UseConfigurationId, type UseConfigurationSaveState, type UseConfiguratorMessages, type UseControlViolations, type UseCookRecipes, type UseCookReplaceRecipes, type UseCookedRecipes, type UseCookedReplaceRecipes, type UseCreateAuthorizedClient, type UseDeleteEntity, type UseDeletedEntity, type UseDeselect, type UseDistanceDimension, type UseDistanceDimensionSelection, type UseDomainApplicationContext, type UseDomainApplicationProps, type UseDomainContext, type UseDomainEntityState, type UseEntityPrice, type UseEntitySelector, type UseFinalizeAction, type UseFinalizeActions, type UseFinalizeViolations, type UseFirstComponent, type UseFirstRootComponent, type UseFrontendData, type UseGenericDimension, type UseGroupedRecipeOptions, type UseHoveredDomainEntityId, type UseHoveredEntity, type UseHoveredEntityId, type UseIntegrationService, type UseIntegrationState, type UseIsFullscreenActive, type UseLoadedData, type UseLoadingState, type UseLocaleSwitch, type UseMapViolationHints, type UseNavigate, type UsePopNavigate, type UsePresetEmbeddedState, type UsePublishedData, type UsePushNavigate, type UseRecipeEmbeddedState, type UseReplaceEntityRecipeOptions, type UseRootComponents, type UseRootEntityId, type UseRootEntityPrice, type UseRootEntitySelector, type UseRootEntityState, type UseSelectEntity, type UseSelectParent, type UseSelectedDomainEntityId, type UseSelectedEntity, type UseSelectedEntityId, type UseSession, type UseSessionRole, type UseSessionService, type UseSetFullscreen, type UseSetViewState, type UseShareLinks, type UseSlice, type UseState, type UseStateValidity, type UseStepNavigation, type UseSwatchSelection, type UseSynchronizedSelector, type UseSynchronizedSelector$, type UseTabNavigation, type UseTextValue, type UseUndoRedo, type UseUpdateControl, type UseUpdatedControl, useGenerateShareLink, useLoadingStateValue, useLocalizable, useResolveLocalizable } from '#package/react-sdk';
|
|
3
3
|
import { type CreatePhoenixIconSet } from '#package/ui-sdk';
|
|
4
4
|
import { type UseConfiguratorExtensions } from '../application-runtime/index.js';
|
|
5
|
-
import { type CreateConfigurationNotFoundPage } from '../configuration-not-found-page/index.js';
|
|
6
5
|
import { type CreateOnApplicationStartProvider, type CreateOnBackendDataReadyProvider, type CreateOnConfiguratorReadyProvider, type CreateOnFrontendDataReadyProvider, type CreateOnGoToIndexHandler, type CreateOnPresetLoadedHandler, type CreateOnPublishedDataReadyProvider, type CreateOnRoutingReadyProvider, type CreateOnSessionReadyProvider, type UseConfiguratorRouting, type UsePresetSelection, usePreview, usePropertyPageStack, usePropertyPageState } from '../configurator-context/index.js';
|
|
7
|
-
import { type CreateConfiguratorErrorPage } from '../configurator-error-page/index.js';
|
|
8
6
|
import { useCloseAction } from '../integration/index.js';
|
|
9
7
|
import { type CreateGetTextureProcessingMapHandler } from '../scene/index.js';
|
|
10
8
|
import type { UseUpdateEntityObjectSelection } from '../scene/scene-entity/drag-and-drop/use-updated-selection.js';
|
|
11
9
|
import { type UseAssistantPanel, type UseMeasurements, type UseToolbarActions } from '../toolbar-actions/index.js';
|
|
12
|
-
import { type
|
|
13
|
-
import { type CreatePresetDeviceNotSupported, type CreatePresetPageAction
|
|
10
|
+
import { type CreateCanvasLoader, type CreateLayoutAdminUi, type CreateLayoutCustomOwnerUi, type CreateLayoutCustomReadUi, type CreateLayoutDialog, type CreateLayoutFooter, type CreateLayoutToolbarDesktop, type CreateLayoutToolbarDesktopFullScreen, type CreateLayoutToolbarReadDesktop, type CreateLayoutToolbarReadDesktopFullScreen, type CreateLayoutUserUi, type CreateToolbarHelp, LayoutSlots, useSceneSafeArea } from '../ui/index.js';
|
|
11
|
+
import { type CreatePresetDeviceNotSupported, type CreatePresetPageAction } from '../ui/preset-layout/PresetUi.js';
|
|
14
12
|
import { type UseResetCamera } from './use-reset-camera.js';
|
|
15
13
|
export interface ConfiguratorInterface<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, FINALIZE_DATA extends Record<string, unknown>, FINALIZE_RESULT extends Record<string, unknown>> {
|
|
16
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as
|
|
1
|
+
import{createCustomPhoenixEntityElement as e,createCustomPhoenixLayoutElement as t,createGetThemeHandler as r,createGetWebComponentOptionsHandler as o,createPhoenixHandler as i,createTransformer as n,createTransformerBuilder as s,createUpdateFactory as a,getIdSequence as m,isCreateEntityUpdate as p,isReplaceEntityUpdate as d}from"#package/domain";import{createAddEntityFab as c,createAppLoader as u,createCollectFrontendDataHandler as f,createConfigurationNotFoundPage as l,createConfiguratorErrorPage as g,createDeleteEntityFab as j,createFilterPublishedChunksHandler as x,createNavigationHotspot as k,createNotAuthenticatedPage as y,createPresetUi as I,createSelectionHotspot as A,createToolMenuFab as C,isAngleDimensionUpdate as S,isAttributeSelectionUpdate as w,isAttributeSwitchUpdate as E,isDeleteEntityUpdate as b,isDistanceDimensionUpdate as q,isGenericDimensionUpdate as B,isSwatchSelectionUpdate as P,isTextValueUpdate as R,useAccessService as U,useActiveNavigationState as h,useActiveToolState as v,useActiveViewState as z,useActiveViewports as D,useAnalyticsService as F,useAngleDimension as G,useAttributeSelection as H,useAttributeSwitch as J,useAuthenticatedClient as K,useAuthorizedClient as L,useBackendData as M,useChildEntitySelection as N,useCommittedSlice as O,useCommittedState as Q,useComponent as T,useComponents as V,useComposition as W,useConfigurationId as X,useConfigurationSaveState as Y,useConfiguratorMessages as Z,useControlViolations as $,useCookRecipes as _,useCookReplaceRecipes as ee,useCookedRecipes as et,useCookedReplaceRecipes as er,useCreateAuthorizedClient as eo,useDeleteEntity as ei,useDeletedEntity as en,useDeselect as es,useDistanceDimension as ea,useDistanceDimensionSelection as em,useDomain as ep,useDomainApplication as ed,useDomainApplicationProps as ec,useDomainEntityRenderedState as eu,useDomainEntityState as ef,useEntityPrice as el,useEntitySelector as eg,useFinalizeAction as ej,useFinalizeActions as ex,useFinalizeViolations as ek,useFirstComponent as ey,useFirstRenderedComponent as eI,useFirstRootComponent as eA,useFirstRootRenderedComponent as eC,useFrontendData as eS,useGenerateShareLink as ew,useGenericDimension as eE,useGroupedRecipeOptions as eb,useHoveredDomainEntityId as eq,useHoveredEntity as eB,useHoveredEntityId as eP,useIntegrationService as eR,useIntegrationState as eU,useIsFullscreenActive as eh,useLoadedData as ev,useLoadingState as ez,useLoadingStateValue as eD,useLocaleSwitch as eF,useLocalizable as eG,useMapViolationHints as eH,useNavigate as eJ,usePopNavigate as eK,usePresetEmbeddedState as eL,usePublishedData as eM,usePushNavigate as eN,useRecipeEmbeddedState as eO,useRenderedComponent as eQ,useRenderedComponents as eT,useRenderedEntitySelector as eV,useRenderedRootEntitySelector as eW,useRenderedSelector as eX,useRenderedSelector$ as eY,useRenderedSlice as eZ,useRenderedState as e$,useReplaceEntityRecipeOptions as e_,useResolveLocalizable as e0,useRootComponents as e1,useRootEntityId as e2,useRootEntityPrice as e3,useRootEntityRenderedId as e4,useRootEntityRenderedState as e5,useRootEntitySelector as e6,useRootEntityState as e7,useRootRenderedComponents as e8,useSelectEntity as e9,useSelectParent as te,useSelectedDomainEntityId as tt,useSelectedEntity as tr,useSelectedEntityId as to,useSession as ti,useSessionRole as tn,useSessionService as ts,useSetFullscreen as ta,useSetViewState as tm,useShareLinks as tp,useStateValidity as td,useStepNavigation as tc,useStoreSelector as tu,useStoreSelector$ as tf,useSwatchSelection as tl,useTabNavigation as tg,useTextValue as tj,useUndoRedo as tx,useUpdateControl as tk,useUpdatedControl as ty}from"#package/react-sdk";import{createPhoenixIconSet as tI}from"#package/ui-sdk";import{useConfigurator as tA}from"../application-runtime/index.js";import{createOnApplicationStartProvider as tC,createOnBackendDataReadyProvider as tS,createOnConfiguratorReadyProvider as tw,createOnFrontendDataReadyProvider as tE,createOnGoToIndexHandler as tb,createOnPresetLoadedHandler as tq,createOnPublishedDataReadyProvider as tB,createOnRoutingReadyProvider as tP,createOnSessionReadyProvider as tR,useConfiguratorRouting as tU,usePresetSelection as th,usePreview as tv,usePropertyPageStack as tz,usePropertyPageState as tD}from"../configurator-context/index.js";import{useCloseAction as tF}from"../integration/index.js";import{createGetTextureProcessingMapHandler as tG}from"../scene/index.js";import{useUpdateEntityObjectSelection as tH}from"../scene/scene-entity/drag-and-drop/use-updated-selection.js";import{useAssistantPanel as tJ,useMeasurements as tK,useToolbarActions as tL}from"../toolbar-actions/index.js";import{LayoutSlots as tM,createCanvasLoader as tN,createLayoutAdminUi as tO,createLayoutCustomOwnerUi as tQ,createLayoutCustomReadUi as tT,createLayoutDialog as tV,createLayoutFooter as tW,createLayoutToolbarDesktop as tX,createLayoutToolbarDesktopFullScreen as tY,createLayoutToolbarReadDesktop as tZ,createLayoutToolbarReadDesktopFullScreen as t$,createLayoutUserUi as t_,createToolbarHelp as t0,useSceneSafeArea as t1}from"../ui/index.js";import{createPresetDeviceNotSupported as t2,createPresetPageAction as t3}from"../ui/preset-layout/PresetUi.js";import{useResetCamera as t4}from"./use-reset-camera.js";export const createConfiguratorInterface=t5=>({updates:a(),getIdSequence:m,createGetWebComponentOptionsHandler:o,createGetThemeHandler:r,createPhoenixHandler:i,createCustomPhoenixEntityElement:e,createCustomPhoenixLayoutElement:t,createPhoenixIconSet:tI,createGetTextureProcessingMapHandler:tG,createCollectFrontendDataHandler:f,createFilterPublishedChunksHandler:x,createOnGoToIndexHandler:tb,createOnApplicationStartProvider:tC,createOnSessionReadyProvider:tR,createOnPublishedDataReadyProvider:tB,createOnFrontendDataReadyProvider:tE,createOnBackendDataReadyProvider:tS,createOnRoutingReadyProvider:tP,createOnConfiguratorReadyProvider:tw,createOnPresetLoadedHandler:tq,createPresetUi:I,createPresetPageAction:t3,createPresetDeviceNotSupported:t2,createLayoutFooter:tW,createAppLoader:u,createCanvasLoader:tN,createLayoutDialog:tV,createLayoutToolbarDesktop:tX,createLayoutToolbarDesktopFullScreen:tY,createLayoutToolbarReadDesktop:tZ,createLayoutToolbarReadDesktopFullScreen:t$,createLayoutCustomOwnerUi:tQ,createLayoutCustomReadUi:tT,createLayoutAdminUi:tO,createLayoutUserUi:t_,createToolbarHelp:t0,createNotAuthenticatedPage:y,createConfigurationNotFoundPage:l,createConfiguratorErrorPage:g,createAddEntityFab:c,createDeleteEntityFab:j,createSelectionHotspot:A,createNavigationHotspot:k,createToolMenuFab:C,createTransformer:n,transformerBuilder:s(),useAnalytics:F,useAuthenticatedClient:K,useAuthorizedClient:L,useCreateAuthorizedClient:eo,useAccessService:U,useConfigurationId:X,useSession:ti,useSessionRole:tn,useSessionService:ts,useDomain:ep,useDomainApplication:ed,useConfigurator:tA,useConfiguratorRouting:tU,usePresetSelection:th,usePublishedData:eM,useFrontendData:eS,useBackendData:M,useDomainApplicationProps:ec,useLoadedData:ev,useIntegrationService:eR,useIntegrationState:eU,usePresetEmbeddedState:eL,useRecipeEmbeddedState:eO,useCommittedSlice:O,useRenderedSlice:eZ,useCommittedState:Q,useRenderedState:e$,useStoreSelector:tu,useRenderedSelector:eX,useStoreSelector$:tf,useRenderedSelector$:eY,useEntitySelector:eg,useRenderedEntitySelector:eV,useRootEntitySelector:e6,useRenderedRootEntitySelector:eW,useStateValidity:td,useMapViolationHints:eH,useNavigate:eJ,usePopNavigate:eK,usePushNavigate:eN,useControlViolations:$,useFinalizeViolations:ek,useConfiguratorMessages:Z,useConfigurationSaveState:Y,useFinalizeAction:ej,useFinalizeActions:ex,useComponent:T,useRenderedComponent:eQ,useComponents:V,useRenderedComponents:eT,useFirstComponent:ey,useFirstRenderedComponent:eI,useRootComponents:e1,useRootRenderedComponents:e8,useFirstRootComponent:eA,useFirstRootRenderedComponent:eC,useEntityState:ef,useEntityRenderedState:eu,useRootEntityState:e7,useRootEntityRenderedState:e5,useRootEntityId:e2,useRootEntityRenderedId:e4,useEntityPrice:el,useRootEntityPrice:e3,useSelectedEntity:tr,useSelectedEntityId:to,useSelectedDomainEntityId:tt,useSelectEntity:e9,useDeselect:es,useSelectParent:te,useHoveredEntity:eB,useHoveredEntityId:eP,useHoveredDomainEntityId:eq,useActiveNavigationState:h,useActiveViewState:z,useSetViewState:tm,useActiveToolState:v,useIsFullscreenActive:eh,useSetFullscreen:ta,useResetCamera:t4,useUndoRedo:tx,useTabNavigation:tg,useStepNavigation:tc,useSceneSafeArea:t1,useActiveViewports:D,usePreview:tv,useCloseAction:tF,useIsCloningAllowed:tM.useIsCloningAllowed,useResolveLocalizable:e0,useLocalizable:eG,useToolbarActions:tL,useMeasurements:tK,useLocaleSwitch:eF,useShareLinks:tp,useAssistantPanel:tJ,useComposition:W,useUpdateControl:tk,useUpdatedControl:ty,useCookRecipes:_,useCookedRecipes:et,useCookReplaceRecipes:ee,useCookedReplaceRecipes:er,useDeleteEntity:ei,useDeletedEntity:en,useSwatchSelection:tl,useTextValue:tj,useAttributeSelection:H,useAttributeSwitch:J,useDistanceDimension:ea,useDistanceDimensionSelection:em,useGenericDimension:eE,useAngleDimension:G,useChildEntitySelection:N,useGroupedRecipeOptions:eb,useReplaceEntityRecipeOptions:e_,useUpdateEntityObjectSelection:tH,useGenerateShareLink:ew,useLoadingState:ez,useLoadingStateValue:eD,usePropertyPageStack:tz,usePropertyPageState:tD,isCreateEntityUpdate:p,isReplaceEntityUpdate:d,isDeleteEntityUpdate:b,isAngleDimensionUpdate:S,isDistanceDimensionUpdate:q,isGenericDimensionUpdate:B,isAttributeSelectionUpdate:w,isAttributeSwitchUpdate:E,isTextValueUpdate:R,isSwatchSelectionUpdate:P});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default `ConfigurationNotFoundPage` registration: the built-in `ConfigurationNotFoundPage`,
|
|
3
|
+
* with the props the configurator renders the element with.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BuiltInConfigurationNotFoundPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{ConfigurationNotFoundPage as t,useConfigurationNotFoundPageProps as r}from"#package/react-sdk";export const BuiltInConfigurationNotFoundPage=()=>o(t,{...r()});
|
package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { type ConfigurationNotFoundPageProps } from '#package/react-sdk';
|
|
2
|
-
/**
|
|
3
|
-
* The name a project registers a layout element under to replace the page shown when a configuration
|
|
4
|
-
* cannot be loaded or opened. Its default, the built-in `ConfigurationNotFoundPage`, is registered in
|
|
5
|
-
* `defaultConfiguratorElements`.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ConfigurationNotFoundPageName = "ConfigurationNotFoundPage";
|
|
8
2
|
/**
|
|
9
3
|
* Renders the `ConfigurationNotFoundPage` element. `onBack` is passed only where leaving the page leads
|
|
10
4
|
* somewhere, which is the start of the configurator.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ConfigurationNotFoundPageName as o,ConfigurationNotFoundPagePropsProvider as r,PhoenixLayoutElement as t}from"#package/react-sdk";export const ConfigurationNotFoundPageElement=a=>e(r,{value:a,children:e(t,{name:o,elementProps:{...a}})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { BuiltInConfigurationNotFoundPage } from './BuiltInConfigurationNotFoundPage.js';
|
|
2
|
+
export { ConfigurationNotFoundPageElement } from './ConfigurationNotFoundPageElement.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{BuiltInConfigurationNotFoundPage}from"./BuiltInConfigurationNotFoundPage.js";export{ConfigurationNotFoundPageElement}from"./ConfigurationNotFoundPageElement.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConfiguratorErrorPageProps } from '#package/react-sdk';
|
|
2
1
|
/**
|
|
3
2
|
* The configurator's built-in production error page, the default `ConfiguratorErrorPage`
|
|
4
|
-
* registration and the page shown when a project's error page throws.
|
|
3
|
+
* registration and the page shown when a project's error page throws. It reads its props from the
|
|
4
|
+
* provider `ConfiguratorErrorPageElement` renders it in.
|
|
5
5
|
*/
|
|
6
|
-
export declare const BuiltInConfiguratorErrorPage: (
|
|
6
|
+
export declare const BuiltInConfiguratorErrorPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{match as t}from"ts-pattern";import{ErrorPage as o}from"#package/ui-sdk";export const BuiltInConfiguratorErrorPage=
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{match as t}from"ts-pattern";import{useConfiguratorErrorPageProps as r}from"#package/react-sdk";import{ErrorPage as o}from"#package/ui-sdk";export const BuiltInConfiguratorErrorPage=()=>{let{reason:a,onRetry:i}=r();return t(a).with("presetCreationFailed",()=>e(o,{title:"Whoops, something went wrong!",message:"We couldn't start configuring from this preset. Please reload the page and try again.",buttonLabel:"Reload page",onButtonClick:i})).with("uncaughtError",()=>e(o,{title:"Whoops, something went wrong!",message:"We're experiencing some technical difficulties right now. Please try again in a few minutes. Thank you for your patience!",buttonLabel:"Try Again",onButtonClick:i})).exhaustive()};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { type ConfiguratorErrorPageProps } from '#package/react-sdk';
|
|
2
|
-
/**
|
|
3
|
-
* The name a project registers a layout element under to replace the configurator's production error
|
|
4
|
-
* page. Its default, `BuiltInConfiguratorErrorPage`, is registered in `defaultConfiguratorElements`.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ConfiguratorErrorPageName = "ConfiguratorErrorPage";
|
|
7
2
|
/**
|
|
8
3
|
* Renders the `ConfiguratorErrorPage` element. The page is shown after something already failed, so
|
|
9
4
|
* a registered page that throws in turn falls back to the built-in page instead of taking the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{useCallback as e}from"react";import{ErrorBoundary as o}from"react-error-boundary";import{
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useCallback as e}from"react";import{ErrorBoundary as o}from"react-error-boundary";import{ConfiguratorErrorPageName as t,ConfiguratorErrorPagePropsProvider as n,PhoenixLayoutElement as a,useLogger as i,usePhoenixElementSlots as m}from"#package/react-sdk";import{BuiltInConfiguratorErrorPage as s}from"./BuiltInConfiguratorErrorPage.js";export const ConfiguratorErrorPageElement=l=>{let g=i(),{layoutElements:f}=m(),u=e(r=>{g.error("The ConfiguratorErrorPage element threw while rendering, so the built-in error page is shown instead. Fix the error in the registered ConfiguratorErrorPage element.",{},r)},[g]);return r(n,{value:l,children:r(o,{fallback:r(s,{}),onError:u,resetKeys:[f[t]],children:r(a,{name:t,elementProps:{...l}})})})};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { BuiltInConfiguratorErrorPage } from './BuiltInConfiguratorErrorPage.js';
|
|
2
|
-
export { ConfiguratorErrorPageElement
|
|
3
|
-
export { createConfiguratorErrorPage, type CreateConfiguratorErrorPage } from './create-configurator-error-page.js';
|
|
2
|
+
export { ConfiguratorErrorPageElement } from './ConfiguratorErrorPageElement.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BuiltInConfiguratorErrorPage}from"./BuiltInConfiguratorErrorPage.js";export{ConfiguratorErrorPageElement
|
|
1
|
+
export{BuiltInConfiguratorErrorPage}from"./BuiltInConfiguratorErrorPage.js";export{ConfiguratorErrorPageElement}from"./ConfiguratorErrorPageElement.js";
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export { ConfiguratorApp } from './ConfiguratorApp.js';
|
|
2
|
-
export {
|
|
3
|
-
|
|
2
|
+
export {
|
|
3
|
+
/** @deprecated Use `createConfigurationNotFoundPage` from `@salsita-ai/sdk/react`. */
|
|
4
|
+
createConfigurationNotFoundPage,
|
|
5
|
+
/** @deprecated Use `CreateConfigurationNotFoundPage` from `@salsita-ai/sdk/react`. */
|
|
6
|
+
type CreateConfigurationNotFoundPage,
|
|
7
|
+
/** @deprecated Use `createConfiguratorErrorPage` from `@salsita-ai/sdk/react`. */
|
|
8
|
+
createConfiguratorErrorPage,
|
|
9
|
+
/** @deprecated Use `CreateConfiguratorErrorPage` from `@salsita-ai/sdk/react`. */
|
|
10
|
+
type CreateConfiguratorErrorPage, } from '#package/react-sdk';
|
|
4
11
|
export * from './application-runtime/index.js';
|
|
5
12
|
export * from './common/index.js';
|
|
6
13
|
export * from './toolbar-actions/index.js';
|