mind-elixir 5.9.3 → 5.10.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.
- package/dist/MindElixir.iife.js +4 -4
- package/dist/MindElixir.js +610 -753
- package/dist/MindElixirLite.iife.js +4 -4
- package/dist/MindElixirLite.js +232 -236
- package/dist/PlaintextConverter.js +125 -119
- package/dist/i18n.js +242 -0
- package/dist/types/docs.d.ts +2 -2
- package/dist/types/i18n.d.ts +19 -7
- package/dist/types/index.d.ts +2 -4
- package/dist/types/interact.d.ts +0 -8
- package/dist/types/methods.d.ts +0 -1
- package/dist/types/plugin/contextMenu.d.ts +2 -0
- package/dist/types/types/index.d.ts +13 -2
- package/package.json +8 -15
- package/readme.md +2 -2
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
class
|
|
1
|
+
class S {
|
|
2
2
|
node;
|
|
3
3
|
children = [];
|
|
4
4
|
// slots[i] represents elements that appear *before* children[i]
|
|
5
5
|
// slots[children.length] represents elements that appear *after* all children
|
|
6
6
|
slots;
|
|
7
|
-
constructor(
|
|
8
|
-
this.node =
|
|
9
|
-
const
|
|
10
|
-
this.slots = Array.from({ length:
|
|
7
|
+
constructor(o) {
|
|
8
|
+
this.node = o;
|
|
9
|
+
const d = o.children?.length ?? 0;
|
|
10
|
+
this.slots = Array.from({ length: d + 1 }, () => []);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
function j(
|
|
14
|
-
const { nodeData:
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return
|
|
13
|
+
function j(c) {
|
|
14
|
+
const { nodeData: o, arrows: d = [], summaries: e = [] } = c, r = /* @__PURE__ */ new Map();
|
|
15
|
+
function n(t) {
|
|
16
|
+
const s = new S(t);
|
|
17
|
+
return r.set(t.id, s), t.children && (s.children = t.children.map(n)), s;
|
|
18
18
|
}
|
|
19
|
-
const i =
|
|
20
|
-
for (const t of
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
19
|
+
const i = n(o), l = [], m = /* @__PURE__ */ new Set();
|
|
20
|
+
for (const t of d) {
|
|
21
|
+
m.add(t.from), m.add(t.to);
|
|
22
|
+
const s = t.metadata, p = s?.parentId, y = s?.index ?? 1 / 0;
|
|
23
|
+
if (!p) {
|
|
24
24
|
l.push(t);
|
|
25
25
|
continue;
|
|
26
26
|
}
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
|
|
27
|
+
const g = r.get(p);
|
|
28
|
+
if (g) {
|
|
29
|
+
const w = Math.min(y, g.children.length);
|
|
30
|
+
g.slots[w].push({ type: "arrow", arrow: t });
|
|
31
31
|
} else
|
|
32
32
|
l.push(t);
|
|
33
33
|
}
|
|
34
|
-
for (const t of
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
|
|
34
|
+
for (const t of e) {
|
|
35
|
+
const s = r.get(t.parent);
|
|
36
|
+
if (s) {
|
|
37
|
+
const p = Math.min(t.end + 1, s.children.length);
|
|
38
|
+
s.slots[p].push({ type: "summary", summary: t });
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function a(t) {
|
|
42
|
+
return r.get(t)?.node.metadata?.refId ?? t;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
|
|
44
|
+
const h = [];
|
|
45
|
+
function u(t, s) {
|
|
46
|
+
const p = " ".repeat(s), y = " ".repeat(s + 1), g = t.node.metadata, w = [t.node.topic], C = g?.refId ?? (m.has(t.node.id) ? t.node.id : void 0);
|
|
47
|
+
C && w.push(`[^${C}]`), t.node.style && Object.keys(t.node.style).length > 0 && w.push(JSON.stringify(t.node.style)), h.push(`${p}- ${w.join(" ")}`);
|
|
48
48
|
for (let I = 0; I <= t.children.length; I++) {
|
|
49
|
-
for (const
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
} else if (
|
|
54
|
-
const
|
|
55
|
-
|
|
49
|
+
for (const N of t.slots[I])
|
|
50
|
+
if (N.type === "arrow") {
|
|
51
|
+
const f = N.arrow, x = f.bidirectional ? `<-${f.label ?? ""}->` : `>-${f.label ?? ""}->`, b = f.delta1 ? ` (${f.delta1.x},${f.delta1.y})` : "", M = f.delta2 ? ` (${f.delta2.x},${f.delta2.y})` : "";
|
|
52
|
+
h.push(`${y}- > [^${a(f.from)}]${b} ${x}${M} [^${a(f.to)}]`);
|
|
53
|
+
} else if (N.type === "summary") {
|
|
54
|
+
const f = N.summary, x = f.end - f.start + 1, b = x === t.children.length ? "" : `:${x} `;
|
|
55
|
+
h.push(`${y}- }${b}${f.label}`);
|
|
56
56
|
}
|
|
57
|
-
I < t.children.length &&
|
|
57
|
+
I < t.children.length && u(t.children[I], s + 1);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
u(i, 0);
|
|
61
61
|
for (const t of l) {
|
|
62
|
-
const
|
|
63
|
-
|
|
62
|
+
const s = t.bidirectional ? `<-${t.label ?? ""}->` : `>-${t.label ?? ""}->`, p = t.delta1 ? ` (${t.delta1.x},${t.delta1.y})` : "", y = t.delta2 ? ` (${t.delta2.x},${t.delta2.y})` : "";
|
|
63
|
+
h.push(`- > [^${a(t.from)}]${p} ${s}${y} [^${a(t.to)}]`);
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return h.join(`
|
|
66
66
|
`) + `
|
|
67
67
|
`;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function $() {
|
|
70
70
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2)).substring(2, 18);
|
|
71
71
|
}
|
|
72
72
|
const k = `- Root Node
|
|
@@ -94,135 +94,141 @@ const k = `- Root Node
|
|
|
94
94
|
- > [^node-2-1] <-Link position is not restricted, as long as the id can be found during rendering-> [^id8]
|
|
95
95
|
|
|
96
96
|
`;
|
|
97
|
-
function
|
|
98
|
-
const
|
|
99
|
-
`).filter((
|
|
100
|
-
if (
|
|
97
|
+
function A(c, o = "Root") {
|
|
98
|
+
const d = c.split(`
|
|
99
|
+
`).filter((a) => a.trim());
|
|
100
|
+
if (d.length === 0)
|
|
101
101
|
throw new Error("Failed to parse plaintext: no root node found");
|
|
102
|
-
const
|
|
102
|
+
const e = {
|
|
103
103
|
arrowLines: [],
|
|
104
104
|
nodeIdMap: /* @__PURE__ */ new Map()
|
|
105
|
-
},
|
|
106
|
-
for (const
|
|
107
|
-
const
|
|
108
|
-
for (;
|
|
109
|
-
|
|
110
|
-
const t =
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
content:
|
|
105
|
+
}, r = [], n = [], i = [];
|
|
106
|
+
for (const a of d) {
|
|
107
|
+
const h = v(a), u = T(a);
|
|
108
|
+
for (; n.length > 0 && n[n.length - 1].indent >= h; )
|
|
109
|
+
n.pop();
|
|
110
|
+
const t = n.length > 0 ? n[n.length - 1].node : null, s = t ? t.children ??= [] : i;
|
|
111
|
+
if (u.type === "arrow") {
|
|
112
|
+
e.arrowLines.push({
|
|
113
|
+
content: u.content,
|
|
114
114
|
parentId: t?.id ?? null,
|
|
115
|
-
index:
|
|
115
|
+
index: s.length
|
|
116
116
|
});
|
|
117
117
|
continue;
|
|
118
118
|
}
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
121
|
-
|
|
119
|
+
if (u.type === "summary") {
|
|
120
|
+
const g = O(u.content, s, t?.id ?? "");
|
|
121
|
+
g && r.push(g);
|
|
122
122
|
continue;
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
topic:
|
|
126
|
-
id:
|
|
124
|
+
const p = $(), y = {
|
|
125
|
+
topic: u.topic,
|
|
126
|
+
id: p
|
|
127
127
|
};
|
|
128
|
-
|
|
128
|
+
u.style && (y.style = u.style), u.refId && (e.nodeIdMap.set(u.refId, p), y.metadata = { refId: u.refId }), s.push(y), n.push({ indent: h, node: y });
|
|
129
129
|
}
|
|
130
130
|
if (i.length === 0)
|
|
131
131
|
throw new Error("Failed to parse plaintext: no root node found");
|
|
132
132
|
let l;
|
|
133
133
|
i.length === 1 ? l = i[0] : l = {
|
|
134
|
-
topic:
|
|
135
|
-
id:
|
|
134
|
+
topic: o,
|
|
135
|
+
id: $(),
|
|
136
136
|
children: i
|
|
137
137
|
};
|
|
138
|
-
const
|
|
139
|
-
const t = R(
|
|
140
|
-
return t && (t.metadata = { parentId:
|
|
141
|
-
}).filter((
|
|
138
|
+
const m = e.arrowLines.map(({ content: a, parentId: h, index: u }) => {
|
|
139
|
+
const t = R(a, e);
|
|
140
|
+
return t && (t.metadata = { parentId: h, index: u }), t;
|
|
141
|
+
}).filter((a) => a !== null);
|
|
142
142
|
return {
|
|
143
143
|
nodeData: l,
|
|
144
|
-
arrows:
|
|
145
|
-
summaries:
|
|
144
|
+
arrows: m.length > 0 ? m : void 0,
|
|
145
|
+
summaries: r.length > 0 ? r : void 0
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const
|
|
150
|
-
return
|
|
148
|
+
function v(c) {
|
|
149
|
+
const o = c.match(/^(\s*)/);
|
|
150
|
+
return o ? o[1].length : 0;
|
|
151
151
|
}
|
|
152
|
-
function L(
|
|
152
|
+
function L(c) {
|
|
153
153
|
try {
|
|
154
|
-
const
|
|
155
|
-
return JSON.parse(
|
|
154
|
+
const o = c.trim().startsWith("{") ? c : `{${c}}`;
|
|
155
|
+
return JSON.parse(o);
|
|
156
156
|
} catch {
|
|
157
157
|
return {};
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
function T(
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
160
|
+
function T(c) {
|
|
161
|
+
const d = c.trim().replace(/^-\s*/, "");
|
|
162
|
+
if (d.startsWith(">"))
|
|
163
163
|
return {
|
|
164
164
|
type: "arrow",
|
|
165
165
|
topic: "",
|
|
166
|
-
content:
|
|
166
|
+
content: d.substring(1).trim()
|
|
167
167
|
};
|
|
168
|
-
if (
|
|
168
|
+
if (d.startsWith("}"))
|
|
169
169
|
return {
|
|
170
170
|
type: "summary",
|
|
171
171
|
topic: "",
|
|
172
|
-
content:
|
|
172
|
+
content: d.substring(1).trim()
|
|
173
173
|
};
|
|
174
|
-
let
|
|
175
|
-
const i =
|
|
176
|
-
i && (
|
|
177
|
-
const l =
|
|
178
|
-
return l && (
|
|
174
|
+
let e = d, r, n;
|
|
175
|
+
const i = e.match(/\[\^([\w-]+)\]/);
|
|
176
|
+
i && (r = i[1], e = e.replace(i[0], "").trim());
|
|
177
|
+
const l = e.match(/\{([^}]+)\}/);
|
|
178
|
+
return l && (n = L(l[1]), e = e.replace(l[0], "").trim()), {
|
|
179
179
|
type: "node",
|
|
180
|
-
topic:
|
|
181
|
-
content:
|
|
182
|
-
refId:
|
|
183
|
-
style:
|
|
180
|
+
topic: e,
|
|
181
|
+
content: e,
|
|
182
|
+
refId: r,
|
|
183
|
+
style: n
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function R(
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
function R(c, o) {
|
|
187
|
+
const d = c.match(
|
|
188
|
+
/\[\^([\w-]+)\](?:\s*\(([\d.-]+),([\d.-]+)\))?\s*<-([^-]*)->(?:\s*\(([\d.-]+),([\d.-]+)\))?\s*\[\^([\w-]+)\]/
|
|
189
|
+
);
|
|
190
|
+
if (d) {
|
|
191
|
+
const r = d[1], n = d[2], i = d[3], l = d[4].trim(), m = d[5], a = d[6], h = d[7];
|
|
190
192
|
return {
|
|
191
|
-
id:
|
|
192
|
-
label:
|
|
193
|
-
from:
|
|
194
|
-
to:
|
|
193
|
+
id: $(),
|
|
194
|
+
label: l,
|
|
195
|
+
from: o.nodeIdMap.get(r) || r,
|
|
196
|
+
to: o.nodeIdMap.get(h) || h,
|
|
197
|
+
delta1: n && i ? { x: Number(n), y: Number(i) } : void 0,
|
|
198
|
+
delta2: m && a ? { x: Number(m), y: Number(a) } : void 0,
|
|
195
199
|
bidirectional: !0
|
|
196
200
|
};
|
|
197
201
|
}
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
const
|
|
202
|
+
const e = c.match(/\[\^([\w-]+)\](?:\s*\(([\d.-]+),([\d.-]+)\))?\s*>-([^-]*)->(?:\s*\(([\d.-]+),([\d.-]+)\))?\s*\[\^([\w-]+)\]/);
|
|
203
|
+
if (e) {
|
|
204
|
+
const r = e[1], n = e[2], i = e[3], l = e[4].trim(), m = e[5], a = e[6], h = e[7];
|
|
201
205
|
return {
|
|
202
|
-
id:
|
|
203
|
-
label:
|
|
204
|
-
from:
|
|
205
|
-
to:
|
|
206
|
+
id: $(),
|
|
207
|
+
label: l,
|
|
208
|
+
from: o.nodeIdMap.get(r) || r,
|
|
209
|
+
to: o.nodeIdMap.get(h) || h,
|
|
210
|
+
delta1: n && i ? { x: Number(n), y: Number(i) } : void 0,
|
|
211
|
+
delta2: m && a ? { x: Number(m), y: Number(a) } : void 0
|
|
206
212
|
};
|
|
207
213
|
}
|
|
208
214
|
return null;
|
|
209
215
|
}
|
|
210
|
-
function O(
|
|
211
|
-
const
|
|
212
|
-
let
|
|
213
|
-
if (
|
|
216
|
+
function O(c, o, d) {
|
|
217
|
+
const e = c.match(/^:(\d+)\s+(.*)/);
|
|
218
|
+
let r, n;
|
|
219
|
+
if (e ? (r = parseInt(e[1], 10), n = e[2]) : (r = o.length, n = c.trim()), o.length === 0 || r === 0)
|
|
214
220
|
return null;
|
|
215
|
-
const i =
|
|
221
|
+
const i = o.slice(-r), l = o.indexOf(i[0]), m = o.indexOf(i[i.length - 1]);
|
|
216
222
|
return {
|
|
217
|
-
id:
|
|
218
|
-
label:
|
|
219
|
-
parent:
|
|
223
|
+
id: $(),
|
|
224
|
+
label: n,
|
|
225
|
+
parent: d,
|
|
220
226
|
start: l,
|
|
221
|
-
end:
|
|
227
|
+
end: m
|
|
222
228
|
};
|
|
223
229
|
}
|
|
224
230
|
export {
|
|
225
231
|
j as mindElixirToPlaintext,
|
|
226
232
|
k as plaintextExample,
|
|
227
|
-
|
|
233
|
+
A as plaintextToMindElixir
|
|
228
234
|
};
|
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
addChild: "插入子节点",
|
|
3
|
+
addParent: "插入父节点",
|
|
4
|
+
addSibling: "插入同级节点",
|
|
5
|
+
removeNode: "删除节点",
|
|
6
|
+
focus: "专注",
|
|
7
|
+
cancelFocus: "取消专注",
|
|
8
|
+
moveUp: "上移",
|
|
9
|
+
moveDown: "下移",
|
|
10
|
+
link: "连接",
|
|
11
|
+
linkBidirectional: "双向连接",
|
|
12
|
+
clickTips: "请点击目标节点",
|
|
13
|
+
summary: "摘要"
|
|
14
|
+
}, i = e, o = {
|
|
15
|
+
addChild: "插入子節點",
|
|
16
|
+
addParent: "插入父節點",
|
|
17
|
+
addSibling: "插入同級節點",
|
|
18
|
+
removeNode: "刪除節點",
|
|
19
|
+
focus: "專注",
|
|
20
|
+
cancelFocus: "取消專注",
|
|
21
|
+
moveUp: "上移",
|
|
22
|
+
moveDown: "下移",
|
|
23
|
+
link: "連接",
|
|
24
|
+
linkBidirectional: "雙向連接",
|
|
25
|
+
clickTips: "請點擊目標節點",
|
|
26
|
+
summary: "摘要"
|
|
27
|
+
}, n = {
|
|
28
|
+
addChild: "Add child",
|
|
29
|
+
addParent: "Add parent",
|
|
30
|
+
addSibling: "Add sibling",
|
|
31
|
+
removeNode: "Remove node",
|
|
32
|
+
focus: "Focus Mode",
|
|
33
|
+
cancelFocus: "Cancel Focus Mode",
|
|
34
|
+
moveUp: "Move up",
|
|
35
|
+
moveDown: "Move down",
|
|
36
|
+
link: "Link",
|
|
37
|
+
linkBidirectional: "Bidirectional Link",
|
|
38
|
+
clickTips: "Please click the target node",
|
|
39
|
+
summary: "Summary"
|
|
40
|
+
}, a = {
|
|
41
|
+
addChild: "Добавить дочерний элемент",
|
|
42
|
+
addParent: "Добавить родительский элемент",
|
|
43
|
+
addSibling: "Добавить на этом уровне",
|
|
44
|
+
removeNode: "Удалить узел",
|
|
45
|
+
focus: "Режим фокусировки",
|
|
46
|
+
cancelFocus: "Отменить режим фокусировки",
|
|
47
|
+
moveUp: "Поднять выше",
|
|
48
|
+
moveDown: "Опустить ниже",
|
|
49
|
+
link: "Ссылка",
|
|
50
|
+
linkBidirectional: "Двунаправленная ссылка",
|
|
51
|
+
clickTips: "Пожалуйста, нажмите на целевой узел",
|
|
52
|
+
summary: "Описание"
|
|
53
|
+
}, d = {
|
|
54
|
+
addChild: "子ノードを追加する",
|
|
55
|
+
addParent: "親ノードを追加します",
|
|
56
|
+
addSibling: "兄弟ノードを追加する",
|
|
57
|
+
removeNode: "ノードを削除",
|
|
58
|
+
focus: "集中",
|
|
59
|
+
cancelFocus: "集中解除",
|
|
60
|
+
moveUp: "上へ移動",
|
|
61
|
+
moveDown: "下へ移動",
|
|
62
|
+
link: "コネクト",
|
|
63
|
+
linkBidirectional: "双方向リンク",
|
|
64
|
+
clickTips: "ターゲットノードをクリックしてください",
|
|
65
|
+
summary: "概要"
|
|
66
|
+
}, l = {
|
|
67
|
+
addChild: "Adicionar item filho",
|
|
68
|
+
addParent: "Adicionar item pai",
|
|
69
|
+
addSibling: "Adicionar item irmao",
|
|
70
|
+
removeNode: "Remover item",
|
|
71
|
+
focus: "Modo Foco",
|
|
72
|
+
cancelFocus: "Cancelar Modo Foco",
|
|
73
|
+
moveUp: "Mover para cima",
|
|
74
|
+
moveDown: "Mover para baixo",
|
|
75
|
+
link: "Link",
|
|
76
|
+
linkBidirectional: "Link bidirecional",
|
|
77
|
+
clickTips: "Favor clicar no item alvo",
|
|
78
|
+
summary: "Resumo"
|
|
79
|
+
}, c = {
|
|
80
|
+
addChild: "Aggiungi figlio",
|
|
81
|
+
addParent: "Aggiungi genitore",
|
|
82
|
+
addSibling: "Aggiungi fratello",
|
|
83
|
+
removeNode: "Rimuovi nodo",
|
|
84
|
+
focus: "Modalità Focus",
|
|
85
|
+
cancelFocus: "Annulla Modalità Focus",
|
|
86
|
+
moveUp: "Sposta su",
|
|
87
|
+
moveDown: "Sposta giù",
|
|
88
|
+
link: "Collega",
|
|
89
|
+
linkBidirectional: "Collegamento bidirezionale",
|
|
90
|
+
clickTips: "Si prega di fare clic sul nodo di destinazione",
|
|
91
|
+
summary: "Unisci nodi"
|
|
92
|
+
}, r = {
|
|
93
|
+
addChild: "Agregar hijo",
|
|
94
|
+
addParent: "Agregar padre",
|
|
95
|
+
addSibling: "Agregar hermano",
|
|
96
|
+
removeNode: "Eliminar nodo",
|
|
97
|
+
focus: "Modo Enfoque",
|
|
98
|
+
cancelFocus: "Cancelar Modo Enfoque",
|
|
99
|
+
moveUp: "Mover hacia arriba",
|
|
100
|
+
moveDown: "Mover hacia abajo",
|
|
101
|
+
link: "Enlace",
|
|
102
|
+
linkBidirectional: "Enlace bidireccional",
|
|
103
|
+
clickTips: "Por favor haga clic en el nodo de destino",
|
|
104
|
+
summary: "Resumen"
|
|
105
|
+
}, s = {
|
|
106
|
+
addChild: "Ajout enfant",
|
|
107
|
+
addParent: "Ajout parent",
|
|
108
|
+
addSibling: "Ajout voisin",
|
|
109
|
+
removeNode: "Supprimer",
|
|
110
|
+
focus: "Cibler",
|
|
111
|
+
cancelFocus: "Retour",
|
|
112
|
+
moveUp: "Monter",
|
|
113
|
+
moveDown: "Descendre",
|
|
114
|
+
link: "Lier",
|
|
115
|
+
linkBidirectional: "Lien bidirectionnel",
|
|
116
|
+
clickTips: "Cliquer sur le noeud cible",
|
|
117
|
+
summary: "Annoter"
|
|
118
|
+
}, t = {
|
|
119
|
+
addChild: "자식 추가",
|
|
120
|
+
addParent: "부모 추가",
|
|
121
|
+
addSibling: "형제 추가",
|
|
122
|
+
removeNode: "노드 삭제",
|
|
123
|
+
focus: "포커스 모드",
|
|
124
|
+
cancelFocus: "포커스 모드 취소",
|
|
125
|
+
moveUp: "위로 이동",
|
|
126
|
+
moveDown: "아래로 이동",
|
|
127
|
+
link: "연결",
|
|
128
|
+
linkBidirectional: "양방향 연결",
|
|
129
|
+
clickTips: "대상 노드를 클릭하십시오",
|
|
130
|
+
summary: "요약"
|
|
131
|
+
}, u = {
|
|
132
|
+
addChild: "Adaugă sub-nod",
|
|
133
|
+
addParent: "Adaugă nod părinte",
|
|
134
|
+
addSibling: "Adaugă nod la același nivel",
|
|
135
|
+
removeNode: "Șterge nodul",
|
|
136
|
+
focus: "Focalizare",
|
|
137
|
+
cancelFocus: "Anulează focalizarea",
|
|
138
|
+
moveUp: "Mută în sus",
|
|
139
|
+
moveDown: "Mută în jos",
|
|
140
|
+
link: "Creează legătură",
|
|
141
|
+
linkBidirectional: "Creează legătură bidirecțională",
|
|
142
|
+
clickTips: "Click pe nodul țintă",
|
|
143
|
+
summary: "Rezumat"
|
|
144
|
+
}, m = {
|
|
145
|
+
addChild: "Tilføj barn",
|
|
146
|
+
addParent: "Tilføj forælder",
|
|
147
|
+
addSibling: "Tilføj søskende",
|
|
148
|
+
removeNode: "Fjern node",
|
|
149
|
+
focus: "Fokus-tilstand",
|
|
150
|
+
cancelFocus: "Annuller fokus-tilstand",
|
|
151
|
+
moveUp: "Flyt op",
|
|
152
|
+
moveDown: "Flyt ned",
|
|
153
|
+
link: "Link",
|
|
154
|
+
linkBidirectional: "To-vejs link",
|
|
155
|
+
clickTips: "Klik på målknuden",
|
|
156
|
+
summary: "Resumé"
|
|
157
|
+
}, k = {
|
|
158
|
+
addChild: "Lisää lapsi",
|
|
159
|
+
addParent: "Lisää vanhempi",
|
|
160
|
+
addSibling: "Lisää sisarus",
|
|
161
|
+
removeNode: "Poista solmu",
|
|
162
|
+
focus: "Kohdistustila",
|
|
163
|
+
cancelFocus: "Peruuta kohdistustila",
|
|
164
|
+
moveUp: "Siirrä ylös",
|
|
165
|
+
moveDown: "Siirrä alas",
|
|
166
|
+
link: "Linkki",
|
|
167
|
+
linkBidirectional: "Kaksisuuntainen linkki",
|
|
168
|
+
clickTips: "Klikkaa kohdesolmua",
|
|
169
|
+
summary: "Yhteenveto"
|
|
170
|
+
}, v = {
|
|
171
|
+
addChild: "Kind hinzufügen",
|
|
172
|
+
addParent: "Eltern hinzufügen",
|
|
173
|
+
addSibling: "Geschwister hinzufügen",
|
|
174
|
+
removeNode: "Knoten entfernen",
|
|
175
|
+
focus: "Fokusmodus",
|
|
176
|
+
cancelFocus: "Fokusmodus abbrechen",
|
|
177
|
+
moveUp: "Nach oben verschieben",
|
|
178
|
+
moveDown: "Nach unten verschieben",
|
|
179
|
+
link: "Link",
|
|
180
|
+
linkBidirectional: "Zweiseitiger Link",
|
|
181
|
+
clickTips: "Bitte klicken Sie auf den Zielknoten",
|
|
182
|
+
summary: "Zusammenfassung"
|
|
183
|
+
}, g = {
|
|
184
|
+
addChild: "Kind toevoegen",
|
|
185
|
+
addParent: "Ouder toevoegen",
|
|
186
|
+
addSibling: "Broer/Zus toevoegen",
|
|
187
|
+
removeNode: "Knoop verwijderen",
|
|
188
|
+
focus: "Focusmodus",
|
|
189
|
+
cancelFocus: "Focusmodus annuleren",
|
|
190
|
+
moveUp: "Omhoog verplaatsen",
|
|
191
|
+
moveDown: "Omlaag verplaatsen",
|
|
192
|
+
link: "Link",
|
|
193
|
+
linkBidirectional: "Bidirectionele link",
|
|
194
|
+
clickTips: "Klik op de doelknoop",
|
|
195
|
+
summary: "Samenvatting"
|
|
196
|
+
}, p = {
|
|
197
|
+
addChild: "Legg til barn",
|
|
198
|
+
addParent: "Legg til forelder",
|
|
199
|
+
addSibling: "Legg til søsken",
|
|
200
|
+
removeNode: "Fjern node",
|
|
201
|
+
focus: "Fokusmodus",
|
|
202
|
+
cancelFocus: "Avbryt fokusmodus",
|
|
203
|
+
moveUp: "Flytt opp",
|
|
204
|
+
moveDown: "Flytt ned",
|
|
205
|
+
link: "Lenke",
|
|
206
|
+
linkBidirectional: "Toveis lenke",
|
|
207
|
+
clickTips: "Klikk på målnoden",
|
|
208
|
+
summary: "Sammendrag"
|
|
209
|
+
}, f = {
|
|
210
|
+
addChild: "Lägg till barn",
|
|
211
|
+
addParent: "Lägg till förälder",
|
|
212
|
+
addSibling: "Lägg till syskon",
|
|
213
|
+
removeNode: "Ta bort nod",
|
|
214
|
+
focus: "Fokusläge",
|
|
215
|
+
cancelFocus: "Avbryt fokusläge",
|
|
216
|
+
moveUp: "Flytta upp",
|
|
217
|
+
moveDown: "Flytta ner",
|
|
218
|
+
link: "Länk",
|
|
219
|
+
linkBidirectional: "Tvåvägslänk",
|
|
220
|
+
clickTips: "Klicka på målnoden",
|
|
221
|
+
summary: "Sammanfattning"
|
|
222
|
+
};
|
|
223
|
+
export {
|
|
224
|
+
e as cn,
|
|
225
|
+
m as da,
|
|
226
|
+
v as de,
|
|
227
|
+
n as en,
|
|
228
|
+
r as es,
|
|
229
|
+
k as fi,
|
|
230
|
+
s as fr,
|
|
231
|
+
c as it,
|
|
232
|
+
d as ja,
|
|
233
|
+
t as ko,
|
|
234
|
+
p as nb,
|
|
235
|
+
g as nl,
|
|
236
|
+
l as pt,
|
|
237
|
+
u as ro,
|
|
238
|
+
a as ru,
|
|
239
|
+
f as sv,
|
|
240
|
+
i as zh_CN,
|
|
241
|
+
o as zh_TW
|
|
242
|
+
};
|
package/dist/types/docs.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { MindElixirMethods } from './methods';
|
|
|
4
4
|
import type { Summary, SummarySvgGroup } from './summary';
|
|
5
5
|
import type { MindElixirData, MindElixirInstance, NodeObj, NodeObjExport, Options, Theme, TagObj } from './types';
|
|
6
6
|
import type { MainLineParams, SubLineParams } from './utils/generateBranch';
|
|
7
|
-
import type {
|
|
8
|
-
export { methods, Theme, Options, MindElixirMethods, MindElixirInstance, MindElixirData, NodeObj, NodeObjExport, Summary, SummarySvgGroup, Arrow, MainLineParams, SubLineParams,
|
|
7
|
+
import type { LangPack } from './i18n';
|
|
8
|
+
export { methods, Theme, Options, MindElixirMethods, MindElixirInstance, MindElixirData, NodeObj, NodeObjExport, Summary, SummarySvgGroup, Arrow, MainLineParams, SubLineParams, LangPack, TagObj, };
|
|
9
9
|
export type * from './types/dom';
|
|
10
10
|
export type * from './utils/pubsub';
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type LangPack = {
|
|
1
|
+
export type LangPack = {
|
|
2
2
|
addChild: string;
|
|
3
3
|
addParent: string;
|
|
4
4
|
addSibling: string;
|
|
@@ -12,9 +12,21 @@ type LangPack = {
|
|
|
12
12
|
clickTips: string;
|
|
13
13
|
summary: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
declare const
|
|
20
|
-
export
|
|
15
|
+
export declare const cn: LangPack;
|
|
16
|
+
export declare const zh_CN: LangPack;
|
|
17
|
+
export declare const zh_TW: LangPack;
|
|
18
|
+
export declare const en: LangPack;
|
|
19
|
+
export declare const ru: LangPack;
|
|
20
|
+
export declare const ja: LangPack;
|
|
21
|
+
export declare const pt: LangPack;
|
|
22
|
+
export declare const it: LangPack;
|
|
23
|
+
export declare const es: LangPack;
|
|
24
|
+
export declare const fr: LangPack;
|
|
25
|
+
export declare const ko: LangPack;
|
|
26
|
+
export declare const ro: LangPack;
|
|
27
|
+
export declare const da: LangPack;
|
|
28
|
+
export declare const fi: LangPack;
|
|
29
|
+
export declare const de: LangPack;
|
|
30
|
+
export declare const nl: LangPack;
|
|
31
|
+
export declare const nb: LangPack;
|
|
32
|
+
export declare const sv: LangPack;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import './markdown.css';
|
|
|
3
3
|
import { LEFT, RIGHT, SIDE, DARK_THEME, THEME } from './const';
|
|
4
4
|
import type { MindElixirData, MindElixirInstance, MindElixirMethods, Options } from './types/index';
|
|
5
5
|
import type { Topic } from './docs';
|
|
6
|
-
declare function MindElixir(this: MindElixirInstance, { el, direction,
|
|
6
|
+
declare function MindElixir(this: MindElixirInstance, { el, direction, editable, contextMenu, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, alignment, scaleSensitivity, scaleMax, scaleMin, handleWheel, markdown, imageProxy, pasteHandler, }: Options): void;
|
|
7
7
|
declare namespace MindElixir {
|
|
8
8
|
export var prototype: {
|
|
9
9
|
init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
|
|
@@ -49,8 +49,7 @@ declare namespace MindElixir {
|
|
|
49
49
|
getDataString: (this: MindElixirInstance) => string;
|
|
50
50
|
getData: (this: MindElixirInstance) => MindElixirData;
|
|
51
51
|
enableEdit: (this: MindElixirInstance) => void;
|
|
52
|
-
disableEdit: (
|
|
53
|
-
this: MindElixirInstance) => void;
|
|
52
|
+
disableEdit: (this: MindElixirInstance) => void;
|
|
54
53
|
scale: (this: MindElixirInstance, scaleVal: number, offset?: {
|
|
55
54
|
x: number;
|
|
56
55
|
y: number;
|
|
@@ -64,7 +63,6 @@ declare namespace MindElixir {
|
|
|
64
63
|
initLeft: (this: MindElixirInstance) => void;
|
|
65
64
|
initRight: (this: MindElixirInstance) => void;
|
|
66
65
|
initSide: (this: MindElixirInstance) => void;
|
|
67
|
-
setLocale: (this: MindElixirInstance, locale: import("./i18n").Locale) => void;
|
|
68
66
|
expandNode: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
|
|
69
67
|
expandNodeAll: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
|
|
70
68
|
refresh: (this: MindElixirInstance, data?: MindElixirData) => void;
|
package/dist/types/interact.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Locale } from './i18n';
|
|
2
1
|
import type { Topic } from './types/dom';
|
|
3
2
|
import type { MindElixirData, MindElixirInstance } from './types/index';
|
|
4
3
|
export declare const scrollIntoView: (this: MindElixirInstance, el: HTMLElement) => void;
|
|
@@ -116,13 +115,6 @@ export declare const initRight: (this: MindElixirInstance) => void;
|
|
|
116
115
|
* @memberof MapInteraction
|
|
117
116
|
*/
|
|
118
117
|
export declare const initSide: (this: MindElixirInstance) => void;
|
|
119
|
-
/**
|
|
120
|
-
* @function
|
|
121
|
-
* @instance
|
|
122
|
-
* @name setLocale
|
|
123
|
-
* @memberof MapInteraction
|
|
124
|
-
*/
|
|
125
|
-
export declare const setLocale: (this: MindElixirInstance, locale: Locale) => void;
|
|
126
118
|
export declare const expandNode: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
|
|
127
119
|
export declare const expandNodeAll: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
|
|
128
120
|
/**
|