@telemetryos/sdk 1.7.1 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react/Settings.d.ts +17 -4
- package/dist/react/index.d.ts +3 -2
- package/dist/react.cjs +150 -38
- package/dist/react.js +323 -172
- package/package.json +2 -2
- package/dist/react/hooks.d.ts +0 -6
package/dist/react.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),C=require("./index.cjs");var E={exports:{}},k={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var $;function oe(){if($)return k;$=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function l(c,i,d){var p=null;if(d!==void 0&&(p=""+d),i.key!==void 0&&(p=""+i.key),"key"in i){d={};for(var b in i)b!=="key"&&(d[b]=i[b])}else d=i;return i=d.ref,{$$typeof:n,type:c,key:p,ref:i!==void 0?i:null,props:d}}return k.Fragment=t,k.jsx=l,k.jsxs=l,k}var S={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var D;function ae(){return D||(D=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case B:return"Profiler";case J:return"StrictMode";case Q:return"Suspense";case Z:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case q:return"Portal";case X:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case H:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case T:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function t(e){return""+e}function l(e){try{t(e);var r=!1}catch{r=!0}if(r){r=console;var o=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),t(e)}}function c(e){if(e===R)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var r=n(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function i(){var e=j.A;return e===null?null:e.getOwner()}function d(){return Error("react-stack-top-frame")}function p(e){if(F.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function b(e,r){function o(){L||(L=!0,console.error("%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)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function x(){var e=n(this.type);return z[e]||(z[e]=!0,console.error("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.")),e=this.props.ref,e!==void 0?e:null}function w(e,r,o,a,y,N){var s=o.ref;return e={$$typeof:P,type:e,key:r,props:o,_owner:a},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:x}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function g(e,r,o,a,y,N){var s=r.children;if(s!==void 0)if(a)if(re(s)){for(a=0;a<s.length;a++)v(s[a]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(s);if(F.call(r,"key")){s=n(e);var _=Object.keys(r).filter(function(te){return te!=="key"});a=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",U[s+a]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,a,s,_,s),U[s+a]=!0)}if(s=null,o!==void 0&&(l(o),s=""+o),p(r)&&(l(r.key),s=""+r.key),"key"in r){o={};for(var O in r)O!=="key"&&(o[O]=r[O])}else o=r;return s&&b(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),w(e,s,o,i(),y,N)}function v(e){m(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e=="object"&&e!==null&&e.$$typeof===P}var h=f,P=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),X=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"),T=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ne=Symbol.for("react.client.reference"),j=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,re=Array.isArray,A=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var L,z={},I=h.react_stack_bottom_frame.bind(h,d)(),Y=A(c(d)),U={};S.Fragment=R,S.jsx=function(e,r,o){var a=1e4>j.recentlyCreatedOwnerStacks++;return g(e,r,o,!1,a?Error("react-stack-top-frame"):I,a?A(c(e)):Y)},S.jsxs=function(e,r,o){var a=1e4>j.recentlyCreatedOwnerStacks++;return g(e,r,o,!0,a?Error("react-stack-top-frame"):I,a?A(c(e)):Y)}})()),S}var M;function se(){return M||(M=1,process.env.NODE_ENV==="production"?E.exports=oe():E.exports=ae()),E.exports}var u=se();const ie=`:root {
|
|
23
23
|
--background: 0 0% 100%;
|
|
24
24
|
--foreground: 222.2 84% 4.9%;
|
|
25
25
|
|
|
@@ -79,14 +79,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
79
79
|
--radius: 0.5rem;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/* =============================================================================
|
|
83
|
+
Container & Layout
|
|
84
|
+
============================================================================= */
|
|
85
|
+
|
|
82
86
|
.settings__container {
|
|
83
87
|
padding: 16px;
|
|
84
88
|
background: hsl(var(--background));
|
|
85
89
|
color: hsl(var(--foreground));
|
|
86
90
|
font-family: 'Rubik', sans-serif;
|
|
87
91
|
font-feature-settings: "rlig" 1, "calt" 1;
|
|
92
|
+
flex-grow: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.settings__box {
|
|
96
|
+
border: 1px solid hsl(var(--border));
|
|
97
|
+
border-radius: var(--radius);
|
|
98
|
+
padding: 16px;
|
|
99
|
+
margin-bottom: 16px;
|
|
88
100
|
}
|
|
89
101
|
|
|
102
|
+
.settings__box:last-child {
|
|
103
|
+
margin-bottom: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.settings__divider {
|
|
107
|
+
border: none;
|
|
108
|
+
border-top: 1px solid hsl(var(--border));
|
|
109
|
+
margin: 16px 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* =============================================================================
|
|
113
|
+
Field Structure
|
|
114
|
+
============================================================================= */
|
|
115
|
+
|
|
90
116
|
.settings__field {
|
|
91
117
|
margin-bottom: 24px;
|
|
92
118
|
}
|
|
@@ -98,7 +124,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
98
124
|
color: hsl(var(--foreground));
|
|
99
125
|
}
|
|
100
126
|
|
|
101
|
-
|
|
127
|
+
/* =============================================================================
|
|
128
|
+
Text Inputs
|
|
129
|
+
============================================================================= */
|
|
130
|
+
|
|
131
|
+
.settings__input-frame>* {
|
|
102
132
|
height: 40px;
|
|
103
133
|
width: 100%;
|
|
104
134
|
font-size: 14px;
|
|
@@ -109,17 +139,45 @@ React keys must be passed directly to JSX without using spread:
|
|
|
109
139
|
color: hsl(var(--foreground));
|
|
110
140
|
}
|
|
111
141
|
|
|
112
|
-
.settings__input-frame
|
|
142
|
+
.settings__input-frame>*:focus {
|
|
143
|
+
outline: 1px solid hsl(var(--primary));
|
|
144
|
+
outline-offset: 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.settings__input-frame>*::placeholder {
|
|
148
|
+
color: hsl(var(--muted-foreground));
|
|
149
|
+
opacity: 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.settings__textarea-frame>textarea {
|
|
153
|
+
width: 100%;
|
|
154
|
+
min-height: 80px;
|
|
155
|
+
font-family: inherit;
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
line-height: 1.4em;
|
|
158
|
+
padding: 8px 12px;
|
|
159
|
+
border: 1px solid hsl(var(--border));
|
|
160
|
+
border-radius: var(--radius);
|
|
161
|
+
background: hsl(var(--background));
|
|
162
|
+
color: hsl(var(--foreground));
|
|
163
|
+
resize: vertical;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.settings__textarea-frame>textarea:focus {
|
|
113
167
|
outline: 1px solid hsl(var(--primary));
|
|
114
168
|
outline-offset: 0;
|
|
115
169
|
}
|
|
116
170
|
|
|
117
|
-
.
|
|
171
|
+
.settings__textarea-frame>textarea::placeholder {
|
|
118
172
|
color: hsl(var(--muted-foreground));
|
|
119
173
|
opacity: 1;
|
|
120
174
|
}
|
|
121
175
|
|
|
122
|
-
|
|
176
|
+
/* =============================================================================
|
|
177
|
+
Selection Inputs
|
|
178
|
+
============================================================================= */
|
|
179
|
+
|
|
180
|
+
.settings__select-frame>select {
|
|
123
181
|
appearance: none;
|
|
124
182
|
height: 40px;
|
|
125
183
|
width: 100%;
|
|
@@ -135,39 +193,67 @@ React keys must be passed directly to JSX without using spread:
|
|
|
135
193
|
cursor: pointer;
|
|
136
194
|
}
|
|
137
195
|
|
|
138
|
-
.settings__select-frame
|
|
196
|
+
.settings__select-frame>select:hover {
|
|
139
197
|
background-color: hsl(var(--accent));
|
|
140
198
|
}
|
|
141
199
|
|
|
142
|
-
.settings__select-frame
|
|
200
|
+
.settings__select-frame>select:focus {
|
|
143
201
|
outline: 1px solid hsl(var(--primary));
|
|
144
202
|
outline-offset: 0;
|
|
145
203
|
}
|
|
146
204
|
|
|
147
|
-
.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
205
|
+
.settings__slider-frame {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
gap: 8px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.settings__slider-frame>input[type="range"] {
|
|
212
|
+
flex: 1;
|
|
213
|
+
height: 8px;
|
|
214
|
+
background: hsl(var(--secondary));
|
|
215
|
+
border-radius: 9999px;
|
|
216
|
+
outline: none;
|
|
217
|
+
-webkit-appearance: none;
|
|
218
|
+
appearance: none;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.settings__slider-frame>input[type="range"]:focus,
|
|
222
|
+
.settings__slider-frame>input[type="range"]:active {
|
|
223
|
+
background: hsl(var(--primary));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.settings__slider-frame>input[type="range"]::-webkit-slider-thumb {
|
|
227
|
+
-webkit-appearance: none;
|
|
228
|
+
appearance: none;
|
|
229
|
+
width: 20px;
|
|
230
|
+
height: 20px;
|
|
156
231
|
background: hsl(var(--background));
|
|
157
|
-
|
|
158
|
-
|
|
232
|
+
border: 2px solid hsl(var(--primary));
|
|
233
|
+
border-radius: 50%;
|
|
234
|
+
cursor: pointer;
|
|
159
235
|
}
|
|
160
236
|
|
|
161
|
-
.
|
|
162
|
-
|
|
163
|
-
|
|
237
|
+
.settings__slider-frame>input[type="range"]::-moz-range-thumb {
|
|
238
|
+
width: 20px;
|
|
239
|
+
height: 20px;
|
|
240
|
+
background: hsl(var(--background));
|
|
241
|
+
border: 2px solid hsl(var(--primary));
|
|
242
|
+
border-radius: 50%;
|
|
243
|
+
cursor: pointer;
|
|
164
244
|
}
|
|
165
245
|
|
|
166
|
-
.
|
|
246
|
+
.settings__slider-frame>span {
|
|
247
|
+
min-width: 4ch;
|
|
248
|
+
text-align: right;
|
|
249
|
+
font-size: 14px;
|
|
167
250
|
color: hsl(var(--muted-foreground));
|
|
168
|
-
opacity: 1;
|
|
169
251
|
}
|
|
170
252
|
|
|
253
|
+
/* =============================================================================
|
|
254
|
+
Toggle Inputs
|
|
255
|
+
============================================================================= */
|
|
256
|
+
|
|
171
257
|
.settings__switch-frame {
|
|
172
258
|
display: flex;
|
|
173
259
|
align-items: center;
|
|
@@ -176,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
176
262
|
cursor: pointer;
|
|
177
263
|
}
|
|
178
264
|
|
|
179
|
-
.settings__switch-frame
|
|
265
|
+
.settings__switch-frame>input[type="checkbox"] {
|
|
180
266
|
appearance: none;
|
|
181
267
|
width: 44px;
|
|
182
268
|
height: 24px;
|
|
@@ -188,7 +274,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
188
274
|
flex-shrink: 0;
|
|
189
275
|
}
|
|
190
276
|
|
|
191
|
-
.settings__switch-frame
|
|
277
|
+
.settings__switch-frame>input[type="checkbox"]::after {
|
|
192
278
|
content: '';
|
|
193
279
|
position: absolute;
|
|
194
280
|
top: 2px;
|
|
@@ -197,15 +283,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
197
283
|
height: 20px;
|
|
198
284
|
background: hsl(var(--background));
|
|
199
285
|
border-radius: 50%;
|
|
200
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
286
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
201
287
|
transition: transform 0.2s;
|
|
202
288
|
}
|
|
203
289
|
|
|
204
|
-
.settings__switch-frame
|
|
290
|
+
.settings__switch-frame>input[type="checkbox"]:checked {
|
|
205
291
|
background: hsl(var(--primary));
|
|
206
292
|
}
|
|
207
293
|
|
|
208
|
-
.settings__switch-frame
|
|
294
|
+
.settings__switch-frame>input[type="checkbox"]:checked::after {
|
|
209
295
|
transform: translateX(20px);
|
|
210
296
|
}
|
|
211
297
|
|
|
@@ -222,7 +308,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
222
308
|
cursor: pointer;
|
|
223
309
|
}
|
|
224
310
|
|
|
225
|
-
.settings__checkbox-frame
|
|
311
|
+
.settings__checkbox-frame>input[type="checkbox"] {
|
|
226
312
|
appearance: none;
|
|
227
313
|
width: 16px;
|
|
228
314
|
height: 16px;
|
|
@@ -233,11 +319,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
319
|
position: relative;
|
|
234
320
|
}
|
|
235
321
|
|
|
236
|
-
.settings__checkbox-frame
|
|
322
|
+
.settings__checkbox-frame>input[type="checkbox"]:checked {
|
|
237
323
|
background: hsl(var(--primary));
|
|
238
324
|
}
|
|
239
325
|
|
|
240
|
-
.settings__checkbox-frame
|
|
326
|
+
.settings__checkbox-frame>input[type="checkbox"]:checked::after {
|
|
241
327
|
content: '';
|
|
242
328
|
position: absolute;
|
|
243
329
|
top: 1px;
|
|
@@ -262,7 +348,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
262
348
|
cursor: pointer;
|
|
263
349
|
}
|
|
264
350
|
|
|
265
|
-
.settings__radio-frame
|
|
351
|
+
.settings__radio-frame>input[type="radio"] {
|
|
266
352
|
appearance: none;
|
|
267
353
|
width: 16px;
|
|
268
354
|
height: 16px;
|
|
@@ -273,11 +359,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
273
359
|
position: relative;
|
|
274
360
|
}
|
|
275
361
|
|
|
276
|
-
.settings__radio-frame
|
|
362
|
+
.settings__radio-frame>input[type="radio"]:checked {
|
|
277
363
|
background: hsl(var(--primary));
|
|
278
364
|
}
|
|
279
365
|
|
|
280
|
-
.settings__radio-frame
|
|
366
|
+
.settings__radio-frame>input[type="radio"]:checked::after {
|
|
281
367
|
content: '';
|
|
282
368
|
position: absolute;
|
|
283
369
|
top: 4px;
|
|
@@ -292,4 +378,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
292
378
|
flex: 1;
|
|
293
379
|
color: hsl(var(--foreground));
|
|
294
380
|
}
|
|
295
|
-
|
|
381
|
+
|
|
382
|
+
/* =============================================================================
|
|
383
|
+
Actions
|
|
384
|
+
============================================================================= */
|
|
385
|
+
|
|
386
|
+
.settings__button-frame>button {
|
|
387
|
+
padding: 8px 16px;
|
|
388
|
+
background: hsl(var(--background));
|
|
389
|
+
border: 1px solid hsl(var(--border));
|
|
390
|
+
border-radius: var(--radius);
|
|
391
|
+
color: hsl(var(--foreground));
|
|
392
|
+
font-size: 14px;
|
|
393
|
+
font-family: inherit;
|
|
394
|
+
cursor: pointer;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.settings__button-frame>button:hover {
|
|
398
|
+
background: hsl(var(--accent));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.settings__button-frame>button.active,
|
|
402
|
+
.settings__button-frame>button[data-active="true"] {
|
|
403
|
+
background: hsl(var(--primary));
|
|
404
|
+
border-color: hsl(var(--primary));
|
|
405
|
+
color: hsl(var(--primary-foreground));
|
|
406
|
+
}
|
|
407
|
+
`;let W=!1;function ce(){if(W||typeof document>"u")return;const n=document.createElement("style");n.setAttribute("data-telemetryos-sdk",""),n.textContent=ie,document.head.appendChild(n),W=!0}ce();function ue({children:n}){return f.useEffect(()=>{const t=window.matchMedia("(prefers-color-scheme: dark)"),l=d=>{let p;d==="system"?p=t.matches:p=d!=="light",p?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},c=C.environment().subscribeColorScheme(l);c.catch(console.error);const i=()=>{C.environment().getColorScheme().then(l).catch(console.error)};return t.addEventListener("change",i),()=>{c.then(()=>C.environment().unsubscribeColorScheme(l)).catch(console.error),t.removeEventListener("change",i)}},[]),u.jsx("div",{className:"settings__container",children:n})}function le({children:n}){return u.jsx("div",{className:"settings__box",children:n})}function de(){return u.jsx("hr",{className:"settings__divider"})}function fe({children:n}){return u.jsx("div",{className:"settings__field",children:n})}function pe({children:n}){return u.jsx("div",{className:"settings__label",children:n})}function ge({children:n}){return u.jsx("div",{className:"settings__input-frame",children:n})}function me({children:n}){return u.jsx("div",{className:"settings__textarea-frame",children:n})}function be({children:n}){return u.jsx("div",{className:"settings__select-frame",children:n})}function he({children:n}){return u.jsx("div",{className:"settings__slider-frame",children:n})}function _e({children:n}){return u.jsx("label",{className:"settings__switch-frame",children:n})}function xe({children:n}){return u.jsx("span",{className:"settings__switch-label",children:n})}function ve({children:n}){return u.jsx("label",{className:"settings__checkbox-frame",children:n})}function ke({children:n}){return u.jsx("span",{className:"settings__checkbox-label",children:n})}function Se({children:n}){return u.jsx("label",{className:"settings__radio-frame",children:n})}function ye({children:n}){return u.jsx("span",{className:"settings__radio-label",children:n})}function Ee({children:n}){return u.jsx("div",{className:"settings__button-frame",children:n})}function V(n,t,l,c=0){var i;const[d,p]=f.useState(!0),[b]=f.useState(l),[x,w]=f.useState(void 0),[g,v]=f.useState(void 0);return f.useEffect(()=>{const m=h=>{w(h),p(!1)};return n.subscribe(t,m).catch(console.error),()=>{n.unsubscribe(t,m).catch(console.error)}},[n,t]),f.useEffect(()=>{if(typeof g<"u"){const m=setTimeout(()=>{n.set(t,g)},c);return()=>clearTimeout(m)}},[g,n,t,c]),f.useEffect(()=>{if(JSON.stringify(g)===JSON.stringify(x)){const m=setTimeout(()=>{v(void 0)},500);return()=>clearTimeout(m)}},[g,x]),[d,(i=g??x)!==null&&i!==void 0?i:b,v]}function we(n,t){return(l,c=0)=>V(l,n,t,c)}function Re(n){const t=()=>{document.documentElement.style.fontSize=`calc(1vmax * ${n})`};f.useEffect(t,[n])}function Te(){const[n,t]=f.useState(()=>window.innerWidth/window.innerHeight),l=()=>{const c=()=>{t(window.innerWidth/window.innerHeight)};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)};return f.useEffect(l,[]),n}function je(n,t){return{uiWidthFactor:Math.min(t,1)/n,uiHeightFactor:Math.max(t,1)/n}}exports.SettingsBox=le;exports.SettingsButtonFrame=Ee;exports.SettingsCheckboxFrame=ve;exports.SettingsCheckboxLabel=ke;exports.SettingsContainer=ue;exports.SettingsDivider=de;exports.SettingsField=fe;exports.SettingsInputFrame=ge;exports.SettingsLabel=pe;exports.SettingsRadioFrame=Se;exports.SettingsRadioLabel=ye;exports.SettingsSelectFrame=be;exports.SettingsSliderFrame=he;exports.SettingsSwitchFrame=_e;exports.SettingsSwitchLabel=xe;exports.SettingsTextAreaFrame=me;exports.createUseStoreState=we;exports.useStoreState=V;exports.useUiAspectRatio=Te;exports.useUiResponsiveFactors=je;exports.useUiScaleToSetRem=Re;
|