@oxide/react-asciidoc 2.0.0--canary.54.27011587789.0 → 2.0.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 +12 -10
- package/dist/react-asciidoc.js +120 -141
- package/dist/react-asciidoc.umd.cjs +11 -31
- package/dist/types/utils/prepareDocument.d.ts +3 -3
- package/package.json +1 -14
package/dist/react-asciidoc.js
CHANGED
|
@@ -5,20 +5,11 @@ function ne(u) {
|
|
|
5
5
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
6
6
|
}
|
|
7
7
|
var $u = { exports: {} }, yu = {};
|
|
8
|
-
/**
|
|
9
|
-
* @license React
|
|
10
|
-
* react-jsx-runtime.production.js
|
|
11
|
-
*
|
|
12
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
8
|
var Du;
|
|
18
9
|
function le() {
|
|
19
10
|
if (Du) return yu;
|
|
20
11
|
Du = 1;
|
|
21
|
-
var u = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
12
|
+
var u = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
22
13
|
function t(s, a, c) {
|
|
23
14
|
var i = null;
|
|
24
15
|
if (c !== void 0 && (i = "" + c), a.key !== void 0 && (i = "" + a.key), "key" in a) {
|
|
@@ -37,15 +28,6 @@ function le() {
|
|
|
37
28
|
return yu.Fragment = e, yu.jsx = t, yu.jsxs = t, yu;
|
|
38
29
|
}
|
|
39
30
|
var vu = {};
|
|
40
|
-
/**
|
|
41
|
-
* @license React
|
|
42
|
-
* react-jsx-runtime.development.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/
|
|
49
31
|
var Bu;
|
|
50
32
|
function oe() {
|
|
51
33
|
return Bu || (Bu = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
@@ -83,7 +65,7 @@ function oe() {
|
|
|
83
65
|
return d = d.displayName, d || (d = w.displayName || w.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
84
66
|
case X:
|
|
85
67
|
return w = d.displayName || null, w !== null ? w : u(d.type) || "Memo";
|
|
86
|
-
case
|
|
68
|
+
case ou:
|
|
87
69
|
w = d._payload, d = d._init;
|
|
88
70
|
try {
|
|
89
71
|
return u(d(w));
|
|
@@ -114,7 +96,7 @@ function oe() {
|
|
|
114
96
|
}
|
|
115
97
|
function s(d) {
|
|
116
98
|
if (d === j) return "<>";
|
|
117
|
-
if (typeof d == "object" && d !== null && d.$$typeof ===
|
|
99
|
+
if (typeof d == "object" && d !== null && d.$$typeof === ou)
|
|
118
100
|
return "<...>";
|
|
119
101
|
try {
|
|
120
102
|
var w = u(d);
|
|
@@ -155,7 +137,7 @@ function oe() {
|
|
|
155
137
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
138
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
157
139
|
}
|
|
158
|
-
function b(d, w, $, A, D,
|
|
140
|
+
function b(d, w, $, A, D, ru) {
|
|
159
141
|
var M = $.ref;
|
|
160
142
|
return d = {
|
|
161
143
|
$$typeof: p,
|
|
@@ -185,10 +167,10 @@ function oe() {
|
|
|
185
167
|
configurable: !1,
|
|
186
168
|
enumerable: !1,
|
|
187
169
|
writable: !0,
|
|
188
|
-
value:
|
|
170
|
+
value: ru
|
|
189
171
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
190
172
|
}
|
|
191
|
-
function m(d, w, $, A, D,
|
|
173
|
+
function m(d, w, $, A, D, ru) {
|
|
192
174
|
var M = w.children;
|
|
193
175
|
if (M !== void 0)
|
|
194
176
|
if (A)
|
|
@@ -203,10 +185,10 @@ function oe() {
|
|
|
203
185
|
else h(M);
|
|
204
186
|
if (E.call(w, "key")) {
|
|
205
187
|
M = u(d);
|
|
206
|
-
var
|
|
188
|
+
var eu = Object.keys(w).filter(function(qu) {
|
|
207
189
|
return qu !== "key";
|
|
208
190
|
});
|
|
209
|
-
A = 0 <
|
|
191
|
+
A = 0 < eu.length ? "{key: someKey, " + eu.join(": ..., ") + ": ...}" : "{key: someKey}", _[M + A] || (eu = 0 < eu.length ? "{" + eu.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
210
192
|
`A props object containing a "key" prop is being spread into JSX:
|
|
211
193
|
let props = %s;
|
|
212
194
|
<%s {...props} />
|
|
@@ -215,7 +197,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
215
197
|
<%s key={someKey} {...props} />`,
|
|
216
198
|
A,
|
|
217
199
|
M,
|
|
218
|
-
|
|
200
|
+
eu,
|
|
219
201
|
M
|
|
220
202
|
), _[M + A] = !0);
|
|
221
203
|
}
|
|
@@ -233,16 +215,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
215
|
$,
|
|
234
216
|
a(),
|
|
235
217
|
D,
|
|
236
|
-
|
|
218
|
+
ru
|
|
237
219
|
);
|
|
238
220
|
}
|
|
239
221
|
function h(d) {
|
|
240
|
-
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof ===
|
|
222
|
+
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === ou && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
241
223
|
}
|
|
242
224
|
function f(d) {
|
|
243
225
|
return typeof d == "object" && d !== null && d.$$typeof === p;
|
|
244
226
|
}
|
|
245
|
-
var y = ce, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), q = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"),
|
|
227
|
+
var y = ce, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), I = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.consumer"), q = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), Q = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), ou = /* @__PURE__ */ Symbol.for("react.lazy"), Hu = /* @__PURE__ */ Symbol.for("react.activity"), o = /* @__PURE__ */ Symbol.for("react.client.reference"), l = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, E = Object.prototype.hasOwnProperty, L = Array.isArray, R = console.createTask ? console.createTask : function() {
|
|
246
228
|
return null;
|
|
247
229
|
};
|
|
248
230
|
y = {
|
|
@@ -333,10 +315,10 @@ var Z;
|
|
|
333
315
|
u[u.NUM = 35] = "NUM", u[u.SEMI = 59] = "SEMI", u[u.EQUALS = 61] = "EQUALS", u[u.ZERO = 48] = "ZERO", u[u.NINE = 57] = "NINE", u[u.LOWER_A = 97] = "LOWER_A", u[u.LOWER_F = 102] = "LOWER_F", u[u.LOWER_X = 120] = "LOWER_X", u[u.LOWER_Z = 122] = "LOWER_Z", u[u.UPPER_A = 65] = "UPPER_A", u[u.UPPER_F = 70] = "UPPER_F", u[u.UPPER_Z = 90] = "UPPER_Z";
|
|
334
316
|
})(Z || (Z = {}));
|
|
335
317
|
const he = 32;
|
|
336
|
-
var
|
|
318
|
+
var lu;
|
|
337
319
|
(function(u) {
|
|
338
320
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
339
|
-
})(
|
|
321
|
+
})(lu || (lu = {}));
|
|
340
322
|
function Cu(u) {
|
|
341
323
|
return u >= Z.ZERO && u <= Z.NINE;
|
|
342
324
|
}
|
|
@@ -353,13 +335,13 @@ var G;
|
|
|
353
335
|
(function(u) {
|
|
354
336
|
u[u.EntityStart = 0] = "EntityStart", u[u.NumericStart = 1] = "NumericStart", u[u.NumericDecimal = 2] = "NumericDecimal", u[u.NumericHex = 3] = "NumericHex", u[u.NamedEntity = 4] = "NamedEntity";
|
|
355
337
|
})(G || (G = {}));
|
|
356
|
-
var
|
|
338
|
+
var nu;
|
|
357
339
|
(function(u) {
|
|
358
340
|
u[u.Legacy = 0] = "Legacy", u[u.Strict = 1] = "Strict", u[u.Attribute = 2] = "Attribute";
|
|
359
|
-
})(
|
|
341
|
+
})(nu || (nu = {}));
|
|
360
342
|
class ve {
|
|
361
343
|
constructor(e, t, s) {
|
|
362
|
-
this.decodeTree = e, this.emitCodePoint = t, this.errors = s, this.state = G.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode =
|
|
344
|
+
this.decodeTree = e, this.emitCodePoint = t, this.errors = s, this.state = G.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = nu.Strict;
|
|
363
345
|
}
|
|
364
346
|
/** Resets the instance to make it reusable. */
|
|
365
347
|
startEntity(e) {
|
|
@@ -467,7 +449,7 @@ class ve {
|
|
|
467
449
|
return (s = this.errors) === null || s === void 0 || s.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
468
450
|
if (e === Z.SEMI)
|
|
469
451
|
this.consumed += 1;
|
|
470
|
-
else if (this.decodeMode ===
|
|
452
|
+
else if (this.decodeMode === nu.Strict)
|
|
471
453
|
return 0;
|
|
472
454
|
return this.emitCodePoint(pe(this.result), this.consumed), this.errors && (e !== Z.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
473
455
|
}
|
|
@@ -482,18 +464,18 @@ class ve {
|
|
|
482
464
|
*/
|
|
483
465
|
stateNamedEntity(e, t) {
|
|
484
466
|
const { decodeTree: s } = this;
|
|
485
|
-
let a = s[this.treeIndex], c = (a &
|
|
467
|
+
let a = s[this.treeIndex], c = (a & lu.VALUE_LENGTH) >> 14;
|
|
486
468
|
for (; t < e.length; t++, this.excess++) {
|
|
487
469
|
const i = e.charCodeAt(t);
|
|
488
470
|
if (this.treeIndex = we(s, a, this.treeIndex + Math.max(1, c), i), this.treeIndex < 0)
|
|
489
471
|
return this.result === 0 || // If we are parsing an attribute
|
|
490
|
-
this.decodeMode ===
|
|
472
|
+
this.decodeMode === nu.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
491
473
|
(c === 0 || // And there should be no invalid characters.
|
|
492
474
|
ye(i)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
493
|
-
if (a = s[this.treeIndex], c = (a &
|
|
475
|
+
if (a = s[this.treeIndex], c = (a & lu.VALUE_LENGTH) >> 14, c !== 0) {
|
|
494
476
|
if (i === Z.SEMI)
|
|
495
477
|
return this.emitNamedEntityData(this.treeIndex, c, this.consumed + this.excess);
|
|
496
|
-
this.decodeMode !==
|
|
478
|
+
this.decodeMode !== nu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
497
479
|
}
|
|
498
480
|
}
|
|
499
481
|
return -1;
|
|
@@ -505,7 +487,7 @@ class ve {
|
|
|
505
487
|
*/
|
|
506
488
|
emitNotTerminatedNamedEntity() {
|
|
507
489
|
var e;
|
|
508
|
-
const { result: t, decodeTree: s } = this, a = (s[t] &
|
|
490
|
+
const { result: t, decodeTree: s } = this, a = (s[t] & lu.VALUE_LENGTH) >> 14;
|
|
509
491
|
return this.emitNamedEntityData(t, a, this.consumed), (e = this.errors) === null || e === void 0 || e.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
510
492
|
}
|
|
511
493
|
/**
|
|
@@ -519,7 +501,7 @@ class ve {
|
|
|
519
501
|
*/
|
|
520
502
|
emitNamedEntityData(e, t, s) {
|
|
521
503
|
const { decodeTree: a } = this;
|
|
522
|
-
return this.emitCodePoint(t === 1 ? a[e] & ~
|
|
504
|
+
return this.emitCodePoint(t === 1 ? a[e] & ~lu.VALUE_LENGTH : a[e + 1], s), t === 3 && this.emitCodePoint(a[e + 2], s), s;
|
|
523
505
|
}
|
|
524
506
|
/**
|
|
525
507
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -532,7 +514,7 @@ class ve {
|
|
|
532
514
|
var e;
|
|
533
515
|
switch (this.state) {
|
|
534
516
|
case G.NamedEntity:
|
|
535
|
-
return this.result !== 0 && (this.decodeMode !==
|
|
517
|
+
return this.result !== 0 && (this.decodeMode !== nu.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
536
518
|
// Otherwise, emit a numeric entity if we have one.
|
|
537
519
|
case G.NumericDecimal:
|
|
538
520
|
return this.emitNumericEntity(0, 2);
|
|
@@ -568,7 +550,7 @@ function je(u) {
|
|
|
568
550
|
};
|
|
569
551
|
}
|
|
570
552
|
function we(u, e, t, s) {
|
|
571
|
-
const a = (e &
|
|
553
|
+
const a = (e & lu.BRANCH_LENGTH) >> 7, c = e & lu.JUMP_TABLE;
|
|
572
554
|
if (a === 0)
|
|
573
555
|
return c !== 0 && s === c ? t : -1;
|
|
574
556
|
if (c) {
|
|
@@ -588,10 +570,10 @@ function we(u, e, t, s) {
|
|
|
588
570
|
return -1;
|
|
589
571
|
}
|
|
590
572
|
const $e = /* @__PURE__ */ je(fe);
|
|
591
|
-
function Ne(u, e =
|
|
573
|
+
function Ne(u, e = nu.Legacy) {
|
|
592
574
|
return $e(u, e);
|
|
593
575
|
}
|
|
594
|
-
const Y = "A-Za-z0-9_",
|
|
576
|
+
const Y = "A-Za-z0-9_", uu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]", Uu = {
|
|
595
577
|
nonCompat: [
|
|
596
578
|
{
|
|
597
579
|
type: "strong",
|
|
@@ -602,7 +584,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
602
584
|
type: "strong",
|
|
603
585
|
scope: "constrained",
|
|
604
586
|
rx: new RegExp(
|
|
605
|
-
`(^|[^${Y};:}])(?:${W})?\\*(\\S|\\S${B}*?\\S)\\*(?!${
|
|
587
|
+
`(^|[^${Y};:}])(?:${W})?\\*(\\S|\\S${B}*?\\S)\\*(?!${uu})`,
|
|
606
588
|
"m"
|
|
607
589
|
)
|
|
608
590
|
},
|
|
@@ -610,7 +592,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
610
592
|
type: "double",
|
|
611
593
|
scope: "constrained",
|
|
612
594
|
rx: new RegExp(
|
|
613
|
-
`(^|[^${Y};:}])(?:${W})?"\`(\\S|\\S${B}*?\\S)\`"(?!${
|
|
595
|
+
`(^|[^${Y};:}])(?:${W})?"\`(\\S|\\S${B}*?\\S)\`"(?!${uu})`,
|
|
614
596
|
"m"
|
|
615
597
|
)
|
|
616
598
|
},
|
|
@@ -618,7 +600,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
618
600
|
type: "single",
|
|
619
601
|
scope: "constrained",
|
|
620
602
|
rx: new RegExp(
|
|
621
|
-
`(^|[^${Y};:\`}])(?:${W})?'\`(\\S|\\S${B}*?\\S)\`'(?!${
|
|
603
|
+
`(^|[^${Y};:\`}])(?:${W})?'\`(\\S|\\S${B}*?\\S)\`'(?!${uu})`,
|
|
622
604
|
"m"
|
|
623
605
|
)
|
|
624
606
|
},
|
|
@@ -644,7 +626,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
644
626
|
type: "emphasis",
|
|
645
627
|
scope: "constrained",
|
|
646
628
|
rx: new RegExp(
|
|
647
|
-
`(^|[^${Y};:}])(?:${W})?_(\\S|\\S${B}*?\\S)_(?!${
|
|
629
|
+
`(^|[^${Y};:}])(?:${W})?_(\\S|\\S${B}*?\\S)_(?!${uu})`,
|
|
648
630
|
"m"
|
|
649
631
|
)
|
|
650
632
|
},
|
|
@@ -657,7 +639,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
657
639
|
type: "mark",
|
|
658
640
|
scope: "constrained",
|
|
659
641
|
rx: new RegExp(
|
|
660
|
-
`(^|[^${Y}&;:}])(?:${W})?#(\\S|\\S${B}*?\\S)#(?!${
|
|
642
|
+
`(^|[^${Y}&;:}])(?:${W})?#(\\S|\\S${B}*?\\S)#(?!${uu})`,
|
|
661
643
|
"m"
|
|
662
644
|
)
|
|
663
645
|
},
|
|
@@ -682,7 +664,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
682
664
|
type: "strong",
|
|
683
665
|
scope: "constrained",
|
|
684
666
|
rx: new RegExp(
|
|
685
|
-
`(^|[^${Y};:}])(?:${W})?\\*(\\S|\\S${B}*?\\S)\\*(?!${
|
|
667
|
+
`(^|[^${Y};:}])(?:${W})?\\*(\\S|\\S${B}*?\\S)\\*(?!${uu})`,
|
|
686
668
|
"m"
|
|
687
669
|
)
|
|
688
670
|
},
|
|
@@ -690,7 +672,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
690
672
|
type: "double",
|
|
691
673
|
scope: "constrained",
|
|
692
674
|
rx: new RegExp(
|
|
693
|
-
`(^|[^${Y};:}])(?:${W})?\`\`(\\S|\\S${B}*?\\S)''(?!${
|
|
675
|
+
`(^|[^${Y};:}])(?:${W})?\`\`(\\S|\\S${B}*?\\S)''(?!${uu})`,
|
|
694
676
|
"m"
|
|
695
677
|
)
|
|
696
678
|
},
|
|
@@ -698,7 +680,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
698
680
|
type: "emphasis",
|
|
699
681
|
scope: "constrained",
|
|
700
682
|
rx: new RegExp(
|
|
701
|
-
`(^|[^${Y};:}])(?:${W})?'(\\S|\\S${B}*?\\S)'(?!${
|
|
683
|
+
`(^|[^${Y};:}])(?:${W})?'(\\S|\\S${B}*?\\S)'(?!${uu})`,
|
|
702
684
|
"m"
|
|
703
685
|
)
|
|
704
686
|
},
|
|
@@ -711,7 +693,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
711
693
|
type: "monospaced",
|
|
712
694
|
scope: "constrained",
|
|
713
695
|
rx: new RegExp(
|
|
714
|
-
`(^|[^${Y};:}])(?:${W})?\\+(\\S|\\S${B}*?\\S)\\+(?!${
|
|
696
|
+
`(^|[^${Y};:}])(?:${W})?\\+(\\S|\\S${B}*?\\S)\\+(?!${uu})`,
|
|
715
697
|
"m"
|
|
716
698
|
)
|
|
717
699
|
},
|
|
@@ -719,7 +701,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
719
701
|
type: "single",
|
|
720
702
|
scope: "constrained",
|
|
721
703
|
rx: new RegExp(
|
|
722
|
-
`(^|[^${Y};:}])(?:${W})?\`(\\S|\\S${B}*?\\S)'(?!${
|
|
704
|
+
`(^|[^${Y};:}])(?:${W})?\`(\\S|\\S${B}*?\\S)'(?!${uu})`,
|
|
723
705
|
"m"
|
|
724
706
|
)
|
|
725
707
|
},
|
|
@@ -732,7 +714,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
732
714
|
type: "emphasis",
|
|
733
715
|
scope: "constrained",
|
|
734
716
|
rx: new RegExp(
|
|
735
|
-
`(^|[^${Y};:}])(?:${W})?_(\\S|\\S${B}*?\\S)_(?!${
|
|
717
|
+
`(^|[^${Y};:}])(?:${W})?_(\\S|\\S${B}*?\\S)_(?!${uu})`,
|
|
736
718
|
"m"
|
|
737
719
|
)
|
|
738
720
|
},
|
|
@@ -745,7 +727,7 @@ const Y = "A-Za-z0-9_", eu = `[${Y}]`, B = "[\\s\\S]", W = "\\[([^\\[\\]]+)\\]",
|
|
|
745
727
|
type: "mark",
|
|
746
728
|
scope: "constrained",
|
|
747
729
|
rx: new RegExp(
|
|
748
|
-
`(^|[^${Y}&;:}])(?:${W})?#(\\S|\\S${B}*?\\S)#(?!${
|
|
730
|
+
`(^|[^${Y}&;:}])(?:${W})?#(\\S|\\S${B}*?\\S)#(?!${uu})`,
|
|
749
731
|
"m"
|
|
750
732
|
)
|
|
751
733
|
},
|
|
@@ -1088,7 +1070,9 @@ function te(u, e, t = /* @__PURE__ */ new Set()) {
|
|
|
1088
1070
|
for (const h of m)
|
|
1089
1071
|
s.push(re(h, e, t));
|
|
1090
1072
|
t.delete(b);
|
|
1091
|
-
}
|
|
1073
|
+
} else m && process.env.NODE_ENV !== "production" && console.warn(
|
|
1074
|
+
`[react-asciidoc] Inline placeholder cycle at index ${b} — content dropped`
|
|
1075
|
+
);
|
|
1092
1076
|
c = i.index + i[0].length;
|
|
1093
1077
|
}
|
|
1094
1078
|
const n = u.slice(c);
|
|
@@ -1108,7 +1092,7 @@ function re(u, e, t = /* @__PURE__ */ new Set()) {
|
|
|
1108
1092
|
}
|
|
1109
1093
|
return u;
|
|
1110
1094
|
}
|
|
1111
|
-
function
|
|
1095
|
+
function K(u, e = {}) {
|
|
1112
1096
|
const t = e.compatMode ?? !1, s = e.attributes ?? {}, a = e.state ?? Ee(), c = t ? Uu.compat : Uu.nonCompat;
|
|
1113
1097
|
let i = u;
|
|
1114
1098
|
const n = t ? Fu.true : Fu.false, x = [], b = [], m = (f) => !e._subs || e._subs.includes(f);
|
|
@@ -1280,7 +1264,7 @@ function We(u, e, t, s, a = 0) {
|
|
|
1280
1264
|
const Q = Xu(p);
|
|
1281
1265
|
I = Q.role, T = Q.id;
|
|
1282
1266
|
}
|
|
1283
|
-
const q = g.replace(/\\\]/g, "]"), z =
|
|
1267
|
+
const q = g.replace(/\\\]/g, "]"), z = K(q, {
|
|
1284
1268
|
compatMode: !1,
|
|
1285
1269
|
state: s,
|
|
1286
1270
|
_alreadyEscaped: !0,
|
|
@@ -1304,7 +1288,7 @@ function We(u, e, t, s, a = 0) {
|
|
|
1304
1288
|
}
|
|
1305
1289
|
return u;
|
|
1306
1290
|
}
|
|
1307
|
-
function
|
|
1291
|
+
function su(u) {
|
|
1308
1292
|
return u ? [{ type: "text", text: u }] : [];
|
|
1309
1293
|
}
|
|
1310
1294
|
function Ue(u, e, t, s, a, c = !1) {
|
|
@@ -1315,7 +1299,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1315
1299
|
handler: (f) => f[1] || !n ? null : f[2] === "kbd" ? {
|
|
1316
1300
|
type: "kbd",
|
|
1317
1301
|
keys: Te(f[3])
|
|
1318
|
-
} : { type: "button", text:
|
|
1302
|
+
} : { type: "button", text: su(f[3]) }
|
|
1319
1303
|
},
|
|
1320
1304
|
{
|
|
1321
1305
|
rx: /\\?menu:(\w|[&\w][^\n\[]*[^\s\[])\[ *(?:|([\s\S]*?[^\\]))\]/,
|
|
@@ -1368,7 +1352,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1368
1352
|
handler: (f) => ({
|
|
1369
1353
|
type: "anchor",
|
|
1370
1354
|
subtype: "bibref",
|
|
1371
|
-
text:
|
|
1355
|
+
text: su(f[2] || f[1]),
|
|
1372
1356
|
target: f[1]
|
|
1373
1357
|
})
|
|
1374
1358
|
},
|
|
@@ -1387,7 +1371,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1387
1371
|
return T.subject && F.push(`subject=${Vu(T.subject)}`), T.body && F.push(`body=${Vu(T.body)}`), F.length && (z += "?" + F.join("&")), {
|
|
1388
1372
|
type: "anchor",
|
|
1389
1373
|
subtype: "link",
|
|
1390
|
-
text: T.text ?
|
|
1374
|
+
text: T.text ? su(T.text) : [{ type: "text", text: q }],
|
|
1391
1375
|
target: z,
|
|
1392
1376
|
...T.id ? { id: T.id } : {},
|
|
1393
1377
|
...T.role ? { role: T.role } : {}
|
|
@@ -1398,7 +1382,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1398
1382
|
return N || (N = g, I = I ? `bare ${I}` : "bare"), {
|
|
1399
1383
|
type: "anchor",
|
|
1400
1384
|
subtype: "link",
|
|
1401
|
-
text:
|
|
1385
|
+
text: su(N),
|
|
1402
1386
|
target: g,
|
|
1403
1387
|
...j.id ? { id: j.id } : {},
|
|
1404
1388
|
...I ? { role: I } : {},
|
|
@@ -1420,7 +1404,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1420
1404
|
const q = f[3] || "";
|
|
1421
1405
|
if (q) {
|
|
1422
1406
|
const z = zu(q);
|
|
1423
|
-
z.window && (I = z.window), z.role && (j = z.role), g =
|
|
1407
|
+
z.window && (I = z.window), z.role && (j = z.role), g = su(z.text);
|
|
1424
1408
|
} else
|
|
1425
1409
|
g = [{ type: "text", text: p }], j = "bare";
|
|
1426
1410
|
} else if (f[4] !== void 0)
|
|
@@ -1469,7 +1453,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1469
1453
|
return {
|
|
1470
1454
|
type: "anchor",
|
|
1471
1455
|
subtype: "ref",
|
|
1472
|
-
text:
|
|
1456
|
+
text: su(p || y),
|
|
1473
1457
|
target: y,
|
|
1474
1458
|
id: y
|
|
1475
1459
|
};
|
|
@@ -1486,7 +1470,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1486
1470
|
return {
|
|
1487
1471
|
type: "anchor",
|
|
1488
1472
|
subtype: "xref",
|
|
1489
|
-
text:
|
|
1473
|
+
text: su(T),
|
|
1490
1474
|
target: N,
|
|
1491
1475
|
...I ? { explicitText: !0 } : {}
|
|
1492
1476
|
};
|
|
@@ -1495,14 +1479,14 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1495
1479
|
return g ? {
|
|
1496
1480
|
type: "anchor",
|
|
1497
1481
|
subtype: "xref",
|
|
1498
|
-
text:
|
|
1482
|
+
text: su(`[${y}]`),
|
|
1499
1483
|
target: y,
|
|
1500
1484
|
xrefstyle: g[2],
|
|
1501
1485
|
macro: !0
|
|
1502
1486
|
} : {
|
|
1503
1487
|
type: "anchor",
|
|
1504
1488
|
subtype: "xref",
|
|
1505
|
-
text:
|
|
1489
|
+
text: su(p || `[${y}]`),
|
|
1506
1490
|
target: y,
|
|
1507
1491
|
macro: !0,
|
|
1508
1492
|
...p ? { explicitText: !0 } : {}
|
|
@@ -1525,7 +1509,7 @@ function Ue(u, e, t, s, a, c = !1) {
|
|
|
1525
1509
|
a.footnoteIndex++;
|
|
1526
1510
|
const T = a.footnoteIndex;
|
|
1527
1511
|
N && a.footnotesById.set(N, T);
|
|
1528
|
-
const q =
|
|
1512
|
+
const q = su(I);
|
|
1529
1513
|
return a.footnoteDefs && a.footnoteDefs.push(q), {
|
|
1530
1514
|
type: "footnote",
|
|
1531
1515
|
text: q,
|
|
@@ -1604,7 +1588,7 @@ function se(u, e, t, s) {
|
|
|
1604
1588
|
continue;
|
|
1605
1589
|
}
|
|
1606
1590
|
let g;
|
|
1607
|
-
p.subs.length === 1 && p.subs[0] === "specialcharacters" ? g = [{ type: "text", text: fu(p.text) }] : g =
|
|
1591
|
+
p.subs.length === 1 && p.subs[0] === "specialcharacters" ? g = [{ type: "text", text: fu(p.text) }] : g = K(p.text, { compatMode: t, state: s, _subs: p.subs }), g = se(g, e, t, s);
|
|
1608
1592
|
const j = p.attributes ?? {}, N = !!(j.id || j.role);
|
|
1609
1593
|
p.type === "unquoted" || p.type === "normal" ? N ? m.push({
|
|
1610
1594
|
type: "quoted",
|
|
@@ -1774,19 +1758,19 @@ function Ye(u, e) {
|
|
|
1774
1758
|
}
|
|
1775
1759
|
}
|
|
1776
1760
|
}
|
|
1777
|
-
function
|
|
1761
|
+
function au(u, e = !1) {
|
|
1778
1762
|
return du(u, e);
|
|
1779
1763
|
}
|
|
1780
1764
|
const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1781
1765
|
__proto__: null,
|
|
1782
|
-
parseInline:
|
|
1766
|
+
parseInline: K,
|
|
1783
1767
|
renderInline: du,
|
|
1784
|
-
renderInlineAsString:
|
|
1768
|
+
renderInlineAsString: au,
|
|
1785
1769
|
subCallouts: Mu,
|
|
1786
1770
|
subCalloutsRaw: Oe,
|
|
1787
1771
|
subSpecialchars: fu
|
|
1788
1772
|
}, Symbol.toStringTag, { value: "Module" })), mu = (u, e = !1) => ({
|
|
1789
|
-
__html: u ?
|
|
1773
|
+
__html: u ? au(u, e) : ""
|
|
1790
1774
|
}), Iu = (u) => {
|
|
1791
1775
|
if (!u) return !1;
|
|
1792
1776
|
for (const e of u)
|
|
@@ -2015,11 +1999,6 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2015
1999
|
}) });
|
|
2016
2000
|
};
|
|
2017
2001
|
var Ou = { exports: {} };
|
|
2018
|
-
/*!
|
|
2019
|
-
Copyright (c) 2018 Jed Watson.
|
|
2020
|
-
Licensed under the MIT License (MIT), see
|
|
2021
|
-
http://jedwatson.github.io/classnames
|
|
2022
|
-
*/
|
|
2023
2002
|
var Qu;
|
|
2024
2003
|
function tt() {
|
|
2025
2004
|
return Qu || (Qu = 1, (function(u) {
|
|
@@ -2055,7 +2034,7 @@ function tt() {
|
|
|
2055
2034
|
}
|
|
2056
2035
|
var rt = tt();
|
|
2057
2036
|
const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx("div", { className: "title", dangerouslySetInnerHTML: { __html: u } }) : null, st = ({ node: u }) => {
|
|
2058
|
-
const { document: e } =
|
|
2037
|
+
const { document: e } = tu(), t = e.attributes || {}, s = u.attributes, a = () => t.icons === "font" && !s.icon ? /* @__PURE__ */ r.jsx("i", { className: `fa icon-${s.name}`, title: `${s.textlabel}` }) : /* @__PURE__ */ r.jsx("img", { src: u.iconUri, alt: `${s.textlabel}` });
|
|
2059
2038
|
return /* @__PURE__ */ r.jsx(
|
|
2060
2039
|
"div",
|
|
2061
2040
|
{
|
|
@@ -2093,7 +2072,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2093
2072
|
}
|
|
2094
2073
|
);
|
|
2095
2074
|
}, ct = ({ node: u }) => {
|
|
2096
|
-
const { document: e } =
|
|
2075
|
+
const { document: e } = tu(), t = e.attributes?.icons === "font";
|
|
2097
2076
|
return /* @__PURE__ */ r.jsxs(
|
|
2098
2077
|
"div",
|
|
2099
2078
|
{
|
|
@@ -2118,12 +2097,12 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2118
2097
|
]
|
|
2119
2098
|
}
|
|
2120
2099
|
);
|
|
2121
|
-
},
|
|
2100
|
+
}, iu = (u, e) => u[`${e}-option`] !== void 0, Eu = (u, e, t = void 0, s, a) => {
|
|
2122
2101
|
if (u[e] !== void 0)
|
|
2123
2102
|
return u[e];
|
|
2124
2103
|
const c = s || e;
|
|
2125
2104
|
return c && a && a[c] !== void 0 ? a[c] : t;
|
|
2126
|
-
},
|
|
2105
|
+
}, cu = (u, e) => u[e] !== void 0, it = (u) => typeof u.title == "string" ? u.title : void 0, bu = (u) => {
|
|
2127
2106
|
if (typeof u.getSourceLines == "function") {
|
|
2128
2107
|
const e = u.getSourceLines();
|
|
2129
2108
|
let t = 0;
|
|
@@ -2261,7 +2240,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2261
2240
|
for (const l of o) {
|
|
2262
2241
|
const E = l.text;
|
|
2263
2242
|
if (typeof E != "string" || !E.includes("[[[")) continue;
|
|
2264
|
-
const L =
|
|
2243
|
+
const L = K(E, {
|
|
2265
2244
|
attributes: s,
|
|
2266
2245
|
state: { footnoteIndex: 0, footnotesById: /* @__PURE__ */ new Map() }
|
|
2267
2246
|
});
|
|
@@ -2302,8 +2281,8 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2302
2281
|
const d = l.target.slice(k + 1), w = t.outfilesuffix ?? ".html";
|
|
2303
2282
|
let $ = !1;
|
|
2304
2283
|
_.endsWith(".adoc") ? (_ = _.slice(0, -5), $ = !0) : /\.[^./]+$/.test(_) || ($ = !0);
|
|
2305
|
-
const A = t.relfileprefix ?? "", D = $ ? t.relfilesuffix !== void 0 ? String(t.relfilesuffix) : w : "",
|
|
2306
|
-
l.target = d ? `${
|
|
2284
|
+
const A = t.relfileprefix ?? "", D = $ ? t.relfilesuffix !== void 0 ? String(t.relfilesuffix) : w : "", ru = A + _ + D;
|
|
2285
|
+
l.target = d ? `${ru}#${d}` : ru, R && (l.text = [{ type: "text", text: ru, raw: !0 }]);
|
|
2307
2286
|
} else if (l.macro && k === -1 && /\.[^./]+$/.test(l.target) && !l.target.includes("://")) {
|
|
2308
2287
|
let _ = l.target, d = !1;
|
|
2309
2288
|
_.endsWith(".adoc") && (_ = _.slice(0, -5), d = !0);
|
|
@@ -2325,7 +2304,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2325
2304
|
return o;
|
|
2326
2305
|
}, z = (o) => {
|
|
2327
2306
|
if (o)
|
|
2328
|
-
return
|
|
2307
|
+
return K(o, {
|
|
2329
2308
|
attributes: s,
|
|
2330
2309
|
state: {
|
|
2331
2310
|
footnoteIndex: 0,
|
|
@@ -2344,7 +2323,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2344
2323
|
blocks: R,
|
|
2345
2324
|
content: void 0,
|
|
2346
2325
|
inlines: R.length === 0 && E === "simple" ? q(
|
|
2347
|
-
|
|
2326
|
+
K(bu(o), {
|
|
2348
2327
|
attributes: x(o),
|
|
2349
2328
|
state: n
|
|
2350
2329
|
})
|
|
@@ -2384,7 +2363,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2384
2363
|
)
|
|
2385
2364
|
)) {
|
|
2386
2365
|
const A = q(
|
|
2387
|
-
|
|
2366
|
+
K(d, {
|
|
2388
2367
|
attributes: x(o),
|
|
2389
2368
|
state: n,
|
|
2390
2369
|
// Honour the block's exact subs list (e.g. `subs=+macros` runs
|
|
@@ -2393,7 +2372,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2393
2372
|
_subs: w
|
|
2394
2373
|
})
|
|
2395
2374
|
);
|
|
2396
|
-
let D =
|
|
2375
|
+
let D = au(A ?? []);
|
|
2397
2376
|
w.includes("callouts") && (D = Mu(D, S, _)), k.content = Su(D);
|
|
2398
2377
|
} else {
|
|
2399
2378
|
let A = fu(d);
|
|
@@ -2405,7 +2384,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2405
2384
|
v.title = S ? o.getCaptionedTitle() : o.getTitle() || "", v.hasCaption = S, "getSectionNumeral" in o && (v.name = o.getSectionName(), v.numbered = o.isNumbered(), v.num = o.getSectionNumeral());
|
|
2406
2385
|
}
|
|
2407
2386
|
if (l === "verse" && (k.inlines = q(
|
|
2408
|
-
|
|
2387
|
+
K(bu(o), {
|
|
2409
2388
|
attributes: x(o),
|
|
2410
2389
|
state: n
|
|
2411
2390
|
})
|
|
@@ -2416,12 +2395,12 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2416
2395
|
if (l === "pass")
|
|
2417
2396
|
if ((o.getSubstitutions && typeof o.getSubstitutions == "function" ? o.getSubstitutions() : []).length > 0) {
|
|
2418
2397
|
const S = q(
|
|
2419
|
-
|
|
2398
|
+
K(bu(o), {
|
|
2420
2399
|
attributes: x(o),
|
|
2421
2400
|
state: n
|
|
2422
2401
|
})
|
|
2423
2402
|
);
|
|
2424
|
-
k.content = Su(
|
|
2403
|
+
k.content = Su(au(S ?? []));
|
|
2425
2404
|
} else
|
|
2426
2405
|
k.content = Su(
|
|
2427
2406
|
bu(o)
|
|
@@ -2443,7 +2422,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2443
2422
|
let v = k;
|
|
2444
2423
|
const S = o, _ = typeof S.text == "string" ? S.text : void 0;
|
|
2445
2424
|
v.textInlines = S.hasText() && _ !== void 0 ? q(
|
|
2446
|
-
|
|
2425
|
+
K(_, {
|
|
2447
2426
|
attributes: s,
|
|
2448
2427
|
state: n
|
|
2449
2428
|
})
|
|
@@ -2462,7 +2441,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2462
2441
|
style: A.getStyle()
|
|
2463
2442
|
}));
|
|
2464
2443
|
const _ = (A) => A.map(
|
|
2465
|
-
(D) => D.map((
|
|
2444
|
+
(D) => D.map((ru) => F(ru))
|
|
2466
2445
|
), d = _(S.getHeadRows()), w = _(S.getBodyRows()), $ = _(S.getFootRows());
|
|
2467
2446
|
v.rows = { head: d, body: w, foot: $ }, v = {
|
|
2468
2447
|
...v,
|
|
@@ -2480,22 +2459,22 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2480
2459
|
let w;
|
|
2481
2460
|
if (d === "asciidoc") {
|
|
2482
2461
|
const M = v.getInnerDocument?.();
|
|
2483
|
-
w = M ? M.getBlocks().map((
|
|
2462
|
+
w = M ? M.getBlocks().map((eu) => F(eu)) : [];
|
|
2484
2463
|
}
|
|
2485
2464
|
const $ = _ ? q(
|
|
2486
|
-
|
|
2465
|
+
K(_, {
|
|
2487
2466
|
attributes: s,
|
|
2488
2467
|
state: n
|
|
2489
2468
|
})
|
|
2490
2469
|
) : void 0;
|
|
2491
2470
|
let A, D;
|
|
2492
2471
|
if (d === "asciidoc")
|
|
2493
|
-
A =
|
|
2472
|
+
A = [];
|
|
2494
2473
|
else if (d === "literal")
|
|
2495
|
-
A = fu(v.getSource());
|
|
2474
|
+
A = [fu(v.getSource())];
|
|
2496
2475
|
else if (_) {
|
|
2497
|
-
const M = $ ?
|
|
2498
|
-
A =
|
|
2476
|
+
const M = $ ? au($) : "", eu = M ? M.split(/\n\n+/) : [], gu = d === "emphasis" ? "<em>" : d === "strong" ? "<strong>" : d === "monospaced" ? "<code>" : "", qu = d === "emphasis" ? "</em>" : d === "strong" ? "</strong>" : d === "monospaced" ? "</code>" : "";
|
|
2477
|
+
A = eu.length > 0 ? eu.map((ae) => gu + ae + qu) : [], D = $ ? nt($) : [];
|
|
2499
2478
|
} else
|
|
2500
2479
|
A = [], D = [];
|
|
2501
2480
|
k = {
|
|
@@ -2504,7 +2483,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2504
2483
|
type: "table_cell",
|
|
2505
2484
|
content: A,
|
|
2506
2485
|
contentInlines: D,
|
|
2507
|
-
text: d === "asciidoc" ? "" :
|
|
2486
|
+
text: d === "asciidoc" ? "" : au($ || []),
|
|
2508
2487
|
textInlines: $,
|
|
2509
2488
|
columnSpan: v.getColumnSpan(),
|
|
2510
2489
|
rowSpan: v.getRowSpan(),
|
|
@@ -2549,19 +2528,19 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2549
2528
|
sections: Q(u),
|
|
2550
2529
|
authors: []
|
|
2551
2530
|
};
|
|
2552
|
-
const X = [],
|
|
2531
|
+
const X = [], ou = (o) => {
|
|
2553
2532
|
for (const l of o) {
|
|
2554
2533
|
if (l.inlines) {
|
|
2555
2534
|
const E = Au(l.inlines);
|
|
2556
2535
|
X.push(...E);
|
|
2557
2536
|
}
|
|
2558
|
-
if (l.blocks &&
|
|
2537
|
+
if (l.blocks && ou(l.blocks), "items" in l && Array.isArray(l.items))
|
|
2559
2538
|
for (const E of l.items) {
|
|
2560
2539
|
if ("textInlines" in E && E.textInlines) {
|
|
2561
2540
|
const L = Au(E.textInlines);
|
|
2562
2541
|
X.push(...L);
|
|
2563
2542
|
}
|
|
2564
|
-
"blocks" in E && E.blocks &&
|
|
2543
|
+
"blocks" in E && E.blocks && ou(E.blocks);
|
|
2565
2544
|
}
|
|
2566
2545
|
if ("items" in l && Array.isArray(l.items)) {
|
|
2567
2546
|
for (const E of l.items)
|
|
@@ -2585,7 +2564,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2585
2564
|
}
|
|
2586
2565
|
}
|
|
2587
2566
|
};
|
|
2588
|
-
if (
|
|
2567
|
+
if (ou(e.blocks), X.length > 0) {
|
|
2589
2568
|
const o = /* @__PURE__ */ new Map();
|
|
2590
2569
|
for (const l of X)
|
|
2591
2570
|
l.index !== void 0 && (!o.get(l.index) || l.text && l.text.length > 0) && o.set(l.index, l);
|
|
@@ -2597,17 +2576,17 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2597
2576
|
return u.getAuthors() && (e.authors = u.getAuthors().map((o) => {
|
|
2598
2577
|
const l = o.getName(), E = o.getEmail();
|
|
2599
2578
|
return {
|
|
2600
|
-
name: l ?
|
|
2579
|
+
name: l ? au(
|
|
2601
2580
|
q(
|
|
2602
|
-
|
|
2581
|
+
K(l, {
|
|
2603
2582
|
attributes: s,
|
|
2604
2583
|
state: { footnoteIndex: 0, footnotesById: /* @__PURE__ */ new Map() }
|
|
2605
2584
|
})
|
|
2606
2585
|
) || []
|
|
2607
2586
|
) : void 0,
|
|
2608
|
-
email: E ?
|
|
2587
|
+
email: E ? au(
|
|
2609
2588
|
q(
|
|
2610
|
-
|
|
2589
|
+
K(E, {
|
|
2611
2590
|
attributes: s,
|
|
2612
2591
|
state: { footnoteIndex: 0, footnotesById: /* @__PURE__ */ new Map() }
|
|
2613
2592
|
})
|
|
@@ -2688,7 +2667,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2688
2667
|
{
|
|
2689
2668
|
className: O(
|
|
2690
2669
|
"hdlist1",
|
|
2691
|
-
|
|
2670
|
+
iu(u.attributes, "strong") && "strong"
|
|
2692
2671
|
),
|
|
2693
2672
|
children: x.map((m, h) => /* @__PURE__ */ r.jsxs(hu, { children: [
|
|
2694
2673
|
h > 0 && /* @__PURE__ */ r.jsx("br", {}),
|
|
@@ -2729,7 +2708,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2729
2708
|
sections: u,
|
|
2730
2709
|
opts: e
|
|
2731
2710
|
}) => {
|
|
2732
|
-
const { document: t } =
|
|
2711
|
+
const { document: t } = tu();
|
|
2733
2712
|
if (!u || u.length === 0) return null;
|
|
2734
2713
|
const s = t.attributes || {}, a = s.sectnumlevels, c = s.toclevels, i = e?.sectNumLevels || (a ? parseInt(`${a}`) : 3), n = e?.tocLevels || (c ? parseInt(`${c}`) : 2), x = (b) => b.includes("<a") ? b.replace(/<(?:a\b[^>]*|\/a)>/g, "") : b;
|
|
2735
2714
|
return /* @__PURE__ */ r.jsx("ul", { className: `sectlevel${u[0].level}`, children: u.map((b) => {
|
|
@@ -2768,7 +2747,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2768
2747
|
]
|
|
2769
2748
|
}
|
|
2770
2749
|
)
|
|
2771
|
-
] }) }), t = () => u.footnotes && u.footnotes.length > 0 && u.blocks && !
|
|
2750
|
+
] }) }), t = () => u.footnotes && u.footnotes.length > 0 && u.blocks && !cu(u.attributes, "nofootnotes") ? /* @__PURE__ */ r.jsxs("div", { id: "footnotes", children: [
|
|
2772
2751
|
/* @__PURE__ */ r.jsx("hr", {}),
|
|
2773
2752
|
u.footnotes.map((a) => /* @__PURE__ */ r.jsxs(
|
|
2774
2753
|
"div",
|
|
@@ -2784,7 +2763,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2784
2763
|
},
|
|
2785
2764
|
a.index
|
|
2786
2765
|
))
|
|
2787
|
-
] }) : null, s = () => u.authors.length > 0 ||
|
|
2766
|
+
] }) : null, s = () => u.authors.length > 0 || cu(u.attributes, "revnumber") || cu(u.attributes, "revdate") || cu(u.attributes, "revremark") ? /* @__PURE__ */ r.jsxs("div", { className: "details", children: [
|
|
2788
2767
|
u.authors.map((a, c) => /* @__PURE__ */ r.jsxs(hu, { children: [
|
|
2789
2768
|
a.name && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2790
2769
|
/* @__PURE__ */ r.jsx("span", { id: `author${c + 1 > 1 ? c + 1 : ""}`, className: "author", children: /* @__PURE__ */ r.jsx("span", { dangerouslySetInnerHTML: { __html: a.name } }) }),
|
|
@@ -2795,9 +2774,9 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2795
2774
|
/* @__PURE__ */ r.jsx("br", {})
|
|
2796
2775
|
] })
|
|
2797
2776
|
] }, c)),
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2777
|
+
cu(u.attributes, "revnumber") && /* @__PURE__ */ r.jsx("span", { id: "revnumber", children: `${u.attributes["version-label"].toString().toLowerCase()} ${u.attributes.revnumber}${u.attributes.revdate ? "," : ""}` }),
|
|
2778
|
+
cu(u.attributes, "revdate") && /* @__PURE__ */ r.jsx("span", { id: "revdate", children: u.attributes.revdate }),
|
|
2779
|
+
cu(u.attributes, "revremark") && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2801
2780
|
/* @__PURE__ */ r.jsx("br", {}),
|
|
2802
2781
|
/* @__PURE__ */ r.jsx("span", { id: "revremark", children: u.attributes.revremark })
|
|
2803
2782
|
] })
|
|
@@ -2809,8 +2788,8 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2809
2788
|
] });
|
|
2810
2789
|
}, ft = ({ node: u }) => {
|
|
2811
2790
|
const { react: e, iconsFont: t } = Tu(u.inlines);
|
|
2812
|
-
if (
|
|
2813
|
-
const a =
|
|
2791
|
+
if (iu(u.attributes, "collapsible")) {
|
|
2792
|
+
const a = iu(u.attributes, "open");
|
|
2814
2793
|
return /* @__PURE__ */ r.jsxs(
|
|
2815
2794
|
"details",
|
|
2816
2795
|
{
|
|
@@ -2888,7 +2867,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2888
2867
|
}
|
|
2889
2868
|
);
|
|
2890
2869
|
}, ht = ({ node: u }) => {
|
|
2891
|
-
const { document: e } =
|
|
2870
|
+
const { document: e } = tu(), t = e.attributes || {}, s = iu(u.attributes, "nowrap") || t.prewrap === void 0, a = O("listingblock", u.role);
|
|
2892
2871
|
if (u.style === "source") {
|
|
2893
2872
|
const c = u.language;
|
|
2894
2873
|
return /* @__PURE__ */ r.jsxs(
|
|
@@ -2930,7 +2909,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2930
2909
|
}
|
|
2931
2910
|
);
|
|
2932
2911
|
}, mt = ({ node: u }) => {
|
|
2933
|
-
const { document: e } =
|
|
2912
|
+
const { document: e } = tu(), t = e.attributes || {}, s = iu(u.attributes, "nowrap") || t.prewrap === void 0;
|
|
2934
2913
|
return /* @__PURE__ */ r.jsxs(
|
|
2935
2914
|
"div",
|
|
2936
2915
|
{
|
|
@@ -2969,7 +2948,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
2969
2948
|
{
|
|
2970
2949
|
className: e || void 0,
|
|
2971
2950
|
type: t,
|
|
2972
|
-
reversed:
|
|
2951
|
+
reversed: iu(u.attributes, "reversed") || void 0,
|
|
2973
2952
|
start: s,
|
|
2974
2953
|
children: u.items.map((a, c) => /* @__PURE__ */ r.jsxs("li", { id: a.id || void 0, children: [
|
|
2975
2954
|
/* @__PURE__ */ r.jsx("p", { children: /* @__PURE__ */ r.jsx(P, { nodes: a.textInlines }) }),
|
|
@@ -3033,7 +3012,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3033
3012
|
}
|
|
3034
3013
|
);
|
|
3035
3014
|
}, $t = ({ node: u }) => /* @__PURE__ */ r.jsx(r.Fragment, { children: _u(u.content || "") }), Nt = ({ node: u }) => {
|
|
3036
|
-
const { document: e } =
|
|
3015
|
+
const { document: e } = tu(), t = e.attributes || {}, s = t["toc-placement"] === "preamble" && e.sections && e.sections.length > 0 && t.toc !== void 0, a = t["toc-title"] || "Table of Contents", c = t["toc-class"] || "toc";
|
|
3037
3016
|
return /* @__PURE__ */ r.jsxs("div", { id: "preamble", ...u.lineNumber ? { "data-lineno": u.lineNumber } : {}, children: [
|
|
3038
3017
|
/* @__PURE__ */ r.jsx("div", { className: "sectionbody", children: /* @__PURE__ */ r.jsx(V, { blocks: u.blocks }) }),
|
|
3039
3018
|
s && /* @__PURE__ */ r.jsxs("div", { id: "toc", className: `${c}`, children: [
|
|
@@ -3059,7 +3038,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3059
3038
|
}
|
|
3060
3039
|
);
|
|
3061
3040
|
}, At = ({ node: u }) => {
|
|
3062
|
-
const { document: e } =
|
|
3041
|
+
const { document: e } = tu(), t = e.attributes || {}, s = t.sectnumlevels ? parseInt(`${t.sectnumlevels}`) : 3, c = u.numbered && u.num && u.num !== "." && u.level <= s && !u.hasCaption ? `${u.num} ` : "", i = u.hasCaption ? _u(u.title) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3063
3042
|
c,
|
|
3064
3043
|
/* @__PURE__ */ r.jsx(P, { nodes: u.titleInlines })
|
|
3065
3044
|
] }), n = t.sectanchors !== void 0, b = t.sectlinks !== void 0 && u.id ? /* @__PURE__ */ r.jsx("a", { className: "link", href: `#${u.id}`, children: i }) : i, m = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -3123,7 +3102,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3123
3102
|
}
|
|
3124
3103
|
);
|
|
3125
3104
|
}, kt = ({ node: u }) => {
|
|
3126
|
-
const { document: e } =
|
|
3105
|
+
const { document: e } = tu(), s = (e.attributes || {}).stem || "asciimath";
|
|
3127
3106
|
let a = u.style || s;
|
|
3128
3107
|
a === "stem" && (a = s === "latexmath" ? "latexmath" : "asciimath");
|
|
3129
3108
|
const [c, i] = a === "latexmath" ? ["\\[", "\\]"] : a === "asciimath" ? ["\\$", "\\$"] : ["", ""];
|
|
@@ -3148,14 +3127,14 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3148
3127
|
}
|
|
3149
3128
|
);
|
|
3150
3129
|
}, _t = ({ node: u }) => {
|
|
3151
|
-
const { document: e, inlineOverrides: t } =
|
|
3130
|
+
const { document: e, inlineOverrides: t } = tu(), s = e.attributes || {}, a = !!t && Object.keys(t).length > 0, c = (y) => a || !Iu(y.textInlines);
|
|
3152
3131
|
let i = [
|
|
3153
3132
|
"frame-" + Eu(u.attributes, "frame", "all", "table-frame", s),
|
|
3154
3133
|
"grid-" + Eu(u.attributes, "grid", "all", "table-grid", s)
|
|
3155
3134
|
], n = Eu(u.attributes, "stripes", null, "table-stripes", s);
|
|
3156
3135
|
n && i.push("stripes-" + n);
|
|
3157
|
-
let x =
|
|
3158
|
-
x && !
|
|
3136
|
+
let x = iu(u.attributes, "autowidth"), b = parseInt(`${u.attributes.tablepcwidth}`), m = null;
|
|
3137
|
+
x && !cu(u.attributes, "width") ? i.push("fit-content") : b === 100 ? i.push("stretch") : m = `${b}%`, cu(u.attributes, "float") && i.push(`${u.attributes.float}`), u.role && i.push(u.role || "");
|
|
3159
3138
|
const h = (y) => O(
|
|
3160
3139
|
"tableblock",
|
|
3161
3140
|
`halign-${y.attributes.halign}`,
|
|
@@ -3213,9 +3192,9 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3213
3192
|
const N = g.style, I = h(g), T = g.columnSpan, q = g.rowSpan, z = N === "header" ? "th" : "td", F = c(g) && N !== "asciidoc" && N !== "literal";
|
|
3214
3193
|
let Q = "";
|
|
3215
3194
|
if (!(N === "asciidoc" || F)) {
|
|
3216
|
-
const X = g.content
|
|
3217
|
-
N === "literal" ? Q = `<div class="literal"><pre>${
|
|
3218
|
-
<p class="tableblock">`)}</p>` : "" :
|
|
3195
|
+
const X = g.content || [];
|
|
3196
|
+
N === "literal" ? Q = `<div class="literal"><pre>${X.join("")}</pre></div>` : N === "header" ? Q = X.length > 0 ? `<p class="tableblock">${X.join(`</p>
|
|
3197
|
+
<p class="tableblock">`)}</p>` : "" : X.length > 0 && (Q = `<p class="tableblock">${X.join(`</p>
|
|
3219
3198
|
<p class="tableblock">`)}</p>`);
|
|
3220
3199
|
}
|
|
3221
3200
|
return /* @__PURE__ */ r.jsx(
|
|
@@ -3241,7 +3220,7 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3241
3220
|
}
|
|
3242
3221
|
);
|
|
3243
3222
|
}, It = ({ node: u }) => {
|
|
3244
|
-
const { document: e } =
|
|
3223
|
+
const { document: e } = tu(), t = e.attributes || {}, s = e.sections && e.sections.length > 0;
|
|
3245
3224
|
let a = u.id || "toc";
|
|
3246
3225
|
const c = u.title ? u.title : t["toc-title"], i = t["toc-placement"], n = t.toc !== void 0, x = u.attributes.levels ? parseInt(`${u.attributes.levels}`) : void 0;
|
|
3247
3226
|
return !n || i !== "macro" || !s ? null : /* @__PURE__ */ r.jsxs("div", { id: a, className: u.role || "toc", children: [
|
|
@@ -3253,13 +3232,13 @@ const O = /* @__PURE__ */ ne(rt), U = ({ text: u }) => u ? /* @__PURE__ */ r.jsx
|
|
|
3253
3232
|
let e = "", t = !1;
|
|
3254
3233
|
for (const s of u)
|
|
3255
3234
|
if (!t && s.type === "anchor" && s.subtype === "bibref") {
|
|
3256
|
-
const a = s.id || s.target, c =
|
|
3235
|
+
const a = s.id || s.target, c = au(s.text) || a;
|
|
3257
3236
|
e += `<a id="${a}"></a>[${c}]`, t = !0;
|
|
3258
3237
|
} else
|
|
3259
|
-
e +=
|
|
3238
|
+
e += au([s]);
|
|
3260
3239
|
return e;
|
|
3261
3240
|
}, qt = ({ node: u }) => {
|
|
3262
|
-
const { inlineOverrides: e } =
|
|
3241
|
+
const { inlineOverrides: e } = tu(), t = iu(u.attributes, "checklist"), s = t && iu(u.attributes, "interactive"), a = u.style === "bibliography", c = !!e && Object.keys(e).length > 0, i = (n) => c || !Iu(n.textInlines);
|
|
3263
3242
|
return /* @__PURE__ */ r.jsxs(
|
|
3264
3243
|
"div",
|
|
3265
3244
|
{
|
|
@@ -3429,7 +3408,7 @@ Your browser does not support the video tag.
|
|
|
3429
3408
|
default:
|
|
3430
3409
|
return /* @__PURE__ */ r.jsx(r.Fragment, {});
|
|
3431
3410
|
}
|
|
3432
|
-
},
|
|
3411
|
+
}, tu = () => {
|
|
3433
3412
|
const u = ku(wu);
|
|
3434
3413
|
if (u === void 0)
|
|
3435
3414
|
throw new Error("useConverterContext must be used within a Provider");
|
|
@@ -3470,9 +3449,9 @@ export {
|
|
|
3470
3449
|
Lt as Verse,
|
|
3471
3450
|
Ot as Video,
|
|
3472
3451
|
mu as inlineHtml,
|
|
3473
|
-
|
|
3452
|
+
iu as isOption,
|
|
3474
3453
|
Vt as parse,
|
|
3475
3454
|
Dt as prepareDocument,
|
|
3476
3455
|
Bt as processDocument,
|
|
3477
|
-
|
|
3456
|
+
tu as useConverterContext
|
|
3478
3457
|
};
|