@telemetryos/sdk 1.6.1 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/README.md +12 -18
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1242 -1606
- package/dist/react/Settings.d.ts +50 -0
- package/dist/react/hooks.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/inject-styles.d.ts +1 -0
- package/dist/react.cjs +295 -0
- package/dist/react.js +655 -0
- package/package.json +20 -6
package/dist/react.js
ADDED
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
import oe, { useEffect as w, useState as y } from "react";
|
|
2
|
+
import { environment as C } from "./index.js";
|
|
3
|
+
var R = { exports: {} }, v = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-runtime.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var V;
|
|
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) {
|
|
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, {
|
|
26
|
+
$$typeof: n,
|
|
27
|
+
type: l,
|
|
28
|
+
key: f,
|
|
29
|
+
ref: s !== void 0 ? s : null,
|
|
30
|
+
props: c
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return v.Fragment = i, v.jsx = u, v.jsxs = u, v;
|
|
34
|
+
}
|
|
35
|
+
var k = {};
|
|
36
|
+
/**
|
|
37
|
+
* @license React
|
|
38
|
+
* react-jsx-runtime.development.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
45
|
+
var M;
|
|
46
|
+
function se() {
|
|
47
|
+
return M || (M = 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 === ne ? null : e.displayName || e.name || null;
|
|
52
|
+
if (typeof e == "string") return e;
|
|
53
|
+
switch (e) {
|
|
54
|
+
case T:
|
|
55
|
+
return "Fragment";
|
|
56
|
+
case G:
|
|
57
|
+
return "Profiler";
|
|
58
|
+
case q:
|
|
59
|
+
return "StrictMode";
|
|
60
|
+
case Q:
|
|
61
|
+
return "Suspense";
|
|
62
|
+
case Z:
|
|
63
|
+
return "SuspenseList";
|
|
64
|
+
case ee:
|
|
65
|
+
return "Activity";
|
|
66
|
+
}
|
|
67
|
+
if (typeof e == "object")
|
|
68
|
+
switch (typeof e.tag == "number" && console.error(
|
|
69
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
|
+
), e.$$typeof) {
|
|
71
|
+
case J:
|
|
72
|
+
return "Portal";
|
|
73
|
+
case B:
|
|
74
|
+
return e.displayName || "Context";
|
|
75
|
+
case X:
|
|
76
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
+
case H:
|
|
78
|
+
var r = e.render;
|
|
79
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
+
case K:
|
|
81
|
+
return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
|
|
82
|
+
case j:
|
|
83
|
+
r = e._payload, e = e._init;
|
|
84
|
+
try {
|
|
85
|
+
return n(e(r));
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
function i(e) {
|
|
92
|
+
return "" + e;
|
|
93
|
+
}
|
|
94
|
+
function u(e) {
|
|
95
|
+
try {
|
|
96
|
+
i(e);
|
|
97
|
+
var r = !1;
|
|
98
|
+
} catch {
|
|
99
|
+
r = !0;
|
|
100
|
+
}
|
|
101
|
+
if (r) {
|
|
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(
|
|
105
|
+
r,
|
|
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);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function l(e) {
|
|
112
|
+
if (e === T) return "<>";
|
|
113
|
+
if (typeof e == "object" && e !== null && e.$$typeof === j)
|
|
114
|
+
return "<...>";
|
|
115
|
+
try {
|
|
116
|
+
var r = n(e);
|
|
117
|
+
return r ? "<" + r + ">" : "<...>";
|
|
118
|
+
} catch {
|
|
119
|
+
return "<...>";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function s() {
|
|
123
|
+
var e = A.A;
|
|
124
|
+
return e === null ? null : e.getOwner();
|
|
125
|
+
}
|
|
126
|
+
function c() {
|
|
127
|
+
return Error("react-stack-top-frame");
|
|
128
|
+
}
|
|
129
|
+
function f(e) {
|
|
130
|
+
if (L.call(e, "key")) {
|
|
131
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
|
+
if (r && r.isReactWarning) return !1;
|
|
133
|
+
}
|
|
134
|
+
return e.key !== void 0;
|
|
135
|
+
}
|
|
136
|
+
function g(e, r) {
|
|
137
|
+
function t() {
|
|
138
|
+
Y || (Y = !0, console.error(
|
|
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
|
+
r
|
|
141
|
+
));
|
|
142
|
+
}
|
|
143
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
144
|
+
get: t,
|
|
145
|
+
configurable: !0
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function _() {
|
|
149
|
+
var e = n(this.type);
|
|
150
|
+
return I[e] || (I[e] = !0, console.error(
|
|
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;
|
|
153
|
+
}
|
|
154
|
+
function S(e, r, t, o, E, N) {
|
|
155
|
+
var a = t.ref;
|
|
156
|
+
return e = {
|
|
157
|
+
$$typeof: F,
|
|
158
|
+
type: e,
|
|
159
|
+
key: r,
|
|
160
|
+
props: t,
|
|
161
|
+
_owner: o
|
|
162
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
|
+
enumerable: !1,
|
|
164
|
+
get: _
|
|
165
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
|
+
configurable: !1,
|
|
167
|
+
enumerable: !1,
|
|
168
|
+
writable: !0,
|
|
169
|
+
value: 0
|
|
170
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
171
|
+
configurable: !1,
|
|
172
|
+
enumerable: !1,
|
|
173
|
+
writable: !0,
|
|
174
|
+
value: null
|
|
175
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
176
|
+
configurable: !1,
|
|
177
|
+
enumerable: !1,
|
|
178
|
+
writable: !0,
|
|
179
|
+
value: E
|
|
180
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
181
|
+
configurable: !1,
|
|
182
|
+
enumerable: !1,
|
|
183
|
+
writable: !0,
|
|
184
|
+
value: N
|
|
185
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
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);
|
|
195
|
+
} else
|
|
196
|
+
console.error(
|
|
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
|
+
);
|
|
199
|
+
else x(a);
|
|
200
|
+
if (L.call(r, "key")) {
|
|
201
|
+
a = n(e);
|
|
202
|
+
var h = Object.keys(r).filter(function(te) {
|
|
203
|
+
return te !== "key";
|
|
204
|
+
});
|
|
205
|
+
o = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", D[a + o] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
207
|
+
let props = %s;
|
|
208
|
+
<%s {...props} />
|
|
209
|
+
React keys must be passed directly to JSX without using spread:
|
|
210
|
+
let props = %s;
|
|
211
|
+
<%s key={someKey} {...props} />`,
|
|
212
|
+
o,
|
|
213
|
+
a,
|
|
214
|
+
h,
|
|
215
|
+
a
|
|
216
|
+
), D[a + o] = !0);
|
|
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 = {};
|
|
220
|
+
for (var P in r)
|
|
221
|
+
P !== "key" && (t[P] = r[P]);
|
|
222
|
+
} else t = r;
|
|
223
|
+
return a && g(
|
|
224
|
+
t,
|
|
225
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
226
|
+
), S(
|
|
227
|
+
e,
|
|
228
|
+
a,
|
|
229
|
+
t,
|
|
230
|
+
s(),
|
|
231
|
+
E,
|
|
232
|
+
N
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function x(e) {
|
|
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
|
+
}
|
|
238
|
+
function m(e) {
|
|
239
|
+
return typeof e == "object" && e !== null && e.$$typeof === F;
|
|
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() {
|
|
242
|
+
return null;
|
|
243
|
+
};
|
|
244
|
+
b = {
|
|
245
|
+
react_stack_bottom_frame: function(e) {
|
|
246
|
+
return e();
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var Y, I = {}, $ = b.react_stack_bottom_frame.bind(
|
|
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++;
|
|
255
|
+
return p(
|
|
256
|
+
e,
|
|
257
|
+
r,
|
|
258
|
+
t,
|
|
259
|
+
!1,
|
|
260
|
+
o ? Error("react-stack-top-frame") : $,
|
|
261
|
+
o ? O(l(e)) : z
|
|
262
|
+
);
|
|
263
|
+
}, k.jsxs = function(e, r, t) {
|
|
264
|
+
var o = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return p(
|
|
266
|
+
e,
|
|
267
|
+
r,
|
|
268
|
+
t,
|
|
269
|
+
!0,
|
|
270
|
+
o ? Error("react-stack-top-frame") : $,
|
|
271
|
+
o ? O(l(e)) : z
|
|
272
|
+
);
|
|
273
|
+
};
|
|
274
|
+
})()), k;
|
|
275
|
+
}
|
|
276
|
+
var U;
|
|
277
|
+
function ie() {
|
|
278
|
+
return U || (U = 1, process.env.NODE_ENV === "production" ? R.exports = ae() : R.exports = se()), R.exports;
|
|
279
|
+
}
|
|
280
|
+
var d = ie();
|
|
281
|
+
const ce = `:root {
|
|
282
|
+
--background: 0 0% 100%;
|
|
283
|
+
--foreground: 222.2 84% 4.9%;
|
|
284
|
+
|
|
285
|
+
--muted: 220 12% 95%;
|
|
286
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
287
|
+
|
|
288
|
+
--border: 214.3 31.8% 91.4%;
|
|
289
|
+
--input: 214.3 31.8% 91.4%;
|
|
290
|
+
|
|
291
|
+
--card: 0 0% 100%;
|
|
292
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
293
|
+
|
|
294
|
+
--accent: 220 12% 95%;
|
|
295
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
296
|
+
|
|
297
|
+
--primary: 39 93% 59%;
|
|
298
|
+
--primary-foreground: 210 40% 98%;
|
|
299
|
+
|
|
300
|
+
--secondary: 210 40% 96.1%;
|
|
301
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
302
|
+
|
|
303
|
+
--destructive: 6 86% 61%;
|
|
304
|
+
--destructive-foreground: 210 40% 98%;
|
|
305
|
+
|
|
306
|
+
--ring: 222.2 84% 4.9%;
|
|
307
|
+
|
|
308
|
+
--radius: 0.5rem;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.dark {
|
|
312
|
+
--background: 210 28% 8%;
|
|
313
|
+
--foreground: 210 40% 88%;
|
|
314
|
+
|
|
315
|
+
--muted: 212, 28%, 10%;
|
|
316
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
317
|
+
|
|
318
|
+
--border: 212 24% 19%;
|
|
319
|
+
--input: 210 5% 31%;
|
|
320
|
+
|
|
321
|
+
--card: 212 28% 10%;
|
|
322
|
+
--card-foreground: 210 40% 98%;
|
|
323
|
+
|
|
324
|
+
--accent: 211 30% 15%;
|
|
325
|
+
--accent-foreground: 210 40% 98%;
|
|
326
|
+
|
|
327
|
+
--primary: 39 93% 59%;
|
|
328
|
+
--primary-foreground: 210 40% 98%;
|
|
329
|
+
|
|
330
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
331
|
+
--secondary-foreground: 210 40% 98%;
|
|
332
|
+
|
|
333
|
+
--destructive: 6 86% 61%;
|
|
334
|
+
--destructive-foreground: 210 40% 98%;
|
|
335
|
+
|
|
336
|
+
--ring: 212.7 26.8% 83.9%;
|
|
337
|
+
|
|
338
|
+
--radius: 0.5rem;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.settings__container {
|
|
342
|
+
padding: 16px;
|
|
343
|
+
background: hsl(var(--background));
|
|
344
|
+
color: hsl(var(--foreground));
|
|
345
|
+
font-family: 'Rubik', sans-serif;
|
|
346
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.settings__field {
|
|
350
|
+
margin-bottom: 24px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.settings__label {
|
|
354
|
+
font-size: 14px;
|
|
355
|
+
margin-bottom: 6px;
|
|
356
|
+
font-weight: 500;
|
|
357
|
+
color: hsl(var(--foreground));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.settings__input-frame > * {
|
|
361
|
+
height: 40px;
|
|
362
|
+
width: 100%;
|
|
363
|
+
font-size: 14px;
|
|
364
|
+
padding: 8px 12px;
|
|
365
|
+
border: 1px solid hsl(var(--border));
|
|
366
|
+
border-radius: var(--radius);
|
|
367
|
+
background: hsl(var(--background));
|
|
368
|
+
color: hsl(var(--foreground));
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.settings__input-frame > *:focus {
|
|
372
|
+
outline: 1px solid hsl(var(--primary));
|
|
373
|
+
outline-offset: 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.settings__input-frame > *::placeholder {
|
|
377
|
+
color: hsl(var(--muted-foreground));
|
|
378
|
+
opacity: 1;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.settings__select-frame > select {
|
|
382
|
+
appearance: none;
|
|
383
|
+
height: 40px;
|
|
384
|
+
width: 100%;
|
|
385
|
+
font-size: 14px;
|
|
386
|
+
padding: 8px 36px 8px 12px;
|
|
387
|
+
border: 1px solid hsl(var(--border));
|
|
388
|
+
border-radius: var(--radius);
|
|
389
|
+
background-color: hsl(var(--background));
|
|
390
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
391
|
+
background-repeat: no-repeat;
|
|
392
|
+
background-position: right 12px center;
|
|
393
|
+
color: hsl(var(--foreground));
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.settings__select-frame > select:hover {
|
|
398
|
+
background-color: hsl(var(--accent));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.settings__select-frame > select:focus {
|
|
402
|
+
outline: 1px solid hsl(var(--primary));
|
|
403
|
+
outline-offset: 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
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);
|
|
415
|
+
background: hsl(var(--background));
|
|
416
|
+
color: hsl(var(--foreground));
|
|
417
|
+
resize: vertical;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.settings__textarea-frame > textarea:focus {
|
|
421
|
+
outline: 1px solid hsl(var(--primary));
|
|
422
|
+
outline-offset: 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.settings__textarea-frame > textarea::placeholder {
|
|
426
|
+
color: hsl(var(--muted-foreground));
|
|
427
|
+
opacity: 1;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.settings__switch-frame {
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
gap: 8px;
|
|
434
|
+
font-size: 14px;
|
|
435
|
+
cursor: pointer;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.settings__switch-frame > input[type="checkbox"] {
|
|
439
|
+
appearance: none;
|
|
440
|
+
width: 44px;
|
|
441
|
+
height: 24px;
|
|
442
|
+
background: hsl(var(--input));
|
|
443
|
+
border-radius: 12px;
|
|
444
|
+
position: relative;
|
|
445
|
+
cursor: pointer;
|
|
446
|
+
transition: background 0.2s;
|
|
447
|
+
flex-shrink: 0;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.settings__switch-frame > input[type="checkbox"]::after {
|
|
451
|
+
content: '';
|
|
452
|
+
position: absolute;
|
|
453
|
+
top: 2px;
|
|
454
|
+
left: 2px;
|
|
455
|
+
width: 20px;
|
|
456
|
+
height: 20px;
|
|
457
|
+
background: hsl(var(--background));
|
|
458
|
+
border-radius: 50%;
|
|
459
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
460
|
+
transition: transform 0.2s;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.settings__switch-frame > input[type="checkbox"]:checked {
|
|
464
|
+
background: hsl(var(--primary));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.settings__switch-frame > input[type="checkbox"]:checked::after {
|
|
468
|
+
transform: translateX(20px);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.settings__switch-label {
|
|
472
|
+
flex: 1;
|
|
473
|
+
color: hsl(var(--foreground));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.settings__checkbox-frame {
|
|
477
|
+
display: flex;
|
|
478
|
+
align-items: center;
|
|
479
|
+
gap: 8px;
|
|
480
|
+
font-size: 14px;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.settings__checkbox-frame > input[type="checkbox"] {
|
|
485
|
+
appearance: none;
|
|
486
|
+
width: 16px;
|
|
487
|
+
height: 16px;
|
|
488
|
+
background: hsl(var(--background));
|
|
489
|
+
border: 1px solid hsl(var(--primary));
|
|
490
|
+
border-radius: 2px;
|
|
491
|
+
cursor: pointer;
|
|
492
|
+
position: relative;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.settings__checkbox-frame > input[type="checkbox"]:checked {
|
|
496
|
+
background: hsl(var(--primary));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.settings__checkbox-frame > input[type="checkbox"]:checked::after {
|
|
500
|
+
content: '';
|
|
501
|
+
position: absolute;
|
|
502
|
+
top: 1px;
|
|
503
|
+
left: 5px;
|
|
504
|
+
width: 4px;
|
|
505
|
+
height: 8px;
|
|
506
|
+
border: solid hsl(var(--primary-foreground));
|
|
507
|
+
border-width: 0 2px 2px 0;
|
|
508
|
+
transform: rotate(45deg);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.settings__checkbox-label {
|
|
512
|
+
flex: 1;
|
|
513
|
+
color: hsl(var(--foreground));
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.settings__radio-frame {
|
|
517
|
+
display: flex;
|
|
518
|
+
align-items: center;
|
|
519
|
+
gap: 8px;
|
|
520
|
+
font-size: 14px;
|
|
521
|
+
cursor: pointer;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.settings__radio-frame > input[type="radio"] {
|
|
525
|
+
appearance: none;
|
|
526
|
+
width: 16px;
|
|
527
|
+
height: 16px;
|
|
528
|
+
background: hsl(var(--background));
|
|
529
|
+
border: 1px solid hsl(var(--primary));
|
|
530
|
+
border-radius: 50%;
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
position: relative;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.settings__radio-frame > input[type="radio"]:checked {
|
|
536
|
+
background: hsl(var(--primary));
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.settings__radio-frame > input[type="radio"]:checked::after {
|
|
540
|
+
content: '';
|
|
541
|
+
position: absolute;
|
|
542
|
+
top: 4px;
|
|
543
|
+
left: 4px;
|
|
544
|
+
width: 6px;
|
|
545
|
+
height: 6px;
|
|
546
|
+
background: hsl(var(--primary-foreground));
|
|
547
|
+
border-radius: 50%;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.settings__radio-label {
|
|
551
|
+
flex: 1;
|
|
552
|
+
color: hsl(var(--foreground));
|
|
553
|
+
}
|
|
554
|
+
`;
|
|
555
|
+
let W = !1;
|
|
556
|
+
function ue() {
|
|
557
|
+
if (W || typeof document > "u")
|
|
558
|
+
return;
|
|
559
|
+
const n = document.createElement("style");
|
|
560
|
+
n.setAttribute("data-telemetryos-sdk", ""), n.textContent = ce, document.head.appendChild(n), W = !0;
|
|
561
|
+
}
|
|
562
|
+
ue();
|
|
563
|
+
function pe({ children: n }) {
|
|
564
|
+
return w(() => {
|
|
565
|
+
const i = window.matchMedia("(prefers-color-scheme: dark)"), u = (c) => {
|
|
566
|
+
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);
|
|
572
|
+
};
|
|
573
|
+
return i.addEventListener("change", s), () => {
|
|
574
|
+
l.then(() => C().unsubscribeColorScheme(u)).catch(console.error), i.removeEventListener("change", s);
|
|
575
|
+
};
|
|
576
|
+
}, []), d.jsx("div", { className: "settings__container", children: n });
|
|
577
|
+
}
|
|
578
|
+
function me({ children: n }) {
|
|
579
|
+
return d.jsx("div", { className: "settings__field", children: n });
|
|
580
|
+
}
|
|
581
|
+
function ge({ children: n }) {
|
|
582
|
+
return d.jsx("div", { className: "settings__label", children: n });
|
|
583
|
+
}
|
|
584
|
+
function be({ children: n }) {
|
|
585
|
+
return d.jsx("div", { className: "settings__input-frame", children: n });
|
|
586
|
+
}
|
|
587
|
+
function he({ children: n }) {
|
|
588
|
+
return d.jsx("div", { className: "settings__select-frame", children: n });
|
|
589
|
+
}
|
|
590
|
+
function _e({ children: n }) {
|
|
591
|
+
return d.jsx("div", { className: "settings__textarea-frame", children: n });
|
|
592
|
+
}
|
|
593
|
+
function xe({ children: n }) {
|
|
594
|
+
return d.jsx("label", { className: "settings__switch-frame", children: n });
|
|
595
|
+
}
|
|
596
|
+
function ve({ children: n }) {
|
|
597
|
+
return d.jsx("span", { className: "settings__switch-label", children: n });
|
|
598
|
+
}
|
|
599
|
+
function ke({ children: n }) {
|
|
600
|
+
return d.jsx("label", { className: "settings__checkbox-frame", children: n });
|
|
601
|
+
}
|
|
602
|
+
function Ee({ children: n }) {
|
|
603
|
+
return d.jsx("span", { className: "settings__checkbox-label", children: n });
|
|
604
|
+
}
|
|
605
|
+
function ye({ children: n }) {
|
|
606
|
+
return d.jsx("label", { className: "settings__radio-frame", children: n });
|
|
607
|
+
}
|
|
608
|
+
function Re({ children: n }) {
|
|
609
|
+
return d.jsx("span", { className: "settings__radio-label", children: n });
|
|
610
|
+
}
|
|
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(() => {
|
|
615
|
+
const m = (b) => {
|
|
616
|
+
S(b), f(!1);
|
|
617
|
+
};
|
|
618
|
+
return n.subscribe(i, m).catch(console.error), () => {
|
|
619
|
+
n.unsubscribe(i, m).catch(console.error);
|
|
620
|
+
};
|
|
621
|
+
}, [n, i]), w(() => {
|
|
622
|
+
if (typeof p < "u") {
|
|
623
|
+
const m = setTimeout(() => {
|
|
624
|
+
n.set(i, p);
|
|
625
|
+
}, l);
|
|
626
|
+
return () => clearTimeout(m);
|
|
627
|
+
}
|
|
628
|
+
}, [p, n, i, l]), w(() => {
|
|
629
|
+
if (JSON.stringify(p) === JSON.stringify(_)) {
|
|
630
|
+
const m = setTimeout(() => {
|
|
631
|
+
x(void 0);
|
|
632
|
+
}, 500);
|
|
633
|
+
return () => clearTimeout(m);
|
|
634
|
+
}
|
|
635
|
+
}, [p, _]), [c, (s = p ?? _) !== null && s !== void 0 ? s : g, x];
|
|
636
|
+
}
|
|
637
|
+
function we(n, i) {
|
|
638
|
+
return (u, l = 0) => le(u, n, i, l);
|
|
639
|
+
}
|
|
640
|
+
export {
|
|
641
|
+
ke as SettingsCheckboxFrame,
|
|
642
|
+
Ee as SettingsCheckboxLabel,
|
|
643
|
+
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
|
|
655
|
+
};
|