@synnaxlabs/freighter 0.28.0 → 0.30.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.
Files changed (2) hide show
  1. package/dist/freighter.js +21 -21
  2. package/package.json +10 -10
package/dist/freighter.js CHANGED
@@ -119,7 +119,7 @@ const it = ["start", "center", "end"], ot = ["signedWidth", "signedHeight"];
119
119
  s.enum(ot);
120
120
  const X = s.object({ x: s.number(), y: s.number() }), at = s.object({ clientX: s.number(), clientY: s.number() }), ut = ["x", "y"], xe = s.enum(ut), Ue = ["top", "right", "bottom", "left"];
121
121
  s.enum(Ue);
122
- const ct = ["left", "right"], Ce = s.enum(ct), lt = ["top", "bottom"], Me = s.enum(lt), Be = ["center"], ye = s.enum(Be), ht = [...Ue, ...Be], Re = s.enum(ht);
122
+ const ct = ["left", "right"], Me = s.enum(ct), lt = ["top", "bottom"], Ce = s.enum(lt), Be = ["center"], ye = s.enum(Be), ht = [...Ue, ...Be], Re = s.enum(ht);
123
123
  s.enum(it);
124
124
  const dt = ["first", "last"];
125
125
  s.enum(dt);
@@ -139,10 +139,10 @@ const re = (r, e) => {
139
139
  return ge(t);
140
140
  }, ge = (r) => r.lower > r.upper ? { lower: r.upper, upper: r.lower } : r;
141
141
  s.object({
142
- x: Ce.or(ye),
143
- y: Me.or(ye)
142
+ x: Me.or(ye),
143
+ y: Ce.or(ye)
144
144
  });
145
- const yt = s.object({ x: Ce, y: Me }), gt = Object.freeze({ x: "left", y: "top" }), mt = (r, e) => r.x === e.x && r.y === e.y, me = s.union([
145
+ const yt = s.object({ x: Me, y: Ce }), gt = Object.freeze({ x: "left", y: "top" }), mt = (r, e) => r.x === e.x && r.y === e.y, me = s.union([
146
146
  s.number(),
147
147
  X,
148
148
  Q,
@@ -198,7 +198,7 @@ const le = (r, e, t = 0, n = 0, i) => {
198
198
  const e = le(r);
199
199
  return { lower: e.one.y, upper: e.two.y };
200
200
  }, Ot = (r) => typeof r != "object" || r == null ? !1 : "one" in r && "two" in r && "root" in r;
201
- var vt = Object.defineProperty, bt = (r, e, t) => e in r ? vt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, M = (r, e, t) => bt(r, typeof e != "symbol" ? e + "" : e, t);
201
+ var vt = Object.defineProperty, bt = (r, e, t) => e in r ? vt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, C = (r, e, t) => bt(r, typeof e != "symbol" ? e + "" : e, t);
202
202
  const Tt = (r, e, t) => e !== void 0 && r < e ? e : t !== void 0 && r > t ? t : r;
203
203
  s.object({ offset: me, scale: me });
204
204
  const St = (r) => (e, t, n, i) => t === "dimension" ? [e, n] : [
@@ -223,7 +223,7 @@ const St = (r) => (e, t, n, i) => t === "dimension" ? [e, n] : [
223
223
  return n = Tt(n, i, a), [e, n];
224
224
  }, ae = class W {
225
225
  constructor() {
226
- M(this, "ops", []), M(this, "currBounds", null), M(this, "currType", null), M(this, "reversed", !1), this.ops = [];
226
+ C(this, "ops", []), C(this, "currBounds", null), C(this, "currType", null), C(this, "reversed", !1), this.ops = [];
227
227
  }
228
228
  static translate(e) {
229
229
  return new W().translate(e);
@@ -291,32 +291,32 @@ const St = (r) => (e, t, n, i) => t === "dimension" ? [e, n] : [
291
291
  }), e.reversed = !e.reversed, e;
292
292
  }
293
293
  };
294
- M(ae, "IDENTITY", new ae());
294
+ C(ae, "IDENTITY", new ae());
295
295
  let Oe = ae;
296
- const ve = class C {
296
+ const ve = class M {
297
297
  constructor(e = new Oe(), t = new Oe(), n = null) {
298
- M(this, "x"), M(this, "y"), M(this, "currRoot"), this.x = e, this.y = t, this.currRoot = n;
298
+ C(this, "x"), C(this, "y"), C(this, "currRoot"), this.x = e, this.y = t, this.currRoot = n;
299
299
  }
300
300
  static translate(e, t) {
301
- return new C().translate(e, t);
301
+ return new M().translate(e, t);
302
302
  }
303
303
  static translateX(e) {
304
- return new C().translateX(e);
304
+ return new M().translateX(e);
305
305
  }
306
306
  static translateY(e) {
307
- return new C().translateY(e);
307
+ return new M().translateY(e);
308
308
  }
309
309
  static clamp(e) {
310
- return new C().clamp(e);
310
+ return new M().clamp(e);
311
311
  }
312
312
  static magnify(e) {
313
- return new C().magnify(e);
313
+ return new M().magnify(e);
314
314
  }
315
315
  static scale(e) {
316
- return new C().scale(e);
316
+ return new M().scale(e);
317
317
  }
318
318
  static reBound(e) {
319
- return new C().reBound(e);
319
+ return new M().reBound(e);
320
320
  }
321
321
  translate(e, t) {
322
322
  const n = wt(e, t), i = this.copy();
@@ -351,7 +351,7 @@ const ve = class C {
351
351
  return t.x = this.x.clamp(ne(e)), t.y = this.y.clamp(se(e)), t;
352
352
  }
353
353
  copy() {
354
- const e = new C();
354
+ const e = new M();
355
355
  return e.currRoot = this.currRoot, e.x = this.x, e.y = this.y, e;
356
356
  }
357
357
  reverse() {
@@ -371,10 +371,10 @@ const ve = class C {
371
371
  );
372
372
  }
373
373
  };
374
- M(ve, "IDENTITY", new ve());
374
+ C(ve, "IDENTITY", new ve());
375
375
  const xt = s.object({ signedWidth: s.number(), signedHeight: s.number() });
376
376
  s.union([$e, xt, X, Q]);
377
- var Ut = Object.defineProperty, Ct = (r, e, t) => e in r ? Ut(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, u = (r, e, t) => Ct(r, typeof e != "symbol" ? e + "" : e, t);
377
+ var Ut = Object.defineProperty, Mt = (r, e, t) => e in r ? Ut(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, u = (r, e, t) => Mt(r, typeof e != "symbol" ? e + "" : e, t);
378
378
  const De = (r, e) => {
379
379
  const t = new T(e);
380
380
  if (![
@@ -505,7 +505,7 @@ const De = (r, e) => {
505
505
  * valid, regardless of the TimeStamp order.
506
506
  */
507
507
  range(e) {
508
- return new Mt(this, e).makeValid();
508
+ return new Ct(this, e).makeValid();
509
509
  }
510
510
  /**
511
511
  * Creates a TimeRange starting at the TimeStamp and spanning the given
@@ -1076,7 +1076,7 @@ u($, "z", s.union([
1076
1076
  s.object({ start: T.z, end: T.z }).transform((r) => new $(r.start, r.end)),
1077
1077
  s.instanceof($)
1078
1078
  ]));
1079
- let Mt = $;
1079
+ let Ct = $;
1080
1080
  const o = class x extends String {
1081
1081
  constructor(e) {
1082
1082
  if (e instanceof x || typeof e == "string" || typeof e.valueOf() == "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synnaxlabs/freighter",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
5
  "description": "a modular transport abstraction",
6
6
  "repository": "https://github.com/synnaxlabs/synnax/tree/main/freighter/ts",
@@ -14,24 +14,24 @@
14
14
  "control systems"
15
15
  ],
16
16
  "dependencies": {
17
- "node-fetch": "3.3.2",
17
+ "node-fetch": "2.6.11",
18
18
  "ws": "^8.18.0",
19
19
  "zod": "3.23.8",
20
- "@synnaxlabs/alamos": "0.28.0",
21
- "@synnaxlabs/x": "0.28.0"
20
+ "@synnaxlabs/x": "0.30.0",
21
+ "@synnaxlabs/alamos": "0.30.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/node": "^22.2.0",
25
- "@vitest/coverage-v8": "^2.0.5",
26
- "typescript": "^5.5.4",
27
- "vite": "5.4.0",
28
- "vitest": "^2.0.5",
24
+ "@types/node": "^22.5.4",
25
+ "@vitest/coverage-v8": "^2.1.0",
26
+ "typescript": "^5.6.2",
27
+ "vite": "5.4.4",
28
+ "vitest": "^2.1.0",
29
29
  "@synnaxlabs/tsconfig": "0.0.2",
30
30
  "@synnaxlabs/vite-plugin": "0.0.1",
31
31
  "eslint-config-synnaxlabs": "0.0.1"
32
32
  },
33
33
  "peerDependencies": {
34
- "zod": "^3.23.8"
34
+ "zod": "3.23.8"
35
35
  },
36
36
  "main": "dist/freighter.cjs",
37
37
  "module": "dist/freighter.js",