@dxos/app-framework 0.8.0 → 0.8.1-main.81238a8
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 → app-graph-builder-C2X7EJHZ.mjs} +3 -3
- package/dist/lib/browser/{chunk-BCMEJONP.mjs → chunk-AT6WJZHF.mjs} +9 -8
- package/dist/lib/browser/chunk-AT6WJZHF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SRZH2PQ2.mjs → chunk-CB3W6T5E.mjs} +2 -2
- package/dist/lib/browser/{chunk-SRZH2PQ2.mjs.map → chunk-CB3W6T5E.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-QS4J6O47.mjs → chunk-YZLQKV7K.mjs} +7 -6
- package/dist/lib/browser/chunk-YZLQKV7K.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +8 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-dispatcher-GFBH7T2J.mjs → intent-dispatcher-UKENQ4DV.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-KAFM7CQH.mjs → intent-resolver-SAJDCXS5.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{store-L3VRR7II.mjs → store-A6VBQ2TT.mjs} +2 -2
- package/dist/lib/browser/testing/index.mjs +4 -3
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/worker.mjs +1 -1
- package/dist/lib/node/{app-graph-builder-VMHWFCTP.cjs → app-graph-builder-NJS4VPDQ.cjs} +28 -28
- package/dist/lib/node/{chunk-B65NJEIJ.cjs → chunk-F3K3VVL5.cjs} +23 -22
- package/dist/lib/node/chunk-F3K3VVL5.cjs.map +7 -0
- package/dist/lib/node/{chunk-7Y6KJ3OK.cjs → chunk-OPG5WEML.cjs} +179 -178
- package/dist/lib/node/chunk-OPG5WEML.cjs.map +7 -0
- package/dist/lib/node/{chunk-VCIHQZSN.cjs → chunk-SCHC4AZQ.cjs} +12 -12
- package/dist/lib/node/{chunk-VCIHQZSN.cjs.map → chunk-SCHC4AZQ.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +79 -78
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-dispatcher-PRCC4KZT.cjs → intent-dispatcher-44UTYP4W.cjs} +8 -8
- package/dist/lib/node/{intent-dispatcher-PRCC4KZT.cjs.map → intent-dispatcher-44UTYP4W.cjs.map} +2 -2
- package/dist/lib/node/{intent-resolver-OZDKCHPW.cjs → intent-resolver-LY7JS2KE.cjs} +12 -12
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{store-BVUKNVKL.cjs → store-5CP2IT3I.cjs} +7 -7
- package/dist/lib/node/testing/index.cjs +10 -9
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/lib/node/worker.cjs +37 -37
- package/dist/lib/node/worker.cjs.map +1 -1
- package/dist/lib/node-esm/{app-graph-builder-XHI5IIXQ.mjs → app-graph-builder-FBWME2KI.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-CBT75GCX.mjs → chunk-BSYAFUZ7.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-CBT75GCX.mjs.map → chunk-BSYAFUZ7.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-TVIR2PHY.mjs → chunk-E3IDMSLK.mjs} +9 -8
- package/dist/lib/node-esm/chunk-E3IDMSLK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JDAHZRYQ.mjs → chunk-JNXPPC5S.mjs} +7 -6
- package/dist/lib/node-esm/chunk-JNXPPC5S.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +8 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-dispatcher-LGACN32C.mjs → intent-dispatcher-7REIRNNR.mjs} +2 -2
- package/dist/lib/node-esm/{intent-resolver-RBNG76ZX.mjs → intent-resolver-BSPY7AOP.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{store-PHTOEREN.mjs → store-JZDRMR3B.mjs} +2 -2
- package/dist/lib/node-esm/testing/index.mjs +4 -3
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/worker.mjs +1 -1
- 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 +1 -1
- package/dist/types/src/common/capabilities.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/layout.d.ts +21 -21
- package/dist/types/src/common/layout.d.ts.map +1 -1
- package/dist/types/src/common/translations.d.ts +1 -1
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +1 -1
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/playground/debug/Debug.d.ts +2 -1
- package/dist/types/src/playground/debug/Debug.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Main.d.ts +2 -1
- package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +2 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
- package/dist/types/src/playground/layout/Layout.d.ts +1 -1
- package/dist/types/src/playground/layout/Layout.d.ts.map +1 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +2 -1
- package/dist/types/src/playground/logger/Toolbar.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 -1
- package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
- package/dist/types/src/plugin-intent/actions.d.ts +3 -3
- package/dist/types/src/plugin-intent/actions.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/actions.d.ts +1 -1
- package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
- package/dist/types/src/react/ErrorBoundary.d.ts +1 -1
- package/dist/types/src/react/Surface.d.ts.map +1 -1
- package/dist/types/src/react/Surface.stories.d.ts +2 -1
- package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
- package/package.json +19 -20
- package/src/common/capabilities.ts +1 -1
- package/src/common/file.ts +1 -1
- package/src/common/layout.ts +1 -1
- package/src/common/translations.ts +1 -1
- package/src/core/manager.test.ts +30 -30
- package/src/core/plugin.ts +1 -1
- package/src/playground/debug/plugin.ts +1 -1
- package/src/playground/generator/generator.ts +2 -2
- package/src/playground/generator/plugin.ts +1 -1
- package/src/playground/layout/plugin.ts +1 -1
- package/src/playground/logger/plugin.ts +1 -1
- package/src/playground/logger/schema.ts +1 -1
- package/src/plugin-intent/IntentPlugin.tsx +1 -1
- package/src/plugin-intent/actions.ts +1 -1
- package/src/plugin-intent/intent-dispatcher.test.ts +1 -2
- package/src/plugin-intent/intent.ts +1 -1
- package/src/plugin-settings/SettingsPlugin.ts +1 -1
- package/src/plugin-settings/actions.ts +1 -1
- package/src/react/Surface.tsx +5 -3
- package/src/testing/withPluginManager.tsx +1 -1
- package/dist/lib/browser/chunk-BCMEJONP.mjs.map +0 -7
- package/dist/lib/browser/chunk-QS4J6O47.mjs.map +0 -7
- package/dist/lib/node/chunk-7Y6KJ3OK.cjs.map +0 -7
- package/dist/lib/node/chunk-B65NJEIJ.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-JDAHZRYQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TVIR2PHY.mjs.map +0 -7
- /package/dist/lib/browser/{app-graph-builder-S4MYSHQA.mjs.map → app-graph-builder-C2X7EJHZ.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-dispatcher-GFBH7T2J.mjs.map → intent-dispatcher-UKENQ4DV.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-KAFM7CQH.mjs.map → intent-resolver-SAJDCXS5.mjs.map} +0 -0
- /package/dist/lib/browser/{store-L3VRR7II.mjs.map → store-A6VBQ2TT.mjs.map} +0 -0
- /package/dist/lib/node/{app-graph-builder-VMHWFCTP.cjs.map → app-graph-builder-NJS4VPDQ.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-OZDKCHPW.cjs.map → intent-resolver-LY7JS2KE.cjs.map} +0 -0
- /package/dist/lib/node/{store-BVUKNVKL.cjs.map → store-5CP2IT3I.cjs.map} +0 -0
- /package/dist/lib/node-esm/{app-graph-builder-XHI5IIXQ.mjs.map → app-graph-builder-FBWME2KI.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-dispatcher-LGACN32C.mjs.map → intent-dispatcher-7REIRNNR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-RBNG76ZX.mjs.map → intent-resolver-BSPY7AOP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{store-PHTOEREN.mjs.map → store-JZDRMR3B.mjs.map} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare const Playground: {};
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
|
-
render: () =>
|
|
6
|
+
render: () => React.JSX.Element;
|
|
6
7
|
decorators: import("@storybook/react").Decorator[];
|
|
7
8
|
};
|
|
8
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/playground.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"playground.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/playground.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,eAAO,MAAM,UAAU,IAAK,CAAC;;;;;;AAE7B,wBAIE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema as S } from '
|
|
1
|
+
import { Schema as S } from 'effect';
|
|
2
2
|
export declare const INTENT_PLUGIN = "dxos.org/plugin/intent";
|
|
3
3
|
export declare const INTENT_ACTION = "dxos.org/plugin/intent/action";
|
|
4
4
|
export declare namespace IntentAction {
|
|
@@ -6,10 +6,10 @@ export declare namespace IntentAction {
|
|
|
6
6
|
readonly _tag: S.tag<"dxos.org/plugin/intent/action/show-undo">;
|
|
7
7
|
} & {
|
|
8
8
|
input: S.Struct<{
|
|
9
|
-
message: S.Union<[typeof S.String, S.mutable<S.
|
|
9
|
+
message: S.Union<[typeof S.String, S.mutable<S.Tuple2<typeof S.String, S.mutable<S.Struct<{
|
|
10
10
|
ns: typeof S.String;
|
|
11
11
|
count: S.optional<typeof S.Number>;
|
|
12
|
-
}
|
|
12
|
+
}>>>>]>;
|
|
13
13
|
}>;
|
|
14
14
|
output: typeof S.Void;
|
|
15
15
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/plugin-intent/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/plugin-intent/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,aAAa,2BAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,kCAA4B,CAAC;AAEvD,yBAAiB,YAAY,CAAC;;;;;;;;;;;;IAC5B;;OAEG;IACH,MAAM,OAAO,QAAS,SAAQ,aAK5B;KAAG;;CACN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema as S } from '
|
|
1
|
+
import { Schema as S } from 'effect';
|
|
2
2
|
export type IntentParams = {
|
|
3
3
|
readonly input: S.Schema.All;
|
|
4
4
|
readonly output: S.Schema.All;
|
|
@@ -60,9 +60,9 @@ export declare const createIntent: <Tag extends string, Fields extends IntentPar
|
|
|
60
60
|
* NOTE: Chaining of intents depends on the data inputs and outputs being structs.
|
|
61
61
|
*/
|
|
62
62
|
export declare const chain: <FirstTag extends string, NextTag extends string, FirstFields extends IntentParams, LastFields extends IntentParams, NextFields extends IntentParams>(schema: IntentSchema<NextTag, NextFields>, data?: Omit<IntentData<NextFields>, keyof IntentResultData<LastFields>>, params?: Pick<AnyIntent, "module" | "undo">) => (intent: IntentChain<FirstTag, any, FirstFields, LastFields>) => IntentChain<FirstTag, NextTag, FirstFields, NextFields>;
|
|
63
|
-
export declare const Label: S.Union<[typeof S.String, S.mutable<S.
|
|
63
|
+
export declare const Label: S.Union<[typeof S.String, S.mutable<S.Tuple2<typeof S.String, S.mutable<S.Struct<{
|
|
64
64
|
ns: typeof S.String;
|
|
65
65
|
count: S.optional<typeof S.Number>;
|
|
66
|
-
}
|
|
66
|
+
}>>>>]>;
|
|
67
67
|
export type Label = S.Schema.Type<typeof Label>;
|
|
68
68
|
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../../src/plugin-intent/intent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../../src/plugin-intent/intent.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema as S } from '
|
|
1
|
+
import { Schema as S } from 'effect';
|
|
2
2
|
export declare const SETTINGS_PLUGIN = "dxos.org/plugin/settings";
|
|
3
3
|
export declare const SETTINGS_ACTION = "dxos.org/plugin/settings/action";
|
|
4
4
|
export declare const SETTINGS_ID = "!dxos:settings";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/plugin-settings/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/plugin-settings/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,eAAe,oCAA8B,CAAC;AAC3D,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAC5C,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,yBAAiB,cAAc,CAAC;;;;;;;;;IAC9B,MAAM,OAAO,IAAK,SAAQ,SAKxB;KAAG;;;;;;;IAEL,MAAM,OAAO,kBAAmB,SAAQ,uBAMvC;KAAG;;CACL"}
|
|
@@ -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> | React.JSX.Element | null | undefined;
|
|
28
28
|
private resetError;
|
|
29
29
|
}
|
|
30
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAO7E,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAqB9C;;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"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { type PluginManager } from '../core';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
6
|
render: ({ manager }: {
|
|
6
7
|
manager: PluginManager;
|
|
7
|
-
}) =>
|
|
8
|
+
}) => React.JSX.Element;
|
|
8
9
|
decorators: import("@storybook/react").Decorator[];
|
|
9
10
|
args: {
|
|
10
11
|
manager: PluginManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Surface.stories.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Surface.stories.d.ts","sourceRoot":"","sources":["../../../../src/react/Surface.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;;;0BAkErB;QAAE,OAAO,EAAE,aAAa,CAAA;KAAE;;;;;;AAFlD,wBAcE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/app-framework",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-main.81238a8",
|
|
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",
|
|
@@ -37,31 +37,30 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@effect/schema": "^0.75.5",
|
|
41
40
|
"@preact/signals-core": "^1.6.0",
|
|
42
|
-
"effect": "
|
|
43
|
-
"@dxos/app-graph": "0.8.
|
|
44
|
-
"@dxos/artifact": "0.8.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/live-object": "0.8.
|
|
49
|
-
"@dxos/local-storage": "0.8.
|
|
50
|
-
"@dxos/invariant": "0.8.
|
|
51
|
-
"@dxos/log": "0.8.
|
|
52
|
-
"@dxos/react-hooks": "0.8.
|
|
53
|
-
"@dxos/util": "0.8.
|
|
41
|
+
"effect": "3.13.3",
|
|
42
|
+
"@dxos/app-graph": "0.8.1-main.81238a8",
|
|
43
|
+
"@dxos/artifact": "0.8.1-main.81238a8",
|
|
44
|
+
"@dxos/async": "0.8.1-main.81238a8",
|
|
45
|
+
"@dxos/client-protocol": "0.8.1-main.81238a8",
|
|
46
|
+
"@dxos/debug": "0.8.1-main.81238a8",
|
|
47
|
+
"@dxos/live-object": "0.8.1-main.81238a8",
|
|
48
|
+
"@dxos/local-storage": "0.8.1-main.81238a8",
|
|
49
|
+
"@dxos/invariant": "0.8.1-main.81238a8",
|
|
50
|
+
"@dxos/log": "0.8.1-main.81238a8",
|
|
51
|
+
"@dxos/react-hooks": "0.8.1-main.81238a8",
|
|
52
|
+
"@dxos/util": "0.8.1-main.81238a8"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
55
|
"@phosphor-icons/react": "^2.1.5",
|
|
57
56
|
"@types/react": "~18.2.0",
|
|
58
57
|
"react": "~18.2.0",
|
|
59
|
-
"@dxos/echo-schema": "0.8.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/react-ui
|
|
63
|
-
"@dxos/react-ui": "0.8.
|
|
64
|
-
"@dxos/storybook-utils": "0.8.
|
|
58
|
+
"@dxos/echo-schema": "0.8.1-main.81238a8",
|
|
59
|
+
"@dxos/echo-signals": "0.8.1-main.81238a8",
|
|
60
|
+
"@dxos/random": "0.8.1-main.81238a8",
|
|
61
|
+
"@dxos/react-ui": "0.8.1-main.81238a8",
|
|
62
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.1-main.81238a8",
|
|
63
|
+
"@dxos/storybook-utils": "0.8.1-main.81238a8"
|
|
65
64
|
},
|
|
66
65
|
"peerDependencies": {
|
|
67
66
|
"react": "~18.2.0"
|
package/src/common/file.ts
CHANGED
package/src/common/layout.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Schema as S } from '
|
|
5
|
+
import { Schema as S } from 'effect';
|
|
6
6
|
|
|
7
7
|
export const ResourceKey = S.Union(S.String, S.Record({ key: S.String, value: S.Any }));
|
|
8
8
|
export type ResourceKey = S.Schema.Type<typeof ResourceKey>;
|
package/src/core/manager.test.ts
CHANGED
|
@@ -28,7 +28,7 @@ const Total = defineCapability<{ total: number }>('dxos.org/test/total');
|
|
|
28
28
|
const CountEvent = defineEvent('dxos.org/test/count');
|
|
29
29
|
const FailEvent = defineEvent('dxos.org/test/fail');
|
|
30
30
|
|
|
31
|
-
const testMeta = { id: 'dxos.org/plugin/test' };
|
|
31
|
+
const testMeta = { id: 'dxos.org/plugin/test', name: 'Test' };
|
|
32
32
|
|
|
33
33
|
describe('PluginManager', () => {
|
|
34
34
|
let plugins: Plugin[] = [];
|
|
@@ -180,46 +180,46 @@ describe('PluginManager', () => {
|
|
|
180
180
|
});
|
|
181
181
|
|
|
182
182
|
it('should be able to fire custom activation events', async () => {
|
|
183
|
-
const
|
|
183
|
+
const Plugin1 = definePlugin({ id: 'dxos.org/test/plugin-1', name: 'Plugin 1' }, [
|
|
184
184
|
defineModule({
|
|
185
|
-
id: 'dxos.org/test/
|
|
185
|
+
id: 'dxos.org/test/plugin-1',
|
|
186
186
|
activatesOn: CountEvent,
|
|
187
187
|
activate: () => [contributes(Number, { number: 1 })],
|
|
188
188
|
}),
|
|
189
189
|
]);
|
|
190
|
-
const
|
|
190
|
+
const Plugin2 = definePlugin({ id: 'dxos.org/test/plugin-2', name: 'Plugin 2' }, [
|
|
191
191
|
defineModule({
|
|
192
|
-
id: 'dxos.org/test/
|
|
192
|
+
id: 'dxos.org/test/plugin-2',
|
|
193
193
|
activatesOn: CountEvent,
|
|
194
194
|
activate: () => [contributes(Number, { number: 2 })],
|
|
195
195
|
}),
|
|
196
196
|
]);
|
|
197
|
-
const
|
|
197
|
+
const Plugin3 = definePlugin({ id: 'dxos.org/test/plugin-3', name: 'Plugin 3' }, [
|
|
198
198
|
defineModule({
|
|
199
|
-
id: 'dxos.org/test/
|
|
199
|
+
id: 'dxos.org/test/plugin-3',
|
|
200
200
|
activatesOn: CountEvent,
|
|
201
201
|
activate: () => [contributes(Number, { number: 3 })],
|
|
202
202
|
}),
|
|
203
203
|
]);
|
|
204
|
-
plugins = [
|
|
204
|
+
plugins = [Plugin1, Plugin2, Plugin3];
|
|
205
205
|
|
|
206
206
|
const manager = new PluginManager({ pluginLoader });
|
|
207
207
|
expect(manager.active).toEqual([]);
|
|
208
208
|
expect(manager.context.requestCapabilities(Number)).toHaveLength(0);
|
|
209
209
|
|
|
210
|
-
await manager.add(
|
|
210
|
+
await manager.add(Plugin1.meta.id);
|
|
211
211
|
await manager.activate(CountEvent);
|
|
212
|
-
expect(manager.active).toEqual([
|
|
212
|
+
expect(manager.active).toEqual([Plugin1.meta.id]);
|
|
213
213
|
expect(manager.context.requestCapabilities(Number)).toHaveLength(1);
|
|
214
214
|
|
|
215
|
-
await manager.add(
|
|
215
|
+
await manager.add(Plugin2.meta.id);
|
|
216
216
|
await manager.activate(CountEvent);
|
|
217
|
-
expect(manager.active).toEqual([
|
|
217
|
+
expect(manager.active).toEqual([Plugin1.meta.id, Plugin2.meta.id]);
|
|
218
218
|
expect(manager.context.requestCapabilities(Number)).toHaveLength(2);
|
|
219
219
|
|
|
220
|
-
await manager.add(
|
|
220
|
+
await manager.add(Plugin3.meta.id);
|
|
221
221
|
await manager.activate(CountEvent);
|
|
222
|
-
expect(manager.active).toEqual([
|
|
222
|
+
expect(manager.active).toEqual([Plugin1.meta.id, Plugin2.meta.id, Plugin3.meta.id]);
|
|
223
223
|
expect(manager.context.requestCapabilities(Number)).toHaveLength(3);
|
|
224
224
|
});
|
|
225
225
|
|
|
@@ -283,7 +283,7 @@ describe('PluginManager', () => {
|
|
|
283
283
|
state.total = numbers.reduce((acc, n) => acc + n.number, 0);
|
|
284
284
|
};
|
|
285
285
|
|
|
286
|
-
const Count = definePlugin({ id: 'dxos.org/test/count' }, [
|
|
286
|
+
const Count = definePlugin({ id: 'dxos.org/test/count', name: 'Count' }, [
|
|
287
287
|
defineModule({
|
|
288
288
|
id: 'dxos.org/test/count',
|
|
289
289
|
activatesOn: Events.Startup,
|
|
@@ -297,17 +297,17 @@ describe('PluginManager', () => {
|
|
|
297
297
|
|
|
298
298
|
const Test = definePlugin(testMeta, [
|
|
299
299
|
defineModule({
|
|
300
|
-
id: 'dxos.org/test/
|
|
300
|
+
id: 'dxos.org/test/plugin-1',
|
|
301
301
|
activatesOn: CountEvent,
|
|
302
302
|
activate: () => contributes(Number, { number: 1 }),
|
|
303
303
|
}),
|
|
304
304
|
defineModule({
|
|
305
|
-
id: 'dxos.org/test/
|
|
305
|
+
id: 'dxos.org/test/plugin-2',
|
|
306
306
|
activatesOn: CountEvent,
|
|
307
307
|
activate: () => contributes(Number, { number: 2 }),
|
|
308
308
|
}),
|
|
309
309
|
defineModule({
|
|
310
|
-
id: 'dxos.org/test/
|
|
310
|
+
id: 'dxos.org/test/plugin-3',
|
|
311
311
|
activatesOn: CountEvent,
|
|
312
312
|
activate: () => contributes(Number, { number: 3 }),
|
|
313
313
|
}),
|
|
@@ -390,28 +390,28 @@ describe('PluginManager', () => {
|
|
|
390
390
|
});
|
|
391
391
|
|
|
392
392
|
it('should be reactive', async () => {
|
|
393
|
-
const
|
|
393
|
+
const Plugin1 = definePlugin({ id: 'dxos.org/test/plugin-1', name: 'Plugin 1' }, [
|
|
394
394
|
defineModule({
|
|
395
|
-
id: 'dxos.org/test/
|
|
395
|
+
id: 'dxos.org/test/plugin-1',
|
|
396
396
|
activatesOn: CountEvent,
|
|
397
397
|
activate: () => [contributes(Number, { number: 1 })],
|
|
398
398
|
}),
|
|
399
399
|
]);
|
|
400
|
-
const
|
|
400
|
+
const Plugin2 = definePlugin({ id: 'dxos.org/test/plugin-2', name: 'Plugin 2' }, [
|
|
401
401
|
defineModule({
|
|
402
|
-
id: 'dxos.org/test/
|
|
402
|
+
id: 'dxos.org/test/plugin-2',
|
|
403
403
|
activatesOn: CountEvent,
|
|
404
404
|
activate: () => [contributes(Number, { number: 2 })],
|
|
405
405
|
}),
|
|
406
406
|
]);
|
|
407
|
-
const
|
|
407
|
+
const Plugin3 = definePlugin({ id: 'dxos.org/test/plugin-3', name: 'Plugin 3' }, [
|
|
408
408
|
defineModule({
|
|
409
|
-
id: 'dxos.org/test/
|
|
409
|
+
id: 'dxos.org/test/plugin-3',
|
|
410
410
|
activatesOn: CountEvent,
|
|
411
411
|
activate: () => [contributes(Number, { number: 3 })],
|
|
412
412
|
}),
|
|
413
413
|
]);
|
|
414
|
-
plugins = [
|
|
414
|
+
plugins = [Plugin1, Plugin2, Plugin3];
|
|
415
415
|
|
|
416
416
|
const manager = new PluginManager({ pluginLoader });
|
|
417
417
|
using pluginUpdates = updateCounter(() => {
|
|
@@ -439,7 +439,7 @@ describe('PluginManager', () => {
|
|
|
439
439
|
expect(eventsFiredUpdates.count).toEqual(0);
|
|
440
440
|
expect(pendingResetUpdates.count).toEqual(0);
|
|
441
441
|
|
|
442
|
-
await manager.add(
|
|
442
|
+
await manager.add(Plugin1.meta.id);
|
|
443
443
|
expect(pluginUpdates.count).toEqual(1);
|
|
444
444
|
expect(enabledUpdates.count).toEqual(1);
|
|
445
445
|
expect(modulesUpdates.count).toEqual(1);
|
|
@@ -455,7 +455,7 @@ describe('PluginManager', () => {
|
|
|
455
455
|
expect(eventsFiredUpdates.count).toEqual(1);
|
|
456
456
|
expect(pendingResetUpdates.count).toEqual(0);
|
|
457
457
|
|
|
458
|
-
await manager.add(
|
|
458
|
+
await manager.add(Plugin2.meta.id);
|
|
459
459
|
expect(pluginUpdates.count).toEqual(2);
|
|
460
460
|
expect(enabledUpdates.count).toEqual(2);
|
|
461
461
|
expect(modulesUpdates.count).toEqual(2);
|
|
@@ -471,7 +471,7 @@ describe('PluginManager', () => {
|
|
|
471
471
|
expect(eventsFiredUpdates.count).toEqual(1);
|
|
472
472
|
expect(pendingResetUpdates.count).toEqual(2);
|
|
473
473
|
|
|
474
|
-
await manager.add(
|
|
474
|
+
await manager.add(Plugin3.meta.id);
|
|
475
475
|
expect(pluginUpdates.count).toEqual(3);
|
|
476
476
|
expect(enabledUpdates.count).toEqual(3);
|
|
477
477
|
expect(modulesUpdates.count).toEqual(3);
|
|
@@ -488,7 +488,7 @@ describe('PluginManager', () => {
|
|
|
488
488
|
expect(eventsFiredUpdates.count).toEqual(1);
|
|
489
489
|
expect(pendingResetUpdates.count).toEqual(4);
|
|
490
490
|
|
|
491
|
-
await manager.disable(
|
|
491
|
+
await manager.disable(Plugin1.meta.id);
|
|
492
492
|
expect(pluginUpdates.count).toEqual(3);
|
|
493
493
|
expect(enabledUpdates.count).toEqual(4);
|
|
494
494
|
expect(modulesUpdates.count).toEqual(4);
|
|
@@ -496,7 +496,7 @@ describe('PluginManager', () => {
|
|
|
496
496
|
expect(eventsFiredUpdates.count).toEqual(1);
|
|
497
497
|
expect(pendingResetUpdates.count).toEqual(4);
|
|
498
498
|
|
|
499
|
-
await manager.remove(
|
|
499
|
+
await manager.remove(Plugin1.meta.id);
|
|
500
500
|
expect(pluginUpdates.count).toEqual(4);
|
|
501
501
|
expect(enabledUpdates.count).toEqual(4);
|
|
502
502
|
expect(modulesUpdates.count).toEqual(4);
|
package/src/core/plugin.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { defineModule, definePlugin, lazy } from '../../core';
|
|
|
8
8
|
const Debug = lazy(() => import('./Debug'));
|
|
9
9
|
|
|
10
10
|
export const DebugPlugin = () =>
|
|
11
|
-
definePlugin({ id: 'dxos.org/test/debug' }, [
|
|
11
|
+
definePlugin({ id: 'dxos.org/test/plugin-debug', name: 'Debug' }, [
|
|
12
12
|
defineModule({
|
|
13
13
|
id: 'dxos.org/test/debug/main',
|
|
14
14
|
activatesOn: Events.Startup,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Schema as S } from '
|
|
5
|
+
import { Schema as S } from 'effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Events } from '../../common';
|
|
8
8
|
import { contributes, defineEvent, defineCapability, defineModule, definePlugin } from '../../core';
|
|
@@ -26,7 +26,7 @@ export const createGeneratorIntent = (id: string) => {
|
|
|
26
26
|
export const createNumberPlugin = (id: string) => {
|
|
27
27
|
const number = Math.floor(Math.random() * 100);
|
|
28
28
|
|
|
29
|
-
return definePlugin({ id }, [
|
|
29
|
+
return definePlugin({ id, name: `Plugin ${id}` }, [
|
|
30
30
|
defineModule({
|
|
31
31
|
id: `${id}/main`,
|
|
32
32
|
activatesOn: CountEvent,
|
|
@@ -9,7 +9,7 @@ const Main = lazy(() => import('./Main'));
|
|
|
9
9
|
const Toolbar = lazy(() => import('./Toolbar'));
|
|
10
10
|
|
|
11
11
|
export const GeneratorPlugin = () =>
|
|
12
|
-
definePlugin({ id: 'dxos.org/test/generator' }, [
|
|
12
|
+
definePlugin({ id: 'dxos.org/test/generator', name: 'Generator' }, [
|
|
13
13
|
defineModule({
|
|
14
14
|
id: 'dxos.org/test/generator/main',
|
|
15
15
|
activatesOn: Events.Startup,
|
|
@@ -8,7 +8,7 @@ import { definePlugin, lazy, defineModule } from '../../core';
|
|
|
8
8
|
const Layout = lazy(() => import('./Layout'));
|
|
9
9
|
|
|
10
10
|
export const LayoutPlugin = () =>
|
|
11
|
-
definePlugin({ id: 'dxos.org/test/layout' }, [
|
|
11
|
+
definePlugin({ id: 'dxos.org/test/layout', name: 'Layout' }, [
|
|
12
12
|
defineModule({
|
|
13
13
|
id: 'dxos.org/test/layout/root',
|
|
14
14
|
activatesOn: Events.Startup,
|
|
@@ -12,7 +12,7 @@ import { createResolver } from '../../plugin-intent';
|
|
|
12
12
|
const Toolbar = lazy(() => import('./Toolbar'));
|
|
13
13
|
|
|
14
14
|
export const LoggerPlugin = () =>
|
|
15
|
-
definePlugin({ id: 'dxos.org/test/logger' }, [
|
|
15
|
+
definePlugin({ id: 'dxos.org/test/logger', name: 'Logger' }, [
|
|
16
16
|
defineModule({
|
|
17
17
|
id: 'dxos.org/test/logger/intents',
|
|
18
18
|
activatesOn: Events.SetupIntentResolver,
|
|
@@ -7,7 +7,7 @@ import { Events } from '../common';
|
|
|
7
7
|
import { defineModule, definePlugin, lazy } from '../core';
|
|
8
8
|
|
|
9
9
|
export const IntentPlugin = () =>
|
|
10
|
-
definePlugin({ id: INTENT_PLUGIN }, [
|
|
10
|
+
definePlugin({ id: INTENT_PLUGIN, name: 'Intent' }, [
|
|
11
11
|
defineModule({
|
|
12
12
|
id: `${INTENT_PLUGIN}/module/dispatcher`,
|
|
13
13
|
// TODO(wittjosiah): This will mean that startup needs to be reset when intents are added or removed.
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Schema as S } from '
|
|
6
|
-
import { Effect, Fiber, pipe } from 'effect';
|
|
5
|
+
import { Schema as S, Effect, Fiber, pipe } from 'effect';
|
|
7
6
|
import { describe, expect, test } from 'vitest';
|
|
8
7
|
|
|
9
8
|
import { chain, createIntent } from './intent';
|
|
@@ -9,7 +9,7 @@ import { contributes, defineModule, definePlugin, lazy } from '../core';
|
|
|
9
9
|
|
|
10
10
|
// TODO(wittjosiah): Add options to exclude some modules.
|
|
11
11
|
export const SettingsPlugin = () =>
|
|
12
|
-
definePlugin({ id: SETTINGS_PLUGIN }, [
|
|
12
|
+
definePlugin({ id: SETTINGS_PLUGIN, name: 'Settings' }, [
|
|
13
13
|
defineModule({
|
|
14
14
|
id: `${SETTINGS_PLUGIN}/module/store`,
|
|
15
15
|
activatesOn: Events.Startup,
|
package/src/react/Surface.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { memo, forwardRef, Suspense, useMemo } from 'react';
|
|
5
|
+
import React, { memo, forwardRef, Suspense, useMemo, Fragment } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useDefaultValue } from '@dxos/react-hooks';
|
|
8
8
|
import { byPosition } from '@dxos/util';
|
|
@@ -12,6 +12,8 @@ import { useCapabilities } from './useCapabilities';
|
|
|
12
12
|
import { Capabilities, type SurfaceDefinition, type SurfaceProps } from '../common';
|
|
13
13
|
import { type PluginsContext } from '../core';
|
|
14
14
|
|
|
15
|
+
const DEFAULT_PLACEHOLDER = <Fragment />;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
* @internal
|
|
17
19
|
*/
|
|
@@ -43,7 +45,7 @@ export const isSurfaceAvailable = (context: PluginsContext, { role, data }: Pick
|
|
|
43
45
|
*/
|
|
44
46
|
export const Surface = memo(
|
|
45
47
|
forwardRef<HTMLElement, SurfaceProps>(
|
|
46
|
-
({ id: _id, role, data: _data, limit, fallback, placeholder, ...rest }, forwardedRef) => {
|
|
48
|
+
({ id: _id, role, data: _data, limit, fallback, placeholder = DEFAULT_PLACEHOLDER, ...rest }, forwardedRef) => {
|
|
47
49
|
// TODO(wittjosiah): This will make all surfaces depend on a single signal.
|
|
48
50
|
// This isn't ideal because it means that any change to the data will cause all surfaces to re-render.
|
|
49
51
|
// This effectively means that plugin modules which contribute surfaces need to all be activated at startup.
|
|
@@ -59,7 +61,7 @@ export const Surface = memo(
|
|
|
59
61
|
<Component ref={forwardedRef} key={id} id={id} role={role} data={data} limit={limit} {...rest} />
|
|
60
62
|
));
|
|
61
63
|
|
|
62
|
-
const suspense =
|
|
64
|
+
const suspense = <Suspense fallback={placeholder}>{nodes}</Suspense>;
|
|
63
65
|
|
|
64
66
|
return fallback ? (
|
|
65
67
|
<ErrorBoundary data={data} fallback={fallback}>
|
|
@@ -86,6 +86,6 @@ export const withPluginManager = (options: WithPluginManagerOptions = {}): Decor
|
|
|
86
86
|
// This is necessary because `createApp` expects the startup event to complete before the app is ready.
|
|
87
87
|
const STORY_PLUGIN = 'dxos.org/app-framework/story';
|
|
88
88
|
const StoryPlugin = () =>
|
|
89
|
-
definePlugin({ id: STORY_PLUGIN }, [
|
|
89
|
+
definePlugin({ id: STORY_PLUGIN, name: 'Story' }, [
|
|
90
90
|
defineModule({ id: STORY_PLUGIN, activatesOn: Events.Startup, activate: () => [] }),
|
|
91
91
|
]);
|