@dxos/app-framework 0.8.4-main.fffef41 → 0.9.0
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/.storybook/main.mts +2 -4
- package/.storybook/preview.mts +2 -2
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/browser/capability-BOPAKKWG.mjs +35 -0
- package/dist/lib/browser/capability-BOPAKKWG.mjs.map +7 -0
- package/dist/lib/browser/chunk-5GY3YOEL.mjs +28 -0
- package/dist/lib/browser/chunk-5GY3YOEL.mjs.map +7 -0
- package/dist/lib/browser/chunk-66IXTIVK.mjs +48 -0
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
- package/dist/lib/browser/chunk-CO3XLNUX.mjs +95 -0
- package/dist/lib/browser/chunk-CO3XLNUX.mjs.map +7 -0
- package/dist/lib/browser/chunk-DC3WRPBV.mjs +227 -0
- package/dist/lib/browser/chunk-DC3WRPBV.mjs.map +7 -0
- package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
- package/dist/lib/browser/chunk-FJ4765WW.mjs.map +7 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
- package/dist/lib/browser/chunk-HFLKXMT7.mjs +587 -0
- package/dist/lib/browser/chunk-HFLKXMT7.mjs.map +7 -0
- package/dist/lib/browser/chunk-IW44C7UL.mjs +83 -0
- package/dist/lib/browser/chunk-IW44C7UL.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-KZUDO43J.mjs +422 -0
- package/dist/lib/browser/chunk-KZUDO43J.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q2GLJTVV.mjs +12 -0
- package/dist/lib/browser/chunk-Q2GLJTVV.mjs.map +7 -0
- package/dist/lib/browser/chunk-SYXIYT6T.mjs +143 -0
- package/dist/lib/browser/chunk-SYXIYT6T.mjs.map +7 -0
- package/dist/lib/browser/chunk-XHS5KDNX.mjs +1471 -0
- package/dist/lib/browser/chunk-XHS5KDNX.mjs.map +7 -0
- package/dist/lib/browser/chunk-Y66ELD4U.mjs +476 -0
- package/dist/lib/browser/chunk-Y66ELD4U.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +74 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/common/activation-events.mjs +20 -0
- package/dist/lib/browser/common/capabilities.mjs +56 -0
- package/dist/lib/browser/core/activation-event.mjs +20 -0
- package/dist/lib/browser/core/capability.mjs +32 -0
- package/dist/lib/browser/core/capability.mjs.map +7 -0
- package/dist/lib/browser/core/plugin-manager.mjs +19 -0
- package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/browser/core/plugin.mjs +41 -0
- package/dist/lib/browser/core/plugin.mjs.map +7 -0
- package/dist/lib/browser/core/url-loader.mjs +24 -0
- package/dist/lib/browser/core/url-loader.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +86 -122
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/process-manager-capability-GXNUO7AR.mjs +132 -0
- package/dist/lib/browser/process-manager-capability-GXNUO7AR.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +316 -47
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/browser/testing/react.mjs +78 -0
- package/dist/lib/browser/testing/react.mjs.map +7 -0
- package/dist/lib/browser/ui/index.mjs +52 -0
- package/dist/lib/browser/ui/index.mjs.map +7 -0
- package/dist/lib/node-esm/capability-KZWRTX7R.mjs +36 -0
- package/dist/lib/node-esm/capability-KZWRTX7R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-37Z53PXZ.mjs +10 -0
- package/dist/lib/node-esm/chunk-37Z53PXZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-A5CHGAZE.mjs +588 -0
- package/dist/lib/node-esm/chunk-A5CHGAZE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-COHOWGGJ.mjs +144 -0
- package/dist/lib/node-esm/chunk-COHOWGGJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CTKEZHKF.mjs +84 -0
- package/dist/lib/node-esm/chunk-CTKEZHKF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FPW45EZH.mjs +14 -0
- package/dist/lib/node-esm/chunk-FPW45EZH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FSVGKTF6.mjs +477 -0
- package/dist/lib/node-esm/chunk-FSVGKTF6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KFZEB6BV.mjs +29 -0
- package/dist/lib/node-esm/chunk-KFZEB6BV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NULBHQYS.mjs +96 -0
- package/dist/lib/node-esm/chunk-NULBHQYS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SX5NVETP.mjs +1472 -0
- package/dist/lib/node-esm/chunk-SX5NVETP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XGBUKRCK.mjs +423 -0
- package/dist/lib/node-esm/chunk-XGBUKRCK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XIGPWXCQ.mjs +228 -0
- package/dist/lib/node-esm/chunk-XIGPWXCQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs +49 -0
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +75 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/common/activation-events.mjs +21 -0
- package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
- package/dist/lib/node-esm/common/capabilities.mjs +57 -0
- package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
- package/dist/lib/node-esm/core/activation-event.mjs +21 -0
- package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
- package/dist/lib/node-esm/core/capability.mjs +33 -0
- package/dist/lib/node-esm/core/capability.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs +20 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin.mjs +42 -0
- package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/core/url-loader.mjs +25 -0
- package/dist/lib/node-esm/core/url-loader.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +86 -122
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/process-manager-capability-TX5TA6YN.mjs +133 -0
- package/dist/lib/node-esm/process-manager-capability-TX5TA6YN.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +316 -47
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/testing/react.mjs +79 -0
- package/dist/lib/node-esm/testing/react.mjs.map +7 -0
- package/dist/lib/node-esm/ui/index.mjs +53 -0
- package/dist/lib/node-esm/ui/index.mjs.map +7 -0
- package/dist/plugin/node-esm/index.mjs +977 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/cli/cli.d.ts +37 -0
- package/dist/types/src/cli/cli.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/common/activation-events.d.ts +24 -0
- package/dist/types/src/common/activation-events.d.ts.map +1 -0
- package/dist/types/src/common/annotations.d.ts +1 -0
- package/dist/types/src/common/annotations.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +214 -193
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +3 -8
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +7 -7
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/context.d.ts +5 -0
- package/dist/types/src/context.d.ts.map +1 -0
- package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +11 -11
- package/dist/types/src/core/activation-event.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.d.ts +52 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.test.d.ts +2 -0
- package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/capability.d.ts +161 -0
- package/dist/types/src/core/capability.d.ts.map +1 -0
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +11 -4
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
- package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.d.ts +297 -0
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manifest.d.ts +101 -0
- package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +303 -43
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/registry.d.ts +107 -0
- package/dist/types/src/core/registry.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.d.ts +127 -0
- package/dist/types/src/core/url-loader.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.test.d.ts +2 -0
- package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
- package/dist/types/src/helpers.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts +3 -0
- package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/capability.d.ts +7 -0
- package/dist/types/src/plugin-process-manager/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/errors.d.ts +32 -0
- package/dist/types/src/plugin-process-manager/history/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/history-tracker.d.ts +32 -0
- package/dist/types/src/plugin-process-manager/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/history-tracker.test.d.ts +2 -0
- package/dist/types/src/plugin-process-manager/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/index.d.ts +6 -0
- package/dist/types/src/plugin-process-manager/history/index.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/types.d.ts +13 -0
- package/dist/types/src/plugin-process-manager/history/types.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/undo-mapping.d.ts +101 -0
- package/dist/types/src/plugin-process-manager/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/undo-registry.d.ts +23 -0
- package/dist/types/src/plugin-process-manager/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/undo-registry.test.d.ts +2 -0
- package/dist/types/src/plugin-process-manager/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/idb-key-value-store.d.ts +10 -0
- package/dist/types/src/plugin-process-manager/idb-key-value-store.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/index.d.ts +3 -0
- package/dist/types/src/plugin-process-manager/index.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/meta.d.ts +3 -0
- package/dist/types/src/plugin-process-manager/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts +8 -0
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/testing.d.ts +59 -0
- package/dist/types/src/plugin-process-manager/testing.d.ts.map +1 -0
- package/dist/types/src/testing/harness.d.ts +79 -0
- package/dist/types/src/testing/harness.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/operationCapture.d.ts +64 -0
- package/dist/types/src/testing/operationCapture.d.ts.map +1 -0
- package/dist/types/src/testing/react.d.ts +27 -0
- package/dist/types/src/testing/react.d.ts.map +1 -0
- package/dist/types/src/testing/react.test.d.ts +2 -0
- package/dist/types/src/testing/react.test.d.ts.map +1 -0
- package/dist/types/src/testing/service.d.ts +8 -0
- package/dist/types/src/testing/service.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +4 -4
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +41 -0
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts +19 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/index.d.ts +2 -0
- package/dist/types/src/ui/components/App/index.d.ts.map +1 -0
- package/dist/types/src/{react/Surface.stories.d.ts → ui/components/PluginManager/PluginManagerContext.stories.d.ts} +2 -3
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +10 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/{react/App.stories.d.ts → ui/components/Surface/SurfaceComponent.stories.d.ts} +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +11 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/context.d.ts +5 -0
- package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +4 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/index.d.ts +7 -0
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useApp.d.ts +80 -0
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts +31 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
- package/dist/types/src/{react → ui/hooks}/useLoading.d.ts +1 -2
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts +30 -0
- package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts +10 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
- package/dist/types/src/ui/index.d.ts +3 -0
- package/dist/types/src/ui/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +2 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +59 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +5 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/packages.d.ts +13 -0
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +25 -6
- package/package.json +125 -59
- package/src/cli/cli.ts +102 -0
- package/src/{playground/debug → cli}/index.ts +1 -1
- package/src/common/activation-events.ts +39 -0
- package/src/{playground/logger/index.ts → common/annotations.ts} +0 -2
- package/src/common/capabilities.ts +287 -192
- package/src/common/index.ts +3 -8
- package/src/common/translations.ts +17 -9
- package/src/context.ts +9 -0
- package/src/core/{events.ts → activation-event.ts} +10 -7
- package/src/core/capability-manager.test.ts +154 -0
- package/src/core/capability-manager.ts +213 -0
- package/src/core/capability.ts +254 -0
- package/src/core/edge-registry-plugin-provider.ts +92 -0
- package/src/core/index.ts +11 -4
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +1929 -0
- package/src/core/plugin-manager.ts +1696 -0
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +449 -48
- package/src/core/registry.ts +163 -0
- package/src/core/url-loader.test.ts +222 -0
- package/src/core/url-loader.ts +388 -0
- package/src/index.ts +2 -2
- package/src/plugin-process-manager/ProcessManagerPlugin.ts +24 -0
- package/src/plugin-process-manager/history/capability.ts +36 -0
- package/src/plugin-process-manager/history/errors.ts +7 -0
- package/src/plugin-process-manager/history/history-tracker.test.ts +353 -0
- package/src/plugin-process-manager/history/history-tracker.ts +144 -0
- package/src/plugin-process-manager/history/index.ts +9 -0
- package/src/plugin-process-manager/history/types.ts +17 -0
- package/src/plugin-process-manager/history/undo-mapping.ts +135 -0
- package/src/plugin-process-manager/history/undo-registry.test.ts +74 -0
- package/src/plugin-process-manager/history/undo-registry.ts +54 -0
- package/src/plugin-process-manager/idb-key-value-store.ts +64 -0
- package/src/plugin-process-manager/index.ts +6 -0
- package/src/plugin-process-manager/meta.ts +16 -0
- package/src/plugin-process-manager/process-manager-capability.ts +178 -0
- package/src/plugin-process-manager/testing.ts +156 -0
- package/src/testing/harness.ts +247 -0
- package/src/testing/index.ts +3 -0
- package/src/testing/operationCapture.ts +144 -0
- package/src/testing/react.test.tsx +50 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +52 -0
- package/src/testing/withPluginManager.stories.tsx +8 -9
- package/src/testing/withPluginManager.tsx +69 -42
- package/src/ui/components/App/App.stories.tsx +84 -0
- package/src/ui/components/App/App.tsx +144 -0
- package/src/{playground/layout → ui/components/App}/index.ts +1 -1
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +179 -0
- package/src/{react → ui/components/PluginManager}/PluginManagerProvider.ts +3 -3
- package/src/ui/components/PluginManager/index.ts +5 -0
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +144 -0
- package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
- package/src/ui/components/Surface/SurfaceInfo.tsx +106 -0
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/context.ts +12 -0
- package/src/ui/components/Surface/index.ts +54 -0
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +290 -0
- package/src/ui/components/index.ts +7 -0
- package/src/ui/hooks/index.ts +10 -0
- package/src/ui/hooks/useApp.test.tsx +161 -0
- package/src/ui/hooks/useApp.tsx +404 -0
- package/src/ui/hooks/useCapabilities.ts +68 -0
- package/src/{react → ui/hooks}/useLoading.tsx +16 -10
- package/src/ui/hooks/useProcessManagerRuntime.ts +78 -0
- package/src/ui/hooks/useSettingsState.ts +26 -0
- package/src/ui/hooks/useSurface.ts +13 -0
- package/src/ui/index.ts +6 -0
- package/src/vite-plugin/boot-loader/BootLoader.solid-stories.tsx +198 -0
- package/src/vite-plugin/boot-loader/index.ts +5 -0
- package/src/vite-plugin/boot-loader/loader-app/Loader.tsx +166 -0
- package/src/vite-plugin/boot-loader/loader-app/boot-loader.css +311 -0
- package/src/vite-plugin/boot-loader/loader-app/bridge.ts +25 -0
- package/src/vite-plugin/boot-loader/loader-app/entry.tsx +21 -0
- package/src/vite-plugin/boot-loader/loader-app/mount.tsx +70 -0
- package/src/vite-plugin/boot-loader/loader-app/store.test.ts +137 -0
- package/src/vite-plugin/boot-loader/loader-app/store.ts +149 -0
- package/src/vite-plugin/boot-loader/loader-app/tsconfig.json +11 -0
- package/src/vite-plugin/boot-loader/loader-app/types.ts +78 -0
- package/src/vite-plugin/boot-loader/loader.ts +204 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +527 -0
- package/src/vite-plugin/index.ts +10 -0
- package/src/vite-plugin/manifest.test.ts +55 -0
- package/src/vite-plugin/manifest.ts +63 -0
- package/src/vite-plugin/packages.ts +187 -0
- package/tsconfig.json +27 -22
- package/tsconfig.node.json +2 -4
- package/typedoc.json +2 -4
- package/vitest.config.ts +1 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/.swc/plugins/linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7 +0 -0
- package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs +0 -138
- package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs.map +0 -7
- package/dist/lib/browser/chunk-6XKO24JP.mjs +0 -483
- package/dist/lib/browser/chunk-6XKO24JP.mjs.map +0 -7
- package/dist/lib/browser/chunk-SCPE4ZO2.mjs +0 -35
- package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +0 -7
- package/dist/lib/browser/chunk-WPW5VVAX.mjs +0 -1651
- package/dist/lib/browser/chunk-WPW5VVAX.mjs.map +0 -7
- package/dist/lib/browser/intent-dispatcher-LZ4AE66E.mjs +0 -11
- package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs +0 -39
- package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs.map +0 -7
- package/dist/lib/browser/react/index.mjs +0 -34
- package/dist/lib/browser/store-CNPHOYTJ.mjs +0 -30
- package/dist/lib/browser/store-CNPHOYTJ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs +0 -139
- package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3UPX5OIS.mjs +0 -484
- package/dist/lib/node-esm/chunk-3UPX5OIS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs +0 -1653
- package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZX63QUGE.mjs +0 -37
- package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +0 -7
- package/dist/lib/node-esm/intent-dispatcher-MGOJ3CHD.mjs +0 -12
- package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs +0 -40
- package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs.map +0 -7
- package/dist/lib/node-esm/react/index.mjs +0 -35
- package/dist/lib/node-esm/store-RK5B4XEL.mjs +0 -31
- package/dist/lib/node-esm/store-RK5B4XEL.mjs.map +0 -7
- package/dist/types/src/common/collaboration.d.ts +0 -20
- package/dist/types/src/common/collaboration.d.ts.map +0 -1
- package/dist/types/src/common/events.d.ts +0 -52
- package/dist/types/src/common/events.d.ts.map +0 -1
- package/dist/types/src/common/file.d.ts +0 -14
- package/dist/types/src/common/file.d.ts.map +0 -1
- package/dist/types/src/common/graph.d.ts +0 -21
- package/dist/types/src/common/graph.d.ts.map +0 -1
- package/dist/types/src/common/layout.d.ts +0 -279
- package/dist/types/src/common/layout.d.ts.map +0 -1
- package/dist/types/src/common/surface.d.ts +0 -68
- package/dist/types/src/common/surface.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.d.ts +0 -117
- package/dist/types/src/core/capabilities.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.test.d.ts +0 -2
- package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
- package/dist/types/src/core/events.d.ts.map +0 -1
- package/dist/types/src/core/manager.d.ts +0 -126
- package/dist/types/src/core/manager.d.ts.map +0 -1
- package/dist/types/src/core/manager.test.d.ts +0 -2
- package/dist/types/src/core/manager.test.d.ts.map +0 -1
- package/dist/types/src/playground/debug/Debug.d.ts +0 -6
- package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
- package/dist/types/src/playground/debug/index.d.ts +0 -2
- package/dist/types/src/playground/debug/index.d.ts.map +0 -1
- package/dist/types/src/playground/debug/plugin.d.ts +0 -2
- package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Main.d.ts +0 -6
- package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/generator/generator.d.ts +0 -7
- package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
- package/dist/types/src/playground/generator/index.d.ts +0 -3
- package/dist/types/src/playground/generator/index.d.ts.map +0 -1
- package/dist/types/src/playground/generator/plugin.d.ts +0 -2
- package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/layout/Layout.d.ts +0 -8
- package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
- package/dist/types/src/playground/layout/index.d.ts +0 -2
- package/dist/types/src/playground/layout/index.d.ts.map +0 -1
- package/dist/types/src/playground/layout/plugin.d.ts +0 -2
- package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/logger/index.d.ts +0 -2
- package/dist/types/src/playground/logger/index.d.ts.map +0 -1
- package/dist/types/src/playground/logger/plugin.d.ts +0 -2
- package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/schema.d.ts +0 -13
- package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
- package/dist/types/src/playground/playground.stories.d.ts +0 -11
- package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/actions.d.ts +0 -36
- package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/errors.d.ts +0 -16
- package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/index.d.ts +0 -6
- package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent.d.ts +0 -63
- package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/meta.d.ts +0 -3
- package/dist/types/src/plugin-intent/meta.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -2
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/actions.d.ts +0 -25
- package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -4
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/index.d.ts +0 -3
- package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/meta.d.ts +0 -3
- package/dist/types/src/plugin-settings/meta.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/store.d.ts +0 -5
- package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/translations.d.ts +0 -11
- package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
- package/dist/types/src/react/App.d.ts +0 -10
- package/dist/types/src/react/App.d.ts.map +0 -1
- package/dist/types/src/react/App.stories.d.ts.map +0 -1
- package/dist/types/src/react/DefaultFallback.d.ts +0 -8
- package/dist/types/src/react/DefaultFallback.d.ts.map +0 -1
- package/dist/types/src/react/ErrorBoundary.d.ts +0 -30
- package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/react/IntentContext.d.ts +0 -8
- package/dist/types/src/react/IntentContext.d.ts.map +0 -1
- package/dist/types/src/react/PluginManagerProvider.d.ts +0 -10
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
- package/dist/types/src/react/Surface.d.ts +0 -12
- package/dist/types/src/react/Surface.d.ts.map +0 -1
- package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
- package/dist/types/src/react/common.d.ts +0 -13
- package/dist/types/src/react/common.d.ts.map +0 -1
- package/dist/types/src/react/index.d.ts +0 -9
- package/dist/types/src/react/index.d.ts.map +0 -1
- package/dist/types/src/react/types.d.ts +0 -14
- package/dist/types/src/react/types.d.ts.map +0 -1
- package/dist/types/src/react/useApp.d.ts +0 -44
- package/dist/types/src/react/useApp.d.ts.map +0 -1
- package/dist/types/src/react/useCapabilities.d.ts +0 -13
- package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
- package/dist/types/src/react/useIntentResolver.d.ts +0 -3
- package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
- package/dist/types/src/react/useLoading.d.ts.map +0 -1
- package/src/common/collaboration.ts +0 -18
- package/src/common/events.ts +0 -79
- package/src/common/file.ts +0 -22
- package/src/common/graph.ts +0 -30
- package/src/common/layout.ts +0 -277
- package/src/common/surface.ts +0 -88
- package/src/core/capabilities.test.ts +0 -136
- package/src/core/capabilities.ts +0 -263
- package/src/core/manager.test.ts +0 -516
- package/src/core/manager.ts +0 -604
- package/src/playground/debug/Debug.tsx +0 -39
- package/src/playground/debug/plugin.ts +0 -16
- package/src/playground/generator/Main.tsx +0 -70
- package/src/playground/generator/Toolbar.tsx +0 -47
- package/src/playground/generator/generator.ts +0 -48
- package/src/playground/generator/index.ts +0 -6
- package/src/playground/generator/plugin.ts +0 -22
- package/src/playground/layout/Layout.tsx +0 -33
- package/src/playground/layout/plugin.ts +0 -18
- package/src/playground/logger/Toolbar.tsx +0 -30
- package/src/playground/logger/plugin.ts +0 -41
- package/src/playground/logger/schema.ts +0 -12
- package/src/playground/playground.stories.tsx +0 -46
- package/src/plugin-intent/IntentPlugin.ts +0 -20
- package/src/plugin-intent/actions.ts +0 -31
- package/src/plugin-intent/errors.ts +0 -40
- package/src/plugin-intent/index.ts +0 -9
- package/src/plugin-intent/intent-dispatcher.test.ts +0 -286
- package/src/plugin-intent/intent-dispatcher.ts +0 -342
- package/src/plugin-intent/intent.ts +0 -154
- package/src/plugin-intent/meta.ts +0 -10
- package/src/plugin-settings/SettingsPlugin.ts +0 -34
- package/src/plugin-settings/actions.ts +0 -25
- package/src/plugin-settings/app-graph-builder.ts +0 -160
- package/src/plugin-settings/index.ts +0 -6
- package/src/plugin-settings/intent-resolver.ts +0 -35
- package/src/plugin-settings/meta.ts +0 -10
- package/src/plugin-settings/store.ts +0 -33
- package/src/plugin-settings/translations.ts +0 -19
- package/src/react/App.stories.tsx +0 -33
- package/src/react/App.tsx +0 -59
- package/src/react/DefaultFallback.tsx +0 -26
- package/src/react/ErrorBoundary.tsx +0 -56
- package/src/react/IntentContext.tsx +0 -35
- package/src/react/Surface.stories.tsx +0 -125
- package/src/react/Surface.tsx +0 -109
- package/src/react/common.ts +0 -13
- package/src/react/index.ts +0 -14
- package/src/react/types.ts +0 -38
- package/src/react/useApp.tsx +0 -165
- package/src/react/useCapabilities.ts +0 -31
- package/src/react/useIntentResolver.ts +0 -22
- /package/dist/lib/browser/{intent-dispatcher-LZ4AE66E.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{react/index.mjs.map → common/activation-events.mjs.map} +0 -0
- /package/dist/lib/{node-esm/intent-dispatcher-MGOJ3CHD.mjs.map → browser/common/capabilities.mjs.map} +0 -0
- /package/dist/lib/{node-esm/react/index.mjs.map → browser/core/activation-event.mjs.map} +0 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getModuleTag
|
|
4
|
+
} from "./chunk-CTKEZHKF.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__export
|
|
7
|
+
} from "./chunk-HSLMI22Q.mjs";
|
|
8
|
+
|
|
9
|
+
// src/core/plugin.ts
|
|
10
|
+
var plugin_exports = {};
|
|
11
|
+
__export(plugin_exports, {
|
|
12
|
+
LazyPluginError: () => LazyPluginError,
|
|
13
|
+
PluginDependencyError: () => PluginDependencyError,
|
|
14
|
+
PluginModuleTypeId: () => PluginModuleTypeId,
|
|
15
|
+
PluginTypeId: () => PluginTypeId,
|
|
16
|
+
Service: () => Service,
|
|
17
|
+
activate: () => activate,
|
|
18
|
+
addModule: () => addModule,
|
|
19
|
+
define: () => define,
|
|
20
|
+
isLazy: () => isLazy,
|
|
21
|
+
isPlugin: () => isPlugin,
|
|
22
|
+
isPluginModule: () => isPluginModule,
|
|
23
|
+
lazy: () => lazy,
|
|
24
|
+
make: () => make,
|
|
25
|
+
makeMeta: () => makeMeta,
|
|
26
|
+
reset: () => reset,
|
|
27
|
+
resolveLazy: () => resolveLazy,
|
|
28
|
+
shutdown: () => shutdown
|
|
29
|
+
});
|
|
30
|
+
import * as Context from "effect/Context";
|
|
31
|
+
import * as Effect from "effect/Effect";
|
|
32
|
+
import * as Option from "effect/Option";
|
|
33
|
+
import * as Pipeable from "effect/Pipeable";
|
|
34
|
+
import { BaseError } from "@dxos/errors";
|
|
35
|
+
import { invariant } from "@dxos/invariant";
|
|
36
|
+
import { DXN } from "@dxos/keys";
|
|
37
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/app-framework/src/core/plugin.ts";
|
|
38
|
+
var Service = class extends Context.Tag("@dxos/app-framework/PluginManager")() {
|
|
39
|
+
};
|
|
40
|
+
var activate = (event) => Effect.flatMap(Service, (manager) => manager.activate(event));
|
|
41
|
+
var reset = (event) => Effect.flatMap(Service, (manager) => manager.reset(event));
|
|
42
|
+
var shutdown = () => Effect.flatMap(Service, (manager) => manager.shutdown());
|
|
43
|
+
var computeModuleId = (pluginId, moduleName) => {
|
|
44
|
+
return `${pluginId}.module.${moduleName}`;
|
|
45
|
+
};
|
|
46
|
+
var PluginModuleTypeId = /* @__PURE__ */ Symbol.for("@dxos/app-framework/PluginModule");
|
|
47
|
+
var isPluginModule = (value) => {
|
|
48
|
+
return typeof value === "object" && value !== null && PluginModuleTypeId in value;
|
|
49
|
+
};
|
|
50
|
+
var PluginModuleImpl = class {
|
|
51
|
+
[PluginModuleTypeId] = PluginModuleTypeId;
|
|
52
|
+
id;
|
|
53
|
+
activatesOn;
|
|
54
|
+
firesBeforeActivation;
|
|
55
|
+
firesAfterActivation;
|
|
56
|
+
activate;
|
|
57
|
+
constructor(options) {
|
|
58
|
+
this.id = options.id;
|
|
59
|
+
this.activatesOn = options.activatesOn;
|
|
60
|
+
this.firesBeforeActivation = options.firesBeforeActivation;
|
|
61
|
+
this.firesAfterActivation = options.firesAfterActivation;
|
|
62
|
+
this.activate = options.activate;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var makeMeta = (options) => ({
|
|
66
|
+
...options,
|
|
67
|
+
id: DXN.getName(options.key),
|
|
68
|
+
version: DXN.getVersion(options.key)
|
|
69
|
+
});
|
|
70
|
+
var PluginTypeId = /* @__PURE__ */ Symbol.for("@dxos/app-framework/Plugin");
|
|
71
|
+
var isPlugin = (value) => {
|
|
72
|
+
return typeof value === "object" && value !== null && PluginTypeId in value;
|
|
73
|
+
};
|
|
74
|
+
var PluginImpl = class {
|
|
75
|
+
_meta;
|
|
76
|
+
_modules;
|
|
77
|
+
[PluginTypeId] = PluginTypeId;
|
|
78
|
+
constructor(_meta, _modules) {
|
|
79
|
+
this._meta = _meta;
|
|
80
|
+
this._modules = _modules;
|
|
81
|
+
}
|
|
82
|
+
get meta() {
|
|
83
|
+
return this._meta;
|
|
84
|
+
}
|
|
85
|
+
get modules() {
|
|
86
|
+
return this._modules;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var PluginBuilderImpl = class {
|
|
90
|
+
meta;
|
|
91
|
+
_modules = [];
|
|
92
|
+
constructor(meta) {
|
|
93
|
+
this.meta = meta;
|
|
94
|
+
}
|
|
95
|
+
get modules() {
|
|
96
|
+
return this._modules;
|
|
97
|
+
}
|
|
98
|
+
addModule(moduleOptions) {
|
|
99
|
+
this._modules.push(moduleOptions);
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
pipe() {
|
|
103
|
+
return Pipeable.pipeArguments(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var define = (meta) => new PluginBuilderImpl(meta);
|
|
107
|
+
function addModule(moduleOptionsOrBuilder, moduleOptions) {
|
|
108
|
+
if (moduleOptions !== void 0) {
|
|
109
|
+
return moduleOptionsOrBuilder.addModule(moduleOptions);
|
|
110
|
+
}
|
|
111
|
+
const moduleOpts = moduleOptionsOrBuilder;
|
|
112
|
+
return (builder) => builder.addModule(moduleOpts);
|
|
113
|
+
}
|
|
114
|
+
var resolveModule = (meta, module, options) => {
|
|
115
|
+
const moduleOptions = typeof module === "function" ? module(options) : module;
|
|
116
|
+
const pluginName = meta.id;
|
|
117
|
+
const id = Option.fromNullable(moduleOptions.id).pipe(Option.match({
|
|
118
|
+
onNone: () => {
|
|
119
|
+
const exportName = getModuleTag(moduleOptions.activate);
|
|
120
|
+
invariant(exportName, `Plugin module missing name. Plugin: ${meta.id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 148, S: void 0, A: ["exportName", "`Plugin module missing name. Plugin: ${meta.id}`"] });
|
|
121
|
+
return computeModuleId(pluginName, exportName);
|
|
122
|
+
},
|
|
123
|
+
onSome: (id2) => computeModuleId(pluginName, id2)
|
|
124
|
+
}));
|
|
125
|
+
return new PluginModuleImpl({
|
|
126
|
+
...moduleOptions,
|
|
127
|
+
id
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
function make(builder) {
|
|
131
|
+
const meta = builder.meta;
|
|
132
|
+
invariant(!meta.dependsOn?.includes(meta.id), `Plugin ${meta.id} declares itself as a dependency.`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 161, S: this, A: ["!meta.dependsOn?.includes(meta.id)", "`Plugin ${meta.id} declares itself as a dependency.`"] });
|
|
133
|
+
const factory = (options) => {
|
|
134
|
+
const modules = builder.modules.map((module) => resolveModule(meta, module, options));
|
|
135
|
+
return new PluginImpl(meta, modules);
|
|
136
|
+
};
|
|
137
|
+
return Object.assign(factory, {
|
|
138
|
+
meta
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
var LazyTag = /* @__PURE__ */ Symbol.for("@dxos/app-framework/Plugin/Lazy");
|
|
142
|
+
var lazy = (meta, loader) => {
|
|
143
|
+
const factory = (options) => {
|
|
144
|
+
const stub = new PluginImpl(meta, []);
|
|
145
|
+
Object.defineProperty(stub, LazyTag, {
|
|
146
|
+
value: {
|
|
147
|
+
loader,
|
|
148
|
+
options
|
|
149
|
+
},
|
|
150
|
+
enumerable: false
|
|
151
|
+
});
|
|
152
|
+
return stub;
|
|
153
|
+
};
|
|
154
|
+
return Object.assign(factory, {
|
|
155
|
+
meta
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
var isLazy = (plugin) => LazyTag in plugin;
|
|
159
|
+
var LazyPluginError = class extends BaseError.extend("LazyPluginError", "Failed to resolve lazy plugin") {
|
|
160
|
+
};
|
|
161
|
+
var PluginDependencyError = class extends BaseError.extend("PluginDependencyError", "Plugin dependency resolution failed") {
|
|
162
|
+
};
|
|
163
|
+
var resolveLazy = (plugin) => Effect.gen(function* () {
|
|
164
|
+
if (!isLazy(plugin)) {
|
|
165
|
+
return plugin;
|
|
166
|
+
}
|
|
167
|
+
const id = plugin.meta.id;
|
|
168
|
+
const { loader, options } = plugin[LazyTag];
|
|
169
|
+
const mod = yield* Effect.tryPromise({
|
|
170
|
+
try: loader,
|
|
171
|
+
catch: (error) => new LazyPluginError({
|
|
172
|
+
context: {
|
|
173
|
+
id,
|
|
174
|
+
reason: "load-failed"
|
|
175
|
+
},
|
|
176
|
+
cause: error
|
|
177
|
+
})
|
|
178
|
+
});
|
|
179
|
+
if (!mod || typeof mod.default !== "function") {
|
|
180
|
+
return yield* Effect.fail(new LazyPluginError({
|
|
181
|
+
context: {
|
|
182
|
+
id,
|
|
183
|
+
reason: "missing-default"
|
|
184
|
+
}
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
const result = mod.default(options);
|
|
188
|
+
if (!isPlugin(result)) {
|
|
189
|
+
return yield* Effect.fail(new LazyPluginError({
|
|
190
|
+
context: {
|
|
191
|
+
id,
|
|
192
|
+
reason: "invalid-plugin"
|
|
193
|
+
}
|
|
194
|
+
}));
|
|
195
|
+
}
|
|
196
|
+
if (result.meta.id !== id) {
|
|
197
|
+
return yield* Effect.fail(new LazyPluginError({
|
|
198
|
+
context: {
|
|
199
|
+
id,
|
|
200
|
+
reason: "meta-mismatch",
|
|
201
|
+
returnedId: result.meta.id
|
|
202
|
+
}
|
|
203
|
+
}));
|
|
204
|
+
}
|
|
205
|
+
return result;
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
export {
|
|
209
|
+
Service,
|
|
210
|
+
activate,
|
|
211
|
+
reset,
|
|
212
|
+
shutdown,
|
|
213
|
+
PluginModuleTypeId,
|
|
214
|
+
isPluginModule,
|
|
215
|
+
makeMeta,
|
|
216
|
+
PluginTypeId,
|
|
217
|
+
isPlugin,
|
|
218
|
+
define,
|
|
219
|
+
addModule,
|
|
220
|
+
make,
|
|
221
|
+
lazy,
|
|
222
|
+
isLazy,
|
|
223
|
+
LazyPluginError,
|
|
224
|
+
PluginDependencyError,
|
|
225
|
+
resolveLazy,
|
|
226
|
+
plugin_exports
|
|
227
|
+
};
|
|
228
|
+
//# sourceMappingURL=chunk-XIGPWXCQ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/core/plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport * as Pipeable from 'effect/Pipeable';\n\nimport { BaseError } from '@dxos/errors';\nimport { invariant } from '@dxos/invariant';\nimport { DXN } from '@dxos/keys';\n\nimport type * as ActivationEvent from './activation-event';\nimport * as Capability from './capability';\nimport type * as PluginManager from './plugin-manager';\n\n//\n// Plugin Service Layer\n//\n\n/**\n * Effect Context.Tag for accessing PluginManager via the Effect layer system.\n * This allows lifecycle operations to access the plugin manager without having it passed as an argument.\n */\nexport class Service extends Context.Tag('@dxos/app-framework/PluginManager')<Service, PluginManager.PluginManager>() {}\n\n//\n// Lifecycle Functions\n//\n\n/**\n * Activates plugins based on the activation event.\n * Accesses the PluginManager via the Effect layer system.\n * @param event The activation event.\n * @returns Whether the activation was successful.\n */\nexport const activate = (event: ActivationEvent.ActivationEvent): Effect.Effect<boolean, Error, Service> =>\n Effect.flatMap(Service, (manager) => manager.activate(event));\n\n/**\n * Re-activates the modules that were activated by the event.\n * Accesses the PluginManager via the Effect layer system.\n * @param event The activation event.\n * @returns Whether the reset was successful.\n */\nexport const reset = (event: ActivationEvent.ActivationEvent): Effect.Effect<boolean, Error, Service> =>\n Effect.flatMap(Service, (manager) => manager.reset(event));\n\n/**\n * Shuts down the plugin manager, deactivating all active modules and clearing lifecycle state.\n * Accesses the PluginManager via the Effect layer system.\n */\nexport const shutdown = (): Effect.Effect<boolean, Error, Service> =>\n Effect.flatMap(Service, (manager) => manager.shutdown());\n\n/**\n * Computes a module ID from plugin ID and export name.\n */\nconst computeModuleId = (pluginId: string, moduleName: string): string => {\n return `${pluginId}.module.${moduleName}`;\n};\n\n/**\n * Identifier denoting a PluginModule.\n */\nexport const PluginModuleTypeId: unique symbol = Symbol.for('@dxos/app-framework/PluginModule');\nexport type PluginModuleTypeId = typeof PluginModuleTypeId;\n\n/**\n * Type guard to check if a value is a PluginModule.\n */\nexport const isPluginModule = (value: unknown): value is PluginModule => {\n return typeof value === 'object' && value !== null && PluginModuleTypeId in value;\n};\n\n/**\n * A unit of containment of modular functionality that can be provided to an application.\n * Activation of a module is async allowing for code to split and loaded lazily.\n */\nexport interface PluginModule {\n readonly [PluginModuleTypeId]: PluginModuleTypeId;\n /**\n * Unique id of the module.\n */\n id: string;\n\n /**\n * Events for which the module will be activated.\n */\n activatesOn: ActivationEvent.Events;\n\n /**\n * Events that this module fires *before* its own activation runs.\n *\n * When this module is asked to activate (via {@link activatesOn}), the\n * plugin manager first activates every event listed here, ensuring any\n * other modules that contribute to those events have completed before\n * this module's {@link activate} body executes. These events are fired\n * by the framework on this module's behalf — the module does not need\n * to wait for some other code to fire them.\n *\n * The module is marked as needing reset if a module activated by one\n * of these events is later removed.\n *\n * Read as: \"this module fires these events before [its] activation\".\n */\n firesBeforeActivation?: ActivationEvent.ActivationEvent[];\n\n /**\n * Events that this module fires *after* its own activation completes.\n *\n * Once this module's {@link activate} body has finished executing, the\n * plugin manager activates every event listed here, causing any modules\n * listening on those events to run. These events are fired by the\n * framework on this module's behalf as part of this module's lifecycle.\n *\n * Read as: \"this module fires these events after [its] activation\".\n */\n firesAfterActivation?: ActivationEvent.ActivationEvent[];\n\n /**\n * Called when the module is activated.\n * CapabilityManager is accessed via the Effect layer system (Capability.Service).\n * PluginManager is accessed via Plugin.Service.\n * @param props Optional props passed to the module.\n * @returns The capabilities of the module.\n */\n activate: (props?: any) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service | Service | never>;\n}\n\nexport type PluginModuleOptions = Omit<PluginModule, 'id' | typeof PluginModuleTypeId> & { id?: string };\n\nclass PluginModuleImpl implements PluginModule {\n readonly [PluginModuleTypeId]: PluginModuleTypeId = PluginModuleTypeId;\n readonly id: PluginModule['id'];\n readonly activatesOn: PluginModule['activatesOn'];\n readonly firesBeforeActivation?: PluginModule['firesBeforeActivation'];\n readonly firesAfterActivation?: PluginModule['firesAfterActivation'];\n readonly activate: PluginModule['activate'];\n\n constructor(options: Omit<PluginModule, typeof PluginModuleTypeId>) {\n this.id = options.id;\n this.activatesOn = options.activatesOn;\n this.firesBeforeActivation = options.firesBeforeActivation;\n this.firesAfterActivation = options.firesAfterActivation;\n this.activate = options.activate;\n }\n}\n\nexport type Meta = {\n /**\n * Bare NSID (the name portion of {@link key}, e.g. `org.dxos.plugin.example`).\n * Stable across versions; used for module-id namespacing, i18n namespaces,\n * enable/disable, and registry lookups. Derived from `key` by {@link makeMeta} —\n * do not set directly.\n */\n id: string;\n\n /**\n * Canonical identity DXN, including version when published\n * (e.g. `dxn:org.dxos.plugin.example:0.8.3`). The validated source of truth\n * from which {@link id} and {@link version} are derived.\n *\n * @example DXN.make('org.dxos.plugin.example', '0.8.3')\n */\n key: DXN.DXN;\n\n /**\n * Human-readable name.\n */\n name: string;\n\n /**\n * Semver version string of the plugin, typically the publishing package's\n * `package.json` version. Derived from the version segment of {@link key} by\n * {@link makeMeta} — do not set directly.\n */\n version?: string;\n\n /**\n * Short description of plugin functionality.\n */\n description?: string;\n\n /**\n * Name of the author or organization that created the plugin.\n */\n // TODO(burdon): DID or domain name?\n author?: string;\n\n /**\n * URL of home page.\n */\n homePage?: string;\n\n /**\n * URL of source code.\n */\n source?: string;\n\n /**\n * Relative path (inside the published package) to the plugin's bundled MDL\n * specification file — e.g. `'PLUGIN.mdl'` or `'docs/PLUGIN.mdl'`. The file\n * is shipped via the package's `files` entry and resolved by registry\n * surfaces to render an in-app viewer and/or external link.\n */\n spec?: string;\n\n /**\n * URL of screenshot.\n */\n screenshots?: string[];\n\n /**\n * Tags to help categorize the plugin.\n */\n tags?: string[];\n\n /**\n * A grep-able symbol string which can be resolved to an icon asset by @ch-ui/icons, via @ch-ui/vite-plugin-icons.\n */\n icon?: string;\n\n /**\n * Icon hue (ChromaticPalette).\n */\n iconHue?: string;\n\n /**\n * IDs of plugins this plugin functionally depends on.\n *\n * Treated as a convenience by the default `PluginManager` flow:\n * - Enabling this plugin auto-enables the transitive closure of `dependsOn`\n * (installing missing entries from the plugin registry when possible).\n * - Disabling a depended-upon plugin surfaces dependents to the caller; the\n * `PluginManager.disable` API supports an opt-in cascade.\n *\n * Not an invariant: low-level `PluginManager` APIs accept opt-outs\n * (`resolveDependencies: false`, `ignoreDependents: true`) so a caller may\n * substitute an alternative implementation that satisfies the dependent's\n * capability needs in its own way.\n */\n dependsOn?: string[];\n};\n\n/**\n * Options for {@link makeMeta}: a {@link Meta} minus the fields derived from `key`.\n * Identity and version are specified solely through the `key` DXN — `id` and\n * `version` cannot be passed directly.\n */\nexport type MakeMetaOptions = Omit<Meta, 'id' | 'version'>;\n\n/**\n * Constructs a plugin {@link Meta} from a single canonical DXN. The `key` DXN is\n * the one source of truth; `id` (bare NSID) and `version` (semver) are derived\n * from it so each datum has exactly one home and cannot drift out of sync.\n *\n * @example\n * export const meta = Plugin.makeMeta({\n * key: DXN.make('org.dxos.plugin.example', '0.8.3'),\n * name: 'Example',\n * });\n */\nexport const makeMeta = (options: MakeMetaOptions): Meta => ({\n ...options,\n id: DXN.getName(options.key),\n version: DXN.getVersion(options.key),\n});\n\n/**\n * Identifier denoting a Plugin.\n */\nexport const PluginTypeId: unique symbol = Symbol.for('@dxos/app-framework/Plugin');\nexport type PluginTypeId = typeof PluginTypeId;\n\n/**\n * Type guard to check if a value is a Plugin.\n */\nexport const isPlugin = (value: unknown): value is Plugin => {\n return typeof value === 'object' && value !== null && PluginTypeId in value;\n};\n\n/**\n * A collection of modules that are be enabled/disabled as a unit.\n * Plugins provide things such as components, state, actions, etc. to the application.\n */\n// TODO(burdon): Convert to ECHO schema.\nexport interface Plugin {\n readonly [PluginTypeId]: PluginTypeId;\n readonly meta: Readonly<Meta>;\n readonly modules: ReadonlyArray<PluginModule>;\n}\n\n/**\n * Internal implementation of Plugin.\n * @internal\n */\nclass PluginImpl implements Plugin {\n readonly [PluginTypeId]: PluginTypeId = PluginTypeId;\n\n constructor(\n private readonly _meta: Meta,\n private readonly _modules: PluginModule[],\n ) {}\n\n get meta(): Readonly<Meta> {\n return this._meta;\n }\n\n get modules(): ReadonlyArray<PluginModule> {\n return this._modules;\n }\n}\n\n/**\n * Builder interface for creating plugins incrementally.\n */\nexport interface PluginBuilder<T = void> extends Pipeable.Pipeable {\n readonly meta: Meta;\n readonly modules: ReadonlyArray<PluginModuleOptions | ((options: T) => PluginModuleOptions)>;\n addModule(moduleOptions: PluginModuleOptions | ((options: T) => PluginModuleOptions)): PluginBuilder<T>;\n}\n\n/**\n * Builder implementation for creating plugins incrementally.\n */\nclass PluginBuilderImpl<T = void> implements PluginBuilder<T> {\n readonly meta: Meta;\n private readonly _modules: Array<PluginModuleOptions | ((options: T) => PluginModuleOptions)> = [];\n\n constructor(meta: Meta) {\n this.meta = meta;\n }\n\n get modules(): ReadonlyArray<PluginModuleOptions | ((options: T) => PluginModuleOptions)> {\n return this._modules;\n }\n\n addModule(moduleOptions: PluginModuleOptions | ((options: T) => PluginModuleOptions)): PluginBuilder<T> {\n this._modules.push(moduleOptions);\n return this;\n }\n\n pipe() {\n // eslint-disable-next-line prefer-rest-params\n return Pipeable.pipeArguments(this, arguments);\n }\n}\n\n/**\n * Creates a new PluginBuilder to start building a plugin.\n */\nexport const define = <T = void>(meta: Meta): PluginBuilder<T> => new PluginBuilderImpl<T>(meta);\n\n/**\n * Adds a module to a plugin builder.\n * Supports both pipeline and direct call styles.\n * Modules can be either PluginModuleOptions or functions that receive options.\n */\nexport function addModule<T>(\n moduleOptions: PluginModuleOptions | ((options: T) => PluginModuleOptions),\n): (builder: PluginBuilder<T>) => PluginBuilder<T>;\nexport function addModule<T>(\n builder: PluginBuilder<T>,\n moduleOptions: PluginModuleOptions | ((options: T) => PluginModuleOptions),\n): PluginBuilder<T>;\nexport function addModule<T>(\n moduleOptionsOrBuilder: PluginModuleOptions | ((options: T) => PluginModuleOptions) | PluginBuilder<T>,\n moduleOptions?: PluginModuleOptions | ((options: T) => PluginModuleOptions),\n): ((builder: PluginBuilder<T>) => PluginBuilder<T>) | PluginBuilder<T> {\n // If second arg is provided, it's the direct call style: addModule(builder, moduleOptions)\n if (moduleOptions !== undefined) {\n return (moduleOptionsOrBuilder as PluginBuilder<T>).addModule(moduleOptions);\n }\n // Otherwise it's pipeline style: addModule(moduleOptions) returns a function\n const moduleOpts = moduleOptionsOrBuilder as PluginModuleOptions | ((options: T) => PluginModuleOptions);\n return (builder: PluginBuilder<T>) => builder.addModule(moduleOpts);\n}\n\nexport type PluginFactory<T = void> = ((options: T) => Plugin) & { meta: Meta };\n\n/**\n * Resolves a module from either PluginModuleOptions or a function that returns PluginModuleOptions.\n */\nconst resolveModule = (\n meta: Meta,\n module: PluginModuleOptions | ((options: any) => PluginModuleOptions),\n options?: any,\n): PluginModuleImpl => {\n const moduleOptions = typeof module === 'function' ? module(options) : module;\n const pluginName = meta.id;\n const id = Option.fromNullable(moduleOptions.id).pipe(\n Option.match({\n onNone: () => {\n const exportName = Capability.getModuleTag(moduleOptions.activate);\n invariant(exportName, `Plugin module missing name. Plugin: ${meta.id}`);\n return computeModuleId(pluginName, exportName);\n },\n onSome: (id) => computeModuleId(pluginName, id),\n }),\n );\n return new PluginModuleImpl({ ...moduleOptions, id });\n};\n\n/**\n * Creates a Plugin from a builder.\n * Supports both pipeline and direct call styles.\n * Always returns a factory function (options: T) => Plugin.\n * When T is void, the function takes no arguments: () => Plugin.\n */\nexport function make<T>(builder: PluginBuilder<T>): PluginFactory<T>;\nexport function make<T>(builder: PluginBuilder<T>): PluginFactory<T> {\n const meta = builder.meta;\n // `dependsOn` entries and `id` are both bare NSIDs, so compare directly.\n invariant(!meta.dependsOn?.includes(meta.id), `Plugin ${meta.id} declares itself as a dependency.`);\n\n const factory = (options: T) => {\n const modules = builder.modules.map((module) => resolveModule(meta, module, options));\n return new PluginImpl(meta, modules);\n };\n\n return Object.assign(factory, { meta });\n}\n\n//\n// Lazy plugin loading\n//\n\n/**\n * Symbol used to tag lazy plugin stubs with their loader closure.\n * Hidden from enumeration so plugin manager iteration / serialization paths\n * don't trip over it.\n */\nconst LazyTag: unique symbol = Symbol.for('@dxos/app-framework/Plugin/Lazy');\n\n/**\n * Async loader for a lazy plugin's real implementation.\n * The default export of the loaded module must be a `PluginFactory<T>` —\n * i.e. the same shape `Plugin.make` produces.\n */\nexport type LazyLoader<T = void> = () => Promise<{ default: PluginFactory<T> }>;\n\n/** Internal: payload carried on a lazy stub. */\ntype LazyPayload = { loader: LazyLoader<any>; options: unknown };\n\n/**\n * Defines a lazy plugin whose body is loaded on first enable.\n *\n * The returned factory produces a stub `Plugin` that exposes `meta`\n * synchronously (so callers can read `Plugin.meta.id` for free) but defers\n * loading the real plugin's modules until the manager calls\n * `Plugin.resolveLazy`. This lets the plugin's main entry point ship as a\n * tiny meta-only chunk — the heavy capabilities, schema, React surfaces,\n * etc. live behind the dynamic `import()` and become a separate Rollup\n * chunk that is only fetched when the plugin is enabled.\n *\n * @example\n * ```ts\n * // plugin-markdown/src/index.ts\n * import { Plugin } from '@dxos/app-framework';\n * import { meta } from './meta';\n *\n * export const MarkdownPlugin = Plugin.lazy(meta, () => import('./MarkdownPlugin'));\n *\n * // plugin-markdown/src/MarkdownPlugin.tsx\n * export const MarkdownPlugin = Plugin.define(meta).pipe(...heavy modules..., Plugin.make);\n * export default MarkdownPlugin;\n * ```\n */\nexport const lazy = <T = void>(meta: Meta, loader: LazyLoader<T>): PluginFactory<T> => {\n const factory = (options: T): Plugin => {\n const stub = new PluginImpl(meta, []);\n Object.defineProperty(stub, LazyTag, {\n value: { loader, options } satisfies LazyPayload,\n enumerable: false,\n });\n return stub;\n };\n return Object.assign(factory, { meta });\n};\n\n/**\n * Type guard for lazy plugin stubs produced by {@link lazy}.\n */\nexport const isLazy = (plugin: Plugin): boolean => LazyTag in plugin;\n\n/**\n * Tagged error for failures during lazy plugin resolution. `context.id` is\n * the lazy plugin's `meta.id`; `context.reason` discriminates the failure\n * mode (`'load-failed' | 'missing-default' | 'invalid-plugin' |\n * 'meta-mismatch'`) so callers can route on it.\n */\nexport class LazyPluginError extends BaseError.extend('LazyPluginError', 'Failed to resolve lazy plugin') {}\n\n/**\n * Tagged error for plugin-level dependency resolution failures.\n *\n * `context.id` is the plugin id the manager was acting on. `context.reason`\n * discriminates the failure mode:\n * - `'missing'` — declared dep is neither registered nor in the catalog.\n * `context.missing` lists offending ids.\n * - `'install-failed'` — dep was found in the catalog but `add()` failed.\n * `cause` carries the original error.\n * - `'cycle'` — closure walk detected a cycle. `context.path` is the cycle path.\n * - `'core-dependent'` — cascade-disable would have to disable a core plugin.\n * `context.coreDependent` is the blocking id.\n */\nexport class PluginDependencyError extends BaseError.extend(\n 'PluginDependencyError',\n 'Plugin dependency resolution failed',\n) {}\n\n/**\n * Resolves a lazy plugin stub to its real plugin.\n * Returns the plugin unchanged if it is not lazy. Failures surface as\n * {@link LazyPluginError} with `context.reason` indicating the failure mode\n * and (for loader failures) `cause` set to the original error.\n */\nexport const resolveLazy = (plugin: Plugin): Effect.Effect<Plugin, LazyPluginError> =>\n Effect.gen(function* () {\n if (!isLazy(plugin)) {\n return plugin;\n }\n const id = plugin.meta.id;\n const { loader, options } = (plugin as unknown as { [LazyTag]: LazyPayload })[LazyTag];\n const mod = yield* Effect.tryPromise({\n try: loader,\n catch: (error) => new LazyPluginError({ context: { id, reason: 'load-failed' }, cause: error }),\n });\n if (!mod || typeof mod.default !== 'function') {\n return yield* Effect.fail(new LazyPluginError({ context: { id, reason: 'missing-default' } }));\n }\n const result = mod.default(options);\n if (!isPlugin(result)) {\n return yield* Effect.fail(new LazyPluginError({ context: { id, reason: 'invalid-plugin' } }));\n }\n if (result.meta.id !== id) {\n return yield* Effect.fail(\n new LazyPluginError({ context: { id, reason: 'meta-mismatch', returnedId: result.meta.id } }),\n );\n }\n return result;\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AACxB,YAAYC,cAAc;AAE1B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AAMpB,IAAE,eAAA;AAUA,IAAA,UAAA,cAAA,YAAA,mCAAA,EAAA,EAAA;AACF;;;;AAiCA,IAAA,kBAAA,CAAA,UAAA,eAAA;AAEA,SAAA,GAAA,QAAA,WAAA,UAAA;;;AAWE,IAAA,iBAAA,CAAA,UAAA;AA2DF,SAAMC,OAAAA,UAAAA,YAAAA,UAAAA,QAAAA,sBAAAA;;IAEKC,yBAAuB;EACvBC,CAAAA,kBAAyC,IAAA;EACzCC;EACAC;EACAC;EAET;;cAEOH,SAAW;AAChB,SAAKC,KAAAA,QAAAA;AACL,SAAKC,cAAAA,QAAoB;AACzB,SAAKC,wBAAmBA,QAAQ;AAClC,SAAA,uBAAA,QAAA;AACF,SAAA,WAAA,QAAA;EAyGA;;AAaEJ,IAAQK,WAAQC,CAAAA,aAAW;EAC3BC,GAAAA;EACC,IAAA,IAAA,QAAA,QAAA,GAAA;EAEH,SAAA,IAAA,WAAA,QAAA,GAAA;;;AAWE,IAAA,WAAA,CAAA,UAAA;AAaF,SAAA,OAAA,UAAA,YAAA,UAAA,QAAA,gBAAA;;;EAKW;EAET;eACmBC,IAAAA;cACAC,OAAAA,UAAAA;AAChB,SAAA,QAAA;AAECC,SAAAA,WAAuB;;EAE3B,IAAA,OAAA;AAEIC,WAAAA,KAAuC;;EAE3C,IAAA,UAAA;AACF,WAAA,KAAA;EAWA;;AAKmBF,IAAAA,oBAAAA,MAAkF;EAEnG;aACOC,CAAAA;EACP,YAAA,MAAA;AAEIC,SAAAA,OAAsF;;EAE1F,IAAA,UAAA;AAEAC,WAAUC,KAAAA;;YAER,eAAW;AACb,SAAA,SAAA,KAAA,aAAA;AAEAC,WAAO;;SAEL;AAEJ,WAAA,uBAAA,MAAA,SAAA;EAEA;;AAqBE,IAAA,SAAA,CAAA,SAAA,IAAA,kBAAA,IAAA;AACA,SAAID,UAAkBE,wBAAW,eAAA;AAEjC,MAAA,kBAAA,QAAA;AACA,WAAA,uBAAA,UAAA,aAAA;EACA;AAEF,QAAA,aAAA;AAIA,SAAA,CAAA,YAAA,QAAA,UAAA,UAAA;;AASE,IAAMC,gBAAaN,CAAAA,MAAO,QAAA,YAAA;AAC1B,QAAMV,gBAAYiB,OAAAA,WAAaJ,aAAsB,OACnDK,OAAa,IAAA;QACXC,aAAQ,KAAA;aACAC,oBAAaC,cAAWC,EAAAA,EAAAA,KAAaT,aAAcT;YACzDmB,MAAAA;AACA,YAAA,aAAuBP,aAAYI,cAAAA,QAAAA;AACrC,gBAAA,YAAA,uCAAA,KAAA,EAAA,IAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,KAAA,GAAA,QAAA,GAAA,CAAA,cAAA,kDAAA,EAAA,CAAA;AACAI,aAASxB,gBAAOyB,YAAgBT,UAAYhB;IAC9C;IAEF,QAAWD,CAAAA,QAAAA,gBAAiB,YAAAC,GAAA;;SAAoBA,IAAAA,iBAAAA;IAAG,GAAA;IACrD;EASA,CAAA;;AAEE,SAAA,KAAA,SAAA;AACAuB,QAAAA,OAAWb,QAAKgB;YAGRf,CAAAA,KAAAA,WAAUgB,SAAgBC,KAAKC,EAAAA,GAAAA,UAAWC,KAAAA,EAAAA,qCAA4BxB,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,KAAAA,GAAAA,MAAAA,GAAAA,CAAAA,sCAAAA,sDAAAA,EAAAA,CAAAA;QAC5E,UAAWyB,CAAAA,YAAWrB;AACxB,UAAA,UAAA,QAAA,QAAA,IAAA,CAAA,WAAA,cAAA,MAAA,QAAA,OAAA,CAAA;AAEA,WAAOsB,IAAOC,WAAOC,MAAS,OAAA;;AAAO,SAAA,OAAA,OAAA,SAAA;IACvC;EAEE,CAAA;AACF;;AA8CI,IAAMC,OAAO,CAAIJ,MAAAA,WAAWrB;QAC5BsB,UAAOI,CAAAA,YAAeD;UACpBE,OAAO,IAAA,WAAA,MAAA,CAAA,CAAA;0BAAEC,MAAAA,SAAAA;aAAQhC;QAAQ;QACzBiC;MACF;MACA,YAAOJ;IACT,CAAA;AACA,WAAOH;;AAA8B,SAAA,OAAA,OAAA,SAAA;IACrC;EAEF,CAAA;;;AAaA,IAAA,kBAAA,cAAA,UAAA,OAAA,mBAAA,+BAAA,EAAA;;AAkBA,IAAA,wBAAA,cAAA,UAAA,OAAA,yBAAA,qCAAA,EAAA;;IASM,cAAOQ,CAAAA,WAAAA,WAAAA,aAAAA;AACT,MAAA,CAAA,OAAA,MAAA,GAAA;AACA,WAAWA;EACX;AACA,QAAMC,KAAAA,OAAM,KAAOC;QACjBC,EAAAA,QAAKL,QAAAA,IAAAA,OAAAA,OAAAA;QACLM,MAAQC,OAAcC,kBAAAA;;sBAA6B9C,IAAAA,gBAAAA;eAAI+C;QAAsB;QAAGC,QAAOH;MAAM;MAC/F,OAAA;IACKJ,CAAAA;;cAC6CQ,OAAS,IAAA,YAAA,YAAA;kBAAEjD,YAAAA,IAAAA,gBAAAA;eAAI+C;QAA0B;QAAE,QAAA;MAC7F;IACA,CAAA,CAAMG;EACN;QACE,SAAO,IAAOR,QAAOS,OAASL;gBAAkBG,MAAS,GAAA;kBAAEjD,YAAAA,IAAAA,gBAAAA;eAAI+C;QAAyB;QAAE,QAAA;MAC5F;IACIG,CAAAA,CAAAA;;aAEsBD,KAAAA,OAAS,IAAA;kBAAEjD,YAAAA,IAAAA,gBAAAA;eAAI+C;QAAyBK;QAA2B,QAAA;QAAE,YAAA,OAAA,KAAA;MAE/F;IACA,CAAA,CAAA;EACC;;;",
|
|
6
|
+
"names": ["Context", "Effect", "Option", "Pipeable", "BaseError", "invariant", "DXN", "PluginModuleImpl", "id", "activatesOn", "firesBeforeActivation", "firesAfterActivation", "activate", "getName", "options", "version", "_meta", "_modules", "meta", "modules", "addModule", "moduleOptions", "pipe", "undefined", "pluginName", "fromNullable", "Option", "onNone", "exportName", "Capability", "getModuleTag", "invariant", "onSome", "computeModuleId", "dependsOn", "builder", "map", "module", "resolveModule", "PluginImpl", "Object", "assign", "factory", "stub", "defineProperty", "value", "loader", "enumerable", "plugin", "mod", "Effect", "try", "catch", "error", "LazyPluginError", "reason", "cause", "context", "result", "fail", "returnedId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
__export
|
|
4
|
+
} from "./chunk-HSLMI22Q.mjs";
|
|
5
|
+
|
|
6
|
+
// src/core/activation-event.ts
|
|
7
|
+
var activation_event_exports = {};
|
|
8
|
+
__export(activation_event_exports, {
|
|
9
|
+
allOf: () => allOf,
|
|
10
|
+
eventKey: () => eventKey,
|
|
11
|
+
getEvents: () => getEvents,
|
|
12
|
+
isAllOf: () => isAllOf,
|
|
13
|
+
isOneOf: () => isOneOf,
|
|
14
|
+
make: () => make,
|
|
15
|
+
oneOf: () => oneOf
|
|
16
|
+
});
|
|
17
|
+
import { compositeKey } from "@dxos/util";
|
|
18
|
+
var make = (id, specifier) => {
|
|
19
|
+
return {
|
|
20
|
+
id,
|
|
21
|
+
specifier
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var eventKey = (event) => event.specifier ? compositeKey(event.id, event.specifier) : event.id;
|
|
25
|
+
var oneOf = (...events) => ({
|
|
26
|
+
type: "one-of",
|
|
27
|
+
events
|
|
28
|
+
});
|
|
29
|
+
var allOf = (...events) => ({
|
|
30
|
+
type: "all-of",
|
|
31
|
+
events
|
|
32
|
+
});
|
|
33
|
+
var isOneOf = (events) => "type" in events && events.type === "one-of";
|
|
34
|
+
var isAllOf = (events) => "type" in events && events.type === "all-of";
|
|
35
|
+
var getEvents = (events) => "type" in events ? events.events : [
|
|
36
|
+
events
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
make,
|
|
41
|
+
eventKey,
|
|
42
|
+
oneOf,
|
|
43
|
+
allOf,
|
|
44
|
+
isOneOf,
|
|
45
|
+
isAllOf,
|
|
46
|
+
getEvents,
|
|
47
|
+
activation_event_exports
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-XOCUANHO.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/core/activation-event.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { compositeKey } from '@dxos/util';\n\n/**\n * A unique string identifier representing an event.\n * This is expected to be a URI, where initial parts are often the id of the plugin whose package defines the event.\n *\n * @example org.dxos.plugin.example.event.ready\n */\nexport type ActivationEvent = {\n id: string;\n specifier?: string;\n};\n\n/**\n * An activation event that can be a single event, or a combination of events.\n */\nexport type Events =\n | ActivationEvent\n | { type: 'one-of'; events: ActivationEvent[] }\n | { type: 'all-of'; events: ActivationEvent[] };\n\n/**\n * Helper to define an activation event.\n */\nexport const make = (id: string, specifier?: string) => {\n return { id, specifier } as ActivationEvent;\n};\n\n/**\n * Helper to create an activation event key.\n */\nexport const eventKey = (event: ActivationEvent) =>\n event.specifier ? compositeKey(event.id, event.specifier) : event.id;\n\n/**\n * Helper to create an activation event that triggers when any of the given events are activated.\n */\nexport const oneOf = (...events: ActivationEvent[]) => ({ type: 'one-of' as const, events });\n\n/**\n * Helper to create an activation event that triggers when all of the given events are activated.\n */\nexport const allOf = (...events: ActivationEvent[]) => ({ type: 'all-of' as const, events });\n\n/**\n * Helper to check if an activation event is a one-of event.\n */\nexport const isOneOf = (events: Events): events is { type: 'one-of'; events: ActivationEvent[] } =>\n 'type' in events && events.type === 'one-of';\n\n/**\n * Helper to check if an activation event is an all-of event.\n */\nexport const isAllOf = (events: Events): events is { type: 'all-of'; events: ActivationEvent[] } =>\n 'type' in events && events.type === 'all-of';\n\n/**\n * Helper to get the events from an activation event.\n */\nexport const getEvents = (events: Events) => ('type' in events ? events.events : [events]);\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA;;;;;;;;;;AAIA,SAASA,oBAAoB;AAwBtB,IAAMC,OAAO,CAACC,IAAYC,cAAAA;AAC/B,SAAO;IAAED;IAAIC;EAAU;AACzB;AAKO,IAAMC,WAAW,CAACC,UACvBA,MAAMF,YAAYH,aAAaK,MAAMH,IAAIG,MAAMF,SAAS,IAAIE,MAAMH;AAK7D,IAAMI,QAAQ,IAAIC,YAA+B;EAAEC,MAAM;EAAmBD;AAAO;AAKnF,IAAME,QAAQ,IAAIF,YAA+B;EAAEC,MAAM;EAAmBD;AAAO;AAKnF,IAAMG,UAAU,CAACH,WACtB,UAAUA,UAAUA,OAAOC,SAAS;AAK/B,IAAMG,UAAU,CAACJ,WACtB,UAAUA,UAAUA,OAAOC,SAAS;AAK/B,IAAMI,YAAY,CAACL,WAAoB,UAAUA,SAASA,OAAOA,SAAS;EAACA;;",
|
|
6
|
+
"names": ["compositeKey", "make", "id", "specifier", "eventKey", "event", "oneOf", "events", "type", "allOf", "isOneOf", "isAllOf", "getEvents"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import "../chunk-FPW45EZH.mjs";
|
|
3
|
+
import {
|
|
4
|
+
capabilities_exports
|
|
5
|
+
} from "../chunk-NULBHQYS.mjs";
|
|
6
|
+
import {
|
|
7
|
+
activation_events_exports
|
|
8
|
+
} from "../chunk-KFZEB6BV.mjs";
|
|
9
|
+
import "../chunk-WK7OIQKI.mjs";
|
|
10
|
+
import "../chunk-XGBUKRCK.mjs";
|
|
11
|
+
import {
|
|
12
|
+
plugin_manager_exports
|
|
13
|
+
} from "../chunk-SX5NVETP.mjs";
|
|
14
|
+
import "../chunk-XOCUANHO.mjs";
|
|
15
|
+
import {
|
|
16
|
+
plugin_exports
|
|
17
|
+
} from "../chunk-XIGPWXCQ.mjs";
|
|
18
|
+
import {
|
|
19
|
+
capability_exports
|
|
20
|
+
} from "../chunk-CTKEZHKF.mjs";
|
|
21
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
22
|
+
|
|
23
|
+
// src/cli/cli.ts
|
|
24
|
+
import * as Command from "@effect/cli/Command";
|
|
25
|
+
import * as Effect from "effect/Effect";
|
|
26
|
+
import * as Layer from "effect/Layer";
|
|
27
|
+
import { invariant } from "@dxos/invariant";
|
|
28
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/app-framework/src/cli/cli.ts";
|
|
29
|
+
var defaultPluginLoader = (plugins) => (id) => Effect.sync(() => {
|
|
30
|
+
const plugin = plugins.find((plugin2) => plugin2.meta.id === id);
|
|
31
|
+
invariant(plugin, `Plugin not found: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 12, S: void 0, A: ["plugin", "`Plugin not found: ${id}`"] });
|
|
32
|
+
return {
|
|
33
|
+
plugin
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
var createCliApp = Effect.fn(function* ({ rootCommand, subCommands: subCommandsProp, pluginManager: pluginManagerProp, pluginLoader: pluginLoaderProp, plugins: pluginsProp = [], enabled: enabledProp = [], safeMode = false }) {
|
|
37
|
+
const plugins = pluginsProp;
|
|
38
|
+
const pluginLoader = pluginLoaderProp ?? defaultPluginLoader(plugins);
|
|
39
|
+
const enabled = safeMode ? [] : enabledProp;
|
|
40
|
+
const manager = pluginManagerProp ?? plugin_manager_exports.make({
|
|
41
|
+
pluginLoader,
|
|
42
|
+
plugins,
|
|
43
|
+
enabled
|
|
44
|
+
});
|
|
45
|
+
manager.capabilities.contribute({
|
|
46
|
+
interface: capabilities_exports.PluginManager,
|
|
47
|
+
implementation: manager,
|
|
48
|
+
module: "org.dxos.app-framework.plugin-manager"
|
|
49
|
+
});
|
|
50
|
+
manager.capabilities.contribute({
|
|
51
|
+
interface: capabilities_exports.AtomRegistry,
|
|
52
|
+
implementation: manager.registry,
|
|
53
|
+
module: "org.dxos.app-framework.atom-registry"
|
|
54
|
+
});
|
|
55
|
+
yield* manager.activate(activation_events_exports.Startup);
|
|
56
|
+
const layers = manager.capabilities.getAll(capabilities_exports.Layer);
|
|
57
|
+
const capabilityServiceLayer = Layer.succeed(capability_exports.Service, manager.capabilities);
|
|
58
|
+
const pluginServiceLayer = Layer.succeed(plugin_exports.Service, manager);
|
|
59
|
+
const layer = Layer.mergeAll(capabilityServiceLayer, pluginServiceLayer, ...layers);
|
|
60
|
+
const pluginCommands = manager.capabilities.getAll(capabilities_exports.Command);
|
|
61
|
+
const subCommands = subCommandsProp ? [
|
|
62
|
+
...subCommandsProp,
|
|
63
|
+
...pluginCommands
|
|
64
|
+
] : pluginCommands;
|
|
65
|
+
invariant(subCommands.length > 0, "No subcommands provided", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 63, S: this, A: ["subCommands.length > 0", "'No subcommands provided'"] });
|
|
66
|
+
const command = rootCommand.pipe(Command.withSubcommands(subCommands));
|
|
67
|
+
return {
|
|
68
|
+
command,
|
|
69
|
+
layer
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
createCliApp
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cli/cli.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { invariant } from '@dxos/invariant';\n\nimport { ActivationEvents, Capabilities } from '../common';\nimport { Capability, Plugin, PluginManager } from '../core';\n\nconst defaultPluginLoader =\n (plugins: Plugin.Plugin[]): PluginManager.ManagerOptions['pluginLoader'] =>\n (id: string) =>\n Effect.sync(() => {\n const plugin = plugins.find((plugin) => plugin.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n return { plugin };\n });\n\ntype SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];\n\nexport type CreateCliAppOptions = {\n rootCommand: Command.Command<any, any, any, any>;\n subCommands?: SubCommands;\n pluginManager?: PluginManager.PluginManager;\n pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];\n plugins?: Plugin.Plugin[];\n enabled?: string[];\n safeMode?: boolean;\n};\n\n/**\n * Creates a CLI application with plugin support.\n * Similar to useApp but for CLI environments.\n *\n * @example\n * const plugins = [ClientPluginCLI()];\n * const manager = await createCliApp({ plugins });\n * const commands = manager.capabilities.getAll(Capabilities.Command);\n *\n * @param options.pluginManager Optional existing PluginManager instance.\n * @param options.pluginLoader Function to load plugins by ID.\n * @param options.plugins All plugins available to the application. Plugins whose `meta.tags` includes `'system'` are treated as core.\n * @param options.enabled Enabled plugins.\n * @param options.safeMode Whether to enable safe mode, which disables optional plugins.\n */\nexport const createCliApp = Effect.fn(function* ({\n rootCommand,\n subCommands: subCommandsProp,\n pluginManager: pluginManagerProp,\n pluginLoader: pluginLoaderProp,\n plugins: pluginsProp = [],\n enabled: enabledProp = [],\n safeMode = false,\n}: CreateCliAppOptions) {\n const plugins = pluginsProp;\n const pluginLoader = pluginLoaderProp ?? defaultPluginLoader(plugins);\n const enabled = safeMode ? [] : enabledProp;\n const manager =\n pluginManagerProp ??\n PluginManager.make({\n pluginLoader,\n plugins,\n enabled,\n });\n\n manager.capabilities.contribute({\n interface: Capabilities.PluginManager,\n implementation: manager,\n module: 'org.dxos.app-framework.plugin-manager',\n });\n\n manager.capabilities.contribute({\n interface: Capabilities.AtomRegistry,\n implementation: manager.registry,\n module: 'org.dxos.app-framework.atom-registry',\n });\n\n // Activate startup event to load CLI commands and Effect layers.\n yield* manager.activate(ActivationEvents.Startup);\n\n // Gather all layers and merge them into a single layer.\n const layers = manager.capabilities.getAll(Capabilities.Layer);\n const capabilityServiceLayer = Layer.succeed(Capability.Service, manager.capabilities);\n const pluginServiceLayer = Layer.succeed(Plugin.Service, manager);\n const layer = (Layer.mergeAll as (...args: Layer.Layer<any, any, any>[]) => Layer.Layer<any, any, never>)(\n capabilityServiceLayer,\n pluginServiceLayer,\n ...layers,\n );\n\n // Gather all commands and provide them to the root command.\n const pluginCommands = manager.capabilities.getAll(Capabilities.Command);\n const subCommands = subCommandsProp ? [...subCommandsProp, ...pluginCommands] : pluginCommands;\n invariant(subCommands.length > 0, 'No subcommands provided');\n const command = rootCommand.pipe(Command.withSubcommands(subCommands as SubCommands));\n\n return { command, layer };\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,iBAAiB;AAK1B,IAAA,eAAMC;0BAKUC,CAAAA,YAAS,CAAA,OAAoBC,YAAI,MAAA;AAC3C,QAAA,SAAO,QAAA,KAAA,CAAAD,YAAAA,QAAA,KAAA,OAAA,EAAA;YAAEA,QAAAA,qBAAAA,EAAAA,IAAAA,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,QAAAA,GAAAA,CAAAA,UAAAA,2BAAAA,EAAAA,CAAAA;AAAO,SAAA;IAClB;EAcJ;;AAyBQE,IAAAA,eAAeC,UAAAA,WAAoBJ,EAAAA,aAAoBK,aAAAA,iBAAAA,eAAAA,mBAAAA,cAAAA,kBAAAA,SAAAA,cAAAA,CAAAA,GAAAA,SAAAA,cAAAA,CAAAA,GAAAA,WAAAA,MAAAA,GAAAA;AAC7D,QAAMC,UAAUC;AAChB,QAAMC,eACJC,oBACAC,oBAAmB,OAAA;QACjBP,UAAAA,WAAAA,CAAAA,IAAAA;QACAE,UAAAA,qBAAAA,uBAAAA,KAAAA;IACAC;IACF;IAEFE;;UAEEG,aAAgBH,WAAAA;IAChBI,WAAQ,qBAAA;IACV,gBAAA;IAEAJ,QAAQK;;UAENF,aAAgBH,WAAQM;IACxBF,WAAQ,qBAAA;IACV,gBAAA,QAAA;IAEA,QAAA;EACA,CAAA;AAGA,SAAMG,QAASP,SAAQK,0BAAaG,OAAOC;AAE3C,QAAMC,SAAAA,QAAAA,aAA2BC,OAAQC,qBAAc,KAAEZ;AACzD,QAAMa,yBACJC,cAAAA,mBACAJ,SAAAA,QAAAA,YACGH;AAGL,QAAA,qBAAA,cAAA,eAAA,SAAA,OAA4D;AAC5D,QAAMQ,QAAAA,eAAiBf,wBAA4BS,oBAAoB,GAAA,MAAA;yBAC7BO,QAAAA,aAAAA,OAAAA,qBAAAA,OAAAA;sBAAoBD,kBAAAA;IAAkBA,GAAAA;IAChFE,GAAAA;EACA,IAAA;AAEA,YAAO,YAAA,SAAA,GAAA,2BAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,0BAAA,2BAAA,EAAA,CAAA;QAAEC,UAAAA,YAAAA,KAAAA,wBAAAA,WAAAA,CAAAA;SAASL;IAAM;IACvB;;;",
|
|
6
|
+
"names": ["Command", "Effect", "Layer", "invariant", "defaultPluginLoader", "plugin", "id", "pluginLoader", "pluginLoaderProp", "plugins", "enabled", "safeMode", "manager", "pluginManagerProp", "PluginManager", "implementation", "module", "capabilities", "registry", "layers", "getAll", "Capabilities", "pluginServiceLayer", "succeed", "Plugin", "layer", "capabilityServiceLayer", "pluginCommands", "subCommandsProp", "invariant", "command"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ProcessManagerReady,
|
|
4
|
+
SetupProcessManager,
|
|
5
|
+
SetupReactSurface,
|
|
6
|
+
Startup
|
|
7
|
+
} from "../chunk-KFZEB6BV.mjs";
|
|
8
|
+
import "../chunk-WK7OIQKI.mjs";
|
|
9
|
+
import "../chunk-XGBUKRCK.mjs";
|
|
10
|
+
import "../chunk-SX5NVETP.mjs";
|
|
11
|
+
import "../chunk-XOCUANHO.mjs";
|
|
12
|
+
import "../chunk-XIGPWXCQ.mjs";
|
|
13
|
+
import "../chunk-CTKEZHKF.mjs";
|
|
14
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
15
|
+
export {
|
|
16
|
+
ProcessManagerReady,
|
|
17
|
+
SetupProcessManager,
|
|
18
|
+
SetupReactSurface,
|
|
19
|
+
Startup
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=activation-events.mjs.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
AtomRegistry,
|
|
4
|
+
Command,
|
|
5
|
+
HistoryTracker,
|
|
6
|
+
Layer,
|
|
7
|
+
LayerSpec,
|
|
8
|
+
ManagedRuntime,
|
|
9
|
+
Null,
|
|
10
|
+
OperationHandler,
|
|
11
|
+
OperationInvoker,
|
|
12
|
+
PluginManager,
|
|
13
|
+
ProcessManagerRuntime,
|
|
14
|
+
ProcessMonitor,
|
|
15
|
+
ReactContext,
|
|
16
|
+
ReactRoot,
|
|
17
|
+
ReactSurface,
|
|
18
|
+
ServiceResolver,
|
|
19
|
+
TraceSink,
|
|
20
|
+
UndoMapping,
|
|
21
|
+
UndoRegistry,
|
|
22
|
+
getAtomValue,
|
|
23
|
+
subscribeAtom,
|
|
24
|
+
updateAtomValue
|
|
25
|
+
} from "../chunk-NULBHQYS.mjs";
|
|
26
|
+
import "../chunk-WK7OIQKI.mjs";
|
|
27
|
+
import "../chunk-XGBUKRCK.mjs";
|
|
28
|
+
import "../chunk-SX5NVETP.mjs";
|
|
29
|
+
import "../chunk-XOCUANHO.mjs";
|
|
30
|
+
import "../chunk-XIGPWXCQ.mjs";
|
|
31
|
+
import "../chunk-CTKEZHKF.mjs";
|
|
32
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
33
|
+
export {
|
|
34
|
+
AtomRegistry,
|
|
35
|
+
Command,
|
|
36
|
+
HistoryTracker,
|
|
37
|
+
Layer,
|
|
38
|
+
LayerSpec,
|
|
39
|
+
ManagedRuntime,
|
|
40
|
+
Null,
|
|
41
|
+
OperationHandler,
|
|
42
|
+
OperationInvoker,
|
|
43
|
+
PluginManager,
|
|
44
|
+
ProcessManagerRuntime,
|
|
45
|
+
ProcessMonitor,
|
|
46
|
+
ReactContext,
|
|
47
|
+
ReactRoot,
|
|
48
|
+
ReactSurface,
|
|
49
|
+
ServiceResolver,
|
|
50
|
+
TraceSink,
|
|
51
|
+
UndoMapping,
|
|
52
|
+
UndoRegistry,
|
|
53
|
+
getAtomValue,
|
|
54
|
+
subscribeAtom,
|
|
55
|
+
updateAtomValue
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=capabilities.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
allOf,
|
|
4
|
+
eventKey,
|
|
5
|
+
getEvents,
|
|
6
|
+
isAllOf,
|
|
7
|
+
isOneOf,
|
|
8
|
+
make,
|
|
9
|
+
oneOf
|
|
10
|
+
} from "../chunk-XOCUANHO.mjs";
|
|
11
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
12
|
+
export {
|
|
13
|
+
allOf,
|
|
14
|
+
eventKey,
|
|
15
|
+
getEvents,
|
|
16
|
+
isAllOf,
|
|
17
|
+
isOneOf,
|
|
18
|
+
make,
|
|
19
|
+
oneOf
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=activation-event.mjs.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ModuleTag,
|
|
4
|
+
Service,
|
|
5
|
+
asLayer,
|
|
6
|
+
atom,
|
|
7
|
+
atomByModule,
|
|
8
|
+
contributes,
|
|
9
|
+
get,
|
|
10
|
+
getAll,
|
|
11
|
+
getModuleTag,
|
|
12
|
+
lazy,
|
|
13
|
+
make,
|
|
14
|
+
makeModule,
|
|
15
|
+
waitFor
|
|
16
|
+
} from "../chunk-CTKEZHKF.mjs";
|
|
17
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
18
|
+
export {
|
|
19
|
+
ModuleTag,
|
|
20
|
+
Service,
|
|
21
|
+
asLayer,
|
|
22
|
+
atom,
|
|
23
|
+
atomByModule,
|
|
24
|
+
contributes,
|
|
25
|
+
get,
|
|
26
|
+
getAll,
|
|
27
|
+
getModuleTag,
|
|
28
|
+
lazy,
|
|
29
|
+
make,
|
|
30
|
+
makeModule,
|
|
31
|
+
waitFor
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=capability.mjs.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ManagerTypeId,
|
|
4
|
+
PluginInitializationError,
|
|
5
|
+
PluginTimeoutError,
|
|
6
|
+
isManager,
|
|
7
|
+
make
|
|
8
|
+
} from "../chunk-SX5NVETP.mjs";
|
|
9
|
+
import "../chunk-XOCUANHO.mjs";
|
|
10
|
+
import "../chunk-XIGPWXCQ.mjs";
|
|
11
|
+
import "../chunk-CTKEZHKF.mjs";
|
|
12
|
+
import "../chunk-HSLMI22Q.mjs";
|
|
13
|
+
export {
|
|
14
|
+
ManagerTypeId,
|
|
15
|
+
PluginInitializationError,
|
|
16
|
+
PluginTimeoutError,
|
|
17
|
+
isManager,
|
|
18
|
+
make
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=plugin-manager.mjs.map
|