@minamorl/flashmath 0.1.0 → 0.1.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.
@@ -1 +1 @@
1
- import{L as a,M as b,N as c,O as d}from"./chunk-X6BR56FI.js";import"./chunk-IHTB7IDO.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";d();export{a as configure,b as parserConfiguration,c as resolveConfiguration};
1
+ import{L as a,M as b,N as c,O as d}from"./chunk-SHAALSPE.js";import"./chunk-CBRBGK2B.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";d();export{a as configure,b as parserConfiguration,c as resolveConfiguration};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as u,b as h}from"./chunk-BCYDUHHK.js";import{a as p}from"./chunk-2BLNXHV2.js";import"./chunk-TXV67IQS.js";import{a as i,c,d as M}from"./chunk-X6BR56FI.js";import"./chunk-IHTB7IDO.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";var f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},g=e=>f[e];function s(e){return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,g):e}function m(e,a={}){let r="",n=[p(e,a)];for(;n.length;){let t=n.pop();if(typeof t=="string"){r+=t;continue}if(t.kind==="#text"){r+=s(t.text);continue}r+="<"+t.kind;for(let o of Object.keys(t.attributes))r+=" "+o+'="'+s(t.attributes[o])+'"';r+=">",n.push("</"+t.kind+">");for(let o=t.children.length-1;o>=0;o--)n.push(t.children[o]);t.text&&(r+=s(t.text))}return r}M();export{i as ParseError,c as UnsupportedFeatureError,u as createMathMLParser,h as parseToMathMLAst,m as toMathMLString};
1
+ import{a as u,b as h}from"./chunk-PLZAWTCY.js";import{a as p}from"./chunk-6CC22KD6.js";import"./chunk-TXV67IQS.js";import{a as i,c,d as M}from"./chunk-SHAALSPE.js";import"./chunk-CBRBGK2B.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";var f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},g=e=>f[e];function s(e){return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,g):e}function m(e,a={}){let r="",n=[p(e,a)];for(;n.length;){let t=n.pop();if(typeof t=="string"){r+=t;continue}if(t.kind==="#text"){r+=s(t.text);continue}r+="<"+t.kind;for(let o of Object.keys(t.attributes))r+=" "+o+'="'+s(t.attributes[o])+'"';r+=">",n.push("</"+t.kind+">");for(let o=t.children.length-1;o>=0;o--)n.push(t.children[o]);t.text&&(r+=s(t.text))}return r}M();export{i as ParseError,c as UnsupportedFeatureError,u as createMathMLParser,h as parseToMathMLAst,m as toMathMLString};
package/dist/output.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-2BLNXHV2.js";import"./chunk-TXV67IQS.js";import"./chunk-IHTB7IDO.js";import"./chunk-WZSFAGJH.js";export{a as mathMLForOutput};
1
+ import{a}from"./chunk-6CC22KD6.js";import"./chunk-TXV67IQS.js";import"./chunk-CBRBGK2B.js";import"./chunk-WZSFAGJH.js";export{a as mathMLForOutput};
@@ -1,4 +1,4 @@
1
- type PackageMark = 'glyph' | 'arrow-label' | 'prescript' | 'bbox-padding';
1
+ type PackageMark = 'glyph' | 'arrow-label' | 'xarrow-label' | 'prescript' | 'bbox-padding';
2
2
  export declare function markPackageNode<T extends object>(node: T, kind: PackageMark): T;
3
3
  export declare const packageMark: (node: object) => PackageMark | undefined;
4
4
  export declare function copyPackageMark(source: object, target: object): void;
@@ -1 +1 @@
1
- import{H as a,I as b,J as c,K as d}from"../chunk-X6BR56FI.js";import"../chunk-IHTB7IDO.js";import"../chunk-KDAOMSCC.js";import"../chunk-WZSFAGJH.js";d();export{a as registeredPackages,b as resolvePackages,c as validateConfigurationModules};
1
+ import{H as a,I as b,J as c,K as d}from"../chunk-SHAALSPE.js";import"../chunk-CBRBGK2B.js";import"../chunk-KDAOMSCC.js";import"../chunk-WZSFAGJH.js";d();export{a as registeredPackages,b as resolvePackages,c as validateConfigurationModules};
package/dist/react.js CHANGED
@@ -1 +1 @@
1
- import{b as g}from"./chunk-BCYDUHHK.js";import{a as d}from"./chunk-2BLNXHV2.js";import"./chunk-TXV67IQS.js";import"./chunk-X6BR56FI.js";import"./chunk-IHTB7IDO.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";import{createElement as u}from"react";function x(n){let s={},a=0,i=-1,t=0,c=0;for(let r=0;r<=n.length;r++){let o=n.charCodeAt(r);if(c?o===92?r++:o===c&&(c=0):o===34||o===39?c=o:o===40?t++:o===41?t--:o===58&&i<0&&(i=r),r===n.length||o===59&&!t&&!c){if(i>=a){let f=n.slice(a,i).trim(),e=f.startsWith("--")?f:f.toLowerCase(),l="";if(e.startsWith("--"))l=e;else for(let p=0;p<e.length;p++)if(e.charCodeAt(p)===45&&p+1<e.length){let h=e.charCodeAt(++p);l+=String.fromCharCode(p===1&&h===109&&e.charCodeAt(2)===115?h:h>=97&&h<=122?h-32:h)}else l+=e[p];l&&(s[l]=n.slice(i+1,r).trim())}a=r+1,i=-1}}return s}var m={class:"className",for:"htmlFor","http-equiv":"httpEquiv","accept-charset":"acceptCharset"};for(let n of"accessKey allowFullScreen autoCapitalize autoComplete autoFocus cellPadding cellSpacing charSet classID colSpan contentEditable contextMenu crossOrigin dateTime encType enterKeyHint fetchPriority formAction formEncType formMethod formNoValidate formTarget frameBorder hrefLang inputMode itemID itemProp itemRef itemScope itemType marginHeight marginWidth maxLength minLength noModule noValidate playsInline readOnly referrerPolicy rowSpan spellCheck srcDoc srcLang srcSet tabIndex useMap fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight strokeWidth strokeLinecap strokeLinejoin strokeMiterlimit strokeDasharray strokeDashoffset strokeOpacity fillOpacity fillRule clipPath clipRule xmlLang xmlSpace xlinkHref xmlnsXlink".split(" "))m[n.toLowerCase()]=n,m[n.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())]=n;Object.assign(m,{"xml:lang":"xmlLang","xml:space":"xmlSpace","xlink:href":"xlinkHref","xmlns:xlink":"xmlnsXlink"});function S(n,s={}){return y(g(n,s),s)}function y(n,s={}){let a=[{node:d(n,s),visited:!1,key:0}],i=[];for(;a.length;){let{node:t,visited:c,key:r}=a.pop();if(!c){a.push({node:t,visited:!0,key:r});for(let e=t.children.length-1;e>=0;e--)a.push({node:t.children[e],visited:!1,key:t.children[e].start*(t.children.length+1)+e});continue}if(t.kind==="#text"){i.push(t.text);continue}let o=i.splice(i.length-t.children.length,t.children.length),f={key:r};for(let[e,l]of Object.entries(t.attributes))e==="href"&&l===""||(f[m[e]??e]=e==="style"?x(l):l);i.push(u(t.kind,f,t.text?[t.text,...o]:o))}return i[0]}export{y as mathMLAstToReact,S as parseToReact};
1
+ import{b as g}from"./chunk-PLZAWTCY.js";import{a as d}from"./chunk-6CC22KD6.js";import"./chunk-TXV67IQS.js";import"./chunk-SHAALSPE.js";import"./chunk-CBRBGK2B.js";import"./chunk-KDAOMSCC.js";import"./chunk-WZSFAGJH.js";import{createElement as u}from"react";function x(n){let s={},a=0,i=-1,t=0,c=0;for(let r=0;r<=n.length;r++){let o=n.charCodeAt(r);if(c?o===92?r++:o===c&&(c=0):o===34||o===39?c=o:o===40?t++:o===41?t--:o===58&&i<0&&(i=r),r===n.length||o===59&&!t&&!c){if(i>=a){let f=n.slice(a,i).trim(),e=f.startsWith("--")?f:f.toLowerCase(),l="";if(e.startsWith("--"))l=e;else for(let p=0;p<e.length;p++)if(e.charCodeAt(p)===45&&p+1<e.length){let h=e.charCodeAt(++p);l+=String.fromCharCode(p===1&&h===109&&e.charCodeAt(2)===115?h:h>=97&&h<=122?h-32:h)}else l+=e[p];l&&(s[l]=n.slice(i+1,r).trim())}a=r+1,i=-1}}return s}var m={class:"className",for:"htmlFor","http-equiv":"httpEquiv","accept-charset":"acceptCharset"};for(let n of"accessKey allowFullScreen autoCapitalize autoComplete autoFocus cellPadding cellSpacing charSet classID colSpan contentEditable contextMenu crossOrigin dateTime encType enterKeyHint fetchPriority formAction formEncType formMethod formNoValidate formTarget frameBorder hrefLang inputMode itemID itemProp itemRef itemScope itemType marginHeight marginWidth maxLength minLength noModule noValidate playsInline readOnly referrerPolicy rowSpan spellCheck srcDoc srcLang srcSet tabIndex useMap fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight strokeWidth strokeLinecap strokeLinejoin strokeMiterlimit strokeDasharray strokeDashoffset strokeOpacity fillOpacity fillRule clipPath clipRule xmlLang xmlSpace xlinkHref xmlnsXlink".split(" "))m[n.toLowerCase()]=n,m[n.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())]=n;Object.assign(m,{"xml:lang":"xmlLang","xml:space":"xmlSpace","xlink:href":"xlinkHref","xmlns:xlink":"xmlnsXlink"});function S(n,s={}){return y(g(n,s),s)}function y(n,s={}){let a=[{node:d(n,s),visited:!1,key:0}],i=[];for(;a.length;){let{node:t,visited:c,key:r}=a.pop();if(!c){a.push({node:t,visited:!0,key:r});for(let e=t.children.length-1;e>=0;e--)a.push({node:t.children[e],visited:!1,key:t.children[e].start*(t.children.length+1)+e});continue}if(t.kind==="#text"){i.push(t.text);continue}let o=i.splice(i.length-t.children.length,t.children.length),f={key:r};for(let[e,l]of Object.entries(t.attributes))e==="href"&&l===""||(f[m[e]??e]=e==="style"?x(l):l);i.push(u(t.kind,f,t.text?[t.text,...o]:o))}return i[0]}export{y as mathMLAstToReact,S as parseToReact};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minamorl/flashmath",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TeX to MathML parser for React, conformance-tested against MathJax",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-WZSFAGJH.js";function k(e,t){return a.set(e,t),e}function g(e,t){let c=a.get(e);c&&a.set(t,c)}var a,p,o=r(()=>{"use strict";a=new WeakMap;p=e=>a.get(e)});export{k as a,p as b,g as c,o as d};