@dxos/app-framework 0.7.5-main.9d2a38b → 0.7.5-main.b19bfc8
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/app-graph-builder-S4MYSHQA.mjs +137 -0
- package/dist/lib/browser/app-graph-builder-S4MYSHQA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GNLU3GAU.mjs → chunk-BCMEJONP.mjs} +660 -823
- package/dist/lib/browser/chunk-BCMEJONP.mjs.map +7 -0
- package/dist/lib/browser/chunk-QS4J6O47.mjs +285 -0
- package/dist/lib/browser/chunk-QS4J6O47.mjs.map +7 -0
- package/dist/lib/browser/chunk-SRZH2PQ2.mjs +32 -0
- package/dist/lib/browser/chunk-SRZH2PQ2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +57 -74
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-dispatcher-GFBH7T2J.mjs +11 -0
- package/dist/lib/browser/intent-dispatcher-GFBH7T2J.mjs.map +7 -0
- package/dist/lib/browser/intent-resolver-KAFM7CQH.mjs +39 -0
- package/dist/lib/browser/intent-resolver-KAFM7CQH.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/store-L3VRR7II.mjs +29 -0
- package/dist/lib/browser/store-L3VRR7II.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +10 -3
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/worker.mjs +77 -0
- package/dist/lib/browser/worker.mjs.map +7 -0
- package/dist/lib/node/app-graph-builder-VMHWFCTP.cjs +146 -0
- package/dist/lib/node/app-graph-builder-VMHWFCTP.cjs.map +7 -0
- package/dist/lib/node/chunk-7Y6KJ3OK.cjs +1466 -0
- package/dist/lib/node/chunk-7Y6KJ3OK.cjs.map +7 -0
- package/dist/lib/node/chunk-B65NJEIJ.cjs +308 -0
- package/dist/lib/node/chunk-B65NJEIJ.cjs.map +7 -0
- package/dist/lib/node/chunk-VCIHQZSN.cjs +58 -0
- package/dist/lib/node/chunk-VCIHQZSN.cjs.map +7 -0
- package/dist/lib/node/index.cjs +106 -118
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/intent-dispatcher-PRCC4KZT.cjs +32 -0
- package/dist/lib/node/intent-dispatcher-PRCC4KZT.cjs.map +7 -0
- package/dist/lib/node/intent-resolver-OZDKCHPW.cjs +46 -0
- package/dist/lib/node/intent-resolver-OZDKCHPW.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/store-BVUKNVKL.cjs +44 -0
- package/dist/lib/node/store-BVUKNVKL.cjs.map +7 -0
- package/dist/lib/node/testing/index.cjs +15 -8
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node/worker.cjs +99 -0
- package/dist/lib/node/worker.cjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-XHI5IIXQ.mjs +138 -0
- package/dist/lib/node-esm/app-graph-builder-XHI5IIXQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CBT75GCX.mjs +34 -0
- package/dist/lib/node-esm/chunk-CBT75GCX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JDAHZRYQ.mjs +286 -0
- package/dist/lib/node-esm/chunk-JDAHZRYQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KPMTPXQI.mjs → chunk-TVIR2PHY.mjs} +660 -823
- package/dist/lib/node-esm/chunk-TVIR2PHY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +57 -74
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-dispatcher-LGACN32C.mjs +12 -0
- package/dist/lib/node-esm/intent-dispatcher-LGACN32C.mjs.map +7 -0
- package/dist/lib/node-esm/intent-resolver-RBNG76ZX.mjs +40 -0
- package/dist/lib/node-esm/intent-resolver-RBNG76ZX.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/store-PHTOEREN.mjs +30 -0
- package/dist/lib/node-esm/store-PHTOEREN.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +10 -3
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/worker.mjs +78 -0
- package/dist/lib/node-esm/worker.mjs.map +7 -0
- package/dist/types/src/App.d.ts +2 -2
- package/dist/types/src/App.d.ts.map +1 -1
- package/dist/types/src/common/capabilities.d.ts +88 -124
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/events.d.ts +22 -11
- package/dist/types/src/common/events.d.ts.map +1 -1
- package/dist/types/src/common/file.d.ts +1 -1
- package/dist/types/src/common/file.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 +0 -1
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/layout.d.ts +218 -121
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/surface.d.ts +3 -3
- package/dist/types/src/common/surface.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +7 -7
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/capabilities.d.ts +6 -2
- package/dist/types/src/core/capabilities.d.ts.map +1 -1
- package/dist/types/src/core/manager.d.ts +2 -9
- package/dist/types/src/core/manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +5 -2
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/debug/Debug.d.ts +2 -3
- package/dist/types/src/playground/debug/Debug.d.ts.map +1 -1
- package/dist/types/src/playground/debug/plugin.d.ts +1 -1
- package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Main.d.ts +2 -3
- package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +2 -3
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/generator/generator.d.ts +5 -3
- package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts +1 -1
- package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/layout/Layout.d.ts +2 -2
- package/dist/types/src/playground/layout/Layout.d.ts.map +1 -1
- package/dist/types/src/playground/layout/plugin.d.ts +1 -1
- package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +2 -3
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts +1 -1
- package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/logger/schema.d.ts +1 -1
- package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
- package/dist/types/src/playground/playground.stories.d.ts +2 -3
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/index.d.ts +0 -1
- package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +27 -20
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/intent.d.ts +3 -3
- package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts +11 -1
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +197 -0
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +4 -0
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/store.d.ts +5 -0
- package/dist/types/src/plugin-settings/store.d.ts.map +1 -0
- package/dist/types/src/plugin-settings/translations.d.ts +11 -0
- package/dist/types/src/plugin-settings/translations.d.ts.map +1 -0
- package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
- package/dist/types/src/{plugin-intent → react}/IntentContext.d.ts +1 -1
- package/dist/types/src/react/IntentContext.d.ts.map +1 -0
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/Surface.stories.d.ts +15 -0
- package/dist/types/src/react/Surface.stories.d.ts.map +1 -0
- package/dist/types/src/react/common.d.ts +13 -0
- package/dist/types/src/react/common.d.ts.map +1 -0
- package/dist/types/src/react/index.d.ts +2 -0
- package/dist/types/src/react/index.d.ts.map +1 -1
- package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/react/useIntentResolver.d.ts +3 -0
- package/dist/types/src/react/useIntentResolver.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/worker.d.ts +4 -0
- package/dist/types/src/worker.d.ts.map +1 -0
- package/package.json +29 -21
- package/project.json +4 -3
- package/src/App.tsx +17 -15
- package/src/common/capabilities.ts +30 -11
- package/src/common/events.ts +16 -2
- package/src/common/file.ts +1 -1
- package/src/common/graph.ts +2 -2
- package/src/common/index.ts +0 -1
- package/src/common/layout.ts +207 -126
- package/src/common/surface.ts +2 -2
- package/src/common/translations.ts +7 -8
- package/src/core/capabilities.ts +16 -7
- package/src/core/manager.test.ts +22 -73
- package/src/core/manager.ts +105 -91
- package/src/core/plugin.ts +6 -3
- package/src/playground/debug/plugin.ts +1 -1
- package/src/playground/generator/Toolbar.tsx +11 -11
- package/src/playground/generator/generator.ts +25 -0
- package/src/playground/generator/plugin.ts +6 -1
- package/src/playground/layout/plugin.ts +1 -1
- package/src/playground/logger/Toolbar.tsx +2 -1
- package/src/playground/logger/plugin.ts +7 -4
- package/src/playground/logger/schema.ts +1 -1
- package/src/plugin-intent/IntentPlugin.tsx +3 -43
- package/src/plugin-intent/actions.ts +1 -1
- package/src/plugin-intent/errors.ts +1 -1
- package/src/plugin-intent/index.ts +0 -1
- package/src/plugin-intent/intent-dispatcher.test.ts +48 -29
- package/src/plugin-intent/intent-dispatcher.ts +81 -42
- package/src/plugin-intent/intent.ts +5 -5
- package/src/plugin-settings/SettingsPlugin.ts +19 -13
- package/src/plugin-settings/actions.ts +11 -1
- package/src/plugin-settings/app-graph-builder.ts +122 -0
- package/src/plugin-settings/intent-resolver.ts +34 -0
- package/src/plugin-settings/store.ts +30 -0
- package/src/plugin-settings/translations.ts +17 -0
- package/src/{plugin-intent → react}/IntentContext.tsx +2 -2
- package/src/react/Surface.stories.tsx +96 -0
- package/src/react/Surface.tsx +11 -8
- package/src/react/common.ts +12 -0
- package/src/react/index.ts +2 -0
- package/src/react/useCapabilities.ts +1 -0
- package/src/react/useIntentResolver.ts +22 -0
- package/src/testing/withPluginManager.tsx +11 -3
- package/src/worker.ts +11 -0
- package/tsconfig.json +7 -13
- package/dist/lib/browser/chunk-GNLU3GAU.mjs.map +0 -7
- package/dist/lib/node/chunk-FBA4BB3J.cjs +0 -1639
- package/dist/lib/node/chunk-FBA4BB3J.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-KPMTPXQI.mjs.map +0 -7
- package/dist/types/src/common/navigation.d.ts +0 -241
- package/dist/types/src/common/navigation.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/IntentContext.d.ts.map +0 -1
- package/src/common/navigation.ts +0 -199
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
|
@@ -24,7 +24,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
24
24
|
error: Error;
|
|
25
25
|
};
|
|
26
26
|
componentDidUpdate(prevProps: Props): void;
|
|
27
|
-
render(): string | number | boolean | Iterable<React.ReactNode> |
|
|
27
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
28
28
|
private resetError;
|
|
29
29
|
}
|
|
30
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Context, type Provider } from 'react';
|
|
2
|
-
import { type AnyIntentResolver, type IntentContext } from '
|
|
2
|
+
import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
|
|
3
3
|
declare const IntentContext: Context<IntentContext | undefined>;
|
|
4
4
|
export declare const useIntentDispatcher: () => Pick<IntentContext, "dispatch" | "dispatchPromise">;
|
|
5
5
|
export declare const useIntentResolver: (module: string, resolver: AnyIntentResolver) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntentContext.d.ts","sourceRoot":"","sources":["../../../../src/react/IntentContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA6B,KAAK,QAAQ,EAAa,MAAM,OAAO,CAAC;AAO1F,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,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,WAAY,MAAM,YAAY,iBAAiB,SAW5E,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,CAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAOnE,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8C,MAAM,OAAO,CAAC;AAOnE,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAmB9C;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAAa,cAAc,kBAAkB,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,YAI9G,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,0HA6BnB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type PluginManager } from '../core';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: ({ manager }: {
|
|
6
|
+
manager: PluginManager;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
decorators: import("@storybook/react").Decorator[];
|
|
9
|
+
args: {
|
|
10
|
+
manager: PluginManager;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const Default: {};
|
|
15
|
+
//# sourceMappingURL=Surface.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.stories.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAWrB,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;;;0BAkErB;QAAE,OAAO,EAAE,aAAa,CAAA;KAAE;;;;;;AAFlD,wBAcE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useIntentDispatcher: () => import("..").IntentContext;
|
|
2
|
+
export declare const useAppGraph: () => Readonly<Pick<import("@dxos/app-graph").GraphBuilder, "graph" | "explore">>;
|
|
3
|
+
export declare const useLayout: () => Readonly<{
|
|
4
|
+
mode: string;
|
|
5
|
+
dialogOpen: boolean;
|
|
6
|
+
sidebarOpen: boolean;
|
|
7
|
+
complementarySidebarOpen: boolean;
|
|
8
|
+
workspace: string;
|
|
9
|
+
active: string[];
|
|
10
|
+
inactive: string[];
|
|
11
|
+
scrollIntoView: string | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/react/common.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,kCAAqD,CAAC;AAEtF,eAAO,MAAM,WAAW,mFAA6C,CAAC;AAEtE,eAAO,MAAM,SAAS;;;;;;;;;EAA2C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCapabilities.d.ts","sourceRoot":"","sources":["../../../../src/react/useCapabilities.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,CAAC,SAAS,CAAC,oBAC9B,YAAY,CAAC,CAAC,CAAC,WACpB,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"useCapabilities.d.ts","sourceRoot":"","sources":["../../../../src/react/useCapabilities.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,CAAC,SAAS,CAAC,oBAC9B,YAAY,CAAC,CAAC,CAAC,WACpB,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,IAAI,CAAC,QAS9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,CAAC,SAAS,CAAC,oBAC5B,YAAY,CAAC,CAAC,CAAC,WACpB,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,IAAI,CAAC,MAK9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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,WAAY,MAAM,YAAY,iBAAiB,SAW5E,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { type AnyCapability } from '../core';
|
|
|
4
4
|
/**
|
|
5
5
|
* Wraps a story with a plugin manager.
|
|
6
6
|
*/
|
|
7
|
-
export declare const withPluginManager: (
|
|
7
|
+
export declare const withPluginManager: (options?: CreateAppOptions & {
|
|
8
8
|
capabilities?: AnyCapability[];
|
|
9
9
|
}) => Decorator;
|
|
10
10
|
//# sourceMappingURL=withPluginManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,KAAK,aAAa,EAA0D,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,KAAK,aAAa,EAA0D,MAAM,SAAS,CAAC;AA+BrG;;GAEG;AACH,eAAO,MAAM,iBAAiB,aAAa,gBAAgB,GAAG;IAAE,YAAY,CAAC,EAAE,aAAa,EAAE,CAAA;CAAE,KAAQ,SAqBvG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/app-framework",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.b19bfc8",
|
|
4
4
|
"description": "A framework for building applications from composible plugins.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -17,6 +18,11 @@
|
|
|
17
18
|
"types": "./dist/types/src/testing/index.d.ts",
|
|
18
19
|
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
19
20
|
"node": "./dist/lib/node-esm/testing/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./worker": {
|
|
23
|
+
"types": "./dist/types/src/worker.d.ts",
|
|
24
|
+
"browser": "./dist/lib/browser/worker.mjs",
|
|
25
|
+
"node": "./dist/lib/node-esm/worker.mjs"
|
|
20
26
|
}
|
|
21
27
|
},
|
|
22
28
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -24,38 +30,40 @@
|
|
|
24
30
|
"*": {
|
|
25
31
|
"./testing": [
|
|
26
32
|
"dist/types/src/testing/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"./worker": [
|
|
35
|
+
"dist/types/src/worker.d.ts"
|
|
27
36
|
]
|
|
28
37
|
}
|
|
29
38
|
},
|
|
30
39
|
"dependencies": {
|
|
31
40
|
"@effect/schema": "^0.75.5",
|
|
32
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
33
41
|
"@preact/signals-core": "^1.6.0",
|
|
34
|
-
"effect": "^3.12.
|
|
35
|
-
"
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/storybook-utils": "0.7.5-main.9d2a38b",
|
|
47
|
-
"@dxos/util": "0.7.5-main.9d2a38b",
|
|
48
|
-
"@dxos/log": "0.7.5-main.9d2a38b"
|
|
42
|
+
"effect": "^3.12.3",
|
|
43
|
+
"@dxos/app-graph": "0.7.5-main.b19bfc8",
|
|
44
|
+
"@dxos/artifact": "0.7.5-main.b19bfc8",
|
|
45
|
+
"@dxos/async": "0.7.5-main.b19bfc8",
|
|
46
|
+
"@dxos/debug": "0.7.5-main.b19bfc8",
|
|
47
|
+
"@dxos/client-protocol": "0.7.5-main.b19bfc8",
|
|
48
|
+
"@dxos/invariant": "0.7.5-main.b19bfc8",
|
|
49
|
+
"@dxos/live-object": "0.7.5-main.b19bfc8",
|
|
50
|
+
"@dxos/local-storage": "0.7.5-main.b19bfc8",
|
|
51
|
+
"@dxos/log": "0.7.5-main.b19bfc8",
|
|
52
|
+
"@dxos/react-hooks": "0.7.5-main.b19bfc8",
|
|
53
|
+
"@dxos/util": "0.7.5-main.b19bfc8"
|
|
49
54
|
},
|
|
50
55
|
"devDependencies": {
|
|
56
|
+
"@phosphor-icons/react": "^2.1.5",
|
|
51
57
|
"@types/react": "~18.2.0",
|
|
52
58
|
"react": "~18.2.0",
|
|
53
|
-
"@dxos/echo-
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
59
|
+
"@dxos/echo-schema": "0.7.5-main.b19bfc8",
|
|
60
|
+
"@dxos/echo-signals": "0.7.5-main.b19bfc8",
|
|
61
|
+
"@dxos/random": "0.7.5-main.b19bfc8",
|
|
62
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-main.b19bfc8",
|
|
63
|
+
"@dxos/react-ui": "0.7.5-main.b19bfc8",
|
|
64
|
+
"@dxos/storybook-utils": "0.7.5-main.b19bfc8"
|
|
56
65
|
},
|
|
57
66
|
"peerDependencies": {
|
|
58
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
59
67
|
"react": "~18.2.0"
|
|
60
68
|
},
|
|
61
69
|
"publishConfig": {
|
package/project.json
CHANGED
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
"options": {
|
|
13
13
|
"entryPoints": [
|
|
14
14
|
"{projectRoot}/src/index.ts",
|
|
15
|
-
"{projectRoot}/src/testing/index.ts"
|
|
15
|
+
"{projectRoot}/src/testing/index.ts",
|
|
16
|
+
"{projectRoot}/src/worker.ts"
|
|
16
17
|
]
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
"lint": {},
|
|
21
|
+
"pack": {},
|
|
20
22
|
"test": {}
|
|
21
23
|
},
|
|
22
24
|
"implicitDependencies": [
|
|
23
|
-
"esbuild"
|
|
24
|
-
"node-std"
|
|
25
|
+
"esbuild"
|
|
25
26
|
]
|
|
26
27
|
}
|
package/src/App.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import { create } from '@dxos/live-object';
|
|
|
11
11
|
import { Capabilities, Events } from './common';
|
|
12
12
|
import { PluginManager, type PluginManagerOptions, type Plugin } from './core';
|
|
13
13
|
import { topologicalSort } from './helpers';
|
|
14
|
-
import { ErrorBoundary, PluginManagerProvider } from './react';
|
|
14
|
+
import { ErrorBoundary, PluginManagerProvider, useCapabilities } from './react';
|
|
15
15
|
|
|
16
16
|
const ENABLED_KEY = 'dxos.org/app-framework/enabled';
|
|
17
17
|
|
|
@@ -75,7 +75,8 @@ export const createApp = ({
|
|
|
75
75
|
const manager = pluginManager ?? new PluginManager({ pluginLoader, plugins, core, enabled });
|
|
76
76
|
|
|
77
77
|
manager.activation.on(({ event, state: _state, error }) => {
|
|
78
|
-
|
|
78
|
+
// Once the app is ready the first time, don't show the fallback again.
|
|
79
|
+
if (!state.ready && event === Events.Startup.id) {
|
|
79
80
|
state.ready = _state === 'activated';
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -96,21 +97,27 @@ export const createApp = ({
|
|
|
96
97
|
|
|
97
98
|
setupDevtools(manager);
|
|
98
99
|
|
|
100
|
+
// TODO(wittjosiah): Factor out such that this could be called per surface role when attempting to render.
|
|
101
|
+
void manager.activate(Events.SetupReactSurface);
|
|
99
102
|
void manager.activate(Events.Startup);
|
|
100
103
|
|
|
101
104
|
return () => (
|
|
102
105
|
<ErrorBoundary fallback={fallback}>
|
|
103
|
-
<
|
|
106
|
+
<PluginManagerProvider value={manager}>
|
|
107
|
+
<App placeholder={placeholder} state={state} />
|
|
108
|
+
</PluginManagerProvider>
|
|
104
109
|
</ErrorBoundary>
|
|
105
110
|
);
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
type AppProps = Required<Pick<CreateAppOptions, 'placeholder'>> & {
|
|
109
|
-
manager: PluginManager;
|
|
110
114
|
state: { ready: boolean; error: unknown };
|
|
111
115
|
};
|
|
112
116
|
|
|
113
|
-
const App = ({ placeholder,
|
|
117
|
+
const App = ({ placeholder, state }: AppProps) => {
|
|
118
|
+
const reactContexts = useCapabilities(Capabilities.ReactContext);
|
|
119
|
+
const reactRoots = useCapabilities(Capabilities.ReactRoot);
|
|
120
|
+
|
|
114
121
|
if (state.error) {
|
|
115
122
|
// This trigger the error boundary to provide UI feedback for the startup error.
|
|
116
123
|
throw state.error;
|
|
@@ -121,18 +128,13 @@ const App = ({ placeholder, manager, state }: AppProps) => {
|
|
|
121
128
|
return <>{placeholder}</>;
|
|
122
129
|
}
|
|
123
130
|
|
|
124
|
-
const reactContexts = manager.context.requestCapabilities(Capabilities.ReactContext);
|
|
125
|
-
const reactRoots = manager.context.requestCapabilities(Capabilities.ReactRoot);
|
|
126
|
-
|
|
127
131
|
const ComposedContext = composeContexts(reactContexts);
|
|
128
132
|
return (
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</ComposedContext>
|
|
135
|
-
</PluginManagerProvider>
|
|
133
|
+
<ComposedContext>
|
|
134
|
+
{reactRoots.map(({ id, root: Component }) => (
|
|
135
|
+
<Component key={id} />
|
|
136
|
+
))}
|
|
137
|
+
</ComposedContext>
|
|
136
138
|
);
|
|
137
139
|
};
|
|
138
140
|
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type Schema as S } from '@effect/schema';
|
|
5
6
|
import { type FC, type PropsWithChildren } from 'react';
|
|
6
7
|
|
|
7
8
|
import { type GraphBuilder } from '@dxos/app-graph';
|
|
9
|
+
import { type ArtifactDefinition, type Tool } from '@dxos/artifact';
|
|
8
10
|
import { type Space } from '@dxos/client-protocol';
|
|
9
|
-
import { type S } from '@dxos/echo-schema';
|
|
10
11
|
import { type RootSettingsStore } from '@dxos/local-storage';
|
|
11
|
-
import { type DeepReadonly } from '@dxos/util';
|
|
12
12
|
|
|
13
13
|
import { type FileInfo } from './file';
|
|
14
14
|
import { type NodeSerializer } from './graph';
|
|
15
|
-
import { type Layout } from './layout';
|
|
16
|
-
import { type LayoutParts } from './navigation';
|
|
17
15
|
import { type SurfaceDefinition } from './surface';
|
|
18
16
|
import { type Resource } from './translations';
|
|
19
17
|
import { defineCapability, type PluginManager } from '../core';
|
|
@@ -40,13 +38,29 @@ export namespace Capabilities {
|
|
|
40
38
|
'dxos.org/app-framework/capability/intent-dispatcher',
|
|
41
39
|
);
|
|
42
40
|
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
export type Layout = Readonly<{
|
|
42
|
+
mode: string;
|
|
43
|
+
dialogOpen: boolean;
|
|
44
|
+
sidebarOpen: boolean;
|
|
45
|
+
complementarySidebarOpen: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The id of the active workspace, where a workspace is a set of active items.
|
|
48
|
+
*/
|
|
49
|
+
workspace: string;
|
|
50
|
+
/**
|
|
51
|
+
* Identifiers of items which are currently active in the application.
|
|
52
|
+
*/
|
|
53
|
+
active: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Identifiers of items which were previously active in the application.
|
|
56
|
+
*/
|
|
57
|
+
inactive: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Identifier of the item which should be scrolled into view.
|
|
60
|
+
*/
|
|
61
|
+
scrollIntoView: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
export const Layout = defineCapability<Layout>('dxos.org/app-framework/capability/layout');
|
|
50
64
|
|
|
51
65
|
export const Translations = defineCapability<Readonly<Resource[]>>('dxos.org/app-framework/capability/translations');
|
|
52
66
|
|
|
@@ -77,6 +91,11 @@ export namespace Capabilities {
|
|
|
77
91
|
export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
|
|
78
92
|
export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
|
|
79
93
|
|
|
94
|
+
export const Tools = defineCapability<Tool[]>('dxos.org/app-framework/capability/tools');
|
|
95
|
+
export const ArtifactDefinition = defineCapability<ArtifactDefinition>(
|
|
96
|
+
'dxos.org/app-framework/capability/artifact-definition',
|
|
97
|
+
);
|
|
98
|
+
|
|
80
99
|
export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
|
|
81
100
|
export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
|
|
82
101
|
}
|
package/src/common/events.ts
CHANGED
|
@@ -15,10 +15,20 @@ export namespace Events {
|
|
|
15
15
|
// Dependent Events
|
|
16
16
|
//
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Fired to load any newly available surfaces.
|
|
20
|
+
*/
|
|
21
|
+
export const SetupReactSurface = defineEvent('dxos.org/app-framework/event/setup-react-surface');
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Fired to load any newly available metadata.
|
|
25
|
+
*/
|
|
26
|
+
export const SetupMetadata = defineEvent('dxos.org/app-framework/event/setup-metadata');
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* Fired before the intent dispatcher is activated.
|
|
20
30
|
*/
|
|
21
|
-
export const
|
|
31
|
+
export const SetupIntentResolver = defineEvent('dxos.org/app-framework/event/setup-intent-resolver');
|
|
22
32
|
|
|
23
33
|
/**
|
|
24
34
|
* Fired before the settings store is activated.
|
|
@@ -35,6 +45,11 @@ export namespace Events {
|
|
|
35
45
|
*/
|
|
36
46
|
export const SetupTranslations = defineEvent('dxos.org/app-framework/event/setup-translations');
|
|
37
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Fired to load any newly available artifacts definitions.
|
|
50
|
+
*/
|
|
51
|
+
export const SetupArtifactDefinition = defineEvent('dxos.org/app-framework/event/setup-artifact-definition');
|
|
52
|
+
|
|
38
53
|
//
|
|
39
54
|
// Triggered Events
|
|
40
55
|
//
|
|
@@ -59,5 +74,4 @@ export namespace Events {
|
|
|
59
74
|
*/
|
|
60
75
|
export const createStateEvent = (specifier: string) => defineEvent('dxos.org/app-framework/event/state', specifier);
|
|
61
76
|
export const LayoutReady = createStateEvent(Capabilities.Layout.identifier);
|
|
62
|
-
export const LocationReady = createStateEvent(Capabilities.Location.identifier);
|
|
63
77
|
}
|
package/src/common/file.ts
CHANGED
package/src/common/graph.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import type { Node } from '@dxos/app-graph';
|
|
6
|
-
import { type MaybePromise } from '@dxos/util';
|
|
6
|
+
import { type MaybePromise, type Position } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
// TODO(wittjosiah): Factor out.
|
|
9
9
|
export type SerializedNode = {
|
|
@@ -16,7 +16,7 @@ export type SerializedNode = {
|
|
|
16
16
|
export type NodeSerializer<T = any> = {
|
|
17
17
|
inputType: string;
|
|
18
18
|
outputType: string;
|
|
19
|
-
|
|
19
|
+
position?: Position;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Takes a node and serializes it into a format that can be stored.
|