@oxide/react-asciidoc 0.1.2 → 0.1.3-alpha.1
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 +341 -335
- package/dist/react-asciidoc.umd.cjs +11 -11
- package/dist/types/hooks/useGetContent.d.ts +4 -0
- package/dist/{index.d.ts → types/index.d.ts} +4 -4
- package/dist/types/templates/index.d.ts +26 -0
- package/package.json +3 -3
- package/dist/hooks/useGetContent.d.ts +0 -3
- package/dist/templates/index.d.ts +0 -26
- /package/dist/{templates → types/templates}/Admonition.d.ts +0 -0
- /package/dist/{templates → types/templates}/Audio.d.ts +0 -0
- /package/dist/{templates → types/templates}/CoList.d.ts +0 -0
- /package/dist/{templates → types/templates}/DList.d.ts +0 -0
- /package/dist/{templates → types/templates}/Document.d.ts +0 -0
- /package/dist/{templates → types/templates}/Example.d.ts +0 -0
- /package/dist/{templates → types/templates}/FloatingTitle.d.ts +0 -0
- /package/dist/{templates → types/templates}/Image.d.ts +0 -0
- /package/dist/{templates → types/templates}/Listing.d.ts +0 -0
- /package/dist/{templates → types/templates}/Literal.d.ts +0 -0
- /package/dist/{templates → types/templates}/OList.d.ts +0 -0
- /package/dist/{templates → types/templates}/Open.d.ts +0 -0
- /package/dist/{templates → types/templates}/Outline.d.ts +0 -0
- /package/dist/{templates → types/templates}/PageBreak.d.ts +0 -0
- /package/dist/{templates → types/templates}/Paragraph.d.ts +0 -0
- /package/dist/{templates → types/templates}/Pass.d.ts +0 -0
- /package/dist/{templates → types/templates}/Preamble.d.ts +0 -0
- /package/dist/{templates → types/templates}/Quote.d.ts +0 -0
- /package/dist/{templates → types/templates}/Section.d.ts +0 -0
- /package/dist/{templates → types/templates}/Sidebar.d.ts +0 -0
- /package/dist/{templates → types/templates}/Table.d.ts +0 -0
- /package/dist/{templates → types/templates}/TableOfContents.d.ts +0 -0
- /package/dist/{templates → types/templates}/ThematicBreak.d.ts +0 -0
- /package/dist/{templates → types/templates}/UList.d.ts +0 -0
- /package/dist/{templates → types/templates}/Verse.d.ts +0 -0
- /package/dist/{templates → types/templates}/util.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,z){typeof exports=="object"&&typeof module<"u"?z(exports,require("@asciidoctor/core"),require("html-react-parser"),require("react")):typeof define=="function"&&define.amd?define(["exports","@asciidoctor/core","html-react-parser","react"],z):(d=typeof globalThis<"u"?globalThis:d||self,z(d.ReactAsciiDoc={},d.core,d.parse,d.React))})(this,function(d,z,yt,k){"use strict";const oe=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},_t=oe(z),O=oe(yt),_e=oe(k),ue={},Y=e=>{const[a,n]=k.useState("");return k.useEffect(()=>{const l=e.$$id;if(ue[l]){n(ue[l]);return}const f=e.getContent()||"";ue[l]=f,n(f)},[e]),a};var re={exports:{}},K={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Te;function Tt(){if(Te)return K;Te=1;var e=_e.default,a=Symbol.for("react.element"),n=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,f=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function y(m,g,v){var b,I={},T=null,j=null;v!==void 0&&(T=""+v),g.key!==void 0&&(T=""+g.key),g.ref!==void 0&&(j=g.ref);for(b in g)l.call(g,b)&&!c.hasOwnProperty(b)&&(I[b]=g[b]);if(m&&m.defaultProps)for(b in g=m.defaultProps,g)I[b]===void 0&&(I[b]=g[b]);return{$$typeof:a,type:m,key:T,ref:j,props:I,_owner:f.current}}return K.Fragment=n,K.jsx=y,K.jsxs=y,K}var X={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
17
|
+
*/var Ae;function At(){return Ae||(Ae=1,process.env.NODE_ENV!=="production"&&function(){var e=_e.default,a=Symbol.for("react.element"),n=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),P=Symbol.iterator,M="@@iterator";function fe(t){if(t===null||typeof t!="object")return null;var i=P&&t[P]||t[M];return typeof i=="function"?i:null}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(t){{for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];V("error",t,s)}}function V(t,i,s){{var u=U.ReactDebugCurrentFrame,_=u.getStackAddendum();_!==""&&(i+="%s",s=s.concat([_]));var A=s.map(function(p){return String(p)});A.unshift("Warning: "+i),Function.prototype.apply.call(console[t],console,A)}}var Z=!1,ae=!1,Rt=!1,Et=!1,St=!1,Ke;Ke=Symbol.for("react.module.reference");function wt(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===c||St||t===f||t===v||t===b||Et||t===j||Z||ae||Rt||typeof t=="object"&&t!==null&&(t.$$typeof===T||t.$$typeof===I||t.$$typeof===y||t.$$typeof===m||t.$$typeof===g||t.$$typeof===Ke||t.getModuleId!==void 0))}function Ct(t,i,s){var u=t.displayName;if(u)return u;var _=i.displayName||i.name||"";return _!==""?s+"("+_+")":s}function Xe(t){return t.displayName||"Context"}function B(t){if(t==null)return null;if(typeof t.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l:return"Fragment";case n:return"Portal";case c:return"Profiler";case f:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case m:var i=t;return Xe(i)+".Consumer";case y:var s=t;return Xe(s._context)+".Provider";case g:return Ct(t,t.render,"ForwardRef");case I:var u=t.displayName||null;return u!==null?u:B(t.type)||"Memo";case T:{var _=t,A=_._payload,p=_._init;try{return B(p(A))}catch{return null}}}return null}var H=Object.assign,ee=0,Qe,qe,Ze,et,tt,rt,at;function it(){}it.__reactDisabledLog=!0;function Ot(){{if(ee===0){Qe=console.log,qe=console.info,Ze=console.warn,et=console.error,tt=console.group,rt=console.groupCollapsed,at=console.groupEnd;var t={configurable:!0,enumerable:!0,value:it,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}ee++}}function It(){{if(ee--,ee===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},t,{value:Qe}),info:H({},t,{value:qe}),warn:H({},t,{value:Ze}),error:H({},t,{value:et}),group:H({},t,{value:tt}),groupCollapsed:H({},t,{value:rt}),groupEnd:H({},t,{value:at})})}ee<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=U.ReactCurrentDispatcher,ge;function ie(t,i,s){{if(ge===void 0)try{throw Error()}catch(_){var u=_.stack.trim().match(/\n( *(at )?)/);ge=u&&u[1]||""}return`
|
|
18
|
+
`+ge+t}}var he=!1,ne;{var Pt=typeof WeakMap=="function"?WeakMap:Map;ne=new Pt}function nt(t,i){if(!t||he)return"";{var s=ne.get(t);if(s!==void 0)return s}var u;he=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=de.current,de.current=null,Ot();try{if(i){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(W){u=W}Reflect.construct(t,[],p)}else{try{p.call()}catch(W){u=W}t.call(p.prototype)}}else{try{throw Error()}catch(W){u=W}t()}}catch(W){if(W&&u&&typeof W.stack=="string"){for(var h=W.stack.split(`
|
|
19
19
|
`),D=u.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+h[
|
|
20
|
+
`),R=h.length-1,C=D.length-1;R>=1&&C>=0&&h[R]!==D[C];)C--;for(;R>=1&&C>=0;R--,C--)if(h[R]!==D[C]){if(R!==1||C!==1)do if(R--,C--,C<0||h[R]!==D[C]){var F=`
|
|
21
|
+
`+h[R].replace(" at new "," at ");return t.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",t.displayName)),typeof t=="function"&&ne.set(t,F),F}while(R>=1&&C>=0);break}}}finally{he=!1,de.current=A,It(),Error.prepareStackTrace=_}var J=t?t.displayName||t.name:"",pt=J?ie(J):"";return typeof t=="function"&&ne.set(t,pt),pt}function jt(t,i,s){return nt(t,!1)}function Lt(t){var i=t.prototype;return!!(i&&i.isReactComponent)}function se(t,i,s){if(t==null)return"";if(typeof t=="function")return nt(t,Lt(t));if(typeof t=="string")return ie(t);switch(t){case v:return ie("Suspense");case b:return ie("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case g:return jt(t.render);case I:return se(t.type,i,s);case T:{var u=t,_=u._payload,A=u._init;try{return se(A(_),i,s)}catch{}}}return""}var le=Object.prototype.hasOwnProperty,st={},lt=U.ReactDebugCurrentFrame;function ce(t){if(t){var i=t._owner,s=se(t.type,t._source,i?i.type:null);lt.setExtraStackFrame(s)}else lt.setExtraStackFrame(null)}function Dt(t,i,s,u,_){{var A=Function.call.bind(le);for(var p in t)if(A(t,p)){var h=void 0;try{if(typeof t[p]!="function"){var D=Error((u||"React class")+": "+s+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw D.name="Invariant Violation",D}h=t[p](i,p,u,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){h=R}h&&!(h instanceof Error)&&(ce(_),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",u||"React class",s,p,typeof h),ce(null)),h instanceof Error&&!(h.message in st)&&(st[h.message]=!0,ce(_),w("Failed %s type: %s",s,h.message),ce(null))}}}var xt=Array.isArray;function me(t){return xt(t)}function Ft(t){{var i=typeof Symbol=="function"&&Symbol.toStringTag,s=i&&t[Symbol.toStringTag]||t.constructor.name||"Object";return s}}function $t(t){try{return ct(t),!1}catch{return!0}}function ct(t){return""+t}function ot(t){if($t(t))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ft(t)),ct(t)}var te=U.ReactCurrentOwner,Mt={key:!0,ref:!0,__self:!0,__source:!0},ut,ft,ve;ve={};function Bt(t){if(le.call(t,"ref")){var i=Object.getOwnPropertyDescriptor(t,"ref").get;if(i&&i.isReactWarning)return!1}return t.ref!==void 0}function Wt(t){if(le.call(t,"key")){var i=Object.getOwnPropertyDescriptor(t,"key").get;if(i&&i.isReactWarning)return!1}return t.key!==void 0}function Yt(t,i){if(typeof t.ref=="string"&&te.current&&i&&te.current.stateNode!==i){var s=B(te.current.type);ve[s]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(te.current.type),t.ref),ve[s]=!0)}}function Ut(t,i){{var s=function(){ut||(ut=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};s.isReactWarning=!0,Object.defineProperty(t,"key",{get:s,configurable:!0})}}function Ht(t,i){{var s=function(){ft||(ft=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))};s.isReactWarning=!0,Object.defineProperty(t,"ref",{get:s,configurable:!0})}}var Vt=function(t,i,s,u,_,A,p){var h={$$typeof:a,type:t,key:i,ref:s,props:p,_owner:A};return h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(h,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(h,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h};function Gt(t,i,s,u,_){{var A,p={},h=null,D=null;s!==void 0&&(ot(s),h=""+s),Wt(i)&&(ot(i.key),h=""+i.key),Bt(i)&&(D=i.ref,Yt(i,_));for(A in i)le.call(i,A)&&!Mt.hasOwnProperty(A)&&(p[A]=i[A]);if(t&&t.defaultProps){var R=t.defaultProps;for(A in R)p[A]===void 0&&(p[A]=R[A])}if(h||D){var C=typeof t=="function"?t.displayName||t.name||"Unknown":t;h&&Ut(p,C),D&&Ht(p,C)}return Vt(t,h,D,_,u,te.current,p)}}var be=U.ReactCurrentOwner,dt=U.ReactDebugCurrentFrame;function G(t){if(t){var i=t._owner,s=se(t.type,t._source,i?i.type:null);dt.setExtraStackFrame(s)}else dt.setExtraStackFrame(null)}var pe;pe=!1;function ye(t){return typeof t=="object"&&t!==null&&t.$$typeof===a}function gt(){{if(be.current){var t=B(be.current.type);if(t)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+t+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+t+"`."}return""}}function Jt(t){{if(t!==void 0){var i=t.fileName.replace(/^.*[\\\/]/,""),s=t.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+i+":"+s+"."}return""}}var
|
|
25
|
+
Check your code at `+i+":"+s+"."}return""}}var ht={};function zt(t){{var i=gt();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
|
|
27
|
+
Check the top-level render call using <`+s+">.")}return i}}function mt(t,i){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var s=zt(i);if(ht[s])return;ht[s]=!0;var u="";t&&t._owner&&t._owner!==be.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 vt(t,i){{if(typeof t!="object")return;if(me(t))for(var s=0;s<t.length;s++){var u=t[s];ye(u)&&mt(u,i)}else if(ye(t))t._store&&(t._store.validated=!0);else if(t){var _=fe(t);if(typeof _=="function"&&_!==t.entries)for(var A=_.call(t),p;!(p=A.next()).done;)ye(p.value)&&mt(p.value,i)}}}function Kt(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);Dt(s,t.props,"prop",u,t)}else if(i.PropTypes!==void 0&&!pe){pe=!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 Xt(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 bt(t,i,s,u,_,A){{var p=wt(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=Jt(_);D?h+=D:h+=gt();var R;t===null?R="null":me(t)?R="array":t!==void 0&&t.$$typeof===a?(R="<"+(B(t.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):R=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",R,h)}var C=Gt(t,i,s,_,A);if(C==null)return C;if(p){var F=i.children;if(F!==void 0)if(u)if(me(F)){for(var J=0;J<F.length;J++)vt(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 vt(F,t)}return t===l?Xt(C):Kt(C),C}}function Qt(t,i,s){return bt(t,i,s,!0)}function qt(t,i,s){return bt(t,i,s,!1)}var Zt=qt,er=Qt;X.Fragment=l,X.jsx=Zt,X.jsxs=er}()),X}(function(e){process.env.NODE_ENV==="production"?e.exports=Tt():e.exports=At()})(re);const $=re.exports.Fragment,r=re.exports.jsx,o=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()}:{},Ne=({node:e})=>{const a=e.getAttributes(),n=e.getDocument(),l=Y(e),f=()=>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}),c=e.content_model;return r("div",{className:`admonitionblock ${a.name}`,...N(e),children:r("table",{children:r("tbody",{children:o("tr",{children:[r("td",{className:"icon",children:n.hasAttribute("icons")?f():r("div",{className:"title",children:e.getAttribute("textlabel")})}),o("td",{className:"content",children:[r(x,{node:e}),c==="simple"?O.default(l):r(L,{blocks:e.getBlocks()})]})]})})})})},ke=({node:e})=>{const a=e.getAttribute("start"),n=e.getAttribute("start"),l=(a||n)&&`#t=${a||""}`+n?`,${n}`:"";return o("div",{className:"audioblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("audio",{src:`${e.getMediaUri(e.getAttribute("target"))}${l}`,autoPlay:e.isOption("autoplay"),controls:!e.isOption("nocontrols"),loop:e.isOption("loop"),children:"Your browser does not support the audio tag."})})]})},Re=({node:e})=>o("div",{className:"colist",...N(e),children:[r(x,{node:e}),r("table",{children:r("tbody",{children:e.getItems().map((a,n)=>o("tr",{children:[o("td",{children:[r("i",{className:"conum","data-value":n+1}),r("b",{children:n+1})]}),o("td",{children:[O.default(a.getText()),r(L,{blocks:a.getBlocks()})]})]},n))})})]});var Ee={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.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
|
|
31
|
+
*/(function(e){(function(){var a={}.hasOwnProperty;function n(){for(var l=[],f=0;f<arguments.length;f++){var c=arguments[f];if(!!c){var y=typeof c;if(y==="string"||y==="number")l.push(c);else if(Array.isArray(c)){if(c.length){var m=n.apply(null,c);m&&l.push(m)}}else if(y==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){l.push(c.toString());continue}for(var g in c)a.call(c,g)&&c[g]&&l.push(g)}}}return l.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ee);const S=Ee.exports,Se=({node:e})=>{const a=e.getStyle(),n=c=>{const y=c,m=y[0];let g=y[1];return g.getNodeName||(g=null),{terms:m,dd:g}},l=c=>{if(c)return o("dd",{children:[c.hasText()&&r("p",{children:O.default(c.getText())}),c.hasBlocks()&&r(L,{blocks:c.getBlocks()})]})},f=e.hasTitle()&&r("div",{className:"title",children:e.getCaptionedTitle()});if(a==="qanda")return o("div",{className:S("qlist qanda",E(e)),...N(e),children:[f,r("ol",{children:e.getItems().map((c,y)=>{const{terms:m,dd:g}=n(c);return o("li",{children:[m.map((v,b)=>r("p",{children:r("em",{children:v.getText()})},b)),l(g)]},y)})})]});if(a==="horizontal"){const c=e.getAttribute("labelwidth"),y=e.getAttribute("itemwidth");return o("div",{className:S("hdlist",E(e)),children:[f,o("table",{children:[(c||y)&&o("colgroup",{children:[r("col",{style:{width:c?`${c.replace("%","")}%`:""}}),r("col",{style:{width:y?`${y.replace("%","")}%`:""}})]}),r("tbody",{children:e.getItems().map((m,g)=>{const{terms:v,dd:b}=n(m);return o("tr",{children:[r("td",{className:S("hdlist1",e.isOption("strong")?"strong":""),children:v.map((I,T)=>o(k.Fragment,{children:[T!==0&&r("br",{}),O.default(I.getText())]},T))}),b&&o("td",{className:"hdlist2",children:[b.hasText()&&r("p",{children:O.default(b.getText())}),b.hasBlocks()&&r(L,{blocks:b.getBlocks()})]})]},g)})})]})]})}else return o("div",{className:S("dlist",e.getStyle(),E(e)),children:[f,r("dl",{children:e.getItems().map((c,y)=>{const{terms:m,dd:g}=n(c);return o(k.Fragment,{children:[m.map((v,b)=>r("dt",{className:"hdlist1",children:O.default(v.getText())},b)),l(g)]},y)})})]})},q=({node:e,opts:a})=>{if(!e.hasSections())return null;const n=e.getSections(),l=e.getDocument(),f=k.useMemo(()=>l.getAttributes(),[e]),c=k.useMemo(()=>l.getAttribute("sectnumlevels"),[e]),y=k.useMemo(()=>l.getAttribute("toclevels"),[e]),m=(a==null?void 0:a.sectNumLevels)||(c?parseInt(c):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&&l.getDoctype()=="book"){const j=v.getSectionName();j==="chapter"?T=`${f["chapter-signifier"]||""} ${b} ${v.getTitle()}`:j==="part"?T=`${f["part-signifier"]||""} ${b} ${v.getTitle()}`:T=`${b} ${v.getTitle()}`}else T=`${b} ${v.getTitle()}`;else T=v.getTitle()||"";return o("li",{children:[r("a",{href:`#${v.getId()}`,children:O.default(T)}),I<g&&r(q,{node:v,opts:{tocLevels:g,sectNumLevels:m}})]},v.getId())})})},we=({document:e})=>{const a=e.getBlocks(),[n,l]=k.useState();k.useMemo(()=>{(a||a[0])&&l(e.getFootnotes())},[a]);const f=()=>{var m;return e.getNoheader()?null:r("div",{id:"header",children:e.hasHeader()&&o($,{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"&&o("div",{id:"toc",className:e.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:e.getAttribute("toc-title")}),r(q,{node:e})]})]})})},c=()=>n&&n.length>0&&a&&!a[0].getDocument().hasAttribute("nofootnotes")?o("div",{id:"footnotes",children:[r("hr",{}),n.map(m=>o("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")?o("div",{className:"details",children:[e.getAuthors().map((g,v)=>o(k.Fragment,{children:[g.getName()&&o($,{children:[r("span",{id:`author${v+1>1?v+1:""}`,className:"author",children:O.default(e.applySubstitutions(g.getName()||"").toString())}),r("br",{})]}),g.getEmail()&&o($,{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")&&o($,{children:[r("br",{}),r("span",{id:"revremark",children:e.getAttribute("revremark")})]})]}):null;return o($,{children:[r(f,{}),r("div",{id:"content",children:r(L,{blocks:a})}),r(c,{})]})},Ce=({node:e})=>o("div",{className:S("exampleblock",E(e)),...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}),Oe=({node:e})=>{const a=e.getLevel();return o($,{children:[r("a",{className:"sectionanchor",id:`${e.getId()||""}`,...N(e)}),k.createElement(`h${a+1}`,null,r(x,{node:e}))]})},Ie=({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})),o("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})]})},Pe=({node:e})=>{const a=e.getDocument(),n=e.getAttributes(),l=e.isOption("nowrap")||!a.hasAttribute("prewrap"),f=Y(e);if(e.getStyle()==="source"){const c=n.language;return o("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:S("highlight",l?" nowrap":""),children:c?r("code",{className:c?`language-${c}`:"","data-lang":c,dangerouslySetInnerHTML:{__html:f}}):r("code",{dangerouslySetInnerHTML:{__html:f}})})})]})}else return o("div",{className:"listingblock",...N(e),children:[r(Q,{node:e}),r("div",{className:"content",children:r("pre",{className:l?" nowrap":"",children:r("code",{dangerouslySetInnerHTML:{__html:e.getSource()}})})})]})},je=({node:e})=>{const n=e.getDocument().getAttributes().prewrap===void 0||e.isOption("nowrap");return o("div",{className:"literalblock",...N(e),children:[r(x,{node:e}),r("div",{className:"content",children:r("pre",{className:n?"nowrap":"",children:e.getSource()})})]})},Le=({node:e})=>o("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)=>o("li",{className:E(e)?E(e):"",children:[r("p",{children:O.default(a.getText())}),r(L,{blocks:a.getBlocks()})]},n))})]}),De=({node:e})=>{const a=e.getStyle();return a==="abstract"?o("div",{className:S("quoteblock abstract",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{className:"content",children:r(L,{blocks:e.getBlocks()})})]}):o("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()})})]})},xe=()=>r("div",{style:{pageBreakAfter:"always"}}),Fe=({node:e})=>{const a=Y(e);return o("div",{id:e.getId?e.getId():"",className:S("paragraph",E(e)),...N(e),children:[r(x,{node:e}),r("p",{dangerouslySetInnerHTML:{__html:a}})]})},$e=({node:e})=>{const a=Y(e);return r($,{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:o("div",{className:"sectionbody",children:[r(L,{blocks:e.getBlocks()}),n&&o("div",{id:"toc",className:a.getAttribute("toc-class","toc"),children:[r("div",{id:"toctitle",children:O.default(a.getAttribute("toc-title"))}),r(q,{node:a})]})]})})},Be=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),l=Y(e);return o("div",{id:e.getId?e.getId():"",className:S("quoteblock",E(e)),...N(e),children:[r(x,{node:e}),r("blockquote",{dangerouslySetInnerHTML:{__html:l}}),a&&o("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},We=({node:e})=>{const a=e.getDocument().getAttributes(),n=e.getLevel();let l="",f=e.getSectionNumeral();f=f==="."?"":f;const c=a.sectnumlevels?parseInt(a.sectnumlevels):3;if(e.getCaption())l=e.getCaptionedTitle();else if(e.isNumbered()&&n<=c)if(n<2&&e.getDocument().getDoctype()=="book"){const y=e.getSectionName();y==="chapter"?l=`${a["chapter-signifier"]||""} ${f} ${e.getTitle()}`:y==="part"?l=`${a["part-signifier"]||""} ${f} ${e.getTitle()}`:l=`${f} ${e.getTitle()}`}else l=`${f} ${e.getTitle()}`;else l=e.getTitle()||"";return a.sectlinks&&(l=o($,{children:[r("a",{className:"anchor",id:e.getId()||"",...N(e)}),r("a",{className:"link",href:`#${e.getId()}`,dangerouslySetInnerHTML:{__html:l}})]})),n===0?o($,{children:[r("h1",{className:S("sect0",E(e)),"data-sectnum":f,...N(e),children:l}),r(L,{blocks:e.getBlocks()})]}):o("div",{className:S(`sect${n}`,E(e)),...N(e),children:[k.createElement(`h${n+1}`,{"data-sectnum":f},l),r("div",{className:"sectionbody",children:r(L,{blocks:e.getBlocks()})})]})},Ye=({node:e})=>r("div",{className:S("sidebarblock",E(e)),...N(e),children:o("div",{className:"content",children:[r(x,{node:e}),r(L,{blocks:e.getBlocks()})]})}),Ue=({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 l=e.hasAutowidthOption(),f=e.getAttribute("tablepcwidth"),c=null;l&&!e.hasAttribute("width")?a.push("fit-content"):f==100?a.push("stretch"):c=`${f}%`,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 o("table",{className:S("tableblock",...a),style:{width:c||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,M)=>r("th",{className:I(P),dangerouslySetInnerHTML:{__html:P.getText()}},M))})},j)),r("tbody",{children:v.map((T,j)=>r("tr",{children:T.map((P,M)=>{const fe=P.getColumnSpan(),U=P.getRowSpan(),w=Y(P),V={colSpan:fe,rowSpan:U,className:I(P)},Z=P.getStyle();if(Z==="asciidoc")return k.createElement("td",{...V,key:M},r("div",{className:"content",dangerouslySetInnerHTML:{__html:w}}));if(Z==="literal")return k.createElement("td",{...V,key:M},r("div",{className:"literal",children:r("pre",{dangerouslySetInnerHTML:{__html:w}})}));if(Z==="header")return k.createElement("th",{...V,key:M},r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:w}}));{let ae=w;return k.createElement("td",{...V,key:M},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,M)=>r("td",{className:I(P),children:r("p",{className:"tableblock",dangerouslySetInnerHTML:{__html:P.getText()}})},M))})},j))]})},He=({node:e})=>{let a=e.getId()||"toc";const n=e.getDocument(),l=e.hasTitle()?e.getTitle():n.getAttribute("toc-title"),f=k.useMemo(()=>n.getAttribute("toc-placement"),[e]),c=k.useMemo(()=>n.hasAttribute("toc"),[e]),y=e.hasAttribute("levels")?parseInt(e.getAttribute("levels")):void 0;return f==="macro"&&n.hasSections()&&c?o("div",{id:a,className:S("toc",E(e)),children:[r("div",{id:`${a}title`,className:"title",children:O.default(l||"")}),r(q,{node:e.getDocument(),opts:{tocLevels:y}})]}):null},Ve=()=>r("hr",{}),Ge=({node:e})=>{const a=e.isOption("checklist");return o("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,l)=>a?r("li",{id:n.getId(),className:E(e),children:o("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())]})},l):o("li",{id:n.getId(),className:E(e),children:[r("p",{dangerouslySetInnerHTML:{__html:n.getText()}}),r(L,{blocks:n.getBlocks()})]},l))})]})},Je=({node:e})=>{const a=e.getAttribute("attribution"),n=e.getAttribute("citetitle"),l=Y(e);return o("div",{id:e.getId?e.getId():"",className:S("verseblock",E(e)),...N(e),children:[r(x,{node:e}),r("pre",{className:"content",dangerouslySetInnerHTML:{__html:l}}),a&&o("div",{className:"attribution",children:["\u2014 ",a,n&&r("cite",{children:n})]})]})},ze=k.createContext({}),Nt=({content:e,options:a})=>{const n=a&&a.customDocument;return r(ze.Provider,{value:a||{},children:n?r(n,{document:e}):r(we,{document:e})})},L=({blocks:e})=>r($,{children:e.map((a,n)=>r(kt,{node:a},`${n}-${a.getNodeName()}`))}),kt=({node:e})=>{const a=k.useContext(ze),n=e.getNodeName(),l=e.getDocument(),f=e.getAttributes();l.playbackAttributes(f);const c=a&&a.overrides&&a.overrides[n];if(c)return r(c,{node:e});switch(n){case"audio":return r(ke,{node:e});case"preamble":return r(Me,{node:e});case"section":return r(We,{node:e});case"paragraph":return r(Fe,{node:e});case"dlist":return r(Se,{node:e});case"ulist":return r(Ge,{node:e});case"floating_title":return r(Oe,{node:e});case"admonition":return r(Ne,{node:e});case"listing":return r(Pe,{node:e});case"literal":return r(je,{node:e});case"image":return r(Ie,{node:e});case"colist":return r(Re,{node:e});case"olist":return r(Le,{node:e});case"table":return r(Ue,{node:e});case"thematic_break":return r(Ve,{});case"open":return r(De,{node:e});case"pass":return r($e,{node:e});case"page_break":return r(xe,{});case"example":return r(Ce,{node:e});case"sidebar":return r(Ye,{node:e});case"quote":return r(Be,{node:e});case"verse":return r(Je,{node:e});case"toc":return r(He,{node:e});default:return r($,{children:O.default(e.convert())})}};Object.defineProperty(d,"asciidoctor",{enumerable:!0,get:()=>_t.default}),d.Admonition=Ne,d.Audio=ke,d.CaptionedTitle=Q,d.CoList=Re,d.Content=L,d.DList=Se,d.Document=we,d.Example=Ce,d.FloatingTitle=Oe,d.Image=Ie,d.Listing=Pe,d.Literal=je,d.OList=Le,d.Open=De,d.Outline=q,d.PageBreak=xe,d.Paragraph=Fe,d.Pass=$e,d.Preamble=Me,d.Quote=Be,d.Section=We,d.Sidebar=Ye,d.Table=Ue,d.TableOfContents=He,d.ThematicBreak=Ve,d.Title=x,d.UList=Ge,d.Verse=Je,d.default=Nt,d.getLineNumber=N,d.getRole=E,d.useGetContent=Y,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -2,9 +2,9 @@
|
|
|
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
|
|
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
8
|
type Overrides = {
|
|
9
9
|
admonition?: typeof Admonition;
|
|
10
10
|
audio?: typeof Audio;
|
|
@@ -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';
|
|
@@ -0,0 +1,26 @@
|
|
|
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, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxide/react-asciidoc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-alpha.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"import": "./dist/react-asciidoc.js",
|
|
16
16
|
"require": "./dist/react-asciidoc.umd.cjs",
|
|
17
|
-
"types": "./dist/index.d.ts"
|
|
17
|
+
"types": "./dist/types/index.d.ts"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"type": "module",
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
21
|
+
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"dev": "vite --port 8000",
|
|
24
24
|
"clean": "rimraf dist/",
|
|
@@ -1,26 +0,0 @@
|
|
|
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, };
|
|
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
|
|
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
|