@dxos/app-framework 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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 +9 -0
- package/.storybook/preview.mts +8 -0
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-EYY7KYU5.mjs +35 -0
- package/dist/lib/browser/capability-EYY7KYU5.mjs.map +7 -0
- package/dist/lib/browser/capability-W7NPZR6A.mjs +38 -0
- package/dist/lib/browser/capability-W7NPZR6A.mjs.map +7 -0
- package/dist/lib/browser/chunk-2CKCJ6PN.mjs +79 -0
- package/dist/lib/browser/chunk-2CKCJ6PN.mjs.map +7 -0
- package/dist/lib/browser/chunk-4D6YAWLP.mjs +393 -0
- package/dist/lib/browser/chunk-4D6YAWLP.mjs.map +7 -0
- package/dist/lib/browser/chunk-56CEL32L.mjs +963 -0
- package/dist/lib/browser/chunk-56CEL32L.mjs.map +7 -0
- package/dist/lib/browser/chunk-F7FW2RK2.mjs +167 -0
- package/dist/lib/browser/chunk-F7FW2RK2.mjs.map +7 -0
- package/dist/lib/browser/chunk-I34GF4NG.mjs +34 -0
- package/dist/lib/browser/chunk-I34GF4NG.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-JKWMHZP6.mjs +80 -0
- package/dist/lib/browser/chunk-JKWMHZP6.mjs.map +7 -0
- package/dist/lib/browser/chunk-QRTB4Q3U.mjs +594 -0
- package/dist/lib/browser/chunk-QRTB4Q3U.mjs.map +7 -0
- package/dist/lib/browser/chunk-QSXYHXCE.mjs +48 -0
- package/dist/lib/browser/chunk-QSXYHXCE.mjs.map +7 -0
- package/dist/lib/browser/chunk-RFSO3JRG.mjs +1 -0
- package/dist/lib/browser/chunk-RHQGPRWN.mjs +174 -0
- package/dist/lib/browser/chunk-RHQGPRWN.mjs.map +7 -0
- package/dist/lib/browser/chunk-T3Y4AEKX.mjs +42 -0
- package/dist/lib/browser/chunk-T3Y4AEKX.mjs.map +7 -0
- package/dist/lib/browser/chunk-TGX63LTL.mjs +8 -0
- package/dist/lib/browser/chunk-TGX63LTL.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZBA6IH6L.mjs +148 -0
- package/dist/lib/browser/chunk-ZBA6IH6L.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +90 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/common/activation-events.mjs +24 -0
- package/dist/lib/browser/common/capabilities.mjs +46 -0
- package/dist/lib/browser/core/activation-event.mjs +20 -0
- package/dist/lib/browser/core/activation-event.mjs.map +7 -0
- package/dist/lib/browser/core/capability.mjs +30 -0
- package/dist/lib/browser/core/capability.mjs.map +7 -0
- package/dist/lib/browser/core/plugin-manager.mjs +15 -0
- package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/browser/core/plugin.mjs +29 -0
- package/dist/lib/browser/core/plugin.mjs.map +7 -0
- package/dist/lib/browser/core/url-loader.mjs +16 -0
- package/dist/lib/browser/core/url-loader.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +91 -156
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/invoker-capability-35BJSGXJ.mjs +43 -0
- package/dist/lib/browser/invoker-capability-35BJSGXJ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +248 -51
- 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 +46 -0
- package/dist/lib/browser/ui/index.mjs.map +7 -0
- package/dist/lib/node-esm/capability-IY3YIHIO.mjs +39 -0
- package/dist/lib/node-esm/capability-IY3YIHIO.mjs.map +7 -0
- package/dist/lib/node-esm/capability-RDCTCARS.mjs +36 -0
- package/dist/lib/node-esm/capability-RDCTCARS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-42KBWDE4.mjs +80 -0
- package/dist/lib/node-esm/chunk-42KBWDE4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DAYWQOOQ.mjs +149 -0
- package/dist/lib/node-esm/chunk-DAYWQOOQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DER2JDBT.mjs +175 -0
- package/dist/lib/node-esm/chunk-DER2JDBT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EL3R25OQ.mjs +2 -0
- package/dist/lib/node-esm/chunk-EL3R25OQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FKE4Z3D6.mjs +10 -0
- package/dist/lib/node-esm/chunk-FKE4Z3D6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-G3RTFSNG.mjs +81 -0
- package/dist/lib/node-esm/chunk-G3RTFSNG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JPWVIQ5I.mjs +595 -0
- package/dist/lib/node-esm/chunk-JPWVIQ5I.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LX6YJOSO.mjs +394 -0
- package/dist/lib/node-esm/chunk-LX6YJOSO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-URWHJQT2.mjs +168 -0
- package/dist/lib/node-esm/chunk-URWHJQT2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VKHGNEDB.mjs +43 -0
- package/dist/lib/node-esm/chunk-VKHGNEDB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-W4K4RU4S.mjs +964 -0
- package/dist/lib/node-esm/chunk-W4K4RU4S.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WZCSOX5Q.mjs +35 -0
- package/dist/lib/node-esm/chunk-WZCSOX5Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZZ7CKK6W.mjs +49 -0
- package/dist/lib/node-esm/chunk-ZZ7CKK6W.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +91 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/common/activation-events.mjs +25 -0
- package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
- package/dist/lib/node-esm/common/capabilities.mjs +47 -0
- package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
- package/dist/lib/node-esm/core/activation-event.mjs +21 -0
- package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
- package/dist/lib/node-esm/core/capability.mjs +31 -0
- package/dist/lib/node-esm/core/capability.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs +16 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin.mjs +30 -0
- package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/core/url-loader.mjs +17 -0
- package/dist/lib/node-esm/core/url-loader.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +91 -156
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/invoker-capability-3QWBSM5Q.mjs +44 -0
- package/dist/lib/node-esm/invoker-capability-3QWBSM5Q.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +248 -51
- 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 +47 -0
- package/dist/lib/node-esm/ui/index.mjs.map +7 -0
- package/dist/plugin/node-esm/index.mjs +730 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/cli/cli.d.ts +39 -0
- package/dist/types/src/cli/cli.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/common/activation-events.d.ts +27 -0
- package/dist/types/src/common/activation-events.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +109 -121
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +4 -8
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +19 -0
- package/dist/types/src/common/operations.d.ts.map +1 -0
- package/dist/types/src/common/translations.d.ts +8 -8
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/context.d.ts +5 -0
- package/dist/types/src/context.d.ts.map +1 -0
- package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +7 -7
- package/dist/types/src/core/activation-event.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.d.ts +48 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.test.d.ts +2 -0
- package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/capability.d.ts +156 -0
- package/dist/types/src/core/capability.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +6 -4
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manager.d.ts +73 -0
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +124 -37
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/url-loader.d.ts +42 -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/index.d.ts +3 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts +3 -0
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts +7 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts +32 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +18 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/index.d.ts +6 -0
- package/dist/types/src/plugin-operation/history/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/types.d.ts +13 -0
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +101 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +23 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/index.d.ts +3 -0
- package/dist/types/src/plugin-operation/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +6 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/meta.d.ts +3 -0
- package/dist/types/src/plugin-operation/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/testing.d.ts +58 -0
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +3 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/capability.d.ts +6 -0
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/index.d.ts +2 -0
- package/dist/types/src/plugin-runtime/index.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/meta.d.ts +3 -0
- package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -0
- package/dist/types/src/testing/harness.d.ts +67 -0
- package/dist/types/src/testing/harness.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -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 +8 -0
- package/dist/types/src/testing/service.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +11 -10
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +9 -0
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts +19 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/index.d.ts +2 -0
- package/dist/types/src/ui/components/App/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts +13 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +10 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts +14 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +11 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/context.d.ts +5 -0
- package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +4 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/index.d.ts +6 -0
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useApp.d.ts +62 -0
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts +31 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useLoading.d.ts +18 -0
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts +10 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
- package/dist/types/src/ui/index.d.ts +3 -0
- package/dist/types/src/ui/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer-plugin.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer-plugin.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map-plugin.d.ts +16 -0
- package/dist/types/src/vite-plugin/import-map-plugin.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +4 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +16 -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 +26 -3
- package/package.json +144 -44
- package/src/cli/cli.ts +107 -0
- package/src/{playground/layout → cli}/index.ts +1 -1
- package/src/common/activation-events.ts +44 -0
- package/src/common/capabilities.ts +168 -109
- package/src/common/index.ts +4 -8
- package/src/common/operations.ts +35 -0
- package/src/common/translations.ts +18 -10
- package/src/context.ts +9 -0
- package/src/core/{events.ts → activation-event.ts} +10 -7
- package/src/core/capability-manager.test.ts +151 -0
- package/src/core/capability-manager.ts +192 -0
- package/src/core/capability.ts +247 -0
- package/src/core/index.ts +6 -4
- package/src/core/plugin-manager.test.ts +1113 -0
- package/src/core/plugin-manager.ts +883 -0
- package/src/core/plugin.ts +261 -43
- package/src/core/url-loader.test.ts +112 -0
- package/src/core/url-loader.ts +178 -0
- package/src/helpers.test.ts +1 -1
- package/src/index.ts +3 -4
- package/src/plugin-operation/OperationPlugin.ts +24 -0
- package/src/plugin-operation/history/capability.ts +36 -0
- package/src/plugin-operation/history/errors.ts +7 -0
- package/src/plugin-operation/history/history-tracker.test.ts +373 -0
- package/src/plugin-operation/history/history-tracker.ts +128 -0
- package/src/plugin-operation/history/index.ts +9 -0
- package/src/plugin-operation/history/types.ts +17 -0
- package/src/plugin-operation/history/undo-mapping.ts +135 -0
- package/src/plugin-operation/history/undo-registry.test.ts +72 -0
- package/src/plugin-operation/history/undo-registry.ts +54 -0
- package/src/plugin-operation/index.ts +6 -0
- package/src/plugin-operation/invoker-capability.ts +54 -0
- package/src/plugin-operation/meta.ts +11 -0
- package/src/plugin-operation/testing.ts +154 -0
- package/src/plugin-runtime/RuntimePlugin.ts +19 -0
- package/src/plugin-runtime/capability.ts +53 -0
- package/src/{playground/debug → plugin-runtime}/index.ts +1 -1
- package/src/plugin-runtime/meta.ts +11 -0
- package/src/testing/harness.ts +229 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +52 -0
- package/src/testing/withPluginManager.stories.tsx +14 -11
- package/src/testing/withPluginManager.tsx +78 -54
- package/src/ui/components/App/App.stories.tsx +92 -0
- package/src/ui/components/App/App.tsx +58 -0
- package/src/{playground/logger → ui/components/App}/index.ts +1 -1
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +183 -0
- package/src/{react → ui/components/PluginManager}/PluginManagerProvider.ts +3 -3
- package/src/ui/components/PluginManager/index.ts +5 -0
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +144 -0
- package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
- package/src/ui/components/Surface/SurfaceInfo.tsx +107 -0
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/context.ts +12 -0
- package/src/ui/components/Surface/index.ts +54 -0
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +269 -0
- package/src/ui/components/index.ts +7 -0
- package/src/ui/hooks/index.ts +9 -0
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +289 -0
- package/src/ui/hooks/useCapabilities.ts +67 -0
- package/src/ui/hooks/useLoading.tsx +68 -0
- package/src/ui/hooks/useSettingsState.ts +26 -0
- package/src/ui/hooks/useSurface.ts +13 -0
- package/src/ui/index.ts +6 -0
- package/src/vite-plugin/composer-plugin.ts +284 -0
- package/src/vite-plugin/import-map-plugin.ts +490 -0
- package/src/vite-plugin/index.ts +7 -0
- package/src/vite-plugin/manifest.test.ts +23 -0
- package/src/vite-plugin/manifest.ts +20 -0
- package/src/vite-plugin/packages.ts +181 -0
- package/tsconfig.json +15 -25
- package/tsconfig.node.json +2 -4
- package/typedoc.json +2 -4
- package/vitest.config.ts +8 -6
- package/.eslintrc.cjs +0 -9
- package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
- package/.swc/plugins/v7_linux_x86_64_13.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429 +0 -0
- package/dist/lib/browser/app-graph-builder-BGGXLD6T.mjs +0 -137
- package/dist/lib/browser/app-graph-builder-BGGXLD6T.mjs.map +0 -7
- package/dist/lib/browser/chunk-2636QSIK.mjs +0 -1518
- package/dist/lib/browser/chunk-2636QSIK.mjs.map +0 -7
- package/dist/lib/browser/chunk-DHZB7HG7.mjs +0 -413
- package/dist/lib/browser/chunk-DHZB7HG7.mjs.map +0 -7
- package/dist/lib/browser/chunk-ORWHM7CO.mjs +0 -32
- package/dist/lib/browser/chunk-ORWHM7CO.mjs.map +0 -7
- package/dist/lib/browser/intent-dispatcher-TWKB22NI.mjs +0 -11
- package/dist/lib/browser/intent-resolver-O67UANYP.mjs +0 -39
- package/dist/lib/browser/intent-resolver-O67UANYP.mjs.map +0 -7
- package/dist/lib/browser/store-LFKDWHUQ.mjs +0 -30
- package/dist/lib/browser/store-LFKDWHUQ.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -79
- package/dist/lib/node-esm/app-graph-builder-QHIJUYYW.mjs +0 -138
- package/dist/lib/node-esm/app-graph-builder-QHIJUYYW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NJAFK626.mjs +0 -414
- package/dist/lib/node-esm/chunk-NJAFK626.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMZQERLE.mjs +0 -34
- package/dist/lib/node-esm/chunk-UMZQERLE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VSKRV3NW.mjs +0 -1520
- package/dist/lib/node-esm/chunk-VSKRV3NW.mjs.map +0 -7
- package/dist/lib/node-esm/intent-dispatcher-5PRM3KGH.mjs +0 -12
- package/dist/lib/node-esm/intent-resolver-K3D4BXQQ.mjs +0 -40
- package/dist/lib/node-esm/intent-resolver-K3D4BXQQ.mjs.map +0 -7
- package/dist/lib/node-esm/store-53XDUBMD.mjs +0 -31
- package/dist/lib/node-esm/store-53XDUBMD.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -80
- package/dist/types/src/App.d.ts +0 -43
- package/dist/types/src/App.d.ts.map +0 -1
- package/dist/types/src/common/collaboration.d.ts +0 -19
- package/dist/types/src/common/collaboration.d.ts.map +0 -1
- package/dist/types/src/common/events.d.ts +0 -52
- package/dist/types/src/common/events.d.ts.map +0 -1
- package/dist/types/src/common/file.d.ts +0 -14
- package/dist/types/src/common/file.d.ts.map +0 -1
- package/dist/types/src/common/graph.d.ts +0 -21
- package/dist/types/src/common/graph.d.ts.map +0 -1
- package/dist/types/src/common/layout.d.ts +0 -281
- package/dist/types/src/common/layout.d.ts.map +0 -1
- package/dist/types/src/common/surface.d.ts +0 -65
- package/dist/types/src/common/surface.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.d.ts +0 -114
- package/dist/types/src/core/capabilities.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.test.d.ts +0 -2
- package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
- package/dist/types/src/core/events.d.ts.map +0 -1
- package/dist/types/src/core/manager.d.ts +0 -122
- package/dist/types/src/core/manager.d.ts.map +0 -1
- package/dist/types/src/core/manager.test.d.ts +0 -2
- package/dist/types/src/core/manager.test.d.ts.map +0 -1
- package/dist/types/src/playground/debug/Debug.d.ts +0 -6
- package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
- package/dist/types/src/playground/debug/index.d.ts +0 -2
- package/dist/types/src/playground/debug/index.d.ts.map +0 -1
- package/dist/types/src/playground/debug/plugin.d.ts +0 -2
- package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Main.d.ts +0 -6
- package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/generator/generator.d.ts +0 -7
- package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
- package/dist/types/src/playground/generator/index.d.ts +0 -3
- package/dist/types/src/playground/generator/index.d.ts.map +0 -1
- package/dist/types/src/playground/generator/plugin.d.ts +0 -2
- package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/layout/Layout.d.ts +0 -8
- package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
- package/dist/types/src/playground/layout/index.d.ts +0 -2
- package/dist/types/src/playground/layout/index.d.ts.map +0 -1
- package/dist/types/src/playground/layout/plugin.d.ts +0 -2
- package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/logger/index.d.ts +0 -2
- package/dist/types/src/playground/logger/index.d.ts.map +0 -1
- package/dist/types/src/playground/logger/plugin.d.ts +0 -2
- package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/schema.d.ts +0 -13
- package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
- package/dist/types/src/playground/playground.stories.d.ts +0 -10
- package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/actions.d.ts +0 -38
- package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/errors.d.ts +0 -16
- package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/index.d.ts +0 -5
- package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent.d.ts +0 -63
- package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -2
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/actions.d.ts +0 -27
- package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -4
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/index.d.ts +0 -3
- package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/store.d.ts +0 -5
- package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/translations.d.ts +0 -10
- package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
- package/dist/types/src/react/ErrorBoundary.d.ts +0 -31
- package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/react/IntentContext.d.ts +0 -8
- package/dist/types/src/react/IntentContext.d.ts.map +0 -1
- package/dist/types/src/react/PluginManagerProvider.d.ts +0 -10
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
- package/dist/types/src/react/Surface.d.ts +0 -12
- package/dist/types/src/react/Surface.d.ts.map +0 -1
- package/dist/types/src/react/Surface.stories.d.ts +0 -16
- package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
- package/dist/types/src/react/common.d.ts +0 -13
- package/dist/types/src/react/common.d.ts.map +0 -1
- package/dist/types/src/react/index.d.ts +0 -7
- package/dist/types/src/react/index.d.ts.map +0 -1
- package/dist/types/src/react/useCapabilities.d.ts +0 -13
- package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
- package/dist/types/src/react/useIntentResolver.d.ts +0 -3
- package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
- package/dist/types/src/worker.d.ts +0 -4
- package/dist/types/src/worker.d.ts.map +0 -1
- package/src/App.tsx +0 -276
- package/src/common/collaboration.ts +0 -21
- package/src/common/events.ts +0 -77
- package/src/common/file.ts +0 -22
- package/src/common/graph.ts +0 -30
- package/src/common/layout.ts +0 -278
- package/src/common/surface.ts +0 -86
- package/src/core/capabilities.test.ts +0 -136
- package/src/core/capabilities.ts +0 -254
- package/src/core/manager.test.ts +0 -515
- package/src/core/manager.ts +0 -519
- package/src/playground/debug/Debug.tsx +0 -39
- package/src/playground/debug/plugin.ts +0 -17
- package/src/playground/generator/Main.tsx +0 -71
- package/src/playground/generator/Toolbar.tsx +0 -46
- package/src/playground/generator/generator.ts +0 -48
- package/src/playground/generator/index.ts +0 -6
- package/src/playground/generator/plugin.ts +0 -23
- package/src/playground/layout/Layout.tsx +0 -33
- package/src/playground/layout/plugin.ts +0 -17
- package/src/playground/logger/Toolbar.tsx +0 -29
- package/src/playground/logger/plugin.ts +0 -36
- package/src/playground/logger/schema.ts +0 -12
- package/src/playground/playground.stories.tsx +0 -42
- package/src/plugin-intent/IntentPlugin.ts +0 -20
- package/src/plugin-intent/actions.ts +0 -33
- package/src/plugin-intent/errors.ts +0 -39
- package/src/plugin-intent/index.ts +0 -8
- package/src/plugin-intent/intent-dispatcher.test.ts +0 -279
- package/src/plugin-intent/intent-dispatcher.ts +0 -333
- package/src/plugin-intent/intent.ts +0 -154
- package/src/plugin-settings/SettingsPlugin.ts +0 -35
- package/src/plugin-settings/actions.ts +0 -29
- package/src/plugin-settings/app-graph-builder.ts +0 -157
- package/src/plugin-settings/index.ts +0 -6
- package/src/plugin-settings/intent-resolver.ts +0 -34
- package/src/plugin-settings/store.ts +0 -33
- package/src/plugin-settings/translations.ts +0 -19
- package/src/react/ErrorBoundary.tsx +0 -45
- package/src/react/IntentContext.tsx +0 -34
- package/src/react/Surface.stories.tsx +0 -96
- package/src/react/Surface.tsx +0 -77
- package/src/react/common.ts +0 -12
- package/src/react/index.ts +0 -10
- package/src/react/useCapabilities.ts +0 -30
- package/src/react/useIntentResolver.ts +0 -22
- package/src/worker.ts +0 -11
- package/typedoc/.nojekyll +0 -1
- package/typedoc/assets/hierarchy.js +0 -1
- package/typedoc/assets/highlight.css +0 -106
- package/typedoc/assets/icons.js +0 -18
- package/typedoc/assets/icons.svg +0 -1
- package/typedoc/assets/main.js +0 -60
- package/typedoc/assets/navigation.js +0 -1
- package/typedoc/assets/search.js +0 -1
- package/typedoc/assets/style.css +0 -1640
- package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
- package/typedoc/classes/ErrorBoundary.html +0 -125
- package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
- package/typedoc/classes/IntentAction.Track.html +0 -266
- package/typedoc/classes/LayoutAction.AddToast.html +0 -265
- package/typedoc/classes/LayoutAction.Close.html +0 -382
- package/typedoc/classes/LayoutAction.Expose.html +0 -265
- package/typedoc/classes/LayoutAction.Open.html +0 -1123
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
- package/typedoc/classes/LayoutAction.Set.html +0 -460
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
- package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
- package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
- package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
- package/typedoc/classes/Plugin.html +0 -6
- package/typedoc/classes/PluginContext.html +0 -38
- package/typedoc/classes/PluginManager.html +0 -43
- package/typedoc/classes/PluginModule.html +0 -18
- package/typedoc/classes/SettingsAction.Open.html +0 -226
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
- package/typedoc/functions/Events.createStateEvent.html +0 -2
- package/typedoc/functions/IntentPlugin.html +0 -1
- package/typedoc/functions/SettingsPlugin.html +0 -1
- package/typedoc/functions/allOf.html +0 -2
- package/typedoc/functions/chain.html +0 -3
- package/typedoc/functions/contributes.html +0 -2
- package/typedoc/functions/createDispatcher.html +0 -3
- package/typedoc/functions/createIntent.html +0 -6
- package/typedoc/functions/createResolver.html +0 -2
- package/typedoc/functions/createSurface.html +0 -2
- package/typedoc/functions/defineCapability.html +0 -2
- package/typedoc/functions/defineEvent.html +0 -2
- package/typedoc/functions/defineModule.html +0 -2
- package/typedoc/functions/definePlugin.html +0 -2
- package/typedoc/functions/eventKey.html +0 -2
- package/typedoc/functions/getEvents.html +0 -2
- package/typedoc/functions/isAllOf.html +0 -2
- package/typedoc/functions/isOneOf.html +0 -2
- package/typedoc/functions/isSurfaceAvailable.html +0 -2
- package/typedoc/functions/lazy.html +0 -2
- package/typedoc/functions/oneOf.html +0 -2
- package/typedoc/functions/useApp.html +0 -6
- package/typedoc/functions/useAppGraph.html +0 -1
- package/typedoc/functions/useCapabilities.html +0 -3
- package/typedoc/functions/useCapability.html +0 -4
- package/typedoc/functions/useIntentDispatcher.html +0 -1
- package/typedoc/functions/useIntentResolver.html +0 -1
- package/typedoc/functions/useLayout.html +0 -1
- package/typedoc/functions/usePluginManager.html +0 -2
- package/typedoc/hierarchy.html +0 -1
- package/typedoc/index.html +0 -12
- package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
- package/typedoc/media/LICENSE +0 -8
- package/typedoc/modules/Capabilities.html +0 -1
- package/typedoc/modules/CollaborationActions.html +0 -1
- package/typedoc/modules/Events.html +0 -1
- package/typedoc/modules/IntentAction.html +0 -1
- package/typedoc/modules/LayoutAction.html +0 -2
- package/typedoc/modules/SettingsAction.html +0 -1
- package/typedoc/modules.html +0 -1
- package/typedoc/types/ActivationEvent.html +0 -8
- package/typedoc/types/ActivationEvents.html +0 -2
- package/typedoc/types/AnyCapability.html +0 -1
- package/typedoc/types/AnyIntent.html +0 -1
- package/typedoc/types/AnyIntentChain.html +0 -1
- package/typedoc/types/AnyIntentEffectResult.html +0 -1
- package/typedoc/types/AnyIntentResolver.html +0 -1
- package/typedoc/types/AnyIntentResult.html +0 -1
- package/typedoc/types/Capabilities.FileUploader.html +0 -1
- package/typedoc/types/Capabilities.IntentResolver.html +0 -1
- package/typedoc/types/Capabilities.Layout.html +0 -1
- package/typedoc/types/Capabilities.Metadata.html +0 -1
- package/typedoc/types/Capabilities.ReactContext.html +0 -1
- package/typedoc/types/Capabilities.ReactRoot.html +0 -1
- package/typedoc/types/Capabilities.ReactSurface.html +0 -1
- package/typedoc/types/Capabilities.Settings.html +0 -4
- package/typedoc/types/Capability.html +0 -9
- package/typedoc/types/CreateAppOptions.html +0 -10
- package/typedoc/types/FileInfo.html +0 -1
- package/typedoc/types/Intent.html +0 -10
- package/typedoc/types/IntentChain.html +0 -6
- package/typedoc/types/IntentContext.html +0 -5
- package/typedoc/types/IntentData.html +0 -1
- package/typedoc/types/IntentDispatcher.html +0 -2
- package/typedoc/types/IntentDispatcherResult.html +0 -2
- package/typedoc/types/IntentEffectDefinition.html +0 -2
- package/typedoc/types/IntentEffectResult.html +0 -15
- package/typedoc/types/IntentParams.html +0 -3
- package/typedoc/types/IntentResolver.html +0 -2
- package/typedoc/types/IntentResultData.html +0 -1
- package/typedoc/types/IntentSchema.html +0 -1
- package/typedoc/types/IntentUndo.html +0 -2
- package/typedoc/types/InterfaceDef.html +0 -4
- package/typedoc/types/Label.html +0 -1
- package/typedoc/types/NodeSerializer.html +0 -8
- package/typedoc/types/PluginManagerOptions.html +0 -6
- package/typedoc/types/PluginMeta.html +0 -21
- package/typedoc/types/PromiseIntentDispatcher.html +0 -2
- package/typedoc/types/PromiseIntentUndo.html +0 -2
- package/typedoc/types/Resource.html +0 -1
- package/typedoc/types/ResourceKey.html +0 -1
- package/typedoc/types/ResourceLanguage.html +0 -1
- package/typedoc/types/SerializedNode.html +0 -4
- package/typedoc/types/SurfaceComponent.html +0 -2
- package/typedoc/types/SurfaceDefinition.html +0 -2
- package/typedoc/types/SurfaceProps.html +0 -4
- package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
- package/typedoc/variables/Capabilities.AppGraph.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
- package/typedoc/variables/Capabilities.FileUploader.html +0 -1
- package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
- package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
- package/typedoc/variables/Capabilities.Layout.html +0 -1
- package/typedoc/variables/Capabilities.Metadata.html +0 -1
- package/typedoc/variables/Capabilities.Null.html +0 -1
- package/typedoc/variables/Capabilities.PluginManager.html +0 -1
- package/typedoc/variables/Capabilities.ReactContext.html +0 -1
- package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
- package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
- package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
- package/typedoc/variables/Capabilities.Settings.html +0 -1
- package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
- package/typedoc/variables/Capabilities.Tools.html +0 -1
- package/typedoc/variables/Capabilities.Translations.html +0 -1
- package/typedoc/variables/Events.AppGraphReady.html +0 -2
- package/typedoc/variables/Events.DispatcherReady.html +0 -2
- package/typedoc/variables/Events.LayoutReady.html +0 -1
- package/typedoc/variables/Events.SettingsReady.html +0 -2
- package/typedoc/variables/Events.SetupAppGraph.html +0 -2
- package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
- package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
- package/typedoc/variables/Events.SetupMetadata.html +0 -2
- package/typedoc/variables/Events.SetupReactSurface.html +0 -2
- package/typedoc/variables/Events.SetupSettings.html +0 -2
- package/typedoc/variables/Events.SetupTranslations.html +0 -2
- package/typedoc/variables/Events.Startup.html +0 -2
- package/typedoc/variables/FileInfoSchema.html +0 -1
- package/typedoc/variables/INTENT_ACTION.html +0 -1
- package/typedoc/variables/INTENT_PLUGIN.html +0 -1
- package/typedoc/variables/LAYOUT_ACTION.html +0 -1
- package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
- package/typedoc/variables/Label.html +0 -1
- package/typedoc/variables/LayoutAction.Toast.html +0 -1
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
- package/typedoc/variables/PluginManagerProvider.html +0 -2
- package/typedoc/variables/Resource.html +0 -2
- package/typedoc/variables/ResourceKey.html +0 -1
- package/typedoc/variables/ResourceLanguage.html +0 -1
- package/typedoc/variables/SETTINGS_ACTION.html +0 -1
- package/typedoc/variables/SETTINGS_ID.html +0 -1
- package/typedoc/variables/SETTINGS_KEY.html +0 -1
- package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
- package/typedoc/variables/Surface.html +0 -2
- package/typedoc/variables/defaultFileTypes.html +0 -1
- /package/dist/lib/browser/{intent-dispatcher-TWKB22NI.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{worker.mjs.map → chunk-RFSO3JRG.mjs.map} +0 -0
- /package/dist/lib/{node-esm/intent-dispatcher-5PRM3KGH.mjs.map → browser/common/activation-events.mjs.map} +0 -0
- /package/dist/lib/{node-esm/worker.mjs.map → browser/common/capabilities.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/vite-plugin/composer-plugin.ts", "../../../src/vite-plugin/manifest.ts", "../../../src/vite-plugin/packages.ts", "../../../src/vite-plugin/import-map-plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Plugin as VitePlugin } from 'vite';\nimport cssInjectedByJs from 'vite-plugin-css-injected-by-js';\n\nimport { type Plugin } from '../core';\nimport { MANIFEST_ASSET_NAME, serializeManifest } from './manifest';\nimport { DEFAULT_PACKAGES, isSharedPackage } from './packages';\n\nexport { MANIFEST_ASSET_NAME, serializeManifest };\n\nconst JSX_DEV_RUNTIME = 'react/jsx-dev-runtime';\n\nconst DEFAULT_MODULE_FILE = 'plugin.mjs';\n\n/**\n * Whether an import should be externalized by the plugin bundle.\n * Uses the shared-package predicate directly so plugins automatically pick up any\n * new `@dxos/*` (non-plugin) package the host provides, without a code change here.\n */\nconst isExternal = (id: string) => id !== JSX_DEV_RUNTIME && isSharedPackage(id);\n\n/**\n * Banner injected at the top of every plugin bundle.\n *\n * Why: rolldown emits ESM `import` for externalized deps, but when a *bundled* module\n * is CJS and contains `require('react')` (or any other external), rolldown keeps the\n * `require(...)` call in the output and relies on a runtime `require` function. The\n * browser doesn't have `require`, so rolldown's fallback shim throws:\n * `Calling `require` for \"react\" in an environment that doesn't expose the `require`\n * function`.\n *\n * The full dependency graphs of non-trivial plugins unavoidably drag in CJS-only\n * helpers (`use-sync-external-store` via xstate / zustand / preact-signals / … ),\n * and waiting for every one of those packages to ship ESM isn't realistic. Instead\n * we install a tiny module-local `require` at the top of the bundle that looks up\n * a handful of well-known host-provided modules by name and returns their already\n * ESM-imported namespaces. Rolldown's own shim honours an existing `require`\n * before falling through to the throw path, so this entirely removes the runtime\n * error without changing how externalization itself works.\n *\n * Keep the list aligned with the externals that CJS code actually reaches for;\n * adding entries here is safe (unused imports get tree-shaken), but the list is\n * deliberately small to keep the banner noise-free.\n */\nconst REQUIRE_SHIM_BANNER = [\n '// --- composer-plugin: CJS require shim ---',\n '// See @dxos/app-framework/vite-plugin/composer-plugin.ts for rationale.',\n \"import * as __composerReact from 'react';\",\n \"import * as __composerReactDom from 'react-dom';\",\n \"import * as __composerReactJsxRuntime from 'react/jsx-runtime';\",\n 'const __composerRequireShim = new Map([',\n \" ['react', __composerReact.default ?? __composerReact],\",\n \" ['react-dom', __composerReactDom.default ?? __composerReactDom],\",\n \" ['react/jsx-runtime', __composerReactJsxRuntime],\",\n ']);',\n \"// Module-local binding: rolldown's CJS fallback does a `typeof require` check\",\n '// and uses whichever `require` is in lexical scope. Declaring this as `const`',\n \"// (instead of `globalThis.require ??=`) keeps each bundle's shim isolated from\",\n '// the host page and from other plugins sharing the window.',\n 'const require = (id) => {',\n ' if (__composerRequireShim.has(id)) return __composerRequireShim.get(id);',\n \" throw new Error('composer-plugin: unsupported CJS require at runtime: ' + id);\",\n '};',\n '// --- end CJS require shim ---',\n].join('\\n');\n\nexport type ComposerPluginOptions = {\n /** Entry point for the plugin bundle. Defaults to `src/plugin.tsx`. */\n entry?: string;\n /** Dev server port. Defaults to `3967`. */\n port?: number;\n /**\n * Plugin metadata. When provided, a `manifest.json` asset is emitted alongside the bundle\n * so the output directory can be uploaded directly as a GitHub Release and picked up by\n * the DXOS community registry.\n */\n meta?: Plugin.Meta;\n /** Filename of the built module asset that the registry will load. Defaults to `plugin.mjs`. */\n moduleFile?: string;\n};\n\n/**\n * Vite plugin for **external Composer plugin projects**. Configures the build to produce\n * an ESM bundle that externalizes all framework dependencies, which the Composer host app\n * provides at runtime via import map.\n *\n * Handles:\n * 1. Build config — lib mode entry point, ES format output, rollup externals.\n * 2. Dev externalization — marks shared deps as external during `vite serve` and strips\n * the `/@id/` prefix that Vite's import analysis adds to external bare specifiers.\n * 3. JSX dev runtime shim — bridges `react/jsx-dev-runtime` (used by React refresh in dev)\n * to `react/jsx-runtime` (which is what the externalized React provides).\n * 4. Optional manifest emit — when `meta` is supplied, writes `manifest.json` next to the\n * bundled module so a GitHub Release can carry both artifacts.\n */\nexport const composerPlugin = (options?: ComposerPluginOptions): VitePlugin[] => {\n const entry = options?.entry ?? 'src/plugin.tsx';\n const port = options?.port ?? 3967;\n const moduleFile = options?.moduleFile ?? DEFAULT_MODULE_FILE;\n const meta = options?.meta;\n const resolved = new Set<string>();\n let base = '/';\n\n const plugins: VitePlugin[] = [\n // Inline every imported stylesheet into the bundled module. Each community plugin\n // is distributed as a single GitHub Release asset (per {@link moduleFile}); a sibling\n // `.css` file would silently be dropped at runtime because Composer only fetches the\n // module URL the registry advertises.\n // TODO(wittjosiah): Once the registry supports multi-asset releases, move CSS (and\n // fonts/images/wasm) back to sibling assets so plugins don't ship stylesheets inside\n // their JS bundle.\n ...cssInjectedByJs(),\n\n // Configure vite for library-mode builds with externalized deps.\n {\n name: 'composer-plugin',\n config: () => ({\n server: {\n port,\n // Allow the Composer host (different origin) to dynamically import plugin modules.\n cors: true,\n },\n preview: { port },\n build: {\n sourcemap: true,\n // Transitively-bundled WASM modules (automerge, tiktoken, …) emit top-level\n // await; `esnext` lets rolldown pass that through without an explicit polyfill.\n target: 'esnext',\n lib: {\n entry,\n formats: ['es'],\n fileName: () => moduleFile,\n },\n // Inline every asset as a data URL. GitHub Releases sign each asset with a\n // per-file URL, so sibling-file imports from the plugin module can't resolve.\n // TODO(wittjosiah): Drop once the registry can serve multi-asset releases and\n // plugins can ship fonts/images/wasm as siblings of plugin.mjs.\n assetsInlineLimit: () => true,\n rolldownOptions: {\n external: (id: string) => isExternal(id),\n output: {\n // Produce a single bundle per plugin for GitHub Release distribution.\n // TODO(wittjosiah): Drop once the registry can serve multi-asset releases.\n inlineDynamicImports: true,\n // Install the CJS require shim at the top of plugin.mjs so transitively\n // bundled CJS helpers (that call `require('react')` et al. at runtime) can\n // resolve against the host-provided externals instead of throwing.\n banner: REQUIRE_SHIM_BANNER,\n },\n },\n },\n }),\n },\n\n // Dev-time externalization.\n // Vite's dev server doesn't use rollup externals, so we need to handle it manually.\n // We intercept imports of shared deps at resolve time, mark them external, and then\n // strip the `/@id/` prefix that Vite's import analysis injects for external modules.\n {\n name: 'composer-plugin:externalize',\n enforce: 'pre',\n apply: 'serve',\n // Exclude shared packages from Vite's dependency pre-bundling.\n config: () => ({\n optimizeDeps: {\n exclude: DEFAULT_PACKAGES,\n },\n }),\n // Mark shared deps as external so Vite doesn't try to bundle them.\n resolveId: (id) => {\n if (isExternal(id)) {\n resolved.add(id);\n return { id, external: true };\n }\n },\n // Return a stub for any externalized module that Vite tries to load directly.\n load: (id) => {\n if (resolved.has(id)) {\n return { code: 'export default {};' };\n }\n },\n // After all plugins are resolved, inject a late-stage transform plugin that strips\n // the `/@id/` prefix from externalized bare specifiers in the output.\n // This must run after Vite's internal import analysis which rewrites bare specifiers.\n configResolved: (config) => {\n base = config.base ?? '/';\n (config.plugins as VitePlugin[]).push({\n name: 'composer-plugin:strip-prefix',\n transform: (code: string) => {\n if (resolved.size === 0) {\n return;\n }\n const escaped = [...resolved].map((s) => s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('|');\n const pattern = new RegExp(`${base}@id/(${escaped})`, 'g');\n if (pattern.test(code)) {\n return code.replace(pattern, (_: string, dep: string) => dep);\n }\n },\n });\n },\n },\n\n // JSX dev runtime shim.\n // React refresh (used by @vitejs/plugin-react) imports from `react/jsx-dev-runtime`,\n // but the externalized React only exposes `react/jsx-runtime`. This virtual module\n // bridges the gap by re-exporting jsx-runtime's functions under jsx-dev-runtime's API.\n {\n name: 'composer-plugin:jsx-dev-shim',\n enforce: 'pre',\n apply: 'serve',\n resolveId: (id) => (id === JSX_DEV_RUNTIME ? `\\0${JSX_DEV_RUNTIME}` : undefined),\n load: (id) =>\n id === `\\0${JSX_DEV_RUNTIME}`\n ? [\n 'import { jsx, jsxs, Fragment } from \"react/jsx-runtime\";',\n 'export { Fragment };',\n 'export function jsxDEV(type, props, key, isStaticChildren) {',\n ' return isStaticChildren ? jsxs(type, props, key) : jsx(type, props, key);',\n '}',\n ].join('\\n')\n : undefined,\n },\n\n // React Refresh preamble stub.\n //\n // @vitejs/plugin-react's JSX transform prepends a runtime check to every module:\n // if (!window.$RefreshReg$) throw new Error(\"@vitejs/plugin-react can't detect preamble…\");\n // In a normal single-origin app, vite injects a `<script type=\"module\">` preamble\n // into `index.html` that sets up `$RefreshReg$` / `$RefreshSig$` on `window` before any\n // app code runs. When a community plugin is dev-served at its own origin and then\n // dynamic-imported into the Composer host at a different origin, the host's window\n // never receives that preamble, so every JSX module throws on first import.\n //\n // Inject a no-op refresh shim on the host's window from the plugin's entrypoint: fast-\n // refresh itself doesn't work cross-origin anyway, so silencing the check lets the\n // plugin load and ordinary page reloads take care of picking up edits. Production\n // builds are untouched (`apply: 'serve'`).\n {\n name: 'composer-plugin:react-refresh-shim',\n enforce: 'pre',\n apply: 'serve',\n transform(code, id) {\n // Only patch the plugin entrypoint (an absolute path ending in the configured entry).\n // Matching by suffix keeps us from prepending the shim to every transformed module,\n // which would both bloat the output and defeat vite's caching.\n if (!id.endsWith(entry.replace(/^\\.?\\//, '/'))) {\n return;\n }\n const shim = [\n '// composer-plugin: no-op React Refresh shim so cross-origin plugin modules',\n \"// don't throw the @vitejs/plugin-react preamble check at dynamic-import time.\",\n 'if (typeof window !== \"undefined\") {',\n ' window.$RefreshReg$ = window.$RefreshReg$ || (() => {});',\n ' window.$RefreshSig$ = window.$RefreshSig$ || (() => (type) => type);',\n ' window.__vite_plugin_react_preamble_installed__ = true;',\n '}',\n '',\n ].join('\\n');\n return { code: shim + code, map: null };\n },\n },\n ];\n\n if (meta) {\n // Emit `manifest.json` alongside the built module so the dist output can be uploaded as-is\n // to a GitHub Release for the DXOS community registry to pick up.\n plugins.push({\n name: 'composer-plugin:emit-manifest',\n apply: 'build',\n generateBundle() {\n this.emitFile({\n type: 'asset',\n fileName: MANIFEST_ASSET_NAME,\n source: serializeManifest(meta, { moduleFile }),\n });\n },\n });\n }\n\n return plugins;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Plugin } from '../core';\n\n/**\n * Name of the asset written alongside the built module bundle.\n * The DXOS community registry resolves each published plugin by fetching this file\n * from the repo's latest GitHub Release, so authors should not rename it.\n */\nexport const MANIFEST_ASSET_NAME = 'manifest.json';\n\n/**\n * Serializes a plugin's public metadata into the format consumed by the community registry.\n * Exported from a vite-free module so tests and tooling can validate manifests without\n * paying the cost of loading vite + esbuild.\n */\nexport const serializeManifest = (meta: Plugin.Meta, { moduleFile }: { moduleFile: string }): string =>\n JSON.stringify({ ...meta, moduleFile }, null, 2);\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/**\n * Packages shared between the Composer host app and remote plugins.\n *\n * {@link DEFAULT_PACKAGES} is the single source of truth: `importMapPlugin` emits\n * one wrapper chunk per entry so the host serves it at runtime, and `composerPlugin`\n * (via {@link isSharedPackage}) externalizes the same set from plugin bundles.\n * Adding a new `@dxos/*` (or third-party) package that plugins may depend on means\n * adding it here — in one place — so the externalization contract stays in sync\n * with what the host actually provides.\n *\n * Plugin packages (`@dxos/plugin-*`) are intentionally NOT listed: community plugins\n * bundle their own copy of any plugin-subpath import, which is safe because those\n * exports are limited to lightweight types/operation defs.\n */\n\n/**\n * Non-`@dxos/*` packages the Composer host provides to plugins via import map.\n * Spread into {@link DEFAULT_PACKAGES} so the third-party set lives in one place.\n */\nconst THIRD_PARTY_SHARED_PACKAGES = [\n '@effect-atom/atom',\n '@effect-atom/atom-react',\n '@effect/platform',\n 'effect',\n 'lit',\n 'react',\n 'react-dom',\n 'solid-js',\n];\n\nexport const DEFAULT_PACKAGES = [\n // packages/common\n '@dxos/async',\n '@dxos/codec-protobuf',\n '@dxos/context',\n '@dxos/crypto',\n '@dxos/debug',\n '@dxos/display-name',\n '@dxos/effect',\n '@dxos/effect-atom-solid',\n '@dxos/errors',\n '@dxos/feed-store',\n '@dxos/graph',\n '@dxos/hypercore',\n '@dxos/invariant',\n '@dxos/keyboard',\n '@dxos/keys',\n '@dxos/kv-store',\n '@dxos/log',\n '@dxos/merkle-search-tree',\n '@dxos/random',\n '@dxos/random-access-storage',\n '@dxos/timeframe',\n '@dxos/tracing',\n '@dxos/util',\n '@dxos/web-context',\n '@dxos/web-context-react',\n '@dxos/web-context-solid',\n\n // packages/core/echo\n '@dxos/echo',\n '@dxos/echo-atom',\n '@dxos/echo-db',\n '@dxos/echo-pipeline',\n '@dxos/echo-protocol',\n '@dxos/echo-query',\n '@dxos/echo-react',\n '@dxos/echo-solid',\n '@dxos/feed',\n '@dxos/index-core',\n\n // packages/core/halo\n '@dxos/credentials',\n '@dxos/keyring',\n\n // packages/core/mesh\n '@dxos/edge-client',\n '@dxos/messaging',\n '@dxos/network-manager',\n '@dxos/rpc',\n '@dxos/rpc-tunnel',\n '@dxos/teleport',\n '@dxos/teleport-extension-automerge-replicator',\n '@dxos/teleport-extension-gossip',\n '@dxos/teleport-extension-object-sync',\n '@dxos/teleport-extension-replicator',\n '@dxos/websocket-rpc',\n\n // packages/core\n '@dxos/ai',\n '@dxos/assistant',\n '@dxos/assistant-toolkit',\n '@dxos/blueprints',\n '@dxos/compute',\n '@dxos/conductor',\n '@dxos/functions',\n '@dxos/functions-runtime',\n '@dxos/mcp-client',\n '@dxos/operation',\n '@dxos/protocols',\n\n // packages/devtools\n '@dxos/devtools',\n\n // packages/sdk\n '@dxos/app-framework',\n '@dxos/app-graph',\n '@dxos/app-solid',\n '@dxos/app-toolkit',\n '@dxos/client',\n '@dxos/client-protocol',\n '@dxos/client-services',\n '@dxos/config',\n '@dxos/migrations',\n '@dxos/observability',\n '@dxos/react-client',\n '@dxos/react-edge-client',\n '@dxos/schema',\n '@dxos/types',\n\n // packages/ui\n '@dxos/lit-grid',\n '@dxos/lit-ui',\n '@dxos/react-hooks',\n '@dxos/react-ui',\n '@dxos/react-ui-attention',\n '@dxos/react-ui-board',\n '@dxos/react-ui-calendar',\n '@dxos/react-ui-canvas',\n '@dxos/react-ui-canvas-compute',\n '@dxos/react-ui-canvas-editor',\n '@dxos/react-ui-chat',\n '@dxos/react-ui-components',\n '@dxos/react-ui-dnd',\n '@dxos/react-ui-editor',\n '@dxos/react-ui-form',\n '@dxos/react-ui-gameboard',\n '@dxos/react-ui-geo',\n '@dxos/react-ui-graph',\n '@dxos/react-ui-grid',\n '@dxos/react-ui-list',\n '@dxos/react-ui-markdown',\n '@dxos/react-ui-masonry',\n '@dxos/react-ui-menu',\n '@dxos/react-ui-mosaic',\n '@dxos/react-ui-pickers',\n '@dxos/react-ui-search',\n '@dxos/react-ui-sfx',\n '@dxos/react-ui-stack',\n '@dxos/react-ui-syntax-highlighter',\n '@dxos/react-ui-table',\n '@dxos/react-ui-tabs',\n '@dxos/react-ui-text-tooltip',\n '@dxos/react-ui-thread',\n '@dxos/solid-ui',\n '@dxos/solid-ui-geo',\n '@dxos/ui',\n '@dxos/ui-editor',\n '@dxos/ui-theme',\n '@dxos/ui-types',\n\n // third-party\n ...THIRD_PARTY_SHARED_PACKAGES,\n];\n\n/**\n * True when the given bare specifier (or one of its subpaths) is provided by the\n * Composer host at runtime and must not be re-bundled by a plugin.\n *\n * Matches only packages listed in {@link DEFAULT_PACKAGES} — the same list\n * {@link importMapPlugin} consumes — so externalization cannot claim a package\n * the host isn't actually mapping. Unknown `@dxos/*` packages fall through to\n * normal bundling, which is the correct default for plugin-owned or yet-to-be\n * shared workspace packages.\n */\nexport const isSharedPackage = (id: string): boolean =>\n DEFAULT_PACKAGES.some((pkg) => id === pkg || id.startsWith(`${pkg}/`));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { init as initCjsLexer, parse as parseCjs } from 'cjs-module-lexer';\nimport { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';\nimport { createRequire as nodeCreateRequire } from 'node:module';\nimport path from 'node:path';\nimport { type Plugin } from 'vite';\n\nimport { DEFAULT_PACKAGES } from './packages';\n\nconst require = nodeCreateRequire(import.meta.url);\n\n//\n// Import map helpers.\n// These utilities support `importMapPlugin` by resolving package entrypoints,\n// detecting module formats (ESM vs CJS), and extracting named exports from CJS bundles.\n//\n\n/** Strips vite query strings (e.g. `?v=123`) from resolved module IDs. */\nconst trimQueryString = (id: string) => id.replace(/\\?.*$/, '');\n\n/**\n * Determines whether a resolved file is an ESM module by checking file extension\n * first (.mjs/.cjs), then walking up to the nearest package.json for `\"type\": \"module\"`.\n */\nconst resolvedIdIsEsmModule = (resolvedId: string): boolean => {\n const file = trimQueryString(resolvedId);\n if (file.endsWith('.mjs') || file.endsWith('.mts')) {\n return true;\n }\n if (file.endsWith('.cjs') || file.endsWith('.cts')) {\n return false;\n }\n\n let directory = path.dirname(file);\n while (directory !== path.dirname(directory)) {\n const packageJsonPath = path.join(directory, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as { type?: string };\n return pkg.type === 'module';\n } catch {\n return false;\n }\n }\n directory = path.dirname(directory);\n }\n\n return false;\n};\n\n/**\n * Walks up from a resolved file path to find the package.json whose `\"name\"` matches\n * the given package name. Returns the path to that package.json, or undefined.\n */\nconst findPackageJsonPath = (resolvedId: string, packageName: string): string | undefined => {\n let directory = path.dirname(trimQueryString(resolvedId));\n\n while (directory !== path.dirname(directory)) {\n const packageJsonPath = path.join(directory, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as { name?: string };\n if (packageJson.name === packageName) {\n return packageJsonPath;\n }\n } catch {}\n }\n\n directory = path.dirname(directory);\n }\n\n return undefined;\n};\n\n/** Resolves a package name to its package.json path using Node's require.resolve. */\nconst resolvePackageJsonPath = (packageName: string): string | undefined => {\n try {\n return findPackageJsonPath(require.resolve(packageName), packageName);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Resolves a package name to its package.json via vite's own resolver, which handles\n * workspace-linked packages whose `exports` field omits `./package.json` (so\n * `require.resolve` can't find it). Falls back to `require.resolve`.\n */\nconst resolvePackageJsonPathViaContext = async (\n ctx: { resolve: (id: string) => Promise<{ id: string } | null> },\n packageName: string,\n): Promise<string | undefined> => {\n try {\n const resolved = await ctx.resolve(packageName);\n if (resolved) {\n const viaResolved = findPackageJsonPath(resolved.id, packageName);\n if (viaResolved) {\n return viaResolved;\n }\n }\n } catch {\n // fall through\n }\n return resolvePackageJsonPath(packageName);\n};\n\n/**\n * Subpath exports that should be excluded from the import map.\n * These are node-only entrypoints (vite plugins, native addons) that shouldn't be pre-bundled for the browser.\n *\n * TODO(wittjosiah): Replace these hand-maintained lists (plus {@link GLOBALLY_EXCLUDED_SUBPATHS}\n * and {@link BUILD_TOOL_SUBPATH}) with a structural check — e.g. honour an `agent`/`node`-only\n * export condition in package.json, or probe each subpath's resolved file for `node:*` imports\n * at build time — so every new server-only entrypoint doesn't require a code change here.\n */\nconst importMapExcludedSubpaths: Readonly<Record<string, ReadonlySet<string>>> = {\n '@dxos/app-framework': new Set(['vite-plugin']),\n // `@dxos/lit-grid/testing` re-exports a playwright page-object manager and pulls\n // `@playwright/test` (and transitive playwright-core) into the browser bundle.\n '@dxos/lit-grid': new Set(['testing']),\n '@dxos/react-ui-mosaic': new Set(['playwright']),\n '@dxos/react-ui-stack': new Set(['playwright']),\n '@dxos/react-ui-table': new Set(['playwright']),\n '@dxos/ui-theme': new Set(['plugin']),\n // `solid-js/web/storage` is a server-only helper that pulls\n // `node:async_hooks` (AsyncLocalStorage) and has no browser shim. Client\n // code imports `solid-js`, `solid-js/store`, and `solid-js/web` only.\n 'solid-js': new Set(['web/storage']),\n};\n\n/**\n * Subpaths common to many packages that should always be excluded.\n * `./playwright` subdirectories house e2e test harnesses that pull in\n * `@playwright/test` (a node-only package that breaks the browser bundle).\n * `./testing` subpaths similarly expose node-only test helpers (e.g.\n * `@dxos/edge-client/testing` pulls `@dxos/node-std/http` which has no\n * browser analogue) and aren't part of the plugin-facing surface.\n */\nconst GLOBALLY_EXCLUDED_SUBPATHS = new Set(['playwright', 'testing']);\n\n/**\n * Regex for subpaths that are always node-only build tooling — vite, esbuild, and\n * rollup plugins. These use `node:*` imports and will blow up the browser bundle if\n * they end up in the import map.\n */\nconst BUILD_TOOL_SUBPATH = /^(vite-plugin|esbuild-plugin|rollup-plugin|plugin)$/;\n\n/**\n * Asset subpaths (CSS, PCSS, images, etc.) that the host already loads via its own\n * bundle — for example `@dxos/react-ui-form` pulls in `@dxos/lit-ui/dx-tag-picker.pcss`\n * on startup, so the stylesheet is already attached to the DOM by the time a remote\n * plugin runs. Community plugins should still be able to _import_ those specifiers\n * (rolldown leaves the `import \"…\"` statements in the output when the package is\n * externalized), so the import map maps them to a no-op empty ES module. The\n * resulting browser fetch is a cheap no-op; the styles are never re-downloaded\n * and never re-injected.\n */\nconst ASSET_SUBPATH = /\\.(css|pcss|scss|sass|less|json|node|wasm|html|svg|png|jpe?g|gif|webp|ico)$/;\nconst isAssetSubpath = (specifier: string) => ASSET_SUBPATH.test(specifier);\n\n/**\n * Walks `baseDir` and returns every file that matches the pattern `${baseDir}/<rest>${extension}`.\n * Used to expand wildcard exports like `./proto/*` → `./dist/src/proto/gen/*.js` into their\n * full set of bare specifiers.\n */\nconst walkDirectoryForExtension = (baseDir: string, extension: string): string[] => {\n if (!existsSync(baseDir)) {\n return [];\n }\n const results: string[] = [];\n const walk = (dir: string) => {\n let entries: string[];\n try {\n entries = readdirSync(dir);\n } catch {\n return;\n }\n for (const entry of entries) {\n const full = path.join(dir, entry);\n let stat;\n try {\n stat = statSync(full);\n } catch {\n continue;\n }\n if (stat.isDirectory()) {\n walk(full);\n } else if (entry.endsWith(extension)) {\n results.push(path.relative(baseDir, full).slice(0, -extension.length));\n }\n }\n };\n walk(baseDir);\n return results;\n};\n\n/** Resolves an `exports` value to a single target path for pattern expansion. */\nconst pickPatternTarget = (value: unknown): string | undefined => {\n if (typeof value === 'string') {\n return value;\n }\n if (value && typeof value === 'object') {\n const obj = value as Record<string, unknown>;\n const preferred = obj.browser ?? obj.import ?? obj.default ?? obj.module;\n return typeof preferred === 'string' ? preferred : undefined;\n }\n return undefined;\n};\n\n/**\n * Expands a wildcard export like `./proto/*` into concrete subpath specifiers by walking\n * the target directory. Returns `<packageName>/<subpath>` strings.\n */\nconst expandWildcardExport = (\n packageName: string,\n packageJsonDir: string,\n exportKey: string,\n exportValue: unknown,\n): string[] => {\n const target = pickPatternTarget(exportValue);\n if (!target || !target.includes('*')) {\n return [];\n }\n // Split on `*` — at most one supported (node's exports pattern semantics).\n const keyStarIndex = exportKey.indexOf('*');\n const targetStarIndex = target.indexOf('*');\n if (keyStarIndex === -1 || targetStarIndex === -1) {\n return [];\n }\n const keyPrefix = exportKey.slice(2, keyStarIndex); // drop leading './'\n const targetPrefix = target.slice(2, targetStarIndex); // drop leading './'\n const targetSuffix = target.slice(targetStarIndex + 1);\n const baseDir = path.resolve(packageJsonDir, targetPrefix);\n const files = walkDirectoryForExtension(baseDir, targetSuffix || '.js');\n return files.map((relativeNoExt) => `${packageName}/${keyPrefix}${relativeNoExt}`);\n};\n\n/**\n * Reads a package's `exports` field and returns all subpath entrypoints as bare specifiers\n * (e.g. `@dxos/client`, `@dxos/client/echo`, `@dxos/lit-ui/dx-tag-picker.pcss`,\n * `@dxos/protocols/proto/dxos/echo/metadata`). Wildcard patterns are expanded by walking\n * the corresponding output directory. Falls back to just the package name if exports is\n * absent or simple.\n */\nconst getPackageEntrypoints = (packageName: string, packageJsonPath: string): string[] => {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as {\n exports?: Record<string, unknown> | string | string[];\n };\n const exportsField = packageJson.exports;\n\n if (!exportsField || typeof exportsField === 'string' || Array.isArray(exportsField)) {\n return [packageName];\n }\n\n const exportKeys = Object.keys(exportsField);\n if (!exportKeys.some((key) => key.startsWith('.'))) {\n return [packageName];\n }\n\n const excluded = importMapExcludedSubpaths[packageName];\n const packageJsonDir = path.dirname(packageJsonPath);\n const modules = exportKeys.flatMap((key) => {\n if (key === '.') {\n return [packageName];\n }\n\n if (!key.startsWith('./') || key === './package.json') {\n return [];\n }\n\n // Skip `.d.ts` subpath exports — these are meant to be imported as raw text\n // (e.g. `@dxos/echo-query/api.d.ts?raw` for in-editor type hints), not as\n // ES modules. Enumerating them here would have vite try to bundle the\n // declaration file's imports (protobufjs, effect, etc.), which breaks.\n if (key.endsWith('.d.ts')) {\n return [];\n }\n\n if (key.includes('*')) {\n // Expand wildcard patterns like `./proto/*` into concrete specifiers.\n return expandWildcardExport(packageName, packageJsonDir, key, (exportsField as Record<string, unknown>)[key]);\n }\n\n const subpath = key.slice(2);\n if (excluded?.has(subpath) || GLOBALLY_EXCLUDED_SUBPATHS.has(subpath) || BUILD_TOOL_SUBPATH.test(subpath)) {\n return [];\n }\n\n return [`${packageName}/${subpath}`];\n });\n\n return modules.length > 0 ? modules : [packageName];\n};\n\n/**\n * Statically analyzes a CJS file to extract named exports using cjs-module-lexer.\n * Follows re-exports (e.g. react's index.js re-exports from cjs/react.development.js)\n * and deduplicates. Filters out `default` and `__esModule` pseudo-exports.\n */\nconst getCjsNamedExports = (filePath: string, seen = new Set<string>()): string[] => {\n const normalized = trimQueryString(filePath);\n if (seen.has(normalized)) {\n return [];\n }\n seen.add(normalized);\n\n try {\n const source = readFileSync(normalized, 'utf8');\n const { exports: directExports, reexports } = parseCjs(source);\n\n const reexportedNames = reexports.flatMap((reexport) => {\n const resolved = path.resolve(path.dirname(normalized), reexport);\n const candidates = [resolved, `${resolved}.js`, `${resolved}.cjs`];\n const found = candidates.find((candidate) => existsSync(candidate));\n return found ? getCjsNamedExports(found, seen) : [];\n });\n\n return [...new Set([...directExports, ...reexportedNames])].filter(\n (name) => name !== 'default' && name !== '__esModule',\n );\n } catch {\n return [];\n }\n};\n\n/**\n * Vite plugin for the **host app** (Composer). Generates a browser import map so that\n * shared packages are loaded once and reused by both the host and any remote plugins.\n *\n * In dev mode, maps bare specifiers directly to resolved file paths.\n * In production, emits a dedicated chunk per specifier via virtual wrapper modules,\n * then injects a `<script type=\"importmap\">` tag into the HTML with the chunk URLs.\n *\n * Virtual wrappers are needed because directly emitting chunks for CJS packages loses\n * their named exports due to Rollup's interop. The wrapper re-exports them explicitly.\n */\nexport const importMapPlugin = (options?: { packages?: string[] }): Plugin[] => {\n const packages = options?.packages ?? DEFAULT_PACKAGES;\n const WRAPPER_PREFIX = '\\0import-map:';\n const chunkRefIds: Record<string, string> = {};\n const resolvedIds: Record<string, string> = {};\n let imports: Record<string, string> = {};\n let modules: string[] = [];\n let importMapIsDev = false;\n let base = '/';\n\n return [\n // Phase 1: Resolve all package entrypoints and emit chunks (or record dev paths).\n {\n name: 'import-map:get-chunk-ref-ids',\n configResolved(config) {\n base = config.base ?? '/';\n },\n async buildStart() {\n importMapIsDev = this.environment.mode === 'dev';\n await initCjsLexer();\n\n // Expand each package name into its full set of subpath entrypoints\n // (e.g. '@dxos/client' -> ['@dxos/client', '@dxos/client/echo', ...]).\n modules = [\n ...new Set(\n (\n await Promise.all(\n packages.map(async (packageName) => {\n const packageJsonPath = await resolvePackageJsonPathViaContext(this, packageName);\n if (!packageJsonPath) {\n this.warn(`Unable to locate package.json for import map package: ${packageName}`);\n return [packageName];\n }\n\n return getPackageEntrypoints(packageName, packageJsonPath);\n }),\n )\n ).flat(),\n ),\n ];\n\n for (const specifier of modules) {\n if (isAssetSubpath(specifier)) {\n // Host already loaded the real asset; remote plugins need the specifier to\n // resolve to *something* that behaves as an ES module. A data URL is the\n // cheapest option — no chunk to emit (rolldown tree-shakes an empty wrapper\n // even with `preserveSignature: 'strict'`, so the referenced file wouldn't\n // exist at runtime), no extra network request, and the same path in dev and prod.\n imports[specifier] = 'data:text/javascript;charset=utf-8,export%20%7B%7D%3B';\n continue;\n }\n\n const resolved = await this.resolve(specifier);\n if (!resolved) {\n this.warn(`Import map: unable to resolve \"${specifier}\"; omitting from import map.`);\n continue;\n }\n\n if (importMapIsDev) {\n // Dev: map bare specifier to the resolved file path, prefixed with vite's\n // `/@fs/` escape hatch so absolute node_modules paths (including\n // `.vite/deps/*` pre-bundled chunks) round-trip through the dev server\n // instead of being resolved against the document origin as a 404.\n const filePath = trimQueryString(resolved.id);\n imports[specifier] = filePath.startsWith('/') ? `/@fs${filePath}` : filePath;\n } else {\n // Prod: emit a virtual wrapper chunk that re-exports from the real module.\n resolvedIds[specifier] = resolved.id;\n chunkRefIds[specifier] = this.emitFile({\n type: 'chunk',\n id: `${WRAPPER_PREFIX}${specifier}`,\n preserveSignature: 'strict',\n });\n }\n }\n },\n\n // Intercept virtual wrapper IDs so Rollup doesn't try to resolve them as files.\n resolveId(id) {\n if (id.startsWith(WRAPPER_PREFIX)) {\n return id;\n }\n },\n\n // Generate the source for each virtual wrapper module.\n // For CJS packages, explicitly re-export named exports (discovered via static analysis)\n // because Rollup's `export *` interop doesn't preserve them for CJS.\n load(id) {\n if (!id.startsWith(WRAPPER_PREFIX)) {\n return;\n }\n const specifier = id.slice(WRAPPER_PREFIX.length);\n const resolvedId = resolvedIds[specifier];\n if (!resolvedId) {\n return `export * from ${JSON.stringify(specifier)};\\n`;\n }\n\n const filePath = trimQueryString(resolvedId);\n const isCjs = filePath.endsWith('.cjs') || (!filePath.endsWith('.mjs') && !resolvedIdIsEsmModule(filePath));\n\n if (isCjs) {\n const named = getCjsNamedExports(filePath);\n if (named.length > 0) {\n return `export { default, ${named.join(', ')} } from ${JSON.stringify(specifier)};\\n`;\n }\n }\n return `export * from ${JSON.stringify(specifier)};\\n`;\n },\n\n // After bundling, map each specifier to the URL of its emitted chunk. Preserves\n // asset-subpath entries already written to `imports` during `buildStart` (those\n // use an inline data URL rather than an emitted chunk).\n generateBundle() {\n if (importMapIsDev) {\n return;\n }\n\n imports = {\n ...imports,\n ...Object.fromEntries(\n modules\n .filter((specifier) => chunkRefIds[specifier] !== undefined)\n .map((specifier) => [specifier, `${base}${this.getFileName(chunkRefIds[specifier])}`]),\n ),\n };\n },\n },\n\n // Phase 2: Inject the import map into the HTML as a <script type=\"importmap\"> tag.\n {\n name: 'import-map:transform-index-html',\n enforce: 'post',\n transformIndexHtml(html: string) {\n const tags = [\n {\n tag: 'script',\n attrs: {\n type: 'importmap',\n },\n children: JSON.stringify({ imports }, null, 2),\n },\n ];\n\n return {\n html,\n tags,\n };\n },\n },\n ];\n};\n"],
|
|
5
|
+
"mappings": ";;;AAKA,OAAOA,qBAAqB;;;ACMrB,IAAMC,sBAAsB;AAO5B,IAAMC,oBAAoB,CAACC,MAAmB,EAAEC,WAAU,MAC/DC,KAAKC,UAAU;EAAE,GAAGH;EAAMC;AAAW,GAAG,MAAM,CAAA;;;ACIhD,IAAMG,8BAA8B;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAMC,mBAAmB;;EAE9B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGGD;;AAaE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ta", "moduleFile", "JSON", "stringify", "THIRD_PARTY_SHARED_PACKAGES", "DEFAULT_PACKAGES", "isSharedPackage", "id", "some", "pkg", "startsWith", "JSX_DEV_RUNTIME", "DEFAULT_MODULE_FILE", "isExternal", "id", "isSharedPackage", "REQUIRE_SHIM_BANNER", "join", "composerPlugin", "options", "entry", "port", "moduleFile", "meta", "resolved", "Set", "base", "plugins", "cssInjectedByJs", "name", "config", "server", "cors", "preview", "build", "sourcemap", "target", "lib", "formats", "fileName", "assetsInlineLimit", "rolldownOptions", "external", "output", "inlineDynamicImports", "banner", "enforce", "apply", "optimizeDeps", "exclude", "DEFAULT_PACKAGES", "resolveId", "add", "load", "has", "code", "configResolved", "push", "transform", "size", "escaped", "map", "s", "replace", "pattern", "RegExp", "test", "_", "dep", "undefined", "endsWith", "shim", "generateBundle", "emitFile", "type", "MANIFEST_ASSET_NAME", "source", "serializeManifest", "init", "initCjsLexer", "parse", "parseCjs", "existsSync", "readFileSync", "readdirSync", "statSync", "createRequire", "nodeCreateRequire", "path", "require", "nodeCreateRequire", "url", "trimQueryString", "id", "replace", "resolvedIdIsEsmModule", "resolvedId", "file", "endsWith", "directory", "path", "dirname", "packageJsonPath", "join", "existsSync", "pkg", "JSON", "parse", "readFileSync", "type", "findPackageJsonPath", "packageName", "packageJson", "name", "undefined", "resolvePackageJsonPath", "resolve", "resolvePackageJsonPathViaContext", "ctx", "resolved", "viaResolved", "importMapExcludedSubpaths", "Set", "GLOBALLY_EXCLUDED_SUBPATHS", "BUILD_TOOL_SUBPATH", "ASSET_SUBPATH", "isAssetSubpath", "specifier", "test", "walkDirectoryForExtension", "baseDir", "extension", "results", "walk", "dir", "entries", "readdirSync", "entry", "full", "stat", "statSync", "isDirectory", "push", "relative", "slice", "length", "pickPatternTarget", "value", "obj", "preferred", "browser", "import", "default", "module", "expandWildcardExport", "packageJsonDir", "exportKey", "exportValue", "target", "includes", "keyStarIndex", "indexOf", "targetStarIndex", "keyPrefix", "targetPrefix", "targetSuffix", "files", "map", "relativeNoExt", "getPackageEntrypoints", "exportsField", "exports", "Array", "isArray", "exportKeys", "Object", "keys", "some", "key", "startsWith", "excluded", "modules", "flatMap", "subpath", "has", "getCjsNamedExports", "filePath", "seen", "normalized", "add", "source", "directExports", "reexports", "parseCjs", "reexportedNames", "reexport", "candidates", "found", "find", "candidate", "filter", "importMapPlugin", "options", "packages", "DEFAULT_PACKAGES", "WRAPPER_PREFIX", "chunkRefIds", "resolvedIds", "imports", "importMapIsDev", "base", "configResolved", "config", "buildStart", "environment", "mode", "initCjsLexer", "Promise", "all", "warn", "flat", "emitFile", "preserveSignature", "resolveId", "load", "stringify", "isCjs", "named", "generateBundle", "fromEntries", "getFileName", "enforce", "transformIndexHtml", "html", "tags", "tag", "attrs", "children"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/vite-plugin/manifest.ts":{"bytes":2345,"imports":[],"format":"esm"},"src/vite-plugin/packages.ts":{"bytes":13312,"imports":[],"format":"esm"},"src/vite-plugin/composer-plugin.ts":{"bytes":36592,"imports":[{"path":"vite-plugin-css-injected-by-js","kind":"import-statement","external":true},{"path":"src/vite-plugin/manifest.ts","kind":"import-statement","original":"./manifest"},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"./packages"}],"format":"esm"},"src/vite-plugin/import-map-plugin.ts":{"bytes":58441,"imports":[{"path":"cjs-module-lexer","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"./packages"}],"format":"esm"},"src/vite-plugin/index.ts":{"bytes":685,"imports":[{"path":"src/vite-plugin/composer-plugin.ts","kind":"import-statement","original":"./composer-plugin"},{"path":"src/vite-plugin/import-map-plugin.ts","kind":"import-statement","original":"./import-map-plugin"},{"path":"src/vite-plugin/packages.ts","kind":"import-statement","original":"./packages"}],"format":"esm"}},"outputs":{"dist/plugin/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":51383},"dist/plugin/node-esm/index.mjs":{"imports":[{"path":"vite-plugin-css-injected-by-js","kind":"import-statement","external":true},{"path":"cjs-module-lexer","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:module","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":["DEFAULT_PACKAGES","MANIFEST_ASSET_NAME","composerPlugin","importMapPlugin","isSharedPackage","serializeManifest"],"entryPoint":"src/vite-plugin/index.ts","inputs":{"src/vite-plugin/composer-plugin.ts":{"bytesInOutput":8925},"src/vite-plugin/manifest.ts":{"bytesInOutput":147},"src/vite-plugin/packages.ts":{"bytesInOutput":3237},"src/vite-plugin/index.ts":{"bytesInOutput":0},"src/vite-plugin/import-map-plugin.ts":{"bytesInOutput":11626}},"bytes":24376}}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as Command from '@effect/cli/Command';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import * as Layer from 'effect/Layer';
|
|
4
|
+
import { Plugin, PluginManager } from '../core';
|
|
5
|
+
type SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];
|
|
6
|
+
export type CreateCliAppOptions = {
|
|
7
|
+
rootCommand: Command.Command<any, any, any, any>;
|
|
8
|
+
subCommands?: SubCommands;
|
|
9
|
+
pluginManager?: PluginManager.PluginManager;
|
|
10
|
+
pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];
|
|
11
|
+
plugins?: Plugin.Plugin[];
|
|
12
|
+
core?: string[];
|
|
13
|
+
enabled?: string[];
|
|
14
|
+
safeMode?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates a CLI application with plugin support.
|
|
18
|
+
* Similar to useApp but for CLI environments.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const plugins = [ClientPluginCLI()];
|
|
22
|
+
* const manager = await createCliApp({ plugins });
|
|
23
|
+
* const commands = manager.capabilities.getAll(Capabilities.Command);
|
|
24
|
+
*
|
|
25
|
+
* @param options.pluginManager Optional existing PluginManager instance.
|
|
26
|
+
* @param options.pluginLoader Function to load plugins by ID.
|
|
27
|
+
* @param options.plugins All plugins available to the application.
|
|
28
|
+
* @param options.core Core plugins which will always be enabled.
|
|
29
|
+
* @param options.enabled Enabled plugins.
|
|
30
|
+
* @param options.safeMode Whether to enable safe mode, which disables optional plugins.
|
|
31
|
+
*/
|
|
32
|
+
export declare const createCliApp: (args_0: CreateCliAppOptions) => Effect.Effect<{
|
|
33
|
+
command: Command.Command<any, any, any, {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
}>;
|
|
36
|
+
layer: Layer.Layer<any, any, never>;
|
|
37
|
+
}, Error, never>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/cli/cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAc,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW5D,KAAK,WAAW,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAExG,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC;IAC5C,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;;;;;gBAuDvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ActivationEvent as ActivationEvent$ } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Fired when the app is started.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Startup: ActivationEvent$.ActivationEvent;
|
|
6
|
+
/**
|
|
7
|
+
* Fired to load any newly available surfaces.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SetupReactSurface: ActivationEvent$.ActivationEvent;
|
|
10
|
+
/**
|
|
11
|
+
* Fired before the operation invoker is activated.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SetupOperationHandler: ActivationEvent$.ActivationEvent;
|
|
14
|
+
/**
|
|
15
|
+
* Fired before the managed runtime is created.
|
|
16
|
+
* Plugins should contribute their Layer capabilities before this event.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SetupLayer: ActivationEvent$.ActivationEvent;
|
|
19
|
+
/**
|
|
20
|
+
* Fired after the operation invoker is ready.
|
|
21
|
+
*/
|
|
22
|
+
export declare const OperationInvokerReady: ActivationEvent$.ActivationEvent;
|
|
23
|
+
/**
|
|
24
|
+
* Fired after the managed runtime is ready.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ManagedRuntimeReady: ActivationEvent$.ActivationEvent;
|
|
27
|
+
//# sourceMappingURL=activation-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation-events.d.ts","sourceRoot":"","sources":["../../../../src/common/activation-events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,OAAO,kCAAgE,CAAC;AAMrF;;GAEG;AACH,eAAO,MAAM,iBAAiB,kCAA4E,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,qBAAqB,kCAAgF,CAAC;AAEnH;;;GAGG;AACH,eAAO,MAAM,UAAU,kCAAoE,CAAC;AAM5F;;GAEG;AACH,eAAO,MAAM,qBAAqB,kCAAgF,CAAC;AAEnH;;GAEG;AACH,eAAO,MAAM,mBAAmB,kCAA8E,CAAC"}
|
|
@@ -1,122 +1,110 @@
|
|
|
1
|
-
import { type Registry } from '@effect-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { type
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}>>;
|
|
111
|
-
export const Tools: import("..").InterfaceDef<ExecutableTool[]>;
|
|
112
|
-
export const ArtifactDefinition: import("..").InterfaceDef<ArtifactDefinition>;
|
|
113
|
-
export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
|
|
114
|
-
export const FileUploader: import("..").InterfaceDef<FileUploader>;
|
|
115
|
-
type AnchorSort = {
|
|
116
|
-
key: string;
|
|
117
|
-
sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
|
|
118
|
-
};
|
|
119
|
-
export const AnchorSort: import("..").InterfaceDef<AnchorSort>;
|
|
120
|
-
export {};
|
|
121
|
-
}
|
|
1
|
+
import { type Atom, type Registry } from '@effect-atom/atom-react';
|
|
2
|
+
import type * as Command$ from '@effect/cli/Command';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import type * as Layer$ from 'effect/Layer';
|
|
5
|
+
import type * as ManagedRuntime$ from 'effect/ManagedRuntime';
|
|
6
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
7
|
+
import type { OperationInvoker as OperationInvoker$, OperationHandlerSet } from '@dxos/operation';
|
|
8
|
+
import { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';
|
|
9
|
+
import type { HistoryTracker as HistoryTracker$, UndoMapping as UndoMapping$, UndoRegistry as UndoRegistry$ } from '../plugin-operation';
|
|
10
|
+
import type { Surface } from '../ui';
|
|
11
|
+
/**
|
|
12
|
+
* Null capability.
|
|
13
|
+
* @category Capability
|
|
14
|
+
*/
|
|
15
|
+
export declare const Null: Capability$.InterfaceDef<null>;
|
|
16
|
+
/**
|
|
17
|
+
* @category Capability
|
|
18
|
+
*/
|
|
19
|
+
export declare const PluginManager: Capability$.InterfaceDef<PluginManager$.PluginManager>;
|
|
20
|
+
/**
|
|
21
|
+
* @category Capability
|
|
22
|
+
*/
|
|
23
|
+
export declare const AtomRegistry: Capability$.InterfaceDef<Registry.Registry>;
|
|
24
|
+
export type ReactContext = Readonly<{
|
|
25
|
+
id: string;
|
|
26
|
+
dependsOn?: string[];
|
|
27
|
+
context: FC<PropsWithChildren>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* @category Capability
|
|
31
|
+
*/
|
|
32
|
+
export declare const ReactContext: Capability$.InterfaceDef<Readonly<{
|
|
33
|
+
id: string;
|
|
34
|
+
dependsOn?: string[];
|
|
35
|
+
context: FC<PropsWithChildren>;
|
|
36
|
+
}>>;
|
|
37
|
+
export type ReactRoot = Readonly<{
|
|
38
|
+
id: string;
|
|
39
|
+
root: FC<PropsWithChildren>;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* @category Capability
|
|
43
|
+
*/
|
|
44
|
+
export declare const ReactRoot: Capability$.InterfaceDef<Readonly<{
|
|
45
|
+
id: string;
|
|
46
|
+
root: FC<PropsWithChildren>;
|
|
47
|
+
}>>;
|
|
48
|
+
/**
|
|
49
|
+
* Surface definitions that can be either React components or Web Components.
|
|
50
|
+
*/
|
|
51
|
+
export type ReactSurface = Surface.Definition | readonly Surface.Definition[];
|
|
52
|
+
/**
|
|
53
|
+
* @category Capability
|
|
54
|
+
*/
|
|
55
|
+
export declare const ReactSurface: Capability$.InterfaceDef<ReactSurface>;
|
|
56
|
+
export type AnyCommand = Command$.Command<any, any, any, any>;
|
|
57
|
+
/**
|
|
58
|
+
* @category Capability
|
|
59
|
+
*/
|
|
60
|
+
export declare const Command: Capability$.InterfaceDef<AnyCommand>;
|
|
61
|
+
/**
|
|
62
|
+
* @category Capability
|
|
63
|
+
*/
|
|
64
|
+
export declare const Layer: Capability$.InterfaceDef<Layer$.Layer<any, any, any>>;
|
|
65
|
+
export type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;
|
|
66
|
+
/**
|
|
67
|
+
* @category Capability
|
|
68
|
+
*/
|
|
69
|
+
export declare const ManagedRuntime: Capability$.InterfaceDef<ManagedRuntime>;
|
|
70
|
+
export declare const OperationHandler: Capability$.InterfaceDef<OperationHandlerSet.OperationHandlerSet>;
|
|
71
|
+
export type UndoMapping = UndoMapping$.UndoMapping;
|
|
72
|
+
/**
|
|
73
|
+
* Undo mapping registration - contributed by plugins.
|
|
74
|
+
* @category Capability
|
|
75
|
+
*/
|
|
76
|
+
export declare const UndoMapping: Capability$.InterfaceDef<UndoMapping[]>;
|
|
77
|
+
export type OperationInvoker = OperationInvoker$.OperationInvoker;
|
|
78
|
+
/**
|
|
79
|
+
* Operation invoker - provided by OperationPlugin.
|
|
80
|
+
* @category Capability
|
|
81
|
+
*/
|
|
82
|
+
export declare const OperationInvoker: Capability$.InterfaceDef<OperationInvoker$.OperationInvoker>;
|
|
83
|
+
export type UndoRegistry = UndoRegistry$.UndoRegistry;
|
|
84
|
+
/**
|
|
85
|
+
* Undo registry - provided by OperationPlugin.
|
|
86
|
+
* @category Capability
|
|
87
|
+
*/
|
|
88
|
+
export declare const UndoRegistry: Capability$.InterfaceDef<UndoRegistry$.UndoRegistry>;
|
|
89
|
+
export type HistoryTracker = HistoryTracker$.HistoryTracker;
|
|
90
|
+
/**
|
|
91
|
+
* History tracker - provided by OperationPlugin.
|
|
92
|
+
* @category Capability
|
|
93
|
+
*/
|
|
94
|
+
export declare const HistoryTracker: Capability$.InterfaceDef<HistoryTracker$.HistoryTracker>;
|
|
95
|
+
/**
|
|
96
|
+
* Get the current value of an atom capability.
|
|
97
|
+
* @example const settings = yield* Capabilities.getAtomValue(ThreadCapabilities.Settings);
|
|
98
|
+
*/
|
|
99
|
+
export declare const getAtomValue: <T>(atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>) => Effect.Effect<T, Error, Capability$.Service>;
|
|
100
|
+
/**
|
|
101
|
+
* Update an atom capability value (requires writable atom).
|
|
102
|
+
* @example yield* Capabilities.updateAtomValue(ThreadCapabilities.Settings, (s) => ({ ...s, foo: true }));
|
|
103
|
+
*/
|
|
104
|
+
export declare const updateAtomValue: <T>(atomCapability: Capability$.InterfaceDef<Atom.Writable<T>>, fn: (current: T) => T) => Effect.Effect<void, Error, Capability$.Service>;
|
|
105
|
+
/**
|
|
106
|
+
* Subscribe to an atom capability.
|
|
107
|
+
* @example const unsubscribe = yield* Capabilities.subscribeAtom(ThreadCapabilities.Settings, (value) => ...);
|
|
108
|
+
*/
|
|
109
|
+
export declare const subscribeAtom: <T>(atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>, callback: (value: T) => void) => Effect.Effect<() => void, Error, Capability$.Service>;
|
|
122
110
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/common/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file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AAY,GAAI,CAAC,EAC5B,gBAAgB,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KACrD,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAK1C,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAC/B,gBAAgB,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC1D,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KACpB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAK7C,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAC7B,gBAAgB,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EACtD,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAC3B,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAKnD,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export * from './capabilities';
|
|
2
|
-
export * from './
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './graph';
|
|
6
|
-
export * from './layout';
|
|
7
|
-
export * from './surface';
|
|
8
|
-
export * from './translations';
|
|
1
|
+
export * as Capabilities from './capabilities';
|
|
2
|
+
export * as ActivationEvents from './activation-events';
|
|
3
|
+
export { UndoOperation } from './operations';
|
|
4
|
+
export { Label } from './translations';
|
|
9
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Operation } from '@dxos/operation';
|
|
2
|
+
import { Capability } from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* Operations related to undo/history functionality.
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace UndoOperation {
|
|
7
|
+
/**
|
|
8
|
+
* Show an undo toast notification.
|
|
9
|
+
* Fired by HistoryTracker when an undoable operation is tracked.
|
|
10
|
+
*/
|
|
11
|
+
const ShowUndo: Operation.Definition<{
|
|
12
|
+
readonly message?: string | [string, {
|
|
13
|
+
ns: string;
|
|
14
|
+
count?: number | undefined;
|
|
15
|
+
defaultValue?: string | undefined;
|
|
16
|
+
}] | undefined;
|
|
17
|
+
}, void, Capability.Service>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/common/operations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC;;GAEG;AACH,yBAAiB,aAAa,CAAC;IAC7B;;;OAGG;IACI,MAAM,QAAQ;;;;;;gCAYnB,CAAC;CACJ"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const ResourceKey: Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.Any>]>;
|
|
3
|
-
export type ResourceKey = Schema.Schema.Type<typeof ResourceKey>;
|
|
4
|
-
export declare const ResourceLanguage: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.Record$<typeof Schema.String, typeof Schema.Any>]>>;
|
|
5
|
-
export type ResourceLanguage = Schema.Schema.Type<typeof ResourceLanguage>;
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
6
2
|
/**
|
|
7
|
-
* A
|
|
3
|
+
* A Label represents translatable text - either a simple string or a tuple of [key, options].
|
|
8
4
|
*/
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
5
|
+
export declare const Label: Schema.Union<[typeof Schema.String, Schema.mutable<Schema.Tuple2<typeof Schema.String, Schema.mutable<Schema.Struct<{
|
|
6
|
+
ns: typeof Schema.String;
|
|
7
|
+
count: Schema.optional<typeof Schema.Number>;
|
|
8
|
+
defaultValue: Schema.optional<typeof Schema.String>;
|
|
9
|
+
}>>>>]>;
|
|
10
|
+
export type Label = Schema.Schema.Type<typeof Label>;
|
|
11
11
|
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/common/translations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,KAAK;;;;OAcjB,CAAC;AACF,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/context.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,eAAO,MAAM,oBAAoB;;CAAsF,CAAC"}
|