@dxos/app-framework 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.mts +1 -1
- package/.storybook/preview.mts +2 -2
- package/dist/lib/browser/app-graph-builder-M2VPYQC6.mjs +149 -0
- package/dist/lib/browser/app-graph-builder-M2VPYQC6.mjs.map +7 -0
- package/dist/lib/browser/capability-7PCNSWBT.mjs +33 -0
- package/dist/lib/browser/capability-7PCNSWBT.mjs.map +7 -0
- package/dist/lib/browser/capability-KP3PFEXD.mjs +31 -0
- package/dist/lib/browser/capability-KP3PFEXD.mjs.map +7 -0
- package/dist/lib/browser/chunk-6Y7PZV72.mjs +77 -0
- package/dist/lib/browser/chunk-6Y7PZV72.mjs.map +7 -0
- package/dist/lib/browser/chunk-7IQHKD4U.mjs +170 -0
- package/dist/lib/browser/chunk-7IQHKD4U.mjs.map +7 -0
- package/dist/lib/browser/chunk-BLQJSGL3.mjs +732 -0
- package/dist/lib/browser/chunk-BLQJSGL3.mjs.map +7 -0
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +8 -0
- package/dist/lib/browser/chunk-FHQTHCX7.mjs.map +7 -0
- package/dist/lib/browser/chunk-FMZN33N4.mjs +807 -0
- package/dist/lib/browser/chunk-FMZN33N4.mjs.map +7 -0
- package/dist/lib/browser/chunk-H4WPA7U7.mjs +77 -0
- package/dist/lib/browser/chunk-H4WPA7U7.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-PKQT6C53.mjs +47 -0
- package/dist/lib/browser/chunk-PKQT6C53.mjs.map +7 -0
- package/dist/lib/browser/chunk-TCLLRCS3.mjs +145 -0
- package/dist/lib/browser/chunk-TCLLRCS3.mjs.map +7 -0
- package/dist/lib/browser/chunk-XYNO72GQ.mjs +746 -0
- package/dist/lib/browser/chunk-XYNO72GQ.mjs.map +7 -0
- package/dist/lib/browser/common/index.mjs +38 -0
- package/dist/lib/browser/core/activation-event.mjs +20 -0
- package/dist/lib/browser/core/capability.mjs +28 -0
- package/dist/lib/browser/core/plugin-manager.mjs +15 -0
- package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/browser/core/plugin.mjs +27 -0
- package/dist/lib/browser/core/plugin.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +162 -128
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/invoker-capability-SZRSTHEH.mjs +32 -0
- package/dist/lib/browser/invoker-capability-SZRSTHEH.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-6MP2MYOY.mjs +64 -0
- package/dist/lib/browser/operation-resolver-6MP2MYOY.mjs.map +7 -0
- package/dist/lib/browser/react/index.mjs +46 -0
- package/dist/lib/browser/react/index.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +68 -22
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/app-graph-builder-LROHGJEM.mjs +150 -0
- package/dist/lib/node-esm/app-graph-builder-LROHGJEM.mjs.map +7 -0
- package/dist/lib/node-esm/capability-CFLQ2QQU.mjs +34 -0
- package/dist/lib/node-esm/capability-CFLQ2QQU.mjs.map +7 -0
- package/dist/lib/node-esm/capability-RCUNM2M7.mjs +32 -0
- package/dist/lib/node-esm/capability-RCUNM2M7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-663A54LQ.mjs +171 -0
- package/dist/lib/node-esm/chunk-663A54LQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6WXBT3EC.mjs +747 -0
- package/dist/lib/node-esm/chunk-6WXBT3EC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs +48 -0
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GQEBIGKD.mjs +733 -0
- package/dist/lib/node-esm/chunk-GQEBIGKD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GT6OKM5I.mjs +146 -0
- package/dist/lib/node-esm/chunk-GT6OKM5I.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-STMXUEPO.mjs +78 -0
- package/dist/lib/node-esm/chunk-STMXUEPO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UEWJDI2L.mjs +10 -0
- package/dist/lib/node-esm/chunk-UEWJDI2L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XR6NMKEP.mjs +78 -0
- package/dist/lib/node-esm/chunk-XR6NMKEP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XYQTBFPA.mjs +808 -0
- package/dist/lib/node-esm/chunk-XYQTBFPA.mjs.map +7 -0
- package/dist/lib/node-esm/common/index.mjs +39 -0
- package/dist/lib/node-esm/common/index.mjs.map +7 -0
- package/dist/lib/node-esm/core/activation-event.mjs +21 -0
- package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
- package/dist/lib/node-esm/core/capability.mjs +29 -0
- package/dist/lib/node-esm/core/capability.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs +16 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin.mjs +28 -0
- package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +162 -128
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/invoker-capability-PNMA5JOS.mjs +33 -0
- package/dist/lib/node-esm/invoker-capability-PNMA5JOS.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-7YWDMTNU.mjs +65 -0
- package/dist/lib/node-esm/operation-resolver-7YWDMTNU.mjs.map +7 -0
- package/dist/lib/node-esm/react/index.mjs +47 -0
- package/dist/lib/node-esm/react/index.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +68 -22
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/cli.d.ts +39 -0
- package/dist/types/src/cli.d.ts.map +1 -0
- package/dist/types/src/common/activation-event.d.ts +66 -0
- package/dist/types/src/common/activation-event.d.ts.map +1 -0
- package/dist/types/src/common/capability.d.ts +265 -0
- package/dist/types/src/common/capability.d.ts.map +1 -0
- package/dist/types/src/common/collaboration.d.ts +23 -17
- package/dist/types/src/common/collaboration.d.ts.map +1 -1
- package/dist/types/src/common/graph.d.ts +2 -2
- package/dist/types/src/common/graph.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +4 -3
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +380 -0
- package/dist/types/src/common/operations.d.ts.map +1 -0
- package/dist/types/src/common/plugin.d.ts +201 -0
- package/dist/types/src/common/plugin.d.ts.map +1 -0
- package/dist/types/src/common/surface.d.ts +48 -13
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +9 -0
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/context.d.ts +5 -0
- package/dist/types/src/context.d.ts.map +1 -0
- package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +6 -6
- package/dist/types/src/core/activation-event.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.d.ts +43 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.test.d.ts +2 -0
- package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/capability.d.ts +150 -0
- package/dist/types/src/core/capability.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +5 -4
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manager.d.ts +66 -0
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +92 -34
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +5 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/debug/Debug.d.ts +4 -2
- package/dist/types/src/playground/debug/Debug.d.ts.map +1 -1
- package/dist/types/src/playground/debug/plugin.d.ts +2 -1
- package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Main.d.ts +4 -2
- package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +4 -2
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/generator/generator.d.ts +17 -5
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts +2 -1
- package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/layout/Layout.d.ts +4 -2
- package/dist/types/src/playground/layout/Layout.d.ts.map +1 -1
- package/dist/types/src/playground/layout/plugin.d.ts +2 -1
- package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +4 -2
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts +2 -1
- package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/schema.d.ts +14 -0
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts +3 -0
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts +7 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts +5 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +18 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/index.d.ts +6 -0
- package/dist/types/src/plugin-operation/history/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/types.d.ts +13 -0
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +93 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +23 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/index.d.ts +3 -0
- package/dist/types/src/plugin-operation/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +6 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/meta.d.ts +3 -0
- package/dist/types/src/plugin-operation/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/testing.d.ts +109 -0
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +3 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/capability.d.ts +6 -0
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/index.d.ts +2 -0
- package/dist/types/src/plugin-runtime/index.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/meta.d.ts +3 -0
- package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +2 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts +36 -0
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +4 -2
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/meta.d.ts +2 -2
- package/dist/types/src/plugin-settings/meta.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/operation-resolver.d.ts +6 -0
- package/dist/types/src/plugin-settings/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/react/App.d.ts +8 -0
- package/dist/types/src/react/App.d.ts.map +1 -0
- package/dist/types/src/react/App.stories.d.ts.map +1 -0
- package/dist/types/src/react/DefaultFallback.d.ts.map +1 -0
- package/dist/types/src/react/PluginManagerContext.stories.d.ts +13 -0
- package/dist/types/src/react/PluginManagerContext.stories.d.ts.map +1 -0
- package/dist/types/src/react/PluginManagerProvider.d.ts +2 -2
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +1 -1
- package/dist/types/src/react/Surface.d.ts +8 -6
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/Surface.stories.d.ts +3 -6
- package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
- package/dist/types/src/react/SurfaceInfo.d.ts +11 -0
- package/dist/types/src/react/SurfaceInfo.d.ts.map +1 -0
- package/dist/types/src/react/common.d.ts +13 -12
- package/dist/types/src/react/common.d.ts.map +1 -1
- package/dist/types/src/react/index.d.ts +3 -1
- package/dist/types/src/react/index.d.ts.map +1 -1
- package/dist/types/src/react/types.d.ts +12 -0
- package/dist/types/src/react/types.d.ts.map +1 -0
- package/dist/types/src/{components → react}/useApp.d.ts +7 -6
- package/dist/types/src/react/useApp.d.ts.map +1 -0
- package/dist/types/src/react/useCapabilities.d.ts +16 -3
- package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/{components → react}/useLoading.d.ts +1 -2
- package/dist/types/src/react/useLoading.d.ts.map +1 -0
- package/dist/types/src/react/useOperationResolver.d.ts +19 -0
- package/dist/types/src/react/useOperationResolver.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/service.d.ts +8 -0
- package/dist/types/src/testing/service.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +4 -4
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +6 -2
- package/package.json +101 -45
- package/src/cli.ts +107 -0
- package/src/common/activation-event.ts +99 -0
- package/src/common/capability.ts +343 -0
- package/src/common/collaboration.ts +23 -10
- package/src/common/graph.ts +2 -2
- package/src/common/index.ts +4 -3
- package/src/common/operations.ts +412 -0
- package/src/common/plugin.ts +364 -0
- package/src/common/surface.ts +56 -19
- package/src/common/translations.ts +20 -0
- package/src/context.ts +9 -0
- package/src/core/{events.ts → activation-event.ts} +5 -5
- package/src/core/capability-manager.test.ts +151 -0
- package/src/core/capability-manager.ts +171 -0
- package/src/core/capability.ts +236 -0
- package/src/core/index.ts +5 -4
- package/src/core/plugin-manager.test.ts +845 -0
- package/src/core/plugin-manager.ts +696 -0
- package/src/core/plugin.ts +221 -39
- package/src/index.ts +5 -4
- package/src/playground/debug/Debug.tsx +26 -16
- package/src/playground/debug/plugin.ts +8 -8
- package/src/playground/generator/Main.tsx +20 -11
- package/src/playground/generator/Toolbar.tsx +26 -16
- package/src/playground/generator/generator.ts +27 -27
- package/src/playground/generator/plugin.ts +11 -12
- package/src/playground/layout/Layout.tsx +11 -7
- package/src/playground/layout/plugin.ts +8 -8
- package/src/playground/logger/Toolbar.tsx +19 -16
- package/src/playground/logger/plugin.ts +24 -23
- package/src/playground/logger/schema.ts +10 -0
- package/src/playground/playground.stories.tsx +14 -6
- package/src/plugin-operation/OperationPlugin.ts +25 -0
- package/src/plugin-operation/history/capability.ts +37 -0
- package/src/plugin-operation/history/errors.ts +11 -0
- package/src/plugin-operation/history/history-tracker.test.ts +380 -0
- package/src/plugin-operation/history/history-tracker.ts +129 -0
- package/src/plugin-operation/history/index.ts +9 -0
- package/src/plugin-operation/history/types.ts +17 -0
- package/src/plugin-operation/history/undo-mapping.ts +132 -0
- package/src/plugin-operation/history/undo-registry.test.ts +73 -0
- package/src/plugin-operation/history/undo-registry.ts +54 -0
- package/src/plugin-operation/index.ts +6 -0
- package/src/plugin-operation/invoker-capability.ts +40 -0
- package/src/plugin-operation/meta.ts +11 -0
- package/src/plugin-operation/testing.ts +174 -0
- package/src/plugin-runtime/RuntimePlugin.ts +20 -0
- package/src/plugin-runtime/capability.ts +53 -0
- package/src/{components → plugin-runtime}/index.ts +1 -1
- package/src/plugin-runtime/meta.ts +11 -0
- package/src/plugin-settings/SettingsPlugin.ts +11 -26
- package/src/plugin-settings/actions.ts +39 -0
- package/src/plugin-settings/app-graph-builder.ts +122 -142
- package/src/plugin-settings/meta.ts +2 -2
- package/src/plugin-settings/operation-resolver.ts +55 -0
- package/src/plugin-settings/translations.ts +1 -1
- package/src/react/App.stories.tsx +63 -0
- package/src/{components → react}/App.tsx +11 -10
- package/src/{components → react}/DefaultFallback.tsx +1 -1
- package/src/react/PluginManagerContext.stories.tsx +184 -0
- package/src/react/PluginManagerProvider.ts +2 -2
- package/src/react/Surface.stories.tsx +91 -51
- package/src/react/Surface.tsx +226 -45
- package/src/react/SurfaceInfo.tsx +107 -0
- package/src/react/common.ts +29 -5
- package/src/react/index.ts +5 -1
- package/src/react/types.ts +27 -0
- package/src/react/useApp.tsx +209 -0
- package/src/react/useCapabilities.ts +37 -5
- package/src/{components → react}/useLoading.tsx +4 -6
- package/src/react/useOperationResolver.ts +40 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/service.ts +52 -0
- package/src/testing/withPluginManager.stories.tsx +5 -5
- package/src/testing/withPluginManager.tsx +21 -23
- package/tsconfig.json +25 -7
- package/.swc/plugins/linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7 +0 -0
- package/dist/lib/browser/app-graph-builder-PSA3RESL.mjs +0 -138
- package/dist/lib/browser/app-graph-builder-PSA3RESL.mjs.map +0 -7
- package/dist/lib/browser/chunk-2VZ4RF4A.mjs +0 -1608
- package/dist/lib/browser/chunk-2VZ4RF4A.mjs.map +0 -7
- package/dist/lib/browser/chunk-CPVYIS24.mjs +0 -451
- package/dist/lib/browser/chunk-CPVYIS24.mjs.map +0 -7
- package/dist/lib/browser/chunk-SCPE4ZO2.mjs +0 -35
- package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +0 -7
- package/dist/lib/browser/intent-dispatcher-BND6IF4U.mjs +0 -11
- package/dist/lib/browser/intent-resolver-27FJAJDE.mjs +0 -39
- package/dist/lib/browser/intent-resolver-27FJAJDE.mjs.map +0 -7
- package/dist/lib/browser/store-F545UOIR.mjs +0 -30
- package/dist/lib/browser/store-F545UOIR.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -77
- package/dist/lib/node-esm/app-graph-builder-VJGZ6KH7.mjs +0 -139
- package/dist/lib/node-esm/app-graph-builder-VJGZ6KH7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3RRWO5TD.mjs +0 -1610
- package/dist/lib/node-esm/chunk-3RRWO5TD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MN37WUJ2.mjs +0 -452
- package/dist/lib/node-esm/chunk-MN37WUJ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZX63QUGE.mjs +0 -37
- package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +0 -7
- package/dist/lib/node-esm/intent-dispatcher-254AZ6EE.mjs +0 -12
- package/dist/lib/node-esm/intent-resolver-NPMOPNFL.mjs +0 -40
- package/dist/lib/node-esm/intent-resolver-NPMOPNFL.mjs.map +0 -7
- package/dist/lib/node-esm/store-CINC4R4L.mjs +0 -31
- package/dist/lib/node-esm/store-CINC4R4L.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -78
- package/dist/types/src/common/capabilities.d.ts +0 -201
- package/dist/types/src/common/capabilities.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/layout.d.ts +0 -279
- package/dist/types/src/common/layout.d.ts.map +0 -1
- package/dist/types/src/components/App.d.ts +0 -10
- package/dist/types/src/components/App.d.ts.map +0 -1
- package/dist/types/src/components/App.stories.d.ts.map +0 -1
- package/dist/types/src/components/DefaultFallback.d.ts.map +0 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +0 -1
- package/dist/types/src/components/useApp.d.ts.map +0 -1
- package/dist/types/src/components/useLoading.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.d.ts +0 -117
- package/dist/types/src/core/capabilities.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.test.d.ts +0 -2
- package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
- package/dist/types/src/core/events.d.ts.map +0 -1
- package/dist/types/src/core/manager.d.ts +0 -126
- package/dist/types/src/core/manager.d.ts.map +0 -1
- package/dist/types/src/core/manager.test.d.ts +0 -2
- package/dist/types/src/core/manager.test.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/actions.d.ts +0 -36
- package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/errors.d.ts +0 -16
- package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/index.d.ts +0 -6
- package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent.d.ts +0 -63
- package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/meta.d.ts +0 -3
- package/dist/types/src/plugin-intent/meta.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/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/react/IntentContext.d.ts +0 -8
- package/dist/types/src/react/IntentContext.d.ts.map +0 -1
- package/dist/types/src/react/useIntentResolver.d.ts +0 -3
- package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
- package/dist/types/src/worker.d.ts +0 -4
- package/dist/types/src/worker.d.ts.map +0 -1
- package/src/common/capabilities.ts +0 -217
- package/src/common/events.ts +0 -79
- package/src/common/layout.ts +0 -277
- package/src/components/App.stories.tsx +0 -33
- package/src/components/useApp.tsx +0 -164
- package/src/core/capabilities.test.ts +0 -136
- package/src/core/capabilities.ts +0 -263
- package/src/core/manager.test.ts +0 -516
- package/src/core/manager.ts +0 -604
- package/src/plugin-intent/IntentPlugin.ts +0 -20
- package/src/plugin-intent/actions.ts +0 -31
- package/src/plugin-intent/errors.ts +0 -40
- package/src/plugin-intent/index.ts +0 -9
- package/src/plugin-intent/intent-dispatcher.test.ts +0 -286
- package/src/plugin-intent/intent-dispatcher.ts +0 -337
- package/src/plugin-intent/intent.ts +0 -154
- package/src/plugin-intent/meta.ts +0 -10
- package/src/plugin-settings/intent-resolver.ts +0 -35
- package/src/plugin-settings/store.ts +0 -33
- package/src/react/IntentContext.tsx +0 -35
- package/src/react/useIntentResolver.ts +0 -22
- package/src/worker.ts +0 -11
- /package/dist/lib/browser/{intent-dispatcher-BND6IF4U.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{worker.mjs.map → common/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/intent-dispatcher-254AZ6EE.mjs.map → browser/core/activation-event.mjs.map} +0 -0
- /package/dist/lib/{node-esm/worker.mjs.map → browser/core/capability.mjs.map} +0 -0
- /package/dist/types/src/{components → react}/App.stories.d.ts +0 -0
- /package/dist/types/src/{components → react}/DefaultFallback.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/plugin-settings/intent-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAgB,MAAM,WAAW,CAAC;;AAMvD,wBAsBI"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RootSettingsStore } from '@dxos/local-storage';
|
|
2
|
-
import { type PluginContext } from '../core';
|
|
3
|
-
declare const _default: (context: PluginContext) => import("..").Capability<import("..").InterfaceDef<RootSettingsStore>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/plugin-settings/store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,SAAS,CAAC;yBAE1C,SAAS,aAAa;AAAtC,wBAuBE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Context, type Provider } from 'react';
|
|
2
|
-
import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
|
|
3
|
-
declare const IntentContext: Context<IntentContext | undefined>;
|
|
4
|
-
export declare const useIntentDispatcher: () => Pick<IntentContext, "dispatch" | "dispatchPromise">;
|
|
5
|
-
export declare const useIntentResolver: (module: string, resolver: AnyIntentResolver) => void;
|
|
6
|
-
export declare const IntentProvider: Provider<IntentContext | undefined>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=IntentContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IntentContext.d.ts","sourceRoot":"","sources":["../../../../src/react/IntentContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAwC,MAAM,OAAO,CAAC;AAM1F,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAI9E,QAAA,MAAM,aAAa,EAAE,OAAO,CAAC,aAAa,GAAG,SAAS,CAAuD,CAAC;AAE9G,eAAO,MAAM,mBAAmB,QAAO,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,iBAAiB,CAGxF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,UAAU,iBAAiB,SAW5E,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,CAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntentResolver.d.ts","sourceRoot":"","sources":["../../../../src/react/useIntentResolver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,UAAU,iBAAiB,SAW5E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/worker.ts"],"names":[],"mappings":"AAOA,cAAc,QAAQ,CAAC;AAEvB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import type * as Tool from '@effect/ai/Tool';
|
|
6
|
-
import type * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
-
import { type Registry } from '@effect-rx/rx-react';
|
|
8
|
-
import type * as Layer from 'effect/Layer';
|
|
9
|
-
import type * as Schema from 'effect/Schema';
|
|
10
|
-
import { type FC, type PropsWithChildren } from 'react';
|
|
11
|
-
|
|
12
|
-
import { type AiService } from '@dxos/ai';
|
|
13
|
-
import type * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
|
|
14
|
-
import { type BuilderExtensions, type GraphBuilder } from '@dxos/app-graph';
|
|
15
|
-
import { type Blueprint } from '@dxos/blueprints';
|
|
16
|
-
import { type Space } from '@dxos/client-protocol';
|
|
17
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
18
|
-
import { type RootSettingsStore } from '@dxos/local-storage';
|
|
19
|
-
import { type AnchoredTo } from '@dxos/schema';
|
|
20
|
-
|
|
21
|
-
import { type PluginManager, defineCapability } from '../core';
|
|
22
|
-
import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
|
|
23
|
-
|
|
24
|
-
import { type FileInfo } from './file';
|
|
25
|
-
import { type NodeSerializer } from './graph';
|
|
26
|
-
import { type SurfaceDefinition } from './surface';
|
|
27
|
-
import { type Resource } from './translations';
|
|
28
|
-
|
|
29
|
-
// TODO(burdon): Sort.
|
|
30
|
-
export namespace Capabilities {
|
|
31
|
-
/**
|
|
32
|
-
* @category Capability
|
|
33
|
-
*/
|
|
34
|
-
export const Null = defineCapability<null>('dxos.org/app-framework/capability/null');
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @category Capability
|
|
38
|
-
*/
|
|
39
|
-
export const PluginManager = defineCapability<PluginManager>('dxos.org/app-framework/capability/plugin-manager');
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @category Capability
|
|
43
|
-
*/
|
|
44
|
-
export const RxRegistry = defineCapability<Registry.Registry>('dxos.org/app-framework/capability/rx-registry');
|
|
45
|
-
|
|
46
|
-
export type ReactContext = Readonly<{ id: string; dependsOn?: string[]; context: FC<PropsWithChildren> }>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @category Capability
|
|
50
|
-
*/
|
|
51
|
-
export const ReactContext = defineCapability<ReactContext>('dxos.org/app-framework/capability/react-context');
|
|
52
|
-
|
|
53
|
-
export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @category Capability
|
|
57
|
-
*/
|
|
58
|
-
export const ReactRoot = defineCapability<ReactRoot>('dxos.org/app-framework/capability/react-root');
|
|
59
|
-
|
|
60
|
-
export type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @category Capability
|
|
64
|
-
*/
|
|
65
|
-
export const ReactSurface = defineCapability<ReactSurface>('dxos.org/app-framework/common/react-surface');
|
|
66
|
-
|
|
67
|
-
export type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @category Capability
|
|
71
|
-
*/
|
|
72
|
-
export const IntentResolver = defineCapability<IntentResolver>('dxos.org/app-framework/capability/intent-resolver');
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @category Capability
|
|
76
|
-
*/
|
|
77
|
-
export const IntentDispatcher = defineCapability<IntentContext>(
|
|
78
|
-
'dxos.org/app-framework/capability/intent-dispatcher',
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
export type Layout = Readonly<{
|
|
82
|
-
mode: string;
|
|
83
|
-
dialogOpen: boolean;
|
|
84
|
-
sidebarOpen: boolean;
|
|
85
|
-
complementarySidebarOpen: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* The id of the active workspace, where a workspace is a set of active items.
|
|
88
|
-
*/
|
|
89
|
-
workspace: string;
|
|
90
|
-
/**
|
|
91
|
-
* Identifiers of items which are currently active in the application.
|
|
92
|
-
*/
|
|
93
|
-
active: string[];
|
|
94
|
-
/**
|
|
95
|
-
* Identifiers of items which were previously active in the application.
|
|
96
|
-
*/
|
|
97
|
-
inactive: string[];
|
|
98
|
-
/**
|
|
99
|
-
* Identifier of the item which should be scrolled into view.
|
|
100
|
-
*/
|
|
101
|
-
scrollIntoView: string | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* @category Capability
|
|
106
|
-
*/
|
|
107
|
-
export const Layout = defineCapability<Layout>('dxos.org/app-framework/capability/layout');
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @category Capability
|
|
111
|
-
*/
|
|
112
|
-
export const Translations = defineCapability<Readonly<Resource[]>>('dxos.org/app-framework/capability/translations');
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @category Capability
|
|
116
|
-
*/
|
|
117
|
-
export const AppGraph = defineCapability<Readonly<Pick<GraphBuilder, 'graph' | 'explore'>>>(
|
|
118
|
-
'dxos.org/app-framework/capability/app-graph',
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @category Capability
|
|
123
|
-
*/
|
|
124
|
-
export const AppGraphBuilder = defineCapability<BuilderExtensions>(
|
|
125
|
-
'dxos.org/app-framework/capability/app-graph-builder',
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @category Capability
|
|
130
|
-
*/
|
|
131
|
-
export const AppGraphSerializer = defineCapability<NodeSerializer[]>(
|
|
132
|
-
'dxos.org/app-framework/capability/app-graph-serializer',
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @category Capability
|
|
137
|
-
*/
|
|
138
|
-
export const SettingsStore = defineCapability<RootSettingsStore>('dxos.org/app-framework/capability/settings-store');
|
|
139
|
-
|
|
140
|
-
// TODO(wittjosiah): The generics caused type inference issues for schemas when contributing settings.
|
|
141
|
-
// export type Settings = Parameters<RootSettingsStore['createStore']>[0];
|
|
142
|
-
// export type Settings<T extends SettingsValue = SettingsValue> = SettingsProps<T>;
|
|
143
|
-
export type Settings = {
|
|
144
|
-
prefix: string;
|
|
145
|
-
schema: Schema.Schema.All;
|
|
146
|
-
value?: Record<string, any>;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @category Capability
|
|
151
|
-
*/
|
|
152
|
-
export const Settings = defineCapability<Settings>('dxos.org/app-framework/capability/settings');
|
|
153
|
-
|
|
154
|
-
export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @category Capability
|
|
158
|
-
*/
|
|
159
|
-
export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
|
|
160
|
-
|
|
161
|
-
// TODO(dmaretskyi): Consider combining Toolkit and ToolkitHandler for type-safe context.
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* @category Capability
|
|
165
|
-
*/
|
|
166
|
-
export const Toolkit = defineCapability<Toolkit.Any>('dxos.org/app-framework/capability/ai-toolkit');
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* @category Capability
|
|
170
|
-
*/
|
|
171
|
-
export const ToolkitHandler = defineCapability<Layer.Layer<Tool.Handler<any>, never, never>>(
|
|
172
|
-
'dxos.org/app-framework/capability/ai-toolkit-handler',
|
|
173
|
-
);
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @category Capability
|
|
177
|
-
*/
|
|
178
|
-
export const BlueprintDefinition = defineCapability<Blueprint.Blueprint>(
|
|
179
|
-
'dxos.org/app-framework/capability/blueprint-definition',
|
|
180
|
-
);
|
|
181
|
-
|
|
182
|
-
export type AiServiceLayer = Layer.Layer<AiService.AiService>;
|
|
183
|
-
export const AiServiceLayer = defineCapability<AiServiceLayer>(
|
|
184
|
-
'dxos.org/app-framework/capability/ai-service-factory',
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Plugins can contribute them to provide model resolvers.
|
|
189
|
-
*/
|
|
190
|
-
export const AiModelResolver = defineCapability<Layer.Layer<AiServiceRouter.AiModelResolver>>(
|
|
191
|
-
'dxos.org/app-framework/capability/ai-model-resolver',
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @category Capability
|
|
196
|
-
*/
|
|
197
|
-
export const Functions = defineCapability<FunctionDefinition<any, any>[]>(
|
|
198
|
-
'dxos.org/app-framework/capability/functions',
|
|
199
|
-
);
|
|
200
|
-
|
|
201
|
-
export type FileUploader = (space: Space, file: File) => Promise<FileInfo | undefined>;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @category Capability
|
|
205
|
-
*/
|
|
206
|
-
export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
|
|
207
|
-
|
|
208
|
-
type AnchorSort = {
|
|
209
|
-
key: string;
|
|
210
|
-
sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* @category Capability
|
|
215
|
-
*/
|
|
216
|
-
export const AnchorSort = defineCapability<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');
|
|
217
|
-
}
|
package/src/common/events.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineEvent } from '../core';
|
|
6
|
-
|
|
7
|
-
import { Capabilities } from './capabilities';
|
|
8
|
-
|
|
9
|
-
export namespace Events {
|
|
10
|
-
/**
|
|
11
|
-
* Fired when the app is started.
|
|
12
|
-
*/
|
|
13
|
-
export const Startup = defineEvent('dxos.org/app-framework/event/startup');
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// Dependent Events
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Fired to load any newly available surfaces.
|
|
21
|
-
*/
|
|
22
|
-
export const SetupReactSurface = defineEvent('dxos.org/app-framework/event/setup-react-surface');
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Fired to load any newly available metadata.
|
|
26
|
-
*/
|
|
27
|
-
export const SetupMetadata = defineEvent('dxos.org/app-framework/event/setup-metadata');
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Fired before the intent dispatcher is activated.
|
|
31
|
-
*/
|
|
32
|
-
export const SetupIntentResolver = defineEvent('dxos.org/app-framework/event/setup-intent-resolver');
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Fired before the settings store is activated.
|
|
36
|
-
*/
|
|
37
|
-
export const SetupSettings = defineEvent('dxos.org/app-framework/event/setup-settings');
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Fired before the graph is created.
|
|
41
|
-
*/
|
|
42
|
-
export const SetupAppGraph = defineEvent('dxos.org/app-framework/event/setup-graph');
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Fired before the translations provider is created.
|
|
46
|
-
*/
|
|
47
|
-
export const SetupTranslations = defineEvent('dxos.org/app-framework/event/setup-translations');
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Fired to load any newly available artifacts definitions.
|
|
51
|
-
*/
|
|
52
|
-
// TODO(burdon): Rename.
|
|
53
|
-
export const SetupArtifactDefinition = defineEvent('dxos.org/app-framework/event/setup-artifact-definition');
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
// Triggered Events
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Fired after the intent dispatcher is ready.
|
|
61
|
-
*/
|
|
62
|
-
export const DispatcherReady = defineEvent('dxos.org/app-framework/event/dispatcher-ready');
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Fired after the settings store is ready.
|
|
66
|
-
*/
|
|
67
|
-
export const SettingsReady = defineEvent('dxos.org/app-framework/event/settings-ready');
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Fired when the graph is ready.
|
|
71
|
-
*/
|
|
72
|
-
export const AppGraphReady = defineEvent('dxos.org/app-framework/event/graph-ready');
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Fired when plugin state is ready.
|
|
76
|
-
*/
|
|
77
|
-
export const createStateEvent = (specifier: string) => defineEvent('dxos.org/app-framework/event/state', specifier);
|
|
78
|
-
export const LayoutReady = createStateEvent(Capabilities.Layout.identifier);
|
|
79
|
-
}
|
package/src/common/layout.ts
DELETED
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
|
|
7
|
-
import { Label } from '../plugin-intent';
|
|
8
|
-
|
|
9
|
-
const LAYOUT_PLUGIN = 'dxos.org/plugin/layout';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Expected payload for layout actions.
|
|
13
|
-
*/
|
|
14
|
-
export namespace LayoutAction {
|
|
15
|
-
export const UPDATE_LAYOUT = `${LAYOUT_PLUGIN}/action/update-layout`;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Generic layout action.
|
|
19
|
-
*/
|
|
20
|
-
export class UpdateLayout extends Schema.TaggedClass<UpdateLayout>()(UPDATE_LAYOUT, {
|
|
21
|
-
input: Schema.Struct({
|
|
22
|
-
part: Schema.String.annotations({ description: 'The part of the layout to mutate.' }),
|
|
23
|
-
subject: Schema.optional(Schema.Any.annotations({ description: 'The subject of the layout update.' })),
|
|
24
|
-
options: Schema.optional(
|
|
25
|
-
Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
|
|
26
|
-
description: 'Additional options for the layout action.',
|
|
27
|
-
}),
|
|
28
|
-
),
|
|
29
|
-
}),
|
|
30
|
-
output: Schema.Void,
|
|
31
|
-
}) {}
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
// Common layout actions.
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
// NOTE: These are layout actions which are currently in common use.
|
|
38
|
-
// They constrain the generic layout action types to provide additional type safety.
|
|
39
|
-
// However, they all follow the same generic structure and intent id.
|
|
40
|
-
// This allows for plugins to update the layout without depending on a specific layout plugin.
|
|
41
|
-
// The expectation is that other norms other than these will emerge over time.
|
|
42
|
-
|
|
43
|
-
export class SetLayoutMode extends Schema.TaggedClass<SetLayoutMode>()(UPDATE_LAYOUT, {
|
|
44
|
-
input: Schema.Struct({
|
|
45
|
-
part: Schema.Literal('mode').annotations({ description: 'Setting the layout mode.' }),
|
|
46
|
-
subject: Schema.optional(
|
|
47
|
-
Schema.String.annotations({ description: 'Item which is the subject of the new layout mode.' }),
|
|
48
|
-
),
|
|
49
|
-
options: Schema.Union(
|
|
50
|
-
Schema.Struct({ mode: Schema.String.annotations({ description: 'The new layout mode.' }) }),
|
|
51
|
-
Schema.Struct({ revert: Schema.Boolean.annotations({ description: 'Revert to the previous layout mode.' }) }),
|
|
52
|
-
),
|
|
53
|
-
}),
|
|
54
|
-
output: Schema.Void,
|
|
55
|
-
}) {}
|
|
56
|
-
|
|
57
|
-
export class UpdateSidebar extends Schema.TaggedClass<UpdateSidebar>()(UPDATE_LAYOUT, {
|
|
58
|
-
input: Schema.Struct({
|
|
59
|
-
part: Schema.Literal('sidebar').annotations({ description: 'Updating the sidebar.' }),
|
|
60
|
-
subject: Schema.optional(
|
|
61
|
-
Schema.String.annotations({ description: 'URI of the component to display in the sidebar.' }),
|
|
62
|
-
),
|
|
63
|
-
options: Schema.optional(
|
|
64
|
-
Schema.Struct({
|
|
65
|
-
state: Schema.Literal('closed', 'collapsed', 'expanded').annotations({
|
|
66
|
-
description: 'Whether the sidebar is closed, collapsed, or expanded.',
|
|
67
|
-
}),
|
|
68
|
-
}),
|
|
69
|
-
),
|
|
70
|
-
}),
|
|
71
|
-
output: Schema.Void,
|
|
72
|
-
}) {}
|
|
73
|
-
|
|
74
|
-
export class UpdateComplementary extends Schema.TaggedClass<UpdateComplementary>()(UPDATE_LAYOUT, {
|
|
75
|
-
input: Schema.Struct({
|
|
76
|
-
part: Schema.Literal('complementary').annotations({ description: 'Updating the complementary sidebar.' }),
|
|
77
|
-
subject: Schema.optional(
|
|
78
|
-
Schema.String.annotations({ description: 'URI of the component to display in the complementary area.' }),
|
|
79
|
-
),
|
|
80
|
-
options: Schema.optional(
|
|
81
|
-
Schema.Struct({
|
|
82
|
-
state: Schema.Literal('closed', 'collapsed', 'expanded').annotations({
|
|
83
|
-
description: 'Whether the complementary sidebar is closed, collapsed, or expanded.',
|
|
84
|
-
}),
|
|
85
|
-
}),
|
|
86
|
-
),
|
|
87
|
-
}),
|
|
88
|
-
output: Schema.Void,
|
|
89
|
-
}) {}
|
|
90
|
-
|
|
91
|
-
export class UpdateDialog extends Schema.TaggedClass<UpdateDialog>()(UPDATE_LAYOUT, {
|
|
92
|
-
input: Schema.Struct({
|
|
93
|
-
part: Schema.Literal('dialog').annotations({ description: 'Updating the dialog.' }),
|
|
94
|
-
subject: Schema.optional(
|
|
95
|
-
Schema.String.annotations({ description: 'URI of the component to display in the dialog.' }),
|
|
96
|
-
),
|
|
97
|
-
options: Schema.Struct({
|
|
98
|
-
state: Schema.optional(Schema.Boolean.annotations({ description: 'Whether the dialog is open or closed.' })),
|
|
99
|
-
type: Schema.optional(Schema.Literal('default', 'alert').annotations({ description: 'The type of dialog.' })),
|
|
100
|
-
blockAlign: Schema.optional(
|
|
101
|
-
Schema.Literal('start', 'center', 'end').annotations({ description: 'The alignment of the dialog.' }),
|
|
102
|
-
),
|
|
103
|
-
overlayClasses: Schema.optional(
|
|
104
|
-
Schema.String.annotations({ description: 'Additional classes for the dialog overlay.' }),
|
|
105
|
-
),
|
|
106
|
-
overlayStyle: Schema.optional(
|
|
107
|
-
Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
|
|
108
|
-
description: 'Additional styles for the dialog overlay.',
|
|
109
|
-
}),
|
|
110
|
-
),
|
|
111
|
-
props: Schema.optional(
|
|
112
|
-
Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
|
|
113
|
-
description: 'Additional props for the dialog.',
|
|
114
|
-
}),
|
|
115
|
-
),
|
|
116
|
-
}),
|
|
117
|
-
}),
|
|
118
|
-
output: Schema.Void,
|
|
119
|
-
}) {}
|
|
120
|
-
|
|
121
|
-
export class UpdatePopover extends Schema.TaggedClass<UpdatePopover>()(UPDATE_LAYOUT, {
|
|
122
|
-
input: Schema.Struct({
|
|
123
|
-
part: Schema.Literal('popover').annotations({ description: 'Updating the popover.' }),
|
|
124
|
-
subject: Schema.optional(
|
|
125
|
-
Schema.Any.annotations({
|
|
126
|
-
description: 'URI of the component to display in the popover or data to pass to the popover.',
|
|
127
|
-
}),
|
|
128
|
-
),
|
|
129
|
-
options: Schema.Struct({
|
|
130
|
-
side: Schema.optional(
|
|
131
|
-
Schema.Literal('top', 'right', 'bottom', 'left').annotations({ description: 'The side of the anchor.' }),
|
|
132
|
-
),
|
|
133
|
-
state: Schema.optional(Schema.Boolean.annotations({ description: 'Whether the popover is open or closed.' })),
|
|
134
|
-
props: Schema.optional(
|
|
135
|
-
Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
|
|
136
|
-
description: 'Additional props for the popover.',
|
|
137
|
-
}),
|
|
138
|
-
),
|
|
139
|
-
}).pipe(
|
|
140
|
-
Schema.extend(
|
|
141
|
-
Schema.Union(
|
|
142
|
-
Schema.Struct({
|
|
143
|
-
variant: Schema.Literal('virtual'),
|
|
144
|
-
anchor: Schema.Any.annotations({ description: 'The DOM element to anchor the popover to.' }),
|
|
145
|
-
}),
|
|
146
|
-
Schema.Struct({
|
|
147
|
-
variant: Schema.optional(Schema.Literal('react')),
|
|
148
|
-
anchorId: Schema.String.annotations({
|
|
149
|
-
description: 'An id that can be used to determine whether to render the anchor subcomponent.',
|
|
150
|
-
}),
|
|
151
|
-
}),
|
|
152
|
-
),
|
|
153
|
-
),
|
|
154
|
-
),
|
|
155
|
-
}),
|
|
156
|
-
output: Schema.Void,
|
|
157
|
-
}) {}
|
|
158
|
-
|
|
159
|
-
export const Toast = Schema.Struct({
|
|
160
|
-
id: Schema.String.annotations({ description: 'The id of the toast.' }),
|
|
161
|
-
title: Schema.optional(Label.annotations({ description: 'The title of the toast.' })),
|
|
162
|
-
description: Schema.optional(Label.annotations({ description: 'The description of the toast.' })),
|
|
163
|
-
icon: Schema.optional(Schema.String.annotations({ description: 'The icon of the toast.' })),
|
|
164
|
-
duration: Schema.optional(Schema.Number.annotations({ description: 'The duration of the toast.' })),
|
|
165
|
-
closeLabel: Schema.optional(Label.annotations({ description: 'The label of the close button.' })),
|
|
166
|
-
actionLabel: Schema.optional(Label.annotations({ description: 'The label of the action button.' })),
|
|
167
|
-
actionAlt: Schema.optional(Label.annotations({ description: 'The alt text of the action button.' })),
|
|
168
|
-
onAction: Schema.optional(
|
|
169
|
-
Schema.Any.annotations({ description: 'The action to perform when the action button is clicked.' }),
|
|
170
|
-
),
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
export interface Toast extends Omit<Schema.Schema.Type<typeof Toast>, 'onAction'> {
|
|
174
|
-
onAction?: () => void;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export class AddToast extends Schema.TaggedClass<AddToast>()(UPDATE_LAYOUT, {
|
|
178
|
-
input: Schema.Struct({
|
|
179
|
-
part: Schema.Literal('toast').annotations({ description: 'Adding a toast.' }),
|
|
180
|
-
subject: Toast.annotations({ description: 'The toast to add.' }),
|
|
181
|
-
}),
|
|
182
|
-
output: Schema.Void,
|
|
183
|
-
}) {}
|
|
184
|
-
|
|
185
|
-
export class SwitchWorkspace extends Schema.TaggedClass<SwitchWorkspace>()(UPDATE_LAYOUT, {
|
|
186
|
-
input: Schema.Struct({
|
|
187
|
-
part: Schema.Literal('workspace').annotations({ description: 'Switching the workspace.' }),
|
|
188
|
-
subject: Schema.String.annotations({ description: 'The id of the workspace to switch to.' }),
|
|
189
|
-
}),
|
|
190
|
-
output: Schema.Void,
|
|
191
|
-
}) {}
|
|
192
|
-
|
|
193
|
-
export class RevertWorkspace extends Schema.TaggedClass<RevertWorkspace>()(UPDATE_LAYOUT, {
|
|
194
|
-
input: Schema.Struct({
|
|
195
|
-
part: Schema.Literal('workspace').annotations({ description: 'Switching the workspace.' }),
|
|
196
|
-
options: Schema.Struct({
|
|
197
|
-
revert: Schema.Literal(true).annotations({ description: 'Revert to the previous workspace.' }),
|
|
198
|
-
}),
|
|
199
|
-
}),
|
|
200
|
-
output: Schema.Void,
|
|
201
|
-
}) {}
|
|
202
|
-
|
|
203
|
-
export class Open extends Schema.TaggedClass<Open>()(UPDATE_LAYOUT, {
|
|
204
|
-
input: Schema.Struct({
|
|
205
|
-
part: Schema.Literal('main').annotations({ description: 'Opening an item in the main content area.' }),
|
|
206
|
-
subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to open.' })),
|
|
207
|
-
options: Schema.optional(
|
|
208
|
-
Schema.Struct({
|
|
209
|
-
state: Schema.optional(Schema.Literal(true).annotations({ description: 'The items are being added.' })),
|
|
210
|
-
variant: Schema.optional(Schema.String.annotations({ description: 'The variant of the item to open.' })),
|
|
211
|
-
key: Schema.optional(
|
|
212
|
-
Schema.String.annotations({
|
|
213
|
-
description: 'If provided, will replace item with a matching key (id prefix).',
|
|
214
|
-
}),
|
|
215
|
-
),
|
|
216
|
-
workspace: Schema.optional(Schema.String.annotations({ description: 'The workspace to open the items in.' })),
|
|
217
|
-
scrollIntoView: Schema.optional(Schema.Boolean.annotations({ description: 'Scroll the items into view.' })),
|
|
218
|
-
pivotId: Schema.optional(
|
|
219
|
-
Schema.String.annotations({ description: 'The id of the item to place new items next to.' }),
|
|
220
|
-
),
|
|
221
|
-
positioning: Schema.optional(
|
|
222
|
-
Schema.Union(
|
|
223
|
-
Schema.Literal('start').annotations({ description: 'The items are being added before the pivot item.' }),
|
|
224
|
-
Schema.Literal('end').annotations({ description: 'The items are being added after the pivot item.' }),
|
|
225
|
-
),
|
|
226
|
-
),
|
|
227
|
-
}),
|
|
228
|
-
),
|
|
229
|
-
}),
|
|
230
|
-
output: Schema.Void,
|
|
231
|
-
}) {}
|
|
232
|
-
|
|
233
|
-
export class Set extends Schema.TaggedClass<Set>()(UPDATE_LAYOUT, {
|
|
234
|
-
input: Schema.Struct({
|
|
235
|
-
part: Schema.Literal('main').annotations({ description: 'Setting items in the main content area.' }),
|
|
236
|
-
subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to set.' })),
|
|
237
|
-
options: Schema.Struct({
|
|
238
|
-
override: Schema.Literal(true).annotations({
|
|
239
|
-
description: 'Override the current items in the main content area.',
|
|
240
|
-
}),
|
|
241
|
-
}),
|
|
242
|
-
}),
|
|
243
|
-
output: Schema.Void,
|
|
244
|
-
}) {}
|
|
245
|
-
|
|
246
|
-
export class Close extends Schema.TaggedClass<Close>()(UPDATE_LAYOUT, {
|
|
247
|
-
input: Schema.Struct({
|
|
248
|
-
part: Schema.Literal('main').annotations({ description: 'Closing items in the main content area.' }),
|
|
249
|
-
subject: Schema.Array(Schema.String.annotations({ description: 'Ids of the items to close.' })),
|
|
250
|
-
options: Schema.Struct({
|
|
251
|
-
state: Schema.Literal(false).annotations({ description: 'The items are being removed.' }),
|
|
252
|
-
}),
|
|
253
|
-
}),
|
|
254
|
-
output: Schema.Void,
|
|
255
|
-
}) {}
|
|
256
|
-
|
|
257
|
-
export class ScrollIntoView extends Schema.TaggedClass<ScrollIntoView>()(UPDATE_LAYOUT, {
|
|
258
|
-
input: Schema.Struct({
|
|
259
|
-
part: Schema.Literal('current').annotations({ description: 'Setting the current item' }),
|
|
260
|
-
subject: Schema.optional(Schema.String.annotations({ description: 'The id of the item to set as current.' })),
|
|
261
|
-
options: Schema.optional(
|
|
262
|
-
Schema.Record({ key: Schema.String, value: Schema.Any }).annotations({
|
|
263
|
-
description: 'Additional options for the scroll into view.',
|
|
264
|
-
}),
|
|
265
|
-
),
|
|
266
|
-
}),
|
|
267
|
-
output: Schema.Void,
|
|
268
|
-
}) {}
|
|
269
|
-
|
|
270
|
-
export class Expose extends Schema.TaggedClass<Expose>()(UPDATE_LAYOUT, {
|
|
271
|
-
input: Schema.Struct({
|
|
272
|
-
part: Schema.Literal('navigation').annotations({ description: 'Exposing an item in the navigation area.' }),
|
|
273
|
-
subject: Schema.String.annotations({ description: 'The id of the item to expose.' }),
|
|
274
|
-
}),
|
|
275
|
-
output: Schema.Void,
|
|
276
|
-
}) {}
|
|
277
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2022 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
|
-
|
|
10
|
-
import { useApp } from './useApp';
|
|
11
|
-
|
|
12
|
-
const DefaultStory = () => {
|
|
13
|
-
const App = useApp({
|
|
14
|
-
placeholder: () => <div className='fixed inset-0 flex items-center justify-center'>Loading...</div>,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
return <App />;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const meta = {
|
|
21
|
-
title: 'sdk/app-framework/App',
|
|
22
|
-
render: DefaultStory,
|
|
23
|
-
decorators: [withTheme],
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
} satisfies Meta;
|
|
28
|
-
|
|
29
|
-
export default meta;
|
|
30
|
-
|
|
31
|
-
type Story = StoryObj<typeof meta>;
|
|
32
|
-
|
|
33
|
-
export const Default: Story = {};
|