@synnaxlabs/x 0.35.0 → 0.37.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 +27 -27
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- 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-BpSX4si6.cjs → box-BHIyGhI_.cjs} +1 -1
- package/dist/{box-CYXc9-qp.js → box-CfhGfJJH.js} +1 -1
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/external-CghVMqCA.cjs +1 -0
- package/dist/external-DKQKvgIi.js +30 -0
- package/dist/index-BfDeGfej.js +41 -0
- package/dist/{index-CYxQwEdX.cjs → index-CnclyYpG.cjs} +1 -1
- package/dist/index-Dd8DLyMx.cjs +1 -0
- package/dist/{index-BBa2mWG1.js → index-OHIRoCei.js} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +172 -155
- package/dist/{location-DLP2ZS0o.cjs → location-BIet4Mig.cjs} +1 -1
- package/dist/{location-Cn1ByVTZ.js → location-C5Ot4MVG.js} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/{position-DJXB-pDS.js → position-BXFz7I9G.js} +2 -2
- package/dist/{position-JCN6-sJC.cjs → position-CFiSGTz9.cjs} +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{scale-Dj7-5FQQ.cjs → scale-BESJN9LG.cjs} +1 -1
- package/dist/{scale-Coub2bPH.js → scale-CV3O6tkY.js} +3 -3
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BbxR21uO.cjs +11 -0
- package/dist/{series-DOxur2pj.js → series-C_B2hAp9.js} +474 -371
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +5 -5
- 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/caseconv/caseconv.d.ts +12 -6
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- 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/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/runtime/os.d.ts +1 -1
- package/dist/src/runtime/os.d.ts.map +1 -1
- 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/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/telem.cjs +1 -1
- package/dist/telem.js +11 -10
- package/package.json +69 -70
- package/src/binary/encoder.ts +3 -3
- package/src/breaker/breaker.spec.ts +73 -0
- package/src/breaker/breaker.ts +33 -0
- package/src/breaker/index.ts +1 -0
- package/src/caseconv/caseconv.spec.ts +16 -0
- package/src/caseconv/caseconv.ts +34 -5
- package/src/index.ts +1 -0
- package/src/mock/MockGLBufferController.ts +6 -6
- package/src/runtime/os.ts +17 -1
- 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/telem/gl.ts +6 -2
- package/src/telem/series.spec.ts +3 -2
- package/src/telem/series.ts +44 -16
- package/src/telem/telem.ts +121 -2
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/bounds-DzCDHgdE.cjs +0 -1
- package/dist/external-B3XSLDq5.cjs +0 -1
- package/dist/external-sVtvYJS6.js +0 -23
- package/dist/index-YsO0EMN8.cjs +0 -1
- package/dist/index-eue4dSQX.js +0 -45
- package/dist/series-CAP8K7YO.cjs +0 -11
package/dist/index.js
CHANGED
|
@@ -1,59 +1,74 @@
|
|
|
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 ee } from "./index-eue4dSQX.js";
|
|
6
|
-
import { c as te } from "./change-DLl6DccR.js";
|
|
7
|
-
import { c as ne, s as se } from "./scale-Coub2bPH.js";
|
|
8
|
-
import { L as S, G as y, E as w, i as A, a as k, b as O } from "./index-HQonyH7n.js";
|
|
9
|
-
import { c as ae, d as ce, p as le } from "./index-HQonyH7n.js";
|
|
4
|
+
import { e as ne } from "./index-OHIRoCei.js";
|
|
10
5
|
import { z as c } from "zod";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
6
|
+
import { b as x } from "./series-C_B2hAp9.js";
|
|
7
|
+
import { d as ie, D as ae, M as ce, R as le, S as ue, e as fe, c as me, T as de, a as pe, g as ge, h as be, i as xe, f as he, s as ye, t as Se } from "./series-C_B2hAp9.js";
|
|
8
|
+
import { a as $e } from "./index-BfDeGfej.js";
|
|
9
|
+
import { c as je } from "./change-DLl6DccR.js";
|
|
10
|
+
import { c as Me, s as Te } from "./scale-CV3O6tkY.js";
|
|
11
|
+
import { L as S, G as v, E as k, i as A, a as _, b as O } from "./index-HQonyH7n.js";
|
|
12
|
+
import { c as Ae, d as _e, p as Oe } from "./index-HQonyH7n.js";
|
|
13
|
+
import { debounce as ze, throttle as Le } from "./debounce.js";
|
|
14
|
+
import { deep as Pe } from "./deep.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-DKQKvgIi.js";
|
|
21
|
+
import { Search as Ye } from "./search.js";
|
|
22
|
+
import { b as rr } from "./box-CfhGfJJH.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-C5Ot4MVG.js";
|
|
26
|
+
import { p as lr } from "./position-BXFz7I9G.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 R = async (e) => await new Promise(
|
|
35
|
+
(t) => setTimeout(t, x.fromMilliseconds(e).milliseconds)
|
|
36
|
+
), z = c.object({
|
|
37
|
+
interval: x.z.optional(),
|
|
38
|
+
maxRetries: c.number().optional(),
|
|
39
|
+
scale: c.number().optional()
|
|
40
|
+
}), L = (e = {}) => {
|
|
41
|
+
const t = e.sleepFn || R, r = e.maxRetries ?? 5, n = e.scale ?? 1;
|
|
42
|
+
let s = 0, l = new x(e.interval ?? x.milliseconds(1));
|
|
43
|
+
return async () => s >= r ? !1 : (await t(l), l = l.mult(n), s++, !0);
|
|
44
|
+
}, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
45
|
+
__proto__: null,
|
|
46
|
+
breakerConfig: z,
|
|
47
|
+
create: L
|
|
48
|
+
}, Symbol.toStringTag, { value: "Module" })), u = class u extends Number {
|
|
34
49
|
};
|
|
35
|
-
p(
|
|
36
|
-
c.instanceof(
|
|
37
|
-
c.number().int().min(0).max(255).transform((t) => new
|
|
38
|
-
c.instanceof(Number).transform((t) => new
|
|
50
|
+
p(u, "Absolute", 255), p(u, "Default", 1), p(u, "z", c.union([
|
|
51
|
+
c.instanceof(u),
|
|
52
|
+
c.number().int().min(0).max(255).transform((t) => new u(t)),
|
|
53
|
+
c.instanceof(Number).transform((t) => new u(t))
|
|
39
54
|
]));
|
|
40
|
-
let h =
|
|
41
|
-
const
|
|
55
|
+
let h = u;
|
|
56
|
+
const j = c.object({
|
|
42
57
|
name: c.string(),
|
|
43
58
|
key: c.string()
|
|
44
|
-
}),
|
|
45
|
-
subject:
|
|
59
|
+
}), N = (e) => c.object({
|
|
60
|
+
subject: j,
|
|
46
61
|
resource: e,
|
|
47
62
|
authority: h.z
|
|
48
|
-
}),
|
|
63
|
+
}), P = (...e) => (t) => t.filter((r) => {
|
|
49
64
|
let n = !1;
|
|
50
65
|
return r.to != null && (n = e.includes(r.to.resource)), r.from != null && !n && (n = e.includes(r.from.resource)), n;
|
|
51
|
-
}),
|
|
66
|
+
}), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
52
67
|
__proto__: null,
|
|
53
68
|
Authority: h,
|
|
54
|
-
filterTransfersByChannelKey:
|
|
55
|
-
stateZ:
|
|
56
|
-
subjectZ:
|
|
69
|
+
filterTransfersByChannelKey: P,
|
|
70
|
+
stateZ: N,
|
|
71
|
+
subjectZ: j
|
|
57
72
|
}, Symbol.toStringTag, { value: "Module" })), m = class m extends Error {
|
|
58
73
|
constructor() {
|
|
59
74
|
super(m.MESSAGE);
|
|
@@ -65,26 +80,26 @@ const E = c.object({
|
|
|
65
80
|
};
|
|
66
81
|
p(m, "MESSAGE", "canceled");
|
|
67
82
|
let $ = m;
|
|
68
|
-
const
|
|
83
|
+
const C = new $(), J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
69
84
|
__proto__: null,
|
|
70
|
-
CANCELED:
|
|
71
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
85
|
+
CANCELED: C
|
|
86
|
+
}, Symbol.toStringTag, { value: "Module" })), K = (e) => e ? -1 : 1, E = c.string().regex(/^\d+\.\d+\.\d+$/), g = (e, t, r = {}) => {
|
|
72
87
|
r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
|
|
73
|
-
const n =
|
|
88
|
+
const n = E.parse(e), s = E.parse(t), [l, f, d] = n.split(".").map(Number), [i, o, a] = s.split(".").map(Number);
|
|
74
89
|
if (r.checkMajor) {
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
90
|
+
if (l < i) return S;
|
|
91
|
+
if (l > i) return v;
|
|
77
92
|
}
|
|
78
93
|
if (r.checkMinor) {
|
|
79
|
-
if (
|
|
80
|
-
if (
|
|
94
|
+
if (f < o) return S;
|
|
95
|
+
if (f > o) return v;
|
|
81
96
|
}
|
|
82
97
|
if (r.checkPatch) {
|
|
83
98
|
if (d < a) return S;
|
|
84
|
-
if (d > a) return
|
|
99
|
+
if (d > a) return v;
|
|
85
100
|
}
|
|
86
|
-
return
|
|
87
|
-
},
|
|
101
|
+
return k;
|
|
102
|
+
}, G = (e, t, r = {}) => A(g(e, t, r)), w = (e, t, r = {}) => _(g(e, t, r)), D = (e, t, r = {}) => O(g(e, t, r)), Z = ({
|
|
88
103
|
name: e,
|
|
89
104
|
migrate: t
|
|
90
105
|
}) => (r) => {
|
|
@@ -94,40 +109,40 @@ const z = new $(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
94
109
|
} catch (n) {
|
|
95
110
|
throw console.log(`${e} failed to migrate from ${r.version}`), console.error(n), n;
|
|
96
111
|
}
|
|
97
|
-
},
|
|
112
|
+
}, V = ({
|
|
98
113
|
name: e,
|
|
99
114
|
migrations: t,
|
|
100
115
|
targetSchema: r,
|
|
101
116
|
defaultVersion: n,
|
|
102
|
-
def:
|
|
117
|
+
def: s
|
|
103
118
|
}) => {
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
119
|
+
const l = Object.keys(t).sort(g).pop();
|
|
120
|
+
if (l == null)
|
|
106
121
|
return (o) => {
|
|
107
|
-
if (o.version ?? (o.version = n), o.version !==
|
|
122
|
+
if (o.version ?? (o.version = n), o.version !== s.version)
|
|
108
123
|
return console.log(
|
|
109
|
-
`${e} version ${o.version} is newer than latest version of ${
|
|
124
|
+
`${e} version ${o.version} is newer than latest version of ${s.version}.
|
|
110
125
|
Returning default instead.
|
|
111
126
|
`
|
|
112
|
-
),
|
|
127
|
+
), s;
|
|
113
128
|
try {
|
|
114
129
|
return r != null ? r.parse(o) : o;
|
|
115
130
|
} catch (a) {
|
|
116
|
-
return console.log(`${e} failed to parse default. Exiting with default`), console.error(a),
|
|
131
|
+
return console.log(`${e} failed to parse default. Exiting with default`), console.error(a), s;
|
|
117
132
|
}
|
|
118
133
|
};
|
|
119
|
-
const
|
|
134
|
+
const f = Object.keys(t).length;
|
|
120
135
|
let d = !1;
|
|
121
|
-
const
|
|
136
|
+
const i = (o) => {
|
|
122
137
|
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,
|
|
138
|
+
if (f === 0 || w(o.version, l))
|
|
139
|
+
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;
|
|
140
|
+
const a = o.version, b = t[a], y = b(o);
|
|
141
|
+
return d = !0, i(y);
|
|
127
142
|
} catch (a) {
|
|
128
143
|
return console.log(
|
|
129
|
-
`${e} failed to migrate from ${o.version} to ${
|
|
130
|
-
), console.error(a),
|
|
144
|
+
`${e} failed to migrate from ${o.version} to ${l}`
|
|
145
|
+
), console.error(a), s;
|
|
131
146
|
}
|
|
132
147
|
};
|
|
133
148
|
return (o) => {
|
|
@@ -140,108 +155,110 @@ const z = new $(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
140
155
|
else
|
|
141
156
|
return console.log(
|
|
142
157
|
`${e} version is null and no default version set. Exiting with default`
|
|
143
|
-
),
|
|
144
|
-
return
|
|
158
|
+
), s;
|
|
159
|
+
return i(o);
|
|
145
160
|
} catch (a) {
|
|
146
|
-
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a),
|
|
161
|
+
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a), s;
|
|
147
162
|
}
|
|
148
163
|
};
|
|
149
|
-
},
|
|
164
|
+
}, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
150
165
|
__proto__: null,
|
|
151
166
|
compareSemVer: g,
|
|
152
|
-
createMigration:
|
|
153
|
-
migrator:
|
|
154
|
-
semVerNewer:
|
|
155
|
-
semVerOlder:
|
|
156
|
-
semVerZ:
|
|
157
|
-
versionsEqual:
|
|
158
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
167
|
+
createMigration: Z,
|
|
168
|
+
migrator: V,
|
|
169
|
+
semVerNewer: w,
|
|
170
|
+
semVerOlder: D,
|
|
171
|
+
semVerZ: E,
|
|
172
|
+
versionsEqual: G
|
|
173
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = (e) => {
|
|
159
174
|
if (e === void 0 || typeof e == "string" || typeof e == "number")
|
|
160
175
|
return e;
|
|
161
176
|
if (e.toString === void 0) throw new Error("invalid renderer");
|
|
162
177
|
return e.toString();
|
|
163
|
-
},
|
|
178
|
+
}, ee = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, I = (e, t = "") => {
|
|
164
179
|
const r = e.length;
|
|
165
180
|
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((
|
|
181
|
+
}, W = (e) => {
|
|
182
|
+
const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((i) => i.charAt(0).toLowerCase()).join("");
|
|
168
183
|
r.add(n), r.add(n.replace(/(.)(.)/g, "$1_$2"));
|
|
169
|
-
const
|
|
170
|
-
e.match(
|
|
171
|
-
if (
|
|
172
|
-
const a = t.map((b,
|
|
184
|
+
const s = /\d+/g;
|
|
185
|
+
e.match(s) && t.forEach((i, o) => {
|
|
186
|
+
if (s.test(i)) {
|
|
187
|
+
const a = t.map((b, y) => y !== o ? b.charAt(0).toLowerCase() : b).join("");
|
|
173
188
|
r.add(a), r.add(a.replace(/(.)(.)/g, "$1_$2"));
|
|
174
189
|
}
|
|
175
190
|
});
|
|
176
|
-
const
|
|
177
|
-
(
|
|
191
|
+
const f = t.map(
|
|
192
|
+
(i) => (i.length > 3 ? i.substring(0, 3) : i).toLowerCase()
|
|
178
193
|
);
|
|
179
|
-
return r.add(
|
|
180
|
-
(
|
|
194
|
+
return r.add(f.join("")), r.add(f.join("_")), Array.from(r).filter(
|
|
195
|
+
(i) => i.length >= 2 && i.length <= 12
|
|
181
196
|
);
|
|
182
|
-
},
|
|
197
|
+
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
198
|
__proto__: null,
|
|
184
|
-
generateShortIdentifiers:
|
|
185
|
-
naturalLanguageJoin:
|
|
199
|
+
generateShortIdentifiers: W,
|
|
200
|
+
naturalLanguageJoin: I
|
|
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
|
-
|
|
246
|
-
|
|
203
|
+
ie as DataType,
|
|
204
|
+
ae as Density,
|
|
205
|
+
ce as MultiSeries,
|
|
206
|
+
le as Rate,
|
|
207
|
+
Er as RoutedWorker,
|
|
208
|
+
Ye as Search,
|
|
209
|
+
ue as Series,
|
|
210
|
+
fe as Size,
|
|
211
|
+
me as TimeRange,
|
|
212
|
+
x as TimeSpan,
|
|
213
|
+
de as TimeStamp,
|
|
214
|
+
jr as TypedWorker,
|
|
215
|
+
Sr as URL,
|
|
216
|
+
pe as addSamples,
|
|
217
|
+
ne as binary,
|
|
218
|
+
Ie as bounds,
|
|
219
|
+
rr as box,
|
|
220
|
+
Q as breaker,
|
|
221
|
+
vr as buildQueryString,
|
|
222
|
+
$e as caseconv,
|
|
223
|
+
je as change,
|
|
224
|
+
Me as clamp,
|
|
225
|
+
Ae as compare,
|
|
226
|
+
U as control,
|
|
227
|
+
ge as convertDataType,
|
|
228
|
+
Y as convertRenderV,
|
|
229
|
+
wr as createMockWorkers,
|
|
230
|
+
ze as debounce,
|
|
231
|
+
Pe as deep,
|
|
232
|
+
or as dimensions,
|
|
233
|
+
sr as direction,
|
|
234
|
+
J as errors,
|
|
235
|
+
He as getEntries,
|
|
236
|
+
be as id,
|
|
237
|
+
K as invert,
|
|
238
|
+
xe as isCrudeSeries,
|
|
239
|
+
Ge as isObject,
|
|
240
|
+
_e as isStringer,
|
|
241
|
+
he as isTelemValue,
|
|
242
|
+
Ze as kv,
|
|
243
|
+
ar as location,
|
|
244
|
+
Qe as mapValues,
|
|
245
|
+
We as math,
|
|
246
|
+
X as migrate,
|
|
247
|
+
gr as nullToArr,
|
|
248
|
+
Be as observe,
|
|
249
|
+
lr as position,
|
|
250
|
+
Oe as primitiveIsZero,
|
|
251
|
+
Ke as runtime,
|
|
252
|
+
Te as scale,
|
|
253
|
+
ee as shallowCopy,
|
|
254
|
+
ye as sortTimeRange,
|
|
255
|
+
fr as spatial,
|
|
256
|
+
re as strings,
|
|
257
|
+
Le as throttle,
|
|
258
|
+
br as toArray,
|
|
259
|
+
Se as typedArrayZ,
|
|
260
|
+
hr as unique,
|
|
261
|
+
Ue as unknownRecordZ,
|
|
262
|
+
dr as xy,
|
|
263
|
+
Tr as zodutil
|
|
247
264
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("zod"),I=require("./index-
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-Dd8DLyMx.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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as O } from "zod";
|
|
2
|
-
import { c as m } from "./index-
|
|
2
|
+
import { c as m } from "./index-BfDeGfej.js";
|
|
3
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
4
|
const N = a, R = y, I = f, X = {
|
|
5
5
|
top: "bottom",
|
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-BIet4Mig.cjs");exports.location=o.location;
|
package/dist/location.js
CHANGED
|
@@ -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-CfhGfJJH.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-C5Ot4MVG.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-BHIyGhI_.cjs"),T=require("./direction-D7qoo_GJ.cjs"),r=require("./location-BIet4Mig.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-CFiSGTz9.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
package/dist/runtime.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-CghVMqCA.cjs");exports.runtime=e.external;
|
package/dist/runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var R=(n,t,e)=>t in n?v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>R(n,typeof t!="symbol"?t+"":t,e);const h=require("zod"),x=require("./bounds-
|
|
1
|
+
"use strict";var v=Object.defineProperty;var R=(n,t,e)=>t in n?v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>R(n,typeof t!="symbol"?t+"":t,e);const h=require("zod"),x=require("./bounds-8aFLdbEj.cjs"),u=require("./box-BHIyGhI_.cjs"),T=require("./location-BIet4Mig.cjs"),d=require("./xy-LADI2wVU.cjs"),B=(n,t,e)=>t!==void 0&&n<t?t:e!==void 0&&n>e?e:n,q=h.z.object({offset:d.crudeZ,scale:d.crudeZ}),z=h.z.object({offset:h.z.number(),scale:h.z.number()}),E=n=>(t,e,s,r)=>e==="dimension"?[t,s]:[t,r?s-n:s+n],I=n=>(t,e,s,r)=>[t,r?s/n:s*n],j=n=>(t,e,s)=>{if(t===null)return[n,s];const{lower:r,upper:o}=t,{lower:p,upper:l}=n,w=o-r,m=l-p;if(e==="dimension")return[n,s*(m/w)];const g=(s-r)*(m/w)+p;return[n,g]},Y=n=>(t,e,s)=>[n,s],D=()=>(n,t,e)=>{if(n===null)throw new Error("cannot invert without bounds");if(t==="dimension")return[n,e];const{lower:s,upper:r}=n;return[n,r-(e-s)]},L=n=>(t,e,s)=>{const{lower:r,upper:o}=n;return s=B(s,r,o),[t,s]},a=class a{constructor(){i(this,"ops",[]);i(this,"currBounds",null);i(this,"currType",null);i(this,"reversed",!1);this.ops=[]}static translate(t){return new a().translate(t)}static magnify(t){return new a().magnify(t)}static scale(t,e){return new a().scale(t,e)}translate(t){const e=this.new(),s=E(t);return s.type="translate",e.ops.push(s),e}magnify(t){const e=this.new(),s=I(t);return s.type="magnify",e.ops.push(s),e}scale(t,e){const s=x.construct(t,e),r=this.new(),o=j(s);return o.type="scale",r.ops.push(o),r}clamp(t,e){const s=x.construct(t,e),r=this.new(),o=L(s);return o.type="clamp",r.ops.push(o),r}reBound(t,e){const s=x.construct(t,e),r=this.new(),o=Y(s);return o.type="re-bound",r.ops.push(o),r}invert(){const t=D();t.type="invert";const e=this.new();return e.ops.push(t),e}pos(t){return this.exec("position",t)}dim(t){return this.exec("dimension",t)}new(){const t=new a;return t.ops=this.ops.slice(),t.reversed=this.reversed,t}exec(t,e){return this.currBounds=null,this.ops.reduce(([s,r],o)=>o(s,t,r,this.reversed),[null,e])[1]}reverse(){const t=this.new();t.ops.reverse();const e=[];return t.ops.forEach((s,r)=>{if(s.type==="scale"||e.some(([p,l])=>r>=p&&r<=l))return;const o=t.ops.findIndex((p,l)=>p.type==="scale"&&l>r);o!==-1&&e.push([r,o])}),e.forEach(([s,r])=>{const o=t.ops.slice(s,r);o.unshift(t.ops[r]),t.ops.splice(s,r-s+1,...o)}),t.reversed=!t.reversed,t}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}};i(a,"IDENTITY",new a);let y=a;const c=class c{constructor(t=new y,e=new y,s=null){i(this,"x");i(this,"y");i(this,"currRoot");this.x=t,this.y=e,this.currRoot=s}static translate(t,e){return new c().translate(t,e)}static translateX(t){return new c().translateX(t)}static translateY(t){return new c().translateY(t)}static clamp(t){return new c().clamp(t)}static magnify(t){return new c().magnify(t)}static scale(t){return new c().scale(t)}static reBound(t){return new c().reBound(t)}translate(t,e){const s=d.construct(t,e),r=this.copy();return r.x=this.x.translate(s.x),r.y=this.y.translate(s.y),r}translateX(t){const e=this.copy();return e.x=this.x.translate(t),e}translateY(t){const e=this.copy();return e.y=this.y.translate(t),e}magnify(t){const e=this.copy();return e.x=this.x.magnify(t.x),e.y=this.y.magnify(t.y),e}scale(t){const e=this.copy();if(u.isBox(t)){const s=this.currRoot;return e.currRoot=t.root,s!=null&&!T.xyEquals(s,t.root)&&(s.x!==t.root.x&&(e.x=e.x.invert()),s.y!==t.root.y&&(e.y=e.y.invert())),e.x=e.x.scale(u.xBounds(t)),e.y=e.y.scale(u.yBounds(t)),e}return e.x=e.x.scale(t.width),e.y=e.y.scale(t.height),e}reBound(t){const e=this.copy();return e.x=this.x.reBound(u.xBounds(t)),e.y=this.y.reBound(u.yBounds(t)),e}clamp(t){const e=this.copy();return e.x=this.x.clamp(u.xBounds(t)),e.y=this.y.clamp(u.yBounds(t)),e}copy(){const t=new c;return t.currRoot=this.currRoot,t.x=this.x,t.y=this.y,t}reverse(){const t=this.copy();return t.x=this.x.reverse(),t.y=this.y.reverse(),t}pos(t){return{x:this.x.pos(t.x),y:this.y.pos(t.y)}}dim(t){return{x:this.x.dim(t.x),y:this.y.dim(t.y)}}box(t){return u.construct(this.pos(t.one),this.pos(t.two),0,0,this.currRoot??t.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}};i(c,"IDENTITY",new c);let f=c;const M=Object.freeze(Object.defineProperty({__proto__:null,Scale:y,XY:f,crudeXYTransform:q,transform:z},Symbol.toStringTag,{value:"Module"}));exports.clamp=B;exports.scale=M;
|
|
@@ -2,9 +2,9 @@ var B = Object.defineProperty;
|
|
|
2
2
|
var R = (n, t, e) => t in n ? B(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var i = (n, t, e) => R(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { z as y } from "zod";
|
|
5
|
-
import { c as h } from "./bounds-
|
|
6
|
-
import { e as T, f as x, y as f, c as E } from "./box-
|
|
7
|
-
import { b as I } from "./location-
|
|
5
|
+
import { c as h } from "./bounds-BtccGJW0.js";
|
|
6
|
+
import { e as T, f as x, y as f, c as E } from "./box-CfhGfJJH.js";
|
|
7
|
+
import { b as I } from "./location-C5Ot4MVG.js";
|
|
8
8
|
import { b as g, c as j } from "./xy-DQdccWlc.js";
|
|
9
9
|
const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n, z = y.object({ offset: g, scale: g }), D = y.object({ offset: y.number(), scale: y.number() }), L = (n) => (t, e, s, r) => e === "dimension" ? [t, s] : [
|
|
10
10
|
t,
|
package/dist/scale.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-BESJN9LG.cjs");exports.scale=e.scale;
|
package/dist/scale.js
CHANGED