@arach/arc 0.4.4 → 0.5.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/README.md +16 -1
- package/lib/addon-fit_hudsonkit_false-S8IcWS9p.js +5 -0
- package/lib/addon-webgl_hudsonkit_false-u2xnk9eC.js +5 -0
- package/lib/arc.css +1 -0
- package/lib/arc.es.js +18 -17
- package/lib/arc.umd.js +131 -143
- package/lib/commands_hudsonkit_false-tNYQZ4nZ.js +5 -0
- package/lib/highlight_hudsonkit_false-CGjCyNxW.js +5 -0
- package/lib/index-B47Ukxqu.js +314 -0
- package/lib/index-DM8JwQYr.js +6513 -0
- package/lib/index-iG7ybQea.js +57605 -0
- package/lib/index-k2yfnFw8.js +1925 -0
- package/lib/index.d.ts +151 -7
- package/lib/lang-css_hudsonkit_false-oeV3Hq1J.js +5 -0
- package/lib/lang-html_hudsonkit_false-CCxA3CYh.js +5 -0
- package/lib/lang-javascript_hudsonkit_false-SQgz3iJM.js +5 -0
- package/lib/lang-json_hudsonkit_false-BksH8zxC.js +5 -0
- package/lib/lang-markdown_hudsonkit_false-B5TeQsd5.js +5 -0
- package/lib/language_hudsonkit_false-D4r7WoC5.js +5 -0
- package/lib/state_hudsonkit_false-Rl5x6lAJ.js +5 -0
- package/lib/view_hudsonkit_false-Cv9f7Eek.js +5 -0
- package/lib/xterm_hudsonkit_false-C1tkX9GJ.js +5 -0
- package/package.json +17 -16
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
function G() {
|
|
2
|
+
}
|
|
3
|
+
function J() {
|
|
4
|
+
}
|
|
5
|
+
const N = {};
|
|
6
|
+
function M(n, e) {
|
|
7
|
+
const t = N, o = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, i = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
|
|
8
|
+
return E(n, o, i);
|
|
9
|
+
}
|
|
10
|
+
function E(n, e, t) {
|
|
11
|
+
if (z(n)) {
|
|
12
|
+
if ("value" in n)
|
|
13
|
+
return n.type === "html" && !t ? "" : n.value;
|
|
14
|
+
if (e && "alt" in n && n.alt)
|
|
15
|
+
return n.alt;
|
|
16
|
+
if ("children" in n)
|
|
17
|
+
return w(n.children, e, t);
|
|
18
|
+
}
|
|
19
|
+
return Array.isArray(n) ? w(n, e, t) : "";
|
|
20
|
+
}
|
|
21
|
+
function w(n, e, t) {
|
|
22
|
+
const o = [];
|
|
23
|
+
let i = -1;
|
|
24
|
+
for (; ++i < n.length; )
|
|
25
|
+
o[i] = E(n[i], e, t);
|
|
26
|
+
return o.join("");
|
|
27
|
+
}
|
|
28
|
+
function z(n) {
|
|
29
|
+
return !!(n && typeof n == "object");
|
|
30
|
+
}
|
|
31
|
+
function I(n, e, t, o) {
|
|
32
|
+
const i = n.length;
|
|
33
|
+
let r = 0, c;
|
|
34
|
+
if (e < 0 ? e = -e > i ? 0 : i + e : e = e > i ? i : e, t = t > 0 ? t : 0, o.length < 1e4)
|
|
35
|
+
c = Array.from(o), c.unshift(e, t), n.splice(...c);
|
|
36
|
+
else
|
|
37
|
+
for (t && n.splice(e, t); r < o.length; )
|
|
38
|
+
c = o.slice(r, r + 1e4), c.unshift(e, 0), n.splice(...c), r += 1e4, e += 1e4;
|
|
39
|
+
}
|
|
40
|
+
function Q(n, e) {
|
|
41
|
+
return n.length > 0 ? (I(n, n.length, 0, e), n) : e;
|
|
42
|
+
}
|
|
43
|
+
const x = {}.hasOwnProperty;
|
|
44
|
+
function V(n) {
|
|
45
|
+
const e = {};
|
|
46
|
+
let t = -1;
|
|
47
|
+
for (; ++t < n.length; )
|
|
48
|
+
F(e, n[t]);
|
|
49
|
+
return e;
|
|
50
|
+
}
|
|
51
|
+
function F(n, e) {
|
|
52
|
+
let t;
|
|
53
|
+
for (t in e) {
|
|
54
|
+
const i = (x.call(n, t) ? n[t] : void 0) || (n[t] = {}), r = e[t];
|
|
55
|
+
let c;
|
|
56
|
+
if (r)
|
|
57
|
+
for (c in r) {
|
|
58
|
+
x.call(i, c) || (i[c] = []);
|
|
59
|
+
const f = r[c];
|
|
60
|
+
L(
|
|
61
|
+
// @ts-expect-error Looks like a list.
|
|
62
|
+
i[c],
|
|
63
|
+
Array.isArray(f) ? f : f ? [f] : []
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function L(n, e) {
|
|
69
|
+
let t = -1;
|
|
70
|
+
const o = [];
|
|
71
|
+
for (; ++t < e.length; )
|
|
72
|
+
(e[t].add === "after" ? n : o).push(e[t]);
|
|
73
|
+
I(n, 0, 0, o);
|
|
74
|
+
}
|
|
75
|
+
function v(n) {
|
|
76
|
+
return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
77
|
+
}
|
|
78
|
+
const nn = s(/[A-Za-z]/), tn = s(/[\dA-Za-z]/), en = s(/[#-'*+\--9=?A-Z^-~]/);
|
|
79
|
+
function rn(n) {
|
|
80
|
+
return (
|
|
81
|
+
// Special whitespace codes (which have negative values), C0 and Control
|
|
82
|
+
// character DEL
|
|
83
|
+
n !== null && (n < 32 || n === 127)
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
const on = s(/\d/), cn = s(/[\dA-Fa-f]/), un = s(/[!-/:-@[-`{-~]/);
|
|
87
|
+
function O(n) {
|
|
88
|
+
return n !== null && n < -2;
|
|
89
|
+
}
|
|
90
|
+
function T(n) {
|
|
91
|
+
return n !== null && (n < 0 || n === 32);
|
|
92
|
+
}
|
|
93
|
+
function b(n) {
|
|
94
|
+
return n === -2 || n === -1 || n === 32;
|
|
95
|
+
}
|
|
96
|
+
const B = s(new RegExp("\\p{P}|\\p{S}", "u")), Z = s(/\s/);
|
|
97
|
+
function s(n) {
|
|
98
|
+
return e;
|
|
99
|
+
function e(t) {
|
|
100
|
+
return t !== null && t > -1 && n.test(String.fromCharCode(t));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function D(n, e, t, o) {
|
|
104
|
+
const i = o ? o - 1 : Number.POSITIVE_INFINITY;
|
|
105
|
+
let r = 0;
|
|
106
|
+
return c;
|
|
107
|
+
function c(u) {
|
|
108
|
+
return b(u) ? (n.enter(t), f(u)) : e(u);
|
|
109
|
+
}
|
|
110
|
+
function f(u) {
|
|
111
|
+
return b(u) && r++ < i ? (n.consume(u), f) : (n.exit(t), e(u));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function fn(n) {
|
|
115
|
+
if (n === null || T(n) || Z(n))
|
|
116
|
+
return 1;
|
|
117
|
+
if (B(n))
|
|
118
|
+
return 2;
|
|
119
|
+
}
|
|
120
|
+
function ln(n, e, t) {
|
|
121
|
+
const o = [];
|
|
122
|
+
let i = -1;
|
|
123
|
+
for (; ++i < n.length; ) {
|
|
124
|
+
const r = n[i].resolveAll;
|
|
125
|
+
r && !o.includes(r) && (e = r(e, t), o.push(r));
|
|
126
|
+
}
|
|
127
|
+
return e;
|
|
128
|
+
}
|
|
129
|
+
const an = {
|
|
130
|
+
partial: !0,
|
|
131
|
+
tokenize: H
|
|
132
|
+
};
|
|
133
|
+
function H(n, e, t) {
|
|
134
|
+
return o;
|
|
135
|
+
function o(r) {
|
|
136
|
+
return b(r) ? D(n, i, "linePrefix")(r) : i(r);
|
|
137
|
+
}
|
|
138
|
+
function i(r) {
|
|
139
|
+
return r === null || O(r) ? e(r) : t(r);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const S = (
|
|
143
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
144
|
+
/**
|
|
145
|
+
* @type {(
|
|
146
|
+
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
147
|
+
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
148
|
+
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
149
|
+
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
150
|
+
* ((test?: Test) => Check)
|
|
151
|
+
* )}
|
|
152
|
+
*/
|
|
153
|
+
/**
|
|
154
|
+
* @param {Test} [test]
|
|
155
|
+
* @returns {Check}
|
|
156
|
+
*/
|
|
157
|
+
(function(n) {
|
|
158
|
+
if (n == null)
|
|
159
|
+
return K;
|
|
160
|
+
if (typeof n == "function")
|
|
161
|
+
return A(n);
|
|
162
|
+
if (typeof n == "object")
|
|
163
|
+
return Array.isArray(n) ? U(n) : (
|
|
164
|
+
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
165
|
+
// narrows to `Array`.
|
|
166
|
+
$(
|
|
167
|
+
/** @type {Props} */
|
|
168
|
+
n
|
|
169
|
+
)
|
|
170
|
+
);
|
|
171
|
+
if (typeof n == "string")
|
|
172
|
+
return q(n);
|
|
173
|
+
throw new Error("Expected function, string, or object as test");
|
|
174
|
+
})
|
|
175
|
+
);
|
|
176
|
+
function U(n) {
|
|
177
|
+
const e = [];
|
|
178
|
+
let t = -1;
|
|
179
|
+
for (; ++t < n.length; )
|
|
180
|
+
e[t] = S(n[t]);
|
|
181
|
+
return A(o);
|
|
182
|
+
function o(...i) {
|
|
183
|
+
let r = -1;
|
|
184
|
+
for (; ++r < e.length; )
|
|
185
|
+
if (e[r].apply(this, i)) return !0;
|
|
186
|
+
return !1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function $(n) {
|
|
190
|
+
const e = (
|
|
191
|
+
/** @type {Record<string, unknown>} */
|
|
192
|
+
n
|
|
193
|
+
);
|
|
194
|
+
return A(t);
|
|
195
|
+
function t(o) {
|
|
196
|
+
const i = (
|
|
197
|
+
/** @type {Record<string, unknown>} */
|
|
198
|
+
/** @type {unknown} */
|
|
199
|
+
o
|
|
200
|
+
);
|
|
201
|
+
let r;
|
|
202
|
+
for (r in n)
|
|
203
|
+
if (i[r] !== e[r]) return !1;
|
|
204
|
+
return !0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function q(n) {
|
|
208
|
+
return A(e);
|
|
209
|
+
function e(t) {
|
|
210
|
+
return t && t.type === n;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function A(n) {
|
|
214
|
+
return e;
|
|
215
|
+
function e(t, o, i) {
|
|
216
|
+
return !!(R(t) && n.call(
|
|
217
|
+
this,
|
|
218
|
+
t,
|
|
219
|
+
typeof o == "number" ? o : void 0,
|
|
220
|
+
i || void 0
|
|
221
|
+
));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function K() {
|
|
225
|
+
return !0;
|
|
226
|
+
}
|
|
227
|
+
function R(n) {
|
|
228
|
+
return n !== null && typeof n == "object" && "type" in n;
|
|
229
|
+
}
|
|
230
|
+
const j = [], W = !0, P = !1, X = "skip";
|
|
231
|
+
function Y(n, e, t, o) {
|
|
232
|
+
let i;
|
|
233
|
+
typeof e == "function" && typeof t != "function" ? (o = t, t = e) : i = e;
|
|
234
|
+
const r = S(i), c = o ? -1 : 1;
|
|
235
|
+
f(n, void 0, [])();
|
|
236
|
+
function f(u, g, l) {
|
|
237
|
+
const p = (
|
|
238
|
+
/** @type {Record<string, unknown>} */
|
|
239
|
+
u && typeof u == "object" ? u : {}
|
|
240
|
+
);
|
|
241
|
+
if (typeof p.type == "string") {
|
|
242
|
+
const a = (
|
|
243
|
+
// `hast`
|
|
244
|
+
typeof p.tagName == "string" ? p.tagName : (
|
|
245
|
+
// `xast`
|
|
246
|
+
typeof p.name == "string" ? p.name : void 0
|
|
247
|
+
)
|
|
248
|
+
);
|
|
249
|
+
Object.defineProperty(k, "name", {
|
|
250
|
+
value: "node (" + (u.type + (a ? "<" + a + ">" : "")) + ")"
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
return k;
|
|
254
|
+
function k() {
|
|
255
|
+
let a = j, y, h, m;
|
|
256
|
+
if ((!e || r(u, g, l[l.length - 1] || void 0)) && (a = _(t(u, l)), a[0] === P))
|
|
257
|
+
return a;
|
|
258
|
+
if ("children" in u && u.children) {
|
|
259
|
+
const d = (
|
|
260
|
+
/** @type {UnistParent} */
|
|
261
|
+
u
|
|
262
|
+
);
|
|
263
|
+
if (d.children && a[0] !== X)
|
|
264
|
+
for (h = (o ? d.children.length : -1) + c, m = l.concat(d); h > -1 && h < d.children.length; ) {
|
|
265
|
+
const C = d.children[h];
|
|
266
|
+
if (y = f(C, h, m)(), y[0] === P)
|
|
267
|
+
return y;
|
|
268
|
+
h = typeof y[1] == "number" ? y[1] : h + c;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return a;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function _(n) {
|
|
276
|
+
return Array.isArray(n) ? n : typeof n == "number" ? [W, n] : n == null ? j : [n];
|
|
277
|
+
}
|
|
278
|
+
function sn(n, e, t, o) {
|
|
279
|
+
let i, r, c;
|
|
280
|
+
typeof e == "function" && typeof t != "function" ? (r = void 0, c = e, i = t) : (r = e, c = t, i = o), Y(n, r, f, i);
|
|
281
|
+
function f(u, g) {
|
|
282
|
+
const l = g[g.length - 1], p = l ? l.children.indexOf(u) : void 0;
|
|
283
|
+
return c(u, p, l);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
export {
|
|
287
|
+
P as E,
|
|
288
|
+
tn as a,
|
|
289
|
+
nn as b,
|
|
290
|
+
fn as c,
|
|
291
|
+
rn as d,
|
|
292
|
+
en as e,
|
|
293
|
+
D as f,
|
|
294
|
+
b as g,
|
|
295
|
+
un as h,
|
|
296
|
+
cn as i,
|
|
297
|
+
on as j,
|
|
298
|
+
T as k,
|
|
299
|
+
an as l,
|
|
300
|
+
O as m,
|
|
301
|
+
v as n,
|
|
302
|
+
G as o,
|
|
303
|
+
Q as p,
|
|
304
|
+
V as q,
|
|
305
|
+
ln as r,
|
|
306
|
+
I as s,
|
|
307
|
+
M as t,
|
|
308
|
+
J as u,
|
|
309
|
+
sn as v,
|
|
310
|
+
S as w,
|
|
311
|
+
Y as x,
|
|
312
|
+
Z as y,
|
|
313
|
+
B as z
|
|
314
|
+
};
|