@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateProjectFiles as e}from"../application-spec/index.js";export const runSyncCommand=async(
|
|
1
|
+
import{generateProjectFiles as e,logDiagnostics as s}from"../application-spec/index.js";export const runSyncCommand=async(c,t)=>{let{logger:i}=t,{sdkVersion:r,projectSlug:n,environmentSlug:l,cliUseWorkspace:o,enableEditor:p,force:a=!1,analyze:u=!1}=c;try{i.step("Syncing Phoenix project files"),i.step("Building project files");let{diagnostics:c}=await e({sdkVersion:r,projectSlug:n,environmentSlug:l,cliUseWorkspace:o,enableEditor:p,inlineTemplates:!0,force:a,analyze:u},t);s(c,i),i.success("Project files built successfully"),i.success("Sync completed successfully!")}catch(e){i.error(`Sync failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LINGUI_CONFIG_PATH, bootstrapLinguiCatalogs, compileLingui, extractAndCompileLingui } from './lingui.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{LINGUI_CONFIG_PATH,bootstrapLinguiCatalogs,compileLingui,extractAndCompileLingui}from"./lingui.js";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type Logger } from '../utils/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* The project's Lingui configuration, which sync generates, relative to the project root. The Lingui
|
|
4
|
-
* CLI, the Lingui Vite plugin and the Lingui macros in the Vite builds are
|
|
4
|
+
* CLI, the Lingui Vite plugin and the Lingui macros in the Vite builds are given this path, so a
|
|
5
5
|
* `.linguirc` that earlier SDK versions left in the project root is not read. Lingui searches the
|
|
6
6
|
* working directory instead only when the named file is missing; generation writes it with the rest of
|
|
7
|
-
* `.phoenix/` before Phoenix runs Lingui or Vite.
|
|
7
|
+
* `.phoenix/` before Phoenix runs Lingui or Vite. Missing-catalog bootstrap compiles with a temporary
|
|
8
|
+
* copy that stages output while keeping every locale available for fallback reads.
|
|
8
9
|
*/
|
|
9
10
|
export declare const LINGUI_CONFIG_PATH = ".phoenix/.linguirc";
|
|
10
11
|
interface LinguiCommandContext {
|
|
@@ -12,4 +13,6 @@ interface LinguiCommandContext {
|
|
|
12
13
|
}
|
|
13
14
|
export declare const compileLingui: (context: LinguiCommandContext) => Promise<void>;
|
|
14
15
|
export declare const extractAndCompileLingui: (context: LinguiCommandContext) => Promise<void>;
|
|
16
|
+
/** Creates only catalogs missing from a project's generated domain imports; continuous updates stay opt-in. */
|
|
17
|
+
export declare const bootstrapLinguiCatalogs: (locales: readonly string[], context: LinguiCommandContext) => Promise<void>;
|
|
15
18
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{constants as i}from"node:fs";import{copyFile as a,mkdir as t,mkdtemp as e,readFile as o,rm as n,writeFile as s}from"node:fs/promises";import{dirname as r,join as l}from"node:path";import{exists as c,runSdkTool as g}from"../utils/index.js";export const LINGUI_CONFIG_PATH=".phoenix/.linguirc";let p=async i=>{await g({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["extract","--config",LINGUI_CONFIG_PATH],description:"Extracting i18n messages",quiet:!0,extraEnv:{LC_ALL:"en_US.UTF-8"}},i)};export const compileLingui=async i=>{await g({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["compile","--config",LINGUI_CONFIG_PATH],description:"Compiling i18n messages",quiet:!0},i)};export const extractAndCompileLingui=async i=>{await p(i),await compileLingui(i)};export const bootstrapLinguiCatalogs=async(p,m)=>{let u,f=(await Promise.all(p.map(async i=>await c(`src/locales/${i}/messages.ts`)?[]:[i]))).flat();if(0!==f.length)try{m.logger.info(`Bootstrapping missing i18n catalogs: ${f.join(", ")}`);let n=(await Promise.all(f.map(async i=>await c(`src/locales/${i}/messages.po`)?[]:[i]))).flat();n.length>0&&await g({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["extract","--config",LINGUI_CONFIG_PATH,"--locale",n.join(",")],description:"Extracting missing i18n catalogs",quiet:!0,extraEnv:{LC_ALL:"en_US.UTF-8"}},m);let p=JSON.parse(await o(LINGUI_CONFIG_PATH,"utf-8"));if("object"!=typeof p||null===p||Array.isArray(p))throw Error(`${LINGUI_CONFIG_PATH} is not a configuration object`);u=await e(".phoenix/lingui-bootstrap-");let N=l(u,".linguirc");for(let e of(await s(N,JSON.stringify({...p,catalogsMergePath:l(u,"compiled","{locale}","messages").replaceAll("\\","/")})),await g({tool:{packageName:"@lingui/cli",binName:"lingui"},args:["compile","--config",N],description:"Compiling missing i18n catalogs",quiet:!0},m),f)){let o=l("src","locales",e,"messages.ts");await t(r(o),{recursive:!0}),await a(l(u,"compiled",e,"messages.ts"),o,i.COPYFILE_EXCL)}}catch(i){throw Error(`Cannot bootstrap i18n catalogs for ${f.join(", ")}: ${i instanceof Error?i.message:String(i)}. Fix the reported Lingui error and restart phoenix dev, or run phoenix sync to update all catalogs.`,{cause:i})}finally{void 0!==u&&await n(u,{recursive:!0,force:!0})}};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ViteDevServer } from 'vite';
|
|
2
|
+
import type { ApplicationSpec } from '#package/application-spec';
|
|
2
3
|
import type { Logger } from '../utils/index.js';
|
|
3
4
|
import type { PhoenixPubSub } from './phoenix-pubsub.js';
|
|
4
5
|
import type { VariantFileEdit } from './variant-file-session.js';
|
|
@@ -8,7 +9,8 @@ export declare const IGNORED_PATTERNS: string[];
|
|
|
8
9
|
export interface ApplicationSpecProjectWatcherConfig {
|
|
9
10
|
readonly pubsub: PhoenixPubSub;
|
|
10
11
|
readonly logger: Logger;
|
|
11
|
-
|
|
12
|
+
/** Called with the application spec of every rebuild that succeeded. */
|
|
13
|
+
readonly onRebuilt?: (applicationSpec: ApplicationSpec) => void;
|
|
12
14
|
readonly onViteServerChange?: (viteServer: ViteDevServer) => void;
|
|
13
15
|
readonly sdkVersion: string;
|
|
14
16
|
readonly projectSlug: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as l}from"vite";import{watch as
|
|
1
|
+
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as l}from"vite";import{watch as a}from"#package/watch";import{ApplicationSpecBuilder as h}from"../application-spec/application-spec-builder.js";import{logDiagnostics as c}from"../application-spec/metrics/index.js";import{syncTemplateFiles as u}from"../application-spec/template-files.js";import{buildWebhooks as p}from"../webhooks/index.js";import{getViteDevConfig as g}from"./vite-config.js";export const WATCH_PATTERNS=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated",".phoenix/.env.generated"];export const IGNORED_PATTERNS=["src/locales/**/*.{ts,tsx}",".phoenix/!(.env.generated)/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new h({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){e(t(process.cwd(),"src"),{recursive:!0}),this.watcher=a(WATCH_PATTERNS,{ignored:IGNORED_PATTERNS,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
|
|
2
2
|
📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(o(10));this.subscription=this.changeSubject$.pipe(r(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
|
|
3
3
|
🔨 Rebuilding spec files...
|
|
4
|
-
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let
|
|
4
|
+
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let a=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(c(a.diagnostics,this.logger),!a.ok){for(let e of a.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:a.rawProjectFiles,projectRoot:process.cwd()});return}let{application:h,changedFiles:d}=a;this.onRebuilt?.(h.applicationSpec);let w=r.moduleGraph,b=Date.now(),f=new Set,S=process.cwd(),m=e=>{let t=w.getModulesByFile(l(e));if(t)for(let e of t)w.invalidateModule(e,f,b,!0)};for(let i of e)m(t(S,i));for(let e of d)m(t(S,`.phoenix/${e.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:h.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:h.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await g({templateFiles:o});if(this.isShuttingDown)return;let t=await n(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await p({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
|
|
@@ -8,6 +8,7 @@ export { MockTemplateWatcher, type MockTemplateWatcherConfig } from './mock-temp
|
|
|
8
8
|
export { ApplicationSpecProjectWatcher, type ApplicationSpecProjectWatcherConfig, } from './application-spec-project-watcher.js';
|
|
9
9
|
export { ApplicationSpecStoryWatcher, type ApplicationSpecStoryWatcherConfig, } from './application-spec-story-watcher.js';
|
|
10
10
|
export { LinguiWatcher, type LinguiWatcherConfig } from './lingui-watcher.js';
|
|
11
|
+
export { bootstrapLinguiCatalogs, extractAndCompileLingui } from '../lingui/index.js';
|
|
11
12
|
export { loadMockTemplates, parseMockTemplateYaml, type LoadMockTemplatesResult, type ParsedMockTemplate, } from './spec-files.js';
|
|
12
13
|
export { LOG_STREAMS, LogBus, type LogEntry, type LogLevel, type LogPage, type LogQuery, type LogStream, } from './log-bus.js';
|
|
13
14
|
export { createBusLogger, type CreateBusLoggerOptions } from './bus-logger.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./phoenix-application.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
|
|
1
|
+
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./phoenix-application.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{bootstrapLinguiCatalogs,extractAndCompileLingui}from"../lingui/index.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"promise-queue";import{Subject as
|
|
1
|
+
import e from"promise-queue";import{Subject as i,buffer as t,debounceTime as s}from"rxjs";import{watch as r}from"#package/watch";import{compileLingui as n,extractAndCompileLingui as o}from"../lingui/index.js";let c=["src/**/*.{ts,tsx}","src/locales/**/*.po"],g=["src/locales/**/*.{ts,tsx}"];export class LinguiWatcher{watcher=null;subscription=null;runQueue=new e(1,1/0);changeSubject$=new i;logger;isShuttingDown=!1;constructor(e){this.logger=e.logger}start(){this.setupFileWatcher(),this.setupRunSubscription()}trigger(){this.changeSubject$.next("<codegen-rebuild>")}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){this.watcher=r(c,{ignored:g,cwd:process.cwd(),ignoreInitial:!0,persistent:!0}),this.watcher.on("all",(e,i)=>{("change"===e||"add"===e||"unlink"===e)&&(this.logger.debug(`Lingui source ${e}: ${i}`),this.changeSubject$.next(i))}).on("error",e=>{this.logger.error(`Lingui watcher error: ${e instanceof Error?e.message:String(e)}`,e)})}setupRunSubscription(){let e=this.changeSubject$.pipe(s(200));this.subscription=this.changeSubject$.pipe(t(e)).subscribe(e=>{let i=e.some(e=>!e.endsWith(".po"));this.runQueue.add(async()=>{if(!this.isShuttingDown)try{i?(this.logger.info("Lingui sources changed, extracting and compiling i18n messages..."),await o({logger:this.logger})):(this.logger.info("Lingui catalogs changed, compiling i18n messages..."),await n({logger:this.logger}))}catch(e){this.logger.error(`Lingui update failed: ${e instanceof Error?e.message:String(e)}`,e)}})})}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{writeFile as e}from"node:fs/promises";import{createApiBaseClient as i}from"#package/client";import{resolveApplicationSpecDeploymentData as t}from"../application-spec/index.js";import{formatEnvContent as r,uploadFilesWithPresignedUrls as a}from"../utils/index.js";import{getDevelopmentCredentialHint as o,getDevelopmentHeaders as s}from"./development-credential.js";export const prepareDevelopmentEnvironment=async(n,l)=>{let{logger:p}=l,{projectSlug:d,environmentSlug:m,serverUrl:c,credential:h,outFile:v,skipUpload:f,overrideSchema:u,projectVersion:
|
|
1
|
+
import{writeFile as e}from"node:fs/promises";import{createApiBaseClient as i}from"#package/client";import{resolveApplicationSpecDeploymentData as t}from"../application-spec/index.js";import{formatEnvContent as r,uploadFilesWithPresignedUrls as a}from"../utils/index.js";import{getDevelopmentCredentialHint as o,getDevelopmentHeaders as s}from"./development-credential.js";export const prepareDevelopmentEnvironment=async(n,l)=>{let{logger:p}=l,{projectSlug:d,environmentSlug:m,serverUrl:c,credential:h,outFile:v,skipUpload:f,overrideSchema:u,projectVersion:E}=n;p.step("Preparing development environment"),p.info(`Preparing development environment for project "${d}", environment "${m}"`);let g=i(c);p.debug(`Using server URL: ${c}`);let P=await t({skipUpload:f,logger:p});p.info("Preparing and activating the development deployment on the server...");let{data:b,error:$}=await g.POST("/environments/development/prepare",{body:{applicationVersion:P.applicationVersion,publishedDataHash:P.publishedDataHash,useAuthHook:P.useAuthHook,overrideSchema:u,configurationSchema:{version:P.schemaVersion,schema:P.schema},adminConfigurationSchema:P.adminSchema?{schema:P.adminSchema,version:P.adminSchemaVersion}:void 0,chat:P.chat,embeddings:P.embeddings,...P.assistant?{assistant:!0}:{},acl:{canCreate:P.aclCanCreate},privateFiles:[...P.assets.privateFilePaths],publicFiles:[...P.assets.publicFilePaths],sdkVersion:E},headers:s(h,{projectSlug:d,environmentSlug:m})});if($)throw Error(`Failed to prepare development deployment for ${d}/${m} on ${c}: ${$.message}. ${o(h,d)}`);if(!b)throw Error("No data returned from server while preparing the development deployment.");let{environmentVariables:y,privateUploadUrls:N,publicUploadUrls:w}=b;if(f)p.debug("Skipping file upload");else{p.info("Uploading files to S3...");let e={privateFiles:[...P.assets.privateFilesFullPaths].map(e=>{let i=e.replace("assets/private/",""),t=N[i];if(!t)throw Error(`No upload URL provided for private file ${i}, the server did not return a presigned URL for this file, please verify the file exists in the assets/private directory.`);return{localPath:e,uploadUrl:t}}),publicFiles:[...P.assets.publicFilesFullPaths].map(e=>{let i=e.replace("assets/public/",""),t=w[i];if(!t)throw Error(`No upload URL provided for public file ${i}, the server did not return a presigned URL for this file, please verify the file exists in the assets/public directory.`);return{localPath:e,uploadUrl:t}})};await a(e,{logger:p})}try{await e(v,`${r({...y,PHOENIX_PROJECT_SLUG:d,PHOENIX_ENVIRONMENT_SLUG:m,PHOENIX_SERVER_URL:c,PHOENIX_DEPLOYMENT_FINGERPRINT:P.fingerprint})}
|
|
2
2
|
`),p.debug(`Environment variables written to ${v}`)}catch{throw Error(`Failed to write environment variables to file at ${v}, please verify you have write permissions to this location.`)}p.info(`Project: ${d}`),p.info(`Environment: ${m}`),p.info(`Deployment ID: ${y.DEPLOYMENT_ID}`),p.success("Development environment prepared successfully!")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as e}from"@lingui/conf";import{lingui as i}from"@lingui/vite-plugin";import t from"@vitejs/plugin-react";import{mkdir as n,readFile as r,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createRequire as s}from"node:module";import{dirname as l,resolve as m}from"path";import{createLogger as f}from"vite";import p from"vite-plugin-css-injected-by-js";import{
|
|
1
|
+
import{getConfig as e}from"@lingui/conf";import{lingui as i}from"@lingui/vite-plugin";import t from"@vitejs/plugin-react";import{mkdir as n,readFile as r,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createRequire as s}from"node:module";import{dirname as l,resolve as m}from"path";import{createLogger as f}from"vite";import p from"vite-plugin-css-injected-by-js";import{LINGUI_CONFIG_PATH as d}from"../lingui/index.js";import{isUsingLocalSdk as c}from"../utils/package-info.js";import{loadFrontendConfigModule as g}from"./frontend-config.js";import{phxBannerPlugin as u}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as h}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as b}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as S}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as y}from"./phx-variant-previews-plugin.js";let O=null;export const setViteLogSink=(e,i={})=>{O={sink:e,echo:i.echo??!1}};let x=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],D=()=>[s(import.meta.url).resolve("@lingui/babel-plugin-lingui-macro"),{linguiConfig:e({configPath:d})}],E=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async e=>{var n,r;let o,a,p=c(),u=g(),h=u.readRuntimeConfig(),S=u.frontendBuildConfig,v=D(),j=Object.fromEntries((e?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...O&&{customLogger:(n=O.sink,r=O.echo,o=f(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...O.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...p&&{entries:["index.html","admin.html",...e?.templateFiles??[]],force:!0}},...p&&{resolve:{alias:(a=s(m(process.cwd(),"package.json")),x.flatMap(e=>{try{let i=l(a.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[t({babel:{plugins:[v]}}),i({configPath:d}),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=u.readRuntimeConfig(),t=u.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},b({getDeploymentId:()=>E(u.readRuntimeConfig())}),y()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...j}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async e=>{let s=g(),f=s.readRuntimeConfig(),c=s.frontendBuildConfig,y=D(),O=S(),x=u({sdkVersion:e.sdkVersion,banner:e.banner}),v=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:e.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(g=>({plugins:[t({babel:{plugins:[y]}}),i({configPath:d}),p({useStrictCSP:!0}),h(),b({getDeploymentId:()=>E(s.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!g.htmlFiles.length)return;let i="iife"===g.format?`${g.name}.iife.js`:`${g.name}.js`;for(let t of g.htmlFiles){if(g.main&&e.enableEditor&&"./index.html"===t)continue;let a=m("./.phoenix",t),s=m("./.phoenix/dist/frontend",t);await n(l(s),{recursive:!0});let f=(await r(a,"utf-8")).replace(g.mainScriptPath,i);await o(s,f,"utf-8")}}},O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:g.entryFile,name:a(g.name),formats:[g.format],fileName:()=>"iife"===g.format?`${g.name}.iife.js`:`${g.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${g.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(c.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(c.gltfDecoder)}}));return e.enableEditor?[...v,{plugins:[t({babel:{plugins:[y]}}),i({configPath:d}),p({useStrictCSP:!0}),h(),O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(c.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(c.gltfDecoder)}}]:v};
|
|
@@ -17,5 +17,5 @@ export declare const CommonAnalyticsFactory: {
|
|
|
17
17
|
Initialized: typeof Initialized;
|
|
18
18
|
ConfigurationLoaded: typeof ConfigurationLoaded;
|
|
19
19
|
};
|
|
20
|
-
export declare const initializeAnalyticsService: (config: AnyApplicationConfig, logger: Logger, isDev: boolean) => AnalyticsSystem;
|
|
20
|
+
export declare const initializeAnalyticsService: (config: Pick<AnyApplicationConfig, 'services' | 'defaultEnvs'>, logger: Logger, isDev: boolean) => AnalyticsSystem;
|
|
21
21
|
export {};
|
|
@@ -2,6 +2,6 @@ import type { I18n } from '@lingui/core';
|
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { type Logger } from '@salsita-ai/common/utils';
|
|
4
4
|
import type { AnyApplicationConfig } from '#package/domain';
|
|
5
|
-
export declare const initializeLogger: (config: AnyApplicationConfig, isDev: boolean) => Logger;
|
|
6
|
-
export declare const initializeI18n: (config: AnyApplicationConfig) => I18n;
|
|
5
|
+
export declare const initializeLogger: (config: Pick<AnyApplicationConfig, 'services' | 'defaultEnvs' | 'version'>, isDev: boolean) => Logger;
|
|
6
|
+
export declare const initializeI18n: (config: Pick<AnyApplicationConfig, 'services'>) => I18n;
|
|
7
7
|
export declare const createQueryClient: (logger: Logger) => QueryClient;
|
|
@@ -29,7 +29,7 @@ export interface SendVoiceMessageParams<CHAT_CONTEXT extends Record<string, unkn
|
|
|
29
29
|
* Runtime chat service consumed only by the legacy configurator chat UI. Its user-facing consumers
|
|
30
30
|
* live under `configurator/ui/legacy/`: `Chat` is reached through `MobileChat`, `TabsSidebar`,
|
|
31
31
|
* `StepsSideBar`, and `SimpleSidebar`, with availability gated by
|
|
32
|
-
* `
|
|
32
|
+
* `react-sdk/domain-application-context/chat-hooks.ts`.
|
|
33
33
|
*
|
|
34
34
|
* `sendMessage` deliberately retains a known reinitialization race. Its `ChunkType.calls`
|
|
35
35
|
* continuation does not recheck the captured generation after `processToolCalls` before publishing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./use-application-runtime-selector.js";export{AccessServiceProvider,useAccessInfoActions,useAccessService,useAdminRawAccessService,useAdminRawAccessInfo,useConfigurationId,useConfiguratorRawAccessService,useConfiguratorRawAccessInfo,useProvidedAccessService}from"./use-access-service.js";export*from"./use-logger.js";export*from"./use-analytics-service.js";export*from"./use-application-query-client.js";export*from"./use-i18n.js";export*from"./use-spec.js";export*from"./use-environment.js";export*from"./use-overrides.js";export*from"./use-domain-application-props.js";export*from"./use-resource-url.js";export*from"./use-integration.js";export*from"./use-routing.js";export*from"./use-loaded-data.js";export*from"./use-domain-data.js";export*from"./use-session.js";export*from"./use-authorized-client.js";export*from"./use-authenticated-client.js";export*from"./use-phoenix-element-slots.js";export*from"./use-phoenix-handler-slots.js";export*from"./use-domain-application.js";export*from"./use-web-component.js";export*from"./use-web-component-readonly-sync.js";export*from"./data/index.js";
|
|
1
|
+
export*from"./use-application-runtime-selector.js";export{AccessServiceProvider,useAccessInfoActions,useAccessService,useAdminRawAccessService,useAdminRawAccessInfo,useConfigurationId,useConfiguratorRawAccessService,useConfiguratorRawAccessInfo,useProvidedAccessService}from"./use-access-service.js";export*from"./use-logger.js";export*from"./use-analytics-service.js";export*from"./use-application-query-client.js";export*from"./use-i18n.js";export*from"./use-spec.js";export*from"./use-environment.js";export*from"./use-overrides.js";export*from"./use-domain-application-props.js";export*from"./use-resource-url.js";export*from"./use-integration.js";export*from"./use-routing.js";export*from"./use-loaded-data.js";export*from"./use-domain-data.js";export*from"./use-session.js";export*from"./use-authorized-client.js";export*from"./use-authenticated-client.js";export*from"./use-phoenix-element-slots.js";export*from"./use-phoenix-handler-slots.js";export*from"./use-domain-application.js";export*from"./use-web-component.js";export*from"./use-web-component-readonly-sync.js";export*from"./data/index.js";export*from"./loading/index.js";export*from"./responsive/index.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { LoaderHostContext } from './loader-host-context.js';
|
|
2
|
+
export { useIsAwaitingLoadingPhase } from './use-is-awaiting-loading-phase.js';
|
|
3
|
+
export { useIsLoaderHosted } from './use-is-loader-hosted.js';
|
|
4
|
+
export { useLoadingActions } from './use-loading-actions.js';
|
|
5
|
+
export { useLoadingApplication } from './use-loading-application.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{LoaderHostContext}from"./loader-host-context.js";export{useIsAwaitingLoadingPhase}from"./use-is-awaiting-loading-phase.js";export{useIsLoaderHosted}from"./use-is-loader-hosted.js";export{useLoadingActions}from"./use-loading-actions.js";export{useLoadingApplication}from"./use-loading-application.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a component is mounted below the application's `LoaderHost`, which provides `true`. It is
|
|
3
|
+
* `false` everywhere else, as in the admin, which hosts no loader.
|
|
4
|
+
*
|
|
5
|
+
* It is a fact about the React tree, so it is a context and not part of the runtime's `loading`
|
|
6
|
+
* slice. It lives beside the hooks that read it rather than beside `LoaderHost`, because
|
|
7
|
+
* `loading-state/` imports from this folder and never the other way.
|
|
8
|
+
*
|
|
9
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LoaderHostContext: import("react").Context<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as o}from"react";export const LoaderHostContext=o(!1);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the application this component is mounted in expects the loading phase `id` and that
|
|
3
|
+
* phase has not started since its loader host mounted. The loader stays up across that gap.
|
|
4
|
+
* `false` outside a loader host.
|
|
5
|
+
*
|
|
6
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useIsAwaitingLoadingPhase: (id: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as e}from"react";import{useApplicationRuntimeSelector as o}from"../use-application-runtime-selector.js";import{useIsLoaderHosted as t}from"./use-is-loader-hosted.js";import{useLoadingApplication as s}from"./use-loading-application.js";export const useIsAwaitingLoadingPhase=i=>{let r=s(),a=t(),m=o(e(()=>r?.selectors.getIsAwaitingPhase(i)??!1,[r,i]));return a&&m};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether this component is mounted below the application's `LoaderHost`. Without one, the SDK's
|
|
3
|
+
* own UI shows its inline loaders, as the admin does.
|
|
4
|
+
*
|
|
5
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useIsLoaderHosted: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as o}from"react";import{LoaderHostContext as t}from"./loader-host-context.js";export const useIsLoaderHosted=()=>o(t);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LoadingActions } from '../../loading/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The loading actions of the application this component is mounted in, or `null` outside its
|
|
4
|
+
* loader host, so that nothing reports phases no loader shows. Stable while the host stays mounted.
|
|
5
|
+
*
|
|
6
|
+
* @internal Runtime plumbing for the SDK's own UI. A project reports a phase with
|
|
7
|
+
* `phx.frontend.useLoadingState()`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useLoadingActions: () => LoadingActions | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useIsLoaderHosted as o}from"./use-is-loader-hosted.js";import{useLoadingApplication as s}from"./use-loading-application.js";export const useLoadingActions=()=>{let t=s(),i=o();return null!==t&&i?t.actions:null};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selectors and actions of the loading state of the application this component is mounted in,
|
|
3
|
+
* chosen by its `ApplicationTypeProvider` as the domain context hooks choose theirs. `null` outside
|
|
4
|
+
* an `ApplicationRuntimeProvider` or an `ApplicationTypeProvider`: the session and data providers also run in trees without one, where
|
|
5
|
+
* no loader is hosted.
|
|
6
|
+
*
|
|
7
|
+
* @internal Runtime plumbing for the SDK's own UI.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useLoadingApplication: () => {
|
|
10
|
+
selectors: {
|
|
11
|
+
selectLoadingState: import("@salsita-ai/common/utils").Selector<import("../../loading/selectors.js").LoadingSelectorState, import("../../index.js").LoadingState>;
|
|
12
|
+
getLoadingState: () => import("../../index.js").LoadingState;
|
|
13
|
+
getIsAwaitingPhase: (id: string) => boolean;
|
|
14
|
+
};
|
|
15
|
+
actions: {
|
|
16
|
+
startPhase: (phase: import("../../index.js").LoadingPhase) => void;
|
|
17
|
+
endPhase: (id: string) => void;
|
|
18
|
+
reportError: () => void;
|
|
19
|
+
clearError: () => void;
|
|
20
|
+
expectPhase: (id: string) => void;
|
|
21
|
+
dropExpectation: (id: string) => void;
|
|
22
|
+
resetSlot: () => void;
|
|
23
|
+
};
|
|
24
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as o}from"react";import{useOptionalApplicationRuntime as i,useOptionalApplicationType as n}from"../../provider/index.js";import{ApplicationType as r}from"../../runtime/index.js";export const useLoadingApplication=()=>{let t=i(),e=n();return o(()=>null===t||null===e?null:e===r.Admin?{selectors:t.selectors.loading.admin,actions:t.actions.loading.admin}:{selectors:t.selectors.loading.configurator,actions:t.actions.loading.configurator},[t,e])};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{useResponsiveActions}from"./use-responsive-actions.js";export{useResponsiveState}from"./use-responsive-state.js";export{useResponsiveStore}from"./use-responsive-store.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ResponsiveActions } from '../../responsive/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The actions of the responsive state of the application this component is mounted in: set the canvas padding, expand, collapse, hide or
|
|
4
|
+
* show the root container. Stable for the runtime's lifetime.
|
|
5
|
+
*
|
|
6
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
7
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useResponsiveActions: () => ResponsiveActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useResponsiveApplication as e}from"./use-responsive-application.js";export const useResponsiveActions=()=>{let{actions:s}=e();return s};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selectors and actions of the responsive state of the application this component is mounted
|
|
3
|
+
* in, chosen by its `ApplicationTypeProvider` as the domain context hooks choose theirs.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useResponsiveApplication: () => {
|
|
6
|
+
runtime: import("../../index.js").ApplicationRuntime;
|
|
7
|
+
selectors: {
|
|
8
|
+
selectResponsiveState: import("@salsita-ai/common/utils").Selector<import("../../responsive/selectors.js").ResponsiveSelectorState, import("../../index.js").ResponsiveState>;
|
|
9
|
+
selectViewportSize: import("@salsita-ai/common/utils").Selector<import("../../responsive/selectors.js").ResponsiveSelectorState, import("../../index.js").ResponsiveViewportSize>;
|
|
10
|
+
selectCanvasPadding: import("@salsita-ai/common/utils").Selector<import("../../responsive/selectors.js").ResponsiveSelectorState, import("../../index.js").CanvasPadding>;
|
|
11
|
+
getResponsiveState: () => import("../../index.js").ResponsiveState;
|
|
12
|
+
getViewportSize: () => import("../../index.js").ResponsiveViewportSize;
|
|
13
|
+
getCanvasPadding: () => import("../../index.js").CanvasPadding;
|
|
14
|
+
};
|
|
15
|
+
actions: {
|
|
16
|
+
setViewport: (viewport: import("../../index.js").ResponsiveViewport) => void;
|
|
17
|
+
setBreakpoints: (breakpoints: import("../../index.js").ResponsiveBreakpoints) => void;
|
|
18
|
+
setCanvasPadding: (canvasPadding: import("../../index.js").CanvasPadding) => void;
|
|
19
|
+
expand: () => void;
|
|
20
|
+
collapse: () => void;
|
|
21
|
+
hide: () => void;
|
|
22
|
+
show: () => void;
|
|
23
|
+
setAnimating: (isAnimating: boolean) => void;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useApplicationRuntime as e,useApplicationType as s}from"../../provider/index.js";import{ApplicationType as o}from"../../runtime/index.js";export const useResponsiveApplication=()=>{let i=e();return s()===o.Admin?{runtime:i,selectors:i.selectors.responsive.admin,actions:i.actions.responsive.admin}:{runtime:i,selectors:i.selectors.responsive.configurator,actions:i.actions.responsive.configurator}};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResponsiveState } from '../../responsive/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The responsive state of the application this component is mounted in: the size classes of its root container, the
|
|
4
|
+
* canvas padding, and whether the container is expanded, hidden or animating. Re-renders when any
|
|
5
|
+
* of them changes, not on a resize within one size class.
|
|
6
|
+
*
|
|
7
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
8
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useResponsiveState: () => ResponsiveState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useApplicationRuntimeSelector as e}from"../use-application-runtime-selector.js";import{useResponsiveApplication as t}from"./use-responsive-application.js";export const useResponsiveState=()=>{let{selectors:s}=t();return e(s.getResponsiveState)};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CanvasPadding, ResponsiveActions, ResponsiveState, ResponsiveViewportSize } from '../../responsive/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The runtime's responsive state in the shape `ResponsiveApplicationProvider` of
|
|
4
|
+
* `@salsita-ai/sdk/ui` takes as its `store`, which that package declares by shape because it imports
|
|
5
|
+
* no other SDK package.
|
|
6
|
+
*
|
|
7
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
8
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
9
|
+
*/
|
|
10
|
+
export interface ResponsiveStore extends Omit<ResponsiveActions, 'reset'> {
|
|
11
|
+
/** Calls `onChange` after every change of the runtime; returns the unsubscribe. */
|
|
12
|
+
readonly subscribe: (onChange: () => void) => () => void;
|
|
13
|
+
readonly getState: () => ResponsiveState;
|
|
14
|
+
readonly getViewportSize: () => ResponsiveViewportSize;
|
|
15
|
+
readonly getCanvasPadding: () => CanvasPadding;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The responsive state of the application this component is mounted in, as the store its root
|
|
19
|
+
* container measures into and `useResponsive()` reads from. Stable for the runtime's lifetime.
|
|
20
|
+
*
|
|
21
|
+
* @internal Runtime plumbing for the SDK's own UI. A project layout uses `useActiveViewports()`
|
|
22
|
+
* from `@salsita-ai/sdk/react` and `useSceneSafeArea()` from `@salsita-ai/sdk/configurator`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useResponsiveStore: () => ResponsiveStore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as e}from"react";import{useResponsiveApplication as t}from"./use-responsive-application.js";export const useResponsiveStore=()=>{let{runtime:s,selectors:i,actions:a}=t();return e(()=>({setViewport:a.setViewport,setBreakpoints:a.setBreakpoints,setCanvasPadding:a.setCanvasPadding,expand:a.expand,collapse:a.collapse,hide:a.hide,show:a.show,setAnimating:a.setAnimating,subscribe:s.subscribe,getState:i.getResponsiveState,getViewportSize:i.getViewportSize,getCanvasPadding:i.getCanvasPadding}),[s,i,a])};
|
|
@@ -6,6 +6,11 @@ interface AccessServiceProviderProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const AccessServiceProvider: (props: AccessServiceProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const useProvidedAccessService: () => AccessService;
|
|
9
|
+
/**
|
|
10
|
+
* The provided access service with `accessInfo.viewMode` set by the application's read-only rule,
|
|
11
|
+
* the domain-context selector `getIsViewMode`: the access opens the configuration for viewing only,
|
|
12
|
+
* or the host element is `readonly`. The assistant's `apply` follows the same selector.
|
|
13
|
+
*/
|
|
9
14
|
export declare const useAccessService: () => AccessService;
|
|
10
15
|
export declare const useConfigurationId: () => string;
|
|
11
16
|
export declare const useConfiguratorRawAccessService: () => AccessService | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createContext as s,useContext as c,useMemo as o}from"react";import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createContext as s,useContext as c,useMemo as o}from"react";import{useApplicationRuntime as r,useApplicationType as t}from"../provider/index.js";import{ApplicationType as i}from"../runtime/index.js";import{useApplicationRuntimeSelector as n}from"./use-application-runtime-selector.js";let a=s(null);export const AccessServiceProvider=s=>e(a.Provider,{value:s.value,children:s.children});export const useProvidedAccessService=()=>{let e=c(a);if(null===e)throw Error("Access service not found! Render access-dependent hooks inside AccessServiceProvider.");return e};export const useAccessService=()=>{let e=t(),s=r(),c=useProvidedAccessService(),a=n(e===i.Admin?s.selectors.domainContext.admin.getIsViewMode:s.selectors.domainContext.configurator.getIsViewMode);return o(()=>({...c,accessInfo:{...c.accessInfo,viewMode:a}}),[c,a])};export const useConfigurationId=()=>useProvidedAccessService().configurationId;export const useConfiguratorRawAccessService=()=>n(r().selectors.access.getConfiguratorRawAccessService);export const useAdminRawAccessService=()=>n(r().selectors.access.getAdminRawAccessService);export const useConfiguratorRawAccessInfo=()=>n(r().selectors.access.getConfiguratorRawAccessInfo);export const useAdminRawAccessInfo=()=>n(r().selectors.access.getAdminRawAccessInfo);export const useAccessInfoActions=()=>r().actions.access;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Does nothing. The application runtime mirrors the host's `readonly` web-component property into
|
|
3
|
+
* runtime state itself, from its construction on, so no component has to.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* embedded that way.
|
|
8
|
-
*
|
|
9
|
-
* Root placement means a domain lifecycle mounting in the same commit can initialize before the
|
|
10
|
-
* first value lands, since React runs child effects before parent effects. That is harmless: nothing
|
|
11
|
-
* reads the effective mode while initializing — persistence reads it per save request, and the
|
|
12
|
-
* domain context picks a later change up through the expression context, whose identity `reconcile`
|
|
13
|
-
* compares on every runtime notification.
|
|
5
|
+
* @deprecated The runtime keeps `readonly` in sync without it; remove the call. This hook will be
|
|
6
|
+
* removed in a future version.
|
|
14
7
|
*/
|
|
15
8
|
export declare const useWebComponentReadonlySync: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export const useWebComponentReadonlySync=()=>{};
|
|
@@ -7,6 +7,11 @@ export declare const useWebComponentApi: () => WebComponentApi;
|
|
|
7
7
|
export declare function useWebComponentProperty$<T>(property: WebComponentPropertyDescriptor<T>): BehaviorSubject<T>;
|
|
8
8
|
export declare function useWebComponentPropertySetter<T>(property: WebComponentPropertyDescriptor<T>): Dispatch<SetStateAction<T>>;
|
|
9
9
|
export declare const useWebComponentPropertyState: <T>(property: WebComponentPropertyDescriptor<T>) => [value: T, setValue: Dispatch<SetStateAction<T>>];
|
|
10
|
+
/**
|
|
11
|
+
* The property's current value; re-renders when it changes. A standard property the runtime
|
|
12
|
+
* mirrors is read from the slice its scope names, `hostProperties` or the domain's `webComponent`;
|
|
13
|
+
* any other property from its storage.
|
|
14
|
+
*/
|
|
10
15
|
export declare const useWebComponentPropertyValue: <T>(property: WebComponentPropertyDescriptor<T>) => T;
|
|
11
16
|
export declare const useDispatchWebComponentEvent: <T, R>(event: WebComponentEventDescriptor<T, R>) => (payload: T) => Promise<R | undefined>;
|
|
12
17
|
export declare const useWebcomponentGeneration: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{useEagerObservableValue as o}from"../../domain-context/common-hooks/use-observable-selector.js";import{
|
|
1
|
+
import{useCallback as e}from"react";import{useEagerObservableValue as o}from"../../domain-context/common-hooks/use-observable-selector.js";import{findMirroredHostPropertyReader as t}from"../host-properties/index.js";import{useApplicationRuntime as n}from"../provider/index.js";import{useApplicationRuntimeSelector as r}from"./use-application-runtime-selector.js";export const useWebComponentOptions=()=>n().selectors.commonServices.getWebComponentOptions();export const useWebComponentApi=()=>n().selectors.commonServices.getWebComponentApi();export function useWebComponentProperty$(e){return useWebComponentApi().getPropertyStorage(e).subject}export function useWebComponentPropertySetter(o){let t=useWebComponentProperty$(o);return e(e=>{let o="function"==typeof e?e(t.value):e;o!==t.value&&t.next(o)},[t])}export const useWebComponentPropertyState=e=>[useWebComponentPropertyValue(e),useWebComponentPropertySetter(e)];export const useWebComponentPropertyValue=e=>{let p=n(),s=useWebComponentProperty$(e),m=t(e),u=o(s,null===m);return r(()=>null===m?u:m(p.selectors))};export const useDispatchWebComponentEvent=o=>{let t=useWebComponentApi();return e(async e=>t.dispatchEvent(o,e),[o,t])};export const useWebcomponentGeneration=()=>r(n().selectors.webComponent.getWebcomponentGeneration);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HostPropertyName } from './host-property-scopes.js';
|
|
2
|
+
import type { HostPropertiesState, HostPropertyValue } from './types.js';
|
|
3
|
+
interface Context {
|
|
4
|
+
readonly setHostProperties: (update: (state: HostPropertiesState) => HostPropertiesState) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Internal to the runtime: only the subscription `connectHostProperties` sets up calls these. The
|
|
8
|
+
* runtime does not expose them on `actions`, because the host writes properties through the
|
|
9
|
+
* element.
|
|
10
|
+
*/
|
|
11
|
+
export declare const createHostPropertiesActions: (context: Context) => {
|
|
12
|
+
setHostProperty: <NAME extends HostPropertyName>(name: NAME, value: HostPropertyValue<NAME>) => void;
|
|
13
|
+
};
|
|
14
|
+
export type HostPropertiesActions = ReturnType<typeof createHostPropertiesActions>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isShallowEqual as t}from"@salsita-ai/common/utils";export const createHostPropertiesActions=o=>{let{setHostProperties:r}=o;return{setHostProperty:(o,e)=>{r(r=>t(r[o],e)?r:{...r,[o]:e})}}};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { WebComponentHostActions, WebComponentSelectors } from '#package/domain';
|
|
2
|
+
import type { WebComponentApi } from '../web-component/index.js';
|
|
3
|
+
import type { HostPropertiesActions } from './actions.js';
|
|
4
|
+
interface Context {
|
|
5
|
+
readonly webComponentApi: WebComponentApi;
|
|
6
|
+
readonly actions: HostPropertiesActions;
|
|
7
|
+
/** The domain's `webComponent` slice, which keeps the domain-scoped properties. */
|
|
8
|
+
readonly domainSelectors: WebComponentSelectors;
|
|
9
|
+
readonly domainActions: WebComponentHostActions;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The runtime-owned subscription behind the mirrored host properties: mirrors each mirrored
|
|
13
|
+
* property storage of the element into the slice its scope names, the application-scoped ones
|
|
14
|
+
* into `hostProperties` and the domain-scoped ones into the domain's `webComponent`. Either slice
|
|
15
|
+
* publishes only when a value changes, equal meaning shallowly equal.
|
|
16
|
+
*
|
|
17
|
+
* The runtime calls it once, right after its subject exists, and keeps it for its whole lifetime,
|
|
18
|
+
* as long as the element that owns the storages. The storages are `BehaviorSubject`s, so the first
|
|
19
|
+
* emissions replay the values the slices were initialized with and publish nothing, except a
|
|
20
|
+
* domain-scoped property the host set before the runtime existed. The admin application gets the
|
|
21
|
+
* domain-scoped properties too: its element never sets `readonly`, so the value stays `false`.
|
|
22
|
+
*
|
|
23
|
+
* Interim: the element's property storages are still the store and these slices a read mirror,
|
|
24
|
+
* so every mirrored value is held twice. CON-3142 makes the slice the only store (the element's
|
|
25
|
+
* setters and attribute parsing write it) and removes the storages and this subscription.
|
|
26
|
+
*
|
|
27
|
+
* @returns the unsubscribe, for tests and runtimes that end before their element.
|
|
28
|
+
*/
|
|
29
|
+
export declare const connectHostProperties: (context: Context) => (() => void);
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isShallowEqual as r}from"@salsita-ai/common/utils";import{getDomainHostProperty as o,setDomainHostProperty as t}from"./domain-host-properties.js";import{hostPropertyDescriptors as s}from"./host-property-descriptors.js";import{domainHostPropertyNames as e,hostPropertyNames as p}from"./host-property-scopes.js";export const connectHostProperties=i=>{let{webComponentApi:m,actions:c,domainSelectors:a,domainActions:b}=i,u=[...p.map(r=>m.getPropertyStorage(s[r]).subject.subscribe(o=>{c.setHostProperty(r,o)})),...e.map(e=>m.getPropertyStorage(s[e]).subject.subscribe(s=>{r(o(a,e),s)||t(b,e,s)}))];return()=>{u.forEach(r=>{r.unsubscribe()})}};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WebComponentHostActions, WebComponentSelectors } from '#package/domain';
|
|
2
|
+
import type { DomainHostPropertyName } from './host-property-scopes.js';
|
|
3
|
+
import type { HostPropertyValue } from './types.js';
|
|
4
|
+
/** A domain-scoped property's current value in the domain's `webComponent` slice. */
|
|
5
|
+
export declare const getDomainHostProperty: <NAME extends DomainHostPropertyName>(selectors: WebComponentSelectors, name: NAME) => HostPropertyValue<NAME>;
|
|
6
|
+
/** Writes a domain-scoped property into the domain's `webComponent` slice. */
|
|
7
|
+
export declare const setDomainHostProperty: <NAME extends DomainHostPropertyName>(actions: WebComponentHostActions, name: NAME, value: HostPropertyValue<NAME>) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={readonly:{get:e=>e.getReadonly(),set:(e,t)=>{e.setReadonly(t)}},locale:{get:e=>e.getLocale(),set:(e,t)=>{e.setLocale(t)}}};export const getDomainHostProperty=(t,o)=>e[o].get(t);export const setDomainHostProperty=(t,o,s)=>{e[o].set(t,s)};
|