@synnaxlabs/pluto 0.47.0 → 0.48.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.
- package/dist/{Animated-BewuBtBY.cjs → Animated--SNIwznU.cjs} +1 -1
- package/dist/{Animated-M9ynNzcI.js → Animated-CC7iS0zH.js} +21 -21
- package/dist/{Animated-otpyxn5i.js → Animated-DfDp0-ep.js} +4 -4
- package/dist/{Animated-Ck-9v2gm.cjs → Animated-TMpTdCqK.cjs} +1 -1
- package/dist/{Box-D5Qv__kr.js → Box-CoQUaJk2.js} +2 -2
- package/dist/{Box-BvqALodh.cjs → Box-Ds_D3xR_.cjs} +1 -1
- package/dist/Button-BaMa3eGI.cjs +1 -0
- package/dist/Button-NgDHbsf8.js +306 -0
- package/dist/{Dialog-DwhFD4z2.cjs → Dialog-BL8T9CVw.cjs} +1 -1
- package/dist/{Dialog-CO4iLhHf.js → Dialog-CBDFqieV.js} +4 -4
- package/dist/{Editable-CxgdRDPb.js → Editable-C7KPD0hC.js} +3 -3
- package/dist/{Editable-BXFY3-UW.cjs → Editable-CWt3zqDm.cjs} +1 -1
- package/dist/{Haul-BuI0PZpo.js → Haul-Be1j5BU3.js} +2 -2
- package/dist/{Haul-2Xa_nMgc.cjs → Haul-D1WaI_xE.cjs} +1 -1
- package/dist/{Items-DNcTFEUJ.cjs → Items-BYlg9bb-.cjs} +1 -1
- package/dist/{Items-G25zb57I.js → Items-mikdEpyC.js} +8 -8
- package/dist/{Menu-DqkB9vpH.js → Menu-CcWs0t21.js} +9 -9
- package/dist/{Menu-D-uhqnfk.cjs → Menu-DJoh8bH7.cjs} +1 -1
- package/dist/{Provider--RxgAoVG.js → Provider-DScd3hYf.js} +26 -26
- package/dist/{Provider-575hnWmi.cjs → Provider-fx1wTnXk.cjs} +2 -2
- package/dist/Tags-DvPUmH2r.js +908 -0
- package/dist/Tags-KHafaGjR.cjs +1 -0
- package/dist/{Text-BzTkWLeU.js → Text-BbbqH88W.js} +492 -487
- package/dist/Text-CZrjPRjJ.cjs +1 -0
- package/dist/{Video-VlT7jSYk.cjs → Video-DRSEX8t7.cjs} +1 -1
- package/dist/{Video-CITi2j07.js → Video-_DrutSeT.js} +2 -2
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-C_YE-5Xa.cjs +8 -0
- package/dist/{css-D6ZBcSwh.js → css-Cn63X_Yv.js} +1161 -1111
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/{deep-DtdcJG4q.cjs → deep-7SxmCL0x.cjs} +1 -1
- package/dist/{deep-DRVLw7iw.js → deep-szN5DCOH.js} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{dimensions-CGLhBwVq.cjs → dimensions-DFDTcQRG.cjs} +1 -1
- package/dist/{dimensions-BFCMI7yN.js → dimensions-Dclfavlh.js} +1 -1
- package/dist/{eraser-DvzR9kLf.js → eraser-Bpl4bpBx.js} +13 -13
- package/dist/{eraser-Dm5Du4PL.cjs → eraser-Bqibt23a.cjs} +2 -2
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +7 -7
- package/dist/{_commonjsHelpers-BH3jXuIh.cjs → event-BxvV3arE.cjs} +1 -1
- package/dist/{_commonjsHelpers-ByX85dGu.js → event-nNH_pXSr.js} +17 -14
- package/dist/{external-B2Q-Yx8D.cjs → external-19BIaQc6.cjs} +1 -1
- package/dist/{external-CMiEiLpE.js → external-1uZLLxz-.js} +771 -792
- package/dist/{external-CraRr06G.js → external-6rS2YiWR.js} +16066 -15782
- package/dist/{external-DZSXelLG.js → external-8H4eB7TN.js} +8 -8
- package/dist/{external-C5W7VXIW.cjs → external-AInsIJp-.cjs} +1 -1
- package/dist/{external-C5ssXUvL.cjs → external-B3jTkhc4.cjs} +4 -22
- package/dist/external-B8hxM_jw.cjs +79 -0
- package/dist/{external-D9LndfvY.js → external-BOWnCKIe.js} +3 -3
- package/dist/external-Bi-OQCBH.js +45 -0
- package/dist/{external-CeNR2kU9.js → external-Bq4gfE5e.js} +6 -6
- package/dist/{external-CGRGVYRj.js → external-C0_sN1J0.js} +2 -2
- package/dist/{external-C_dsD7px.cjs → external-CFZ33YbY.cjs} +1 -1
- package/dist/{external-DEWhnbVF.cjs → external-CFdDgpzj.cjs} +1 -1
- package/dist/{external-BVcgi9yX.cjs → external-CJFfVl_u.cjs} +1 -1
- package/dist/{external-BA6DRS2n.cjs → external-CN15E8ls.cjs} +1 -1
- package/dist/{external-DUoHSX0Q.js → external-Caetm5fI.js} +5 -5
- package/dist/external-CfEVFfhL.cjs +1 -0
- package/dist/{external-DrUtWpiV.js → external-D6TsHpoG.js} +10 -10
- package/dist/{external-FIE7PzLB.cjs → external-D7WE6Leo.cjs} +1 -1
- package/dist/{external-OLyg-4Ab.cjs → external-DUGcSVbJ.cjs} +1 -1
- package/dist/{external-B7hb5HYU.js → external-DwhfVdFp.js} +5 -5
- package/dist/{external-BhOvtmPt.js → external-X_eFMRtE.js} +2 -2
- package/dist/{external-_LWHQroW.cjs → external-pRQzznIG.cjs} +1 -1
- package/dist/{external-x9Ylk2op.js → external-y1Apm7j1.js} +14 -14
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-yPlq8smc.cjs → fontString-BcSXNOgW.cjs} +1 -1
- package/dist/{fontString-CGd4NYXa.js → fontString-D7EMGjIw.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/{hooks-15yB7IKE.js → hooks-BmUn8s1r.js} +4 -4
- package/dist/{hooks-D_-XdOAe.cjs → hooks-CutQY1o9.cjs} +1 -1
- package/dist/index.cjs +8 -40
- package/dist/index.js +10546 -10342
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-BbD0H88J.js} +108 -128
- package/dist/jsx-runtime-nZSsnGb7.cjs +6 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/{provider-C8In649C.js → provider-B6SgG_sT.js} +4910 -4821
- package/dist/provider-C9Beoajx.cjs +72 -0
- package/dist/src/button/Button.d.ts +2 -1
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +4 -1
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/Select.d.ts +2 -2
- package/dist/src/channel/Select.d.ts.map +1 -1
- package/dist/src/cluster/index.d.ts +2 -0
- package/dist/src/cluster/index.d.ts.map +1 -0
- package/dist/src/cluster/queries.d.ts +6 -0
- package/dist/src/cluster/queries.d.ts.map +1 -0
- package/dist/src/cluster/queries.spec.d.ts +2 -0
- package/dist/src/cluster/queries.spec.d.ts.map +1 -0
- package/dist/src/color/GradientPicker.d.ts.map +1 -1
- package/dist/src/flux/retrieve.d.ts +9 -8
- package/dist/src/flux/retrieve.d.ts.map +1 -1
- package/dist/src/hardware/device/Select.d.ts +1 -1
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/rack/Select.d.ts +1 -1
- package/dist/src/hardware/rack/Select.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +1 -0
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/DateTime.spec.d.ts +2 -0
- package/dist/src/input/DateTime.spec.d.ts.map +1 -0
- package/dist/src/label/Select.d.ts +3 -3
- package/dist/src/label/Select.d.ts.map +1 -1
- package/dist/src/menu/Item.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
- package/dist/src/select/Dialog.d.ts +2 -3
- package/dist/src/select/Dialog.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
- package/dist/src/status/Select.d.ts +1 -1
- package/dist/src/status/Select.d.ts.map +1 -1
- package/dist/src/status/queries.d.ts +13 -0
- package/dist/src/status/queries.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts +2 -2
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/Table.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/user/Avatar.d.ts +7 -0
- package/dist/src/user/Avatar.d.ts.map +1 -0
- package/dist/src/user/external.d.ts +3 -0
- package/dist/src/user/external.d.ts.map +1 -0
- package/dist/src/user/index.d.ts +1 -1
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/queries.d.ts +1 -0
- package/dist/src/user/queries.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +2 -1
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/measure/Measure.d.ts +4 -1
- package/dist/src/vis/measure/Measure.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +27 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{units-BqIfn6VX.js → units-cBd5OJg4.js} +1 -1
- package/dist/units-zxke9Ng2.cjs +1 -0
- package/dist/value-Ce4T858D.cjs +53 -0
- package/dist/{value-ChGMEPP3.js → value-UJNdARAu.js} +2715 -2512
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +24 -22
- package/dist/Button-BFoGC4WW.js +0 -305
- package/dist/Button-C3dvpk52.cjs +0 -1
- package/dist/Tags-Dekr_hwk.cjs +0 -1
- package/dist/Tags-Dpu9kD_T.js +0 -604
- package/dist/Text-DECnk5vG.cjs +0 -1
- package/dist/css-HnNQMUzV.cjs +0 -8
- package/dist/external-B9a_p-VK.cjs +0 -1
- package/dist/external-BZwFEYop.js +0 -44
- package/dist/external-g62tixOz.cjs +0 -85
- package/dist/jsx-runtime-Dszzpdy0.cjs +0 -22
- package/dist/provider-lNhTlIWj.cjs +0 -72
- package/dist/units-DCifOxd9.cjs +0 -1
- package/dist/value-B3LTg1lE.cjs +0 -53
package/dist/css.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./css-C_YE-5Xa.cjs"),t=require("./units-zxke9Ng2.cjs");exports.CSS=e.CSS;exports.newBEM=e.newBEM;exports.createHexOpacityVariants=t.createHexOpacityVariants;exports.unitProperty=t.unitProperty;
|
package/dist/css.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e, n as t } from "./css-
|
|
2
|
-
import { c as s, u as n } from "./units-
|
|
1
|
+
import { C as e, n as t } from "./css-Cn63X_Yv.js";
|
|
2
|
+
import { c as s, u as n } from "./units-cBd5OJg4.js";
|
|
3
3
|
export {
|
|
4
4
|
e as CSS,
|
|
5
5
|
s as createHexOpacityVariants,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./css-
|
|
1
|
+
"use strict";const a=require("./css-C_YE-5Xa.cjs"),d=r=>r!=null&&typeof r=="object"&&!Array.isArray(r),E=(r,s,o)=>{let e=0,n=r.length;const i=o??a.f(s);for(;e<n;){const t=Math.floor((e+n)/2),l=i(r[t],s);if(l===0)return t;l<0?e=t+1:n=t}return e},T=(r,s,o)=>{const e=E(r,s,o);r.splice(e,0,s)},w=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:a.c$1,GREATER_THAN:a.q,LESS_THAN:a.P,insert:T,isEqualTo:a.j,isGreaterThan:a.C,isGreaterThanEqual:a.F,isLessThan:a.w,newF:a.f,newFieldF:a.A,order:a._,primitiveArrays:a.E,reverseF:a.d,search:E,stringsWithNumbers:a.k,uniqueUnorderedPrimitiveArrays:a.T,unorderedPrimitiveArrays:a.p$1},Symbol.toStringTag,{value:"Module"})),g=".",$=(r,s,o=".")=>{const e=r.split(o);return e.map((n,i)=>{const t=s(n,i,e);return t==null?null:typeof t=="string"?t:t.join(o)}).filter(n=>n!=null).join(o)},p=(r,s)=>{if(!Array.isArray(r))return r[s];const o=r[s];if(o!=null||r.length==0)return o;const e=r[0];if(typeof e=="object"&&"key"in e)return r.find(n=>n.key===s)},S=(r,s)=>{const o=r.split(".");return o.forEach((e,n)=>{s=p(s,e),s!=null&&typeof s=="object"&&"key"in s&&(o[n]=s.key)}),o.join(".")},m=(r,s)=>{const o=r.split(".");return s<0?o[o.length+s]:o[s]},v=(r,s)=>{if(s.length===0)return!0;const o=r.split("."),e=s.split(".");if(e.length>o.length)return!1;for(let n=0;n<e.length;n++){const i=o[n],t=e[n];if(t!=="*"&&i!==t)return!1}return!0},h=r=>{const s=parseInt(r);return isNaN(s)||s<0||s.toString()!==r?null:s},b=(r,s)=>{for(let o=1;o<=s.length;o++){const e=s.slice(0,o).join(".");if(p(r,e)!=null)return[e,o]}return null},k=((r,s,o={optional:!1})=>{const{optional:e,getter:n=p}=o;if(s==="")return r;const i=s.split(".");if(i.length===1){const l=n(r,i[0]);if(l===void 0){if(e)return null;throw new Error(`Path ${s} does not exist. ${i[0]} is undefined`)}return l}const t=(l,f)=>{if(f>=i.length)return l;for(let u=i.length-f;u>=1;u--){const c=i.slice(f,f+u).join("."),y=n(l,c);if(y!==void 0){if(f+u===i.length)return y;if(y===null){if(e)return null;throw new Error(`Path ${s} does not exist. ${c} is null`)}return t(y,f+u)}}if(e)return null;throw new Error(`Path ${s} does not exist. ${i[f]} is undefined`)};return t(r,0)}),P=(r,s)=>k(r,s,{optional:!0})!==null,N=r=>{try{return structuredClone(r)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",r),console.trace(),JSON.parse(JSON.stringify(r))}},_=(r,s,o="")=>{const e={},n=(i,t,l)=>{if(typeof i!=typeof t||i===null||t===null){e[l]=[i,t];return}if(typeof i=="object"&&typeof t=="object")if(Array.isArray(i)&&Array.isArray(t)){if(i.length!==t.length){e[l]=[i,t];return}for(let f=0;f<i.length;f++)n(i[f],t[f],`${l}[${f}]`)}else new Set([...Object.keys(i),...Object.keys(t)]).forEach(f=>{n(i[f],t[f],l!==""?`${l}.${f}`:f)});else i!==t&&(e[l]=[i,t])};return n(r,s,o),e},j=(r,s)=>{const o=Array.isArray(r),e=Array.isArray(s);if(o!==e)return!1;if(o&&e){const t=r,l=s;if(t.length!==l.length)return!1;for(let f=0;f<t.length;f++)if(!j(t[f],l[f]))return!1;return!0}if(r==null||s==null||typeof r!="object"||typeof s!="object")return r===s;if("equals"in r)return r.equals(s);const n=Object.keys(r),i=Object.keys(s);if(n.length!==i.length)return!1;for(const t of n){const l=r[t],f=s[t];if(typeof l=="object"&&typeof f=="object"){if(!j(l,f))return!1}else if(l!==f)return!1}return!0},O=(r,s)=>{if(typeof r!="object"||r==null)return r===s;const o=Object.keys(r),e=Object.keys(s);if(e.length>o.length)return!1;for(const n of e){const i=r[n],t=s[n];if(typeof i=="object"&&typeof t=="object"){if(!O(i,t))return!1}else if(i!==t)return!1}return!0},A=(r,...s)=>{if(s.length===0)return r;const o=s.shift();if(d(r)&&d(o))for(const e in o)try{d(o[e])?(e in r||Object.assign(r,{[e]:{}}),A(r[e],o[e])):Object.assign(r,{[e]:o[e]})}catch(n){throw n instanceof TypeError?new TypeError(`.${e}: ${n.message}`):n}return A(r,...s)},q=(r,s,o)=>{const e=(n,i,t)=>{if(t.def?.type==="union")return t.def.options.reduce((l,f)=>e(l,i,f),n);if(t.def?.type==="intersection"){const l=e(n,i,t.def.left);return e(l,i,t.def.right)}for(const l in i){const f=i[l];let u=t?.shape;if(u!=null)for(;u!=null;){if(u[l]!=null){const c=u[l].safeParse(f);if(c.success){n[l]=c.data;break}}u=u.def?.shape}typeof f=="object"&&!Array.isArray(f)&&f!==null&&t&&t.shape&&t.shape[l]&&(n[l]||={},e(n[l],f,t.shape[l]))}return n};return e({...r},s,o)},x=(r,s)=>{const o=s.split(g);let e=r,n=0;for(;n<o.length;){if(n===o.length-1){const t=o[n];if(Array.isArray(e)){const l=parseInt(t);if(!isNaN(l)&&l<e.length){e.splice(l,1);return}const f=e[0];if(typeof f=="object"&&"key"in f){const u=e.findIndex(c=>c.key===t);if(u!==-1){e.splice(u,1);return}}return}delete e[t];return}let i=!1;if(Array.isArray(e)&&e.length>0){const t=e[0];if(typeof t=="object"&&"key"in t)for(let l=o.length-n;l>=1;l--){const f=o.slice(n,n+l).join(g),u=e.find(c=>c.key===f);if(u!=null){if(n+l===o.length){const c=e.findIndex(y=>y.key===f);c!==-1&&e.splice(c,1);return}e=u,n+=l,i=!0;break}}}if(!i)for(let t=o.length-n;t>=1;t--){const l=o.slice(n,n+t).join(g);if(!Array.isArray(e)&&typeof e=="object"&&e!==null&&l in e){if(n+t===o.length){delete e[l];return}e=e[l],n+=t,i=!0;break}}if(!i){const t=p(e,o[n]);if(t==null)return;e=t,n++}}},I=(r,s,o)=>{const e=s.split(g);let n=r,i=0;for(;i<e.length-1;){const t=b(n,e.slice(i,e.length-1));let l;t!=null?[l,i]=[t[0],i+t[1]]:(l=e[i],i++);let f=p(n,l);if(f==null){const u=e[i];let c=h(u);c==null&&u.startsWith("-")&&h(u.substring(1))!=null&&(c=0),f=c!=null?[]:{},n[l]=f}n=f}try{const t=e[e.length-1];if(Array.isArray(n)){let f=h(t);if(f==null){if(t.startsWith("-")){const u=h(t.substring(1));u!=null&&(f=n.length-u)}if(f==null){if(n.length===0){const c=h(t);if(c!=null){n[c]=o;return}}const u=n[0];if(typeof u=="object"&&"key"in u){const c=n.findIndex(y=>y.key===t);if(c!==-1){n[c]=o;return}}return}}n[f]=o;return}const l=b(n,[t]);if(l!=null){n[l[0]]=o;return}n[t]=o}catch(t){throw console.error("failed to set value",o,"at path",s,"on object",r),t}},F=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:g,copy:N,defaultGetter:p,difference:_,element:m,equal:j,findBestKey:b,get:k,getIndex:h,has:P,override:A,overrideValidItems:q,partialEqual:O,pathsMatch:v,remove:x,resolvePath:S,set:I,transformPath:$},Symbol.toStringTag,{value:"Module"}));exports.T=F;exports.g=$;exports.h=k;exports.q=w;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as O, T as m, k as T, d as w, E as P, _ as S, A as v, f as A, w as _, F as N, b as q, e as x, P as I, q as F, g as R } from "./css-
|
|
1
|
+
import { a as O, T as m, k as T, d as w, E as P, _ as S, A as v, f as A, w as _, F as N, b as q, e as x, P as I, q as F, g as R } from "./css-Cn63X_Yv.js";
|
|
2
2
|
const g = (r) => r != null && typeof r == "object" && !Array.isArray(r), $ = (r, s, o) => {
|
|
3
3
|
let e = 0, n = r.length;
|
|
4
4
|
const i = o ?? A(s);
|
package/dist/dialog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-CJFfVl_u.cjs");exports.Dialog=e.external;
|
package/dist/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./css-
|
|
1
|
+
"use strict";const i=require("./css-C_YE-5Xa.cjs");let e=null;const u=()=>(e??=document.createElement("canvas"),e),c=(t,a,n)=>{if(i.S.RUNTIME==="node")return{width:0,height:0};n??=u().getContext("2d"),n.font=a;const o=n.measureText(t);return s(o)},s=t=>({width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))});exports.dimensions=c;exports.dimensionsFromMetrics=s;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as h, i as C, Q as d, o as
|
|
1
|
+
import { j as h, i as C, Q as d, o as B, z as y, c as z, C as X } from "./css-Cn63X_Yv.js";
|
|
2
2
|
import { z as _ } from "zod";
|
|
3
|
-
import {
|
|
4
|
-
import { a as G } from "./dimensions-
|
|
3
|
+
import { h as x, C as U, q as K, j as W, k as H, L as V } from "./provider-B6SgG_sT.js";
|
|
4
|
+
import { a as G } from "./dimensions-Dclfavlh.js";
|
|
5
5
|
const Z = _.object({
|
|
6
6
|
include: _.string().array().optional(),
|
|
7
7
|
exclude: _.string().array().optional(),
|
|
8
8
|
level: _.enum(x.LOG_LEVELS).optional().default("info")
|
|
9
9
|
}), L = "alamos-provider";
|
|
10
|
-
class v extends
|
|
10
|
+
class v extends U {
|
|
11
11
|
static TYPE = "alamos.Provider";
|
|
12
12
|
schema = Z;
|
|
13
13
|
afterUpdate(t) {
|
|
@@ -438,7 +438,7 @@ class R {
|
|
|
438
438
|
}
|
|
439
439
|
scissor(t, e = d.ZERO) {
|
|
440
440
|
const s = new $(this.scale_);
|
|
441
|
-
return t = T(t, e), s.rect(...d.couple(h.topLeft(t)), ...
|
|
441
|
+
return t = T(t, e), s.rect(...d.couple(h.topLeft(t)), ...B.couple(h.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
|
|
442
442
|
}
|
|
443
443
|
setTransform(t, e, s, i, r, a) {
|
|
444
444
|
this.wrapped.setTransform(t, e, s, i, r, a);
|
|
@@ -728,7 +728,7 @@ class b {
|
|
|
728
728
|
constructor(t) {
|
|
729
729
|
const { font: e, characters: s = b.DEFAULT_CHARS, textColor: i } = t;
|
|
730
730
|
this.charMap = /* @__PURE__ */ new Map();
|
|
731
|
-
const r =
|
|
731
|
+
const r = z.unique(Array.from(s)), n = new OffscreenCanvas(1, 1).getContext("2d");
|
|
732
732
|
n.font = e;
|
|
733
733
|
const o = n.measureText("0");
|
|
734
734
|
this.charDims = G(o), this.charDims.width += S, this.charDims.height += S;
|
|
@@ -739,8 +739,8 @@ class b {
|
|
|
739
739
|
);
|
|
740
740
|
const f = this.atlas.getContext("2d");
|
|
741
741
|
f.scale(g, g), f.font = e, f.textBaseline = "alphabetic", f.textAlign = "left", f.fillStyle = y.hex(i), f.clearRect(0, 0, this.atlas.width, this.atlas.height), r.forEach((O, A) => {
|
|
742
|
-
const M = A % c, Y = Math.floor(A / c), N = M * u,
|
|
743
|
-
f.fillText(O, N,
|
|
742
|
+
const M = A % c, Y = Math.floor(A / c), N = M * u, q = (Y + 1) * m;
|
|
743
|
+
f.fillText(O, N, q), this.charMap.set(O, A);
|
|
744
744
|
});
|
|
745
745
|
}
|
|
746
746
|
fillText(t, e, s, i) {
|
|
@@ -806,7 +806,7 @@ class w {
|
|
|
806
806
|
/** See the @link{clear.Program} for why this is necessary. */
|
|
807
807
|
clearProgram;
|
|
808
808
|
os;
|
|
809
|
-
static CONTEXT_KEY =
|
|
809
|
+
static CONTEXT_KEY = X.B("render-context");
|
|
810
810
|
instrumentation;
|
|
811
811
|
static create(t, e, s, i, r) {
|
|
812
812
|
const a = J(t, "render_context"), n = new w(
|
|
@@ -910,14 +910,14 @@ class w {
|
|
|
910
910
|
}
|
|
911
911
|
eraseCanvas(t, e, s = d.ZERO) {
|
|
912
912
|
const i = T(e, s);
|
|
913
|
-
t.clearRect(...d.couple(h.topLeft(i)), ...
|
|
913
|
+
t.clearRect(...d.couple(h.topLeft(i)), ...B.couple(h.dims(i)));
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
const ht = _.object({
|
|
917
917
|
region: h.box,
|
|
918
918
|
enabled: _.boolean().optional().default(!1)
|
|
919
919
|
}), I = ["gl", "lower2d", "upper2d"];
|
|
920
|
-
class
|
|
920
|
+
class k extends V {
|
|
921
921
|
static TYPE = "eraser";
|
|
922
922
|
schema = ht;
|
|
923
923
|
afterUpdate(t) {
|
|
@@ -939,11 +939,11 @@ class B extends V {
|
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
const ut = {
|
|
942
|
-
[
|
|
942
|
+
[k.TYPE]: k
|
|
943
943
|
};
|
|
944
944
|
export {
|
|
945
945
|
w as C,
|
|
946
|
-
|
|
946
|
+
k as E,
|
|
947
947
|
et as G,
|
|
948
948
|
rt as L,
|
|
949
949
|
v as P,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./css-HnNQMUzV.cjs"),_=require("zod"),d=require("./provider-lNhTlIWj.cjs"),F=require("./dimensions-CGLhBwVq.cjs"),I=_.z.object({include:_.z.string().array().optional(),exclude:_.z.string().array().optional(),level:_.z.enum(d.g.LOG_LEVELS).optional().default("info")}),R="alamos-provider";class E extends d.Composite{static TYPE="alamos.Provider";schema=I;afterUpdate(t){if(t.getOptional(R)!=null)return;const s=[],{include:i,exclude:r,level:n}=this.state;(i!=null||r!=null)&&s.push(d.g.logLevelKeyFiler({include:i,exclude:r})),n!=null&&s.push(d.g.logThresholdFilter(n)),s.length===0&&s.push(()=>!1),this.internal.ins=new d.g.Instrumentation({key:"aether",logger:new d.g.Logger({filters:s})}),t.set(R,this.internal.ins)}}const B=(l,t)=>{const e=l.get(R);if(e==null)throw new Error("No instrumentation provider");return t==null?e:e.child(t)},N={[E.TYPE]:E},C=(l,t)=>a.jt.construct(a.jt.left(l)-t.x,a.jt.top(l)-t.y,a.jt.width(l)+t.x*2,a.jt.height(l)+t.y*2);class y{scale_;wrapped;atlasRegistry;cachedFont=null;cachedFillStyle=null;cachedStrokeStyle=null;cachedLineWidth=null;cachedGlobalAlpha=null;cachedTextAlign=null;cachedTextBaseline=null;cachedLineCap=null;cachedLineJoin=null;cachedMiterLimit=null;dpr;constructor(t,e,s,i=a.C$1.XY.IDENTITY){this.wrapped=t,this.scale_=i,this.atlasRegistry=e,this.dpr=s}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(t){this.wrapped.fontStretch=t}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(t){this.wrapped.fontVariantCaps=t}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(t){this.wrapped.wordSpacing=t}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(t){this.wrapped.letterSpacing=t}get textRendering(){return this.wrapped.textRendering}set textRendering(t){this.wrapped.textRendering=t}checkAtlasFillStyle(t=!1){return t&&typeof this.fillStyle=="string"?[!0,this.fillStyle]:(t&&console.warn("attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."),[!1,null])}reset(){this.wrapped.reset()}applyScale(t){return new y(this,this.atlasRegistry,this.dpr,t)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.cachedMiterLimit??this.wrapped.miterLimit}set miterLimit(t){const e=this.scale_.x.dim(t);e!==this.cachedMiterLimit&&(this.cachedMiterLimit=e,this.wrapped.miterLimit=e)}get globalAlpha(){return this.cachedGlobalAlpha??this.wrapped.globalAlpha}set globalAlpha(t){t!==this.cachedGlobalAlpha&&(this.cachedGlobalAlpha=t,this.wrapped.globalAlpha=t)}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(t){this.wrapped.globalCompositeOperation=t}get fillStyle(){return this.cachedFillStyle??this.wrapped.fillStyle}set fillStyle(t){t!==this.cachedFillStyle&&(this.cachedFillStyle=t,this.wrapped.fillStyle=t)}get strokeStyle(){return this.cachedStrokeStyle??this.wrapped.strokeStyle}set strokeStyle(t){t!==this.cachedStrokeStyle&&(this.cachedStrokeStyle=t,this.wrapped.strokeStyle=t)}drawImage(t,e,s,i,r,n,h,o,p){this.wrapped.drawImage(t,e,s,i,r,n!=null?this.scale_.x.pos(n):n,h!=null?this.scale_.y.pos(h):h,o!=null?this.scale_.x.dim(o):o,p!=null?this.scale_.y.dim(p):p)}beginPath(){this.wrapped.beginPath()}clip(t,e){this.wrapped.clip(t,e)}fill(t,e){if(t==null)return this.wrapped.fill();this.wrapped.fill(t,e)}isPointInPath(t,e,s,i){return this.wrapped.isPointInPath(t,e,s,i)}isPointInStroke(t,e,s){return this.wrapped.isPointInStroke(t,e,s)}stroke(t){if(t==null)return this.wrapped.stroke();this.wrapped.stroke(t)}createConicGradient(t,e,s){return this.wrapped.createConicGradient(t,e,s)}createLinearGradient(t,e,s,i){return this.wrapped.createLinearGradient(t,e,s,i)}createPattern(t,e){return this.wrapped.createPattern(t,e)}createRadialGradient(t,e,s,i,r,n){return this.wrapped.createRadialGradient(t,e,s,i,r,n)}get filter(){return this.wrapped.filter}set filter(t){this.wrapped.filter=t}createImageData(t,e,s){return this.wrapped.createImageData(t,e,s)}getImageData(t,e,s,i,r){return this.wrapped.getImageData(t,e,s,i,r)}putImageData(t,e,s,i,r,n,h){this.wrapped.putImageData(t,e,s,i,r,n,h)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(t){this.wrapped.imageSmoothingEnabled=t}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(t){this.wrapped.imageSmoothingQuality=t}arc(t,e,s,i,r,n){this.wrapped.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.wrapped.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.wrapped.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.wrapped.closePath()}ellipse(t,e,s,i,r,n,h,o){this.wrapped.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.wrapped.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.wrapped.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.wrapped.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.wrapped.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){this.wrapped.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),typeof r=="number"?this.scale_.x.dim(r):r)}get lineCap(){return this.cachedLineCap??this.wrapped.lineCap}set lineCap(t){t!==this.cachedLineCap&&(this.cachedLineCap=t,this.wrapped.lineCap=t)}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(t){this.wrapped.lineDashOffset=this.scale_.x.dim(t)}get lineJoin(){return this.cachedLineJoin??this.wrapped.lineJoin}set lineJoin(t){t!==this.cachedLineJoin&&(this.cachedLineJoin=t,this.wrapped.lineJoin=t)}get lineWidth(){return this.cachedLineWidth??this.wrapped.lineWidth}set lineWidth(t){const e=this.scale_.x.dim(t);e!==this.cachedLineWidth&&(this.cachedLineWidth=e,this.wrapped.lineWidth=e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(t){const e=Array.from(t).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(e)}clearRect(t,e,s,i){this.wrapped.clearRect(t,e,s,i)}fillRect(t,e,s,i){this.wrapped.fillRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}strokeRect(t,e,s,i){this.wrapped.strokeRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(t){this.wrapped.shadowBlur=t}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(t){this.wrapped.shadowColor=t}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(t){this.wrapped.shadowOffsetX=t}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.cachedFillStyle=null,this.cachedStrokeStyle=null,this.cachedLineWidth=null,this.cachedGlobalAlpha=null,this.cachedTextAlign=null,this.cachedTextBaseline=null,this.cachedLineCap=null,this.cachedLineJoin=null,this.cachedMiterLimit=null,this.cachedFont=null,this.wrapped.restore()}save(){this.wrapped.save()}fillText(t,e,s,i,r={}){const[n,h]=this.checkAtlasFillStyle(r.useAtlas);if(n){this.atlasRegistry.get({font:this.font,textColor:h}).fillText(this,t,e,s);return}this.wrapped.fillText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}measureText(t){return this.wrapped.measureText(t)}textDimensions(t,e={}){const[s,i]=this.checkAtlasFillStyle(e.useAtlas);return s?this.atlasRegistry.get({font:this.font,textColor:i}).measureText(t):F.dimensionsFromMetrics(this.measureText(t))}strokeText(t,e,s,i){this.wrapped.strokeText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}get direction(){return this.wrapped.direction}set direction(t){this.wrapped.direction=t}get font(){return this.cachedFont!=null?this.cachedFont:this.wrapped.font}set font(t){t!==this.cachedFont&&(this.cachedFont=t,this.wrapped.font=this.cachedFont)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(t){this.wrapped.fontKerning=t}get textAlign(){return this.cachedTextAlign??this.wrapped.textAlign}set textAlign(t){t!==this.cachedTextAlign&&(this.cachedTextAlign=t,this.wrapped.textAlign=t)}get textBaseline(){return this.cachedTextBaseline??this.wrapped.textBaseline}set textBaseline(t){t!==this.cachedTextBaseline&&(this.cachedTextBaseline=t,this.wrapped.textBaseline=t)}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(t){this.wrapped.rotate(t)}scale(t,e){this.wrapped.scale(t,e),this.dpr=t}scissor(t,e=a.Q.ZERO){const s=new $(this.scale_);return t=C(t,e),s.rect(...a.Q.couple(a.jt.topLeft(t)),...a._$1.couple(a.jt.dims(t))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(t,e,s,i,r,n){this.wrapped.setTransform(t,e,s,i,r,n)}transform(t,e,s,i,r,n){this.wrapped.transform(t,e,s,i,r,n)}translate(t,e){this.wrapped.translate(t,e)}}class ${scale_;path;constructor(t=a.C$1.XY.IDENTITY,e){this.scale_=t,e instanceof Path2D||typeof e=="string"?this.path=new Path2D(e):this.path=new Path2D}addPath(t,e){this.path.addPath(t,e)}arc(t,e,s,i,r,n){this.path.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.path.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.path.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.path.closePath()}ellipse(t,e,s,i,r,n,h,o){this.path.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.path.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.path.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.path.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.path.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){const n=this.scaleRadii(r);this.path.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),n)}scaleRadii(t){return t==null?t:typeof t=="number"?this.scale_.x.dim(t):Array.isArray(t)?t.map(e=>this.scaleRadius(e)):this.scaleRadius(t)}scaleRadius(t){return typeof t=="number"?this.scale_.x.dim(t):{x:this.scale_.x.dim(t.x??0),y:this.scale_.y.dim(t.y??0)}}getPath(){return this.path}}const Q=`precision mediump float;
|
|
1
|
+
"use strict";const a=require("./css-C_YE-5Xa.cjs"),_=require("zod"),d=require("./provider-C9Beoajx.cjs"),F=require("./dimensions-DFDTcQRG.cjs"),I=_.z.object({include:_.z.string().array().optional(),exclude:_.z.string().array().optional(),level:_.z.enum(d.g.LOG_LEVELS).optional().default("info")}),R="alamos-provider";class E extends d.Composite{static TYPE="alamos.Provider";schema=I;afterUpdate(t){if(t.getOptional(R)!=null)return;const s=[],{include:i,exclude:r,level:n}=this.state;(i!=null||r!=null)&&s.push(d.g.logLevelKeyFiler({include:i,exclude:r})),n!=null&&s.push(d.g.logThresholdFilter(n)),s.length===0&&s.push(()=>!1),this.internal.ins=new d.g.Instrumentation({key:"aether",logger:new d.g.Logger({filters:s})}),t.set(R,this.internal.ins)}}const B=(l,t)=>{const e=l.get(R);if(e==null)throw new Error("No instrumentation provider");return t==null?e:e.child(t)},N={[E.TYPE]:E},C=(l,t)=>a.jt.construct(a.jt.left(l)-t.x,a.jt.top(l)-t.y,a.jt.width(l)+t.x*2,a.jt.height(l)+t.y*2);class y{scale_;wrapped;atlasRegistry;cachedFont=null;cachedFillStyle=null;cachedStrokeStyle=null;cachedLineWidth=null;cachedGlobalAlpha=null;cachedTextAlign=null;cachedTextBaseline=null;cachedLineCap=null;cachedLineJoin=null;cachedMiterLimit=null;dpr;constructor(t,e,s,i=a.C$1.XY.IDENTITY){this.wrapped=t,this.scale_=i,this.atlasRegistry=e,this.dpr=s}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(t){this.wrapped.fontStretch=t}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(t){this.wrapped.fontVariantCaps=t}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(t){this.wrapped.wordSpacing=t}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(t){this.wrapped.letterSpacing=t}get textRendering(){return this.wrapped.textRendering}set textRendering(t){this.wrapped.textRendering=t}checkAtlasFillStyle(t=!1){return t&&typeof this.fillStyle=="string"?[!0,this.fillStyle]:(t&&console.warn("attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."),[!1,null])}reset(){this.wrapped.reset()}applyScale(t){return new y(this,this.atlasRegistry,this.dpr,t)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.cachedMiterLimit??this.wrapped.miterLimit}set miterLimit(t){const e=this.scale_.x.dim(t);e!==this.cachedMiterLimit&&(this.cachedMiterLimit=e,this.wrapped.miterLimit=e)}get globalAlpha(){return this.cachedGlobalAlpha??this.wrapped.globalAlpha}set globalAlpha(t){t!==this.cachedGlobalAlpha&&(this.cachedGlobalAlpha=t,this.wrapped.globalAlpha=t)}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(t){this.wrapped.globalCompositeOperation=t}get fillStyle(){return this.cachedFillStyle??this.wrapped.fillStyle}set fillStyle(t){t!==this.cachedFillStyle&&(this.cachedFillStyle=t,this.wrapped.fillStyle=t)}get strokeStyle(){return this.cachedStrokeStyle??this.wrapped.strokeStyle}set strokeStyle(t){t!==this.cachedStrokeStyle&&(this.cachedStrokeStyle=t,this.wrapped.strokeStyle=t)}drawImage(t,e,s,i,r,n,h,o,p){this.wrapped.drawImage(t,e,s,i,r,n!=null?this.scale_.x.pos(n):n,h!=null?this.scale_.y.pos(h):h,o!=null?this.scale_.x.dim(o):o,p!=null?this.scale_.y.dim(p):p)}beginPath(){this.wrapped.beginPath()}clip(t,e){this.wrapped.clip(t,e)}fill(t,e){if(t==null)return this.wrapped.fill();this.wrapped.fill(t,e)}isPointInPath(t,e,s,i){return this.wrapped.isPointInPath(t,e,s,i)}isPointInStroke(t,e,s){return this.wrapped.isPointInStroke(t,e,s)}stroke(t){if(t==null)return this.wrapped.stroke();this.wrapped.stroke(t)}createConicGradient(t,e,s){return this.wrapped.createConicGradient(t,e,s)}createLinearGradient(t,e,s,i){return this.wrapped.createLinearGradient(t,e,s,i)}createPattern(t,e){return this.wrapped.createPattern(t,e)}createRadialGradient(t,e,s,i,r,n){return this.wrapped.createRadialGradient(t,e,s,i,r,n)}get filter(){return this.wrapped.filter}set filter(t){this.wrapped.filter=t}createImageData(t,e,s){return this.wrapped.createImageData(t,e,s)}getImageData(t,e,s,i,r){return this.wrapped.getImageData(t,e,s,i,r)}putImageData(t,e,s,i,r,n,h){this.wrapped.putImageData(t,e,s,i,r,n,h)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(t){this.wrapped.imageSmoothingEnabled=t}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(t){this.wrapped.imageSmoothingQuality=t}arc(t,e,s,i,r,n){this.wrapped.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.wrapped.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.wrapped.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.wrapped.closePath()}ellipse(t,e,s,i,r,n,h,o){this.wrapped.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.wrapped.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.wrapped.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.wrapped.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.wrapped.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){this.wrapped.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),typeof r=="number"?this.scale_.x.dim(r):r)}get lineCap(){return this.cachedLineCap??this.wrapped.lineCap}set lineCap(t){t!==this.cachedLineCap&&(this.cachedLineCap=t,this.wrapped.lineCap=t)}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(t){this.wrapped.lineDashOffset=this.scale_.x.dim(t)}get lineJoin(){return this.cachedLineJoin??this.wrapped.lineJoin}set lineJoin(t){t!==this.cachedLineJoin&&(this.cachedLineJoin=t,this.wrapped.lineJoin=t)}get lineWidth(){return this.cachedLineWidth??this.wrapped.lineWidth}set lineWidth(t){const e=this.scale_.x.dim(t);e!==this.cachedLineWidth&&(this.cachedLineWidth=e,this.wrapped.lineWidth=e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(t){const e=Array.from(t).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(e)}clearRect(t,e,s,i){this.wrapped.clearRect(t,e,s,i)}fillRect(t,e,s,i){this.wrapped.fillRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}strokeRect(t,e,s,i){this.wrapped.strokeRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(t){this.wrapped.shadowBlur=t}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(t){this.wrapped.shadowColor=t}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(t){this.wrapped.shadowOffsetX=t}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.cachedFillStyle=null,this.cachedStrokeStyle=null,this.cachedLineWidth=null,this.cachedGlobalAlpha=null,this.cachedTextAlign=null,this.cachedTextBaseline=null,this.cachedLineCap=null,this.cachedLineJoin=null,this.cachedMiterLimit=null,this.cachedFont=null,this.wrapped.restore()}save(){this.wrapped.save()}fillText(t,e,s,i,r={}){const[n,h]=this.checkAtlasFillStyle(r.useAtlas);if(n){this.atlasRegistry.get({font:this.font,textColor:h}).fillText(this,t,e,s);return}this.wrapped.fillText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}measureText(t){return this.wrapped.measureText(t)}textDimensions(t,e={}){const[s,i]=this.checkAtlasFillStyle(e.useAtlas);return s?this.atlasRegistry.get({font:this.font,textColor:i}).measureText(t):F.dimensionsFromMetrics(this.measureText(t))}strokeText(t,e,s,i){this.wrapped.strokeText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}get direction(){return this.wrapped.direction}set direction(t){this.wrapped.direction=t}get font(){return this.cachedFont!=null?this.cachedFont:this.wrapped.font}set font(t){t!==this.cachedFont&&(this.cachedFont=t,this.wrapped.font=this.cachedFont)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(t){this.wrapped.fontKerning=t}get textAlign(){return this.cachedTextAlign??this.wrapped.textAlign}set textAlign(t){t!==this.cachedTextAlign&&(this.cachedTextAlign=t,this.wrapped.textAlign=t)}get textBaseline(){return this.cachedTextBaseline??this.wrapped.textBaseline}set textBaseline(t){t!==this.cachedTextBaseline&&(this.cachedTextBaseline=t,this.wrapped.textBaseline=t)}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(t){this.wrapped.rotate(t)}scale(t,e){this.wrapped.scale(t,e),this.dpr=t}scissor(t,e=a.Q.ZERO){const s=new $(this.scale_);return t=C(t,e),s.rect(...a.Q.couple(a.jt.topLeft(t)),...a._$1.couple(a.jt.dims(t))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(t,e,s,i,r,n){this.wrapped.setTransform(t,e,s,i,r,n)}transform(t,e,s,i,r,n){this.wrapped.transform(t,e,s,i,r,n)}translate(t,e){this.wrapped.translate(t,e)}}class ${scale_;path;constructor(t=a.C$1.XY.IDENTITY,e){this.scale_=t,e instanceof Path2D||typeof e=="string"?this.path=new Path2D(e):this.path=new Path2D}addPath(t,e){this.path.addPath(t,e)}arc(t,e,s,i,r,n){this.path.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,n)}arcTo(t,e,s,i,r){this.path.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,n){this.path.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(n))}closePath(){this.path.closePath()}ellipse(t,e,s,i,r,n,h,o){this.path.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,n,h,o)}lineTo(t,e){this.path.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.path.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.path.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.path.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){const n=this.scaleRadii(r);this.path.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),n)}scaleRadii(t){return t==null?t:typeof t=="number"?this.scale_.x.dim(t):Array.isArray(t)?t.map(e=>this.scaleRadius(e)):this.scaleRadius(t)}scaleRadius(t){return typeof t=="number"?this.scale_.x.dim(t):{x:this.scale_.x.dim(t.x??0),y:this.scale_.y.dim(t.y??0)}}getPath(){return this.path}}const Q=`precision mediump float;
|
|
2
2
|
|
|
3
3
|
void main(void) {
|
|
4
4
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
@@ -8,4 +8,4 @@ void main(void) {
|
|
|
8
8
|
void main(void) {
|
|
9
9
|
gl_Position = a_position;
|
|
10
10
|
}
|
|
11
|
-
`,O=l=>new Error(`failed to compile webgl program: ${l}`),U=new Error("null shader encountered");let k=class{renderCtx;prog;vertShader;fragShader;uniformLocCache=new Map;constructor(t,e,s){this.renderCtx=t;const i=t.gl.createProgram();if(i==null)throw O("failed to create program");this.prog=i,this.vertShader=e,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(t,e){this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),a.Q.couple(e))}uniformColor(t,e){this.renderCtx.gl.uniform4fv(this.getUniformLoc(t),a.
|
|
11
|
+
`,O=l=>new Error(`failed to compile webgl program: ${l}`),U=new Error("null shader encountered");let k=class{renderCtx;prog;vertShader;fragShader;uniformLocCache=new Map;constructor(t,e,s){this.renderCtx=t;const i=t.gl.createProgram();if(i==null)throw O("failed to create program");this.prog=i,this.vertShader=e,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(t,e){this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),a.Q.couple(e))}uniformColor(t,e){this.renderCtx.gl.uniform4fv(this.getUniformLoc(t),a.zr.rgba1(e))}getUniformLoc(t){const e=this.uniformLocCache.get(t);if(e!=null)return e;const s=this.renderCtx.gl.getUniformLocation(this.prog,t);if(s==null)throw new Error(`unexpected missing uniform ${t}`);return this.uniformLocCache.set(t,s),s}compile(){const t=this.renderCtx.gl;this.compileShader(this.vertShader,t.VERTEX_SHADER),this.compileShader(this.fragShader,t.FRAGMENT_SHADER),t.linkProgram(this.prog)}compileShader(t,e){const s=this.renderCtx.gl,i=s.createShader(e);if(i==null)throw U;if(s.shaderSource(i,t),s.compileShader(i),!s.getShaderParameter(i,s.COMPILE_STATUS)){const n=s.getShaderInfoLog(i);throw s.deleteShader(i),O(n??"unknown")}s.attachShader(this.prog,i)}};const K=new Float32Array([0,0,0,0,0,0]);class W extends k{positionBuffer;constructor(t){super(t,X,Q);const e=t.gl.createBuffer();if(e==null)throw new d.qt("webgl: failed to create buffer");this.positionBuffer=e,t.gl.bindBuffer(t.gl.ARRAY_BUFFER,this.positionBuffer),t.gl.bufferData(t.gl.ARRAY_BUFFER,K,t.gl.STATIC_DRAW)}exec(){const{gl:t}=this.renderCtx,e=t.getAttribLocation(this.prog,"a_position");t.bindBuffer(t.ARRAY_BUFFER,this.positionBuffer);const s=t.createVertexArray();t.bindVertexArray(s),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,2,t.FLOAT,!1,0,0),this.setAsActive(),t.drawArrays(t.TRIANGLES,0,3)}}const v={high:1,low:0};class G{requests=new Map;cleanup=new Map;afterRender;instrumentation;handleError;constructor({afterRender:t,instrumentation:e=d.g.Instrumentation.NOOP,handleError:s}){this.afterRender=t,this.instrumentation=e,this.handleError=s,this.start()}set(t){const e=this.requests.get(t.key);if(e==null)this.requests.set(t.key,t);else{const s=v[t.priority]>=v[e.priority],i=t.canvases.length>=e.canvases.length;s&&i&&this.requests.set(t.key,t)}}render(){const{requests:t}=this;t.size!==0&&(this.runCleanupsSync(),this.renderSync(),this.requests.clear(),this.afterRender?.())}runCleanupsSync(){const{cleanup:t,requests:e}=this;t.forEach((s,i)=>{const r=e.get(i);r!=null&&(s(r),t.delete(i))})}renderSync(){const{requests:t}=this;t.forEach(e=>{try{const s=e.render();s!=null&&this.cleanup.set(e.key,s)}catch(s){this.handleError(s,"render loop failed")}})}start(){const t=()=>{try{this.render()}catch(e){this.handleError(e,"render loop failed")}requestAnimationFrame(t)};requestAnimationFrame(t)}}const x=2,g=2;class L{atlas;charDims;charMap;static DEFAULT_CHARS="0123456789.:-µmsNa∞ᴇABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%";constructor(t){const{font:e,characters:s=L.DEFAULT_CHARS,textColor:i}=t;this.charMap=new Map;const r=a.c.unique(Array.from(s)),h=new OffscreenCanvas(1,1).getContext("2d");h.font=e;const o=h.measureText("0");this.charDims=F.dimensionsFromMetrics(o),this.charDims.width+=x,this.charDims.height+=x;const p=r.length,u=this.charDims.width,m=this.charDims.height,c=Math.ceil(Math.sqrt(p)),S=Math.ceil(p/c);this.atlas=new OffscreenCanvas(u*c*g,m*(S+1)*g);const w=this.atlas.getContext("2d");w.scale(g,g),w.font=e,w.textBaseline="alphabetic",w.textAlign="left",w.fillStyle=a.zr.hex(i),w.clearRect(0,0,this.atlas.width,this.atlas.height),r.forEach((b,T)=>{const M=T%c,Y=Math.floor(T/c),z=M*u,q=(Y+1)*m;w.fillText(b,z,q),this.charMap.set(b,T)})}fillText(t,e,s,i){const{width:r,height:n}=this.charDims,h=Math.ceil(Math.sqrt(this.charMap.size));t.textAlign==="center"&&(s-=r*e.length/2),t.textBaseline==="middle"&&(i+=n/2);for(let o=0;o<e.length;o++){const p=e[o],u=this.charMap.get(p);if(u===void 0)continue;const m=u%h,c=Math.floor(u/h);t.drawImage(this.atlas,m*r*g,c*n*g+x,r*g,n*g,s+o*r,i-n-x/g,r,n)}}measureText(t){return{width:t.length*this.charDims.width,height:this.charDims.height}}}class Z{atlases;constructor(){this.atlases=new Map}get(t){const e=`${t.font}-${a.zr.hex(t.textColor)}-${t.characters}`;if(this.atlases.has(e))return this.atlases.get(e);const s=new L(t);return this.atlases.set(e,s),s}}const D=l=>(l.textRendering="optimizeSpeed",l.imageSmoothingEnabled=!1,l);class f{glCanvas;upper2dCanvas;lower2dCanvas;gl;lower2d;upper2d;region;dpr;loop;clearProgram;os;static CONTEXT_KEY=a.CSS.B("render-context");instrumentation;static create(t,e,s,i,r){const n=B(t,"render_context"),h=new f(e,s,i,r,n,d.useAdder(t),d.useErrorHandler(t));return t.set(f.CONTEXT_KEY,h),h}constructor(t,e,s,i,r,n,h){this.upper2dCanvas=s,this.lower2dCanvas=e,this.glCanvas=t,this.os=i,this.instrumentation=r,this.dpr=1;const o=this.lower2dCanvas.getContext("2d");if(o==null)throw new Error("Could not get 2D context");const p=new Z;this.lower2d=D(new y(o,p,this.dpr));const u=this.upper2dCanvas.getContext("2d");if(u==null)throw new Error("Could not get 2D context");this.upper2d=D(new y(u,p,this.dpr));const m={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},c=this.glCanvas.getContext("webgl2",m);if(c==null)throw new Error("Could not get WebGL context");c.disable(c.DEPTH_TEST),c.disable(c.STENCIL_TEST),c.disable(c.CULL_FACE),c.disable(c.DITHER),this.gl=c,this.glCanvas.oncontextlost=()=>n({variant:"error",message:"WebGL context lost"});const S=()=>{this.gl.flush(),this.gl.finish()};this.loop=new G({afterRender:S,instrumentation:this.instrumentation,handleError:h}),this.region=a.jt.ZERO,this.os==="Windows"&&(this.clearProgram=new W(this))}static useOptional(t){return t.getOptional(f.CONTEXT_KEY)}static use(t){return t.get(f.CONTEXT_KEY)}update(t){t.set(f.CONTEXT_KEY,this)}resize(t,e){a.jt.equals(this.region,t)&&this.dpr===e||(this.region=t,this.dpr=e,this.resizeCanvas(this.glCanvas),this.resizeCanvas(this.upper2dCanvas),this.resizeCanvas(this.lower2dCanvas),this.lower2d.scale(this.dpr,this.dpr),this.upper2d.scale(this.dpr,this.dpr),this.gl.viewport(0,0,a.jt.width(t)*e,a.jt.height(t)*e))}resizeCanvas(t){t.width=a.jt.width(this.region)*this.dpr,t.height=a.jt.height(this.region)*this.dpr}get aspect(){return a.jt.aspect(this.region)}scaleRegion(t){return new a.C$1.XY(a.C$1.Scale.scale(0,1).scale(a.jt.width(t)).translate(a.jt.left(t)).reBound(a.jt.width(this.region)).scale(-1,1),a.C$1.Scale.scale(0,1).scale(a.jt.height(t)).invert().translate(a.jt.top(t)).reBound(a.jt.height(this.region)).scale(-1,1).invert())}scissor(t,e=a.Q.ZERO,s){const i=[];return s.includes("upper2d")&&i.push(this.upper2d.scissor(t,e)),s.includes("lower2d")&&i.push(this.lower2d.scissor(t,e)),s.includes("gl")&&i.push(this.scissorGL(t,e)),()=>i.forEach(r=>r())}scissorGL(t,e=a.Q.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),t=C(t,e),this.gl.scissor(a.jt.left(t)*this.dpr,(a.jt.height(this.region)-a.jt.bottom(t))*this.dpr,a.jt.width(t)*this.dpr,a.jt.height(t)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(t,e=a.Q.ZERO,...s){e=a.Q.construct(e),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,t,e),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,t,e),s.includes("gl")&&this.eraseGL(t,e)}eraseGL(t,e=a.Q.ZERO){const{gl:s}=this,i=this.scissorGL(C(t,e));s.clearColor(...a.zr.rgba1(a.zr.ZERO)),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&this.clearProgram?.exec(),i()}eraseCanvas(t,e,s=a.Q.ZERO){const i=C(e,s);t.clearRect(...a.Q.couple(a.jt.topLeft(i)),...a._$1.couple(a.jt.dims(i)))}}const j=_.z.object({region:a.jt.box,enabled:_.z.boolean().optional().default(!1)}),P=["gl","lower2d","upper2d"];class A extends d.Leaf{static TYPE="eraser";schema=j;afterUpdate(t){this.deleted||(this.internal.renderCtx=f.use(t),this.renderOnLifecycleChange())}afterDelete(){this.renderOnLifecycleChange()}renderOnLifecycleChange(){this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:P})}render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.Q.construct(0),...P)}}const H={[A.TYPE]:A};exports.Context=f;exports.Eraser=A;exports.GLProgram=k;exports.Loop=G;exports.Provider=E;exports.REGISTRY=H;exports.REGISTRY$1=N;exports.eraserStateZ=j;exports.providerStateZ=I;exports.useInstrumentation=B;
|
package/dist/ether.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-C9Beoajx.cjs"),e=require("./value-Ce4T858D.cjs");require("./css-C_YE-5Xa.cjs");const r=require("./eraser-Bqibt23a.cjs");require("react");require("./types-D-yz1qsT.cjs");const i=require("./fontString-BcSXNOgW.cjs"),s=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:i.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Context:r.Context,GLProgram:r.GLProgram,Loop:r.Loop,control:e.control,request:e.request,useOptionalRequestor:e.useOptionalRequestor,useRequestor:e.useRequestor},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,BoundQuerier:e.BoundQuerier,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,boundQuerierStateZ:e.boundQuerierStateZ,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),a={[e.FLUX_STORE_KEY]:e.FLUX_STORE_CONFIG,[e.RELATIONSHIPS_FLUX_STORE_KEY]:e.RELATIONSHIP_FLUX_STORE_CONFIG,[e.RESOURCES_FLUX_STORE_KEY]:e.RESOURCE_FLUX_STORE_CONFIG},E=()=>{const o=new t.d((S,n)=>postMessage(S,n));onmessage=o.handle.bind(o);const R={...r.REGISTRY$1,...e.REGISTRY$19,...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...r.REGISTRY,...e.REGISTRY$15,...e.REGISTRY$14,...e.REGISTRY$13,...e.REGISTRY,...e.REGISTRY$12,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...t.REGISTRY$1,...e.REGISTRY$8,...e.REGISTRY$7,...t.REGISTRY,...e.REGISTRY$6,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1,...e.createRegistry({storeConfig:a})};t.render({comms:o.route("vis"),registry:R,instrumentation:new t.O({logger:new t._({filters:[t.be("info")]})})})},T=Object.freeze(Object.defineProperty({__proto__:null,render:E},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.lineplot=l;exports.pluto=T;exports.render=u;exports.theming=s;
|
package/dist/ether.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as R, R as a, S, a as n, b as E, f as i, t as T, u as l, d as _, c as I, r as G, O as Y, _ as m, e as u } from "./provider-
|
|
2
|
-
import { g as ge } from "./provider-
|
|
3
|
-
import { c as $, r as p, u as O, a as c, B as f, L as g, R as s, X as d, Y as b, b as L, l as x, x as y, y as N, d as P, e as A, f as F, g as X, h as j, i as v, j as C, k as U, m as M, n as h, o as Z, p as w, q as z, s as H, t as K, v as q, w as Q, z as k, A as B, C as D, D as J, E as V, F as W, G as ee, H as ae, I as se } from "./value-
|
|
4
|
-
import { N as be, O as Le, P as xe, Q as ye, K as Ne, M as Pe, J as Ae, S as Fe } from "./value-
|
|
5
|
-
import "./css-
|
|
6
|
-
import { C as te, G as oe, L as re, R as Re, a as Se } from "./eraser-
|
|
1
|
+
import { P as R, R as a, S, a as n, b as E, f as i, t as T, u as l, d as _, c as I, r as G, O as Y, _ as m, e as u } from "./provider-B6SgG_sT.js";
|
|
2
|
+
import { g as ge } from "./provider-B6SgG_sT.js";
|
|
3
|
+
import { c as $, r as p, u as O, a as c, B as f, L as g, R as s, X as d, Y as b, b as L, l as x, x as y, y as N, d as P, e as A, f as F, g as X, h as j, i as v, j as C, k as U, m as M, n as h, o as Z, p as w, q as z, s as H, t as K, v as q, w as Q, z as k, A as B, C as D, D as J, E as V, F as W, G as ee, H as ae, I as se } from "./value-UJNdARAu.js";
|
|
4
|
+
import { N as be, O as Le, P as xe, Q as ye, K as Ne, M as Pe, J as Ae, S as Fe } from "./value-UJNdARAu.js";
|
|
5
|
+
import "./css-Cn63X_Yv.js";
|
|
6
|
+
import { C as te, G as oe, L as re, R as Re, a as Se } from "./eraser-Bpl4bpBx.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "./types-BNX_Jj6k.js";
|
|
9
|
-
import { f as ne } from "./fontString-
|
|
9
|
+
import { f as ne } from "./fontString-D7EMGjIw.js";
|
|
10
10
|
const ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11
11
|
__proto__: null,
|
|
12
12
|
Provider: R,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function s(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var t=function o(){var r=!1;try{r=this instanceof o}catch{}return r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),t}const f=e=>e.preventDefault(),l=e=>e.stopPropagation();exports.commonjsGlobal=a;exports.getAugmentedNamespace=s;exports.getDefaultExportFromCjs=u;exports.preventDefault=f;exports.stopPropagation=l;
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var a = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function s(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function u(e) {
|
|
6
6
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
7
7
|
var n = e.default;
|
|
8
8
|
if (typeof n == "function") {
|
|
9
|
-
var t = function
|
|
10
|
-
var
|
|
9
|
+
var t = function o() {
|
|
10
|
+
var r = !1;
|
|
11
11
|
try {
|
|
12
|
-
|
|
12
|
+
r = this instanceof o;
|
|
13
13
|
} catch {
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return r ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
|
|
16
16
|
};
|
|
17
17
|
t.prototype = n.prototype;
|
|
18
18
|
} else t = {};
|
|
19
|
-
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(t,
|
|
19
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
20
|
+
var r = Object.getOwnPropertyDescriptor(e, o);
|
|
21
|
+
Object.defineProperty(t, o, r.get ? r : {
|
|
22
22
|
enumerable: !0,
|
|
23
23
|
get: function() {
|
|
24
|
-
return e[
|
|
24
|
+
return e[o];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}), t;
|
|
28
28
|
}
|
|
29
|
+
const f = (e) => e.preventDefault(), l = (e) => e.stopPropagation();
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
u as a,
|
|
32
|
+
a as c,
|
|
33
|
+
s as g,
|
|
34
|
+
f as p,
|
|
35
|
+
l as s
|
|
33
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./hooks-
|
|
1
|
+
"use strict";const a=require("./hooks-CutQY1o9.cjs"),e=require("./Text-CZrjPRjJ.cjs"),m=require("./jsx-runtime-nZSsnGb7.cjs"),u=require("react"),S=require("./Editable-CWt3zqDm.cjs"),o=require("./css-C_YE-5Xa.cjs");require("./types-D-yz1qsT.cjs");const _=t=>{const{listen:i}=e.useContext(),[g,l]=u.useState([]);return u.useEffect(()=>i(({next:[r]})=>l(r??[])),[i,l]),m.jsxRuntimeExports.jsx(S.Text,{...t,children:g.join(" ")})},d=({onDrag:t,triggers:i=[["MouseLeft"],["MouseRight"]],bound:g,loose:l=!1})=>{const r=u.useRef(null),E=u.useRef(o.Q.ZERO),M=u.useCallback(s=>{const n=o.Q.construct(s);if(r.current===null)return;const{triggers:c}=r.current;t({box:o.jt.construct(E.current,n),cursor:n,triggers:c,stage:"during"})},[t]),f=u.useCallback(s=>{const{stage:n,cursor:c}=s;n==="start"?(t({box:o.jt.construct(c),...s}),window.addEventListener("mousemove",M),r.current=s,E.current=c):n==="end"&&r.current!=null&&(t({box:o.jt.construct(E.current,c),...s}),window.removeEventListener("mousemove",M),r.current=null,E.current=o.Q.ZERO)},[t]);a.use({triggers:i,callback:f,region:g,loose:l})},R=Object.freeze(Object.defineProperty({__proto__:null,ALPHANUMERIC_KEYS:e.ALPHANUMERIC_KEYS,ALPHANUMERIC_KEYS_SET:e.ALPHANUMERIC_KEYS_SET,KEYS:e.KEYS,MOUSE_KEYS:e.MOUSE_KEYS,MOUSE_LEFT_NUMBER:e.MOUSE_LEFT_NUMBER,MOUSE_MIDDLE_NUMBER:e.MOUSE_MIDDLE_NUMBER,MOUSE_RIGHT_NUMBER:e.MOUSE_RIGHT_NUMBER,Provider:e.Provider,Status:_,Text:e.Text,compareModeConfigs:e.compareModeConfigs,determineMode:e.determineMode,diff:e.diff,eventKey:e.eventKey,filter:e.filter,flattenConfig:e.flattenConfig,isAlphanumericKey:e.isAlphanumericKey,keyZ:e.keyZ,keyboardKey:e.keyboardKey,match:e.match,matchCallback:e.matchCallback,mouseKey:e.mouseKey,mouseKeyZ:e.mouseKeyZ,purge:e.purge,purgeMouse:e.purgeMouse,toSymbols:e.toSymbols,triggerZ:e.triggerZ,use:a.use,useContext:e.useContext,useDrag:d,useFlattenedMemoConfig:e.useFlattenedMemoConfig,useHeld:a.useHeld,useHeldRef:a.useHeldRef},Symbol.toStringTag,{value:"Module"}));exports.external=R;exports.useDrag=d;
|