@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/CHANGELOG.md +38 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1970 -1765
- package/dist/react/SettingsSection.d.ts +20 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react.cjs +75 -5
- package/dist/react.js +377 -301
- package/package.json +2 -2
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { environment as
|
|
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
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function s
|
|
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 (
|
|
21
|
-
|
|
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" && (
|
|
24
|
-
} else
|
|
25
|
-
return a =
|
|
26
|
-
$$typeof:
|
|
27
|
-
type:
|
|
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:
|
|
30
|
+
props: c
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return E.Fragment = o, E.jsx =
|
|
33
|
+
return E.Fragment = o, E.jsx = i, E.jsxs = i, E;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
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
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
function n
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (
|
|
54
|
-
case
|
|
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
|
|
56
|
+
case C:
|
|
57
57
|
return "Profiler";
|
|
58
58
|
case h:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case en:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case tn:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case sn:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
switch (typeof
|
|
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
|
-
),
|
|
71
|
-
case
|
|
70
|
+
), n.$$typeof) {
|
|
71
|
+
case D:
|
|
72
72
|
return "Portal";
|
|
73
73
|
case K:
|
|
74
|
-
return
|
|
75
|
-
case
|
|
76
|
-
return (
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return
|
|
80
|
-
case
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
|
|
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(
|
|
85
|
+
return e(n(r));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function o(
|
|
92
|
-
return "" +
|
|
91
|
+
function o(n) {
|
|
92
|
+
return "" + n;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function i(n) {
|
|
95
95
|
try {
|
|
96
|
-
o(
|
|
97
|
-
var
|
|
96
|
+
o(n);
|
|
97
|
+
var r = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
r = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
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
|
-
|
|
108
|
-
), o(
|
|
107
|
+
d
|
|
108
|
+
), o(n);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
if (typeof
|
|
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
|
|
117
|
-
return
|
|
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
|
|
124
|
-
return
|
|
123
|
+
var n = F.A;
|
|
124
|
+
return n === null ? null : n.getOwner();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function c() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function p(
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
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
|
|
134
|
+
return n.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function f(
|
|
137
|
-
function
|
|
138
|
-
|
|
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
|
-
|
|
140
|
+
r
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
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
|
|
150
|
-
return
|
|
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
|
-
)),
|
|
152
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
153
153
|
}
|
|
154
|
-
function g(
|
|
155
|
-
var
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
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(
|
|
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(
|
|
170
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
171
171
|
configurable: !1,
|
|
172
172
|
enumerable: !1,
|
|
173
173
|
writable: !0,
|
|
174
174
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
175
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
179
|
value: O
|
|
180
|
-
}), Object.defineProperty(
|
|
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(
|
|
185
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
186
186
|
}
|
|
187
|
-
function S(
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
m(d
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
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(
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
u,
|
|
214
|
+
v,
|
|
215
|
+
u
|
|
216
|
+
), H[u + d] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
typeof
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
n,
|
|
228
|
+
u,
|
|
229
|
+
l,
|
|
230
230
|
a(),
|
|
231
231
|
O,
|
|
232
232
|
U
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function m(
|
|
236
|
-
|
|
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
|
|
239
|
-
return typeof
|
|
238
|
+
function x(n) {
|
|
239
|
+
return typeof n == "object" && n !== null && n.$$typeof === I;
|
|
240
240
|
}
|
|
241
|
-
var b =
|
|
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(
|
|
246
|
-
return
|
|
245
|
+
react_stack_bottom_frame: function(n) {
|
|
246
|
+
return n();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
249
|
+
var V, J = {}, q = b.react_stack_bottom_frame.bind(
|
|
250
250
|
b,
|
|
251
|
-
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
n,
|
|
257
|
+
r,
|
|
258
|
+
l,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
d ? Error("react-stack-top-frame") : q,
|
|
261
|
+
d ? L(s(n)) : B
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
263
|
+
}, j.jsxs = function(n, r, l) {
|
|
264
|
+
var d = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return S(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
n,
|
|
267
|
+
r,
|
|
268
|
+
l,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
d ? Error("react-stack-top-frame") : q,
|
|
271
|
+
d ? L(s(n)) : B
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
})()),
|
|
274
|
+
})()), j;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
return
|
|
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
|
|
281
|
-
const
|
|
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
|
|
829
|
-
function
|
|
830
|
-
if (
|
|
898
|
+
let Z = !1;
|
|
899
|
+
function M() {
|
|
900
|
+
if (Z || typeof document > "u")
|
|
831
901
|
return;
|
|
832
|
-
const
|
|
833
|
-
|
|
902
|
+
const e = document.createElement("style");
|
|
903
|
+
e.setAttribute("data-telemetryos-sdk", ""), e.textContent = _n, document.head.appendChild(e), Z = !0;
|
|
834
904
|
}
|
|
835
|
-
|
|
836
|
-
function
|
|
905
|
+
M();
|
|
906
|
+
function wn({ children: e }) {
|
|
837
907
|
return y(() => {
|
|
838
|
-
const
|
|
908
|
+
const i = window.matchMedia("(prefers-color-scheme: dark)"), s = (p) => {
|
|
839
909
|
let f;
|
|
840
|
-
p === "system" ? f =
|
|
841
|
-
}, a =
|
|
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
|
|
844
|
-
|
|
913
|
+
const c = () => {
|
|
914
|
+
Y().getColorScheme().then(s).catch(console.error);
|
|
845
915
|
};
|
|
846
|
-
return
|
|
847
|
-
a.then(() =>
|
|
916
|
+
return i.addEventListener("change", c), () => {
|
|
917
|
+
a.then(() => Y().unsubscribeColorScheme(s)).catch(console.error), i.removeEventListener("change", c);
|
|
848
918
|
};
|
|
849
|
-
}, []),
|
|
919
|
+
}, []), t.jsx("div", { className: "settings__container", children: e });
|
|
850
920
|
}
|
|
851
|
-
function
|
|
852
|
-
return
|
|
921
|
+
function Sn({ children: e }) {
|
|
922
|
+
return t.jsx("div", { className: "settings__box", children: e });
|
|
853
923
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
924
|
+
function En({ children: e }) {
|
|
925
|
+
return t.jsx("div", { className: "settings__heading", children: e });
|
|
856
926
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
927
|
+
function jn() {
|
|
928
|
+
return t.jsx("hr", { className: "settings__divider" });
|
|
859
929
|
}
|
|
860
|
-
function
|
|
861
|
-
return
|
|
930
|
+
function Rn({ children: e }) {
|
|
931
|
+
return t.jsx("label", { className: "settings__field", children: e });
|
|
862
932
|
}
|
|
863
|
-
function
|
|
864
|
-
return
|
|
933
|
+
function Nn({ children: e }) {
|
|
934
|
+
return t.jsx("div", { className: "settings__label", children: e });
|
|
865
935
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
936
|
+
function Tn({ children: e }) {
|
|
937
|
+
return t.jsx("div", { className: "settings__hint", children: e });
|
|
868
938
|
}
|
|
869
|
-
function
|
|
870
|
-
return
|
|
939
|
+
function Cn({ children: e }) {
|
|
940
|
+
return t.jsx("div", { className: "settings__error", children: e });
|
|
871
941
|
}
|
|
872
|
-
function
|
|
873
|
-
return
|
|
942
|
+
function An({ children: e }) {
|
|
943
|
+
return t.jsx("div", { className: "settings__input-frame", children: e });
|
|
874
944
|
}
|
|
875
|
-
function
|
|
876
|
-
return
|
|
945
|
+
function On({ children: e }) {
|
|
946
|
+
return t.jsx("div", { className: "settings__textarea-frame", children: e });
|
|
877
947
|
}
|
|
878
|
-
function
|
|
879
|
-
return
|
|
948
|
+
function Pn({ children: e }) {
|
|
949
|
+
return t.jsx("div", { className: "settings__select-frame", children: e });
|
|
880
950
|
}
|
|
881
|
-
function
|
|
882
|
-
return
|
|
951
|
+
function In({ children: e }) {
|
|
952
|
+
return t.jsx("div", { className: "settings__slider-frame", children: e });
|
|
883
953
|
}
|
|
884
|
-
function
|
|
885
|
-
return
|
|
954
|
+
function zn({ children: e }) {
|
|
955
|
+
return t.jsx("div", { className: "settings__slider-ruler", children: e });
|
|
886
956
|
}
|
|
887
|
-
function
|
|
888
|
-
return
|
|
957
|
+
function Fn({ children: e }) {
|
|
958
|
+
return t.jsx("div", { className: "settings__color-frame", children: e });
|
|
889
959
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
960
|
+
function Ln({ children: e }) {
|
|
961
|
+
return t.jsx("label", { className: "settings__switch-frame", children: e });
|
|
892
962
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
963
|
+
function Un({ children: e }) {
|
|
964
|
+
return t.jsx("span", { className: "settings__switch-label", children: e });
|
|
895
965
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
966
|
+
function $n({ children: e }) {
|
|
967
|
+
return t.jsx("label", { className: "settings__checkbox-frame", children: e });
|
|
898
968
|
}
|
|
899
|
-
function
|
|
900
|
-
return
|
|
969
|
+
function Yn({ children: e }) {
|
|
970
|
+
return t.jsx("span", { className: "settings__checkbox-label", children: e });
|
|
901
971
|
}
|
|
902
|
-
function
|
|
903
|
-
return
|
|
972
|
+
function Mn({ children: e }) {
|
|
973
|
+
return t.jsx("label", { className: "settings__radio-frame", children: e });
|
|
904
974
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
975
|
+
function Dn({ children: e }) {
|
|
976
|
+
return t.jsx("span", { className: "settings__radio-label", children: e });
|
|
907
977
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
978
|
+
function Wn({ children: e }) {
|
|
979
|
+
return t.jsx("div", { className: "settings__button-frame", children: e });
|
|
910
980
|
}
|
|
911
|
-
|
|
912
|
-
function
|
|
913
|
-
const [
|
|
914
|
-
if (!(
|
|
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
|
|
987
|
+
const g = await pn().openPicker({
|
|
918
988
|
accept: a,
|
|
919
|
-
currentValue:
|
|
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
|
|
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
|
|
934
|
-
return
|
|
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
|
|
937
|
-
return
|
|
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
|
|
940
|
-
return
|
|
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
|
-
|
|
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 [
|
|
945
|
-
f.current ? console.error("Cannot set store value while loading. Destructure and check the first element of the returned tuple.") :
|
|
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),
|
|
949
|
-
const h = (
|
|
950
|
-
S((
|
|
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
|
|
953
|
-
|
|
1027
|
+
return e.subscribe(o, h).catch(console.error), () => {
|
|
1028
|
+
e.unsubscribe(o, h).catch(console.error);
|
|
954
1029
|
};
|
|
955
|
-
}, [
|
|
1030
|
+
}, [e, o]), y(() => {
|
|
956
1031
|
if (!f.current && typeof m < "u") {
|
|
957
1032
|
const h = setTimeout(() => {
|
|
958
|
-
|
|
959
|
-
},
|
|
1033
|
+
e.set(o, m);
|
|
1034
|
+
}, s);
|
|
960
1035
|
return () => clearTimeout(h);
|
|
961
1036
|
}
|
|
962
|
-
}, [m,
|
|
1037
|
+
}, [m, e, o, s]), y(() => {
|
|
963
1038
|
if (JSON.stringify(m) === JSON.stringify(g)) {
|
|
964
1039
|
const h = setTimeout(() => {
|
|
965
|
-
|
|
1040
|
+
x(void 0);
|
|
966
1041
|
}, 500);
|
|
967
1042
|
return () => clearTimeout(h);
|
|
968
1043
|
}
|
|
969
|
-
}, [m, g]), [
|
|
1044
|
+
}, [m, g]), [c, (a = m ?? g) !== null && a !== void 0 ? a : w, b];
|
|
970
1045
|
}
|
|
971
|
-
function
|
|
972
|
-
return (
|
|
1046
|
+
function qn(e, o) {
|
|
1047
|
+
return (i, s = 0) => k(i, e, o, s);
|
|
973
1048
|
}
|
|
974
|
-
function
|
|
975
|
-
return (
|
|
976
|
-
const
|
|
977
|
-
return k(
|
|
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
|
|
981
|
-
return (
|
|
982
|
-
const
|
|
983
|
-
return k(
|
|
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
|
|
987
|
-
return (
|
|
988
|
-
const
|
|
989
|
-
return k(
|
|
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
|
|
993
|
-
return (
|
|
994
|
-
const a =
|
|
995
|
-
return k(a,
|
|
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
|
|
999
|
-
return (
|
|
1000
|
-
const a =
|
|
1001
|
-
return k(a,
|
|
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
|
|
1079
|
+
function Zn(e) {
|
|
1005
1080
|
y(() => {
|
|
1006
|
-
document.documentElement.style.fontSize = `calc(1vmax * ${
|
|
1007
|
-
}, [
|
|
1081
|
+
document.documentElement.style.fontSize = `calc(1vmax * ${e})`;
|
|
1082
|
+
}, [e]);
|
|
1008
1083
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const [
|
|
1084
|
+
function Kn() {
|
|
1085
|
+
const [e, o] = _(() => window.innerWidth / window.innerHeight);
|
|
1011
1086
|
return y(() => {
|
|
1012
|
-
const
|
|
1087
|
+
const s = () => {
|
|
1013
1088
|
o(window.innerWidth / window.innerHeight);
|
|
1014
1089
|
};
|
|
1015
|
-
return window.addEventListener("resize",
|
|
1016
|
-
}, []),
|
|
1090
|
+
return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
1091
|
+
}, []), e;
|
|
1017
1092
|
}
|
|
1018
|
-
function
|
|
1093
|
+
function ne(e, o) {
|
|
1019
1094
|
return {
|
|
1020
|
-
uiWidthFactor: Math.min(o, 1) /
|
|
1021
|
-
uiHeightFactor: Math.max(o, 1) /
|
|
1095
|
+
uiWidthFactor: Math.min(o, 1) / e,
|
|
1096
|
+
uiHeightFactor: Math.max(o, 1) / e
|
|
1022
1097
|
};
|
|
1023
1098
|
}
|
|
1024
1099
|
export {
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
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
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1130
|
+
Kn as useUiAspectRatio,
|
|
1131
|
+
ne as useUiResponsiveFactors,
|
|
1132
|
+
Zn as useUiScaleToSetRem
|
|
1057
1133
|
};
|