@dxos/plugin-explorer 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/{ExplorerContainer-A7UBZ3QP.mjs → ExplorerContainer-THLT3CQZ.mjs} +2 -2
- package/dist/lib/browser/{chunk-Q4MVJ6YE.mjs → chunk-PMHCTMKT.mjs} +3 -3
- package/dist/lib/browser/{chunk-Q4MVJ6YE.mjs.map → chunk-PMHCTMKT.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-D67EYME2.mjs → chunk-QOKAZK4V.mjs} +5 -2
- package/dist/lib/browser/chunk-QOKAZK4V.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5GTLMW4Q.mjs → chunk-TDUEJNAN.mjs} +21 -22
- package/dist/lib/browser/chunk-TDUEJNAN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DTAFIUA7.mjs → chunk-YN4YVXVL.mjs} +2 -2
- package/dist/lib/browser/index.mjs +24 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-DADUM6T5.mjs → intent-resolver-UJNDAIDZ.mjs} +14 -11
- package/dist/lib/browser/{intent-resolver-DADUM6T5.mjs.map → intent-resolver-UJNDAIDZ.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/{react-surface-FW4Q2UQM.mjs → react-surface-UMUN6CTH.mjs} +5 -5
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node/{ExplorerContainer-ZV2YKOUE.cjs → ExplorerContainer-EJPGD4WR.cjs} +6 -6
- package/dist/lib/node/{chunk-34MGVWOY.cjs → chunk-5MTMJYC4.cjs} +8 -5
- package/dist/lib/node/{chunk-34MGVWOY.cjs.map → chunk-5MTMJYC4.cjs.map} +3 -3
- package/dist/lib/node/{chunk-4H2Y5RER.cjs → chunk-H5CHI722.cjs} +5 -5
- package/dist/lib/node/{chunk-WHMJ2VQ2.cjs → chunk-QASZ24JS.cjs} +23 -24
- package/dist/lib/node/chunk-QASZ24JS.cjs.map +7 -0
- package/dist/lib/node/{chunk-SFG2GX7G.cjs → chunk-YUY7P7R2.cjs} +7 -7
- package/dist/lib/node/{chunk-SFG2GX7G.cjs.map → chunk-YUY7P7R2.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +42 -30
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-2V3P4L25.cjs → intent-resolver-XQV24IAA.cjs} +17 -14
- package/dist/lib/node/{intent-resolver-2V3P4L25.cjs.map → intent-resolver-XQV24IAA.cjs.map} +3 -3
- package/dist/lib/node/meta.cjs +3 -3
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-7J4K5DDX.cjs → react-surface-UVMGNAA6.cjs} +11 -11
- package/dist/lib/node/types/index.cjs +4 -4
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{ExplorerContainer-JXY6XN2D.mjs → ExplorerContainer-MEZP34AY.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-WTGQFG6L.mjs → chunk-45DTVHHL.mjs} +21 -22
- package/dist/lib/node-esm/chunk-45DTVHHL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7NVKKFPI.mjs → chunk-57K7ORAW.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-7NVKKFPI.mjs.map → chunk-57K7ORAW.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-HIMBUOZ3.mjs → chunk-JYW3CDBT.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-ZEM6ZU5V.mjs → chunk-UHJZUVRI.mjs} +5 -2
- package/dist/lib/node-esm/chunk-UHJZUVRI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -12
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-3BG74H5K.mjs → intent-resolver-RZQ3EEOE.mjs} +14 -11
- package/dist/lib/node-esm/{intent-resolver-3BG74H5K.mjs.map → intent-resolver-RZQ3EEOE.mjs.map} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +1 -1
- package/dist/lib/node-esm/{react-surface-7ZTSGXJO.mjs → react-surface-5BTZOU3H.mjs} +5 -5
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts +1 -2
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +1 -2
- package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
- package/dist/types/src/components/ExplorerContainer.d.ts +1 -2
- package/dist/types/src/components/ExplorerContainer.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts +1 -2
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +2 -3
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/Graph.d.ts +1 -0
- package/dist/types/src/components/Graph/Graph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/graph-model.d.ts +6 -6
- package/dist/types/src/components/Graph/graph-model.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.d.ts +1 -2
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +13 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +2 -2
- package/package.json +25 -24
- package/src/ExplorerPlugin.tsx +19 -14
- package/src/capabilities/intent-resolver.ts +6 -3
- package/src/components/Graph/Graph.tsx +19 -20
- package/src/components/Graph/graph-model.ts +13 -9
- package/src/meta.ts +2 -1
- package/src/translations.ts +4 -0
- package/src/types/schema.ts +1 -1
- package/dist/lib/browser/chunk-5GTLMW4Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-D67EYME2.mjs.map +0 -7
- package/dist/lib/node/chunk-WHMJ2VQ2.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-WTGQFG6L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZEM6ZU5V.mjs.map +0 -7
- /package/dist/lib/browser/{ExplorerContainer-A7UBZ3QP.mjs.map → ExplorerContainer-THLT3CQZ.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-DTAFIUA7.mjs.map → chunk-YN4YVXVL.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-FW4Q2UQM.mjs.map → react-surface-UMUN6CTH.mjs.map} +0 -0
- /package/dist/lib/node/{ExplorerContainer-ZV2YKOUE.cjs.map → ExplorerContainer-EJPGD4WR.cjs.map} +0 -0
- /package/dist/lib/node/{chunk-4H2Y5RER.cjs.map → chunk-H5CHI722.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-7J4K5DDX.cjs.map → react-surface-UVMGNAA6.cjs.map} +0 -0
- /package/dist/lib/node-esm/{ExplorerContainer-JXY6XN2D.mjs.map → ExplorerContainer-MEZP34AY.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HIMBUOZ3.mjs.map → chunk-JYW3CDBT.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-7ZTSGXJO.mjs.map → react-surface-5BTZOU3H.mjs.map} +0 -0
|
@@ -2,8 +2,8 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
ExplorerAction,
|
|
4
4
|
ViewType
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-57K7ORAW.mjs";
|
|
6
|
+
import "../chunk-UHJZUVRI.mjs";
|
|
7
7
|
export {
|
|
8
8
|
ExplorerAction,
|
|
9
9
|
ViewType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerPlugin.d.ts","sourceRoot":"","sources":["../../../src/ExplorerPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExplorerPlugin.d.ts","sourceRoot":"","sources":["../../../src/ExplorerPlugin.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,4CA8CvB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const IntentResolver: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
|
|
2
|
-
export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
|
|
1
|
+
export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
2
|
+
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kMAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,gMAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,MAAM,qBAAqB,CAAC;;AAKhF,
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,MAAM,qBAAqB,CAAC;;AAKhF,wBASI"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type DotOptions } from '@observablehq/plot';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { type Accessor, type Point } from '../plot';
|
|
4
3
|
export type CharProps = {
|
|
5
4
|
items?: any[];
|
|
6
5
|
accessor?: Accessor<Point>;
|
|
7
6
|
options?: DotOptions;
|
|
8
7
|
};
|
|
9
|
-
export declare const Chart: ({ items, accessor, options }: CharProps) =>
|
|
8
|
+
export declare const Chart: ({ items, accessor, options }: CharProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAAE,KAAK,QAAQ,EAAiB,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AASnE,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,iCAAwD,SAAS,4CA6BlF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
2
|
import { type Meta } from '@storybook/react';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import { Chart } from './Chart';
|
|
5
|
-
export declare const Default: () =>
|
|
4
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
declare const meta: Meta<typeof Chart>;
|
|
7
6
|
export default meta;
|
|
8
7
|
//# sourceMappingURL=Chart.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chart.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAM7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAoBhC,eAAO,MAAM,OAAO,+CAA6C,CAAC;AAElE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAI5B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ViewType } from '../types';
|
|
3
2
|
declare const ExplorerContainer: ({ view, role }: {
|
|
4
3
|
view: ViewType;
|
|
5
4
|
role: string;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export default ExplorerContainer;
|
|
8
7
|
//# sourceMappingURL=ExplorerContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ExplorerContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExplorerContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ExplorerContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,iBAAiB,mBAAoB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,mDAa1E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DotOptions } from '@observablehq/plot';
|
|
2
2
|
import * as Plot from '@observablehq/plot';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import { type Accessor, type GeoLocation } from '../plot';
|
|
5
4
|
export type GlobeProps = {
|
|
6
5
|
items?: any[];
|
|
@@ -8,5 +7,5 @@ export type GlobeProps = {
|
|
|
8
7
|
projection?: Plot.ProjectionName;
|
|
9
8
|
options?: DotOptions;
|
|
10
9
|
};
|
|
11
|
-
export declare const Globe: ({ items, accessor, projection, options }: GlobeProps) =>
|
|
10
|
+
export declare const Globe: ({ items, accessor, projection, options }: GlobeProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
//# sourceMappingURL=Globe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAC;AAM3C,OAAO,EAAE,KAAK,QAAQ,EAAiB,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAOzE,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC;IACjC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,6CAAqF,UAAU,4CAsChH,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
2
|
import { type Meta } from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const Extended: () => React.JSX.Element;
|
|
3
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Extended: () => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
declare const meta: Meta;
|
|
7
6
|
export default meta;
|
|
8
7
|
//# sourceMappingURL=Globe.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA2E7C,eAAO,MAAM,OAAO,+CAAgE,CAAC;AAErF,eAAO,MAAM,QAAQ,+CAAiE,CAAC;AAEvF,QAAA,MAAM,IAAI,EAAE,IAGX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/Graph.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAE7E,OAAO,
|
|
1
|
+
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/Graph.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAwC,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAarF,OAAO,wBAAwB,CAAC;AAyBhC,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAkGhC,CAAC"}
|
|
@@ -4,17 +4,17 @@ import { type ReactiveEchoObject, type Space } from '@dxos/react-client/echo';
|
|
|
4
4
|
export type SpaceGraphModelOptions = {
|
|
5
5
|
schema?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export type EchoGraphNode = SchemaGraphNode | EchoObjectGraphNode;
|
|
8
|
-
type EchoObjectGraphNode = {
|
|
9
|
-
id: string;
|
|
10
|
-
type: 'echo-object';
|
|
11
|
-
object: ReactiveEchoObject<any>;
|
|
12
|
-
};
|
|
13
7
|
type SchemaGraphNode = {
|
|
14
8
|
id: string;
|
|
15
9
|
type: 'schema';
|
|
16
10
|
schema: S.Schema<any>;
|
|
17
11
|
};
|
|
12
|
+
type ObjectGraphNode = {
|
|
13
|
+
id: string;
|
|
14
|
+
type: 'object';
|
|
15
|
+
object: ReactiveEchoObject<any>;
|
|
16
|
+
};
|
|
17
|
+
export type EchoGraphNode = SchemaGraphNode | ObjectGraphNode;
|
|
18
18
|
/**
|
|
19
19
|
* Converts ECHO objects to a graph.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-model.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/graph-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0C,KAAK,CAAC,EAAiC,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,KAAK,SAAS,EAAkB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,KAAK,EAAyC,MAAM,yBAAyB,CAAC;AAErH,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"graph-model.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/graph-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0C,KAAK,CAAC,EAAiC,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,KAAK,SAAS,EAAkB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,KAAK,EAAyC,MAAM,yBAAyB,CAAC;AAErH,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;CACvB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;AAE9D;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAU,CAAC,aAAa,CAAC;IAShD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IARrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGrB;IAEF,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,CAA4B;gBAEhB,QAAQ,GAAE,sBAA2B;IAIlE,IAAa,KAAK,IAAI,SAAS,CAAC,aAAa,CAAC,CAE7C;IAED,IAAI,OAAO,IAAI,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAEvC;IAED,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM;IAgFpC,KAAK;CAQN"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type Space } from '@dxos/client/echo';
|
|
3
2
|
export type LayoutVariant = 'tidy' | 'radial' | 'edge';
|
|
4
3
|
export type TreeLayoutSlots = {
|
|
@@ -23,5 +22,5 @@ export type TreeComponentProps<N = unknown> = {
|
|
|
23
22
|
variant?: LayoutVariant;
|
|
24
23
|
onNodeClick?: (node?: N) => void;
|
|
25
24
|
};
|
|
26
|
-
export declare const Tree: <N>({ space, selected, variant, onNodeClick }: TreeComponentProps<N>) =>
|
|
25
|
+
export declare const Tree: <N>({ space, selected, variant, onNodeClick }: TreeComponentProps<N>) => import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
//# sourceMappingURL=Tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAY/C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGvD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC;IAE1B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAIpC,CAAC;AAQF,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,IAAI,GAAI,CAAC,6CAAuD,kBAAkB,CAAC,CAAC,CAAC,4CA6CjG,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const ExplorerContainer: import("react").LazyExoticComponent<({ view, role }: {
|
|
2
2
|
view: import("../types").ViewType;
|
|
3
3
|
role: string;
|
|
4
|
-
}) => import("react").JSX.Element | null>;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element | null>;
|
|
5
5
|
export * from './Chart';
|
|
6
6
|
export * from './Globe';
|
|
7
7
|
export * from './Graph';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;qDAA4C,CAAC;AAE3E,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,eAAO,MAAM,IAAI;;;;;;;;CAQK,CAAC"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'en-US': {
|
|
3
|
+
[x: string]: {
|
|
4
|
+
'typename label': string;
|
|
5
|
+
'plugin name'?: undefined;
|
|
6
|
+
'object title label'?: undefined;
|
|
7
|
+
'object title placeholder'?: undefined;
|
|
8
|
+
'create object label'?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
'plugin name': string;
|
|
11
|
+
'object title label': string;
|
|
12
|
+
'object title placeholder': string;
|
|
13
|
+
'create object label': string;
|
|
14
|
+
'typename label'?: undefined;
|
|
15
|
+
};
|
|
3
16
|
"dxos.org/plugin/explorer": {
|
|
4
17
|
'plugin name': string;
|
|
5
18
|
'object title label': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAcE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
declare const ViewType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
2
|
+
declare const ViewType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
3
3
|
name: S.optional<typeof S.String>;
|
|
4
4
|
type: typeof S.String;
|
|
5
|
-
}, import("
|
|
5
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
6
6
|
name: S.optional<typeof S.String>;
|
|
7
7
|
type: typeof S.String;
|
|
8
8
|
}>>;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-explorer",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.b19bfc8",
|
|
4
4
|
"description": "Braneframe data visualization plugin",
|
|
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",
|
|
@@ -40,21 +41,21 @@
|
|
|
40
41
|
"lodash.get": "^4.4.2",
|
|
41
42
|
"react-resize-detector": "^11.0.1",
|
|
42
43
|
"topojson-client": "^3.1.0",
|
|
43
|
-
"@dxos/app-framework": "0.7.5-main.
|
|
44
|
-
"@dxos/async": "0.7.5-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/gem-core": "0.7.5-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/gem-spore": "0.7.5-main.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/plugin-
|
|
52
|
-
"@dxos/plugin-
|
|
53
|
-
"@dxos/plugin-space": "0.7.5-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/react-
|
|
57
|
-
"@dxos/
|
|
44
|
+
"@dxos/app-framework": "0.7.5-main.b19bfc8",
|
|
45
|
+
"@dxos/async": "0.7.5-main.b19bfc8",
|
|
46
|
+
"@dxos/echo-schema": "0.7.5-main.b19bfc8",
|
|
47
|
+
"@dxos/gem-core": "0.7.5-main.b19bfc8",
|
|
48
|
+
"@dxos/client": "0.7.5-main.b19bfc8",
|
|
49
|
+
"@dxos/gem-spore": "0.7.5-main.b19bfc8",
|
|
50
|
+
"@dxos/live-object": "0.7.5-main.b19bfc8",
|
|
51
|
+
"@dxos/log": "0.7.5-main.b19bfc8",
|
|
52
|
+
"@dxos/plugin-client": "0.7.5-main.b19bfc8",
|
|
53
|
+
"@dxos/plugin-search": "0.7.5-main.b19bfc8",
|
|
54
|
+
"@dxos/plugin-space": "0.7.5-main.b19bfc8",
|
|
55
|
+
"@dxos/react-client": "0.7.5-main.b19bfc8",
|
|
56
|
+
"@dxos/plugin-graph": "0.7.5-main.b19bfc8",
|
|
57
|
+
"@dxos/react-ui-stack": "0.7.5-main.b19bfc8",
|
|
58
|
+
"@dxos/util": "0.7.5-main.b19bfc8"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -69,19 +70,19 @@
|
|
|
69
70
|
"react": "~18.2.0",
|
|
70
71
|
"react-dom": "~18.2.0",
|
|
71
72
|
"vite": "5.4.7",
|
|
72
|
-
"@dxos/echo-generator": "0.7.5-main.
|
|
73
|
-
"@dxos/plugin-outliner": "0.7.5-main.
|
|
74
|
-
"@dxos/random": "0.7.5-main.
|
|
75
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
73
|
+
"@dxos/echo-generator": "0.7.5-main.b19bfc8",
|
|
74
|
+
"@dxos/plugin-outliner": "0.7.5-main.b19bfc8",
|
|
75
|
+
"@dxos/random": "0.7.5-main.b19bfc8",
|
|
76
|
+
"@dxos/react-ui": "0.7.5-main.b19bfc8",
|
|
77
|
+
"@dxos/react-ui-theme": "0.7.5-main.b19bfc8",
|
|
78
|
+
"@dxos/storybook-utils": "0.7.5-main.b19bfc8"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"@phosphor-icons/react": "^2.1.5",
|
|
81
82
|
"react": "~18.2.0",
|
|
82
83
|
"react-dom": "~18.2.0",
|
|
83
|
-
"@dxos/react-ui": "0.7.5-main.
|
|
84
|
-
"@dxos/react-ui-theme": "0.7.5-main.
|
|
84
|
+
"@dxos/react-ui": "0.7.5-main.b19bfc8",
|
|
85
|
+
"@dxos/react-ui-theme": "0.7.5-main.b19bfc8"
|
|
85
86
|
},
|
|
86
87
|
"publishConfig": {
|
|
87
88
|
"access": "public"
|
package/src/ExplorerPlugin.tsx
CHANGED
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
contributes,
|
|
8
|
-
createIntent,
|
|
9
|
-
defineModule,
|
|
10
|
-
definePlugin,
|
|
11
|
-
Events,
|
|
12
|
-
oneOf,
|
|
13
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
14
6
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
7
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
8
|
+
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
15
9
|
|
|
16
10
|
import { IntentResolver, ReactSurface } from './capabilities';
|
|
17
11
|
import { EXPLORER_PLUGIN, meta } from './meta';
|
|
@@ -27,30 +21,41 @@ export const ExplorerPlugin = () =>
|
|
|
27
21
|
}),
|
|
28
22
|
defineModule({
|
|
29
23
|
id: `${meta.id}/module/metadata`,
|
|
30
|
-
activatesOn:
|
|
24
|
+
activatesOn: Events.SetupMetadata,
|
|
31
25
|
activate: () =>
|
|
32
26
|
contributes(Capabilities.Metadata, {
|
|
33
27
|
id: ViewType.typename,
|
|
34
28
|
metadata: {
|
|
35
|
-
createObject: (props: { name?: string }) => createIntent(ExplorerAction.Create, props),
|
|
36
29
|
placeholder: ['object title placeholder', { ns: EXPLORER_PLUGIN }],
|
|
37
30
|
icon: 'ph--graph--regular',
|
|
38
31
|
},
|
|
39
32
|
}),
|
|
40
33
|
}),
|
|
34
|
+
defineModule({
|
|
35
|
+
id: `${meta.id}/module/object-form`,
|
|
36
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
37
|
+
activate: () =>
|
|
38
|
+
contributes(
|
|
39
|
+
SpaceCapabilities.ObjectForm,
|
|
40
|
+
defineObjectForm({
|
|
41
|
+
objectSchema: ViewType,
|
|
42
|
+
getIntent: () => createIntent(ExplorerAction.Create),
|
|
43
|
+
}),
|
|
44
|
+
),
|
|
45
|
+
}),
|
|
41
46
|
defineModule({
|
|
42
47
|
id: `${meta.id}/module/schema`,
|
|
43
|
-
activatesOn: ClientEvents.
|
|
48
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
44
49
|
activate: () => contributes(ClientCapabilities.Schema, [ViewType]),
|
|
45
50
|
}),
|
|
46
51
|
defineModule({
|
|
47
52
|
id: `${meta.id}/module/react-surface`,
|
|
48
|
-
activatesOn: Events.
|
|
53
|
+
activatesOn: Events.SetupReactSurface,
|
|
49
54
|
activate: ReactSurface,
|
|
50
55
|
}),
|
|
51
56
|
defineModule({
|
|
52
57
|
id: `${meta.id}/module/intent-resolver`,
|
|
53
|
-
activatesOn: Events.
|
|
58
|
+
activatesOn: Events.SetupIntentResolver,
|
|
54
59
|
activate: IntentResolver,
|
|
55
60
|
}),
|
|
56
61
|
]);
|
|
@@ -10,7 +10,10 @@ import { ExplorerAction, ViewType } from '../types';
|
|
|
10
10
|
export default () =>
|
|
11
11
|
contributes(
|
|
12
12
|
Capabilities.IntentResolver,
|
|
13
|
-
createResolver(
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
createResolver({
|
|
14
|
+
intent: ExplorerAction.Create,
|
|
15
|
+
resolve: ({ name }) => ({
|
|
16
|
+
data: { object: create(ViewType, { name, type: '' }) },
|
|
17
|
+
}),
|
|
18
|
+
}),
|
|
16
19
|
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type FC, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type ReactiveEchoObject, type Space
|
|
7
|
+
import { getTypename, type ReactiveEchoObject, type Space } from '@dxos/client/echo';
|
|
8
8
|
import { createSvgContext, defaultGridStyles, Grid, SVG, SVGRoot, Zoom } from '@dxos/gem-core';
|
|
9
9
|
import {
|
|
10
10
|
defaultStyles,
|
|
@@ -45,9 +45,10 @@ const colors = [
|
|
|
45
45
|
export type GraphProps = {
|
|
46
46
|
space: Space;
|
|
47
47
|
match?: RegExp;
|
|
48
|
+
grid?: boolean;
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
export const Graph: FC<GraphProps> = ({ space, match }) => {
|
|
51
|
+
export const Graph: FC<GraphProps> = ({ space, match, grid }) => {
|
|
51
52
|
const model = useMemo(() => (space ? new SpaceGraphModel({ schema: true }).open(space) : undefined), [space]);
|
|
52
53
|
const [selected, setSelected] = useState<string>();
|
|
53
54
|
const { themeMode } = useThemeContext();
|
|
@@ -61,15 +62,15 @@ export const Graph: FC<GraphProps> = ({ space, match }) => {
|
|
|
61
62
|
strength: -100,
|
|
62
63
|
},
|
|
63
64
|
link: {
|
|
64
|
-
distance:
|
|
65
|
+
distance: 120,
|
|
65
66
|
},
|
|
66
67
|
radial: {
|
|
67
|
-
radius:
|
|
68
|
+
radius: 150,
|
|
68
69
|
strength: 0.05,
|
|
69
70
|
},
|
|
70
71
|
},
|
|
71
72
|
attributes: {
|
|
72
|
-
radius: (node: GraphLayoutNode<EchoGraphNode>) => (node.data?.type === 'schema' ?
|
|
73
|
+
radius: (node: GraphLayoutNode<EchoGraphNode>) => (node.data?.type === 'schema' ? 12 : 8),
|
|
73
74
|
},
|
|
74
75
|
}),
|
|
75
76
|
[],
|
|
@@ -95,7 +96,7 @@ export const Graph: FC<GraphProps> = ({ space, match }) => {
|
|
|
95
96
|
<SVGRoot context={context}>
|
|
96
97
|
<SVG className={mx(defaultStyles, slots?.root?.className)}>
|
|
97
98
|
<Markers arrowSize={6} />
|
|
98
|
-
<Grid className={slots?.grid?.className ?? defaultGridStyles(themeMode)} />
|
|
99
|
+
{grid && <Grid className={slots?.grid?.className ?? defaultGridStyles(themeMode)} />}
|
|
99
100
|
<Zoom extent={[1 / 2, 4]}>
|
|
100
101
|
<GraphComponent
|
|
101
102
|
model={model}
|
|
@@ -117,29 +118,27 @@ export const Graph: FC<GraphProps> = ({ space, match }) => {
|
|
|
117
118
|
node: (node: GraphLayoutNode<ReactiveEchoObject<any>>) => {
|
|
118
119
|
let className: string | undefined;
|
|
119
120
|
if (node.data) {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
if (
|
|
124
|
-
className =
|
|
125
|
-
|
|
121
|
+
const { object } = node.data;
|
|
122
|
+
if (object) {
|
|
123
|
+
const typename = getTypename(object);
|
|
124
|
+
if (typename) {
|
|
125
|
+
className = colorMap.get(typename);
|
|
126
|
+
if (!className) {
|
|
127
|
+
className = colors[colorMap.size % colors.length];
|
|
128
|
+
colorMap.set(typename, className);
|
|
129
|
+
}
|
|
126
130
|
}
|
|
127
131
|
}
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
const selected = filteredRef.current?.some((object) => object.id === node.data?.id);
|
|
135
|
+
const blur = !selected && !!filteredRef.current?.length;
|
|
131
136
|
return {
|
|
132
|
-
class: mx(
|
|
133
|
-
filteredRef.current?.length
|
|
134
|
-
? selected
|
|
135
|
-
? [className]
|
|
136
|
-
: '[&>text]:!fill-neutral-300'
|
|
137
|
-
: ['[&>text]:!fill-neutral-700', className],
|
|
138
|
-
),
|
|
137
|
+
class: mx(className, blur && 'opacity-70'),
|
|
139
138
|
};
|
|
140
139
|
},
|
|
141
140
|
link: () => ({
|
|
142
|
-
class: '[&>path]:!stroke-neutral-300',
|
|
141
|
+
class: '[&>path]:!stroke-neutral-300 dark:[&>path]:!stroke-neutral-700',
|
|
143
142
|
}),
|
|
144
143
|
}}
|
|
145
144
|
/>
|
|
@@ -12,20 +12,20 @@ export type SpaceGraphModelOptions = {
|
|
|
12
12
|
schema?: boolean;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export type EchoGraphNode = SchemaGraphNode | EchoObjectGraphNode;
|
|
16
|
-
|
|
17
|
-
type EchoObjectGraphNode = {
|
|
18
|
-
id: string;
|
|
19
|
-
type: 'echo-object';
|
|
20
|
-
object: ReactiveEchoObject<any>;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
15
|
type SchemaGraphNode = {
|
|
24
16
|
id: string;
|
|
25
17
|
type: 'schema';
|
|
26
18
|
schema: S.Schema<any>;
|
|
27
19
|
};
|
|
28
20
|
|
|
21
|
+
type ObjectGraphNode = {
|
|
22
|
+
id: string;
|
|
23
|
+
type: 'object';
|
|
24
|
+
object: ReactiveEchoObject<any>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type EchoGraphNode = SchemaGraphNode | ObjectGraphNode;
|
|
28
|
+
|
|
29
29
|
/**
|
|
30
30
|
* Converts ECHO objects to a graph.
|
|
31
31
|
*/
|
|
@@ -58,13 +58,17 @@ export class SpaceGraphModel extends GraphModel<EchoGraphNode> {
|
|
|
58
58
|
this._subscription = query.subscribe(
|
|
59
59
|
({ objects }) => {
|
|
60
60
|
this._objects = objects;
|
|
61
|
+
|
|
62
|
+
// TODO(burdon): Normalize schema.
|
|
61
63
|
this._graph.nodes = objects.map((object) => {
|
|
62
64
|
if (object instanceof StoredSchema) {
|
|
63
65
|
const effectSchema = space.db.schemaRegistry.getSchemaById(object.id)!;
|
|
64
66
|
return { type: 'schema', id: object.id, schema: effectSchema.schema };
|
|
65
67
|
}
|
|
66
|
-
|
|
68
|
+
|
|
69
|
+
return { type: 'object', id: object.id, object };
|
|
67
70
|
});
|
|
71
|
+
|
|
68
72
|
this._graph.links = objects.reduce<GraphLink[]>((links, object) => {
|
|
69
73
|
const objectSchema = getSchema(object);
|
|
70
74
|
const typename = getType(object)?.objectId;
|
package/src/meta.ts
CHANGED
|
@@ -9,8 +9,9 @@ export const EXPLORER_PLUGIN = 'dxos.org/plugin/explorer';
|
|
|
9
9
|
export const meta = {
|
|
10
10
|
id: EXPLORER_PLUGIN,
|
|
11
11
|
name: 'Explorer',
|
|
12
|
-
description: '
|
|
12
|
+
description: 'Install this plugin to view a hypergraph of all objects inside of your Space.',
|
|
13
13
|
icon: 'ph--graph--regular',
|
|
14
14
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-explorer',
|
|
15
15
|
tags: ['experimental'],
|
|
16
|
+
screenshots: ['https://dxos.network/plugin-details-explorer-dark.png'],
|
|
16
17
|
} satisfies PluginMeta;
|
package/src/translations.ts
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { EXPLORER_PLUGIN } from './meta';
|
|
6
|
+
import { ViewType } from './types';
|
|
6
7
|
|
|
7
8
|
export default [
|
|
8
9
|
{
|
|
9
10
|
'en-US': {
|
|
11
|
+
[ViewType.typename]: {
|
|
12
|
+
'typename label': 'Explorer',
|
|
13
|
+
},
|
|
10
14
|
[EXPLORER_PLUGIN]: {
|
|
11
15
|
'plugin name': 'Explorer',
|
|
12
16
|
'object title label': 'Title',
|
package/src/types/schema.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { S, TypedObject } from '@dxos/echo-schema';
|
|
|
6
6
|
|
|
7
7
|
// TODO(burdon): Clashes with sdk/view.
|
|
8
8
|
export class ViewType extends TypedObject({
|
|
9
|
-
typename: 'dxos.org/type/
|
|
9
|
+
typename: 'dxos.org/type/ExplorerView',
|
|
10
10
|
version: '0.1.0',
|
|
11
11
|
})({
|
|
12
12
|
name: S.optional(S.String),
|