@synnaxlabs/drift 0.43.0 → 0.44.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/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { configureStore as j } from "@reduxjs/toolkit";
2
- import { M as w, g, l as d, a as T, r as E, A as y, K as F, I as N, b as M, i as V, c as $, s as U, d as K, e as Q, f as I, h as C, S as q, Z, j as X, k as B, m as G, n as Y, o as H, p as J, q as x, t as W, u as ee, v as se, w as ie, x as te, y as ae, z as oe, B as ne, C as ce, D as le, E as re, F as ue, G as fe } from "./state-C1PObbun.js";
3
- import { s as de, a as we, b as he, c as ye, d as pe, e as _e } from "./selectors-CzAkOydY.js";
2
+ import { M as w, g, l as d, a as T, r as E, _ as y, K as F, I as N, b as M, i as V, c as $, s as U, d as K, e as Q, f as I, h as C, S as q, Z, j as X, k as B, m as Y, n as G, o as H, p as J, q as x, t as W, u as ee, v as se, w as te, x as ie, y as ae, z as oe, A as ne, B as ce, C as le, D as re, E as ue, F as fe } from "./state-C0QVe0pH.js";
3
+ import { s as de, a as we, b as he, c as ye, d as pe, e as _e } from "./selectors-CkwjN1oc.js";
4
4
  const be = new Error("request for lock canceled");
5
- var ze = function(i, e, s, t) {
5
+ var me = function(t, e, s, i) {
6
6
  function a(o) {
7
7
  return o instanceof s ? o : new s(function(c) {
8
8
  c(o);
@@ -11,14 +11,14 @@ var ze = function(i, e, s, t) {
11
11
  return new (s || (s = Promise))(function(o, c) {
12
12
  function n(l) {
13
13
  try {
14
- u(t.next(l));
14
+ u(i.next(l));
15
15
  } catch (f) {
16
16
  c(f);
17
17
  }
18
18
  }
19
19
  function r(l) {
20
20
  try {
21
- u(t.throw(l));
21
+ u(i.throw(l));
22
22
  } catch (f) {
23
23
  c(f);
24
24
  }
@@ -26,24 +26,24 @@ var ze = function(i, e, s, t) {
26
26
  function u(l) {
27
27
  l.done ? o(l.value) : a(l.value).then(n, r);
28
28
  }
29
- u((t = t.apply(i, e || [])).next());
29
+ u((i = i.apply(t, e || [])).next());
30
30
  });
31
31
  };
32
- class me {
32
+ class ze {
33
33
  constructor(e, s = be) {
34
34
  this._value = e, this._cancelError = s, this._queue = [], this._weightedWaiters = [];
35
35
  }
36
36
  acquire(e = 1, s = 0) {
37
37
  if (e <= 0)
38
38
  throw new Error(`invalid weight ${e}: must be positive`);
39
- return new Promise((t, a) => {
40
- const o = { resolve: t, reject: a, weight: e, priority: s }, c = O(this._queue, (n) => s <= n.priority);
39
+ return new Promise((i, a) => {
40
+ const o = { resolve: i, reject: a, weight: e, priority: s }, c = O(this._queue, (n) => s <= n.priority);
41
41
  c === -1 && e <= this._value ? this._dispatchItem(o) : this._queue.splice(c + 1, 0, o);
42
42
  });
43
43
  }
44
44
  runExclusive(e) {
45
- return ze(this, arguments, void 0, function* (s, t = 1, a = 0) {
46
- const [o, c] = yield this.acquire(t, a);
45
+ return me(this, arguments, void 0, function* (s, i = 1, a = 0) {
46
+ const [o, c] = yield this.acquire(i, a);
47
47
  try {
48
48
  return yield s(o);
49
49
  } finally {
@@ -54,8 +54,8 @@ class me {
54
54
  waitForUnlock(e = 1, s = 0) {
55
55
  if (e <= 0)
56
56
  throw new Error(`invalid weight ${e}: must be positive`);
57
- return this._couldLockImmediately(e, s) ? Promise.resolve() : new Promise((t) => {
58
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Se(this._weightedWaiters[e - 1], { resolve: t, priority: s });
57
+ return this._couldLockImmediately(e, s) ? Promise.resolve() : new Promise((i) => {
58
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Se(this._weightedWaiters[e - 1], { resolve: i, priority: s });
59
59
  });
60
60
  }
61
61
  isLocked() {
@@ -93,16 +93,16 @@ class me {
93
93
  if (this._queue.length === 0)
94
94
  for (let e = this._value; e > 0; e--) {
95
95
  const s = this._weightedWaiters[e - 1];
96
- s && (s.forEach((t) => t.resolve()), this._weightedWaiters[e - 1] = []);
96
+ s && (s.forEach((i) => i.resolve()), this._weightedWaiters[e - 1] = []);
97
97
  }
98
98
  else {
99
99
  const e = this._queue[0].priority;
100
100
  for (let s = this._value; s > 0; s--) {
101
- const t = this._weightedWaiters[s - 1];
102
- if (!t)
101
+ const i = this._weightedWaiters[s - 1];
102
+ if (!i)
103
103
  continue;
104
- const a = t.findIndex((o) => o.priority <= e);
105
- (a === -1 ? t : t.splice(0, a)).forEach((o) => o.resolve());
104
+ const a = i.findIndex((o) => o.priority <= e);
105
+ (a === -1 ? i : i.splice(0, a)).forEach((o) => o.resolve());
106
106
  }
107
107
  }
108
108
  }
@@ -110,17 +110,17 @@ class me {
110
110
  return (this._queue.length === 0 || this._queue[0].priority < s) && e <= this._value;
111
111
  }
112
112
  }
113
- function Se(i, e) {
114
- const s = O(i, (t) => e.priority <= t.priority);
115
- i.splice(s + 1, 0, e);
113
+ function Se(t, e) {
114
+ const s = O(t, (i) => e.priority <= i.priority);
115
+ t.splice(s + 1, 0, e);
116
116
  }
117
- function O(i, e) {
118
- for (let s = i.length - 1; s >= 0; s--)
119
- if (e(i[s]))
117
+ function O(t, e) {
118
+ for (let s = t.length - 1; s >= 0; s--)
119
+ if (e(t[s]))
120
120
  return s;
121
121
  return -1;
122
122
  }
123
- var ke = function(i, e, s, t) {
123
+ var ke = function(t, e, s, i) {
124
124
  function a(o) {
125
125
  return o instanceof s ? o : new s(function(c) {
126
126
  c(o);
@@ -129,14 +129,14 @@ var ke = function(i, e, s, t) {
129
129
  return new (s || (s = Promise))(function(o, c) {
130
130
  function n(l) {
131
131
  try {
132
- u(t.next(l));
132
+ u(i.next(l));
133
133
  } catch (f) {
134
134
  c(f);
135
135
  }
136
136
  }
137
137
  function r(l) {
138
138
  try {
139
- u(t.throw(l));
139
+ u(i.throw(l));
140
140
  } catch (f) {
141
141
  c(f);
142
142
  }
@@ -144,12 +144,12 @@ var ke = function(i, e, s, t) {
144
144
  function u(l) {
145
145
  l.done ? o(l.value) : a(l.value).then(n, r);
146
146
  }
147
- u((t = t.apply(i, e || [])).next());
147
+ u((i = i.apply(t, e || [])).next());
148
148
  });
149
149
  };
150
150
  class ve {
151
151
  constructor(e) {
152
- this._semaphore = new me(1, e);
152
+ this._semaphore = new ze(1, e);
153
153
  }
154
154
  acquire() {
155
155
  return ke(this, arguments, void 0, function* (e = 0) {
@@ -173,165 +173,165 @@ class ve {
173
173
  return this._semaphore.cancel();
174
174
  }
175
175
  }
176
- const ge = (i) => [...new Set(i)], Te = (i, e, s = !0) => {
177
- const t = /* @__PURE__ */ new Map();
178
- return i.forEach((a) => {
176
+ const ge = (t) => [...new Set(t)], Te = (t, e, s = !0) => {
177
+ const i = /* @__PURE__ */ new Map();
178
+ return t.forEach((a) => {
179
179
  const o = e(a);
180
- if (t.has(o)) {
180
+ if (i.has(o)) {
181
181
  if (s) return;
182
- t.delete(o);
182
+ i.delete(o);
183
183
  }
184
- t.set(o, a);
185
- }), Array.from(t.values());
184
+ i.set(o, a);
185
+ }), Array.from(i.values());
186
186
  }, Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
187
187
  __proto__: null,
188
188
  by: Te,
189
189
  unique: ge
190
- }, Symbol.toStringTag, { value: "Module" })), L = "DA@", A = "://", Me = (i, e) => L.concat(e, A, i), Ie = (i) => {
191
- const [e, s] = i.split(A);
192
- if (s == null) return [i, ""];
193
- const [, t] = e.split(L);
194
- return [s, t];
195
- }, m = (i, e) => ({
196
- ...i,
197
- type: Me(i.type, e)
198
- }), Ce = (i) => {
199
- const [e, s] = Ie(i.type);
190
+ }, Symbol.toStringTag, { value: "Module" })), L = "DA@", A = "://", Me = (t, e) => L.concat(e, A, t), Ie = (t) => {
191
+ const [e, s] = t.split(A);
192
+ if (s == null) return [t, ""];
193
+ const [, i] = e.split(L);
194
+ return [s, i];
195
+ }, z = (t, e) => ({
196
+ ...t,
197
+ type: Me(t.type, e)
198
+ }), Ce = (t) => {
199
+ const [e, s] = Ie(t.type);
200
200
  return {
201
201
  emitted: s != null && s.length > 0,
202
202
  emitter: s,
203
- action: { ...i, type: e }
203
+ action: { ...t, type: e }
204
204
  };
205
- }, qe = (i) => {
205
+ }, qe = (t) => {
206
206
  const {
207
207
  centerCount: e,
208
208
  processCount: s,
209
- focusCount: t,
209
+ focusCount: i,
210
210
  stage: a,
211
211
  key: o,
212
212
  prerenderLabel: c,
213
213
  reserved: n,
214
214
  minimized: r,
215
215
  ...u
216
- } = i;
216
+ } = t;
217
217
  return u;
218
- }, Oe = async (i, e, s, t) => {
218
+ }, Oe = async (t, e, s, i) => {
219
219
  const a = (await s.listLabels()).filter(
220
220
  (l) => l !== w
221
- ), o = Object.keys(i.windows).filter((l) => l !== w);
222
- g(t, "syncInitial"), d(t, "existing windows in runtime", a.sort()), d(t, "non-main windows in state", o.sort()), T(t);
221
+ ), o = Object.keys(t.windows).filter((l) => l !== w);
222
+ g(i, "syncInitial"), d(i, "existing windows in runtime", a.sort()), d(i, "non-main windows in state", o.sort()), T(i);
223
223
  const c = Ee.unique([...a, ...o]);
224
224
  for (const l of c)
225
- !a.includes(l) && s.isMain() ? (d(t, "state window not in runtime, creating", l), await P(s, l, i.windows[l], t)) : o.includes(l) || (d(t, "runtime window not in state, closing", l), await p(s, l, t));
226
- const n = s.label(), r = i.windows[n];
225
+ !a.includes(l) && s.isMain() ? (d(i, "state window not in runtime, creating", l), await R(s, l, t.windows[l], i)) : o.includes(l) || (d(i, "runtime window not in state, closing", l), await p(s, l, i));
226
+ const n = s.label(), r = t.windows[n];
227
227
  if (r == null) return;
228
228
  const u = { ...N };
229
- await R(u, r, s, t), e(
229
+ await P(u, r, s, i), e(
230
230
  E({ label: s.label(), ...await s.getProps() })
231
231
  );
232
- }, Le = async (i, e, s, t) => {
233
- d(t, "sync", i, e), s.isMain() && await Ae(i, e, s, t);
234
- const a = i.windows[s.label()], o = e.windows[s.label()];
235
- a == null || o == null || await R(a, o, s, t);
236
- }, R = async (i, e, s, t) => {
232
+ }, Le = async (t, e, s, i) => {
233
+ d(i, "sync", t, e), s.isMain() && await Ae(t, e, s, i);
234
+ const a = t.windows[s.label()], o = e.windows[s.label()];
235
+ a == null || o == null || await P(a, o, s, i);
236
+ }, P = async (t, e, s, i) => {
237
237
  const a = [];
238
- e.title != null && e.title !== i.title && a.push([
238
+ e.title != null && e.title !== t.title && a.push([
239
239
  "title",
240
- { prev: i.title, next: e.title },
240
+ { prev: t.title, next: e.title },
241
241
  async () => s.setTitle(e.title)
242
242
  ]);
243
- const o = e.visible != null && e.visible !== i.visible, c = e.visible === !1, n = () => a.push([
243
+ const o = e.visible != null && e.visible !== t.visible, c = e.visible === !1, n = () => a.push([
244
244
  "visible",
245
- { prev: i.visible, next: e.visible },
245
+ { prev: t.visible, next: e.visible },
246
246
  async () => {
247
247
  if (await s.setVisible(e.visible), e.visible === !1) return;
248
248
  let r = e.position;
249
- r ?? (r = (await s.getProps()).position), r != null && (await s.setPosition(F.translate(r, { x: 1, y: 1 })), await s.setPosition(r));
249
+ r ??= (await s.getProps()).position, r != null && (await s.setPosition(F.translate(r, { x: 1, y: 1 })), await s.setPosition(r));
250
250
  }
251
251
  ]);
252
- if (o && c && n(), e.skipTaskbar != null && e.skipTaskbar !== i.skipTaskbar && a.push([
252
+ if (o && c && n(), e.skipTaskbar != null && e.skipTaskbar !== t.skipTaskbar && a.push([
253
253
  "skipTaskbar",
254
- { prev: i.skipTaskbar, next: e.skipTaskbar },
254
+ { prev: t.skipTaskbar, next: e.skipTaskbar },
255
255
  async () => await s.setSkipTaskbar(e.skipTaskbar)
256
- ]), e.maximized != null && e.maximized !== i.maximized && a.push([
256
+ ]), e.maximized != null && e.maximized !== t.maximized && a.push([
257
257
  "maximized",
258
- { prev: i.maximized, next: e.maximized },
258
+ { prev: t.maximized, next: e.maximized },
259
259
  async () => await s.setMaximized(e.maximized)
260
- ]), e.fullscreen != null && e.fullscreen !== i.fullscreen && a.push([
260
+ ]), e.fullscreen != null && e.fullscreen !== t.fullscreen && a.push([
261
261
  "fullscreen",
262
- { prev: i.fullscreen, next: e.fullscreen },
262
+ { prev: t.fullscreen, next: e.fullscreen },
263
263
  async () => await s.setFullscreen(e.fullscreen)
264
- ]), e.centerCount !== i.centerCount && a.push([
264
+ ]), e.centerCount !== t.centerCount && a.push([
265
265
  "center",
266
- { prev: i.centerCount, next: e.centerCount },
266
+ { prev: t.centerCount, next: e.centerCount },
267
267
  async () => s.center()
268
- ]), e.minimized != null && e.minimized !== i.minimized && a.push([
268
+ ]), e.minimized != null && e.minimized !== t.minimized && a.push([
269
269
  "minimized",
270
- { prev: i.minimized, next: e.minimized },
270
+ { prev: t.minimized, next: e.minimized },
271
271
  async () => await s.setMinimized(e.minimized)
272
- ]), e.resizable != null && e.resizable !== i.resizable && a.push([
272
+ ]), e.resizable != null && e.resizable !== t.resizable && a.push([
273
273
  "resizable",
274
- { prev: i.resizable, next: e.resizable },
274
+ { prev: t.resizable, next: e.resizable },
275
275
  async () => await s.setResizable(e.resizable)
276
- ]), e.minSize != null && !y.equals(e.minSize, i.minSize) && a.push([
276
+ ]), e.minSize != null && !y.equals(e.minSize, t.minSize) && a.push([
277
277
  "minSize",
278
- { prev: i.minSize, next: e.minSize },
278
+ { prev: t.minSize, next: e.minSize },
279
279
  async () => await s.setMinSize(e.minSize)
280
- ]), e.maxSize != null && !y.equals(e.maxSize, i.maxSize) && a.push([
280
+ ]), e.maxSize != null && !y.equals(e.maxSize, t.maxSize) && a.push([
281
281
  "maxSize",
282
- { prev: i.maxSize, next: e.maxSize },
282
+ { prev: t.maxSize, next: e.maxSize },
283
283
  async () => await s.setMaxSize(e.maxSize)
284
- ]), e.size != null && !y.equals(e.size, i.size) && a.push([
284
+ ]), e.size != null && !y.equals(e.size, t.size) && a.push([
285
285
  "size",
286
- { prev: i.size, next: e.size },
286
+ { prev: t.size, next: e.size },
287
287
  async () => await s.setSize(e.size)
288
- ]), e.position != null && !y.equals(e.position, i.position) && a.push([
288
+ ]), e.position != null && !y.equals(e.position, t.position) && a.push([
289
289
  "position",
290
- { prev: i.position, next: e.position },
290
+ { prev: t.position, next: e.position },
291
291
  async () => await s.setPosition(e.position)
292
- ]), e.focusCount !== i.focusCount && a.push(
292
+ ]), e.focusCount !== t.focusCount && a.push(
293
293
  [
294
294
  "setVisible",
295
- { prev: i.visible, next: e.visible },
295
+ { prev: t.visible, next: e.visible },
296
296
  async () => await s.setVisible(!0)
297
297
  ],
298
298
  [
299
299
  "focus",
300
- { prev: i.focusCount, next: e.focusCount },
300
+ { prev: t.focusCount, next: e.focusCount },
301
301
  async () => await s.focus()
302
302
  ]
303
- ), e.decorations != null && e.decorations !== i.decorations && a.push([
303
+ ), e.decorations != null && e.decorations !== t.decorations && a.push([
304
304
  "decorations",
305
- { prev: i.decorations, next: e.decorations },
305
+ { prev: t.decorations, next: e.decorations },
306
306
  async () => await s.setDecorations(e.decorations)
307
- ]), e.alwaysOnTop != null && e.alwaysOnTop !== i.alwaysOnTop && a.push([
307
+ ]), e.alwaysOnTop != null && e.alwaysOnTop !== t.alwaysOnTop && a.push([
308
308
  "alwaysOnTop",
309
- { prev: i.alwaysOnTop, next: e.alwaysOnTop },
309
+ { prev: t.alwaysOnTop, next: e.alwaysOnTop },
310
310
  async () => await s.setAlwaysOnTop(e.alwaysOnTop)
311
311
  ]), o && !c && n(), a.length !== 0) {
312
- g(t, `syncCurrent, label: ${s.label()}, key: ${e.key}`);
313
- for (const [r, { prev: u, next: l }] of a) d(t, r, u, "->", l);
314
- T(t);
312
+ g(i, `syncCurrent, label: ${s.label()}, key: ${e.key}`);
313
+ for (const [r, { prev: u, next: l }] of a) d(i, r, u, "->", l);
314
+ T(i);
315
315
  for (const [, , r] of a) await r();
316
316
  }
317
- }, Ae = async (i, e, s, t) => {
318
- const a = Object.keys(i.windows).filter((n) => !(n in e.windows)), o = Object.keys(e.windows).filter((n) => !(n in i.windows)), c = s.isMain();
317
+ }, Ae = async (t, e, s, i) => {
318
+ const a = Object.keys(t.windows).filter((n) => !(n in e.windows)), o = Object.keys(e.windows).filter((n) => !(n in t.windows)), c = s.isMain();
319
319
  if (c && a.length > 0)
320
320
  for (const n of a)
321
- d(t, "syncMain", "closing", n), n === w && await Promise.all(
322
- Object.keys(e.windows).filter((r) => r !== w).map(async (r) => await p(s, r, t))
323
- ), await p(s, n, t);
321
+ d(i, "syncMain", "closing", n), n === w && await Promise.all(
322
+ Object.keys(e.windows).filter((r) => r !== w).map(async (r) => await p(s, r, i))
323
+ ), await p(s, n, i);
324
324
  if (c && o.length > 0)
325
325
  for (const n of o)
326
- await P(s, n, e.windows[n], t);
327
- }, P = async (i, e, s, t) => (d(t, "createWindow", s), await i.create(e, qe(s))), p = async (i, e, s) => (d(s, "closeWindow", e), await i.close(e)), S = "[drift] - unexpected undefined action", k = "[drift] - unexpected undefined action type", _ = (i) => {
328
- if (i.emitted ?? (i.emitted = !1), i.action == null)
329
- throw console.warn(S, i), new Error(S);
330
- if (i.action.type == null || i.action.type.length === 0)
331
- throw console.warn(k, i), new Error(k);
332
- }, Re = new ve(), Pe = [E.type, M.type], De = (i, e = !1) => (s) => (t) => (a) => {
326
+ await R(s, n, e.windows[n], i);
327
+ }, R = async (t, e, s, i) => (d(i, "createWindow", s), await t.create(e, qe(s))), p = async (t, e, s) => (d(s, "closeWindow", e), await t.close(e)), S = "[drift] - unexpected undefined action", k = "[drift] - unexpected undefined action type", _ = (t) => {
328
+ if (t.emitted ??= !1, t.action == null)
329
+ throw console.warn(S, t), new Error(S);
330
+ if (t.action.type == null || t.action.type.length === 0)
331
+ throw console.warn(k, t), new Error(k);
332
+ }, Pe = new ve(), Re = [E.type, M.type], De = (t, e = !1) => (s) => (i) => (a) => {
333
333
  let { action: o, emitted: c, emitter: n } = Ce(a);
334
- const r = i.label();
334
+ const r = t.label();
335
335
  _({ action: a, emitted: c, emitter: n });
336
336
  const u = V(o.type);
337
337
  if (u && d(e, "[drift] - middleware", {
@@ -339,83 +339,83 @@ const ge = (i) => [...new Set(i)], Te = (i, e, s = !0) => {
339
339
  emitted: c,
340
340
  emitter: n,
341
341
  host: r
342
- }), n === i.label()) return;
343
- const l = u && !Pe.includes(o.type);
342
+ }), n === t.label()) return;
343
+ const l = u && !Re.includes(o.type);
344
344
  let f = null;
345
345
  u && (f = s.getState().drift, o = $(
346
346
  o,
347
347
  f
348
348
  ));
349
- const h = t(o), b = l ? s.getState().drift : null, D = U(c, o.type);
350
- return Re.runExclusive(async () => {
349
+ const h = i(o), b = l ? s.getState().drift : null, D = U(c, o.type);
350
+ return Pe.runExclusive(async () => {
351
351
  try {
352
- f !== null && b !== null && await Le(f, b, i, e), D && await i.emit({ action: o });
353
- } catch (z) {
352
+ f !== null && b !== null && await Le(f, b, t, e), D && await t.emit({ action: o });
353
+ } catch (m) {
354
354
  d(e, "[drift] - ERROR", {
355
- error: z.message,
355
+ error: m.message,
356
356
  action: o,
357
357
  emitted: c,
358
358
  emitter: n,
359
359
  host: r
360
- }), s.dispatch(K({ key: r, message: z.message }));
360
+ }), s.dispatch(K({ key: r, message: m.message }));
361
361
  }
362
362
  }), h;
363
- }, je = (i, e, s = !1) => (t) => {
364
- const a = i != null ? typeof i == "function" ? i(t) : i : t();
363
+ }, je = (t, e, s = !1) => (i) => {
364
+ const a = t != null ? typeof t == "function" ? t(i) : t : i();
365
365
  return [De(e, s), ...a];
366
366
  }, Fe = async ({
367
- runtime: i,
367
+ runtime: t,
368
368
  preloadedState: e,
369
369
  middleware: s,
370
- debug: t = !1,
370
+ debug: i = !1,
371
371
  enablePrerender: a = !0,
372
372
  defaultWindowProps: o,
373
373
  ...c
374
374
  }) => {
375
- await i.configure();
375
+ await t.configure();
376
376
  let n;
377
377
  n = j({
378
378
  ...c,
379
379
  preloadedState: await Ne(
380
- t,
381
380
  i,
381
+ t,
382
382
  () => n,
383
383
  o,
384
384
  e
385
385
  ),
386
- middleware: je(s, i, t)
387
- }), await Oe(n.getState().drift, n.dispatch, i, t);
388
- const r = i.label();
386
+ middleware: je(s, t, i)
387
+ }), await Oe(n.getState().drift, n.dispatch, t, i);
388
+ const r = t.label();
389
389
  return n.dispatch(
390
- Q({ enablePrerender: a, defaultWindowProps: o, debug: t, label: r })
391
- ), n.dispatch(I({ stage: "created" })), i.onCloseRequested(() => n == null ? void 0 : n.dispatch(C({}))), n;
392
- }, Ne = async (i, e, s, t, a) => e.isMain() ? (await e.subscribe(({ action: c, emitter: n, sendState: r }) => {
390
+ Q({ enablePrerender: a, defaultWindowProps: o, debug: i, label: r })
391
+ ), n.dispatch(I({ stage: "created" })), t.onCloseRequested(() => n?.dispatch(C({}))), n;
392
+ }, Ne = async (t, e, s, i, a) => e.isMain() ? (await e.subscribe(({ action: c, emitter: n, sendState: r }) => {
393
393
  const u = s();
394
394
  if (u == null) return;
395
395
  if (c != null) {
396
- _({ action: c, emitter: n }), u.dispatch(m(c, n));
396
+ _({ action: c, emitter: n }), u.dispatch(z(c, n));
397
397
  return;
398
398
  }
399
399
  const l = u.getState();
400
400
  r === !0 && e.emit({ state: l }, n);
401
- }), typeof a == "function" ? v(t, i, await a()) : v(t, i, a)) : await new Promise((c, n) => {
401
+ }), typeof a == "function" ? v(i, t, await a()) : v(i, t, a)) : await new Promise((c, n) => {
402
402
  (async () => {
403
403
  try {
404
404
  await e.subscribe(({ action: u, emitter: l, state: f }) => {
405
405
  const h = s();
406
406
  if (h == null)
407
407
  return f != null ? c(f) : void 0;
408
- u != null && (_({ action: u, emitter: l }), h.dispatch(m(u, l)));
408
+ u != null && (_({ action: u, emitter: l }), h.dispatch(z(u, l)));
409
409
  }), await e.emit({ sendState: !0 }, w);
410
410
  } catch (u) {
411
411
  n(u);
412
412
  }
413
413
  })();
414
- }), Ve = Fe, v = (i, e, s) => {
414
+ }), Ve = Fe, v = (t, e, s) => {
415
415
  if (s == null) return s;
416
- const t = s[q];
417
- return t.config.debug = e ?? t.config.debug, t.windows = Object.fromEntries(
418
- Object.entries(t.windows).filter(([, a]) => a.reserved).map(([a, o]) => ((i == null ? void 0 : i.visible) != null && (o.visible = i.visible), o.focusCount = 0, o.centerCount = 0, o.processCount = 0, [a, o]))
416
+ const i = s[q];
417
+ return i.config.debug = e ?? i.config.debug, i.windows = Object.fromEntries(
418
+ Object.entries(i.windows).filter(([, a]) => a.reserved).map(([a, o]) => (t?.visible != null && (o.visible = t.visible), o.focusCount = 0, o.centerCount = 0, o.processCount = 0, [a, o]))
419
419
  ), s;
420
420
  };
421
421
  class $e {
@@ -484,8 +484,8 @@ const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
484
484
  completeProcess: X,
485
485
  configureStore: Ve,
486
486
  createWindow: B,
487
- focusWindow: G,
488
- reducer: Y,
487
+ focusWindow: Y,
488
+ reducer: G,
489
489
  registerProcess: H,
490
490
  reloadWindow: M,
491
491
  selectSliceState: de,
@@ -499,8 +499,8 @@ const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
499
499
  setWindowFullscreen: W,
500
500
  setWindowMaxSize: ee,
501
501
  setWindowMaximized: se,
502
- setWindowMinSize: ie,
503
- setWindowMinimized: te,
502
+ setWindowMinSize: te,
503
+ setWindowMinimized: ie,
504
504
  setWindowPosition: ae,
505
505
  setWindowProps: oe,
506
506
  setWindowResizable: ne,
@@ -521,8 +521,8 @@ export {
521
521
  X as completeProcess,
522
522
  Ve as configureStore,
523
523
  B as createWindow,
524
- G as focusWindow,
525
- Y as reducer,
524
+ Y as focusWindow,
525
+ G as reducer,
526
526
  H as registerProcess,
527
527
  M as reloadWindow,
528
528
  de as selectSliceState,
@@ -536,8 +536,8 @@ export {
536
536
  W as setWindowFullscreen,
537
537
  ee as setWindowMaxSize,
538
538
  se as setWindowMaximized,
539
- ie as setWindowMinSize,
540
- te as setWindowMinimized,
539
+ te as setWindowMinSize,
540
+ ie as setWindowMinimized,
541
541
  ae as setWindowPosition,
542
542
  oe as setWindowProps,
543
543
  ne as setWindowResizable,
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("react-redux"),a=require("proxy-memoize"),d=require("./selectors-DrXQNVVN.cjs"),i=require("./state-BGByXBtX.cjs"),y=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindow(s,e)),[e])),w=()=>u.useSelector(n.useCallback(a.memoize(d.selectWindows),[])),S=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindowKey(s,e)),[e])),W=(e,s)=>u.useSelector(n.useCallback(a.memoize(t=>d.selectWindowAttribute(t,e,s)),[e,s])),m=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null);n.useEffect(()=>{if(t==null)return;const{stage:r}=t;if(r==="created"&&c.current==null){const l=e();l!=null&&(c.current=l),o(i.registerProcess({key:t.key}))}else(r==="closing"||r==="reloading")&&c.current!=null&&(c.current(),c.current=null,o(i.completeProcess({key:t.key})))},[t])},h=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null),r=n.useRef(!1);n.useEffect(()=>{if(t==null)return;const{stage:l}=t;if(l==="created"&&c.current==null)r.current=!0,e().then(f=>{c.current=f??(async()=>{}),o(i.registerProcess({key:t.key}))}).catch(console.error).finally(()=>{r.current=!1});else if((l==="closing"||l==="reloading")&&c.current!=null){const f=c.current;c.current=null,f().then(()=>{c.current=null}).catch(console.error).finally(()=>{o(i.completeProcess({key:t.key}))})}},[t])},g=({store:e,emptyContent:s=null,children:t})=>{const[o,c]=n.useState(null),[r,l]=n.useState(null);if(r!=null)throw l(null),r;return o==null?(e instanceof Promise?e.then(c).catch(l):c(e),s):n.createElement(u.Provider,{store:o},t)};exports.Provider=g;exports.useAsyncWindowLifecycle=h;exports.useSelectWindow=y;exports.useSelectWindowAttribute=W;exports.useSelectWindowKey=S;exports.useSelectWindows=w;exports.useWindowLifecycle=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("react-redux"),a=require("proxy-memoize"),d=require("./selectors-CKscOzcZ.cjs"),i=require("./state-BXNWz8wb.cjs"),y=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindow(s,e)),[e])),w=()=>u.useSelector(n.useCallback(a.memoize(d.selectWindows),[])),S=e=>u.useSelector(n.useCallback(a.memoize(s=>d.selectWindowKey(s,e)),[e])),W=(e,s)=>u.useSelector(n.useCallback(a.memoize(t=>d.selectWindowAttribute(t,e,s)),[e,s])),m=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null);n.useEffect(()=>{if(t==null)return;const{stage:r}=t;if(r==="created"&&c.current==null){const l=e();l!=null&&(c.current=l),o(i.registerProcess({key:t.key}))}else(r==="closing"||r==="reloading")&&c.current!=null&&(c.current(),c.current=null,o(i.completeProcess({key:t.key})))},[t])},h=(e,s)=>{const t=y(s),o=u.useDispatch(),c=n.useRef(null),r=n.useRef(!1);n.useEffect(()=>{if(t==null)return;const{stage:l}=t;if(l==="created"&&c.current==null)r.current=!0,e().then(f=>{c.current=f??(async()=>{}),o(i.registerProcess({key:t.key}))}).catch(console.error).finally(()=>{r.current=!1});else if((l==="closing"||l==="reloading")&&c.current!=null){const f=c.current;c.current=null,f().then(()=>{c.current=null}).catch(console.error).finally(()=>{o(i.completeProcess({key:t.key}))})}},[t])},g=({store:e,emptyContent:s=null,children:t})=>{const[o,c]=n.useState(null),[r,l]=n.useState(null);if(r!=null)throw l(null),r;return o==null?(e instanceof Promise?e.then(c).catch(l):c(e),s):n.createElement(u.Provider,{store:o},t)};exports.Provider=g;exports.useAsyncWindowLifecycle=h;exports.useSelectWindow=y;exports.useSelectWindowAttribute=W;exports.useSelectWindowKey=S;exports.useSelectWindows=w;exports.useWindowLifecycle=m;
package/dist/react.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { useCallback as l, useRef as f, useEffect as m, useState as d, createElement as W } from "react";
2
2
  import { useSelector as u, useDispatch as y, Provider as g } from "react-redux";
3
3
  import { memoize as i } from "proxy-memoize";
4
- import { a as k, e as S, c as P, b as v } from "./selectors-CzAkOydY.js";
5
- import { o as w, j as p } from "./state-C1PObbun.js";
4
+ import { a as k, e as S, c as P, b as v } from "./selectors-CkwjN1oc.js";
5
+ import { o as w, j as p } from "./state-C0QVe0pH.js";
6
6
  const h = (e) => u(
7
7
  l(
8
8
  i((r) => k(r, e)),
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./state-BXNWz8wb.cjs"),s=n=>n.drift,r=n=>Object.values(s(n).windows),c=(n,e)=>{const t=s(n);if(e==null)return t.windows[t.label];let l=t.windows[e];if(l!=null)return l;const o=t.keyLabels[e];return l=t.windows[o],l==null&&e!=null?null:l??t.windows[t.label]},u=(n,e)=>{const t=s(n);if(e==null)return t.labelKeys[t.label];const l=t.labelKeys[e];return l==null&&e==i.MAIN_WINDOW?i.MAIN_WINDOW:l},w=(n,e,t)=>c(n,e)?.[t]??null,d=(n,e)=>s(n).keyLabels[e];exports.selectSliceState=s;exports.selectWindow=c;exports.selectWindowAttribute=w;exports.selectWindowKey=u;exports.selectWindowLabel=d;exports.selectWindows=r;
@@ -1,4 +1,4 @@
1
- import { M as i } from "./state-C1PObbun.js";
1
+ import { M as i } from "./state-C0QVe0pH.js";
2
2
  const l = (n) => n.drift, a = (n) => Object.values(l(n).windows), r = (n, e) => {
3
3
  const t = l(n);
4
4
  if (e == null) return t.windows[t.label];
@@ -11,10 +11,7 @@ const l = (n) => n.drift, a = (n) => Object.values(l(n).windows), r = (n, e) =>
11
11
  if (e == null) return t.labelKeys[t.label];
12
12
  const s = t.labelKeys[e];
13
13
  return s == null && e == i ? i : s;
14
- }, d = (n, e, t) => {
15
- var s;
16
- return ((s = r(n, e)) == null ? void 0 : s[t]) ?? null;
17
- }, w = (n, e) => l(n).keyLabels[e];
14
+ }, d = (n, e, t) => r(n, e)?.[t] ?? null, w = (n, e) => l(n).keyLabels[e];
18
15
  export {
19
16
  r as a,
20
17
  d as b,
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state.ts"],"names":[],"mappings":"AASA,OAAO,EAAe,KAAK,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@
1
1
  import { dimensions, xy } from '@synnaxlabs/x';
2
- import { z } from 'zod/v4';
2
+ import { z } from 'zod';
3
3
  /** Represents the state of a window in it's lifecycle */
4
4
  export type WindowStage = "creating" | "created" | "closing" | "closed" | "reloading";
5
5
  export declare const MAIN_WINDOW = "main";
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../src/window.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,0DAA0D;AAC1D,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEtF,eAAO,MAAM,WAAW,SAAS,CAAC;AAClC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C,MAAM,WAAW,yBAAyB;IACxC,sBAAsB;IACtB,KAAK,EAAE,WAAW,CAAC;IACnB,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,yBAMlC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,WAI5C,CAAC;AAEF,0CAA0C;AAC1C,MAAM,WAAW,WAAY,SAAQ,WAAW,EAAE,yBAAyB;CAAG;AAE9E;;GAEG;AACH,MAAM,WAAW,WAAW;IAE1B,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,QAAQ,CAAC,EAAE,EAAE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