@oxide/react-asciidoc 0.1.2-alpha.3 → 0.1.2-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{types/index.d.ts → index.d.ts} +6 -6
  2. package/dist/react-asciidoc.js +19 -19
  3. package/dist/react-asciidoc.umd.cjs +3 -3
  4. package/dist/templates/index.d.ts +26 -0
  5. package/package.json +5 -10
  6. package/dist/types/templates/index.d.ts +0 -26
  7. /package/dist/{types/hooks → hooks}/useGetContent.d.ts +0 -0
  8. /package/dist/{types/templates → templates}/Admonition.d.ts +0 -0
  9. /package/dist/{types/templates → templates}/Audio.d.ts +0 -0
  10. /package/dist/{types/templates → templates}/CoList.d.ts +0 -0
  11. /package/dist/{types/templates → templates}/DList.d.ts +0 -0
  12. /package/dist/{types/templates → templates}/Document.d.ts +0 -0
  13. /package/dist/{types/templates → templates}/Example.d.ts +0 -0
  14. /package/dist/{types/templates → templates}/FloatingTitle.d.ts +0 -0
  15. /package/dist/{types/templates → templates}/Image.d.ts +0 -0
  16. /package/dist/{types/templates → templates}/Listing.d.ts +0 -0
  17. /package/dist/{types/templates → templates}/Literal.d.ts +0 -0
  18. /package/dist/{types/templates → templates}/OList.d.ts +0 -0
  19. /package/dist/{types/templates → templates}/Open.d.ts +0 -0
  20. /package/dist/{types/templates → templates}/Outline.d.ts +0 -0
  21. /package/dist/{types/templates → templates}/PageBreak.d.ts +0 -0
  22. /package/dist/{types/templates → templates}/Paragraph.d.ts +0 -0
  23. /package/dist/{types/templates → templates}/Pass.d.ts +0 -0
  24. /package/dist/{types/templates → templates}/Preamble.d.ts +0 -0
  25. /package/dist/{types/templates → templates}/Quote.d.ts +0 -0
  26. /package/dist/{types/templates → templates}/Section.d.ts +0 -0
  27. /package/dist/{types/templates → templates}/Sidebar.d.ts +0 -0
  28. /package/dist/{types/templates → templates}/Table.d.ts +0 -0
  29. /package/dist/{types/templates → templates}/TableOfContents.d.ts +0 -0
  30. /package/dist/{types/templates → templates}/ThematicBreak.d.ts +0 -0
  31. /package/dist/{types/templates → templates}/UList.d.ts +0 -0
  32. /package/dist/{types/templates → templates}/Verse.d.ts +0 -0
  33. /package/dist/{types/templates → templates}/util.d.ts +0 -0
@@ -2,10 +2,10 @@
2
2
  import asciidoctor from '@asciidoctor/core';
3
3
  import type { AbstractBlock } from '@asciidoctor/core';
4
4
  import type * as AdocTypes from '@asciidoctor/core';
5
- import useGetContent from './hooks/useGetContent';
6
- import { Admonition, Audio, CoList, DList, Document, Example, FloatingTitle, Image, Listing, Literal, OList, Open, PageBreak, Paragraph, Pass, Preamble, Quote, Section, Sidebar, Table, TableOfContents, ThematicBreak, UList, Verse } from './templates';
7
- import { CaptionedTitle, Title, getLineNumber, getRole } from './templates/util';
8
- declare type Overrides = {
5
+ import useGetContent from './hooks/useGetContent.tsx';
6
+ import { Admonition, Audio, CoList, DList, Document, Example, FloatingTitle, Image, Listing, Literal, OList, Open, PageBreak, Paragraph, Pass, Preamble, Quote, Section, Sidebar, Table, TableOfContents, ThematicBreak, UList, Verse } from './templates/index.ts';
7
+ import { CaptionedTitle, Title, getLineNumber, getRole } from './templates/util.tsx';
8
+ type Overrides = {
9
9
  admonition?: typeof Admonition;
10
10
  audio?: typeof Audio;
11
11
  colist?: typeof CoList;
@@ -30,7 +30,7 @@ declare type Overrides = {
30
30
  ulist?: typeof UList;
31
31
  verse?: typeof Verse;
32
32
  };
33
- export declare type Options = {
33
+ export type Options = {
34
34
  overrides?: Overrides;
35
35
  customDocument?: typeof Document;
36
36
  };
@@ -43,4 +43,4 @@ declare const Content: ({ blocks }: {
43
43
  }) => JSX.Element;
44
44
  export default Asciidoc;
45
45
  export { asciidoctor, Content, useGetContent, Title, getRole, getLineNumber, CaptionedTitle, AdocTypes, };
46
- export * from './templates';
46
+ export * from './templates/index.ts';
@@ -630,12 +630,12 @@ const D = se.exports.Fragment, r = se.exports.jsx, o = se.exports.jsxs, P = ({
630
630
  node: e
631
631
  }) => e.hasTitle() ? /* @__PURE__ */ r("div", {
632
632
  className: "title",
633
- children: w(e.getTitle() || "")
633
+ children: w.default(e.getTitle() || "")
634
634
  }) : null, ne = ({
635
635
  node: e
636
636
  }) => e.hasTitle() ? /* @__PURE__ */ r("div", {
637
637
  className: "title",
638
- children: w(e.getCaptionedTitle() || "")
638
+ children: w.default(e.getCaptionedTitle() || "")
639
639
  }) : null, C = (e) => typeof e.getRole() == "string" ? e.getRole() : void 0, A = (e) => e.getLineNumber() ? {
640
640
  "data-lineno": e.getLineNumber()
641
641
  } : {}, Ct = ({
@@ -664,7 +664,7 @@ const D = se.exports.Fragment, r = se.exports.jsx, o = se.exports.jsxs, P = ({
664
664
  className: "content",
665
665
  children: [/* @__PURE__ */ r(P, {
666
666
  node: e
667
- }), l === "simple" ? w(c) : /* @__PURE__ */ r(I, {
667
+ }), l === "simple" ? w.default(c) : /* @__PURE__ */ r(I, {
668
668
  blocks: e.getBlocks()
669
669
  })]
670
670
  })]
@@ -710,7 +710,7 @@ const D = se.exports.Fragment, r = se.exports.jsx, o = se.exports.jsxs, P = ({
710
710
  children: n + 1
711
711
  })]
712
712
  }), /* @__PURE__ */ o("td", {
713
- children: [w(a.getText()), /* @__PURE__ */ r(I, {
713
+ children: [w.default(a.getText()), /* @__PURE__ */ r(I, {
714
714
  blocks: a.getBlocks()
715
715
  })]
716
716
  })]
@@ -768,7 +768,7 @@ const E = Ve.exports, xt = ({
768
768
  if (l)
769
769
  return /* @__PURE__ */ o("dd", {
770
770
  children: [l.hasText() && /* @__PURE__ */ r("p", {
771
- children: w(l.getText())
771
+ children: w.default(l.getText())
772
772
  }), l.hasBlocks() && /* @__PURE__ */ r(I, {
773
773
  blocks: l.getBlocks()
774
774
  })]
@@ -822,12 +822,12 @@ const E = Ve.exports, xt = ({
822
822
  children: [/* @__PURE__ */ r("td", {
823
823
  className: E("hdlist1", e.isOption("strong") ? "strong" : ""),
824
824
  children: m.map((S, _) => /* @__PURE__ */ o(pe, {
825
- children: [_ !== 0 && /* @__PURE__ */ r("br", {}), w(S.getText())]
825
+ children: [_ !== 0 && /* @__PURE__ */ r("br", {}), w.default(S.getText())]
826
826
  }, _))
827
827
  }), v && /* @__PURE__ */ o("td", {
828
828
  className: "hdlist2",
829
829
  children: [v.hasText() && /* @__PURE__ */ r("p", {
830
- children: w(v.getText())
830
+ children: w.default(v.getText())
831
831
  }), v.hasBlocks() && /* @__PURE__ */ r(I, {
832
832
  blocks: v.getBlocks()
833
833
  })]
@@ -849,7 +849,7 @@ const E = Ve.exports, xt = ({
849
849
  return /* @__PURE__ */ o(pe, {
850
850
  children: [d.map((m, v) => /* @__PURE__ */ r("dt", {
851
851
  className: "hdlist1",
852
- children: w(m.getText())
852
+ children: w.default(m.getText())
853
853
  }, v)), c(g)]
854
854
  }, b);
855
855
  })
@@ -882,7 +882,7 @@ const E = Ve.exports, xt = ({
882
882
  return /* @__PURE__ */ o("li", {
883
883
  children: [/* @__PURE__ */ r("a", {
884
884
  href: `#${m.getId()}`,
885
- children: w(_)
885
+ children: w.default(_)
886
886
  }), S < g && /* @__PURE__ */ r(le, {
887
887
  node: m,
888
888
  opts: {
@@ -929,7 +929,7 @@ const E = Ve.exports, xt = ({
929
929
  children: [/* @__PURE__ */ r("a", {
930
930
  href: `#_footnoteref_${d.getIndex()}`,
931
931
  children: d.getIndex()
932
- }), ".", " ", w(d.getText() || "")]
932
+ }), ".", " ", w.default(d.getText() || "")]
933
933
  }, d.getIndex()))]
934
934
  }) : null, b = () => e.getAuthors().length > 0 || e.hasAttribute("revnumber") || e.hasAttribute("revdate") || e.hasAttribute("revremark") ? /* @__PURE__ */ o("div", {
935
935
  className: "details",
@@ -938,13 +938,13 @@ const E = Ve.exports, xt = ({
938
938
  children: [/* @__PURE__ */ r("span", {
939
939
  id: `author${m + 1 > 1 ? m + 1 : ""}`,
940
940
  className: "author",
941
- children: w(e.applySubstitutions(g.getName() || "").toString())
941
+ children: w.default(e.applySubstitutions(g.getName() || "").toString())
942
942
  }), /* @__PURE__ */ r("br", {})]
943
943
  }), g.getEmail() && /* @__PURE__ */ o(D, {
944
944
  children: [/* @__PURE__ */ r("span", {
945
945
  id: `email${m + 1 > 1 ? m + 1 : ""}`,
946
946
  className: "email",
947
- children: w(e.applySubstitutions(g.getEmail() || "").toString())
947
+ children: w.default(e.applySubstitutions(g.getEmail() || "").toString())
948
948
  }), /* @__PURE__ */ r("br", {})]
949
949
  })]
950
950
  }, m)), e.hasAttribute("revnumber") && /* @__PURE__ */ r("span", {
@@ -1096,7 +1096,7 @@ const E = Ve.exports, xt = ({
1096
1096
  children: e.getItems().map((a, n) => /* @__PURE__ */ o("li", {
1097
1097
  className: C(e) ? C(e) : "",
1098
1098
  children: [/* @__PURE__ */ r("p", {
1099
- children: w(a.getText())
1099
+ children: w.default(a.getText())
1100
1100
  }), /* @__PURE__ */ r(I, {
1101
1101
  blocks: a.getBlocks()
1102
1102
  })]
@@ -1154,7 +1154,7 @@ const E = Ve.exports, xt = ({
1154
1154
  }) => {
1155
1155
  const a = H(e);
1156
1156
  return /* @__PURE__ */ r(D, {
1157
- children: w(a)
1157
+ children: w.default(a)
1158
1158
  });
1159
1159
  }, Ut = ({
1160
1160
  node: e
@@ -1172,7 +1172,7 @@ const E = Ve.exports, xt = ({
1172
1172
  className: a.getAttribute("toc-class", "toc"),
1173
1173
  children: [/* @__PURE__ */ r("div", {
1174
1174
  id: "toctitle",
1175
- children: w(a.getAttribute("toc-title"))
1175
+ children: w.default(a.getAttribute("toc-title"))
1176
1176
  }), /* @__PURE__ */ r(le, {
1177
1177
  node: a
1178
1178
  })]
@@ -1347,7 +1347,7 @@ const E = Ve.exports, xt = ({
1347
1347
  return /* @__PURE__ */ G("td", {
1348
1348
  ...U,
1349
1349
  key: L
1350
- }, Z.length === 0 ? "" : w(`<p class="tableblock">${Z.join(`</p>
1350
+ }, Z.length === 0 ? "" : w.default(`<p class="tableblock">${Z.join(`</p>
1351
1351
  <p class="tableblock">`)}</p>`));
1352
1352
  }
1353
1353
  })
@@ -1377,7 +1377,7 @@ const E = Ve.exports, xt = ({
1377
1377
  children: [/* @__PURE__ */ r("div", {
1378
1378
  id: `${a}title`,
1379
1379
  className: "title",
1380
- children: w(c || "")
1380
+ children: w.default(c || "")
1381
1381
  }), /* @__PURE__ */ r(le, {
1382
1382
  node: e.getDocument(),
1383
1383
  opts: {
@@ -1403,7 +1403,7 @@ const E = Ve.exports, xt = ({
1403
1403
  children: /* @__PURE__ */ o("p", {
1404
1404
  children: [a && n.hasAttribute("checkbox") && /* @__PURE__ */ r("i", {
1405
1405
  className: E("fa", n.hasAttribute("checked") ? "fa-check-square-o" : "fa-square-o")
1406
- }), " ", w(n.getText())]
1406
+ }), " ", w.default(n.getText())]
1407
1407
  })
1408
1408
  }, c) : /* @__PURE__ */ o("li", {
1409
1409
  id: n.getId(),
@@ -1560,7 +1560,7 @@ const E = Ve.exports, xt = ({
1560
1560
  });
1561
1561
  default:
1562
1562
  return /* @__PURE__ */ r(D, {
1563
- children: w(e.convert())
1563
+ children: w.default(e.convert())
1564
1564
  });
1565
1565
  }
1566
1566
  };
@@ -24,9 +24,9 @@ Check the render method of \``+t+"`."}return""}}function Gt(t){{if(t!==void 0){v
24
24
 
25
25
  Check your code at `+i+":"+s+"."}return""}}var gt={};function Jt(t){{var i=dt();if(!i){var s=typeof t=="string"?t:t.displayName||t.name;s&&(i=`
26
26
 
27
- Check the top-level render call using <`+s+">.")}return i}}function ht(t,i){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var s=Jt(i);if(gt[s])return;gt[s]=!0;var u="";t&&t._owner&&t._owner!==ve.current&&(u=" It was passed a child from "+B(t._owner.type)+"."),G(t),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,u),G(null)}}function mt(t,i){{if(typeof t!="object")return;if(he(t))for(var s=0;s<t.length;s++){var u=t[s];pe(u)&&ht(u,i)}else if(pe(t))t._store&&(t._store.validated=!0);else if(t){var _=ue(t);if(typeof _=="function"&&_!==t.entries)for(var A=_.call(t),p;!(p=A.next()).done;)pe(p.value)&&ht(p.value,i)}}}function zt(t){{var i=t.type;if(i==null||typeof i=="string")return;var s;if(typeof i=="function")s=i.propTypes;else if(typeof i=="object"&&(i.$$typeof===g||i.$$typeof===I))s=i.propTypes;else return;if(s){var u=B(i);Lt(s,t.props,"prop",u,t)}else if(i.PropTypes!==void 0&&!be){be=!0;var _=B(i);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_||"Unknown")}typeof i.getDefaultProps=="function"&&!i.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(t){{for(var i=Object.keys(t.props),s=0;s<i.length;s++){var u=i[s];if(u!=="children"&&u!=="key"){G(t),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),G(null);break}}t.ref!==null&&(G(t),w("Invalid attribute `ref` supplied to `React.Fragment`."),G(null))}}function vt(t,i,s,u,_,A){{var p=St(t);if(!p){var h="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var D=Gt(_);D?h+=D:h+=dt();var k;t===null?k="null":he(t)?k="array":t!==void 0&&t.$$typeof===a?(k="<"+(B(t.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,h)}var C=Vt(t,i,s,_,A);if(C==null)return C;if(p){var F=i.children;if(F!==void 0)if(u)if(he(F)){for(var J=0;J<F.length;J++)mt(F[J],t);Object.freeze&&Object.freeze(F)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else mt(F,t)}return t===o?Kt(C):zt(C),C}}function Xt(t,i,s){return vt(t,i,s,!0)}function Qt(t,i,s){return vt(t,i,s,!1)}var Zt=Qt,qt=Xt;X.Fragment=o,X.jsx=Zt,X.jsxs=qt}()),X}(function(e){process.env.NODE_ENV==="production"?e.exports=_t():e.exports=Tt()})(re);const M=re.exports.Fragment,r=re.exports.jsx,c=re.exports.jsxs,x=({node:e})=>e.hasTitle()?r("div",{className:"title",children:O.default(e.getTitle()||"")}):null,Q=({node:e})=>e.hasTitle()?r("div",{className:"title",children:O.default(e.getCaptionedTitle()||"")}):null,E=e=>typeof e.getRole()=="string"?e.getRole():void 0,N=e=>e.getLineNumber()?{"data-lineno":e.getLineNumber()}:{},Ae=({node:e})=>{const a=e.getAttributes(),n=e.getDocument(),o=Y(e),d=()=>n.getAttribute("icons")==="font"&&!a.icon?r("i",{className:`fa icon-${a.name}`,title:a.textlabel}):r("img",{src:e.getIconUri(a.name),alt:a.textlabel}),l=e.content_model;return r("div",{className:`admonitionblock ${a.name}`,...N(e),children:r("table",{children:r("tbody",{children:c("tr",{children:[r("td",{className:"icon",children:n.hasAttribute("icons")?d():r("div",{className:"title",children:e.getAttribute("textlabel")})}),c("td",{className:"content",children:[r(x,{node:e}),l==="simple"?O.default(o):r(L,{blocks:e.getBlocks()})]})]})})})})},Ne=({node:e})=>{const a=e.getAttribute("start"),n=e.getAttribute("start"),o=(a||n)&&`#t=${a||""}`+n?`,${n}`:"";return c("div",{className:"audioblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("audio",{src:`${e.getMediaUri(e.getAttribute("target"))}${o}`,autoPlay:e.isOption("autoplay"),controls:!e.isOption("nocontrols"),loop:e.isOption("loop"),children:"Your browser does not support the audio tag."})})]})},Re=({node:e})=>c("div",{className:"colist",...N(e),children:[r(x,{node:e}),r("table",{children:r("tbody",{children:e.getItems().map((a,n)=>c("tr",{children:[c("td",{children:[r("i",{className:"conum","data-value":n+1}),r("b",{children:n+1})]}),c("td",{children:[O.default(a.getText()),r(L,{blocks:a.getBlocks()})]})]},n))})})]});var ke={exports:{}};/*!
27
+ Check the top-level render call using <`+s+">.")}return i}}function ht(t,i){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var s=Jt(i);if(gt[s])return;gt[s]=!0;var u="";t&&t._owner&&t._owner!==ve.current&&(u=" It was passed a child from "+B(t._owner.type)+"."),G(t),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,u),G(null)}}function mt(t,i){{if(typeof t!="object")return;if(he(t))for(var s=0;s<t.length;s++){var u=t[s];pe(u)&&ht(u,i)}else if(pe(t))t._store&&(t._store.validated=!0);else if(t){var _=ue(t);if(typeof _=="function"&&_!==t.entries)for(var A=_.call(t),p;!(p=A.next()).done;)pe(p.value)&&ht(p.value,i)}}}function zt(t){{var i=t.type;if(i==null||typeof i=="string")return;var s;if(typeof i=="function")s=i.propTypes;else if(typeof i=="object"&&(i.$$typeof===g||i.$$typeof===I))s=i.propTypes;else return;if(s){var u=B(i);Lt(s,t.props,"prop",u,t)}else if(i.PropTypes!==void 0&&!be){be=!0;var _=B(i);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_||"Unknown")}typeof i.getDefaultProps=="function"&&!i.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(t){{for(var i=Object.keys(t.props),s=0;s<i.length;s++){var u=i[s];if(u!=="children"&&u!=="key"){G(t),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),G(null);break}}t.ref!==null&&(G(t),w("Invalid attribute `ref` supplied to `React.Fragment`."),G(null))}}function vt(t,i,s,u,_,A){{var p=St(t);if(!p){var h="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var D=Gt(_);D?h+=D:h+=dt();var k;t===null?k="null":he(t)?k="array":t!==void 0&&t.$$typeof===a?(k="<"+(B(t.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,h)}var C=Vt(t,i,s,_,A);if(C==null)return C;if(p){var F=i.children;if(F!==void 0)if(u)if(he(F)){for(var J=0;J<F.length;J++)mt(F[J],t);Object.freeze&&Object.freeze(F)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else mt(F,t)}return t===o?Kt(C):zt(C),C}}function Xt(t,i,s){return vt(t,i,s,!0)}function Qt(t,i,s){return vt(t,i,s,!1)}var Zt=Qt,qt=Xt;X.Fragment=o,X.jsx=Zt,X.jsxs=qt}()),X}(function(e){process.env.NODE_ENV==="production"?e.exports=_t():e.exports=Tt()})(re);const M=re.exports.Fragment,r=re.exports.jsx,c=re.exports.jsxs,x=({node:e})=>e.hasTitle()?r("div",{className:"title",children:O.default.default(e.getTitle()||"")}):null,Q=({node:e})=>e.hasTitle()?r("div",{className:"title",children:O.default.default(e.getCaptionedTitle()||"")}):null,E=e=>typeof e.getRole()=="string"?e.getRole():void 0,N=e=>e.getLineNumber()?{"data-lineno":e.getLineNumber()}:{},Ae=({node:e})=>{const a=e.getAttributes(),n=e.getDocument(),o=Y(e),d=()=>n.getAttribute("icons")==="font"&&!a.icon?r("i",{className:`fa icon-${a.name}`,title:a.textlabel}):r("img",{src:e.getIconUri(a.name),alt:a.textlabel}),l=e.content_model;return r("div",{className:`admonitionblock ${a.name}`,...N(e),children:r("table",{children:r("tbody",{children:c("tr",{children:[r("td",{className:"icon",children:n.hasAttribute("icons")?d():r("div",{className:"title",children:e.getAttribute("textlabel")})}),c("td",{className:"content",children:[r(x,{node:e}),l==="simple"?O.default.default(o):r(L,{blocks:e.getBlocks()})]})]})})})})},Ne=({node:e})=>{const a=e.getAttribute("start"),n=e.getAttribute("start"),o=(a||n)&&`#t=${a||""}`+n?`,${n}`:"";return c("div",{className:"audioblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("audio",{src:`${e.getMediaUri(e.getAttribute("target"))}${o}`,autoPlay:e.isOption("autoplay"),controls:!e.isOption("nocontrols"),loop:e.isOption("loop"),children:"Your browser does not support the audio tag."})})]})},Re=({node:e})=>c("div",{className:"colist",...N(e),children:[r(x,{node:e}),r("table",{children:r("tbody",{children:e.getItems().map((a,n)=>c("tr",{children:[c("td",{children:[r("i",{className:"conum","data-value":n+1}),r("b",{children:n+1})]}),c("td",{children:[O.default.default(a.getText()),r(L,{blocks:a.getBlocks()})]})]},n))})})]});var ke={exports:{}};/*!
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 o=[],d=0;d<arguments.length;d++){var l=arguments[d];if(!!l){var y=typeof l;if(y==="string"||y==="number")o.push(l);else if(Array.isArray(l)){if(l.length){var m=n.apply(null,l);m&&o.push(m)}}else if(y==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){o.push(l.toString());continue}for(var g in l)a.call(l,g)&&l[g]&&o.push(g)}}}return o.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ke);const S=ke.exports,Ee=({node:e})=>{const a=e.getStyle(),n=l=>{const y=l,m=y[0];let g=y[1];return g.getNodeName||(g=null),{terms:m,dd:g}},o=l=>{if(l)return c("dd",{children:[l.hasText()&&r("p",{children:O.default(l.getText())}),l.hasBlocks()&&r(L,{blocks:l.getBlocks()})]})},d=e.hasTitle()&&r("div",{className:"title",children:e.getCaptionedTitle()});if(a==="qanda")return c("div",{className:S("qlist qanda",E(e)),...N(e),children:[d,r("ol",{children:e.getItems().map((l,y)=>{const{terms:m,dd:g}=n(l);return c("li",{children:[m.map((v,b)=>r("p",{children:r("em",{children:v.getText()})},b)),o(g)]},y)})})]});if(a==="horizontal"){const l=e.getAttribute("labelwidth"),y=e.getAttribute("itemwidth");return c("div",{className:S("hdlist",E(e)),children:[d,c("table",{children:[(l||y)&&c("colgroup",{children:[r("col",{style:{width:l?`${l.replace("%","")}%`:""}}),r("col",{style:{width:y?`${y.replace("%","")}%`:""}})]}),r("tbody",{children:e.getItems().map((m,g)=>{const{terms:v,dd:b}=n(m);return c("tr",{children:[r("td",{className:S("hdlist1",e.isOption("strong")?"strong":""),children:v.map((I,T)=>c(R.Fragment,{children:[T!==0&&r("br",{}),O.default(I.getText())]},T))}),b&&c("td",{className:"hdlist2",children:[b.hasText()&&r("p",{children:O.default(b.getText())}),b.hasBlocks()&&r(L,{blocks:b.getBlocks()})]})]},g)})})]})]})}else return c("div",{className:S("dlist",e.getStyle(),E(e)),children:[d,r("dl",{children:e.getItems().map((l,y)=>{const{terms:m,dd:g}=n(l);return c(R.Fragment,{children:[m.map((v,b)=>r("dt",{className:"hdlist1",children:O.default(v.getText())},b)),o(g)]},y)})})]})},Z=({node:e,opts:a})=>{if(!e.hasSections())return null;const n=e.getSections(),o=e.getDocument(),d=R.useMemo(()=>o.getAttributes(),[e]),l=R.useMemo(()=>o.getAttribute("sectnumlevels"),[e]),y=R.useMemo(()=>o.getAttribute("toclevels"),[e]),m=(a==null?void 0:a.sectNumLevels)||(l?parseInt(l):3),g=(a==null?void 0:a.tocLevels)||(y?parseInt(y):2);return r("ul",{className:`sectlevel${n[0].getLevel()}`,children:n.map(v=>{let b=v.$sectnum();b=b==="."||b===".."?"":b;const I=v.getLevel();let T="";if(v.getCaption())T=v.getCaptionedTitle();else if(I<=m)if(I<2&&o.getDoctype()=="book"){const j=v.getSectionName();j==="chapter"?T=`${d["chapter-signifier"]||""} ${b} ${v.getTitle()}`:j==="part"?T=`${d["part-signifier"]||""} ${b} ${v.getTitle()}`:T=`${b} ${v.getTitle()}`}else T=`${b} ${v.getTitle()}`;else T=v.getTitle()||"";return c("li",{children:[r("a",{href:`#${v.getId()}`,children:O.default(T)}),I<g&&r(Z,{node:v,opts:{tocLevels:g,sectNumLevels:m}})]},v.getId())})})},Se=({document:e})=>{const a=e.getBlocks(),[n,o]=R.useState();R.useMemo(()=>{(a||a[0])&&o(e.getFootnotes())},[a]);const d=()=>{var m;return e.getNoheader()?null:r("div",{id:"header",children:e.hasHeader()&&c(M,{children:[r("h1",{dangerouslySetInnerHTML:{__html:((m=e.getDocumentTitle())==null?void 0:m.toString())||""}}),r(y,{}),e.hasSections()&&e.hasAttribute("toc")&&e.getAttribute("toc-placement")==="auto"&&c("div",{id:"toc",className:e.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:e.getAttribute("toc-title")}),r(Z,{node:e})]})]})})},l=()=>n&&n.length>0&&a&&!a[0].getDocument().hasAttribute("nofootnotes")?c("div",{id:"footnotes",children:[r("hr",{}),n.map(m=>c("div",{className:"footnote",id:`_footnotedef_${m.getIndex()}`,children:[r("a",{href:`#_footnoteref_${m.getIndex()}`,children:m.getIndex()}),"."," ",O.default(m.getText()||"")]},m.getIndex()))]}):null,y=()=>e.getAuthors().length>0||e.hasAttribute("revnumber")||e.hasAttribute("revdate")||e.hasAttribute("revremark")?c("div",{className:"details",children:[e.getAuthors().map((g,v)=>c(R.Fragment,{children:[g.getName()&&c(M,{children:[r("span",{id:`author${v+1>1?v+1:""}`,className:"author",children:O.default(e.applySubstitutions(g.getName()||"").toString())}),r("br",{})]}),g.getEmail()&&c(M,{children:[r("span",{id:`email${v+1>1?v+1:""}`,className:"email",children:O.default(e.applySubstitutions(g.getEmail()||"").toString())}),r("br",{})]})]},v)),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")&&c(M,{children:[r("br",{}),r("span",{id:"revremark",children:e.getAttribute("revremark")})]})]}):null;return c(M,{children:[r(d,{}),r("div",{id:"content",children:r(L,{blocks:a})}),r(l,{})]})},we=({node:e})=>c("div",{className:S("exampleblock",E(e)),...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}),Ce=({node:e})=>{const a=e.getLevel();return c(M,{children:[r("a",{className:"sectionanchor",id:`${e.getId()||""}`,...N(e)}),R.createElement(`h${a+1}`,null,r(x,{node:e}))]})},Oe=({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})),c("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(Q,{node:e})]})},Ie=({node:e})=>{const a=e.getDocument(),n=e.getAttributes(),o=e.isOption("nowrap")||!a.hasAttribute("prewrap"),d=Y(e);if(e.getStyle()==="source"){const l=n.language;return c("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:S("highlight",o?" nowrap":""),children:l?r("code",{className:l?`language-${l}`:"","data-lang":l,dangerouslySetInnerHTML:{__html:d}}):r("code",{dangerouslySetInnerHTML:{__html:d}})})})]})}else return c("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:o?" nowrap":"",children:r("code",{dangerouslySetInnerHTML:{__html:e.getSource()}})})})]})},Pe=({node:e})=>{const n=e.getDocument().getAttributes().prewrap===void 0||e.isOption("nowrap");return c("div",{className:"literalblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("pre",{className:n?"nowrap":"",children:e.getSource()})})]})},je=({node:e})=>c("div",{className:S("olist",E(e),e.getStyle()),...N(e),children:[r(x,{node:e}),r("ol",{className:e.getStyle(),reversed:e.isOption("reversed"),start:e.getAttribute("start"),children:e.getItems().map((a,n)=>c("li",{className:E(e)?E(e):"",children:[r("p",{children:O.default(a.getText())}),r(L,{blocks:a.getBlocks()})]},n))})]}),Le=({node:e})=>{const a=e.getStyle();return a==="abstract"?c("div",{className:S("quoteblock abstract",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}):c("div",{className:S("openblock",a&&a!=="open"?a:"",E(e)),...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r(L,{blocks:e.getBlocks()})})]})},De=()=>r("div",{style:{pageBreakAfter:"always"}}),xe=({node:e})=>{const a=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("paragraph",E(e)),...N(e),children:[r(x,{node:e}),r("p",{dangerouslySetInnerHTML:{__html:a}})]})},Fe=({node:e})=>{const a=Y(e);return r(M,{children:O.default(a)})},Me=({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:c("div",{className:"sectionbody",children:[r(L,{blocks:e.getBlocks()}),n&&c("div",{id:"toc",className:a.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:O.default(a.getAttribute("toc-title"))}),r(Z,{node:a})]})]})})},$e=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),o=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("quoteblock",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{dangerouslySetInnerHTML:{__html:o}}),a&&c("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Be=({node:e})=>{const a=e.getDocument().getAttributes(),n=e.getLevel();let o="",d=e.getSectionNumeral();d=d==="."?"":d;const l=a.sectnumlevels?parseInt(a.sectnumlevels):3;if(e.getCaption())o=e.getCaptionedTitle();else if(e.isNumbered()&&n<=l)if(n<2&&e.getDocument().getDoctype()=="book"){const y=e.getSectionName();y==="chapter"?o=`${a["chapter-signifier"]||""} ${d} ${e.getTitle()}`:y==="part"?o=`${a["part-signifier"]||""} ${d} ${e.getTitle()}`:o=`${d} ${e.getTitle()}`}else o=`${d} ${e.getTitle()}`;else o=e.getTitle()||"";return a.sectlinks&&(o=c(M,{children:[r("a",{className:"anchor",id:e.getId()||"",...N(e)}),r("a",{className:"link",href:`#${e.getId()}`,dangerouslySetInnerHTML:{__html:o}})]})),n===0?c(M,{children:[r("h1",{className:S("sect0",E(e)),"data-sectnum":d,...N(e),children:o}),r(L,{blocks:e.getBlocks()})]}):c("div",{className:S(`sect${n}`,E(e)),...N(e),children:[R.createElement(`h${n+1}`,{"data-sectnum":d},o),r("div",{className:"sectionbody",children:r(L,{blocks:e.getBlocks()})})]})},We=({node:e})=>r("div",{className:S("sidebarblock",E(e)),...N(e),children:c("div",{className:"content",children:[r(x,{node:e}),r(L,{blocks:e.getBlocks()})]})}),Ye=({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 o=e.hasAutowidthOption(),d=e.getAttribute("tablepcwidth"),l=null;o&&!e.hasAttribute("width")?a.push("fit-content"):d==100?a.push("stretch"):l=`${d}%`,e.hasAttribute("float")&&a.push(e.getAttribute("float")),e.getRole()&&a.push(e.getRole()||"");const y=e.getRowCount(),m=e.getColumns(),g=e.getHeadRows(),v=e.getBodyRows(),b=e.getFootRows(),I=T=>S("tableblock",`halign-${T.getAttribute("halign")}`,`valign-${T.getAttribute("valign")}`);return c("table",{className:S("tableblock",...a),style:{width:l||void 0},...N(e),children:[e.hasTitle()&&r("caption",{className:"title",children:e.getCaptionedTitle()}),y>0&&r("colgroup",{children:m.map((T,j)=>{const P=T.getAttribute("colpcwidth");return r("col",{style:{width:`${P}%`}},j)})}),g.map((T,j)=>r("thead",{children:r("tr",{children:T.map((P,$)=>r("th",{className:I(P),dangerouslySetInnerHTML:{__html:P.getText()}},$))})},j)),r("tbody",{children:v.map((T,j)=>r("tr",{children:T.map((P,$)=>{const ue=P.getColumnSpan(),U=P.getRowSpan(),w=Y(P),V={colSpan:ue,rowSpan:U,className:I(P)},q=P.getStyle();if(q==="asciidoc")return R.createElement("td",{...V,key:$},r("div",{className:"content",dangerouslySetInnerHTML:{__html:w}}));if(q==="literal")return R.createElement("td",{...V,key:$},r("div",{className:"literal",children:r("pre",{dangerouslySetInnerHTML:{__html:w}})}));if(q==="header")return R.createElement("th",{...V,key:$},r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:w}}));{let ae=w;return R.createElement("td",{...V,key:$},ae.length===0?"":O.default(`<p class="tableblock">${ae.join(`</p>
32
- <p class="tableblock">`)}</p>`))}})},j))}),b.map((T,j)=>r("tfoot",{children:r("tr",{children:T.map((P,$)=>r("td",{className:I(P),children:r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:P.getText()}})},$))})},j))]})},Ue=({node:e})=>{let a=e.getId()||"toc";const n=e.getDocument(),o=e.hasTitle()?e.getTitle():n.getAttribute("toc-title"),d=R.useMemo(()=>n.getAttribute("toc-placement"),[e]),l=R.useMemo(()=>n.hasAttribute("toc"),[e]),y=e.hasAttribute("levels")?parseInt(e.getAttribute("levels")):void 0;return d==="macro"&&n.hasSections()&&l?c("div",{id:a,className:S("toc",E(e)),children:[r("div",{id:`${a}title`,className:"title",children:O.default(o||"")}),r(Z,{node:e.getDocument(),opts:{tocLevels:y}})]}):null},He=()=>r("hr",{}),Ve=({node:e})=>{const a=e.isOption("checklist");return c("div",{id:e.getId?e.getId():"",className:S("ulist",e.getStyle(),E(e),a&&"checklist"),...N(e),children:[r(x,{node:e}),r("ul",{className:a?"checklist":"",children:e.getItems().map((n,o)=>a?r("li",{id:n.getId(),className:E(e),children:c("p",{children:[a&&n.hasAttribute("checkbox")&&r("i",{className:S("fa",n.hasAttribute("checked")?"fa-check-square-o":"fa-square-o")})," ",O.default(n.getText())]})},o):c("li",{id:n.getId(),className:E(e),children:[r("p",{dangerouslySetInnerHTML:{__html:n.getText()}}),r(L,{blocks:n.getBlocks()})]},o))})]})},Ge=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),o=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("verseblock",E(e)),...N(e),children:[r(x,{node:e}),r("pre",{className:"content",dangerouslySetInnerHTML:{__html:o}}),a&&c("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Je=R.createContext({}),At=({content:e,options:a})=>{const n=a&&a.customDocument;return r(Je.Provider,{value:a||{},children:n?r(n,{document:e}):r(Se,{document:e})})},L=({blocks:e})=>r(M,{children:e.map((a,n)=>r(Nt,{node:a},`${n}-${a.getNodeName()}`))}),Nt=({node:e})=>{const a=R.useContext(Je),n=e.getNodeName(),o=e.getDocument(),d=e.getAttributes();o.playbackAttributes(d);const l=a&&a.overrides&&a.overrides[n];if(l)return r(l,{node:e});switch(n){case"audio":return r(Ne,{node:e});case"preamble":return r(Me,{node:e});case"section":return r(Be,{node:e});case"paragraph":return r(xe,{node:e});case"dlist":return r(Ee,{node:e});case"ulist":return r(Ve,{node:e});case"floating_title":return r(Ce,{node:e});case"admonition":return r(Ae,{node:e});case"listing":return r(Ie,{node:e});case"literal":return r(Pe,{node:e});case"image":return r(Oe,{node:e});case"colist":return r(Re,{node:e});case"olist":return r(je,{node:e});case"table":return r(Ye,{node:e});case"thematic_break":return r(He,{});case"open":return r(Le,{node:e});case"pass":return r(Fe,{node:e});case"page_break":return r(De,{});case"example":return r(we,{node:e});case"sidebar":return r(We,{node:e});case"quote":return r($e,{node:e});case"verse":return r(Ge,{node:e});case"toc":return r(Ue,{node:e});default:return r(M,{children:O.default(e.convert())})}};Object.defineProperty(f,"asciidoctor",{enumerable:!0,get:()=>yt.default}),f.Admonition=Ae,f.Audio=Ne,f.CaptionedTitle=Q,f.CoList=Re,f.Content=L,f.DList=Ee,f.Document=Se,f.Example=we,f.FloatingTitle=Ce,f.Image=Oe,f.Listing=Ie,f.Literal=Pe,f.OList=je,f.Open=Le,f.Outline=Z,f.PageBreak=De,f.Paragraph=xe,f.Pass=Fe,f.Preamble=Me,f.Quote=$e,f.Section=Be,f.Sidebar=We,f.Table=Ye,f.TableOfContents=Ue,f.ThematicBreak=He,f.Title=x,f.UList=Ve,f.Verse=Ge,f.default=At,f.getLineNumber=N,f.getRole=E,f.useGetContent=Y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
31
+ */(function(e){(function(){var a={}.hasOwnProperty;function n(){for(var o=[],d=0;d<arguments.length;d++){var l=arguments[d];if(!!l){var y=typeof l;if(y==="string"||y==="number")o.push(l);else if(Array.isArray(l)){if(l.length){var m=n.apply(null,l);m&&o.push(m)}}else if(y==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){o.push(l.toString());continue}for(var g in l)a.call(l,g)&&l[g]&&o.push(g)}}}return o.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ke);const S=ke.exports,Ee=({node:e})=>{const a=e.getStyle(),n=l=>{const y=l,m=y[0];let g=y[1];return g.getNodeName||(g=null),{terms:m,dd:g}},o=l=>{if(l)return c("dd",{children:[l.hasText()&&r("p",{children:O.default.default(l.getText())}),l.hasBlocks()&&r(L,{blocks:l.getBlocks()})]})},d=e.hasTitle()&&r("div",{className:"title",children:e.getCaptionedTitle()});if(a==="qanda")return c("div",{className:S("qlist qanda",E(e)),...N(e),children:[d,r("ol",{children:e.getItems().map((l,y)=>{const{terms:m,dd:g}=n(l);return c("li",{children:[m.map((v,b)=>r("p",{children:r("em",{children:v.getText()})},b)),o(g)]},y)})})]});if(a==="horizontal"){const l=e.getAttribute("labelwidth"),y=e.getAttribute("itemwidth");return c("div",{className:S("hdlist",E(e)),children:[d,c("table",{children:[(l||y)&&c("colgroup",{children:[r("col",{style:{width:l?`${l.replace("%","")}%`:""}}),r("col",{style:{width:y?`${y.replace("%","")}%`:""}})]}),r("tbody",{children:e.getItems().map((m,g)=>{const{terms:v,dd:b}=n(m);return c("tr",{children:[r("td",{className:S("hdlist1",e.isOption("strong")?"strong":""),children:v.map((I,T)=>c(R.Fragment,{children:[T!==0&&r("br",{}),O.default.default(I.getText())]},T))}),b&&c("td",{className:"hdlist2",children:[b.hasText()&&r("p",{children:O.default.default(b.getText())}),b.hasBlocks()&&r(L,{blocks:b.getBlocks()})]})]},g)})})]})]})}else return c("div",{className:S("dlist",e.getStyle(),E(e)),children:[d,r("dl",{children:e.getItems().map((l,y)=>{const{terms:m,dd:g}=n(l);return c(R.Fragment,{children:[m.map((v,b)=>r("dt",{className:"hdlist1",children:O.default.default(v.getText())},b)),o(g)]},y)})})]})},Z=({node:e,opts:a})=>{if(!e.hasSections())return null;const n=e.getSections(),o=e.getDocument(),d=R.useMemo(()=>o.getAttributes(),[e]),l=R.useMemo(()=>o.getAttribute("sectnumlevels"),[e]),y=R.useMemo(()=>o.getAttribute("toclevels"),[e]),m=(a==null?void 0:a.sectNumLevels)||(l?parseInt(l):3),g=(a==null?void 0:a.tocLevels)||(y?parseInt(y):2);return r("ul",{className:`sectlevel${n[0].getLevel()}`,children:n.map(v=>{let b=v.$sectnum();b=b==="."||b===".."?"":b;const I=v.getLevel();let T="";if(v.getCaption())T=v.getCaptionedTitle();else if(I<=m)if(I<2&&o.getDoctype()=="book"){const j=v.getSectionName();j==="chapter"?T=`${d["chapter-signifier"]||""} ${b} ${v.getTitle()}`:j==="part"?T=`${d["part-signifier"]||""} ${b} ${v.getTitle()}`:T=`${b} ${v.getTitle()}`}else T=`${b} ${v.getTitle()}`;else T=v.getTitle()||"";return c("li",{children:[r("a",{href:`#${v.getId()}`,children:O.default.default(T)}),I<g&&r(Z,{node:v,opts:{tocLevels:g,sectNumLevels:m}})]},v.getId())})})},Se=({document:e})=>{const a=e.getBlocks(),[n,o]=R.useState();R.useMemo(()=>{(a||a[0])&&o(e.getFootnotes())},[a]);const d=()=>{var m;return e.getNoheader()?null:r("div",{id:"header",children:e.hasHeader()&&c(M,{children:[r("h1",{dangerouslySetInnerHTML:{__html:((m=e.getDocumentTitle())==null?void 0:m.toString())||""}}),r(y,{}),e.hasSections()&&e.hasAttribute("toc")&&e.getAttribute("toc-placement")==="auto"&&c("div",{id:"toc",className:e.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:e.getAttribute("toc-title")}),r(Z,{node:e})]})]})})},l=()=>n&&n.length>0&&a&&!a[0].getDocument().hasAttribute("nofootnotes")?c("div",{id:"footnotes",children:[r("hr",{}),n.map(m=>c("div",{className:"footnote",id:`_footnotedef_${m.getIndex()}`,children:[r("a",{href:`#_footnoteref_${m.getIndex()}`,children:m.getIndex()}),"."," ",O.default.default(m.getText()||"")]},m.getIndex()))]}):null,y=()=>e.getAuthors().length>0||e.hasAttribute("revnumber")||e.hasAttribute("revdate")||e.hasAttribute("revremark")?c("div",{className:"details",children:[e.getAuthors().map((g,v)=>c(R.Fragment,{children:[g.getName()&&c(M,{children:[r("span",{id:`author${v+1>1?v+1:""}`,className:"author",children:O.default.default(e.applySubstitutions(g.getName()||"").toString())}),r("br",{})]}),g.getEmail()&&c(M,{children:[r("span",{id:`email${v+1>1?v+1:""}`,className:"email",children:O.default.default(e.applySubstitutions(g.getEmail()||"").toString())}),r("br",{})]})]},v)),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")&&c(M,{children:[r("br",{}),r("span",{id:"revremark",children:e.getAttribute("revremark")})]})]}):null;return c(M,{children:[r(d,{}),r("div",{id:"content",children:r(L,{blocks:a})}),r(l,{})]})},we=({node:e})=>c("div",{className:S("exampleblock",E(e)),...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}),Ce=({node:e})=>{const a=e.getLevel();return c(M,{children:[r("a",{className:"sectionanchor",id:`${e.getId()||""}`,...N(e)}),R.createElement(`h${a+1}`,null,r(x,{node:e}))]})},Oe=({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})),c("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(Q,{node:e})]})},Ie=({node:e})=>{const a=e.getDocument(),n=e.getAttributes(),o=e.isOption("nowrap")||!a.hasAttribute("prewrap"),d=Y(e);if(e.getStyle()==="source"){const l=n.language;return c("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:S("highlight",o?" nowrap":""),children:l?r("code",{className:l?`language-${l}`:"","data-lang":l,dangerouslySetInnerHTML:{__html:d}}):r("code",{dangerouslySetInnerHTML:{__html:d}})})})]})}else return c("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:o?" nowrap":"",children:r("code",{dangerouslySetInnerHTML:{__html:e.getSource()}})})})]})},Pe=({node:e})=>{const n=e.getDocument().getAttributes().prewrap===void 0||e.isOption("nowrap");return c("div",{className:"literalblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("pre",{className:n?"nowrap":"",children:e.getSource()})})]})},je=({node:e})=>c("div",{className:S("olist",E(e),e.getStyle()),...N(e),children:[r(x,{node:e}),r("ol",{className:e.getStyle(),reversed:e.isOption("reversed"),start:e.getAttribute("start"),children:e.getItems().map((a,n)=>c("li",{className:E(e)?E(e):"",children:[r("p",{children:O.default.default(a.getText())}),r(L,{blocks:a.getBlocks()})]},n))})]}),Le=({node:e})=>{const a=e.getStyle();return a==="abstract"?c("div",{className:S("quoteblock abstract",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}):c("div",{className:S("openblock",a&&a!=="open"?a:"",E(e)),...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r(L,{blocks:e.getBlocks()})})]})},De=()=>r("div",{style:{pageBreakAfter:"always"}}),xe=({node:e})=>{const a=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("paragraph",E(e)),...N(e),children:[r(x,{node:e}),r("p",{dangerouslySetInnerHTML:{__html:a}})]})},Fe=({node:e})=>{const a=Y(e);return r(M,{children:O.default.default(a)})},Me=({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:c("div",{className:"sectionbody",children:[r(L,{blocks:e.getBlocks()}),n&&c("div",{id:"toc",className:a.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:O.default.default(a.getAttribute("toc-title"))}),r(Z,{node:a})]})]})})},$e=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),o=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("quoteblock",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{dangerouslySetInnerHTML:{__html:o}}),a&&c("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Be=({node:e})=>{const a=e.getDocument().getAttributes(),n=e.getLevel();let o="",d=e.getSectionNumeral();d=d==="."?"":d;const l=a.sectnumlevels?parseInt(a.sectnumlevels):3;if(e.getCaption())o=e.getCaptionedTitle();else if(e.isNumbered()&&n<=l)if(n<2&&e.getDocument().getDoctype()=="book"){const y=e.getSectionName();y==="chapter"?o=`${a["chapter-signifier"]||""} ${d} ${e.getTitle()}`:y==="part"?o=`${a["part-signifier"]||""} ${d} ${e.getTitle()}`:o=`${d} ${e.getTitle()}`}else o=`${d} ${e.getTitle()}`;else o=e.getTitle()||"";return a.sectlinks&&(o=c(M,{children:[r("a",{className:"anchor",id:e.getId()||"",...N(e)}),r("a",{className:"link",href:`#${e.getId()}`,dangerouslySetInnerHTML:{__html:o}})]})),n===0?c(M,{children:[r("h1",{className:S("sect0",E(e)),"data-sectnum":d,...N(e),children:o}),r(L,{blocks:e.getBlocks()})]}):c("div",{className:S(`sect${n}`,E(e)),...N(e),children:[R.createElement(`h${n+1}`,{"data-sectnum":d},o),r("div",{className:"sectionbody",children:r(L,{blocks:e.getBlocks()})})]})},We=({node:e})=>r("div",{className:S("sidebarblock",E(e)),...N(e),children:c("div",{className:"content",children:[r(x,{node:e}),r(L,{blocks:e.getBlocks()})]})}),Ye=({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 o=e.hasAutowidthOption(),d=e.getAttribute("tablepcwidth"),l=null;o&&!e.hasAttribute("width")?a.push("fit-content"):d==100?a.push("stretch"):l=`${d}%`,e.hasAttribute("float")&&a.push(e.getAttribute("float")),e.getRole()&&a.push(e.getRole()||"");const y=e.getRowCount(),m=e.getColumns(),g=e.getHeadRows(),v=e.getBodyRows(),b=e.getFootRows(),I=T=>S("tableblock",`halign-${T.getAttribute("halign")}`,`valign-${T.getAttribute("valign")}`);return c("table",{className:S("tableblock",...a),style:{width:l||void 0},...N(e),children:[e.hasTitle()&&r("caption",{className:"title",children:e.getCaptionedTitle()}),y>0&&r("colgroup",{children:m.map((T,j)=>{const P=T.getAttribute("colpcwidth");return r("col",{style:{width:`${P}%`}},j)})}),g.map((T,j)=>r("thead",{children:r("tr",{children:T.map((P,$)=>r("th",{className:I(P),dangerouslySetInnerHTML:{__html:P.getText()}},$))})},j)),r("tbody",{children:v.map((T,j)=>r("tr",{children:T.map((P,$)=>{const ue=P.getColumnSpan(),U=P.getRowSpan(),w=Y(P),V={colSpan:ue,rowSpan:U,className:I(P)},q=P.getStyle();if(q==="asciidoc")return R.createElement("td",{...V,key:$},r("div",{className:"content",dangerouslySetInnerHTML:{__html:w}}));if(q==="literal")return R.createElement("td",{...V,key:$},r("div",{className:"literal",children:r("pre",{dangerouslySetInnerHTML:{__html:w}})}));if(q==="header")return R.createElement("th",{...V,key:$},r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:w}}));{let ae=w;return R.createElement("td",{...V,key:$},ae.length===0?"":O.default.default(`<p class="tableblock">${ae.join(`</p>
32
+ <p class="tableblock">`)}</p>`))}})},j))}),b.map((T,j)=>r("tfoot",{children:r("tr",{children:T.map((P,$)=>r("td",{className:I(P),children:r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:P.getText()}})},$))})},j))]})},Ue=({node:e})=>{let a=e.getId()||"toc";const n=e.getDocument(),o=e.hasTitle()?e.getTitle():n.getAttribute("toc-title"),d=R.useMemo(()=>n.getAttribute("toc-placement"),[e]),l=R.useMemo(()=>n.hasAttribute("toc"),[e]),y=e.hasAttribute("levels")?parseInt(e.getAttribute("levels")):void 0;return d==="macro"&&n.hasSections()&&l?c("div",{id:a,className:S("toc",E(e)),children:[r("div",{id:`${a}title`,className:"title",children:O.default.default(o||"")}),r(Z,{node:e.getDocument(),opts:{tocLevels:y}})]}):null},He=()=>r("hr",{}),Ve=({node:e})=>{const a=e.isOption("checklist");return c("div",{id:e.getId?e.getId():"",className:S("ulist",e.getStyle(),E(e),a&&"checklist"),...N(e),children:[r(x,{node:e}),r("ul",{className:a?"checklist":"",children:e.getItems().map((n,o)=>a?r("li",{id:n.getId(),className:E(e),children:c("p",{children:[a&&n.hasAttribute("checkbox")&&r("i",{className:S("fa",n.hasAttribute("checked")?"fa-check-square-o":"fa-square-o")})," ",O.default.default(n.getText())]})},o):c("li",{id:n.getId(),className:E(e),children:[r("p",{dangerouslySetInnerHTML:{__html:n.getText()}}),r(L,{blocks:n.getBlocks()})]},o))})]})},Ge=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),o=Y(e);return c("div",{id:e.getId?e.getId():"",className:S("verseblock",E(e)),...N(e),children:[r(x,{node:e}),r("pre",{className:"content",dangerouslySetInnerHTML:{__html:o}}),a&&c("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},Je=R.createContext({}),At=({content:e,options:a})=>{const n=a&&a.customDocument;return r(Je.Provider,{value:a||{},children:n?r(n,{document:e}):r(Se,{document:e})})},L=({blocks:e})=>r(M,{children:e.map((a,n)=>r(Nt,{node:a},`${n}-${a.getNodeName()}`))}),Nt=({node:e})=>{const a=R.useContext(Je),n=e.getNodeName(),o=e.getDocument(),d=e.getAttributes();o.playbackAttributes(d);const l=a&&a.overrides&&a.overrides[n];if(l)return r(l,{node:e});switch(n){case"audio":return r(Ne,{node:e});case"preamble":return r(Me,{node:e});case"section":return r(Be,{node:e});case"paragraph":return r(xe,{node:e});case"dlist":return r(Ee,{node:e});case"ulist":return r(Ve,{node:e});case"floating_title":return r(Ce,{node:e});case"admonition":return r(Ae,{node:e});case"listing":return r(Ie,{node:e});case"literal":return r(Pe,{node:e});case"image":return r(Oe,{node:e});case"colist":return r(Re,{node:e});case"olist":return r(je,{node:e});case"table":return r(Ye,{node:e});case"thematic_break":return r(He,{});case"open":return r(Le,{node:e});case"pass":return r(Fe,{node:e});case"page_break":return r(De,{});case"example":return r(we,{node:e});case"sidebar":return r(We,{node:e});case"quote":return r($e,{node:e});case"verse":return r(Ge,{node:e});case"toc":return r(Ue,{node:e});default:return r(M,{children:O.default.default(e.convert())})}};Object.defineProperty(f,"asciidoctor",{enumerable:!0,get:()=>yt.default}),f.Admonition=Ae,f.Audio=Ne,f.CaptionedTitle=Q,f.CoList=Re,f.Content=L,f.DList=Ee,f.Document=Se,f.Example=we,f.FloatingTitle=Ce,f.Image=Oe,f.Listing=Ie,f.Literal=Pe,f.OList=je,f.Open=Le,f.Outline=Z,f.PageBreak=De,f.Paragraph=xe,f.Pass=Fe,f.Preamble=Me,f.Quote=$e,f.Section=Be,f.Sidebar=We,f.Table=Ye,f.TableOfContents=Ue,f.ThematicBreak=He,f.Title=x,f.UList=Ve,f.Verse=Ge,f.default=At,f.getLineNumber=N,f.getRole=E,f.useGetContent=Y,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,26 @@
1
+ import Admonition from './Admonition.tsx';
2
+ import Audio from './Audio.tsx';
3
+ import CoList from './CoList.tsx';
4
+ import DList from './DList.tsx';
5
+ import Document from './Document.tsx';
6
+ import Example from './Example.tsx';
7
+ import FloatingTitle from './FloatingTitle.tsx';
8
+ import Image from './Image.tsx';
9
+ import Listing from './Listing.tsx';
10
+ import Literal from './Literal.tsx';
11
+ import OList from './OList.tsx';
12
+ import Open from './Open.tsx';
13
+ import Outline from './Outline.tsx';
14
+ import PageBreak from './PageBreak.tsx';
15
+ import Paragraph from './Paragraph.tsx';
16
+ import Pass from './Pass.tsx';
17
+ import Preamble from './Preamble.tsx';
18
+ import Quote from './Quote.tsx';
19
+ import Section from './Section.tsx';
20
+ import Sidebar from './Sidebar.tsx';
21
+ import Table from './Table.tsx';
22
+ import TableOfContents from './TableOfContents.tsx';
23
+ import ThematicBreak from './ThematicBreak.tsx';
24
+ import UList from './UList.tsx';
25
+ import Verse from './Verse.tsx';
26
+ export { Audio, Admonition, CoList, Document, DList, Example, Outline, FloatingTitle, Listing, Literal, Image, OList, Open, PageBreak, Pass, Paragraph, Preamble, Section, Sidebar, Table, ThematicBreak, UList, Quote, Verse, TableOfContents, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxide/react-asciidoc",
3
- "version": "0.1.2-alpha.3",
3
+ "version": "0.1.2-alpha.5",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -10,16 +10,11 @@
10
10
  "url": "https://github.com/oxidecomputer/react-asciidoc.git"
11
11
  },
12
12
  "main": "./dist/react-asciidoc.umd.cjs",
13
- "module": "./dist/react-asciidoc.js",
14
13
  "exports": {
15
14
  ".": {
16
15
  "import": "./dist/react-asciidoc.js",
17
16
  "require": "./dist/react-asciidoc.umd.cjs",
18
- "types": "./dist/types/index.d.ts"
19
- },
20
- "./types": {
21
- "import": "./dist/types/index.d.ts",
22
- "require": "./dist/types/index.d.ts"
17
+ "types": "./dist/index.d.ts"
23
18
  }
24
19
  },
25
20
  "type": "module",
@@ -37,10 +32,10 @@
37
32
  "author": "Oxide Computer Company <bots@oxidecomputer.com>",
38
33
  "license": "MPL 2.0",
39
34
  "dependencies": {
40
- "@asciidoctor/core": "^3.0.0-rc.2",
35
+ "@asciidoctor/core": "^3.0.2",
41
36
  "classnames": "^2.3.2",
42
37
  "highlight.js": "^11.6.0",
43
- "html-react-parser": "^3.0.4",
38
+ "html-react-parser": "^4.2.2",
44
39
  "vite-tsconfig-paths": "^3.5.1",
45
40
  "vitest": "^0.24.3"
46
41
  },
@@ -55,7 +50,7 @@
55
50
  "npm-run-all": "^4.1.5",
56
51
  "prettier": "^2.7.1",
57
52
  "rollup-plugin-dts": "^5.3.0",
58
- "typescript": "^4.6.4",
53
+ "typescript": "^5.1.6",
59
54
  "vite": "^3.1.0",
60
55
  "vite-dts": "^1.0.4",
61
56
  "vite-plugin-dts": "^2.3.0"
@@ -1,26 +0,0 @@
1
- import Admonition from './Admonition';
2
- import Audio from './Audio';
3
- import CoList from './CoList';
4
- import DList from './DList';
5
- import Document from './Document';
6
- import Example from './Example';
7
- import FloatingTitle from './FloatingTitle';
8
- import Image from './Image';
9
- import Listing from './Listing';
10
- import Literal from './Literal';
11
- import OList from './OList';
12
- import Open from './Open';
13
- import Outline from './Outline';
14
- import PageBreak from './PageBreak';
15
- import Paragraph from './Paragraph';
16
- import Pass from './Pass';
17
- import Preamble from './Preamble';
18
- import Quote from './Quote';
19
- import Section from './Section';
20
- import Sidebar from './Sidebar';
21
- import Table from './Table';
22
- import TableOfContents from './TableOfContents';
23
- import ThematicBreak from './ThematicBreak';
24
- import UList from './UList';
25
- import Verse from './Verse';
26
- export { Audio, Admonition, CoList, Document, DList, Example, Outline, FloatingTitle, Listing, Literal, Image, OList, Open, PageBreak, Pass, Paragraph, Preamble, Section, Sidebar, Table, ThematicBreak, UList, Quote, Verse, TableOfContents, };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes