@salsita-ai/sdk 0.50.0-develop.f81ab6ac76 → 0.50.0-develop.f87b940e67
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/errors/diagnostic-codes.d.ts +9 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +10 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +24 -22
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +13 -6
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- 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/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +33 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
- package/dist/configurator/app-loader-content/index.d.ts +1 -0
- package/dist/configurator/app-loader-content/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +4 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +33 -7
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +23 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +14 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +45 -4
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +14 -5
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +111 -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 -1
- package/dist/configurator/configuration-not-found-page/index.js +1 -1
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +12 -0
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -0
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
- package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +10 -0
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +7 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
- package/dist/configurator/configurator-error-page/index.d.ts +2 -0
- package/dist/configurator/configurator-error-page/index.js +1 -0
- package/dist/configurator/index.d.ts +10 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/default-configurator-elements.d.ts +4 -2
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/default-elements/index.d.ts +1 -0
- package/dist/configurator/pages/default-elements/index.js +1 -1
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
- package/dist/configurator/scene/index.d.ts +1 -0
- package/dist/configurator/scene/index.js +1 -1
- package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
- package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
- package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
- package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
- package/dist/configurator/toolbar-actions/index.d.ts +3 -0
- package/dist/configurator/toolbar-actions/index.js +1 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
- package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
- package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +3 -2
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +8 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
- package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/alert/index.js +1 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +3 -4
- package/dist/configurator/ui/assistant/form/form-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -1
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +3 -2
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +3 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-element-definition.d.ts → registry/form-element-definition.d.ts} +3 -1
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/{form-registry.d.ts → registry/form-registry.d.ts} +2 -2
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +4 -1
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +20 -16
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +0 -9
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +9 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +14 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +2 -2
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/tool-chip.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/configurator-layout/universal/ExportingOverlay.d.ts +5 -0
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/index.d.ts +1 -0
- package/dist/configurator/ui/index.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 -6
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- 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/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.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/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
- package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
- package/dist/docs/fabs/basic.mdx +4 -0
- package/dist/docs/index.json +95 -1
- package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
- package/dist/docs/layouts/custom-layout.mdx +321 -159
- package/dist/docs/layouts/gallery/ardent-compressor.mdx +3516 -0
- package/dist/docs/layouts/gallery/corvid-drone.mdx +3428 -0
- package/dist/docs/layouts/gallery/fenwick-window.mdx +2803 -0
- package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6567 -0
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1858 -0
- package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3698 -0
- package/dist/docs/layouts/gallery/sunfold-solar.mdx +2683 -0
- package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5203 -0
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -1
- package/dist/docs/other-features/error-5xx.mdx +1 -1
- package/dist/docs/other-features/navigation-hotspot.mdx +2 -0
- package/dist/docs/other-features/not-found-404.mdx +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +202 -67
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +5 -5
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +1 -1
- package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
- package/dist/docs/phoenix/testing.mdx +2 -2
- package/dist/docs/selection-and-highlight/hotspots.mdx +2 -0
- package/dist/domain/application/assistant/assistant-manifest.d.ts +16 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +8 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/form/assistant-form-element-name.d.ts +11 -0
- package/dist/domain/application/assistant/form/assistant-form-element-name.js +8 -0
- package/dist/domain/application/assistant/form/assistant-form-elements.d.ts +174 -0
- package/dist/domain/application/assistant/form/assistant-form-elements.js +1 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.d.ts +10 -0
- package/dist/domain/application/assistant/form/assistant-resource-path.js +1 -0
- package/dist/domain/application/assistant/form/index.d.ts +4 -0
- package/dist/domain/application/assistant/form/index.js +1 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -0
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +2 -3
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -0
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- 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/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components.js +1 -1
- package/dist/domain/domain-builder.d.ts +9 -3
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
- package/dist/domain/domain-context/store-system/store-system.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-context/selectors.d.ts +1 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +44 -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/environment/types.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/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +15 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.d.ts +12 -0
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +3 -1
- 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/spec/selectors.d.ts +3 -1
- package/dist/domain/domain-runtime/spec/selectors.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/extensions/export-images/agent-screenshot.d.ts +24 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
- package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts} +2 -2
- package/dist/domain/extensions/export-images/client-side-image.js +1 -0
- package/dist/domain/extensions/export-images/index.d.ts +3 -0
- package/dist/domain/extensions/export-images/index.js +1 -0
- package/dist/domain/extensions/{save-template-thumbnail.d.ts → export-images/save-template-thumbnail.d.ts} +2 -2
- package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -2
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
- 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/editor/screenshot/ScreenshotHandler.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +16 -0
- package/dist/legacy/domain-spec/spec/domain-spec.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/analytics/frontend-analytics.d.ts +4 -0
- package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -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/responsive/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +26 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -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 +3 -0
- package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
- package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
- package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
- 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/responsive/actions.d.ts +47 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +104 -0
- package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
- package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
- package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +313 -10
- 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/domain-context/common-hooks/index.d.ts +9 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +5 -0
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -1
- package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
- package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
- package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
- package/dist/react-sdk/handlers/index.d.ts +5 -0
- package/dist/react-sdk/handlers/index.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-action.d.ts +3 -2
- package/dist/react-sdk/handlers/use-finalize-action.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
- package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
- package/dist/react-sdk/index.d.ts +2 -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.d.ts +20 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.d.ts +15 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
- package/dist/react-sdk/page-elements/create-configurator-error-page.d.ts +14 -0
- 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/scene-control-elements/AddEntityFabElement.d.ts +36 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
- package/dist/react-sdk/scene-control-elements/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.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/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
- package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
- package/dist/react-sdk/web-component/god-mode/index.js +1 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
- package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +4 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
- package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +59 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +5 -1
- package/package.json +13 -3
- package/schema/domain-spec.json +140 -0
- package/dist/configurator/ui/assistant/form/built-in-form-registry.d.ts +0 -10
- package/dist/configurator/ui/assistant/form/built-in-form-registry.js +0 -1
- package/dist/configurator/ui/assistant/form/form-registry.js +0 -8
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
- package/dist/domain/application/assistant/assistant-form-elements.d.ts +0 -28
- package/dist/domain/application/assistant/assistant-form-elements.js +0 -1
- package/dist/domain/extensions/client-side-image.js +0 -1
- package/dist/domain/extensions/save-template-thumbnail.js +0 -1
- package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
- package/dist/react-sdk/application-runtime/runtime/god-mode.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 -32
- package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
- /package/dist/{configurator/ui/assistant/form/form-element-definition.js → react-sdk/application-runtime/host-properties/types.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
2
|
import type { AnyApplicationConfig } from '../application/index.js';
|
|
3
3
|
import { type ApplicationAccessInfo } from './access/index.js';
|
|
4
|
+
import { type Application } from './application.js';
|
|
4
5
|
import { type ApplicationDomainContextState, type DomainApplicationType, type InitializableSystem } from './domain-context/index.js';
|
|
5
6
|
import { type ApplicationDomainData } from './domain-data/index.js';
|
|
6
7
|
import { type DomainRuntimeServices } from './domain-services/index.js';
|
|
@@ -21,17 +22,30 @@ export interface DomainRuntimeState {
|
|
|
21
22
|
readonly webComponent: ApplicationWebComponentState;
|
|
22
23
|
readonly domainContext: ApplicationDomainContextState;
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* What a domain runtime starts from: the spec slice and the environment of an application, or the
|
|
27
|
+
* config of a project built with `ConfiguratorBuilder`, which is converted to them when the runtime
|
|
28
|
+
* initializes.
|
|
29
|
+
*/
|
|
30
|
+
type DomainRuntimeSource = {
|
|
31
|
+
readonly application: Pick<Application, 'spec' | 'environment'>;
|
|
32
|
+
readonly config?: undefined;
|
|
33
|
+
} | {
|
|
25
34
|
readonly config: AnyApplicationConfig;
|
|
35
|
+
readonly application?: undefined;
|
|
36
|
+
};
|
|
37
|
+
type DomainRuntimeProps = DomainRuntimeSource & {
|
|
26
38
|
readonly services: DomainRuntimeServices;
|
|
27
|
-
readonly getSubject: () => BehaviorSubject<State>;
|
|
28
39
|
/**
|
|
29
40
|
* Systems a host layers onto a slot's domain initialization. Webhook and finalize hosts run the
|
|
30
41
|
* domain alone and pass nothing; the application runtime contributes its domain-application
|
|
31
42
|
* systems here.
|
|
32
43
|
*/
|
|
33
44
|
readonly getExtensionSystems?: (applicationType: DomainApplicationType) => readonly InitializableSystem[];
|
|
34
|
-
}
|
|
45
|
+
};
|
|
46
|
+
type Props<State extends DomainRuntimeState> = DomainRuntimeProps & {
|
|
47
|
+
readonly getSubject: () => BehaviorSubject<State>;
|
|
48
|
+
};
|
|
35
49
|
export declare function createDomainRuntimeSlices<State extends DomainRuntimeState>(props: Props<State>): {
|
|
36
50
|
initialize: () => {
|
|
37
51
|
spec: ApplicationSpec;
|
|
@@ -86,6 +100,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
86
100
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
87
101
|
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
88
102
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
103
|
+
assistantFormElements: Record<string, import("react").ComponentType<never>>;
|
|
89
104
|
hashes: Record<string, string>;
|
|
90
105
|
}>;
|
|
91
106
|
selectDataConfig: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").DataSpec | null>;
|
|
@@ -129,6 +144,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
129
144
|
getElementSlots: () => {
|
|
130
145
|
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
131
146
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
147
|
+
assistantFormElements: Record<string, import("react").ComponentType<never>>;
|
|
132
148
|
hashes: Record<string, string>;
|
|
133
149
|
};
|
|
134
150
|
getDataConfig: () => import("../index.js").DataSpec | null;
|
|
@@ -342,6 +358,8 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
342
358
|
webComponent: {
|
|
343
359
|
selectReadonly: import("@salsita-ai/common/utils").Selector<import("./index.js").WebComponentSelectorState, boolean>;
|
|
344
360
|
getReadonly: () => boolean;
|
|
361
|
+
selectLocale: import("@salsita-ai/common/utils").Selector<import("./index.js").WebComponentSelectorState, string>;
|
|
362
|
+
getLocale: () => string;
|
|
345
363
|
getWebcomponentGeneration: () => number;
|
|
346
364
|
};
|
|
347
365
|
domainContext: {
|
|
@@ -415,6 +433,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
415
433
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
416
434
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
417
435
|
getIsInitialized: () => boolean;
|
|
436
|
+
getIsViewMode: () => boolean;
|
|
418
437
|
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
419
438
|
getStoreRuntimeDependencies: () => {
|
|
420
439
|
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
@@ -524,6 +543,7 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
524
543
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
525
544
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
526
545
|
getIsInitialized: () => boolean;
|
|
546
|
+
getIsViewMode: () => boolean;
|
|
527
547
|
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
528
548
|
getStoreRuntimeDependencies: () => {
|
|
529
549
|
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
@@ -628,9 +648,16 @@ export declare function createDomainRuntimeSlices<State extends DomainRuntimeSta
|
|
|
628
648
|
};
|
|
629
649
|
};
|
|
630
650
|
};
|
|
651
|
+
/**
|
|
652
|
+
* Writers only the runtime that owns the host-property mirror may call, kept off the public
|
|
653
|
+
* `actions`: the host sets `locale` on the element, and the mirror copies it here.
|
|
654
|
+
*/
|
|
655
|
+
hostMirrorActions: {
|
|
656
|
+
setLocale: (locale: string) => void;
|
|
657
|
+
};
|
|
631
658
|
};
|
|
632
659
|
export type DomainRuntimeSlices = ReturnType<typeof createDomainRuntimeSlices>;
|
|
633
|
-
export declare const createDomainRuntime: (props:
|
|
660
|
+
export declare const createDomainRuntime: (props: DomainRuntimeProps) => {
|
|
634
661
|
initialize: () => {
|
|
635
662
|
spec: ApplicationSpec;
|
|
636
663
|
overrides: ApplicationOverrides;
|
|
@@ -684,6 +711,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
684
711
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, {
|
|
685
712
|
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
686
713
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
714
|
+
assistantFormElements: Record<string, import("react").ComponentType<never>>;
|
|
687
715
|
hashes: Record<string, string>;
|
|
688
716
|
}>;
|
|
689
717
|
selectDataConfig: import("@salsita-ai/common/utils").Selector<import("./index.js").SpecSelectorState, import("../index.js").DataSpec | null>;
|
|
@@ -727,6 +755,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
727
755
|
getElementSlots: () => {
|
|
728
756
|
entityElements: Record<string, (props: import("./index.js").CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
729
757
|
layoutElements: Record<string, (props: import("react").PropsWithChildren) => JSX.Element>;
|
|
758
|
+
assistantFormElements: Record<string, import("react").ComponentType<never>>;
|
|
730
759
|
hashes: Record<string, string>;
|
|
731
760
|
};
|
|
732
761
|
getDataConfig: () => import("../index.js").DataSpec | null;
|
|
@@ -940,6 +969,8 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
940
969
|
webComponent: {
|
|
941
970
|
selectReadonly: import("@salsita-ai/common/utils").Selector<import("./index.js").WebComponentSelectorState, boolean>;
|
|
942
971
|
getReadonly: () => boolean;
|
|
972
|
+
selectLocale: import("@salsita-ai/common/utils").Selector<import("./index.js").WebComponentSelectorState, string>;
|
|
973
|
+
getLocale: () => string;
|
|
943
974
|
getWebcomponentGeneration: () => number;
|
|
944
975
|
};
|
|
945
976
|
domainContext: {
|
|
@@ -1013,6 +1044,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
1013
1044
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
1014
1045
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
1015
1046
|
getIsInitialized: () => boolean;
|
|
1047
|
+
getIsViewMode: () => boolean;
|
|
1016
1048
|
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
1017
1049
|
getStoreRuntimeDependencies: () => {
|
|
1018
1050
|
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
@@ -1122,6 +1154,7 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
1122
1154
|
getMigrate: () => import("../index.js").MigrateFunction<import("../index.js").DomainEntity<string>>;
|
|
1123
1155
|
getActiveMode: () => import("../index.js").DomainMode;
|
|
1124
1156
|
getIsInitialized: () => boolean;
|
|
1157
|
+
getIsViewMode: () => boolean;
|
|
1125
1158
|
getComponentReaderIndexes: () => import("./index.js").ComponentReaderIndexes;
|
|
1126
1159
|
getStoreRuntimeDependencies: () => {
|
|
1127
1160
|
componentReaderIndexes: import("./index.js").ComponentReaderIndexes;
|
|
@@ -1226,6 +1259,13 @@ export declare const createDomainRuntime: (props: Omit<Props<DomainRuntimeState>
|
|
|
1226
1259
|
};
|
|
1227
1260
|
};
|
|
1228
1261
|
};
|
|
1262
|
+
/**
|
|
1263
|
+
* Writers only the runtime that owns the host-property mirror may call, kept off the public
|
|
1264
|
+
* `actions`: the host sets `locale` on the element, and the mirror copies it here.
|
|
1265
|
+
*/
|
|
1266
|
+
hostMirrorActions: {
|
|
1267
|
+
setLocale: (locale: string) => void;
|
|
1268
|
+
};
|
|
1229
1269
|
getState: () => DomainRuntimeState;
|
|
1230
1270
|
subscribe: (callback: () => void) => () => void;
|
|
1231
1271
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BehaviorSubject as e}from"rxjs";import{createAccessInfoActions as t,createAccessInfoSelectors as n,initializeAccessInfo as a}from"./access/index.js";import{createDomainContextActions as
|
|
1
|
+
import{BehaviorSubject as e}from"rxjs";import{createAccessInfoActions as t,createAccessInfoSelectors as n,initializeAccessInfo as a}from"./access/index.js";import{applicationFromConfig as o}from"./application.js";import{createDomainContextActions as i,createDomainContextSelectors as s,initializeDomainContext as r}from"./domain-context/index.js";import{createDomainDataActions as m,createDomainDataSelectors as l,initializeDomainData as c}from"./domain-data/index.js";import{createDomainServicesSelectors as d}from"./domain-services/index.js";import{createEnvironmentActions as u,createEnvironmentSelectors as v,initializeEnvironment as p}from"./environment/index.js";import{createLoadedDataActions as x,createLoadedDataSelectors as S,initializeLoadedData as f}from"./loaded-data/index.js";import{createOverridesActions as g,createOverridesSelectors as C,initializeOverrides as D}from"./overrides/index.js";import{createSessionContextActions as b,createSessionContextSelectors as j,initializeSessionContext as w}from"./session-context/index.js";import{createSpecActions as y,createSpecSelectors as E}from"./spec/index.js";import{createWebComponentActions as z,createWebComponentSelectors as R,initializeWebComponent as h}from"./web-component/index.js";export function createDomainRuntimeSlices(e){let{getSubject:A,services:T,getExtensionSystems:I}=e,L=y({setSpec:e=>{let t=A(),n=e(t.value.spec);t.next({...t.value,spec:n})}}),M=E({getState:()=>A().value}),O=d({services:T,specSelectors:M}),W=g({setOverrides:e=>{let t=A(),n=e(t.value.overrides);t.next({...t.value,overrides:n})}}),k=C({getState:()=>A().value}),q=v({getState:()=>A().value,overridesSelectors:k}),B=u({setEnvironment:e=>{let t=A(),n=e(t.value.environment);t.next({...t.value,environment:n})}}),F=x({setLoadedData:e=>{let t=A(),n=e(t.value.loadedData);t.next({...t.value,loadedData:n})}}),G=S({getState:()=>A().value}),H=m({setDomainDataState:e=>{let t=A(),n=e(t.value.domainData);t.next({...t.value,domainData:n})}}),J=l({getState:()=>A().value,overridesSelectors:k}),K=b({setSessionContextState:e=>{let t=A(),n=e(t.value.sessionContext);t.next({...t.value,sessionContext:n})}}),N=j({getState:()=>A().value,overridesSelectors:k}),P=t({setAccessInfoState:e=>{let t=A(),n=e(t.value.access);t.next({...t.value,access:n})}}),Q=n({getState:()=>A().value,overridesSelectors:k}),{setLocale:U,...V}=z({setWebComponentState:e=>{let t=A(),n=e(t.value.webComponent);t.next({...t.value,webComponent:n})}}),X=R({getState:()=>A().value}),Y=i({setDomainContextState:e=>{let t=A(),n=e(t.value.domainContext);t.next({...t.value,domainContext:n})}}),Z={configurator:s({applicationType:"configurator",getState:()=>A().value,actions:Y.configurator,getExtensionSystems:()=>I?.("configurator")??[],specSelectors:M,accessSelectors:Q,webComponentSelectors:X,domainDataSelectors:J,sessionContextSelectors:N,domainServicesSelectors:O,environmentSelectors:q}),admin:s({applicationType:"admin",getState:()=>A().value,actions:Y.admin,getExtensionSystems:()=>I?.("admin")??[],specSelectors:M,accessSelectors:Q,webComponentSelectors:X,domainDataSelectors:J,sessionContextSelectors:N,domainServicesSelectors:O,environmentSelectors:q})};return{initialize:()=>{let t=e.application??o(e.config);return{spec:t.spec,overrides:D(),environment:p(t.environment),loadedData:f(),domainData:c(),sessionContext:w(),access:a(),webComponent:h(),domainContext:r()}},selectors:{domainServices:O,spec:M,overrides:k,environment:q,loadedData:G,domainData:J,sessionContext:N,access:Q,webComponent:X,domainContext:Z},actions:{spec:L,overrides:W,environment:B,loadedData:F,domainData:H,sessionContext:K,access:P,webComponent:V,domainContext:Y},hostMirrorActions:{setLocale:U}}}export const createDomainRuntime=t=>{let n=null,a=createDomainRuntimeSlices({...t,getSubject:()=>{if(!n)throw Error("Subject not yet initialized!");return n}});return n=new e(a.initialize()),{...a,getState:()=>n.value,subscribe:e=>{let t=n.subscribe(()=>e());return()=>t.unsubscribe()}}};
|
|
@@ -2,4 +2,4 @@ import type { AnyApplicationConfig } from '../../application/index.js';
|
|
|
2
2
|
import type { ApplicationEnvironmentConfig } from './types.js';
|
|
3
3
|
export declare const GOD_MODE_SESSION_STORAGE_KEY = "salsita-god-mode";
|
|
4
4
|
export declare const isNotRegisteredDeploymentId: (deploymentId: string) => boolean;
|
|
5
|
-
export declare const initializeEnvironment: (config: AnyApplicationConfig) => ApplicationEnvironmentConfig;
|
|
5
|
+
export declare const initializeEnvironment: (config: Pick<AnyApplicationConfig, 'defaultEnvs' | 'deploymentId' | 'isDev' | 'persistence'>) => ApplicationEnvironmentConfig;
|
|
@@ -18,7 +18,7 @@ export interface ApplicationEnvironmentConfig {
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether the maintenance "god mode" is enabled — it unlocks destructive admin tooling
|
|
20
20
|
* (eg. the maintenance menu). Seeded from session storage during mount and toggled at
|
|
21
|
-
* runtime via the `window.__salsita.setGodMode` global (see `
|
|
21
|
+
* runtime via the `window.__salsita.setGodMode` global, per runtime (see `SetGodMode`).
|
|
22
22
|
*/
|
|
23
23
|
readonly godMode: boolean;
|
|
24
24
|
/**
|
|
@@ -10,6 +10,8 @@ export interface ImplementationErrorCollector {
|
|
|
10
10
|
*/
|
|
11
11
|
readonly attempt: <T>(check: () => T, fallback: T) => T;
|
|
12
12
|
readonly add: (error: ImplementationError) => void;
|
|
13
|
+
/** The errors recorded so far, in the order they were recorded. A host that reports them itself, such as the editor, reads them here instead of throwing them. */
|
|
14
|
+
readonly recorded: () => readonly ImplementationError[];
|
|
13
15
|
/**
|
|
14
16
|
* Throws the recorded errors as one {@link ImplementationErrors}, in the order they were
|
|
15
17
|
* recorded. Does nothing when there are none.
|
|
@@ -1 +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)}}};
|
|
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}},recorded:()=>[...o],throwIfAny:()=>{if(o.length>0)throw new t(o)}}};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './domain-runtime.js';
|
|
2
|
+
export { type Application, applicationFromConfig } from './application.js';
|
|
2
3
|
export * from './domain-context/index.js';
|
|
3
4
|
export * from './domain-services/index.js';
|
|
4
|
-
export { type ImplementationErrorCode, type ImplementationErrorProps, type StartupStage, ImplementationError, ImplementationErrors, isImplementationError, isImplementationErrors, toImplementationErrors, } from './errors/index.js';
|
|
5
|
+
export { type ImplementationErrorCode, type ImplementationErrorCollector, type ImplementationErrorProps, type StartupStage, ImplementationError, ImplementationErrors, createImplementationErrorCollector, isImplementationError, isImplementationErrors, toImplementationErrors, } from './errors/index.js';
|
|
5
6
|
export * from './spec/index.js';
|
|
6
7
|
export * from './environment/index.js';
|
|
7
8
|
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{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";
|
|
1
|
+
export*from"./domain-runtime.js";export{applicationFromConfig}from"./application.js";export*from"./domain-context/index.js";export*from"./domain-services/index.js";export{ImplementationError,ImplementationErrors,createImplementationErrorCollector,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";
|
|
@@ -4,6 +4,6 @@ export * from './actions.js';
|
|
|
4
4
|
export * from './create-violation-expressions.js';
|
|
5
5
|
export * from './initialize.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
|
+
export { type PhoenixEntityElementProps, type PhoenixEntityElementRegistration, type PhoenixLayoutElementRegistration, type PhoenixIconRegistration, type AssistantFormElementRegistration, type ElementRegistration, type CustomPhoenixEntityElementProps, type PhoenixLayoutElementDefinition, type PhoenixEntityElementDefinition, type CreateCustomPhoenixLayoutElement, type CreateCustomPhoenixEntityElement, createPhoenixLayoutElement, createPhoenixEntityElement, createCustomPhoenixLayoutElement, createCustomPhoenixEntityElement, createAssistantFormElement, findAssistantFormElementErrors, 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, type ValuedExpressions, mergeExpressionModules, resolveImportedTransformers, resolveTransformerModule, resolveTransformerModules, resolveInvariantModules, } from './module-checks/index.js';
|
|
8
8
|
export * from './prepare-action-implementations.js';
|
|
9
9
|
export * from './prepare-domain-expressions.js';
|
|
@@ -1 +1 @@
|
|
|
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
|
+
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,createAssistantFormElement,findAssistantFormElementErrors,resolveElementModule,resolveElementModules,createPhoenixHandler,createSystemPhoenixHandler,createSystemPhoenixAsyncHandler,resolveHandlerModule,resolveHandlerModules,resolveActionModules,resolveComponentOpticModules,resolveExpressionModules,mergeExpressionModules,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{createImplementationErrorCollector as t}from"../errors/index.js";import{resolveComponentOpticModules as a,resolveElementModule as n,resolveHandlerModule as o,resolveImportedTransformers as i,resolveTransformerModule as s}from"./module-checks/index.js";let r=(e,t,a)=>e.flatMap(e=>a.attempt(()=>t(e),[]));export const initializeSpec=m=>{let c=m.adminDomain.presets[0];if(!c)throw Error("Cannot register application spec because admin preset is required.");let d=t(),l=r(m.handlers,o,d),p=r(m.elements,n,d),y=r(m.transformers?.importedTransformers??[],e=>[s(e)],d),u=r(m.domain.componentOptics,e=>a([e]),d),f=r(m.adminDomain.componentOptics,e=>a([e]),d);d.throwIfAny();let x=(e=>{let t={};for(let a of e)t[a.name]=(void 0)??a.name;return t})(l),g=(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})(p),v=m.transformers?.specTransformers??[];return{version:m.version,dataConfig:m.dataSpec??null,chunks:m.chunks,publishedDataHash:m.publishedDataHash,initialPublishedData:m.initialPublishedData,canCreate:m.features?.acl?.canCreate??Object.values(e),enableAdminRelease:m.features?.enableAdminRelease??!1,textLanguages:m.domain.textLanguages??m.adminDomain.textLanguages??["en"],baseResourcesUrl:m.resources?.baseResourcesUrl??m.defaultEnvs?.resourcesUrl??"",configurator:{factory:m.domain.domainFactory,presets:m.domain.presets,aliasMap:m.domain.domainFactory.context.aliasMap,entityReflections:m.domain.domainFactory.context.entityReflections,$entityReflections:m.domain.domainFactory.context.$entityReflections,expressions:m.domain.domainFactory.context.expressions,actions:m.domain.domainFactory.context.actions,actionImplementations:m.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.domain.domainFactory.context.allowedRootEntityTypes,migrate:m.domain.domainFactory.context.migrate,componentOptics:u,createTransformers:e=>i(y,v,e),navigationStates:m.navigation?.navigationStates??[],viewStates:m.navigation?.viewStates??[],toolStates:m.navigation?.toolStates??[],exportStates:m.navigation?.exportStates??[],handlers:l,handlerHashes:x,elements:p,defaultElements:m.defaultElements??[],elementHashes:g,appLoader:m.ui?.appLoader??"universal",preview:m.ui?.preview??"auto",alwaysExpand:m.ui?.alwaysExpand??!1,theme:m.ui?.theme??{},assistant:m.assistant??null,deploymentQueryDisabled:m.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:m.resources?.prefetchTextureUrls??[],modelVersion:m.domain.domainFactory.modelVersion},admin:{factory:m.adminDomain.domainFactory,modelVersion:m.adminDomain.domainFactory.modelVersion,aliasMap:m.adminDomain.domainFactory.context.aliasMap,entityReflections:m.adminDomain.domainFactory.context.entityReflections,$entityReflections:m.adminDomain.domainFactory.context.$entityReflections,expressions:m.adminDomain.domainFactory.context.expressions,actions:m.adminDomain.domainFactory.context.actions,actionImplementations:m.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:m.adminDomain.domainFactory.context.migrate,preset:c,componentOptics:f,navigationStates:m.adminNavigation?.navigationStates??[],viewStates:m.adminNavigation?.viewStates??[],handlers:l,handlerHashes:x,elements:p,elementHashes:g}}};
|
|
1
|
+
import{SessionRole as e}from"@salsita-ai/contracts/api";import{createImplementationErrorCollector as t}from"../errors/index.js";import{resolveComponentOpticModules as a,resolveElementModule as n,resolveHandlerModule as o,resolveImportedTransformers as i,resolveTransformerModule as s}from"./module-checks/index.js";let r=(e,t,a)=>e.flatMap(e=>a.attempt(()=>t(e),[]));export const initializeSpec=m=>{let c=m.adminDomain.presets[0];if(!c)throw Error("Cannot register application spec because admin preset is required.");let d=t(),l=r(m.handlers,o,d),p=r(m.elements,n,d),y=r(m.transformers?.importedTransformers??[],e=>[s(e)],d),u=r(m.domain.componentOptics,e=>a([e]),d),f=r(m.adminDomain.componentOptics,e=>a([e]),d);d.throwIfAny();let x=(e=>{let t={};for(let a of e)t[a.name]=(void 0)??a.name;return t})(l),g=(e=>{let t={},a=0;for(let n of e)if("assistantFormElement"!==n.type)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})(p),v=m.transformers?.specTransformers??[];return{version:m.version,dataConfig:m.dataSpec??null,chunks:m.chunks,publishedDataHash:m.publishedDataHash,initialPublishedData:m.initialPublishedData,canCreate:m.features?.acl?.canCreate??Object.values(e),enableAdminRelease:m.features?.enableAdminRelease??!1,textLanguages:m.domain.textLanguages??m.adminDomain.textLanguages??["en"],baseResourcesUrl:m.resources?.baseResourcesUrl??m.defaultEnvs?.resourcesUrl??"",configurator:{factory:m.domain.domainFactory,presets:m.domain.presets,aliasMap:m.domain.domainFactory.context.aliasMap,entityReflections:m.domain.domainFactory.context.entityReflections,$entityReflections:m.domain.domainFactory.context.$entityReflections,expressions:m.domain.domainFactory.context.expressions,actions:m.domain.domainFactory.context.actions,actionImplementations:m.domain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.domain.domainFactory.context.allowedRootEntityTypes,migrate:m.domain.domainFactory.context.migrate,componentOptics:u,createTransformers:e=>i(y,v,e),navigationStates:m.navigation?.navigationStates??[],viewStates:m.navigation?.viewStates??[],toolStates:m.navigation?.toolStates??[],exportStates:m.navigation?.exportStates??[],handlers:l,handlerHashes:x,elements:p,defaultElements:m.defaultElements??[],elementHashes:g,appLoader:m.ui?.appLoader??"universal",preview:m.ui?.preview??"auto",alwaysExpand:m.ui?.alwaysExpand??!1,theme:m.ui?.theme??{},assistant:m.assistant??null,deploymentQueryDisabled:m.resources?.deploymentQueryDisabled??!1,prefetchTextureUrls:m.resources?.prefetchTextureUrls??[],modelVersion:m.domain.domainFactory.modelVersion},admin:{factory:m.adminDomain.domainFactory,modelVersion:m.adminDomain.domainFactory.modelVersion,aliasMap:m.adminDomain.domainFactory.context.aliasMap,entityReflections:m.adminDomain.domainFactory.context.entityReflections,$entityReflections:m.adminDomain.domainFactory.context.$entityReflections,expressions:m.adminDomain.domainFactory.context.expressions,actions:m.adminDomain.domainFactory.context.actions,actionImplementations:m.adminDomain.domainFactory.context.actionImplementations,allowedRootEntityTypes:m.adminDomain.domainFactory.context.allowedRootEntityTypes,migrate:m.adminDomain.domainFactory.context.migrate,preset:c,componentOptics:f,navigationStates:m.adminNavigation?.navigationStates??[],viewStates:m.adminNavigation?.viewStates??[],handlers:l,handlerHashes:x,elements:p,elementHashes:g}}};
|
|
@@ -21,7 +21,19 @@ export type PhoenixIconRegistration = {
|
|
|
21
21
|
type: 'icon';
|
|
22
22
|
elements: ReadonlyArray<(props: SvgIconProps) => JSX.Element>;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The component of one of the project's own assistant form elements, registered under the name its
|
|
26
|
+
* YAML declares it by in `assistant.formElements`. The component's props depend on the element's
|
|
27
|
+
* role and are typed by `phx.frontend.createAssistantFormElement` from the YAML; the registration
|
|
28
|
+
* itself is untyped, since the panel validates an element's attributes against the very declaration
|
|
29
|
+
* its props are typed from.
|
|
30
|
+
*/
|
|
31
|
+
export type AssistantFormElementRegistration = {
|
|
32
|
+
type: 'assistantFormElement';
|
|
33
|
+
name: string;
|
|
34
|
+
element: (props: never) => ReactNode;
|
|
35
|
+
};
|
|
36
|
+
export type ElementRegistration = PhoenixEntityElementRegistration | PhoenixLayoutElementRegistration | PhoenixIconRegistration | AssistantFormElementRegistration;
|
|
25
37
|
export interface CustomPhoenixEntityElementProps {
|
|
26
38
|
entityId: DomainEntityId<string>;
|
|
27
39
|
children?: ReactNode;
|
|
@@ -67,6 +79,8 @@ export declare const createPhoenixLayoutElement: <SCHEMA extends {
|
|
|
67
79
|
}>;
|
|
68
80
|
export declare const createCustomPhoenixLayoutElement: (name: string, element: (props: PropsWithChildren) => JSX.Element) => PhoenixLayoutElementRegistration;
|
|
69
81
|
export type CreateCustomPhoenixLayoutElement = (name: string, element: (props: PropsWithChildren) => JSX.Element) => PhoenixLayoutElementRegistration;
|
|
82
|
+
/** Registers a component as the assistant form element of the name. */
|
|
83
|
+
export declare const createAssistantFormElement: (name: string, element: (props: never) => ReactNode) => AssistantFormElementRegistration;
|
|
70
84
|
type SchemaOfPhoenixElement<SCHEMA extends {
|
|
71
85
|
kind: string;
|
|
72
86
|
props?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SHARED_FOLDER_HINT as e,isRecord as t,resolveListModule as o}from"./project-modules.js";export const createPhoenixLayoutElement=e=>e.component;export const createCustomPhoenixLayoutElement=(e,t)=>({type:"layout",name:e,element:t});export const createPhoenixEntityElement=e=>e.component;export const createCustomPhoenixEntityElement=(e,t)=>({type:"entity",name:e,element:t});let n={expected:"an element registration, or an array of them",fix:`Create it with phx.frontend.createCustomPhoenixLayoutElement(...) or phx.frontend.
|
|
1
|
+
import{SHARED_FOLDER_HINT as e,isRecord as t,resolveListModule as o}from"./project-modules.js";export const createPhoenixLayoutElement=e=>e.component;export const createCustomPhoenixLayoutElement=(e,t)=>({type:"layout",name:e,element:t});export const createAssistantFormElement=(e,t)=>({type:"assistantFormElement",name:e,element:t});export const createPhoenixEntityElement=e=>e.component;export const createCustomPhoenixEntityElement=(e,t)=>({type:"entity",name:e,element:t});let n={expected:"an element registration, or an array of them",fix:`Create it with phx.frontend.createCustomPhoenixLayoutElement(...), phx.frontend.createCustomPhoenixEntityElement(...) or phx.frontend.createAssistantFormElement(...), ${e}.`},r=e=>!!t(e)&&("icon"===e.type?Array.isArray(e.elements):("entity"===e.type||"layout"===e.type||"assistantFormElement"===e.type)&&"string"==typeof e.name&&"function"==typeof e.element);export const resolveElementModule=e=>o(e,n,r);export const resolveElementModules=e=>e.flatMap(resolveElementModule);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ImplementationError } from '../../errors/index.js';
|
|
2
|
+
import type { ElementRegistration } from './element-registration.js';
|
|
3
|
+
/**
|
|
4
|
+
* The mistakes in pairing the project's assistant form elements with their components: an element
|
|
5
|
+
* the YAML declares under `assistant.formElements` that no file in `src/elements/` registers, or
|
|
6
|
+
* that two register, and a registration of a name the YAML does not declare. Spec parsing cannot
|
|
7
|
+
* see which name a file registers, so the application checks this when it starts and on every hot
|
|
8
|
+
* reload, on the registrations of all element files together.
|
|
9
|
+
*/
|
|
10
|
+
export declare const findAssistantFormElementErrors: (formElements: ReadonlyArray<{
|
|
11
|
+
readonly name: string;
|
|
12
|
+
}>, elements: readonly ElementRegistration[]) => readonly ImplementationError[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ImplementationError as e}from"../../errors/index.js";export const findAssistantFormElementErrors=(t,n)=>{let s=n.flatMap(e=>"assistantFormElement"===e.type?[e.name]:[]),r=new Set(t.map(({name:e})=>e));return[...t.flatMap(({name:t})=>{let n=s.filter(e=>e===t).length;return 0===n?[new e({code:"MISSING_IMPLEMENTATION",origin:null,problem:`The assistant form element "${t}" declared under assistant.formElements has no component`,fix:`Add a file to src/elements/ that default-exports phx.frontend.createAssistantFormElement('${t}', Component), or remove the element from the YAML.`})]:n>1?[new e({code:"DUPLICATE_DEFINITION",origin:null,problem:`The assistant form element "${t}" is registered by ${n} files in src/elements/`,fix:`Each element has one component. Keep one phx.frontend.createAssistantFormElement('${t}', …) and remove the others.`})]:[]}),...[...new Set(s)].filter(e=>!r.has(e)).map(t=>new e({code:"MISSING_IMPLEMENTATION",origin:null,problem:`A file in src/elements/ registers the assistant form element "${t}", which assistant.formElements does not declare`,fix:`Declare "${t}" under assistant.formElements with its description, role and attributes, so the assistant knows the element, or remove the registration.`}))]};
|
|
@@ -1,8 +1,10 @@
|
|
|
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, } from './element-registration.js';
|
|
1
|
+
export { type PhoenixEntityElementProps, type PhoenixEntityElementRegistration, type PhoenixLayoutElementRegistration, type PhoenixIconRegistration, type AssistantFormElementRegistration, type ElementRegistration, type CustomPhoenixEntityElementProps, type PhoenixLayoutElementDefinition, type PhoenixEntityElementDefinition, type CreateCustomPhoenixLayoutElement, type CreateCustomPhoenixEntityElement, createPhoenixLayoutElement, createPhoenixEntityElement, createCustomPhoenixLayoutElement, createCustomPhoenixEntityElement, createAssistantFormElement, resolveElementModule, resolveElementModules, } from './element-registration.js';
|
|
2
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 { findAssistantFormElementErrors } from './find-assistant-form-element-errors.js';
|
|
3
4
|
export { type ProjectModule } from './project-modules.js';
|
|
4
5
|
export { resolveActionModules } from './resolve-action-modules.js';
|
|
5
6
|
export { resolveComponentOpticModules } from './resolve-component-optic-modules.js';
|
|
7
|
+
export { type ValuedExpressions, mergeExpressionModules } from './merge-expression-modules.js';
|
|
6
8
|
export { type ExpressionModule, resolveExpressionModules } from './resolve-expression-modules.js';
|
|
7
9
|
export { resolveImportedTransformers, resolveTransformerModule, resolveTransformerModules, } from './resolve-imported-transformers.js';
|
|
8
10
|
export { type AnyInvariant, resolveInvariantModules } from './resolve-invariant-modules.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createPhoenixLayoutElement,createPhoenixEntityElement,createCustomPhoenixLayoutElement,createCustomPhoenixEntityElement,resolveElementModule,resolveElementModules}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";
|
|
1
|
+
export{createPhoenixLayoutElement,createPhoenixEntityElement,createCustomPhoenixLayoutElement,createCustomPhoenixEntityElement,createAssistantFormElement,resolveElementModule,resolveElementModules}from"./element-registration.js";export{createPhoenixHandler,createSystemPhoenixHandler,createSystemPhoenixAsyncHandler,resolveHandlerModule,resolveHandlerModules}from"./handler-registration.js";export{findAssistantFormElementErrors}from"./find-assistant-form-element-errors.js";export{resolveActionModules}from"./resolve-action-modules.js";export{resolveComponentOpticModules}from"./resolve-component-optic-modules.js";export{mergeExpressionModules}from"./merge-expression-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";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnonymousExpression, AnyExpressions } from '../../../core/index.js';
|
|
2
|
+
import { type ImplementationErrorCollector } from '../../errors/index.js';
|
|
3
|
+
import { type ProjectModule } from './project-modules.js';
|
|
4
|
+
type AnyAnonymousExpression = AnonymousExpression<any, any, any, any, any, any, unknown>;
|
|
5
|
+
type AliasMap = Readonly<Record<string, readonly string[]>>;
|
|
6
|
+
/** The expression names that already have a value, by entity type, so no project file may define them. */
|
|
7
|
+
export type ValuedExpressions = ReadonlyMap<string, ReadonlySet<string>>;
|
|
8
|
+
/** Whether a file's default export has the shape of the expressions folder contract. */
|
|
9
|
+
export declare const isExpressionExport: (value: unknown) => value is Record<string, Record<string, AnyAnonymousExpression>>;
|
|
10
|
+
/**
|
|
11
|
+
* Merges the `src/expressions/` files (or `src/admin/expressions/`) into the expressions of each
|
|
12
|
+
* entity type. It checks each file against the folder contract, rejects an expression that two
|
|
13
|
+
* files, or two keys of one file, define for one entity type after the aliases of `aliasMap` are
|
|
14
|
+
* expanded, and rejects an expression listed in `valued`, which the application gives a value
|
|
15
|
+
* already. Each accepted expression gets its `origin`: its name and the entity type or alias the
|
|
16
|
+
* file keys it by.
|
|
17
|
+
*
|
|
18
|
+
* Each file is checked on its own: a wrong file is recorded in `errors` with all its conflicts and
|
|
19
|
+
* left out, and the files after it still merge. Without `errors`, everything recorded is thrown at
|
|
20
|
+
* the end as one `ImplementationErrors`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const mergeExpressionModules: (modules: readonly ProjectModule[], aliasMap: AliasMap, errors?: ImplementationErrorCollector, valued?: ValuedExpressions) => AnyExpressions;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ImplementationError as e,ImplementationErrors as o,createImplementationErrorCollector as t}from"../../errors/index.js";import{SHARED_FOLDER_HINT as i,createContractError as n,isRecord as r}from"./project-modules.js";let s={expected:"an object of expressions keyed by entity type or alias, then by expression name",fix:`Create it with phx.domain.implementCustomExpressions({ ... }) (phx.domain.admin.implementCustomExpressions({ ... }) under src/admin/), ${i}.`},a=e=>r(e)&&"function"==typeof e.evaluate,p=e=>r(e)&&Object.values(e).every(a);export const isExpressionExport=e=>r(e)&&Object.values(e).every(p);let l=(o,t,i)=>new e({code:"DUPLICATE_DEFINITION",origin:o,problem:`Duplicate expression ${t}`,fix:i}),d=(e,t,i,r)=>{if(!isExpressionExport(e.exports))throw n(e,s,e.exports);let a=[],p=new Map,d=[];for(let[o,n]of Object.entries(e.exports))for(let s of t[o]??[o])for(let[t,f]of Object.entries(n)){let n=`${s}.${t}`,h=p.get(n),m=i.get(n);r.get(s)?.has(t)?d.push(l(e.origin,n,"The application already gives it a value (an $eval, $msg or read in the spec, a relation, the $violations of its invariants, or a built-in expression of the SDK), so this implementation would be ignored. Remove it from the file, or declare the expression in the spec with a type and no value.")):void 0!==h?d.push(l(e.origin,n,`The file defines it on both ${h} and ${o}, so its value would depend on the order the definitions are merged in. Define it once, on the alias or on the entity type.`)):void 0!==m&&d.push(l(e.origin,n,`It is also defined in ${m}, so its value would depend on file order. Keep one definition and remove the other.`)),p.set(n,o),a.push({key:n,entityType:s,typeOrAlias:o,name:t,expression:f})}if(d.length>0)throw new o(d);return a};export const mergeExpressionModules=(e,o,i,n=new Map)=>{let r=i??t(),s=new Map,a={};for(let t of e)for(let{key:e,entityType:i,typeOrAlias:p,name:l,expression:f}of r.attempt(()=>d(t,o,s,n),[]))s.set(e,t.origin),a[i]={...a[i],[l]:{...f,origin:{name:l,typeOrAlias:p}}};return void 0===i&&r.throwIfAny(),a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnonymousExpression } from '../../../core/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { ProjectModule } from './project-modules.js';
|
|
3
3
|
/** The expressions of one validated expression file, keyed by entity type or alias, then by expression name. */
|
|
4
4
|
export interface ExpressionModule {
|
|
5
5
|
readonly origin: string;
|
|
@@ -7,9 +7,8 @@ export interface ExpressionModule {
|
|
|
7
7
|
}
|
|
8
8
|
type AnyAnonymousExpression = AnonymousExpression<any, any, any, any, any, any, unknown>;
|
|
9
9
|
/**
|
|
10
|
-
* Validates the `src/expressions/` files
|
|
11
|
-
*
|
|
12
|
-
* aliases at different points; within one file the builder's own duplicate check applies.
|
|
10
|
+
* Validates the `src/expressions/` files with the checks of {@link mergeExpressionModules}, throws
|
|
11
|
+
* everything they find as one `ImplementationErrors`, and returns each file on its own, unmerged.
|
|
13
12
|
*/
|
|
14
13
|
export declare const resolveExpressionModules: (modules: readonly ProjectModule[], aliasMap: Readonly<Record<string, readonly string[]>>) => readonly ExpressionModule[];
|
|
15
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isExpressionExport as e,mergeExpressionModules as o}from"./merge-expression-modules.js";export const resolveExpressionModules=(s,r)=>(o(s,r),s.flatMap(o=>e(o.exports)?[{origin:o.origin,expressions:o.exports}]:[]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react';
|
|
1
|
+
import type { ComponentType, PropsWithChildren } from 'react';
|
|
2
2
|
import { type CustomPhoenixEntityElementProps, type PhoenixHandlerDefinition, type SystemPhoenixAsyncHandlerDefinition, type SystemPhoenixHandlerDefinition } from './module-checks/index.js';
|
|
3
3
|
import type { ApplicationSpec } from './types.js';
|
|
4
4
|
/**
|
|
@@ -46,6 +46,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
46
46
|
selectElementSlots: import("@salsita-ai/common/utils").Selector<SpecSelectorState, {
|
|
47
47
|
entityElements: Record<string, (props: CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
48
48
|
layoutElements: Record<string, (props: PropsWithChildren) => JSX.Element>;
|
|
49
|
+
assistantFormElements: Record<string, ComponentType<never>>;
|
|
49
50
|
hashes: Record<string, string>;
|
|
50
51
|
}>;
|
|
51
52
|
selectDataConfig: import("@salsita-ai/common/utils").Selector<SpecSelectorState, import("../../index.js").DataSpec | null>;
|
|
@@ -89,6 +90,7 @@ export declare const createSpecSelectors: (context: Context) => {
|
|
|
89
90
|
getElementSlots: () => {
|
|
90
91
|
entityElements: Record<string, (props: CustomPhoenixEntityElementProps) => JSX.Element>;
|
|
91
92
|
layoutElements: Record<string, (props: PropsWithChildren) => JSX.Element>;
|
|
93
|
+
assistantFormElements: Record<string, ComponentType<never>>;
|
|
92
94
|
hashes: Record<string, string>;
|
|
93
95
|
};
|
|
94
96
|
getDataConfig: () => import("../../index.js").DataSpec | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";export const createSpecSelectors=a=>{let{getState:n}=a,s=e.withTypes(),r=s([s.leaf(e=>e.spec)],e=>e),l=s([r],e=>e.version),o=s([r],e=>e.baseResourcesUrl),i=s([r],e=>e.configurator),
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";import{buildAssistantManifest as t}from"../../application/assistant/index.js";export const createSpecSelectors=a=>{let{getState:n}=a,s=e.withTypes(),r=s([s.leaf(e=>e.spec)],e=>e),l=s([r],e=>e.version),o=s([r],e=>e.baseResourcesUrl),i=s([r],e=>e.configurator),m=s([r],e=>e.dataConfig),g=s([r],e=>e.chunks),p=s([r],e=>e.publishedDataHash),d=s([r],e=>e.initialPublishedData),c=s([r],e=>e.canCreate),u=s([r],e=>e.enableAdminRelease),h=s([r],e=>e.textLanguages),y=s([i],e=>e.modelVersion),f=s([r],e=>e.admin),C=s([f],e=>e.preset),E=s([f],e=>e.modelVersion),A=s([i],e=>e.theme),b=s([i],e=>e.assistant),x=s([b],e=>e?t(e):null),H=s([i],e=>e.factory),D=s([f],e=>e.factory),P=s([i],e=>e.componentOptics),S=s([f],e=>e.componentOptics),w=s([i],e=>e.appLoader),O=s([i],e=>e.preview),T=s([i],e=>e.alwaysExpand),V=s([i],e=>e.presets),F=s([i],e=>e.deploymentQueryDisabled),L=s([i],e=>e.prefetchTextureUrls),R=s([i],e=>e.handlerHashes),U=s([i],e=>e.handlers),v=s([U,R],(e,t)=>({...(e=>{let t={},a={},n={};for(let s of e)"phoenix"===s.type&&(t[s.name]=s.handler),"system"===s.type&&(a[s.name]=s.handler),"system-async"===s.type&&(n[s.name]=s.handler);return{handlers:t,systemHandlers:a,systemAsyncHandlers:n}})(e),hashes:t})),k=s([i],e=>e.elementHashes),M=s([i],e=>e.elements),Q=s([i],e=>e.defaultElements),j=s([Q,M,k],(e,t,a)=>({...(e=>{let t={},a={},n={};for(let s of e)"layout"===s.type&&(t[s.name]=s.element),"entity"===s.type&&(a[s.name]=s.element),"assistantFormElement"===s.type&&(n[s.name]=s.element);return{entityElements:a,layoutElements:t,assistantFormElements:n}})([...e,...t]),hashes:a}));return{selectSpec:r,selectVersion:l,selectBaseResourcesUrl:o,selectConfiguratorSpec:i,selectConfiguratorModelVersion:y,selectAdminSpec:f,selectAdminPreset:C,selectAdminModelVersion:E,selectThemeOptions:A,selectAssistant:x,selectConfiguratorFactory:H,selectAdminFactory:D,selectConfiguratorComponentOptics:P,selectAdminComponentOptics:S,selectAppLoader:w,selectPreview:O,selectAlwaysExpand:T,selectPresetSeed:V,selectDeploymentQueryDisabled:F,selectPrefetchTextureUrls:L,selectTextLanguages:h,selectHandlerHashes:R,selectHandlers:U,selectHandlerSlots:v,selectElementHashes:k,selectElements:M,selectElementSlots:j,selectDataConfig:m,selectChunks:g,selectPublishedDataHash:p,selectInitialPublishedData:d,selectCanCreate:c,selectEnableAdminRelease:u,getVersion:()=>l(n()),getBaseResourcesUrl:()=>o(n()),getConfiguratorSpec:()=>i(n()),getConfiguratorModelVersion:()=>y(n()),getAdminSpec:()=>f(n()),getAdminPreset:()=>C(n()),getAdminModelVersion:()=>E(n()),getThemeOptions:()=>A(n()),getAssistant:()=>x(n()),getConfiguratorFactory:()=>H(n()),getAdminFactory:()=>D(n()),getConfiguratorComponentOptics:()=>P(n()),getAdminComponentOptics:()=>S(n()),getAppLoader:()=>w(n()),getPreview:()=>O(n()),getAlwaysExpand:()=>T(n()),getPresetSeed:()=>V(n()),getDeploymentQueryDisabled:()=>F(n()),getPrefetchTextureUrls:()=>L(n()),getTextLanguages:()=>h(n()),getHandlerHashes:()=>R(n()),getHandlers:()=>U(n()),getHandlerSlots:()=>v(n()),getElementHashes:()=>k(n()),getElements:()=>M(n()),getElementSlots:()=>j(n()),getDataConfig:()=>m(n()),getChunks:()=>g(n()),getPublishedDataHash:()=>p(n()),getInitialPublishedData:()=>d(n()),getCanCreate:()=>c(n()),getEnableAdminRelease:()=>u(n())}};
|
|
@@ -4,7 +4,10 @@ interface Context {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const createWebComponentActions: (context: Context) => {
|
|
6
6
|
setReadonly: (readonlyValue: boolean) => void;
|
|
7
|
+
setLocale: (locale: string) => void;
|
|
7
8
|
startNewGeneration: () => void;
|
|
8
9
|
};
|
|
9
10
|
export type WebComponentActions = ReturnType<typeof createWebComponentActions>;
|
|
11
|
+
/** The writers the host-property mirror needs: the public `setReadonly` and the internal `setLocale`. */
|
|
12
|
+
export type WebComponentHostActions = Pick<WebComponentActions, 'setReadonly' | 'setLocale'>;
|
|
10
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const createWebComponentActions=e=>({setReadonly:t=>{e.setWebComponentState(e=>({...e,readonly:t}))},startNewGeneration:()=>{e.setWebComponentState(e=>({...e,webcomponentGeneration:e.webcomponentGeneration+1}))}});
|
|
1
|
+
export const createWebComponentActions=e=>({setReadonly:t=>{e.setWebComponentState(e=>({...e,readonly:t}))},setLocale:t=>{e.setWebComponentState(e=>({...e,locale:t}))},startNewGeneration:()=>{e.setWebComponentState(e=>({...e,webcomponentGeneration:e.webcomponentGeneration+1}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const initializeWebComponent=()=>({readonly:!1,webcomponentGeneration:0});
|
|
1
|
+
import{DEFAULT_FALLBACK_LOCALE as e}from"#package/i18n";export const initializeWebComponent=()=>({readonly:!1,locale:e,webcomponentGeneration:0});
|
|
@@ -8,6 +8,8 @@ interface Context {
|
|
|
8
8
|
export declare const createWebComponentSelectors: (context: Context) => {
|
|
9
9
|
selectReadonly: import("@salsita-ai/common/utils").Selector<WebComponentSelectorState, boolean>;
|
|
10
10
|
getReadonly: () => boolean;
|
|
11
|
+
selectLocale: import("@salsita-ai/common/utils").Selector<WebComponentSelectorState, string>;
|
|
12
|
+
getLocale: () => string;
|
|
11
13
|
getWebcomponentGeneration: () => number;
|
|
12
14
|
};
|
|
13
15
|
export type WebComponentSelectors = ReturnType<typeof createWebComponentSelectors>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSelector as e}from"@salsita-ai/common/utils";export const createWebComponentSelectors=o=>{let{getState:n}=o,t=e.withTypes(),a=t([t.leaf(e=>e.webComponent.readonly)],e=>e),
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";export const createWebComponentSelectors=o=>{let{getState:n}=o,t=e.withTypes(),a=t([t.leaf(e=>e.webComponent.readonly)],e=>e),l=t.leaf(e=>e.webComponent.locale),m=t([t.leaf(e=>e.webComponent.webcomponentGeneration)],e=>e);return{selectReadonly:a,getReadonly:()=>a(n()),selectLocale:l,getLocale:()=>l(n()),getWebcomponentGeneration:()=>m(n())}};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime-owned web-component state shared by configurator and admin applications.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
4
|
+
* The application runtime mirrors the host properties a domain system reads, `readonly` and
|
|
5
|
+
* `locale`, from the element into this slice, so non-React domain systems read them from runtime
|
|
6
|
+
* selectors. The element's property storage stays their source.
|
|
7
7
|
*/
|
|
8
8
|
export interface ApplicationWebComponentState {
|
|
9
|
+
/** The host's `readonly` property; the effective mode derives from it. */
|
|
9
10
|
readonly readonly: boolean;
|
|
11
|
+
/** The host's `locale` property as set, not resolved against the available locales. */
|
|
12
|
+
readonly locale: string;
|
|
10
13
|
/**
|
|
11
14
|
* Bumped when the host moves the custom element in the DOM and the element is reconnected with
|
|
12
15
|
* its React tree retained. A move resets the CSSOM of every speedy emotion `<style>` tag inside
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type HexColor } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* How the AI assistant photographs an entity from one predefined view: the export state, size and
|
|
4
|
+
* format of the picture and the UI states it is taken in. Evaluated per entity like any component
|
|
5
|
+
* state, so it may be expression-driven.
|
|
6
|
+
*/
|
|
7
|
+
export type AgentScreenshotComponentState = {
|
|
8
|
+
readonly exportState: string;
|
|
9
|
+
readonly width: number;
|
|
10
|
+
readonly height: number;
|
|
11
|
+
readonly fileFormat: 'PNG' | 'JPEG';
|
|
12
|
+
readonly backgroundColor?: HexColor;
|
|
13
|
+
readonly toolState: string;
|
|
14
|
+
readonly viewState: string;
|
|
15
|
+
readonly navigationState: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A view the AI assistant can take a screenshot of an entity from, under `meta { screenshot }` of
|
|
19
|
+
* its GraphQL schema. The instance name is the view name, and the `assistant.screenshots` manifest
|
|
20
|
+
* exposes it. Same shape as `clientSideImage`, but a distinct type, so the finalization images
|
|
21
|
+
* never render it.
|
|
22
|
+
*/
|
|
23
|
+
export declare const agentScreenshotComponent: import("../../index.js").SystemComponentType<"agentScreenshot", AgentScreenshotComponentState, never>;
|
|
24
|
+
export type AgentScreenshotComponent = typeof agentScreenshotComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SystemComponentBuilder as t}from"../../core/index.js";export const agentScreenshotComponent=t.component("agentScreenshot").withState({type:"object",tsType:"AgentScreenshotComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"AgentScreenshotComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();
|
package/dist/domain/extensions/{client-side-image.d.ts → export-images/client-side-image.d.ts}
RENAMED
|
@@ -9,6 +9,6 @@ export type ClientSideImageComponentState = {
|
|
|
9
9
|
readonly viewState: string;
|
|
10
10
|
readonly navigationState: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const clientSideImageComponent: import("
|
|
12
|
+
export declare const clientSideImageComponent: import("../../index.js").SystemComponentType<"clientSideImage", ClientSideImageComponentState, never>;
|
|
13
13
|
export type ClientSideImageComponent = typeof clientSideImageComponent;
|
|
14
|
-
export declare const isClientSideImageComponentSnapshot: (snapshot: import("
|
|
14
|
+
export declare const isClientSideImageComponentSnapshot: (snapshot: import("../../index.js").ComponentSnapshot<import("../../index.js").SystemComponentTypeConstraint>) => snapshot is import("../../index.js").ComponentSnapshot<import("../../index.js").SystemComponentType<"clientSideImage", ClientSideImageComponentState, never>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SystemComponentBuilder as t,isSnapshotOfComponentType as e}from"../../core/index.js";export const clientSideImageComponent=t.component("clientSideImage").withState({type:"object",tsType:"ClientSideImageComponentState",import:[{module:"@salsita-ai/sdk/domain",member:"ClientSideImageComponentState"}],properties:{exportState:{type:"string"},width:{type:"number"},height:{type:"number"},fileFormat:{type:"string",enum:["PNG","JPEG"]},backgroundColor:{type:"string",pattern:"^#[0-9a-fA-F]{6}$",tsType:"HexColor",import:[{module:"@salsita-ai/sdk/common/utils",member:"HexColor"}]},toolState:{type:"string"},viewState:{type:"string"},navigationState:{type:"string"}},required:["exportState","width","height","fileFormat","toolState","viewState","navigationState"],additionalProperties:!1}).build();export const isClientSideImageComponentSnapshot=e(clientSideImageComponent);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { agentScreenshotComponent, type AgentScreenshotComponent, type AgentScreenshotComponentState, } from './agent-screenshot.js';
|
|
2
|
+
export { clientSideImageComponent, type ClientSideImageComponent, type ClientSideImageComponentState, } from './client-side-image.js';
|
|
3
|
+
export { saveTemplateThumbnailComponent, type SaveTemplateThumbnailComponent, type SaveTemplateThumbnailComponentState, } from './save-template-thumbnail.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{agentScreenshotComponent}from"./agent-screenshot.js";export{clientSideImageComponent}from"./client-side-image.js";export{saveTemplateThumbnailComponent}from"./save-template-thumbnail.js";
|
|
@@ -9,6 +9,6 @@ export type SaveTemplateThumbnailComponentState = {
|
|
|
9
9
|
readonly viewState: string;
|
|
10
10
|
readonly navigationState: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const saveTemplateThumbnailComponent: import("
|
|
12
|
+
export declare const saveTemplateThumbnailComponent: import("../../index.js").SystemComponentType<"saveTemplateThumbnail", SaveTemplateThumbnailComponentState, never>;
|
|
13
13
|
export type SaveTemplateThumbnailComponent = typeof saveTemplateThumbnailComponent;
|
|
14
|
-
export declare const isSaveTemplateThumbnailComponentSnapshot: (snapshot: import("
|
|
14
|
+
export declare const isSaveTemplateThumbnailComponentSnapshot: (snapshot: import("../../index.js").ComponentSnapshot<import("../../index.js").SystemComponentTypeConstraint>) => snapshot is import("../../index.js").ComponentSnapshot<import("../../index.js").SystemComponentType<"saveTemplateThumbnail", SaveTemplateThumbnailComponentState, never>>;
|