@dxos/app-framework 0.8.4-main.c85a9c8dae → 0.8.4-main.cb12b3f963
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/dist/lib/browser/{capability-7RLVE42K.mjs → capability-5RRH3WIB.mjs} +11 -10
- package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
- package/dist/lib/browser/{capability-2GL5JAGJ.mjs → capability-LUKGKUQH.mjs} +10 -9
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs → chunk-23D4SJUE.mjs} +11 -13
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs.map → chunk-23D4SJUE.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-YNFPIQGB.mjs → chunk-3JWJXGLK.mjs} +5 -2
- package/dist/lib/browser/chunk-3JWJXGLK.mjs.map +7 -0
- package/dist/lib/browser/chunk-45CHLTBV.mjs +34 -0
- package/dist/lib/browser/chunk-45CHLTBV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PKQT6C53.mjs → chunk-66IXTIVK.mjs} +3 -2
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
- package/dist/lib/browser/chunk-CZ4BIAHH.mjs +422 -0
- package/dist/lib/browser/chunk-CZ4BIAHH.mjs.map +7 -0
- package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
- package/dist/lib/browser/{chunk-FHQTHCX7.mjs.map → chunk-FJ4765WW.mjs.map} +3 -3
- package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
- package/dist/lib/browser/chunk-NBXPP7JR.mjs +1174 -0
- package/dist/lib/browser/chunk-NBXPP7JR.mjs.map +7 -0
- package/dist/lib/browser/chunk-PC4NOADA.mjs +471 -0
- package/dist/lib/browser/chunk-PC4NOADA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-REORGDJT.mjs → chunk-WBHCSOBW.mjs} +18 -18
- package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FNKT2QQ2.mjs → chunk-Z55LVAGN.mjs} +85 -17
- package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZRWBPIZG.mjs → chunk-ZGJAZSNE.mjs} +9 -37
- package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +16 -29
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/common/activation-events.mjs +9 -8
- package/dist/lib/browser/common/capabilities.mjs +9 -8
- package/dist/lib/browser/core/activation-event.mjs +1 -1
- package/dist/lib/browser/core/capability.mjs +3 -1
- package/dist/lib/browser/core/plugin-manager.mjs +8 -4
- package/dist/lib/browser/core/plugin.mjs +14 -4
- package/dist/lib/browser/core/url-loader.mjs +24 -0
- package/dist/lib/browser/index.mjs +37 -22
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{invoker-capability-BNLVNYHU.mjs → invoker-capability-K4GHUFXF.mjs} +22 -14
- package/dist/lib/browser/invoker-capability-K4GHUFXF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +184 -49
- 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 +18 -15
- package/dist/lib/node-esm/{capability-CHIMU6LX.mjs → capability-FCGZVIEG.mjs} +10 -9
- package/dist/lib/{browser/capability-2GL5JAGJ.mjs.map → node-esm/capability-FCGZVIEG.mjs.map} +1 -1
- package/dist/lib/node-esm/{capability-EVZK4REM.mjs → capability-JOIQ2MQE.mjs} +11 -10
- package/dist/lib/node-esm/capability-JOIQ2MQE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs → chunk-37Z53PXZ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs.map → chunk-37Z53PXZ.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs +472 -0
- package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6XW6LET6.mjs +35 -0
- package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2A4PRBIX.mjs → chunk-D347W3KO.mjs} +9 -37
- package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CJCQS2YL.mjs → chunk-HTBJU5FX.mjs} +85 -17
- package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-M3HKPRPO.mjs +423 -0
- package/dist/lib/node-esm/chunk-M3HKPRPO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MUVUQC3G.mjs +1175 -0
- package/dist/lib/node-esm/chunk-MUVUQC3G.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs → chunk-SBS2YMPT.mjs} +11 -13
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs.map → chunk-SBS2YMPT.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-SB5ODNPX.mjs → chunk-SDJ4B2LU.mjs} +5 -2
- package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UFW652GS.mjs → chunk-WFSRZKBP.mjs} +18 -18
- package/dist/lib/node-esm/chunk-WFSRZKBP.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-WKTLE7MG.mjs +585 -0
- package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7OWSHPYK.mjs → chunk-XOCUANHO.mjs} +3 -2
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +16 -29
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/common/activation-events.mjs +9 -8
- package/dist/lib/node-esm/common/capabilities.mjs +9 -8
- package/dist/lib/node-esm/core/activation-event.mjs +1 -1
- package/dist/lib/node-esm/core/capability.mjs +3 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +8 -4
- package/dist/lib/node-esm/core/plugin.mjs +14 -4
- package/dist/lib/node-esm/core/url-loader.mjs +25 -0
- package/dist/lib/node-esm/index.mjs +37 -22
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{invoker-capability-VF6SP44V.mjs → invoker-capability-XEPW5LMJ.mjs} +22 -14
- package/dist/lib/node-esm/invoker-capability-XEPW5LMJ.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +184 -49
- 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 +18 -15
- package/dist/plugin/node-esm/index.mjs +875 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/common/activation-events.d.ts +1 -1
- package/dist/types/src/common/activation-events.d.ts.map +1 -1
- 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 +4 -8
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +8 -22
- package/dist/types/src/common/operations.d.ts.map +1 -1
- package/dist/types/src/core/activation-event.d.ts +5 -5
- package/dist/types/src/core/activation-event.d.ts.map +1 -1
- package/dist/types/src/core/capability-manager.d.ts +5 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +8 -2
- package/dist/types/src/core/capability.d.ts.map +1 -1
- 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 +6 -0
- 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 +177 -4
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
- 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 +113 -7
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/registry.d.ts +101 -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/plugin-operation/OperationPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/errors.d.ts +30 -3
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/testing.d.ts +27 -77
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
- package/dist/types/src/testing/harness.d.ts +67 -0
- package/dist/types/src/testing/harness.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/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.map +1 -1
- 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 +3 -2
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
- 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/index.d.ts +22 -6
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- 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 +1 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/index.d.ts +0 -1
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.d.ts +43 -4
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
- package/dist/types/src/vite-plugin/boot-loader/index.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 +15 -0
- package/package.json +48 -53
- package/src/cli/cli.ts +3 -3
- package/src/common/activation-events.ts +6 -6
- package/src/common/annotations.ts +3 -0
- package/src/common/capabilities.ts +18 -23
- package/src/common/operations.ts +7 -10
- package/src/context.ts +1 -1
- package/src/core/activation-event.ts +5 -2
- package/src/core/capability-manager.test.ts +1 -1
- package/src/core/capability-manager.ts +22 -1
- package/src/core/capability.ts +13 -2
- package/src/core/edge-registry-plugin-provider.ts +92 -0
- package/src/core/index.ts +6 -0
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +855 -29
- package/src/core/plugin-manager.ts +808 -188
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +144 -12
- package/src/core/registry.ts +157 -0
- package/src/core/url-loader.test.ts +221 -0
- package/src/core/url-loader.ts +388 -0
- package/src/plugin-operation/OperationPlugin.ts +2 -3
- package/src/plugin-operation/history/capability.ts +1 -2
- package/src/plugin-operation/history/errors.ts +2 -6
- package/src/plugin-operation/history/history-tracker.test.ts +37 -43
- package/src/plugin-operation/history/history-tracker.ts +1 -2
- package/src/plugin-operation/history/types.ts +1 -1
- package/src/plugin-operation/history/undo-mapping.ts +1 -1
- package/src/plugin-operation/history/undo-registry.test.ts +3 -4
- package/src/plugin-operation/history/undo-registry.ts +1 -1
- package/src/plugin-operation/invoker-capability.ts +19 -4
- package/src/plugin-operation/meta.ts +1 -1
- package/src/plugin-operation/testing.ts +26 -45
- package/src/plugin-runtime/RuntimePlugin.ts +2 -3
- package/src/plugin-runtime/meta.ts +1 -1
- package/src/testing/harness.ts +229 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +3 -3
- package/src/testing/withPluginManager.stories.tsx +1 -2
- package/src/testing/withPluginManager.tsx +40 -18
- package/src/ui/components/App/App.stories.tsx +5 -5
- package/src/ui/components/App/App.tsx +29 -5
- package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
- package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
- package/src/ui/components/Placeholder/index.ts +5 -0
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +8 -6
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +16 -15
- package/src/ui/components/Surface/SurfaceComponent.tsx +109 -53
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/index.ts +35 -1
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +164 -12
- package/src/ui/components/index.ts +1 -0
- package/src/ui/hooks/index.ts +0 -1
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +226 -15
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
- package/src/vite-plugin/boot-loader/index.ts +112 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +524 -0
- package/src/vite-plugin/index.ts +10 -0
- package/src/vite-plugin/manifest.test.ts +46 -0
- package/src/vite-plugin/manifest.ts +57 -0
- package/src/vite-plugin/packages.ts +188 -0
- package/tsconfig.json +19 -1
- package/tsconfig.node.json +1 -1
- package/vitest.config.ts +1 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-7RLVE42K.mjs.map +0 -7
- package/dist/lib/browser/chunk-4CTRO67U.mjs +0 -703
- package/dist/lib/browser/chunk-4CTRO67U.mjs.map +0 -7
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +0 -8
- package/dist/lib/browser/chunk-FNKT2QQ2.mjs.map +0 -7
- package/dist/lib/browser/chunk-HE27PNNQ.mjs +0 -824
- package/dist/lib/browser/chunk-HE27PNNQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NPUEVX42.mjs +0 -34
- package/dist/lib/browser/chunk-NPUEVX42.mjs.map +0 -7
- package/dist/lib/browser/chunk-PKQT6C53.mjs.map +0 -7
- package/dist/lib/browser/chunk-REORGDJT.mjs.map +0 -7
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
- package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZRWBPIZG.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs.map +0 -7
- package/dist/lib/node-esm/capability-EVZK4REM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2A4PRBIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs +0 -704
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CJCQS2YL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs +0 -825
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs +0 -35
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFW652GS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs.map +0 -7
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts +0 -19
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +0 -1
- package/src/ui/hooks/useOperationResolver.ts +0 -40
- /package/dist/lib/{node-esm/capability-CHIMU6LX.mjs.map → browser/capability-LUKGKUQH.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-YAFEA4GV.mjs.map → core/url-loader.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-Z4TJPSMP.mjs.map → core/url-loader.mjs.map} +0 -0
package/moon.yml
CHANGED
|
@@ -20,3 +20,18 @@ tasks:
|
|
|
20
20
|
- '--entryPoint=src/common/activation-events.ts'
|
|
21
21
|
- '--entryPoint=src/ui/index.ts'
|
|
22
22
|
- '--entryPoint=src/testing/index.ts'
|
|
23
|
+
- '--entryPoint=src/testing/react.tsx'
|
|
24
|
+
- '--entryPoint=src/core/url-loader.ts'
|
|
25
|
+
deps:
|
|
26
|
+
- compile-plugin
|
|
27
|
+
compile-plugin:
|
|
28
|
+
command: dx-compile
|
|
29
|
+
args:
|
|
30
|
+
- '--entryPoint=src/vite-plugin/index.ts'
|
|
31
|
+
- '--outputPath=dist/plugin'
|
|
32
|
+
- '--platform=node'
|
|
33
|
+
deps:
|
|
34
|
+
- ^:compile
|
|
35
|
+
- dx-compile:compile
|
|
36
|
+
outputs:
|
|
37
|
+
- dist/plugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/app-framework",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.cb12b3f963",
|
|
4
4
|
"description": "A framework for building applications from composible plugins.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -55,6 +55,16 @@
|
|
|
55
55
|
"node": "./dist/lib/node-esm/plugin-manager/index.mjs",
|
|
56
56
|
"types": "./dist/types/src/plugin-manager/index.d.ts"
|
|
57
57
|
},
|
|
58
|
+
"./UrlLoader": {
|
|
59
|
+
"source": "./src/core/url-loader.ts",
|
|
60
|
+
"browser": "./dist/lib/browser/url-loader/index.mjs",
|
|
61
|
+
"node": "./dist/lib/node-esm/url-loader/index.mjs",
|
|
62
|
+
"types": "./dist/types/src/url-loader/index.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./vite-plugin": {
|
|
65
|
+
"import": "./dist/plugin/node-esm/index.mjs",
|
|
66
|
+
"types": "./dist/types/src/vite-plugin/index.d.ts"
|
|
67
|
+
},
|
|
58
68
|
"./cli": {
|
|
59
69
|
"source": "./src/cli/index.ts",
|
|
60
70
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
@@ -67,6 +77,12 @@
|
|
|
67
77
|
"node": "./dist/lib/node-esm/testing/index.mjs",
|
|
68
78
|
"types": "./dist/types/src/testing/index.d.ts"
|
|
69
79
|
},
|
|
80
|
+
"./testing-react": {
|
|
81
|
+
"source": "./src/testing/react.tsx",
|
|
82
|
+
"browser": "./dist/lib/browser/testing/react.mjs",
|
|
83
|
+
"node": "./dist/lib/node-esm/testing/react.mjs",
|
|
84
|
+
"types": "./dist/types/src/testing/react.d.ts"
|
|
85
|
+
},
|
|
70
86
|
"./ui": {
|
|
71
87
|
"source": "./src/ui/index.ts",
|
|
72
88
|
"browser": "./dist/lib/browser/ui/index.mjs",
|
|
@@ -75,72 +91,51 @@
|
|
|
75
91
|
}
|
|
76
92
|
},
|
|
77
93
|
"types": "dist/types/src/index.d.ts",
|
|
78
|
-
"typesVersions": {
|
|
79
|
-
"*": {
|
|
80
|
-
"ActivationEvent": [
|
|
81
|
-
"dist/types/src/activation-event/index.d.ts"
|
|
82
|
-
],
|
|
83
|
-
"ActivationEvents": [
|
|
84
|
-
"dist/types/src/common/activation-events.d.ts"
|
|
85
|
-
],
|
|
86
|
-
"Capabilities": [
|
|
87
|
-
"dist/types/src/common/capabilities.d.ts"
|
|
88
|
-
],
|
|
89
|
-
"Capability": [
|
|
90
|
-
"dist/types/src/capability/index.d.ts"
|
|
91
|
-
],
|
|
92
|
-
"Plugin": [
|
|
93
|
-
"dist/types/src/plugin/index.d.ts"
|
|
94
|
-
],
|
|
95
|
-
"PluginManager": [
|
|
96
|
-
"dist/types/src/plugin-manager/index.d.ts"
|
|
97
|
-
],
|
|
98
|
-
"cli": [
|
|
99
|
-
"dist/types/src/cli/index.d.ts"
|
|
100
|
-
],
|
|
101
|
-
"testing": [
|
|
102
|
-
"dist/types/src/testing/index.d.ts"
|
|
103
|
-
],
|
|
104
|
-
"ui": [
|
|
105
|
-
"dist/types/src/ui/index.d.ts"
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
94
|
"dependencies": {
|
|
110
95
|
"@effect/cli": "0.73.2",
|
|
111
|
-
"
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/log": "0.8.4-main.
|
|
96
|
+
"cjs-module-lexer": "^2.2.0",
|
|
97
|
+
"@dxos/async": "0.8.4-main.cb12b3f963",
|
|
98
|
+
"@dxos/context": "0.8.4-main.cb12b3f963",
|
|
99
|
+
"@dxos/debug": "0.8.4-main.cb12b3f963",
|
|
100
|
+
"@dxos/compute": "0.8.4-main.cb12b3f963",
|
|
101
|
+
"@dxos/echo": "0.8.4-main.cb12b3f963",
|
|
102
|
+
"@dxos/effect": "0.8.4-main.cb12b3f963",
|
|
103
|
+
"@dxos/errors": "0.8.4-main.cb12b3f963",
|
|
104
|
+
"@dxos/invariant": "0.8.4-main.cb12b3f963",
|
|
105
|
+
"@dxos/edge-client": "0.8.4-main.cb12b3f963",
|
|
106
|
+
"@dxos/protocols": "0.8.4-main.cb12b3f963",
|
|
107
|
+
"@dxos/log": "0.8.4-main.cb12b3f963",
|
|
108
|
+
"@dxos/operation": "0.8.4-main.cb12b3f963",
|
|
109
|
+
"@dxos/react-error-boundary": "0.8.4-main.cb12b3f963",
|
|
110
|
+
"@dxos/react-hooks": "0.8.4-main.cb12b3f963",
|
|
111
|
+
"@dxos/react-ui": "0.8.4-main.cb12b3f963",
|
|
112
|
+
"@dxos/ui-theme": "0.8.4-main.cb12b3f963",
|
|
113
|
+
"@dxos/util": "0.8.4-main.cb12b3f963",
|
|
114
|
+
"@dxos/web-context": "0.8.4-main.cb12b3f963",
|
|
115
|
+
"@dxos/web-context-react": "0.8.4-main.cb12b3f963"
|
|
123
116
|
},
|
|
124
117
|
"devDependencies": {
|
|
125
118
|
"@effect-atom/atom-react": "^0.5.0",
|
|
126
119
|
"@effect/platform": "0.94.4",
|
|
127
|
-
"@effect/vitest": "0.
|
|
120
|
+
"@effect/vitest": "0.29.0",
|
|
121
|
+
"@testing-library/react": "^16.3.0",
|
|
128
122
|
"@types/react": "~19.2.7",
|
|
129
|
-
"effect": "3.
|
|
123
|
+
"effect": "3.20.0",
|
|
130
124
|
"react": "~19.2.3",
|
|
131
125
|
"react-dom": "~19.2.3",
|
|
132
126
|
"typedoc": "0.28.1",
|
|
133
|
-
"
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
136
|
-
"@dxos/
|
|
137
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
138
|
-
"@dxos/
|
|
127
|
+
"vite": "^8.0.10",
|
|
128
|
+
"@dxos/echo-db": "0.8.4-main.cb12b3f963",
|
|
129
|
+
"@dxos/brand": "0.8.4-main.cb12b3f963",
|
|
130
|
+
"@dxos/random": "0.8.4-main.cb12b3f963",
|
|
131
|
+
"@dxos/storybook-utils": "0.8.4-main.cb12b3f963",
|
|
132
|
+
"@dxos/test-utils": "0.8.4-main.cb12b3f963"
|
|
139
133
|
},
|
|
140
134
|
"peerDependencies": {
|
|
141
135
|
"@effect-atom/atom-react": "^0.5.0",
|
|
142
136
|
"@effect/platform": "0.94.4",
|
|
143
|
-
"
|
|
137
|
+
"@testing-library/react": "^16.3.0",
|
|
138
|
+
"effect": "3.20.0",
|
|
144
139
|
"react": "~19.2.3",
|
|
145
140
|
"react-dom": "~19.2.3"
|
|
146
141
|
},
|
package/src/cli/cli.ts
CHANGED
|
@@ -17,7 +17,7 @@ const defaultPluginLoader =
|
|
|
17
17
|
Effect.sync(() => {
|
|
18
18
|
const plugin = plugins.find((plugin) => plugin.meta.id === id);
|
|
19
19
|
invariant(plugin, `Plugin not found: ${id}`);
|
|
20
|
-
return plugin;
|
|
20
|
+
return { plugin };
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
type SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];
|
|
@@ -75,13 +75,13 @@ export const createCliApp = Effect.fn(function* ({
|
|
|
75
75
|
manager.capabilities.contribute({
|
|
76
76
|
interface: Capabilities.PluginManager,
|
|
77
77
|
implementation: manager,
|
|
78
|
-
module: 'dxos.
|
|
78
|
+
module: 'org.dxos.app-framework.plugin-manager',
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
manager.capabilities.contribute({
|
|
82
82
|
interface: Capabilities.AtomRegistry,
|
|
83
83
|
implementation: manager.registry,
|
|
84
|
-
module: 'dxos.
|
|
84
|
+
module: 'org.dxos.app-framework.atom-registry',
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
// Activate startup event to load CLI commands and Effect layers.
|
|
@@ -7,7 +7,7 @@ import { ActivationEvent as ActivationEvent$ } from '../core';
|
|
|
7
7
|
/**
|
|
8
8
|
* Fired when the app is started.
|
|
9
9
|
*/
|
|
10
|
-
export const Startup = ActivationEvent$.make('dxos.
|
|
10
|
+
export const Startup = ActivationEvent$.make('org.dxos.app-framework.event.startup');
|
|
11
11
|
|
|
12
12
|
//
|
|
13
13
|
// Dependent Events
|
|
@@ -16,18 +16,18 @@ export const Startup = ActivationEvent$.make('dxos.org/app-framework/event/start
|
|
|
16
16
|
/**
|
|
17
17
|
* Fired to load any newly available surfaces.
|
|
18
18
|
*/
|
|
19
|
-
export const SetupReactSurface = ActivationEvent$.make('dxos.
|
|
19
|
+
export const SetupReactSurface = ActivationEvent$.make('org.dxos.app-framework.event.setup-react-surface');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Fired before the operation invoker is activated.
|
|
23
23
|
*/
|
|
24
|
-
export const
|
|
24
|
+
export const SetupOperationHandler = ActivationEvent$.make('org.dxos.app-framework.event.setup-operation-handler');
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Fired before the managed runtime is created.
|
|
28
28
|
* Plugins should contribute their Layer capabilities before this event.
|
|
29
29
|
*/
|
|
30
|
-
export const SetupLayer = ActivationEvent$.make('dxos.
|
|
30
|
+
export const SetupLayer = ActivationEvent$.make('org.dxos.app-framework.event.setup-layer');
|
|
31
31
|
|
|
32
32
|
//
|
|
33
33
|
// Triggered Events
|
|
@@ -36,9 +36,9 @@ export const SetupLayer = ActivationEvent$.make('dxos.org/app-framework/event/se
|
|
|
36
36
|
/**
|
|
37
37
|
* Fired after the operation invoker is ready.
|
|
38
38
|
*/
|
|
39
|
-
export const OperationInvokerReady = ActivationEvent$.make('dxos.
|
|
39
|
+
export const OperationInvokerReady = ActivationEvent$.make('org.dxos.app-framework.event.operation-invoker-ready');
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Fired after the managed runtime is ready.
|
|
43
43
|
*/
|
|
44
|
-
export const ManagedRuntimeReady = ActivationEvent$.make('dxos.
|
|
44
|
+
export const ManagedRuntimeReady = ActivationEvent$.make('org.dxos.app-framework.event.managed-runtime-ready');
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import type * as Command$ from '@effect/cli/Command';
|
|
6
5
|
import { type Atom, type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import type * as Command$ from '@effect/cli/Command';
|
|
7
7
|
import * as Effect from 'effect/Effect';
|
|
8
8
|
import type * as Layer$ from 'effect/Layer';
|
|
9
9
|
import type * as ManagedRuntime$ from 'effect/ManagedRuntime';
|
|
10
10
|
import type { FC, PropsWithChildren } from 'react';
|
|
11
11
|
|
|
12
|
-
import type {
|
|
12
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
13
|
+
import { OperationInvoker as OperationInvoker$ } from '@dxos/operation';
|
|
13
14
|
|
|
14
15
|
import { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';
|
|
15
16
|
import type {
|
|
@@ -23,19 +24,19 @@ import type { Surface } from '../ui';
|
|
|
23
24
|
* Null capability.
|
|
24
25
|
* @category Capability
|
|
25
26
|
*/
|
|
26
|
-
export const Null = Capability$.make<null>('dxos.
|
|
27
|
+
export const Null = Capability$.make<null>('org.dxos.app-framework.capability.null');
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* @category Capability
|
|
30
31
|
*/
|
|
31
32
|
export const PluginManager = Capability$.make<PluginManager$.PluginManager>(
|
|
32
|
-
'dxos.
|
|
33
|
+
'org.dxos.app-framework.capability.plugin-manager',
|
|
33
34
|
);
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* @category Capability
|
|
37
38
|
*/
|
|
38
|
-
export const AtomRegistry = Capability$.make<Registry.Registry>('dxos.
|
|
39
|
+
export const AtomRegistry = Capability$.make<Registry.Registry>('org.dxos.app-framework.capability.atom-registry');
|
|
39
40
|
|
|
40
41
|
export type ReactContext = Readonly<{
|
|
41
42
|
id: string;
|
|
@@ -46,14 +47,14 @@ export type ReactContext = Readonly<{
|
|
|
46
47
|
/**
|
|
47
48
|
* @category Capability
|
|
48
49
|
*/
|
|
49
|
-
export const ReactContext = Capability$.make<ReactContext>('dxos.
|
|
50
|
+
export const ReactContext = Capability$.make<ReactContext>('org.dxos.app-framework.capability.react-context');
|
|
50
51
|
|
|
51
52
|
export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* @category Capability
|
|
55
56
|
*/
|
|
56
|
-
export const ReactRoot = Capability$.make<ReactRoot>('dxos.
|
|
57
|
+
export const ReactRoot = Capability$.make<ReactRoot>('org.dxos.app-framework.capability.react-root');
|
|
57
58
|
|
|
58
59
|
/**
|
|
59
60
|
* Surface definitions that can be either React components or Web Components.
|
|
@@ -63,39 +64,33 @@ export type ReactSurface = Surface.Definition | readonly Surface.Definition[];
|
|
|
63
64
|
/**
|
|
64
65
|
* @category Capability
|
|
65
66
|
*/
|
|
66
|
-
export const ReactSurface = Capability$.make<ReactSurface>('dxos.
|
|
67
|
+
export const ReactSurface = Capability$.make<ReactSurface>('org.dxos.app-framework.common.react-surface');
|
|
67
68
|
|
|
68
69
|
export type AnyCommand = Command$.Command<any, any, any, any>;
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* @category Capability
|
|
72
73
|
*/
|
|
73
|
-
export const Command = Capability$.make<AnyCommand>('dxos.
|
|
74
|
+
export const Command = Capability$.make<AnyCommand>('org.dxos.app-framework.capability.command');
|
|
74
75
|
|
|
75
76
|
/**
|
|
76
77
|
* @category Capability
|
|
77
78
|
*/
|
|
78
|
-
export const Layer = Capability$.make<Layer$.Layer<any, any, any>>('dxos.
|
|
79
|
+
export const Layer = Capability$.make<Layer$.Layer<any, any, any>>('org.dxos.app-framework.capability.layer');
|
|
79
80
|
|
|
80
81
|
export type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* @category Capability
|
|
84
85
|
*/
|
|
85
|
-
export const ManagedRuntime = Capability$.make<ManagedRuntime>('dxos.
|
|
86
|
+
export const ManagedRuntime = Capability$.make<ManagedRuntime>('org.dxos.app-framework.capability.managed-runtime');
|
|
86
87
|
|
|
87
88
|
//
|
|
88
89
|
// Operation System Capabilities
|
|
89
90
|
//
|
|
90
91
|
|
|
91
|
-
export
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Handler registration for operations - contributed by plugins.
|
|
95
|
-
* @category Capability
|
|
96
|
-
*/
|
|
97
|
-
export const OperationResolver = Capability$.make<OperationResolver[]>(
|
|
98
|
-
'dxos.org/app-framework/capability/operation-resolver',
|
|
92
|
+
export const OperationHandler = Capability$.make<OperationHandlerSet.OperationHandlerSet>(
|
|
93
|
+
'org.dxos.app-framework.capability.operation-handler',
|
|
99
94
|
);
|
|
100
95
|
|
|
101
96
|
export type UndoMapping = UndoMapping$.UndoMapping;
|
|
@@ -104,7 +99,7 @@ export type UndoMapping = UndoMapping$.UndoMapping;
|
|
|
104
99
|
* Undo mapping registration - contributed by plugins.
|
|
105
100
|
* @category Capability
|
|
106
101
|
*/
|
|
107
|
-
export const UndoMapping = Capability$.make<UndoMapping[]>('dxos.
|
|
102
|
+
export const UndoMapping = Capability$.make<UndoMapping[]>('org.dxos.app-framework.capability.undo-mapping');
|
|
108
103
|
|
|
109
104
|
export type OperationInvoker = OperationInvoker$.OperationInvoker;
|
|
110
105
|
|
|
@@ -113,7 +108,7 @@ export type OperationInvoker = OperationInvoker$.OperationInvoker;
|
|
|
113
108
|
* @category Capability
|
|
114
109
|
*/
|
|
115
110
|
export const OperationInvoker = Capability$.make<OperationInvoker>(
|
|
116
|
-
'dxos.
|
|
111
|
+
'org.dxos.app-framework.capability.operation-invoker',
|
|
117
112
|
);
|
|
118
113
|
|
|
119
114
|
export type UndoRegistry = UndoRegistry$.UndoRegistry;
|
|
@@ -122,7 +117,7 @@ export type UndoRegistry = UndoRegistry$.UndoRegistry;
|
|
|
122
117
|
* Undo registry - provided by OperationPlugin.
|
|
123
118
|
* @category Capability
|
|
124
119
|
*/
|
|
125
|
-
export const UndoRegistry = Capability$.make<UndoRegistry>('dxos.
|
|
120
|
+
export const UndoRegistry = Capability$.make<UndoRegistry>('org.dxos.app-framework.capability.undo-registry');
|
|
126
121
|
|
|
127
122
|
export type HistoryTracker = HistoryTracker$.HistoryTracker;
|
|
128
123
|
|
|
@@ -130,7 +125,7 @@ export type HistoryTracker = HistoryTracker$.HistoryTracker;
|
|
|
130
125
|
* History tracker - provided by OperationPlugin.
|
|
131
126
|
* @category Capability
|
|
132
127
|
*/
|
|
133
|
-
export const HistoryTracker = Capability$.make<HistoryTracker>('dxos.
|
|
128
|
+
export const HistoryTracker = Capability$.make<HistoryTracker>('org.dxos.app-framework.capability.history-tracker');
|
|
134
129
|
|
|
135
130
|
//
|
|
136
131
|
// Atom Capability Helpers
|
package/src/common/operations.ts
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Operation } from '@dxos/
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
8
|
|
|
9
9
|
import { Capability } from '../core';
|
|
10
|
-
|
|
11
10
|
import { Label } from './translations';
|
|
12
11
|
|
|
13
|
-
const UNDO_NAMESPACE = 'dxos.
|
|
12
|
+
const UNDO_NAMESPACE = 'org.dxos.app-framework.undo';
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Operations related to undo/history functionality.
|
|
@@ -22,17 +21,15 @@ export namespace UndoOperation {
|
|
|
22
21
|
*/
|
|
23
22
|
export const ShowUndo = Operation.make({
|
|
24
23
|
meta: {
|
|
25
|
-
key: `${UNDO_NAMESPACE}
|
|
24
|
+
key: `${UNDO_NAMESPACE}.operation.show-undo`,
|
|
26
25
|
name: 'Show Undo',
|
|
27
26
|
description: 'Show an undo toast notification.',
|
|
28
27
|
},
|
|
29
28
|
executionMode: 'sync',
|
|
30
29
|
services: [Capability.Service],
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
output: Schema.Void,
|
|
36
|
-
},
|
|
30
|
+
input: Schema.Struct({
|
|
31
|
+
message: Schema.optional(Label.annotations({ description: 'The message to display in the undo toast.' })),
|
|
32
|
+
}),
|
|
33
|
+
output: Schema.Void,
|
|
37
34
|
});
|
|
38
35
|
}
|
package/src/context.ts
CHANGED
|
@@ -6,4 +6,4 @@ import { createContext } from '@dxos/web-context';
|
|
|
6
6
|
|
|
7
7
|
import { type PluginManager } from './core';
|
|
8
8
|
|
|
9
|
-
export const PluginManagerContext = createContext<PluginManager.PluginManager>('dxos.
|
|
9
|
+
export const PluginManagerContext = createContext<PluginManager.PluginManager>('org.dxos.app-framework.plugin-manager');
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { compositeKey } from '@dxos/util';
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* A unique string identifier representing an event.
|
|
7
9
|
* This is expected to be a URI, where initial parts are often the id of the plugin whose package defines the event.
|
|
8
10
|
*
|
|
9
|
-
* @example dxos.
|
|
11
|
+
* @example org.dxos.plugin.example.event.ready
|
|
10
12
|
*/
|
|
11
13
|
export type ActivationEvent = {
|
|
12
14
|
id: string;
|
|
@@ -31,7 +33,8 @@ export const make = (id: string, specifier?: string) => {
|
|
|
31
33
|
/**
|
|
32
34
|
* Helper to create an activation event key.
|
|
33
35
|
*/
|
|
34
|
-
export const eventKey = (event: ActivationEvent) =>
|
|
36
|
+
export const eventKey = (event: ActivationEvent) =>
|
|
37
|
+
event.specifier ? compositeKey(event.id, event.specifier) : event.id;
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Helper to create an activation event that triggers when any of the given events are activated.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { describe, expect, it, onTestFinished } from '@effect/vitest';
|
|
6
5
|
import { Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import { describe, expect, it, onTestFinished } from '@effect/vitest';
|
|
7
7
|
import * as Effect from 'effect/Effect';
|
|
8
8
|
|
|
9
9
|
import * as Capability from './capability';
|
|
@@ -59,6 +59,12 @@ export interface CapabilityManager {
|
|
|
59
59
|
* @returns The capability.
|
|
60
60
|
*/
|
|
61
61
|
waitFor<T>(interfaceDef: Capability.InterfaceDef<T>): Effect.Effect<T, Error>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get capabilities grouped by the module that contributed them.
|
|
65
|
+
* @returns An atom containing a record from module ID to capability implementations.
|
|
66
|
+
*/
|
|
67
|
+
atomByModule<T>(interfaceDef: Capability.InterfaceDef<T>): Atom.Atom<Record<string, T[]>>;
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
/**
|
|
@@ -75,7 +81,18 @@ class CapabilityManagerImpl implements CapabilityManager {
|
|
|
75
81
|
return Atom.make((get) => {
|
|
76
82
|
const current = get(this._capabilityEntries(id));
|
|
77
83
|
return current.map((c) => c.implementation);
|
|
78
|
-
});
|
|
84
|
+
}).pipe(Atom.keepAlive);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
readonly _capabilitiesByModule = Atom.family<string, Atom.Atom<Record<string, unknown[]>>>((id: string) => {
|
|
88
|
+
return Atom.make((get) => {
|
|
89
|
+
const entries = get(this._capabilityEntries(id));
|
|
90
|
+
const result: Record<string, unknown[]> = {};
|
|
91
|
+
for (const entry of entries) {
|
|
92
|
+
(result[entry.moduleId] ??= []).push(entry.implementation);
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}).pipe(Atom.keepAlive);
|
|
79
96
|
});
|
|
80
97
|
|
|
81
98
|
readonly _capability = Atom.family<string, Atom.Atom<unknown>>((id: string) => {
|
|
@@ -163,6 +180,10 @@ class CapabilityManagerImpl implements CapabilityManager {
|
|
|
163
180
|
return result;
|
|
164
181
|
});
|
|
165
182
|
}
|
|
183
|
+
|
|
184
|
+
atomByModule<T>(interfaceDef: Capability.InterfaceDef<T>): Atom.Atom<Record<string, T[]>> {
|
|
185
|
+
return this._capabilitiesByModule(interfaceDef.identifier) as Atom.Atom<Record<string, T[]>>;
|
|
186
|
+
}
|
|
166
187
|
}
|
|
167
188
|
|
|
168
189
|
/**
|
package/src/core/capability.ts
CHANGED
|
@@ -62,6 +62,16 @@ export const waitFor = <T>(interfaceDef: InterfaceDef<T>): Effect.Effect<T, Erro
|
|
|
62
62
|
export const atom = <T>(interfaceDef: InterfaceDef<T>): Effect.Effect<Atom.Atom<T[]>, never, Service> =>
|
|
63
63
|
Effect.map(Service, (manager) => manager.atom(interfaceDef));
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Get capabilities grouped by the module that contributed them.
|
|
67
|
+
* @param interfaceDef The interface definition of the capability.
|
|
68
|
+
* @returns An Atom containing a record from module ID to capability implementations.
|
|
69
|
+
*/
|
|
70
|
+
export const atomByModule = <T>(
|
|
71
|
+
interfaceDef: InterfaceDef<T>,
|
|
72
|
+
): Effect.Effect<Atom.Atom<Record<string, T[]>>, never, Service> =>
|
|
73
|
+
Effect.map(Service, (manager) => manager.atomByModule(interfaceDef));
|
|
74
|
+
|
|
65
75
|
const InterfaceDefTypeId: unique symbol = Symbol.for('InterfaceDefTypeId');
|
|
66
76
|
|
|
67
77
|
/**
|
|
@@ -120,6 +130,7 @@ export type ModuleReturn = void | Any | Any[] | readonly Any[] | [Any, ...Any[]]
|
|
|
120
130
|
/**
|
|
121
131
|
* Helper to define the implementation of a capability.
|
|
122
132
|
*/
|
|
133
|
+
// TODO(dmaretskyi): Make the return type non-generic so capabilities are non-discernable.
|
|
123
134
|
export const contributes = <I extends InterfaceDef<any>>(
|
|
124
135
|
interfaceDef: I,
|
|
125
136
|
implementation: Capability<InterfaceDef.Implementation<I>>['implementation'],
|
|
@@ -164,7 +175,7 @@ export const lazy = <T = void, R extends ModuleReturn = ModuleReturn>(
|
|
|
164
175
|
): LazyCapability<T, R> => {
|
|
165
176
|
const lazyFn: LazyCapability<T, R> = (props: T) =>
|
|
166
177
|
Effect.gen(function* () {
|
|
167
|
-
const { default: getCapability } = yield* Effect.
|
|
178
|
+
const { default: getCapability } = yield* Effect.promise(() => c());
|
|
168
179
|
const result = yield* getCapability(props);
|
|
169
180
|
const normalized = result == null ? [] : Array.isArray(result) ? Array.from(result) : [result];
|
|
170
181
|
return normalized as NormalizeReturn<R>;
|
|
@@ -221,7 +232,7 @@ export const getModuleTag = (capability: unknown): string | undefined => {
|
|
|
221
232
|
* export default Capability.makeModule(
|
|
222
233
|
* Effect.fnUntraced(function* (props: { observability: boolean }) {
|
|
223
234
|
* const invoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
224
|
-
* return contributes(Capabilities.
|
|
235
|
+
* return contributes(Capabilities.OperationHandler, ...);
|
|
225
236
|
* })
|
|
226
237
|
* );
|
|
227
238
|
* ```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
8
|
+
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
9
|
+
import { type PluginEntry } from '@dxos/protocols';
|
|
10
|
+
|
|
11
|
+
import * as Registry from './registry';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Maps a wire-format `PluginEntry` (from `@dxos/protocols`) to a
|
|
15
|
+
* `Registry.Plugin` (the app-framework domain type).
|
|
16
|
+
*
|
|
17
|
+
* This is the only translation seam between the two independently-defined type
|
|
18
|
+
* hierarchies — fields are mapped explicitly, with no shared type between them.
|
|
19
|
+
*/
|
|
20
|
+
const toRegistryPlugin = (entry: PluginEntry): Registry.Plugin => ({
|
|
21
|
+
id: entry.meta.id,
|
|
22
|
+
name: entry.meta.name,
|
|
23
|
+
description: entry.meta.description,
|
|
24
|
+
homePage: entry.meta.homePage,
|
|
25
|
+
source: entry.meta.source,
|
|
26
|
+
screenshots: entry.meta.screenshots ? [...entry.meta.screenshots] : undefined,
|
|
27
|
+
tags: entry.meta.tags ? [...entry.meta.tags] : undefined,
|
|
28
|
+
icon: entry.meta.icon,
|
|
29
|
+
iconHue: entry.meta.iconHue,
|
|
30
|
+
moduleUrl: entry.moduleUrl,
|
|
31
|
+
repo: entry.repo,
|
|
32
|
+
version: entry.releaseTag,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Implements `Registry.PluginProvider` against the Edge `/registry` HTTP endpoints.
|
|
37
|
+
*
|
|
38
|
+
* Lives in app-framework (rather than the more obvious home of `@dxos/edge-client`)
|
|
39
|
+
* because edge-client doesn't depend on app-framework; siting the implementation
|
|
40
|
+
* here keeps the dependency arrow `app-framework → edge-client` and avoids a
|
|
41
|
+
* cycle. The class needs only the public `EdgeHttpClient` type, so a one-way
|
|
42
|
+
* type-import is enough.
|
|
43
|
+
*
|
|
44
|
+
* `listVersions` is currently a stub: it returns the single latest version derived
|
|
45
|
+
* from the cached plugin list, so the host's version picker has something to render.
|
|
46
|
+
* The wire contract for the real endpoint already exists — see
|
|
47
|
+
* `GetPluginVersionsResponseBodySchema` in `@dxos/protocols/edge/registry` and
|
|
48
|
+
* {@link EdgeHttpClient.getRegistryPluginVersions} — so once Edge ships
|
|
49
|
+
* `GET /registry/plugins/:repo/versions`, swap this stub for a call to
|
|
50
|
+
* `this._client.getRegistryPluginVersions(...)` and map each entry through a
|
|
51
|
+
* `toRegistryPluginVersion` helper (mirror of {@link toRegistryPlugin}).
|
|
52
|
+
*/
|
|
53
|
+
export class EdgeRegistryPluginProvider implements Registry.PluginProvider {
|
|
54
|
+
// Cached on first load so getPlugin/listVersions can resolve without re-fetching.
|
|
55
|
+
#cachedPlugins: readonly Registry.Plugin[] = [];
|
|
56
|
+
|
|
57
|
+
constructor(private readonly _client: EdgeHttpClient) {}
|
|
58
|
+
|
|
59
|
+
listPlugins(): Effect.Effect<readonly Registry.Plugin[], Error> {
|
|
60
|
+
return Effect.tryPromise({
|
|
61
|
+
try: () => this._client.getRegistryPlugins(Context.default()),
|
|
62
|
+
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
|
63
|
+
}).pipe(
|
|
64
|
+
Effect.map((body) => {
|
|
65
|
+
const plugins = body.plugins.filter((entry) => entry.health === 'ok').map(toRegistryPlugin);
|
|
66
|
+
this.#cachedPlugins = plugins;
|
|
67
|
+
return plugins;
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
listVersions(repo: string): Effect.Effect<readonly Registry.PluginVersion[], Error> {
|
|
73
|
+
// Stub: return only the currently-known version until Edge implements the versions endpoint.
|
|
74
|
+
const plugin = this.#cachedPlugins.find((candidate) => candidate.repo === repo);
|
|
75
|
+
if (!plugin) {
|
|
76
|
+
return Effect.fail(new Error(`Plugin not found in catalog: ${repo}`));
|
|
77
|
+
}
|
|
78
|
+
const version: Registry.PluginVersion = { tag: plugin.version, moduleUrl: plugin.moduleUrl };
|
|
79
|
+
return Effect.succeed([version]);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getPlugin(repo: string, version?: string): Effect.Effect<Registry.Plugin, Error> {
|
|
83
|
+
const plugin = this.#cachedPlugins.find((p) => p.repo === repo);
|
|
84
|
+
if (!plugin) {
|
|
85
|
+
return Effect.fail(new Error(`Plugin not found in catalog: ${repo}`));
|
|
86
|
+
}
|
|
87
|
+
if (version && version !== plugin.version) {
|
|
88
|
+
return Effect.fail(new Error(`Version ${version} not available for ${repo}; only ${plugin.version} is cached`));
|
|
89
|
+
}
|
|
90
|
+
return Effect.succeed(plugin);
|
|
91
|
+
}
|
|
92
|
+
}
|
package/src/core/index.ts
CHANGED
|
@@ -6,4 +6,10 @@ export * as ActivationEvent from './activation-event';
|
|
|
6
6
|
export * as Capability from './capability';
|
|
7
7
|
export * as CapabilityManager from './capability-manager';
|
|
8
8
|
export * as Plugin from './plugin';
|
|
9
|
+
export * as PluginAssetCache from './plugin-asset-cache';
|
|
9
10
|
export * as PluginManager from './plugin-manager';
|
|
11
|
+
export * as PluginManifest from './plugin-manifest';
|
|
12
|
+
export { PLUGIN_DEV_SERVER_PORT } from './plugin-manifest';
|
|
13
|
+
export * as Registry from './registry';
|
|
14
|
+
export { EdgeRegistryPluginProvider } from './edge-registry-plugin-provider';
|
|
15
|
+
export * as UrlLoader from './url-loader';
|