@synnaxlabs/x 0.42.3 → 0.44.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 +78 -78
- package/.vscode/settings.json +4 -6
- package/README.md +1 -7
- package/dist/array.cjs +1 -0
- package/dist/array.js +7 -0
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/bounds-D6e9xoHt.cjs +1 -0
- package/dist/bounds-Dj9nG39I.js +174 -0
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/{box-0YrQibkB.cjs → box-BcGdqkt4.cjs} +1 -1
- package/dist/{box-Cc8IzcNo.js → box-D_qdUyEe.js} +2 -2
- 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/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +100 -88
- package/dist/{direction-C-b6XTeU.cjs → direction-386XDm2w.cjs} +1 -1
- package/dist/{direction-BL0PhD1k.js → direction-8etxfKaR.js} +4 -3
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/external-B9AAGv50.cjs +1 -0
- package/dist/external-BFgJjMcS.js +23 -0
- package/dist/{external-DqPrWKvU.js → external-BYuXBYJh.js} +10 -17
- package/dist/external-mffsMzJx.cjs +1 -0
- package/dist/index-B1m2qvBT.cjs +1 -0
- package/dist/index-B5l_quQn.js +92 -0
- package/dist/index-BQe8OIgm.cjs +3 -0
- package/dist/index-D2xcvEO5.js +46 -0
- package/dist/index-DdhM_E4k.cjs +1 -0
- package/dist/{index-QGplUHuy.js → index-PNh31WTW.js} +64 -37
- package/dist/index.cjs +3 -3
- package/dist/index.js +472 -428
- package/dist/kv.cjs +1 -1
- package/dist/kv.js +1 -1
- package/dist/{location-C3aeu046.js → location-Ar5y2DX2.js} +1 -1
- package/dist/{location-BGl5Ddds.cjs → location-DZi8ftXp.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/observe.cjs +1 -1
- package/dist/observe.js +16 -20
- package/dist/path-BXdMenka.js +101 -0
- package/dist/path-st_E5-LJ.cjs +1 -0
- package/dist/position-DAL0Qqdf.cjs +1 -0
- package/dist/position-bA6pUwLn.js +85 -0
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/record-CAcQ5PNX.js +14 -0
- package/dist/record-YvCh7bzB.cjs +1 -0
- package/dist/record.cjs +1 -1
- package/dist/record.js +2 -10
- package/dist/scale-Bzn1Cl0r.cjs +1 -0
- package/dist/{scale-DfJe9755.js → scale-CdTNWu-d.js} +55 -59
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BeJyqCoP.js +2568 -0
- package/dist/series-anlpaR_I.cjs +6 -0
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +6 -6
- package/dist/src/array/index.d.ts +2 -0
- package/dist/src/array/index.d.ts.map +1 -0
- package/dist/src/array/toArray.d.ts +19 -0
- package/dist/src/array/toArray.d.ts.map +1 -0
- package/dist/src/array/toArray.spec.d.ts +2 -0
- package/dist/src/array/toArray.spec.d.ts.map +1 -0
- package/dist/src/binary/codec.d.ts +7 -15
- package/dist/src/binary/codec.d.ts.map +1 -1
- package/dist/src/breaker/breaker.d.ts +5 -5
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +0 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/change/change.d.ts +2 -2
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +60 -36
- package/dist/src/color/color.d.ts.map +1 -1
- package/dist/src/color/external.d.ts +0 -1
- package/dist/src/color/external.d.ts.map +1 -1
- package/dist/src/color/gradient.d.ts +6 -6
- package/dist/src/color/gradient.d.ts.map +1 -1
- package/dist/src/color/palette.d.ts +9 -9
- package/dist/src/color/palette.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +8 -8
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/control/control.d.ts +39 -39
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/debounce/debounce.d.ts +1 -1
- package/dist/src/debounce/debounce.d.ts.map +1 -1
- package/dist/src/deep/delete.d.ts +1 -1
- package/dist/src/deep/delete.d.ts.map +1 -1
- package/dist/src/deep/difference.d.ts.map +1 -1
- package/dist/src/deep/equal.d.ts +4 -4
- package/dist/src/deep/equal.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +6 -6
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/destructor.d.ts +6 -2
- package/dist/src/destructor.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +65 -35
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/flush.d.ts +11 -0
- package/dist/src/flush.d.ts.map +1 -0
- package/dist/src/id/id.d.ts +1 -0
- package/dist/src/id/id.d.ts.map +1 -1
- package/dist/src/identity.d.ts +2 -2
- package/dist/src/identity.d.ts.map +1 -1
- package/dist/src/index.d.ts +7 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instance/index.d.ts +2 -0
- package/dist/src/instance/index.d.ts.map +1 -0
- package/dist/src/instance/matcher.d.ts +79 -0
- package/dist/src/instance/matcher.d.ts.map +1 -0
- package/dist/src/instance/matcher.spec.d.ts +2 -0
- package/dist/src/instance/matcher.spec.d.ts.map +1 -0
- package/dist/src/jsonrpc/jsonrpc.d.ts +39 -8
- package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
- package/dist/src/kv/types.d.ts +1 -1
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/map/index.d.ts +2 -0
- package/dist/src/map/index.d.ts.map +1 -0
- package/dist/src/map/map.d.ts +2 -0
- package/dist/src/map/map.d.ts.map +1 -0
- package/dist/src/map/map.spec.d.ts +2 -0
- package/dist/src/map/map.spec.d.ts.map +1 -0
- package/dist/src/math/math.d.ts +2 -4
- package/dist/src/math/math.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +4 -4
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/optional.d.ts +0 -3
- package/dist/src/optional.d.ts.map +1 -1
- package/dist/src/primitive/index.d.ts +2 -0
- package/dist/src/primitive/index.d.ts.map +1 -0
- package/dist/src/primitive/primitive.d.ts +39 -0
- package/dist/src/primitive/primitive.d.ts.map +1 -0
- package/dist/src/primitive/primitive.spec.d.ts +2 -0
- package/dist/src/primitive/primitive.spec.d.ts.map +1 -0
- package/dist/src/record/index.d.ts +2 -0
- package/dist/src/record/index.d.ts.map +1 -0
- package/dist/src/record/record.d.ts +90 -0
- package/dist/src/record/record.d.ts.map +1 -0
- package/dist/src/record/record.spec.d.ts.map +1 -0
- package/dist/src/renderable.d.ts +1 -1
- package/dist/src/renderable.d.ts.map +1 -1
- package/dist/src/replace.d.ts.map +1 -1
- package/dist/src/runtime/detect.d.ts.map +1 -1
- package/dist/src/spatial/base.d.ts +9 -9
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +82 -16
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +6 -6
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts +4 -4
- package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +2 -2
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +3 -3
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +10 -10
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +4 -4
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/index.d.ts +2 -0
- package/dist/src/status/index.d.ts.map +1 -0
- package/dist/src/status/status.d.ts +42 -0
- package/dist/src/status/status.d.ts.map +1 -0
- package/dist/src/status/status.spec.d.ts +2 -0
- package/dist/src/status/status.spec.d.ts.map +1 -0
- package/dist/src/strings/strings.d.ts +16 -0
- package/dist/src/strings/strings.d.ts.map +1 -1
- package/dist/src/sync/index.d.ts.map +1 -1
- package/dist/src/sync/mutex.d.ts +0 -1
- package/dist/src/sync/mutex.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +473 -66
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +274 -61
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/testutil/testutil.d.ts +1 -0
- package/dist/src/testutil/testutil.d.ts.map +1 -1
- package/dist/src/testutil/testutil.spec.d.ts +2 -0
- package/dist/src/testutil/testutil.spec.d.ts.map +1 -0
- package/dist/src/uuid/index.d.ts +2 -0
- package/dist/src/uuid/index.d.ts.map +1 -0
- package/dist/src/uuid/uuid.d.ts +35 -0
- package/dist/src/uuid/uuid.d.ts.map +1 -0
- package/dist/src/uuid/uuid.spec.d.ts +2 -0
- package/dist/src/uuid/uuid.spec.d.ts.map +1 -0
- package/dist/src/zod/external.d.ts +2 -1
- package/dist/src/zod/external.d.ts.map +1 -1
- package/dist/src/zod/nullToUndefined.d.ts +3 -0
- package/dist/src/zod/nullToUndefined.d.ts.map +1 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts +2 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts.map +1 -0
- package/dist/src/zod/toArray.d.ts +3 -0
- package/dist/src/zod/toArray.d.ts.map +1 -0
- package/dist/src/zod/toArray.spec.d.ts +2 -0
- package/dist/src/zod/toArray.spec.d.ts.map +1 -0
- package/dist/src/zod/util.d.ts +1 -1
- package/dist/src/zod/util.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +10 -11
- package/dist/url.cjs +1 -1
- package/dist/url.js +16 -19
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +18 -22
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +1 -1
- package/eslint.config.js +1 -1
- package/package.json +20 -23
- package/src/array/index.ts +10 -0
- package/src/array/toArray.spec.ts +56 -0
- package/src/array/toArray.ts +28 -0
- package/src/binary/codec.spec.ts +200 -277
- package/src/binary/codec.ts +19 -75
- package/src/breaker/breaker.ts +2 -2
- package/src/caseconv/caseconv.ts +14 -14
- package/src/change/change.ts +1 -1
- package/src/color/color.spec.ts +113 -2
- package/src/color/color.ts +88 -58
- package/src/color/external.ts +0 -1
- package/src/color/gradient.ts +19 -27
- package/src/compare/compare.ts +10 -10
- package/src/control/control.ts +22 -19
- package/src/debounce/debounce.ts +1 -1
- package/src/deep/delete.ts +5 -4
- package/src/deep/difference.ts +6 -2
- package/src/deep/equal.spec.ts +1 -1
- package/src/deep/equal.ts +5 -5
- package/src/deep/merge.spec.ts +1 -2
- package/src/deep/merge.ts +15 -6
- package/src/deep/path.spec.ts +41 -0
- package/src/deep/path.ts +48 -17
- package/src/destructor.ts +6 -2
- package/src/errors/errors.spec.ts +20 -20
- package/src/errors/errors.ts +67 -43
- package/src/flush.ts +21 -0
- package/src/id/id.spec.ts +1 -1
- package/src/id/id.ts +3 -1
- package/src/identity.ts +2 -2
- package/src/index.ts +7 -2
- package/src/instance/index.ts +10 -0
- package/src/instance/matcher.spec.ts +78 -0
- package/src/instance/matcher.ts +98 -0
- package/src/jsonrpc/jsonrpc.spec.ts +2 -1
- package/src/jsonrpc/jsonrpc.ts +35 -6
- package/src/map/index.ts +10 -0
- package/src/map/map.spec.ts +132 -0
- package/src/map/map.ts +17 -0
- package/src/math/math.ts +19 -27
- package/src/migrate/migrate.spec.ts +1 -1
- package/src/migrate/migrate.ts +7 -7
- package/src/optional.ts +0 -4
- package/src/primitive/index.ts +10 -0
- package/src/primitive/primitive.spec.ts +126 -0
- package/src/primitive/primitive.ts +82 -0
- package/src/record/index.ts +10 -0
- package/src/record/record.spec.ts +319 -0
- package/src/record/record.ts +118 -0
- package/src/renderable.ts +1 -1
- package/src/replace.ts +9 -0
- package/src/runtime/detect.ts +0 -2
- package/src/spatial/bounds/bounds.spec.ts +20 -0
- package/src/spatial/bounds/bounds.ts +101 -18
- package/src/spatial/dimensions/dimensions.ts +2 -2
- package/src/spatial/direction/direction.ts +1 -1
- package/src/status/index.ts +10 -0
- package/src/status/status.spec.ts +25 -0
- package/src/status/status.ts +91 -0
- package/src/strings/strings.spec.ts +51 -13
- package/src/strings/strings.ts +20 -0
- package/src/sync/index.ts +9 -0
- package/src/sync/mutex.ts +9 -4
- package/src/telem/series.spec.ts +912 -105
- package/src/telem/series.ts +577 -201
- package/src/telem/telem.spec.ts +262 -90
- package/src/telem/telem.ts +335 -125
- package/src/testutil/testutil.spec.ts +161 -0
- package/src/testutil/testutil.ts +12 -0
- package/src/uuid/index.ts +10 -0
- package/src/uuid/uuid.spec.ts +82 -0
- package/src/uuid/uuid.ts +48 -0
- package/src/zod/external.ts +2 -1
- package/src/zod/nullToUndefined.spec.ts +31 -0
- package/src/zod/nullToUndefined.ts +23 -0
- package/src/zod/toArray.spec.ts +182 -0
- package/src/{toArray.ts → zod/toArray.ts} +3 -4
- package/src/zod/util.spec.ts +1 -1
- package/src/zod/util.ts +7 -7
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +2 -3
- package/dist/bounds-BQo7rvs9.cjs +0 -1
- package/dist/bounds-Bn5_l4Z3.js +0 -173
- package/dist/external-C-dNgNQw.cjs +0 -1
- package/dist/external-C8TFju8Q.js +0 -29
- package/dist/external-DWQITF5_.cjs +0 -1
- package/dist/index-BywOGO8U.js +0 -1074
- package/dist/index-CYYjI7Uf.cjs +0 -1
- package/dist/index-C_6NXBlg.cjs +0 -3
- package/dist/index-Dd8DLyMx.cjs +0 -1
- package/dist/index-DizUWH6z.js +0 -47
- package/dist/path-1tZLZ4AN.cjs +0 -1
- package/dist/path-DD6ytXzr.js +0 -76
- package/dist/position-Cai5-wi1.cjs +0 -1
- package/dist/position-DIglP1l2.js +0 -85
- package/dist/scale-BtZINJ-A.cjs +0 -1
- package/dist/search.cjs +0 -1
- package/dist/search.js +0 -14
- package/dist/series-B9JERcqi.js +0 -1977
- package/dist/series-DqJ6f97G.cjs +0 -11
- package/dist/src/color/transformColorsToHex.d.ts +0 -6
- package/dist/src/color/transformColorsToHex.d.ts.map +0 -1
- package/dist/src/primitive.d.ts +0 -9
- package/dist/src/primitive.d.ts.map +0 -1
- package/dist/src/record.d.ts +0 -18
- package/dist/src/record.d.ts.map +0 -1
- package/dist/src/record.spec.d.ts.map +0 -1
- package/dist/src/search.d.ts +0 -18
- package/dist/src/search.d.ts.map +0 -1
- package/dist/src/toArray.d.ts +0 -3
- package/dist/src/toArray.d.ts.map +0 -1
- package/dist/src/zod/integer.d.ts +0 -10
- package/dist/src/zod/integer.d.ts.map +0 -1
- package/dist/src/zod/integer.spec.d.ts +0 -2
- package/dist/src/zod/integer.spec.d.ts.map +0 -1
- package/dist/toArray.cjs +0 -1
- package/dist/toArray.js +0 -5
- package/src/color/transformColorsToHex.ts +0 -30
- package/src/primitive.ts +0 -46
- package/src/record.spec.ts +0 -38
- package/src/record.ts +0 -47
- package/src/search.ts +0 -42
- package/src/zod/integer.spec.ts +0 -148
- package/src/zod/integer.ts +0 -38
- /package/dist/src/{record.spec.d.ts → record/record.spec.d.ts} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
import { describe, expect, it } from "vitest";
|
|
11
|
+
|
|
12
|
+
import { instance } from "@/instance";
|
|
13
|
+
|
|
14
|
+
describe("createMatcher", () => {
|
|
15
|
+
class TestClass implements instance.Discriminated {
|
|
16
|
+
discriminator = "test";
|
|
17
|
+
constructor(public value: string) {}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const isTestClass = instance.createMatcher("test", TestClass);
|
|
21
|
+
|
|
22
|
+
it("should return true for instances of the class", () => {
|
|
23
|
+
const instance = new TestClass("value");
|
|
24
|
+
expect(isTestClass(instance)).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("should return true for objects with matching discriminator", () => {
|
|
28
|
+
const obj = { discriminator: "test", value: "value" };
|
|
29
|
+
expect(isTestClass(obj)).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("should return false for null", () => {
|
|
33
|
+
expect(isTestClass(null)).toBe(false);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("should return false for undefined", () => {
|
|
37
|
+
expect(isTestClass(undefined)).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("should return false for non-objects", () => {
|
|
41
|
+
expect(isTestClass("string")).toBe(false);
|
|
42
|
+
expect(isTestClass(123)).toBe(false);
|
|
43
|
+
expect(isTestClass(true)).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("should return false for objects with different discriminator", () => {
|
|
47
|
+
const obj = { discriminator: "other", value: "value" };
|
|
48
|
+
expect(isTestClass(obj)).toBe(false);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("should return false for objects without discriminator", () => {
|
|
52
|
+
const obj = { value: "value" };
|
|
53
|
+
expect(isTestClass(obj)).toBe(false);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("should work with multiple class instances", () => {
|
|
57
|
+
class ClassA implements instance.Discriminated {
|
|
58
|
+
discriminator = "a";
|
|
59
|
+
constructor(public value: string) {}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
class ClassB implements instance.Discriminated {
|
|
63
|
+
discriminator = "b";
|
|
64
|
+
constructor(public value: string) {}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const isClassA = instance.createMatcher("a", ClassA);
|
|
68
|
+
const isClassB = instance.createMatcher("b", ClassB);
|
|
69
|
+
|
|
70
|
+
const instanceA = new ClassA("value");
|
|
71
|
+
const instanceB = new ClassB("value");
|
|
72
|
+
|
|
73
|
+
expect(isClassA(instanceA)).toBe(true);
|
|
74
|
+
expect(isClassA(instanceB)).toBe(false);
|
|
75
|
+
expect(isClassB(instanceA)).toBe(false);
|
|
76
|
+
expect(isClassB(instanceB)).toBe(true);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Interface for objects that can be discriminated by a string identifier.
|
|
12
|
+
* Classes or objects implementing this interface must have a discriminator property
|
|
13
|
+
* that uniquely identifies their type.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* class User implements Discriminated {
|
|
18
|
+
* discriminator = "user";
|
|
19
|
+
* constructor(public name: string) {}
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface Discriminated {
|
|
24
|
+
discriminator: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Creates a type guard function that checks if a value is an instance of a class
|
|
29
|
+
* using a discriminator property. It is up to the caller to ensure that the
|
|
30
|
+
* discriminator property is unique, consistent across all instances of the class,
|
|
31
|
+
* and will not appear in objects that are not instances of the class.
|
|
32
|
+
*
|
|
33
|
+
* This is particularly useful when working with instances of classes that have
|
|
34
|
+
* been duplicated or mangled by a bundler.
|
|
35
|
+
*
|
|
36
|
+
* @typeParam T - The type that extends Discriminated
|
|
37
|
+
* @param discriminator - The string value to match against the object's discriminator property
|
|
38
|
+
* @param cls - The class constructor to check for instanceof
|
|
39
|
+
* @returns A type guard function that returns true if the value matches either condition
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* class User implements Discriminated {
|
|
44
|
+
* discriminator = "user";
|
|
45
|
+
* constructor(public name: string) {}
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* const isUser = createMatcher("user", User);
|
|
49
|
+
*
|
|
50
|
+
* // Works with class instances
|
|
51
|
+
* const user = new User("John");
|
|
52
|
+
* if (isUser(user)) {
|
|
53
|
+
* console.log(user.name); // TypeScript knows user is a User
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* // Works with plain objects
|
|
57
|
+
* const obj = { discriminator: "user", name: "John" };
|
|
58
|
+
* if (isUser(obj)) {
|
|
59
|
+
* console.log(obj.name); // TypeScript knows obj is a User
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* // Working with multiple types
|
|
66
|
+
* class Admin implements Discriminated {
|
|
67
|
+
* discriminator = "admin";
|
|
68
|
+
* constructor(public name: string, public role: string) {}
|
|
69
|
+
* }
|
|
70
|
+
*
|
|
71
|
+
* class Guest implements Discriminated {
|
|
72
|
+
* discriminator = "guest";
|
|
73
|
+
* constructor(public name: string) {}
|
|
74
|
+
* }
|
|
75
|
+
*
|
|
76
|
+
* const isAdmin = createMatcher("admin", Admin);
|
|
77
|
+
* const isGuest = createMatcher("guest", Guest);
|
|
78
|
+
*
|
|
79
|
+
* function handleUser(user: unknown) {
|
|
80
|
+
* if (isAdmin(user)) {
|
|
81
|
+
* console.log(user.role); // TypeScript knows user is an Admin
|
|
82
|
+
* } else if (isGuest(user)) {
|
|
83
|
+
* console.log(user.name); // TypeScript knows user is a Guest
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export const createMatcher =
|
|
89
|
+
<T extends Discriminated>(
|
|
90
|
+
discriminator: string,
|
|
91
|
+
cls: new (...args: any[]) => T,
|
|
92
|
+
): ((value: unknown) => value is T) =>
|
|
93
|
+
(value: unknown): value is T =>
|
|
94
|
+
value instanceof cls ||
|
|
95
|
+
(typeof value === "object" &&
|
|
96
|
+
value !== null &&
|
|
97
|
+
"discriminator" in value &&
|
|
98
|
+
value.discriminator === discriminator);
|
|
@@ -109,8 +109,9 @@ describe("JSON-RPC", () => {
|
|
|
109
109
|
});
|
|
110
110
|
describe("encodeMessage", () => {
|
|
111
111
|
it("should encode a message", () => {
|
|
112
|
-
const message = {
|
|
112
|
+
const message: jsonRPC.Request = {
|
|
113
113
|
jsonrpc: "2.0",
|
|
114
|
+
id: 1,
|
|
114
115
|
method: "$/status/show",
|
|
115
116
|
};
|
|
116
117
|
const messageStr = JSON.stringify(message);
|
package/src/jsonrpc/jsonrpc.ts
CHANGED
|
@@ -11,14 +11,43 @@ import z from "zod";
|
|
|
11
11
|
|
|
12
12
|
import { binary } from "@/binary";
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
jsonrpc: z.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export const requestZ = z.object({
|
|
15
|
+
jsonrpc: z.literal("2.0"),
|
|
16
|
+
method: z.string(),
|
|
17
|
+
// params should be z.union([z.record(z.string(), z.json()),
|
|
18
|
+
// z.array(z.json())]).optional() but the VSCode JSON RPC implementation uses a looser
|
|
19
|
+
// definition of params then in the JSON-RPC spec.
|
|
20
|
+
params: z.any().optional(),
|
|
21
|
+
id: z.union([z.string(), z.number(), z.null()]).optional(),
|
|
20
22
|
});
|
|
21
23
|
|
|
24
|
+
export type Request = z.infer<typeof requestZ>;
|
|
25
|
+
|
|
26
|
+
const baseResponseZ = z.object({
|
|
27
|
+
jsonrpc: z.literal("2.0"),
|
|
28
|
+
id: z.union([z.string(), z.number(), z.null()]),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const successResponseZ = baseResponseZ.extend({
|
|
32
|
+
result: z.json(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const errorResponseZ = baseResponseZ.extend({
|
|
36
|
+
error: z.object({
|
|
37
|
+
code: z.number().int(),
|
|
38
|
+
// This should be z.string(), but the VSCode JSON RPC implementation uses a looser
|
|
39
|
+
// definition of error than the JSON-RPC spec.
|
|
40
|
+
message: z.string().optional(),
|
|
41
|
+
data: z.json().optional(),
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const responseZ = z.union([successResponseZ, errorResponseZ]);
|
|
46
|
+
|
|
47
|
+
export type Response = z.infer<typeof responseZ>;
|
|
48
|
+
|
|
49
|
+
export const messageZ = z.union([requestZ, responseZ]);
|
|
50
|
+
|
|
22
51
|
export type Message = z.infer<typeof messageZ>;
|
|
23
52
|
|
|
24
53
|
export interface ChunkParser {
|
package/src/map/index.ts
ADDED
|
@@ -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 map from "@/map/map";
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
import { describe, expect, it } from "vitest";
|
|
11
|
+
|
|
12
|
+
import { map } from "@/map";
|
|
13
|
+
|
|
14
|
+
describe("map", () => {
|
|
15
|
+
describe("getOrSetDefault", () => {
|
|
16
|
+
it("should return existing value when key exists", () => {
|
|
17
|
+
const testMap = new Map<string, number>();
|
|
18
|
+
testMap.set("existing", 42);
|
|
19
|
+
|
|
20
|
+
const result = map.getOrSetDefault(testMap, "existing", 100);
|
|
21
|
+
|
|
22
|
+
expect(result).toEqual(42);
|
|
23
|
+
expect(testMap.get("existing")).toEqual(42);
|
|
24
|
+
expect(testMap.size).toEqual(1);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("should set and return default value when key doesn't exist", () => {
|
|
28
|
+
const testMap = new Map<string, number>();
|
|
29
|
+
|
|
30
|
+
const result = map.getOrSetDefault(testMap, "new", 100);
|
|
31
|
+
|
|
32
|
+
expect(result).toEqual(100);
|
|
33
|
+
expect(testMap.get("new")).toEqual(100);
|
|
34
|
+
expect(testMap.size).toEqual(1);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("should replace the value when key exists with undefined value", () => {
|
|
38
|
+
const testMap = new Map<string, number | undefined>();
|
|
39
|
+
testMap.set("undefined", undefined);
|
|
40
|
+
|
|
41
|
+
const result = map.getOrSetDefault(testMap, "undefined", 100);
|
|
42
|
+
|
|
43
|
+
expect(result).toEqual(100);
|
|
44
|
+
expect(testMap.get("undefined")).toEqual(100);
|
|
45
|
+
expect(testMap.size).toEqual(1);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("should return null when key exists with null value", () => {
|
|
49
|
+
const testMap = new Map<string, number | null>();
|
|
50
|
+
testMap.set("null", null);
|
|
51
|
+
|
|
52
|
+
const result = map.getOrSetDefault(testMap, "null", 100);
|
|
53
|
+
|
|
54
|
+
expect(result).toBeNull();
|
|
55
|
+
expect(testMap.get("null")).toBeNull();
|
|
56
|
+
expect(testMap.size).toEqual(1);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("should work with different key types", () => {
|
|
60
|
+
const numberMap = new Map<number, string>();
|
|
61
|
+
const result1 = map.getOrSetDefault(numberMap, 1, "default");
|
|
62
|
+
expect(result1).toEqual("default");
|
|
63
|
+
expect(numberMap.get(1)).toEqual("default");
|
|
64
|
+
const objKey = { id: 1 };
|
|
65
|
+
const objectMap = new Map<object, string>();
|
|
66
|
+
const result2 = map.getOrSetDefault(objectMap, objKey, "object-default");
|
|
67
|
+
expect(result2).toEqual("object-default");
|
|
68
|
+
expect(objectMap.get(objKey)).toEqual("object-default");
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("should work with different value types", () => {
|
|
72
|
+
const stringMap = new Map<string, string>();
|
|
73
|
+
const result1 = map.getOrSetDefault(stringMap, "key", "default");
|
|
74
|
+
expect(result1).toEqual("default");
|
|
75
|
+
const boolMap = new Map<string, boolean>();
|
|
76
|
+
const result2 = map.getOrSetDefault(boolMap, "key", true);
|
|
77
|
+
expect(result2).toEqual(true);
|
|
78
|
+
const objValue = { name: "test" };
|
|
79
|
+
const objMap = new Map<string, object>();
|
|
80
|
+
const result3 = map.getOrSetDefault(objMap, "key", objValue);
|
|
81
|
+
expect(result3).toEqual(objValue);
|
|
82
|
+
expect(result3).toBe(objValue);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("should handle empty maps", () => {
|
|
86
|
+
const emptyMap = new Map<string, number>();
|
|
87
|
+
|
|
88
|
+
const result = map.getOrSetDefault(emptyMap, "first", 42);
|
|
89
|
+
|
|
90
|
+
expect(result).toEqual(42);
|
|
91
|
+
expect(emptyMap.get("first")).toEqual(42);
|
|
92
|
+
expect(emptyMap.size).toEqual(1);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("should handle multiple operations on same map", () => {
|
|
96
|
+
const testMap = new Map<string, number>();
|
|
97
|
+
const result1 = map.getOrSetDefault(testMap, "key1", 10);
|
|
98
|
+
expect(result1).toEqual(10);
|
|
99
|
+
expect(testMap.size).toEqual(1);
|
|
100
|
+
const result2 = map.getOrSetDefault(testMap, "key1", 20);
|
|
101
|
+
expect(result2).toEqual(10); // Original value, not new default
|
|
102
|
+
expect(testMap.size).toEqual(1);
|
|
103
|
+
const result3 = map.getOrSetDefault(testMap, "key2", 30);
|
|
104
|
+
expect(result3).toEqual(30);
|
|
105
|
+
expect(testMap.size).toEqual(2);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("should handle falsy values correctly", () => {
|
|
109
|
+
const testMap = new Map<string, number | string | boolean>();
|
|
110
|
+
testMap.set("zero", 0);
|
|
111
|
+
const result1 = map.getOrSetDefault(testMap, "zero", 100);
|
|
112
|
+
expect(result1).toEqual(0);
|
|
113
|
+
testMap.set("empty", "");
|
|
114
|
+
const result2 = map.getOrSetDefault(testMap, "empty", "default");
|
|
115
|
+
expect(result2).toEqual("");
|
|
116
|
+
testMap.set("false", false);
|
|
117
|
+
const result3 = map.getOrSetDefault(testMap, "false", true);
|
|
118
|
+
expect(result3).toEqual(false);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should handle arrays and complex objects", () => {
|
|
122
|
+
const testMap = new Map<string, number[]>();
|
|
123
|
+
const defaultArray = [1, 2, 3];
|
|
124
|
+
|
|
125
|
+
const result = map.getOrSetDefault(testMap, "array", defaultArray);
|
|
126
|
+
|
|
127
|
+
expect(result).toEqual([1, 2, 3]);
|
|
128
|
+
expect(result).toBe(defaultArray); // Same reference
|
|
129
|
+
expect(testMap.get("array")).toBe(defaultArray);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
package/src/map/map.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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 getOrSetDefault = <K, V>(map: Map<K, V>, key: K, defaultValue: V): V => {
|
|
11
|
+
const value = map.get(key);
|
|
12
|
+
if (value === undefined) {
|
|
13
|
+
map.set(key, defaultValue);
|
|
14
|
+
return defaultValue;
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
};
|
package/src/math/math.ts
CHANGED
|
@@ -7,27 +7,20 @@
|
|
|
7
7
|
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
|
-
/** A
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
/** An extension of {@link PrimitiveNumeric} that includes the {@link BigInt} and {@link Number} classes. */
|
|
14
|
-
export type Numeric = PrimitiveNumeric | Number | BigInt;
|
|
15
|
-
|
|
16
|
-
const isBigInt = (n: Numeric): n is bigint | BigInt =>
|
|
17
|
-
typeof n === "bigint" || n instanceof BigInt;
|
|
10
|
+
/** A numeric value is either a a number, or a bigint. */
|
|
11
|
+
export type Numeric = number | bigint;
|
|
18
12
|
|
|
19
13
|
/**
|
|
20
14
|
* @returns the product of a and b, coercing b to the type of a if necessary. */
|
|
21
15
|
export const sub = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
22
|
-
if (
|
|
23
|
-
return (a
|
|
16
|
+
if (typeof a === "bigint") return (a - BigInt(b)) as V;
|
|
17
|
+
return (a - Number(b)) as V;
|
|
24
18
|
};
|
|
25
19
|
|
|
26
20
|
/** @returns the sum of a and b, coercing b to the type of a if necessary. */
|
|
27
21
|
export const add = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
return (a + Number(b.valueOf())) as V;
|
|
22
|
+
if (typeof a === "bigint") return (a + BigInt(b)) as V;
|
|
23
|
+
return ((a as unknown as number) + Number(b)) as V;
|
|
31
24
|
};
|
|
32
25
|
|
|
33
26
|
/** @returns true if a is close to b within epsilon. */
|
|
@@ -36,8 +29,8 @@ export const closeTo = (a: number, b: number, epsilon = 0.0001): boolean =>
|
|
|
36
29
|
|
|
37
30
|
/** @returns true if a is equal to b, coercing b to the type of a if necessary. */
|
|
38
31
|
export const equal = <V extends Numeric>(a: V, b: Numeric): boolean => {
|
|
39
|
-
if (
|
|
40
|
-
return a === Number(b
|
|
32
|
+
if (typeof a === "bigint") return a === BigInt(b);
|
|
33
|
+
return a === Number(b);
|
|
41
34
|
};
|
|
42
35
|
|
|
43
36
|
/**
|
|
@@ -53,32 +46,31 @@ export const roundToNearestMagnitude = (num: number): number => {
|
|
|
53
46
|
|
|
54
47
|
/** @returns the minimum of a and b, coercing b to the type of a if necessary. */
|
|
55
48
|
export const min = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
return (a
|
|
49
|
+
if (a <= b) return a;
|
|
50
|
+
if (typeof a === "bigint") return (a <= b ? a : BigInt(b)) as V;
|
|
51
|
+
return (a <= b ? a : Number(b)) as V;
|
|
59
52
|
};
|
|
60
53
|
|
|
61
54
|
/** @returns the maximum of a and b, coercing b to the type of a if necessary. */
|
|
62
55
|
export const max = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
return (a.valueOf() > Number(b.valueOf()) ? a : Number(b.valueOf())) as V;
|
|
56
|
+
if (typeof a === "bigint") return (a >= b ? a : BigInt(b)) as V;
|
|
57
|
+
return (a >= b ? a : Number(b)) as V;
|
|
66
58
|
};
|
|
67
59
|
|
|
68
60
|
/** @returns the absolute value of a. */
|
|
69
61
|
export const abs = <V extends Numeric>(a: V): V => {
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
62
|
+
if (a < 0) return -a as V;
|
|
63
|
+
return a;
|
|
72
64
|
};
|
|
73
65
|
|
|
74
66
|
/** @returns the multiplication of a and b, coercing b to the type of a if necessary. */
|
|
75
67
|
export const mult = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
76
|
-
if (
|
|
77
|
-
return (a
|
|
68
|
+
if (typeof a === "bigint") return (a * BigInt(b)) as V;
|
|
69
|
+
return (a * Number(b)) as V;
|
|
78
70
|
};
|
|
79
71
|
|
|
80
72
|
/** @returns the division of a and b, coercing b to the type of a if necessary. */
|
|
81
73
|
export const div = <V extends Numeric>(a: V, b: Numeric): V => {
|
|
82
|
-
if (
|
|
83
|
-
return (a
|
|
74
|
+
if (typeof a === "bigint") return (a / BigInt(b)) as V;
|
|
75
|
+
return (a / Number(b)) as V;
|
|
84
76
|
};
|
|
@@ -59,7 +59,7 @@ const migrations: migrate.Migrations = {
|
|
|
59
59
|
describe("compareSemVer", () => {
|
|
60
60
|
it("should return true when the major version is higher", () => {
|
|
61
61
|
expect(migrate.compareSemVer("1.0.0", "0.0.0")).toBeGreaterThan(0);
|
|
62
|
-
expect(migrate.semVerNewer("3.0.0", "0.3.0")).
|
|
62
|
+
expect(migrate.semVerNewer("3.0.0", "0.3.0")).toBe(true);
|
|
63
63
|
});
|
|
64
64
|
describe("only check major", () => {
|
|
65
65
|
it("should return equal when the major versions are equal but the minor and patch are different", () => {
|
package/src/migrate/migrate.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const compareSemVer = ((
|
|
|
70
70
|
if (aPatch > bPatch) return compare.GREATER_THAN;
|
|
71
71
|
}
|
|
72
72
|
return compare.EQUAL;
|
|
73
|
-
}) satisfies compare.
|
|
73
|
+
}) satisfies compare.Comparator<SemVer>;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @returns true if the two semantic versions are equal.
|
|
@@ -118,8 +118,8 @@ export type Migration<I extends Migratable, O extends Migratable> = (input: I) =
|
|
|
118
118
|
export interface MigrationProps<
|
|
119
119
|
I extends Migratable,
|
|
120
120
|
O extends Migratable,
|
|
121
|
-
ZI extends z.
|
|
122
|
-
ZO extends z.
|
|
121
|
+
ZI extends z.ZodType,
|
|
122
|
+
ZO extends z.ZodType,
|
|
123
123
|
> {
|
|
124
124
|
name: string;
|
|
125
125
|
inputSchema?: ZI;
|
|
@@ -131,8 +131,8 @@ export const createMigration =
|
|
|
131
131
|
<
|
|
132
132
|
I extends Migratable,
|
|
133
133
|
O extends Migratable,
|
|
134
|
-
ZI extends z.
|
|
135
|
-
ZO extends z.
|
|
134
|
+
ZI extends z.ZodType = z.ZodType,
|
|
135
|
+
ZO extends z.ZodType = z.ZodType,
|
|
136
136
|
>({
|
|
137
137
|
name,
|
|
138
138
|
migrate,
|
|
@@ -155,7 +155,7 @@ export const createMigration =
|
|
|
155
155
|
*/
|
|
156
156
|
export type Migrations = Record<string, Migration<any, any>>;
|
|
157
157
|
|
|
158
|
-
interface MigratorProps<O extends Migratable, ZO extends z.
|
|
158
|
+
interface MigratorProps<O extends Migratable, ZO extends z.ZodType = z.ZodType> {
|
|
159
159
|
name: string;
|
|
160
160
|
migrations: Migrations;
|
|
161
161
|
def: O;
|
|
@@ -168,7 +168,7 @@ export type Migrator = <I extends Optional<Migratable, "version">, O>(v: I) => O
|
|
|
168
168
|
export const migrator = <
|
|
169
169
|
I extends Optional<Migratable, "version">,
|
|
170
170
|
O extends Migratable,
|
|
171
|
-
ZO extends z.
|
|
171
|
+
ZO extends z.ZodType = z.ZodType,
|
|
172
172
|
>({
|
|
173
173
|
name,
|
|
174
174
|
migrations,
|
package/src/optional.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 primitive from "@/primitive/primitive";
|