@synnaxlabs/x 0.31.0 → 0.33.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 +24 -24
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/bounds-CCueigU3.js +171 -0
- package/dist/bounds-Cudf5M4H.cjs +1 -0
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/box-CZVdKCOc.cjs +1 -0
- package/dist/box-hAkmDC3K.js +201 -0
- 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/index-By0n2R_b.cjs +1 -0
- package/dist/{index-DgaYJC35.cjs → index-DQZfhLnw.cjs} +1 -1
- package/dist/{index-Duv1uH08.js → index-q_1Jz5rY.js} +5 -5
- package/dist/{index-B5THJ1eb.js → index-zsix_qnl.js} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +212 -178
- package/dist/{location-DjcaXEps.js → location-B5rSnQP3.js} +1 -1
- package/dist/{location-gPB1RtfA.cjs → location-YGxhLPDy.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/{position-DkON65EZ.js → position-BZOTg74V.js} +2 -2
- package/dist/{position-C71OiHiw.cjs → position-CjNCcq8X.cjs} +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/{scale-COPgp55a.cjs → scale-BvbW9p2C.cjs} +1 -1
- package/dist/{scale-qw6vRO4s.js → scale-C7_4I3pa.js} +3 -3
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BId9slhU.cjs +11 -0
- package/dist/{series-B5eA90Ci.js → series-CZw97Bq2.js} +619 -456
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +5 -5
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +1 -1
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/id/id.d.ts +1 -2
- package/dist/src/id/id.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/math/math.d.ts +26 -6
- package/dist/src/math/math.d.ts.map +1 -1
- package/dist/src/math/math.spec.d.ts +2 -0
- package/dist/src/math/math.spec.d.ts.map +1 -0
- package/dist/src/migrate/migrate.d.ts +4 -1
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/record.d.ts +4 -0
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +204 -2
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +4 -4
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/strings/index.d.ts +2 -0
- package/dist/src/strings/index.d.ts.map +1 -0
- package/dist/src/strings/strings.d.ts +32 -0
- package/dist/src/strings/strings.d.ts.map +1 -0
- package/dist/src/strings/strings.spec.d.ts +2 -0
- package/dist/src/strings/strings.spec.d.ts.map +1 -0
- package/dist/src/telem/series.d.ts +35 -10
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +12 -10
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/package.json +9 -9
- package/src/caseconv/caseconv.ts +1 -0
- package/src/deep/path.ts +1 -1
- package/src/id/id.ts +2 -2
- package/src/index.ts +1 -0
- package/src/math/math.spec.ts +149 -0
- package/src/math/math.ts +60 -9
- package/src/migrate/migrate.ts +23 -4
- package/src/record.ts +5 -0
- package/src/spatial/bounds/bounds.spec.ts +135 -270
- package/src/spatial/bounds/bounds.ts +290 -25
- package/src/spatial/box/box.ts +9 -5
- package/src/strings/index.ts +10 -0
- package/src/strings/strings.spec.ts +68 -0
- package/src/strings/strings.ts +87 -0
- package/src/telem/series.spec.ts +235 -0
- package/src/telem/series.ts +271 -52
- package/src/telem/telem.spec.ts +22 -0
- package/src/telem/telem.ts +44 -20
- package/src/zodutil/zodutil.spec.ts +5 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/bounds-CpboA0q6.js +0 -127
- package/dist/bounds-ZZc1c-_Z.cjs +0 -1
- package/dist/box-BQID-0jO.cjs +0 -1
- package/dist/box-xRqO6NvI.js +0 -202
- package/dist/index-xk130iQA.cjs +0 -1
- package/dist/series-CJ65b1Uz.cjs +0 -11
package/dist/index.js
CHANGED
|
@@ -1,212 +1,246 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { e as
|
|
5
|
-
import { a as
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
8
|
-
import { L as
|
|
9
|
-
import { c as
|
|
10
|
-
import { z as
|
|
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
|
|
32
|
-
import { z as
|
|
33
|
-
const
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var T = (e, t, r) => t in e ? j(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var p = (e, t, r) => T(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { e as X } from "./index-zsix_qnl.js";
|
|
5
|
+
import { a as ee } from "./index-q_1Jz5rY.js";
|
|
6
|
+
import { c as te } from "./change-DLl6DccR.js";
|
|
7
|
+
import { c as ne, s as se } from "./scale-C7_4I3pa.js";
|
|
8
|
+
import { L as S, G as y, E as w, i as A, a as k, b as O } from "./index-B3BUDIdi.js";
|
|
9
|
+
import { c as ae, d as ce, p as le } from "./index-B3BUDIdi.js";
|
|
10
|
+
import { z as c } from "zod";
|
|
11
|
+
import { debounce as ue, throttle as me } from "./debounce.js";
|
|
12
|
+
import { deep as pe } from "./deep.js";
|
|
13
|
+
import { d as be, D as he, M as xe, R as Se, S as ye, e as ve, c as $e, b as Ee, T as Me, a as je, g as Te, h as we, i as Ae, f as ke, t as Oe } from "./series-CZw97Bq2.js";
|
|
14
|
+
import { isObject as _e } from "./identity.js";
|
|
15
|
+
import { t as Ne } from "./types-BpAJW2TM.js";
|
|
16
|
+
import { b as Pe, f as Ge } from "./bounds-CCueigU3.js";
|
|
17
|
+
import { observe as De } from "./observe.js";
|
|
18
|
+
import { getEntries as Ie, unknownRecordZ as Ve } from "./record.js";
|
|
19
|
+
import { e as qe } from "./external-CO221aaF.js";
|
|
20
|
+
import { Search as He } from "./search.js";
|
|
21
|
+
import { b as Ue } from "./box-hAkmDC3K.js";
|
|
22
|
+
import { d as Ke } from "./dimensions-D-1PnJVI.js";
|
|
23
|
+
import { d as Xe } from "./direction-CScbfCdT.js";
|
|
24
|
+
import { l as er } from "./location-B5rSnQP3.js";
|
|
25
|
+
import { p as tr } from "./position-BZOTg74V.js";
|
|
26
|
+
import { s as nr } from "./spatial-DozyssiN.js";
|
|
27
|
+
import { x as ir } from "./xy-CrgPnICw.js";
|
|
28
|
+
import { nullToArr as cr, toArray as lr } from "./toArray.js";
|
|
29
|
+
import { unique as ur } from "./unique.js";
|
|
30
|
+
import { URL as dr, buildQueryString as pr } from "./url.js";
|
|
31
|
+
import { RoutedWorker as br, TypedWorker as hr, createMockWorkers as xr } from "./worker.js";
|
|
32
|
+
import { z as yr } from "./zodutil-qNM8aVYC.js";
|
|
33
|
+
const l = class l extends Number {
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
p(l, "Absolute", 255), p(l, "Default", 1), p(l, "z", c.union([
|
|
36
|
+
c.instanceof(l),
|
|
37
|
+
c.number().int().min(0).max(255).transform((t) => new l(t)),
|
|
38
|
+
c.instanceof(Number).transform((t) => new l(t))
|
|
39
39
|
]));
|
|
40
|
-
let
|
|
41
|
-
const
|
|
42
|
-
name:
|
|
43
|
-
key:
|
|
44
|
-
}),
|
|
45
|
-
subject:
|
|
46
|
-
resource:
|
|
47
|
-
authority:
|
|
48
|
-
}),
|
|
49
|
-
let
|
|
50
|
-
return
|
|
51
|
-
}),
|
|
40
|
+
let h = l;
|
|
41
|
+
const E = c.object({
|
|
42
|
+
name: c.string(),
|
|
43
|
+
key: c.string()
|
|
44
|
+
}), L = (e) => c.object({
|
|
45
|
+
subject: E,
|
|
46
|
+
resource: e,
|
|
47
|
+
authority: h.z
|
|
48
|
+
}), _ = (...e) => (t) => t.filter((r) => {
|
|
49
|
+
let n = !1;
|
|
50
|
+
return r.to != null && (n = e.includes(r.to.resource)), r.from != null && !n && (n = e.includes(r.from.resource)), n;
|
|
51
|
+
}), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
52
52
|
__proto__: null,
|
|
53
|
-
Authority:
|
|
54
|
-
filterTransfersByChannelKey:
|
|
55
|
-
stateZ:
|
|
56
|
-
subjectZ:
|
|
57
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
53
|
+
Authority: h,
|
|
54
|
+
filterTransfersByChannelKey: _,
|
|
55
|
+
stateZ: L,
|
|
56
|
+
subjectZ: E
|
|
57
|
+
}, Symbol.toStringTag, { value: "Module" })), m = class m extends Error {
|
|
58
58
|
constructor() {
|
|
59
|
-
super(
|
|
59
|
+
super(m.MESSAGE);
|
|
60
60
|
}
|
|
61
61
|
/** Returns true if the error or message is a cancellation error" */
|
|
62
|
-
matches(
|
|
63
|
-
return typeof
|
|
62
|
+
matches(t) {
|
|
63
|
+
return typeof t == "string" ? t.includes(m.MESSAGE) : t instanceof m || t.message.includes(m.MESSAGE);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
m
|
|
67
|
-
let
|
|
68
|
-
const z = new
|
|
66
|
+
p(m, "MESSAGE", "canceled");
|
|
67
|
+
let v = m;
|
|
68
|
+
const z = new v(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
69
69
|
__proto__: null,
|
|
70
70
|
CANCELED: z
|
|
71
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
if (
|
|
76
|
-
if (g > n) return y;
|
|
77
|
-
}
|
|
78
|
-
if (e.checkMinor) {
|
|
79
|
-
if (f < s) return b;
|
|
71
|
+
}, Symbol.toStringTag, { value: "Module" })), B = (e) => e ? -1 : 1, $ = c.string().regex(/^\d+\.\d+\.\d+$/), g = (e, t, r = {}) => {
|
|
72
|
+
r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
|
|
73
|
+
const n = $.parse(e), i = $.parse(t), [f, u, d] = n.split(".").map(Number), [s, o, a] = i.split(".").map(Number);
|
|
74
|
+
if (r.checkMajor) {
|
|
75
|
+
if (f < s) return S;
|
|
80
76
|
if (f > s) return y;
|
|
81
77
|
}
|
|
82
|
-
if (
|
|
83
|
-
if (u <
|
|
84
|
-
if (u >
|
|
78
|
+
if (r.checkMinor) {
|
|
79
|
+
if (u < o) return S;
|
|
80
|
+
if (u > o) return y;
|
|
81
|
+
}
|
|
82
|
+
if (r.checkPatch) {
|
|
83
|
+
if (d < a) return S;
|
|
84
|
+
if (d > a) return y;
|
|
85
85
|
}
|
|
86
|
-
return
|
|
87
|
-
}, N = (
|
|
88
|
-
name:
|
|
89
|
-
migrate:
|
|
90
|
-
}) => (
|
|
86
|
+
return w;
|
|
87
|
+
}, N = (e, t, r = {}) => A(g(e, t, r)), M = (e, t, r = {}) => k(g(e, t, r)), R = (e, t, r = {}) => O(g(e, t, r)), P = ({
|
|
88
|
+
name: e,
|
|
89
|
+
migrate: t
|
|
90
|
+
}) => (r) => {
|
|
91
91
|
try {
|
|
92
|
-
const
|
|
93
|
-
return console.log(`${
|
|
94
|
-
} catch (
|
|
95
|
-
throw console.log(`${
|
|
92
|
+
const n = t(r);
|
|
93
|
+
return console.log(`${e} migrated: ${r.version} -> ${n.version}`), n;
|
|
94
|
+
} catch (n) {
|
|
95
|
+
throw console.log(`${e} failed to migrate from ${r.version}`), console.error(n), n;
|
|
96
96
|
}
|
|
97
|
-
},
|
|
98
|
-
name:
|
|
99
|
-
migrations:
|
|
100
|
-
targetSchema:
|
|
101
|
-
|
|
97
|
+
}, G = ({
|
|
98
|
+
name: e,
|
|
99
|
+
migrations: t,
|
|
100
|
+
targetSchema: r,
|
|
101
|
+
defaultVersion: n,
|
|
102
|
+
def: i
|
|
102
103
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
105
|
-
return (
|
|
106
|
-
if (n.version !==
|
|
104
|
+
const f = Object.keys(t).sort(g).pop();
|
|
105
|
+
if (f == null)
|
|
106
|
+
return (o) => {
|
|
107
|
+
if (o.version == null && (o.version = n), o.version !== i.version)
|
|
107
108
|
return console.log(
|
|
108
|
-
`${
|
|
109
|
+
`${e} version ${o.version} is newer than latest version of ${i.version}.
|
|
109
110
|
Returning default instead.
|
|
110
111
|
`
|
|
111
|
-
),
|
|
112
|
+
), i;
|
|
112
113
|
try {
|
|
113
|
-
return
|
|
114
|
-
} catch (
|
|
115
|
-
return console.log(`${
|
|
114
|
+
return r != null ? r.parse(o) : o;
|
|
115
|
+
} catch (a) {
|
|
116
|
+
return console.log(`${e} failed to parse default. Exiting with default`), console.error(a), i;
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
const
|
|
119
|
+
const u = Object.keys(t).length;
|
|
120
|
+
let d = !1;
|
|
121
|
+
const s = (o) => {
|
|
121
122
|
try {
|
|
122
|
-
if (
|
|
123
|
-
return console.log(
|
|
124
|
-
const
|
|
125
|
-
return
|
|
126
|
-
} catch (
|
|
123
|
+
if (u === 0 || M(o.version, f))
|
|
124
|
+
return console.log(d ? `${e} ${o.version} now up to date` : `${e} version ${o.version} is up to date with target version ${i.version}`), o;
|
|
125
|
+
const a = o.version, b = t[a], x = b(o);
|
|
126
|
+
return d = !0, s(x);
|
|
127
|
+
} catch (a) {
|
|
127
128
|
return console.log(
|
|
128
|
-
`${
|
|
129
|
-
), console.error(
|
|
129
|
+
`${e} failed to migrate from ${o.version} to ${f}`
|
|
130
|
+
), console.error(a), i;
|
|
130
131
|
}
|
|
131
132
|
};
|
|
132
|
-
return (
|
|
133
|
+
return (o) => {
|
|
133
134
|
try {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
if (o.version == null)
|
|
136
|
+
if (n != null)
|
|
137
|
+
console.log(
|
|
138
|
+
`${e} version is null. Setting version to default of ${n}`
|
|
139
|
+
), o.version = n;
|
|
140
|
+
else
|
|
141
|
+
return console.log(
|
|
142
|
+
`${e} version is null and no default version set. Exiting with default`
|
|
143
|
+
), i;
|
|
144
|
+
return s(o);
|
|
145
|
+
} catch (a) {
|
|
146
|
+
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a), i;
|
|
137
147
|
}
|
|
138
148
|
};
|
|
139
|
-
},
|
|
149
|
+
}, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
140
150
|
__proto__: null,
|
|
141
|
-
compareSemVer:
|
|
142
|
-
createMigration:
|
|
143
|
-
migrator:
|
|
144
|
-
semVerNewer:
|
|
145
|
-
semVerOlder:
|
|
146
|
-
semVerZ:
|
|
151
|
+
compareSemVer: g,
|
|
152
|
+
createMigration: P,
|
|
153
|
+
migrator: G,
|
|
154
|
+
semVerNewer: M,
|
|
155
|
+
semVerOlder: R,
|
|
156
|
+
semVerZ: $,
|
|
147
157
|
versionsEqual: N
|
|
148
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
149
|
-
if (
|
|
150
|
-
return
|
|
151
|
-
if (
|
|
152
|
-
return
|
|
153
|
-
},
|
|
158
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = (e) => {
|
|
159
|
+
if (e === void 0 || typeof e == "string" || typeof e == "number")
|
|
160
|
+
return e;
|
|
161
|
+
if (e.toString === void 0) throw new Error("invalid renderer");
|
|
162
|
+
return e.toString();
|
|
163
|
+
}, U = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, C = (e, t = "") => {
|
|
164
|
+
const r = e.length;
|
|
165
|
+
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
|
+
}, D = (e) => {
|
|
167
|
+
const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((s) => s.charAt(0).toLowerCase()).join("");
|
|
168
|
+
r.add(n), r.add(n.replace(/(.)(.)/g, "$1_$2"));
|
|
169
|
+
const i = /\d+/g;
|
|
170
|
+
e.match(i) && t.forEach((s, o) => {
|
|
171
|
+
if (i.test(s)) {
|
|
172
|
+
const a = t.map((b, x) => x !== o ? b.charAt(0).toLowerCase() : b).join("");
|
|
173
|
+
r.add(a), r.add(a.replace(/(.)(.)/g, "$1_$2"));
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const u = t.map(
|
|
177
|
+
(s) => (s.length > 3 ? s.substring(0, 3) : s).toLowerCase()
|
|
178
|
+
);
|
|
179
|
+
return r.add(u.join("")), r.add(u.join("_")), Array.from(r).filter(
|
|
180
|
+
(s) => s.length >= 2 && s.length <= 12
|
|
181
|
+
);
|
|
182
|
+
}, J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
183
|
+
__proto__: null,
|
|
184
|
+
generateShortIdentifiers: D,
|
|
185
|
+
naturalLanguageJoin: C
|
|
186
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
154
187
|
export {
|
|
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
|
-
|
|
188
|
+
be as DataType,
|
|
189
|
+
he as Density,
|
|
190
|
+
xe as MultiSeries,
|
|
191
|
+
Se as Rate,
|
|
192
|
+
br as RoutedWorker,
|
|
193
|
+
He as Search,
|
|
194
|
+
ye as Series,
|
|
195
|
+
ve as Size,
|
|
196
|
+
$e as TimeRange,
|
|
197
|
+
Ee as TimeSpan,
|
|
198
|
+
Me as TimeStamp,
|
|
199
|
+
hr as TypedWorker,
|
|
200
|
+
dr as URL,
|
|
201
|
+
je as addSamples,
|
|
202
|
+
X as binary,
|
|
203
|
+
Pe as bounds,
|
|
204
|
+
Ue as box,
|
|
205
|
+
pr as buildQueryString,
|
|
206
|
+
ee as caseconv,
|
|
207
|
+
te as change,
|
|
208
|
+
ne as clamp,
|
|
209
|
+
ae as compare,
|
|
210
|
+
W as control,
|
|
211
|
+
Te as convertDataType,
|
|
212
|
+
Q as convertRenderV,
|
|
213
|
+
xr as createMockWorkers,
|
|
214
|
+
ue as debounce,
|
|
215
|
+
pe as deep,
|
|
216
|
+
Ke as dimensions,
|
|
217
|
+
Xe as direction,
|
|
185
218
|
q as errors,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
219
|
+
Ie as getEntries,
|
|
220
|
+
we as id,
|
|
221
|
+
B as invert,
|
|
222
|
+
Ae as isCrudeSeries,
|
|
223
|
+
_e as isObject,
|
|
224
|
+
ce as isStringer,
|
|
225
|
+
ke as isTelemValue,
|
|
226
|
+
Ne as kv,
|
|
227
|
+
er as location,
|
|
228
|
+
Ge as math,
|
|
229
|
+
H as migrate,
|
|
230
|
+
cr as nullToArr,
|
|
231
|
+
De as observe,
|
|
232
|
+
tr as position,
|
|
233
|
+
le as primitiveIsZero,
|
|
234
|
+
qe as runtime,
|
|
235
|
+
se as scale,
|
|
236
|
+
U as shallowCopy,
|
|
237
|
+
nr as spatial,
|
|
238
|
+
J as strings,
|
|
239
|
+
me as throttle,
|
|
240
|
+
lr as toArray,
|
|
241
|
+
Oe as typedArrayZ,
|
|
242
|
+
ur as unique,
|
|
243
|
+
Ve as unknownRecordZ,
|
|
244
|
+
ir as xy,
|
|
245
|
+
yr as zodutil
|
|
212
246
|
};
|
|
@@ -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-q_1Jz5rY.js";
|
|
3
3
|
import { e as f, f as x, y as a, 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 = f, R = a, I = {
|
|
5
5
|
top: "bottom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("zod"),I=require("./index-
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-By0n2R_b.cjs"),c=require("./base-B48bPNx5.cjs"),R=c.xLocation,g=c.yLocation,h={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},d={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},m=c.crudeLocation,s=t=>t instanceof String?t:c.DIRECTIONS.includes(t)?t==="x"?"left":"top":t,_=t=>h[s(t)],A=t=>d[s(t)],i=t=>{const o=s(t);return o==="top"||o==="bottom"?"y":"x"},l=u.z.object({x:c.xLocation.or(c.centerLocation),y:c.yLocation.or(c.centerLocation)}),E=u.z.object({x:c.xLocation,y:c.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,o)=>t.x===o.x&&t.y===o.y,S=(t,o)=>{if(typeof o=="object"){let e=!0;return"x"in o&&(t.x===o.x||(e=!1)),"y"in o&&(t.y===o.y||(e=!1)),e}return t.x===o||t.y===o},z=t=>[t.x,t.y],y=t=>i(s(t))==="x",M=t=>i(s(t))==="y",P=t=>`${t.x}${I.capitalize(t.y)}`,X=(t,o)=>{let e,n;if(typeof t=="object"&&"x"in t?(e=t.x,n=t.y):(e=s(t),n=s(o??t)),i(e)===i(n)&&e!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`);const r={...T};return e==="center"?y(n)?[r.x,r.y]=[n,e]:[r.x,r.y]=[e,n]:n==="center"?y(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e]:y(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e],r},Y=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:L,BOTTOM_LEFT:x,BOTTOM_RIGHT:a,CENTER:T,CENTER_LOCATIONS:c.CENTER_LOCATIONS,LEFT_CENTER:C,RIGHT_CENTER:p,TOP_CENTER:b,TOP_LEFT:O,TOP_RIGHT:f,XY_LOCATIONS:N,X_LOCATIONS:c.X_LOCATIONS,Y_LOCATIONS:c.Y_LOCATIONS,construct:s,constructXY:X,corner:E,crude:m,direction:i,isX:y,isY:M,location:c.location,outer:c.outerLocation,rotate90:A,swap:_,x:R,xy:l,xyCouple:z,xyEquals:j,xyMatches:S,xyToString:P,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=E;exports.location=Y;exports.swap=_;exports.xy=l;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-YGxhLPDy.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-hAkmDC3K.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-B5rSnQP3.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-CZVdKCOc.cjs"),T=require("./direction-DZbN47uL.cjs"),r=require("./location-YGxhLPDy.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-CjNCcq8X.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var g=(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)=>g(n,typeof t!="symbol"?t+"":t,e);const R=require("zod"),x=require("./bounds-
|
|
1
|
+
"use strict";var v=Object.defineProperty;var g=(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)=>g(n,typeof t!="symbol"?t+"":t,e);const R=require("zod"),x=require("./bounds-Cudf5M4H.cjs"),u=require("./box-CZVdKCOc.cjs"),T=require("./location-YGxhLPDy.cjs"),h=require("./xy-cP-FXJtR.cjs"),m=(n,t,e)=>t!==void 0&&n<t?t:e!==void 0&&n>e?e:n,q=R.z.object({offset:h.crudeZ,scale:h.crudeZ}),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],Y=n=>(t,e,s)=>{if(t===null)return[n,s];const{lower:r,upper:o}=t,{lower:p,upper:l}=n,f=o-r,w=l-p;if(e==="dimension")return[n,s*(w/f)];const B=(s-r)*(w/f)+p;return[n,B]},j=n=>(t,e,s)=>[n,s],z=()=>(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)]},D=n=>(t,e,s)=>{const{lower:r,upper:o}=n;return s=m(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=Y(s);return o.type="scale",r.ops.push(o),r}clamp(t,e){const s=x.construct(t,e),r=this.new(),o=D(s);return o.type="clamp",r.ops.push(o),r}reBound(t,e){const s=x.construct(t,e),r=this.new(),o=j(s);return o.type="re-bound",r.ops.push(o),r}invert(){const t=z();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}};i(a,"IDENTITY",new a);let y=a;const L=n=>({scale:{x:n.x.dim(1),y:n.y.dim(1)},offset:{x:n.x.pos(0),y:n.y.pos(0)}}),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=h.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)}}box(t){return u.construct(this.pos(t.one),this.pos(t.two),0,0,this.currRoot??t.root)}};i(c,"IDENTITY",new c);let d=c;const M=Object.freeze(Object.defineProperty({__proto__:null,Scale:y,XY:d,crudeXYTransform:q,xyScaleToTransform:L},Symbol.toStringTag,{value:"Module"}));exports.clamp=m;exports.scale=M;
|
|
@@ -2,9 +2,9 @@ var g = Object.defineProperty;
|
|
|
2
2
|
var B = (r, t, e) => t in r ? g(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
3
|
var i = (r, t, e) => B(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { z as R } from "zod";
|
|
5
|
-
import { c as l } from "./bounds-
|
|
6
|
-
import { e as T, f as x, y as h, c as E } from "./box-
|
|
7
|
-
import { b as I } from "./location-
|
|
5
|
+
import { c as l } from "./bounds-CCueigU3.js";
|
|
6
|
+
import { e as T, f as x, y as h, c as E } from "./box-hAkmDC3K.js";
|
|
7
|
+
import { b as I } from "./location-B5rSnQP3.js";
|
|
8
8
|
import { b as w, c as Y } from "./xy-CrgPnICw.js";
|
|
9
9
|
const j = (r, t, e) => t !== void 0 && r < t ? t : e !== void 0 && r > e ? e : r, z = R.object({ offset: w, scale: w }), D = (r) => (t, e, s, n) => 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-BvbW9p2C.cjs");exports.scale=e.scale;
|
package/dist/scale.js
CHANGED