@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.
Files changed (182) hide show
  1. package/.turbo/turbo-build.log +19 -19
  2. package/dist/binary.js +1 -1
  3. package/dist/{box-Cto-5Uxu.js → box-DPJAbf32.js} +64 -64
  4. package/dist/box-Daep7oxr.cjs +1 -0
  5. package/dist/box.cjs +1 -1
  6. package/dist/box.js +1 -1
  7. package/dist/caseconv.js +1 -1
  8. package/dist/{external-vFGUdZf6.js → external-CtAt3tnU.js} +14 -15
  9. package/dist/external-DSKjMZ7J.cjs +1 -0
  10. package/dist/{index-OHIRoCei.js → index-C3QzbIwt.js} +1 -1
  11. package/dist/{index-BfDeGfej.js → index-DizUWH6z.js} +8 -2
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.js +9 -9
  14. package/dist/{location-C5Ot4MVG.js → location-BVkZhfQG.js} +1 -1
  15. package/dist/location.js +1 -1
  16. package/dist/{position-CvSNZkSD.cjs → position-96CBRKEd.cjs} +1 -1
  17. package/dist/{position-GeF1oEYk.js → position-uVDP52PM.js} +2 -2
  18. package/dist/position.cjs +1 -1
  19. package/dist/position.js +1 -1
  20. package/dist/runtime.cjs +1 -1
  21. package/dist/runtime.js +1 -1
  22. package/dist/{scale-BTgf0Mr-.cjs → scale-Bzjm1mhv.cjs} +1 -1
  23. package/dist/{scale-Dh1UNRoC.js → scale-D_UMXSZN.js} +2 -2
  24. package/dist/scale.cjs +1 -1
  25. package/dist/scale.js +1 -1
  26. package/dist/{series-DxDIugLj.js → series-Cwc_z2OS.js} +5 -5
  27. package/dist/{series-BMhEEJZL.cjs → series-DuOxifEy.cjs} +1 -1
  28. package/dist/spatial.cjs +1 -1
  29. package/dist/spatial.js +4 -4
  30. package/dist/src/breaker/breaker.d.ts.map +1 -1
  31. package/dist/src/breaker/index.d.ts.map +1 -1
  32. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  33. package/dist/src/runtime/os.d.ts +7 -7
  34. package/dist/src/runtime/os.d.ts.map +1 -1
  35. package/dist/src/sleep/index.d.ts.map +1 -1
  36. package/dist/src/sleep/sleep.d.ts.map +1 -1
  37. package/dist/src/testutil/index.d.ts +2 -0
  38. package/dist/src/testutil/index.d.ts.map +1 -0
  39. package/dist/src/testutil/testutil.d.ts +2 -0
  40. package/dist/src/testutil/testutil.d.ts.map +1 -0
  41. package/dist/src/url/url.d.ts +1 -1
  42. package/dist/src/url/url.d.ts.map +1 -1
  43. package/dist/src/zodutil/zodutil.d.ts.map +1 -1
  44. package/dist/telem.cjs +1 -1
  45. package/dist/telem.js +1 -1
  46. package/eslint.config.js +1 -1
  47. package/package.json +3 -3
  48. package/src/binary/encoder.spec.ts +1 -1
  49. package/src/binary/encoder.ts +1 -1
  50. package/src/binary/index.ts +1 -1
  51. package/src/breaker/breaker.spec.ts +9 -0
  52. package/src/breaker/breaker.ts +9 -0
  53. package/src/breaker/index.ts +9 -0
  54. package/src/caseconv/caseconv.spec.ts +1 -1
  55. package/src/caseconv/caseconv.ts +16 -8
  56. package/src/caseconv/index.ts +1 -1
  57. package/src/change/change.ts +1 -1
  58. package/src/change/index.ts +1 -1
  59. package/src/clamp/clamp.ts +1 -1
  60. package/src/clamp/index.ts +1 -1
  61. package/src/compare/compare.spec.ts +1 -1
  62. package/src/compare/compare.ts +1 -1
  63. package/src/compare/index.ts +1 -1
  64. package/src/control/control.ts +1 -1
  65. package/src/control/index.ts +1 -1
  66. package/src/debounce/debounce.spec.ts +1 -1
  67. package/src/debounce/debounce.ts +1 -1
  68. package/src/debounce/index.ts +1 -1
  69. package/src/deep/copy.ts +1 -1
  70. package/src/deep/delete.spec.ts +1 -1
  71. package/src/deep/delete.ts +1 -1
  72. package/src/deep/difference.spec.ts +1 -1
  73. package/src/deep/difference.ts +1 -1
  74. package/src/deep/equal.spec.ts +1 -1
  75. package/src/deep/equal.ts +1 -1
  76. package/src/deep/external.ts +1 -1
  77. package/src/deep/index.ts +1 -1
  78. package/src/deep/merge.spec.ts +1 -1
  79. package/src/deep/merge.ts +1 -1
  80. package/src/deep/partial.ts +1 -1
  81. package/src/deep/path.spec.ts +2 -3
  82. package/src/deep/path.ts +3 -3
  83. package/src/destructor.ts +1 -1
  84. package/src/errors/errors.ts +1 -1
  85. package/src/errors/index.ts +1 -1
  86. package/src/id/id.ts +6 -6
  87. package/src/id/index.ts +1 -1
  88. package/src/identity.ts +1 -1
  89. package/src/index.ts +1 -1
  90. package/src/invert.ts +1 -1
  91. package/src/join.ts +1 -1
  92. package/src/kv/external.ts +1 -1
  93. package/src/kv/index.ts +1 -1
  94. package/src/kv/mock.ts +1 -1
  95. package/src/kv/types.ts +1 -1
  96. package/src/link/index.ts +1 -1
  97. package/src/link/link.spec.ts +1 -1
  98. package/src/link/link.ts +1 -1
  99. package/src/math/index.ts +1 -1
  100. package/src/math/math.spec.ts +1 -1
  101. package/src/math/math.ts +1 -1
  102. package/src/migrate/index.ts +1 -1
  103. package/src/migrate/migrate.spec.ts +1 -1
  104. package/src/migrate/migrate.ts +1 -1
  105. package/src/mock/MockGLBufferController.ts +1 -1
  106. package/src/mock/index.ts +1 -1
  107. package/src/numeric/index.ts +1 -1
  108. package/src/numeric/numeric.ts +1 -1
  109. package/src/observe/index.ts +1 -1
  110. package/src/observe/observe.ts +1 -1
  111. package/src/observe/obsever.spec.ts +1 -1
  112. package/src/optional.ts +1 -1
  113. package/src/primitive.ts +1 -1
  114. package/src/record.spec.ts +9 -0
  115. package/src/record.ts +1 -1
  116. package/src/renderable.ts +1 -1
  117. package/src/runtime/detect.ts +3 -3
  118. package/src/runtime/external.ts +1 -1
  119. package/src/runtime/index.ts +1 -1
  120. package/src/runtime/os.ts +20 -20
  121. package/src/search.ts +1 -1
  122. package/src/shallowCopy.ts +1 -1
  123. package/src/sleep/index.ts +9 -0
  124. package/src/sleep/sleep.ts +9 -0
  125. package/src/spatial/base.ts +1 -1
  126. package/src/spatial/bounds/bounds.spec.ts +4 -3
  127. package/src/spatial/bounds/bounds.ts +4 -4
  128. package/src/spatial/bounds/index.ts +1 -1
  129. package/src/spatial/box/box.spec.ts +1 -1
  130. package/src/spatial/box/box.ts +2 -2
  131. package/src/spatial/box/index.ts +1 -1
  132. package/src/spatial/dimensions/dimensions.spec.ts +1 -1
  133. package/src/spatial/dimensions/dimensions.ts +1 -1
  134. package/src/spatial/dimensions/index.ts +1 -1
  135. package/src/spatial/direction/direction.spec.ts +1 -1
  136. package/src/spatial/direction/direction.ts +1 -1
  137. package/src/spatial/direction/index.ts +1 -1
  138. package/src/spatial/external.ts +1 -1
  139. package/src/spatial/index.ts +1 -1
  140. package/src/spatial/location/index.ts +1 -1
  141. package/src/spatial/location/location.spec.ts +1 -1
  142. package/src/spatial/location/location.ts +2 -2
  143. package/src/spatial/position/index.ts +1 -1
  144. package/src/spatial/position/position.spec.ts +1 -1
  145. package/src/spatial/position/position.ts +1 -1
  146. package/src/spatial/scale/index.ts +1 -1
  147. package/src/spatial/scale/scale.spec.ts +1 -1
  148. package/src/spatial/scale/scale.ts +2 -2
  149. package/src/spatial/spatial.ts +1 -1
  150. package/src/spatial/xy/index.ts +1 -1
  151. package/src/spatial/xy/xy.spec.ts +1 -1
  152. package/src/spatial/xy/xy.ts +1 -1
  153. package/src/strings/index.ts +1 -1
  154. package/src/strings/strings.spec.ts +1 -1
  155. package/src/strings/strings.ts +1 -1
  156. package/src/telem/generate.ts +1 -1
  157. package/src/telem/gl.ts +1 -1
  158. package/src/telem/index.ts +1 -1
  159. package/src/telem/series.spec.ts +1 -1
  160. package/src/telem/series.ts +4 -4
  161. package/src/telem/telem.spec.ts +2 -2
  162. package/src/telem/telem.ts +1 -1
  163. package/src/testutil/index.ts +10 -0
  164. package/src/testutil/testutil.ts +14 -0
  165. package/src/toArray.ts +1 -1
  166. package/src/transform.ts +1 -1
  167. package/src/unique/index.ts +1 -1
  168. package/src/unique/unique.spec.ts +1 -1
  169. package/src/unique/unique.ts +1 -1
  170. package/src/url/index.ts +1 -1
  171. package/src/url/url.spec.ts +1 -1
  172. package/src/url/url.ts +2 -2
  173. package/src/worker/index.ts +1 -1
  174. package/src/worker/worker.spec.ts +1 -1
  175. package/src/worker/worker.ts +1 -1
  176. package/src/zodutil/index.ts +1 -1
  177. package/src/zodutil/zodutil.spec.ts +1 -1
  178. package/src/zodutil/zodutil.ts +2 -2
  179. package/tsconfig.tsbuildinfo +1 -1
  180. package/vite.config.ts +1 -1
  181. package/dist/box-BZ6d2d5A.cjs +0 -1
  182. package/dist/external-Cax-LfQW.cjs +0 -1
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/deep/merge.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -10,7 +10,6 @@
10
10
  import { describe, expect, it } from "vitest";
11
11
 
12
12
  import { deep } from "@/deep";
13
- import { type UnknownRecord } from "@/record";
14
13
 
15
14
  interface TestRecord {
16
15
  a: number;
@@ -68,7 +67,7 @@ describe("path", () => {
68
67
  getter: (obj, key) => {
69
68
  if (key === "value()")
70
69
  return (obj as { value: () => { c: number } }).value();
71
- return (obj as UnknownRecord)[key];
70
+ return obj[key];
72
71
  },
73
72
  }),
74
73
  ).toEqual(0);
package/src/deep/path.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -112,7 +112,7 @@ export const transformPath = (
112
112
  if (typeof r === "string") return r;
113
113
  return r.join(separator);
114
114
  })
115
- .filter((part) => part != null) as string[];
115
+ .filter((part) => part != null);
116
116
  return result.join(separator);
117
117
  };
118
118
 
@@ -133,7 +133,7 @@ export const get = (<V = unknown, T = UnknownRecord>(
133
133
  opts: GetOptions = { optional: false, separator: "." },
134
134
  ): V | null => {
135
135
  opts.separator ??= ".";
136
- const { optional, getter = (obj, key) => (obj as UnknownRecord)[key] } = opts;
136
+ const { optional, getter = (obj, key) => (obj)[key] } = opts;
137
137
  const parts = path.split(opts.separator);
138
138
  if (parts.length === 1 && parts[0] === "") return obj as unknown as V;
139
139
  let result: UnknownRecord = obj as UnknownRecord;
package/src/destructor.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/id/id.ts CHANGED
@@ -1,11 +1,11 @@
1
- // Copyright 2024 Synnax Labs, Inc.
1
+ // Copyright 2025 Synnax Labs, Inc.
2
2
  //
3
- // Use of this software is governed by the Business Source License included in
4
- // the file licenses/BSL.txt.
3
+ // Use of this software is governed by the Business Source License included in the file
4
+ // licenses/BSL.txt.
5
5
  //
6
- // As of the Change Date specified in that file, in accordance with the Business
7
- // Source License, use of this software will be governed by the Apache License,
8
- // Version 2.0, included in the file licenses/APL.txt.
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
9
 
10
10
  import { customAlphabet } from "nanoid/non-secure";
11
11
 
package/src/id/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/identity.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/invert.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/join.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/kv/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/kv/mock.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/kv/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/link/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/link/link.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/math/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/math/math.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/mock/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/optional.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/primitive.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,3 +1,12 @@
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
+
1
10
  import { describe, expect, it } from "vitest";
2
11
 
3
12
  import { mapValues } from "@/record";
package/src/record.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/renderable.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -17,14 +17,14 @@ export type Runtime = "browser" | "node" | "webworker";
17
17
  */
18
18
  export const detect = (): Runtime => {
19
19
  if (
20
-
20
+
21
21
  typeof process !== "undefined" &&
22
22
  process.versions != null &&
23
23
  process.versions.node != null
24
24
  )
25
25
  return "node";
26
26
 
27
-
27
+
28
28
  if (typeof window === "undefined" || window.document === undefined)
29
29
  return "webworker";
30
30
 
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
package/src/runtime/os.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -9,17 +9,17 @@
9
9
 
10
10
  import { z } from "zod";
11
11
 
12
- export const OPERATING_SYSTEMS = ["MacOS", "Windows", "Linux", "Docker"] as const;
13
- const LOWERCASE_OPERATING_SYSTEMS = ["macos", "windows", "linux", "docker"] as const;
12
+ export const OPERATING_SYSTEMS = ["macOS", "Windows", "Linux"] as const;
13
+ const LOWERCASE_OPERATING_SYSTEMS = ["macos", "windows", "linux"] as const;
14
14
  const LOWER_TO_UPPER_OPERATING_SYSTEMS: Record<
15
15
  (typeof LOWERCASE_OPERATING_SYSTEMS)[number],
16
16
  (typeof OPERATING_SYSTEMS)[number]
17
17
  > = {
18
- macos: "MacOS",
18
+ macos: "macOS",
19
19
  windows: "Windows",
20
20
  linux: "Linux",
21
- docker: "Docker",
22
21
  };
22
+
23
23
  export const osZ = z
24
24
  .enum(OPERATING_SYSTEMS)
25
25
  .or(
@@ -29,35 +29,35 @@ export const osZ = z
29
29
  );
30
30
  export type OS = (typeof OPERATING_SYSTEMS)[number];
31
31
 
32
- export type RequiredGetOSProps = {
32
+ const evalOS = (): OS | undefined => {
33
+ if (typeof window === "undefined") return undefined;
34
+ const userAgent = window.navigator.userAgent.toLowerCase();
35
+ if (userAgent.includes("mac")) return "macOS";
36
+ if (userAgent.includes("win")) return "Windows";
37
+ if (userAgent.includes("linux")) return "Linux";
38
+ return undefined;
39
+ };
40
+
41
+ export interface RequiredGetOSProps {
33
42
  force?: OS;
34
43
  default?: OS;
35
- };
44
+ }
36
45
 
37
- export type OptionalGetOSProps = {
38
- force?: OS | undefined;
46
+ export interface OptionalGetOSProps {
47
+ force?: OS;
39
48
  default: OS;
40
- };
49
+ }
41
50
 
42
51
  export type GetOSProps = RequiredGetOSProps | OptionalGetOSProps;
43
52
 
44
53
  let os: OS | undefined;
45
54
 
46
- const evalOS = (): OS | undefined => {
47
- if (typeof window === "undefined") return undefined;
48
- const userAgent = window.navigator.userAgent.toLowerCase();
49
- if (userAgent.includes("mac")) return "MacOS";
50
- if (userAgent.includes("win")) return "Windows";
51
- if (userAgent.includes("linux")) return "Linux";
52
- return undefined;
53
- };
54
-
55
55
  export interface GetOS {
56
56
  (props?: RequiredGetOSProps): OS;
57
57
  (props?: OptionalGetOSProps): OS | undefined;
58
58
  }
59
59
 
60
- export const getOS = ((props: GetOSProps = {}): OS | undefined => {
60
+ export const getOS: GetOS = ((props = {}) => {
61
61
  const { force, default: default_ } = props;
62
62
  if (force != null) return force;
63
63
  if (os != null) return os;
package/src/search.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1 +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
+
1
10
  export * as sleep from "@/sleep/sleep";
@@ -1,3 +1,12 @@
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
+
1
10
  import { type CrudeTimeSpan, TimeSpan } from "@/telem";
2
11
 
3
12
  export const sleep = async (span: CrudeTimeSpan): Promise<void> =>
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -11,6 +11,7 @@ import { describe, expect, it, test } from "vitest";
11
11
 
12
12
  import { type numeric } from "@/numeric";
13
13
  import * as bounds from "@/spatial/bounds/bounds";
14
+ import { testutil } from "@/testutil";
14
15
 
15
16
  describe("Bounds", () => {
16
17
  describe("construction", () => {
@@ -322,7 +323,7 @@ describe("Bounds", () => {
322
323
  },
323
324
  ];
324
325
  SPECS.forEach(({ bounds: b, start, dist, expected }) => {
325
- test(`should return ${expected} for ${b} and ${start} and ${dist}`, () => {
326
+ test(`should return ${expected} for ${testutil.toString(b)} and ${start} and ${dist}`, () => {
326
327
  expect(bounds.traverse(b, start, dist)).toEqual(expected);
327
328
  });
328
329
  });
@@ -366,7 +367,7 @@ describe("Bounds", () => {
366
367
  },
367
368
  ];
368
369
  SPECS.forEach(({ bounds: b, start, end, expected }) => {
369
- test(`should return ${expected} for ${b} and ${start} and ${end}`, () => {
370
+ test(`should return ${expected} for ${JSON.stringify(b)} and ${start} and ${end}`, () => {
370
371
  expect(bounds.distance(b, start, end)).toEqual(expected);
371
372
  });
372
373
  });
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -523,16 +523,16 @@ export const traverse = <T extends numeric.Value = number>(
523
523
  if (index !== -1) {
524
524
  const b = _bounds[index];
525
525
  let distanceInBound: T;
526
- if (dir > 0) distanceInBound = math.sub(b.upper, currentPosition) as T;
526
+ if (dir > 0) distanceInBound = math.sub(b.upper, currentPosition);
527
527
  else distanceInBound = math.sub(currentPosition, b.lower) as T;
528
528
 
529
529
  if (distanceInBound > (0 as T)) {
530
- const moveDist = math.min(math.abs(remainingDist), distanceInBound) as T;
530
+ const moveDist = math.min(math.abs(remainingDist), distanceInBound);
531
531
  currentPosition = math.add(
532
532
  currentPosition,
533
533
  dir > 0 ? moveDist : -moveDist,
534
534
  ) as T;
535
- remainingDist = math.sub(remainingDist, dir > 0 ? moveDist : -moveDist) as T;
535
+ remainingDist = math.sub(remainingDist, dir > 0 ? moveDist : -moveDist);
536
536
 
537
537
  // If we've exhausted the distance, return the current position
538
538
  if (math.equal(remainingDist, 0)) return currentPosition as T;
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -341,7 +341,7 @@ export const edgePoints = (b: Crude, loc: location.Location): [xy.XY, xy.XY] =>
341
341
  : location.Y_LOCATIONS.includes(loc as location.Y)
342
342
  ? "y"
343
343
  : null;
344
- if (x === null) throw new Error(`Invalid location: ${location}`);
344
+ if (x === null) throw new Error(`Invalid location: ${loc}`);
345
345
  const f = loc === "top" || loc === "left" ? Math.min : Math.max;
346
346
  const one = { ...b_.one };
347
347
  const two = { ...b_.two };
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
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.