@abelxiaoxing/cadence 2.1.10 → 2.1.13

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.
@@ -293,4 +293,4 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
293
293
  `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(gS(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
294
294
  `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
295
295
  `),i&&(c+=a.move(i+`
296
- `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var bw={tokenize:Sw,concrete:!0,name:`mathFlow`},xw={tokenize:Cw,partial:!0};function Sw(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Bt(e,l,`whitespace`)(t))}function l(t){return t===null||O(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||O(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(xw,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Bt(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):O(t)?e.attempt(xw,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||O(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Bt(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Bt(e,c,`whitespace`)(t))}function c(r){return r===null||O(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Cw(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function ww(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Tw,previous:Ew,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):O(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||O(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Tw(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ew(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Dw(e){return{flow:{36:bw},text:{36:ww(e)}}}var Ow={};function kw(e){let t=this,n=e||Ow,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Dw(n)),a.push(vw()),o.push(yw(n))}export{qb as a,xo as c,fx as i,_w as n,qh as o,bx as r,ll as s,kw as t};
296
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var bw={tokenize:Sw,concrete:!0,name:`mathFlow`},xw={tokenize:Cw,partial:!0};function Sw(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Bt(e,l,`whitespace`)(t))}function l(t){return t===null||O(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||O(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(xw,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Bt(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):O(t)?e.attempt(xw,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||O(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Bt(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Bt(e,c,`whitespace`)(t))}function c(r){return r===null||O(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Cw(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function ww(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Tw,previous:Ew,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):O(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||O(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Tw(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ew(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Dw(e){return{flow:{36:bw},text:{36:ww(e)}}}var Ow={};function kw(e){let t=this,n=e||Ow,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Dw(n)),a.push(vw()),o.push(yw(n))}export{qb as a,xo as c,fx as i,ao as l,_w as n,qh as o,bx as r,ll as s,kw as t,mi as u};
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schema": "cadence-web-assets/1",
3
- "sourceHash": "ad0828373f8d69b3564dc8baf81604cbc64d5c7358a5c88fed3fd63512569528",
4
- "contractHash": "d70dd3e63843be7df42ff10943fcdc78bcd27b881b0ac8222526e8dad7b0e6e2",
5
- "buildId": "cdb10ead66d8e5131f34d0cf0afca06dd616e3b987b802e68d1b326bec64b5e0",
3
+ "sourceHash": "a9d44553f1e157e046ca32ffc6cd0eb358de99e5989ab6f59565cfc291b8a02e",
4
+ "contractHash": "103e212eee402600c29002528ccc3808b6fbe11ccee275a4d5f2a3d52576c520",
5
+ "buildId": "7b479c8acc1e3233b2e4431ab026bb5d941452e43b98ee34eea5617f8fafd7ca",
6
6
  "assets": [
7
7
  {
8
8
  "name": "assets/cadence.css",
9
- "bytes": 180558,
10
- "sha256": "66b3cf0dc91cf81a29592ec539ce8895c6eae8a8b1b674cb896021b0d7704672",
9
+ "bytes": 180578,
10
+ "sha256": "a56ad6a66ae2fdb635aa78d0b1676da12cdbc0c54eab070d1bdfb79d54236b1d",
11
11
  "references": [
12
12
  "assets/KaTeX_AMS-Regular.ttf",
13
13
  "assets/KaTeX_AMS-Regular.woff",
@@ -73,8 +73,8 @@
73
73
  },
74
74
  {
75
75
  "name": "assets/cadence.js",
76
- "bytes": 517065,
77
- "sha256": "8df1cc4741b853966ead71ce77a45f787c52ec210e555a4c70aa3e9db47f4174",
76
+ "bytes": 518803,
77
+ "sha256": "72578896eb1988c97fbce87da488814fa8f4151c1cb6337669c773d666f21ccc",
78
78
  "references": [
79
79
  "assets/markdown.js",
80
80
  "assets/react.js",
@@ -444,8 +444,8 @@
444
444
  },
445
445
  {
446
446
  "name": "assets/markdown.js",
447
- "bytes": 764381,
448
- "sha256": "8176da275ed35ef409028dcaab73dadd00578b98fab0741aff50d8f9d5c8b42c",
447
+ "bytes": 764397,
448
+ "sha256": "6a36e89e7124a36afa87e8b3a6cdc20a26b50c66d74c39f08e30407bf367e706",
449
449
  "references": [
450
450
  "assets/react.js",
451
451
  "assets/rolldown-runtime.js"