@dxos/plugin-explorer 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc

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 (181) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs +141 -0
  3. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs.map +7 -0
  4. package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
  5. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  6. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  7. package/dist/lib/{browser/types/index.mjs → neutral/chunk-7SPMPHRS.mjs} +7 -7
  8. package/dist/lib/neutral/chunk-7SPMPHRS.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
  10. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
  11. package/dist/lib/{browser → neutral}/components/index.mjs +661 -297
  12. package/dist/lib/{browser → neutral}/components/index.mjs.map +4 -4
  13. package/dist/lib/neutral/containers/index.mjs +9 -0
  14. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  15. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  16. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  17. package/dist/lib/{browser → neutral}/hooks/index.mjs +11 -6
  18. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  19. package/dist/lib/neutral/index.mjs +14 -0
  20. package/dist/lib/neutral/meta.json +1 -0
  21. package/dist/lib/{browser/index.mjs → neutral/plugin.mjs} +3 -4
  22. package/dist/lib/{browser/index.mjs.map → neutral/plugin.mjs.map} +3 -3
  23. package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
  24. package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
  25. package/dist/lib/neutral/testing.mjs +8 -0
  26. package/dist/lib/neutral/testing.mjs.map +7 -0
  27. package/dist/lib/neutral/translations.mjs +33 -0
  28. package/dist/lib/neutral/translations.mjs.map +7 -0
  29. package/dist/lib/neutral/types/index.mjs +10 -0
  30. package/dist/lib/neutral/types/index.mjs.map +7 -0
  31. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  33. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  34. package/dist/types/src/capabilities/index.d.ts +6 -0
  35. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  36. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  37. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  39. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  40. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  41. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  42. package/dist/types/src/components/Graph/{D3ForceGraph.stories.d.ts → CanvasForceGraph.stories.d.ts} +2 -2
  43. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  44. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  45. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  46. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +3 -1
  47. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  48. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
  49. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  50. package/dist/types/src/components/Graph/index.d.ts +1 -1
  51. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  52. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  53. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  54. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  55. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  56. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  57. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/Tree/index.d.ts +3 -0
  59. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  60. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +35 -2
  61. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  62. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  63. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  64. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  65. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  66. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  67. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  68. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  69. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  70. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  71. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  72. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  73. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  74. package/dist/types/src/components/Tree/space-graph-adapter.d.ts +32 -0
  75. package/dist/types/src/components/Tree/space-graph-adapter.d.ts.map +1 -0
  76. package/dist/types/src/components/Tree/testing/index.d.ts +1 -0
  77. package/dist/types/src/components/Tree/testing/index.d.ts.map +1 -1
  78. package/dist/types/src/components/Tree/testing/relations.d.ts +47 -0
  79. package/dist/types/src/components/Tree/testing/relations.d.ts.map +1 -0
  80. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  81. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  82. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
  83. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  84. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +24 -0
  85. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  86. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  87. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  88. package/dist/types/src/containers/index.d.ts +1 -1
  89. package/dist/types/src/containers/index.d.ts.map +1 -1
  90. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  91. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  92. package/dist/types/src/index.d.ts +1 -2
  93. package/dist/types/src/index.d.ts.map +1 -1
  94. package/dist/types/src/plugin.d.ts +3 -0
  95. package/dist/types/src/plugin.d.ts.map +1 -0
  96. package/dist/types/src/testing.d.ts +2 -0
  97. package/dist/types/src/testing.d.ts.map +1 -0
  98. package/dist/types/src/types/Graph.d.ts +1 -2
  99. package/dist/types/src/types/Graph.d.ts.map +1 -1
  100. package/dist/types/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +94 -67
  102. package/src/ExplorerPlugin.test.ts +2 -2
  103. package/src/ExplorerPlugin.tsx +3 -33
  104. package/src/capabilities/create-object.ts +36 -0
  105. package/src/capabilities/index.ts +1 -0
  106. package/src/capabilities/react-surface.tsx +2 -2
  107. package/src/components/Chart/Chart.stories.tsx +14 -20
  108. package/src/components/Globe/Globe.stories.tsx +17 -19
  109. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  110. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  111. package/src/components/Graph/ForceGraph.stories.tsx +69 -37
  112. package/src/components/Graph/ForceGraph.tsx +104 -85
  113. package/src/components/Graph/index.ts +1 -1
  114. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  115. package/src/components/Tree/Tree.stories.tsx +17 -38
  116. package/src/components/Tree/Tree.tsx +69 -100
  117. package/src/components/Tree/index.ts +3 -0
  118. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +277 -0
  119. package/src/components/Tree/layout/RadialTree.tsx +237 -0
  120. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  121. package/src/components/Tree/layout/hierarchy.ts +32 -0
  122. package/src/components/Tree/layout/index.ts +5 -5
  123. package/src/components/Tree/layout/slots.ts +19 -0
  124. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  125. package/src/components/Tree/space-graph-adapter.ts +96 -0
  126. package/src/components/Tree/testing/index.ts +1 -0
  127. package/src/components/Tree/testing/relations.ts +182 -0
  128. package/src/components/Tree/types/types.ts +38 -29
  129. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +119 -0
  130. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +153 -0
  131. package/src/containers/ExplorerArticle/index.ts +5 -0
  132. package/src/containers/index.ts +1 -1
  133. package/src/hooks/useGraphModel.ts +10 -6
  134. package/src/index.ts +1 -6
  135. package/src/plugin.ts +9 -0
  136. package/src/testing.ts +7 -0
  137. package/src/types/ExplorerAction.ts +1 -1
  138. package/src/types/Graph.ts +1 -2
  139. package/dist/lib/browser/hooks/index.mjs.map +0 -7
  140. package/dist/lib/browser/meta.json +0 -1
  141. package/dist/lib/browser/types/index.mjs.map +0 -7
  142. package/dist/lib/node-esm/chunk-6EUBRHHX.mjs +0 -26
  143. package/dist/lib/node-esm/chunk-6EUBRHHX.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  145. package/dist/lib/node-esm/components/index.mjs +0 -11255
  146. package/dist/lib/node-esm/components/index.mjs.map +0 -7
  147. package/dist/lib/node-esm/hooks/index.mjs +0 -41
  148. package/dist/lib/node-esm/hooks/index.mjs.map +0 -7
  149. package/dist/lib/node-esm/index.mjs +0 -14
  150. package/dist/lib/node-esm/index.mjs.map +0 -7
  151. package/dist/lib/node-esm/meta.json +0 -1
  152. package/dist/lib/node-esm/meta.mjs +0 -9
  153. package/dist/lib/node-esm/types/index.mjs +0 -73
  154. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  155. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -15
  156. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  157. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  158. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  159. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  160. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  161. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
  162. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
  163. package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -2
  164. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
  165. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
  166. package/src/components/Graph/D3ForceGraph.tsx +0 -108
  167. package/src/components/Graph/testing.ts +0 -58
  168. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  169. package/src/components/Tree/layout/RadialTree.ts +0 -94
  170. package/src/components/Tree/layout/TidyTree.ts +0 -101
  171. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
  172. package/src/containers/ExplorerContainer/index.ts +0 -5
  173. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  174. /package/dist/lib/{browser → neutral}/chunk-HPIS2WXY.mjs +0 -0
  175. /package/dist/lib/{browser → neutral}/chunk-HPIS2WXY.mjs.map +0 -0
  176. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  177. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  178. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/index.mjs.map} +0 -0
  179. /package/dist/lib/{browser → neutral}/meta.mjs +0 -0
  180. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  181. /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,141 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/ExplorerArticle/ExplorerArticle.tsx
4
+ import { useAtomValue } from "@effect-atom/atom-react";
5
+ import React, { useCallback, useEffect, useMemo, useState } from "react";
6
+ import { Obj } from "@dxos/echo";
7
+ import { QueryBuilder } from "@dxos/echo-query";
8
+ import { useObject } from "@dxos/react-client/echo";
9
+ import { DxAnchorActivate, Icon, Panel, Toolbar } from "@dxos/react-ui";
10
+ import { QueryEditor } from "@dxos/react-ui-components";
11
+ import { ForceGraph } from "#components";
12
+ import { HierarchicalEdgeBundling, RadialTree, spaceGraphToHierarchy } from "#components";
13
+ import { useGraphModel } from "#hooks";
14
+ var VARIANTS = [
15
+ {
16
+ value: "force",
17
+ icon: "ph--graph--regular",
18
+ label: "Force-directed"
19
+ },
20
+ {
21
+ value: "cluster",
22
+ icon: "ph--asterisk-simple--regular",
23
+ label: "Radial cluster"
24
+ },
25
+ {
26
+ value: "bundle",
27
+ icon: "ph--circles-three-plus--regular",
28
+ label: "Edge bundling"
29
+ }
30
+ ];
31
+ var ExplorerArticle = ({ role, subject, variant }) => {
32
+ const [view] = useObject(subject);
33
+ const db = view && Obj.getDatabase(view);
34
+ const [filter, setFilter] = useState();
35
+ const model = useGraphModel(db, filter);
36
+ const builder = useMemo(() => new QueryBuilder(), []);
37
+ const handleChange = useCallback((value) => {
38
+ setFilter(builder.build(value).filter);
39
+ }, []);
40
+ const [selected, setSelected] = useState(isVariant(variant) ? variant : "force");
41
+ useEffect(() => {
42
+ if (isVariant(variant)) {
43
+ setSelected(variant);
44
+ }
45
+ }, [
46
+ variant
47
+ ]);
48
+ const handleVariantChange = useCallback((value) => {
49
+ if (isVariant(value)) {
50
+ setSelected(value);
51
+ }
52
+ }, []);
53
+ const handleHoverPreview = useCallback((node, event) => {
54
+ if (!node || !event) {
55
+ return;
56
+ }
57
+ const obj = node.data;
58
+ if (!obj || !Obj.isObject(obj)) {
59
+ return;
60
+ }
61
+ const dxn = Obj.getDXN(obj)?.toString();
62
+ if (!dxn) {
63
+ return;
64
+ }
65
+ const target = event.target;
66
+ target.dispatchEvent(new DxAnchorActivate({
67
+ dxn,
68
+ label: Obj.getLabel(obj) ?? dxn,
69
+ trigger: target,
70
+ kind: "card"
71
+ }));
72
+ }, []);
73
+ const showToolbar = role === "article";
74
+ if (!db || !model) {
75
+ return null;
76
+ }
77
+ return /* @__PURE__ */ React.createElement(Panel.Root, {
78
+ role
79
+ }, showToolbar && /* @__PURE__ */ React.createElement(Panel.Toolbar, {
80
+ asChild: true
81
+ }, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(QueryEditor, {
82
+ db,
83
+ onChange: handleChange
84
+ }), /* @__PURE__ */ React.createElement(Toolbar.ToggleGroup, {
85
+ type: "single",
86
+ value: selected,
87
+ onValueChange: handleVariantChange
88
+ }, VARIANTS.map(({ value, icon, label }) => /* @__PURE__ */ React.createElement(Toolbar.ToggleGroupItem, {
89
+ key: value,
90
+ value,
91
+ "aria-label": label,
92
+ title: label
93
+ }, /* @__PURE__ */ React.createElement(Icon, {
94
+ icon,
95
+ size: 4
96
+ })))))), /* @__PURE__ */ React.createElement(Panel.Content, null, /* @__PURE__ */ React.createElement(Visualization, {
97
+ variant: selected,
98
+ model,
99
+ onNodeHover: handleHoverPreview
100
+ })));
101
+ };
102
+ var isVariant = (value) => value === "force" || value === "cluster" || value === "bundle";
103
+ var Visualization = ({ variant, model, onNodeHover }) => {
104
+ if (variant === "force") {
105
+ return /* @__PURE__ */ React.createElement(ForceGraph, {
106
+ model,
107
+ onInspect: (node, event) => onNodeHover?.({
108
+ id: node.id,
109
+ data: node.data?.data?.object
110
+ }, event)
111
+ });
112
+ }
113
+ return /* @__PURE__ */ React.createElement(HierarchyVisualization, {
114
+ variant,
115
+ model,
116
+ onNodeHover
117
+ });
118
+ };
119
+ var HierarchyVisualization = ({ variant, model, onNodeHover }) => {
120
+ const graphSnapshot = useAtomValue(model.graphAtom);
121
+ const { tree, edges } = useMemo(() => spaceGraphToHierarchy(model), [
122
+ model,
123
+ graphSnapshot
124
+ ]);
125
+ if (variant === "cluster") {
126
+ return /* @__PURE__ */ React.createElement(RadialTree, {
127
+ data: tree,
128
+ cluster: true,
129
+ onNodeHover
130
+ });
131
+ }
132
+ return /* @__PURE__ */ React.createElement(HierarchicalEdgeBundling, {
133
+ data: tree,
134
+ edges,
135
+ onNodeHover
136
+ });
137
+ };
138
+ export {
139
+ ExplorerArticle as default
140
+ };
141
+ //# sourceMappingURL=ExplorerArticle-EW2MBCRK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/ExplorerArticle/ExplorerArticle.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Filter, Obj, type View } from '@dxos/echo';\nimport { QueryBuilder } from '@dxos/echo-query';\nimport { useObject } from '@dxos/react-client/echo';\nimport { DxAnchorActivate, Icon, Panel, Toolbar } from '@dxos/react-ui';\nimport { QueryEditor, type QueryEditorProps } from '@dxos/react-ui-components';\n\nimport { ForceGraph } from '#components';\nimport { HierarchicalEdgeBundling, RadialTree, spaceGraphToHierarchy, type TreeNode } from '#components';\nimport { useGraphModel } from '#hooks';\n\n/** Visualization variants exposed by `ExplorerArticle`. */\nexport type ExplorerArticleVariant = 'force' | 'cluster' | 'bundle';\n\nconst VARIANTS: { value: ExplorerArticleVariant; icon: string; label: string }[] = [\n {\n value: 'force',\n icon: 'ph--graph--regular',\n label: 'Force-directed',\n },\n {\n value: 'cluster',\n icon: 'ph--asterisk-simple--regular',\n label: 'Radial cluster',\n },\n {\n value: 'bundle',\n icon: 'ph--circles-three-plus--regular',\n label: 'Edge bundling',\n },\n];\n\nexport type ExplorerArticleProps = AppSurface.ObjectArticleProps<View.View>;\n\nexport const ExplorerArticle = ({ role, subject, variant }: ExplorerArticleProps) => {\n const [view] = useObject(subject);\n const db = view && Obj.getDatabase(view);\n const [filter, setFilter] = useState<Filter.Any>();\n const model = useGraphModel(db, filter);\n\n const builder = useMemo(() => new QueryBuilder(), []);\n const handleChange = useCallback<NonNullable<QueryEditorProps['onChange']>>((value) => {\n setFilter(builder.build(value).filter);\n }, []);\n\n // The `variant` prop is the initial value; user can toggle via the toolbar tabs.\n const [selected, setSelected] = useState<ExplorerArticleVariant>(isVariant(variant) ? variant : 'force');\n useEffect(() => {\n if (isVariant(variant)) {\n setSelected(variant);\n }\n }, [variant]);\n const handleVariantChange = useCallback((value: string) => {\n if (isVariant(value)) {\n setSelected(value);\n }\n }, []);\n\n const handleHoverPreview = useCallback((node: TreeNode | null, event?: MouseEvent) => {\n if (!node || !event) {\n return;\n }\n const obj = node.data;\n if (!obj || !Obj.isObject(obj)) {\n return;\n }\n const dxn = Obj.getDXN(obj)?.toString();\n if (!dxn) {\n return;\n }\n const target = event.target as HTMLElement;\n target.dispatchEvent(\n new DxAnchorActivate({\n dxn,\n label: Obj.getLabel(obj) ?? dxn,\n trigger: target,\n kind: 'card',\n }),\n );\n }, []);\n\n const showToolbar = role === 'article';\n\n if (!db || !model) {\n return null;\n }\n\n return (\n <Panel.Root role={role}>\n {showToolbar && (\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <QueryEditor db={db} onChange={handleChange} />\n <Toolbar.ToggleGroup type='single' value={selected} onValueChange={handleVariantChange}>\n {VARIANTS.map(({ value, icon, label }) => (\n <Toolbar.ToggleGroupItem key={value} value={value} aria-label={label} title={label}>\n <Icon icon={icon} size={4} />\n </Toolbar.ToggleGroupItem>\n ))}\n </Toolbar.ToggleGroup>\n </Toolbar.Root>\n </Panel.Toolbar>\n )}\n <Panel.Content>\n <Visualization variant={selected} model={model} onNodeHover={handleHoverPreview} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n\nconst isVariant = (value: unknown): value is ExplorerArticleVariant =>\n value === 'force' || value === 'cluster' || value === 'bundle';\n\ntype VisualizationProps = {\n variant: ExplorerArticleVariant;\n model: NonNullable<ReturnType<typeof useGraphModel>>;\n onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;\n};\n\nconst Visualization = ({ variant, model, onNodeHover }: VisualizationProps) => {\n if (variant === 'force') {\n // ForceGraph subscribes to model.graphAtom internally; don't re-render the wrapper on every tick.\n return (\n <ForceGraph\n model={model}\n onInspect={(node, event) => onNodeHover?.({ id: node.id, data: node.data?.data?.object }, event)}\n />\n );\n }\n\n return <HierarchyVisualization variant={variant} model={model} onNodeHover={onNodeHover} />;\n};\n\n/**\n * Read from the model's reactive graph atom so the hierarchy is rebuilt as objects/relations stream in.\n */\nconst HierarchyVisualization = ({ variant, model, onNodeHover }: VisualizationProps) => {\n // Capture the atom snapshot so the memo's dep list explicitly tracks each push from the atom.\n const graphSnapshot = useAtomValue(model.graphAtom);\n const { tree, edges } = useMemo(() => spaceGraphToHierarchy(model), [model, graphSnapshot]);\n if (variant === 'cluster') {\n return <RadialTree data={tree} cluster onNodeHover={onNodeHover} />;\n }\n\n return <HierarchicalEdgeBundling data={tree} edges={edges} onNodeHover={onNodeHover} />;\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["useAtomValue", "React", "useCallback", "useEffect", "useMemo", "useState", "Obj", "QueryBuilder", "useObject", "DxAnchorActivate", "Icon", "Panel", "Toolbar", "QueryEditor", "ForceGraph", "HierarchicalEdgeBundling", "RadialTree", "spaceGraphToHierarchy", "useGraphModel", "VARIANTS", "value", "icon", "label", "ExplorerArticle", "role", "subject", "variant", "view", "db", "getDatabase", "filter", "setFilter", "model", "builder", "handleChange", "build", "selected", "setSelected", "isVariant", "handleVariantChange", "handleHoverPreview", "node", "event", "obj", "data", "isObject", "dxn", "getDXN", "toString", "target", "dispatchEvent", "getLabel", "trigger", "kind", "showToolbar", "Root", "asChild", "onChange", "ToggleGroup", "type", "onValueChange", "map", "ToggleGroupItem", "key", "aria-label", "title", "size", "Content", "Visualization", "onNodeHover", "onInspect", "id", "object", "HierarchyVisualization", "graphSnapshot", "graphAtom", "tree", "edges", "cluster"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import {
2
+ ExplorerPlugin,
3
+ ExplorerPlugin_default
4
+ } from "./chunk-GRJXLL4Z.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
6
+ export {
7
+ ExplorerPlugin,
8
+ ExplorerPlugin_default as default
9
+ };
10
+ //# sourceMappingURL=ExplorerPlugin.mjs.map
@@ -0,0 +1,11 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-F6TKVAGV.mjs"));
6
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-APBW2VQG.mjs"));
7
+ export {
8
+ CreateObject,
9
+ ReactSurface
10
+ };
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "CreateObject", "lazy", "ReactSurface"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __export
3
- } from "../chunk-J5LGTIGS.mjs";
3
+ } from "./chunk-J5LGTIGS.mjs";
4
4
 
5
5
  // src/types/ExplorerAction.ts
6
6
  var ExplorerAction_exports = {};
@@ -8,7 +8,7 @@ __export(ExplorerAction_exports, {
8
8
  GraphProps: () => GraphProps
9
9
  });
10
10
  import * as Schema from "effect/Schema";
11
- import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
11
+ import { TypeInputOptionsAnnotation } from "@dxos/plugin-space";
12
12
  var GraphProps = Schema.Struct({
13
13
  name: Schema.optional(Schema.String),
14
14
  // TODO(wittjosiah): This should be a query input instead.
@@ -32,8 +32,7 @@ __export(Graph_exports, {
32
32
  make: () => make
33
33
  });
34
34
  import * as Schema2 from "effect/Schema";
35
- import { Annotation, Filter, Obj, Query, QueryAST, Ref, Type } from "@dxos/echo";
36
- import { View } from "@dxos/echo";
35
+ import { Annotation, Filter, Obj, Query, QueryAST, Ref, Type, View } from "@dxos/echo";
37
36
  import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
38
37
  import { ViewAnnotation } from "@dxos/schema";
39
38
  var GraphSchema = Schema2.Struct({
@@ -65,8 +64,9 @@ var make = ({ name, query = {
65
64
  query
66
65
  });
67
66
  };
67
+
68
68
  export {
69
- ExplorerAction_exports as ExplorerAction,
70
- Graph_exports as Graph
69
+ ExplorerAction_exports,
70
+ Graph_exports
71
71
  };
72
- //# sourceMappingURL=index.mjs.map
72
+ //# sourceMappingURL=chunk-7SPMPHRS.mjs.map
@@ -0,0 +1,7 @@
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';\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, 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(['view']),\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,GAC1CT,2BAA2BU,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;EACT,CAAA,GACOR,eAAQ;AAEnB,CAAA;;;ACnBA;;;;;AAIA,YAAYS,aAAY;AAExB,SAASC,YAAYC,QAAQC,KAAKC,OAAOC,UAAUC,KAAKC,MAAMC,YAAY;AAC1E,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAE/B,IAAMC,cAAqBC,eAAO;EAChCC,MAAaC,iBAAgBC,cAAM;EAEnCC,MAAMX,IAAIA,IAAIE,KAAKA,IAAI,EAAEU,KAAKT,oBAAoBU,IAAI,KAAA,CAAA;EAEtDC,OAAcP,eAAO;IACnBQ,KAAYN,iBAAgBC,cAAM;IAClCM,KAAKjB,SAASD;EAChB,CAAA,EAAGc,KAAKT,oBAAoBU,IAAI,KAAA,CAAA;AAClC,CAAA,EAAGD,KACDX,KAAKgB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAf,gBAAgBS,IAAI;EAAC;CAAO,GAC5BR,eAAeQ,IAAI;EAAC;CAAO,GAC3BlB,WAAWyB,eAAeP,IAAI;EAC5BQ,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAGK,IAAMC,QAAyBjB;AAS/B,IAAMkB,OAAO,CAAC,EACnBhB,MACAM,QAAQ;EAAEC,KAAK;EAAIC,KAAKlB,MAAM2B,OAAO7B,OAAO8B,QAAO,CAAA,EAAIV;AAAI,GAC3DL,KAAI,MACM;AACV,SAAOd,IAAI2B,KAAKD,OAAO;IAAEf;IAAMG,MAAMX,IAAIwB,KAAKb,IAAAA;IAAOG;EAAM,CAAA;AAC7D;",
6
+ "names": ["Schema", "TypeInputOptionsAnnotation", "GraphProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "set", "location", "kind", "Schema", "Annotation", "Filter", "Obj", "Query", "QueryAST", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "GraphSchema", "Struct", "name", "optional", "String", "view", "pipe", "set", "query", "raw", "ast", "object", "typename", "version", "IconAnnotation", "icon", "hue", "Graph", "make", "select", "nothing"]
7
+ }
@@ -0,0 +1,25 @@
1
+ // src/ExplorerPlugin.tsx
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { CreateObject, ReactSurface } from "#capabilities";
5
+ import { meta } from "#meta";
6
+ import { translations } from "#translations";
7
+ import { Graph } from "#types";
8
+ var ExplorerPlugin = Plugin.define(meta).pipe(AppPlugin.addCreateObjectModule({
9
+ activate: CreateObject
10
+ }), AppPlugin.addSchemaModule({
11
+ schema: [
12
+ Graph.Graph
13
+ ]
14
+ }), AppPlugin.addSurfaceModule({
15
+ activate: ReactSurface
16
+ }), AppPlugin.addTranslationsModule({
17
+ translations
18
+ }), Plugin.make);
19
+ var ExplorerPlugin_default = ExplorerPlugin;
20
+
21
+ export {
22
+ ExplorerPlugin,
23
+ ExplorerPlugin_default
24
+ };
25
+ //# sourceMappingURL=chunk-GRJXLL4Z.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ExplorerPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Graph } from '#types';\n\nexport const ExplorerPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default ExplorerPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,aAAa;AAEf,IAAMC,iBAAiBP,OAAOQ,OAAOJ,IAAAA,EAAMK,KAChDR,UAAUS,sBAAsB;EAAEC,UAAUT;AAAa,CAAA,GACzDD,UAAUW,gBAAgB;EAAEC,QAAQ;IAACP,MAAMA;;AAAO,CAAA,GAClDL,UAAUa,iBAAiB;EAAEH,UAAUR;AAAa,CAAA,GACpDF,UAAUc,sBAAsB;EAAEV;AAAa,CAAA,GAC/CL,OAAOgB,IAAI;AAGb,IAAA,yBAAeT;",
6
+ "names": ["Plugin", "AppPlugin", "CreateObject", "ReactSurface", "meta", "translations", "Graph", "ExplorerPlugin", "define", "pipe", "addCreateObjectModule", "activate", "addSchemaModule", "schema", "addSurfaceModule", "addTranslationsModule", "make"]
7
+ }