@salsita-ai/sdk 0.50.0-develop.9440e83ee3 → 0.50.0-develop.95b896fd8c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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/core/enhanced-json-value.d.ts +2 -31
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -3
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +1 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +1 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +12 -6
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/implementations/phx-application-types.d.ts +25 -0
- package/dist/application-spec/generate-application/implementations/phx-application-types.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx-domain.d.ts +36 -0
- package/dist/application-spec/generate-application/implementations/phx-domain.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx-model.d.ts +24 -0
- package/dist/application-spec/generate-application/implementations/phx-model.js +1 -0
- package/dist/application-spec/generate-application/implementations/phx.d.ts +22 -0
- package/dist/application-spec/generate-application/implementations/phx.js +1 -0
- package/dist/application-spec/generate-application/index.d.ts +2 -0
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +3 -4
- 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 -4
- 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/factory-data/factory-data-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
- 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/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +9 -4
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +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/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
- package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +17 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +4 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +228 -0
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/app-loader-content/index.d.ts +0 -1
- package/dist/configurator/app-loader-content/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +17 -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 +42 -9
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +15 -10
- 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 +30 -9
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
- package/dist/configurator/common/configurator-interface.d.ts +9 -6
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +0 -6
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -1
- package/dist/configurator/configuration-not-found-page/index.d.ts +2 -2
- package/dist/configurator/configuration-not-found-page/index.js +1 -1
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.d.ts +3 -3
- package/dist/configurator/configurator-context/ConfiguratorResponsiveProvider.js +1 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -4
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +3 -3
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -1
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +0 -5
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -1
- package/dist/configurator/configurator-error-page/index.d.ts +1 -2
- package/dist/configurator/configurator-error-page/index.js +1 -1
- package/dist/configurator/index.d.ts +9 -2
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +12 -4
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
- package/dist/configurator/ui/assistant/tool-chip.d.ts +15 -5
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.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/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -2
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- 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/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/3d-scene/cameras/custom.mdx +4 -2
- package/dist/docs/index.json +78 -1
- package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -0
- package/dist/docs/layouts/custom-layout.mdx +318 -158
- 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/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/phoenix/configurator-interface.mdx +8 -6
- package/dist/docs/phoenix/domain-model.mdx +4 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +14 -6
- package/dist/docs/phoenix/project-structure.mdx +21 -17
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +6 -4
- package/dist/docs/phoenix/sessions-and-access.mdx +2 -0
- package/dist/docs/phoenix/webhooks.mdx +5 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +2 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +3 -3
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.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/domain-builder.d.ts +9 -3
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-runtime/application.d.ts +39 -0
- package/dist/domain/domain-runtime/application.js +1 -0
- package/dist/domain/domain-runtime/domain-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 +40 -4
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +2 -0
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +2 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -1
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.d.ts +23 -0
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +1 -0
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +3 -4
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -1
- package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
- package/dist/domain/domain-runtime/web-component/actions.js +1 -1
- package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
- package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
- package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
- package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +7 -0
- package/dist/domain/spec/application/index.d.ts +1 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/domain/spec/components/bindings/index.d.ts +2 -0
- package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
- package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
- package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
- package/dist/domain/spec/components/component-filters.d.ts +10 -0
- package/dist/domain/spec/components/components.d.ts +4 -0
- package/dist/domain/spec/components/components.js +1 -0
- package/dist/domain/spec/components/index.d.ts +6 -0
- package/dist/domain/spec/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json-value.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
- package/dist/domain/spec/expressions/expression.js +1 -0
- package/dist/domain/spec/expressions/expressions.d.ts +27 -0
- package/dist/domain/spec/expressions/expressions.js +1 -0
- package/dist/domain/spec/expressions/index.d.ts +5 -0
- package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
- package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
- package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
- package/dist/domain/spec/index.d.ts +7 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +3 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +2 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.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/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/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/bin.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/generated-env-markers.d.ts +1 -0
- package/dist/phoenix/commands/generated-env-markers.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -1
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/{services → lingui}/lingui.d.ts +5 -2
- package/dist/phoenix/lingui/lingui.js +1 -0
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/index.d.ts +1 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
- package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- 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-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/host-properties/types.js +1 -0
- package/dist/react-sdk/application-runtime/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
- package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
- package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
- package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
- package/dist/react-sdk/application-runtime/loading/types.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
- package/dist/react-sdk/application-runtime/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/runtime/create-application-runtime.d.ts +309 -8
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- 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/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -1
- 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/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/elements/index.d.ts +0 -1
- package/dist/react-sdk/index.d.ts +4 -1
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
- package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
- package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
- package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
- package/dist/react-sdk/loading-state/index.d.ts +4 -2
- package/dist/react-sdk/loading-state/index.js +1 -1
- package/dist/react-sdk/loading-state/{LoadingStateProvider.d.ts → loading-state-hooks.d.ts} +3 -12
- package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
- package/dist/{configurator/configuration-not-found-page → react-sdk/page-elements}/create-configuration-not-found-page.d.ts +7 -1
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
- package/dist/{configurator/configurator-error-page → react-sdk/page-elements}/create-configurator-error-page.d.ts +6 -1
- package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
- package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
- package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
- package/dist/react-sdk/page-elements/index.d.ts +6 -0
- package/dist/react-sdk/page-elements/index.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +2 -2
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +11 -9
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -1
- package/package.json +3 -3
- package/dist/application-spec/core/components/index.d.ts +0 -2
- package/dist/application-spec/core/expressions/index.d.ts +0 -2
- package/dist/configurator/app-loader-content/app-loader-content-name.d.ts +0 -5
- package/dist/configurator/app-loader-content/app-loader-content-name.js +0 -1
- package/dist/configurator/configuration-not-found-page/create-configuration-not-found-page.js +0 -1
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- package/dist/configurator/configurator-error-page/create-configurator-error-page.js +0 -1
- package/dist/phoenix/services/lingui.js +0 -1
- package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -37
- package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.d.ts +0 -25
- package/dist/react-sdk/responsive-state/ResponsiveStateProvider.js +0 -1
- package/dist/react-sdk/responsive-state/canvas-padding.d.ts +0 -14
- package/dist/react-sdk/responsive-state/index.d.ts +0 -5
- package/dist/react-sdk/responsive-state/index.js +0 -1
- package/dist/react-sdk/responsive-state/responsive-state-manager.d.ts +0 -111
- package/dist/react-sdk/responsive-state/responsive-state-manager.js +0 -1
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.d.ts +0 -10
- package/dist/react-sdk/responsive-state/use-responsive-state-manager.js +0 -1
- package/dist/react-sdk/responsive-state/use-responsive-state.d.ts +0 -11
- package/dist/react-sdk/responsive-state/use-responsive-state.js +0 -1
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/components/bindings/index.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/components/bindings/read-binding.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/components/bindings/write-binding.js} +0 -0
- /package/dist/{react-sdk/elements/configurator-error-page-props.js → domain/spec/components/component-entry.js} +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
- /package/dist/{react-sdk/responsive-state/canvas-padding.js → domain/spec/components/component-filters.js} +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
- /package/dist/react-sdk/{elements → page-elements}/configurator-error-page-props.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WebComponentPropertyDescriptor, type WebComponentSelectors } from '#package/domain';
|
|
2
|
+
import { type MirroredHostPropertyName } from './host-property-scopes.js';
|
|
3
|
+
import type { HostPropertiesSelectors } from './selectors.js';
|
|
4
|
+
import type { HostPropertyValue } from './types.js';
|
|
5
|
+
export declare const hostPropertyDescriptors: {
|
|
6
|
+
readonly [NAME in MirroredHostPropertyName]: WebComponentPropertyDescriptor<HostPropertyValue<NAME>>;
|
|
7
|
+
};
|
|
8
|
+
/** The runtime selectors of the two slices that keep mirrored properties. */
|
|
9
|
+
interface MirroredHostPropertySelectors {
|
|
10
|
+
readonly hostProperties: HostPropertiesSelectors;
|
|
11
|
+
readonly webComponent: WebComponentSelectors;
|
|
12
|
+
}
|
|
13
|
+
/** Reads a mirrored property's current value from the slice its scope names. */
|
|
14
|
+
export type MirroredHostPropertyReader<T> = (selectors: MirroredHostPropertySelectors) => T;
|
|
15
|
+
/**
|
|
16
|
+
* The reader of the mirrored property a descriptor stands for, or `null` when the runtime does not
|
|
17
|
+
* mirror it. The map keys each reader by its own descriptor, so a reader returns its descriptor's
|
|
18
|
+
* value type; a `Map` cannot state that per entry, so the overload states it once here.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findMirroredHostPropertyReader<T>(descriptor: WebComponentPropertyDescriptor<T>): MirroredHostPropertyReader<T> | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{standardWebComponentProperties as e}from"#package/domain";import{getDomainHostProperty as o}from"./domain-host-properties.js";import{domainHostPropertyNames as r,hostPropertyNames as t}from"./host-property-scopes.js";export const hostPropertyDescriptors={route:e.route,expanded:e.expanded,mode:e.mode,power:e.power,presetTags:e.presetTags,locale:e.locale,readonly:e.readonly,integrationMode:e.integrationMode,sessionToken:e.sessionToken,adminSessionToken:e.adminSessionToken,refreshToken:e.refreshToken,authorizationCode:e.authorizationCode};let s=new Map([...t.map(e=>[hostPropertyDescriptors[e],o=>o.hostProperties.getHostProperty(e)]),...r.map(e=>[hostPropertyDescriptors[e],r=>o(r.webComponent,e)])]);export function findMirroredHostPropertyReader(e){return s.get(e)??null}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { standardWebComponentProperties } from '#package/domain';
|
|
2
|
+
/**
|
|
3
|
+
* Where the runtime keeps a standard web-component property's current value:
|
|
4
|
+
* - `element`: only on the element, read from its property storage.
|
|
5
|
+
* - `application`: mirrored into the application runtime's `hostProperties` slice.
|
|
6
|
+
* - `domain`: mirrored into the domain runtime's `webComponent` slice, for domain systems that
|
|
7
|
+
* read it without the application runtime.
|
|
8
|
+
*/
|
|
9
|
+
type HostPropertyScope = 'element' | 'application' | 'domain';
|
|
10
|
+
type StandardPropertyName = keyof typeof standardWebComponentProperties;
|
|
11
|
+
declare const hostPropertyScopes: {
|
|
12
|
+
readonly readonly: 'domain';
|
|
13
|
+
readonly locale: 'domain';
|
|
14
|
+
readonly route: 'application';
|
|
15
|
+
readonly expanded: 'application';
|
|
16
|
+
readonly mode: 'application';
|
|
17
|
+
readonly power: 'application';
|
|
18
|
+
readonly presetTags: 'application';
|
|
19
|
+
readonly integrationMode: 'application';
|
|
20
|
+
readonly sessionToken: 'application';
|
|
21
|
+
readonly adminSessionToken: 'application';
|
|
22
|
+
readonly refreshToken: 'application';
|
|
23
|
+
readonly authorizationCode: 'application';
|
|
24
|
+
readonly onEvent: 'element';
|
|
25
|
+
readonly onAttached: 'element';
|
|
26
|
+
readonly nonce: 'element';
|
|
27
|
+
readonly modalZIndex: 'element';
|
|
28
|
+
readonly containerZIndex: 'element';
|
|
29
|
+
readonly htmlFontSize: 'element';
|
|
30
|
+
};
|
|
31
|
+
type ScopedPropertyName<SCOPE extends HostPropertyScope> = {
|
|
32
|
+
[NAME in StandardPropertyName]: (typeof hostPropertyScopes)[NAME] extends SCOPE ? NAME : never;
|
|
33
|
+
}[StandardPropertyName];
|
|
34
|
+
/** The name of a standard web-component property the runtime mirrors into `hostProperties`. */
|
|
35
|
+
export type HostPropertyName = ScopedPropertyName<'application'>;
|
|
36
|
+
/** The name of a standard web-component property the runtime mirrors into the domain's `webComponent`. */
|
|
37
|
+
export type DomainHostPropertyName = ScopedPropertyName<'domain'>;
|
|
38
|
+
/** The name of a standard web-component property the runtime mirrors, into either slice. */
|
|
39
|
+
export type MirroredHostPropertyName = HostPropertyName | DomainHostPropertyName;
|
|
40
|
+
export declare const hostPropertyNames: ScopedPropertyName<"application">[];
|
|
41
|
+
export declare const domainHostPropertyNames: ScopedPropertyName<"domain">[];
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{standardWebComponentProperties as e}from"#package/domain";let o={readonly:"domain",locale:"domain",route:"application",expanded:"application",mode:"application",power:"application",presetTags:"application",integrationMode:"application",sessionToken:"application",adminSessionToken:"application",refreshToken:"application",authorizationCode:"application",onEvent:"element",onAttached:"element",nonce:"element",modalZIndex:"element",containerZIndex:"element",htmlFontSize:"element"},n=e=>n=>o[n]===e,t=Object.keys(e).filter(o=>Object.hasOwn(e,o));export const hostPropertyNames=t.filter(n("application"));export const domainHostPropertyNames=t.filter(n("domain"));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './actions.js';
|
|
2
|
+
export * from './connect-host-properties.js';
|
|
3
|
+
export * from './domain-host-properties.js';
|
|
4
|
+
export * from './host-property-descriptors.js';
|
|
5
|
+
export * from './host-property-scopes.js';
|
|
6
|
+
export * from './initialize.js';
|
|
7
|
+
export * from './selectors.js';
|
|
8
|
+
export type * from './types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./actions.js";export*from"./connect-host-properties.js";export*from"./domain-host-properties.js";export*from"./host-property-descriptors.js";export*from"./host-property-scopes.js";export*from"./initialize.js";export*from"./selectors.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WebComponentApi } from '../web-component/index.js';
|
|
2
|
+
import type { HostPropertiesState } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The element's current property values. Without a web component the API's storages hold the
|
|
5
|
+
* defaults, so the slice does too.
|
|
6
|
+
*/
|
|
7
|
+
export declare const initializeHostProperties: (webComponentApi: WebComponentApi) => HostPropertiesState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hostPropertyDescriptors as e}from"./host-property-descriptors.js";export const initializeHostProperties=o=>{let r=r=>o.getPropertyValue(e[r]);return{route:r("route"),expanded:r("expanded"),mode:r("mode"),power:r("power"),presetTags:r("presetTags"),integrationMode:r("integrationMode"),sessionToken:r("sessionToken"),adminSessionToken:r("adminSessionToken"),refreshToken:r("refreshToken"),authorizationCode:r("authorizationCode")}};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type Selector } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { HostPropertyName } from './host-property-scopes.js';
|
|
3
|
+
import type { HostPropertiesState } from './types.js';
|
|
4
|
+
export interface HostPropertiesSelectorState {
|
|
5
|
+
readonly hostProperties: HostPropertiesState;
|
|
6
|
+
}
|
|
7
|
+
interface Context {
|
|
8
|
+
readonly getState: () => HostPropertiesSelectorState;
|
|
9
|
+
}
|
|
10
|
+
type HostPropertySelectors = {
|
|
11
|
+
readonly [NAME in HostPropertyName]: Selector<HostPropertiesSelectorState, HostPropertiesState[NAME]>;
|
|
12
|
+
};
|
|
13
|
+
export declare const createHostPropertiesSelectors: (context: Context) => {
|
|
14
|
+
getHostPropertySelector: <NAME extends HostPropertyName>(name: NAME) => HostPropertySelectors[NAME];
|
|
15
|
+
selectRoute: Selector<HostPropertiesSelectorState, {
|
|
16
|
+
route: "Index";
|
|
17
|
+
} | {
|
|
18
|
+
route: "Configuration";
|
|
19
|
+
configurationId: string;
|
|
20
|
+
accessToken?: string | undefined;
|
|
21
|
+
} | {
|
|
22
|
+
readonly route: "Index";
|
|
23
|
+
}>;
|
|
24
|
+
selectExpanded: Selector<HostPropertiesSelectorState, boolean>;
|
|
25
|
+
selectMode: Selector<HostPropertiesSelectorState, "admin" | "configurator" | "standalone-admin">;
|
|
26
|
+
selectPower: Selector<HostPropertiesSelectorState, "off" | "on" | "standby">;
|
|
27
|
+
selectPresetTags: Selector<HostPropertiesSelectorState, string[] | null>;
|
|
28
|
+
selectIntegrationMode: Selector<HostPropertiesSelectorState, "handoff" | "headless" | "page" | "widget">;
|
|
29
|
+
selectSessionToken: Selector<HostPropertiesSelectorState, string | undefined>;
|
|
30
|
+
selectAdminSessionToken: Selector<HostPropertiesSelectorState, string | undefined>;
|
|
31
|
+
selectRefreshToken: Selector<HostPropertiesSelectorState, string | undefined>;
|
|
32
|
+
selectAuthorizationCode: Selector<HostPropertiesSelectorState, string | undefined>;
|
|
33
|
+
getHostProperty: <NAME extends HostPropertyName>(name: NAME) => HostPropertiesState[NAME];
|
|
34
|
+
getRoute: () => {
|
|
35
|
+
route: "Index";
|
|
36
|
+
} | {
|
|
37
|
+
route: "Configuration";
|
|
38
|
+
configurationId: string;
|
|
39
|
+
accessToken?: string | undefined;
|
|
40
|
+
} | {
|
|
41
|
+
readonly route: "Index";
|
|
42
|
+
};
|
|
43
|
+
getExpanded: () => boolean;
|
|
44
|
+
getMode: () => "admin" | "configurator" | "standalone-admin";
|
|
45
|
+
getPower: () => "off" | "on" | "standby";
|
|
46
|
+
getPresetTags: () => string[] | null;
|
|
47
|
+
getIntegrationMode: () => "handoff" | "headless" | "page" | "widget";
|
|
48
|
+
getSessionToken: () => string | undefined;
|
|
49
|
+
getAdminSessionToken: () => string | undefined;
|
|
50
|
+
getRefreshToken: () => string | undefined;
|
|
51
|
+
getAuthorizationCode: () => string | undefined;
|
|
52
|
+
};
|
|
53
|
+
export type HostPropertiesSelectors = ReturnType<typeof createHostPropertiesSelectors>;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";export const createHostPropertiesSelectors=o=>{let{getState:t}=o,s=e.withTypes(),r={route:s.leaf(e=>e.hostProperties.route),expanded:s.leaf(e=>e.hostProperties.expanded),mode:s.leaf(e=>e.hostProperties.mode),power:s.leaf(e=>e.hostProperties.power),presetTags:s.leaf(e=>e.hostProperties.presetTags),integrationMode:s.leaf(e=>e.hostProperties.integrationMode),sessionToken:s.leaf(e=>e.hostProperties.sessionToken),adminSessionToken:s.leaf(e=>e.hostProperties.adminSessionToken),refreshToken:s.leaf(e=>e.hostProperties.refreshToken),authorizationCode:s.leaf(e=>e.hostProperties.authorizationCode)},n=e=>r[e];return{getHostPropertySelector:n,selectRoute:r.route,selectExpanded:r.expanded,selectMode:r.mode,selectPower:r.power,selectPresetTags:r.presetTags,selectIntegrationMode:r.integrationMode,selectSessionToken:r.sessionToken,selectAdminSessionToken:r.adminSessionToken,selectRefreshToken:r.refreshToken,selectAuthorizationCode:r.authorizationCode,getHostProperty:e=>n(e)(t()),getRoute:()=>r.route(t()),getExpanded:()=>r.expanded(t()),getMode:()=>r.mode(t()),getPower:()=>r.power(t()),getPresetTags:()=>r.presetTags(t()),getIntegrationMode:()=>r.integrationMode(t()),getSessionToken:()=>r.sessionToken(t()),getAdminSessionToken:()=>r.adminSessionToken(t()),getRefreshToken:()=>r.refreshToken(t()),getAuthorizationCode:()=>r.authorizationCode(t())}};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WebComponentPropertyDescriptor, standardWebComponentProperties } from '#package/domain';
|
|
2
|
+
import type { HostPropertyName, MirroredHostPropertyName } from './host-property-scopes.js';
|
|
3
|
+
type StandardWebComponentProperties = typeof standardWebComponentProperties;
|
|
4
|
+
type PropertyValue<DESCRIPTOR> = DESCRIPTOR extends WebComponentPropertyDescriptor<infer T> ? T : never;
|
|
5
|
+
/** The value type of a mirrored standard web-component property. */
|
|
6
|
+
export type HostPropertyValue<NAME extends MirroredHostPropertyName> = PropertyValue<StandardWebComponentProperties[NAME]>;
|
|
7
|
+
/**
|
|
8
|
+
* The current value of each application-scoped standard web-component property, as the host set
|
|
9
|
+
* it on the element, or the property's default. The domain-scoped ones, `readonly` and `locale`,
|
|
10
|
+
* live in the domain's `webComponent` slice instead.
|
|
11
|
+
*
|
|
12
|
+
* A read mirror: the element's property storage stays the single store, and writes keep going
|
|
13
|
+
* through the element setters.
|
|
14
|
+
*/
|
|
15
|
+
export type HostPropertiesState = {
|
|
16
|
+
readonly [NAME in HostPropertyName]: HostPropertyValue<NAME>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -4,7 +4,10 @@ export * from './hooks/index.js';
|
|
|
4
4
|
export * from './web-component/index.js';
|
|
5
5
|
export * from './common-services/index.js';
|
|
6
6
|
export * from './domain-application-context/index.js';
|
|
7
|
+
export type { HostPropertiesState, HostPropertyName } from './host-properties/index.js';
|
|
7
8
|
export * from './integration/index.js';
|
|
9
|
+
export { type LoadingActions, type LoadingApplicationState, type LoadingPhase, type LoadingRuntimeState, type LoadingState, } from './loading/index.js';
|
|
10
|
+
export { type CanvasPadding, type ResponsiveApplicationState, type ResponsiveBreakpoints, type ResponsiveRuntimeState, type ResponsiveState, type ResponsiveViewport, type ResponsiveViewportSize, } from './responsive/index.js';
|
|
8
11
|
export * from './routing/index.js';
|
|
9
12
|
export * from './session/index.js';
|
|
10
13
|
export * from './mocks/index.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DomainApplicationType } from '#package/domain';
|
|
2
|
+
import type { LoadingPhase, LoadingRuntimeState } from './types.js';
|
|
3
|
+
interface Context {
|
|
4
|
+
readonly setLoading: (fn: (state: LoadingRuntimeState) => LoadingRuntimeState) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Every action returns the slice unchanged when the value is already set, so the runtime publishes
|
|
8
|
+
* nothing and no subscriber recomputes.
|
|
9
|
+
*/
|
|
10
|
+
declare const createApplicationActions: (context: Context, applicationType: DomainApplicationType) => {
|
|
11
|
+
startPhase: (phase: LoadingPhase) => void;
|
|
12
|
+
endPhase: (id: string) => void;
|
|
13
|
+
reportError: () => void;
|
|
14
|
+
clearError: () => void;
|
|
15
|
+
expectPhase: (id: string) => void;
|
|
16
|
+
dropExpectation: (id: string) => void;
|
|
17
|
+
resetSlot: () => void;
|
|
18
|
+
};
|
|
19
|
+
/** One set of actions per application, as the domain context keys its own. */
|
|
20
|
+
export declare const createLoadingActions: (context: Context) => {
|
|
21
|
+
configurator: {
|
|
22
|
+
startPhase: (phase: LoadingPhase) => void;
|
|
23
|
+
endPhase: (id: string) => void;
|
|
24
|
+
reportError: () => void;
|
|
25
|
+
clearError: () => void;
|
|
26
|
+
expectPhase: (id: string) => void;
|
|
27
|
+
dropExpectation: (id: string) => void;
|
|
28
|
+
resetSlot: () => void;
|
|
29
|
+
};
|
|
30
|
+
admin: {
|
|
31
|
+
startPhase: (phase: LoadingPhase) => void;
|
|
32
|
+
endPhase: (id: string) => void;
|
|
33
|
+
reportError: () => void;
|
|
34
|
+
clearError: () => void;
|
|
35
|
+
expectPhase: (id: string) => void;
|
|
36
|
+
dropExpectation: (id: string) => void;
|
|
37
|
+
resetSlot: () => void;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @internal Runtime plumbing for the SDK's own UI. A project reports a phase with
|
|
42
|
+
* `phx.frontend.useLoadingState()`.
|
|
43
|
+
*/
|
|
44
|
+
export type LoadingActions = ReturnType<typeof createApplicationActions>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{initializeLoadingApplication as e}from"./initialize.js";let t=(e,t)=>e.has(t)?e:new Set([...e,t]),s=(s,r)=>{let a=e=>{s.setLoading(t=>{let s=t[r],a=e(s);return a===s?t:{...t,[r]:a}})},n=e=>{a(t=>t.hasError===e?t:{...t,hasError:e})};return{startPhase:e=>{a(s=>{let r=((e,t)=>{let s=e.findIndex(e=>e.id===t.id);if(-1===s)return[...e,t];let r=e[s];return void 0!==r&&r.id===t.id&&r.progress===t.progress&&r.label===t.label?e:e.map(e=>e.id===t.id?t:e)})(s.phases,e),a=t(s.seenPhaseIds,e.id);return r===s.phases&&a===s.seenPhaseIds?s:{...s,phases:r,seenPhaseIds:a}})},endPhase:e=>{a(t=>t.phases.some(t=>t.id===e)?{...t,phases:t.phases.filter(t=>t.id!==e)}:t)},reportError:()=>{n(!0)},clearError:()=>{n(!1)},expectPhase:e=>{a(s=>{let r=s.expectationCounts.get(e)??0,a=new Map(s.expectationCounts).set(e,r+1);return{...s,expectationCounts:a,expectedPhaseIds:t(s.expectedPhaseIds,e)}})},dropExpectation:e=>{a(t=>{let s=t.expectationCounts.get(e);if(void 0===s)return t;let r=new Map(t.expectationCounts);return s>1?(r.set(e,s-1),{...t,expectationCounts:r}):(r.delete(e),{...t,expectationCounts:r,expectedPhaseIds:((e,t)=>{if(!e.has(t))return e;let s=new Set(e);return s.delete(t),s})(t.expectedPhaseIds,e)})})},resetSlot:()=>{a(t=>0!==t.phases.length||t.hasError||0!==t.expectedPhaseIds.size||0!==t.seenPhaseIds.size?e():t)}}};export const createLoadingActions=e=>({configurator:s(e,"configurator"),admin:s(e,"admin")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./actions.js";export*from"./initialize.js";export*from"./selectors.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const initializeLoadingApplication=()=>({phases:[],hasError:!1,expectedPhaseIds:new Set,expectationCounts:new Map,seenPhaseIds:new Set});export const initializeLoading=()=>({configurator:initializeLoadingApplication(),admin:initializeLoadingApplication()});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DomainApplicationType } from '#package/domain';
|
|
2
|
+
import type { LoadingRuntimeState, LoadingState } from './types.js';
|
|
3
|
+
export interface LoadingSelectorState {
|
|
4
|
+
readonly loading: LoadingRuntimeState;
|
|
5
|
+
}
|
|
6
|
+
interface Context {
|
|
7
|
+
readonly getState: () => LoadingSelectorState;
|
|
8
|
+
readonly applicationType: DomainApplicationType;
|
|
9
|
+
}
|
|
10
|
+
/** The selectors of one application's loading state; the runtime creates one set per application. */
|
|
11
|
+
export declare const createLoadingSelectors: (context: Context) => {
|
|
12
|
+
selectLoadingState: import("@salsita-ai/common/utils").Selector<LoadingSelectorState, LoadingState>;
|
|
13
|
+
getLoadingState: () => LoadingState;
|
|
14
|
+
/** Whether the phase `id` is expected and has not started since the last reset. */
|
|
15
|
+
getIsAwaitingPhase: (id: string) => boolean;
|
|
16
|
+
};
|
|
17
|
+
export type LoadingSelectors = ReturnType<typeof createLoadingSelectors>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";export const createLoadingSelectors=a=>{let{getState:s,applicationType:t}=a,i=e.withTypes(),o=i.leaf(e=>e.loading[t].phases),l=i.leaf(e=>e.loading[t].hasError),n=i.leaf(e=>e.loading[t].expectedPhaseIds),r=i.leaf(e=>e.loading[t].seenPhaseIds),g=i([o,l,n],(e,a,s)=>({isLoading:e.length>0,hasError:a,phases:e,expectedPhaseIds:s}));return{selectLoadingState:g,getLoadingState:()=>g(s()),getIsAwaitingPhase:e=>{let a=s();return n(a).has(e)&&!r(a).has(e)}}};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One step of an application's load that the loader shows while it runs: authenticating the
|
|
3
|
+
* session, fetching data, loading the 3D scene, or a step a project reports itself.
|
|
4
|
+
*/
|
|
5
|
+
export interface LoadingPhase {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/** From 0 to 1, when the step can tell how far it is. */
|
|
8
|
+
readonly progress?: number;
|
|
9
|
+
readonly label?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The aggregated loading state the loader renders: the running phases in the order they started,
|
|
13
|
+
* and whether the load failed.
|
|
14
|
+
*/
|
|
15
|
+
export interface LoadingState {
|
|
16
|
+
/** `true` while at least one phase runs. */
|
|
17
|
+
readonly isLoading: boolean;
|
|
18
|
+
readonly hasError: boolean;
|
|
19
|
+
readonly phases: readonly LoadingPhase[];
|
|
20
|
+
/** The phases the loader waits for before they start, so it does not flash off in between. */
|
|
21
|
+
readonly expectedPhaseIds: ReadonlySet<string>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The loading state of one application.
|
|
25
|
+
*
|
|
26
|
+
* The loader host resets it when it mounts, which happens when the configurator is powered on or
|
|
27
|
+
* remounted; phases written before that are not shown. Whether a component is below the loader
|
|
28
|
+
* host is not part of it: that is a fact about the React tree, read with `useIsLoaderHosted()`.
|
|
29
|
+
*
|
|
30
|
+
* @internal Runtime plumbing for the SDK's own UI. A project reads the loading state with
|
|
31
|
+
* `phx.frontend.useLoadingStateValue()` and reports a phase with `phx.frontend.useLoadingState()`.
|
|
32
|
+
*/
|
|
33
|
+
export interface LoadingApplicationState {
|
|
34
|
+
/** The running phases, in the order they started. Restarting a phase keeps its position. */
|
|
35
|
+
readonly phases: readonly LoadingPhase[];
|
|
36
|
+
readonly hasError: boolean;
|
|
37
|
+
readonly expectedPhaseIds: ReadonlySet<string>;
|
|
38
|
+
/**
|
|
39
|
+
* How many callers expect each phase of `expectedPhaseIds`: the components that mount the canvas
|
|
40
|
+
* nest, and an inner one unmounting must not drop the phase an outer one still expects.
|
|
41
|
+
*/
|
|
42
|
+
readonly expectationCounts: ReadonlyMap<string, number>;
|
|
43
|
+
/**
|
|
44
|
+
* Every phase that started since the last reset. An expected phase that was seen once is no
|
|
45
|
+
* longer waited for, so a second configuration does not wait for the scene again.
|
|
46
|
+
*/
|
|
47
|
+
readonly seenPhaseIds: ReadonlySet<string>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The `loading` slice, one entry per application: an admin that embeds a configurator runs both in
|
|
51
|
+
* one runtime, and only the configurator hosts a loader.
|
|
52
|
+
*
|
|
53
|
+
* @internal Runtime plumbing for the SDK's own UI. A project reads the loading state with
|
|
54
|
+
* `phx.frontend.useLoadingStateValue()` and reports a phase with `phx.frontend.useLoadingState()`.
|
|
55
|
+
*/
|
|
56
|
+
export interface LoadingRuntimeState {
|
|
57
|
+
readonly configurator: LoadingApplicationState;
|
|
58
|
+
readonly admin: LoadingApplicationState;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{memoOnce as e}from"@salsita-ai/common/utils";import{AccessLevel as t}from"@salsita-ai/contracts/api";import{createDomainRuntime as o,createMockDomainRuntimeServices as n,createMockSessionContext as
|
|
1
|
+
import{memoOnce as e}from"@salsita-ai/common/utils";import{AccessLevel as t}from"@salsita-ai/contracts/api";import{createDomainRuntime as o,createMockDomainRuntimeServices as n,createMockSessionContext as i}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as a}from"../domain-application-context/index.js";import{connectHostProperties as r,createHostPropertiesActions as c,createHostPropertiesSelectors as m,initializeHostProperties as p}from"../host-properties/index.js";import{createIntegrationActions as d,createIntegrationSelectors as l,initializeIntegration as g}from"../integration/index.js";import{createLoadingActions as S,createLoadingSelectors as f,initializeLoading as v}from"../loading/index.js";import{createResponsiveActions as u,createResponsiveSelectors as C,initializeResponsive as x}from"../responsive/index.js";import{createRoutingActions as b,createRoutingSelectors as y,initializeRouting as w}from"../routing/index.js";import{SessionService as A,createSessionRuntimeActions as D,createSessionRuntimeSelectors as R,initializeSessionRuntime as h}from"../session/index.js";import{createMockWebComponentApi as j}from"../web-component/index.js";export const createMockApplicationRuntime=(T,k)=>{var E;let I,L,O,M,F,P,U,V,z,H,q,B,G,J,K,N,Q,W,X,Y,Z,$,_,ee,{sessionData:et,mode:eo,role:en}=k,ei=n(),es=(E={webComponentOptions:k.webComponentOptions??T.mount.options,webComponentApi:k.webComponentApi??j()},O=h(),M=o({config:T,services:ei,getExtensionSystems:e=>ee[e].getInitializableSystems()}),F=new Set,P=()=>{F.forEach(e=>{e()})},U=d({setIntegration:e=>{I=e(I),P()}}),I=g(),V=l({getState:()=>({integration:I}),actions:U}),z=b({setRouting:e=>{L=e(L),P()}}),L=w(),H=y({getState:()=>({...M.getState(),routing:L}),actions:z,accessActions:M.actions.access,loadedDataActions:M.actions.loadedData,domainServicesSelectors:M.selectors.domainServices,overridesSelectors:M.selectors.overrides}),q=x(),B=u({setResponsive:e=>{let t=e(q);t!==q&&(q=t,P())}}),G={configurator:C({getState:()=>({responsive:q}),applicationType:"configurator"}),admin:C({getState:()=>({responsive:q}),applicationType:"admin"})},J=v(),K=S({setLoading:e=>{let t=e(J);t!==J&&(J=t,P())}}),N={configurator:f({getState:()=>({loading:J}),applicationType:"configurator"}),admin:f({getState:()=>({loading:J}),applicationType:"admin"})},Q=p(E.webComponentApi),W=c({setHostProperties:e=>{let t=e(Q);t!==Q&&(Q=t,P())}}),X=m({getState:()=>({hostProperties:Q})}),r({webComponentApi:E.webComponentApi,actions:W,domainSelectors:M.selectors.webComponent,domainActions:{setReadonly:M.actions.webComponent.setReadonly,setLocale:M.hostMirrorActions.setLocale}}),Y=s({getState:()=>({...M.getState(),session:O}),environmentSelectors:M.selectors.environment,specSelectors:M.selectors.spec,accessSelectors:M.selectors.access,domainServicesSelectors:M.selectors.domainServices,webComponentOptions:E.webComponentOptions,webComponentApi:E.webComponentApi,getSessionService:()=>_(),routingSelectors:H}),Z=D({setSessionRuntime:e=>{O=e(O),P()}}),$=R({getState:()=>({...M.getState(),session:O}),sessionContextSelectors:M.selectors.sessionContext}),_=e(()=>new A({getLogger:()=>M.selectors.domainServices.getLogger(),getAnalyticsService:()=>M.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:Y.getUnauthenticatedClient,environmentSelectors:M.selectors.environment,sessionActions:Z,setSessionContext:M.actions.sessionContext.setSessionContext,sessionSelectors:$,specSelectors:M.selectors.spec})),ee={configurator:a({applicationType:"configurator",commonServicesSelectors:Y,domainServicesSelectors:M.selectors.domainServices,domainContextSelectors:M.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:a({applicationType:"admin",commonServicesSelectors:Y,domainServicesSelectors:M.selectors.domainServices,domainContextSelectors:M.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{F.add(e);let t=M.subscribe(e);return()=>{F.delete(e),t()}},getState:()=>({...M.getState(),hostProperties:Q,integration:I,loading:J,responsive:q,routing:L,session:O}),selectors:{...M.selectors,commonServices:Y,hostProperties:X,integration:V,loading:N,responsive:G,routing:H,session:$,domainApplicationContext:ee},actions:{...M.actions,integration:U,loading:K,responsive:B,routing:z,session:Z}}),ea=es.getState().spec;return es.actions.spec.updateSpec({...ea,configurator:{...ea.configurator,createTransformers:e=>k.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),es.actions.sessionContext.setSessionContext(i(en,et)),es.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",access:"read"===eo?t.Read:t.Owner,viewMode:"read"===eo,revisionId:void 0,configurationId:"mock"}),es.actions.domainData.setDomainData({publishedData:k.publishedData,frontendData:k.frontendData,backendData:k.backendData}),es.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:k.entities,modelVersion:T.domain.domainFactory.modelVersion,rootEntityType:k.rootEntityType,schemaIdentity:T.domain.domainFactory}),es};
|
|
@@ -5,5 +5,11 @@ interface ApplicationRuntimeProviderProps {
|
|
|
5
5
|
readonly runtime: ApplicationRuntime;
|
|
6
6
|
}
|
|
7
7
|
export declare const ApplicationRuntimeProvider: (props: ApplicationRuntimeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* The runtime, or `null` outside an `ApplicationRuntimeProvider`, for hooks that must work without one.
|
|
10
|
+
*
|
|
11
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useOptionalApplicationRuntime: () => ApplicationRuntime | null;
|
|
8
14
|
export declare const useApplicationRuntime: () => ApplicationRuntime;
|
|
9
15
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{createContext as e,useContext as i}from"react";let
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{createContext as e,useContext as i}from"react";let o=e(null);export const ApplicationRuntimeProvider=e=>{let{children:i,runtime:r}=e;return t(o.Provider,{value:r,children:i})};export const useOptionalApplicationRuntime=()=>i(o);export const useApplicationRuntime=()=>{let t=i(o);if(!t)throw Error("ApplicationRuntime context not found! useApplicationRuntime() must be used within an ApplicationRuntimeProvider. Use the hook appropriately.");return t};
|
|
@@ -6,4 +6,11 @@ interface ApplicationTypeProviderProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const ApplicationTypeProvider: (props: ApplicationTypeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const useApplicationType: () => ApplicationType;
|
|
9
|
+
/**
|
|
10
|
+
* The application type of the nearest `ApplicationTypeProvider`, or `null` outside one, for the
|
|
11
|
+
* hooks that some application-agnostic providers call and that have nothing to do there.
|
|
12
|
+
*
|
|
13
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useOptionalApplicationType: () => ApplicationType | null;
|
|
9
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createContext as t,useContext as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createContext as t,useContext as o}from"react";let p=t(null);export const ApplicationTypeProvider=t=>{let{children:o,type:r}=t;return e(p.Provider,{value:r,children:o})};export const useApplicationType=()=>{let e=o(p);if(!e)throw Error("ApplicationType context not found! useApplicationType() must be used within an ApplicationTypeProvider. Use the hook appropriately.");return e};export const useOptionalApplicationType=()=>o(p);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DomainApplicationType } from '#package/domain';
|
|
2
|
+
import type { CanvasPadding, ResponsiveBreakpoints, ResponsiveRuntimeState, ResponsiveViewport } from './types.js';
|
|
3
|
+
interface Context {
|
|
4
|
+
readonly setResponsive: (fn: (state: ResponsiveRuntimeState) => ResponsiveRuntimeState) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Every action returns the slice unchanged when the value is already set, so the runtime publishes
|
|
8
|
+
* nothing and no subscriber recomputes.
|
|
9
|
+
*/
|
|
10
|
+
declare const createApplicationActions: (context: Context, applicationType: DomainApplicationType) => {
|
|
11
|
+
setViewport: (viewport: ResponsiveViewport) => void;
|
|
12
|
+
setBreakpoints: (breakpoints: ResponsiveBreakpoints) => void;
|
|
13
|
+
setCanvasPadding: (canvasPadding: CanvasPadding) => void;
|
|
14
|
+
expand: () => void;
|
|
15
|
+
collapse: () => void;
|
|
16
|
+
hide: () => void;
|
|
17
|
+
show: () => void;
|
|
18
|
+
setAnimating: (isAnimating: boolean) => void;
|
|
19
|
+
reset: () => void;
|
|
20
|
+
};
|
|
21
|
+
/** One set of actions per application, as the domain context keys its own. */
|
|
22
|
+
export declare const createResponsiveActions: (context: Context) => {
|
|
23
|
+
configurator: {
|
|
24
|
+
setViewport: (viewport: ResponsiveViewport) => void;
|
|
25
|
+
setBreakpoints: (breakpoints: ResponsiveBreakpoints) => void;
|
|
26
|
+
setCanvasPadding: (canvasPadding: CanvasPadding) => void;
|
|
27
|
+
expand: () => void;
|
|
28
|
+
collapse: () => void;
|
|
29
|
+
hide: () => void;
|
|
30
|
+
show: () => void;
|
|
31
|
+
setAnimating: (isAnimating: boolean) => void;
|
|
32
|
+
reset: () => void;
|
|
33
|
+
};
|
|
34
|
+
admin: {
|
|
35
|
+
setViewport: (viewport: ResponsiveViewport) => void;
|
|
36
|
+
setBreakpoints: (breakpoints: ResponsiveBreakpoints) => void;
|
|
37
|
+
setCanvasPadding: (canvasPadding: CanvasPadding) => void;
|
|
38
|
+
expand: () => void;
|
|
39
|
+
collapse: () => void;
|
|
40
|
+
hide: () => void;
|
|
41
|
+
show: () => void;
|
|
42
|
+
setAnimating: (isAnimating: boolean) => void;
|
|
43
|
+
reset: () => void;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type ResponsiveActions = ReturnType<typeof createApplicationActions>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{initializeResponsiveApplication as t}from"./initialize.js";let e=(e,i)=>{let n=t=>{e.setResponsive(e=>{let n=e[i],s=t(n);return s===n?e:{...e,[i]:s}})},s=t=>{n(e=>e.isExpanded===t?e:{...e,isExpanded:t})},r=t=>{n(e=>e.isHidden===t?e:{...e,isHidden:t})};return{setViewport:t=>{n(e=>{let i;return(i=e.viewport,null!==i&&i.width===t.width&&i.height===t.height&&i.isLandscape===t.isLandscape&&i.isPortrait===t.isPortrait)?e:{...e,viewport:t}})},setBreakpoints:t=>{n(e=>{let i;return(i=e.breakpoints,i.sm===t.sm&&i.md===t.md&&i.lg===t.lg)?e:{...e,breakpoints:t}})},setCanvasPadding:t=>{n(e=>{let i;return(i=e.canvasPadding,i.top===t.top&&i.right===t.right&&i.bottom===t.bottom&&i.left===t.left)?e:{...e,canvasPadding:t}})},expand:()=>{s(!0)},collapse:()=>{s(!1)},hide:()=>{r(!0)},show:()=>{r(!1)},setAnimating:t=>{n(e=>e.isAnimating===t?e:{...e,isAnimating:t})},reset:()=>{n(()=>t())}}};export const createResponsiveActions=t=>({configurator:e(t,"configurator"),admin:e(t,"admin")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./actions.js";export*from"./initialize.js";export*from"./selectors.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const initializeResponsiveApplication=()=>({viewport:null,breakpoints:{sm:480,md:768,lg:1024},canvasPadding:{top:0,right:0,bottom:0,left:0},isExpanded:!1,isHidden:!1,isAnimating:!1});export const initializeResponsive=()=>({configurator:initializeResponsiveApplication(),admin:initializeResponsiveApplication()});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DomainApplicationType } from '#package/domain';
|
|
2
|
+
import type { ResponsiveRuntimeState, ResponsiveState, ResponsiveViewportSize } from './types.js';
|
|
3
|
+
export interface ResponsiveSelectorState {
|
|
4
|
+
readonly responsive: ResponsiveRuntimeState;
|
|
5
|
+
}
|
|
6
|
+
interface Context {
|
|
7
|
+
readonly getState: () => ResponsiveSelectorState;
|
|
8
|
+
readonly applicationType: DomainApplicationType;
|
|
9
|
+
}
|
|
10
|
+
/** The selectors of one application's responsive state; the runtime creates one set per application. */
|
|
11
|
+
export declare const createResponsiveSelectors: (context: Context) => {
|
|
12
|
+
selectResponsiveState: import("@salsita-ai/common/utils").Selector<ResponsiveSelectorState, ResponsiveState>;
|
|
13
|
+
selectViewportSize: import("@salsita-ai/common/utils").Selector<ResponsiveSelectorState, ResponsiveViewportSize>;
|
|
14
|
+
selectCanvasPadding: import("@salsita-ai/common/utils").Selector<ResponsiveSelectorState, import("./types.js").CanvasPadding>;
|
|
15
|
+
getResponsiveState: () => ResponsiveState;
|
|
16
|
+
getViewportSize: () => ResponsiveViewportSize;
|
|
17
|
+
getCanvasPadding: () => import("./types.js").CanvasPadding;
|
|
18
|
+
};
|
|
19
|
+
export type ResponsiveSelectors = ReturnType<typeof createResponsiveSelectors>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSelector as e}from"@salsita-ai/common/utils";export const createResponsiveSelectors=i=>{let{getState:s,applicationType:t}=i,a=e.withTypes(),o=a.leaf(e=>null!==e.responsive[t].viewport),n=a.leaf(e=>e.responsive[t].viewport?.width??0),r=a.leaf(e=>e.responsive[t].viewport?.height??0),p=a.leaf(e=>e.responsive[t].viewport?.isLandscape??!1),l=a.leaf(e=>e.responsive[t].viewport?.isPortrait??!1),v=a.leaf(e=>e.responsive[t].breakpoints),d=a.leaf(e=>e.responsive[t].canvasPadding),f=a.leaf(e=>e.responsive[t].isExpanded),g=a.leaf(e=>e.responsive[t].isHidden),h=a.leaf(e=>e.responsive[t].isAnimating),m=a([o,n,v],(e,i,s)=>e&&i<s.sm),w=a([o,n,v],(e,i,s)=>e&&i<=s.md),c=a([o,n,v],(e,i,s)=>e&&i<s.lg&&i>s.sm),u=a([o,n,v],(e,i,s)=>e&&i>s.md),P=a([m,w,c,u,p,l,d,f,g,h],(e,i,s,t,a,o,n,r,p,l)=>({isPhone:e,isMobile:i,isTablet:s,isDesktop:t,isLandscape:a,isPortrait:o,canvasPadding:n,isExpanded:r,isHidden:p,isAnimating:l})),S=a([n,r],(e,i)=>({width:Math.ceil(e),height:Math.ceil(i)}));return{selectResponsiveState:P,selectViewportSize:S,selectCanvasPadding:d,getResponsiveState:()=>P(s()),getViewportSize:()=>S(s()),getCanvasPadding:()=>d(s())}};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The part of the canvas, in pixels from each edge, that overlay UI covers. The camera frames the
|
|
3
|
+
* scene inside what is left, so the scene stays visible beside a sidebar or under a preview body.
|
|
4
|
+
*
|
|
5
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
6
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
7
|
+
*/
|
|
8
|
+
export interface CanvasPadding {
|
|
9
|
+
readonly top: number;
|
|
10
|
+
readonly right: number;
|
|
11
|
+
readonly bottom: number;
|
|
12
|
+
readonly left: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The widths, in pixels, that split the application's root container into phone, tablet and
|
|
16
|
+
* desktop. The theme decides them; the UI library pushes its theme's values in with
|
|
17
|
+
* `setBreakpoints`.
|
|
18
|
+
*
|
|
19
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
20
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
21
|
+
*/
|
|
22
|
+
export interface ResponsiveBreakpoints {
|
|
23
|
+
readonly sm: number;
|
|
24
|
+
readonly md: number;
|
|
25
|
+
readonly lg: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* One measurement of the application's root container. The orientation comes from the window,
|
|
29
|
+
* not from the container's aspect ratio.
|
|
30
|
+
*
|
|
31
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
32
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
33
|
+
*/
|
|
34
|
+
export interface ResponsiveViewport {
|
|
35
|
+
readonly width: number;
|
|
36
|
+
readonly height: number;
|
|
37
|
+
readonly isLandscape: boolean;
|
|
38
|
+
readonly isPortrait: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The size of the application's root container, rounded up to whole pixels.
|
|
42
|
+
*
|
|
43
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
44
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
45
|
+
*/
|
|
46
|
+
export interface ResponsiveViewportSize {
|
|
47
|
+
readonly width: number;
|
|
48
|
+
readonly height: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The responsive state of one mounted application: what it measured of its root container, the
|
|
52
|
+
* breakpoints that classify it, the canvas padding the scene is framed with, and whether the
|
|
53
|
+
* container is expanded over the host page, hidden, or in a layout animation.
|
|
54
|
+
*
|
|
55
|
+
* The configurator's root container writes it while it is mounted and resets it when it unmounts.
|
|
56
|
+
*
|
|
57
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
58
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
59
|
+
*/
|
|
60
|
+
export interface ResponsiveApplicationState {
|
|
61
|
+
/** `null` until the root container is measured for the first time. */
|
|
62
|
+
readonly viewport: ResponsiveViewport | null;
|
|
63
|
+
readonly breakpoints: ResponsiveBreakpoints;
|
|
64
|
+
readonly canvasPadding: CanvasPadding;
|
|
65
|
+
readonly isExpanded: boolean;
|
|
66
|
+
readonly isHidden: boolean;
|
|
67
|
+
readonly isAnimating: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The `responsive` slice, one entry per application: an admin that embeds a configurator runs both
|
|
71
|
+
* in one runtime, and each has its own root container.
|
|
72
|
+
*
|
|
73
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
74
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
75
|
+
*/
|
|
76
|
+
export interface ResponsiveRuntimeState {
|
|
77
|
+
readonly configurator: ResponsiveApplicationState;
|
|
78
|
+
readonly admin: ResponsiveApplicationState;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The responsive state the UI and the lifecycle read: the size classes of the root container, the
|
|
82
|
+
* canvas padding, and whether the container is expanded, hidden or animating.
|
|
83
|
+
*
|
|
84
|
+
* Every size class is `false` until the container is measured for the first time.
|
|
85
|
+
*
|
|
86
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
87
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
88
|
+
*/
|
|
89
|
+
export interface ResponsiveState {
|
|
90
|
+
/** `width < sm` */
|
|
91
|
+
readonly isPhone: boolean;
|
|
92
|
+
/** `width <= md` */
|
|
93
|
+
readonly isMobile: boolean;
|
|
94
|
+
/** `sm < width < lg` */
|
|
95
|
+
readonly isTablet: boolean;
|
|
96
|
+
/** `width > md` */
|
|
97
|
+
readonly isDesktop: boolean;
|
|
98
|
+
readonly isLandscape: boolean;
|
|
99
|
+
readonly isPortrait: boolean;
|
|
100
|
+
readonly canvasPadding: CanvasPadding;
|
|
101
|
+
readonly isExpanded: boolean;
|
|
102
|
+
readonly isHidden: boolean;
|
|
103
|
+
readonly isAnimating: boolean;
|
|
104
|
+
}
|