@dxos/plugin-explorer 0.10.0 → 0.11.0

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 (105) hide show
  1. package/dist/lib/ExplorerPlugin.mjs +2 -0
  2. package/dist/lib/capabilities.mjs +9 -0
  3. package/dist/lib/capabilities.mjs.map +1 -0
  4. package/dist/lib/chunk-ExplorerArticle.mjs +90 -0
  5. package/dist/lib/chunk-ExplorerArticle.mjs.map +1 -0
  6. package/dist/lib/chunk-ExplorerPlugin.mjs +18 -0
  7. package/dist/lib/chunk-ExplorerPlugin.mjs.map +1 -0
  8. package/dist/lib/chunk-NeighborhoodCompanion.mjs +83 -0
  9. package/dist/lib/chunk-NeighborhoodCompanion.mjs.map +1 -0
  10. package/dist/lib/chunk-app-graph-builder.mjs +29 -0
  11. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  12. package/dist/lib/chunk-create-object.mjs +35 -0
  13. package/dist/lib/chunk-create-object.mjs.map +1 -0
  14. package/dist/lib/{neutral/chunk-C56B464A.mjs → chunk-meta.mjs} +20 -28
  15. package/dist/lib/chunk-meta.mjs.map +1 -0
  16. package/dist/lib/chunk-react-surface.mjs +29 -0
  17. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  18. package/dist/lib/chunk-types.mjs +60 -0
  19. package/dist/lib/chunk-types.mjs.map +1 -0
  20. package/dist/lib/chunk-types2.mjs +231 -0
  21. package/dist/lib/chunk-types2.mjs.map +1 -0
  22. package/dist/lib/components.mjs +12314 -0
  23. package/dist/lib/components.mjs.map +1 -0
  24. package/dist/lib/containers.mjs +8 -0
  25. package/dist/lib/containers.mjs.map +1 -0
  26. package/dist/lib/hooks.mjs +101 -0
  27. package/dist/lib/hooks.mjs.map +1 -0
  28. package/dist/lib/index.mjs +3 -0
  29. package/dist/lib/meta.mjs +2 -0
  30. package/dist/lib/plugin.mjs +8 -0
  31. package/dist/lib/plugin.mjs.map +1 -0
  32. package/dist/lib/testing.mjs +118 -0
  33. package/dist/lib/testing.mjs.map +1 -0
  34. package/dist/lib/translations.mjs +29 -0
  35. package/dist/lib/translations.mjs.map +1 -0
  36. package/dist/lib/types.mjs +2 -0
  37. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  38. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/create-object.d.ts +1 -1
  40. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  41. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  42. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +1 -1
  43. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -1
  44. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +1 -1
  45. package/dist/types/src/components/Graph/ForceGraph.d.ts +1 -1
  46. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  47. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +1 -1
  48. package/dist/types/src/components/Visualization/Visualization.d.ts +1 -1
  49. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +4 -1
  50. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -1
  51. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -1
  52. package/dist/types/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.d.ts +4 -5
  53. package/dist/types/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.d.ts.map +1 -1
  54. package/dist/types/src/types/Graph.d.ts +1 -1
  55. package/dist/types/tsconfig.tsbuildinfo +1 -1
  56. package/dx.config.ts +1 -0
  57. package/package.json +49 -47
  58. package/src/capabilities/app-graph-builder.ts +1 -2
  59. package/src/capabilities/{react-surface.tsx → react-surface.ts} +4 -7
  60. package/src/components/Visualization/Visualization.stories.tsx +2 -2
  61. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +2 -1
  62. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +5 -3
  63. package/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx +5 -3
  64. package/dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs +0 -101
  65. package/dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs.map +0 -7
  66. package/dist/lib/neutral/ExplorerPlugin.mjs +0 -10
  67. package/dist/lib/neutral/ExplorerPlugin.mjs.map +0 -7
  68. package/dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs +0 -90
  69. package/dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs.map +0 -7
  70. package/dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs +0 -37
  71. package/dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs.map +0 -7
  72. package/dist/lib/neutral/capabilities/index.mjs +0 -13
  73. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  74. package/dist/lib/neutral/chunk-4F6AT7RA.mjs +0 -39
  75. package/dist/lib/neutral/chunk-4F6AT7RA.mjs.map +0 -7
  76. package/dist/lib/neutral/chunk-C56B464A.mjs.map +0 -7
  77. package/dist/lib/neutral/chunk-EZ52JY7X.mjs +0 -290
  78. package/dist/lib/neutral/chunk-EZ52JY7X.mjs.map +0 -7
  79. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  80. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  81. package/dist/lib/neutral/chunk-TTFPTHAQ.mjs +0 -69
  82. package/dist/lib/neutral/chunk-TTFPTHAQ.mjs.map +0 -7
  83. package/dist/lib/neutral/components/index.mjs +0 -11591
  84. package/dist/lib/neutral/components/index.mjs.map +0 -7
  85. package/dist/lib/neutral/containers/index.mjs +0 -11
  86. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  87. package/dist/lib/neutral/create-object-WKIN3OB6.mjs +0 -38
  88. package/dist/lib/neutral/create-object-WKIN3OB6.mjs.map +0 -7
  89. package/dist/lib/neutral/hooks/index.mjs +0 -108
  90. package/dist/lib/neutral/hooks/index.mjs.map +0 -7
  91. package/dist/lib/neutral/index.mjs +0 -14
  92. package/dist/lib/neutral/index.mjs.map +0 -7
  93. package/dist/lib/neutral/meta.json +0 -1
  94. package/dist/lib/neutral/meta.mjs +0 -8
  95. package/dist/lib/neutral/meta.mjs.map +0 -7
  96. package/dist/lib/neutral/plugin.mjs +0 -12
  97. package/dist/lib/neutral/plugin.mjs.map +0 -7
  98. package/dist/lib/neutral/react-surface-EWPG5PUQ.mjs +0 -39
  99. package/dist/lib/neutral/react-surface-EWPG5PUQ.mjs.map +0 -7
  100. package/dist/lib/neutral/testing/index.mjs +0 -139
  101. package/dist/lib/neutral/testing/index.mjs.map +0 -7
  102. package/dist/lib/neutral/translations.mjs +0 -36
  103. package/dist/lib/neutral/translations.mjs.map +0 -7
  104. package/dist/lib/neutral/types/index.mjs +0 -10
  105. package/dist/lib/neutral/types/index.mjs.map +0 -7
@@ -0,0 +1,231 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { DXN, Key, Obj, Ref, Type } from "@dxos/echo";
3
+ import { TestSchema } from "@dxos/echo/testing";
4
+ import { invariant } from "@dxos/invariant";
5
+ //#region src/components/Tree/types/tree.ts
6
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-explorer/src/components/Tree/types/tree.ts";
7
+ var TreeNodeType = Schema.Struct({
8
+ id: Key.EntityId,
9
+ children: Schema.mutable(Schema.Array(Key.EntityId)),
10
+ data: Schema.mutable(Schema.Record({
11
+ key: Schema.String,
12
+ value: Schema.Any
13
+ })),
14
+ ref: Schema.optional(Ref.Ref(TestSchema.Expando))
15
+ }).pipe(Schema.mutable);
16
+ var TreeType = class extends Type.makeObject(DXN.make("org.dxos.type.tree", "0.1.0"))(Schema.Struct({
17
+ root: Key.EntityId,
18
+ nodes: Schema.mutable(Schema.Record({
19
+ key: Key.EntityId,
20
+ value: TreeNodeType
21
+ }))
22
+ })) {};
23
+ /**
24
+ * Wrapper object for tree.
25
+ */
26
+ var Tree = class Tree {
27
+ static create = () => {
28
+ const id = Key.EntityId.random();
29
+ return Obj.make(TreeType, {
30
+ root: id,
31
+ nodes: { [id]: {
32
+ id,
33
+ children: [],
34
+ data: { text: "" }
35
+ } }
36
+ });
37
+ };
38
+ _tree;
39
+ constructor(tree) {
40
+ this._tree = tree ?? Tree.create();
41
+ }
42
+ get tree() {
43
+ return this._tree;
44
+ }
45
+ get size() {
46
+ return Object.keys(this._tree.nodes).length;
47
+ }
48
+ get root() {
49
+ return this.getNode(this._tree.root);
50
+ }
51
+ /**
52
+ * Recursively traverse the tree until the callback returns a value.
53
+ */
54
+ tranverse(callback, root = this._tree.root, depth = 0) {
55
+ const node = this._tree.nodes[root];
56
+ const result = callback(node, depth);
57
+ if (result !== void 0) return result;
58
+ for (const childId of node.children) {
59
+ const result = this.tranverse(callback, childId, depth + 1);
60
+ if (result !== void 0) return result;
61
+ }
62
+ }
63
+ getNode(id) {
64
+ const node = this._tree.nodes[id];
65
+ invariant(node, void 0, {
66
+ "~LogMeta": "~LogMeta",
67
+ F: __dxlog_file,
68
+ L: 94,
69
+ S: this,
70
+ A: ["node", ""]
71
+ });
72
+ return node;
73
+ }
74
+ /**
75
+ * Get the children of a node.
76
+ */
77
+ getChildNodes(node) {
78
+ return node.children.map((id) => this.getNode(id));
79
+ }
80
+ /**
81
+ * Get the parent of a node.
82
+ */
83
+ getParent(node) {
84
+ return this.tranverse((n) => {
85
+ if (n.children.includes(node.id)) return n;
86
+ }) ?? null;
87
+ }
88
+ /**
89
+ * Get the next node in the tree.
90
+ */
91
+ getNext(node, hierarchical = true) {
92
+ if (hierarchical && node.children.length) return this.getChildNodes(node)[0];
93
+ else {
94
+ const parent = this.getParent(node);
95
+ if (parent) {
96
+ const idx = this.getChildNodes(parent).findIndex(({ id }) => id === node.id);
97
+ if (idx < parent.children.length - 1) return this.getNode(parent.children[idx + 1]);
98
+ else return this.getNext(parent, false);
99
+ }
100
+ }
101
+ }
102
+ /**
103
+ * Get the previous node in the tree.
104
+ */
105
+ getPrevious(node, hierarchical = true) {
106
+ const parent = this.getParent(node);
107
+ const idx = this.getChildNodes(parent).findIndex(({ id }) => id === node.id);
108
+ if (idx === 0) {
109
+ if (hierarchical) return parent;
110
+ } else {
111
+ const previous = this.getNode(parent.children[idx - 1]);
112
+ if (hierarchical && previous.children.length) return this.getLastDescendent(previous);
113
+ return previous;
114
+ }
115
+ }
116
+ /**
117
+ * Get the last descendent of a node.
118
+ */
119
+ getLastDescendent(node) {
120
+ const children = this.getChildNodes(node);
121
+ const last = children.length ? children[children.length - 1] : void 0;
122
+ if (last) return this.getLastDescendent(last);
123
+ return node;
124
+ }
125
+ /**
126
+ * Clear tree.
127
+ */
128
+ clear() {
129
+ const root = this._tree.nodes[this._tree.root];
130
+ root.children.length = 0;
131
+ Obj.update(this._tree, (obj) => {
132
+ obj.nodes = { [root.id]: root };
133
+ });
134
+ }
135
+ /**
136
+ * Add node.
137
+ */
138
+ addNode(parent, node, index) {
139
+ if (!node) node = {
140
+ id: Key.EntityId.random(),
141
+ children: [],
142
+ data: { text: "" }
143
+ };
144
+ const nodeToAdd = node;
145
+ Obj.update(this._tree, (obj) => {
146
+ obj.nodes[nodeToAdd.id] = nodeToAdd;
147
+ parent.children.splice(index ?? parent.children.length, 0, nodeToAdd.id);
148
+ });
149
+ return node;
150
+ }
151
+ /**
152
+ * Delete node.
153
+ */
154
+ deleteNode(parent, id) {
155
+ const node = this._tree.nodes[id];
156
+ if (!node) return;
157
+ Obj.update(this._tree, (obj) => {
158
+ delete obj.nodes[node.id];
159
+ });
160
+ const idx = parent.children.findIndex((child) => child === id);
161
+ if (idx !== -1) Obj.update(this._tree, () => {
162
+ parent.children.splice(idx, 1);
163
+ });
164
+ return node;
165
+ }
166
+ /**
167
+ * Move child node.
168
+ */
169
+ moveNode(node, from, to) {
170
+ invariant(from >= 0 && from < node.children.length, void 0, {
171
+ "~LogMeta": "~LogMeta",
172
+ F: __dxlog_file,
173
+ L: 233,
174
+ S: this,
175
+ A: ["from >= 0 && from < node.children.length", ""]
176
+ });
177
+ invariant(to >= 0 && to < node.children.length, void 0, {
178
+ "~LogMeta": "~LogMeta",
179
+ F: __dxlog_file,
180
+ L: 234,
181
+ S: this,
182
+ A: ["to >= 0 && to < node.children.length", ""]
183
+ });
184
+ if (from === to) return null;
185
+ const child = node.children[from];
186
+ Obj.update(this._tree, () => {
187
+ node.children.splice(from, 1);
188
+ node.children.splice(to, 0, child);
189
+ });
190
+ return this.getNode(child);
191
+ }
192
+ /**
193
+ * Indent node.
194
+ */
195
+ indentNode(node) {
196
+ const parent = this.getParent(node);
197
+ if (!parent) return;
198
+ const idx = parent.children.findIndex((child) => child === node.id);
199
+ if (idx < 1 || idx >= parent.children.length) return;
200
+ const previous = this.getNode(parent.children[idx - 1]);
201
+ Obj.update(this._tree, () => {
202
+ parent.children.splice(idx, 1);
203
+ previous.children.push(node.id);
204
+ });
205
+ }
206
+ /**
207
+ * Unindent node.
208
+ */
209
+ unindentNode(node) {
210
+ const parent = this.getParent(node);
211
+ if (!parent) return;
212
+ const ancestor = this.getParent(parent);
213
+ if (!ancestor) return;
214
+ const nodeIdx = parent.children.findIndex((id) => id === node.id);
215
+ let rest = [];
216
+ Obj.update(this._tree, () => {
217
+ rest = parent.children.splice(nodeIdx, parent.children.length - nodeIdx).slice(1);
218
+ });
219
+ const parentIdx = this.getChildNodes(ancestor).findIndex((n) => n.id === parent.id);
220
+ Obj.update(this._tree, () => {
221
+ ancestor.children.splice(parentIdx + 1, 0, node.id);
222
+ });
223
+ Obj.update(this._tree, () => {
224
+ node.children.push(...rest);
225
+ });
226
+ }
227
+ };
228
+ //#endregion
229
+ export { TreeNodeType as n, TreeType as r, Tree as t };
230
+
231
+ //# sourceMappingURL=chunk-types2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-types2.mjs","names":[],"sources":["../../src/components/Tree/types/tree.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { DXN, Key, Obj, Ref, Type } from '@dxos/echo';\nimport { TestSchema } from '@dxos/echo/testing';\nimport { invariant } from '@dxos/invariant';\n\n// TODO(burdon): Reconcile with @dxos/graph (i.e., common types).\n\nexport const TreeNodeType = Schema.Struct({\n id: Key.EntityId,\n children: Schema.mutable(Schema.Array(Key.EntityId)),\n data: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.Any })),\n ref: Schema.optional(Ref.Ref(TestSchema.Expando)),\n}).pipe(Schema.mutable);\n\nexport type TreeNodeType = Schema.Schema.Type<typeof TreeNodeType>;\n\nexport class TreeType extends Type.makeObject<TreeType>(DXN.make('org.dxos.type.tree', '0.1.0'))(\n Schema.Struct({\n root: Key.EntityId,\n nodes: Schema.mutable(Schema.Record({ key: Key.EntityId, value: TreeNodeType })),\n }),\n) {}\n\n/**\n * Wrapper object for tree.\n */\nexport class Tree {\n static create = (): TreeType => {\n const id = Key.EntityId.random();\n return Obj.make(TreeType, {\n root: id,\n nodes: {\n [id]: {\n id,\n children: [],\n data: { text: '' }, // TODO(burdon): Generic.\n },\n },\n });\n };\n\n private _tree: TreeType;\n\n constructor(tree?: TreeType) {\n this._tree = tree ?? Tree.create();\n }\n\n get tree() {\n return this._tree;\n }\n\n // TODO(burdon): Make reactive.\n get size() {\n return Object.keys(this._tree.nodes).length;\n }\n\n get root() {\n return this.getNode(this._tree.root);\n }\n\n //\n // Traversal\n //\n\n /**\n * Recursively traverse the tree until the callback returns a value.\n */\n tranverse<T>(\n callback: (node: TreeNodeType, depth: number) => T | void,\n root: Key.EntityId = this._tree.root,\n depth = 0,\n ): T | void {\n const node = this._tree.nodes[root];\n const result = callback(node, depth);\n if (result !== undefined) {\n return result;\n }\n\n for (const childId of node.children) {\n const result = this.tranverse(callback, childId, depth + 1);\n if (result !== undefined) {\n return result;\n }\n }\n }\n\n getNode(id: Key.EntityId): TreeNodeType {\n const node = this._tree.nodes[id];\n invariant(node);\n return node;\n }\n\n /**\n * Get the children of a node.\n */\n getChildNodes(node: TreeNodeType): Array<TreeNodeType> {\n return node.children.map((id) => this.getNode(id));\n }\n\n /**\n * Get the parent of a node.\n */\n getParent(node: TreeNodeType): TreeNodeType | null {\n const parent = this.tranverse((n) => {\n if (n.children.includes(node.id)) {\n return n;\n }\n });\n\n return parent ?? null;\n }\n\n /**\n * Get the next node in the tree.\n */\n getNext(node: TreeNodeType, hierarchical = true): TreeNodeType | undefined {\n if (hierarchical && node.children.length) {\n // First child.\n return this.getChildNodes(node)[0];\n } else {\n const parent = this.getParent(node);\n if (parent) {\n const idx = this.getChildNodes(parent).findIndex(({ id }) => id === node.id);\n if (idx < parent.children.length - 1) {\n // Next sibling.\n return this.getNode(parent.children[idx + 1]);\n } else {\n // Get parent's next sibling.\n return this.getNext(parent, false);\n }\n }\n }\n }\n\n /**\n * Get the previous node in the tree.\n */\n getPrevious(node: TreeNodeType, hierarchical = true): TreeNodeType | undefined {\n const parent = this.getParent(node)!;\n const idx = this.getChildNodes(parent).findIndex(({ id }) => id === node.id);\n if (idx === 0) {\n if (hierarchical) {\n return parent;\n }\n } else {\n const previous = this.getNode(parent.children[idx - 1]);\n if (hierarchical && previous.children.length) {\n return this.getLastDescendent(previous);\n }\n\n return previous;\n }\n }\n\n /**\n * Get the last descendent of a node.\n */\n getLastDescendent(node: TreeNodeType): TreeNodeType | undefined {\n const children = this.getChildNodes(node);\n const last = children.length ? children[children.length - 1] : undefined;\n if (last) {\n return this.getLastDescendent(last);\n }\n\n return node;\n }\n\n //\n // Mutations\n //\n\n /**\n * Clear tree.\n */\n clear(): void {\n const root = this._tree.nodes[this._tree.root];\n root.children.length = 0;\n Obj.update(this._tree, (obj) => {\n obj.nodes = {\n [root.id]: root,\n };\n });\n }\n\n /**\n * Add node.\n */\n addNode(parent: TreeNodeType, node?: TreeNodeType, index?: number): TreeNodeType {\n if (!node) {\n const id = Key.EntityId.random();\n node = { id, children: [], data: { text: '' } }; // TODO(burdon): Generic.\n }\n\n const nodeToAdd = node;\n Obj.update(this._tree, (obj) => {\n obj.nodes[nodeToAdd.id] = nodeToAdd;\n parent.children.splice(index ?? parent.children.length, 0, nodeToAdd.id);\n });\n return node;\n }\n\n /**\n * Delete node.\n */\n deleteNode(parent: TreeNodeType, id: Key.EntityId): TreeNodeType | undefined {\n const node = this._tree.nodes[id];\n if (!node) {\n return undefined;\n }\n\n Obj.update(this._tree, (obj) => {\n delete obj.nodes[node.id];\n });\n const idx = parent.children.findIndex((child) => child === id);\n if (idx !== -1) {\n Obj.update(this._tree, () => {\n parent.children.splice(idx, 1);\n });\n }\n\n return node;\n }\n\n /**\n * Move child node.\n */\n moveNode(node: TreeNodeType, from: number, to: number): TreeNodeType | null {\n invariant(from >= 0 && from < node.children.length);\n invariant(to >= 0 && to < node.children.length);\n if (from === to) {\n return null;\n }\n\n const child = node.children[from];\n Obj.update(this._tree, () => {\n node.children.splice(from, 1);\n node.children.splice(to, 0, child);\n });\n return this.getNode(child);\n }\n\n /**\n * Indent node.\n */\n indentNode(node: TreeNodeType): void {\n const parent = this.getParent(node);\n if (!parent) {\n return;\n }\n\n const idx = parent.children.findIndex((child) => child === node.id);\n if (idx < 1 || idx >= parent.children.length) {\n return;\n }\n\n const previous = this.getNode(parent.children[idx - 1]);\n Obj.update(this._tree, () => {\n parent.children.splice(idx, 1);\n previous.children.push(node.id);\n });\n }\n\n /**\n * Unindent node.\n */\n unindentNode(node: TreeNodeType): void {\n const parent = this.getParent(node);\n if (!parent) {\n return;\n }\n\n const ancestor = this.getParent(parent);\n if (!ancestor) {\n return;\n }\n\n // Remove node from parent and get following siblings.\n const nodeIdx = parent.children.findIndex((id) => id === node.id);\n let rest: Key.EntityId[] = [];\n Obj.update(this._tree, () => {\n const removed = parent.children.splice(nodeIdx, parent.children.length - nodeIdx);\n rest = removed.slice(1); // Skip the node itself.\n });\n\n // Add to ancestor.\n const parentIdx = this.getChildNodes(ancestor).findIndex((n) => n.id === parent.id);\n Obj.update(this._tree, () => {\n ancestor.children.splice(parentIdx + 1, 0, node.id);\n });\n\n // Transplant following siblings to current node.\n Obj.update(this._tree, () => {\n node.children.push(...rest);\n });\n }\n}\n"],"mappings":";;;;;;AAYA,IAAa,eAAe,OAAO,OAAO;CACxC,IAAI,IAAI;CACR,UAAU,OAAO,QAAQ,OAAO,MAAM,IAAI,QAAQ,CAAC;CACnD,MAAM,OAAO,QAAQ,OAAO,OAAO;EAAE,KAAK,OAAO;EAAQ,OAAO,OAAO;CAAI,CAAC,CAAC;CAC7E,KAAK,OAAO,SAAS,IAAI,IAAI,WAAW,OAAO,CAAC;AAClD,CAAC,CAAC,CAAC,KAAK,OAAO,OAAO;AAItB,IAAa,WAAb,cAA8B,KAAK,WAAqB,IAAI,KAAK,sBAAsB,OAAO,CAAC,CAAC,CAC9F,OAAO,OAAO;CACZ,MAAM,IAAI;CACV,OAAO,OAAO,QAAQ,OAAO,OAAO;EAAE,KAAK,IAAI;EAAU,OAAO;CAAa,CAAC,CAAC;AACjF,CAAC,CACH,CAAC,CAAC,CAAC;;;;AAKH,IAAa,OAAb,MAAa,KAAK;CAChB,OAAO,eAAyB;EAC9B,MAAM,KAAK,IAAI,SAAS,OAAO;EAC/B,OAAO,IAAI,KAAK,UAAU;GACxB,MAAM;GACN,OAAO,GACJ,KAAK;IACJ;IACA,UAAU,CAAC;IACX,MAAM,EAAE,MAAM,GAAG;GACnB,EACF;EACF,CAAC;CACH;CAEA;CAEA,YAAY,MAAiB;EAC3B,KAAK,QAAQ,QAAQ,KAAK,OAAO;CACnC;CAEA,IAAI,OAAO;EACT,OAAO,KAAK;CACd;CAGA,IAAI,OAAO;EACT,OAAO,OAAO,KAAK,KAAK,MAAM,KAAK,CAAC,CAAC;CACvC;CAEA,IAAI,OAAO;EACT,OAAO,KAAK,QAAQ,KAAK,MAAM,IAAI;CACrC;;;;CASA,UACE,UACA,OAAqB,KAAK,MAAM,MAChC,QAAQ,GACE;EACV,MAAM,OAAO,KAAK,MAAM,MAAM;EAC9B,MAAM,SAAS,SAAS,MA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