@dxos/app-framework 0.7.4 → 0.7.5-labs.5f04cf6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/chunk-22MGDQXD.mjs +1621 -0
- package/dist/lib/browser/chunk-22MGDQXD.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +136 -527
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +67 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/node/chunk-7PNEFY2G.cjs +1665 -0
- package/dist/lib/node/chunk-7PNEFY2G.cjs.map +7 -0
- package/dist/lib/node/index.cjs +141 -551
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +91 -0
- package/dist/lib/node/testing/index.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZFOOPWBG.mjs +1623 -0
- package/dist/lib/node-esm/chunk-ZFOOPWBG.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +136 -527
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +68 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/types/src/App.d.ts +22 -13
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/common/capabilities.d.ts +343 -0
- package/dist/types/src/common/capabilities.d.ts.map +1 -0
- package/dist/types/src/common/events.d.ts +41 -0
- package/dist/types/src/common/events.d.ts.map +1 -0
- package/dist/types/src/common/file.d.ts +14 -0
- package/dist/types/src/common/file.d.ts.map +1 -0
- package/dist/types/src/common/graph.d.ts +21 -0
- package/dist/types/src/common/graph.d.ts.map +1 -0
- package/dist/types/src/{plugins/common → common}/index.d.ts +3 -1
- package/dist/types/src/common/index.d.ts.map +1 -0
- package/dist/types/src/common/layout.d.ts +165 -0
- package/dist/types/src/common/layout.d.ts.map +1 -0
- package/dist/types/src/{plugins/common → common}/navigation.d.ts +77 -32
- package/dist/types/src/common/navigation.d.ts.map +1 -0
- package/dist/types/src/common/surface.d.ts +68 -0
- package/dist/types/src/common/surface.d.ts.map +1 -0
- package/dist/types/src/{plugins/common → common}/translations.d.ts +0 -11
- package/dist/types/src/common/translations.d.ts.map +1 -0
- package/dist/types/src/core/capabilities.d.ts +90 -0
- package/dist/types/src/core/capabilities.d.ts.map +1 -0
- package/dist/types/src/core/capabilities.test.d.ts +2 -0
- package/dist/types/src/core/capabilities.test.d.ts.map +1 -0
- package/dist/types/src/core/events.d.ts +58 -0
- package/dist/types/src/core/events.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +5 -0
- package/dist/types/src/core/index.d.ts.map +1 -0
- package/dist/types/src/core/manager.d.ts +126 -0
- package/dist/types/src/core/manager.d.ts.map +1 -0
- package/dist/types/src/core/manager.test.d.ts +2 -0
- package/dist/types/src/core/manager.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +94 -0
- package/dist/types/src/core/plugin.d.ts.map +1 -0
- package/dist/types/src/helpers.d.ts +10 -0
- package/dist/types/src/helpers.d.ts.map +1 -0
- package/dist/types/src/helpers.test.d.ts +2 -0
- package/dist/types/src/helpers.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/debug/Debug.d.ts +6 -0
- package/dist/types/src/playground/debug/Debug.d.ts.map +1 -0
- package/dist/types/src/playground/debug/index.d.ts +2 -0
- package/dist/types/src/playground/debug/index.d.ts.map +1 -0
- package/dist/types/src/playground/debug/plugin.d.ts +2 -0
- package/dist/types/src/playground/debug/plugin.d.ts.map +1 -0
- package/dist/types/src/playground/generator/Main.d.ts +6 -0
- package/dist/types/src/playground/generator/Main.d.ts.map +1 -0
- package/dist/types/src/playground/generator/Toolbar.d.ts +6 -0
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -0
- package/dist/types/src/playground/generator/generator.d.ts +5 -0
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -0
- package/dist/types/src/playground/generator/index.d.ts +3 -0
- package/dist/types/src/playground/generator/index.d.ts.map +1 -0
- package/dist/types/src/playground/generator/plugin.d.ts +2 -0
- package/dist/types/src/playground/generator/plugin.d.ts.map +1 -0
- package/dist/types/src/playground/layout/Layout.d.ts +8 -0
- package/dist/types/src/playground/layout/Layout.d.ts.map +1 -0
- package/dist/types/src/playground/layout/index.d.ts +2 -0
- package/dist/types/src/playground/layout/index.d.ts.map +1 -0
- package/dist/types/src/playground/layout/plugin.d.ts +2 -0
- package/dist/types/src/playground/layout/plugin.d.ts.map +1 -0
- package/dist/types/src/playground/logger/Toolbar.d.ts +6 -0
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -0
- package/dist/types/src/playground/logger/index.d.ts +2 -0
- package/dist/types/src/playground/logger/index.d.ts.map +1 -0
- package/dist/types/src/playground/logger/plugin.d.ts +2 -0
- package/dist/types/src/playground/logger/plugin.d.ts.map +1 -0
- package/dist/types/src/playground/logger/schema.d.ts +13 -0
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -0
- package/dist/types/src/playground/playground.stories.d.ts +10 -0
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/IntentContext.d.ts +8 -0
- package/dist/types/src/plugin-intent/IntentContext.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +2 -0
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/actions.d.ts +23 -0
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/errors.d.ts +16 -0
- package/dist/types/src/plugin-intent/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/index.d.ts +6 -0
- package/dist/types/src/plugin-intent/index.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +106 -0
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +2 -0
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +1 -0
- package/dist/types/src/plugin-intent/intent.d.ts +68 -0
- package/dist/types/src/plugin-intent/intent.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +2 -0
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/actions.d.ts +17 -0
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/index.d.ts +3 -0
- package/dist/types/src/plugin-settings/index.d.ts.map +1 -0
- package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -0
- package/dist/types/src/react/PluginManagerProvider.d.ts +10 -0
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/react/Surface.d.ts +12 -0
- package/dist/types/src/react/Surface.d.ts.map +1 -0
- package/dist/types/src/react/index.d.ts +5 -0
- package/dist/types/src/react/index.d.ts.map +1 -0
- package/dist/types/src/react/useCapabilities.d.ts +13 -0
- package/dist/types/src/react/useCapabilities.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 -0
- package/dist/types/src/testing/withPluginManager.d.ts +10 -0
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.stories.d.ts +5 -0
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +31 -14
- package/project.json +2 -1
- package/src/App.tsx +138 -34
- package/src/common/capabilities.ts +88 -0
- package/src/common/events.ts +63 -0
- package/src/common/file.ts +22 -0
- package/src/common/graph.ts +30 -0
- package/src/{plugins/common → common}/index.ts +3 -1
- package/src/common/layout.ts +157 -0
- package/src/{plugins/common → common}/navigation.ts +69 -50
- package/src/common/surface.ts +81 -0
- package/src/common/translations.ts +18 -0
- package/src/core/capabilities.test.ts +116 -0
- package/src/core/capabilities.ts +213 -0
- package/src/core/events.ts +58 -0
- package/src/core/index.ts +8 -0
- package/src/core/manager.test.ts +567 -0
- package/src/core/manager.ts +497 -0
- package/src/core/plugin.ts +128 -0
- package/src/helpers.test.ts +97 -0
- package/src/helpers.ts +45 -0
- package/src/index.ts +6 -3
- package/src/playground/debug/Debug.tsx +39 -0
- package/src/playground/debug/index.ts +5 -0
- package/src/playground/debug/plugin.ts +17 -0
- package/src/playground/generator/Main.tsx +71 -0
- package/src/playground/generator/Toolbar.tsx +46 -0
- package/src/playground/generator/generator.ts +23 -0
- package/src/playground/generator/index.ts +6 -0
- package/src/playground/generator/plugin.ts +18 -0
- package/src/playground/layout/Layout.tsx +33 -0
- package/src/playground/layout/index.ts +5 -0
- package/src/playground/layout/plugin.ts +17 -0
- package/src/playground/logger/Toolbar.tsx +28 -0
- package/src/playground/logger/index.ts +5 -0
- package/src/playground/logger/plugin.ts +33 -0
- package/src/playground/logger/schema.ts +12 -0
- package/src/playground/playground.stories.tsx +34 -0
- package/src/plugin-intent/IntentContext.tsx +34 -0
- package/src/plugin-intent/IntentPlugin.tsx +60 -0
- package/src/plugin-intent/actions.ts +22 -0
- package/src/plugin-intent/errors.ts +39 -0
- package/src/plugin-intent/index.ts +9 -0
- package/src/plugin-intent/intent-dispatcher.test.ts +280 -0
- package/src/plugin-intent/intent-dispatcher.ts +269 -0
- package/src/plugin-intent/intent.ts +146 -0
- package/src/plugin-settings/SettingsPlugin.ts +29 -0
- package/src/plugin-settings/actions.ts +17 -0
- package/src/plugin-settings/index.ts +6 -0
- package/src/react/PluginManagerProvider.ts +22 -0
- package/src/react/Surface.tsx +72 -0
- package/src/react/index.ts +8 -0
- package/src/react/useCapabilities.ts +40 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/withPluginManager.stories.tsx +47 -0
- package/src/testing/withPluginManager.tsx +67 -0
- package/tsconfig.json +54 -2
- package/dist/lib/browser/chunk-3E7RY3CE.mjs +0 -72
- package/dist/lib/browser/chunk-3E7RY3CE.mjs.map +0 -7
- package/dist/lib/browser/chunk-653Y45CL.mjs +0 -41
- package/dist/lib/browser/chunk-653Y45CL.mjs.map +0 -7
- package/dist/lib/browser/chunk-FRXJ25VI.mjs +0 -214
- package/dist/lib/browser/chunk-FRXJ25VI.mjs.map +0 -7
- package/dist/lib/browser/chunk-YXM35XRE.mjs +0 -213
- package/dist/lib/browser/chunk-YXM35XRE.mjs.map +0 -7
- package/dist/lib/browser/plugin-intent-LU4KL2RO.mjs +0 -22
- package/dist/lib/browser/plugin-intent-LU4KL2RO.mjs.map +0 -7
- package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs +0 -11
- package/dist/lib/browser/plugin-settings-OM3G2QFY.mjs.map +0 -7
- package/dist/lib/browser/plugin-surface-LECZMKSQ.mjs +0 -24
- package/dist/lib/browser/plugin-surface-LECZMKSQ.mjs.map +0 -7
- package/dist/lib/node/chunk-JZ2JVKRY.cjs +0 -58
- package/dist/lib/node/chunk-JZ2JVKRY.cjs.map +0 -7
- package/dist/lib/node/chunk-QBM42OQ6.cjs +0 -97
- package/dist/lib/node/chunk-QBM42OQ6.cjs.map +0 -7
- package/dist/lib/node/chunk-QSVP5HOW.cjs +0 -238
- package/dist/lib/node/chunk-QSVP5HOW.cjs.map +0 -7
- package/dist/lib/node/chunk-SOVLKUWI.cjs +0 -236
- package/dist/lib/node/chunk-SOVLKUWI.cjs.map +0 -7
- package/dist/lib/node/plugin-intent-FVFR2LKB.cjs +0 -43
- package/dist/lib/node/plugin-intent-FVFR2LKB.cjs.map +0 -7
- package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs +0 -32
- package/dist/lib/node/plugin-settings-OZ6IKAE5.cjs.map +0 -7
- package/dist/lib/node/plugin-surface-YWDRXQTD.cjs +0 -45
- package/dist/lib/node/plugin-surface-YWDRXQTD.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-2R4GVK7O.mjs +0 -215
- package/dist/lib/node-esm/chunk-2R4GVK7O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs +0 -74
- package/dist/lib/node-esm/chunk-EYCTSFEJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YFMFQBB4.mjs +0 -214
- package/dist/lib/node-esm/chunk-YFMFQBB4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs +0 -43
- package/dist/lib/node-esm/chunk-YNU7FTGJ.mjs.map +0 -7
- package/dist/lib/node-esm/plugin-intent-V7ER24Y6.mjs +0 -23
- package/dist/lib/node-esm/plugin-intent-V7ER24Y6.mjs.map +0 -7
- package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs +0 -12
- package/dist/lib/node-esm/plugin-settings-37UVWF2V.mjs.map +0 -7
- package/dist/lib/node-esm/plugin-surface-TEU42XQN.mjs +0 -25
- package/dist/lib/node-esm/plugin-surface-TEU42XQN.mjs.map +0 -7
- package/dist/types/src/plugins/common/file.d.ts +0 -22
- package/dist/types/src/plugins/common/file.d.ts.map +0 -1
- package/dist/types/src/plugins/common/graph.d.ts +0 -51
- package/dist/types/src/plugins/common/graph.d.ts.map +0 -1
- package/dist/types/src/plugins/common/index.d.ts.map +0 -1
- package/dist/types/src/plugins/common/layout.d.ts +0 -202
- package/dist/types/src/plugins/common/layout.d.ts.map +0 -1
- package/dist/types/src/plugins/common/metadata.d.ts +0 -16
- package/dist/types/src/plugins/common/metadata.d.ts.map +0 -1
- package/dist/types/src/plugins/common/navigation.d.ts.map +0 -1
- package/dist/types/src/plugins/common/translations.d.ts.map +0 -1
- package/dist/types/src/plugins/helpers.d.ts +0 -41
- package/dist/types/src/plugins/helpers.d.ts.map +0 -1
- package/dist/types/src/plugins/index.d.ts +0 -7
- package/dist/types/src/plugins/index.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts +0 -21
- package/dist/types/src/plugins/plugin-host/HostPlugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts +0 -14
- package/dist/types/src/plugins/plugin-host/PluginContainer.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/PluginContext.d.ts +0 -47
- package/dist/types/src/plugins/plugin-host/PluginContext.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/index.d.ts +0 -4
- package/dist/types/src/plugins/plugin-host/index.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/plugin.d.ts +0 -98
- package/dist/types/src/plugins/plugin-host/plugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-host/plugin.test.d.ts +0 -35
- package/dist/types/src/plugins/plugin-host/plugin.test.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts +0 -21
- package/dist/types/src/plugins/plugin-intent/IntentContext.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts +0 -8
- package/dist/types/src/plugins/plugin-intent/IntentPlugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/helpers.d.ts +0 -6
- package/dist/types/src/plugins/plugin-intent/helpers.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/index.d.ts +0 -6
- package/dist/types/src/plugins/plugin-intent/index.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/intent.d.ts +0 -81
- package/dist/types/src/plugins/plugin-intent/intent.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/meta.d.ts +0 -5
- package/dist/types/src/plugins/plugin-intent/meta.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-intent/provides.d.ts +0 -20
- package/dist/types/src/plugins/plugin-intent/provides.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts +0 -4
- package/dist/types/src/plugins/plugin-settings/SettingsPlugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-settings/index.d.ts +0 -4
- package/dist/types/src/plugins/plugin-settings/index.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-settings/meta.d.ts +0 -5
- package/dist/types/src/plugins/plugin-settings/meta.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-settings/provides.d.ts +0 -13
- package/dist/types/src/plugins/plugin-settings/provides.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/Surface.d.ts +0 -62
- package/dist/types/src/plugins/plugin-surface/Surface.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts +0 -7
- package/dist/types/src/plugins/plugin-surface/SurfacePlugin.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts +0 -39
- package/dist/types/src/plugins/plugin-surface/SurfaceRootContext.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/helpers.d.ts +0 -21
- package/dist/types/src/plugins/plugin-surface/helpers.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/index.d.ts +0 -8
- package/dist/types/src/plugins/plugin-surface/index.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/meta.d.ts +0 -5
- package/dist/types/src/plugins/plugin-surface/meta.d.ts.map +0 -1
- package/dist/types/src/plugins/plugin-surface/provides.d.ts +0 -16
- package/dist/types/src/plugins/plugin-surface/provides.d.ts.map +0 -1
- package/src/plugins/common/file.ts +0 -36
- package/src/plugins/common/graph.ts +0 -70
- package/src/plugins/common/layout.ts +0 -155
- package/src/plugins/common/metadata.ts +0 -29
- package/src/plugins/common/translations.ts +0 -36
- package/src/plugins/helpers.ts +0 -92
- package/src/plugins/index.ts +0 -11
- package/src/plugins/plugin-host/HostPlugin.tsx +0 -96
- package/src/plugins/plugin-host/PluginContainer.tsx +0 -120
- package/src/plugins/plugin-host/PluginContext.tsx +0 -79
- package/src/plugins/plugin-host/index.ts +0 -8
- package/src/plugins/plugin-host/plugin.test.ts +0 -158
- package/src/plugins/plugin-host/plugin.ts +0 -126
- package/src/plugins/plugin-intent/IntentContext.tsx +0 -49
- package/src/plugins/plugin-intent/IntentPlugin.tsx +0 -151
- package/src/plugins/plugin-intent/helpers.ts +0 -11
- package/src/plugins/plugin-intent/index.ts +0 -12
- package/src/plugins/plugin-intent/intent.ts +0 -101
- package/src/plugins/plugin-intent/meta.ts +0 -9
- package/src/plugins/plugin-intent/provides.ts +0 -38
- package/src/plugins/plugin-settings/SettingsPlugin.tsx +0 -22
- package/src/plugins/plugin-settings/index.ts +0 -9
- package/src/plugins/plugin-settings/meta.ts +0 -9
- package/src/plugins/plugin-settings/provides.ts +0 -29
- package/src/plugins/plugin-surface/Surface.tsx +0 -195
- package/src/plugins/plugin-surface/SurfacePlugin.tsx +0 -33
- package/src/plugins/plugin-surface/SurfaceRootContext.tsx +0 -60
- package/src/plugins/plugin-surface/helpers.ts +0 -22
- package/src/plugins/plugin-surface/index.ts +0 -14
- package/src/plugins/plugin-surface/meta.ts +0 -9
- package/src/plugins/plugin-surface/provides.ts +0 -26
- /package/dist/types/src/{plugins/plugin-surface → react}/ErrorBoundary.d.ts +0 -0
- /package/src/{plugins/plugin-surface → react}/ErrorBoundary.tsx +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_JZ2JVKRY_exports = {};
|
|
20
|
-
__export(chunk_JZ2JVKRY_exports, {
|
|
21
|
-
SettingsAction: () => SettingsAction,
|
|
22
|
-
meta_default: () => meta_default,
|
|
23
|
-
parseSettingsPlugin: () => parseSettingsPlugin,
|
|
24
|
-
plugin_settings_default: () => plugin_settings_default
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(chunk_JZ2JVKRY_exports);
|
|
27
|
-
var import_local_storage = require("@dxos/local-storage");
|
|
28
|
-
var SettingsMeta = {
|
|
29
|
-
id: "dxos.org/plugin/settings"
|
|
30
|
-
};
|
|
31
|
-
var meta_default = SettingsMeta;
|
|
32
|
-
var SettingsPlugin = () => {
|
|
33
|
-
const settingsStore = new import_local_storage.RootSettingsStore();
|
|
34
|
-
return {
|
|
35
|
-
meta: meta_default,
|
|
36
|
-
provides: {
|
|
37
|
-
settingsStore
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
var parseSettingsPlugin = (plugin) => {
|
|
42
|
-
return typeof plugin.provides.settingsStore === "object" ? plugin : void 0;
|
|
43
|
-
};
|
|
44
|
-
var SETTINGS_PLUGIN = "dxos.org/plugin/settings";
|
|
45
|
-
var SETTINGS_ACTION = `${SETTINGS_PLUGIN}/action`;
|
|
46
|
-
var SettingsAction;
|
|
47
|
-
(function(SettingsAction2) {
|
|
48
|
-
SettingsAction2[SettingsAction2["OPEN"] = `${SETTINGS_ACTION}/open`] = "OPEN";
|
|
49
|
-
})(SettingsAction || (SettingsAction = {}));
|
|
50
|
-
var plugin_settings_default = SettingsPlugin;
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
SettingsAction,
|
|
54
|
-
meta_default,
|
|
55
|
-
parseSettingsPlugin,
|
|
56
|
-
plugin_settings_default
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=chunk-JZ2JVKRY.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugins/plugin-settings/SettingsPlugin.tsx", "../../../src/plugins/plugin-settings/meta.ts", "../../../src/plugins/plugin-settings/provides.ts", "../../../src/plugins/plugin-settings/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { RootSettingsStore } from '@dxos/local-storage';\n\nimport SettingsMeta from './meta';\nimport { type SettingsPluginProvides } from './provides';\nimport { type PluginDefinition } from '../plugin-host';\n\nexport const SettingsPlugin = (): PluginDefinition<SettingsPluginProvides> => {\n // Global settings singleton.\n // TODO(burdon): Make settings storage extensible so that other plugins can decide the persistence of them.\n const settingsStore = new RootSettingsStore();\n\n return {\n meta: SettingsMeta,\n provides: {\n settingsStore,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nconst SettingsMeta = {\n id: 'dxos.org/plugin/settings',\n};\n\nexport default SettingsMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type SettingsStoreFactory, type SettingsValue } from '@dxos/local-storage';\n\nimport { type Plugin } from '../plugin-host';\n\nexport type SettingsProvides<T extends SettingsValue> = {\n settings: T;\n};\n\nexport type SettingsPluginProvides = {\n settingsStore: SettingsStoreFactory;\n};\n\nexport const parseSettingsPlugin = (plugin: Plugin) => {\n return typeof (plugin.provides as any).settingsStore === 'object'\n ? (plugin as Plugin<SettingsPluginProvides>)\n : undefined;\n};\n\nconst SETTINGS_PLUGIN = 'dxos.org/plugin/settings';\n\nconst SETTINGS_ACTION = `${SETTINGS_PLUGIN}/action`;\n\nexport enum SettingsAction {\n OPEN = `${SETTINGS_ACTION}/open`,\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { SettingsPlugin } from './SettingsPlugin';\n\nexport * from './provides';\n\nexport default SettingsPlugin;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAkC;ACAlC,IAAMA,eAAe;EACnBC,IAAI;AACN;AAEA,IAAA,eAAeD;ADER,IAAME,iBAAiB,MAAA;AAG5B,QAAMC,gBAAgB,IAAIC,uCAAAA;AAE1B,SAAO;IACLC,MAAML;IACNM,UAAU;MACRH;IACF;EACF;AACF;AELO,IAAMI,sBAAsB,CAACC,WAAAA;AAClC,SAAO,OAAQA,OAAOF,SAAiBH,kBAAkB,WACpDK,SACDC;AACN;AAEA,IAAMC,kBAAkB;AAExB,IAAMC,kBAAkB,GAAGD,eAAAA;;UAEfE,iBAAAA;4CACH,GAAGD,eAAAA,OAAsB,IAAA;GADtBC,mBAAAA,iBAAAA,CAAAA,EAAAA;AClBZ,IAAA,0BAAeV;",
|
|
6
|
-
"names": ["SettingsMeta", "id", "SettingsPlugin", "settingsStore", "RootSettingsStore", "meta", "provides", "parseSettingsPlugin", "plugin", "undefined", "SETTINGS_PLUGIN", "SETTINGS_ACTION", "SettingsAction"]
|
|
7
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_QBM42OQ6_exports = {};
|
|
20
|
-
__export(chunk_QBM42OQ6_exports, {
|
|
21
|
-
definePlugin: () => definePlugin,
|
|
22
|
-
filterPlugins: () => filterPlugins,
|
|
23
|
-
findPlugin: () => findPlugin,
|
|
24
|
-
getPlugin: () => getPlugin,
|
|
25
|
-
resolvePlugin: () => resolvePlugin
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(chunk_QBM42OQ6_exports);
|
|
28
|
-
var import_context = require("@dxos/context");
|
|
29
|
-
var import_debug = require("@dxos/debug");
|
|
30
|
-
var import_invariant = require("@dxos/invariant");
|
|
31
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/helpers.ts";
|
|
32
|
-
var findPlugin = (plugins, id) => {
|
|
33
|
-
return plugins.find((plugin) => plugin.meta.id === id || typeof plugin.meta.shortId === "string" && plugin.meta.shortId === id);
|
|
34
|
-
};
|
|
35
|
-
var getPlugin = (plugins, id) => {
|
|
36
|
-
return findPlugin(plugins, id) ?? (0, import_debug.raise)(new Error(`Plugin not found: ${id}`));
|
|
37
|
-
};
|
|
38
|
-
var filterPlugins = (plugins, predicate) => plugins.map((plugin) => predicate(plugin)).filter((plugin) => !!plugin);
|
|
39
|
-
var resolvePlugin = (plugins, predicate) => filterPlugins(plugins, predicate)[0];
|
|
40
|
-
var PluginContext = class {
|
|
41
|
-
constructor() {
|
|
42
|
-
this.ctx = new import_context.Context(void 0, {
|
|
43
|
-
F: __dxlog_file,
|
|
44
|
-
L: 50
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
init(plugins) {
|
|
48
|
-
this._plugins = plugins;
|
|
49
|
-
}
|
|
50
|
-
getPlugin(id) {
|
|
51
|
-
(0, import_invariant.invariant)(this._plugins, void 0, {
|
|
52
|
-
F: __dxlog_file,
|
|
53
|
-
L: 59,
|
|
54
|
-
S: this,
|
|
55
|
-
A: [
|
|
56
|
-
"this._plugins",
|
|
57
|
-
""
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
return getPlugin(this._plugins, id);
|
|
61
|
-
}
|
|
62
|
-
resolvePlugin(resolver, required = false) {
|
|
63
|
-
(0, import_invariant.invariant)(this._plugins, "context not initialized", {
|
|
64
|
-
F: __dxlog_file,
|
|
65
|
-
L: 65,
|
|
66
|
-
S: this,
|
|
67
|
-
A: [
|
|
68
|
-
"this._plugins",
|
|
69
|
-
"'context not initialized'"
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
const plugin = resolvePlugin(this._plugins, resolver);
|
|
73
|
-
if (required && !plugin) {
|
|
74
|
-
throw new Error("Plugin not found.");
|
|
75
|
-
}
|
|
76
|
-
return plugin;
|
|
77
|
-
}
|
|
78
|
-
onDispose(cb) {
|
|
79
|
-
this.ctx.onDispose(cb);
|
|
80
|
-
}
|
|
81
|
-
dispose() {
|
|
82
|
-
void this.ctx.dispose();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
var definePlugin = (cb) => {
|
|
86
|
-
const context = new PluginContext();
|
|
87
|
-
return () => cb(context);
|
|
88
|
-
};
|
|
89
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
-
0 && (module.exports = {
|
|
91
|
-
definePlugin,
|
|
92
|
-
filterPlugins,
|
|
93
|
-
findPlugin,
|
|
94
|
-
getPlugin,
|
|
95
|
-
resolvePlugin
|
|
96
|
-
});
|
|
97
|
-
//# sourceMappingURL=chunk-QBM42OQ6.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugins/helpers.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Context, type DisposeCallback } from '@dxos/context';\nimport { raise } from '@dxos/debug';\nimport { invariant } from '@dxos/invariant';\n\nimport { type Plugin, type PluginDefinition } from './plugin-host';\n\n/**\n * Resolvers allow different instances of plugins to provide a particular capability.\n */\nexport type PluginResolver<T> = (plugin: Plugin) => Plugin<T> | undefined;\n\n/**\n * Find a plugin by ID.\n */\nexport const findPlugin = <T>(plugins: Plugin[], id: string): Plugin<T> | undefined => {\n return plugins.find(\n (plugin) => plugin.meta.id === id || (typeof plugin.meta.shortId === 'string' && plugin.meta.shortId === id),\n ) as Plugin<T>;\n};\n\n/**\n * Find a plugin by ID, or raise an error if not found.\n */\nexport const getPlugin = <T>(plugins: Plugin[], id: string): Plugin<T> => {\n return findPlugin(plugins, id) ?? raise(new Error(`Plugin not found: ${id}`));\n};\n\n/**\n * Filter a list of plugins to only those that match a predicate.\n */\nexport const filterPlugins = <T>(plugins: Plugin[], predicate: PluginResolver<T>): Plugin<T>[] =>\n plugins.map((plugin) => predicate(plugin)).filter((plugin): plugin is Plugin<T> => !!plugin);\n\n/**\n * Resolves a plugin by predicate.\n *\n * @example\n * import { parseIntentPlugin, resolvePlugin } from '@dxos/app-framework';\n * const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n */\nexport const resolvePlugin = <T>(plugins: Plugin[], predicate: PluginResolver<T>): Plugin<T> | undefined =>\n filterPlugins(plugins, predicate)[0];\n\nclass PluginContext {\n // TODO(burdon): Use Resource (@dima)?\n public readonly ctx = new Context();\n\n private _plugins?: Plugin[];\n\n init(plugins: Plugin[]) {\n this._plugins = plugins;\n }\n\n getPlugin<T>(id: string): Plugin<T> {\n invariant(this._plugins);\n return getPlugin(this._plugins, id);\n }\n\n resolvePlugin<T>(resolver: PluginResolver<T>): Plugin<T>;\n resolvePlugin<T>(resolver: PluginResolver<T>, required = false): Plugin<T> | undefined {\n invariant(this._plugins, 'context not initialized');\n const plugin = resolvePlugin(this._plugins, resolver);\n if (required && !plugin) {\n // TODO(burdon): Resolver should have a name.\n throw new Error('Plugin not found.');\n }\n\n return plugin;\n }\n\n onDispose(cb: DisposeCallback) {\n this.ctx.onDispose(cb);\n }\n\n dispose() {\n void this.ctx.dispose();\n }\n}\n\n/**\n * Plugin helper with dependency injection and life-cycle support.\n */\nexport const definePlugin = <Provides>(\n cb: (context: PluginContext) => PluginDefinition<Provides>,\n): (() => PluginDefinition<Provides>) => {\n const context = new PluginContext();\n return () => cb(context);\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,qBAA8C;AAC9C,mBAAsB;AACtB,uBAA0B;;AAYnB,IAAMA,aAAa,CAAIC,SAAmBC,OAAAA;AAC/C,SAAOD,QAAQE,KACb,CAACC,WAAWA,OAAOC,KAAKH,OAAOA,MAAO,OAAOE,OAAOC,KAAKC,YAAY,YAAYF,OAAOC,KAAKC,YAAYJ,EAAAA;AAE7G;AAKO,IAAMK,YAAY,CAAIN,SAAmBC,OAAAA;AAC9C,SAAOF,WAAWC,SAASC,EAAAA,SAAOM,oBAAM,IAAIC,MAAM,qBAAqBP,EAAAA,EAAI,CAAA;AAC7E;AAKO,IAAMQ,gBAAgB,CAAIT,SAAmBU,cAClDV,QAAQW,IAAI,CAACR,WAAWO,UAAUP,MAAAA,CAAAA,EAASS,OAAO,CAACT,WAAgC,CAAC,CAACA,MAAAA;AAShF,IAAMU,gBAAgB,CAAIb,SAAmBU,cAClDD,cAAcT,SAASU,SAAAA,EAAW,CAAA;AAEpC,IAAMI,gBAAN,MAAMA;EAAN,cAAA;eAEwB,IAAIC,uBAAAA,QAAAA;;;;;EAI1BC,KAAKhB,SAAmB;AACtB,SAAKiB,WAAWjB;EAClB;EAEAM,UAAaL,IAAuB;AAClCiB,oCAAU,KAAKD,UAAQ,QAAA;;;;;;;;;AACvB,WAAOX,UAAU,KAAKW,UAAUhB,EAAAA;EAClC;EAGAY,cAAiBM,UAA6BC,WAAW,OAA8B;AACrFF,oCAAU,KAAKD,UAAU,2BAAA;;;;;;;;;AACzB,UAAMd,SAASU,cAAc,KAAKI,UAAUE,QAAAA;AAC5C,QAAIC,YAAY,CAACjB,QAAQ;AAEvB,YAAM,IAAIK,MAAM,mBAAA;IAClB;AAEA,WAAOL;EACT;EAEAkB,UAAUC,IAAqB;AAC7B,SAAKC,IAAIF,UAAUC,EAAAA;EACrB;EAEAE,UAAU;AACR,SAAK,KAAKD,IAAIC,QAAO;EACvB;AACF;AAKO,IAAMC,eAAe,CAC1BH,OAAAA;AAEA,QAAMI,UAAU,IAAIZ,cAAAA;AACpB,SAAO,MAAMQ,GAAGI,OAAAA;AAClB;",
|
|
6
|
-
"names": ["findPlugin", "plugins", "id", "find", "plugin", "meta", "shortId", "getPlugin", "raise", "Error", "filterPlugins", "predicate", "map", "filter", "resolvePlugin", "PluginContext", "Context", "init", "_plugins", "invariant", "resolver", "required", "onDispose", "cb", "ctx", "dispose", "definePlugin", "context"]
|
|
7
|
-
}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var chunk_QSVP5HOW_exports = {};
|
|
30
|
-
__export(chunk_QSVP5HOW_exports, {
|
|
31
|
-
IntentAction: () => IntentAction,
|
|
32
|
-
IntentProvider: () => IntentProvider,
|
|
33
|
-
meta_default: () => meta_default,
|
|
34
|
-
parseIntentPlugin: () => parseIntentPlugin,
|
|
35
|
-
parseIntentResolverPlugin: () => parseIntentResolverPlugin,
|
|
36
|
-
plugin_intent_default: () => plugin_intent_default,
|
|
37
|
-
useIntent: () => useIntent,
|
|
38
|
-
useIntentDispatcher: () => useIntentDispatcher,
|
|
39
|
-
useIntentResolver: () => useIntentResolver
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(chunk_QSVP5HOW_exports);
|
|
42
|
-
var import_chunk_QBM42OQ6 = require("./chunk-QBM42OQ6.cjs");
|
|
43
|
-
var import_react = __toESM(require("react"));
|
|
44
|
-
var import_live_object = require("@dxos/live-object");
|
|
45
|
-
var import_log = require("@dxos/log");
|
|
46
|
-
var import_react2 = require("react");
|
|
47
|
-
var import_react3 = require("react");
|
|
48
|
-
const import_meta = {};
|
|
49
|
-
var IntentContext = /* @__PURE__ */ (0, import_react2.createContext)({
|
|
50
|
-
dispatch: async () => ({}),
|
|
51
|
-
undo: async () => ({}),
|
|
52
|
-
history: [],
|
|
53
|
-
registerResolver: () => () => {
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var useIntent = () => (0, import_react2.useContext)(IntentContext);
|
|
57
|
-
var useIntentDispatcher = () => {
|
|
58
|
-
const { dispatch } = useIntent();
|
|
59
|
-
return dispatch;
|
|
60
|
-
};
|
|
61
|
-
var useIntentResolver = (plugin, resolver) => {
|
|
62
|
-
const { registerResolver } = useIntent();
|
|
63
|
-
(0, import_react3.useEffect)(() => {
|
|
64
|
-
return registerResolver(plugin, resolver);
|
|
65
|
-
}, [
|
|
66
|
-
plugin,
|
|
67
|
-
resolver
|
|
68
|
-
]);
|
|
69
|
-
};
|
|
70
|
-
var IntentProvider = IntentContext.Provider;
|
|
71
|
-
var isUndoable = (chain) => chain.length > 0 && chain.every(({ result }) => result.undoable);
|
|
72
|
-
var IntentMeta = {
|
|
73
|
-
id: "dxos.org/plugin/intent"
|
|
74
|
-
};
|
|
75
|
-
var meta_default = IntentMeta;
|
|
76
|
-
var parseIntentPlugin = (plugin) => plugin.provides.intent?.dispatch ? plugin : void 0;
|
|
77
|
-
var parseIntentResolverPlugin = (plugin) => plugin.provides.intent?.resolver ? plugin : void 0;
|
|
78
|
-
var INTENT_PLUGIN = "dxos.org/plugin/intent";
|
|
79
|
-
var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
|
|
80
|
-
var IntentAction;
|
|
81
|
-
(function(IntentAction2) {
|
|
82
|
-
IntentAction2[IntentAction2["SHOW_UNDO"] = `${INTENT_ACTION}/show-undo`] = "SHOW_UNDO";
|
|
83
|
-
})(IntentAction || (IntentAction = {}));
|
|
84
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/plugins/plugin-intent/IntentPlugin.tsx";
|
|
85
|
-
var EXECUTION_LIMIT = 1e3;
|
|
86
|
-
var HISTORY_LIMIT = 100;
|
|
87
|
-
var IntentPlugin = () => {
|
|
88
|
-
const state = (0, import_live_object.create)({
|
|
89
|
-
dispatch: async () => ({}),
|
|
90
|
-
undo: async () => ({}),
|
|
91
|
-
history: [],
|
|
92
|
-
registerResolver: () => () => {
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
const dynamicResolvers = /* @__PURE__ */ new Set();
|
|
96
|
-
return {
|
|
97
|
-
meta: meta_default,
|
|
98
|
-
ready: async (plugins) => {
|
|
99
|
-
const dispatch = async (intent) => {
|
|
100
|
-
(0, import_log.log)("dispatch", {
|
|
101
|
-
action: intent.action,
|
|
102
|
-
intent
|
|
103
|
-
}, {
|
|
104
|
-
F: __dxlog_file,
|
|
105
|
-
L: 45,
|
|
106
|
-
S: void 0,
|
|
107
|
-
C: (f, a) => f(...a)
|
|
108
|
-
});
|
|
109
|
-
if (intent.plugin) {
|
|
110
|
-
for (const entry of dynamicResolvers) {
|
|
111
|
-
if (entry.plugin === intent.plugin) {
|
|
112
|
-
const result = await entry.resolver(intent, plugins);
|
|
113
|
-
if (result) {
|
|
114
|
-
return result;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
const plugin = (0, import_chunk_QBM42OQ6.findPlugin)(plugins, intent.plugin);
|
|
119
|
-
return plugin?.provides.intent.resolver(intent, plugins);
|
|
120
|
-
}
|
|
121
|
-
for (const entry of dynamicResolvers) {
|
|
122
|
-
const result = await entry.resolver(intent, plugins);
|
|
123
|
-
if (result) {
|
|
124
|
-
return result;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
for (const plugin of (0, import_chunk_QBM42OQ6.filterPlugins)(plugins, parseIntentResolverPlugin)) {
|
|
128
|
-
const result = await plugin.provides.intent.resolver(intent, plugins);
|
|
129
|
-
if (result) {
|
|
130
|
-
return result;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (import_meta?.env?.DEV) {
|
|
134
|
-
import_log.log.warn("No plugin found to handle intent", intent, {
|
|
135
|
-
F: __dxlog_file,
|
|
136
|
-
L: 78,
|
|
137
|
-
S: void 0,
|
|
138
|
-
C: (f, a) => f(...a)
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
const dispatchChain = async (intentOrArray, depth = 0) => {
|
|
143
|
-
if (depth > EXECUTION_LIMIT) {
|
|
144
|
-
return {
|
|
145
|
-
error: new Error(`Intent execution limit exceeded (${EXECUTION_LIMIT} iterations). This is likely due to an infinite loop within intent resolvers.`)
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
const executionResults = [];
|
|
149
|
-
const chain = Array.isArray(intentOrArray) ? intentOrArray : [
|
|
150
|
-
intentOrArray
|
|
151
|
-
];
|
|
152
|
-
for (const intent of chain) {
|
|
153
|
-
const { result: prevResult } = executionResults.at(-1) ?? {};
|
|
154
|
-
const data = intent.data ? {
|
|
155
|
-
result: prevResult?.data,
|
|
156
|
-
...intent.data
|
|
157
|
-
} : prevResult?.data;
|
|
158
|
-
const result = await dispatch({
|
|
159
|
-
...intent,
|
|
160
|
-
data
|
|
161
|
-
});
|
|
162
|
-
if (!result || result?.error) {
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
executionResults.push({
|
|
166
|
-
intent,
|
|
167
|
-
result
|
|
168
|
-
});
|
|
169
|
-
result?.intents?.forEach((intents) => {
|
|
170
|
-
void dispatchChain(intents, depth + 1);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
state.history.push(executionResults);
|
|
174
|
-
if (state.history.length > HISTORY_LIMIT) {
|
|
175
|
-
state.history.splice(0, state.history.length - HISTORY_LIMIT);
|
|
176
|
-
}
|
|
177
|
-
if (isUndoable(executionResults)) {
|
|
178
|
-
void dispatch({
|
|
179
|
-
action: IntentAction.SHOW_UNDO,
|
|
180
|
-
data: {
|
|
181
|
-
results: executionResults
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
return executionResults.at(-1)?.result;
|
|
186
|
-
};
|
|
187
|
-
const undo = async () => {
|
|
188
|
-
const last = state.history.findLastIndex(isUndoable);
|
|
189
|
-
const chain = last !== -1 && state.history[last]?.map(({ intent, result }) => {
|
|
190
|
-
const data = result.undoable?.data ? {
|
|
191
|
-
...intent.data,
|
|
192
|
-
...result.undoable.data
|
|
193
|
-
} : intent.data;
|
|
194
|
-
return {
|
|
195
|
-
...intent,
|
|
196
|
-
data,
|
|
197
|
-
undo: true
|
|
198
|
-
};
|
|
199
|
-
});
|
|
200
|
-
if (chain) {
|
|
201
|
-
const result = await dispatchChain(chain);
|
|
202
|
-
state.history = state.history.filter((_, index) => index !== last);
|
|
203
|
-
return result;
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
state.dispatch = dispatchChain;
|
|
207
|
-
state.undo = undo;
|
|
208
|
-
state.registerResolver = (plugin, resolver) => {
|
|
209
|
-
const entry = {
|
|
210
|
-
plugin,
|
|
211
|
-
resolver
|
|
212
|
-
};
|
|
213
|
-
dynamicResolvers.add(entry);
|
|
214
|
-
return () => dynamicResolvers.delete(entry);
|
|
215
|
-
};
|
|
216
|
-
},
|
|
217
|
-
provides: {
|
|
218
|
-
intent: state,
|
|
219
|
-
context: ({ children }) => /* @__PURE__ */ import_react.default.createElement(IntentProvider, {
|
|
220
|
-
value: state
|
|
221
|
-
}, children)
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
var plugin_intent_default = IntentPlugin;
|
|
226
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
227
|
-
0 && (module.exports = {
|
|
228
|
-
IntentAction,
|
|
229
|
-
IntentProvider,
|
|
230
|
-
meta_default,
|
|
231
|
-
parseIntentPlugin,
|
|
232
|
-
parseIntentResolverPlugin,
|
|
233
|
-
plugin_intent_default,
|
|
234
|
-
useIntent,
|
|
235
|
-
useIntentDispatcher,
|
|
236
|
-
useIntentResolver
|
|
237
|
-
});
|
|
238
|
-
//# sourceMappingURL=chunk-QSVP5HOW.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/plugins/plugin-intent/IntentPlugin.tsx", "../../../src/plugins/plugin-intent/IntentContext.tsx", "../../../src/plugins/plugin-intent/helpers.ts", "../../../src/plugins/plugin-intent/meta.ts", "../../../src/plugins/plugin-intent/provides.ts", "../../../src/plugins/plugin-intent/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { create } from '@dxos/live-object';\nimport { log } from '@dxos/log';\n\nimport { type IntentContext, type IntentExecution, IntentProvider } from './IntentContext';\nimport { isUndoable } from './helpers';\nimport type { Intent, IntentResolver } from './intent';\nimport IntentMeta from './meta';\nimport {\n IntentAction,\n type IntentPluginProvides,\n type IntentResolverProvides,\n parseIntentResolverPlugin,\n} from './provides';\nimport { filterPlugins, findPlugin } from '../helpers';\nimport { type PluginDefinition } from '../plugin-host';\n\nconst EXECUTION_LIMIT = 1000;\nconst HISTORY_LIMIT = 100;\n\n/**\n * Allows plugins to register intent handlers and routes sent intents to the appropriate plugin.\n * Inspired by https://developer.android.com/reference/android/content/Intent.\n */\nexport const IntentPlugin = (): PluginDefinition<IntentPluginProvides> => {\n const state = create<IntentContext>({\n dispatch: async () => ({}),\n undo: async () => ({}),\n history: [],\n registerResolver: () => () => {},\n });\n\n const dynamicResolvers = new Set<{ plugin: string; resolver: IntentResolver }>();\n\n return {\n meta: IntentMeta,\n ready: async (plugins) => {\n // Dispatch intent to associated plugin.\n const dispatch = async (intent: Intent) => {\n log('dispatch', { action: intent.action, intent });\n if (intent.plugin) {\n for (const entry of dynamicResolvers) {\n if (entry.plugin === intent.plugin) {\n const result = await entry.resolver(intent, plugins);\n if (result) {\n return result;\n }\n }\n }\n\n const plugin = findPlugin<IntentResolverProvides>(plugins, intent.plugin);\n return plugin?.provides.intent.resolver(intent, plugins);\n }\n\n for (const entry of dynamicResolvers) {\n const result = await entry.resolver(intent, plugins);\n if (result) {\n return result;\n }\n }\n\n // Return resolved value from first plugin that handles the intent.\n for (const plugin of filterPlugins(plugins, parseIntentResolverPlugin)) {\n const result = await plugin.provides.intent.resolver(intent, plugins);\n if (result) {\n return result;\n }\n }\n\n // https://vitejs.dev/guide/env-and-mode#env-variables\n // TODO(wittjosiah): How to handle this more generically?\n if (import.meta?.env?.DEV) {\n log.warn('No plugin found to handle intent', intent);\n }\n };\n\n // Sequentially dispatch array of invents.\n const dispatchChain = async (intentOrArray: Intent | Intent[], depth = 0) => {\n if (depth > EXECUTION_LIMIT) {\n return {\n error: new Error(\n `Intent execution limit exceeded (${EXECUTION_LIMIT} iterations). This is likely due to an infinite loop within intent resolvers.`,\n ),\n };\n }\n\n const executionResults: IntentExecution[] = [];\n const chain = Array.isArray(intentOrArray) ? intentOrArray : [intentOrArray];\n for (const intent of chain) {\n const { result: prevResult } = executionResults.at(-1) ?? {};\n const data = intent.data ? { result: prevResult?.data, ...intent.data } : prevResult?.data;\n const result = await dispatch({ ...intent, data });\n\n if (!result || result?.error) {\n break;\n }\n\n executionResults.push({ intent, result });\n\n // TODO(wittjosiah): How does undo work with returned intents?\n result?.intents?.forEach((intents) => {\n void dispatchChain(intents, depth + 1);\n });\n }\n\n state.history.push(executionResults);\n if (state.history.length > HISTORY_LIMIT) {\n state.history.splice(0, state.history.length - HISTORY_LIMIT);\n }\n\n if (isUndoable(executionResults)) {\n void dispatch({ action: IntentAction.SHOW_UNDO, data: { results: executionResults } });\n }\n\n return executionResults.at(-1)?.result;\n };\n\n const undo = async () => {\n const last = state.history.findLastIndex(isUndoable);\n const chain =\n last !== -1 &&\n state.history[last]?.map(({ intent, result }): Intent => {\n const data = result.undoable?.data ? { ...intent.data, ...result.undoable.data } : intent.data;\n return { ...intent, data, undo: true };\n });\n if (chain) {\n const result = await dispatchChain(chain);\n state.history = state.history.filter((_, index) => index !== last);\n return result;\n }\n };\n\n state.dispatch = dispatchChain;\n state.undo = undo;\n state.registerResolver = (plugin, resolver) => {\n const entry = { plugin, resolver };\n dynamicResolvers.add(entry);\n return () => dynamicResolvers.delete(entry);\n };\n },\n provides: {\n intent: state,\n context: ({ children }) => <IntentProvider value={state}>{children}</IntentProvider>,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext, useContext, type Provider } from 'react';\nimport { useEffect } from 'react';\n\nimport type { UnsubscribeCallback } from '@dxos/async';\n\nimport type { Intent, IntentDispatcher, IntentResolver, IntentResult } from './intent';\n\nexport type IntentExecution = {\n intent: Intent;\n result: IntentResult;\n};\n\nexport type IntentContext = {\n dispatch: IntentDispatcher;\n undo: () => Promise<IntentResult | void>;\n history: IntentExecution[][];\n registerResolver: (pluginId: string, resolver: IntentResolver) => UnsubscribeCallback;\n};\n\nconst IntentContext: Context<IntentContext> = createContext<IntentContext>({\n dispatch: async () => ({}),\n undo: async () => ({}),\n history: [],\n registerResolver: () => () => {},\n});\n\n/**\n * @deprecated Prefer granular hooks.\n */\n// TODO(burdon): Remove. Use useIntentDispatcher.\nexport const useIntent = () => useContext(IntentContext);\n\nexport const useIntentDispatcher = (): IntentDispatcher => {\n const { dispatch } = useIntent();\n return dispatch;\n};\n\nexport const useIntentResolver = (plugin: string, resolver: IntentResolver) => {\n const { registerResolver } = useIntent();\n useEffect(() => {\n return registerResolver(plugin, resolver);\n }, [plugin, resolver]);\n};\n\nexport const IntentProvider: Provider<IntentContext> = IntentContext.Provider;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type IntentExecution } from './IntentContext';\n\n/**\n * Check if the chain of intents is undoable.\n */\nexport const isUndoable = (chain: IntentExecution[]): boolean =>\n chain.length > 0 && chain.every(({ result }) => result.undoable);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nconst IntentMeta = {\n id: 'dxos.org/plugin/intent',\n};\n\nexport default IntentMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type IntentContext } from './IntentContext';\nimport { type IntentResolver } from './intent';\nimport { type Plugin } from '../plugin-host';\n\nexport type IntentResolverProvides = {\n intent: {\n resolver: IntentResolver;\n };\n};\n\nexport type IntentPluginProvides = {\n intent: IntentContext;\n};\n\nexport const parseIntentPlugin = (plugin: Plugin) =>\n (plugin.provides as any).intent?.dispatch ? (plugin as Plugin<IntentPluginProvides>) : undefined;\n\nexport const parseIntentResolverPlugin = (plugin: Plugin) =>\n (plugin.provides as any).intent?.resolver ? (plugin as Plugin<IntentResolverProvides>) : undefined;\n\n//\n// Intents\n//\n\nconst INTENT_PLUGIN = 'dxos.org/plugin/intent';\n\nconst INTENT_ACTION = `${INTENT_PLUGIN}/action`;\n\nexport enum IntentAction {\n /**\n * Fired after an intent is dispatched if the intent is undoable.\n */\n SHOW_UNDO = `${INTENT_ACTION}/show-undo`,\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { IntentPlugin } from './IntentPlugin';\n\nexport * from './intent';\nexport * from './provides';\n\nexport * from './IntentContext';\n\nexport default IntentPlugin;\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["import_react", "IntentContext", "createContext", "dispatch", "undo", "history", "registerResolver", "useIntent", "useContext", "useIntentDispatcher", "useIntentResolver", "plugin", "resolver", "useEffect", "IntentProvider", "Provider", "isUndoable", "chain", "length", "every", "result", "undoable", "IntentMeta", "id", "parseIntentPlugin", "provides", "intent", "undefined", "parseIntentResolverPlugin", "INTENT_PLUGIN", "INTENT_ACTION", "IntentAction", "EXECUTION_LIMIT", "HISTORY_LIMIT", "IntentPlugin", "state", "create", "dynamicResolvers", "Set", "meta", "ready", "plugins", "log", "action", "entry", "findPlugin", "filterPlugins", "env", "DEV", "warn", "dispatchChain", "intentOrArray", "depth", "error", "Error", "executionResults", "Array", "isArray", "prevResult", "at", "data", "push", "intents", "forEach", "splice", "SHOW_UNDO", "results", "last", "findLastIndex", "map", "filter", "_", "index", "add", "delete", "context", "children", "React", "value"]
|
|
7
|
-
}
|