@oxide/react-asciidoc 0.2.1-alpha.1 → 0.2.2
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/react-asciidoc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as sr } from "@asciidoctor/core";
|
|
2
|
-
import
|
|
2
|
+
import k from "html-react-parser";
|
|
3
3
|
import { default as cr } from "html-react-parser";
|
|
4
4
|
import Ke, { Fragment as Te, useMemo as re, createElement as K, createContext as Rt, useContext as Et } from "react";
|
|
5
5
|
const G = {}, U = (e) => {
|
|
@@ -32,14 +32,14 @@ function St() {
|
|
|
32
32
|
ze = 1;
|
|
33
33
|
var e = Ke, a = Symbol.for("react.element"), n = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
34
34
|
function f(b, h, y) {
|
|
35
|
-
var m, O = {},
|
|
36
|
-
y !== void 0 && (
|
|
35
|
+
var m, O = {}, R = null, F = null;
|
|
36
|
+
y !== void 0 && (R = "" + y), h.key !== void 0 && (R = "" + h.key), h.ref !== void 0 && (F = h.ref);
|
|
37
37
|
for (m in h)
|
|
38
38
|
c.call(h, m) && !o.hasOwnProperty(m) && (O[m] = h[m]);
|
|
39
39
|
if (b && b.defaultProps)
|
|
40
40
|
for (m in h = b.defaultProps, h)
|
|
41
41
|
O[m] === void 0 && (O[m] = h[m]);
|
|
42
|
-
return { $$typeof: a, type: b, key:
|
|
42
|
+
return { $$typeof: a, type: b, key: R, ref: F, props: O, _owner: g.current };
|
|
43
43
|
}
|
|
44
44
|
return ee.Fragment = n, ee.jsx = f, ee.jsxs = f, ee;
|
|
45
45
|
}
|
|
@@ -56,14 +56,14 @@ var te = {};
|
|
|
56
56
|
var Je;
|
|
57
57
|
function wt() {
|
|
58
58
|
return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
59
|
-
var e = Ke, a = Symbol.for("react.element"), n = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), b = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"),
|
|
59
|
+
var e = Ke, a = Symbol.for("react.element"), n = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), b = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), Y = Symbol.iterator, P = "@@iterator";
|
|
60
60
|
function M(t) {
|
|
61
61
|
if (t === null || typeof t != "object")
|
|
62
62
|
return null;
|
|
63
63
|
var i = Y && t[Y] || t[P];
|
|
64
64
|
return typeof i == "function" ? i : null;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
67
67
|
function N(t) {
|
|
68
68
|
{
|
|
69
69
|
for (var i = arguments.length, s = new Array(i > 1 ? i - 1 : 0), u = 1; u < i; u++)
|
|
@@ -73,7 +73,7 @@ function wt() {
|
|
|
73
73
|
}
|
|
74
74
|
function he(t, i, s) {
|
|
75
75
|
{
|
|
76
|
-
var u =
|
|
76
|
+
var u = E.ReactDebugCurrentFrame, p = u.getStackAddendum();
|
|
77
77
|
p !== "" && (i += "%s", s = s.concat([p]));
|
|
78
78
|
var _ = s.map(function(v) {
|
|
79
79
|
return String(v);
|
|
@@ -84,7 +84,7 @@ function wt() {
|
|
|
84
84
|
var ge = !1, q = !1, V = !1, X = !1, ae = !1, Ae;
|
|
85
85
|
Ae = Symbol.for("react.module.reference");
|
|
86
86
|
function Qe(t) {
|
|
87
|
-
return !!(typeof t == "string" || typeof t == "function" || t === c || t === o || ae || t === g || t === y || t === m || X || t === F || ge || q || V || typeof t == "object" && t !== null && (t.$$typeof ===
|
|
87
|
+
return !!(typeof t == "string" || typeof t == "function" || t === c || t === o || ae || t === g || t === y || t === m || X || t === F || ge || q || V || typeof t == "object" && t !== null && (t.$$typeof === R || t.$$typeof === O || t.$$typeof === f || t.$$typeof === b || t.$$typeof === h || t.$$typeof === Ae || t.getModuleId !== void 0));
|
|
88
88
|
}
|
|
89
89
|
function Ze(t, i, s) {
|
|
90
90
|
var u = t.displayName;
|
|
@@ -130,7 +130,7 @@ function wt() {
|
|
|
130
130
|
case O:
|
|
131
131
|
var u = t.displayName || null;
|
|
132
132
|
return u !== null ? u : B(t.type) || "Memo";
|
|
133
|
-
case
|
|
133
|
+
case R: {
|
|
134
134
|
var p = t, _ = p._payload, v = p._init;
|
|
135
135
|
try {
|
|
136
136
|
return B(v(_));
|
|
@@ -203,7 +203,7 @@ function wt() {
|
|
|
203
203
|
Q < 0 && N("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
var de =
|
|
206
|
+
var de = E.ReactCurrentDispatcher, me;
|
|
207
207
|
function ie(t, i, s) {
|
|
208
208
|
{
|
|
209
209
|
if (me === void 0)
|
|
@@ -272,18 +272,18 @@ function wt() {
|
|
|
272
272
|
if (W && u && typeof W.stack == "string") {
|
|
273
273
|
for (var d = W.stack.split(`
|
|
274
274
|
`), $ = u.stack.split(`
|
|
275
|
-
`), A = d.length - 1,
|
|
276
|
-
|
|
277
|
-
for (; A >= 1 &&
|
|
278
|
-
if (d[A] !== $[
|
|
279
|
-
if (A !== 1 ||
|
|
275
|
+
`), A = d.length - 1, S = $.length - 1; A >= 1 && S >= 0 && d[A] !== $[S]; )
|
|
276
|
+
S--;
|
|
277
|
+
for (; A >= 1 && S >= 0; A--, S--)
|
|
278
|
+
if (d[A] !== $[S]) {
|
|
279
|
+
if (A !== 1 || S !== 1)
|
|
280
280
|
do
|
|
281
|
-
if (A--,
|
|
281
|
+
if (A--, S--, S < 0 || d[A] !== $[S]) {
|
|
282
282
|
var D = `
|
|
283
283
|
` + d[A].replace(" at new ", " at ");
|
|
284
284
|
return t.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", t.displayName)), typeof t == "function" && ne.set(t, D), D;
|
|
285
285
|
}
|
|
286
|
-
while (A >= 1 &&
|
|
286
|
+
while (A >= 1 && S >= 0);
|
|
287
287
|
break;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -319,7 +319,7 @@ function wt() {
|
|
|
319
319
|
return at(t.render);
|
|
320
320
|
case O:
|
|
321
321
|
return se(t.type, i, s);
|
|
322
|
-
case
|
|
322
|
+
case R: {
|
|
323
323
|
var u = t, p = u._payload, _ = u._init;
|
|
324
324
|
try {
|
|
325
325
|
return se(_(p), i, s);
|
|
@@ -329,7 +329,7 @@ function wt() {
|
|
|
329
329
|
}
|
|
330
330
|
return "";
|
|
331
331
|
}
|
|
332
|
-
var le = Object.prototype.hasOwnProperty, Pe = {}, De =
|
|
332
|
+
var le = Object.prototype.hasOwnProperty, Pe = {}, De = E.ReactDebugCurrentFrame;
|
|
333
333
|
function ce(t) {
|
|
334
334
|
if (t) {
|
|
335
335
|
var i = t._owner, s = se(t.type, t._source, i ? i.type : null);
|
|
@@ -380,7 +380,7 @@ function wt() {
|
|
|
380
380
|
if (ct(t))
|
|
381
381
|
return N("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", lt(t)), je(t);
|
|
382
382
|
}
|
|
383
|
-
var Z =
|
|
383
|
+
var Z = E.ReactCurrentOwner, ot = {
|
|
384
384
|
key: !0,
|
|
385
385
|
ref: !0,
|
|
386
386
|
__self: !0,
|
|
@@ -469,13 +469,13 @@ function wt() {
|
|
|
469
469
|
v[_] === void 0 && (v[_] = A[_]);
|
|
470
470
|
}
|
|
471
471
|
if (d || $) {
|
|
472
|
-
var
|
|
473
|
-
d && gt(v,
|
|
472
|
+
var S = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
473
|
+
d && gt(v, S), $ && dt(v, S);
|
|
474
474
|
}
|
|
475
475
|
return mt(t, d, $, p, u, Z.current, v);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
var ye =
|
|
478
|
+
var ye = E.ReactCurrentOwner, Be = E.ReactDebugCurrentFrame;
|
|
479
479
|
function z(t) {
|
|
480
480
|
if (t) {
|
|
481
481
|
var i = t._owner, s = se(t.type, t._source, i ? i.type : null);
|
|
@@ -602,9 +602,9 @@ Check the top-level render call using <` + s + ">.");
|
|
|
602
602
|
var A;
|
|
603
603
|
t === null ? A = "null" : pe(t) ? A = "array" : t !== void 0 && t.$$typeof === a ? (A = "<" + (B(t.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : A = typeof t, N("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, d);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
605
|
+
var S = vt(t, i, s, p, _);
|
|
606
|
+
if (S == null)
|
|
607
|
+
return S;
|
|
608
608
|
if (v) {
|
|
609
609
|
var D = i.children;
|
|
610
610
|
if (D !== void 0)
|
|
@@ -618,7 +618,7 @@ Check the top-level render call using <` + s + ">.");
|
|
|
618
618
|
else
|
|
619
619
|
Ue(D, t);
|
|
620
620
|
}
|
|
621
|
-
return t === c ? _t(
|
|
621
|
+
return t === c ? _t(S) : yt(S), S;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
function Nt(t, i, s) {
|
|
@@ -638,12 +638,12 @@ const L = ue.exports.Fragment, r = ue.exports.jsx, l = ue.exports.jsxs, x = ({
|
|
|
638
638
|
node: e
|
|
639
639
|
}) => e.hasTitle() ? /* @__PURE__ */ r("div", {
|
|
640
640
|
className: "title",
|
|
641
|
-
children:
|
|
641
|
+
children: k(e.getTitle() || "")
|
|
642
642
|
}) : null, oe = ({
|
|
643
643
|
node: e
|
|
644
644
|
}) => e.hasTitle() ? /* @__PURE__ */ r("div", {
|
|
645
645
|
className: "title",
|
|
646
|
-
children:
|
|
646
|
+
children: k(e.getCaptionedTitle() || "")
|
|
647
647
|
}) : null, C = (e) => typeof e.getRole() == "string" ? e.getRole() : void 0, T = (e) => e.getLineNumber() ? {
|
|
648
648
|
"data-lineno": e.getLineNumber()
|
|
649
649
|
} : {}, Ct = ({
|
|
@@ -672,7 +672,7 @@ const L = ue.exports.Fragment, r = ue.exports.jsx, l = ue.exports.jsxs, x = ({
|
|
|
672
672
|
className: "content",
|
|
673
673
|
children: [/* @__PURE__ */ r(x, {
|
|
674
674
|
node: e
|
|
675
|
-
}),
|
|
675
|
+
}), k(c)]
|
|
676
676
|
})]
|
|
677
677
|
})
|
|
678
678
|
})
|
|
@@ -716,7 +716,7 @@ const L = ue.exports.Fragment, r = ue.exports.jsx, l = ue.exports.jsxs, x = ({
|
|
|
716
716
|
children: n + 1
|
|
717
717
|
})]
|
|
718
718
|
}), /* @__PURE__ */ l("td", {
|
|
719
|
-
children: [
|
|
719
|
+
children: [k(j(a)), /* @__PURE__ */ r(I, {
|
|
720
720
|
blocks: a.getBlocks()
|
|
721
721
|
})]
|
|
722
722
|
})]
|
|
@@ -774,7 +774,7 @@ const w = Ge.exports, It = ({
|
|
|
774
774
|
if (o)
|
|
775
775
|
return /* @__PURE__ */ l("dd", {
|
|
776
776
|
children: [o.hasText() && /* @__PURE__ */ r("p", {
|
|
777
|
-
children:
|
|
777
|
+
children: k(j(o))
|
|
778
778
|
}), o.hasBlocks() && /* @__PURE__ */ r(I, {
|
|
779
779
|
blocks: o.getBlocks()
|
|
780
780
|
})]
|
|
@@ -796,7 +796,7 @@ const w = Ge.exports, It = ({
|
|
|
796
796
|
return /* @__PURE__ */ l("li", {
|
|
797
797
|
children: [b.map((y, m) => /* @__PURE__ */ r("p", {
|
|
798
798
|
children: /* @__PURE__ */ r("em", {
|
|
799
|
-
children:
|
|
799
|
+
children: k(j(y))
|
|
800
800
|
})
|
|
801
801
|
}, m)), c(h)]
|
|
802
802
|
}, f);
|
|
@@ -827,13 +827,13 @@ const w = Ge.exports, It = ({
|
|
|
827
827
|
return /* @__PURE__ */ l("tr", {
|
|
828
828
|
children: [/* @__PURE__ */ r("td", {
|
|
829
829
|
className: w("hdlist1", e.isOption("strong") ? "strong" : ""),
|
|
830
|
-
children: y.map((O,
|
|
831
|
-
children: [
|
|
832
|
-
},
|
|
830
|
+
children: y.map((O, R) => /* @__PURE__ */ l(Te, {
|
|
831
|
+
children: [R !== 0 && /* @__PURE__ */ r("br", {}), k(j(O))]
|
|
832
|
+
}, R))
|
|
833
833
|
}), m && /* @__PURE__ */ l("td", {
|
|
834
834
|
className: "hdlist2",
|
|
835
835
|
children: [m.hasText() && /* @__PURE__ */ r("p", {
|
|
836
|
-
children:
|
|
836
|
+
children: k(j(m))
|
|
837
837
|
}), m.hasBlocks() && /* @__PURE__ */ r(I, {
|
|
838
838
|
blocks: m.getBlocks()
|
|
839
839
|
})]
|
|
@@ -855,7 +855,7 @@ const w = Ge.exports, It = ({
|
|
|
855
855
|
return /* @__PURE__ */ l(Te, {
|
|
856
856
|
children: [b.map((y, m) => /* @__PURE__ */ r("dt", {
|
|
857
857
|
className: "hdlist1",
|
|
858
|
-
children:
|
|
858
|
+
children: k(j(y))
|
|
859
859
|
}, m)), c(h)]
|
|
860
860
|
}, f);
|
|
861
861
|
})
|
|
@@ -874,21 +874,21 @@ const w = Ge.exports, It = ({
|
|
|
874
874
|
let m = y.$sectnum();
|
|
875
875
|
m = m === "." || m === ".." ? "" : m;
|
|
876
876
|
const O = y.getLevel();
|
|
877
|
-
let
|
|
877
|
+
let R = "";
|
|
878
878
|
if (y.getCaption())
|
|
879
|
-
|
|
879
|
+
R = y.getCaptionedTitle();
|
|
880
880
|
else if (O <= b)
|
|
881
881
|
if (O < 2 && c.getDoctype() == "book") {
|
|
882
882
|
const F = y.getSectionName();
|
|
883
|
-
F === "chapter" ?
|
|
883
|
+
F === "chapter" ? R = `${g["chapter-signifier"] || ""} ${m} ${y.getTitle()}` : F === "part" ? R = `${g["part-signifier"] || ""} ${m} ${y.getTitle()}` : R = `${m} ${y.getTitle()}`;
|
|
884
884
|
} else
|
|
885
|
-
|
|
885
|
+
R = `${m} ${y.getTitle()}`;
|
|
886
886
|
else
|
|
887
|
-
|
|
887
|
+
R = y.getTitle() || "";
|
|
888
888
|
return /* @__PURE__ */ l("li", {
|
|
889
889
|
children: [/* @__PURE__ */ r("a", {
|
|
890
890
|
href: `#${y.getId()}`,
|
|
891
|
-
children:
|
|
891
|
+
children: k(R)
|
|
892
892
|
}), O < h && /* @__PURE__ */ r(fe, {
|
|
893
893
|
node: y,
|
|
894
894
|
opts: {
|
|
@@ -931,7 +931,7 @@ const w = Ge.exports, It = ({
|
|
|
931
931
|
children: [/* @__PURE__ */ r("a", {
|
|
932
932
|
href: `#_footnoteref_${f.getIndex()}`,
|
|
933
933
|
children: f.getIndex()
|
|
934
|
-
}), ".", " ",
|
|
934
|
+
}), ".", " ", k(j(f) || "")]
|
|
935
935
|
}, f.getIndex()))]
|
|
936
936
|
}) : null, o = () => e.getAuthors().length > 0 || e.hasAttribute("revnumber") || e.hasAttribute("revdate") || e.hasAttribute("revremark") ? /* @__PURE__ */ l("div", {
|
|
937
937
|
className: "details",
|
|
@@ -940,13 +940,13 @@ const w = Ge.exports, It = ({
|
|
|
940
940
|
children: [/* @__PURE__ */ r("span", {
|
|
941
941
|
id: `author${h + 1 > 1 ? h + 1 : ""}`,
|
|
942
942
|
className: "author",
|
|
943
|
-
children:
|
|
943
|
+
children: k(e.applySubstitutions(b.getName() || "").toString())
|
|
944
944
|
}), /* @__PURE__ */ r("br", {})]
|
|
945
945
|
}), b.getEmail() && /* @__PURE__ */ l(L, {
|
|
946
946
|
children: [/* @__PURE__ */ r("span", {
|
|
947
947
|
id: `email${h + 1 > 1 ? h + 1 : ""}`,
|
|
948
948
|
className: "email",
|
|
949
|
-
children:
|
|
949
|
+
children: k(e.applySubstitutions(b.getEmail() || "").toString())
|
|
950
950
|
}), /* @__PURE__ */ r("br", {})]
|
|
951
951
|
})]
|
|
952
952
|
}, h)), e.hasAttribute("revnumber") && /* @__PURE__ */ r("span", {
|
|
@@ -982,7 +982,7 @@ const w = Ge.exports, It = ({
|
|
|
982
982
|
...T(e),
|
|
983
983
|
children: [/* @__PURE__ */ r("summary", {
|
|
984
984
|
className: "title",
|
|
985
|
-
children: n
|
|
985
|
+
children: k(n)
|
|
986
986
|
}), /* @__PURE__ */ r("div", {
|
|
987
987
|
className: "content",
|
|
988
988
|
children: /* @__PURE__ */ r(I, {
|
|
@@ -1118,7 +1118,7 @@ const w = Ge.exports, It = ({
|
|
|
1118
1118
|
children: e.getItems().map((a, n) => /* @__PURE__ */ l("li", {
|
|
1119
1119
|
className: C(e) ? C(e) : "",
|
|
1120
1120
|
children: [/* @__PURE__ */ r("p", {
|
|
1121
|
-
children:
|
|
1121
|
+
children: k(j(a))
|
|
1122
1122
|
}), /* @__PURE__ */ r(I, {
|
|
1123
1123
|
blocks: a.getBlocks()
|
|
1124
1124
|
})]
|
|
@@ -1176,7 +1176,7 @@ const w = Ge.exports, It = ({
|
|
|
1176
1176
|
}) => {
|
|
1177
1177
|
const a = U(e);
|
|
1178
1178
|
return /* @__PURE__ */ r(L, {
|
|
1179
|
-
children:
|
|
1179
|
+
children: k(a)
|
|
1180
1180
|
});
|
|
1181
1181
|
}, Ut = ({
|
|
1182
1182
|
node: e
|
|
@@ -1194,7 +1194,7 @@ const w = Ge.exports, It = ({
|
|
|
1194
1194
|
className: a.getAttribute("toc-class", "toc"),
|
|
1195
1195
|
children: [/* @__PURE__ */ r("div", {
|
|
1196
1196
|
id: "toctitle",
|
|
1197
|
-
children:
|
|
1197
|
+
children: k(a.getAttribute("toc-title"))
|
|
1198
1198
|
}), /* @__PURE__ */ r(fe, {
|
|
1199
1199
|
node: a
|
|
1200
1200
|
})]
|
|
@@ -1296,7 +1296,7 @@ const w = Ge.exports, It = ({
|
|
|
1296
1296
|
"tableblock",
|
|
1297
1297
|
`halign-${P.getAttribute("halign")}`,
|
|
1298
1298
|
`valign-${P.getAttribute("valign")}`
|
|
1299
|
-
),
|
|
1299
|
+
), R = e.getTitle(), F = e.getId(), Y = F || Kt(R || "");
|
|
1300
1300
|
return /* @__PURE__ */ l("table", {
|
|
1301
1301
|
className: w("tableblock", ...a),
|
|
1302
1302
|
style: {
|
|
@@ -1314,30 +1314,30 @@ const w = Ge.exports, It = ({
|
|
|
1314
1314
|
})]
|
|
1315
1315
|
}), f > 0 && /* @__PURE__ */ r("colgroup", {
|
|
1316
1316
|
children: b.map((P, M) => {
|
|
1317
|
-
const
|
|
1317
|
+
const E = P.getAttribute("colpcwidth");
|
|
1318
1318
|
return /* @__PURE__ */ r("col", {
|
|
1319
1319
|
style: {
|
|
1320
|
-
width: `${
|
|
1320
|
+
width: `${E}%`
|
|
1321
1321
|
}
|
|
1322
1322
|
}, M);
|
|
1323
1323
|
})
|
|
1324
1324
|
}), h.map((P, M) => /* @__PURE__ */ r("thead", {
|
|
1325
1325
|
children: /* @__PURE__ */ r("tr", {
|
|
1326
|
-
children: P.map((
|
|
1327
|
-
className: O(
|
|
1326
|
+
children: P.map((E, N) => /* @__PURE__ */ r("th", {
|
|
1327
|
+
className: O(E),
|
|
1328
1328
|
dangerouslySetInnerHTML: {
|
|
1329
|
-
__html: j(
|
|
1329
|
+
__html: j(E)
|
|
1330
1330
|
}
|
|
1331
1331
|
}, N))
|
|
1332
1332
|
})
|
|
1333
1333
|
}, M)), /* @__PURE__ */ r("tbody", {
|
|
1334
1334
|
children: y.map((P, M) => /* @__PURE__ */ r("tr", {
|
|
1335
|
-
children: P.map((
|
|
1336
|
-
const he =
|
|
1335
|
+
children: P.map((E, N) => {
|
|
1336
|
+
const he = E.getColumnSpan(), ge = E.getRowSpan(), q = U(E), V = {
|
|
1337
1337
|
colSpan: he,
|
|
1338
1338
|
rowSpan: ge,
|
|
1339
|
-
className: O(
|
|
1340
|
-
}, X =
|
|
1339
|
+
className: O(E)
|
|
1340
|
+
}, X = E.getStyle();
|
|
1341
1341
|
if (X === "asciidoc")
|
|
1342
1342
|
return /* @__PURE__ */ K("td", {
|
|
1343
1343
|
...V,
|
|
@@ -1375,19 +1375,19 @@ const w = Ge.exports, It = ({
|
|
|
1375
1375
|
return /* @__PURE__ */ K("td", {
|
|
1376
1376
|
...V,
|
|
1377
1377
|
key: N
|
|
1378
|
-
}, ae.length === 0 ? "" :
|
|
1378
|
+
}, ae.length === 0 ? "" : k(`<p class="tableblock">${ae.join(`</p>
|
|
1379
1379
|
<p class="tableblock">`)}</p>`));
|
|
1380
1380
|
}
|
|
1381
1381
|
})
|
|
1382
1382
|
}, M))
|
|
1383
1383
|
}), m.map((P, M) => /* @__PURE__ */ r("tfoot", {
|
|
1384
1384
|
children: /* @__PURE__ */ r("tr", {
|
|
1385
|
-
children: P.map((
|
|
1386
|
-
className: O(
|
|
1385
|
+
children: P.map((E, N) => /* @__PURE__ */ r("td", {
|
|
1386
|
+
className: O(E),
|
|
1387
1387
|
children: /* @__PURE__ */ r("p", {
|
|
1388
1388
|
className: "tableblock",
|
|
1389
1389
|
dangerouslySetInnerHTML: {
|
|
1390
|
-
__html: j(
|
|
1390
|
+
__html: j(E)
|
|
1391
1391
|
}
|
|
1392
1392
|
})
|
|
1393
1393
|
}, N))
|
|
@@ -1405,7 +1405,7 @@ const w = Ge.exports, It = ({
|
|
|
1405
1405
|
children: [/* @__PURE__ */ r("div", {
|
|
1406
1406
|
id: `${a}title`,
|
|
1407
1407
|
className: "title",
|
|
1408
|
-
children:
|
|
1408
|
+
children: k(c || "")
|
|
1409
1409
|
}), /* @__PURE__ */ r(fe, {
|
|
1410
1410
|
node: e.getDocument(),
|
|
1411
1411
|
opts: {
|
|
@@ -1431,7 +1431,7 @@ const w = Ge.exports, It = ({
|
|
|
1431
1431
|
children: /* @__PURE__ */ l("p", {
|
|
1432
1432
|
children: [a && n.hasAttribute("checkbox") && /* @__PURE__ */ r("i", {
|
|
1433
1433
|
className: w("fa", n.hasAttribute("checked") ? "fa-check-square-o" : "fa-square-o")
|
|
1434
|
-
}), " ",
|
|
1434
|
+
}), " ", k(j(n))]
|
|
1435
1435
|
})
|
|
1436
1436
|
}, c) : /* @__PURE__ */ l("li", {
|
|
1437
1437
|
id: n.getId(),
|
|
@@ -1588,7 +1588,7 @@ const w = Ge.exports, It = ({
|
|
|
1588
1588
|
});
|
|
1589
1589
|
default:
|
|
1590
1590
|
return /* @__PURE__ */ r(L, {
|
|
1591
|
-
children:
|
|
1591
|
+
children: k(e.convert())
|
|
1592
1592
|
});
|
|
1593
1593
|
}
|
|
1594
1594
|
};
|
|
@@ -28,5 +28,5 @@ Check the top-level render call using <`+s+">.")}return i}}function yt(t,i){{if(
|
|
|
28
28
|
Copyright (c) 2018 Jed Watson.
|
|
29
29
|
Licensed under the MIT License (MIT), see
|
|
30
30
|
http://jedwatson.github.io/classnames
|
|
31
|
-
*/(function(e){(function(){var a={}.hasOwnProperty;function n(){for(var c=[],h=0;h<arguments.length;h++){var o=arguments[h];if(!!o){var d=typeof o;if(d==="string"||d==="number")c.push(o);else if(Array.isArray(o)){if(o.length){var y=n.apply(null,o);y&&c.push(y)}}else if(d==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){c.push(o.toString());continue}for(var g in o)a.call(o,g)&&o[g]&&c.push(g)}}}return c.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Oe);const S=Oe.exports,Ie=({node:e})=>{const a=e.getStyle(),n=o=>{const d=o,y=d[0];let g=d[1];return g.getNodeName||(g=null),{terms:y,dd:g}},c=o=>{if(o)return l("dd",{children:[o.hasText()&&r("p",{children:k.default($(o))}),o.hasBlocks()&&r(j,{blocks:o.getBlocks()})]})},h=e.hasTitle()&&r("div",{className:"title",children:e.getCaptionedTitle()});if(a==="qanda")return l("div",{className:S("qlist qanda",R(e)),...N(e),children:[h,r("ol",{children:e.getItems().map((o,d)=>{const{terms:y,dd:g}=n(o);return l("li",{children:[y.map((_,v)=>r("p",{children:r("em",{children:k.default($(_))})},v)),c(g)]},d)})})]});if(a==="horizontal"){const o=e.getAttribute("labelwidth"),d=e.getAttribute("itemwidth");return l("div",{className:S("hdlist",R(e)),children:[h,l("table",{children:[(o||d)&&l("colgroup",{children:[r("col",{style:{width:o?`${o.replace("%","")}%`:""}}),r("col",{style:{width:d?`${d.replace("%","")}%`:""}})]}),r("tbody",{children:e.getItems().map((y,g)=>{const{terms:_,dd:v}=n(y);return l("tr",{children:[r("td",{className:S("hdlist1",e.isOption("strong")?"strong":""),children:_.map((I,w)=>l(P.Fragment,{children:[w!==0&&r("br",{}),k.default($(I))]},w))}),v&&l("td",{className:"hdlist2",children:[v.hasText()&&r("p",{children:k.default($(v))}),v.hasBlocks()&&r(j,{blocks:v.getBlocks()})]})]},g)})})]})]})}else return l("div",{className:S("dlist",e.getStyle(),R(e)),children:[h,r("dl",{children:e.getItems().map((o,d)=>{const{terms:y,dd:g}=n(o);return l(P.Fragment,{children:[y.map((_,v)=>r("dt",{className:"hdlist1",children:k.default($(_))},v)),c(g)]},d)})})]})},re=({node:e,opts:a})=>{if(!e.hasSections())return null;const n=e.getSections(),c=e.getDocument(),h=P.useMemo(()=>c.getAttributes(),[e]),o=P.useMemo(()=>c.getAttribute("sectnumlevels"),[e]),d=P.useMemo(()=>c.getAttribute("toclevels"),[e]),y=(a==null?void 0:a.sectNumLevels)||(o?parseInt(o):3),g=(a==null?void 0:a.tocLevels)||(d?parseInt(d):2);return r("ul",{className:`sectlevel${n[0].getLevel()}`,children:n.map(_=>{let v=_.$sectnum();v=v==="."||v===".."?"":v;const I=_.getLevel();let w="";if(_.getCaption())w=_.getCaptionedTitle();else if(I<=y)if(I<2&&c.getDoctype()=="book"){const B=_.getSectionName();B==="chapter"?w=`${h["chapter-signifier"]||""} ${v} ${_.getTitle()}`:B==="part"?w=`${h["part-signifier"]||""} ${v} ${_.getTitle()}`:w=`${v} ${_.getTitle()}`}else w=`${v} ${_.getTitle()}`;else w=_.getTitle()||"";return l("li",{children:[r("a",{href:`#${_.getId()}`,children:k.default(w)}),I<g&&r(re,{node:_,opts:{tocLevels:g,sectNumLevels:y}})]},_.getId())})})},Pe=({document:e})=>{const a=e.getBlocks(),n=e.getFootnotes(),c=()=>{var d;return e.getNoheader()?null:r("div",{id:"header",children:e.hasHeader()&&l(M,{children:[r("h1",{dangerouslySetInnerHTML:{__html:((d=e.getDocumentTitle())==null?void 0:d.toString())||""}}),r(o,{}),e.hasSections()&&e.hasAttribute("toc")&&e.getAttribute("toc-placement")==="auto"&&l("div",{id:"toc",className:e.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:e.getAttribute("toc-title")}),r(re,{node:e})]})]})})},h=()=>n&&n.length>0&&a&&!a[0].getDocument().hasAttribute("nofootnotes")?l("div",{id:"footnotes",children:[r("hr",{}),n.map(d=>l("div",{className:"footnote",id:`_footnotedef_${d.getIndex()}`,children:[r("a",{href:`#_footnoteref_${d.getIndex()}`,children:d.getIndex()}),"."," ",k.default($(d)||"")]},d.getIndex()))]}):null,o=()=>e.getAuthors().length>0||e.hasAttribute("revnumber")||e.hasAttribute("revdate")||e.hasAttribute("revremark")?l("div",{className:"details",children:[e.getAuthors().map((y,g)=>l(P.Fragment,{children:[y.getName()&&l(M,{children:[r("span",{id:`author${g+1>1?g+1:""}`,className:"author",children:k.default(e.applySubstitutions(y.getName()||"").toString())}),r("br",{})]}),y.getEmail()&&l(M,{children:[r("span",{id:`email${g+1>1?g+1:""}`,className:"email",children:k.default(e.applySubstitutions(y.getEmail()||"").toString())}),r("br",{})]})]},g)),e.hasAttribute("revnumber")&&r("span",{id:"revnumber",children:`${e.getAttribute("version-label").toLowerCase()} ${e.getAttribute("revnumber")}${e.hasAttribute("revdate")?",":""}`}),e.hasAttribute("revdate")&&r("span",{id:"revdate",children:e.getAttribute("revdate")}),e.hasAttribute("revremark")&&l(M,{children:[r("br",{}),r("span",{id:"revremark",children:e.getAttribute("revremark")})]})]}):null;return l(M,{children:[r(c,{}),r("div",{id:"content",children:r(j,{blocks:a})}),r(h,{})]})},je=({node:e})=>{if(e.isOption("collapsible")){const a=e.isOption("collapsible"),n=e.getTitle()||"Details",c=e.isOption("open")?!0:void 0;if(a)return l("details",{className:R(e),open:c,...N(e),children:[r("summary",{className:"title",children:n}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})}return l("div",{className:S("exampleblock",R(e)),...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})},De=({node:e})=>{const a=e.getLevel();return l(M,{children:[r("a",{className:"sectionanchor",id:`${e.getId()||""}`,...N(e)}),P.createElement(`h${a+1}`,null,r(L,{node:e}))]})},Le=({node:e})=>{const a=e.getAttribute("target");let n=r("img",{src:e.getImageUri(a),alt:e.getAttribute("alt"),width:e.getAttribute("width"),height:e.getAttribute("height")});return e.hasAttribute("link")&&(n=r("a",{className:"image",href:e.getAttribute("link"),children:n})),l("div",{className:`imageblock ${e.hasAttribute("align")?"text-"+e.getAttribute("align"):""} ${e.hasAttribute("float")?e.getAttribute("float"):""} ${e.getRole()?e.getRole():""}`,...N(e),children:[r("div",{className:"content",children:n}),r(te,{node:e})]})},$e=({node:e})=>{const a=e.getDocument(),n=e.getAttributes(),c=e.isOption("nowrap")||!a.hasAttribute("prewrap"),h=H(e);if(e.getStyle()==="source"){const o=n.language;return l("div",{className:"listingblock",...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r("pre",{className:S("highlight",c?" nowrap":""),children:o?r("code",{className:o?`language-${o}`:"","data-lang":o,dangerouslySetInnerHTML:{__html:h}}):r("code",{dangerouslySetInnerHTML:{__html:h}})})})]})}else return l("div",{className:"listingblock",...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r("pre",{className:c?" nowrap":"",children:r("code",{dangerouslySetInnerHTML:{__html:e.getSource()}})})})]})},Fe=({node:e})=>{const n=e.getDocument().getAttributes().prewrap===void 0||e.isOption("nowrap");return l("div",{className:"literalblock",...N(e),children:[r(L,{node:e}),r("div",{className:"content",children:r("pre",{className:n?"nowrap":"",children:e.getSource()})})]})},xe=({node:e})=>l("div",{className:S("olist",R(e),e.getStyle()),...N(e),children:[r(L,{node:e}),r("ol",{className:e.getStyle(),reversed:e.isOption("reversed"),start:e.getAttribute("start"),children:e.getItems().map((a,n)=>l("li",{className:R(e)?R(e):"",children:[r("p",{children:k.default($(a))}),r(j,{blocks:a.getBlocks()})]},n))})]}),Me=({node:e})=>{const a=e.getStyle();return a==="abstract"?l("div",{className:S("quoteblock abstract",R(e)),...N(e),children:[r(L,{node:e}),r("blockquote",{className:"content",children:r(j,{blocks:e.getBlocks()})})]}):l("div",{className:S("openblock",a&&a!=="open"?a:"",R(e)),...N(e),children:[r(L,{node:e}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})},Be=()=>r("div",{style:{pageBreakAfter:"always"}}),We=({node:e})=>{const a=H(e);return l("div",{id:e.getId?e.getId():"",className:S("paragraph",R(e)),...N(e),children:[r(L,{node:e}),r("p",{dangerouslySetInnerHTML:{__html:a}})]})},Ye=({node:e})=>{const a=H(e);return r(M,{children:k.default(a)})},Ue=({node:e})=>{const a=e.getDocument(),n=a.getAttribute("toc-placement")==="preamble"&&a.hasSections()&&a.hasAttribute("toc");return r("div",{id:"preamble",...N(e),children:l("div",{className:"sectionbody",children:[r(j,{blocks:e.getBlocks()}),n&&l("div",{id:"toc",className:a.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:k.default(a.getAttribute("toc-title"))}),r(re,{node:a})]})]})})},He=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),c=H(e);return l("div",{id:e.getId?e.getId():"",className:S("quoteblock",R(e)),...N(e),children:[r(L,{node:e}),r("blockquote",{dangerouslySetInnerHTML:{__html:c}}),a&&l("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Ve=({node:e})=>{const a=e.getDocument().getAttributes(),n=e.getLevel();let c="",h=e.getSectionNumeral();h=h==="."?"":h;const o=a.sectnumlevels?parseInt(a.sectnumlevels):3;if(e.getCaption())c=e.getCaptionedTitle();else if(e.isNumbered()&&n<=o)if(n<2&&e.getDocument().getDoctype()=="book"){const d=e.getSectionName();d==="chapter"?c=`${a["chapter-signifier"]||""} ${h} ${e.getTitle()}`:d==="part"?c=`${a["part-signifier"]||""} ${h} ${e.getTitle()}`:c=`${h} ${e.getTitle()}`}else c=`${h} ${e.getTitle()}`;else c=e.getTitle()||"";return a.sectlinks&&(c=l(M,{children:[r("a",{className:"anchor",id:e.getId()||"",...N(e)}),r("a",{className:"link",href:`#${e.getId()}`,dangerouslySetInnerHTML:{__html:c}})]})),n===0?l(M,{children:[r("h1",{className:S("sect0",R(e)),"data-sectnum":h,...N(e),children:c}),r(j,{blocks:e.getBlocks()})]}):l("div",{className:S(`sect${n}`,R(e)),...N(e),children:[P.createElement(`h${n+1}`,{"data-sectnum":h},c),r("div",{className:"sectionbody",children:r(j,{blocks:e.getBlocks()})})]})},ze=({node:e})=>r("div",{className:S("sidebarblock",R(e)),...N(e),children:l("div",{className:"content",children:[r(L,{node:e}),r(j,{blocks:e.getBlocks()})]})}),Je=({node:e})=>{let a=["frame-"+e.getAttribute("frame","all","table-frame"),"grid-"+e.getAttribute("grid","all","table-grid")],n=e.getAttribute("stripes",null,"table-stripes");n&&a.push("stripes-"+n);let c=e.hasAutowidthOption(),h=e.getAttribute("tablepcwidth"),o=null;c&&!e.hasAttribute("width")?a.push("fit-content"):h==100?a.push("stretch"):o=`${h}%`,e.hasAttribute("float")&&a.push(e.getAttribute("float")),e.getRole()&&a.push(e.getRole()||"");const d=e.getRowCount(),y=e.getColumns(),g=e.getHeadRows(),_=e.getBodyRows(),v=e.getFootRows(),I=F=>S("tableblock",`halign-${F.getAttribute("halign")}`,`valign-${F.getAttribute("valign")}`),w=e.getTitle(),B=e.getId(),V=B||St(w||"");return l("table",{className:S("tableblock",...a),style:{width:o||void 0},...N(e),children:[e.hasTitle()&&l("caption",{className:"title",children:[!B&&r("a",{className:"anchor",id:V}),r("a",{href:`#${V}`,children:e.getCaptionedTitle()})]}),d>0&&r("colgroup",{children:y.map((F,W)=>{const C=F.getAttribute("colpcwidth");return r("col",{style:{width:`${C}%`}},W)})}),g.map((F,W)=>r("thead",{children:r("tr",{children:F.map((C,A)=>r("th",{className:I(C),dangerouslySetInnerHTML:{__html:$(C)}},A))})},W)),r("tbody",{children:_.map((F,W)=>r("tr",{children:F.map((C,A)=>{const he=C.getColumnSpan(),me=C.getRowSpan(),K=H(C),G={colSpan:he,rowSpan:me,className:I(C)},ae=C.getStyle();if(ae==="asciidoc")return P.createElement("td",{...G,key:A},r("div",{className:"content",dangerouslySetInnerHTML:{__html:K}}));if(ae==="literal")return P.createElement("td",{...G,key:A},r("div",{className:"literal",children:r("pre",{dangerouslySetInnerHTML:{__html:K}})}));if(ae==="header")return P.createElement("th",{...G,key:A},r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:K}}));{let le=K;return P.createElement("td",{...G,key:A},le.length===0?"":k.default(`<p class="tableblock">${le.join(`</p>
|
|
31
|
+
*/(function(e){(function(){var a={}.hasOwnProperty;function n(){for(var c=[],h=0;h<arguments.length;h++){var o=arguments[h];if(!!o){var d=typeof o;if(d==="string"||d==="number")c.push(o);else if(Array.isArray(o)){if(o.length){var y=n.apply(null,o);y&&c.push(y)}}else if(d==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){c.push(o.toString());continue}for(var g in o)a.call(o,g)&&o[g]&&c.push(g)}}}return c.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Oe);const S=Oe.exports,Ie=({node:e})=>{const a=e.getStyle(),n=o=>{const d=o,y=d[0];let g=d[1];return g.getNodeName||(g=null),{terms:y,dd:g}},c=o=>{if(o)return l("dd",{children:[o.hasText()&&r("p",{children:k.default($(o))}),o.hasBlocks()&&r(j,{blocks:o.getBlocks()})]})},h=e.hasTitle()&&r("div",{className:"title",children:e.getCaptionedTitle()});if(a==="qanda")return l("div",{className:S("qlist qanda",R(e)),...N(e),children:[h,r("ol",{children:e.getItems().map((o,d)=>{const{terms:y,dd:g}=n(o);return l("li",{children:[y.map((_,v)=>r("p",{children:r("em",{children:k.default($(_))})},v)),c(g)]},d)})})]});if(a==="horizontal"){const o=e.getAttribute("labelwidth"),d=e.getAttribute("itemwidth");return l("div",{className:S("hdlist",R(e)),children:[h,l("table",{children:[(o||d)&&l("colgroup",{children:[r("col",{style:{width:o?`${o.replace("%","")}%`:""}}),r("col",{style:{width:d?`${d.replace("%","")}%`:""}})]}),r("tbody",{children:e.getItems().map((y,g)=>{const{terms:_,dd:v}=n(y);return l("tr",{children:[r("td",{className:S("hdlist1",e.isOption("strong")?"strong":""),children:_.map((I,w)=>l(P.Fragment,{children:[w!==0&&r("br",{}),k.default($(I))]},w))}),v&&l("td",{className:"hdlist2",children:[v.hasText()&&r("p",{children:k.default($(v))}),v.hasBlocks()&&r(j,{blocks:v.getBlocks()})]})]},g)})})]})]})}else return l("div",{className:S("dlist",e.getStyle(),R(e)),children:[h,r("dl",{children:e.getItems().map((o,d)=>{const{terms:y,dd:g}=n(o);return l(P.Fragment,{children:[y.map((_,v)=>r("dt",{className:"hdlist1",children:k.default($(_))},v)),c(g)]},d)})})]})},re=({node:e,opts:a})=>{if(!e.hasSections())return null;const n=e.getSections(),c=e.getDocument(),h=P.useMemo(()=>c.getAttributes(),[e]),o=P.useMemo(()=>c.getAttribute("sectnumlevels"),[e]),d=P.useMemo(()=>c.getAttribute("toclevels"),[e]),y=(a==null?void 0:a.sectNumLevels)||(o?parseInt(o):3),g=(a==null?void 0:a.tocLevels)||(d?parseInt(d):2);return r("ul",{className:`sectlevel${n[0].getLevel()}`,children:n.map(_=>{let v=_.$sectnum();v=v==="."||v===".."?"":v;const I=_.getLevel();let w="";if(_.getCaption())w=_.getCaptionedTitle();else if(I<=y)if(I<2&&c.getDoctype()=="book"){const B=_.getSectionName();B==="chapter"?w=`${h["chapter-signifier"]||""} ${v} ${_.getTitle()}`:B==="part"?w=`${h["part-signifier"]||""} ${v} ${_.getTitle()}`:w=`${v} ${_.getTitle()}`}else w=`${v} ${_.getTitle()}`;else w=_.getTitle()||"";return l("li",{children:[r("a",{href:`#${_.getId()}`,children:k.default(w)}),I<g&&r(re,{node:_,opts:{tocLevels:g,sectNumLevels:y}})]},_.getId())})})},Pe=({document:e})=>{const a=e.getBlocks(),n=e.getFootnotes(),c=()=>{var d;return e.getNoheader()?null:r("div",{id:"header",children:e.hasHeader()&&l(M,{children:[r("h1",{dangerouslySetInnerHTML:{__html:((d=e.getDocumentTitle())==null?void 0:d.toString())||""}}),r(o,{}),e.hasSections()&&e.hasAttribute("toc")&&e.getAttribute("toc-placement")==="auto"&&l("div",{id:"toc",className:e.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:e.getAttribute("toc-title")}),r(re,{node:e})]})]})})},h=()=>n&&n.length>0&&a&&!a[0].getDocument().hasAttribute("nofootnotes")?l("div",{id:"footnotes",children:[r("hr",{}),n.map(d=>l("div",{className:"footnote",id:`_footnotedef_${d.getIndex()}`,children:[r("a",{href:`#_footnoteref_${d.getIndex()}`,children:d.getIndex()}),"."," ",k.default($(d)||"")]},d.getIndex()))]}):null,o=()=>e.getAuthors().length>0||e.hasAttribute("revnumber")||e.hasAttribute("revdate")||e.hasAttribute("revremark")?l("div",{className:"details",children:[e.getAuthors().map((y,g)=>l(P.Fragment,{children:[y.getName()&&l(M,{children:[r("span",{id:`author${g+1>1?g+1:""}`,className:"author",children:k.default(e.applySubstitutions(y.getName()||"").toString())}),r("br",{})]}),y.getEmail()&&l(M,{children:[r("span",{id:`email${g+1>1?g+1:""}`,className:"email",children:k.default(e.applySubstitutions(y.getEmail()||"").toString())}),r("br",{})]})]},g)),e.hasAttribute("revnumber")&&r("span",{id:"revnumber",children:`${e.getAttribute("version-label").toLowerCase()} ${e.getAttribute("revnumber")}${e.hasAttribute("revdate")?",":""}`}),e.hasAttribute("revdate")&&r("span",{id:"revdate",children:e.getAttribute("revdate")}),e.hasAttribute("revremark")&&l(M,{children:[r("br",{}),r("span",{id:"revremark",children:e.getAttribute("revremark")})]})]}):null;return l(M,{children:[r(c,{}),r("div",{id:"content",children:r(j,{blocks:a})}),r(h,{})]})},je=({node:e})=>{if(e.isOption("collapsible")){const a=e.isOption("collapsible"),n=e.getTitle()||"Details",c=e.isOption("open")?!0:void 0;if(a)return l("details",{className:R(e),open:c,...N(e),children:[r("summary",{className:"title",children:k.default(n)}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})}return l("div",{className:S("exampleblock",R(e)),...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})},De=({node:e})=>{const a=e.getLevel();return l(M,{children:[r("a",{className:"sectionanchor",id:`${e.getId()||""}`,...N(e)}),P.createElement(`h${a+1}`,null,r(L,{node:e}))]})},Le=({node:e})=>{const a=e.getAttribute("target");let n=r("img",{src:e.getImageUri(a),alt:e.getAttribute("alt"),width:e.getAttribute("width"),height:e.getAttribute("height")});return e.hasAttribute("link")&&(n=r("a",{className:"image",href:e.getAttribute("link"),children:n})),l("div",{className:`imageblock ${e.hasAttribute("align")?"text-"+e.getAttribute("align"):""} ${e.hasAttribute("float")?e.getAttribute("float"):""} ${e.getRole()?e.getRole():""}`,...N(e),children:[r("div",{className:"content",children:n}),r(te,{node:e})]})},$e=({node:e})=>{const a=e.getDocument(),n=e.getAttributes(),c=e.isOption("nowrap")||!a.hasAttribute("prewrap"),h=H(e);if(e.getStyle()==="source"){const o=n.language;return l("div",{className:"listingblock",...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r("pre",{className:S("highlight",c?" nowrap":""),children:o?r("code",{className:o?`language-${o}`:"","data-lang":o,dangerouslySetInnerHTML:{__html:h}}):r("code",{dangerouslySetInnerHTML:{__html:h}})})})]})}else return l("div",{className:"listingblock",...N(e),children:[r(te,{node:e}),r("div",{className:"content",children:r("pre",{className:c?" nowrap":"",children:r("code",{dangerouslySetInnerHTML:{__html:e.getSource()}})})})]})},Fe=({node:e})=>{const n=e.getDocument().getAttributes().prewrap===void 0||e.isOption("nowrap");return l("div",{className:"literalblock",...N(e),children:[r(L,{node:e}),r("div",{className:"content",children:r("pre",{className:n?"nowrap":"",children:e.getSource()})})]})},xe=({node:e})=>l("div",{className:S("olist",R(e),e.getStyle()),...N(e),children:[r(L,{node:e}),r("ol",{className:e.getStyle(),reversed:e.isOption("reversed"),start:e.getAttribute("start"),children:e.getItems().map((a,n)=>l("li",{className:R(e)?R(e):"",children:[r("p",{children:k.default($(a))}),r(j,{blocks:a.getBlocks()})]},n))})]}),Me=({node:e})=>{const a=e.getStyle();return a==="abstract"?l("div",{className:S("quoteblock abstract",R(e)),...N(e),children:[r(L,{node:e}),r("blockquote",{className:"content",children:r(j,{blocks:e.getBlocks()})})]}):l("div",{className:S("openblock",a&&a!=="open"?a:"",R(e)),...N(e),children:[r(L,{node:e}),r("div",{className:"content",children:r(j,{blocks:e.getBlocks()})})]})},Be=()=>r("div",{style:{pageBreakAfter:"always"}}),We=({node:e})=>{const a=H(e);return l("div",{id:e.getId?e.getId():"",className:S("paragraph",R(e)),...N(e),children:[r(L,{node:e}),r("p",{dangerouslySetInnerHTML:{__html:a}})]})},Ye=({node:e})=>{const a=H(e);return r(M,{children:k.default(a)})},Ue=({node:e})=>{const a=e.getDocument(),n=a.getAttribute("toc-placement")==="preamble"&&a.hasSections()&&a.hasAttribute("toc");return r("div",{id:"preamble",...N(e),children:l("div",{className:"sectionbody",children:[r(j,{blocks:e.getBlocks()}),n&&l("div",{id:"toc",className:a.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:k.default(a.getAttribute("toc-title"))}),r(re,{node:a})]})]})})},He=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),c=H(e);return l("div",{id:e.getId?e.getId():"",className:S("quoteblock",R(e)),...N(e),children:[r(L,{node:e}),r("blockquote",{dangerouslySetInnerHTML:{__html:c}}),a&&l("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Ve=({node:e})=>{const a=e.getDocument().getAttributes(),n=e.getLevel();let c="",h=e.getSectionNumeral();h=h==="."?"":h;const o=a.sectnumlevels?parseInt(a.sectnumlevels):3;if(e.getCaption())c=e.getCaptionedTitle();else if(e.isNumbered()&&n<=o)if(n<2&&e.getDocument().getDoctype()=="book"){const d=e.getSectionName();d==="chapter"?c=`${a["chapter-signifier"]||""} ${h} ${e.getTitle()}`:d==="part"?c=`${a["part-signifier"]||""} ${h} ${e.getTitle()}`:c=`${h} ${e.getTitle()}`}else c=`${h} ${e.getTitle()}`;else c=e.getTitle()||"";return a.sectlinks&&(c=l(M,{children:[r("a",{className:"anchor",id:e.getId()||"",...N(e)}),r("a",{className:"link",href:`#${e.getId()}`,dangerouslySetInnerHTML:{__html:c}})]})),n===0?l(M,{children:[r("h1",{className:S("sect0",R(e)),"data-sectnum":h,...N(e),children:c}),r(j,{blocks:e.getBlocks()})]}):l("div",{className:S(`sect${n}`,R(e)),...N(e),children:[P.createElement(`h${n+1}`,{"data-sectnum":h},c),r("div",{className:"sectionbody",children:r(j,{blocks:e.getBlocks()})})]})},ze=({node:e})=>r("div",{className:S("sidebarblock",R(e)),...N(e),children:l("div",{className:"content",children:[r(L,{node:e}),r(j,{blocks:e.getBlocks()})]})}),Je=({node:e})=>{let a=["frame-"+e.getAttribute("frame","all","table-frame"),"grid-"+e.getAttribute("grid","all","table-grid")],n=e.getAttribute("stripes",null,"table-stripes");n&&a.push("stripes-"+n);let c=e.hasAutowidthOption(),h=e.getAttribute("tablepcwidth"),o=null;c&&!e.hasAttribute("width")?a.push("fit-content"):h==100?a.push("stretch"):o=`${h}%`,e.hasAttribute("float")&&a.push(e.getAttribute("float")),e.getRole()&&a.push(e.getRole()||"");const d=e.getRowCount(),y=e.getColumns(),g=e.getHeadRows(),_=e.getBodyRows(),v=e.getFootRows(),I=F=>S("tableblock",`halign-${F.getAttribute("halign")}`,`valign-${F.getAttribute("valign")}`),w=e.getTitle(),B=e.getId(),V=B||St(w||"");return l("table",{className:S("tableblock",...a),style:{width:o||void 0},...N(e),children:[e.hasTitle()&&l("caption",{className:"title",children:[!B&&r("a",{className:"anchor",id:V}),r("a",{href:`#${V}`,children:e.getCaptionedTitle()})]}),d>0&&r("colgroup",{children:y.map((F,W)=>{const C=F.getAttribute("colpcwidth");return r("col",{style:{width:`${C}%`}},W)})}),g.map((F,W)=>r("thead",{children:r("tr",{children:F.map((C,A)=>r("th",{className:I(C),dangerouslySetInnerHTML:{__html:$(C)}},A))})},W)),r("tbody",{children:_.map((F,W)=>r("tr",{children:F.map((C,A)=>{const he=C.getColumnSpan(),me=C.getRowSpan(),K=H(C),G={colSpan:he,rowSpan:me,className:I(C)},ae=C.getStyle();if(ae==="asciidoc")return P.createElement("td",{...G,key:A},r("div",{className:"content",dangerouslySetInnerHTML:{__html:K}}));if(ae==="literal")return P.createElement("td",{...G,key:A},r("div",{className:"literal",children:r("pre",{dangerouslySetInnerHTML:{__html:K}})}));if(ae==="header")return P.createElement("th",{...G,key:A},r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:K}}));{let le=K;return P.createElement("td",{...G,key:A},le.length===0?"":k.default(`<p class="tableblock">${le.join(`</p>
|
|
32
32
|
<p class="tableblock">`)}</p>`))}})},W))}),v.map((F,W)=>r("tfoot",{children:r("tr",{children:F.map((C,A)=>r("td",{className:I(C),children:r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:$(C)}})},A))})},W))]})},St=e=>e.toString().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"_").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/-$/g,""),Ke=({node:e})=>{let a=e.getId()||"toc";const n=e.getDocument(),c=e.hasTitle()?e.getTitle():n.getAttribute("toc-title"),h=P.useMemo(()=>n.getAttribute("toc-placement"),[e]),o=P.useMemo(()=>n.hasAttribute("toc"),[e]),d=e.hasAttribute("levels")?parseInt(e.getAttribute("levels")):void 0;return h==="macro"&&n.hasSections()&&o?l("div",{id:a,className:S("toc",R(e)),children:[r("div",{id:`${a}title`,className:"title",children:k.default(c||"")}),r(re,{node:e.getDocument(),opts:{tocLevels:d}})]}):null},Ge=()=>r("hr",{}),qe=({node:e})=>{const a=e.isOption("checklist");return l("div",{id:e.getId?e.getId():"",className:S("ulist",e.getStyle(),R(e),a&&"checklist"),...N(e),children:[r(L,{node:e}),r("ul",{className:a?"checklist":"",children:e.getItems().map((n,c)=>a?r("li",{id:n.getId(),className:R(e),children:l("p",{children:[a&&n.hasAttribute("checkbox")&&r("i",{className:S("fa",n.hasAttribute("checked")?"fa-check-square-o":"fa-square-o")})," ",k.default($(n))]})},c):l("li",{id:n.getId(),className:R(e),children:[r("p",{dangerouslySetInnerHTML:{__html:$(n)}}),r(j,{blocks:n.getBlocks()})]},c))})]})},Xe=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),c=H(e);return l("div",{id:e.getId?e.getId():"",className:S("verseblock",R(e)),...N(e),children:[r(L,{node:e}),r("pre",{className:"content",dangerouslySetInnerHTML:{__html:c}}),a&&l("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Qe=P.createContext({}),wt=({content:e,options:a})=>{const n=a&&a.customDocument;return r(Qe.Provider,{value:a||{},children:n?r(n,{document:e}):r(Pe,{document:e})})},j=({blocks:e})=>r(M,{children:e.map((a,n)=>r(Ct,{node:a},`${n}-${a.getNodeName()}`))}),Ct=({node:e})=>{const a=P.useContext(Qe),n=e.getNodeName(),c=e.getDocument(),h=e.getAttributes();c.playbackAttributes(h);const o=a&&a.overrides&&a.overrides[n];if(o)return r(o,{node:e});switch(n){case"audio":return r(we,{node:e});case"preamble":return r(Ue,{node:e});case"section":return r(Ve,{node:e});case"paragraph":return r(We,{node:e});case"dlist":return r(Ie,{node:e});case"ulist":return r(qe,{node:e});case"floating_title":return r(De,{node:e});case"admonition":return r(Se,{node:e});case"listing":return r($e,{node:e});case"literal":return r(Fe,{node:e});case"image":return r(Le,{node:e});case"colist":return r(Ce,{node:e});case"olist":return r(xe,{node:e});case"table":return r(Je,{node:e});case"thematic_break":return r(Ge,{});case"open":return r(Me,{node:e});case"pass":return r(Ye,{node:e});case"page_break":return r(Be,{});case"example":return r(je,{node:e});case"sidebar":return r(ze,{node:e});case"quote":return r(He,{node:e});case"verse":return r(Xe,{node:e});case"toc":return r(Ke,{node:e});default:return r(M,{children:k.default(e.convert())})}};Object.defineProperty(f,"asciidoctor",{enumerable:!0,get:()=>kt.default}),Object.defineProperty(f,"parse",{enumerable:!0,get:()=>k.default}),f.Admonition=Se,f.Audio=we,f.CaptionedTitle=te,f.CoList=Ce,f.Content=j,f.DList=Ie,f.Document=Pe,f.Example=je,f.FloatingTitle=De,f.Image=Le,f.Listing=$e,f.Literal=Fe,f.OList=xe,f.Open=Me,f.Outline=re,f.PageBreak=Be,f.Paragraph=We,f.Pass=Ye,f.Preamble=Ue,f.Quote=He,f.Section=Ve,f.Sidebar=ze,f.Table=Je,f.TableOfContents=Ke,f.ThematicBreak=Ge,f.Title=L,f.UList=qe,f.Verse=Xe,f.default=wt,f.getContent=H,f.getLineNumber=N,f.getRole=R,f.getText=$,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AbstractBlock, Block, Document,
|
|
1
|
+
import type { AbstractBlock, Block, Document, ListItem, Table } from '@asciidoctor/core';
|
|
2
2
|
type Node = Block | AbstractBlock | Table.Cell;
|
|
3
3
|
declare const getContent: (node: Node) => string;
|
|
4
|
-
declare const getText: (node: ListItem | Document.Footnote | Table.Cell
|
|
4
|
+
declare const getText: (node: ListItem | Document.Footnote | Table.Cell) => string;
|
|
5
5
|
export { getContent, getText };
|