glassbrain 0.2.0-alpha.7 → 0.2.0-alpha.8

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 (44) hide show
  1. package/README.md +6 -7
  2. package/dist/chunks/{chunk-GZSWZSSE.js → chunk-3CNHFYHG.js} +1317 -1650
  3. package/dist/chunks/chunk-7PWRJEZT.js +35 -0
  4. package/dist/chunks/chunk-CHOCJIOD.js +1340 -0
  5. package/dist/chunks/chunk-DHYIMBHU.js +960 -0
  6. package/dist/chunks/{chunk-FNTYI7VP.js → chunk-NDUF3CBQ.js} +340 -996
  7. package/dist/cli/glassbrain.js +338 -142
  8. package/dist/cli/viewer.js +218 -213
  9. package/dist/core.d.ts +1 -0
  10. package/dist/core.js +50 -30
  11. package/dist/diff.d.ts +9 -1
  12. package/dist/edit.d.ts +10 -0
  13. package/dist/index.js +57 -37
  14. package/dist/internal.d.ts +1 -0
  15. package/dist/internal.js +98 -76
  16. package/dist/layers.d.ts +3 -1
  17. package/dist/lint-report.d.ts +70 -0
  18. package/dist/profile.d.ts +10 -2
  19. package/dist/react/DetailPanel.d.ts +31 -1
  20. package/dist/react/DetailPanel.js +8 -4
  21. package/dist/react/EdgeMark.d.ts +22 -0
  22. package/dist/react/EditPanel.d.ts +6 -6
  23. package/dist/react/GraphCanvas.d.ts +17 -6
  24. package/dist/react/GraphCanvas.js +4 -4
  25. package/dist/react/Inspector.d.ts +72 -0
  26. package/dist/react/ObjectRef.d.ts +12 -0
  27. package/dist/react/Toolbar.d.ts +10 -3
  28. package/dist/react/ZoomBoundary.d.ts +4 -0
  29. package/dist/react/camera.d.ts +7 -0
  30. package/dist/react/i18n.d.ts +2 -2
  31. package/dist/react/icons.d.ts +7 -3
  32. package/dist/react/input.d.ts +5 -3
  33. package/dist/react/useSubgraph.d.ts +15 -0
  34. package/dist/shell.d.ts +1 -0
  35. package/dist/strings.d.ts +23 -2
  36. package/dist/style.d.ts +2 -0
  37. package/dist/subgraph.d.ts +13 -0
  38. package/dist/tree.d.ts +1 -0
  39. package/dist/view.d.ts +3 -1
  40. package/package.json +1 -1
  41. package/dist/chunks/chunk-3KUNYSJE.js +0 -246
  42. package/dist/chunks/chunk-LK77SYCN.js +0 -100
  43. package/dist/chunks/chunk-Q35ZKWKF.js +0 -99
  44. package/dist/react/GlassPlanes.d.ts +0 -11
@@ -1,246 +0,0 @@
1
- import {
2
- EN
3
- } from "./chunk-Q35ZKWKF.js";
4
-
5
- // src/react/i18n.ts
6
- import { createContext, useContext } from "react";
7
- var StringsContext = createContext(EN);
8
- var useStrings = () => useContext(StringsContext);
9
-
10
- // src/react/icons.tsx
11
- import { jsx } from "react/jsx-runtime";
12
- var Icon = ({ d, size = 16 }) => /* @__PURE__ */ jsx("svg", { className: "gb-ico", viewBox: "0 0 24 24", width: size, height: size, "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d }) });
13
- var I = {
14
- search: "M10.5 4a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13Zm4.75 11.25L20 20",
15
- x: "M6 6l12 12M18 6 6 18",
16
- plus: "M12 5v14M5 12h14",
17
- minus: "M5 12h14",
18
- fit: "M4 9V5a1 1 0 0 1 1-1h4M15 4h4a1 1 0 0 1 1 1v4M20 15v4a1 1 0 0 1-1 1h-4M9 20H5a1 1 0 0 1-1-1v-4",
19
- more: "M4 7h10M18 7h2M4 17h2M10 17h10M16 5v4M8 15v4",
20
- warn: "M12 4 2.8 19.5h18.4L12 4Zm0 6v4.5m0 2.5v.5",
21
- error: "M12 3a9 9 0 1 0 0 18 9 9 0 1 0 0-18Zm-3 6 6 6m0-6-6 6",
22
- info: "M12 3a9 9 0 1 0 0 18 9 9 0 1 0 0-18Zm0 8v5m0-9v.5",
23
- arrow: "M5 12h13M13 7l5 5-5 5",
24
- stack: "M12 4 3 8.5l9 4.5 9-4.5L12 4ZM3 12.5l9 4.5 9-4.5M3 16.5l9 4.5 9-4.5",
25
- edit: "M4 20h4L19 9l-4-4L4 16v4Zm9-13 4 4",
26
- legend: "M5 7h.01M9 7h10M5 12h.01M9 12h10M5 17h.01M9 17h10",
27
- reset: "M4 12a8 8 0 1 0 2.3-5.6M4 4v4h4",
28
- collapse: "M6 15l6-6 6 6",
29
- file: "M7 3h7l5 5v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5"
30
- };
31
-
32
- // src/react/markdown.tsx
33
- import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
34
- var ABS = /^(https?:|mailto:)/i;
35
- var SCHEME = /^[a-z][a-z0-9+.-]*:/i;
36
- function href(url, o) {
37
- const u = url.trim();
38
- if (u.startsWith("node:")) return { kind: "node", url: u.slice(5) };
39
- if (ABS.test(u)) return { kind: "ext", url: u };
40
- if (SCHEME.test(u) || u.startsWith("//")) return null;
41
- const r = o.resolveUrl?.(u);
42
- return r && ABS.test(r) ? { kind: "ext", url: r } : null;
43
- }
44
- var INLINE = /!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)|\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)|`([^`]+)`|\*\*([^*]+)\*\*|__([^_]+)__|\*([^*\s][^*]*)\*|_([^_\s][^_]*)_/g;
45
- function inline(text, o, key) {
46
- const out = [];
47
- let last = 0, i = 0;
48
- for (const m of text.matchAll(INLINE)) {
49
- if (m.index > last) out.push(text.slice(last, m.index));
50
- const k = `${key}.${i++}`;
51
- if (m[2] !== void 0) {
52
- const h = href(m[2], o);
53
- if (h?.kind === "ext") {
54
- out.push(/* @__PURE__ */ jsx2(
55
- "img",
56
- {
57
- className: "gb-md-img",
58
- src: h.url,
59
- alt: m[1],
60
- loading: "lazy",
61
- onError: (e) => {
62
- e.currentTarget.style.display = "none";
63
- }
64
- },
65
- k
66
- ));
67
- } else if (m[1]) out.push(/* @__PURE__ */ jsx2("span", { className: "gb-md-alt", children: m[1] }, k));
68
- } else if (m[4] !== void 0) {
69
- const h = href(m[4], o);
70
- const label = inline(m[3], o, k);
71
- if (h?.kind === "ext") out.push(/* @__PURE__ */ jsx2("a", { href: h.url, target: "_blank", rel: "noreferrer noopener", children: label }, k));
72
- else if (h?.kind === "node" && o.onNodeLink) {
73
- const id = h.url;
74
- out.push(/* @__PURE__ */ jsx2("a", { href: "#", className: "gb-md-node", onClick: (e) => {
75
- e.preventDefault();
76
- o.onNodeLink(id);
77
- }, children: label }, k));
78
- } else out.push(/* @__PURE__ */ jsx2("span", { children: label }, k));
79
- } else if (m[5] !== void 0) out.push(/* @__PURE__ */ jsx2("code", { children: m[5] }, k));
80
- else if (m[6] !== void 0 || m[7] !== void 0) out.push(/* @__PURE__ */ jsx2("strong", { children: inline(m[6] ?? m[7], o, k) }, k));
81
- else out.push(/* @__PURE__ */ jsx2("em", { children: inline(m[8] ?? m[9], o, k) }, k));
82
- last = m.index + m[0].length;
83
- }
84
- if (last < text.length) out.push(text.slice(last));
85
- return out;
86
- }
87
- function renderMarkdown(src, o = {}) {
88
- const lines = src.replace(/\r\n?/g, "\n").split("\n");
89
- const blocks = [];
90
- let para = [];
91
- let list = null;
92
- let n = 0;
93
- const flushPara = () => {
94
- if (para.length) blocks.push(/* @__PURE__ */ jsx2("p", { children: inline(para.join(" "), o, `p${n}`) }, n++));
95
- para = [];
96
- };
97
- const flushList = () => {
98
- if (!list) return;
99
- const items = list.items.map((it, j) => /* @__PURE__ */ jsx2("li", { children: inline(it, o, `l${n}.${j}`) }, j));
100
- blocks.push(list.ordered ? /* @__PURE__ */ jsx2("ol", { children: items }, n++) : /* @__PURE__ */ jsx2("ul", { children: items }, n++));
101
- list = null;
102
- };
103
- for (let i = 0; i < lines.length; i++) {
104
- const line = lines[i];
105
- const t = line.trim();
106
- if (t.startsWith("```")) {
107
- flushPara();
108
- flushList();
109
- const body = [];
110
- for (i++; i < lines.length && !lines[i].trim().startsWith("```"); i++) body.push(lines[i]);
111
- blocks.push(/* @__PURE__ */ jsx2("pre", { children: /* @__PURE__ */ jsx2("code", { children: body.join("\n") }) }, n++));
112
- continue;
113
- }
114
- if (!t) {
115
- flushPara();
116
- flushList();
117
- continue;
118
- }
119
- const h = /^(#{1,6})\s+(.*)$/.exec(t);
120
- if (h) {
121
- flushPara();
122
- flushList();
123
- blocks.push(/* @__PURE__ */ jsx2("div", { className: `gb-md-h gb-md-h${Math.min(h[1].length, 3)}`, children: inline(h[2], o, `h${n}`) }, n++));
124
- continue;
125
- }
126
- const li = /^([-*+]|\d+[.)])\s+(.*)$/.exec(t);
127
- if (li) {
128
- flushPara();
129
- const ordered = /\d/.test(li[1]);
130
- if (list && list.ordered !== ordered) flushList();
131
- if (!list) list = { ordered, items: [] };
132
- list.items.push(li[2]);
133
- continue;
134
- }
135
- if (t.startsWith(">")) {
136
- flushPara();
137
- flushList();
138
- blocks.push(/* @__PURE__ */ jsx2("blockquote", { children: inline(t.replace(/^>\s?/, ""), o, `q${n}`) }, n++));
139
- continue;
140
- }
141
- if (list && /^\s{2,}/.test(line)) {
142
- list.items[list.items.length - 1] += ` ${t}`;
143
- continue;
144
- }
145
- flushList();
146
- para.push(t);
147
- }
148
- flushPara();
149
- flushList();
150
- return /* @__PURE__ */ jsx2("div", { className: "gb-md", children: blocks });
151
- }
152
- function renderInline(src, o = {}) {
153
- return /* @__PURE__ */ jsx2(Fragment, { children: inline(src, o, "i") });
154
- }
155
-
156
- // src/react/DetailPanel.tsx
157
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
158
- var asStr = (v) => typeof v === "string" ? v : v == null ? "" : String(v);
159
- var asArr = (v) => Array.isArray(v) ? v.map(asStr).filter(Boolean) : [];
160
- function DetailPanel({ node, spec, kindLabels, onClose, renderText, onEdit, color, markdown }) {
161
- const t = useStrings();
162
- const d = node.detail ?? {};
163
- const line = spec.line ?? [];
164
- const list = spec.list ?? [];
165
- const text = (s) => renderText ? renderText(s) : renderMarkdown(s, markdown);
166
- const item = (s) => renderText ? renderText(s) : renderInline(s, markdown);
167
- const value = (field, raw) => spec.linkify ? spec.linkify(field, raw) : raw;
168
- const known = /* @__PURE__ */ new Set([
169
- ...line.map((f) => f.key),
170
- ...list.map((f) => f.key),
171
- ...spec.skip ?? [],
172
- // Structural fields (nodes carry them in the generic format) are already told by the title and the graph itself; not listed again.
173
- "name",
174
- "description",
175
- "kind",
176
- "id",
177
- "label",
178
- "parent",
179
- "order",
180
- "children",
181
- "layer",
182
- "flags"
183
- ]);
184
- const extras = Object.entries(d).filter(([k, v]) => !known.has(k) && v != null && typeof v !== "object");
185
- const empty = !extras.length && !asStr(d.description) && !node.flags.some((f) => spec.flagNotes?.[f]) && !line.some((f) => asStr(d[f.key])) && !list.some((f) => asArr(d[f.key]).length);
186
- return /* @__PURE__ */ jsxs("div", { className: "gb-detail", children: [
187
- /* @__PURE__ */ jsxs("div", { className: "gb-dh", children: [
188
- /* @__PURE__ */ jsxs("span", { className: "gb-dh-title gb-kind", children: [
189
- /* @__PURE__ */ jsx3("i", { className: "gb-dot", style: { background: color } }),
190
- kindLabels[node.kind] ?? (node.kind || t.node)
191
- ] }),
192
- /* @__PURE__ */ jsxs("span", { className: "gb-dh-act", children: [
193
- onEdit && /* @__PURE__ */ jsxs("button", { className: "gb-ibtn gb-ibtn-text", onClick: onEdit, title: t.edit, children: [
194
- /* @__PURE__ */ jsx3(Icon, { d: I.edit, size: 14 }),
195
- /* @__PURE__ */ jsx3("span", { children: t.edit })
196
- ] }),
197
- /* @__PURE__ */ jsx3("button", { className: "gb-ibtn", onClick: onClose, "aria-label": t.close, title: t.close, children: /* @__PURE__ */ jsx3(Icon, { d: I.x, size: 15 }) })
198
- ] })
199
- ] }),
200
- /* @__PURE__ */ jsxs("div", { className: "gb-db", children: [
201
- /* @__PURE__ */ jsx3("div", { className: "gb-dt", children: node.label }),
202
- /* @__PURE__ */ jsxs("div", { className: "gb-line", children: [
203
- /* @__PURE__ */ jsx3("span", { className: "gb-k", children: t.parent }),
204
- /* @__PURE__ */ jsx3("span", { children: node.parent ?? "Root" })
205
- ] }),
206
- node.parent && /* @__PURE__ */ jsxs("div", { className: "gb-line", children: [
207
- /* @__PURE__ */ jsx3("span", { className: "gb-k", children: "Position" }),
208
- /* @__PURE__ */ jsx3("span", { children: node.order ?? "\u2014" })
209
- ] }),
210
- node.flags.map((f) => {
211
- const note = spec.flagNotes?.[f];
212
- return note ? /* @__PURE__ */ jsx3("div", { className: "gb-flag", children: note }, f) : null;
213
- }),
214
- line.map((f) => {
215
- const v = asStr(d[f.key]);
216
- return v ? /* @__PURE__ */ jsxs("div", { className: "gb-line", children: [
217
- /* @__PURE__ */ jsx3("span", { className: "gb-k", children: f.label }),
218
- /* @__PURE__ */ jsx3("span", { children: v })
219
- ] }, f.key) : null;
220
- }),
221
- asStr(d.description) && /* @__PURE__ */ jsx3("div", { className: "gb-desc", children: text(asStr(d.description)) }),
222
- list.map((f) => {
223
- const items = asArr(d[f.key]);
224
- return items.length ? /* @__PURE__ */ jsxs("div", { className: "gb-sect", children: [
225
- /* @__PURE__ */ jsx3("span", { className: "gb-k", children: f.label }),
226
- /* @__PURE__ */ jsx3("ul", { children: items.map((it, i) => /* @__PURE__ */ jsx3("li", { children: item(value(f.key, it)) }, i)) })
227
- ] }, f.key) : null;
228
- }),
229
- empty && /* @__PURE__ */ jsx3("div", { className: "gb-dempty", children: t.noDetails }),
230
- extras.length > 0 && /* @__PURE__ */ jsx3("div", { className: "gb-extras", children: extras.map(([k, v]) => /* @__PURE__ */ jsxs("div", { className: "gb-line", children: [
231
- /* @__PURE__ */ jsx3("span", { className: "gb-k", children: k }),
232
- /* @__PURE__ */ jsx3("span", { children: asStr(v) })
233
- ] }, k)) })
234
- ] })
235
- ] });
236
- }
237
-
238
- export {
239
- StringsContext,
240
- useStrings,
241
- Icon,
242
- I,
243
- renderMarkdown,
244
- renderInline,
245
- DetailPanel
246
- };
@@ -1,100 +0,0 @@
1
- // src/layers.ts
2
- var EMPTY = { layers: [], layerOf: /* @__PURE__ */ new Map() };
3
- function orderedChildren(children, id, unordered = false) {
4
- if (unordered) return null;
5
- const kids = children.get(id) ?? [];
6
- if (kids.length < 2) return null;
7
- const withOrder = kids.filter((n) => typeof n.order === "number" && Number.isFinite(n.order));
8
- if (withOrder.length !== kids.length) return null;
9
- const seen = /* @__PURE__ */ new Set();
10
- for (const k of withOrder) {
11
- if (seen.has(k.order)) return null;
12
- seen.add(k.order);
13
- }
14
- return [...kids].sort((a, b) => a.order - b.order);
15
- }
16
- function childrenMap(model) {
17
- const out = /* @__PURE__ */ new Map();
18
- for (const n of model.nodes) {
19
- if (!n.parent || !model.index.has(n.parent)) continue;
20
- const arr = out.get(n.parent);
21
- arr ? arr.push(n) : out.set(n.parent, [n]);
22
- }
23
- return out;
24
- }
25
- function deriveLayers(model, colors = [], force = false) {
26
- if (!model.nodes.length) return EMPTY;
27
- const children = childrenMap(model);
28
- const roots = model.nodes.filter((n) => !n.parent || !model.index.has(n.parent));
29
- let ordered = null;
30
- let anchor;
31
- if (roots.length === 1) {
32
- anchor = roots[0];
33
- ordered = orderedChildren(children, anchor.id, anchor.data?.unordered === true);
34
- if (!ordered && force) ordered = children.get(anchor.id) ?? null;
35
- } else if (roots.length > 1 && (force || roots.every((n) => n.order !== void 0))) {
36
- ordered = [...roots].sort((a, b) => (a.order ?? Infinity) - (b.order ?? Infinity));
37
- }
38
- if (!ordered || ordered.length < 2) return EMPTY;
39
- const layers = ordered.map((n, i) => ({
40
- id: n.id,
41
- label: n.label || n.id,
42
- z: i,
43
- ...colors[i] ? { color: colors[i] } : {}
44
- }));
45
- const layerOf = /* @__PURE__ */ new Map();
46
- for (const [i, layer] of ordered.entries()) {
47
- const stack = [layer.id];
48
- while (stack.length) {
49
- const id = stack.pop();
50
- layerOf.set(id, layers[i].id);
51
- for (const k of children.get(id) ?? []) stack.push(k.id);
52
- }
53
- }
54
- if (anchor) layerOf.set(anchor.id, layers[0].id);
55
- return { layers, layerOf, anchor: anchor?.id };
56
- }
57
- function layerIndexOf(derived, id) {
58
- const lid = derived.layerOf.get(id);
59
- return lid ? derived.layers.findIndex((l) => l.id === lid) : -1;
60
- }
61
-
62
- // src/kinds.ts
63
- function kindDistribution(items) {
64
- const counts = /* @__PURE__ */ new Map();
65
- for (const item of items) if (item.kind) counts.set(item.kind, (counts.get(item.kind) ?? 0) + 1);
66
- const sizes = [...counts].map(([kind, count]) => ({ kind, count })).sort((a, b) => b.count - a.count || a.kind.localeCompare(b.kind));
67
- const typed = sizes.reduce((sum, row) => sum + row.count, 0);
68
- const effective = sizes.reduce((sum, row) => sum + Math.sqrt(row.count / typed), 0) ** 2;
69
- const fragmentation = typed > 1 ? effective / Math.log(typed) : 0;
70
- return {
71
- total: items.length,
72
- typed,
73
- missing: items.length - typed,
74
- count: sizes.length,
75
- sizes,
76
- effective,
77
- fragmentation,
78
- reason: typed >= 10 && fragmentation > 2 ? "too fragmented" : null
79
- };
80
- }
81
- function kindHeading(space, d) {
82
- return `${space} kinds: ${d.count}${d.reason ? ` (${d.reason})` : ""}`;
83
- }
84
- function kindSummary(space, d, labels = {}) {
85
- return [
86
- kindHeading(space, d),
87
- ...d.sizes.map((row) => `${Object.hasOwn(labels, row.kind) ? labels[row.kind] : row.kind} ${row.count}/${d.total}`),
88
- ...d.missing ? [`(no kind) ${d.missing}/${d.total}`] : []
89
- ].join(" | ");
90
- }
91
-
92
- export {
93
- orderedChildren,
94
- childrenMap,
95
- deriveLayers,
96
- layerIndexOf,
97
- kindDistribution,
98
- kindHeading,
99
- kindSummary
100
- };
@@ -1,99 +0,0 @@
1
- // src/strings.ts
2
- var EN = {
3
- empty: "No data yet",
4
- stats: (n, e) => `${n} nodes \xB7 ${e} edges`,
5
- layingOut: (d, t) => `Laying out ${d}/${t}`,
6
- preparing: "Preparing layout\u2026",
7
- parseErrors: (c, names) => `\u26A0 ${c} source${c > 1 ? "s" : ""} could not be parsed: ${names}`,
8
- past: "past",
9
- now: "now",
10
- diffTruncated: (n) => `${n} more changes not marked (over the limit)`,
11
- change: { added: "Added", removed: "Removed", changed: "Changed", moved: "Moved", merged: "Merged" },
12
- search: "Search nodes",
13
- searchTip: "Several words: as many as possible; /\u2026/ is a regex",
14
- clearSearch: "Clear search",
15
- noMatch: (q, elsewhere) => `No \u201C${q}\u201D${elsewhere ? " in this layer" : ""}`,
16
- moreResults: (n) => `${n} more \u2014 keep typing to narrow down`,
17
- inLayer: (l, n) => `${n} in \u201C${l}\u201D`,
18
- keysBrowse: "browse",
19
- keysPick: "select",
20
- keysClear: "clear",
21
- viewLayer: (l) => `View \u201C${l}\u201D`,
22
- stackLayer: (l, on) => `${on ? "Hide" : "Stack"} \u201C${l}\u201D`,
23
- stack: "Stack layers",
24
- stackTip: (on) => on ? "Stacked (turn off to view one layer at a time)" : "Stack layers (2.5D)",
25
- layersOff: "Layers are off",
26
- forceLayers: "Open the floors anyway",
27
- ok: "OK",
28
- more: "More",
29
- origins: "Source",
30
- allOrigins: "All sources",
31
- issuesTip: (e, w, i) => [e && `${e} error${e > 1 ? "s" : ""}`, w && `${w} warning${w > 1 ? "s" : ""}`, i && `${i} info`].filter(Boolean).join(" \xB7 "),
32
- issuesTitle: (e, w, i) => `Checks \xB7 ${[e && `${e} errors`, w && `${w} warnings`, i && `${i} info`].filter(Boolean).join(" \xB7 ")}`,
33
- moreItems: (n) => `${n} more`,
34
- cameraTip: "Scroll / two fingers to pan \xB7 \u2318 + scroll or pinch to zoom",
35
- zoomIn: "Zoom in (+)",
36
- zoomOut: "Zoom out (-)",
37
- fit: "Fit (0)",
38
- legend: "Legend",
39
- legendPlainName: "Default",
40
- noColor: "no colour set",
41
- legendPlain: "Nodes without a color of their own: containers and placeholders, shaded by how much hangs under them",
42
- legendContainsName: "Contains",
43
- legendHint: "Hover an item: color, hide, size",
44
- legendContains: "Containment: one shade from light to dark, trunk thick, leaves thin",
45
- legendShow: "Show",
46
- legendHide: "Hide",
47
- legendHideTip: "Hide in the overview \u2014 still shown on hover, selection and search",
48
- legendColor: "Color",
49
- legendSize: "Size",
50
- legendReset: "Reset",
51
- node: "Node",
52
- noDetails: "No details yet",
53
- close: "Close",
54
- addNode: "Add node\u2026",
55
- addEdge: "Add edge\u2026",
56
- relayout: "Re-layout",
57
- restructure: "Re-structure",
58
- edit: "Edit",
59
- editNode: "Edit node",
60
- newNode: "New node",
61
- newEdge: "New edge",
62
- id: "id",
63
- idHint: "Unique, cannot be changed later",
64
- parent: "Inside",
65
- noParent: "Top level",
66
- source: "From",
67
- target: "To",
68
- kind: "Kind",
69
- edgeLabel: "Label",
70
- content: "Content",
71
- contentHint: "JSON",
72
- badJson: "Not valid JSON (an object is expected)",
73
- relations: "Edges",
74
- removeEdge: "Remove this edge",
75
- pick: "Search a node\u2026",
76
- cancel: "Cancel",
77
- save: "Save",
78
- create: "Create",
79
- remove: "Delete",
80
- confirmRemove: (n) => n ? `Delete, with its ${n} edge${n > 1 ? "s" : ""}?` : "Delete?",
81
- error: {
82
- "id-empty": "id is required",
83
- "id-taken": "This id is already used",
84
- "no-node": "Node not found",
85
- "no-parent": "Parent not found",
86
- cycle: "Cannot be placed inside itself",
87
- "invalid-position": "Choose a different node in the same children list",
88
- "order-invalid": "Order must be positive and unique among siblings (blank = unordered)",
89
- "has-children": "Has children \u2014 delete or move them first",
90
- "no-endpoint": "Pick both ends",
91
- "self-loop": "Both ends are the same node",
92
- "edge-exists": "This edge already exists",
93
- "no-edge": "Edge not found"
94
- }
95
- };
96
-
97
- export {
98
- EN
99
- };
@@ -1,11 +0,0 @@
1
- import type { Plate } from '../layout/planes.js';
2
- import { type GraphTheme } from '../style.js';
3
- import type { Viewport } from './camera.js';
4
- /** Frost lives below the graph canvases: nodes and text are never blurred. */
5
- export default function GlassPlanes({ plates, viewport, theme, alpha, hot }: {
6
- plates: Plate[];
7
- viewport: Viewport;
8
- theme: GraphTheme;
9
- alpha: number;
10
- hot: string | null;
11
- }): import("react").JSX.Element;