@dxos/app-framework 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b
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 +1 -3
- package/dist/lib/browser/{capability-DU35RXMD.mjs → capability-5RRH3WIB.mjs} +11 -10
- package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
- package/dist/lib/browser/{capability-7LE5X2NH.mjs → capability-LUKGKUQH.mjs} +10 -9
- package/dist/lib/browser/{chunk-4DQMLMGU.mjs → chunk-23D4SJUE.mjs} +11 -13
- package/dist/lib/browser/{chunk-4DQMLMGU.mjs.map → chunk-23D4SJUE.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-ZQO3UZ4R.mjs → chunk-3JWJXGLK.mjs} +6 -4
- 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-7VZJR2OA.mjs +581 -0
- package/dist/lib/browser/chunk-7VZJR2OA.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-JD3Z5NEF.mjs +469 -0
- package/dist/lib/browser/chunk-JD3Z5NEF.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-IGRQWMWW.mjs → chunk-WBHCSOBW.mjs} +18 -18
- package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KWP6PKIU.mjs → chunk-Z55LVAGN.mjs} +87 -19
- package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EIFGKQSA.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 +45 -24
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{invoker-capability-7QW56NOM.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 -45
- 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 +19 -20
- package/dist/lib/node-esm/{capability-OSVYGK4X.mjs → capability-FCGZVIEG.mjs} +10 -9
- package/dist/lib/{browser/capability-7LE5X2NH.mjs.map → node-esm/capability-FCGZVIEG.mjs.map} +1 -1
- package/dist/lib/node-esm/{capability-SR2EIZFP.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-6XW6LET6.mjs +35 -0
- package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DHSHRYIB.mjs → chunk-D347W3KO.mjs} +9 -37
- package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs +470 -0
- package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DZ2XLAGI.mjs → chunk-HTBJU5FX.mjs} +87 -19
- 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-J2PHTRHC.mjs → chunk-SBS2YMPT.mjs} +11 -13
- package/dist/lib/node-esm/{chunk-J2PHTRHC.mjs.map → chunk-SBS2YMPT.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-64IMLAS2.mjs → chunk-SDJ4B2LU.mjs} +6 -4
- package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V24UWT36.mjs +582 -0
- package/dist/lib/node-esm/chunk-V24UWT36.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OQYHRZYF.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-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 +45 -24
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{invoker-capability-CK4AMF2R.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 -45
- 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 +19 -20
- package/dist/plugin/node-esm/index.mjs +893 -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 +14 -8
- 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 +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/meta.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/plugin-runtime/meta.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.d.ts → App/App.d.ts} +3 -2
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
- package/dist/types/src/ui/components/{App.stories.d.ts → App/App.stories.d.ts} +6 -1
- 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/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 -0
- package/dist/types/src/ui/components/{PluginManagerProvider.d.ts → PluginManager/PluginManagerProvider.d.ts} +1 -1
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/{surface → Surface}/SurfaceInfo.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 → Surface}/context.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +3 -3
- 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 +47 -8
- 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/ui/hooks/useSurface.d.ts +2 -2
- package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -1
- package/dist/types/src/ui/index.d.ts +0 -1
- package/dist/types/src/ui/index.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 +2 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +51 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +5 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/packages.d.ts +13 -0
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +16 -4
- package/package.json +58 -62
- 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 +21 -10
- 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 +818 -179
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +145 -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 +2 -1
- package/src/plugin-operation/testing.ts +26 -45
- package/src/plugin-runtime/RuntimePlugin.ts +2 -3
- package/src/plugin-runtime/meta.ts +2 -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 -15
- package/src/ui/components/App/App.stories.tsx +88 -0
- package/src/ui/components/App/App.tsx +81 -0
- package/src/ui/components/App/index.ts +5 -0
- 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/{PluginManagerContext.stories.tsx → PluginManager/PluginManagerContext.stories.tsx} +15 -13
- package/src/ui/components/{PluginManagerProvider.ts → PluginManager/PluginManagerProvider.ts} +1 -1
- package/src/ui/components/PluginManager/index.ts +5 -0
- package/src/ui/components/{surface → Surface}/SurfaceComponent.stories.tsx +25 -23
- package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
- package/src/ui/components/{surface → Surface}/SurfaceInfo.tsx +1 -2
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/index.ts +54 -0
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +269 -0
- package/src/ui/components/index.ts +3 -3
- package/src/ui/hooks/index.ts +0 -1
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +233 -24
- package/src/ui/hooks/useCapabilities.ts +1 -1
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/ui/hooks/useSurface.ts +3 -3
- package/src/ui/index.ts +0 -1
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +270 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +320 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +325 -0
- package/src/vite-plugin/boot-loader/index.ts +5 -0
- package/src/vite-plugin/boot-loader/loader.ts +123 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +527 -0
- package/src/vite-plugin/index.ts +10 -0
- package/src/vite-plugin/manifest.test.ts +46 -0
- package/src/vite-plugin/manifest.ts +57 -0
- package/src/vite-plugin/packages.ts +187 -0
- package/tsconfig.json +22 -1
- package/tsconfig.node.json +2 -4
- package/typedoc.json +2 -4
- package/vitest.config.ts +1 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-DU35RXMD.mjs.map +0 -7
- package/dist/lib/browser/chunk-EIFGKQSA.mjs.map +0 -7
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +0 -8
- package/dist/lib/browser/chunk-IGRQWMWW.mjs.map +0 -7
- package/dist/lib/browser/chunk-KWP6PKIU.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-WGWEEBUV.mjs +0 -807
- package/dist/lib/browser/chunk-WGWEEBUV.mjs.map +0 -7
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
- package/dist/lib/browser/chunk-YZQ6NFG4.mjs +0 -781
- package/dist/lib/browser/chunk-YZQ6NFG4.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZQO3UZ4R.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-7QW56NOM.mjs.map +0 -7
- package/dist/lib/node-esm/capability-SR2EIZFP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-64IMLAS2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DHSHRYIB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DZ2XLAGI.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-OQYHRZYF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VV4YHPQQ.mjs +0 -782
- package/dist/lib/node-esm/chunk-VV4YHPQQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XHAKT6UD.mjs +0 -808
- package/dist/lib/node-esm/chunk-XHAKT6UD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
- package/dist/lib/node-esm/invoker-capability-CK4AMF2R.mjs.map +0 -7
- package/dist/types/src/ui/components/App.d.ts.map +0 -1
- package/dist/types/src/ui/components/App.stories.d.ts.map +0 -1
- package/dist/types/src/ui/components/DefaultFallback.d.ts +0 -8
- package/dist/types/src/ui/components/DefaultFallback.d.ts.map +0 -1
- package/dist/types/src/ui/components/ErrorBoundary.d.ts +0 -30
- package/dist/types/src/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/ui/components/PluginManagerContext.stories.d.ts.map +0 -1
- package/dist/types/src/ui/components/PluginManagerProvider.d.ts.map +0 -1
- package/dist/types/src/ui/components/surface/SurfaceComponent.d.ts +0 -12
- package/dist/types/src/ui/components/surface/SurfaceComponent.d.ts.map +0 -1
- package/dist/types/src/ui/components/surface/SurfaceComponent.stories.d.ts.map +0 -1
- package/dist/types/src/ui/components/surface/index.d.ts +0 -5
- package/dist/types/src/ui/components/surface/index.d.ts.map +0 -1
- package/dist/types/src/ui/components/surface/types.d.ts +0 -94
- package/dist/types/src/ui/components/surface/types.d.ts.map +0 -1
- 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/components/App.stories.tsx +0 -62
- package/src/ui/components/App.tsx +0 -57
- package/src/ui/components/DefaultFallback.tsx +0 -26
- package/src/ui/components/ErrorBoundary.tsx +0 -56
- package/src/ui/components/surface/SurfaceComponent.tsx +0 -262
- package/src/ui/components/surface/index.ts +0 -8
- package/src/ui/components/surface/types.ts +0 -119
- package/src/ui/hooks/useOperationResolver.ts +0 -40
- /package/dist/lib/{node-esm/capability-OSVYGK4X.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/dist/types/src/ui/components/{PluginManagerContext.stories.d.ts → PluginManager/PluginManagerContext.stories.d.ts} +0 -0
- /package/dist/types/src/ui/components/{surface → Surface}/SurfaceComponent.stories.d.ts +0 -0
- /package/dist/types/src/ui/components/{surface → Surface}/SurfaceInfo.d.ts +0 -0
- /package/dist/types/src/ui/components/{surface → Surface}/context.d.ts +0 -0
- /package/src/ui/components/{surface → Surface}/context.ts +0 -0
package/moon.yml
CHANGED
|
@@ -4,6 +4,7 @@ tags:
|
|
|
4
4
|
- pack
|
|
5
5
|
- ts-build
|
|
6
6
|
- ts-test
|
|
7
|
+
- ts-test-storybook
|
|
7
8
|
- typedoc
|
|
8
9
|
- storybook
|
|
9
10
|
tasks:
|
|
@@ -19,7 +20,18 @@ tasks:
|
|
|
19
20
|
- '--entryPoint=src/common/activation-events.ts'
|
|
20
21
|
- '--entryPoint=src/ui/index.ts'
|
|
21
22
|
- '--entryPoint=src/testing/index.ts'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
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.3fbcb4aa9b",
|
|
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",
|
|
@@ -14,132 +14,128 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
17
18
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
19
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/src/index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"./ActivationEvent": {
|
|
23
|
+
"source": "./src/core/activation-event.ts",
|
|
23
24
|
"browser": "./dist/lib/browser/activation-event/index.mjs",
|
|
24
25
|
"node": "./dist/lib/node-esm/activation-event/index.mjs",
|
|
25
|
-
"source": "./src/core/activation-event.ts",
|
|
26
26
|
"types": "./dist/types/src/activation-event/index.d.ts"
|
|
27
27
|
},
|
|
28
28
|
"./ActivationEvents": {
|
|
29
|
+
"source": "./src/common/activation-events.ts",
|
|
29
30
|
"browser": "./dist/lib/browser/common/activation-events.mjs",
|
|
30
31
|
"node": "./dist/lib/node-esm/common/activation-events.mjs",
|
|
31
|
-
"source": "./src/common/activation-events.ts",
|
|
32
32
|
"types": "./dist/types/src/common/activation-events.d.ts"
|
|
33
33
|
},
|
|
34
34
|
"./Capabilities": {
|
|
35
|
+
"source": "./src/common/capabilities.ts",
|
|
35
36
|
"browser": "./dist/lib/browser/common/capabilities.mjs",
|
|
36
37
|
"node": "./dist/lib/node-esm/common/capabilities.mjs",
|
|
37
|
-
"source": "./src/common/capabilities.ts",
|
|
38
38
|
"types": "./dist/types/src/common/capabilities.d.ts"
|
|
39
39
|
},
|
|
40
40
|
"./Capability": {
|
|
41
|
+
"source": "./src/core/capability.ts",
|
|
41
42
|
"browser": "./dist/lib/browser/capability/index.mjs",
|
|
42
43
|
"node": "./dist/lib/node-esm/capability/index.mjs",
|
|
43
|
-
"source": "./src/core/capability.ts",
|
|
44
44
|
"types": "./dist/types/src/capability/index.d.ts"
|
|
45
45
|
},
|
|
46
46
|
"./Plugin": {
|
|
47
|
+
"source": "./src/core/plugin.ts",
|
|
47
48
|
"browser": "./dist/lib/browser/plugin/index.mjs",
|
|
48
49
|
"node": "./dist/lib/node-esm/plugin/index.mjs",
|
|
49
|
-
"source": "./src/core/plugin.ts",
|
|
50
50
|
"types": "./dist/types/src/plugin/index.d.ts"
|
|
51
51
|
},
|
|
52
52
|
"./PluginManager": {
|
|
53
|
+
"source": "./src/core/plugin-manager.ts",
|
|
53
54
|
"browser": "./dist/lib/browser/plugin-manager/index.mjs",
|
|
54
55
|
"node": "./dist/lib/node-esm/plugin-manager/index.mjs",
|
|
55
|
-
"source": "./src/core/plugin-manager.ts",
|
|
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": {
|
|
69
|
+
"source": "./src/cli/index.ts",
|
|
59
70
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
60
71
|
"node": "./dist/lib/node-esm/cli/index.mjs",
|
|
61
|
-
"source": "./src/cli/index.ts",
|
|
62
72
|
"types": "./dist/types/src/cli/index.d.ts"
|
|
63
73
|
},
|
|
64
74
|
"./testing": {
|
|
75
|
+
"source": "./src/testing/index.ts",
|
|
65
76
|
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
66
77
|
"node": "./dist/lib/node-esm/testing/index.mjs",
|
|
67
|
-
"source": "./src/testing/index.ts",
|
|
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": {
|
|
87
|
+
"source": "./src/ui/index.ts",
|
|
71
88
|
"browser": "./dist/lib/browser/ui/index.mjs",
|
|
72
89
|
"node": "./dist/lib/node-esm/ui/index.mjs",
|
|
73
|
-
"source": "./src/ui/index.ts",
|
|
74
90
|
"types": "./dist/types/src/ui/index.d.ts"
|
|
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/
|
|
96
|
+
"cjs-module-lexer": "^2.2.0",
|
|
97
|
+
"@dxos/context": "0.8.4-main.3fbcb4aa9b",
|
|
98
|
+
"@dxos/async": "0.8.4-main.3fbcb4aa9b",
|
|
99
|
+
"@dxos/compute": "0.8.4-main.3fbcb4aa9b",
|
|
100
|
+
"@dxos/debug": "0.8.4-main.3fbcb4aa9b",
|
|
101
|
+
"@dxos/edge-client": "0.8.4-main.3fbcb4aa9b",
|
|
102
|
+
"@dxos/errors": "0.8.4-main.3fbcb4aa9b",
|
|
103
|
+
"@dxos/effect": "0.8.4-main.3fbcb4aa9b",
|
|
104
|
+
"@dxos/log": "0.8.4-main.3fbcb4aa9b",
|
|
105
|
+
"@dxos/invariant": "0.8.4-main.3fbcb4aa9b",
|
|
106
|
+
"@dxos/operation": "0.8.4-main.3fbcb4aa9b",
|
|
107
|
+
"@dxos/protocols": "0.8.4-main.3fbcb4aa9b",
|
|
108
|
+
"@dxos/react-error-boundary": "0.8.4-main.3fbcb4aa9b",
|
|
109
|
+
"@dxos/react-hooks": "0.8.4-main.3fbcb4aa9b",
|
|
110
|
+
"@dxos/react-ui": "0.8.4-main.3fbcb4aa9b",
|
|
111
|
+
"@dxos/echo": "0.8.4-main.3fbcb4aa9b",
|
|
112
|
+
"@dxos/ui-theme": "0.8.4-main.3fbcb4aa9b",
|
|
113
|
+
"@dxos/web-context": "0.8.4-main.3fbcb4aa9b",
|
|
114
|
+
"@dxos/util": "0.8.4-main.3fbcb4aa9b",
|
|
115
|
+
"@dxos/web-context-react": "0.8.4-main.3fbcb4aa9b"
|
|
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/test-utils": "0.8.4-main.
|
|
127
|
+
"vite": "^8.0.10",
|
|
128
|
+
"@dxos/brand": "0.8.4-main.3fbcb4aa9b",
|
|
129
|
+
"@dxos/echo-db": "0.8.4-main.3fbcb4aa9b",
|
|
130
|
+
"@dxos/random": "0.8.4-main.3fbcb4aa9b",
|
|
131
|
+
"@dxos/test-utils": "0.8.4-main.3fbcb4aa9b",
|
|
132
|
+
"@dxos/storybook-utils": "0.8.4-main.3fbcb4aa9b"
|
|
138
133
|
},
|
|
139
134
|
"peerDependencies": {
|
|
140
135
|
"@effect-atom/atom-react": "^0.5.0",
|
|
141
136
|
"@effect/platform": "0.94.4",
|
|
142
|
-
"
|
|
137
|
+
"@testing-library/react": "^16.3.0",
|
|
138
|
+
"effect": "3.20.0",
|
|
143
139
|
"react": "~19.2.3",
|
|
144
140
|
"react-dom": "~19.2.3"
|
|
145
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'],
|
|
@@ -133,10 +144,10 @@ export const contributes = <I extends InterfaceDef<any>>(
|
|
|
133
144
|
};
|
|
134
145
|
|
|
135
146
|
type LoadCapability<Props, Capabilities extends ModuleReturn = ModuleReturn> = () => Promise<{
|
|
136
|
-
default: (props
|
|
147
|
+
default: (props: Props) => Effect.Effect<Capabilities, Error, Service | Plugin.Service | never>;
|
|
137
148
|
}>;
|
|
138
149
|
type LoadCapabilities<Props, Capabilities extends ModuleReturn = ModuleReturn> = () => Promise<{
|
|
139
|
-
default: (props
|
|
150
|
+
default: (props: Props) => Effect.Effect<Capabilities, Error, Service | Plugin.Service | never>;
|
|
140
151
|
}>;
|
|
141
152
|
|
|
142
153
|
type NormalizeReturn<R> = R extends readonly (infer A)[]
|
|
@@ -148,7 +159,7 @@ type NormalizeReturn<R> = R extends readonly (infer A)[]
|
|
|
148
159
|
: Any[];
|
|
149
160
|
|
|
150
161
|
export type LazyCapability<Props = void, Capabilities extends ModuleReturn = ModuleReturn, E extends Error = Error> = (
|
|
151
|
-
props
|
|
162
|
+
props: Props,
|
|
152
163
|
) => Effect.Effect<NormalizeReturn<Capabilities>, E, Service | Plugin.Service | never>;
|
|
153
164
|
|
|
154
165
|
/**
|
|
@@ -162,9 +173,9 @@ export const lazy = <T = void, R extends ModuleReturn = ModuleReturn>(
|
|
|
162
173
|
name: string,
|
|
163
174
|
c: LoadCapability<T, R> | LoadCapabilities<T, R>,
|
|
164
175
|
): LazyCapability<T, R> => {
|
|
165
|
-
const lazyFn: LazyCapability<T, R> = (props
|
|
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>;
|
|
@@ -217,11 +228,11 @@ export const getModuleTag = (capability: unknown): string | undefined => {
|
|
|
217
228
|
* })
|
|
218
229
|
* );
|
|
219
230
|
*
|
|
220
|
-
* // Module with
|
|
231
|
+
* // Module with required options (context accessed via layer)
|
|
221
232
|
* export default Capability.makeModule(
|
|
222
|
-
* Effect.fnUntraced(function* (
|
|
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
|
* ```
|
|
@@ -232,5 +243,5 @@ export const makeModule = <
|
|
|
232
243
|
E extends Error = Error,
|
|
233
244
|
R extends Service | Plugin.Service | never = Service,
|
|
234
245
|
>(
|
|
235
|
-
fn: (props
|
|
236
|
-
): ((props
|
|
246
|
+
fn: (props: TProps) => Effect.Effect<TReturn, E, R>,
|
|
247
|
+
): ((props: TProps) => Effect.Effect<TReturn, E, R>) => fn;
|