@synnaxlabs/x 0.38.0 → 0.38.1
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 +19 -19
- package/dist/binary.js +1 -1
- package/dist/{box-Cto-5Uxu.js → box-DPJAbf32.js} +64 -64
- package/dist/box-Daep7oxr.cjs +1 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/{external-vFGUdZf6.js → external-CtAt3tnU.js} +14 -15
- package/dist/external-DSKjMZ7J.cjs +1 -0
- package/dist/{index-OHIRoCei.js → index-C3QzbIwt.js} +1 -1
- package/dist/{index-BfDeGfej.js → index-DizUWH6z.js} +8 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +9 -9
- package/dist/{location-C5Ot4MVG.js → location-BVkZhfQG.js} +1 -1
- package/dist/location.js +1 -1
- package/dist/{position-CvSNZkSD.cjs → position-96CBRKEd.cjs} +1 -1
- package/dist/{position-GeF1oEYk.js → position-uVDP52PM.js} +2 -2
- 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-BTgf0Mr-.cjs → scale-Bzjm1mhv.cjs} +1 -1
- package/dist/{scale-Dh1UNRoC.js → scale-D_UMXSZN.js} +2 -2
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{series-DxDIugLj.js → series-Cwc_z2OS.js} +5 -5
- package/dist/{series-BMhEEJZL.cjs → series-DuOxifEy.cjs} +1 -1
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +4 -4
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/breaker/index.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/runtime/os.d.ts +7 -7
- package/dist/src/runtime/os.d.ts.map +1 -1
- package/dist/src/sleep/index.d.ts.map +1 -1
- package/dist/src/sleep/sleep.d.ts.map +1 -1
- package/dist/src/testutil/index.d.ts +2 -0
- package/dist/src/testutil/index.d.ts.map +1 -0
- package/dist/src/testutil/testutil.d.ts +2 -0
- package/dist/src/testutil/testutil.d.ts.map +1 -0
- package/dist/src/url/url.d.ts +1 -1
- package/dist/src/url/url.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 +1 -1
- package/eslint.config.js +1 -1
- package/package.json +3 -3
- package/src/binary/encoder.spec.ts +1 -1
- package/src/binary/encoder.ts +1 -1
- package/src/binary/index.ts +1 -1
- package/src/breaker/breaker.spec.ts +9 -0
- package/src/breaker/breaker.ts +9 -0
- package/src/breaker/index.ts +9 -0
- package/src/caseconv/caseconv.spec.ts +1 -1
- package/src/caseconv/caseconv.ts +16 -8
- package/src/caseconv/index.ts +1 -1
- package/src/change/change.ts +1 -1
- package/src/change/index.ts +1 -1
- package/src/clamp/clamp.ts +1 -1
- package/src/clamp/index.ts +1 -1
- package/src/compare/compare.spec.ts +1 -1
- package/src/compare/compare.ts +1 -1
- package/src/compare/index.ts +1 -1
- package/src/control/control.ts +1 -1
- package/src/control/index.ts +1 -1
- package/src/debounce/debounce.spec.ts +1 -1
- package/src/debounce/debounce.ts +1 -1
- package/src/debounce/index.ts +1 -1
- package/src/deep/copy.ts +1 -1
- package/src/deep/delete.spec.ts +1 -1
- package/src/deep/delete.ts +1 -1
- package/src/deep/difference.spec.ts +1 -1
- package/src/deep/difference.ts +1 -1
- package/src/deep/equal.spec.ts +1 -1
- package/src/deep/equal.ts +1 -1
- package/src/deep/external.ts +1 -1
- package/src/deep/index.ts +1 -1
- package/src/deep/merge.spec.ts +1 -1
- package/src/deep/merge.ts +1 -1
- package/src/deep/partial.ts +1 -1
- package/src/deep/path.spec.ts +2 -3
- package/src/deep/path.ts +3 -3
- package/src/destructor.ts +1 -1
- package/src/errors/errors.ts +1 -1
- package/src/errors/index.ts +1 -1
- package/src/id/id.ts +6 -6
- package/src/id/index.ts +1 -1
- package/src/identity.ts +1 -1
- package/src/index.ts +1 -1
- package/src/invert.ts +1 -1
- package/src/join.ts +1 -1
- package/src/kv/external.ts +1 -1
- package/src/kv/index.ts +1 -1
- package/src/kv/mock.ts +1 -1
- package/src/kv/types.ts +1 -1
- package/src/link/index.ts +1 -1
- package/src/link/link.spec.ts +1 -1
- package/src/link/link.ts +1 -1
- package/src/math/index.ts +1 -1
- package/src/math/math.spec.ts +1 -1
- package/src/math/math.ts +1 -1
- package/src/migrate/index.ts +1 -1
- package/src/migrate/migrate.spec.ts +1 -1
- package/src/migrate/migrate.ts +1 -1
- package/src/mock/MockGLBufferController.ts +1 -1
- package/src/mock/index.ts +1 -1
- package/src/numeric/index.ts +1 -1
- package/src/numeric/numeric.ts +1 -1
- package/src/observe/index.ts +1 -1
- package/src/observe/observe.ts +1 -1
- package/src/observe/obsever.spec.ts +1 -1
- package/src/optional.ts +1 -1
- package/src/primitive.ts +1 -1
- package/src/record.spec.ts +9 -0
- package/src/record.ts +1 -1
- package/src/renderable.ts +1 -1
- package/src/runtime/detect.ts +3 -3
- package/src/runtime/external.ts +1 -1
- package/src/runtime/index.ts +1 -1
- package/src/runtime/os.ts +20 -20
- package/src/search.ts +1 -1
- package/src/shallowCopy.ts +1 -1
- package/src/sleep/index.ts +9 -0
- package/src/sleep/sleep.ts +9 -0
- package/src/spatial/base.ts +1 -1
- package/src/spatial/bounds/bounds.spec.ts +4 -3
- package/src/spatial/bounds/bounds.ts +4 -4
- package/src/spatial/bounds/index.ts +1 -1
- package/src/spatial/box/box.spec.ts +1 -1
- package/src/spatial/box/box.ts +2 -2
- package/src/spatial/box/index.ts +1 -1
- package/src/spatial/dimensions/dimensions.spec.ts +1 -1
- package/src/spatial/dimensions/dimensions.ts +1 -1
- package/src/spatial/dimensions/index.ts +1 -1
- package/src/spatial/direction/direction.spec.ts +1 -1
- package/src/spatial/direction/direction.ts +1 -1
- package/src/spatial/direction/index.ts +1 -1
- package/src/spatial/external.ts +1 -1
- package/src/spatial/index.ts +1 -1
- package/src/spatial/location/index.ts +1 -1
- package/src/spatial/location/location.spec.ts +1 -1
- package/src/spatial/location/location.ts +2 -2
- package/src/spatial/position/index.ts +1 -1
- package/src/spatial/position/position.spec.ts +1 -1
- package/src/spatial/position/position.ts +1 -1
- package/src/spatial/scale/index.ts +1 -1
- package/src/spatial/scale/scale.spec.ts +1 -1
- package/src/spatial/scale/scale.ts +2 -2
- package/src/spatial/spatial.ts +1 -1
- package/src/spatial/xy/index.ts +1 -1
- package/src/spatial/xy/xy.spec.ts +1 -1
- package/src/spatial/xy/xy.ts +1 -1
- package/src/strings/index.ts +1 -1
- package/src/strings/strings.spec.ts +1 -1
- package/src/strings/strings.ts +1 -1
- package/src/telem/generate.ts +1 -1
- package/src/telem/gl.ts +1 -1
- package/src/telem/index.ts +1 -1
- package/src/telem/series.spec.ts +1 -1
- package/src/telem/series.ts +4 -4
- package/src/telem/telem.spec.ts +2 -2
- package/src/telem/telem.ts +1 -1
- package/src/testutil/index.ts +10 -0
- package/src/testutil/testutil.ts +14 -0
- package/src/toArray.ts +1 -1
- package/src/transform.ts +1 -1
- package/src/unique/index.ts +1 -1
- package/src/unique/unique.spec.ts +1 -1
- package/src/unique/unique.ts +1 -1
- package/src/url/index.ts +1 -1
- package/src/url/url.spec.ts +1 -1
- package/src/url/url.ts +2 -2
- package/src/worker/index.ts +1 -1
- package/src/worker/worker.spec.ts +1 -1
- package/src/worker/worker.ts +1 -1
- package/src/zodutil/index.ts +1 -1
- package/src/zodutil/zodutil.spec.ts +1 -1
- package/src/zodutil/zodutil.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +1 -1
- package/dist/box-BZ6d2d5A.cjs +0 -1
- package/dist/external-Cax-LfQW.cjs +0 -1
package/src/spatial/external.ts
CHANGED
package/src/spatial/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -169,6 +169,6 @@ export const constructXY = (x: Crude | XY, y?: Crude): XY => {
|
|
|
169
169
|
if (isX(parsedX)) [xy.x, xy.y] = [parsedX, parsedY];
|
|
170
170
|
else [xy.x, xy.y] = [parsedY, parsedX];
|
|
171
171
|
else if (isX(parsedX)) [xy.x, xy.y] = [parsedX, parsedY as YLocation];
|
|
172
|
-
else [xy.x, xy.y] = [parsedY as XLocation, parsedX
|
|
172
|
+
else [xy.x, xy.y] = [parsedY as XLocation, parsedX];
|
|
173
173
|
return xy;
|
|
174
174
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -72,7 +72,7 @@ const curriedScale =
|
|
|
72
72
|
if (type === "dimension") return [bound, (v * (nextRange / prevRange)) as T];
|
|
73
73
|
// @ts-expect-error - typescript can't do the math correctly
|
|
74
74
|
const nextV = ((v - prevLower) * (nextRange / prevRange) + nextLower) as T;
|
|
75
|
-
return [bound, nextV
|
|
75
|
+
return [bound, nextV];
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
const curriedReBound =
|
package/src/spatial/spatial.ts
CHANGED
package/src/spatial/xy/index.ts
CHANGED
package/src/spatial/xy/xy.ts
CHANGED
package/src/strings/index.ts
CHANGED
package/src/strings/strings.ts
CHANGED
package/src/telem/generate.ts
CHANGED
package/src/telem/gl.ts
CHANGED
package/src/telem/index.ts
CHANGED
package/src/telem/series.spec.ts
CHANGED
package/src/telem/series.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -117,12 +117,12 @@ const stringArrayZ = z.string().transform(
|
|
|
117
117
|
atob(s)
|
|
118
118
|
.split("")
|
|
119
119
|
.map((c) => c.charCodeAt(0)),
|
|
120
|
-
).buffer
|
|
120
|
+
).buffer,
|
|
121
121
|
);
|
|
122
122
|
|
|
123
123
|
const nullArrayZ = z
|
|
124
124
|
.union([z.null(), z.undefined()])
|
|
125
|
-
.transform(() => new Uint8Array().buffer
|
|
125
|
+
.transform(() => new Uint8Array().buffer);
|
|
126
126
|
|
|
127
127
|
const NEW_LINE = 10;
|
|
128
128
|
|
|
@@ -1151,7 +1151,7 @@ class MultiSubIterator<T extends TelemValue = TelemValue>
|
|
|
1151
1151
|
|
|
1152
1152
|
next(): IteratorResult<T> {
|
|
1153
1153
|
if (this.index >= this.end) return { done: true, value: undefined };
|
|
1154
|
-
return { done: false, value: this.series.at(this.index++, true)
|
|
1154
|
+
return { done: false, value: this.series.at(this.index++, true) };
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
[Symbol.iterator](): Iterator<T> {
|
package/src/telem/telem.spec.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -565,7 +565,7 @@ describe("DataType", () => {
|
|
|
565
565
|
[DataType.INT32, "int64", false],
|
|
566
566
|
];
|
|
567
567
|
TESTS.forEach(([dt, other, expected]) =>
|
|
568
|
-
it(`should return ${expected} when comparing ${dt.toString()} to ${other}`, () => {
|
|
568
|
+
it(`should return ${expected} when comparing ${dt.toString()} to ${JSON.stringify(other)}`, () => {
|
|
569
569
|
expect(dt.equals(other)).toBe(expected);
|
|
570
570
|
}),
|
|
571
571
|
);
|
package/src/telem/telem.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
+
// licenses/BSL.txt.
|
|
5
|
+
//
|
|
6
|
+
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
+
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
+
// included in the file licenses/APL.txt.
|
|
9
|
+
|
|
10
|
+
export * as testutil from "@/testutil/testutil";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
+
// licenses/BSL.txt.
|
|
5
|
+
//
|
|
6
|
+
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
+
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
+
// included in the file licenses/APL.txt.
|
|
9
|
+
|
|
10
|
+
export const toString = (value: unknown): string =>
|
|
11
|
+
JSON.stringify(value, (_, value) => {
|
|
12
|
+
if (typeof value === "bigint") return value.toString();
|
|
13
|
+
return value;
|
|
14
|
+
});
|
package/src/toArray.ts
CHANGED
package/src/transform.ts
CHANGED
package/src/unique/index.ts
CHANGED
package/src/unique/unique.ts
CHANGED
package/src/url/index.ts
CHANGED
package/src/url/url.spec.ts
CHANGED
package/src/url/url.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -36,7 +36,7 @@ const removeTrailingSlash = (path: string): string =>
|
|
|
36
36
|
* @returns the query string.
|
|
37
37
|
*/
|
|
38
38
|
export const buildQueryString = (
|
|
39
|
-
request: Record<string,
|
|
39
|
+
request: Record<string, string>,
|
|
40
40
|
prefix: string = "",
|
|
41
41
|
): string => {
|
|
42
42
|
if (request === null) return "";
|
package/src/worker/index.ts
CHANGED
package/src/worker/worker.ts
CHANGED
package/src/zodutil/index.ts
CHANGED
package/src/zodutil/zodutil.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
2
|
//
|
|
3
3
|
// Use of this software is governed by the Business Source License included in the file
|
|
4
4
|
// licenses/BSL.txt.
|
|
@@ -41,6 +41,6 @@ export const getFieldSchema: deep.TypedGet<z.ZodTypeAny, z.ZodTypeAny> = ((
|
|
|
41
41
|
sourceTypeGetter(schema, "shape") as unknown as z.AnyZodObject,
|
|
42
42
|
getFieldSchemaPath(path),
|
|
43
43
|
{ ...options, getter: sourceTypeGetter } as deep.GetOptions<boolean | undefined>,
|
|
44
|
-
)
|
|
44
|
+
)) as deep.TypedGet<z.ZodTypeAny, z.ZodTypeAny>;
|
|
45
45
|
|
|
46
46
|
export const bigInt = z.bigint().or(z.string().transform(BigInt));
|