@synnaxlabs/x 0.27.0 → 0.28.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/.turbo/turbo-build.log +12 -12
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +1 -1
- package/dist/{index-DCwgKLH_.js → index-DPWtMAJa.js} +12 -8
- package/dist/index-DYgqYo6X.cjs +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +172 -158
- package/dist/path-577Fmn5N.cjs +1 -0
- package/dist/path-B-1-i3qC.js +72 -0
- package/dist/{series-DMUGN3Sl.js → series-DIZdmPCa.js} +1 -1
- package/dist/{series-BVB6n18P.cjs → series-DMsaUp_n.cjs} +1 -1
- package/dist/src/compare/compare.d.ts +5 -0
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +2 -1
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +34 -4
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +1 -1
- package/package.json +2 -2
- package/src/compare/compare.ts +6 -0
- package/src/deep/path.ts +8 -5
- package/src/migrate/migrate.spec.ts +78 -0
- package/src/migrate/migrate.ts +69 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/index-CvHP07Bs.cjs +0 -1
- package/dist/path-DLggFlTl.cjs +0 -1
- package/dist/path-DsFnOSKR.js +0 -71
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.28.0 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[34m Synnax - Production mode[0m
|
|
@@ -44,21 +44,21 @@ computing gzip size...
|
|
|
44
44
|
[2mdist/[22m[36mbase-DnZzEvvz.js [39m[1m[2m 1.21 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
45
45
|
[2mdist/[22m[36mobserve.js [39m[1m[2m 1.41 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
46
46
|
[2mdist/[22m[36mdimensions-D-1PnJVI.js [39m[1m[2m 1.49 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
47
|
-
[2mdist/[22m[36mpath-DsFnOSKR.js [39m[1m[2m 1.63 kB[22m[1m[22m[2m │ gzip: 0.64 kB[22m
|
|
48
47
|
[2mdist/[22m[36mindex-C9i674Sf.js [39m[1m[2m 1.68 kB[22m[1m[22m[2m │ gzip: 0.80 kB[22m
|
|
48
|
+
[2mdist/[22m[36mpath-B-1-i3qC.js [39m[1m[2m 1.69 kB[22m[1m[22m[2m │ gzip: 0.68 kB[22m
|
|
49
49
|
[2mdist/[22m[36murl.js [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.87 kB[22m
|
|
50
50
|
[2mdist/[22m[36mposition-BY9oBMZB.js [39m[1m[2m 2.25 kB[22m[1m[22m[2m │ gzip: 1.06 kB[22m
|
|
51
51
|
[2mdist/[22m[36mxy-CrgPnICw.js [39m[1m[2m 2.61 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
52
|
-
[2mdist/[22m[36mindex-
|
|
52
|
+
[2mdist/[22m[36mindex-DPWtMAJa.js [39m[1m[2m 2.76 kB[22m[1m[22m[2m │ gzip: 1.08 kB[22m
|
|
53
53
|
[2mdist/[22m[36mlocation-C6sCnzhU.js [39m[1m[2m 2.80 kB[22m[1m[22m[2m │ gzip: 1.17 kB[22m
|
|
54
54
|
[2mdist/[22m[36mindex-CzjnpuXF.js [39m[1m[2m 2.95 kB[22m[1m[22m[2m │ gzip: 1.12 kB[22m
|
|
55
55
|
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.24 kB[22m[1m[22m[2m │ gzip: 1.27 kB[22m
|
|
56
56
|
[2mdist/[22m[36mbounds-CpboA0q6.js [39m[1m[2m 4.87 kB[22m[1m[22m[2m │ gzip: 1.63 kB[22m
|
|
57
57
|
[2mdist/[22m[36mscale-BgCpxgAk.js [39m[1m[2m 5.64 kB[22m[1m[22m[2m │ gzip: 1.77 kB[22m
|
|
58
58
|
[2mdist/[22m[36mbox-B5SaODGu.js [39m[1m[2m 6.11 kB[22m[1m[22m[2m │ gzip: 2.16 kB[22m
|
|
59
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m 6.
|
|
60
|
-
[2mdist/[22m[36mseries-
|
|
61
|
-
[vite:dts] Declaration files built in
|
|
59
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 6.80 kB[22m[1m[22m[2m │ gzip: 2.61 kB[22m
|
|
60
|
+
[2mdist/[22m[36mseries-DIZdmPCa.js [39m[1m[2m54.51 kB[22m[1m[22m[2m │ gzip: 12.33 kB[22m
|
|
61
|
+
[vite:dts] Declaration files built in 3672ms.
|
|
62
62
|
|
|
63
63
|
Generated an empty chunk: "destructor".
|
|
64
64
|
[2mdist/[22m[36mdestructor.cjs [39m[1m[2m 0.01 kB[22m[1m[22m[2m │ gzip: 0.03 kB[22m
|
|
@@ -94,18 +94,18 @@ Generated an empty chunk: "destructor".
|
|
|
94
94
|
[2mdist/[22m[36mobserve.cjs [39m[1m[2m 1.00 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
95
95
|
[2mdist/[22m[36murl.cjs [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
96
96
|
[2mdist/[22m[36mdimensions-zMcb9pMk.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
97
|
-
[2mdist/[22m[36mpath-
|
|
97
|
+
[2mdist/[22m[36mpath-577Fmn5N.cjs [39m[1m[2m 1.27 kB[22m[1m[22m[2m │ gzip: 0.62 kB[22m
|
|
98
98
|
[2mdist/[22m[36mindex-BGz7XJIe.cjs [39m[1m[2m 1.32 kB[22m[1m[22m[2m │ gzip: 0.71 kB[22m
|
|
99
99
|
[2mdist/[22m[36mbase-B48bPNx5.cjs [39m[1m[2m 1.38 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m
|
|
100
100
|
[2mdist/[22m[36mposition-BwmbckCe.cjs [39m[1m[2m 1.71 kB[22m[1m[22m[2m │ gzip: 0.95 kB[22m
|
|
101
101
|
[2mdist/[22m[36mxy-cP-FXJtR.cjs [39m[1m[2m 2.00 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m
|
|
102
|
-
[2mdist/[22m[36mindex-
|
|
102
|
+
[2mdist/[22m[36mindex-DYgqYo6X.cjs [39m[1m[2m 2.11 kB[22m[1m[22m[2m │ gzip: 0.97 kB[22m
|
|
103
103
|
[2mdist/[22m[36mindex-tYmAULd8.cjs [39m[1m[2m 2.30 kB[22m[1m[22m[2m │ gzip: 1.01 kB[22m
|
|
104
104
|
[2mdist/[22m[36mlocation-55G2uRZN.cjs [39m[1m[2m 2.37 kB[22m[1m[22m[2m │ gzip: 1.04 kB[22m
|
|
105
|
-
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.
|
|
105
|
+
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.09 kB[22m
|
|
106
106
|
[2mdist/[22m[36mbounds-ZZc1c-_Z.cjs [39m[1m[2m 3.72 kB[22m[1m[22m[2m │ gzip: 1.44 kB[22m
|
|
107
107
|
[2mdist/[22m[36mscale-COuYv97b.cjs [39m[1m[2m 4.22 kB[22m[1m[22m[2m │ gzip: 1.56 kB[22m
|
|
108
108
|
[2mdist/[22m[36mbox-C6r0YnKB.cjs [39m[1m[2m 4.73 kB[22m[1m[22m[2m │ gzip: 1.94 kB[22m
|
|
109
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m 5.
|
|
110
|
-
[2mdist/[22m[36mseries-
|
|
111
|
-
[32m✓ built in 4.
|
|
109
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m 5.70 kB[22m[1m[22m[2m │ gzip: 2.25 kB[22m
|
|
110
|
+
[2mdist/[22m[36mseries-DMsaUp_n.cjs [39m[1m[2m30.04 kB[22m[1m[22m[2m │ gzip: 8.32 kB[22m
|
|
111
|
+
[32m✓ built in 4.29s[39m
|
package/dist/compare.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DYgqYo6X.cjs");exports.compare=e.compare;
|
package/dist/compare.js
CHANGED
package/dist/deep.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-577Fmn5N.cjs"),h=t=>JSON.parse(JSON.stringify(t)),j=(t,...n)=>(n.forEach(i=>{let r=t;const f=i.split(".");f.forEach((s,e)=>{e===f.length-1?delete r[s]:s in r&&(r=r[s])})}),t),d=(t,n,i="")=>{const r={},f=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let l=0;l<s.length;l++)f(s[l],e[l],`${o}[${l}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(c=>{f(s[c],e[c],o!==""?`${o}.${c}`:c)});else s!==e&&(r[o]=[s,e])};return f(t,n,i),r},p=(t,n)=>{const i=Array.isArray(t),r=Array.isArray(n);if(i!==r)return!1;if(i&&r){const e=t,o=n;if(e.length!==o.length)return!1;for(let l=0;l<e.length;l++)if(!p(e[l],o[l]))return!1;return!0}if(t==null||n==null||typeof t!="object"||typeof n!="object")return t===n;if("equals"in t)return t.equals(n);const f=Object.keys(t),s=Object.keys(n);if(f.length!==s.length)return!1;for(const e of f){const o=t[e],l=n[e];if(typeof o=="object"&&typeof l=="object"){if(!p(o,l))return!1}else if(o!==l)return!1}return!0},g=(t,n)=>{if(typeof t!="object"||t==null)return t===n;const i=Object.keys(t),r=Object.keys(n);if(r.length>i.length)return!1;for(const f of r){const s=t[f],e=n[f];if(typeof s=="object"&&typeof e=="object"){if(!g(s,e))return!1}else if(s!==e)return!1}return!0},a=(t,...n)=>{if(n.length===0)return t;const i=n.shift();if(u.isObject(t)&&u.isObject(i))for(const r in i)try{u.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),a(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(f){throw f instanceof TypeError?new TypeError(`.${r}: ${f.message}`):f}return a(t,...n)},A=(t,n,i)=>{const r=(f,s,e)=>{for(const o in s){const l=s[o];if(e!=null&&e.shape[o]){const c=e.shape[o].safeParse(l);c.success&&(f[o]=c.data)}else typeof l=="object"&&!Array.isArray(l)&&l!==null&&e&&e.shape&&e.shape[o]&&(f[o]||(f[o]={}),r(f[o],l,e.shape[o]))}return f};return r({...t},n,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:h,deleteD:j,difference:d,element:y.element,equal:p,get:y.get,has:y.has,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,remove:y.remove,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
|
package/dist/deep.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isObject as y } from "./identity.js";
|
|
2
|
-
import { e as g, g as j, h, p as A, r as d, s as O, t as k } from "./path-
|
|
2
|
+
import { e as g, g as j, h, p as A, r as d, s as O, t as k } from "./path-B-1-i3qC.js";
|
|
3
3
|
const V = (t) => JSON.parse(JSON.stringify(t)), E = (t, ...n) => (n.forEach((i) => {
|
|
4
4
|
let r = t;
|
|
5
5
|
const f = i.split(".");
|
|
@@ -48,8 +48,7 @@ const g = (e) => e != null && typeof e == "object" && "toString" in e, S = (e) =
|
|
|
48
48
|
if (e.length === 0) return 0;
|
|
49
49
|
const o = u(e[0]), r = [...e].sort(o), n = [...t].sort(o);
|
|
50
50
|
return r.every((s, i) => s === n[i]) ? 0 : -1;
|
|
51
|
-
}, h = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, l = (e) => (t, o) => e(o, t)
|
|
52
|
-
const f = (e) => e < 0, p = (e) => e > 0, d = (e) => e >= 0, A = (e, t) => {
|
|
51
|
+
}, h = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, l = (e) => (t, o) => e(o, t), T = 0, L = -1, _ = 1, f = (e) => e < 0, p = (e) => e > 0, d = (e) => e >= 0, A = (e) => e === 0, E = (e, t) => {
|
|
53
52
|
const o = /([a-zA-Z]+)|(\d+)/g, r = e.replace(/[\s_.-]+/g, "").match(o), n = t.replace(/[\s_.-]+/g, "").match(o);
|
|
54
53
|
if (!r || !n) return 0;
|
|
55
54
|
for (let s = 0; s < Math.min(r.length, n.length); s++) {
|
|
@@ -64,11 +63,12 @@ const f = (e) => e < 0, p = (e) => e > 0, d = (e) => e >= 0, A = (e, t) => {
|
|
|
64
63
|
return isNaN(Number(i)) ? -1 : 1;
|
|
65
64
|
}
|
|
66
65
|
return r.length - n.length;
|
|
67
|
-
},
|
|
66
|
+
}, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
68
67
|
__proto__: null,
|
|
69
68
|
EQUAL: 0,
|
|
70
69
|
GREATER_THAN: 1,
|
|
71
70
|
LESS_THAN: -1,
|
|
71
|
+
isEqualTo: A,
|
|
72
72
|
isGreaterThan: p,
|
|
73
73
|
isGreaterThanEqual: d,
|
|
74
74
|
isLessThan: f,
|
|
@@ -77,14 +77,18 @@ const f = (e) => e < 0, p = (e) => e > 0, d = (e) => e >= 0, A = (e, t) => {
|
|
|
77
77
|
order: h,
|
|
78
78
|
primitiveArrays: b,
|
|
79
79
|
reverseF: l,
|
|
80
|
-
stringsWithNumbers:
|
|
80
|
+
stringsWithNumbers: E,
|
|
81
81
|
unorderedPrimitiveArrays: N
|
|
82
82
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83
83
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
p as
|
|
84
|
+
T as E,
|
|
85
|
+
_ as G,
|
|
86
|
+
L,
|
|
87
|
+
p as a,
|
|
88
|
+
f as b,
|
|
89
|
+
y as c,
|
|
90
|
+
g as d,
|
|
91
|
+
A as i,
|
|
88
92
|
u as n,
|
|
89
93
|
S as p
|
|
90
94
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const g=e=>e!=null&&typeof e=="object"&&"toString"in e,h=e=>{if(g(e))return(e==null?void 0:e.toString().length)===0;switch(typeof e){case"string":return e.length===0;case"number":return e===0;case"bigint":return e===0n;case"boolean":return!e;case"undefined":return!0;case"object":return e===null}},u=(e,t=!1)=>{const o=g(e)?"stringer":typeof e;let r;switch(o){case"string":r=(n,s)=>n.localeCompare(s);break;case"stringer":r=(n,s)=>n.toString().localeCompare(s.toString());break;case"number":r=(n,s)=>Number(n)-Number(s);break;case"bigint":r=(n,s)=>BigInt(n)-BigInt(s)>0n?1:-1;break;case"boolean":r=(n,s)=>Number(n)-Number(s);break;case"undefined":r=()=>0;break;default:return console.warn(`sortFunc: unknown type ${o}`),()=>-1}return t?l(r):r},f=(e,t,o)=>{const r=u(t[e],o);return(n,s)=>r(n[e],s[e])},A=(e,t)=>e.length!==t.length?e.length-t.length:e.every((o,r)=>o===t[r])?0:-1,E=(e,t)=>{if(e.length!==t.length)return e.length-t.length;if(e.length===0)return 0;const o=u(e[0]),r=[...e].sort(o),n=[...t].sort(o);return r.every((s,i)=>s===n[i])?0:-1},p=(e,t)=>e===t?0:e==="first"&&t==="last"?1:-1,l=e=>(t,o)=>e(o,t);const m=e=>e<0,N=e=>e>0,T=e=>e>=0,b=e=>e===0,S=(e,t)=>{const o=/([a-zA-Z]+)|(\d+)/g,r=e.replace(/[\s_.-]+/g,"").match(o),n=t.replace(/[\s_.-]+/g,"").match(o);if(!r||!n)return 0;for(let s=0;s<Math.min(r.length,n.length);s++){const i=r[s],a=n[s];if(isNaN(Number(i))&&isNaN(Number(a))){const c=i.localeCompare(a);if(c!==0)return c}else if(!isNaN(Number(i))&&!isNaN(Number(a))){const c=Number(i)-Number(a);if(c!==0)return c}else return isNaN(Number(i))?-1:1}return r.length-n.length},d=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:0,GREATER_THAN:1,LESS_THAN:-1,isEqualTo:b,isGreaterThan:N,isGreaterThanEqual:T,isLessThan:m,newF:u,newFieldF:f,order:p,primitiveArrays:A,reverseF:l,stringsWithNumbers:S,unorderedPrimitiveArrays:E},Symbol.toStringTag,{value:"Module"}));exports.EQUAL=0;exports.GREATER_THAN=1;exports.LESS_THAN=-1;exports.compare=d;exports.isEqualTo=b;exports.isGreaterThan=N;exports.isLessThan=m;exports.isStringer=g;exports.newF=u;exports.primitiveIsZero=h;
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var j=Object.defineProperty;var x=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-tYmAULd8.cjs"),O=require("./index-BGz7XJIe.cjs"),L=require("./change-C-YELKx6.cjs"),q=require("./scale-COuYv97b.cjs"),s=require("./index-DYgqYo6X.cjs"),a=require("zod"),E=require("./debounce.cjs"),V=require("./deep.cjs"),i=require("./series-DMsaUp_n.cjs"),Z=require("./identity.cjs"),D=require("./types-zRwnQ1hc.cjs"),A=require("./bounds-ZZc1c-_Z.cjs"),G=require("./observe.cjs"),k=require("./record.cjs"),P=require("./external-B-DoBvh7.cjs"),_=require("./search.cjs"),H=require("./box-C6r0YnKB.cjs"),W=require("./dimensions-zMcb9pMk.cjs"),C=require("./direction-DZbN47uL.cjs"),Q=require("./location-55G2uRZN.cjs"),U=require("./position-BwmbckCe.cjs"),B=require("./spatial-BOhaO8xN.cjs"),I=require("./xy-cP-FXJtR.cjs"),M=require("./toArray.cjs"),K=require("./unique.cjs"),R=require("./url.cjs"),T=require("./worker.cjs"),u=class u extends Number{};g(u,"Absolute",255),g(u,"Default",1),g(u,"z",a.z.union([a.z.instanceof(u),a.z.number().int().min(0).max(255).transform(t=>new u(t)),a.z.instanceof(Number).transform(t=>new u(t))]));let b=u;const $=a.z.object({name:a.z.string(),key:a.z.string()}),F=e=>a.z.object({subject:$,resource:e,authority:b.z}),J=(...e)=>t=>t.filter(r=>{let n=!1;return r.to!=null&&(n=e.includes(r.to.resource)),r.from!=null&&!n&&(n=e.includes(r.from.resource)),n}),X=Object.freeze(Object.defineProperty({__proto__:null,Authority:b,filterTransfersByChannelKey:J,stateZ:F,subjectZ:$},Symbol.toStringTag,{value:"Module"})),l=class l extends Error{constructor(){super(l.MESSAGE)}matches(t){return typeof t=="string"?t.includes(l.MESSAGE):t instanceof l||t.message.includes(l.MESSAGE)}};g(l,"MESSAGE","canceled");let h=l;const Y=new h,ee=Object.freeze(Object.defineProperty({__proto__:null,CANCELED:Y},Symbol.toStringTag,{value:"Module"})),re=e=>e?-1:1,v=a.z.string().regex(/^\d+\.\d+\.\d+$/),y=(e,t,r={})=>{r.checkMajor??(r.checkMajor=!0),r.checkMinor??(r.checkMinor=!0),r.checkPatch??(r.checkPatch=!0);const n=v.parse(e),d=v.parse(t),[S,m,f]=n.split(".").map(Number),[o,c,p]=d.split(".").map(Number);if(r.checkMajor){if(S<o)return s.LESS_THAN;if(S>o)return s.GREATER_THAN}if(r.checkMinor){if(m<c)return s.LESS_THAN;if(m>c)return s.GREATER_THAN}if(r.checkPatch){if(f<p)return s.LESS_THAN;if(f>p)return s.GREATER_THAN}return s.EQUAL},te=(e,t,r={})=>s.isEqualTo(y(e,t,r)),w=(e,t,r={})=>s.isGreaterThan(y(e,t,r)),ne=(e,t,r={})=>s.isLessThan(y(e,t,r)),oe=({name:e,migrate:t})=>r=>{try{const n=t(r);return console.log(`${e} migrated: ${r.version} -> ${n.version}`),n}catch(n){throw console.log(`${e} failed to migrate from ${r.version}`),console.error(n),n}},ie=({name:e,migrations:t,targetSchema:r,def:n})=>{const d=Object.keys(t).sort(y).pop();if(d==null)return o=>{if(o.version!==n.version)return console.log(`${e} version ${o.version} is newer than latest version of ${n.version}.
|
|
2
2
|
Returning default instead.
|
|
3
|
-
`),
|
|
3
|
+
`),n;try{return r!=null?r.parse(o):o}catch(c){return console.log(`${e} failed to parse default. Exiting with default`),console.error(c),n}};const S=Object.keys(t).length;let m=!1;const f=o=>{try{if(S===0||w(o.version,d))return console.log(m?`${e} ${o.version} now up to date`:`${e} version ${o.version} is up to date with target version ${n.version}`),o;const c=o.version,p=t[c],z=p(o);return m=!0,f(z)}catch(c){return console.log(`${e} failed to migrate from ${o.version} to ${d}`),console.error(c),n}};return o=>{try{return f(o)}catch(c){return console.log(`${e} failed to parse final result. Exiting with default`),console.error(c),n}}},se=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:y,createMigration:oe,migrator:ie,semVerNewer:w,semVerOlder:ne,semVerZ:v,versionsEqual:te},Symbol.toStringTag,{value:"Module"})),ce=e=>{if(e===void 0||typeof e=="string"||typeof e=="number")return e;if(e.toString===void 0)throw new Error("invalid renderer");return e.toString()},ae=e=>Array.isArray(e)?[...e]:typeof e=="object"&&e!==null?{...e}:e;exports.binary=N.encoder;exports.caseconv=O.caseconv;exports.change=L.change;exports.clamp=q.clamp;exports.scale=q.scale;exports.compare=s.compare;exports.isStringer=s.isStringer;exports.primitiveIsZero=s.primitiveIsZero;exports.debounce=E.debounce;exports.throttle=E.throttle;exports.deep=V.deep;exports.DataType=i.DataType;exports.Density=i.Density;exports.MultiSeries=i.MultiSeries;exports.Rate=i.Rate;exports.Series=i.Series;exports.Size=i.Size;exports.TimeRange=i.TimeRange;exports.TimeSpan=i.TimeSpan;exports.TimeStamp=i.TimeStamp;exports.addSamples=i.addSamples;exports.convertDataType=i.convertDataType;exports.id=i.id;exports.isCrudeSeries=i.isCrudeSeries;exports.isTelemValue=i.isTelemValue;exports.typedArrayZ=i.typedArrayZ;exports.isObject=Z.isObject;exports.kv=D.types;exports.bounds=A.bounds;exports.math=A.math;exports.observe=G.observe;exports.getEntries=k.getEntries;exports.unknownRecordZ=k.unknownRecordZ;exports.runtime=P.external;exports.Search=_.Search;exports.box=H.box;exports.dimensions=W.dimensions;exports.direction=C.direction;exports.location=Q.location;exports.position=U.position;exports.spatial=B.spatial;exports.xy=I.xy;exports.nullToArr=M.nullToArr;exports.toArray=M.toArray;exports.unique=K.unique;exports.URL=R.URL;exports.buildQueryString=R.buildQueryString;exports.RoutedWorker=T.RoutedWorker;exports.TypedWorker=T.TypedWorker;exports.createMockWorkers=T.createMockWorkers;exports.control=X;exports.convertRenderV=ce;exports.errors=ee;exports.invert=re;exports.migrate=se;exports.shallowCopy=ae;
|
package/dist/index.js
CHANGED
|
@@ -1,196 +1,210 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var m = (
|
|
4
|
-
import { e as
|
|
5
|
-
import { a as
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
8
|
-
import { i as w, a as
|
|
9
|
-
import { c as
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var $ = (r, o, e) => o in r ? T(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
3
|
+
var m = (r, o, e) => $(r, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { e as I } from "./index-CzjnpuXF.js";
|
|
5
|
+
import { a as F } from "./index-C9i674Sf.js";
|
|
6
|
+
import { c as X } from "./change-DLl6DccR.js";
|
|
7
|
+
import { c as rr, s as er } from "./scale-BgCpxgAk.js";
|
|
8
|
+
import { L as b, G as y, E as k, i as w, a as j, b as A } from "./index-DPWtMAJa.js";
|
|
9
|
+
import { c as tr, d as nr, p as sr } from "./index-DPWtMAJa.js";
|
|
10
10
|
import { z as i } from "zod";
|
|
11
|
-
import { debounce as
|
|
12
|
-
import { deep as
|
|
13
|
-
import { d as
|
|
14
|
-
import { isObject as
|
|
15
|
-
import { t as
|
|
16
|
-
import { b as
|
|
17
|
-
import { observe as
|
|
18
|
-
import { getEntries as
|
|
19
|
-
import { e as
|
|
20
|
-
import { Search as
|
|
21
|
-
import { b as
|
|
22
|
-
import { d as
|
|
23
|
-
import { d as
|
|
24
|
-
import { l as
|
|
25
|
-
import { p as
|
|
26
|
-
import { s as
|
|
27
|
-
import { x as
|
|
28
|
-
import { nullToArr as
|
|
29
|
-
import { unique as
|
|
30
|
-
import { URL as
|
|
31
|
-
import { RoutedWorker as
|
|
11
|
+
import { debounce as ar, throttle as cr } from "./debounce.js";
|
|
12
|
+
import { deep as fr } from "./deep.js";
|
|
13
|
+
import { d as mr, D as pr, M as gr, R as dr, S as xr, e as br, c as yr, b as Sr, T as hr, a as vr, g as Er, h as Mr, i as Tr, f as $r, t as kr } from "./series-DIZdmPCa.js";
|
|
14
|
+
import { isObject as jr } from "./identity.js";
|
|
15
|
+
import { t as Or } from "./types-BpAJW2TM.js";
|
|
16
|
+
import { b as Nr, m as zr } from "./bounds-CpboA0q6.js";
|
|
17
|
+
import { observe as Lr } from "./observe.js";
|
|
18
|
+
import { getEntries as Vr, unknownRecordZ as Dr } from "./record.js";
|
|
19
|
+
import { e as _r } from "./external-CO221aaF.js";
|
|
20
|
+
import { Search as Cr } from "./search.js";
|
|
21
|
+
import { b as Br } from "./box-B5SaODGu.js";
|
|
22
|
+
import { d as Qr } from "./dimensions-D-1PnJVI.js";
|
|
23
|
+
import { d as Ir } from "./direction-CScbfCdT.js";
|
|
24
|
+
import { l as Fr } from "./location-C6sCnzhU.js";
|
|
25
|
+
import { p as Xr } from "./position-BY9oBMZB.js";
|
|
26
|
+
import { s as re } from "./spatial-DozyssiN.js";
|
|
27
|
+
import { x as oe } from "./xy-CrgPnICw.js";
|
|
28
|
+
import { nullToArr as ne, toArray as se } from "./toArray.js";
|
|
29
|
+
import { unique as ae } from "./unique.js";
|
|
30
|
+
import { URL as le, buildQueryString as fe } from "./url.js";
|
|
31
|
+
import { RoutedWorker as me, TypedWorker as pe, createMockWorkers as ge } from "./worker.js";
|
|
32
32
|
const a = class a extends Number {
|
|
33
33
|
};
|
|
34
34
|
m(a, "Absolute", 255), m(a, "Default", 1), m(a, "z", i.union([
|
|
35
35
|
i.instanceof(a),
|
|
36
|
-
i.number().int().min(0).max(255).transform((
|
|
37
|
-
i.instanceof(Number).transform((
|
|
36
|
+
i.number().int().min(0).max(255).transform((o) => new a(o)),
|
|
37
|
+
i.instanceof(Number).transform((o) => new a(o))
|
|
38
38
|
]));
|
|
39
|
-
let
|
|
40
|
-
const
|
|
39
|
+
let x = a;
|
|
40
|
+
const v = i.object({
|
|
41
41
|
name: i.string(),
|
|
42
42
|
key: i.string()
|
|
43
|
-
}),
|
|
44
|
-
subject:
|
|
45
|
-
resource:
|
|
46
|
-
authority:
|
|
47
|
-
}),
|
|
48
|
-
let
|
|
49
|
-
return
|
|
50
|
-
}),
|
|
43
|
+
}), O = (r) => i.object({
|
|
44
|
+
subject: v,
|
|
45
|
+
resource: r,
|
|
46
|
+
authority: x.z
|
|
47
|
+
}), R = (...r) => (o) => o.filter((e) => {
|
|
48
|
+
let t = !1;
|
|
49
|
+
return e.to != null && (t = r.includes(e.to.resource)), e.from != null && !t && (t = r.includes(e.from.resource)), t;
|
|
50
|
+
}), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
51
51
|
__proto__: null,
|
|
52
|
-
Authority:
|
|
53
|
-
filterTransfersByChannelKey:
|
|
54
|
-
stateZ:
|
|
55
|
-
subjectZ:
|
|
52
|
+
Authority: x,
|
|
53
|
+
filterTransfersByChannelKey: R,
|
|
54
|
+
stateZ: O,
|
|
55
|
+
subjectZ: v
|
|
56
56
|
}, Symbol.toStringTag, { value: "Module" })), c = class c extends Error {
|
|
57
57
|
constructor() {
|
|
58
58
|
super(c.MESSAGE);
|
|
59
59
|
}
|
|
60
60
|
/** Returns true if the error or message is a cancellation error" */
|
|
61
|
-
matches(
|
|
62
|
-
return typeof
|
|
61
|
+
matches(o) {
|
|
62
|
+
return typeof o == "string" ? o.includes(c.MESSAGE) : o instanceof c || o.message.includes(c.MESSAGE);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
m(c, "MESSAGE", "canceled");
|
|
66
|
-
let
|
|
67
|
-
const
|
|
66
|
+
let S = c;
|
|
67
|
+
const N = new S(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
68
68
|
__proto__: null,
|
|
69
|
-
CANCELED:
|
|
70
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
69
|
+
CANCELED: N
|
|
70
|
+
}, Symbol.toStringTag, { value: "Module" })), C = (r) => r ? -1 : 1, h = i.string().regex(/^\d+\.\d+\.\d+$/), p = (r, o, e = {}) => {
|
|
71
|
+
e.checkMajor ?? (e.checkMajor = !0), e.checkMinor ?? (e.checkMinor = !0), e.checkPatch ?? (e.checkPatch = !0);
|
|
72
|
+
const t = h.parse(r), l = h.parse(o), [g, f, u] = t.split(".").map(Number), [n, s, d] = l.split(".").map(Number);
|
|
73
|
+
if (e.checkMajor) {
|
|
74
|
+
if (g < n) return b;
|
|
75
|
+
if (g > n) return y;
|
|
76
|
+
}
|
|
77
|
+
if (e.checkMinor) {
|
|
78
|
+
if (f < s) return b;
|
|
79
|
+
if (f > s) return y;
|
|
80
|
+
}
|
|
81
|
+
if (e.checkPatch) {
|
|
82
|
+
if (u < d) return b;
|
|
83
|
+
if (u > d) return y;
|
|
84
|
+
}
|
|
85
|
+
return k;
|
|
86
|
+
}, z = (r, o, e = {}) => w(p(r, o, e)), E = (r, o, e = {}) => j(p(r, o, e)), G = (r, o, e = {}) => A(p(r, o, e)), L = ({
|
|
87
|
+
name: r,
|
|
88
|
+
migrate: o
|
|
89
|
+
}) => (e) => {
|
|
77
90
|
try {
|
|
78
|
-
const
|
|
79
|
-
return console.log(`${
|
|
80
|
-
} catch (
|
|
81
|
-
throw console.log(`${
|
|
91
|
+
const t = o(e);
|
|
92
|
+
return console.log(`${r} migrated: ${e.version} -> ${t.version}`), t;
|
|
93
|
+
} catch (t) {
|
|
94
|
+
throw console.log(`${r} failed to migrate from ${e.version}`), console.error(t), t;
|
|
82
95
|
}
|
|
83
|
-
},
|
|
84
|
-
name:
|
|
85
|
-
migrations:
|
|
86
|
-
targetSchema:
|
|
87
|
-
def:
|
|
96
|
+
}, P = ({
|
|
97
|
+
name: r,
|
|
98
|
+
migrations: o,
|
|
99
|
+
targetSchema: e,
|
|
100
|
+
def: t
|
|
88
101
|
}) => {
|
|
89
|
-
const l = Object.keys(
|
|
102
|
+
const l = Object.keys(o).sort(p).pop();
|
|
90
103
|
if (l == null)
|
|
91
|
-
return (
|
|
92
|
-
if (
|
|
104
|
+
return (n) => {
|
|
105
|
+
if (n.version !== t.version)
|
|
93
106
|
return console.log(
|
|
94
|
-
`${
|
|
107
|
+
`${r} version ${n.version} is newer than latest version of ${t.version}.
|
|
95
108
|
Returning default instead.
|
|
96
109
|
`
|
|
97
|
-
),
|
|
110
|
+
), t;
|
|
98
111
|
try {
|
|
99
|
-
return
|
|
100
|
-
} catch (
|
|
101
|
-
return console.log(`${
|
|
112
|
+
return e != null ? e.parse(n) : n;
|
|
113
|
+
} catch (s) {
|
|
114
|
+
return console.log(`${r} failed to parse default. Exiting with default`), console.error(s), t;
|
|
102
115
|
}
|
|
103
116
|
};
|
|
104
|
-
const
|
|
105
|
-
let
|
|
106
|
-
const
|
|
117
|
+
const g = Object.keys(o).length;
|
|
118
|
+
let f = !1;
|
|
119
|
+
const u = (n) => {
|
|
107
120
|
try {
|
|
108
|
-
if (
|
|
109
|
-
return console.log(
|
|
110
|
-
const
|
|
111
|
-
return
|
|
112
|
-
} catch (
|
|
121
|
+
if (g === 0 || E(n.version, l))
|
|
122
|
+
return console.log(f ? `${r} ${n.version} now up to date` : `${r} version ${n.version} is up to date with target version ${t.version}`), n;
|
|
123
|
+
const s = n.version, d = o[s], M = d(n);
|
|
124
|
+
return f = !0, u(M);
|
|
125
|
+
} catch (s) {
|
|
113
126
|
return console.log(
|
|
114
|
-
`${
|
|
115
|
-
), console.error(
|
|
127
|
+
`${r} failed to migrate from ${n.version} to ${l}`
|
|
128
|
+
), console.error(s), t;
|
|
116
129
|
}
|
|
117
130
|
};
|
|
118
|
-
return (
|
|
131
|
+
return (n) => {
|
|
119
132
|
try {
|
|
120
|
-
return
|
|
121
|
-
} catch (
|
|
122
|
-
return console.log(`${
|
|
133
|
+
return u(n);
|
|
134
|
+
} catch (s) {
|
|
135
|
+
return console.log(`${r} failed to parse final result. Exiting with default`), console.error(s), t;
|
|
123
136
|
}
|
|
124
137
|
};
|
|
125
|
-
},
|
|
138
|
+
}, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
126
139
|
__proto__: null,
|
|
127
|
-
compareSemVer:
|
|
128
|
-
createMigration:
|
|
129
|
-
migrator:
|
|
130
|
-
semVerNewer:
|
|
131
|
-
semVerOlder:
|
|
132
|
-
semVerZ:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
compareSemVer: p,
|
|
141
|
+
createMigration: L,
|
|
142
|
+
migrator: P,
|
|
143
|
+
semVerNewer: E,
|
|
144
|
+
semVerOlder: G,
|
|
145
|
+
semVerZ: h,
|
|
146
|
+
versionsEqual: z
|
|
147
|
+
}, Symbol.toStringTag, { value: "Module" })), B = (r) => {
|
|
148
|
+
if (r === void 0 || typeof r == "string" || typeof r == "number")
|
|
149
|
+
return r;
|
|
150
|
+
if (r.toString === void 0) throw new Error("invalid renderer");
|
|
151
|
+
return r.toString();
|
|
152
|
+
}, H = (r) => Array.isArray(r) ? [...r] : typeof r == "object" && r !== null ? { ...r } : r;
|
|
139
153
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
154
|
+
mr as DataType,
|
|
155
|
+
pr as Density,
|
|
156
|
+
gr as MultiSeries,
|
|
157
|
+
dr as Rate,
|
|
158
|
+
me as RoutedWorker,
|
|
159
|
+
Cr as Search,
|
|
160
|
+
xr as Series,
|
|
161
|
+
br as Size,
|
|
162
|
+
yr as TimeRange,
|
|
163
|
+
Sr as TimeSpan,
|
|
164
|
+
hr as TimeStamp,
|
|
165
|
+
pe as TypedWorker,
|
|
166
|
+
le as URL,
|
|
167
|
+
vr as addSamples,
|
|
168
|
+
I as binary,
|
|
169
|
+
Nr as bounds,
|
|
170
|
+
Br as box,
|
|
171
|
+
fe as buildQueryString,
|
|
172
|
+
F as caseconv,
|
|
173
|
+
X as change,
|
|
174
|
+
rr as clamp,
|
|
175
|
+
tr as compare,
|
|
176
|
+
_ as control,
|
|
177
|
+
Er as convertDataType,
|
|
178
|
+
B as convertRenderV,
|
|
179
|
+
ge as createMockWorkers,
|
|
180
|
+
ar as debounce,
|
|
181
|
+
fr as deep,
|
|
182
|
+
Qr as dimensions,
|
|
183
|
+
Ir as direction,
|
|
184
|
+
q as errors,
|
|
185
|
+
Vr as getEntries,
|
|
186
|
+
Mr as id,
|
|
187
|
+
C as invert,
|
|
188
|
+
Tr as isCrudeSeries,
|
|
189
|
+
jr as isObject,
|
|
190
|
+
nr as isStringer,
|
|
191
|
+
$r as isTelemValue,
|
|
192
|
+
Or as kv,
|
|
193
|
+
Fr as location,
|
|
194
|
+
zr as math,
|
|
195
|
+
W as migrate,
|
|
196
|
+
ne as nullToArr,
|
|
197
|
+
Lr as observe,
|
|
198
|
+
Xr as position,
|
|
199
|
+
sr as primitiveIsZero,
|
|
200
|
+
_r as runtime,
|
|
201
|
+
er as scale,
|
|
202
|
+
H as shallowCopy,
|
|
203
|
+
re as spatial,
|
|
204
|
+
cr as throttle,
|
|
205
|
+
se as toArray,
|
|
206
|
+
kr as typedArrayZ,
|
|
207
|
+
ae as unique,
|
|
208
|
+
Dr as unknownRecordZ,
|
|
209
|
+
oe as xy
|
|
196
210
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=(l,n,t=".")=>{const r=l.split(t);return r.map((s,o)=>{const i=n(s,o,r);return i==null?null:typeof i=="string"?i:i.join(t)}).filter(s=>s!=null).join(t)},a=(l,n,t={optional:!1,separator:"."})=>{t.separator??(t.separator=".");const{optional:r,getter:e=(i,u)=>i[u]}=t,s=n.split(t.separator);if(s.length===1&&s[0]==="")return l;let o=l;for(const i of s){const u=e(o,i);if(u==null){if(r)return null;throw new Error(`Path ${n} does not exist. ${i} is null`)}o=u}return o},f=(l,n,t)=>{const r=n.split(".");let e=l;for(let s=0;s<r.length-1;s++){const o=r[s];e[o]==null&&(e[o]={}),e=e[o]}e[r[r.length-1]]=t},h=(l,n)=>{const t=n.split(".");let r=l;for(let e=0;e<t.length-1;e++){const s=t[e];if(r[s]==null)return;r=r[s]}if(Array.isArray(r)){const e=parseInt(t[t.length-1],10);if(isNaN(e))return;r.splice(e,1);return}delete r[t[t.length-1]]},p=(l,n)=>{const t=l.split(".");return n<0?t[t.length+n]:t[n]},g=(l,n)=>{try{return a(l,n),!0}catch{return!1}},m=(l,n)=>{if(n.length===0)return!0;const t=l.split("."),r=n.split(".");if(r.length>t.length)return!1;for(let e=0;e<r.length;e++){const s=t[e],o=r[e];if(o!=="*"&&s!==o)return!1}return!0};exports.element=p;exports.get=a;exports.has=g;exports.pathsMatch=m;exports.remove=h;exports.set=f;exports.transformPath=c;
|