@dxos/plugin-explorer 0.8.4-main.422d1c7879 → 0.8.4-main.51f1e5ca51

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.
Files changed (67) hide show
  1. package/dist/lib/browser/index.mjs +11 -44
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/meta.mjs +20 -3
  5. package/dist/lib/browser/meta.mjs.map +4 -4
  6. package/dist/lib/browser/translations.mjs +33 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/browser/types/index.mjs +3 -1
  9. package/dist/lib/browser/types/index.mjs.map +3 -3
  10. package/dist/lib/node-esm/index.mjs +11 -44
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/meta.mjs +20 -3
  14. package/dist/lib/node-esm/meta.mjs.map +4 -4
  15. package/dist/lib/node-esm/translations.mjs +34 -0
  16. package/dist/lib/node-esm/translations.mjs.map +7 -0
  17. package/dist/lib/node-esm/types/index.mjs +3 -1
  18. package/dist/lib/node-esm/types/index.mjs.map +3 -3
  19. package/dist/types/data/cities.d.ts +4 -4
  20. package/dist/types/data/cities.d.ts.map +1 -1
  21. package/dist/types/data/countries-110m.d.ts +19 -22
  22. package/dist/types/data/countries-110m.d.ts.map +1 -1
  23. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  25. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  26. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  27. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  28. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  29. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +1 -1
  30. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +1 -1
  31. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +1 -1
  32. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  33. package/dist/types/src/components/Graph/adapter.d.ts.map +1 -1
  34. package/dist/types/src/components/Graph/testing.d.ts.map +1 -1
  35. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  36. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  38. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  39. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  40. package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
  41. package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
  42. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  43. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  44. package/dist/types/src/components/plot.d.ts.map +1 -1
  45. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +1 -1
  46. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +1 -1
  47. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  48. package/dist/types/src/index.d.ts +0 -1
  49. package/dist/types/src/index.d.ts.map +1 -1
  50. package/dist/types/src/translations.d.ts +17 -17
  51. package/dist/types/src/translations.d.ts.map +1 -1
  52. package/dist/types/src/types/Graph.d.ts +2 -2
  53. package/dist/types/src/types/Graph.d.ts.map +1 -1
  54. package/dist/types/tsconfig.tsbuildinfo +1 -1
  55. package/package.json +39 -32
  56. package/src/ExplorerPlugin.tsx +2 -3
  57. package/src/components/Tree/testing/generator.ts +1 -1
  58. package/src/components/Tree/types/tree.test.ts +1 -1
  59. package/src/components/Tree/types/tree.ts +9 -9
  60. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +2 -2
  61. package/src/index.ts +0 -1
  62. package/src/translations.ts +1 -1
  63. package/src/types/Graph.ts +1 -1
  64. package/dist/lib/browser/chunk-LSUP47BZ.mjs +0 -24
  65. package/dist/lib/browser/chunk-LSUP47BZ.mjs.map +0 -7
  66. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs +0 -26
  67. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-explorer",
3
- "version": "0.8.4-main.422d1c7879",
3
+ "version": "0.8.4-main.51f1e5ca51",
4
4
  "description": "Braneframe data visualization plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -18,6 +18,7 @@
18
18
  "#containers": "./src/containers/index.ts",
19
19
  "#hooks": "./src/hooks/index.ts",
20
20
  "#meta": "./src/meta.ts",
21
+ "#translations": "./src/translations.ts",
21
22
  "#types": "./src/types/index.ts"
22
23
  },
23
24
  "exports": {
@@ -33,6 +34,12 @@
33
34
  "node": "./dist/lib/node-esm/meta.mjs",
34
35
  "types": "./dist/types/src/meta.d.ts"
35
36
  },
37
+ "./translations": {
38
+ "source": "./src/translations.ts",
39
+ "types": "./dist/types/src/translations.d.ts",
40
+ "browser": "./dist/lib/browser/translations.mjs",
41
+ "node": "./dist/lib/node-esm/translations.mjs"
42
+ },
36
43
  "./types": {
37
44
  "source": "./src/types/index.ts",
38
45
  "browser": "./dist/lib/browser/types/index.mjs",
@@ -56,29 +63,29 @@
56
63
  "react-resize-detector": "^11.0.1",
57
64
  "three": "^0.178.0",
58
65
  "topojson-client": "^3.1.0",
59
- "@dxos/app-framework": "0.8.4-main.422d1c7879",
60
- "@dxos/app-toolkit": "0.8.4-main.422d1c7879",
61
- "@dxos/client": "0.8.4-main.422d1c7879",
62
- "@dxos/async": "0.8.4-main.422d1c7879",
63
- "@dxos/echo": "0.8.4-main.422d1c7879",
64
- "@dxos/echo-query": "0.8.4-main.422d1c7879",
65
- "@dxos/graph": "0.8.4-main.422d1c7879",
66
- "@dxos/operation": "0.8.4-main.422d1c7879",
67
- "@dxos/plugin-client": "0.8.4-main.422d1c7879",
68
- "@dxos/plugin-graph": "0.8.4-main.422d1c7879",
69
- "@dxos/plugin-search": "0.8.4-main.422d1c7879",
70
- "@dxos/invariant": "0.8.4-main.422d1c7879",
71
- "@dxos/plugin-space": "0.8.4-main.422d1c7879",
72
- "@dxos/react-client": "0.8.4-main.422d1c7879",
73
- "@dxos/react-ui-attention": "0.8.4-main.422d1c7879",
74
- "@dxos/react-ui-components": "0.8.4-main.422d1c7879",
75
- "@dxos/react-ui-graph": "0.8.4-main.422d1c7879",
76
- "@dxos/log": "0.8.4-main.422d1c7879",
77
- "@dxos/schema": "0.8.4-main.422d1c7879",
78
- "@dxos/react-ui-mosaic": "0.8.4-main.422d1c7879",
79
- "@dxos/react-ui-stack": "0.8.4-main.422d1c7879",
80
- "@dxos/types": "0.8.4-main.422d1c7879",
81
- "@dxos/util": "0.8.4-main.422d1c7879"
66
+ "@dxos/app-toolkit": "0.8.4-main.51f1e5ca51",
67
+ "@dxos/app-framework": "0.8.4-main.51f1e5ca51",
68
+ "@dxos/async": "0.8.4-main.51f1e5ca51",
69
+ "@dxos/client": "0.8.4-main.51f1e5ca51",
70
+ "@dxos/echo": "0.8.4-main.51f1e5ca51",
71
+ "@dxos/compute": "0.8.4-main.51f1e5ca51",
72
+ "@dxos/echo-query": "0.8.4-main.51f1e5ca51",
73
+ "@dxos/graph": "0.8.4-main.51f1e5ca51",
74
+ "@dxos/invariant": "0.8.4-main.51f1e5ca51",
75
+ "@dxos/log": "0.8.4-main.51f1e5ca51",
76
+ "@dxos/plugin-graph": "0.8.4-main.51f1e5ca51",
77
+ "@dxos/plugin-client": "0.8.4-main.51f1e5ca51",
78
+ "@dxos/plugin-search": "0.8.4-main.51f1e5ca51",
79
+ "@dxos/plugin-space": "0.8.4-main.51f1e5ca51",
80
+ "@dxos/react-client": "0.8.4-main.51f1e5ca51",
81
+ "@dxos/react-ui-graph": "0.8.4-main.51f1e5ca51",
82
+ "@dxos/react-ui-mosaic": "0.8.4-main.51f1e5ca51",
83
+ "@dxos/react-ui-attention": "0.8.4-main.51f1e5ca51",
84
+ "@dxos/react-ui-stack": "0.8.4-main.51f1e5ca51",
85
+ "@dxos/schema": "0.8.4-main.51f1e5ca51",
86
+ "@dxos/util": "0.8.4-main.51f1e5ca51",
87
+ "@dxos/types": "0.8.4-main.51f1e5ca51",
88
+ "@dxos/react-ui-components": "0.8.4-main.51f1e5ca51"
82
89
  },
83
90
  "devDependencies": {
84
91
  "@types/d3": "^7.4.3",
@@ -90,19 +97,19 @@
90
97
  "@types/topojson-specification": "^1.0.5",
91
98
  "react": "~19.2.3",
92
99
  "react-dom": "~19.2.3",
93
- "vite": "^7.1.11",
94
- "@dxos/random": "0.8.4-main.422d1c7879",
95
- "@dxos/echo-generator": "0.8.4-main.422d1c7879",
96
- "@dxos/react-ui": "0.8.4-main.422d1c7879",
97
- "@dxos/storybook-utils": "0.8.4-main.422d1c7879",
98
- "@dxos/ui-theme": "0.8.4-main.422d1c7879"
100
+ "vite": "^8.0.10",
101
+ "@dxos/echo-generator": "0.8.4-main.51f1e5ca51",
102
+ "@dxos/react-ui": "0.8.4-main.51f1e5ca51",
103
+ "@dxos/random": "0.8.4-main.51f1e5ca51",
104
+ "@dxos/storybook-utils": "0.8.4-main.51f1e5ca51",
105
+ "@dxos/ui-theme": "0.8.4-main.51f1e5ca51"
99
106
  },
100
107
  "peerDependencies": {
101
108
  "effect": "3.20.0",
102
109
  "react": "~19.2.3",
103
110
  "react-dom": "~19.2.3",
104
- "@dxos/react-ui": "0.8.4-main.422d1c7879",
105
- "@dxos/ui-theme": "0.8.4-main.422d1c7879"
111
+ "@dxos/ui-theme": "0.8.4-main.51f1e5ca51",
112
+ "@dxos/react-ui": "0.8.4-main.51f1e5ca51"
106
113
  },
107
114
  "publishConfig": {
108
115
  "access": "public"
@@ -7,18 +7,17 @@ import * as Option from 'effect/Option';
7
7
 
8
8
  import { Plugin } from '@dxos/app-framework';
9
9
  import { AppPlugin } from '@dxos/app-toolkit';
10
+ import { Operation } from '@dxos/compute';
10
11
  import { Annotation, Type } from '@dxos/echo';
11
- import { Operation } from '@dxos/operation';
12
12
  import { SpaceOperation } from '@dxos/plugin-space/operations';
13
13
  import { type CreateObject } from '@dxos/plugin-space/types';
14
14
  import { ViewModel } from '@dxos/schema';
15
15
 
16
16
  import { ReactSurface } from '#capabilities';
17
17
  import { meta } from '#meta';
18
+ import { translations } from '#translations';
18
19
  import { ExplorerAction, Graph } from '#types';
19
20
 
20
- import { translations } from './translations';
21
-
22
21
  export const ExplorerPlugin = Plugin.define(meta).pipe(
23
22
  AppPlugin.addMetadataModule({
24
23
  metadata: {
@@ -16,7 +16,7 @@ const random = (min: number, max: number) => Math.floor(Math.random() * (max - m
16
16
  */
17
17
  export const createTree = (spec: NumberOrNumberArray[] = [], createText?: () => string): Tree => {
18
18
  const tree = new Tree();
19
- Obj.change(tree.tree, () => {
19
+ Obj.update(tree.tree, () => {
20
20
  tree.root.data = { text: 'root' };
21
21
  });
22
22
 
@@ -128,7 +128,7 @@ describe('tree', () => {
128
128
 
129
129
  const tree = createTree();
130
130
  const node = tree.addNode(tree.root);
131
- Obj.change(tree.tree, () => {
131
+ Obj.update(tree.tree, () => {
132
132
  node.ref = Ref.make(task);
133
133
  });
134
134
  });
@@ -185,7 +185,7 @@ export class Tree {
185
185
  clear(): void {
186
186
  const root = this._tree.nodes[this._tree.root];
187
187
  root.children.length = 0;
188
- Obj.change(this._tree, (obj) => {
188
+ Obj.update(this._tree, (obj) => {
189
189
  obj.nodes = {
190
190
  [root.id]: root,
191
191
  };
@@ -202,7 +202,7 @@ export class Tree {
202
202
  }
203
203
 
204
204
  const nodeToAdd = node;
205
- Obj.change(this._tree, (obj) => {
205
+ Obj.update(this._tree, (obj) => {
206
206
  obj.nodes[nodeToAdd.id] = nodeToAdd;
207
207
  parent.children.splice(index ?? parent.children.length, 0, nodeToAdd.id);
208
208
  });
@@ -218,12 +218,12 @@ export class Tree {
218
218
  return undefined;
219
219
  }
220
220
 
221
- Obj.change(this._tree, (obj) => {
221
+ Obj.update(this._tree, (obj) => {
222
222
  delete obj.nodes[node.id];
223
223
  });
224
224
  const idx = parent.children.findIndex((child) => child === id);
225
225
  if (idx !== -1) {
226
- Obj.change(this._tree, () => {
226
+ Obj.update(this._tree, () => {
227
227
  parent.children.splice(idx, 1);
228
228
  });
229
229
  }
@@ -242,7 +242,7 @@ export class Tree {
242
242
  }
243
243
 
244
244
  const child = node.children[from];
245
- Obj.change(this._tree, () => {
245
+ Obj.update(this._tree, () => {
246
246
  node.children.splice(from, 1);
247
247
  node.children.splice(to, 0, child);
248
248
  });
@@ -264,7 +264,7 @@ export class Tree {
264
264
  }
265
265
 
266
266
  const previous = this.getNode(parent.children[idx - 1]);
267
- Obj.change(this._tree, () => {
267
+ Obj.update(this._tree, () => {
268
268
  parent.children.splice(idx, 1);
269
269
  previous.children.push(node.id);
270
270
  });
@@ -287,19 +287,19 @@ export class Tree {
287
287
  // Remove node from parent and get following siblings.
288
288
  const nodeIdx = parent.children.findIndex((id) => id === node.id);
289
289
  let rest: Key.ObjectId[] = [];
290
- Obj.change(this._tree, () => {
290
+ Obj.update(this._tree, () => {
291
291
  const removed = parent.children.splice(nodeIdx, parent.children.length - nodeIdx);
292
292
  rest = removed.slice(1); // Skip the node itself.
293
293
  });
294
294
 
295
295
  // Add to ancestor.
296
296
  const parentIdx = this.getChildNodes(ancestor).findIndex((n) => n.id === parent.id);
297
- Obj.change(this._tree, () => {
297
+ Obj.update(this._tree, () => {
298
298
  ancestor.children.splice(parentIdx + 1, 0, node.id);
299
299
  });
300
300
 
301
301
  // Transplant following siblings to current node.
302
- Obj.change(this._tree, () => {
302
+ Obj.update(this._tree, () => {
303
303
  node.children.push(...rest);
304
304
  });
305
305
  }
@@ -18,8 +18,8 @@ import { useGraphModel } from '#hooks';
18
18
 
19
19
  export type ExplorerContainerProps = AppSurface.ObjectArticleProps<View.View>;
20
20
 
21
- export const ExplorerContainer = ({ role, subject: view, attendableId: _attendableId }: ExplorerContainerProps) => {
22
- useObject(view);
21
+ export const ExplorerContainer = ({ role, subject, attendableId: _attendableId }: ExplorerContainerProps) => {
22
+ const [view] = useObject(subject);
23
23
  const space = view && getSpace(view);
24
24
  const [filter, setFilter] = useState<Filter.Any>();
25
25
  const model = useGraphModel(space, filter);
package/src/index.ts CHANGED
@@ -4,6 +4,5 @@
4
4
 
5
5
  export * from './components';
6
6
  export * from './hooks';
7
- export * from './meta';
8
7
 
9
8
  export * from './ExplorerPlugin';
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Type } from '@dxos/echo';
6
6
  import { type Resource } from '@dxos/react-ui';
7
- import { translations as componentsTranslations } from '@dxos/react-ui-components';
7
+ import { translations as componentsTranslations } from '@dxos/react-ui-components/translations';
8
8
 
9
9
  import { meta } from '#meta';
10
10
  import { Graph } from '#types';
@@ -24,7 +24,7 @@ const GraphSchema = Schema.Struct({
24
24
  version: '0.1.0',
25
25
  }),
26
26
  LabelAnnotation.set(['name']),
27
- ViewAnnotation.set(true),
27
+ ViewAnnotation.set(['view']),
28
28
  Annotation.IconAnnotation.set({
29
29
  icon: 'ph--graph--regular',
30
30
  hue: 'green',
@@ -1,24 +0,0 @@
1
- // src/meta.ts
2
- import { trim } from "@dxos/util";
3
- var meta = {
4
- id: "org.dxos.plugin.explorer",
5
- name: "Explorer",
6
- description: trim`
7
- Interactive hypergraph visualization that reveals relationships between objects in your workspace.
8
- Navigate complex data structures and discover connections through a dynamic network view.
9
- `,
10
- icon: "ph--graph--regular",
11
- iconHue: "green",
12
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
13
- tags: [
14
- "labs"
15
- ],
16
- screenshots: [
17
- "https://dxos.network/plugin-details-explorer-dark.png"
18
- ]
19
- };
20
-
21
- export {
22
- meta
23
- };
24
- //# sourceMappingURL=chunk-LSUP47BZ.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.explorer',\n name: 'Explorer',\n description: trim`\n Interactive hypergraph visualization that reveals relationships between objects in your workspace.\n Navigate complex data structures and discover connections through a dynamic network view.\n `,\n icon: 'ph--graph--regular',\n iconHue: 'green',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-explorer-dark.png'],\n};\n"],
5
- "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
7
- }
@@ -1,26 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/meta.ts
4
- import { trim } from "@dxos/util";
5
- var meta = {
6
- id: "org.dxos.plugin.explorer",
7
- name: "Explorer",
8
- description: trim`
9
- Interactive hypergraph visualization that reveals relationships between objects in your workspace.
10
- Navigate complex data structures and discover connections through a dynamic network view.
11
- `,
12
- icon: "ph--graph--regular",
13
- iconHue: "green",
14
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
15
- tags: [
16
- "labs"
17
- ],
18
- screenshots: [
19
- "https://dxos.network/plugin-details-explorer-dark.png"
20
- ]
21
- };
22
-
23
- export {
24
- meta
25
- };
26
- //# sourceMappingURL=chunk-EN3JZNEY.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.explorer',\n name: 'Explorer',\n description: trim`\n Interactive hypergraph visualization that reveals relationships between objects in your workspace.\n Navigate complex data structures and discover connections through a dynamic network view.\n `,\n icon: 'ph--graph--regular',\n iconHue: 'green',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-explorer-dark.png'],\n};\n"],
5
- "mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
7
- }