@dxos/plugin-explorer 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934
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/LICENSE +102 -5
- package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs +141 -0
- package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs.map +7 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/types/index.mjs → neutral/chunk-7SPMPHRS.mjs} +10 -8
- package/dist/lib/neutral/chunk-7SPMPHRS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
- package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
- package/dist/lib/{browser/chunk-LSUP47BZ.mjs → neutral/chunk-HPIS2WXY.mjs} +1 -1
- package/dist/lib/{browser/chunk-LSUP47BZ.mjs.map → neutral/chunk-HPIS2WXY.mjs.map} +2 -2
- package/dist/lib/{browser → neutral/components}/index.mjs +661 -417
- package/dist/lib/{node-esm → neutral/components}/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +45 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +33 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/data/cities.d.ts +4 -4
- package/dist/types/data/cities.d.ts.map +1 -1
- package/dist/types/data/countries-110m.d.ts +19 -22
- package/dist/types/data/countries-110m.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts +1 -0
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
- package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
- package/dist/types/src/components/Graph/{D3ForceGraph.stories.d.ts → CanvasForceGraph.stories.d.ts} +3 -7
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
- package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
- package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +3 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
- package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
- package/dist/types/src/components/Graph/index.d.ts +1 -1
- package/dist/types/src/components/Graph/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
- package/dist/types/src/components/Tree/Tree.d.ts +20 -23
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/index.d.ts +3 -0
- package/dist/types/src/components/Tree/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +35 -2
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
- package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
- package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
- package/dist/types/src/components/Tree/space-graph-adapter.d.ts +32 -0
- package/dist/types/src/components/Tree/space-graph-adapter.d.ts.map +1 -0
- package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
- package/dist/types/src/components/Tree/testing/index.d.ts +1 -0
- package/dist/types/src/components/Tree/testing/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/testing/relations.d.ts +47 -0
- package/dist/types/src/components/Tree/testing/relations.d.ts.map +1 -0
- package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
- package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts +14 -4
- package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
- package/dist/types/src/components/plot.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +24 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
- package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +17 -17
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Graph.d.ts +3 -4
- package/dist/types/src/types/Graph.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +100 -62
- package/src/ExplorerPlugin.test.ts +26 -0
- package/src/ExplorerPlugin.tsx +6 -35
- package/src/capabilities/create-object.ts +36 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-surface.tsx +6 -4
- package/src/components/Chart/Chart.stories.tsx +14 -20
- package/src/components/Globe/Globe.stories.tsx +17 -19
- package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
- package/src/components/Graph/CanvasForceGraph.tsx +124 -0
- package/src/components/Graph/ForceGraph.stories.tsx +69 -37
- package/src/components/Graph/ForceGraph.tsx +104 -85
- package/src/components/Graph/index.ts +1 -1
- package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
- package/src/components/Tree/Tree.stories.tsx +17 -38
- package/src/components/Tree/Tree.tsx +69 -100
- package/src/components/Tree/index.ts +3 -0
- package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +277 -0
- package/src/components/Tree/layout/RadialTree.tsx +237 -0
- package/src/components/Tree/layout/TidyTree.tsx +246 -0
- package/src/components/Tree/layout/hierarchy.ts +32 -0
- package/src/components/Tree/layout/index.ts +5 -5
- package/src/components/Tree/layout/slots.ts +19 -0
- package/src/components/Tree/layout/useContainerSize.ts +43 -0
- package/src/components/Tree/space-graph-adapter.ts +96 -0
- package/src/components/Tree/testing/generator.ts +1 -1
- package/src/components/Tree/testing/index.ts +1 -0
- package/src/components/Tree/testing/relations.ts +182 -0
- package/src/components/Tree/types/tree.test.ts +1 -1
- package/src/components/Tree/types/tree.ts +9 -9
- package/src/components/Tree/types/types.ts +38 -29
- package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +119 -0
- package/src/containers/ExplorerArticle/ExplorerArticle.tsx +153 -0
- package/src/containers/ExplorerArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/hooks/useGraphModel.ts +10 -6
- package/src/index.ts +1 -4
- package/src/plugin.ts +9 -0
- package/src/testing.ts +7 -0
- package/src/translations.ts +1 -1
- package/src/types/ExplorerAction.ts +1 -1
- package/src/types/Graph.ts +2 -3
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/types/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EN3JZNEY.mjs +0 -26
- package/dist/lib/node-esm/chunk-EN3JZNEY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/index.mjs +0 -11375
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -9
- package/dist/lib/node-esm/types/index.mjs +0 -71
- package/dist/lib/node-esm/types/index.mjs.map +0 -7
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -19
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
- package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
- package/dist/types/src/components/Graph/testing.d.ts +0 -14
- package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
- package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
- package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
- package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
- package/src/components/Graph/D3ForceGraph.tsx +0 -108
- package/src/components/Graph/testing.ts +0 -58
- package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
- package/src/components/Tree/layout/RadialTree.ts +0 -94
- package/src/components/Tree/layout/TidyTree.ts +0 -101
- package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
- package/src/containers/ExplorerContainer/index.ts +0 -5
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
- /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/components/plot.ts":{"bytes":1407,"imports":[],"format":"esm"},"src/components/Chart/Chart.tsx":{"bytes":4817,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"src/components/plot.ts","kind":"import-statement","original":"../plot"}],"format":"esm"},"src/components/Chart/index.ts":{"bytes":469,"imports":[{"path":"src/components/Chart/Chart.tsx","kind":"import-statement","original":"./Chart"}],"format":"esm"},"data/countries-110m.js":{"bytes":187226,"imports":[],"format":"esm"},"src/components/Globe/Globe.tsx":{"bytes":7377,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"data/countries-110m.js","kind":"import-statement","original":"../../../data/countries-110m.js"},{"path":"src/components/plot.ts","kind":"import-statement","original":"../plot"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":469,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Graph/D3ForceGraph.tsx":{"bytes":11646,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true}],"format":"esm"},"src/components/Graph/adapter.ts":{"bytes":4167,"imports":[],"format":"esm"},"src/components/Graph/ForceGraph.tsx":{"bytes":10625,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","kind":"import-statement","external":true},{"path":"src/components/Graph/adapter.ts","kind":"import-statement","original":"./adapter"}],"format":"esm"},"src/components/Graph/index.ts":{"bytes":582,"imports":[{"path":"src/components/Graph/D3ForceGraph.tsx","kind":"import-statement","original":"./D3ForceGraph"},{"path":"src/components/Graph/ForceGraph.tsx","kind":"import-statement","original":"./ForceGraph"}],"format":"esm"},"src/components/Tree/layout/HierarchicalEdgeBundling.ts":{"bytes":17479,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/RadialTree.ts":{"bytes":8705,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/TidyTree.ts":{"bytes":9207,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/index.ts":{"bytes":1094,"imports":[{"path":"src/components/Tree/layout/HierarchicalEdgeBundling.ts","kind":"import-statement","original":"./HierarchicalEdgeBundling"},{"path":"src/components/Tree/layout/RadialTree.ts","kind":"import-statement","original":"./RadialTree"},{"path":"src/components/Tree/layout/TidyTree.ts","kind":"import-statement","original":"./TidyTree"}],"format":"esm"},"src/components/Tree/types/tree.ts":{"bytes":28199,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/types/types.ts":{"bytes":3319,"imports":[],"format":"esm"},"src/components/Tree/types/index.ts":{"bytes":554,"imports":[{"path":"src/components/Tree/types/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/components/Tree/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Tree/Tree.tsx":{"bytes":9947,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/Tree/layout/index.ts","kind":"import-statement","original":"./layout"},{"path":"src/components/Tree/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Tree/index.ts":{"bytes":467,"imports":[{"path":"src/components/Tree/Tree.tsx","kind":"import-statement","original":"./Tree"}],"format":"esm"},"src/components/index.ts":{"bytes":705,"imports":[{"path":"src/components/Chart/index.ts","kind":"import-statement","original":"./Chart"},{"path":"src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"src/components/Graph/index.ts","kind":"import-statement","original":"./Graph"},{"path":"src/components/Tree/index.ts","kind":"import-statement","original":"./Tree"}],"format":"esm"},"src/hooks/useGraphModel.ts":{"bytes":3974,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":482,"imports":[{"path":"src/hooks/useGraphModel.ts","kind":"import-statement","original":"./useGraphModel"}],"format":"esm"},"src/meta.ts":{"bytes":2213,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/translations.ts":{"bytes":3297,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/ExplorerPlugin.tsx":{"bytes":7374,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":732,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/ExplorerPlugin.tsx","kind":"import-statement","original":"./ExplorerPlugin"}],"format":"esm"},"src/types/ExplorerAction.ts":{"bytes":2232,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Graph.ts":{"bytes":4951,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":703,"imports":[{"path":"src/types/ExplorerAction.ts","kind":"import-statement","original":"./ExplorerAction"},{"path":"src/types/Graph.ts","kind":"import-statement","original":"./Graph"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":504929},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-EN3JZNEY.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["Chart","D3ForceGraph","ExplorerPlugin","ForceGraph","Globe","Tree","defaultTreeLayoutSlots","meta","useGraphModel"],"entryPoint":"src/index.ts","inputs":{"src/components/Chart/Chart.tsx":{"bytesInOutput":1031},"src/components/plot.ts":{"bytesInOutput":133},"src/components/Chart/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Globe/Globe.tsx":{"bytesInOutput":1707},"data/countries-110m.js":{"bytesInOutput":188376},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/Graph/D3ForceGraph.tsx":{"bytesInOutput":2451},"src/components/Graph/index.ts":{"bytesInOutput":0},"src/components/Graph/ForceGraph.tsx":{"bytesInOutput":2179},"src/components/Graph/adapter.ts":{"bytesInOutput":619},"src/components/Tree/Tree.tsx":{"bytesInOutput":2117},"src/components/Tree/layout/HierarchicalEdgeBundling.ts":{"bytesInOutput":2167},"src/components/Tree/layout/RadialTree.ts":{"bytesInOutput":1355},"src/components/Tree/layout/TidyTree.ts":{"bytesInOutput":1596},"src/components/Tree/types/tree.ts":{"bytesInOutput":699},"src/components/Tree/types/index.ts":{"bytesInOutput":0},"src/components/Tree/types/types.ts":{"bytesInOutput":82},"src/components/Tree/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/hooks/useGraphModel.ts":{"bytesInOutput":879},"src/hooks/index.ts":{"bytesInOutput":0},"src/ExplorerPlugin.tsx":{"bytesInOutput":1687},"src/translations.ts":{"bytesInOutput":848}},"bytes":209018},"dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/meta.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-EN3JZNEY.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":223},"dist/lib/node-esm/chunk-EN3JZNEY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1050},"dist/lib/node-esm/chunk-EN3JZNEY.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":570}},"bytes":742},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3774},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["ExplorerAction","Graph"],"entryPoint":"src/types/index.ts","inputs":{"src/types/ExplorerAction.ts":{"bytesInOutput":580},"src/types/index.ts":{"bytesInOutput":0},"src/types/Graph.ts":{"bytesInOutput":1083}},"bytes":1978},"dist/lib/node-esm/chunk-HSLMI22Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-HSLMI22Q.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":327}}}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
__export
|
|
4
|
-
} from "../chunk-HSLMI22Q.mjs";
|
|
5
|
-
|
|
6
|
-
// src/types/ExplorerAction.ts
|
|
7
|
-
var ExplorerAction_exports = {};
|
|
8
|
-
__export(ExplorerAction_exports, {
|
|
9
|
-
GraphProps: () => GraphProps
|
|
10
|
-
});
|
|
11
|
-
import * as Schema from "effect/Schema";
|
|
12
|
-
import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
|
|
13
|
-
var GraphProps = Schema.Struct({
|
|
14
|
-
name: Schema.optional(Schema.String),
|
|
15
|
-
// TODO(wittjosiah): This should be a query input instead.
|
|
16
|
-
typename: Schema.String.pipe(Schema.annotations({
|
|
17
|
-
title: "Select type"
|
|
18
|
-
}), TypeInputOptionsAnnotation.set({
|
|
19
|
-
location: [
|
|
20
|
-
"database",
|
|
21
|
-
"runtime"
|
|
22
|
-
],
|
|
23
|
-
kind: [
|
|
24
|
-
"user"
|
|
25
|
-
]
|
|
26
|
-
}), Schema.optional)
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// src/types/Graph.ts
|
|
30
|
-
var Graph_exports = {};
|
|
31
|
-
__export(Graph_exports, {
|
|
32
|
-
Graph: () => Graph,
|
|
33
|
-
make: () => make
|
|
34
|
-
});
|
|
35
|
-
import * as Schema2 from "effect/Schema";
|
|
36
|
-
import { Annotation, Filter, Obj, Query, QueryAST, Ref, Type } from "@dxos/echo";
|
|
37
|
-
import { View } from "@dxos/echo";
|
|
38
|
-
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
39
|
-
import { ViewAnnotation } from "@dxos/schema";
|
|
40
|
-
var GraphSchema = Schema2.Struct({
|
|
41
|
-
name: Schema2.optional(Schema2.String),
|
|
42
|
-
view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),
|
|
43
|
-
query: Schema2.Struct({
|
|
44
|
-
raw: Schema2.optional(Schema2.String),
|
|
45
|
-
ast: QueryAST.Query
|
|
46
|
-
}).pipe(FormInputAnnotation.set(false))
|
|
47
|
-
}).pipe(Type.object({
|
|
48
|
-
typename: "org.dxos.type.graph",
|
|
49
|
-
version: "0.1.0"
|
|
50
|
-
}), LabelAnnotation.set([
|
|
51
|
-
"name"
|
|
52
|
-
]), ViewAnnotation.set(true), Annotation.IconAnnotation.set({
|
|
53
|
-
icon: "ph--graph--regular",
|
|
54
|
-
hue: "green"
|
|
55
|
-
}));
|
|
56
|
-
var Graph = GraphSchema;
|
|
57
|
-
var make = ({ name, query = {
|
|
58
|
-
raw: "",
|
|
59
|
-
ast: Query.select(Filter.nothing()).ast
|
|
60
|
-
}, view }) => {
|
|
61
|
-
return Obj.make(Graph, {
|
|
62
|
-
name,
|
|
63
|
-
view: Ref.make(view),
|
|
64
|
-
query
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
ExplorerAction_exports as ExplorerAction,
|
|
69
|
-
Graph_exports as Graph
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/types/ExplorerAction.ts", "../../../../src/types/Graph.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';\n\nexport const GraphProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.pipe(\n Schema.annotations({ title: 'Select type' }),\n TypeInputOptionsAnnotation.set({\n location: ['database', 'runtime'],\n kind: ['user'],\n }),\n Schema.optional,\n ),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Filter, Obj, Query, QueryAST, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nconst GraphSchema = Schema.Struct({\n name: Schema.optional(Schema.String),\n\n view: Ref.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }).pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.graph',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n Annotation.IconAnnotation.set({\n icon: 'ph--graph--regular',\n hue: 'green',\n }),\n);\nexport interface Graph extends Schema.Schema.Type<typeof GraphSchema> {}\nexport const Graph: Type.Obj<Graph> = GraphSchema as any;\n\ntype MakeProps = Omit<Partial<Obj.MakeProps<typeof Graph>>, 'view'> & {\n view: View.View;\n};\n\n/**\n * Make a graph as a view of a data set.\n */\nexport const make = ({\n name,\n query = { raw: '', ast: Query.select(Filter.nothing()).ast },\n view,\n}: MakeProps): Graph => {\n return Obj.make(Graph, { name, view: Ref.make(view), query });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAAA;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,aAAoBC,cAAO;EACtCC,MAAaC,gBAAgBC,aAAM;;EAEnCC,UAAiBD,cAAOE,KACfC,mBAAY;IAAEC,OAAO;EAAc,CAAA,GAC1CC,2BAA2BC,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;EACT,CAAA,GACOT,eAAQ;AAEnB,CAAA;;;ACnBA;;;;;AAIA,YAAYU,aAAY;AAExB,SAASC,YAAYC,QAAQC,KAAKC,OAAOC,UAAUC,KAAKC,YAAY;AACpE,SAASC,YAAY;AACrB,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAE/B,IAAMC,cAAqBC,eAAO;EAChCC,MAAaC,iBAAgBC,cAAM;EAEnCC,MAAMC,IAAIA,IAAIC,KAAKA,IAAI,EAAEC,KAAKC,oBAAoBC,IAAI,KAAA,CAAA;EAEtDC,OAAcV,eAAO;IACnBW,KAAYT,iBAAgBC,cAAM;IAClCS,KAAKC,SAASC;EAChB,CAAA,EAAGP,KAAKC,oBAAoBC,IAAI,KAAA,CAAA;AAClC,CAAA,EAAGF,KACDQ,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBV,IAAI;EAAC;CAAO,GAC5BW,eAAeX,IAAI,IAAA,GACnBY,WAAWC,eAAeb,IAAI;EAC5Bc,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAGK,IAAMC,QAAyB1B;AAS/B,IAAM2B,OAAO,CAAC,EACnBzB,MACAS,QAAQ;EAAEC,KAAK;EAAIC,KAAKE,MAAMa,OAAOC,OAAOC,QAAO,CAAA,EAAIjB;AAAI,GAC3DR,KAAI,MACM;AACV,SAAO0B,IAAIJ,KAAKD,OAAO;IAAExB;IAAMG,MAAMC,IAAIqB,KAAKtB,IAAAA;IAAOM;EAAM,CAAA;AAC7D;",
|
|
6
|
-
"names": ["Schema", "TypeInputOptionsAnnotation", "GraphProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "TypeInputOptionsAnnotation", "set", "location", "kind", "Schema", "Annotation", "Filter", "Obj", "Query", "QueryAST", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "GraphSchema", "Struct", "name", "optional", "String", "view", "Ref", "View", "pipe", "FormInputAnnotation", "set", "query", "raw", "ast", "QueryAST", "Query", "Type", "object", "typename", "version", "LabelAnnotation", "ViewAnnotation", "Annotation", "IconAnnotation", "icon", "hue", "Graph", "make", "select", "Filter", "nothing", "Obj"]
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { SelectionModel } from '@dxos/graph';
|
|
3
|
-
import { type GraphProps } from '@dxos/react-ui-graph';
|
|
4
|
-
import { type SpaceGraphModel } from '@dxos/schema';
|
|
5
|
-
import '@dxos/react-ui-graph/styles/graph.css';
|
|
6
|
-
export type D3ForceGraphProps = {
|
|
7
|
-
model?: SpaceGraphModel;
|
|
8
|
-
match?: RegExp;
|
|
9
|
-
selection?: SelectionModel;
|
|
10
|
-
grid?: boolean;
|
|
11
|
-
} & Pick<GraphProps, 'drag'> & ComponentPropsWithoutRef<'div'>;
|
|
12
|
-
export declare const D3ForceGraph: React.ForwardRefExoticComponent<Omit<D3ForceGraphProps, "className"> & {
|
|
13
|
-
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
14
|
-
} & {
|
|
15
|
-
className?: string;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
role?: string;
|
|
18
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
//# sourceMappingURL=D3ForceGraph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"D3ForceGraph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/D3ForceGraph.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAA2C,MAAM,OAAO,CAAC;AAGtG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAuB,KAAK,eAAe,EAAuB,MAAM,cAAc,CAAC;AAE9F,OAAO,uCAAuC,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAC1B,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAIlC,eAAO,MAAM,YAAY;;;;;;wCA4ExB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"D3ForceGraph.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/D3ForceGraph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgDxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAuB2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,YAAW,SAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAEb,KAAK,EAAE,KAAK,CAAC,GAAG;IAqB7C,IAAI,KAAK,gBAER;IAED,IAAI,KAAK,gBAER;CACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Space } from '@dxos/client/echo';
|
|
2
|
-
import { type TypeSpec, type ValueGenerator } from '@dxos/schema/testing';
|
|
3
|
-
export type GenerateOptions = {
|
|
4
|
-
spec?: TypeSpec[];
|
|
5
|
-
relations?: {
|
|
6
|
-
count: number;
|
|
7
|
-
kind: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use @dxos/schema.
|
|
12
|
-
*/
|
|
13
|
-
export declare const generate: (space: Space, generator: ValueGenerator, { spec, relations }?: GenerateOptions) => Promise<void>;
|
|
14
|
-
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAY/F,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,KAAK,EACZ,WAAW,cAAc,EACzB,sBAAuD,eAAoB,kBAoB5E,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
3
|
-
import { type View } from '@dxos/echo';
|
|
4
|
-
export type ExplorerContainerProps = AppSurface.ObjectArticleProps<View.View>;
|
|
5
|
-
export declare const ExplorerContainer: ({ role, subject: view, attendableId: _attendableId }: ExplorerContainerProps) => React.JSX.Element | null;
|
|
6
|
-
//# sourceMappingURL=ExplorerContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerContainer.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerContainer/ExplorerContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAUvC,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE9E,eAAO,MAAM,iBAAiB,GAAI,sDAAsD,sBAAsB,6BAgC7G,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerContainer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React, { useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { Type } from '@dxos/echo';
|
|
9
|
-
import { View } from '@dxos/echo';
|
|
10
|
-
import { random } from '@dxos/random';
|
|
11
|
-
import { useClient } from '@dxos/react-client';
|
|
12
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
13
|
-
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import { useAsyncEffect } from '@dxos/react-ui';
|
|
15
|
-
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
|
-
import { ViewModel } from '@dxos/schema';
|
|
17
|
-
import { type ValueGenerator } from '@dxos/schema/testing';
|
|
18
|
-
import { withRegistry } from '@dxos/storybook-utils';
|
|
19
|
-
import { HasRelationship, Organization, Person, Pipeline } from '@dxos/types';
|
|
20
|
-
|
|
21
|
-
import { useGraphModel } from '#hooks';
|
|
22
|
-
import { Graph } from '#types';
|
|
23
|
-
|
|
24
|
-
import { D3ForceGraph } from './D3ForceGraph';
|
|
25
|
-
import { generate } from './testing';
|
|
26
|
-
|
|
27
|
-
const generator = random as any as ValueGenerator;
|
|
28
|
-
|
|
29
|
-
random.seed(1);
|
|
30
|
-
|
|
31
|
-
const DefaultStory = () => {
|
|
32
|
-
const client = useClient();
|
|
33
|
-
const [space, setSpace] = useState<Space>();
|
|
34
|
-
const [graph, setGraph] = useState<Graph.Graph>();
|
|
35
|
-
|
|
36
|
-
useAsyncEffect(async () => {
|
|
37
|
-
const space = client.spaces.get()[0];
|
|
38
|
-
void generate(space, generator);
|
|
39
|
-
const { view } = await ViewModel.makeFromDatabase({ db: space.db, typename: Type.getTypename(Graph.Graph) });
|
|
40
|
-
const graph = Graph.make({ name: 'Test', view });
|
|
41
|
-
space.db.add(graph);
|
|
42
|
-
setSpace(space);
|
|
43
|
-
setGraph(graph);
|
|
44
|
-
}, [client]);
|
|
45
|
-
|
|
46
|
-
const model = useGraphModel(space);
|
|
47
|
-
if (!model || !space || !graph) {
|
|
48
|
-
return <Loading data={{ model: !!model, space: !!space, graph: !!graph }} />;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return <D3ForceGraph model={model} />;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const meta = {
|
|
55
|
-
title: 'plugins/plugin-explorer/components/D3ForceGraph',
|
|
56
|
-
component: D3ForceGraph,
|
|
57
|
-
render: DefaultStory,
|
|
58
|
-
decorators: [
|
|
59
|
-
withRegistry,
|
|
60
|
-
withTheme(),
|
|
61
|
-
withLayout(),
|
|
62
|
-
withClientProvider({
|
|
63
|
-
createSpace: true,
|
|
64
|
-
types: [
|
|
65
|
-
Graph.Graph,
|
|
66
|
-
View.View,
|
|
67
|
-
Organization.Organization,
|
|
68
|
-
Pipeline.Pipeline,
|
|
69
|
-
Person.Person,
|
|
70
|
-
HasRelationship.HasRelationship,
|
|
71
|
-
],
|
|
72
|
-
}),
|
|
73
|
-
],
|
|
74
|
-
parameters: {
|
|
75
|
-
layout: 'fullscreen',
|
|
76
|
-
},
|
|
77
|
-
} satisfies Meta<typeof D3ForceGraph>;
|
|
78
|
-
|
|
79
|
-
export default meta;
|
|
80
|
-
|
|
81
|
-
type Story = StoryObj<typeof meta>;
|
|
82
|
-
|
|
83
|
-
export const Default: Story = {};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
-
import React, { type ComponentPropsWithoutRef, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
7
|
-
|
|
8
|
-
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { SelectionModel } from '@dxos/graph';
|
|
10
|
-
import {
|
|
11
|
-
type GraphController,
|
|
12
|
-
GraphForceProjector,
|
|
13
|
-
type GraphLayoutNode,
|
|
14
|
-
type GraphProps,
|
|
15
|
-
SVG,
|
|
16
|
-
type SVGContext,
|
|
17
|
-
} from '@dxos/react-ui-graph';
|
|
18
|
-
import { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';
|
|
19
|
-
import { composable, composableProps, getHashStyles } from '@dxos/ui-theme';
|
|
20
|
-
import '@dxos/react-ui-graph/styles/graph.css';
|
|
21
|
-
|
|
22
|
-
export type D3ForceGraphProps = {
|
|
23
|
-
model?: SpaceGraphModel;
|
|
24
|
-
match?: RegExp;
|
|
25
|
-
selection?: SelectionModel;
|
|
26
|
-
grid?: boolean;
|
|
27
|
-
} & Pick<GraphProps, 'drag'> &
|
|
28
|
-
ComponentPropsWithoutRef<'div'>;
|
|
29
|
-
|
|
30
|
-
const EMPTY_ATOM = Atom.make<{ nodes: SpaceGraphNode[]; edges: SpaceGraphEdge[] }>({ nodes: [], edges: [] });
|
|
31
|
-
|
|
32
|
-
export const D3ForceGraph = composable<HTMLDivElement, D3ForceGraphProps>(
|
|
33
|
-
({ model, selection: _selection, grid, drag, ...props }, forwardedRef) => {
|
|
34
|
-
// TODO(wittjosiah): This should go into Graph.tsx but for some reason doesn't work.
|
|
35
|
-
useAtomValue(model?.graphAtom ?? EMPTY_ATOM);
|
|
36
|
-
|
|
37
|
-
const svgRef = useRef<SVGContext>(null);
|
|
38
|
-
const projector = useMemo<GraphForceProjector | undefined>(() => {
|
|
39
|
-
if (svgRef.current) {
|
|
40
|
-
return new GraphForceProjector(svgRef.current, {
|
|
41
|
-
attributes: {
|
|
42
|
-
linkForce: (edge) => {
|
|
43
|
-
// TODO(burdon): Check type (currently assumes Employee property).
|
|
44
|
-
// Edge shouldn't contribute to force if it's not active.
|
|
45
|
-
return edge.data?.object?.active !== false;
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
forces: {
|
|
49
|
-
point: {
|
|
50
|
-
strength: 0.01,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}, []);
|
|
56
|
-
|
|
57
|
-
const graph = useRef<GraphController>(null);
|
|
58
|
-
const selection = useMemo(() => _selection ?? new SelectionModel(), [_selection]);
|
|
59
|
-
useEffect(() => selection.subscribe(() => graph.current?.repaint()), [selection]);
|
|
60
|
-
|
|
61
|
-
const handleSelect = useCallback<NonNullable<GraphProps['onSelect']>>(
|
|
62
|
-
(node) => {
|
|
63
|
-
if (selection.contains(node.id)) {
|
|
64
|
-
selection.remove(node.id);
|
|
65
|
-
} else {
|
|
66
|
-
selection.add(node.id);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
[selection],
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<div {...composableProps(props, { classNames: 'dx-container' })} ref={forwardedRef}>
|
|
74
|
-
<SVG.Root ref={svgRef}>
|
|
75
|
-
<SVG.Markers />
|
|
76
|
-
{grid && <SVG.Grid axis />}
|
|
77
|
-
<SVG.Zoom extent={[1 / 2, 2]}>
|
|
78
|
-
<SVG.Graph<SpaceGraphNode, SpaceGraphEdge>
|
|
79
|
-
drag={drag}
|
|
80
|
-
ref={graph}
|
|
81
|
-
model={model}
|
|
82
|
-
projector={projector}
|
|
83
|
-
labels={{
|
|
84
|
-
text: (node) => {
|
|
85
|
-
return node.data?.data.label ?? node.id;
|
|
86
|
-
},
|
|
87
|
-
}}
|
|
88
|
-
attributes={{
|
|
89
|
-
node: (node: GraphLayoutNode<SpaceGraphNode>) => {
|
|
90
|
-
const obj = node.data?.data.object;
|
|
91
|
-
return {
|
|
92
|
-
data: {
|
|
93
|
-
color: getHashStyles(obj && Obj.getTypename(obj))?.hue,
|
|
94
|
-
},
|
|
95
|
-
classes: {
|
|
96
|
-
'dx-selected': selection.contains(node.id),
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
}}
|
|
101
|
-
onSelect={handleSelect}
|
|
102
|
-
/>
|
|
103
|
-
</SVG.Zoom>
|
|
104
|
-
</SVG.Root>
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
},
|
|
108
|
-
);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Space } from '@dxos/client/echo';
|
|
6
|
-
import { type Obj, Query, Relation } from '@dxos/echo';
|
|
7
|
-
import { type TypeSpec, type ValueGenerator, createObjectFactory } from '@dxos/schema/testing';
|
|
8
|
-
import { HasRelationship, Organization, Person, Pipeline } from '@dxos/types';
|
|
9
|
-
import { range } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
const getObject = (objects: Obj.Unknown[]) => objects[Math.floor(Math.random() * objects.length)];
|
|
12
|
-
|
|
13
|
-
const defaultTypes: TypeSpec[] = [
|
|
14
|
-
{ type: Organization.Organization, count: 5 },
|
|
15
|
-
{ type: Pipeline.Pipeline, count: 5 },
|
|
16
|
-
{ type: Person.Person, count: 10 },
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
export type GenerateOptions = {
|
|
20
|
-
spec?: TypeSpec[];
|
|
21
|
-
relations?: {
|
|
22
|
-
count: number;
|
|
23
|
-
kind: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const defaultRelations: GenerateOptions['relations'] = {
|
|
28
|
-
kind: 'friend',
|
|
29
|
-
count: 10,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated Use @dxos/schema.
|
|
34
|
-
*/
|
|
35
|
-
export const generate = async (
|
|
36
|
-
space: Space,
|
|
37
|
-
generator: ValueGenerator,
|
|
38
|
-
{ spec = defaultTypes, relations = defaultRelations }: GenerateOptions = {},
|
|
39
|
-
) => {
|
|
40
|
-
const createObjects = createObjectFactory(space.db, generator);
|
|
41
|
-
await createObjects(spec);
|
|
42
|
-
|
|
43
|
-
// Add relations between objects.
|
|
44
|
-
const contacts = await space.db.query(Query.type(Person.Person)).run();
|
|
45
|
-
for (const _ of range(relations.count)) {
|
|
46
|
-
const source = getObject(contacts);
|
|
47
|
-
const target = getObject(contacts);
|
|
48
|
-
if (source.id !== target.id) {
|
|
49
|
-
space.db.add(
|
|
50
|
-
Relation.make(HasRelationship.HasRelationship, {
|
|
51
|
-
[Relation.Source]: source,
|
|
52
|
-
[Relation.Target]: target,
|
|
53
|
-
kind: relations.kind,
|
|
54
|
-
}),
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
// Copyright 2022 Observable, Inc.
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
import { cluster, curveBundle, hierarchy, lineRadial, select } from 'd3';
|
|
7
|
-
import { type HierarchyNode } from 'd3-hierarchy';
|
|
8
|
-
|
|
9
|
-
import { type TreeOptions } from '../Tree';
|
|
10
|
-
import { type TreeNode } from '../types';
|
|
11
|
-
|
|
12
|
-
// Create hierarchical ID.
|
|
13
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
14
|
-
const getId = (node: HierarchyNode<TreeNode>): string =>
|
|
15
|
-
`${node.parent ? getId(node.parent) + '/' : ''}${node.data.id.slice(0, 4)}`;
|
|
16
|
-
|
|
17
|
-
// https://github.com/d3/d3-hierarchy
|
|
18
|
-
// https://observablehq.com/@d3/hierarchical-edge-bundling?intent=fork
|
|
19
|
-
const HierarchicalEdgeBundling = (s: SVGSVGElement, data: TreeNode, options: TreeOptions) => {
|
|
20
|
-
const svg = select(s);
|
|
21
|
-
svg.selectAll('*').remove();
|
|
22
|
-
|
|
23
|
-
const { radius = 600, padding = 100, slots } = options;
|
|
24
|
-
|
|
25
|
-
// https://d3js.org/d3-hierarchy/hierarchy
|
|
26
|
-
const root = hierarchy(flatten(data));
|
|
27
|
-
// .sort((a, b) => ascending(a.height, b.height) || ascending(getName(a.data), getName(b.data)));
|
|
28
|
-
|
|
29
|
-
const tree = cluster<TreeNode>().size([2 * Math.PI, radius - padding]);
|
|
30
|
-
const layout = tree(addLinks(root));
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
33
|
-
const node = svg
|
|
34
|
-
.append('g')
|
|
35
|
-
.selectAll()
|
|
36
|
-
.data(layout.leaves())
|
|
37
|
-
.join('g')
|
|
38
|
-
.attr('transform', (d) => `rotate(${d.x * (180 / Math.PI) - 90}) translate(${d.y},0)`)
|
|
39
|
-
.append('text')
|
|
40
|
-
.attr('class', slots?.text ?? '')
|
|
41
|
-
.attr('dy', '0.31em') // TODO(burdon): Based on font size.
|
|
42
|
-
.attr('x', (d) => (d.x < Math.PI ? 6 : -6))
|
|
43
|
-
.attr('text-anchor', (d) => (d.x < Math.PI ? 'start' : 'end'))
|
|
44
|
-
.attr('transform', (d) => (d.x >= Math.PI ? 'rotate(180)' : null))
|
|
45
|
-
// .text((d: any) => d.data.id)
|
|
46
|
-
// .each(function (d: any) {
|
|
47
|
-
// d.text = this;
|
|
48
|
-
// })
|
|
49
|
-
// .on('mouseover', overed)
|
|
50
|
-
// .on('mouseout', outed)
|
|
51
|
-
.call(
|
|
52
|
-
(text) => text.text((d: any) => d.data.id.slice(0, 8)),
|
|
53
|
-
// .text((d: any) => `${getId(d)} [${[(d as any).outgoing?.length ?? 0]}]`),
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
// https://d3js.org/d3-shape/radial-line
|
|
57
|
-
const line = lineRadial()
|
|
58
|
-
.curve(curveBundle.beta(0.85))
|
|
59
|
-
.radius((d: any) => d.y)
|
|
60
|
-
.angle((d: any) => d.x);
|
|
61
|
-
|
|
62
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
63
|
-
const links = svg
|
|
64
|
-
.append('g')
|
|
65
|
-
.selectAll()
|
|
66
|
-
.data(layout.leaves().flatMap((leaf: any) => leaf.outgoing))
|
|
67
|
-
.join('path')
|
|
68
|
-
.style('mix-blend-mode', 'multiply')
|
|
69
|
-
.attr('class', slots?.path ?? '')
|
|
70
|
-
.attr('d', ([i, o]) => {
|
|
71
|
-
return line(i.path(o));
|
|
72
|
-
})
|
|
73
|
-
.each(function (d) {
|
|
74
|
-
d.path = this;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// function overed(event: any, d: X) {
|
|
78
|
-
// link.style('mix-blend-mode', null);
|
|
79
|
-
// select(this).attr('font-weight', 'bold');
|
|
80
|
-
// selectAll(d.incoming.map((d) => d.path))
|
|
81
|
-
// .attr('stroke', color.in)
|
|
82
|
-
// .raise();
|
|
83
|
-
// selectAll((d as any).incoming.map(([d]) => d.text))
|
|
84
|
-
// .attr('fill', color.in)
|
|
85
|
-
// .attr('font-weight', 'bold');
|
|
86
|
-
// selectAll(d.outgoing.map((d) => d.path))
|
|
87
|
-
// .attr('stroke', color.out)
|
|
88
|
-
// .raise();
|
|
89
|
-
// selectAll(d.outgoing.map(([, d]) => d.text))
|
|
90
|
-
// .attr('fill', color.out)
|
|
91
|
-
// .attr('font-weight', 'bold');
|
|
92
|
-
// }
|
|
93
|
-
|
|
94
|
-
// function outed(event: any, d: HierarchyNode<Datum>) {
|
|
95
|
-
// // @ts-ignore
|
|
96
|
-
// select(this).attr('font-weight', null);
|
|
97
|
-
// selectAll(d.incoming.map((d) => d.path)).attr('stroke', null);
|
|
98
|
-
// selectAll(d.incoming.map(([d]) => d.text))
|
|
99
|
-
// .attr('fill', null)
|
|
100
|
-
// .attr('font-weight', null);
|
|
101
|
-
// selectAll(d.outgoing.map((d) => d.path)).attr('stroke', null);
|
|
102
|
-
// selectAll(d.outgoing.map(([, d]) => d.text))
|
|
103
|
-
// .attr('fill', null)
|
|
104
|
-
// .attr('font-weight', null);
|
|
105
|
-
// }
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
// Monkey-patch with incoming/outgoing nodes.
|
|
109
|
-
const addLinks = (root: HierarchyNode<TreeNode>) => {
|
|
110
|
-
// Map of nodes indexed by ID.
|
|
111
|
-
const nodes = new Map(root.descendants().map((d) => [d.data.id, d]));
|
|
112
|
-
const parents = root.descendants().reduce((map, d) => {
|
|
113
|
-
if (d.children?.length) {
|
|
114
|
-
map.set(d.data.id, d);
|
|
115
|
-
}
|
|
116
|
-
return map;
|
|
117
|
-
}, new Map<string, HierarchyNode<TreeNode>>());
|
|
118
|
-
|
|
119
|
-
for (const d of root.leaves()) {
|
|
120
|
-
// (d as any).incoming = [];
|
|
121
|
-
const parent = parents.get(d.data.id);
|
|
122
|
-
if (parent) {
|
|
123
|
-
// Skip the first node which is a placeholder created by flatten().
|
|
124
|
-
(d as any).outgoing =
|
|
125
|
-
parent.data.children?.slice(1).map((child) => {
|
|
126
|
-
return [d, nodes.get(child.id)!];
|
|
127
|
-
}) ?? [];
|
|
128
|
-
} else {
|
|
129
|
-
(d as any).outgoing = [];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// for (const d of root.leaves()) {
|
|
134
|
-
// for (const [_, o] of (d as any).outgoing) {
|
|
135
|
-
// o.incoming.push(o);
|
|
136
|
-
// }
|
|
137
|
-
// }
|
|
138
|
-
|
|
139
|
-
return root;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* We are using a hierarchy in order to group nodes by parent, but we want the parent
|
|
144
|
-
* nodes to be positioned at the first level along with all descendents.
|
|
145
|
-
* So we add a placeholder for all parents at the head of each group.
|
|
146
|
-
* @param node
|
|
147
|
-
*/
|
|
148
|
-
const flatten = (node: TreeNode) => {
|
|
149
|
-
const clone: TreeNode = {
|
|
150
|
-
id: node.id,
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
// TODO(burdon): NOTE: Should exclude schema (since requires a tree).
|
|
154
|
-
if (node.children?.length) {
|
|
155
|
-
const children = node.children.map((child) => flatten(child));
|
|
156
|
-
clone.children = [{ id: node.id }, ...children];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return clone;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export default HierarchicalEdgeBundling;
|