@synnaxlabs/x 0.34.0 → 0.36.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 +30 -30
- package/dist/bounds-8aFLdbEj.cjs +1 -0
- package/dist/{bounds-CFI9wDXn.js → bounds-BtccGJW0.js} +22 -18
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/{box-Mf8E1Ypp.cjs → box-BpSX4si6.cjs} +1 -1
- package/dist/{box-DVCNGsJG.js → box-CYXc9-qp.js} +2 -2
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +169 -151
- package/dist/location-Cn1ByVTZ.js +95 -0
- package/dist/location-DLP2ZS0o.cjs +1 -0
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/path-1tZLZ4AN.cjs +1 -0
- package/dist/path-DD6ytXzr.js +76 -0
- package/dist/{position-CFc9RsSn.js → position-DJXB-pDS.js} +2 -2
- package/dist/{position-DKhPhvPh.cjs → position-JCN6-sJC.cjs} +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/record.cjs +1 -1
- package/dist/record.js +5 -4
- package/dist/scale-BI4wJF3b.cjs +1 -0
- package/dist/{scale-DNQE1LMm.js → scale-rZ1YKDFy.js} +70 -67
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BN9CILsQ.cjs +11 -0
- package/dist/{series-sjWkW8qe.js → series-CnEQe1dh.js} +473 -370
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +6 -6
- package/dist/src/breaker/breaker.d.ts +33 -0
- package/dist/src/breaker/breaker.d.ts.map +1 -0
- package/dist/src/breaker/breaker.spec.d.ts +2 -0
- package/dist/src/breaker/breaker.spec.d.ts.map +1 -0
- package/dist/src/breaker/index.d.ts +2 -0
- package/dist/src/breaker/index.d.ts.map +1 -0
- package/dist/src/change/change.d.ts +5 -5
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/control/control.d.ts +5 -5
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/deep/path.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/mock/MockGLBufferController.d.ts +2 -2
- package/dist/src/mock/MockGLBufferController.d.ts.map +1 -1
- package/dist/src/record.d.ts +1 -0
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/record.spec.d.ts +2 -0
- package/dist/src/record.spec.d.ts.map +1 -0
- package/dist/src/sleep/index.d.ts +2 -0
- package/dist/src/sleep/index.d.ts.map +1 -0
- package/dist/src/sleep/sleep.d.ts +3 -0
- package/dist/src/sleep/sleep.d.ts.map +1 -0
- package/dist/src/spatial/bounds/bounds.d.ts +12 -0
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +1 -0
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +17 -1
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +36 -1
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/telem/gl.d.ts +2 -2
- package/dist/src/telem/gl.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +16 -9
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +43 -2
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/zodutil/zodutil.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +11 -10
- package/dist/xy-DQdccWlc.js +128 -0
- package/dist/xy-LADI2wVU.cjs +1 -0
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zodutil-BRjUdYAv.cjs +1 -0
- package/dist/{zodutil-Tmuc4CNq.js → zodutil-DI4gVZkT.js} +11 -11
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +1 -1
- package/package.json +64 -65
- package/src/binary/encoder.ts +3 -3
- package/src/breaker/breaker.spec.ts +74 -0
- package/src/breaker/breaker.ts +32 -0
- package/src/breaker/index.ts +1 -0
- package/src/deep/path.ts +6 -1
- package/src/index.ts +1 -0
- package/src/mock/MockGLBufferController.ts +6 -6
- package/src/record.spec.ts +29 -0
- package/src/record.ts +6 -0
- package/src/sleep/index.ts +1 -0
- package/src/sleep/sleep.ts +6 -0
- package/src/spatial/bounds/bounds.spec.ts +6 -0
- package/src/spatial/bounds/bounds.ts +16 -0
- package/src/spatial/location/location.ts +1 -0
- package/src/spatial/scale/scale.spec.ts +62 -51
- package/src/spatial/scale/scale.ts +21 -12
- package/src/spatial/xy/xy.spec.ts +22 -1
- package/src/spatial/xy/xy.ts +101 -5
- package/src/strings/strings.spec.ts +0 -4
- package/src/telem/gl.ts +6 -2
- package/src/telem/series.spec.ts +3 -3
- package/src/telem/series.ts +45 -16
- package/src/telem/telem.ts +121 -2
- package/src/zodutil/zodutil.ts +4 -1
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/bounds-DzCDHgdE.cjs +0 -1
- package/dist/location-CI9x53qR.js +0 -94
- package/dist/location-DetomF8Z.cjs +0 -1
- package/dist/path-BBCx3K6k.cjs +0 -1
- package/dist/path-CmnoH3RC.js +0 -72
- package/dist/scale-CT61XD_X.cjs +0 -1
- package/dist/series-DWLXo7J6.cjs +0 -11
- package/dist/xy-CrgPnICw.js +0 -89
- package/dist/xy-cP-FXJtR.cjs +0 -1
- package/dist/zodutil-C6RYzvXd.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
var
|
|
2
|
-
var T = (e, t, r) => t in e ?
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var T = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var p = (e, t, r) => T(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { e as
|
|
5
|
-
import { a as
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
8
|
-
import { L as S, G as
|
|
9
|
-
import { c as
|
|
4
|
+
import { e as ne } from "./index-BBa2mWG1.js";
|
|
5
|
+
import { a as ie } from "./index-eue4dSQX.js";
|
|
6
|
+
import { c as ce } from "./change-DLl6DccR.js";
|
|
7
|
+
import { c as ue, s as fe } from "./scale-rZ1YKDFy.js";
|
|
8
|
+
import { L as S, G as v, E as k, i as A, a as _, b as O } from "./index-HQonyH7n.js";
|
|
9
|
+
import { c as de, d as pe, p as ge } from "./index-HQonyH7n.js";
|
|
10
10
|
import { z as c } from "zod";
|
|
11
|
-
import { debounce as
|
|
12
|
-
import { deep as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { d as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
11
|
+
import { debounce as xe, throttle as he } from "./debounce.js";
|
|
12
|
+
import { deep as Se } from "./deep.js";
|
|
13
|
+
import { b as x } from "./series-CnEQe1dh.js";
|
|
14
|
+
import { d as $e, D as Ee, M as je, R as we, S as Me, e as Te, c as ke, T as Ae, a as _e, g as Oe, h as Re, i as ze, f as Le, s as Ne, t as Pe } from "./series-CnEQe1dh.js";
|
|
15
|
+
import { isObject as Ge } from "./identity.js";
|
|
16
|
+
import { t as Ze } from "./types-BpAJW2TM.js";
|
|
17
|
+
import { b as Ie, f as We } from "./bounds-BtccGJW0.js";
|
|
18
|
+
import { observe as Be } from "./observe.js";
|
|
19
|
+
import { getEntries as He, mapValues as Qe, unknownRecordZ as Ue } from "./record.js";
|
|
20
|
+
import { e as Ke } from "./external-sVtvYJS6.js";
|
|
21
|
+
import { Search as Ye } from "./search.js";
|
|
22
|
+
import { b as rr } from "./box-CYXc9-qp.js";
|
|
23
|
+
import { d as or } from "./dimensions-D-1PnJVI.js";
|
|
24
|
+
import { d as sr } from "./direction-CScbfCdT.js";
|
|
25
|
+
import { l as ar } from "./location-Cn1ByVTZ.js";
|
|
26
|
+
import { p as lr } from "./position-DJXB-pDS.js";
|
|
27
|
+
import { s as fr } from "./spatial-DozyssiN.js";
|
|
28
|
+
import { x as dr } from "./xy-DQdccWlc.js";
|
|
29
|
+
import { nullToArr as gr, toArray as br } from "./toArray.js";
|
|
30
|
+
import { unique as hr } from "./unique.js";
|
|
31
|
+
import { URL as Sr, buildQueryString as vr } from "./url.js";
|
|
32
|
+
import { RoutedWorker as Er, TypedWorker as jr, createMockWorkers as wr } from "./worker.js";
|
|
33
|
+
import { z as Tr } from "./zodutil-DI4gVZkT.js";
|
|
34
|
+
const u = class u extends Number {
|
|
34
35
|
};
|
|
35
|
-
p(
|
|
36
|
-
c.instanceof(
|
|
37
|
-
c.number().int().min(0).max(255).transform((t) => new
|
|
38
|
-
c.instanceof(Number).transform((t) => new
|
|
36
|
+
p(u, "Absolute", 255), p(u, "Default", 1), p(u, "z", c.union([
|
|
37
|
+
c.instanceof(u),
|
|
38
|
+
c.number().int().min(0).max(255).transform((t) => new u(t)),
|
|
39
|
+
c.instanceof(Number).transform((t) => new u(t))
|
|
39
40
|
]));
|
|
40
|
-
let h =
|
|
41
|
-
const
|
|
41
|
+
let h = u;
|
|
42
|
+
const j = c.object({
|
|
42
43
|
name: c.string(),
|
|
43
44
|
key: c.string()
|
|
44
|
-
}),
|
|
45
|
-
subject:
|
|
45
|
+
}), R = (e) => c.object({
|
|
46
|
+
subject: j,
|
|
46
47
|
resource: e,
|
|
47
48
|
authority: h.z
|
|
48
|
-
}),
|
|
49
|
+
}), z = (...e) => (t) => t.filter((r) => {
|
|
49
50
|
let n = !1;
|
|
50
51
|
return r.to != null && (n = e.includes(r.to.resource)), r.from != null && !n && (n = e.includes(r.from.resource)), n;
|
|
51
|
-
}),
|
|
52
|
+
}), Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
52
53
|
__proto__: null,
|
|
53
54
|
Authority: h,
|
|
54
|
-
filterTransfersByChannelKey:
|
|
55
|
-
stateZ:
|
|
56
|
-
subjectZ:
|
|
55
|
+
filterTransfersByChannelKey: z,
|
|
56
|
+
stateZ: R,
|
|
57
|
+
subjectZ: j
|
|
57
58
|
}, Symbol.toStringTag, { value: "Module" })), m = class m extends Error {
|
|
58
59
|
constructor() {
|
|
59
60
|
super(m.MESSAGE);
|
|
@@ -65,26 +66,26 @@ const E = c.object({
|
|
|
65
66
|
};
|
|
66
67
|
p(m, "MESSAGE", "canceled");
|
|
67
68
|
let $ = m;
|
|
68
|
-
const
|
|
69
|
+
const L = new $(), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
69
70
|
__proto__: null,
|
|
70
|
-
CANCELED:
|
|
71
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
71
|
+
CANCELED: L
|
|
72
|
+
}, Symbol.toStringTag, { value: "Module" })), J = (e) => e ? -1 : 1, E = c.string().regex(/^\d+\.\d+\.\d+$/), g = (e, t, r = {}) => {
|
|
72
73
|
r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
|
|
73
|
-
const n =
|
|
74
|
+
const n = E.parse(e), s = E.parse(t), [l, f, d] = n.split(".").map(Number), [i, o, a] = s.split(".").map(Number);
|
|
74
75
|
if (r.checkMajor) {
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
76
|
+
if (l < i) return S;
|
|
77
|
+
if (l > i) return v;
|
|
77
78
|
}
|
|
78
79
|
if (r.checkMinor) {
|
|
79
|
-
if (
|
|
80
|
-
if (
|
|
80
|
+
if (f < o) return S;
|
|
81
|
+
if (f > o) return v;
|
|
81
82
|
}
|
|
82
83
|
if (r.checkPatch) {
|
|
83
84
|
if (d < a) return S;
|
|
84
|
-
if (d > a) return
|
|
85
|
+
if (d > a) return v;
|
|
85
86
|
}
|
|
86
|
-
return
|
|
87
|
-
}, N = (e, t, r = {}) => A(g(e, t, r)),
|
|
87
|
+
return k;
|
|
88
|
+
}, N = (e, t, r = {}) => A(g(e, t, r)), w = (e, t, r = {}) => _(g(e, t, r)), P = (e, t, r = {}) => O(g(e, t, r)), C = ({
|
|
88
89
|
name: e,
|
|
89
90
|
migrate: t
|
|
90
91
|
}) => (r) => {
|
|
@@ -99,35 +100,35 @@ const z = new $(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
99
100
|
migrations: t,
|
|
100
101
|
targetSchema: r,
|
|
101
102
|
defaultVersion: n,
|
|
102
|
-
def:
|
|
103
|
+
def: s
|
|
103
104
|
}) => {
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
105
|
+
const l = Object.keys(t).sort(g).pop();
|
|
106
|
+
if (l == null)
|
|
106
107
|
return (o) => {
|
|
107
|
-
if (o.version ?? (o.version = n), o.version !==
|
|
108
|
+
if (o.version ?? (o.version = n), o.version !== s.version)
|
|
108
109
|
return console.log(
|
|
109
|
-
`${e} version ${o.version} is newer than latest version of ${
|
|
110
|
+
`${e} version ${o.version} is newer than latest version of ${s.version}.
|
|
110
111
|
Returning default instead.
|
|
111
112
|
`
|
|
112
|
-
),
|
|
113
|
+
), s;
|
|
113
114
|
try {
|
|
114
115
|
return r != null ? r.parse(o) : o;
|
|
115
116
|
} catch (a) {
|
|
116
|
-
return console.log(`${e} failed to parse default. Exiting with default`), console.error(a),
|
|
117
|
+
return console.log(`${e} failed to parse default. Exiting with default`), console.error(a), s;
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
const
|
|
120
|
+
const f = Object.keys(t).length;
|
|
120
121
|
let d = !1;
|
|
121
|
-
const
|
|
122
|
+
const i = (o) => {
|
|
122
123
|
try {
|
|
123
|
-
if (
|
|
124
|
-
return console.log(d ? `${e} ${o.version} now up to date` : `${e} version ${o.version} is up to date with target version ${
|
|
125
|
-
const a = o.version, b = t[a],
|
|
126
|
-
return d = !0,
|
|
124
|
+
if (f === 0 || w(o.version, l))
|
|
125
|
+
return console.log(d ? `${e} ${o.version} now up to date` : `${e} version ${o.version} is up to date with target version ${s.version}`), o;
|
|
126
|
+
const a = o.version, b = t[a], y = b(o);
|
|
127
|
+
return d = !0, i(y);
|
|
127
128
|
} catch (a) {
|
|
128
129
|
return console.log(
|
|
129
|
-
`${e} failed to migrate from ${o.version} to ${
|
|
130
|
-
), console.error(a),
|
|
130
|
+
`${e} failed to migrate from ${o.version} to ${l}`
|
|
131
|
+
), console.error(a), s;
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
134
|
return (o) => {
|
|
@@ -140,107 +141,124 @@ const z = new $(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
140
141
|
else
|
|
141
142
|
return console.log(
|
|
142
143
|
`${e} version is null and no default version set. Exiting with default`
|
|
143
|
-
),
|
|
144
|
-
return
|
|
144
|
+
), s;
|
|
145
|
+
return i(o);
|
|
145
146
|
} catch (a) {
|
|
146
|
-
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a),
|
|
147
|
+
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a), s;
|
|
147
148
|
}
|
|
148
149
|
};
|
|
149
|
-
},
|
|
150
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
150
151
|
__proto__: null,
|
|
151
152
|
compareSemVer: g,
|
|
152
|
-
createMigration:
|
|
153
|
+
createMigration: C,
|
|
153
154
|
migrator: G,
|
|
154
|
-
semVerNewer:
|
|
155
|
-
semVerOlder:
|
|
156
|
-
semVerZ:
|
|
155
|
+
semVerNewer: w,
|
|
156
|
+
semVerOlder: P,
|
|
157
|
+
semVerZ: E,
|
|
157
158
|
versionsEqual: N
|
|
158
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
159
|
+
}, Symbol.toStringTag, { value: "Module" })), X = (e) => {
|
|
159
160
|
if (e === void 0 || typeof e == "string" || typeof e == "number")
|
|
160
161
|
return e;
|
|
161
162
|
if (e.toString === void 0) throw new Error("invalid renderer");
|
|
162
163
|
return e.toString();
|
|
163
|
-
},
|
|
164
|
+
}, Y = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, D = (e, t = "") => {
|
|
164
165
|
const r = e.length;
|
|
165
166
|
return r === 0 ? t : r === 1 ? e[0] : r === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[r - 1]}`;
|
|
166
|
-
},
|
|
167
|
-
const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((
|
|
167
|
+
}, Z = (e) => {
|
|
168
|
+
const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((i) => i.charAt(0).toLowerCase()).join("");
|
|
168
169
|
r.add(n), r.add(n.replace(/(.)(.)/g, "$1_$2"));
|
|
169
|
-
const
|
|
170
|
-
e.match(
|
|
171
|
-
if (
|
|
172
|
-
const a = t.map((b,
|
|
170
|
+
const s = /\d+/g;
|
|
171
|
+
e.match(s) && t.forEach((i, o) => {
|
|
172
|
+
if (s.test(i)) {
|
|
173
|
+
const a = t.map((b, y) => y !== o ? b.charAt(0).toLowerCase() : b).join("");
|
|
173
174
|
r.add(a), r.add(a.replace(/(.)(.)/g, "$1_$2"));
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
|
-
const
|
|
177
|
-
(
|
|
177
|
+
const f = t.map(
|
|
178
|
+
(i) => (i.length > 3 ? i.substring(0, 3) : i).toLowerCase()
|
|
178
179
|
);
|
|
179
|
-
return r.add(
|
|
180
|
-
(
|
|
180
|
+
return r.add(f.join("")), r.add(f.join("_")), Array.from(r).filter(
|
|
181
|
+
(i) => i.length >= 2 && i.length <= 12
|
|
181
182
|
);
|
|
182
|
-
},
|
|
183
|
+
}, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
184
|
__proto__: null,
|
|
184
|
-
generateShortIdentifiers:
|
|
185
|
-
naturalLanguageJoin:
|
|
185
|
+
generateShortIdentifiers: Z,
|
|
186
|
+
naturalLanguageJoin: D
|
|
187
|
+
}, Symbol.toStringTag, { value: "Module" })), V = async (e) => await new Promise(
|
|
188
|
+
(t) => setTimeout(t, x.fromMilliseconds(e).milliseconds)
|
|
189
|
+
), I = c.object({
|
|
190
|
+
interval: x.z.optional(),
|
|
191
|
+
maxRetries: c.number().optional(),
|
|
192
|
+
scale: c.number().optional()
|
|
193
|
+
}), W = (e = {}) => {
|
|
194
|
+
const t = e.sleepFn || V, r = e.maxRetries ?? 5, n = e.scale ?? 1;
|
|
195
|
+
let s = 0, l = new x(e.interval ?? x.milliseconds(1));
|
|
196
|
+
return async () => s >= r ? !1 : (await t(l), l = l.mult(n), s++, !0);
|
|
197
|
+
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
198
|
+
__proto__: null,
|
|
199
|
+
breakerConfig: I,
|
|
200
|
+
create: W
|
|
186
201
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
187
202
|
export {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
203
|
+
$e as DataType,
|
|
204
|
+
Ee as Density,
|
|
205
|
+
je as MultiSeries,
|
|
206
|
+
we as Rate,
|
|
207
|
+
Er as RoutedWorker,
|
|
208
|
+
Ye as Search,
|
|
209
|
+
Me as Series,
|
|
210
|
+
Te as Size,
|
|
211
|
+
ke as TimeRange,
|
|
212
|
+
x as TimeSpan,
|
|
213
|
+
Ae as TimeStamp,
|
|
214
|
+
jr as TypedWorker,
|
|
215
|
+
Sr as URL,
|
|
216
|
+
_e as addSamples,
|
|
217
|
+
ne as binary,
|
|
218
|
+
Ie as bounds,
|
|
219
|
+
rr as box,
|
|
220
|
+
re as breaker,
|
|
221
|
+
vr as buildQueryString,
|
|
222
|
+
ie as caseconv,
|
|
223
|
+
ce as change,
|
|
224
|
+
ue as clamp,
|
|
225
|
+
de as compare,
|
|
226
|
+
Q as control,
|
|
227
|
+
Oe as convertDataType,
|
|
228
|
+
X as convertRenderV,
|
|
229
|
+
wr as createMockWorkers,
|
|
230
|
+
xe as debounce,
|
|
231
|
+
Se as deep,
|
|
232
|
+
or as dimensions,
|
|
233
|
+
sr as direction,
|
|
234
|
+
U as errors,
|
|
235
|
+
He as getEntries,
|
|
236
|
+
Re as id,
|
|
237
|
+
J as invert,
|
|
238
|
+
ze as isCrudeSeries,
|
|
239
|
+
Ge as isObject,
|
|
240
|
+
pe as isStringer,
|
|
241
|
+
Le as isTelemValue,
|
|
242
|
+
Ze as kv,
|
|
243
|
+
ar as location,
|
|
244
|
+
Qe as mapValues,
|
|
245
|
+
We as math,
|
|
246
|
+
K as migrate,
|
|
247
|
+
gr as nullToArr,
|
|
248
|
+
Be as observe,
|
|
249
|
+
lr as position,
|
|
250
|
+
ge as primitiveIsZero,
|
|
251
|
+
Ke as runtime,
|
|
252
|
+
fe as scale,
|
|
253
|
+
Y as shallowCopy,
|
|
254
|
+
Ne as sortTimeRange,
|
|
255
|
+
fr as spatial,
|
|
256
|
+
ee as strings,
|
|
257
|
+
he as throttle,
|
|
258
|
+
br as toArray,
|
|
259
|
+
Pe as typedArrayZ,
|
|
260
|
+
hr as unique,
|
|
261
|
+
Ue as unknownRecordZ,
|
|
262
|
+
dr as xy,
|
|
263
|
+
Tr as zodutil
|
|
246
264
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z as O } from "zod";
|
|
2
|
+
import { c as m } from "./index-eue4dSQX.js";
|
|
3
|
+
import { e as a, f, y, g, D as C, C as z, X as L, Y as h, l as S, h as d } from "./base-DnZzEvvz.js";
|
|
4
|
+
const N = a, R = y, I = f, X = {
|
|
5
|
+
top: "bottom",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
left: "right",
|
|
9
|
+
center: "center"
|
|
10
|
+
}, Y = {
|
|
11
|
+
top: "left",
|
|
12
|
+
right: "top",
|
|
13
|
+
bottom: "right",
|
|
14
|
+
left: "bottom",
|
|
15
|
+
center: "center"
|
|
16
|
+
}, A = g, r = (t) => t instanceof String || !C.includes(t) ? t : t === "x" ? "left" : "top", P = (t) => X[r(t)], k = (t) => Y[r(t)], s = (t) => {
|
|
17
|
+
const o = r(t);
|
|
18
|
+
return o === "top" || o === "bottom" ? "y" : "x";
|
|
19
|
+
}, w = O.object({
|
|
20
|
+
x: a.or(f),
|
|
21
|
+
y: y.or(f)
|
|
22
|
+
}), M = O.object({ x: a, y }), T = Object.freeze({ x: "left", y: "top" }), b = Object.freeze({ x: "right", y: "top" }), l = Object.freeze({ x: "left", y: "bottom" }), u = Object.freeze({ x: "right", y: "bottom" }), x = Object.freeze({ x: "center", y: "center" }), p = Object.freeze({ x: "center", y: "top" }), _ = Object.freeze({ x: "center", y: "bottom" }), E = Object.freeze({ x: "right", y: "center" }), j = Object.freeze({ x: "left", y: "center" }), $ = Object.freeze([
|
|
23
|
+
j,
|
|
24
|
+
E,
|
|
25
|
+
p,
|
|
26
|
+
_,
|
|
27
|
+
T,
|
|
28
|
+
b,
|
|
29
|
+
l,
|
|
30
|
+
u,
|
|
31
|
+
x
|
|
32
|
+
]), B = (t, o) => t.x === o.x && t.y === o.y, D = (t, o) => {
|
|
33
|
+
if (typeof o == "object") {
|
|
34
|
+
let e = !0;
|
|
35
|
+
return "x" in o && (t.x === o.x || (e = !1)), "y" in o && (t.y === o.y || (e = !1)), e;
|
|
36
|
+
}
|
|
37
|
+
return t.x === o || t.y === o;
|
|
38
|
+
}, F = (t) => [t.x, t.y], i = (t) => s(r(t)) === "x", G = (t) => s(r(t)) === "y", H = (t) => `${t.x}${m(t.y)}`, q = (t, o) => {
|
|
39
|
+
let e, n;
|
|
40
|
+
if (typeof t == "object" && "x" in t ? (e = t.x, n = t.y) : (e = r(t), n = r(o ?? t)), s(e) === s(n) && e !== "center" && n !== "center")
|
|
41
|
+
throw new Error(
|
|
42
|
+
`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`
|
|
43
|
+
);
|
|
44
|
+
const c = { ...x };
|
|
45
|
+
return e === "center" ? i(n) ? [c.x, c.y] = [n, e] : [c.x, c.y] = [e, n] : n === "center" ? i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e] : i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e], c;
|
|
46
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
47
|
+
__proto__: null,
|
|
48
|
+
BOTTOM_CENTER: _,
|
|
49
|
+
BOTTOM_LEFT: l,
|
|
50
|
+
BOTTOM_RIGHT: u,
|
|
51
|
+
CENTER: x,
|
|
52
|
+
CENTER_LOCATIONS: z,
|
|
53
|
+
LEFT_CENTER: j,
|
|
54
|
+
RIGHT_CENTER: E,
|
|
55
|
+
TOP_CENTER: p,
|
|
56
|
+
TOP_LEFT: T,
|
|
57
|
+
TOP_RIGHT: b,
|
|
58
|
+
XY_LOCATIONS: $,
|
|
59
|
+
X_LOCATIONS: L,
|
|
60
|
+
Y_LOCATIONS: h,
|
|
61
|
+
center: I,
|
|
62
|
+
construct: r,
|
|
63
|
+
constructXY: q,
|
|
64
|
+
corner: M,
|
|
65
|
+
crude: A,
|
|
66
|
+
direction: s,
|
|
67
|
+
isX: i,
|
|
68
|
+
isY: G,
|
|
69
|
+
location: S,
|
|
70
|
+
outer: d,
|
|
71
|
+
rotate90: k,
|
|
72
|
+
swap: P,
|
|
73
|
+
x: N,
|
|
74
|
+
xy: w,
|
|
75
|
+
xyCouple: F,
|
|
76
|
+
xyEquals: B,
|
|
77
|
+
xyMatches: D,
|
|
78
|
+
xyToString: H,
|
|
79
|
+
y: R
|
|
80
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
81
|
+
export {
|
|
82
|
+
l as B,
|
|
83
|
+
x as C,
|
|
84
|
+
T,
|
|
85
|
+
$ as X,
|
|
86
|
+
D as a,
|
|
87
|
+
B as b,
|
|
88
|
+
M as c,
|
|
89
|
+
F as d,
|
|
90
|
+
b as e,
|
|
91
|
+
u as f,
|
|
92
|
+
K as l,
|
|
93
|
+
P as s,
|
|
94
|
+
w as x
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-YsO0EMN8.cjs"),o=require("./base-B48bPNx5.cjs"),R=o.xLocation,g=o.yLocation,h=o.centerLocation,d={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},m={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},A=o.crudeLocation,s=t=>t instanceof String||!o.DIRECTIONS.includes(t)?t:t==="x"?"left":"top",_=t=>d[s(t)],M=t=>m[s(t)],i=t=>{const n=s(t);return n==="top"||n==="bottom"?"y":"x"},E=u.z.object({x:o.xLocation.or(o.centerLocation),y:o.yLocation.or(o.centerLocation)}),l=u.z.object({x:o.xLocation,y:o.yLocation}),O=Object.freeze({x:"left",y:"top"}),f=Object.freeze({x:"right",y:"top"}),x=Object.freeze({x:"left",y:"bottom"}),a=Object.freeze({x:"right",y:"bottom"}),T=Object.freeze({x:"center",y:"center"}),b=Object.freeze({x:"center",y:"top"}),L=Object.freeze({x:"center",y:"bottom"}),p=Object.freeze({x:"right",y:"center"}),C=Object.freeze({x:"left",y:"center"}),N=Object.freeze([C,p,b,L,O,f,x,a,T]),j=(t,n)=>t.x===n.x&&t.y===n.y,S=(t,n)=>{if(typeof n=="object"){let e=!0;return"x"in n&&(t.x===n.x||(e=!1)),"y"in n&&(t.y===n.y||(e=!1)),e}return t.x===n||t.y===n},z=t=>[t.x,t.y],y=t=>i(s(t))==="x",P=t=>i(s(t))==="y",X=t=>`${t.x}${I.capitalize(t.y)}`,Y=(t,n)=>{let e,c;if(typeof t=="object"&&"x"in t?(e=t.x,c=t.y):(e=s(t),c=s(n??t)),i(e)===i(c)&&e!=="center"&&c!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${c.toString()}`);const r={...T};return e==="center"?y(c)?[r.x,r.y]=[c,e]:[r.x,r.y]=[e,c]:c==="center"?y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e]:y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e],r},w=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:L,BOTTOM_LEFT:x,BOTTOM_RIGHT:a,CENTER:T,CENTER_LOCATIONS:o.CENTER_LOCATIONS,LEFT_CENTER:C,RIGHT_CENTER:p,TOP_CENTER:b,TOP_LEFT:O,TOP_RIGHT:f,XY_LOCATIONS:N,X_LOCATIONS:o.X_LOCATIONS,Y_LOCATIONS:o.Y_LOCATIONS,center:h,construct:s,constructXY:Y,corner:l,crude:A,direction:i,isX:y,isY:P,location:o.location,outer:o.outerLocation,rotate90:M,swap:_,x:R,xy:E,xyCouple:z,xyEquals:j,xyMatches:S,xyToString:X,y:g},Symbol.toStringTag,{value:"Module"}));exports.BOTTOM_LEFT=x;exports.BOTTOM_RIGHT=a;exports.CENTER=T;exports.TOP_LEFT=O;exports.TOP_RIGHT=f;exports.XY_LOCATIONS=N;exports.corner=l;exports.location=w;exports.swap=_;exports.xy=E;exports.xyCouple=z;exports.xyEquals=j;exports.xyMatches=S;
|
package/dist/location.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-DLP2ZS0o.cjs");exports.location=o.location;
|
package/dist/location.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=(l,n,t=".")=>{const e=l.split(t);return e.map((s,o)=>{const a=n(s,o,e);return a==null?null:typeof a=="string"?a:a.join(t)}).filter(s=>s!=null).join(t)},c=(l,n,t={optional:!1,separator:"."})=>{t.separator??(t.separator=".");const{optional:e,getter:r=(a,i)=>a[i]}=t,s=n.split(t.separator);if(s.length===1&&s[0]==="")return l;let o=l;for(const a of s){const i=r(o,a);if(i==null){if(e)return null;throw new Error(`Path ${n} does not exist. ${a} is null`)}o=i}return o},f=(l,n,t)=>{const e=n.split(".");let r=l;for(let s=0;s<e.length-1;s++){const o=e[s];r[o]??(r[o]={}),r=r[o]}try{r[e[e.length-1]]=t}catch(s){throw console.error("failed to set value",t,"at path",n,"on object",l),s}},h=(l,n)=>{const t=n.split(".");let e=l;for(let r=0;r<t.length-1;r++){const s=t[r];if(e[s]==null)return;e=e[s]}if(Array.isArray(e)){const r=parseInt(t[t.length-1]);if(isNaN(r))return;e.splice(r,1);return}delete e[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 c(l,n),!0}catch{return!1}},m=(l,n)=>{if(n.length===0)return!0;const t=l.split("."),e=n.split(".");if(e.length>t.length)return!1;for(let r=0;r<e.length;r++){const s=t[r],o=e[r];if(o!=="*"&&s!==o)return!1}return!0};exports.element=p;exports.get=c;exports.has=g;exports.pathsMatch=m;exports.remove=h;exports.set=f;exports.transformPath=u;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const u = (l, n, t = ".") => {
|
|
2
|
+
const e = l.split(t);
|
|
3
|
+
return e.map((s, o) => {
|
|
4
|
+
const a = n(s, o, e);
|
|
5
|
+
return a == null ? null : typeof a == "string" ? a : a.join(t);
|
|
6
|
+
}).filter((s) => s != null).join(t);
|
|
7
|
+
}, c = (l, n, t = { optional: !1, separator: "." }) => {
|
|
8
|
+
t.separator ?? (t.separator = ".");
|
|
9
|
+
const { optional: e, getter: r = (a, i) => a[i] } = t, s = n.split(t.separator);
|
|
10
|
+
if (s.length === 1 && s[0] === "") return l;
|
|
11
|
+
let o = l;
|
|
12
|
+
for (const a of s) {
|
|
13
|
+
const i = r(o, a);
|
|
14
|
+
if (i == null) {
|
|
15
|
+
if (e) return null;
|
|
16
|
+
throw new Error(`Path ${n} does not exist. ${a} is null`);
|
|
17
|
+
}
|
|
18
|
+
o = i;
|
|
19
|
+
}
|
|
20
|
+
return o;
|
|
21
|
+
}, f = (l, n, t) => {
|
|
22
|
+
const e = n.split(".");
|
|
23
|
+
let r = l;
|
|
24
|
+
for (let s = 0; s < e.length - 1; s++) {
|
|
25
|
+
const o = e[s];
|
|
26
|
+
r[o] ?? (r[o] = {}), r = r[o];
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
r[e[e.length - 1]] = t;
|
|
30
|
+
} catch (s) {
|
|
31
|
+
throw console.error("failed to set value", t, "at path", n, "on object", l), s;
|
|
32
|
+
}
|
|
33
|
+
}, h = (l, n) => {
|
|
34
|
+
const t = n.split(".");
|
|
35
|
+
let e = l;
|
|
36
|
+
for (let r = 0; r < t.length - 1; r++) {
|
|
37
|
+
const s = t[r];
|
|
38
|
+
if (e[s] == null) return;
|
|
39
|
+
e = e[s];
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(e)) {
|
|
42
|
+
const r = parseInt(t[t.length - 1]);
|
|
43
|
+
if (isNaN(r)) return;
|
|
44
|
+
e.splice(r, 1);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
delete e[t[t.length - 1]];
|
|
48
|
+
}, p = (l, n) => {
|
|
49
|
+
const t = l.split(".");
|
|
50
|
+
return n < 0 ? t[t.length + n] : t[n];
|
|
51
|
+
}, g = (l, n) => {
|
|
52
|
+
try {
|
|
53
|
+
return c(l, n), !0;
|
|
54
|
+
} catch {
|
|
55
|
+
return !1;
|
|
56
|
+
}
|
|
57
|
+
}, y = (l, n) => {
|
|
58
|
+
if (n.length === 0) return !0;
|
|
59
|
+
const t = l.split("."), e = n.split(".");
|
|
60
|
+
if (e.length > t.length) return !1;
|
|
61
|
+
for (let r = 0; r < e.length; r++) {
|
|
62
|
+
const s = t[r], o = e[r];
|
|
63
|
+
if (o !== "*" && s !== o)
|
|
64
|
+
return !1;
|
|
65
|
+
}
|
|
66
|
+
return !0;
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
p as e,
|
|
70
|
+
c as g,
|
|
71
|
+
g as h,
|
|
72
|
+
y as p,
|
|
73
|
+
h as r,
|
|
74
|
+
f as s,
|
|
75
|
+
u as t
|
|
76
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as g, x as v, a as I, h as M, w as N, d as X, i as j } from "./box-
|
|
1
|
+
import { c as g, x as v, a as I, h as M, w as N, d as X, i as j } from "./box-CYXc9-qp.js";
|
|
2
2
|
import { c as w } from "./direction-CScbfCdT.js";
|
|
3
|
-
import { x as B, a as h, b as C, C as O, T as R, s as m, X as S } from "./location-
|
|
3
|
+
import { x as B, a as h, b as C, C as O, T as R, s as m, X as S } from "./location-Cn1ByVTZ.js";
|
|
4
4
|
import { l as Y } from "./base-DnZzEvvz.js";
|
|
5
5
|
const P = (t) => {
|
|
6
6
|
if (t == null) return { x: void 0, y: void 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./box-
|
|
1
|
+
"use strict";const n=require("./box-BpSX4si6.cjs"),T=require("./direction-D7qoo_GJ.cjs"),r=require("./location-DLP2ZS0o.cjs"),b=require("./base-B48bPNx5.cjs"),P=t=>{if(t==null)return{x:void 0,y:void 0};const s=r.xy.safeParse(t);if(s.success)return s.data;const e=b.location.safeParse(t);return e.success?T.construct(e.data)==="x"?{x:e.data,y:void 0}:{x:void 0,y:e.data}:t},N=({container:t,target:s,dialog:e,initial:u,prefer:a,alignments:l=["start"],disable:f=[]})=>{const i=P(u);let x=r.XY_LOCATIONS;if(a!=null){const o=a.map(c=>P(c));x=x.slice().sort((c,p)=>{const d=o.findIndex(g=>r.xyMatches(c,g)),h=o.findIndex(g=>r.xyMatches(p,g));return d>-1&&h>-1?d-h:d>-1?-1:h>-1?1:0})}const O=x.filter(o=>!r.xyEquals(o,r.CENTER)&&(i.x==null||o.x===i.x)&&(i.y==null||o.y===i.y)&&!f.some(c=>r.xyMatches(o,c))).map(o=>l==null?void 0:l.map(c=>[o,c])).flat(),A=n.construct(t),M=n.construct(s),_=n.construct(e);let E=-1/0;const y={location:r.CENTER,adjustedDialog:_};return O.forEach(([o,c])=>{const[p,d]=v({option:o,alignment:c,container:A,target:M,dialog:_});d>E&&(E=d,y.location=o,y.adjustedDialog=p)}),y},v=({option:t,alignment:s,container:e,target:u,dialog:a})=>{const l=L(t,s),f=n.xyLoc(u,t),i=n.constructWithAlternateRoot(f.x,f.y,n.width(a),n.height(a),l,r.TOP_LEFT),x=n.area(n.intersection(i,e));return[i,x]},I={start:"left",center:"center",end:"right"},j={start:"bottom",center:"center",end:"top"},L=(t,s)=>{const e={x:"center",y:"center"};if(t.y!=="center"){e.y=r.swap(t.y);const u=t.x==="left"?r.swap:a=>a;e.x=u(I[s])}else e.x=r.swap(t.x),e.y=j[s];return e},q=Object.freeze(Object.defineProperty({__proto__:null,dialog:N,getRoot:L,parseLocationOptions:P},Symbol.toStringTag,{value:"Module"}));exports.position=q;
|
package/dist/position.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-JCN6-sJC.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
package/dist/record.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=e.z.record(e.z.union([e.z.number(),e.z.string(),e.z.symbol()]),e.z.unknown()),o=n=>Object.entries(n),u=(n,r)=>Object.fromEntries(o(n).map(([t,s])=>[t,r(s,t)]));exports.getEntries=o;exports.mapValues=u;exports.unknownRecordZ=c;
|
package/dist/record.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z as n } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const m = n.record(
|
|
3
3
|
n.union([n.number(), n.string(), n.symbol()]),
|
|
4
4
|
n.unknown()
|
|
5
|
-
),
|
|
5
|
+
), s = (o) => Object.entries(o), i = (o, t) => Object.fromEntries(s(o).map(([r, e]) => [r, t(e, r)]));
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as getEntries,
|
|
8
|
+
i as mapValues,
|
|
9
|
+
m as unknownRecordZ
|
|
9
10
|
};
|