@telemetryos/sdk 1.10.0 → 1.12.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 +22 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +244 -231
- package/dist/react/SettingsMediaSelect.d.ts +17 -0
- package/dist/react/hooks/store.d.ts +2 -0
- package/dist/react/index.d.ts +2 -1
- package/dist/react.cjs +97 -5
- package/dist/react.js +396 -265
- package/package.json +2 -2
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { environment as $, store as
|
|
3
|
-
var
|
|
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";
|
|
3
|
+
var P = { exports: {} }, E = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var A = { exports: {} }, y = {};
|
|
|
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 n = Symbol.for("react.transitional.element"),
|
|
18
|
-
function s(
|
|
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) {
|
|
19
19
|
var p = null;
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var f in
|
|
23
|
-
f !== "key" && (
|
|
24
|
-
} else
|
|
25
|
-
return
|
|
20
|
+
if (l !== void 0 && (p = "" + l), a.key !== void 0 && (p = "" + a.key), "key" in a) {
|
|
21
|
+
l = {};
|
|
22
|
+
for (var f in a)
|
|
23
|
+
f !== "key" && (l[f] = a[f]);
|
|
24
|
+
} else l = a;
|
|
25
|
+
return a = l.ref, {
|
|
26
26
|
$$typeof: n,
|
|
27
|
-
type:
|
|
27
|
+
type: i,
|
|
28
28
|
key: p,
|
|
29
|
-
ref:
|
|
30
|
-
props:
|
|
29
|
+
ref: a !== void 0 ? a : null,
|
|
30
|
+
props: l
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return E.Fragment = o, E.jsx = s, E.jsxs = s, E;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var R = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,126 +42,126 @@ var E = {};
|
|
|
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
|
|
45
|
+
var G;
|
|
46
|
+
function pe() {
|
|
47
|
+
return G || (G = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
48
|
function n(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
|
-
return e.$$typeof ===
|
|
51
|
+
return e.$$typeof === se ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case
|
|
54
|
+
case N:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case A:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case h:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case ee:
|
|
61
|
-
return "Suspense";
|
|
62
60
|
case ne:
|
|
61
|
+
return "Suspense";
|
|
62
|
+
case re:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case oe:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case M:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
73
|
+
case K:
|
|
74
74
|
return e.displayName || "Context";
|
|
75
|
-
case
|
|
75
|
+
case C:
|
|
76
76
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return e = e.displayName, e || (e =
|
|
80
|
-
case
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
|
|
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;
|
|
84
84
|
try {
|
|
85
|
-
return n(e(
|
|
85
|
+
return n(e(t));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function o(e) {
|
|
92
92
|
return "" + e;
|
|
93
93
|
}
|
|
94
94
|
function s(e) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
var
|
|
96
|
+
o(e);
|
|
97
|
+
var t = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
t = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
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,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
108
|
-
),
|
|
107
|
+
u
|
|
108
|
+
), o(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (e ===
|
|
113
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
111
|
+
function i(e) {
|
|
112
|
+
if (e === N) return "<>";
|
|
113
|
+
if (typeof e == "object" && e !== null && e.$$typeof === L)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var t = n(e);
|
|
117
|
+
return t ? "<" + t + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
var e =
|
|
122
|
+
function a() {
|
|
123
|
+
var e = I.A;
|
|
124
124
|
return e === null ? null : e.getOwner();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function l() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
129
|
function p(e) {
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
130
|
+
if (D.call(e, "key")) {
|
|
131
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
|
+
if (t && t.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return e.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function f(e,
|
|
137
|
-
function
|
|
136
|
+
function f(e, t) {
|
|
137
|
+
function c() {
|
|
138
138
|
W || (W = !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
|
+
t
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
c.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
144
|
+
get: c,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function w() {
|
|
149
149
|
var e = n(this.type);
|
|
150
150
|
return V[e] || (V[e] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
var
|
|
154
|
+
function g(e, t, c, u, O, U) {
|
|
155
|
+
var d = c.ref;
|
|
156
156
|
return e = {
|
|
157
157
|
$$typeof: F,
|
|
158
158
|
type: e,
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
159
|
+
key: t,
|
|
160
|
+
props: c,
|
|
161
|
+
_owner: u
|
|
162
|
+
}, (d !== void 0 ? d : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: w
|
|
165
165
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -176,109 +176,109 @@ function de() {
|
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
|
-
value:
|
|
179
|
+
value: O
|
|
180
180
|
}), Object.defineProperty(e, "_debugTask", {
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
184
|
+
value: U
|
|
185
185
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
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);
|
|
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
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
199
|
+
else m(d);
|
|
200
|
+
if (D.call(t, "key")) {
|
|
201
|
+
d = n(e);
|
|
202
|
+
var x = Object.keys(t).filter(function(ae) {
|
|
203
203
|
return ae !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
u = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}", B[d + u] || (x = 0 < x.length ? "{" + x.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
|
-
l,
|
|
213
212
|
u,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
d,
|
|
214
|
+
x,
|
|
215
|
+
d
|
|
216
|
+
), B[d + u] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
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
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
226
|
-
),
|
|
226
|
+
), g(
|
|
227
227
|
e,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
d,
|
|
229
|
+
c,
|
|
230
|
+
a(),
|
|
231
|
+
O,
|
|
232
|
+
U
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
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));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function _(e) {
|
|
239
239
|
return typeof e == "object" && e !== null && e.$$typeof === F;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
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() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
b = {
|
|
245
245
|
react_stack_bottom_frame: function(e) {
|
|
246
246
|
return e();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var W, V = {}, J =
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
)(), q =
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
249
|
+
var W, V = {}, J = b.react_stack_bottom_frame.bind(
|
|
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++;
|
|
255
|
+
return S(
|
|
256
256
|
e,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
t,
|
|
258
|
+
c,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
u ? Error("react-stack-top-frame") : J,
|
|
261
|
+
u ? z(i(e)) : q
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
263
|
+
}, R.jsxs = function(e, t, c) {
|
|
264
|
+
var u = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return S(
|
|
266
266
|
e,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
t,
|
|
268
|
+
c,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
u ? Error("react-stack-top-frame") : J,
|
|
271
|
+
u ? z(i(e)) : q
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
})()),
|
|
274
|
+
})()), R;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
return
|
|
276
|
+
var X;
|
|
277
|
+
function ge() {
|
|
278
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? P.exports = fe() : P.exports = pe()), P.exports;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
const
|
|
280
|
+
var r = ge();
|
|
281
|
+
const me = `:root {
|
|
282
282
|
--background: 0 0% 100%;
|
|
283
283
|
--foreground: 222.2 84% 4.9%;
|
|
284
284
|
|
|
@@ -732,195 +732,326 @@ const pe = `:root {
|
|
|
732
732
|
border-color: hsl(var(--primary));
|
|
733
733
|
color: hsl(var(--primary-foreground));
|
|
734
734
|
}
|
|
735
|
+
|
|
736
|
+
/* =============================================================================
|
|
737
|
+
Media Select
|
|
738
|
+
============================================================================= */
|
|
739
|
+
|
|
740
|
+
.settings__media-select {
|
|
741
|
+
position: relative;
|
|
742
|
+
display: inline-block;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.settings__media-select-trigger {
|
|
746
|
+
display: flex;
|
|
747
|
+
align-items: center;
|
|
748
|
+
justify-content: center;
|
|
749
|
+
width: 120px;
|
|
750
|
+
height: 120px;
|
|
751
|
+
padding: 0;
|
|
752
|
+
border: 1px solid hsl(var(--border));
|
|
753
|
+
border-radius: var(--radius);
|
|
754
|
+
background: hsl(var(--background));
|
|
755
|
+
color: hsl(var(--foreground));
|
|
756
|
+
cursor: pointer;
|
|
757
|
+
overflow: hidden;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.settings__media-select-trigger:hover {
|
|
761
|
+
border-color: hsl(var(--primary));
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.settings__media-select-trigger:focus {
|
|
765
|
+
outline: 2px solid hsl(var(--primary));
|
|
766
|
+
outline-offset: 2px;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.settings__media-select-trigger:disabled {
|
|
770
|
+
opacity: 0.5;
|
|
771
|
+
cursor: not-allowed;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.settings__media-select-trigger:disabled:hover {
|
|
775
|
+
border-color: hsl(var(--border));
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.settings__media-select-thumbnail {
|
|
779
|
+
width: 100%;
|
|
780
|
+
height: 100%;
|
|
781
|
+
object-fit: cover;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.settings__media-select-thumbnail--empty {
|
|
785
|
+
width: 100%;
|
|
786
|
+
height: 100%;
|
|
787
|
+
display: flex;
|
|
788
|
+
align-items: center;
|
|
789
|
+
justify-content: center;
|
|
790
|
+
background: hsl(var(--muted));
|
|
791
|
+
color: hsl(var(--muted-foreground));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.settings__media-select-thumbnail--empty svg {
|
|
795
|
+
width: 32px;
|
|
796
|
+
height: 32px;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.settings__media-select-clear {
|
|
800
|
+
position: absolute;
|
|
801
|
+
top: -8px;
|
|
802
|
+
right: -8px;
|
|
803
|
+
width: 24px;
|
|
804
|
+
height: 24px;
|
|
805
|
+
padding: 0;
|
|
806
|
+
background: hsl(var(--destructive));
|
|
807
|
+
border: 2px solid hsl(var(--background));
|
|
808
|
+
border-radius: 50%;
|
|
809
|
+
cursor: pointer;
|
|
810
|
+
color: hsl(var(--destructive-foreground));
|
|
811
|
+
display: flex;
|
|
812
|
+
align-items: center;
|
|
813
|
+
justify-content: center;
|
|
814
|
+
transition: transform 0.15s ease;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.settings__media-select-clear:hover {
|
|
818
|
+
transform: scale(1.1);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.settings__media-select-clear svg {
|
|
822
|
+
width: 12px;
|
|
823
|
+
height: 12px;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/* Note: Modal styles are defined in Studio-UI where the picker modal is rendered */
|
|
735
827
|
`;
|
|
736
828
|
let Q = !1;
|
|
737
|
-
function
|
|
829
|
+
function Z() {
|
|
738
830
|
if (Q || typeof document > "u")
|
|
739
831
|
return;
|
|
740
832
|
const n = document.createElement("style");
|
|
741
|
-
n.setAttribute("data-telemetryos-sdk", ""), n.textContent =
|
|
833
|
+
n.setAttribute("data-telemetryos-sdk", ""), n.textContent = me, document.head.appendChild(n), Q = !0;
|
|
742
834
|
}
|
|
743
|
-
|
|
744
|
-
function
|
|
745
|
-
return
|
|
746
|
-
const s = window.matchMedia("(prefers-color-scheme: dark)"),
|
|
835
|
+
Z();
|
|
836
|
+
function ye({ children: n }) {
|
|
837
|
+
return y(() => {
|
|
838
|
+
const s = window.matchMedia("(prefers-color-scheme: dark)"), i = (p) => {
|
|
747
839
|
let f;
|
|
748
840
|
p === "system" ? f = s.matches : f = p !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
749
|
-
},
|
|
750
|
-
|
|
751
|
-
const
|
|
752
|
-
$().getColorScheme().then(
|
|
841
|
+
}, a = $().subscribeColorScheme(i);
|
|
842
|
+
a.catch(console.error);
|
|
843
|
+
const l = () => {
|
|
844
|
+
$().getColorScheme().then(i).catch(console.error);
|
|
753
845
|
};
|
|
754
|
-
return s.addEventListener("change",
|
|
755
|
-
|
|
846
|
+
return s.addEventListener("change", l), () => {
|
|
847
|
+
a.then(() => $().unsubscribeColorScheme(i)).catch(console.error), s.removeEventListener("change", l);
|
|
756
848
|
};
|
|
757
|
-
}, []),
|
|
758
|
-
}
|
|
759
|
-
function be({ children: n }) {
|
|
760
|
-
return i.jsx("div", { className: "settings__box", children: n });
|
|
761
|
-
}
|
|
762
|
-
function xe({ children: n }) {
|
|
763
|
-
return i.jsx("div", { className: "settings__heading", children: n });
|
|
764
|
-
}
|
|
765
|
-
function ve() {
|
|
766
|
-
return i.jsx("hr", { className: "settings__divider" });
|
|
849
|
+
}, []), r.jsx("div", { className: "settings__container", children: n });
|
|
767
850
|
}
|
|
768
851
|
function ke({ children: n }) {
|
|
769
|
-
return
|
|
770
|
-
}
|
|
771
|
-
function ye({ children: n }) {
|
|
772
|
-
return i.jsx("div", { className: "settings__label", children: n });
|
|
773
|
-
}
|
|
774
|
-
function Ee({ children: n }) {
|
|
775
|
-
return i.jsx("div", { className: "settings__hint", children: n });
|
|
852
|
+
return r.jsx("div", { className: "settings__box", children: n });
|
|
776
853
|
}
|
|
777
854
|
function we({ children: n }) {
|
|
778
|
-
return
|
|
855
|
+
return r.jsx("div", { className: "settings__heading", children: n });
|
|
779
856
|
}
|
|
780
|
-
function Se(
|
|
781
|
-
return
|
|
857
|
+
function Se() {
|
|
858
|
+
return r.jsx("hr", { className: "settings__divider" });
|
|
782
859
|
}
|
|
783
|
-
function
|
|
784
|
-
return
|
|
860
|
+
function Ee({ children: n }) {
|
|
861
|
+
return r.jsx("label", { className: "settings__field", children: n });
|
|
785
862
|
}
|
|
786
|
-
function
|
|
787
|
-
return
|
|
863
|
+
function Re({ children: n }) {
|
|
864
|
+
return r.jsx("div", { className: "settings__label", children: n });
|
|
788
865
|
}
|
|
789
866
|
function je({ children: n }) {
|
|
790
|
-
return
|
|
867
|
+
return r.jsx("div", { className: "settings__hint", children: n });
|
|
868
|
+
}
|
|
869
|
+
function Te({ children: n }) {
|
|
870
|
+
return r.jsx("div", { className: "settings__error", children: n });
|
|
791
871
|
}
|
|
792
872
|
function Ne({ children: n }) {
|
|
793
|
-
return
|
|
873
|
+
return r.jsx("div", { className: "settings__input-frame", children: n });
|
|
794
874
|
}
|
|
795
875
|
function Ae({ children: n }) {
|
|
796
|
-
return
|
|
797
|
-
}
|
|
798
|
-
function Oe({ children: n }) {
|
|
799
|
-
return i.jsx("label", { className: "settings__switch-frame", children: n });
|
|
876
|
+
return r.jsx("div", { className: "settings__textarea-frame", children: n });
|
|
800
877
|
}
|
|
801
878
|
function Ce({ children: n }) {
|
|
802
|
-
return
|
|
879
|
+
return r.jsx("div", { className: "settings__select-frame", children: n });
|
|
880
|
+
}
|
|
881
|
+
function Oe({ children: n }) {
|
|
882
|
+
return r.jsx("div", { className: "settings__slider-frame", children: n });
|
|
803
883
|
}
|
|
804
884
|
function Pe({ children: n }) {
|
|
805
|
-
return
|
|
885
|
+
return r.jsx("div", { className: "settings__slider-ruler", children: n });
|
|
806
886
|
}
|
|
807
887
|
function Fe({ children: n }) {
|
|
808
|
-
return
|
|
809
|
-
}
|
|
810
|
-
function ze({ children: n }) {
|
|
811
|
-
return i.jsx("label", { className: "settings__radio-frame", children: n });
|
|
888
|
+
return r.jsx("div", { className: "settings__color-frame", children: n });
|
|
812
889
|
}
|
|
813
890
|
function Le({ children: n }) {
|
|
814
|
-
return
|
|
891
|
+
return r.jsx("label", { className: "settings__switch-frame", children: n });
|
|
815
892
|
}
|
|
816
893
|
function Ie({ children: n }) {
|
|
817
|
-
return
|
|
894
|
+
return r.jsx("span", { className: "settings__switch-label", children: n });
|
|
895
|
+
}
|
|
896
|
+
function ze({ children: n }) {
|
|
897
|
+
return r.jsx("label", { className: "settings__checkbox-frame", children: n });
|
|
898
|
+
}
|
|
899
|
+
function Ue({ children: n }) {
|
|
900
|
+
return r.jsx("span", { className: "settings__checkbox-label", children: n });
|
|
901
|
+
}
|
|
902
|
+
function Ye({ children: n }) {
|
|
903
|
+
return r.jsx("label", { className: "settings__radio-frame", children: n });
|
|
818
904
|
}
|
|
819
|
-
function
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
905
|
+
function $e({ children: n }) {
|
|
906
|
+
return r.jsx("span", { className: "settings__radio-label", children: n });
|
|
907
|
+
}
|
|
908
|
+
function Me({ children: n }) {
|
|
909
|
+
return r.jsx("div", { className: "settings__button-frame", children: n });
|
|
910
|
+
}
|
|
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)) {
|
|
915
|
+
p(!0);
|
|
916
|
+
try {
|
|
917
|
+
const g = await de().openPicker({
|
|
918
|
+
accept: a,
|
|
919
|
+
currentValue: n ?? void 0
|
|
920
|
+
});
|
|
921
|
+
g && o(g);
|
|
922
|
+
} catch (g) {
|
|
923
|
+
console.error("Failed to open media picker:", g);
|
|
924
|
+
} finally {
|
|
925
|
+
p(!1);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}, w = (g) => {
|
|
929
|
+
g.stopPropagation(), o(null);
|
|
930
|
+
};
|
|
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, {}) })] });
|
|
932
|
+
}
|
|
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" })] });
|
|
935
|
+
}
|
|
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" })] });
|
|
938
|
+
}
|
|
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" }) })] });
|
|
941
|
+
}
|
|
942
|
+
function k(n, o, s, i = 0) {
|
|
943
|
+
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);
|
|
823
946
|
}, []);
|
|
824
|
-
return
|
|
825
|
-
p(!0), f.current = !0,
|
|
826
|
-
const
|
|
827
|
-
|
|
947
|
+
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;
|
|
828
951
|
};
|
|
829
|
-
return n.subscribe(
|
|
830
|
-
n.unsubscribe(
|
|
952
|
+
return n.subscribe(o, h).catch(console.error), () => {
|
|
953
|
+
n.unsubscribe(o, h).catch(console.error);
|
|
831
954
|
};
|
|
832
|
-
}, [n,
|
|
833
|
-
if (!f.current && typeof
|
|
834
|
-
const
|
|
835
|
-
n.set(
|
|
836
|
-
},
|
|
837
|
-
return () => clearTimeout(
|
|
955
|
+
}, [n, o]), y(() => {
|
|
956
|
+
if (!f.current && typeof m < "u") {
|
|
957
|
+
const h = setTimeout(() => {
|
|
958
|
+
n.set(o, m);
|
|
959
|
+
}, i);
|
|
960
|
+
return () => clearTimeout(h);
|
|
838
961
|
}
|
|
839
|
-
}, [
|
|
840
|
-
if (JSON.stringify(
|
|
841
|
-
const
|
|
842
|
-
|
|
962
|
+
}, [m, n, o, i]), y(() => {
|
|
963
|
+
if (JSON.stringify(m) === JSON.stringify(g)) {
|
|
964
|
+
const h = setTimeout(() => {
|
|
965
|
+
_(void 0);
|
|
843
966
|
}, 500);
|
|
844
|
-
return () => clearTimeout(
|
|
967
|
+
return () => clearTimeout(h);
|
|
845
968
|
}
|
|
846
|
-
}, [
|
|
969
|
+
}, [m, g]), [l, (a = m ?? g) !== null && a !== void 0 ? a : w, b];
|
|
847
970
|
}
|
|
848
|
-
function
|
|
849
|
-
return (s,
|
|
971
|
+
function We(n, o) {
|
|
972
|
+
return (s, i = 0) => k(s, n, o, i);
|
|
850
973
|
}
|
|
851
|
-
function
|
|
974
|
+
function Ve(n, o) {
|
|
852
975
|
return (s = 0) => {
|
|
853
|
-
const
|
|
854
|
-
return
|
|
976
|
+
const i = j(() => T().instance, []);
|
|
977
|
+
return k(i, n, o, s);
|
|
855
978
|
};
|
|
856
979
|
}
|
|
857
|
-
function
|
|
980
|
+
function Je(n, o) {
|
|
858
981
|
return (s = 0) => {
|
|
859
|
-
const
|
|
860
|
-
return
|
|
982
|
+
const i = j(() => T().application, []);
|
|
983
|
+
return k(i, n, o, s);
|
|
861
984
|
};
|
|
862
985
|
}
|
|
863
|
-
function
|
|
986
|
+
function qe(n, o) {
|
|
864
987
|
return (s = 0) => {
|
|
865
|
-
const
|
|
866
|
-
return
|
|
988
|
+
const i = j(() => T().device, []);
|
|
989
|
+
return k(i, n, o, s);
|
|
990
|
+
};
|
|
991
|
+
}
|
|
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);
|
|
867
996
|
};
|
|
868
997
|
}
|
|
869
|
-
function
|
|
870
|
-
return (
|
|
871
|
-
const
|
|
872
|
-
return
|
|
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);
|
|
873
1002
|
};
|
|
874
1003
|
}
|
|
875
|
-
function
|
|
876
|
-
|
|
1004
|
+
function Ge(n) {
|
|
1005
|
+
y(() => {
|
|
877
1006
|
document.documentElement.style.fontSize = `calc(1vmax * ${n})`;
|
|
878
1007
|
}, [n]);
|
|
879
1008
|
}
|
|
880
|
-
function
|
|
881
|
-
const [n,
|
|
882
|
-
return
|
|
883
|
-
const
|
|
884
|
-
|
|
1009
|
+
function Xe() {
|
|
1010
|
+
const [n, o] = v(() => window.innerWidth / window.innerHeight);
|
|
1011
|
+
return y(() => {
|
|
1012
|
+
const i = () => {
|
|
1013
|
+
o(window.innerWidth / window.innerHeight);
|
|
885
1014
|
};
|
|
886
|
-
return window.addEventListener("resize",
|
|
1015
|
+
return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
887
1016
|
}, []), n;
|
|
888
1017
|
}
|
|
889
|
-
function
|
|
1018
|
+
function Qe(n, o) {
|
|
890
1019
|
return {
|
|
891
|
-
uiWidthFactor: Math.min(
|
|
892
|
-
uiHeightFactor: Math.max(
|
|
1020
|
+
uiWidthFactor: Math.min(o, 1) / n,
|
|
1021
|
+
uiHeightFactor: Math.max(o, 1) / n
|
|
893
1022
|
};
|
|
894
1023
|
}
|
|
895
1024
|
export {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
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,
|
|
1053
|
+
k as useStoreState,
|
|
1054
|
+
Xe as useUiAspectRatio,
|
|
1055
|
+
Qe as useUiResponsiveFactors,
|
|
1056
|
+
Ge as useUiScaleToSetRem
|
|
926
1057
|
};
|