@abelxiaoxing/cadence 2.1.9 → 2.1.11
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/THIRD_PARTY_NOTICES.md +9 -0
- package/docs/conversation-mode.md +11 -3
- package/docs/reuse-and-distribution.md +8 -0
- package/package.json +18 -16
- package/src/cadence-instructions.ts +1 -1
- package/src/model-preview.mjs +9 -0
- package/src/native-build.ts +1 -1
- package/src/sdk-worker.mjs +6 -1
- package/src/service/contracts/workbench.ts +101 -7
- package/src/service/contracts/workflow.ts +3 -3
- package/src/service-cli.mjs +9 -0
- package/src/service-host.mjs +775 -537
- package/src/worker-capture.mjs +157 -9
- package/src/worker-public.mjs +9 -0
- package/web/dist/assets/cadence.css +1 -1
- package/web/dist/assets/cadence.js +26 -29
- package/web/dist/assets/markdown.js +1 -1
- package/web/dist/manifest.json +9 -9
|
@@ -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};
|
package/web/dist/manifest.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "cadence-web-assets/1",
|
|
3
|
-
"sourceHash": "
|
|
4
|
-
"contractHash": "
|
|
5
|
-
"buildId": "
|
|
3
|
+
"sourceHash": "c9b7cb2124ceef78efb739fad6f2618a9d459278aa98deb41fff304cdb834475",
|
|
4
|
+
"contractHash": "8801198e182c2457f2ff8feb9331db22d449f2b483c0befd08ce493b4db6fb4a",
|
|
5
|
+
"buildId": "dbed70697fb1eed6fba159518d2240db0569ca1a38e376d3c28e968dda1d0b0a",
|
|
6
6
|
"assets": [
|
|
7
7
|
{
|
|
8
8
|
"name": "assets/cadence.css",
|
|
9
|
-
"bytes":
|
|
10
|
-
"sha256": "
|
|
9
|
+
"bytes": 181329,
|
|
10
|
+
"sha256": "12b664526217f28c8177dfe0b7a53b98705547e02ddf6d1c1050eaa00f622e2e",
|
|
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":
|
|
77
|
-
"sha256": "
|
|
76
|
+
"bytes": 525421,
|
|
77
|
+
"sha256": "4ff9090a2868e3c72980f3bf9e093a3533da80ff13b0cd48f0d06afdea66cc9b",
|
|
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":
|
|
448
|
-
"sha256": "
|
|
447
|
+
"bytes": 764397,
|
|
448
|
+
"sha256": "6a36e89e7124a36afa87e8b3a6cdc20a26b50c66d74c39f08e30407bf367e706",
|
|
449
449
|
"references": [
|
|
450
450
|
"assets/react.js",
|
|
451
451
|
"assets/rolldown-runtime.js"
|