@telemetryos/sdk 1.14.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import ce, { useEffect as y, useState as v, useRef as le, useCallback as ue, useMemo as j } from "react";
2
- import { environment as $, media as de, store as T } from "./index.js";
1
+ import ln, { useEffect as y, useState as _, useId as dn, useRef as un, useCallback as fn, useMemo as R } from "react";
2
+ import { environment as Y, media as pn, store as N } from "./index.js";
3
3
  var P = { exports: {} }, E = {};
4
4
  /**
5
5
  * @license React
@@ -10,29 +10,29 @@ var P = { exports: {} }, E = {};
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 H;
14
- function fe() {
15
- if (H) return E;
16
- H = 1;
17
- var n = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
18
- function s(i, a, l) {
13
+ var G;
14
+ function gn() {
15
+ if (G) return E;
16
+ G = 1;
17
+ var e = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
18
+ function i(s, a, c) {
19
19
  var p = null;
20
- if (l !== void 0 && (p = "" + l), a.key !== void 0 && (p = "" + a.key), "key" in a) {
21
- l = {};
20
+ if (c !== void 0 && (p = "" + c), a.key !== void 0 && (p = "" + a.key), "key" in a) {
21
+ c = {};
22
22
  for (var f in a)
23
- f !== "key" && (l[f] = a[f]);
24
- } else l = a;
25
- return a = l.ref, {
26
- $$typeof: n,
27
- type: i,
23
+ f !== "key" && (c[f] = a[f]);
24
+ } else c = a;
25
+ return a = c.ref, {
26
+ $$typeof: e,
27
+ type: s,
28
28
  key: p,
29
29
  ref: a !== void 0 ? a : null,
30
- props: l
30
+ props: c
31
31
  };
32
32
  }
33
- return E.Fragment = o, E.jsx = s, E.jsxs = s, E;
33
+ return E.Fragment = o, E.jsx = i, E.jsxs = i, E;
34
34
  }
35
- var R = {};
35
+ var j = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,243 +42,243 @@ var R = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var G;
46
- function pe() {
47
- return G || (G = 1, process.env.NODE_ENV !== "production" && (function() {
48
- function n(e) {
49
- if (e == null) return null;
50
- if (typeof e == "function")
51
- return e.$$typeof === se ? null : e.displayName || e.name || null;
52
- if (typeof e == "string") return e;
53
- switch (e) {
54
- case N:
45
+ var X;
46
+ function mn() {
47
+ return X || (X = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function e(n) {
49
+ if (n == null) return null;
50
+ if (typeof n == "function")
51
+ return n.$$typeof === on ? null : n.displayName || n.name || null;
52
+ if (typeof n == "string") return n;
53
+ switch (n) {
54
+ case T:
55
55
  return "Fragment";
56
- case A:
56
+ case C:
57
57
  return "Profiler";
58
58
  case h:
59
59
  return "StrictMode";
60
- case ne:
60
+ case en:
61
61
  return "Suspense";
62
- case re:
62
+ case tn:
63
63
  return "SuspenseList";
64
- case oe:
64
+ case sn:
65
65
  return "Activity";
66
66
  }
67
- if (typeof e == "object")
68
- switch (typeof e.tag == "number" && console.error(
67
+ if (typeof n == "object")
68
+ switch (typeof n.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), e.$$typeof) {
71
- case M:
70
+ ), n.$$typeof) {
71
+ case D:
72
72
  return "Portal";
73
73
  case K:
74
- return e.displayName || "Context";
75
- case C:
76
- return (e._context.displayName || "Context") + ".Consumer";
77
- case ee:
78
- var t = e.render;
79
- return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case te:
81
- return t = e.displayName || null, t !== null ? t : n(e.type) || "Memo";
82
- case L:
83
- t = e._payload, e = e._init;
74
+ return n.displayName || "Context";
75
+ case A:
76
+ return (n._context.displayName || "Context") + ".Consumer";
77
+ case nn:
78
+ var r = n.render;
79
+ return n = n.displayName, n || (n = r.displayName || r.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
80
+ case rn:
81
+ return r = n.displayName || null, r !== null ? r : e(n.type) || "Memo";
82
+ case z:
83
+ r = n._payload, n = n._init;
84
84
  try {
85
- return n(e(t));
85
+ return e(n(r));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function o(e) {
92
- return "" + e;
91
+ function o(n) {
92
+ return "" + n;
93
93
  }
94
- function s(e) {
94
+ function i(n) {
95
95
  try {
96
- o(e);
97
- var t = !1;
96
+ o(n);
97
+ var r = !1;
98
98
  } catch {
99
- t = !0;
99
+ r = !0;
100
100
  }
101
- if (t) {
102
- t = console;
103
- var c = t.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return c.call(
105
- t,
101
+ if (r) {
102
+ r = console;
103
+ var l = r.error, d = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
104
+ return l.call(
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
- u
108
- ), o(e);
107
+ d
108
+ ), o(n);
109
109
  }
110
110
  }
111
- function i(e) {
112
- if (e === N) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === L)
111
+ function s(n) {
112
+ if (n === T) return "<>";
113
+ if (typeof n == "object" && n !== null && n.$$typeof === z)
114
114
  return "<...>";
115
115
  try {
116
- var t = n(e);
117
- return t ? "<" + t + ">" : "<...>";
116
+ var r = e(n);
117
+ return r ? "<" + r + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
122
  function a() {
123
- var e = I.A;
124
- return e === null ? null : e.getOwner();
123
+ var n = F.A;
124
+ return n === null ? null : n.getOwner();
125
125
  }
126
- function l() {
126
+ function c() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function p(e) {
130
- if (D.call(e, "key")) {
131
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (t && t.isReactWarning) return !1;
129
+ function p(n) {
130
+ if (W.call(n, "key")) {
131
+ var r = Object.getOwnPropertyDescriptor(n, "key").get;
132
+ if (r && r.isReactWarning) return !1;
133
133
  }
134
- return e.key !== void 0;
134
+ return n.key !== void 0;
135
135
  }
136
- function f(e, t) {
137
- function c() {
138
- W || (W = !0, console.error(
136
+ function f(n, r) {
137
+ function l() {
138
+ V || (V = !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
- t
140
+ r
141
141
  ));
142
142
  }
143
- c.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: c,
143
+ l.isReactWarning = !0, Object.defineProperty(n, "key", {
144
+ get: l,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
148
  function w() {
149
- var e = n(this.type);
150
- return V[e] || (V[e] = !0, console.error(
149
+ var n = e(this.type);
150
+ return J[n] || (J[n] = !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
- )), e = this.props.ref, e !== void 0 ? e : null;
152
+ )), n = this.props.ref, n !== void 0 ? n : null;
153
153
  }
154
- function g(e, t, c, u, O, U) {
155
- var d = c.ref;
156
- return e = {
157
- $$typeof: F,
158
- type: e,
159
- key: t,
160
- props: c,
161
- _owner: u
162
- }, (d !== void 0 ? d : null) !== null ? Object.defineProperty(e, "ref", {
154
+ function g(n, r, l, d, O, U) {
155
+ var u = l.ref;
156
+ return n = {
157
+ $$typeof: I,
158
+ type: n,
159
+ key: r,
160
+ props: l,
161
+ _owner: d
162
+ }, (u !== void 0 ? u : null) !== null ? Object.defineProperty(n, "ref", {
163
163
  enumerable: !1,
164
164
  get: w
165
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
+ }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: 0
170
- }), Object.defineProperty(e, "_debugInfo", {
170
+ }), Object.defineProperty(n, "_debugInfo", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: null
175
- }), Object.defineProperty(e, "_debugStack", {
175
+ }), Object.defineProperty(n, "_debugStack", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
179
  value: O
180
- }), Object.defineProperty(e, "_debugTask", {
180
+ }), Object.defineProperty(n, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
184
  value: U
185
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
+ }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
186
186
  }
187
- function S(e, t, c, u, O, U) {
188
- var d = t.children;
189
- if (d !== void 0)
190
- if (u)
191
- if (ie(d)) {
192
- for (u = 0; u < d.length; u++)
193
- m(d[u]);
194
- Object.freeze && Object.freeze(d);
187
+ function S(n, r, l, d, O, U) {
188
+ var u = r.children;
189
+ if (u !== void 0)
190
+ if (d)
191
+ if (an(u)) {
192
+ for (d = 0; d < u.length; d++)
193
+ m(u[d]);
194
+ Object.freeze && Object.freeze(u);
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 m(d);
200
- if (D.call(t, "key")) {
201
- d = n(e);
202
- var x = Object.keys(t).filter(function(ae) {
203
- return ae !== "key";
199
+ else m(u);
200
+ if (W.call(r, "key")) {
201
+ u = e(n);
202
+ var v = Object.keys(r).filter(function(cn) {
203
+ return cn !== "key";
204
204
  });
205
- u = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}", B[d + u] || (x = 0 < x.length ? "{" + x.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ d = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", H[u + d] || (v = 0 < v.length ? "{" + v.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
- u,
213
212
  d,
214
- x,
215
- d
216
- ), B[d + u] = !0);
213
+ u,
214
+ v,
215
+ u
216
+ ), H[u + d] = !0);
217
217
  }
218
- if (d = null, c !== void 0 && (s(c), d = "" + c), p(t) && (s(t.key), d = "" + t.key), "key" in t) {
219
- c = {};
220
- for (var Y in t)
221
- Y !== "key" && (c[Y] = t[Y]);
222
- } else c = t;
223
- return d && f(
224
- c,
225
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
218
+ if (u = null, l !== void 0 && (i(l), u = "" + l), p(r) && (i(r.key), u = "" + r.key), "key" in r) {
219
+ l = {};
220
+ for (var $ in r)
221
+ $ !== "key" && (l[$] = r[$]);
222
+ } else l = r;
223
+ return u && f(
224
+ l,
225
+ typeof n == "function" ? n.displayName || n.name || "Unknown" : n
226
226
  ), g(
227
- e,
228
- d,
229
- c,
227
+ n,
228
+ u,
229
+ l,
230
230
  a(),
231
231
  O,
232
232
  U
233
233
  );
234
234
  }
235
- function m(e) {
236
- _(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === L && (e._payload.status === "fulfilled" ? _(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
235
+ function m(n) {
236
+ x(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === z && (n._payload.status === "fulfilled" ? x(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
237
237
  }
238
- function _(e) {
239
- return typeof e == "object" && e !== null && e.$$typeof === F;
238
+ function x(n) {
239
+ return typeof n == "object" && n !== null && n.$$typeof === I;
240
240
  }
241
- var b = ce, F = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), K = Symbol.for("react.context"), ee = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), re = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), oe = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), I = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, ie = Array.isArray, z = console.createTask ? console.createTask : function() {
241
+ var b = ln, I = Symbol.for("react.transitional.element"), D = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), K = Symbol.for("react.context"), nn = Symbol.for("react.forward_ref"), en = Symbol.for("react.suspense"), tn = Symbol.for("react.suspense_list"), rn = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), sn = Symbol.for("react.activity"), on = Symbol.for("react.client.reference"), F = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, an = Array.isArray, L = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  b = {
245
- react_stack_bottom_frame: function(e) {
246
- return e();
245
+ react_stack_bottom_frame: function(n) {
246
+ return n();
247
247
  }
248
248
  };
249
- var W, V = {}, J = b.react_stack_bottom_frame.bind(
249
+ var V, J = {}, q = b.react_stack_bottom_frame.bind(
250
250
  b,
251
- l
252
- )(), q = z(i(l)), B = {};
253
- R.Fragment = N, R.jsx = function(e, t, c) {
254
- var u = 1e4 > I.recentlyCreatedOwnerStacks++;
251
+ c
252
+ )(), B = L(s(c)), H = {};
253
+ j.Fragment = T, j.jsx = function(n, r, l) {
254
+ var d = 1e4 > F.recentlyCreatedOwnerStacks++;
255
255
  return S(
256
- e,
257
- t,
258
- c,
256
+ n,
257
+ r,
258
+ l,
259
259
  !1,
260
- u ? Error("react-stack-top-frame") : J,
261
- u ? z(i(e)) : q
260
+ d ? Error("react-stack-top-frame") : q,
261
+ d ? L(s(n)) : B
262
262
  );
263
- }, R.jsxs = function(e, t, c) {
264
- var u = 1e4 > I.recentlyCreatedOwnerStacks++;
263
+ }, j.jsxs = function(n, r, l) {
264
+ var d = 1e4 > F.recentlyCreatedOwnerStacks++;
265
265
  return S(
266
- e,
267
- t,
268
- c,
266
+ n,
267
+ r,
268
+ l,
269
269
  !0,
270
- u ? Error("react-stack-top-frame") : J,
271
- u ? z(i(e)) : q
270
+ d ? Error("react-stack-top-frame") : q,
271
+ d ? L(s(n)) : B
272
272
  );
273
273
  };
274
- })()), R;
274
+ })()), j;
275
275
  }
276
- var X;
277
- function ge() {
278
- return X || (X = 1, process.env.NODE_ENV === "production" ? P.exports = fe() : P.exports = pe()), P.exports;
276
+ var Q;
277
+ function hn() {
278
+ return Q || (Q = 1, process.env.NODE_ENV === "production" ? P.exports = gn() : P.exports = mn()), P.exports;
279
279
  }
280
- var r = ge();
281
- const me = `:root {
280
+ var t = hn();
281
+ const _n = `:root {
282
282
  --background: 0 0% 100%;
283
283
  --foreground: 222.2 84% 4.9%;
284
284
 
@@ -824,99 +824,169 @@ const me = `:root {
824
824
  }
825
825
 
826
826
  /* Note: Modal styles are defined in Studio-UI where the picker modal is rendered */
827
+
828
+ /* =============================================================================
829
+ Sections (collapsible accordion)
830
+ ============================================================================= */
831
+
832
+ .settings__section {
833
+ border: 1px solid hsl(var(--border));
834
+ border-radius: var(--radius);
835
+ overflow: hidden;
836
+ }
837
+
838
+ .settings__section-header {
839
+ display: flex;
840
+ align-items: center;
841
+ width: 100%;
842
+ padding: 12px 16px;
843
+ background: hsl(var(--card));
844
+ border: none;
845
+ color: hsl(var(--foreground));
846
+ font-size: 14px;
847
+ font-weight: 600;
848
+ font-family: inherit;
849
+ cursor: pointer;
850
+ gap: 8px;
851
+ }
852
+
853
+ .settings__section-header:hover {
854
+ background: hsl(var(--accent));
855
+ }
856
+
857
+ .settings__section-arrow {
858
+ display: inline-block;
859
+ font-size: 10px;
860
+ color: hsl(var(--muted-foreground));
861
+ transition: transform 0.2s ease;
862
+ transform: rotate(0deg);
863
+ }
864
+
865
+ .settings__section-arrow--open {
866
+ transform: rotate(90deg);
867
+ }
868
+
869
+ .settings__section-title {
870
+ flex: 1;
871
+ text-align: left;
872
+ }
873
+
874
+ .settings__section-body {
875
+ display: grid;
876
+ grid-template-rows: 0fr;
877
+ transition: grid-template-rows 0.2s ease;
878
+ }
879
+
880
+ .settings__section-body--open {
881
+ grid-template-rows: 1fr;
882
+ }
883
+
884
+ .settings__section-content {
885
+ overflow: hidden;
886
+ min-height: 0;
887
+ display: flex;
888
+ flex-direction: column;
889
+ gap: 16px;
890
+ padding: 0 16px;
891
+ transition: padding 0.2s ease;
892
+ }
893
+
894
+ .settings__section-body--open .settings__section-content {
895
+ padding: 16px;
896
+ }
827
897
  `;
828
- let Q = !1;
829
- function Z() {
830
- if (Q || typeof document > "u")
898
+ let Z = !1;
899
+ function M() {
900
+ if (Z || typeof document > "u")
831
901
  return;
832
- const n = document.createElement("style");
833
- n.setAttribute("data-telemetryos-sdk", ""), n.textContent = me, document.head.appendChild(n), Q = !0;
902
+ const e = document.createElement("style");
903
+ e.setAttribute("data-telemetryos-sdk", ""), e.textContent = _n, document.head.appendChild(e), Z = !0;
834
904
  }
835
- Z();
836
- function ye({ children: n }) {
905
+ M();
906
+ function wn({ children: e }) {
837
907
  return y(() => {
838
- const s = window.matchMedia("(prefers-color-scheme: dark)"), i = (p) => {
908
+ const i = window.matchMedia("(prefers-color-scheme: dark)"), s = (p) => {
839
909
  let f;
840
- p === "system" ? f = s.matches : f = p !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
841
- }, a = $().subscribeColorScheme(i);
910
+ p === "system" ? f = i.matches : f = p !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
911
+ }, a = Y().subscribeColorScheme(s);
842
912
  a.catch(console.error);
843
- const l = () => {
844
- $().getColorScheme().then(i).catch(console.error);
913
+ const c = () => {
914
+ Y().getColorScheme().then(s).catch(console.error);
845
915
  };
846
- return s.addEventListener("change", l), () => {
847
- a.then(() => $().unsubscribeColorScheme(i)).catch(console.error), s.removeEventListener("change", l);
916
+ return i.addEventListener("change", c), () => {
917
+ a.then(() => Y().unsubscribeColorScheme(s)).catch(console.error), i.removeEventListener("change", c);
848
918
  };
849
- }, []), r.jsx("div", { className: "settings__container", children: n });
919
+ }, []), t.jsx("div", { className: "settings__container", children: e });
850
920
  }
851
- function ke({ children: n }) {
852
- return r.jsx("div", { className: "settings__box", children: n });
921
+ function Sn({ children: e }) {
922
+ return t.jsx("div", { className: "settings__box", children: e });
853
923
  }
854
- function we({ children: n }) {
855
- return r.jsx("div", { className: "settings__heading", children: n });
924
+ function En({ children: e }) {
925
+ return t.jsx("div", { className: "settings__heading", children: e });
856
926
  }
857
- function Se() {
858
- return r.jsx("hr", { className: "settings__divider" });
927
+ function jn() {
928
+ return t.jsx("hr", { className: "settings__divider" });
859
929
  }
860
- function Ee({ children: n }) {
861
- return r.jsx("label", { className: "settings__field", children: n });
930
+ function Rn({ children: e }) {
931
+ return t.jsx("label", { className: "settings__field", children: e });
862
932
  }
863
- function Re({ children: n }) {
864
- return r.jsx("div", { className: "settings__label", children: n });
933
+ function Nn({ children: e }) {
934
+ return t.jsx("div", { className: "settings__label", children: e });
865
935
  }
866
- function je({ children: n }) {
867
- return r.jsx("div", { className: "settings__hint", children: n });
936
+ function Tn({ children: e }) {
937
+ return t.jsx("div", { className: "settings__hint", children: e });
868
938
  }
869
- function Te({ children: n }) {
870
- return r.jsx("div", { className: "settings__error", children: n });
939
+ function Cn({ children: e }) {
940
+ return t.jsx("div", { className: "settings__error", children: e });
871
941
  }
872
- function Ne({ children: n }) {
873
- return r.jsx("div", { className: "settings__input-frame", children: n });
942
+ function An({ children: e }) {
943
+ return t.jsx("div", { className: "settings__input-frame", children: e });
874
944
  }
875
- function Ae({ children: n }) {
876
- return r.jsx("div", { className: "settings__textarea-frame", children: n });
945
+ function On({ children: e }) {
946
+ return t.jsx("div", { className: "settings__textarea-frame", children: e });
877
947
  }
878
- function Ce({ children: n }) {
879
- return r.jsx("div", { className: "settings__select-frame", children: n });
948
+ function Pn({ children: e }) {
949
+ return t.jsx("div", { className: "settings__select-frame", children: e });
880
950
  }
881
- function Oe({ children: n }) {
882
- return r.jsx("div", { className: "settings__slider-frame", children: n });
951
+ function In({ children: e }) {
952
+ return t.jsx("div", { className: "settings__slider-frame", children: e });
883
953
  }
884
- function Pe({ children: n }) {
885
- return r.jsx("div", { className: "settings__slider-ruler", children: n });
954
+ function zn({ children: e }) {
955
+ return t.jsx("div", { className: "settings__slider-ruler", children: e });
886
956
  }
887
- function Fe({ children: n }) {
888
- return r.jsx("div", { className: "settings__color-frame", children: n });
957
+ function Fn({ children: e }) {
958
+ return t.jsx("div", { className: "settings__color-frame", children: e });
889
959
  }
890
- function Le({ children: n }) {
891
- return r.jsx("label", { className: "settings__switch-frame", children: n });
960
+ function Ln({ children: e }) {
961
+ return t.jsx("label", { className: "settings__switch-frame", children: e });
892
962
  }
893
- function Ie({ children: n }) {
894
- return r.jsx("span", { className: "settings__switch-label", children: n });
963
+ function Un({ children: e }) {
964
+ return t.jsx("span", { className: "settings__switch-label", children: e });
895
965
  }
896
- function ze({ children: n }) {
897
- return r.jsx("label", { className: "settings__checkbox-frame", children: n });
966
+ function $n({ children: e }) {
967
+ return t.jsx("label", { className: "settings__checkbox-frame", children: e });
898
968
  }
899
- function Ue({ children: n }) {
900
- return r.jsx("span", { className: "settings__checkbox-label", children: n });
969
+ function Yn({ children: e }) {
970
+ return t.jsx("span", { className: "settings__checkbox-label", children: e });
901
971
  }
902
- function Ye({ children: n }) {
903
- return r.jsx("label", { className: "settings__radio-frame", children: n });
972
+ function Mn({ children: e }) {
973
+ return t.jsx("label", { className: "settings__radio-frame", children: e });
904
974
  }
905
- function $e({ children: n }) {
906
- return r.jsx("span", { className: "settings__radio-label", children: n });
975
+ function Dn({ children: e }) {
976
+ return t.jsx("span", { className: "settings__radio-label", children: e });
907
977
  }
908
- function Me({ children: n }) {
909
- return r.jsx("div", { className: "settings__button-frame", children: n });
978
+ function Wn({ children: e }) {
979
+ return t.jsx("div", { className: "settings__button-frame", children: e });
910
980
  }
911
- Z();
912
- function De({ value: n, onChange: o, disabled: s = !1, placeholder: i = "Select media...", accept: a }) {
913
- const [l, p] = v(!1), f = async () => {
914
- if (!(s || l)) {
981
+ M();
982
+ function Vn({ value: e, onChange: o, disabled: i = !1, placeholder: s = "Select media...", accept: a }) {
983
+ const [c, p] = _(!1), f = async () => {
984
+ if (!(i || c)) {
915
985
  p(!0);
916
986
  try {
917
- const g = await de().openPicker({
987
+ const g = await pn().openPicker({
918
988
  accept: a,
919
- currentValue: n ?? void 0
989
+ currentValue: e ?? void 0
920
990
  });
921
991
  g && o(g);
922
992
  } catch (g) {
@@ -928,130 +998,136 @@ function De({ value: n, onChange: o, disabled: s = !1, placeholder: i = "Select
928
998
  }, w = (g) => {
929
999
  g.stopPropagation(), o(null);
930
1000
  };
931
- return r.jsxs("div", { className: "settings__media-select", children: [r.jsx("button", { type: "button", className: `settings__media-select-trigger ${n ? "settings__media-select-trigger--has-value" : ""}`, onClick: f, disabled: s || l, title: n ? `${n.name} - Click to change` : i, children: n ? r.jsx("img", { src: n.thumbnailUrl, alt: n.name, className: "settings__media-select-thumbnail" }) : r.jsx("div", { className: "settings__media-select-thumbnail settings__media-select-thumbnail--empty", children: l ? r.jsx(be, {}) : r.jsx(_e, {}) }) }), n && !s && r.jsx("button", { type: "button", className: "settings__media-select-clear", onClick: w, title: "Remove image", children: r.jsx(he, {}) })] });
1001
+ return t.jsxs("div", { className: "settings__media-select", children: [t.jsx("button", { type: "button", className: `settings__media-select-trigger ${e ? "settings__media-select-trigger--has-value" : ""}`, onClick: f, disabled: i || c, title: e ? `${e.name} - Click to change` : s, children: e ? t.jsx("img", { src: e.thumbnailUrl, alt: e.name, className: "settings__media-select-thumbnail" }) : t.jsx("div", { className: "settings__media-select-thumbnail settings__media-select-thumbnail--empty", children: c ? t.jsx(vn, {}) : t.jsx(bn, {}) }) }), e && !i && t.jsx("button", { type: "button", className: "settings__media-select-clear", onClick: w, title: "Remove image", children: t.jsx(xn, {}) })] });
932
1002
  }
933
- function he() {
934
- return r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [r.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), r.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] });
1003
+ function xn() {
1004
+ return t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [t.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), t.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] });
935
1005
  }
936
- function _e() {
937
- return r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [r.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), r.jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), r.jsx("polyline", { points: "21 15 16 10 5 21" })] });
1006
+ function bn() {
1007
+ return t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [t.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), t.jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), t.jsx("polyline", { points: "21 15 16 10 5 21" })] });
938
1008
  }
939
- function be() {
940
- return r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [r.jsx("circle", { cx: "12", cy: "12", r: "10", opacity: "0.25" }), r.jsx("path", { d: "M12 2a10 10 0 0 1 10 10", strokeLinecap: "round", children: r.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 12 12", to: "360 12 12", dur: "1s", repeatCount: "indefinite" }) })] });
1009
+ function vn() {
1010
+ return t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [t.jsx("circle", { cx: "12", cy: "12", r: "10", opacity: "0.25" }), t.jsx("path", { d: "M12 2a10 10 0 0 1 10 10", strokeLinecap: "round", children: t.jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 12 12", to: "360 12 12", dur: "1s", repeatCount: "indefinite" }) })] });
941
1011
  }
942
- function k(n, o, s, i = 0) {
1012
+ M();
1013
+ function Jn({ title: e, defaultOpen: o = !0, children: i }) {
1014
+ const [s, a] = _(o), c = dn();
1015
+ return t.jsxs("div", { className: "settings__section", children: [t.jsxs("button", { type: "button", className: "settings__section-header", onClick: () => a(!s), "aria-expanded": s, "aria-controls": c, children: [t.jsx("span", { className: `settings__section-arrow ${s ? "settings__section-arrow--open" : ""}`, children: "▶" }), t.jsx("span", { className: "settings__section-title", children: e })] }), t.jsx("div", { id: c, className: `settings__section-body ${s ? "settings__section-body--open" : ""}`, ...!s && { inert: !0 }, children: t.jsx("div", { className: "settings__section-content", children: i }) })] });
1016
+ }
1017
+ function k(e, o, i, s = 0) {
943
1018
  var a;
944
- const [l, p] = v(!0), f = le(!0), [w] = v(s), [g, S] = v(void 0), [m, _] = v(void 0), b = ue((h) => {
945
- f.current ? console.error("Cannot set store value while loading. Destructure and check the first element of the returned tuple.") : _(h);
1019
+ const [c, p] = _(!0), f = un(!0), [w] = _(i), [g, S] = _(void 0), [m, x] = _(void 0), b = fn((h) => {
1020
+ f.current ? console.error("Cannot set store value while loading. Destructure and check the first element of the returned tuple.") : x(h);
946
1021
  }, []);
947
1022
  return y(() => {
948
- p(!0), f.current = !0, S(void 0), _(void 0);
949
- const h = (A) => {
950
- S((C) => JSON.stringify(C) === JSON.stringify(A) ? C : A), p(!1), f.current = !1;
1023
+ p(!0), f.current = !0, S(void 0), x(void 0);
1024
+ const h = (C) => {
1025
+ S((A) => JSON.stringify(A) === JSON.stringify(C) ? A : C), p(!1), f.current = !1;
951
1026
  };
952
- return n.subscribe(o, h).catch(console.error), () => {
953
- n.unsubscribe(o, h).catch(console.error);
1027
+ return e.subscribe(o, h).catch(console.error), () => {
1028
+ e.unsubscribe(o, h).catch(console.error);
954
1029
  };
955
- }, [n, o]), y(() => {
1030
+ }, [e, o]), y(() => {
956
1031
  if (!f.current && typeof m < "u") {
957
1032
  const h = setTimeout(() => {
958
- n.set(o, m);
959
- }, i);
1033
+ e.set(o, m);
1034
+ }, s);
960
1035
  return () => clearTimeout(h);
961
1036
  }
962
- }, [m, n, o, i]), y(() => {
1037
+ }, [m, e, o, s]), y(() => {
963
1038
  if (JSON.stringify(m) === JSON.stringify(g)) {
964
1039
  const h = setTimeout(() => {
965
- _(void 0);
1040
+ x(void 0);
966
1041
  }, 500);
967
1042
  return () => clearTimeout(h);
968
1043
  }
969
- }, [m, g]), [l, (a = m ?? g) !== null && a !== void 0 ? a : w, b];
1044
+ }, [m, g]), [c, (a = m ?? g) !== null && a !== void 0 ? a : w, b];
970
1045
  }
971
- function We(n, o) {
972
- return (s, i = 0) => k(s, n, o, i);
1046
+ function qn(e, o) {
1047
+ return (i, s = 0) => k(i, e, o, s);
973
1048
  }
974
- function Ve(n, o) {
975
- return (s = 0) => {
976
- const i = j(() => T().instance, []);
977
- return k(i, n, o, s);
1049
+ function Bn(e, o) {
1050
+ return (i = 0) => {
1051
+ const s = R(() => N().instance, []);
1052
+ return k(s, e, o, i);
978
1053
  };
979
1054
  }
980
- function Je(n, o) {
981
- return (s = 0) => {
982
- const i = j(() => T().application, []);
983
- return k(i, n, o, s);
1055
+ function Hn(e, o) {
1056
+ return (i = 0) => {
1057
+ const s = R(() => N().application, []);
1058
+ return k(s, e, o, i);
984
1059
  };
985
1060
  }
986
- function qe(n, o) {
987
- return (s = 0) => {
988
- const i = j(() => T().device, []);
989
- return k(i, n, o, s);
1061
+ function Gn(e, o) {
1062
+ return (i = 0) => {
1063
+ const s = R(() => N().device, []);
1064
+ return k(s, e, o, i);
990
1065
  };
991
1066
  }
992
- function Be(n, o, s) {
993
- return (i = 0) => {
994
- const a = j(() => T().shared(s), [s]);
995
- return k(a, n, o, i);
1067
+ function Xn(e, o, i) {
1068
+ return (s = 0) => {
1069
+ const a = R(() => N().shared(i), [i]);
1070
+ return k(a, e, o, s);
996
1071
  };
997
1072
  }
998
- function He(n, o) {
999
- return (s, i = 0) => {
1000
- const a = j(() => T().shared(s), [s]);
1001
- return k(a, n, o, i);
1073
+ function Qn(e, o) {
1074
+ return (i, s = 0) => {
1075
+ const a = R(() => N().shared(i), [i]);
1076
+ return k(a, e, o, s);
1002
1077
  };
1003
1078
  }
1004
- function Ge(n) {
1079
+ function Zn(e) {
1005
1080
  y(() => {
1006
- document.documentElement.style.fontSize = `calc(1vmax * ${n})`;
1007
- }, [n]);
1081
+ document.documentElement.style.fontSize = `calc(1vmax * ${e})`;
1082
+ }, [e]);
1008
1083
  }
1009
- function Xe() {
1010
- const [n, o] = v(() => window.innerWidth / window.innerHeight);
1084
+ function Kn() {
1085
+ const [e, o] = _(() => window.innerWidth / window.innerHeight);
1011
1086
  return y(() => {
1012
- const i = () => {
1087
+ const s = () => {
1013
1088
  o(window.innerWidth / window.innerHeight);
1014
1089
  };
1015
- return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
1016
- }, []), n;
1090
+ return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
1091
+ }, []), e;
1017
1092
  }
1018
- function Qe(n, o) {
1093
+ function ne(e, o) {
1019
1094
  return {
1020
- uiWidthFactor: Math.min(o, 1) / n,
1021
- uiHeightFactor: Math.max(o, 1) / n
1095
+ uiWidthFactor: Math.min(o, 1) / e,
1096
+ uiHeightFactor: Math.max(o, 1) / e
1022
1097
  };
1023
1098
  }
1024
1099
  export {
1025
- ke as SettingsBox,
1026
- Me as SettingsButtonFrame,
1027
- ze as SettingsCheckboxFrame,
1028
- Ue as SettingsCheckboxLabel,
1029
- Fe as SettingsColorFrame,
1030
- ye as SettingsContainer,
1031
- Se as SettingsDivider,
1032
- Te as SettingsError,
1033
- Ee as SettingsField,
1034
- we as SettingsHeading,
1035
- je as SettingsHint,
1036
- Ne as SettingsInputFrame,
1037
- Re as SettingsLabel,
1038
- De as SettingsMediaSelect,
1039
- Ye as SettingsRadioFrame,
1040
- $e as SettingsRadioLabel,
1041
- Ce as SettingsSelectFrame,
1042
- Oe as SettingsSliderFrame,
1043
- Pe as SettingsSliderRuler,
1044
- Le as SettingsSwitchFrame,
1045
- Ie as SettingsSwitchLabel,
1046
- Ae as SettingsTextAreaFrame,
1047
- Je as createUseApplicationStoreState,
1048
- qe as createUseDeviceStoreState,
1049
- He as createUseDynamicNamespaceStoreState,
1050
- Ve as createUseInstanceStoreState,
1051
- Be as createUseSharedStoreState,
1052
- We as createUseStoreState,
1100
+ Sn as SettingsBox,
1101
+ Wn as SettingsButtonFrame,
1102
+ $n as SettingsCheckboxFrame,
1103
+ Yn as SettingsCheckboxLabel,
1104
+ Fn as SettingsColorFrame,
1105
+ wn as SettingsContainer,
1106
+ jn as SettingsDivider,
1107
+ Cn as SettingsError,
1108
+ Rn as SettingsField,
1109
+ En as SettingsHeading,
1110
+ Tn as SettingsHint,
1111
+ An as SettingsInputFrame,
1112
+ Nn as SettingsLabel,
1113
+ Vn as SettingsMediaSelect,
1114
+ Mn as SettingsRadioFrame,
1115
+ Dn as SettingsRadioLabel,
1116
+ Jn as SettingsSection,
1117
+ Pn as SettingsSelectFrame,
1118
+ In as SettingsSliderFrame,
1119
+ zn as SettingsSliderRuler,
1120
+ Ln as SettingsSwitchFrame,
1121
+ Un as SettingsSwitchLabel,
1122
+ On as SettingsTextAreaFrame,
1123
+ Hn as createUseApplicationStoreState,
1124
+ Gn as createUseDeviceStoreState,
1125
+ Qn as createUseDynamicNamespaceStoreState,
1126
+ Bn as createUseInstanceStoreState,
1127
+ Xn as createUseSharedStoreState,
1128
+ qn as createUseStoreState,
1053
1129
  k as useStoreState,
1054
- Xe as useUiAspectRatio,
1055
- Qe as useUiResponsiveFactors,
1056
- Ge as useUiScaleToSetRem
1130
+ Kn as useUiAspectRatio,
1131
+ ne as useUiResponsiveFactors,
1132
+ Zn as useUiScaleToSetRem
1057
1133
  };