@richmd/react 2.1.5-rc.0 → 2.1.5-rc.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.
|
@@ -498,7 +498,7 @@ ${b}`,
|
|
|
498
498
|
} else
|
|
499
499
|
n !== _o && (Ul.test(b) && (b = `[${b}](${b})`), r += b !== "" ? `${b}
|
|
500
500
|
` : `
|
|
501
|
-
|
|
501
|
+
`);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
return e;
|
|
@@ -73976,7 +73976,7 @@ function(t) {
|
|
|
73976
73976
|
*/
|
|
73977
73977
|
function(t) {
|
|
73978
73978
|
function e() {
|
|
73979
|
-
return (Tt.canvg ? Promise.resolve(Tt.canvg) : import("./index.es-
|
|
73979
|
+
return (Tt.canvg ? Promise.resolve(Tt.canvg) : import("./index.es-CqR4j58J.mjs")).catch(function(r) {
|
|
73980
73980
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
73981
73981
|
}).then(function(r) {
|
|
73982
73982
|
return r.default ? r.default : r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as Ma } from "./index-
|
|
1
|
+
import { _ as Ma } from "./index-BQMErNXL.mjs";
|
|
2
2
|
var qa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
3
|
function Zu(n) {
|
|
4
4
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
package/dist/index.es.jsx
CHANGED
package/dist/index.umd.jsx
CHANGED
|
@@ -12,7 +12,7 @@ ${_}`,v.values[E.length-1].checked,v.level)):h.name==="orderedlist"?e.push(new M
|
|
|
12
12
|
${_}`,v.values[E.length-1].order,v.level)):h.name==="list"&&e.push(new Mr.List(`${c}
|
|
13
13
|
${_}`,v.level)),t=""}else n!==Xo&&(wc.test(_)&&(_=`[${_}](${_})`),t+=_!==""?`${_}
|
|
14
14
|
`:`
|
|
15
|
-
|
|
15
|
+
`)}}return e};class $x{constructor(e){this.ast=e}}const Xx=r=>{const e=Wx(r);return new $x(e)},Zx=r=>Xx(r);let ai=class $B{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new $B(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},Ti=class XB{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new XB(t,ai.range(this,e))}},Je=class ZB{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,a,i,s=t&&t.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var A=o.slice(a,i).replace(/[^]/g,"$&̲"),l;a>15?l="…"+o.slice(a-15,a):l=o.slice(0,a);var c;i+15<o.length?c=o.slice(i,i+15)+"…":c=o.slice(i),n+=l+A+c}var d=new Error(n);return d.name="ParseError",d.__proto__=ZB.prototype,d.position=a,a!=null&&i!=null&&(d.length=i-a),d.rawMessage=e,d}};Je.prototype.__proto__=Error.prototype;var Jx=function(r,e){return r.indexOf(e)!==-1},e3=function(r,e){return r===void 0?e:r},t3=/([A-Z])/g,r3=function(r){return r.replace(t3,"-$1").toLowerCase()},n3={"&":"&",">":">","<":"<",'"':""","'":"'"},a3=/[&><"']/g;function i3(r){return String(r).replace(a3,e=>n3[e])}var AS=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},s3=function(r){var e=AS(r);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},o3=function(r){if(!r)throw new Error("Expected non-null, but got "+String(r));return r},A3=function(r){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},Ot={contains:Jx,deflt:e3,escape:i3,hyphenate:r3,getBaseElem:AS,isCharacterBox:s3,protocolFromUrl:A3},dp={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand <n>",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function l3(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class c3{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in dp)if(dp.hasOwnProperty(t)){var n=dp[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:l3(n)}}reportNonstrict(e,t,n){var a=this.strict;if(typeof a=="function"&&(a=a(e,t,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new Je("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var a=this.strict;if(typeof a=="function")try{a=a(e,t,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=Ot.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}let Es=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return wi[u3[this.id]]}sub(){return wi[d3[this.id]]}fracNum(){return wi[p3[this.id]]}fracDen(){return wi[m3[this.id]]}cramp(){return wi[g3[this.id]]}text(){return wi[_3[this.id]]}isTight(){return this.size>=2}};var pp=0,Nc=1,Jo=2,Yi=3,JA=4,Ua=5,eA=6,na=7,wi=[new Es(pp,0,!1),new Es(Nc,0,!0),new Es(Jo,1,!1),new Es(Yi,1,!0),new Es(JA,2,!1),new Es(Ua,2,!0),new Es(eA,3,!1),new Es(na,3,!0)],u3=[JA,Ua,JA,Ua,eA,na,eA,na],d3=[Ua,Ua,Ua,Ua,na,na,na,na],p3=[Jo,Yi,JA,Ua,eA,na,eA,na],m3=[Yi,Yi,Ua,Ua,na,na,na,na],g3=[Nc,Nc,Yi,Yi,Ua,Ua,na,na],_3=[pp,Nc,Jo,Yi,Jo,Yi,Jo,Yi],It={DISPLAY:wi[pp],TEXT:wi[Jo],SCRIPT:wi[JA],SCRIPTSCRIPT:wi[eA]},mp=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function h3(r){for(var e=0;e<mp.length;e++)for(var t=mp[e],n=0;n<t.blocks.length;n++){var a=t.blocks[n];if(r>=a[0]&&r<=a[1])return t.name}return null}var Oc=[];mp.forEach(r=>r.blocks.forEach(e=>Oc.push(...e)));function lS(r){for(var e=0;e<Oc.length;e+=2)if(r>=Oc[e]&&r<=Oc[e+1])return!0;return!1}var tA=80,f3=function(r,e){return"M95,"+(622+r+e)+`
|
|
16
16
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
17
17
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
18
18
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richmd/react",
|
|
3
|
-
"version": "2.1.5-rc.
|
|
3
|
+
"version": "2.1.5-rc.1",
|
|
4
4
|
"description": "It is a react package of Richmd.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@react-hook/event": "^1.2.6",
|
|
44
|
-
"@richmd/js": "2.0.14-rc.
|
|
44
|
+
"@richmd/js": "2.0.14-rc.1",
|
|
45
45
|
"html-react-parser": "^5.2.2",
|
|
46
46
|
"html2canvas": "^1.4.1",
|
|
47
47
|
"jspdf": "^3.0.1",
|