@oxide/react-asciidoc 0.2.9--canary.f0bc4dd.0 → 0.2.9--canary.0a74a0b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -630,9 +630,7 @@ const U = nr.exports.Fragment, t = nr.exports.jsx, m = nr.exports.jsxs, T = ({
630
630
  }) => {
631
631
  const {
632
632
  document: a
633
- } = j(), i = a.attributes || {}, s = r.attributes;
634
- console.log(r);
635
- const c = () => i.icons === "font" && !s.icon ? /* @__PURE__ */ t("i", {
633
+ } = j(), i = a.attributes || {}, s = r.attributes, c = () => i.icons === "font" && !s.icon ? /* @__PURE__ */ t("i", {
636
634
  className: `fa icon-${s.name}`,
637
635
  title: `${s.textlabel}`
638
636
  }) : /* @__PURE__ */ t("img", {
@@ -24,7 +24,7 @@ Check the render method of \``+r+"`."}return""}}function wt(r){{if(r!==void 0){v
24
24
 
25
25
  Check your code at `+s+":"+u+"."}return""}}var Sr={};function qt(r){{var s=kr();if(!s){var u=typeof r=="string"?r:r.displayName||r.name;u&&(s=`
26
26
 
27
- Check the top-level render call using <`+u+">.")}return s}}function Rr(r,s){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var u=qt(s);if(Sr[u])return;Sr[u]=!0;var f="";r&&r._owner&&r._owner!==Ae.current&&(f=" It was passed a child from "+H(r._owner.type)+"."),W(r),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',u,f),W(null)}}function Tr(r,s){{if(typeof r!="object")return;if(xe(r))for(var u=0;u<r.length;u++){var f=r[u];ke(f)&&Rr(f,s)}else if(ke(r))r._store&&(r._store.validated=!0);else if(r){var q=P(r);if(typeof q=="function"&&q!==r.entries)for(var N=q.call(r),w;!(w=N.next()).done;)ke(w.value)&&Rr(w.value,s)}}}function Et(r){{var s=r.type;if(s==null||typeof s=="string")return;var u;if(typeof s=="function")u=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===c||s.$$typeof===y))u=s.propTypes;else return;if(u){var f=H(s);nt(u,r.props,"prop",f,r)}else if(s.PropTypes!==void 0&&!De){De=!0;var q=H(s);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(r){{for(var s=Object.keys(r.props),u=0;u<s.length;u++){var f=s[u];if(f!=="children"&&f!=="key"){W(r),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}r.ref!==null&&(W(r),D("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Cr(r,s,u,f,q,N){{var w=rt(r);if(!w){var v="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(v+=" 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 O=wt(q);O?v+=O:v+=kr();var R;r===null?R="null":xe(r)?R="array":r!==void 0&&r.$$typeof===a?(R="<"+(H(r.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):R=typeof r,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,v)}var C=yt(r,s,u,q,N);if(C==null)return C;if(w){var U=s.children;if(U!==void 0)if(f)if(xe(U)){for(var J=0;J<U.length;J++)Tr(U[J],r);Object.freeze&&Object.freeze(U)}else D("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 Tr(U,r)}return r===l?xt(C):Et(C),C}}function Nt(r,s,u){return Cr(r,s,u,!0)}function At(r,s,u){return Cr(r,s,u,!1)}var Dt=At,kt=Nt;X.Fragment=l,X.jsx=Dt,X.jsxs=kt}()),X}(function(e){process.env.NODE_ENV==="production"?e.exports=Or():e.exports=_r()})(le);const I=le.exports.Fragment,t=le.exports.jsx,m=le.exports.jsxs,T=({text:e})=>e?t("div",{className:"title",children:k.default(e)}):null,Oe=({node:e})=>{const{document:a}=j(),i=a.attributes||{},l=e.attributes;console.log(e);const n=()=>i.icons==="font"&&!l.icon?t("i",{className:`fa icon-${l.name}`,title:`${l.textlabel}`}):t("img",{src:e.iconUri,alt:`${l.textlabel}`});return t("div",{className:`admonitionblock ${l.name}`,...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:t("table",{children:t("tbody",{children:m("tr",{children:[t("td",{className:"icon",children:i.icons?n():t("div",{className:"title",children:l.textlabel})}),m("td",{className:"content",children:[t(T,{text:e.title}),e.content&&k.default(e.content),t(L,{blocks:e.blocks})]})]})})})})},_e=({node:e})=>{const a=e.attributes.start,i=e.attributes.end,l=(a||i)&&`#t=${a||""}`+i?`,${i}`:"";return m("div",{className:"audioblock",...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:[t(T,{text:e.title}),t("div",{className:"content",children:t("audio",{src:`${e.mediaUri}${l}`,autoPlay:e.autoplay,controls:!e.noControls,loop:e.loop,children:"Your browser does not support the audio tag."})})]})},Fe=({node:e})=>m("div",{className:"colist",...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:[t(T,{text:e.title}),t("table",{children:t("tbody",{children:e.items.map((a,i)=>m("tr",{children:[m("td",{children:[t("i",{className:"conum","data-value":i+1}),t("b",{children:i+1})]}),m("td",{children:[a.text&&k.default(a.text),t(L,{blocks:a.blocks})]})]},i))})})]});var Pe={exports:{}};/*!
27
+ Check the top-level render call using <`+u+">.")}return s}}function Rr(r,s){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var u=qt(s);if(Sr[u])return;Sr[u]=!0;var f="";r&&r._owner&&r._owner!==Ae.current&&(f=" It was passed a child from "+H(r._owner.type)+"."),W(r),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',u,f),W(null)}}function Tr(r,s){{if(typeof r!="object")return;if(xe(r))for(var u=0;u<r.length;u++){var f=r[u];ke(f)&&Rr(f,s)}else if(ke(r))r._store&&(r._store.validated=!0);else if(r){var q=P(r);if(typeof q=="function"&&q!==r.entries)for(var N=q.call(r),w;!(w=N.next()).done;)ke(w.value)&&Rr(w.value,s)}}}function Et(r){{var s=r.type;if(s==null||typeof s=="string")return;var u;if(typeof s=="function")u=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===c||s.$$typeof===y))u=s.propTypes;else return;if(u){var f=H(s);nt(u,r.props,"prop",f,r)}else if(s.PropTypes!==void 0&&!De){De=!0;var q=H(s);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(r){{for(var s=Object.keys(r.props),u=0;u<s.length;u++){var f=s[u];if(f!=="children"&&f!=="key"){W(r),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f),W(null);break}}r.ref!==null&&(W(r),D("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Cr(r,s,u,f,q,N){{var w=rt(r);if(!w){var v="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(v+=" 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 O=wt(q);O?v+=O:v+=kr();var R;r===null?R="null":xe(r)?R="array":r!==void 0&&r.$$typeof===a?(R="<"+(H(r.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):R=typeof r,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,v)}var C=yt(r,s,u,q,N);if(C==null)return C;if(w){var U=s.children;if(U!==void 0)if(f)if(xe(U)){for(var J=0;J<U.length;J++)Tr(U[J],r);Object.freeze&&Object.freeze(U)}else D("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 Tr(U,r)}return r===l?xt(C):Et(C),C}}function Nt(r,s,u){return Cr(r,s,u,!0)}function At(r,s,u){return Cr(r,s,u,!1)}var Dt=At,kt=Nt;X.Fragment=l,X.jsx=Dt,X.jsxs=kt}()),X}(function(e){process.env.NODE_ENV==="production"?e.exports=Or():e.exports=_r()})(le);const I=le.exports.Fragment,t=le.exports.jsx,m=le.exports.jsxs,T=({text:e})=>e?t("div",{className:"title",children:k.default(e)}):null,Oe=({node:e})=>{const{document:a}=j(),i=a.attributes||{},l=e.attributes,n=()=>i.icons==="font"&&!l.icon?t("i",{className:`fa icon-${l.name}`,title:`${l.textlabel}`}):t("img",{src:e.iconUri,alt:`${l.textlabel}`});return t("div",{className:`admonitionblock ${l.name}`,...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:t("table",{children:t("tbody",{children:m("tr",{children:[t("td",{className:"icon",children:i.icons?n():t("div",{className:"title",children:l.textlabel})}),m("td",{className:"content",children:[t(T,{text:e.title}),e.content&&k.default(e.content),t(L,{blocks:e.blocks})]})]})})})})},_e=({node:e})=>{const a=e.attributes.start,i=e.attributes.end,l=(a||i)&&`#t=${a||""}`+i?`,${i}`:"";return m("div",{className:"audioblock",...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:[t(T,{text:e.title}),t("div",{className:"content",children:t("audio",{src:`${e.mediaUri}${l}`,autoPlay:e.autoplay,controls:!e.noControls,loop:e.loop,children:"Your browser does not support the audio tag."})})]})},Fe=({node:e})=>m("div",{className:"colist",...e.lineNumber?{"data-lineno":e.lineNumber}:{},children:[t(T,{text:e.title}),t("table",{children:t("tbody",{children:e.items.map((a,i)=>m("tr",{children:[m("td",{children:[t("i",{className:"conum","data-value":i+1}),t("b",{children:i+1})]}),m("td",{children:[a.text&&k.default(a.text),t(L,{blocks:a.blocks})]})]},i))})})]});var Pe={exports:{}};/*!
28
28
  Copyright (c) 2018 Jed Watson.
29
29
  Licensed under the MIT License (MIT), see
30
30
  http://jedwatson.github.io/classnames
@@ -32,12 +32,13 @@ type Overrides = {
32
32
  export type Options = {
33
33
  overrides?: Overrides;
34
34
  customDocument?: typeof Document;
35
+ };
36
+ export declare const Context: import("react").Context<Options & {
35
37
  document: {
36
38
  attributes?: DocumentBlock['attributes'];
37
39
  sections?: DocumentSection[];
38
40
  };
39
- };
40
- export declare const Context: import("react").Context<Options>;
41
+ }>;
41
42
  declare const Asciidoc: ({ document, options, }: {
42
43
  document: DocumentBlock;
43
44
  options?: Options | undefined;
@@ -45,7 +46,12 @@ declare const Asciidoc: ({ document, options, }: {
45
46
  declare const Content: ({ blocks }: {
46
47
  blocks: Block[];
47
48
  }) => JSX.Element;
48
- export declare const useConverterContext: () => Options;
49
+ export declare const useConverterContext: () => Options & {
50
+ document: {
51
+ attributes?: DocumentBlock['attributes'];
52
+ sections?: DocumentSection[];
53
+ };
54
+ };
49
55
  export { Asciidoc, Content, prepareDocument, Title, parse, processDocument, processDocumentSync, };
50
56
  export type { AdmonitionBlock, AudioBlock, Block, CoListBlock, DListBlock, DocumentBlock, DocumentSection, ImageBlock, ListBlock, LiteralBlock, ParagraphBlock, SectionBlock, TableBlock, };
51
57
  export * from './templates';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxide/react-asciidoc",
3
- "version": "0.2.9--canary.f0bc4dd.0",
3
+ "version": "0.2.9--canary.0a74a0b.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],