@salsita-ai/sdk 0.50.0-develop.f16492b14e → 0.50.0-develop.f354d3576d
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 +4 -2
- package/dist/admin/AdminShell.js +1 -1
- package/dist/admin/common/admin-interface.d.ts +1 -1
- package/dist/admin/legacy-admin/Application.js +1 -1
- package/dist/application-spec/caching/index.d.ts +6 -1
- package/dist/application-spec/caching/index.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/domain-runtime-files.d.ts +0 -19
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -1
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +5 -4
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +118 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +44 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +61 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.js +79 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.js +52 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +49 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.js +40 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.js +65 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.js +58 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.js +41 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.js +24 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.js +44 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +74 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.js +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +64 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.js +59 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.js +30 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.js +87 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.js +39 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +36 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +12 -5
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/{phoenix-skill.d.ts → processes/beta.d.ts} +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +4 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +51 -258
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -58
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
- package/dist/application-spec/generate-application/index.d.ts +1 -8
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/client/authorized-client.d.ts +1 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +21 -8
- package/dist/client/contract.js +1 -1
- package/dist/client/phoenix-api.d.ts +43 -5
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +31 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +123 -24
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +43 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +8 -2
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +3 -2
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +1 -1
- package/dist/configurator/pages/default-configurator-elements.d.ts +6 -2
- package/dist/configurator/pages/default-configurator-elements.js +1 -1
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
- package/dist/configurator/pages/error-boundaries/index.js +1 -1
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
- package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
- package/dist/configurator/pages/provider-slots/index.js +1 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
- package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/index.js +1 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +10 -0
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +4 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +9 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.d.ts +14 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.d.ts +12 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.d.ts +11 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -0
- package/dist/configurator/ui/assistant/annotation/annotation-host-context.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +1 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +26 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +15 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +18 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.d.ts +17 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/annotation/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.d.ts +2 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.js +1 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +1 -0
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +15 -7
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +19 -0
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
- package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/attachments/index.js +1 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +24 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +15 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -0
- package/dist/configurator/ui/assistant/composer/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/composer/index.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +26 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
- package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/popover/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +3 -9
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +4 -4
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +11 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +5 -0
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/docs/3d-scene/animations-basic.mdx +0 -4
- package/dist/docs/3d-scene/camera-based-hiding.mdx +0 -2
- package/dist/docs/3d-scene/cameras/custom.mdx +0 -2
- package/dist/docs/3d-scene/cameras/fit-during-drag.mdx +0 -4
- package/dist/docs/3d-scene/cameras/locks.mdx +0 -4
- package/dist/docs/3d-scene/cameras/transitions.mdx +0 -2
- package/dist/docs/3d-scene/engraving.mdx +0 -4
- package/dist/docs/3d-scene/materials/custom.mdx +1 -2
- package/dist/docs/3d-scene/materials/inherit.mdx +0 -4
- package/dist/docs/3d-scene/materials/multilevel.mdx +0 -47
- package/dist/docs/3d-scene/materials/override.mdx +0 -4
- package/dist/docs/3d-scene/materials/simple.mdx +0 -4
- package/dist/docs/3d-scene/materials/transformer.mdx +0 -4
- package/dist/docs/3d-scene/materials/transition.mdx +0 -4
- package/dist/docs/3d-scene/materials/transmissive.mdx +0 -4
- package/dist/docs/3d-scene/postprocessing.mdx +0 -2
- package/dist/docs/3d-scene/rendering/basic.mdx +5 -9
- package/dist/docs/3d-scene/rendering/custom-entity.mdx +0 -6
- package/dist/docs/3d-scene/rendering/lights/ambient-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/directional-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/point-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/rect-area-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/spot-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/object-groups.mdx +0 -2
- package/dist/docs/3d-scene/rendering/objects.mdx +0 -4
- package/dist/docs/3d-scene/rendering/scene-entity-object.mdx +0 -43
- package/dist/docs/3d-scene/rendering/smma.mdx +0 -2
- package/dist/docs/3d-scene/rendering/soft-shadows.mdx +0 -2
- package/dist/docs/3d-scene/rendering/transformer.mdx +1 -3
- package/dist/docs/complex-use-cases/custom-ui-on-root-level.mdx +0 -1
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +19 -19
- package/dist/docs/complex-use-cases/navigation-guard.mdx +81 -19
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +28 -65
- package/dist/docs/complex-use-cases/navigation-reset-undo.mdx +16 -20
- package/dist/docs/complex-use-cases/sketching.mdx +2 -10
- package/dist/docs/controls/custom.mdx +88 -87
- package/dist/docs/controls/manage-child-entities/entitychildrenlist.mdx +0 -4
- package/dist/docs/controls/nullable-attributes.mdx +0 -2
- package/dist/docs/controls/scene/custom-controls.mdx +7 -8
- package/dist/docs/controls/scene/html-hotspots.mdx +0 -4
- package/dist/docs/controls/scene/object-html-hotspots.mdx +0 -4
- package/dist/docs/controls/select-attribute/cardselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/listselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/select.mdx +0 -4
- package/dist/docs/controls/select-attribute/swatchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/switchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/toggleselect.mdx +0 -4
- package/dist/docs/controls/select-child-entity/cardselect.mdx +2 -6
- package/dist/docs/controls/select-child-entity/listselect.mdx +5 -11
- package/dist/docs/controls/select-child-entity/toggleselect.mdx +4 -10
- package/dist/docs/controls/text-input.mdx +90 -19
- package/dist/docs/demos/glass.mdx +0 -4
- package/dist/docs/demos/heater.mdx +0 -10
- package/dist/docs/demos/office-chair.mdx +0 -8
- package/dist/docs/demos/office-desk.mdx +0 -8
- package/dist/docs/demos/ring.mdx +0 -9
- package/dist/docs/dimensions/3d-scene-integration/angle-indicators.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/editable-size-indicator.mdx +0 -4
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +0 -4
- package/dist/docs/dimensions/3d-scene-integration/offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/overlap-offset-demo.mdx +0 -6
- package/dist/docs/dimensions/input-controls/distance-slider.mdx +6 -6
- package/dist/docs/dimensions/selection-controls/list-selector.mdx +0 -2
- package/dist/docs/dimensions/selection-controls/toggle-selector.mdx +0 -2
- package/dist/docs/drag-and-drop/drag-handle.mdx +0 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +0 -1
- package/dist/docs/drag-and-drop/no-selection.mdx +0 -1
- package/dist/docs/drag-and-drop/planes.mdx +0 -3
- package/dist/docs/drag-and-drop/room-planner.mdx +0 -6
- package/dist/docs/drag-and-drop/rotatable.mdx +0 -1
- package/dist/docs/drag-and-drop/snapping/auto-rotation-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/label-matching-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/multi-snap-composition-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/nested-entity-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/priority-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-axis-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-edge-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-plane-demo.mdx +0 -5
- package/dist/docs/drag-and-drop/snapping/snap-point-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/collision-system.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/disjoint-and-within.mdx +0 -6
- package/dist/docs/drag-and-drop/spatial-constraints/geometry-override.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/multiple-collision-meshes.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/touches.mdx +0 -4
- package/dist/docs/drag-and-drop/swap.mdx +0 -4
- package/dist/docs/fabs/basic.mdx +8 -12
- package/dist/docs/fabs/layout.mdx +0 -7
- package/dist/docs/index.json +4 -4
- package/dist/docs/integrations/lifecycle-providers.mdx +0 -12
- package/dist/docs/integrations/onloadprovider.mdx +0 -3
- package/dist/docs/integrations/webcomponent-api/basics.mdx +2 -2
- package/dist/docs/integrations/webcomponent-api/preset-tags.mdx +0 -1
- package/dist/docs/layouts/custom-layout.mdx +1 -41
- package/dist/docs/layouts/custom-price.mdx +0 -2
- package/dist/docs/layouts/custom-theme-handler.mdx +0 -4
- package/dist/docs/layouts/gallery/ardent-compressor.mdx +3 -34
- package/dist/docs/layouts/gallery/corvid-drone.mdx +0 -29
- package/dist/docs/layouts/gallery/fenwick-window.mdx +0 -25
- package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +0 -27
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +0 -29
- package/dist/docs/layouts/gallery/nightjar-guitar.mdx +2 -35
- package/dist/docs/layouts/gallery/sunfold-solar.mdx +0 -26
- package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +0 -46
- package/dist/docs/layouts/header/custom.mdx +0 -2
- package/dist/docs/layouts/icon-sets.mdx +0 -6
- package/dist/docs/layouts/phoenix-elements.mdx +0 -4
- package/dist/docs/layouts/phoenix-handlers.mdx +19 -28
- package/dist/docs/layouts/presets/action-and-overlay.mdx +0 -8
- package/dist/docs/layouts/presets/custom.mdx +6 -13
- package/dist/docs/layouts/preview/always-expand.mdx +4 -14
- package/dist/docs/layouts/preview/always.mdx +4 -14
- package/dist/docs/layouts/preview/auto-presets.mdx +4 -14
- package/dist/docs/layouts/preview/auto.mdx +4 -14
- package/dist/docs/layouts/preview/never.mdx +4 -14
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +18 -13
- package/dist/docs/layouts/sidebar/property-page-stack.mdx +0 -2
- package/dist/docs/layouts/sidebar/property-page.mdx +0 -2
- package/dist/docs/layouts/sidebar/tabs.mdx +0 -4
- package/dist/docs/layouts/sidebar-footer/custom.mdx +0 -2
- package/dist/docs/layouts/sidebar-footer/universal.mdx +0 -10
- package/dist/docs/layouts/tool-controls.mdx +0 -1
- package/dist/docs/layouts/toolbar.mdx +0 -4
- package/dist/docs/layouts/universal.mdx +2 -10
- package/dist/docs/other-features/client-side-rendering/camera-padding.mdx +0 -2
- package/dist/docs/other-features/client-side-rendering/custom.mdx +0 -6
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +0 -4
- package/dist/docs/other-features/client-side-rendering/postprocessing.mdx +0 -6
- package/dist/docs/other-features/component-filters.mdx +0 -7
- package/dist/docs/other-features/currency.mdx +5 -6
- package/dist/docs/other-features/domain-actions.mdx +0 -5
- package/dist/docs/other-features/dynamic-component-attachments.mdx +75 -46
- package/dist/docs/other-features/error-5xx.mdx +0 -2
- package/dist/docs/other-features/navigation-hotspot.mdx +0 -5
- package/dist/docs/other-features/not-found-404.mdx +0 -2
- package/dist/docs/other-features/projected-entities.mdx +0 -5
- package/dist/docs/other-features/side-effects.mdx +0 -7
- package/dist/docs/other-features/transformers.mdx +101 -96
- package/dist/docs/other-features/violation-messages.mdx +0 -4
- package/dist/docs/other-features/violation-severity.mdx +2 -3
- package/dist/docs/performance/clone-highlight.mdx +0 -7
- package/dist/docs/performance/dynamic-components.mdx +0 -6
- package/dist/docs/performance/editable-dimension-stress-test.mdx +0 -2
- package/dist/docs/performance/fast-highlight.mdx +0 -7
- package/dist/docs/performance/general.mdx +0 -7
- package/dist/docs/performance/render-isolation.mdx +0 -6
- package/dist/docs/phoenix/admin.mdx +75 -100
- package/dist/docs/phoenix/application-states.mdx +45 -27
- package/dist/docs/phoenix/components.mdx +53 -46
- package/dist/docs/phoenix/configurator-interface.mdx +196 -116
- package/dist/docs/phoenix/deployments.mdx +11 -1
- package/dist/docs/phoenix/domain-model.mdx +20 -15
- package/dist/docs/phoenix/expression-context.mdx +3 -29
- package/dist/docs/phoenix/getting-started.mdx +0 -2
- package/dist/docs/phoenix/localization.mdx +64 -54
- package/dist/docs/phoenix/migration-guide.mdx +10 -11
- package/dist/docs/phoenix/phoenix-cli.mdx +21 -12
- package/dist/docs/phoenix/project-structure.mdx +52 -59
- package/dist/docs/phoenix/quickstart.mdx +1 -3
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +3 -9
- package/dist/docs/phoenix/state-management.mdx +18 -16
- package/dist/docs/phoenix/testing.mdx +6 -1
- package/dist/docs/phoenix/webhooks.mdx +4 -0
- package/dist/docs/recipes-and-delete/delete-entity.mdx +3 -6
- package/dist/docs/recipes-and-delete/dynamic-root-entity.mdx +0 -2
- package/dist/docs/recipes-and-delete/grouped-button.mdx +0 -3
- package/dist/docs/recipes-and-delete/grouped-panel.mdx +0 -3
- package/dist/docs/recipes-and-delete/horizontal.mdx +3 -6
- package/dist/docs/recipes-and-delete/recipe-hierarchy-lists.mdx +0 -3
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +0 -5
- package/dist/docs/recipes-and-delete/replace-dropdown.mdx +3 -6
- package/dist/docs/recipes-and-delete/replace-panel.mdx +0 -7
- package/dist/docs/recipes-and-delete/simple.mdx +3 -6
- package/dist/docs/recipes-and-delete/vertical.mdx +3 -6
- package/dist/docs/relations/aliases.mdx +0 -2
- package/dist/docs/relations/all-of-type.mdx +0 -4
- package/dist/docs/relations/child-nullable.mdx +0 -4
- package/dist/docs/relations/child-required.mdx +0 -2
- package/dist/docs/relations/collection-direct.mdx +0 -4
- package/dist/docs/relations/collection-indirect.mdx +0 -4
- package/dist/docs/relations/collection-multiple.mdx +0 -2
- package/dist/docs/relations/cross-reference.mdx +0 -2
- package/dist/docs/relations/hierarchy.mdx +0 -2
- package/dist/docs/selection-and-highlight/canvas.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight-per-object.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight.mdx +0 -1
- package/dist/docs/selection-and-highlight/effects/outline.mdx +0 -3
- package/dist/docs/selection-and-highlight/effects/overlay.mdx +0 -3
- package/dist/docs/selection-and-highlight/fast-emissive-highlight.mdx +0 -3
- package/dist/docs/selection-and-highlight/group-highlighting.mdx +0 -1
- package/dist/docs/selection-and-highlight/hierarchy.mdx +100 -151
- package/dist/docs/selection-and-highlight/hotspots.mdx +0 -1
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +1 -3
- package/dist/domain/application/assistant/assistant-fields.d.ts +1 -1
- package/dist/domain/application/assistant/assistant-value-type.d.ts +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +1 -2
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +1 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +0 -4
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +1 -2
- package/dist/domain/application/assistant-field-options.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +1 -2
- package/dist/domain/application/create-initial-published-data.d.ts +2 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/core/invariant/violation.d.ts +3 -2
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -1
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-context/transformers/context.d.ts +4 -2
- package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +24 -24
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/{module-checks/resolve-imported-transformers.d.ts → resolve-imported-transformers.d.ts} +3 -3
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -5
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -2
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- package/dist/domain/extensions/export-images/index.d.ts +1 -1
- package/dist/domain/extensions/export-images/index.js +1 -1
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +13 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-test-application-config.d.ts +1 -1
- package/dist/domain/spec/index.d.ts +3 -8
- package/dist/domain/spec/index.js +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/find-assistant-form-element-errors.d.ts +1 -1
- package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/index.d.ts +2 -3
- package/dist/domain/spec/modules/index.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/merge-expression-modules.d.ts +2 -2
- package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/project-modules.d.ts +1 -1
- package/dist/domain/spec/modules/project-modules.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.d.ts +1 -1
- package/dist/domain/spec/phx/index.d.ts +1 -0
- package/dist/domain/spec/phx/index.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-application-types.d.ts +1 -1
- package/dist/domain/spec/phx/phx-application-types.js +1 -0
- package/dist/domain/spec/phx/phx-domain.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-model.d.ts +2 -2
- package/dist/domain/spec/phx/phx-model.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.d.ts +1 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-runtime.d.ts +7 -6
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-spec-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/application-runtime.d.ts +8 -6
- package/dist/domain/spec/runtime/application-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/application-spec-slice.d.ts +3 -1
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-runtime.d.ts +8 -10
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-spec-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/create-application.d.ts +3 -2
- package/dist/domain/spec/runtime/create-application.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/expression-runtime.d.ts +5 -2
- package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/generate-memo-eval-plan-runtime.d.ts +2 -1
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
- package/dist/domain/spec/runtime/expressions/index.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.d.ts +2 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.d.ts +4 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/static-violations.d.ts +2 -1
- package/dist/domain/spec/runtime/factory-data/static-violations.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
- package/dist/domain/spec/runtime/index.d.ts +13 -0
- package/dist/domain/spec/runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/migration-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/admin-runtime → domain/spec/runtime/model}/admin-model-runtime.d.ts +4 -2
- package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/configurator-runtime → domain/spec/runtime/model}/configurator-model-runtime.d.ts +4 -2
- package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/index.d.ts +2 -0
- package/dist/domain/spec/runtime/model/index.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/build-sdk-optic.d.ts +3 -4
- package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.d.ts +4 -13
- package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
- package/dist/domain/spec/runtime/optics/index.js +1 -0
- package/dist/{application-spec/caching → domain/spec/runtime}/runtime-reference-store.d.ts +1 -5
- package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.d.ts +3 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.d.ts +2 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.d.ts +1 -1
- package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
- package/dist/domain/spec/runtime/sections/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.d.ts +3 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.d.ts +2 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.d.ts +1 -1
- package/dist/domain/spec/runtime/spec-code/spec-code-module.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-runtime.d.ts +3 -3
- package/dist/domain/spec/runtime/spec-runtime.js +1 -0
- package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
- package/dist/domain/spec/runtime-spec/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.d.ts +7 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.d.ts +1 -1
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/index.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +1 -0
- package/dist/domain/spec/sections/index.js +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-card-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-list-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-toggle-selector.d.ts +2 -3
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
- package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/project-files.d.ts +8 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +3 -3
- package/dist/phoenix/commands/dev.js +4 -5
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +2 -12
- package/dist/phoenix/lingui/lingui.d.ts +4 -4
- package/dist/phoenix/scripts/docs-utils.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -8
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
- package/dist/phoenix/services/deployment/index.d.ts +2 -0
- package/dist/phoenix/services/deployment/index.js +1 -0
- package/dist/phoenix/services/index.d.ts +2 -1
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-store.d.ts +3 -0
- package/dist/phoenix/services/phoenix-store.js +1 -1
- package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
- package/dist/phoenix/services/session/editor-server-handle.js +1 -0
- package/dist/phoenix/services/session/index.d.ts +2 -0
- package/dist/phoenix/services/session/index.js +1 -0
- package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
- package/dist/phoenix/services/session/phoenix-application.js +2 -0
- package/dist/phoenix/services/source-archive.d.ts +2 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.d.ts +5 -4
- package/dist/phoenix/services/swc.js +2 -2
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
- package/dist/react-sdk/configurator-ui-elements/index.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/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +7 -1
- package/dist/react-sdk/domain-controls/ChildEntityCardSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityListSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityToggleSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/hooks/use-cook-replace-recipes.d.ts +2 -2
- package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
- package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
- package/dist/react-sdk/index.d.ts +2 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/index.d.ts +3 -0
- package/dist/react-sdk/provider-slots/index.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
- package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
- package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
- package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
- package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
- package/dist/ui-sdk/icons/__generated/ChatCircleText.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/ChatCircleText.js +1 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +6 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +1 -1
- package/package.json +3 -3
- package/schema/domain-spec.json +22 -4
- package/dist/application-spec/caching/runtime-reference-store.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -166
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -115
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
- package/dist/application-spec/generate-application/implementations/phx-application-types.js +0 -1
- package/dist/application-spec/generate-application/implementations/phx-domain.js +0 -1
- package/dist/application-spec/generate-application/implementations/phx-model.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/application-spec-slice.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/create-application.js +0 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +0 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +0 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
- package/dist/application-spec/generate-application/runtime/index.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime-spec/index.d.ts +0 -5
- package/dist/application-spec/generate-application/runtime-spec/index.js +0 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +0 -1
- package/dist/phoenix/services/phoenix-application.d.ts +0 -21
- package/dist/phoenix/services/phoenix-application.js +0 -1
- /package/dist/{application-spec/generate-application/runtime/spec-code/spec-code-module.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.js} +0 -0
- /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.d.ts +0 -0
- /package/dist/configurator/{configurator-context → pages/provider-slots}/ConfiguratorResponsiveProvider.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js +0 -0
- /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-domain.d.ts +0 -0
- /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.js +0 -0
- /package/dist/domain/{application/assistant/assistant-resolved-manifest.js → spec/runtime/optics/built-component-optic.js} +0 -0
- /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/spec-code-module.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-resolved-manifest.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/index.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/index.js +0 -0
- /package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +0 -0
- /package/dist/phoenix/{commands → services/deployment}/generated-env-markers.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{observable as e}from"@trpc/server/observable";import{writeFile as t}from"fs/promises";import{resolve as r}from"path";import{filter as s,firstValueFrom as n,timeout as o}from"rxjs";import{z as i}from"zod";import{LOG_STREAMS as u}from"../services/log-bus.js";import{publicProcedure as a,router as l}from"./trpc.js";let
|
|
1
|
+
import{observable as e}from"@trpc/server/observable";import{writeFile as t}from"fs/promises";import{resolve as r}from"path";import{filter as s,firstValueFrom as n,timeout as o}from"rxjs";import{z as i}from"zod";import{LOG_STREAMS as u}from"../services/log-bus.js";import{publicProcedure as a,router as l}from"./trpc.js";let c=i.enum(["all",...u]),b=e=>{if(!e.application.variantPreviews)throw Error("Cannot preview variants: this session cannot rewrite project files, because it is not `phoenix dev`. Run `phoenix dev` in the project and try again");return e.application.variantPreviews};export const commandsRouter=l({getLogs:a.input(i.object({stream:c,beforeSeq:i.number().int().positive().optional(),limit:i.number().int().positive().max(500).default(200)})).query(({input:e,ctx:t})=>{if(!t.application.logs)return{entries:[],hasMore:!1,counts:null};let r=t.application.logs.query(e);return{entries:r.entries,hasMore:r.hasMore,counts:t.application.logs.allCounts()}}),onLog:a.subscription(({ctx:t})=>e(e=>t.application.logs?t.application.logs.subscribe(t=>{e.next(t)}):()=>{})),getTunnelState:a.query(({ctx:e})=>e.application.tunnelMonitor?{state:e.application.tunnelMonitor.state(),entries:e.application.tunnelMonitor.summaries()}:{state:null,entries:[]}),getTunnelRequest:a.input(i.object({seq:i.number().int().positive()})).query(({ctx:e,input:t})=>e.application.tunnelMonitor?.entry(t.seq)??null),onTunnelEvent:a.subscription(({ctx:t})=>e(e=>t.application.tunnelMonitor?t.application.tunnelMonitor.subscribe(t=>{e.next(t)}):()=>{})),takeScreenshot:a.input(i.object({width:i.number().int().positive(),height:i.number().int().positive(),fileFormat:i.enum(["PNG","JPEG"]),output:i.string()})).mutation(async({input:e,ctx:i})=>{let u;if(0===i.pubsub.screenshotRequest$.observers.length)throw Error("No editor connected. Open the configurator in a browser");let a=crypto.randomUUID(),l=n(i.pubsub.screenshotResult$.pipe(s(e=>e.requestId===a),o(3e4)));i.pubsub.screenshotRequest$.next({requestId:a,width:e.width,height:e.height,fileFormat:e.fileFormat});try{u=await l}catch{throw Error("Screenshot timed out. Ensure configurator is fully loaded")}let c=r(e.output),b=Buffer.from(u.imageBase64,"base64");try{await t(c,b)}catch(e){throw Error(`Failed to save screenshot: ${e instanceof Error?e.message:String(e)}`)}return{filePath:c}}),onScreenshotRequest:a.subscription(({ctx:t})=>e(e=>{let r=t.pubsub.screenshotRequest$.subscribe({next:r=>{t.logger.debug(`Emitting screenshot request to subscriber: ${r.requestId}`),e.next(r)},error:r=>{t.logger.error(`Screenshot request subject error: ${r instanceof Error?r.message:String(r)}`),e.error(r)}});return()=>{t.logger.debug("Screenshot request subscription unsubscribed"),r.unsubscribe()}})),submitScreenshot:a.input(i.object({requestId:i.string(),imageBase64:i.string(),fileFormat:i.enum(["PNG","JPEG"])})).mutation(({input:e,ctx:t})=>{t.logger.debug(`Received screenshot result for request: ${e.requestId}`),t.pubsub.screenshotResult$.next({requestId:e.requestId,imageBase64:e.imageBase64,fileFormat:e.fileFormat})}),reportBrowserConsole:a.input(i.object({level:i.enum(["error","warn","info"]),message:i.string(),source:i.string().optional(),timestamp:i.string().optional()})).mutation(({input:e,ctx:t})=>{if(!t.application.logs){let r=e.source?`browser:${e.source}`:"browser";t.logger.warn(`[${r}] ${e.message}`)}t.pubsub.browserConsole$.next({level:e.level,message:e.message,source:e.source,timestamp:e.timestamp})}),onBrowserConsole:a.subscription(({ctx:t})=>e(e=>{let r=t.pubsub.browserConsole$.subscribe({next:t=>{e.next(t)},error:r=>{t.logger.error(`Browser console subject error: ${r instanceof Error?r.message:String(r)}`),e.error(r)}});return()=>{r.unsubscribe()}})),getEditorState:a.input(i.object({sections:i.array(i.enum(["entities","navigation","validation"])).optional()})).mutation(async({input:e,ctx:t})=>{let r;if(0===t.pubsub.stateRequest$.observers.length)throw Error("No editor connected. Open the configurator in a browser");let i=crypto.randomUUID(),u=e.sections??["entities","navigation","validation"],a=n(t.pubsub.stateResult$.pipe(s(e=>e.requestId===i),o(1e4)));t.pubsub.stateRequest$.next({requestId:i,sections:u});try{r=await a}catch{throw Error("State request timed out. Ensure configurator is fully loaded")}return r.state}),onStateRequest:a.subscription(({ctx:t})=>e(e=>{let r=t.pubsub.stateRequest$.subscribe({next:r=>{t.logger.debug(`Emitting state request to subscriber: ${r.requestId}`),e.next(r)},error:r=>{t.logger.error(`State request subject error: ${r instanceof Error?r.message:String(r)}`),e.error(r)}});return()=>{t.logger.debug("State request subscription unsubscribed"),r.unsubscribe()}})),submitEditorState:a.input(i.object({requestId:i.string(),state:i.object({lifecycle:i.object({domainLoaded:i.boolean(),domainContextReady:i.boolean(),configuratorReady:i.boolean(),sessionAuthenticated:i.boolean(),editorMode:i.boolean()}),entities:i.array(i.record(i.unknown())).nullable(),navigation:i.record(i.unknown()).nullable(),validation:i.record(i.unknown()).nullable()})})).mutation(({input:e,ctx:t})=>{t.logger.debug(`Received editor state for request: ${e.requestId}`),t.pubsub.stateResult$.next({requestId:e.requestId,state:e.state})}),getEditorData:a.mutation(async({ctx:e})=>{let t;if(0===e.pubsub.dataRequest$.observers.length)throw Error("No editor connected. Open the configurator in a browser");let r=crypto.randomUUID(),i=n(e.pubsub.dataResult$.pipe(s(e=>e.requestId===r),o(1e4)));e.pubsub.dataRequest$.next({requestId:r});try{t=await i}catch{throw Error("Data request timed out. Ensure configurator is fully loaded")}return t.data}),onDataRequest:a.subscription(({ctx:t})=>e(e=>{let r=t.pubsub.dataRequest$.subscribe({next:r=>{t.logger.debug(`Emitting data request to subscriber: ${r.requestId}`),e.next(r)},error:r=>{t.logger.error(`Data request subject error: ${r instanceof Error?r.message:String(r)}`),e.error(r)}});return()=>{t.logger.debug("Data request subscription unsubscribed"),r.unsubscribe()}})),submitEditorData:a.input(i.object({requestId:i.string(),data:i.object({publishedData:i.record(i.unknown()).nullable(),frontendData:i.record(i.unknown()).nullable(),backendData:i.record(i.unknown()).nullable(),sessionData:i.record(i.unknown()).nullable(),accessData:i.record(i.unknown()).nullable(),webComponentProperties:i.record(i.unknown()).nullable()})})).mutation(({input:e,ctx:t})=>{t.logger.debug(`Received editor data for request: ${e.requestId}`),t.pubsub.dataResult$.next({requestId:e.requestId,data:e.data})}),getEditorScene:a.mutation(async({ctx:e})=>{let t;if(0===e.pubsub.sceneRequest$.observers.length)throw Error("No editor connected. Open the configurator in a browser");let r=crypto.randomUUID(),i=n(e.pubsub.sceneResult$.pipe(s(e=>e.requestId===r),o(1e4)));e.pubsub.sceneRequest$.next({requestId:r});try{t=await i}catch{throw Error("Scene request timed out. Ensure configurator is fully loaded")}return t.scene}),onSceneRequest:a.subscription(({ctx:t})=>e(e=>{let r=t.pubsub.sceneRequest$.subscribe({next:r=>{t.logger.debug(`Emitting scene request to subscriber: ${r.requestId}`),e.next(r)},error:r=>{t.logger.error(`Scene request subject error: ${r instanceof Error?r.message:String(r)}`),e.error(r)}});return()=>{t.logger.debug("Scene request subscription unsubscribed"),r.unsubscribe()}})),submitEditorScene:a.input(i.object({requestId:i.string(),scene:i.record(i.unknown()).nullable()})).mutation(({input:e,ctx:t})=>{t.logger.debug(`Received editor scene for request: ${e.requestId}`),t.pubsub.sceneResult$.next({requestId:e.requestId,scene:e.scene})}),previewVariants:a.input(i.object({title:i.string(),description:i.string(),variants:i.array(i.object({id:i.string(),kind:i.enum(["script","page"]),label:i.string(),description:i.string(),url:i.string().refine(e=>{try{let t=decodeURIComponent(new URL(e,"http://variant.invalid").pathname);return e.startsWith("/variants/")&&t.startsWith("/variants/")&&!t.includes("\\")&&!t.split("/").some(e=>"."===e||".."===e)}catch{return!1}},"Option URLs must stay below /variants/; use a file from the variant set")})).min(1),timeoutMs:i.number().int().positive().max(0x7fffffff)})).mutation(({input:e,ctx:t})=>b(t).open(e)),onVariantPreview:a.subscription(({ctx:t})=>e(e=>{let r=t.application.variantPreviews;if(!r)return e.next(null),()=>void 0;let s=r.request$.subscribe(t=>{e.next(t)});return()=>{s.unsubscribe()}})),getVariantBaseline:a.input(i.object({requestId:i.string()})).query(({input:e,ctx:t})=>b(t).getBaseline(e.requestId)),applyVariantFiles:a.input(i.object({requestId:i.string(),choice:i.string().nullable(),files:i.array(i.object({fileName:i.string(),content:i.string().nullable()}))})).mutation(({input:e,ctx:t})=>b(t).applyFiles(e)),submitVariantChoice:a.input(i.object({requestId:i.string(),choice:i.string().nullable()})).mutation(({input:e,ctx:t})=>b(t).submit(e)),closeVariantPreview:a.mutation(({ctx:e})=>e.application.variantPreviews?.close()??Promise.resolve({closed:!1})),claimVariantChoice:a.input(i.object({requestId:i.string()})).mutation(({input:e,ctx:t})=>{t.application.variantPreviews?.claim(e.requestId)})});
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PhoenixApplication } from '../services/phoenix-application.js';
|
|
3
|
-
import type { WebhookTunnelMonitor } from '../services/webhook-tunnel-monitor.js';
|
|
1
|
+
import type { EditorServerHandle, PhoenixApplication } from '../services/index.js';
|
|
4
2
|
import type { Logger } from '../utils/index.js';
|
|
5
3
|
export interface EditorServerOptions {
|
|
6
4
|
readonly port: number;
|
|
7
|
-
readonly projectRoot: string;
|
|
8
5
|
readonly application: PhoenixApplication;
|
|
9
6
|
readonly logger: Logger;
|
|
10
7
|
readonly debug?: boolean;
|
|
11
|
-
/** Bound to this dev session; absent for offline and story sessions. */
|
|
12
|
-
readonly prepareDeployment?: () => Promise<void>;
|
|
13
|
-
readonly storyMode?: boolean;
|
|
14
|
-
readonly logBus?: LogBus;
|
|
15
|
-
readonly tunnelMonitor?: WebhookTunnelMonitor;
|
|
16
8
|
}
|
|
17
|
-
export declare const startEditorServer: ({ port,
|
|
18
|
-
ready: Promise<void>;
|
|
19
|
-
close: () => Promise<void>;
|
|
20
|
-
};
|
|
9
|
+
export declare const startEditorServer: ({ port, application, logger }: EditorServerOptions) => EditorServerHandle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyWSSHandler as e}from"@trpc/server/adapters/ws";import{WebSocketServer as
|
|
1
|
+
import{applyWSSHandler as e}from"@trpc/server/adapters/ws";import{WebSocketServer as o}from"ws";import{appRouter as r}from"./editor-router.js";export const startEditorServer=({port:t,application:n,logger:i})=>{let s=new o({port:t}),c=e({wss:s,router:r,createContext:()=>({projectRoot:n.projectRoot,pubsub:n.pubsub,application:n,logger:i})});s.on("connection",(e,o)=>{let r=o.headers.origin??"unknown";i.info(`WS connected (clients: ${s.clients.size}, origin: ${r})`),e.on("error",e=>{i.warn(`WS error: ${e.message}`)}),e.once("close",(e,o)=>{i.info(`WS disconnected (clients: ${s.clients.size}, code: ${e}, reason: ${o.toString()||"none"})`)})}),s.on("error",e=>{i.error(`WebSocket server error: ${e.message}`)});let l=new Promise((e,o)=>{let r=()=>{s.off("error",n),i.info(`WebSocket Server listening on ws://localhost:${t}`),e()},n=e=>{s.off("listening",r),o(e)};s.once("listening",r),s.once("error",n)}),a=null;return{ready:l,close:()=>a||(i.info("Shutting down WebSocket server"),c.broadcastReconnectNotification(),a=new Promise((e,o)=>{let r=setTimeout(()=>{for(let e of s.clients)e.terminate()},3e3);s.close(t=>{clearTimeout(r),t?o(t):e()})}))}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TRPCError as e}from"@trpc/server";import{observable as o}from"@trpc/server/observable";import{writeFile as t}from"fs/promises";import{join as
|
|
1
|
+
import{TRPCError as e}from"@trpc/server";import{observable as o}from"@trpc/server/observable";import{writeFile as t}from"fs/promises";import{join as i}from"path";import{z as r}from"zod";import{readApplicationFiles as p}from"../application-spec/index.js";import{exists as a}from"../utils/index.js";import{publicProcedure as s,router as n}from"./trpc.js";export const specRouter=n({getEditorConfig:s.query(()=>({specSync:!0})),prepareDeployment:s.mutation(async({ctx:o})=>{if(o.application.variantPreviews?.isOpen)throw new e({code:"BAD_REQUEST",message:"Deployment preparation is disabled during variant previews. Close the preview first."});if("story"===o.application.mode)throw new e({code:"BAD_REQUEST",message:"Deployment preparation is disabled in Storybook story mode."});if(!o.application.deploymentPreparation)throw new e({code:"BAD_REQUEST",message:"Deployment preparation requires a deployment configuration outside story mode."});await o.application.deploymentPreparation.prepare()}),requestSpecFiles:s.mutation(async({ctx:e})=>{let o="story"===e.application.mode?await p({projectRoot:e.projectRoot,envs:{}}):await p();e.pubsub.specFile$.next({rawProjectFiles:o,projectRoot:e.projectRoot})}),save:s.input(r.array(r.object({fileName:r.string(),content:r.string()}))).mutation(async({ctx:o,input:r})=>{if(o.application.variantPreviews?.isOpen)throw new e({code:"BAD_REQUEST",message:"Close the variant preview before editing source files."});for(let e of r){let r=i(o.projectRoot,e.fileName),p=i(o.projectRoot,e.fileName.split("/").slice(0,-1).join("/"));await a(p)&&await t(r,e.content)}}),onSpecChange:s.subscription(({ctx:e})=>o(o=>{let t=e.pubsub.specFile$.subscribe(e=>{o.next(e)});return()=>{t.unsubscribe()}}))});
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PhoenixApplication } from '../services/index.js';
|
|
2
2
|
import type { PhoenixPubSub } from '../services/phoenix-pubsub.js';
|
|
3
|
-
import type { VariantPreviewService } from '../services/variant-preview-service.js';
|
|
4
|
-
import type { WebhookTunnelMonitor } from '../services/webhook-tunnel-monitor.js';
|
|
5
3
|
import type { Logger } from '../utils/index.js';
|
|
6
4
|
export type Context = {
|
|
7
5
|
readonly projectRoot: string;
|
|
8
6
|
readonly pubsub: PhoenixPubSub;
|
|
9
7
|
readonly logger: Logger;
|
|
10
|
-
|
|
11
|
-
readonly variantPreviews: VariantPreviewService | undefined;
|
|
12
|
-
/** Bound to this dev session; absent for offline and story sessions. */
|
|
13
|
-
readonly prepareDeployment?: () => Promise<void>;
|
|
14
|
-
readonly storyMode?: boolean;
|
|
15
|
-
/** Dev-server log buffer backing the editor Logs panel; absent in story mode. */
|
|
16
|
-
readonly logBus?: LogBus;
|
|
17
|
-
/** Dev-process tunnel state backing the editor Webhook Tunnel panel. */
|
|
18
|
-
readonly tunnelMonitor?: WebhookTunnelMonitor;
|
|
8
|
+
readonly application: PhoenixApplication;
|
|
19
9
|
};
|
|
20
10
|
export declare const router: import("@trpc/server").TRPCRouterBuilder<{
|
|
21
11
|
ctx: Context;
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
5
|
-
* `.linguirc` that earlier SDK versions left in the project root is not read. Lingui searches
|
|
6
|
-
* working directory instead only when the named file is missing; generation writes it with the rest
|
|
7
|
-
* `.phoenix/` before Phoenix runs Lingui or Vite. Missing-catalog bootstrap compiles with a temporary
|
|
4
|
+
* CLI is given this path and Vite loads its plugins from a fresh snapshot of this file, so a
|
|
5
|
+
* `.linguirc` that earlier SDK versions left in the project root is not read. The Lingui CLI searches
|
|
6
|
+
* the working directory instead only when the named file is missing; generation writes it with the rest
|
|
7
|
+
* of `.phoenix/` before Phoenix runs Lingui or Vite. Missing-catalog bootstrap compiles with a temporary
|
|
8
8
|
* copy that stages output while keeping every locale available for fallback reads.
|
|
9
9
|
*/
|
|
10
10
|
export declare const LINGUI_CONFIG_PATH = ".phoenix/.linguirc";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as t,readFileSync as e,readdirSync as r,statSync as s}from"fs";import{convertPathToPattern as o,globby as i}from"globby";import{dirname as n,join as a,resolve as l}from"path";import{fileURLToPath as p}from"url";let c=n(p(import.meta.url));export const PROJECT_SDK_ROOT=l(c,"../../..");export const MONOREPO_ROOT=l(PROJECT_SDK_ROOT,"../../..");export const DIST_DOCS=a(PROJECT_SDK_ROOT,"dist/docs");let m=a(MONOREPO_ROOT,"packages/apps/storybook");export const STORYBOOK_SRC=a(m,"src");export const STORYBOOK_EXAMPLES=a(STORYBOOK_SRC,"examples");export const UI_SDK_SRC=a(PROJECT_SDK_ROOT,"src/ui-sdk");let
|
|
1
|
+
import{existsSync as t,readFileSync as e,readdirSync as r,statSync as s}from"fs";import{convertPathToPattern as o,globby as i}from"globby";import{dirname as n,join as a,resolve as l}from"path";import{fileURLToPath as p}from"url";let c=n(p(import.meta.url));export const PROJECT_SDK_ROOT=l(c,"../../..");export const MONOREPO_ROOT=l(PROJECT_SDK_ROOT,"../../..");export const DIST_DOCS=a(PROJECT_SDK_ROOT,"dist/docs");let m=a(MONOREPO_ROOT,"packages/apps/storybook");export const STORYBOOK_SRC=a(m,"src");export const STORYBOOK_EXAMPLES=a(STORYBOOK_SRC,"examples");export const UI_SDK_SRC=a(PROJECT_SDK_ROOT,"src/ui-sdk");let f=a(m,".storybook/preview.tsx"),u=/order:\s*\[/;export const parseTopCategoriesFromPreview=t=>{let e=u.exec(t);if(!e)return[];let r=0,s=e.index+e[0].length-1,o=[],i="",n=!1,a="";for(;s<t.length;s++){let e=t[s];if("["===e&&!n){r++;continue}if("]"===e&&!n){if(0==--r)break;continue}if(1===r){if(("'"===e||'"'===e)&&!n){n=!0,a=e,i="";continue}if(e===a&&n){n=!1,"*"!==i&&o.push(i);continue}n&&(i+=e)}}return o};export const buildCategoryCaseMap=t=>new Map(t.map(t=>[t.toLowerCase(),t]));export const loadDocsConfig=()=>{let t=e(f,"utf-8"),r=parseTopCategoriesFromPreview(t),s=buildCategoryCaseMap(r);return{topCategories:r,caseMap:s}};export const discoverMdxFiles=async()=>i([`${o(STORYBOOK_SRC)}/**/*.mdx`,`${o(UI_SDK_SRC)}/**/*.mdx`],{absolute:!0});export const getSource=t=>t.startsWith(STORYBOOK_EXAMPLES)?"storybook-example":t.startsWith(STORYBOOK_SRC)?"storybook-root":t.startsWith(UI_SDK_SRC)?"ui-sdk":"unknown";let g=/<Meta\s+title=["']([^"']+)["']\s*\/?>/,x=/<Meta\s+of=\{(\w+)\}\s*\/?>/,h=/title:\s*['"]([^'"]+)['"]/;export const parseMdxTitle=t=>{let e=g.exec(t);return e?.[1]};export const parseStoriesTitle=t=>{let e=h.exec(t);return e?.[1]};export const resolveStoriesPath=(e,r)=>{let s=x.exec(r);if(!s)return;let o=s[1],i=r.match(RegExp(`import\\s+\\*\\s+as\\s+${o}\\s+from\\s+['"]([^'"]+)['"]`));if(!i?.[1])return;let a=l(n(e),i[1]);if(!a.endsWith(".tsx")&&!a.endsWith(".ts"))if(t(a+".tsx"))a+=".tsx";else{if(!t(a+".ts"))return;a+=".ts"}return t(a)?a:void 0};export const resolveTitle=(t,r)=>{let s=parseMdxTitle(r);if(s)return s;let o=resolveStoriesPath(t,r);if(!o)return;let i=e(o,"utf-8");return parseStoriesTitle(i)};export const findFirstParagraph=t=>{let e=t.split("\n"),r=[],s=!1,o=!1;for(let t of e){let e=t.trim();if(e.startsWith("```")){o=!o;continue}if(!(o||e.startsWith("- [")||e.startsWith("* [")||e.startsWith("#")||e.startsWith("<")||e.startsWith("{/*")||e.startsWith("|"))&&!e.startsWith(">")){if(""===e){if(s&&r.length>0)break;continue}s=!0,r.push(e)}}return r.length>0?r.join(" "):void 0};export const truncateAtWord=(t,e)=>{if(t.length<=e)return t;let r=t.slice(0,e),s=r.lastIndexOf(" ");return(s>0?r.slice(0,s):r)+"..."};export const extractDescription=t=>{let e=t.split("\n").filter(t=>!t.startsWith("import ")).filter(t=>!t.startsWith("<Meta")).filter(t=>!t.startsWith("<Canvas")).filter(t=>!t.startsWith("<Story")).filter(t=>!t.startsWith("<Controls")).filter(t=>!t.startsWith("<Markdown")).join("\n"),r=/^# .+$/m.exec(e),s=/^## .+$/m.exec(e),o=r?r.index+r[0].length:0,i=s?s.index:e.length,n=e.slice(o,i),a=findFirstParagraph(n);if(!a&&s){let t=e.slice(s.index+s[0].length),r=/^## .+$/m.exec(t),o=r?t.slice(0,r.index):t;a=findFirstParagraph(o)}return a?truncateAtWord(a,200):""};export const parseCategoryPath=t=>{let e=t.split(/\s*\/\s*/).map(t=>t.trim()).filter(Boolean);return 0===e.length?["Uncategorized"]:e};export const normalizeTopCategory=(t,e)=>e.get(t.toLowerCase())??t;export const slugify=t=>t.toLowerCase().replace(/&/g,"and").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");export const computeOutputPath=(t,e)=>{let r=t.slice(0,-1).map(slugify).join("/"),s=`${e}.mdx`;return r?`${r}/${s}`:s};export const resolveDocMeta=(t,e)=>{let r=parseCategoryPath(t),s=r[0],o=r[r.length-1];if(!s||!o)return;let i=[normalizeTopCategory(s,e),...r.slice(1)],n=slugify(o),a=computeOutputPath(i,n);return{title:t,lastSegment:o,normalizedSegments:i,docSlug:n,outputRelative:a}};let d=[/^import\s+\{[^}]*\}\s+from\s+['"]@storybook\/[^'"]+['"]\s*$/gm,/^import\s+\*\s+as\s+\w+\s+from\s+['"][^'"]*\.stories[^'"]*['"]\s*$/gm,/^import\s+\w+\s+from\s+['"][^'"]*\.stories[^'"]*['"]\s*$/gm,/^import\s+\w+\s+from\s+['"][^'"]*\.mdx[^'"]*['"]\s*$/gm,/^import\s+\w+\s+from\s+['"][^'"]*\?raw['"]\s*$/gm,/^<Meta\s+[^>]*\/>\s*$/gm,/^<Canvas\s+[^>]*\/>\s*$/gm,/^<Story\s+[^>]*\/>\s*$/gm,/^<Controls\s+[^>]*\/>\s*$/gm,/^<Markdown>\{[^}]+\}<\/Markdown>\s*$/gm],O=/^import\s+(?:type\s+)?\{\s*phx\s*\}\s+from\s+['"](?:\.\.\/)+\.phoenix\/phx\.js['"];?\s*$/;export const stripStorybookImports=t=>{let e=(t=>{let e=t.split("\n"),r=[];for(let[t,s]of e.entries()){if(O.test(s))continue;let o=e[t-1],i=(r.at(-1)??"").startsWith("```");""===s.trim()&&void 0!==o&&O.test(o)&&i||r.push(s)}return r.join("\n")})(t);for(let t of d)e=e.replace(t,"");return e.replace(/\n{3,}/g,"\n\n").trim()+"\n"};export const buildCategoryTree=(t,e,r)=>{let s=new Map,o=(t,e)=>{let r=t.get(e);return r||(r={name:e,docs:[],subcategories:new Map},t.set(e,r)),r};for(let e of t){let t=e.category,i=t[0];if(0===t.length||!i)continue;let n=o(s,normalizeTopCategory(i,r));if(1===t.length){n.docs.push(e);continue}let a=n;for(let e=1;e<t.length-1;e++){let r=t[e];r&&(a=o(a.subcategories,r))}a.docs.push(e)}let i=new Map(e.map((t,e)=>[t,e])),n=t=>({name:t.name,docs:t.docs,subcategories:Array.from(t.subcategories.values()).map(n)});return Array.from(s.values()).sort((t,e)=>(i.get(t.name)??999)-(i.get(e.name)??999)||t.name.localeCompare(e.name)).map(n)};export const getDirectorySizeBytes=t=>{let e=0;for(let o of r(t,{withFileTypes:!0})){let r=a(t,o.name);o.isDirectory()?e+=getDirectorySizeBytes(r):e+=s(r).size}return e};export const formatBytes=t=>{if(t<1024)return`${t} B`;let e=t/1024;if(e<1024)return`${e.toFixed(1)} KB`;let r=e/1024;return`${r.toFixed(1)} MB`};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ViteDevServer } from 'vite';
|
|
2
|
-
import type { ApplicationSpec } from '#package/application-spec';
|
|
3
2
|
import type { Logger } from '../utils/index.js';
|
|
3
|
+
import type { DeploymentPreparationService } from './deployment/index.js';
|
|
4
|
+
import type { LinguiWatcher } from './lingui-watcher.js';
|
|
4
5
|
import type { PhoenixPubSub } from './phoenix-pubsub.js';
|
|
6
|
+
import type { PhoenixStore } from './phoenix-store.js';
|
|
5
7
|
import type { VariantFileEdit } from './variant-file-session.js';
|
|
6
8
|
export declare const WATCH_PATTERNS: string[];
|
|
7
9
|
export declare const IGNORED_PATTERNS: string[];
|
|
@@ -9,9 +11,6 @@ export declare const IGNORED_PATTERNS: string[];
|
|
|
9
11
|
export interface ApplicationSpecProjectWatcherConfig {
|
|
10
12
|
readonly pubsub: PhoenixPubSub;
|
|
11
13
|
readonly logger: Logger;
|
|
12
|
-
/** Called with the application spec of every rebuild that succeeded. */
|
|
13
|
-
readonly onRebuilt?: (applicationSpec: ApplicationSpec) => void;
|
|
14
|
-
readonly onViteServerChange?: (viteServer: ViteDevServer) => void;
|
|
15
14
|
readonly sdkVersion: string;
|
|
16
15
|
readonly projectSlug: string;
|
|
17
16
|
readonly environmentSlug: string;
|
|
@@ -20,6 +19,12 @@ export interface ApplicationSpecProjectWatcherConfig {
|
|
|
20
19
|
readonly inlineTemplates: boolean;
|
|
21
20
|
readonly useServer: boolean;
|
|
22
21
|
}
|
|
22
|
+
/** Services the watcher notifies after a rebuild; the store owns its replaceable Vite handle. */
|
|
23
|
+
export interface ApplicationSpecProjectWatcherContext {
|
|
24
|
+
readonly store: PhoenixStore;
|
|
25
|
+
readonly linguiWatcher: LinguiWatcher | undefined;
|
|
26
|
+
readonly deploymentPreparation: DeploymentPreparationService | undefined;
|
|
27
|
+
}
|
|
23
28
|
/**
|
|
24
29
|
* Application-spec project watcher with layered caching via {@link ApplicationSpecBuilder}:
|
|
25
30
|
*
|
|
@@ -31,22 +36,20 @@ export interface ApplicationSpecProjectWatcherConfig {
|
|
|
31
36
|
* Rebuilds are serialized via PromiseQueue(1).
|
|
32
37
|
*/
|
|
33
38
|
export declare class ApplicationSpecProjectWatcher {
|
|
39
|
+
private readonly context;
|
|
34
40
|
private watcher;
|
|
35
41
|
private subscription;
|
|
36
42
|
private readonly rebuildQueue;
|
|
37
43
|
/** Each watcher event emits the changed source path; debounced + buffered into batches. */
|
|
38
44
|
private readonly changeSubject$;
|
|
39
|
-
private viteServer;
|
|
40
45
|
private readonly pubsub;
|
|
41
46
|
private readonly logger;
|
|
42
|
-
private readonly onRebuilt?;
|
|
43
|
-
private readonly onViteServerChange?;
|
|
44
47
|
private readonly builder;
|
|
45
48
|
private readonly useServer;
|
|
46
49
|
private isShuttingDown;
|
|
47
50
|
private suspended;
|
|
48
51
|
private readonly heldChanges;
|
|
49
|
-
constructor(config: ApplicationSpecProjectWatcherConfig);
|
|
52
|
+
constructor(config: ApplicationSpecProjectWatcherConfig, context: ApplicationSpecProjectWatcherContext);
|
|
50
53
|
start(viteServer: ViteDevServer): void;
|
|
51
54
|
/** Rebuilds a batch a variant comparison wrote, at once and without the server work of a source change. */
|
|
52
55
|
applyVariantFiles(files: readonly VariantFileEdit[]): void;
|
|
@@ -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
|
|
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 c}from"vite";import{watch as a}from"#package/watch";import{ApplicationSpecBuilder as l}from"../application-spec/application-spec-builder.js";import{logDiagnostics as h}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=["package.json","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{context;watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;pubsub;logger;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e,t){this.context=t,this.pubsub=e.pubsub,this.logger=e.logger,this.builder=new l({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.context.store.viteServer$.next(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 a=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(
|
|
4
|
+
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.context.store.viteServer$.value;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(h(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:l,changedFiles:d}=a;this.context.linguiWatcher?.trigger(),this.context.deploymentPreparation?.reportUnregisteredSpec(l.applicationSpec);let w=r.moduleGraph,f=Date.now(),b=new Set,m=process.cwd(),S=e=>{let t=w.getModulesByFile(c(e));if(t)for(let e of t)w.invalidateModule(e,b,f,!0)};for(let i of e)S(t(m,i));for(let e of d)S(t(m,`.phoenix/${e.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:l.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:l.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.context.store.viteServer$.next(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)}}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ApplicationSpec } from '#package/application-spec';
|
|
2
|
+
import type { Logger } from '../../utils/index.js';
|
|
3
|
+
import type { DevelopmentCredential } from '../development-credential.js';
|
|
4
|
+
import type { PhoenixStore } from '../phoenix-store.js';
|
|
5
|
+
/** The deployment identity a server-backed dev session prepares and checks after rebuilds. */
|
|
6
|
+
export interface DeploymentPreparationServiceProps {
|
|
7
|
+
readonly serverUrl: string;
|
|
8
|
+
readonly credential: DevelopmentCredential;
|
|
9
|
+
readonly projectSlug: string;
|
|
10
|
+
readonly environmentSlug: string;
|
|
11
|
+
readonly sdkVersion: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DeploymentPreparationServiceContext {
|
|
14
|
+
readonly logger: Logger;
|
|
15
|
+
readonly store: PhoenixStore;
|
|
16
|
+
}
|
|
17
|
+
/** Prepares the active dev deployment and reports spec changes that require a session restart. */
|
|
18
|
+
export declare class DeploymentPreparationService {
|
|
19
|
+
private readonly props;
|
|
20
|
+
private readonly context;
|
|
21
|
+
constructor(props: DeploymentPreparationServiceProps, context: DeploymentPreparationServiceContext);
|
|
22
|
+
prepare(): Promise<void>;
|
|
23
|
+
prepareAtStartup(options: {
|
|
24
|
+
readonly skipUpload: boolean;
|
|
25
|
+
readonly debug: boolean;
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
reportUnregisteredSpec(applicationSpec: ApplicationSpec): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mkdir as e}from"node:fs/promises";import{dirname as t}from"node:path";import{resolveGeneratedEnvFile as r}from"@salsita-ai/common/env";import{getDeploymentFingerprint as o}from"../../application-spec/index.js";import{prepareDevelopmentEnvironment as n}from"../prepare-development-environment.js";import{readGeneratedEnvMarkers as i}from"./generated-env-markers.js";export class DeploymentPreparationService{props;context;constructor(e,t){this.props=e,this.context=t}prepare(){return this.prepareAtStartup({skipUpload:!0,debug:!1})}async prepareAtStartup(o){let i=r(".");await e(t(i),{recursive:!0}),await n({serverUrl:this.props.serverUrl,projectSlug:this.props.projectSlug,environmentSlug:this.props.environmentSlug,credential:this.props.credential,outFile:i,skipUpload:o.skipUpload,overrideSchema:!0,debug:o.debug,projectVersion:this.props.sdkVersion},{logger:this.context.logger})}async reportUnregisteredSpec(e){try{let t=o(e),n=await i(r("."));if(!n||n.PHOENIX_DEPLOYMENT_FINGERPRINT===t)return void this.context.store.reportedFingerprint$.next(null);if(this.context.store.reportedFingerprint$.value===t)return;this.context.store.reportedFingerprint$.next(t),this.context.logger.error("The development deployment on the server still has the domain model and deployment settings it was prepared with, not the ones the spec now declares: a running phoenix dev cannot register a change, because its webhook tunnel and the preview stay bound to the deployment they started with. Restart phoenix dev to prepare the deployment again, then open the Preview address it prints rather than reloading a tab whose address has ?cid=, which loads a configuration saved with the earlier model.")}catch(e){this.context.logger.warn(`Could not compare the spec with the development deployment: ${e instanceof Error?e.message:String(e)}. After a domain model change, restart phoenix dev to register it.`)}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{readGeneratedEnvMarkers}from"./generated-env-markers.js";export{DeploymentPreparationService}from"./deployment-preparation-service.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type { BrowserConsoleEvent, DataRequest, DataResult, EditorContextData, EditorLifecycleStatus, EditorStateData, MockTemplateUpdateEvent, SceneRequest, SceneResult, ScreenshotRequest, ScreenshotResult, SpecUpdateEvent, StateRequest, StateResult, StateSection, } from './phoenix-pubsub.js';
|
|
2
2
|
export { PhoenixPubSub } from './phoenix-pubsub.js';
|
|
3
3
|
export { PhoenixStore } from './phoenix-store.js';
|
|
4
|
-
export {
|
|
4
|
+
export { DeploymentPreparationService, readGeneratedEnvMarkers } from './deployment/index.js';
|
|
5
|
+
export { PhoenixApplication, type PhoenixApplicationProps, type PhoenixApplicationContext, type PhoenixDevelopmentOptions, type EditorServerHandle, } from './session/index.js';
|
|
5
6
|
export { VariantFileSession } from './variant-file-session.js';
|
|
6
7
|
export { VariantPreviewService } from './variant-preview-service.js';
|
|
7
8
|
export { MockTemplateWatcher, type MockTemplateWatcherConfig } from './mock-template-watcher.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./
|
|
1
|
+
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{DeploymentPreparationService,readGeneratedEnvMarkers}from"./deployment/index.js";export{PhoenixApplication}from"./session/index.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{exitCli,setBeforeCliExit}from"./cli-exit.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{createTelemetryClient,resolveTelemetryCommand}from"./telemetry/index.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import type { ViteDevServer } from 'vite';
|
|
2
3
|
/**
|
|
3
4
|
* A frontend file script or standalone HTML proposal served from `.phoenix/variants/`.
|
|
4
5
|
*/
|
|
@@ -44,5 +45,7 @@ export interface VariantPreviewState {
|
|
|
44
45
|
* editor server reaches it only through them. Events that carry no state stay on PhoenixPubSub.
|
|
45
46
|
*/
|
|
46
47
|
export declare class PhoenixStore {
|
|
48
|
+
readonly viteServer$: BehaviorSubject<ViteDevServer | null>;
|
|
49
|
+
readonly reportedFingerprint$: BehaviorSubject<string | null>;
|
|
47
50
|
readonly variantPreview$: BehaviorSubject<VariantPreviewState>;
|
|
48
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BehaviorSubject as e}from"rxjs";export class PhoenixStore{variantPreview$=new e({open:null,activeChoice:null,unclaimed:null})}
|
|
1
|
+
import{BehaviorSubject as e}from"rxjs";export class PhoenixStore{viteServer$=new e(null);reportedFingerprint$=new e(null);variantPreview$=new e({open:null,activeChoice:null,unclaimed:null})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PhoenixApplication}from"./phoenix-application.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { createServer } from 'vite';
|
|
3
|
+
import { type Logger } from '../../utils/index.js';
|
|
4
|
+
import { DeploymentPreparationService } from '../deployment/index.js';
|
|
5
|
+
import { type DevelopmentCredential } from '../development-credential.js';
|
|
6
|
+
import { LinguiWatcher } from '../lingui-watcher.js';
|
|
7
|
+
import { LogBus } from '../log-bus.js';
|
|
8
|
+
import { type BrowserConsoleEvent, PhoenixPubSub } from '../phoenix-pubsub.js';
|
|
9
|
+
import { PhoenixStore } from '../phoenix-store.js';
|
|
10
|
+
import { VariantPreviewService } from '../variant-preview-service.js';
|
|
11
|
+
import { WebhookTunnelMonitor } from '../webhook-tunnel-monitor.js';
|
|
12
|
+
import type { EditorServerHandle } from './editor-server-handle.js';
|
|
13
|
+
/** Resolved inputs for one development session; the application constructs its service graph. */
|
|
14
|
+
export interface PhoenixDevelopmentOptions {
|
|
15
|
+
readonly sdkVersion: string;
|
|
16
|
+
readonly projectSlug: string;
|
|
17
|
+
readonly environmentSlug: string;
|
|
18
|
+
readonly cliUseWorkspace: boolean | undefined;
|
|
19
|
+
readonly enableEditor: boolean | undefined;
|
|
20
|
+
readonly debug: boolean;
|
|
21
|
+
readonly withLingui: boolean;
|
|
22
|
+
readonly persistenceMode: string | undefined;
|
|
23
|
+
readonly force: boolean;
|
|
24
|
+
readonly serverUrl: string | undefined;
|
|
25
|
+
readonly credential: DevelopmentCredential | undefined;
|
|
26
|
+
readonly skipUpload: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface PhoenixApplicationProps {
|
|
29
|
+
readonly projectRoot: string;
|
|
30
|
+
readonly mode: 'dev' | 'story';
|
|
31
|
+
readonly development: PhoenixDevelopmentOptions | undefined;
|
|
32
|
+
readonly editorPort: number | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** Host adapters for the editor transport and terminal presentation at lifecycle boundaries. */
|
|
35
|
+
export interface PhoenixApplicationContext {
|
|
36
|
+
readonly logger: Logger;
|
|
37
|
+
readonly createEditorServer: (props: {
|
|
38
|
+
readonly port: number;
|
|
39
|
+
readonly application: PhoenixApplication;
|
|
40
|
+
readonly logger: Logger;
|
|
41
|
+
readonly debug: boolean;
|
|
42
|
+
}) => EditorServerHandle;
|
|
43
|
+
readonly onProjectPrepared: (logs: LogBus) => void;
|
|
44
|
+
readonly onStartupFailure: (error: unknown) => void;
|
|
45
|
+
readonly onBrowserConsole: (event: BrowserConsoleEvent, logs: LogBus) => void;
|
|
46
|
+
}
|
|
47
|
+
/** Composes, starts and closes one dev or story session, including resources acquired during a failed start. */
|
|
48
|
+
export declare class PhoenixApplication {
|
|
49
|
+
private readonly props;
|
|
50
|
+
private readonly context;
|
|
51
|
+
readonly store: PhoenixStore;
|
|
52
|
+
readonly pubsub: PhoenixPubSub;
|
|
53
|
+
readonly failures$: Subject<Error>;
|
|
54
|
+
private readonly logsValue;
|
|
55
|
+
private readonly tunnelMonitorValue;
|
|
56
|
+
private readonly deploymentPreparationValue;
|
|
57
|
+
private variantPreviewsValue;
|
|
58
|
+
private linguiWatcherValue;
|
|
59
|
+
private projectWatcher;
|
|
60
|
+
private storyWatcher;
|
|
61
|
+
private mockTemplateWatcher;
|
|
62
|
+
private editorServer;
|
|
63
|
+
private webhookTunnel;
|
|
64
|
+
private browserConsoleSubscription;
|
|
65
|
+
private startPromise;
|
|
66
|
+
private closePromise;
|
|
67
|
+
constructor(props: PhoenixApplicationProps, context: PhoenixApplicationContext);
|
|
68
|
+
get logs(): LogBus | undefined;
|
|
69
|
+
get tunnelMonitor(): WebhookTunnelMonitor | undefined;
|
|
70
|
+
get deploymentPreparation(): DeploymentPreparationService | undefined;
|
|
71
|
+
get projectRoot(): string;
|
|
72
|
+
get mode(): 'dev' | 'story';
|
|
73
|
+
get variantPreviews(): VariantPreviewService | undefined;
|
|
74
|
+
get linguiWatcher(): LinguiWatcher | undefined;
|
|
75
|
+
start(): Promise<Awaited<ReturnType<typeof createServer>> | undefined>;
|
|
76
|
+
close(): Promise<void>;
|
|
77
|
+
private startSession;
|
|
78
|
+
private startEditor;
|
|
79
|
+
private startDevelopment;
|
|
80
|
+
private assertStarting;
|
|
81
|
+
private closeResources;
|
|
82
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Subject as e}from"rxjs";import{createServer as t}from"vite";import{resolveGeneratedEnvFile as o}from"@salsita-ai/common/env";import{generateProjectFiles as r,getDeploymentFingerprint as s}from"../../application-spec/index.js";import{exists as i}from"../../utils/index.js";import{buildWebhooks as n,webhookLogContext as a}from"../../webhooks/index.js";import{ApplicationSpecProjectWatcher as l}from"../application-spec-project-watcher.js";import{ApplicationSpecStoryWatcher as c}from"../application-spec-story-watcher.js";import{DeploymentPreparationService as h,readGeneratedEnvMarkers as p}from"../deployment/index.js";import{getDevelopmentCredentialHint as u}from"../development-credential.js";import{LinguiWatcher as m}from"../lingui-watcher.js";import{LogBus as g}from"../log-bus.js";import{MockTemplateWatcher as d}from"../mock-template-watcher.js";import{PhoenixPubSub as v}from"../phoenix-pubsub.js";import{PhoenixStore as w}from"../phoenix-store.js";import{VariantPreviewService as b}from"../variant-preview-service.js";import{getViteDevConfig as S}from"../vite-config.js";import{createWebhookTunnelTransport as E,readOrCreateTunnelSessionId as x,startWebhookService as f}from"../webhook-service/index.js";import{WebhookTunnelMonitor as P}from"../webhook-tunnel-monitor.js";export class PhoenixApplication{props;context;store=new w;pubsub=new v;failures$=new e;logsValue;tunnelMonitorValue;deploymentPreparationValue;variantPreviewsValue;linguiWatcherValue;projectWatcher;storyWatcher;mockTemplateWatcher;editorServer;webhookTunnel;browserConsoleSubscription;startPromise;closePromise;constructor(e,t){this.props=e,this.context=t;let o="dev"===e.mode?e.development:void 0,r=o&&(!o.persistenceMode||"server"===o.persistenceMode);this.logsValue="dev"===e.mode?new g:void 0,this.tunnelMonitorValue=r&&o.serverUrl?new P(o.serverUrl):void 0,this.deploymentPreparationValue=r&&o.serverUrl&&o.credential?new h({serverUrl:o.serverUrl,credential:o.credential,projectSlug:o.projectSlug,environmentSlug:o.environmentSlug,sdkVersion:o.sdkVersion},{store:this.store,get logger(){return t.logger}}):void 0}get logs(){return this.logsValue}get tunnelMonitor(){return this.tunnelMonitorValue}get deploymentPreparation(){return this.deploymentPreparationValue}get projectRoot(){return this.props.projectRoot}get mode(){return this.props.mode}get variantPreviews(){return this.variantPreviewsValue}get linguiWatcher(){return this.linguiWatcherValue}start(){return this.startPromise??=this.startSession(),this.startPromise}close(){return this.closePromise??=this.closeResources(this.context.logger),this.closePromise}async startSession(){try{if(this.assertStarting(),"story"===this.mode)return void await this.startEditor();let e=this.logs;if(!e)throw Error("Cannot start development: the application has no log bus.");return this.browserConsoleSubscription=this.pubsub.browserConsole$.subscribe(t=>this.context.onBrowserConsole(t,e)),await this.startDevelopment()}catch(e){throw this.closePromise||this.context.onStartupFailure(e),await this.close(),e}}async startEditor(){let e=this.props.editorPort;void 0!==e&&("dev"===this.mode&&this.context.logger.step("Starting editor WebSocket server"),this.editorServer=this.context.createEditorServer({port:e,application:this,logger:this.context.logger,debug:this.props.development?.debug??!1}),await this.editorServer.ready,this.assertStarting(),"dev"===this.mode&&this.context.logger.debug(`Editor WebSocket server started on port ${e}`),this.mockTemplateWatcher=new d({projectRoot:this.projectRoot,pubsub:this.pubsub,logger:this.context.logger}),this.mockTemplateWatcher.start(),"story"===this.mode&&(this.storyWatcher=new c({projectRoot:this.projectRoot,pubsub:this.pubsub,logger:this.context.logger}),this.storyWatcher.start()))}async startDevelopment(){let e=this.props.development,c=this.logs;if(!e||!c)throw Error("Cannot start development: session options are missing. Supply development options when constructing the application.");let{sdkVersion:h,projectSlug:g,environmentSlug:d,cliUseWorkspace:v,enableEditor:w,debug:P,withLingui:j,persistenceMode:y,force:k,serverUrl:V,credential:W,skipUpload:R}=e,{store:N,pubsub:T,deploymentPreparation:I,tunnelMonitor:_}=this;process.env.NODE_ENV="development",y&&(process.env.PERSISTENCE_MODE=y);let O=!y||"server"===y;if(O&&V&&(process.env.SERVER_URL=V),this.context.logger.step("Starting development mode"),!await i("spec"))throw Object.assign(Error('Spec folder not found. Run "phoenix init" first.'),{code:"SPEC_NOT_FOUND"});if(O&&(!V||!W))throw Error("Server persistence needs a server and a credential. Run `phoenix login <workspace>`, or create a development environment in Studio and paste its .env block into .env.");this.context.logger.step("Building project files");let{templateFiles:D,applicationSpec:$}=await r({sdkVersion:h,projectSlug:g,environmentSlug:d,cliUseWorkspace:v,enableEditor:w,withLingui:j,force:k},{logger:this.context.logger});if(this.assertStarting(),this.context.logger.success("Project files built successfully"),O&&V&&W){let e=o("."),t=await p(e);k||t?.PHOENIX_PROJECT_SLUG!==g||t.PHOENIX_ENVIRONMENT_SLUG!==d||t.PHOENIX_SERVER_URL!==V||t.PHOENIX_DEPLOYMENT_FINGERPRINT!==s($)?(this.context.logger.step("Preparing development deployment"),await I?.prepareAtStartup({skipUpload:R,debug:P})):this.context.logger.debug(`${e} matches the current development environment, skipping prepare`)}if(this.assertStarting(),this.context.onProjectPrepared(c),j?(this.linguiWatcherValue=new m({logger:this.context.logger}),this.linguiWatcherValue.start()):this.context.logger.warn("Continuous Lingui updates are disabled; missing catalogs were bootstrapped at startup. Pass --withLingui or set WITH_LINGUI=true to enable."),O&&(this.context.logger.step("Building webhooks"),await a.run("webhook",async()=>{await n({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js"})})),O&&V&&W){let e=o("."),t=await p(e);if(!t?.DEPLOYMENT_ID)throw Error(`Webhook tunnel cannot start because ${e} has no DEPLOYMENT_ID. Rerun phoenix dev to prepare the development deployment.`);this.assertStarting();let r=await x();this.assertStarting();let s=await f({experimental:!0,transport:E({serverUrl:V,credential:W,projectSlug:g,environmentSlug:d}),rejectionHint:u(W,g),environmentSlug:d,deploymentId:t.DEPLOYMENT_ID,sessionId:r,onStatus:(e,o)=>{_?.setStatus(e,{deploymentId:t.DEPLOYMENT_ID,sessionId:r,message:o??null})},onRequest:e=>_?.record(e)});this.closePromise&&(await s.stop(),this.assertStarting()),this.webhookTunnel=s,_?.setStatus("waiting",{deploymentId:t.DEPLOYMENT_ID,sessionId:r}),s.stopped.catch(e=>{this.failures$.next(Error(`Webhook tunnel failed: ${e instanceof Error?e.message:String(e)}`)),this.close()}),this.context.logger.success("Webhook tunnel started")}this.assertStarting();let M=new l({pubsub:T,logger:this.context.logger,sdkVersion:h,projectSlug:g,environmentSlug:d,cliUseWorkspace:v,enableEditor:w??!0,inlineTemplates:!1,useServer:O},{store:N,linguiWatcher:this.linguiWatcherValue,deploymentPreparation:I});this.projectWatcher=M,this.variantPreviewsValue=new b({projectRoot:this.projectRoot},{store:N,logger:this.context.logger,projectWatcher:M}),w&&void 0!==this.props.editorPort&&await this.startEditor();let C=await S({templateFiles:D}),L=await t(C);return this.closePromise&&(await L.close(),this.assertStarting()),this.store.viteServer$.next(L),await L.listen(),this.assertStarting(),this.context.logger.step("Starting Vite dev server"),M.start(L),L}assertStarting(){if(this.closePromise)throw Error("Cannot continue startup: the session has already closed. Start a new Phoenix application.")}async closeResources(e){"dev"===this.mode&&e.debug("Shutting down...");let t="story"===this.mode?[{name:"story source watcher",close:()=>this.storyWatcher?.close()},{name:"mock-template watcher",close:()=>this.mockTemplateWatcher?.close()},{name:"editor server",close:()=>this.editorServer?.close()}]:[{name:"lingui watcher",close:()=>this.linguiWatcherValue?.close()},{name:"project watcher",close:()=>this.projectWatcher?.close()},{name:"mock template watcher",close:()=>this.mockTemplateWatcher?.close()},{name:"editor server",close:()=>this.editorServer?.close()},{name:"variant previews",close:()=>this.variantPreviewsValue?.dispose()},{name:"vite server",close:()=>this.store.viteServer$.value?.close()},{name:"webhook tunnel",close:()=>this.webhookTunnel?.stop()}],o=[];for(let r of t)try{"dev"===this.mode&&e.debug(`Shutting down ${r.name}`),await r.close()}catch(s){let t=s instanceof Error?s.message:String(s);"story"===this.mode?e.warn(`Failed to close the story-dev ${r.name}: ${t}. The process will continue shutting down.`):o.push(`${r.name}: ${t}`)}this.browserConsoleSubscription?.unsubscribe(),this.failures$.complete(),o.length>0&&e.warn(`Cleanup warnings:
|
|
2
|
+
${o.join("\n ")}`),"dev"===this.mode&&e.debug("Shutdown complete")}}
|
|
@@ -4,6 +4,8 @@ export interface SourceArchive {
|
|
|
4
4
|
readonly fileCount: number;
|
|
5
5
|
readonly size: number;
|
|
6
6
|
readonly hasConversationLog: boolean;
|
|
7
|
+
/** Regular files packed from the project's `docs/` folder, which travel privately and are never published. */
|
|
8
|
+
readonly documentFileCount: number;
|
|
7
9
|
readonly cleanup: () => Promise<void>;
|
|
8
10
|
}
|
|
9
11
|
/** What `extractSourceArchive` wrote and what it left out. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{execFile as e}from"node:child_process";import{createReadStream as r,createWriteStream as t}from"node:fs";import{lstat as o,mkdir as i,mkdtemp as a,readdir as n,rm as s,stat as c,writeFile as l}from"node:fs/promises";import{tmpdir as h}from"node:os";import{dirname as p,join as f}from"node:path";import{Transform as d}from"node:stream";import{pipeline as w}from"node:stream/promises";import{promisify as m}from"node:util";import{createGunzip as u}from"node:zlib";import{extract as g}from"tar-stream";import{isProjectFile as y,listProjectEntries as
|
|
1
|
+
import{execFile as e}from"node:child_process";import{createReadStream as r,createWriteStream as t}from"node:fs";import{lstat as o,mkdir as i,mkdtemp as a,readdir as n,rm as s,stat as c,writeFile as l}from"node:fs/promises";import{tmpdir as h}from"node:os";import{dirname as p,join as f}from"node:path";import{Transform as d}from"node:stream";import{pipeline as w}from"node:stream/promises";import{promisify as m}from"node:util";import{createGunzip as u}from"node:zlib";import{extract as g}from"tar-stream";import{isProjectFile as y,listProjectDocumentEntries as v,listProjectEntries as x,listProjectWorkspaceEntries as E}from"../application-spec/index.js";let j=m(e);export const createSourceArchive=async e=>{let r=(await n(e)).includes("conversation.log"),t=await x(e),i=await E(e),p=await v(e),d=[...t,...i,...p,...r?["conversation.log"]:[]],w=await Promise.all(d.map(async r=>({name:r,entry:await o(f(e,r))})));if(w.some(({name:e,entry:r})=>"conversation.log"===e&&r.isDirectory()))throw Error("conversation.log is a directory. Replace it with a regular transcript file and deploy again.");let m=w.filter(({entry:e})=>!e.isDirectory()&&(!e.isFile()||e.nlink>1)),u=w.filter(({entry:e})=>e.isFile()).map(({name:e})=>e),g=new Set(p);if(m.length>0)throw Error(`These project files are links or special files, which builds do not accept: ${m.map(({name:e})=>e).join(", ")}. Replace them with regular files and deploy again.`);if(!u.some(y))throw Error(`No project files were found in ${e}, so there is nothing to deploy. Run phoenix deploy in the folder of an application-spec project.`);let T=await a(f(h(),"phoenix-deploy-")),b="sources.tgz",$=f(T,b),R=f(T,"files");try{await l(R,u.join("\0")),await j("tar",["-czf",b,"-C",e,"--null","-T",R],{cwd:T,env:{...process.env,COPYFILE_DISABLE:"1"}})}catch(r){await s(T,{recursive:!0,force:!0});let e=r instanceof Error?r.message:String(r);throw Error(`Packing the project with tar failed: ${e}. Check that tar is installed and on the PATH.`)}return{path:$,fileCount:u.length,size:(await c($)).size,hasConversationLog:r,documentFileCount:u.filter(e=>g.has(e)).length,cleanup:()=>s(T,{recursive:!0,force:!0})}};let T=(e,...r)=>e instanceof Error&&"code"in e&&"string"==typeof e.code&&r.includes(e.code),b=async e=>{try{return 0===(await n(e)).length}catch(e){if(T(e,"ENOENT"))return!0;throw e}},$=class ArchiveRefusal extends Error{},R=e=>e.length>0&&!e.startsWith("/")&&!e.includes("\\")&&!/^[A-Za-z]:/.test(e)&&!/[\x00-\x1f\x7f]/.test(e)&&!e.split("/").includes("..");export const extractSourceArchive=async e=>{let o,a,{archivePath:n,targetDir:l}=e,h=(await c(n)).size;if(h>0xc800000)throw Error(`The source archive is ${h} bytes, over the 209715200 byte limit. Remove large files from the project and deploy again.`);if(!await b(l))throw Error(`The folder ${l} is not empty, and extracted sources must not mix with existing files. Extract into a new or empty folder.`);let m=g(),v=new AbortController,x=w(r(n),u(),(a=0,new d({transform(e,r,t){(a+=e.length)>0x40000000?t(new $("The source archive extracts to more than 1073741824 bytes. Remove large files from the project and deploy again.")):t(null,e)}})),m).catch(e=>{o??=e,v.abort()}),E=[],j=0,S=0;try{for await(let e of m){let{type:r}=e.header,o=e.header.name.replace(/^(\.\/)+/,""),a=JSON.stringify(o);if("directory"===r){e.resume();continue}if((S+=1)>1e5)throw new $("The source archive has more than 100000 files. Remove generated or unused files from the project and deploy again.");if(!R(o))throw new $(`The source archive contains ${a}, which is not a plain relative path inside the project. Pack the project with phoenix deploy.`);if("file"!==r)throw new $(`The source archive contains ${a}, which is a ${r??"special file"}. Builds accept only regular files; replace it with a regular file and deploy again.`);if(!y(o)){E.push(o),e.resume();continue}let n=f(l,...o.split("/"));try{await i(p(n),{recursive:!0}),await w(e,t(n,{flags:"wx"}),{signal:v.signal})}catch(e){if(T(e,"EEXIST","ENOTDIR","EISDIR"))throw new $(`The source archive contains ${a}, which repeats or collides with an earlier entry, so its content is ambiguous. Pack the project with phoenix deploy.`);throw e}j+=1}if(await x,void 0!==o)throw o}catch(t){let e=t instanceof $?t:o??t;if(m.destroy(),await x,await s(l,{recursive:!0,force:!0}),e instanceof $)throw e;let r=e instanceof Error?e.message:String(e);throw Error(`The source archive could not be read: ${r}. It is truncated or not a gzip tarball; pack the project with phoenix deploy.`)}return{fileCount:j,skipped:E}};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { type Logger } from '../utils/index.js';
|
|
2
2
|
export interface SwcCompileProps {
|
|
3
|
-
readonly sourceDir
|
|
4
|
-
readonly outDir
|
|
3
|
+
readonly sourceDir: string;
|
|
4
|
+
readonly outDir: string;
|
|
5
|
+
readonly ignoredPaths: readonly string[];
|
|
5
6
|
}
|
|
6
|
-
export declare const compileWithSwc: (props
|
|
7
|
+
export declare const compileWithSwc: (props: SwcCompileProps, context?: {
|
|
7
8
|
readonly logger: Logger;
|
|
8
9
|
}) => Promise<void>;
|
|
9
10
|
/**
|
|
10
11
|
* Watch mode for SWC compilation
|
|
11
12
|
* Watches for changes in TypeScript files and non-compilable files
|
|
12
13
|
*/
|
|
13
|
-
export declare const watchWithSwc: (props
|
|
14
|
+
export declare const watchWithSwc: (props: SwcCompileProps, context?: {
|
|
14
15
|
readonly logger: Logger;
|
|
15
16
|
}) => Promise<{
|
|
16
17
|
stop: () => Promise<void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{transform as e}from"@swc/core";import{remove as t}from"fs-extra";import{copyFile as s,mkdir as o,readFile as a,writeFile as r}from"fs/promises";import{globby as i}from"globby";import{createRequire as c}from"node:module";import{dirname as l,relative as n,resolve as p}from"path";import{Subject as m}from"rxjs";import{watch as w}from"#package/watch";import{createLogger as
|
|
1
|
+
import{transform as e}from"@swc/core";import{remove as t}from"fs-extra";import{copyFile as s,mkdir as o,readFile as a,writeFile as r}from"fs/promises";import{globby as i}from"globby";import{createRequire as c}from"node:module";import{dirname as l,relative as n,resolve as p}from"path";import{Subject as m}from"rxjs";import{watch as w}from"#package/watch";import{createLogger as u}from"../utils/index.js";let d=()=>({sourceMaps:!0,module:{type:"es6"},jsc:{target:"es2022",parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic"}},keepClassNames:!0,experimental:{plugins:[[c(import.meta.url).resolve("@lingui/swc-plugin"),{}]],cacheRoot:"node_modules/.cache/swc"}}}),f=async(e,t,a,r)=>{let c=process.cwd(),m=p(c,e),w=p(c,t),u=await i(["**/*.{html,css,json,txt,md}","**/.env*"],{cwd:m,ignore:[...a,"**/*.{spec,test}.{html,css,json,txt,md}","**/__tests__/**","**/__mocks__/**","**/tsconfig.json",".env.generated"],absolute:!1}),d=0,f=0;for(let e of u)try{let t=p(m,e),a=p(w,e);await o(l(a),{recursive:!0}),await s(t,a),d++}catch(t){f++,console.error(`Failed to copy ${n(c,p(m,e))}:`,t)}if(f>0)throw Error(`Failed to copy ${f} file(s)`);d>0&&r.debug(`Copied ${d} non-compilable file(s)`)};export const compileWithSwc=async(s,c)=>{let{sourceDir:m,outDir:w,ignoredPaths:g}=s,h=c?.logger??u(),_=process.cwd(),x=p(_,m),y=p(_,w);await t(y);let b=await i(["**/*.{ts,tsx}"],{cwd:x,ignore:[...g,"**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/__mocks__/**"],absolute:!1}),$=d(),j=0,v=0;for(let t of b)try{let s=p(x,t),i=p(y,t.replace(/\.tsx?$/,".js")),c=await a(s,"utf-8"),n=await e(c,{...$,filename:s,sourceMaps:!0,outputPath:i});await o(l(i),{recursive:!0}),await r(i,n.code,"utf-8"),n.map&&await r(`${i}.map`,n.map,"utf-8"),j++}catch(e){v++,console.error(`Failed to compile ${n(_,p(x,t))}:`,e)}if(v>0)throw Error(`Failed to compile ${v} file(s)`);h.isDebug&&h.debug(`Compiled ${j} file(s) with swc`),await f(m,w,g,h)};let g=async(t,s,i)=>{let c=process.cwd(),n=p(c,s),m=p(c,i),w=d(),u=p(n,t),f=p(m,t.replace(/\.tsx?$/,".js")),g=await a(u,"utf-8"),h=await e(g,{...w,filename:u,sourceMaps:!0,outputPath:f});await o(l(f),{recursive:!0}),await r(f,h.code,"utf-8"),h.map&&await r(`${f}.map`,h.map,"utf-8")},h=async(e,t,a)=>{let r=process.cwd(),i=p(r,t),c=p(r,a),n=p(i,e),m=p(c,e);await o(l(m),{recursive:!0}),await s(n,m)};export const watchWithSwc=async(e,t)=>{let{sourceDir:s,outDir:o,ignoredPaths:a}=e,r=t?.logger??u(),i=p(process.cwd(),s);r.isDebug&&r.step("Running initial SWC compilation"),await compileWithSwc({sourceDir:s,outDir:o,ignoredPaths:a},t),r.isDebug&&r.success("Initial compilation complete");let c=new m,l=w(["**/*.{ts,tsx,html,css,json,txt,md}","../.env*"],{cwd:i,ignored:[...a,"**/*.{spec,test}.{ts,tsx}","**/__tests__/**","**/cache.json"],persistent:!0,ignoreInitial:!0});return l.on("all",(e,t)=>{("change"===e||"add"===e)&&c.next({file:t,type:e})}),c.subscribe(async({file:e})=>{let t=n(i,p(i,e));try{e.match(/\.tsx?$/)?(await g(t,s,o),r.fileChanged(t)):(e.match(/\.(html|css|json|txt|md)$/)||e.match(/\.env/))&&(await h(t,s,o),r.fileChanged(t))}catch(e){r.error(`Failed to process ${t}`),r.isDebug&&console.error(e)}}),r.isDebug&&console.log(`
|
|
2
2
|
👀 Watching ${s} for changes...
|
|
3
|
-
`),{stop:async()=>{await
|
|
3
|
+
`),{stop:async()=>{await l.close(),r.isDebug&&r.info("SWC watcher stopped")}}};
|