@telemetryos/sdk 1.7.1 → 1.7.3

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/react.js CHANGED
@@ -1,6 +1,6 @@
1
- import oe, { useEffect as w, useState as y } from "react";
1
+ import oe, { useEffect as _, useState as E } from "react";
2
2
  import { environment as C } from "./index.js";
3
- var R = { exports: {} }, v = {};
3
+ var R = { exports: {} }, k = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var R = { exports: {} }, v = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var V;
13
+ var D;
14
14
  function ae() {
15
- if (V) return v;
16
- V = 1;
17
- var n = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
18
- function u(l, s, c) {
15
+ if (D) return k;
16
+ D = 1;
17
+ var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
+ function d(c, i, l) {
19
19
  var f = null;
20
- if (c !== void 0 && (f = "" + c), s.key !== void 0 && (f = "" + s.key), "key" in s) {
21
- c = {};
22
- for (var g in s)
23
- g !== "key" && (c[g] = s[g]);
24
- } else c = s;
25
- return s = c.ref, {
20
+ if (l !== void 0 && (f = "" + l), i.key !== void 0 && (f = "" + i.key), "key" in i) {
21
+ l = {};
22
+ for (var g in i)
23
+ g !== "key" && (l[g] = i[g]);
24
+ } else l = i;
25
+ return i = l.ref, {
26
26
  $$typeof: n,
27
- type: l,
27
+ type: c,
28
28
  key: f,
29
- ref: s !== void 0 ? s : null,
30
- props: c
29
+ ref: i !== void 0 ? i : null,
30
+ props: l
31
31
  };
32
32
  }
33
- return v.Fragment = i, v.jsx = u, v.jsxs = u, v;
33
+ return k.Fragment = t, k.jsx = d, k.jsxs = d, k;
34
34
  }
35
- var k = {};
35
+ var y = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -88,27 +88,27 @@ function se() {
88
88
  }
89
89
  return null;
90
90
  }
91
- function i(e) {
91
+ function t(e) {
92
92
  return "" + e;
93
93
  }
94
- function u(e) {
94
+ function d(e) {
95
95
  try {
96
- i(e);
96
+ t(e);
97
97
  var r = !1;
98
98
  } catch {
99
99
  r = !0;
100
100
  }
101
101
  if (r) {
102
102
  r = console;
103
- var t = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return t.call(
103
+ var o = r.error, a = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
+ return o.call(
105
105
  r,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- o
108
- ), i(e);
107
+ a
108
+ ), t(e);
109
109
  }
110
110
  }
111
- function l(e) {
111
+ function c(e) {
112
112
  if (e === T) return "<>";
113
113
  if (typeof e == "object" && e !== null && e.$$typeof === j)
114
114
  return "<...>";
@@ -119,11 +119,11 @@ function se() {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function s() {
122
+ function i() {
123
123
  var e = A.A;
124
124
  return e === null ? null : e.getOwner();
125
125
  }
126
- function c() {
126
+ function l() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
129
  function f(e) {
@@ -134,34 +134,34 @@ function se() {
134
134
  return e.key !== void 0;
135
135
  }
136
136
  function g(e, r) {
137
- function t() {
138
- Y || (Y = !0, console.error(
137
+ function o() {
138
+ z || (z = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
140
  r
141
141
  ));
142
142
  }
143
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: t,
143
+ o.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: o,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function _() {
148
+ function x() {
149
149
  var e = n(this.type);
150
150
  return I[e] || (I[e] = !0, console.error(
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), e = this.props.ref, e !== void 0 ? e : null;
153
153
  }
154
- function S(e, r, t, o, E, N) {
155
- var a = t.ref;
154
+ function S(e, r, o, a, w, O) {
155
+ var s = o.ref;
156
156
  return e = {
157
157
  $$typeof: F,
158
158
  type: e,
159
159
  key: r,
160
- props: t,
161
- _owner: o
162
- }, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
160
+ props: o,
161
+ _owner: a
162
+ }, (s !== void 0 ? s : null) !== null ? Object.defineProperty(e, "ref", {
163
163
  enumerable: !1,
164
- get: _
164
+ get: x
165
165
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
@@ -176,69 +176,69 @@ function se() {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: E
179
+ value: w
180
180
  }), Object.defineProperty(e, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: N
184
+ value: O
185
185
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
186
  }
187
- function p(e, r, t, o, E, N) {
188
- var a = r.children;
189
- if (a !== void 0)
190
- if (o)
191
- if (re(a)) {
192
- for (o = 0; o < a.length; o++)
193
- x(a[o]);
194
- Object.freeze && Object.freeze(a);
187
+ function p(e, r, o, a, w, O) {
188
+ var s = r.children;
189
+ if (s !== void 0)
190
+ if (a)
191
+ if (re(s)) {
192
+ for (a = 0; a < s.length; a++)
193
+ v(s[a]);
194
+ Object.freeze && Object.freeze(s);
195
195
  } else
196
196
  console.error(
197
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
198
  );
199
- else x(a);
199
+ else v(s);
200
200
  if (L.call(r, "key")) {
201
- a = n(e);
201
+ s = n(e);
202
202
  var h = Object.keys(r).filter(function(te) {
203
203
  return te !== "key";
204
204
  });
205
- o = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", D[a + o] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ a = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", U[s + a] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
209
209
  React keys must be passed directly to JSX without using spread:
210
210
  let props = %s;
211
211
  <%s key={someKey} {...props} />`,
212
- o,
213
212
  a,
213
+ s,
214
214
  h,
215
- a
216
- ), D[a + o] = !0);
215
+ s
216
+ ), U[s + a] = !0);
217
217
  }
218
- if (a = null, t !== void 0 && (u(t), a = "" + t), f(r) && (u(r.key), a = "" + r.key), "key" in r) {
219
- t = {};
218
+ if (s = null, o !== void 0 && (d(o), s = "" + o), f(r) && (d(r.key), s = "" + r.key), "key" in r) {
219
+ o = {};
220
220
  for (var P in r)
221
- P !== "key" && (t[P] = r[P]);
222
- } else t = r;
223
- return a && g(
224
- t,
221
+ P !== "key" && (o[P] = r[P]);
222
+ } else o = r;
223
+ return s && g(
224
+ o,
225
225
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
226
  ), S(
227
227
  e,
228
- a,
229
- t,
230
- s(),
231
- E,
232
- N
228
+ s,
229
+ o,
230
+ i(),
231
+ w,
232
+ O
233
233
  );
234
234
  }
235
- function x(e) {
235
+ function v(e) {
236
236
  m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === j && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
237
237
  }
238
238
  function m(e) {
239
239
  return typeof e == "object" && e !== null && e.$$typeof === F;
240
240
  }
241
- var b = oe, F = Symbol.for("react.transitional.element"), J = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), X = Symbol.for("react.consumer"), B = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), Q = Symbol.for("react.suspense"), Z = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), A = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, re = Array.isArray, O = console.createTask ? console.createTask : function() {
241
+ var b = oe, F = Symbol.for("react.transitional.element"), J = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), X = Symbol.for("react.consumer"), B = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), Q = Symbol.for("react.suspense"), Z = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), A = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, re = Array.isArray, N = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  b = {
@@ -246,38 +246,38 @@ React keys must be passed directly to JSX without using spread:
246
246
  return e();
247
247
  }
248
248
  };
249
- var Y, I = {}, $ = b.react_stack_bottom_frame.bind(
249
+ var z, I = {}, Y = b.react_stack_bottom_frame.bind(
250
250
  b,
251
- c
252
- )(), z = O(l(c)), D = {};
253
- k.Fragment = T, k.jsx = function(e, r, t) {
254
- var o = 1e4 > A.recentlyCreatedOwnerStacks++;
251
+ l
252
+ )(), $ = N(c(l)), U = {};
253
+ y.Fragment = T, y.jsx = function(e, r, o) {
254
+ var a = 1e4 > A.recentlyCreatedOwnerStacks++;
255
255
  return p(
256
256
  e,
257
257
  r,
258
- t,
258
+ o,
259
259
  !1,
260
- o ? Error("react-stack-top-frame") : $,
261
- o ? O(l(e)) : z
260
+ a ? Error("react-stack-top-frame") : Y,
261
+ a ? N(c(e)) : $
262
262
  );
263
- }, k.jsxs = function(e, r, t) {
264
- var o = 1e4 > A.recentlyCreatedOwnerStacks++;
263
+ }, y.jsxs = function(e, r, o) {
264
+ var a = 1e4 > A.recentlyCreatedOwnerStacks++;
265
265
  return p(
266
266
  e,
267
267
  r,
268
- t,
268
+ o,
269
269
  !0,
270
- o ? Error("react-stack-top-frame") : $,
271
- o ? O(l(e)) : z
270
+ a ? Error("react-stack-top-frame") : Y,
271
+ a ? N(c(e)) : $
272
272
  );
273
273
  };
274
- })()), k;
274
+ })()), y;
275
275
  }
276
- var U;
276
+ var W;
277
277
  function ie() {
278
- return U || (U = 1, process.env.NODE_ENV === "production" ? R.exports = ae() : R.exports = se()), R.exports;
278
+ return W || (W = 1, process.env.NODE_ENV === "production" ? R.exports = ae() : R.exports = se()), R.exports;
279
279
  }
280
- var d = ie();
280
+ var u = ie();
281
281
  const ce = `:root {
282
282
  --background: 0 0% 100%;
283
283
  --foreground: 222.2 84% 4.9%;
@@ -338,14 +338,40 @@ const ce = `:root {
338
338
  --radius: 0.5rem;
339
339
  }
340
340
 
341
+ /* =============================================================================
342
+ Container & Layout
343
+ ============================================================================= */
344
+
341
345
  .settings__container {
342
346
  padding: 16px;
343
347
  background: hsl(var(--background));
344
348
  color: hsl(var(--foreground));
345
349
  font-family: 'Rubik', sans-serif;
346
350
  font-feature-settings: "rlig" 1, "calt" 1;
351
+ flex-grow: 1;
347
352
  }
348
353
 
354
+ .settings__box {
355
+ border: 1px solid hsl(var(--border));
356
+ border-radius: var(--radius);
357
+ padding: 16px;
358
+ margin-bottom: 16px;
359
+ }
360
+
361
+ .settings__box:last-child {
362
+ margin-bottom: 0;
363
+ }
364
+
365
+ .settings__divider {
366
+ border: none;
367
+ border-top: 1px solid hsl(var(--border));
368
+ margin: 16px 0;
369
+ }
370
+
371
+ /* =============================================================================
372
+ Field Structure
373
+ ============================================================================= */
374
+
349
375
  .settings__field {
350
376
  margin-bottom: 24px;
351
377
  }
@@ -357,7 +383,11 @@ const ce = `:root {
357
383
  color: hsl(var(--foreground));
358
384
  }
359
385
 
360
- .settings__input-frame > * {
386
+ /* =============================================================================
387
+ Text Inputs
388
+ ============================================================================= */
389
+
390
+ .settings__input-frame>* {
361
391
  height: 40px;
362
392
  width: 100%;
363
393
  font-size: 14px;
@@ -368,17 +398,45 @@ const ce = `:root {
368
398
  color: hsl(var(--foreground));
369
399
  }
370
400
 
371
- .settings__input-frame > *:focus {
401
+ .settings__input-frame>*:focus {
402
+ outline: 1px solid hsl(var(--primary));
403
+ outline-offset: 0;
404
+ }
405
+
406
+ .settings__input-frame>*::placeholder {
407
+ color: hsl(var(--muted-foreground));
408
+ opacity: 1;
409
+ }
410
+
411
+ .settings__textarea-frame>textarea {
412
+ width: 100%;
413
+ min-height: 80px;
414
+ font-family: inherit;
415
+ font-size: 14px;
416
+ line-height: 1.4em;
417
+ padding: 8px 12px;
418
+ border: 1px solid hsl(var(--border));
419
+ border-radius: var(--radius);
420
+ background: hsl(var(--background));
421
+ color: hsl(var(--foreground));
422
+ resize: vertical;
423
+ }
424
+
425
+ .settings__textarea-frame>textarea:focus {
372
426
  outline: 1px solid hsl(var(--primary));
373
427
  outline-offset: 0;
374
428
  }
375
429
 
376
- .settings__input-frame > *::placeholder {
430
+ .settings__textarea-frame>textarea::placeholder {
377
431
  color: hsl(var(--muted-foreground));
378
432
  opacity: 1;
379
433
  }
380
434
 
381
- .settings__select-frame > select {
435
+ /* =============================================================================
436
+ Selection Inputs
437
+ ============================================================================= */
438
+
439
+ .settings__select-frame>select {
382
440
  appearance: none;
383
441
  height: 40px;
384
442
  width: 100%;
@@ -394,39 +452,67 @@ const ce = `:root {
394
452
  cursor: pointer;
395
453
  }
396
454
 
397
- .settings__select-frame > select:hover {
455
+ .settings__select-frame>select:hover {
398
456
  background-color: hsl(var(--accent));
399
457
  }
400
458
 
401
- .settings__select-frame > select:focus {
459
+ .settings__select-frame>select:focus {
402
460
  outline: 1px solid hsl(var(--primary));
403
461
  outline-offset: 0;
404
462
  }
405
463
 
406
- .settings__textarea-frame > textarea {
407
- width: 100%;
408
- min-height: 80px;
409
- font-family: inherit;
410
- font-size: 14px;
411
- line-height: 1.4em;
412
- padding: 8px 12px;
413
- border: 1px solid hsl(var(--border));
414
- border-radius: var(--radius);
464
+ .settings__slider-frame {
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 8px;
468
+ }
469
+
470
+ .settings__slider-frame>input[type="range"] {
471
+ flex: 1;
472
+ height: 8px;
473
+ background: hsl(var(--secondary));
474
+ border-radius: 9999px;
475
+ outline: none;
476
+ -webkit-appearance: none;
477
+ appearance: none;
478
+ }
479
+
480
+ .settings__slider-frame>input[type="range"]:focus,
481
+ .settings__slider-frame>input[type="range"]:active {
482
+ background: hsl(var(--primary));
483
+ }
484
+
485
+ .settings__slider-frame>input[type="range"]::-webkit-slider-thumb {
486
+ -webkit-appearance: none;
487
+ appearance: none;
488
+ width: 20px;
489
+ height: 20px;
415
490
  background: hsl(var(--background));
416
- color: hsl(var(--foreground));
417
- resize: vertical;
491
+ border: 2px solid hsl(var(--primary));
492
+ border-radius: 50%;
493
+ cursor: pointer;
418
494
  }
419
495
 
420
- .settings__textarea-frame > textarea:focus {
421
- outline: 1px solid hsl(var(--primary));
422
- outline-offset: 0;
496
+ .settings__slider-frame>input[type="range"]::-moz-range-thumb {
497
+ width: 20px;
498
+ height: 20px;
499
+ background: hsl(var(--background));
500
+ border: 2px solid hsl(var(--primary));
501
+ border-radius: 50%;
502
+ cursor: pointer;
423
503
  }
424
504
 
425
- .settings__textarea-frame > textarea::placeholder {
505
+ .settings__slider-frame>span {
506
+ min-width: 4ch;
507
+ text-align: right;
508
+ font-size: 14px;
426
509
  color: hsl(var(--muted-foreground));
427
- opacity: 1;
428
510
  }
429
511
 
512
+ /* =============================================================================
513
+ Toggle Inputs
514
+ ============================================================================= */
515
+
430
516
  .settings__switch-frame {
431
517
  display: flex;
432
518
  align-items: center;
@@ -435,7 +521,7 @@ const ce = `:root {
435
521
  cursor: pointer;
436
522
  }
437
523
 
438
- .settings__switch-frame > input[type="checkbox"] {
524
+ .settings__switch-frame>input[type="checkbox"] {
439
525
  appearance: none;
440
526
  width: 44px;
441
527
  height: 24px;
@@ -447,7 +533,7 @@ const ce = `:root {
447
533
  flex-shrink: 0;
448
534
  }
449
535
 
450
- .settings__switch-frame > input[type="checkbox"]::after {
536
+ .settings__switch-frame>input[type="checkbox"]::after {
451
537
  content: '';
452
538
  position: absolute;
453
539
  top: 2px;
@@ -456,15 +542,15 @@ const ce = `:root {
456
542
  height: 20px;
457
543
  background: hsl(var(--background));
458
544
  border-radius: 50%;
459
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
545
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
460
546
  transition: transform 0.2s;
461
547
  }
462
548
 
463
- .settings__switch-frame > input[type="checkbox"]:checked {
549
+ .settings__switch-frame>input[type="checkbox"]:checked {
464
550
  background: hsl(var(--primary));
465
551
  }
466
552
 
467
- .settings__switch-frame > input[type="checkbox"]:checked::after {
553
+ .settings__switch-frame>input[type="checkbox"]:checked::after {
468
554
  transform: translateX(20px);
469
555
  }
470
556
 
@@ -481,7 +567,7 @@ const ce = `:root {
481
567
  cursor: pointer;
482
568
  }
483
569
 
484
- .settings__checkbox-frame > input[type="checkbox"] {
570
+ .settings__checkbox-frame>input[type="checkbox"] {
485
571
  appearance: none;
486
572
  width: 16px;
487
573
  height: 16px;
@@ -492,11 +578,11 @@ const ce = `:root {
492
578
  position: relative;
493
579
  }
494
580
 
495
- .settings__checkbox-frame > input[type="checkbox"]:checked {
581
+ .settings__checkbox-frame>input[type="checkbox"]:checked {
496
582
  background: hsl(var(--primary));
497
583
  }
498
584
 
499
- .settings__checkbox-frame > input[type="checkbox"]:checked::after {
585
+ .settings__checkbox-frame>input[type="checkbox"]:checked::after {
500
586
  content: '';
501
587
  position: absolute;
502
588
  top: 1px;
@@ -521,7 +607,7 @@ const ce = `:root {
521
607
  cursor: pointer;
522
608
  }
523
609
 
524
- .settings__radio-frame > input[type="radio"] {
610
+ .settings__radio-frame>input[type="radio"] {
525
611
  appearance: none;
526
612
  width: 16px;
527
613
  height: 16px;
@@ -532,11 +618,11 @@ const ce = `:root {
532
618
  position: relative;
533
619
  }
534
620
 
535
- .settings__radio-frame > input[type="radio"]:checked {
621
+ .settings__radio-frame>input[type="radio"]:checked {
536
622
  background: hsl(var(--primary));
537
623
  }
538
624
 
539
- .settings__radio-frame > input[type="radio"]:checked::after {
625
+ .settings__radio-frame>input[type="radio"]:checked::after {
540
626
  content: '';
541
627
  position: absolute;
542
628
  top: 4px;
@@ -551,105 +637,170 @@ const ce = `:root {
551
637
  flex: 1;
552
638
  color: hsl(var(--foreground));
553
639
  }
640
+
641
+ /* =============================================================================
642
+ Actions
643
+ ============================================================================= */
644
+
645
+ .settings__button-frame>button {
646
+ padding: 8px 16px;
647
+ background: hsl(var(--background));
648
+ border: 1px solid hsl(var(--border));
649
+ border-radius: var(--radius);
650
+ color: hsl(var(--foreground));
651
+ font-size: 14px;
652
+ font-family: inherit;
653
+ cursor: pointer;
654
+ }
655
+
656
+ .settings__button-frame>button:hover {
657
+ background: hsl(var(--accent));
658
+ }
659
+
660
+ .settings__button-frame>button.active,
661
+ .settings__button-frame>button[data-active="true"] {
662
+ background: hsl(var(--primary));
663
+ border-color: hsl(var(--primary));
664
+ color: hsl(var(--primary-foreground));
665
+ }
554
666
  `;
555
- let W = !1;
667
+ let V = !1;
556
668
  function ue() {
557
- if (W || typeof document > "u")
669
+ if (V || typeof document > "u")
558
670
  return;
559
671
  const n = document.createElement("style");
560
- n.setAttribute("data-telemetryos-sdk", ""), n.textContent = ce, document.head.appendChild(n), W = !0;
672
+ n.setAttribute("data-telemetryos-sdk", ""), n.textContent = ce, document.head.appendChild(n), V = !0;
561
673
  }
562
674
  ue();
563
675
  function pe({ children: n }) {
564
- return w(() => {
565
- const i = window.matchMedia("(prefers-color-scheme: dark)"), u = (c) => {
676
+ return _(() => {
677
+ const t = window.matchMedia("(prefers-color-scheme: dark)"), d = (l) => {
566
678
  let f;
567
- c === "system" ? f = i.matches : f = c !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
568
- }, l = C().subscribeColorScheme(u);
569
- l.catch(console.error);
570
- const s = () => {
571
- C().getColorScheme().then(u).catch(console.error);
679
+ l === "system" ? f = t.matches : f = l !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
680
+ }, c = C().subscribeColorScheme(d);
681
+ c.catch(console.error);
682
+ const i = () => {
683
+ C().getColorScheme().then(d).catch(console.error);
572
684
  };
573
- return i.addEventListener("change", s), () => {
574
- l.then(() => C().unsubscribeColorScheme(u)).catch(console.error), i.removeEventListener("change", s);
685
+ return t.addEventListener("change", i), () => {
686
+ c.then(() => C().unsubscribeColorScheme(d)).catch(console.error), t.removeEventListener("change", i);
575
687
  };
576
- }, []), d.jsx("div", { className: "settings__container", children: n });
688
+ }, []), u.jsx("div", { className: "settings__container", children: n });
577
689
  }
578
690
  function me({ children: n }) {
579
- return d.jsx("div", { className: "settings__field", children: n });
691
+ return u.jsx("div", { className: "settings__box", children: n });
580
692
  }
581
- function ge({ children: n }) {
582
- return d.jsx("div", { className: "settings__label", children: n });
693
+ function ge() {
694
+ return u.jsx("hr", { className: "settings__divider" });
583
695
  }
584
696
  function be({ children: n }) {
585
- return d.jsx("div", { className: "settings__input-frame", children: n });
697
+ return u.jsx("div", { className: "settings__field", children: n });
586
698
  }
587
699
  function he({ children: n }) {
588
- return d.jsx("div", { className: "settings__select-frame", children: n });
700
+ return u.jsx("div", { className: "settings__label", children: n });
589
701
  }
590
702
  function _e({ children: n }) {
591
- return d.jsx("div", { className: "settings__textarea-frame", children: n });
703
+ return u.jsx("div", { className: "settings__input-frame", children: n });
592
704
  }
593
705
  function xe({ children: n }) {
594
- return d.jsx("label", { className: "settings__switch-frame", children: n });
706
+ return u.jsx("div", { className: "settings__textarea-frame", children: n });
595
707
  }
596
708
  function ve({ children: n }) {
597
- return d.jsx("span", { className: "settings__switch-label", children: n });
709
+ return u.jsx("div", { className: "settings__select-frame", children: n });
598
710
  }
599
711
  function ke({ children: n }) {
600
- return d.jsx("label", { className: "settings__checkbox-frame", children: n });
712
+ return u.jsx("div", { className: "settings__slider-frame", children: n });
713
+ }
714
+ function ye({ children: n }) {
715
+ return u.jsx("label", { className: "settings__switch-frame", children: n });
601
716
  }
602
717
  function Ee({ children: n }) {
603
- return d.jsx("span", { className: "settings__checkbox-label", children: n });
718
+ return u.jsx("span", { className: "settings__switch-label", children: n });
604
719
  }
605
- function ye({ children: n }) {
606
- return d.jsx("label", { className: "settings__radio-frame", children: n });
720
+ function we({ children: n }) {
721
+ return u.jsx("label", { className: "settings__checkbox-frame", children: n });
607
722
  }
608
723
  function Re({ children: n }) {
609
- return d.jsx("span", { className: "settings__radio-label", children: n });
724
+ return u.jsx("span", { className: "settings__checkbox-label", children: n });
725
+ }
726
+ function Se({ children: n }) {
727
+ return u.jsx("label", { className: "settings__radio-frame", children: n });
610
728
  }
611
- function le(n, i, u, l = 0) {
612
- var s;
613
- const [c, f] = y(!0), [g] = y(u), [_, S] = y(void 0), [p, x] = y(void 0);
614
- return w(() => {
729
+ function Te({ children: n }) {
730
+ return u.jsx("span", { className: "settings__radio-label", children: n });
731
+ }
732
+ function je({ children: n }) {
733
+ return u.jsx("div", { className: "settings__button-frame", children: n });
734
+ }
735
+ function le(n, t, d, c = 0) {
736
+ var i;
737
+ const [l, f] = E(!0), [g] = E(d), [x, S] = E(void 0), [p, v] = E(void 0);
738
+ return _(() => {
615
739
  const m = (b) => {
616
740
  S(b), f(!1);
617
741
  };
618
- return n.subscribe(i, m).catch(console.error), () => {
619
- n.unsubscribe(i, m).catch(console.error);
742
+ return n.subscribe(t, m).catch(console.error), () => {
743
+ n.unsubscribe(t, m).catch(console.error);
620
744
  };
621
- }, [n, i]), w(() => {
745
+ }, [n, t]), _(() => {
622
746
  if (typeof p < "u") {
623
747
  const m = setTimeout(() => {
624
- n.set(i, p);
625
- }, l);
748
+ n.set(t, p);
749
+ }, c);
626
750
  return () => clearTimeout(m);
627
751
  }
628
- }, [p, n, i, l]), w(() => {
629
- if (JSON.stringify(p) === JSON.stringify(_)) {
752
+ }, [p, n, t, c]), _(() => {
753
+ if (JSON.stringify(p) === JSON.stringify(x)) {
630
754
  const m = setTimeout(() => {
631
- x(void 0);
755
+ v(void 0);
632
756
  }, 500);
633
757
  return () => clearTimeout(m);
634
758
  }
635
- }, [p, _]), [c, (s = p ?? _) !== null && s !== void 0 ? s : g, x];
759
+ }, [p, x]), [l, (i = p ?? x) !== null && i !== void 0 ? i : g, v];
760
+ }
761
+ function Ae(n, t) {
762
+ return (d, c = 0) => le(d, n, t, c);
763
+ }
764
+ function Ne(n) {
765
+ _(() => {
766
+ document.documentElement.style.fontSize = `calc(1vmax * ${n})`;
767
+ }, [n]);
768
+ }
769
+ function Oe() {
770
+ const [n, t] = E(() => window.innerWidth / window.innerHeight);
771
+ return _(() => {
772
+ const c = () => {
773
+ t(window.innerWidth / window.innerHeight);
774
+ };
775
+ return window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
776
+ }, []), n;
636
777
  }
637
- function we(n, i) {
638
- return (u, l = 0) => le(u, n, i, l);
778
+ function Pe(n, t) {
779
+ return {
780
+ uiWidthFactor: Math.min(t, 1) / n,
781
+ uiHeightFactor: Math.max(t, 1) / n
782
+ };
639
783
  }
640
784
  export {
641
- ke as SettingsCheckboxFrame,
642
- Ee as SettingsCheckboxLabel,
785
+ me as SettingsBox,
786
+ je as SettingsButtonFrame,
787
+ we as SettingsCheckboxFrame,
788
+ Re as SettingsCheckboxLabel,
643
789
  pe as SettingsContainer,
644
- me as SettingsField,
645
- be as SettingsInputFrame,
646
- ge as SettingsLabel,
647
- ye as SettingsRadioFrame,
648
- Re as SettingsRadioLabel,
649
- he as SettingsSelectFrame,
650
- xe as SettingsSwitchFrame,
651
- ve as SettingsSwitchLabel,
652
- _e as SettingsTextAreaFrame,
653
- we as createUseStoreState,
654
- le as useStoreState
790
+ ge as SettingsDivider,
791
+ be as SettingsField,
792
+ _e as SettingsInputFrame,
793
+ he as SettingsLabel,
794
+ Se as SettingsRadioFrame,
795
+ Te as SettingsRadioLabel,
796
+ ve as SettingsSelectFrame,
797
+ ke as SettingsSliderFrame,
798
+ ye as SettingsSwitchFrame,
799
+ Ee as SettingsSwitchLabel,
800
+ xe as SettingsTextAreaFrame,
801
+ Ae as createUseStoreState,
802
+ le as useStoreState,
803
+ Oe as useUiAspectRatio,
804
+ Pe as useUiResponsiveFactors,
805
+ Ne as useUiScaleToSetRem
655
806
  };