@dxos/app-framework 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae
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/dist/lib/browser/capability-2GL5JAGJ.mjs +37 -0
- package/dist/lib/browser/capability-2GL5JAGJ.mjs.map +7 -0
- package/dist/lib/browser/capability-7RLVE42K.mjs +34 -0
- package/dist/lib/browser/capability-7RLVE42K.mjs.map +7 -0
- package/dist/lib/browser/chunk-4CTRO67U.mjs +703 -0
- package/dist/lib/browser/chunk-4CTRO67U.mjs.map +7 -0
- package/dist/lib/browser/chunk-5RJNZV7K.mjs +44 -0
- package/dist/lib/browser/chunk-5RJNZV7K.mjs.map +7 -0
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +8 -0
- package/dist/lib/browser/chunk-FHQTHCX7.mjs.map +7 -0
- package/dist/lib/browser/chunk-FNKT2QQ2.mjs +145 -0
- package/dist/lib/browser/chunk-FNKT2QQ2.mjs.map +7 -0
- package/dist/lib/browser/chunk-HE27PNNQ.mjs +824 -0
- package/dist/lib/browser/chunk-HE27PNNQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-NPUEVX42.mjs +34 -0
- package/dist/lib/browser/chunk-NPUEVX42.mjs.map +7 -0
- package/dist/lib/browser/chunk-PKQT6C53.mjs +47 -0
- package/dist/lib/browser/chunk-PKQT6C53.mjs.map +7 -0
- package/dist/lib/browser/chunk-REORGDJT.mjs +80 -0
- package/dist/lib/browser/chunk-REORGDJT.mjs.map +7 -0
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +1 -0
- package/dist/lib/browser/chunk-YNFPIQGB.mjs +76 -0
- package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZRWBPIZG.mjs +170 -0
- package/dist/lib/browser/chunk-ZRWBPIZG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +89 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/common/activation-events.mjs +23 -0
- package/dist/lib/browser/common/capabilities.mjs +45 -0
- package/dist/lib/browser/core/activation-event.mjs +20 -0
- package/dist/lib/browser/core/activation-event.mjs.map +7 -0
- package/dist/lib/browser/core/capability.mjs +28 -0
- package/dist/lib/browser/core/capability.mjs.map +7 -0
- package/dist/lib/browser/core/plugin-manager.mjs +15 -0
- package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/browser/core/plugin.mjs +27 -0
- package/dist/lib/browser/core/plugin.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +87 -148
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs +36 -0
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +81 -26
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/browser/ui/index.mjs +45 -0
- package/dist/lib/browser/ui/index.mjs.map +7 -0
- package/dist/lib/node-esm/capability-CHIMU6LX.mjs +38 -0
- package/dist/lib/node-esm/capability-CHIMU6LX.mjs.map +7 -0
- package/dist/lib/node-esm/capability-EVZK4REM.mjs +35 -0
- package/dist/lib/node-esm/capability-EVZK4REM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2A4PRBIX.mjs +171 -0
- package/dist/lib/node-esm/chunk-2A4PRBIX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs +704 -0
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs +48 -0
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CJCQS2YL.mjs +146 -0
- package/dist/lib/node-esm/chunk-CJCQS2YL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs +825 -0
- package/dist/lib/node-esm/chunk-DTCHT2X2.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-JAZVHID3.mjs +35 -0
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SB5ODNPX.mjs +77 -0
- package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UEWJDI2L.mjs +10 -0
- package/dist/lib/node-esm/chunk-UEWJDI2L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UFW652GS.mjs +81 -0
- package/dist/lib/node-esm/chunk-UFW652GS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VUIUFIGT.mjs +45 -0
- package/dist/lib/node-esm/chunk-VUIUFIGT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +2 -0
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +90 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/common/activation-events.mjs +24 -0
- package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
- package/dist/lib/node-esm/common/capabilities.mjs +46 -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 +29 -0
- package/dist/lib/node-esm/core/capability.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs +16 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin.mjs +28 -0
- package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +87 -148
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs +37 -0
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +81 -26
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/ui/index.mjs +46 -0
- package/dist/lib/node-esm/ui/index.mjs.map +7 -0
- package/dist/types/src/cli/cli.d.ts +39 -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 +27 -0
- package/dist/types/src/common/activation-events.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +114 -200
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +4 -8
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +33 -0
- package/dist/types/src/common/operations.d.ts.map +1 -0
- 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} +6 -6
- package/dist/types/src/core/activation-event.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.d.ts +43 -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 +150 -0
- package/dist/types/src/core/capability.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +5 -4
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manager.d.ts +66 -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.d.ts +96 -34
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts +3 -0
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts +7 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts +5 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +18 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/index.d.ts +6 -0
- package/dist/types/src/plugin-operation/history/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/types.d.ts +13 -0
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +101 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +23 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/index.d.ts +3 -0
- package/dist/types/src/plugin-operation/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +6 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/meta.d.ts +3 -0
- package/dist/types/src/plugin-operation/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/testing.d.ts +109 -0
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +3 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/capability.d.ts +6 -0
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/index.d.ts +2 -0
- package/dist/types/src/plugin-runtime/index.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/meta.d.ts +3 -0
- package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- 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 +7 -6
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +8 -0
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
- package/dist/types/src/{react/Surface.stories.d.ts → ui/components/App/App.stories.d.ts} +9 -7
- 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/{playground/playground.stories.d.ts → ui/components/PluginManager/PluginManagerContext.stories.d.ts} +5 -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 +12 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/{components/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/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 +20 -0
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.d.ts +96 -0
- package/dist/types/src/ui/components/Surface/types.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/{components → ui/hooks}/useApp.d.ts +18 -12
- package/dist/types/src/ui/hooks/useApp.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/{components → 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/useOperationResolver.d.ts +19 -0
- package/dist/types/src/ui/hooks/useOperationResolver.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/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +10 -6
- package/package.json +111 -47
- package/src/cli/cli.ts +107 -0
- package/src/{components → cli}/index.ts +1 -1
- package/src/common/activation-events.ts +44 -0
- package/src/common/capabilities.ts +174 -213
- package/src/common/index.ts +4 -8
- package/src/common/operations.ts +38 -0
- package/src/common/translations.ts +17 -9
- package/src/context.ts +9 -0
- package/src/core/{events.ts → activation-event.ts} +5 -5
- package/src/core/capability-manager.test.ts +151 -0
- package/src/core/capability-manager.ts +171 -0
- package/src/core/capability.ts +236 -0
- package/src/core/index.ts +5 -4
- package/src/core/plugin-manager.test.ts +845 -0
- package/src/core/plugin-manager.ts +715 -0
- package/src/core/plugin.ts +227 -39
- package/src/index.ts +3 -4
- package/src/plugin-operation/OperationPlugin.ts +25 -0
- package/src/plugin-operation/history/capability.ts +37 -0
- package/src/plugin-operation/history/errors.ts +11 -0
- package/src/plugin-operation/history/history-tracker.test.ts +380 -0
- package/src/plugin-operation/history/history-tracker.ts +129 -0
- package/src/plugin-operation/history/index.ts +9 -0
- package/src/plugin-operation/history/types.ts +17 -0
- package/src/plugin-operation/history/undo-mapping.ts +135 -0
- package/src/plugin-operation/history/undo-registry.test.ts +73 -0
- package/src/plugin-operation/history/undo-registry.ts +54 -0
- package/src/plugin-operation/index.ts +6 -0
- package/src/plugin-operation/invoker-capability.ts +40 -0
- package/src/plugin-operation/meta.ts +11 -0
- package/src/plugin-operation/testing.ts +174 -0
- package/src/plugin-runtime/RuntimePlugin.ts +20 -0
- package/src/plugin-runtime/capability.ts +53 -0
- package/src/{playground/logger → plugin-runtime}/index.ts +1 -1
- package/src/plugin-runtime/meta.ts +11 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/service.ts +52 -0
- package/src/testing/withPluginManager.stories.tsx +7 -7
- package/src/testing/withPluginManager.tsx +33 -27
- package/src/ui/components/App/App.stories.tsx +92 -0
- package/src/{components → ui/components/App}/App.tsx +9 -11
- package/src/{playground/debug → ui/components/App}/index.ts +1 -1
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +183 -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 +143 -0
- package/src/ui/components/Surface/SurfaceComponent.tsx +247 -0
- package/src/ui/components/Surface/SurfaceInfo.tsx +107 -0
- package/src/ui/components/Surface/context.ts +12 -0
- package/src/ui/components/Surface/index.ts +20 -0
- package/src/ui/components/Surface/types.ts +117 -0
- package/src/ui/components/index.ts +7 -0
- package/src/ui/hooks/index.ts +10 -0
- package/src/ui/hooks/useApp.tsx +213 -0
- package/src/ui/hooks/useCapabilities.ts +67 -0
- package/src/{components → ui/hooks}/useLoading.tsx +4 -6
- package/src/ui/hooks/useOperationResolver.ts +40 -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/tsconfig.json +12 -21
- package/tsconfig.node.json +1 -3
- package/typedoc.json +2 -4
- package/.swc/plugins/linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7 +0 -0
- package/dist/lib/browser/app-graph-builder-77MY7KAY.mjs +0 -138
- package/dist/lib/browser/app-graph-builder-77MY7KAY.mjs.map +0 -7
- package/dist/lib/browser/chunk-4NFLRSTX.mjs +0 -467
- package/dist/lib/browser/chunk-4NFLRSTX.mjs.map +0 -7
- package/dist/lib/browser/chunk-OKF2PAWO.mjs +0 -1646
- package/dist/lib/browser/chunk-OKF2PAWO.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/intent-dispatcher-Y4LZNOBC.mjs +0 -11
- package/dist/lib/browser/intent-resolver-XO5OYWVD.mjs +0 -39
- package/dist/lib/browser/intent-resolver-XO5OYWVD.mjs.map +0 -7
- package/dist/lib/browser/store-E3YSBPJQ.mjs +0 -30
- package/dist/lib/browser/store-E3YSBPJQ.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -77
- package/dist/lib/node-esm/app-graph-builder-WK7WBM6I.mjs +0 -139
- package/dist/lib/node-esm/app-graph-builder-WK7WBM6I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7DNZQ6H2.mjs +0 -1648
- package/dist/lib/node-esm/chunk-7DNZQ6H2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHCD4UYO.mjs +0 -468
- package/dist/lib/node-esm/chunk-AHCD4UYO.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-R4CCPBHO.mjs +0 -12
- package/dist/lib/node-esm/intent-resolver-NVYY6BQA.mjs +0 -40
- package/dist/lib/node-esm/intent-resolver-NVYY6BQA.mjs.map +0 -7
- package/dist/lib/node-esm/store-QA5DGTOS.mjs +0 -31
- package/dist/lib/node-esm/store-QA5DGTOS.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -78
- 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 -59
- package/dist/types/src/common/surface.d.ts.map +0 -1
- package/dist/types/src/components/App.d.ts +0 -10
- package/dist/types/src/components/App.d.ts.map +0 -1
- package/dist/types/src/components/App.stories.d.ts.map +0 -1
- package/dist/types/src/components/DefaultFallback.d.ts +0 -8
- package/dist/types/src/components/DefaultFallback.d.ts.map +0 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +0 -1
- package/dist/types/src/components/useApp.d.ts.map +0 -1
- package/dist/types/src/components/useLoading.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.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/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 -7
- package/dist/types/src/react/index.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/worker.d.ts +0 -4
- package/dist/types/src/worker.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 -83
- package/src/components/App.stories.tsx +0 -33
- package/src/components/DefaultFallback.tsx +0 -26
- package/src/components/useApp.tsx +0 -164
- package/src/core/capabilities.test.ts +0 -136
- package/src/core/capabilities.ts +0 -259
- 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 -71
- 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/index.ts +0 -5
- 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 -337
- 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/ErrorBoundary.tsx +0 -56
- package/src/react/IntentContext.tsx +0 -35
- package/src/react/Surface.stories.tsx +0 -101
- package/src/react/Surface.tsx +0 -86
- package/src/react/common.ts +0 -13
- package/src/react/index.ts +0 -10
- package/src/react/useCapabilities.ts +0 -31
- package/src/react/useIntentResolver.ts +0 -22
- package/src/worker.ts +0 -11
- /package/dist/lib/browser/{intent-dispatcher-Y4LZNOBC.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{worker.mjs.map → chunk-YAFEA4GV.mjs.map} +0 -0
- /package/dist/lib/{node-esm/intent-dispatcher-R4CCPBHO.mjs.map → browser/common/activation-events.mjs.map} +0 -0
- /package/dist/lib/{node-esm/worker.mjs.map → browser/common/capabilities.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin-operation/history/errors.ts", "../../../src/plugin-operation/history/undo-mapping.ts", "../../../src/plugin-operation/history/undo-registry.ts", "../../../src/plugin-operation/history/history-tracker.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationError } from '@dxos/operation';\n\nexport class EmptyHistoryError extends OperationError {\n constructor() {\n super('EMPTY_HISTORY', 'Cannot undo: history is empty.');\n }\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type { Operation } from '@dxos/operation';\n\n/**\n * Label type for translatable text (canonical definition in @dxos/app-toolkit).\n */\ntype Label = string | [string, { ns: string; count?: number; defaultValue?: string }];\n\n/**\n * Extract the input type from an OperationDefinition.\n */\nexport type InputOf<T> = T extends Operation.Definition<infer I, any> ? I : never;\n\n/**\n * Extract the output type from an OperationDefinition.\n */\nexport type OutputOf<T> = T extends Operation.Definition<any, infer O> ? O : never;\n\n/**\n * Message provider for undo toast.\n * Can be a static Label or a function that derives the message from input/output.\n */\nexport type MessageProvider<Op extends Operation.Definition<any, any>> =\n | Label\n | ((input: InputOf<Op>, output: OutputOf<Op>) => Label);\n\n/**\n * Undo mapping that links a forward operation to its inverse.\n * Type parameters ensure deriveContext has correctly typed arguments.\n *\n * @template Op - The forward operation definition type.\n * @template Inv - The inverse operation definition type.\n */\nexport interface UndoMapping<\n Op extends Operation.Definition<any, any> = Operation.Definition<any, any>,\n Inv extends Operation.Definition<any, any> = Operation.Definition<any, any>,\n> {\n /** The forward operation. */\n readonly operation: Op;\n\n /** The inverse operation to invoke for undo. */\n readonly inverse: Inv;\n\n /**\n * Derives the input for the inverse operation from the forward operation's input and output.\n * @param input - The input that was passed to the forward operation.\n * @param output - The output that was returned by the forward operation.\n * @returns The input to pass to the inverse operation, or undefined to indicate the operation is not undoable.\n */\n readonly deriveContext: (input: InputOf<Op>, output: OutputOf<Op>) => InputOf<Inv> | undefined;\n\n /**\n * Optional message to show in the undo toast.\n * Can be a static Label or a function that derives the message from input/output.\n */\n readonly message?: MessageProvider<Op>;\n}\n\n/**\n * Props for creating an UndoMapping.\n */\nexport interface UndoMappingProps<\n Op extends Operation.Definition<any, any>,\n Inv extends Operation.Definition<any, any>,\n> {\n /** The forward operation. */\n operation: Op;\n\n /** The inverse operation to invoke for undo. */\n inverse: Inv;\n\n /**\n * Derives the input for the inverse operation from the forward operation's input and output.\n * Return undefined to indicate the operation is not undoable.\n */\n deriveContext: (input: InputOf<Op>, output: OutputOf<Op>) => InputOf<Inv> | undefined;\n\n /**\n * Optional message to show in the undo toast.\n * Can be a static Label or a function that derives the message from input/output.\n */\n message?: MessageProvider<Op>;\n}\n\n/**\n * Creates a type-safe undo mapping.\n *\n * @example\n * ```ts\n * // Static message\n * const mapping = UndoMapping.make({\n * operation: DeleteThread,\n * inverse: RestoreThread,\n * deriveContext: (input, output) => ({\n * thread: output.thread,\n * anchor: output.anchor,\n * }),\n * message: ['thread deleted label', { ns: '@dxos/plugin-thread' }],\n * });\n *\n * // Dynamic message based on input/output\n * const mapping = UndoMapping.make({\n * operation: RemoveObjects,\n * inverse: RestoreObjects,\n * deriveContext: (_input, output) => output,\n * message: (input, _output) =>\n * input.objects.length === 1\n * ? ['object deleted label', { ns: getTypename(input.objects[0]) }]\n * : ['objects deleted label', { ns: '@dxos/plugin-space' }],\n * });\n * ```\n */\nexport const make = <Op extends Operation.Definition<any, any>, Inv extends Operation.Definition<any, any>>(\n props: UndoMappingProps<Op, Inv>,\n): UndoMapping<Op, Inv> => props;\n\n/**\n * Resolves a message provider to a Label.\n */\nexport const resolveMessage = <Op extends Operation.Definition<any, any>>(\n message: MessageProvider<Op> | undefined,\n input: InputOf<Op>,\n output: OutputOf<Op>,\n): Label | undefined => {\n if (message === undefined) {\n return undefined;\n }\n if (typeof message === 'function') {\n return message(input, output);\n }\n return message;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type { Operation } from '@dxos/operation';\n\nimport type * as UndoMapping from './undo-mapping';\n\n//\n// Public Interface\n//\n\n/**\n * Lookup result from UndoRegistry.\n */\nexport type UndoMappingResult = {\n inverse: Operation.Definition<any, any>;\n /** Returns undefined to indicate the operation is not undoable. */\n deriveContext: (input: any, output: any) => any | undefined;\n /** Message provider - may be a static Label or a function. */\n message?: UndoMapping.MessageProvider<Operation.Definition<any, any>>;\n};\n\n/**\n * UndoRegistry interface - looks up inverse operations.\n */\nexport interface UndoRegistry {\n lookup: (operation: Operation.Definition<any, any>) => UndoMappingResult | undefined;\n}\n\n//\n// Factory\n//\n\n/**\n * Creates an UndoRegistry that looks up inverse operations.\n */\nexport const make = (getMappings: () => UndoMapping.UndoMapping[]): UndoRegistry => {\n const lookup = (operation: Operation.Definition<any, any>): UndoMappingResult | undefined => {\n const mappings = getMappings();\n const mapping = mappings.find((m) => m.operation.meta.key === operation.meta.key);\n if (!mapping) {\n return undefined;\n }\n\n return {\n inverse: mapping.inverse,\n deriveContext: mapping.deriveContext,\n message: mapping.message,\n };\n };\n\n return { lookup };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Stream from 'effect/Stream';\n\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { log } from '@dxos/log';\nimport { type OperationInvoker } from '@dxos/operation';\n\nimport { UndoOperation } from '../../common';\n\nimport { EmptyHistoryError } from './errors';\nimport type { HistoryEntry } from './types';\nimport { resolveMessage } from './undo-mapping';\nimport type { UndoRegistry } from './undo-registry';\n\nconst HISTORY_LIMIT = 100;\n\n//\n// Public Interface\n//\n\n/**\n * HistoryTracker interface - tracks operation history and provides undo.\n */\nexport interface HistoryTracker {\n undo: () => Effect.Effect<void, Error>;\n undoPromise: () => Promise<{ error?: Error }>;\n canUndo: () => boolean;\n}\n\n//\n// Factory\n//\n\n/**\n * Creates a HistoryTracker that subscribes to invocation events and provides undo.\n */\nexport const make = (\n invoker: OperationInvoker.OperationInvokerInternal,\n undoRegistry: UndoRegistry,\n): HistoryTracker => {\n const history: HistoryEntry[] = [];\n\n // Subscribe to invocation stream.\n const handleInvocation = (event: OperationInvoker.InvocationEvent) => {\n const mapping = undoRegistry.lookup(event.operation);\n if (!mapping) {\n // Operation is not undoable, skip.\n return;\n }\n\n const inverseInput = mapping.deriveContext(event.input, event.output);\n if (inverseInput === undefined) {\n // Operation is conditionally not undoable (deriveContext returned undefined).\n log('operation not undoable', { key: event.operation.meta.key });\n return;\n }\n\n const entry: HistoryEntry = {\n operation: event.operation,\n input: event.input,\n output: event.output,\n inverse: mapping.inverse,\n inverseInput,\n timestamp: event.timestamp,\n };\n\n history.push(entry);\n log('history entry added', { key: event.operation.meta.key, historyLength: history.length });\n\n // Trim history if it exceeds limit.\n if (history.length > HISTORY_LIMIT) {\n history.splice(0, history.length - HISTORY_LIMIT);\n }\n\n // Show undo toast (resolve message if it's a function).\n const resolvedMessage = resolveMessage(mapping.message, event.input, event.output);\n Effect.runFork(\n invoker.invoke(UndoOperation.ShowUndo, {\n message: resolvedMessage,\n }),\n );\n };\n\n // Fork a fiber to consume the invocation stream.\n Effect.runFork(\n Stream.fromPubSub(invoker.invocations).pipe(\n Stream.runForEach((event) => Effect.sync(() => handleInvocation(event))),\n ),\n );\n\n const undo = (): Effect.Effect<void, Error> => {\n return Effect.gen(function* () {\n const entry = history.pop();\n if (!entry) {\n return yield* Effect.fail(new EmptyHistoryError());\n }\n\n log('undoing operation', { key: entry.operation.meta.key, inverseKey: entry.inverse.meta.key });\n\n // Use _invokeCore to skip event emission (avoid undo-of-undo loops).\n yield* invoker._invokeCore(entry.inverse, entry.inverseInput);\n\n log('undo completed', { key: entry.operation.meta.key });\n });\n };\n\n const undoPromise = async (): Promise<{ error?: Error }> => {\n return runAndForwardErrors(undo())\n .then(() => ({}))\n .catch((error) => {\n log.catch(error);\n return { error };\n });\n };\n\n const canUndo = (): boolean => {\n return history.length > 0;\n };\n\n return {\n undo,\n undoPromise,\n canUndo,\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,sBAAsB;AAExB,IAAMC,oBAAN,cAAgCC,eAAAA;EACrC,cAAc;AACZ,UAAM,iBAAiB,gCAAA;EACzB;AACF;;;ACVA;;;;;AAmHO,IAAMC,OAAO,CAClBC,UACyBA;AAKpB,IAAMC,iBAAiB,CAC5BC,SACAC,OACAC,WAAAA;AAEA,MAAIF,YAAYG,QAAW;AACzB,WAAOA;EACT;AACA,MAAI,OAAOH,YAAY,YAAY;AACjC,WAAOA,QAAQC,OAAOC,MAAAA;EACxB;AACA,SAAOF;AACT;;;ACtIA;;cAAAI;;AAqCO,IAAMC,QAAO,CAACC,gBAAAA;AACnB,QAAMC,SAAS,CAACC,cAAAA;AACd,UAAMC,WAAWH,YAAAA;AACjB,UAAMI,UAAUD,SAASE,KAAK,CAACC,MAAMA,EAAEJ,UAAUK,KAAKC,QAAQN,UAAUK,KAAKC,GAAG;AAChF,QAAI,CAACJ,SAAS;AACZ,aAAOK;IACT;AAEA,WAAO;MACLC,SAASN,QAAQM;MACjBC,eAAeP,QAAQO;MACvBC,SAASR,QAAQQ;IACnB;EACF;AAEA,SAAO;IAAEX;EAAO;AAClB;;;ACrDA;;cAAAY;;AAIA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,2BAA2B;AACpC,SAASC,WAAW;;AAUpB,IAAMC,gBAAgB;AAsBf,IAAMC,QAAO,CAClBC,SACAC,iBAAAA;AAEA,QAAMC,UAA0B,CAAA;AAGhC,QAAMC,mBAAmB,CAACC,UAAAA;AACxB,UAAMC,UAAUJ,aAAaK,OAAOF,MAAMG,SAAS;AACnD,QAAI,CAACF,SAAS;AAEZ;IACF;AAEA,UAAMG,eAAeH,QAAQI,cAAcL,MAAMM,OAAON,MAAMO,MAAM;AACpE,QAAIH,iBAAiBI,QAAW;AAE9BC,UAAI,0BAA0B;QAAEC,KAAKV,MAAMG,UAAUQ,KAAKD;MAAI,GAAA;;;;;;AAC9D;IACF;AAEA,UAAME,QAAsB;MAC1BT,WAAWH,MAAMG;MACjBG,OAAON,MAAMM;MACbC,QAAQP,MAAMO;MACdM,SAASZ,QAAQY;MACjBT;MACAU,WAAWd,MAAMc;IACnB;AAEAhB,YAAQiB,KAAKH,KAAAA;AACbH,QAAI,uBAAuB;MAAEC,KAAKV,MAAMG,UAAUQ,KAAKD;MAAKM,eAAelB,QAAQmB;IAAO,GAAA;;;;;;AAG1F,QAAInB,QAAQmB,SAASvB,eAAe;AAClCI,cAAQoB,OAAO,GAAGpB,QAAQmB,SAASvB,aAAAA;IACrC;AAGA,UAAMyB,kBAAkBC,eAAenB,QAAQoB,SAASrB,MAAMM,OAAON,MAAMO,MAAM;AACjFe,IAAOC,eACL3B,QAAQ4B,OAAOC,cAAcC,UAAU;MACrCL,SAASF;IACX,CAAA,CAAA;EAEJ;AAGAG,EAAOC,eACEI,kBAAW/B,QAAQgC,WAAW,EAAEC,KAC9BC,kBAAW,CAAC9B,UAAiB+B,YAAK,MAAMhC,iBAAiBC,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAIpE,QAAMgC,OAAO,MAAA;AACX,WAAcC,WAAI,aAAA;AAChB,YAAMrB,QAAQd,QAAQoC,IAAG;AACzB,UAAI,CAACtB,OAAO;AACV,eAAO,OAAcuB,YAAK,IAAIC,kBAAAA,CAAAA;MAChC;AAEA3B,UAAI,qBAAqB;QAAEC,KAAKE,MAAMT,UAAUQ,KAAKD;QAAK2B,YAAYzB,MAAMC,QAAQF,KAAKD;MAAI,GAAA;;;;;;AAG7F,aAAOd,QAAQ0C,YAAY1B,MAAMC,SAASD,MAAMR,YAAY;AAE5DK,UAAI,kBAAkB;QAAEC,KAAKE,MAAMT,UAAUQ,KAAKD;MAAI,GAAA;;;;;;IACxD,CAAA;EACF;AAEA,QAAM6B,cAAc,YAAA;AAClB,WAAOC,oBAAoBR,KAAAA,CAAAA,EACxBS,KAAK,OAAO,CAAC,EAAA,EACbC,MAAM,CAACC,UAAAA;AACNlC,UAAIiC,MAAMC,OAAAA,QAAAA;;;;;;AACV,aAAO;QAAEA;MAAM;IACjB,CAAA;EACJ;AAEA,QAAMC,UAAU,MAAA;AACd,WAAO9C,QAAQmB,SAAS;EAC1B;AAEA,SAAO;IACLe;IACAO;IACAK;EACF;AACF;",
|
|
6
|
+
"names": ["OperationError", "EmptyHistoryError", "OperationError", "make", "props", "resolveMessage", "message", "input", "output", "undefined", "make", "make", "getMappings", "lookup", "operation", "mappings", "mapping", "find", "m", "meta", "key", "undefined", "inverse", "deriveContext", "message", "make", "Effect", "Stream", "runAndForwardErrors", "log", "HISTORY_LIMIT", "make", "invoker", "undoRegistry", "history", "handleInvocation", "event", "mapping", "lookup", "operation", "inverseInput", "deriveContext", "input", "output", "undefined", "log", "key", "meta", "entry", "inverse", "timestamp", "push", "historyLength", "length", "splice", "resolvedMessage", "resolveMessage", "message", "Effect", "runFork", "invoke", "UndoOperation", "ShowUndo", "fromPubSub", "invocations", "pipe", "runForEach", "sync", "undo", "gen", "pop", "fail", "EmptyHistoryError", "inverseKey", "_invokeCore", "undoPromise", "runAndForwardErrors", "then", "catch", "error", "canUndo"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import "../chunk-5RJNZV7K.mjs";
|
|
2
|
+
import {
|
|
3
|
+
capabilities_exports
|
|
4
|
+
} from "../chunk-REORGDJT.mjs";
|
|
5
|
+
import {
|
|
6
|
+
activation_events_exports
|
|
7
|
+
} from "../chunk-NPUEVX42.mjs";
|
|
8
|
+
import "../chunk-YAFEA4GV.mjs";
|
|
9
|
+
import {
|
|
10
|
+
plugin_manager_exports
|
|
11
|
+
} from "../chunk-HE27PNNQ.mjs";
|
|
12
|
+
import "../chunk-PKQT6C53.mjs";
|
|
13
|
+
import {
|
|
14
|
+
plugin_exports
|
|
15
|
+
} from "../chunk-FNKT2QQ2.mjs";
|
|
16
|
+
import {
|
|
17
|
+
capability_exports
|
|
18
|
+
} from "../chunk-YNFPIQGB.mjs";
|
|
19
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
20
|
+
|
|
21
|
+
// src/cli/cli.ts
|
|
22
|
+
import * as Command from "@effect/cli/Command";
|
|
23
|
+
import * as Effect from "effect/Effect";
|
|
24
|
+
import * as Layer from "effect/Layer";
|
|
25
|
+
import { invariant } from "@dxos/invariant";
|
|
26
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/app-framework/src/cli/cli.ts";
|
|
27
|
+
var defaultPluginLoader = (plugins) => (id) => Effect.sync(() => {
|
|
28
|
+
const plugin = plugins.find((plugin2) => plugin2.meta.id === id);
|
|
29
|
+
invariant(plugin, `Plugin not found: ${id}`, {
|
|
30
|
+
F: __dxlog_file,
|
|
31
|
+
L: 19,
|
|
32
|
+
S: void 0,
|
|
33
|
+
A: [
|
|
34
|
+
"plugin",
|
|
35
|
+
"`Plugin not found: ${id}`"
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
return plugin;
|
|
39
|
+
});
|
|
40
|
+
var createCliApp = Effect.fn(function* ({ rootCommand, subCommands: subCommandsProp, pluginManager: pluginManagerProp, pluginLoader: pluginLoaderProp, plugins: pluginsProp = [], core: coreProp, enabled: enabledProp = [], safeMode = false }) {
|
|
41
|
+
const plugins = pluginsProp;
|
|
42
|
+
const core = coreProp ?? plugins.map(({ meta }) => meta.id);
|
|
43
|
+
const pluginLoader = pluginLoaderProp ?? defaultPluginLoader(plugins);
|
|
44
|
+
const enabled = safeMode ? [] : enabledProp;
|
|
45
|
+
const manager = pluginManagerProp ?? plugin_manager_exports.make({
|
|
46
|
+
pluginLoader,
|
|
47
|
+
plugins,
|
|
48
|
+
core,
|
|
49
|
+
enabled
|
|
50
|
+
});
|
|
51
|
+
manager.capabilities.contribute({
|
|
52
|
+
interface: capabilities_exports.PluginManager,
|
|
53
|
+
implementation: manager,
|
|
54
|
+
module: "dxos.org/app-framework/plugin-manager"
|
|
55
|
+
});
|
|
56
|
+
manager.capabilities.contribute({
|
|
57
|
+
interface: capabilities_exports.AtomRegistry,
|
|
58
|
+
implementation: manager.registry,
|
|
59
|
+
module: "dxos.org/app-framework/atom-registry"
|
|
60
|
+
});
|
|
61
|
+
yield* manager.activate(activation_events_exports.Startup);
|
|
62
|
+
const layers = manager.capabilities.getAll(capabilities_exports.Layer);
|
|
63
|
+
const capabilityServiceLayer = Layer.succeed(capability_exports.Service, manager.capabilities);
|
|
64
|
+
const pluginServiceLayer = Layer.succeed(plugin_exports.Service, manager);
|
|
65
|
+
const layer = Layer.mergeAll(capabilityServiceLayer, pluginServiceLayer, ...layers);
|
|
66
|
+
const pluginCommands = manager.capabilities.getAll(capabilities_exports.Command);
|
|
67
|
+
const subCommands = subCommandsProp ? [
|
|
68
|
+
...subCommandsProp,
|
|
69
|
+
...pluginCommands
|
|
70
|
+
] : pluginCommands;
|
|
71
|
+
invariant(subCommands.length > 0, "No subcommands provided", {
|
|
72
|
+
F: __dxlog_file,
|
|
73
|
+
L: 103,
|
|
74
|
+
S: this,
|
|
75
|
+
A: [
|
|
76
|
+
"subCommands.length > 0",
|
|
77
|
+
"'No subcommands provided'"
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
const command = rootCommand.pipe(Command.withSubcommands(subCommands));
|
|
81
|
+
return {
|
|
82
|
+
command,
|
|
83
|
+
layer
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
createCliApp
|
|
88
|
+
};
|
|
89
|
+
//# 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 core?: string[];\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.\n * @param options.core Core plugins which will always be enabled.\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 core: coreProp,\n enabled: enabledProp = [],\n safeMode = false,\n}: CreateCliAppOptions) {\n const plugins = pluginsProp;\n const core = coreProp ?? plugins.map(({ meta }) => meta.id);\n const pluginLoader = pluginLoaderProp ?? defaultPluginLoader(plugins);\n const enabled = safeMode ? [] : enabledProp;\n const manager =\n pluginManagerProp ??\n PluginManager.make({\n pluginLoader,\n plugins,\n core,\n enabled,\n });\n\n manager.capabilities.contribute({\n interface: Capabilities.PluginManager,\n implementation: manager,\n module: 'dxos.org/app-framework/plugin-manager',\n });\n\n manager.capabilities.contribute({\n interface: Capabilities.AtomRegistry,\n implementation: manager.registry,\n module: 'dxos.org/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,IAAMC,sBACJ,CAACC,YACD,CAACC,OACQC,YAAK,MAAA;AACV,QAAMC,SAASH,QAAQI,KAAK,CAACD,YAAWA,QAAOE,KAAKJ,OAAOA,EAAAA;AAC3DK,YAAUH,QAAQ,qBAAqBF,EAAAA,IAAI;;;;;;;;;AAC3C,SAAOE;AACT,CAAA;AA+BG,IAAMI,eAAsBC,UAAG,WAAW,EAC/CC,aACAC,aAAaC,iBACbC,eAAeC,mBACfC,cAAcC,kBACdf,SAASgB,cAAc,CAAA,GACvBC,MAAMC,UACNC,SAASC,cAAc,CAAA,GACvBC,WAAW,MAAK,GACI;AACpB,QAAMrB,UAAUgB;AAChB,QAAMC,OAAOC,YAAYlB,QAAQsB,IAAI,CAAC,EAAEjB,KAAI,MAAOA,KAAKJ,EAAE;AAC1D,QAAMa,eAAeC,oBAAoBhB,oBAAoBC,OAAAA;AAC7D,QAAMmB,UAAUE,WAAW,CAAA,IAAKD;AAChC,QAAMG,UACJV,qBACAW,uBAAcC,KAAK;IACjBX;IACAd;IACAiB;IACAE;EACF,CAAA;AAEFI,UAAQG,aAAaC,WAAW;IAC9BC,WAAWC,qBAAaL;IACxBM,gBAAgBP;IAChBQ,QAAQ;EACV,CAAA;AAEAR,UAAQG,aAAaC,WAAW;IAC9BC,WAAWC,qBAAaG;IACxBF,gBAAgBP,QAAQU;IACxBF,QAAQ;EACV,CAAA;AAGA,SAAOR,QAAQW,SAASC,0BAAiBC,OAAO;AAGhD,QAAMC,SAASd,QAAQG,aAAaY,OAAOT,qBAAaU,KAAK;AAC7D,QAAMC,yBAA+BC,cAAQC,mBAAWC,SAASpB,QAAQG,YAAY;AACrF,QAAMkB,qBAA2BH,cAAQI,eAAOF,SAASpB,OAAAA;AACzD,QAAMuB,QAAeC,eACnBP,wBACAI,oBAAAA,GACGP,MAAAA;AAIL,QAAMW,iBAAiBzB,QAAQG,aAAaY,OAAOT,qBAAaoB,OAAO;AACvE,QAAMvC,cAAcC,kBAAkB;OAAIA;OAAoBqC;MAAkBA;AAChF1C,YAAUI,YAAYwC,SAAS,GAAG,2BAAA;;;;;;;;;AAClC,QAAMC,UAAU1C,YAAY2C,KAAaC,wBAAgB3C,WAAAA,CAAAA;AAEzD,SAAO;IAAEyC;IAASL;EAAM;AAC1B,CAAA;",
|
|
6
|
+
"names": ["Command", "Effect", "Layer", "invariant", "defaultPluginLoader", "plugins", "id", "sync", "plugin", "find", "meta", "invariant", "createCliApp", "fn", "rootCommand", "subCommands", "subCommandsProp", "pluginManager", "pluginManagerProp", "pluginLoader", "pluginLoaderProp", "pluginsProp", "core", "coreProp", "enabled", "enabledProp", "safeMode", "map", "manager", "PluginManager", "make", "capabilities", "contribute", "interface", "Capabilities", "implementation", "module", "AtomRegistry", "registry", "activate", "ActivationEvents", "Startup", "layers", "getAll", "Layer", "capabilityServiceLayer", "succeed", "Capability", "Service", "pluginServiceLayer", "Plugin", "layer", "mergeAll", "pluginCommands", "Command", "length", "command", "pipe", "withSubcommands"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ManagedRuntimeReady,
|
|
3
|
+
OperationInvokerReady,
|
|
4
|
+
SetupLayer,
|
|
5
|
+
SetupOperationResolver,
|
|
6
|
+
SetupReactSurface,
|
|
7
|
+
Startup
|
|
8
|
+
} from "../chunk-NPUEVX42.mjs";
|
|
9
|
+
import "../chunk-YAFEA4GV.mjs";
|
|
10
|
+
import "../chunk-HE27PNNQ.mjs";
|
|
11
|
+
import "../chunk-PKQT6C53.mjs";
|
|
12
|
+
import "../chunk-FNKT2QQ2.mjs";
|
|
13
|
+
import "../chunk-YNFPIQGB.mjs";
|
|
14
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
15
|
+
export {
|
|
16
|
+
ManagedRuntimeReady,
|
|
17
|
+
OperationInvokerReady,
|
|
18
|
+
SetupLayer,
|
|
19
|
+
SetupOperationResolver,
|
|
20
|
+
SetupReactSurface,
|
|
21
|
+
Startup
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=activation-events.mjs.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AtomRegistry,
|
|
3
|
+
Command,
|
|
4
|
+
HistoryTracker,
|
|
5
|
+
Layer,
|
|
6
|
+
ManagedRuntime,
|
|
7
|
+
Null,
|
|
8
|
+
OperationInvoker,
|
|
9
|
+
OperationResolver,
|
|
10
|
+
PluginManager,
|
|
11
|
+
ReactContext,
|
|
12
|
+
ReactRoot,
|
|
13
|
+
ReactSurface,
|
|
14
|
+
UndoMapping,
|
|
15
|
+
UndoRegistry,
|
|
16
|
+
getAtomValue,
|
|
17
|
+
subscribeAtom,
|
|
18
|
+
updateAtomValue
|
|
19
|
+
} from "../chunk-REORGDJT.mjs";
|
|
20
|
+
import "../chunk-YAFEA4GV.mjs";
|
|
21
|
+
import "../chunk-HE27PNNQ.mjs";
|
|
22
|
+
import "../chunk-PKQT6C53.mjs";
|
|
23
|
+
import "../chunk-FNKT2QQ2.mjs";
|
|
24
|
+
import "../chunk-YNFPIQGB.mjs";
|
|
25
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
26
|
+
export {
|
|
27
|
+
AtomRegistry,
|
|
28
|
+
Command,
|
|
29
|
+
HistoryTracker,
|
|
30
|
+
Layer,
|
|
31
|
+
ManagedRuntime,
|
|
32
|
+
Null,
|
|
33
|
+
OperationInvoker,
|
|
34
|
+
OperationResolver,
|
|
35
|
+
PluginManager,
|
|
36
|
+
ReactContext,
|
|
37
|
+
ReactRoot,
|
|
38
|
+
ReactSurface,
|
|
39
|
+
UndoMapping,
|
|
40
|
+
UndoRegistry,
|
|
41
|
+
getAtomValue,
|
|
42
|
+
subscribeAtom,
|
|
43
|
+
updateAtomValue
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=capabilities.mjs.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
allOf,
|
|
3
|
+
eventKey,
|
|
4
|
+
getEvents,
|
|
5
|
+
isAllOf,
|
|
6
|
+
isOneOf,
|
|
7
|
+
make,
|
|
8
|
+
oneOf
|
|
9
|
+
} from "../chunk-PKQT6C53.mjs";
|
|
10
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
11
|
+
export {
|
|
12
|
+
allOf,
|
|
13
|
+
eventKey,
|
|
14
|
+
getEvents,
|
|
15
|
+
isAllOf,
|
|
16
|
+
isOneOf,
|
|
17
|
+
make,
|
|
18
|
+
oneOf
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=activation-event.mjs.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModuleTag,
|
|
3
|
+
Service,
|
|
4
|
+
atom,
|
|
5
|
+
contributes,
|
|
6
|
+
get,
|
|
7
|
+
getAll,
|
|
8
|
+
getModuleTag,
|
|
9
|
+
lazy,
|
|
10
|
+
make,
|
|
11
|
+
makeModule,
|
|
12
|
+
waitFor
|
|
13
|
+
} from "../chunk-YNFPIQGB.mjs";
|
|
14
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
15
|
+
export {
|
|
16
|
+
ModuleTag,
|
|
17
|
+
Service,
|
|
18
|
+
atom,
|
|
19
|
+
contributes,
|
|
20
|
+
get,
|
|
21
|
+
getAll,
|
|
22
|
+
getModuleTag,
|
|
23
|
+
lazy,
|
|
24
|
+
make,
|
|
25
|
+
makeModule,
|
|
26
|
+
waitFor
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=capability.mjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ManagerTypeId,
|
|
3
|
+
isManager,
|
|
4
|
+
make
|
|
5
|
+
} from "../chunk-HE27PNNQ.mjs";
|
|
6
|
+
import "../chunk-PKQT6C53.mjs";
|
|
7
|
+
import "../chunk-FNKT2QQ2.mjs";
|
|
8
|
+
import "../chunk-YNFPIQGB.mjs";
|
|
9
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
10
|
+
export {
|
|
11
|
+
ManagerTypeId,
|
|
12
|
+
isManager,
|
|
13
|
+
make
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=plugin-manager.mjs.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PluginModuleTypeId,
|
|
3
|
+
PluginTypeId,
|
|
4
|
+
Service,
|
|
5
|
+
activate,
|
|
6
|
+
addModule,
|
|
7
|
+
define,
|
|
8
|
+
isPlugin,
|
|
9
|
+
isPluginModule,
|
|
10
|
+
make,
|
|
11
|
+
reset
|
|
12
|
+
} from "../chunk-FNKT2QQ2.mjs";
|
|
13
|
+
import "../chunk-YNFPIQGB.mjs";
|
|
14
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
15
|
+
export {
|
|
16
|
+
PluginModuleTypeId,
|
|
17
|
+
PluginTypeId,
|
|
18
|
+
Service,
|
|
19
|
+
activate,
|
|
20
|
+
addModule,
|
|
21
|
+
define,
|
|
22
|
+
isPlugin,
|
|
23
|
+
isPluginModule,
|
|
24
|
+
make,
|
|
25
|
+
reset
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -1,158 +1,97 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Surface,
|
|
5
|
-
isSurfaceAvailable,
|
|
6
|
-
useApp,
|
|
7
|
-
useAppGraph,
|
|
8
|
-
useCapabilities,
|
|
9
|
-
useCapability,
|
|
10
|
-
useIntentDispatcher,
|
|
11
|
-
useIntentResolver,
|
|
12
|
-
useLayout,
|
|
13
|
-
usePluginManager,
|
|
14
|
-
useSurfaces
|
|
15
|
-
} from "./chunk-4NFLRSTX.mjs";
|
|
2
|
+
PluginManagerContext
|
|
3
|
+
} from "./chunk-FHQTHCX7.mjs";
|
|
16
4
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./chunk-
|
|
5
|
+
EmptyHistoryError,
|
|
6
|
+
history_tracker_exports,
|
|
7
|
+
undo_mapping_exports,
|
|
8
|
+
undo_registry_exports
|
|
9
|
+
} from "./chunk-ZRWBPIZG.mjs";
|
|
22
10
|
import {
|
|
23
|
-
BaseError,
|
|
24
|
-
Capabilities,
|
|
25
|
-
CollaborationActions,
|
|
26
|
-
CycleDetectedError,
|
|
27
|
-
Events,
|
|
28
|
-
FileInfoSchema,
|
|
29
|
-
IntentAction,
|
|
30
|
-
IntentPlugin,
|
|
31
11
|
Label,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
12
|
+
UndoOperation
|
|
13
|
+
} from "./chunk-5RJNZV7K.mjs";
|
|
14
|
+
import {
|
|
15
|
+
capabilities_exports
|
|
16
|
+
} from "./chunk-REORGDJT.mjs";
|
|
17
|
+
import {
|
|
18
|
+
activation_events_exports
|
|
19
|
+
} from "./chunk-NPUEVX42.mjs";
|
|
20
|
+
import "./chunk-YAFEA4GV.mjs";
|
|
21
|
+
import {
|
|
22
|
+
capability_manager_exports,
|
|
23
|
+
plugin_manager_exports
|
|
24
|
+
} from "./chunk-HE27PNNQ.mjs";
|
|
25
|
+
import {
|
|
26
|
+
activation_event_exports
|
|
27
|
+
} from "./chunk-PKQT6C53.mjs";
|
|
28
|
+
import {
|
|
29
|
+
plugin_exports
|
|
30
|
+
} from "./chunk-FNKT2QQ2.mjs";
|
|
31
|
+
import {
|
|
32
|
+
capability_exports
|
|
33
|
+
} from "./chunk-YNFPIQGB.mjs";
|
|
34
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
35
|
+
|
|
36
|
+
// src/plugin-operation/meta.ts
|
|
37
|
+
var meta = {
|
|
38
|
+
id: "dxos.org/plugin/operation",
|
|
39
|
+
name: "Operation Plugin",
|
|
40
|
+
description: "Provides operation invocation, undo registry, and history tracking."
|
|
41
|
+
};
|
|
60
42
|
|
|
61
|
-
// src/plugin-
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
// src/plugin-operation/OperationPlugin.ts
|
|
44
|
+
var OperationInvoker = capability_exports.lazy("OperationInvoker", () => import("./invoker-capability-BNLVNYHU.mjs"));
|
|
45
|
+
var HistoryCapabilities = capability_exports.lazy("HistoryCapabilities", () => import("./capability-7RLVE42K.mjs"));
|
|
46
|
+
var OperationPlugin = plugin_exports.define(meta).pipe(plugin_exports.addModule({
|
|
47
|
+
activatesOn: activation_events_exports.ManagedRuntimeReady,
|
|
48
|
+
activatesBefore: [
|
|
49
|
+
activation_events_exports.SetupOperationResolver
|
|
50
|
+
],
|
|
51
|
+
activatesAfter: [
|
|
52
|
+
activation_events_exports.OperationInvokerReady
|
|
53
|
+
],
|
|
54
|
+
activate: OperationInvoker
|
|
55
|
+
}), plugin_exports.addModule({
|
|
56
|
+
activatesOn: activation_events_exports.OperationInvokerReady,
|
|
57
|
+
activate: HistoryCapabilities
|
|
58
|
+
}), plugin_exports.make);
|
|
59
|
+
|
|
60
|
+
// src/plugin-runtime/meta.ts
|
|
61
|
+
var meta2 = {
|
|
62
|
+
id: "dxos.org/plugin/runtime",
|
|
63
|
+
name: "Runtime Plugin",
|
|
64
|
+
description: "Provides a managed Effect runtime by composing contributed layers."
|
|
65
|
+
};
|
|
73
66
|
|
|
74
|
-
// src/plugin-
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}),
|
|
87
|
-
defineModule({
|
|
88
|
-
id: `${meta.id}/module/translations`,
|
|
89
|
-
activatesOn: Events.SetupTranslations,
|
|
90
|
-
activate: () => contributes(Capabilities.Translations, translations)
|
|
91
|
-
}),
|
|
92
|
-
defineModule({
|
|
93
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
94
|
-
activatesOn: Events.SetupIntentResolver,
|
|
95
|
-
activate: lazy(() => import("./intent-resolver-XO5OYWVD.mjs"))
|
|
96
|
-
}),
|
|
97
|
-
defineModule({
|
|
98
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
99
|
-
activatesOn: Events.SetupAppGraph,
|
|
100
|
-
activate: lazy(() => import("./app-graph-builder-77MY7KAY.mjs"))
|
|
101
|
-
})
|
|
102
|
-
]);
|
|
67
|
+
// src/plugin-runtime/RuntimePlugin.ts
|
|
68
|
+
var ManagedRuntimeCapability = capability_exports.lazy("ManagedRuntime", () => import("./capability-2GL5JAGJ.mjs"));
|
|
69
|
+
var RuntimePlugin = plugin_exports.define(meta2).pipe(plugin_exports.addModule({
|
|
70
|
+
activatesOn: activation_events_exports.Startup,
|
|
71
|
+
activatesBefore: [
|
|
72
|
+
activation_events_exports.SetupLayer
|
|
73
|
+
],
|
|
74
|
+
activatesAfter: [
|
|
75
|
+
activation_events_exports.ManagedRuntimeReady
|
|
76
|
+
],
|
|
77
|
+
activate: ManagedRuntimeCapability
|
|
78
|
+
}), plugin_exports.make);
|
|
103
79
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
IntentAction,
|
|
112
|
-
IntentPlugin,
|
|
80
|
+
activation_event_exports as ActivationEvent,
|
|
81
|
+
activation_events_exports as ActivationEvents,
|
|
82
|
+
capabilities_exports as Capabilities,
|
|
83
|
+
capability_exports as Capability,
|
|
84
|
+
capability_manager_exports as CapabilityManager,
|
|
85
|
+
EmptyHistoryError,
|
|
86
|
+
history_tracker_exports as HistoryTracker,
|
|
113
87
|
Label,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
ResourceKey,
|
|
123
|
-
ResourceLanguage,
|
|
124
|
-
SETTINGS_ID,
|
|
125
|
-
SETTINGS_KEY,
|
|
126
|
-
SettingsAction,
|
|
127
|
-
SettingsPlugin,
|
|
128
|
-
Surface,
|
|
129
|
-
allOf,
|
|
130
|
-
chain,
|
|
131
|
-
contributes,
|
|
132
|
-
createDispatcher,
|
|
133
|
-
createIntent,
|
|
134
|
-
createResolver,
|
|
135
|
-
createSurface,
|
|
136
|
-
defaultFileTypes,
|
|
137
|
-
defineCapability,
|
|
138
|
-
defineEvent,
|
|
139
|
-
defineModule,
|
|
140
|
-
definePlugin,
|
|
141
|
-
eventKey,
|
|
142
|
-
getEvents,
|
|
143
|
-
isAllOf,
|
|
144
|
-
isOneOf,
|
|
145
|
-
isSurfaceAvailable,
|
|
146
|
-
lazy,
|
|
147
|
-
oneOf,
|
|
148
|
-
useApp,
|
|
149
|
-
useAppGraph,
|
|
150
|
-
useCapabilities,
|
|
151
|
-
useCapability,
|
|
152
|
-
useIntentDispatcher,
|
|
153
|
-
useIntentResolver,
|
|
154
|
-
useLayout,
|
|
155
|
-
usePluginManager,
|
|
156
|
-
useSurfaces
|
|
88
|
+
OperationPlugin,
|
|
89
|
+
plugin_exports as Plugin,
|
|
90
|
+
plugin_manager_exports as PluginManager,
|
|
91
|
+
PluginManagerContext,
|
|
92
|
+
RuntimePlugin,
|
|
93
|
+
undo_mapping_exports as UndoMapping,
|
|
94
|
+
UndoOperation,
|
|
95
|
+
undo_registry_exports as UndoRegistry
|
|
157
96
|
};
|
|
158
97
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugin-
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/plugin-operation/meta.ts", "../../../src/plugin-operation/OperationPlugin.ts", "../../../src/plugin-runtime/meta.ts", "../../../src/plugin-runtime/RuntimePlugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '../core';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/operation',\n name: 'Operation Plugin',\n description: 'Provides operation invocation, undo registry, and history tracking.',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents } from '../common';\nimport { Capability, Plugin } from '../core';\n\nimport { meta } from './meta';\n\nconst OperationInvoker = Capability.lazy('OperationInvoker', () => import('./invoker-capability'));\nconst HistoryCapabilities = Capability.lazy('HistoryCapabilities', () => import('./history/capability'));\n\nexport const OperationPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.ManagedRuntimeReady,\n activatesBefore: [ActivationEvents.SetupOperationResolver],\n activatesAfter: [ActivationEvents.OperationInvokerReady],\n activate: OperationInvoker,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvents.OperationInvokerReady,\n activate: HistoryCapabilities,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '../core';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/runtime',\n name: 'Runtime Plugin',\n description: 'Provides a managed Effect runtime by composing contributed layers.',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents } from '../common';\nimport { Capability, Plugin } from '../core';\n\nimport { meta } from './meta';\n\nconst ManagedRuntimeCapability = Capability.lazy('ManagedRuntime', () => import('./capability'));\n\nexport const RuntimePlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activatesBefore: [ActivationEvents.SetupLayer],\n activatesAfter: [ActivationEvents.ManagedRuntimeReady],\n activate: ManagedRuntimeCapability,\n }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAa;AACf;;;ACDA,IAAMC,mBAAmBC,mBAAWC,KAAK,oBAAoB,MAAM,OAAO,mCAAA,CAAA;AAC1E,IAAMC,sBAAsBF,mBAAWC,KAAK,uBAAuB,MAAM,OAAO,2BAAA,CAAA;AAEzE,IAAME,kBAAkBC,eAAOC,OAAOC,IAAAA,EAAMC,KACjDH,eAAOI,UAAU;EACfC,aAAaC,0BAAiBC;EAC9BC,iBAAiB;IAACF,0BAAiBG;;EACnCC,gBAAgB;IAACJ,0BAAiBK;;EAClCC,UAAUjB;AACZ,CAAA,GACAK,eAAOI,UAAU;EACfC,aAAaC,0BAAiBK;EAC9BC,UAAUd;AACZ,CAAA,GACAE,eAAOa,IAAI;;;ACjBN,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAa;AACf;;;ACDA,IAAMC,2BAA2BC,mBAAWC,KAAK,kBAAkB,MAAM,OAAO,2BAAA,CAAA;AAEzE,IAAMC,gBAAgBC,eAAOC,OAAOC,KAAAA,EAAMC,KAC/CH,eAAOI,UAAU;EACfC,aAAaC,0BAAiBC;EAC9BC,iBAAiB;IAACF,0BAAiBG;;EACnCC,gBAAgB;IAACJ,0BAAiBK;;EAClCC,UAAUhB;AACZ,CAAA,GACAI,eAAOa,IAAI;",
|
|
6
|
+
"names": ["meta", "id", "name", "description", "OperationInvoker", "Capability", "lazy", "HistoryCapabilities", "OperationPlugin", "Plugin", "define", "meta", "pipe", "addModule", "activatesOn", "ActivationEvents", "ManagedRuntimeReady", "activatesBefore", "SetupOperationResolver", "activatesAfter", "OperationInvokerReady", "activate", "make", "meta", "id", "name", "description", "ManagedRuntimeCapability", "Capability", "lazy", "RuntimePlugin", "Plugin", "define", "meta", "pipe", "addModule", "activatesOn", "ActivationEvents", "Startup", "activatesBefore", "SetupLayer", "activatesAfter", "ManagedRuntimeReady", "activate", "make"]
|
|
7
7
|
}
|