lynx-console 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +205 -953
- package/dist/index.css +1248 -461
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +79 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +79 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +205 -953
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -4
- package/src/components/BottomSheet.css +91 -0
- package/src/components/BottomSheet.tsx +10 -10
- package/src/components/ConsolePanel.css +402 -0
- package/src/components/ConsolePanel.tsx +62 -28
- package/src/components/FadeList.tsx +31 -0
- package/{dist/assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css → src/components/FloatingButton.css} +22 -16
- package/src/components/FloatingButton.tsx +22 -19
- package/src/components/LogPanel.tsx +61 -79
- package/src/components/NetworkDetailSection.tsx +13 -13
- package/src/components/NetworkPanel.css +280 -0
- package/src/components/NetworkPanel.tsx +32 -52
- package/src/components/PerformancePanel.css +249 -0
- package/src/components/PerformancePanel.tsx +42 -42
- package/src/components/Tabs.css +78 -0
- package/src/components/Tabs.tsx +13 -11
- package/src/globals.d.ts +0 -5
- package/src/hooks/useLongPressDrag.ts +3 -3
- package/src/index.tsx +9 -6
- package/src/styles/global.css +8 -0
- package/src/styles/vars/color.ts +26 -213
- package/src/styles/vars/dimension.ts +5 -74
- package/src/styles/vars/index.css +65 -457
- package/src/styles/vars/index.ts +5 -9
- package/src/styles/vars/radius.ts +1 -11
- package/src/types.ts +8 -0
- package/dist/assets/src/components/BottomSheet.css.ts.vanilla-CulwSDhG.css +0 -83
- package/dist/assets/src/components/ConsolePanel.css.ts.vanilla-DFvHPEyg.css +0 -340
- package/dist/assets/src/components/NetworkPanel.css.ts.vanilla-DFMduT0T.css +0 -247
- package/dist/assets/src/components/PerformancePanel.css.ts.vanilla-D35LuXlW.css +0 -216
- package/dist/assets/src/components/Tabs.css.ts.vanilla-DD7L2oXt.css +0 -50
- package/src/components/BottomSheet.css.ts +0 -93
- package/src/components/ConsolePanel.css.ts +0 -354
- package/src/components/FloatingButton.css.ts +0 -73
- package/src/components/NetworkPanel.css.ts +0 -280
- package/src/components/PerformancePanel.css.ts +0 -224
- package/src/components/Tabs.css.ts +0 -66
- package/src/styles/global.css.ts +0 -10
- package/src/styles/typography.ts +0 -25
package/dist/index.cjs
CHANGED
|
@@ -1,49 +1,14 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __exportAll = (all, no_symbols) => {
|
|
5
|
-
let target = {};
|
|
6
|
-
for (var name in all) {
|
|
7
|
-
__defProp(target, name, {
|
|
8
|
-
get: all[name],
|
|
9
|
-
enumerable: true
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
if (!no_symbols) {
|
|
13
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
14
|
-
}
|
|
15
|
-
return target;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
2
|
let _lynx_js_react = require("@lynx-js/react");
|
|
20
|
-
require("./assets/src/components/BottomSheet.css.ts.vanilla-CulwSDhG.css");
|
|
21
|
-
require("./assets/src/components/ConsolePanel.css.ts.vanilla-DFvHPEyg.css");
|
|
22
3
|
let javascript_stringify = require("javascript-stringify");
|
|
23
|
-
require("./assets/src/components/NetworkPanel.css.ts.vanilla-DFMduT0T.css");
|
|
24
|
-
require("./assets/src/components/PerformancePanel.css.ts.vanilla-D35LuXlW.css");
|
|
25
|
-
require("./assets/src/components/Tabs.css.ts.vanilla-DD7L2oXt.css");
|
|
26
|
-
require("./assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css");
|
|
27
|
-
|
|
28
|
-
//#region src/components/BottomSheet.css.ts
|
|
29
|
-
var backdrop = "BottomSheet_backdrop__5pjw6y1";
|
|
30
|
-
var body = "BottomSheet_body__5pjw6y7";
|
|
31
|
-
var content = "BottomSheet_content__5pjw6y2";
|
|
32
|
-
var footer = "BottomSheet_footer__5pjw6y8";
|
|
33
|
-
var handle = "BottomSheet_handle__5pjw6y4";
|
|
34
|
-
var handleContainer = "BottomSheet_handleContainer__5pjw6y3";
|
|
35
|
-
var header$2 = "BottomSheet_header__5pjw6y5";
|
|
36
|
-
var overlay = "BottomSheet_overlay__5pjw6y0";
|
|
37
|
-
var title$1 = "BottomSheet_title__5pjw6y6";
|
|
38
4
|
|
|
39
|
-
//#endregion
|
|
40
5
|
//#region src/components/BottomSheet.tsx
|
|
41
6
|
const MIN_HEIGHT = 200;
|
|
42
7
|
const MAX_HEIGHT = 700;
|
|
43
8
|
const DEFAULT_HEIGHT = 500;
|
|
44
9
|
const CLOSE_DRAG_THRESHOLD = 30;
|
|
45
10
|
let savedHeight = null;
|
|
46
|
-
function BottomSheet({ children, title, footer
|
|
11
|
+
function BottomSheet({ children, title, footer, onClose, isOpen, shouldClose = false, safeAreaInsetBottom = "25px" }) {
|
|
47
12
|
const [sheetHeight, setSheetHeight] = (0, _lynx_js_react.useState)(savedHeight ?? DEFAULT_HEIGHT);
|
|
48
13
|
const [tempHeight, setTempHeight] = (0, _lynx_js_react.useState)(savedHeight ?? DEFAULT_HEIGHT);
|
|
49
14
|
const [isDragging, setIsDragging] = (0, _lynx_js_react.useState)(false);
|
|
@@ -86,24 +51,24 @@ function BottomSheet({ children, title, footer: footer$1, onClose, isOpen, shoul
|
|
|
86
51
|
setSheetHeight(tempHeight);
|
|
87
52
|
if (dragDistance > CLOSE_DRAG_THRESHOLD) handleClose();
|
|
88
53
|
};
|
|
89
|
-
return <scroll-view className=
|
|
90
|
-
<view className=
|
|
91
|
-
<view className=
|
|
54
|
+
return <scroll-view className="bs-backdrop" style={{ opacity: isOpening || isClosing ? 0 : 1 }}>
|
|
55
|
+
<view className="bs-overlay" bindtap={handleClose}>
|
|
56
|
+
<view className="bs-content" catchtap={() => {}} style={{
|
|
92
57
|
height: `${isDragging ? tempHeight : sheetHeight}px`,
|
|
93
58
|
transform: isOpening || isClosing ? "translateY(100%)" : "translateY(0)",
|
|
94
59
|
transition: isDragging ? "none" : void 0
|
|
95
60
|
}}>
|
|
96
61
|
{}
|
|
97
|
-
<view className=
|
|
98
|
-
<view className=
|
|
62
|
+
<view className="bs-handleContainer" bindtouchstart={handleTouchStart} bindtouchmove={handleTouchMove} bindtouchend={handleTouchEnd}>
|
|
63
|
+
<view className="bs-handle" />
|
|
99
64
|
</view>
|
|
100
|
-
<view className=
|
|
101
|
-
{title && <text className=
|
|
65
|
+
<view className="bs-header">
|
|
66
|
+
{title && <text className="bs-title">{title}</text>}
|
|
102
67
|
</view>
|
|
103
|
-
<view className=
|
|
68
|
+
<view className="bs-body" style={{ paddingBottom: safeAreaInsetBottom }}>
|
|
104
69
|
{children}
|
|
105
70
|
</view>
|
|
106
|
-
{footer
|
|
71
|
+
{footer && <view className="bs-footer">{footer}</view>}
|
|
107
72
|
</view>
|
|
108
73
|
</view>
|
|
109
74
|
</scroll-view>;
|
|
@@ -198,584 +163,13 @@ const usePerformance = () => {
|
|
|
198
163
|
};
|
|
199
164
|
|
|
200
165
|
//#endregion
|
|
201
|
-
//#region
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
209
|
-
}
|
|
210
|
-
return ("string" === r ? String : Number)(t);
|
|
211
|
-
}
|
|
212
|
-
function toPropertyKey(t) {
|
|
213
|
-
var i = toPrimitive(t, "string");
|
|
214
|
-
return "symbol" == typeof i ? i : String(i);
|
|
215
|
-
}
|
|
216
|
-
function _defineProperty(obj, key, value) {
|
|
217
|
-
key = toPropertyKey(key);
|
|
218
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
219
|
-
value,
|
|
220
|
-
enumerable: true,
|
|
221
|
-
configurable: true,
|
|
222
|
-
writable: true
|
|
223
|
-
});
|
|
224
|
-
else obj[key] = value;
|
|
225
|
-
return obj;
|
|
226
|
-
}
|
|
227
|
-
function ownKeys(e, r) {
|
|
228
|
-
var t = Object.keys(e);
|
|
229
|
-
if (Object.getOwnPropertySymbols) {
|
|
230
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
231
|
-
r && (o = o.filter(function(r) {
|
|
232
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
233
|
-
})), t.push.apply(t, o);
|
|
234
|
-
}
|
|
235
|
-
return t;
|
|
236
|
-
}
|
|
237
|
-
function _objectSpread2(e) {
|
|
238
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
239
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
240
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
241
|
-
_defineProperty(e, r, t[r]);
|
|
242
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
243
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
return e;
|
|
247
|
-
}
|
|
248
|
-
function mapValues(input, fn) {
|
|
249
|
-
var result = {};
|
|
250
|
-
for (var _key in input) result[_key] = fn(input[_key], _key);
|
|
251
|
-
return result;
|
|
252
|
-
}
|
|
253
|
-
var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
254
|
-
for (var key of Object.keys(compoundCheck)) {
|
|
255
|
-
var _selections$key;
|
|
256
|
-
if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) return false;
|
|
257
|
-
}
|
|
258
|
-
return true;
|
|
259
|
-
};
|
|
260
|
-
var createRuntimeFn = (config) => {
|
|
261
|
-
var runtimeFn = (options) => {
|
|
262
|
-
var className = config.defaultClassName;
|
|
263
|
-
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
264
|
-
for (var variantName in selections) {
|
|
265
|
-
var _selections$variantNa;
|
|
266
|
-
var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
267
|
-
if (variantSelection != null) {
|
|
268
|
-
var selection = variantSelection;
|
|
269
|
-
if (typeof selection === "boolean") selection = selection === true ? "true" : "false";
|
|
270
|
-
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
271
|
-
if (selectionClassName) className += " " + selectionClassName;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
for (var [compoundCheck, compoundClassName] of config.compoundVariants) if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += " " + compoundClassName;
|
|
275
|
-
return className;
|
|
276
|
-
};
|
|
277
|
-
runtimeFn.variants = () => Object.keys(config.variantClassNames);
|
|
278
|
-
runtimeFn.classNames = {
|
|
279
|
-
get base() {
|
|
280
|
-
return config.defaultClassName.split(" ")[0];
|
|
281
|
-
},
|
|
282
|
-
get variants() {
|
|
283
|
-
return mapValues(config.variantClassNames, (classNames) => mapValues(classNames, (className) => className.split(" ")[0]));
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
return runtimeFn;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region src/components/ConsolePanel.css.ts
|
|
291
|
-
var argNull = "ConsolePanel_argNull__db6kuu17";
|
|
292
|
-
var argObject = "ConsolePanel_argObject__db6kuu1j";
|
|
293
|
-
var argObjectContent = "ConsolePanel_argObjectContent__db6kuu1m";
|
|
294
|
-
var argObjectHeader = "ConsolePanel_argObjectHeader__db6kuu1k";
|
|
295
|
-
var argObjectJson = "ConsolePanel_argObjectJson__db6kuu1p";
|
|
296
|
-
var argObjectPreview = "ConsolePanel_argObjectPreview__db6kuu1l";
|
|
297
|
-
var argPrimitive = createRuntimeFn({
|
|
298
|
-
defaultClassName: "ConsolePanel_argPrimitive__db6kuu1e",
|
|
299
|
-
variantClassNames: { level: {
|
|
300
|
-
log: "ConsolePanel_argPrimitive_level_log__db6kuu1f",
|
|
301
|
-
info: "ConsolePanel_argPrimitive_level_info__db6kuu1g",
|
|
302
|
-
warn: "ConsolePanel_argPrimitive_level_warn__db6kuu1h",
|
|
303
|
-
error: "ConsolePanel_argPrimitive_level_error__db6kuu1i"
|
|
304
|
-
} },
|
|
305
|
-
defaultVariants: {},
|
|
306
|
-
compoundVariants: []
|
|
307
|
-
});
|
|
308
|
-
var argString = createRuntimeFn({
|
|
309
|
-
defaultClassName: "ConsolePanel_argString__db6kuu19",
|
|
310
|
-
variantClassNames: { level: {
|
|
311
|
-
log: "ConsolePanel_argString_level_log__db6kuu1a",
|
|
312
|
-
info: "ConsolePanel_argString_level_info__db6kuu1b",
|
|
313
|
-
warn: "ConsolePanel_argString_level_warn__db6kuu1c",
|
|
314
|
-
error: "ConsolePanel_argString_level_error__db6kuu1d"
|
|
315
|
-
} },
|
|
316
|
-
defaultVariants: {},
|
|
317
|
-
compoundVariants: []
|
|
318
|
-
});
|
|
319
|
-
var argUndefined = "ConsolePanel_argUndefined__db6kuu18";
|
|
320
|
-
var clearButton$2 = "ConsolePanel_clearButton__db6kuuo";
|
|
321
|
-
var clearButtonText$2 = "ConsolePanel_clearButtonText__db6kuup";
|
|
322
|
-
var container$2 = "ConsolePanel_container__db6kuu0";
|
|
323
|
-
var fadeBottom = "ConsolePanel_fadeBottom__db6kuu1q";
|
|
324
|
-
var fadeTop = "ConsolePanel_fadeTop__db6kuu5";
|
|
325
|
-
var filterButton = "ConsolePanel_filterButton__db6kuu7";
|
|
326
|
-
var filterButtonText = "ConsolePanel_filterButtonText__db6kuu8";
|
|
327
|
-
var filterCheckbox = createRuntimeFn({
|
|
328
|
-
defaultClassName: "ConsolePanel_filterCheckbox__db6kuub",
|
|
329
|
-
variantClassNames: { level: {
|
|
330
|
-
log: "ConsolePanel_filterCheckbox_level_log__db6kuuc",
|
|
331
|
-
info: "ConsolePanel_filterCheckbox_level_info__db6kuud",
|
|
332
|
-
warn: "ConsolePanel_filterCheckbox_level_warn__db6kuue",
|
|
333
|
-
error: "ConsolePanel_filterCheckbox_level_error__db6kuuf"
|
|
334
|
-
} },
|
|
335
|
-
defaultVariants: {},
|
|
336
|
-
compoundVariants: []
|
|
337
|
-
});
|
|
338
|
-
var filterDropdown = "ConsolePanel_filterDropdown__db6kuu9";
|
|
339
|
-
var filterLabel = createRuntimeFn({
|
|
340
|
-
defaultClassName: "ConsolePanel_filterLabel__db6kuug",
|
|
341
|
-
variantClassNames: { level: {
|
|
342
|
-
log: "ConsolePanel_filterLabel_level_log__db6kuuh",
|
|
343
|
-
info: "ConsolePanel_filterLabel_level_info__db6kuui",
|
|
344
|
-
warn: "ConsolePanel_filterLabel_level_warn__db6kuuj",
|
|
345
|
-
error: "ConsolePanel_filterLabel_level_error__db6kuuk"
|
|
346
|
-
} },
|
|
347
|
-
defaultVariants: {},
|
|
348
|
-
compoundVariants: []
|
|
349
|
-
});
|
|
350
|
-
var filterOption = "ConsolePanel_filterOption__db6kuua";
|
|
351
|
-
var filterWrapper = "ConsolePanel_filterWrapper__db6kuu6";
|
|
352
|
-
var logArgItem = "ConsolePanel_logArgItem__db6kuu16";
|
|
353
|
-
var logArgsContainer = "ConsolePanel_logArgsContainer__db6kuu15";
|
|
354
|
-
var logContainer = "ConsolePanel_logContainer__db6kuu3";
|
|
355
|
-
var logHeader = "ConsolePanel_logHeader__db6kuu4";
|
|
356
|
-
var logItem = createRuntimeFn({
|
|
357
|
-
defaultClassName: "ConsolePanel_logItem__db6kuur",
|
|
358
|
-
variantClassNames: { level: {
|
|
359
|
-
log: "ConsolePanel_logItem_level_log__db6kuus",
|
|
360
|
-
info: "ConsolePanel_logItem_level_info__db6kuut",
|
|
361
|
-
warn: "ConsolePanel_logItem_level_warn__db6kuuu",
|
|
362
|
-
error: "ConsolePanel_logItem_level_error__db6kuuv"
|
|
363
|
-
} },
|
|
364
|
-
defaultVariants: {},
|
|
365
|
-
compoundVariants: []
|
|
366
|
-
});
|
|
367
|
-
var logItemHeader = "ConsolePanel_logItemHeader__db6kuuw";
|
|
368
|
-
var logLevel = createRuntimeFn({
|
|
369
|
-
defaultClassName: "ConsolePanel_logLevel__db6kuux",
|
|
370
|
-
variantClassNames: { level: {
|
|
371
|
-
log: "ConsolePanel_logLevel_level_log__db6kuuy",
|
|
372
|
-
info: "ConsolePanel_logLevel_level_info__db6kuuz",
|
|
373
|
-
warn: "ConsolePanel_logLevel_level_warn__db6kuu10",
|
|
374
|
-
error: "ConsolePanel_logLevel_level_error__db6kuu11"
|
|
375
|
-
} },
|
|
376
|
-
defaultVariants: {},
|
|
377
|
-
compoundVariants: []
|
|
378
|
-
});
|
|
379
|
-
var logList = "ConsolePanel_logList__db6kuuq";
|
|
380
|
-
var logTime = "ConsolePanel_logTime__db6kuu12";
|
|
381
|
-
var placeholder$2 = "ConsolePanel_placeholder__db6kuu1";
|
|
382
|
-
var placeholderText$2 = "ConsolePanel_placeholderText__db6kuu2";
|
|
383
|
-
var replInput = "ConsolePanel_replInput__db6kuu1t";
|
|
384
|
-
var replInputRow = "ConsolePanel_replInputRow__db6kuu1r";
|
|
385
|
-
var replPrompt = "ConsolePanel_replPrompt__db6kuu1s";
|
|
386
|
-
var replRunButton = "ConsolePanel_replRunButton__db6kuu1u";
|
|
387
|
-
var replRunButtonText = "ConsolePanel_replRunButtonText__db6kuu1v";
|
|
388
|
-
var searchInput = "ConsolePanel_searchInput__db6kuun";
|
|
389
|
-
var searchPrompt = "ConsolePanel_searchPrompt__db6kuum";
|
|
390
|
-
var searchWrapper = "ConsolePanel_searchWrapper__db6kuul";
|
|
391
|
-
var toggleIndicator = "ConsolePanel_toggleIndicator__db6kuu13";
|
|
392
|
-
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region src/styles/vars/color.ts
|
|
395
|
-
var color_exports = /* @__PURE__ */ __exportAll({
|
|
396
|
-
bg: () => bg,
|
|
397
|
-
fg: () => fg,
|
|
398
|
-
mannerTemp: () => mannerTemp,
|
|
399
|
-
palette: () => palette,
|
|
400
|
-
stroke: () => stroke
|
|
401
|
-
});
|
|
402
|
-
const palette = {
|
|
403
|
-
blue100: "var(--seed-color-palette-blue-100)",
|
|
404
|
-
blue200: "var(--seed-color-palette-blue-200)",
|
|
405
|
-
blue300: "var(--seed-color-palette-blue-300)",
|
|
406
|
-
blue400: "var(--seed-color-palette-blue-400)",
|
|
407
|
-
blue500: "var(--seed-color-palette-blue-500)",
|
|
408
|
-
blue600: "var(--seed-color-palette-blue-600)",
|
|
409
|
-
blue700: "var(--seed-color-palette-blue-700)",
|
|
410
|
-
blue800: "var(--seed-color-palette-blue-800)",
|
|
411
|
-
blue900: "var(--seed-color-palette-blue-900)",
|
|
412
|
-
blue1000: "var(--seed-color-palette-blue-1000)",
|
|
413
|
-
carrot100: "var(--seed-color-palette-carrot-100)",
|
|
414
|
-
carrot200: "var(--seed-color-palette-carrot-200)",
|
|
415
|
-
carrot300: "var(--seed-color-palette-carrot-300)",
|
|
416
|
-
carrot400: "var(--seed-color-palette-carrot-400)",
|
|
417
|
-
carrot500: "var(--seed-color-palette-carrot-500)",
|
|
418
|
-
carrot600: "var(--seed-color-palette-carrot-600)",
|
|
419
|
-
carrot700: "var(--seed-color-palette-carrot-700)",
|
|
420
|
-
carrot800: "var(--seed-color-palette-carrot-800)",
|
|
421
|
-
carrot900: "var(--seed-color-palette-carrot-900)",
|
|
422
|
-
carrot1000: "var(--seed-color-palette-carrot-1000)",
|
|
423
|
-
gray00: "var(--seed-color-palette-gray-00)",
|
|
424
|
-
gray100: "var(--seed-color-palette-gray-100)",
|
|
425
|
-
gray200: "var(--seed-color-palette-gray-200)",
|
|
426
|
-
gray300: "var(--seed-color-palette-gray-300)",
|
|
427
|
-
gray400: "var(--seed-color-palette-gray-400)",
|
|
428
|
-
gray500: "var(--seed-color-palette-gray-500)",
|
|
429
|
-
gray600: "var(--seed-color-palette-gray-600)",
|
|
430
|
-
gray700: "var(--seed-color-palette-gray-700)",
|
|
431
|
-
gray800: "var(--seed-color-palette-gray-800)",
|
|
432
|
-
gray900: "var(--seed-color-palette-gray-900)",
|
|
433
|
-
gray1000: "var(--seed-color-palette-gray-1000)",
|
|
434
|
-
green100: "var(--seed-color-palette-green-100)",
|
|
435
|
-
green200: "var(--seed-color-palette-green-200)",
|
|
436
|
-
green300: "var(--seed-color-palette-green-300)",
|
|
437
|
-
green400: "var(--seed-color-palette-green-400)",
|
|
438
|
-
green500: "var(--seed-color-palette-green-500)",
|
|
439
|
-
green600: "var(--seed-color-palette-green-600)",
|
|
440
|
-
green700: "var(--seed-color-palette-green-700)",
|
|
441
|
-
green800: "var(--seed-color-palette-green-800)",
|
|
442
|
-
green900: "var(--seed-color-palette-green-900)",
|
|
443
|
-
green1000: "var(--seed-color-palette-green-1000)",
|
|
444
|
-
purple100: "var(--seed-color-palette-purple-100)",
|
|
445
|
-
purple200: "var(--seed-color-palette-purple-200)",
|
|
446
|
-
purple300: "var(--seed-color-palette-purple-300)",
|
|
447
|
-
purple400: "var(--seed-color-palette-purple-400)",
|
|
448
|
-
purple500: "var(--seed-color-palette-purple-500)",
|
|
449
|
-
purple600: "var(--seed-color-palette-purple-600)",
|
|
450
|
-
purple700: "var(--seed-color-palette-purple-700)",
|
|
451
|
-
purple800: "var(--seed-color-palette-purple-800)",
|
|
452
|
-
purple900: "var(--seed-color-palette-purple-900)",
|
|
453
|
-
purple1000: "var(--seed-color-palette-purple-1000)",
|
|
454
|
-
red100: "var(--seed-color-palette-red-100)",
|
|
455
|
-
red200: "var(--seed-color-palette-red-200)",
|
|
456
|
-
red300: "var(--seed-color-palette-red-300)",
|
|
457
|
-
red400: "var(--seed-color-palette-red-400)",
|
|
458
|
-
red500: "var(--seed-color-palette-red-500)",
|
|
459
|
-
red600: "var(--seed-color-palette-red-600)",
|
|
460
|
-
red700: "var(--seed-color-palette-red-700)",
|
|
461
|
-
red800: "var(--seed-color-palette-red-800)",
|
|
462
|
-
red900: "var(--seed-color-palette-red-900)",
|
|
463
|
-
red1000: "var(--seed-color-palette-red-1000)",
|
|
464
|
-
staticBlack: "var(--seed-color-palette-static-black)",
|
|
465
|
-
staticWhite: "var(--seed-color-palette-static-white)",
|
|
466
|
-
staticBlackAlpha100: "var(--seed-color-palette-static-black-alpha-100)",
|
|
467
|
-
staticBlackAlpha200: "var(--seed-color-palette-static-black-alpha-200)",
|
|
468
|
-
staticBlackAlpha300: "var(--seed-color-palette-static-black-alpha-300)",
|
|
469
|
-
staticBlackAlpha400: "var(--seed-color-palette-static-black-alpha-400)",
|
|
470
|
-
staticBlackAlpha500: "var(--seed-color-palette-static-black-alpha-500)",
|
|
471
|
-
staticBlackAlpha600: "var(--seed-color-palette-static-black-alpha-600)",
|
|
472
|
-
staticBlackAlpha700: "var(--seed-color-palette-static-black-alpha-700)",
|
|
473
|
-
staticBlackAlpha800: "var(--seed-color-palette-static-black-alpha-800)",
|
|
474
|
-
staticBlackAlpha900: "var(--seed-color-palette-static-black-alpha-900)",
|
|
475
|
-
staticBlackAlpha1000: "var(--seed-color-palette-static-black-alpha-1000)",
|
|
476
|
-
staticWhiteAlpha50: "var(--seed-color-palette-static-white-alpha-50)",
|
|
477
|
-
staticWhiteAlpha100: "var(--seed-color-palette-static-white-alpha-100)",
|
|
478
|
-
staticWhiteAlpha200: "var(--seed-color-palette-static-white-alpha-200)",
|
|
479
|
-
staticWhiteAlpha300: "var(--seed-color-palette-static-white-alpha-300)",
|
|
480
|
-
staticWhiteAlpha400: "var(--seed-color-palette-static-white-alpha-400)",
|
|
481
|
-
staticWhiteAlpha500: "var(--seed-color-palette-static-white-alpha-500)",
|
|
482
|
-
staticWhiteAlpha600: "var(--seed-color-palette-static-white-alpha-600)",
|
|
483
|
-
staticWhiteAlpha700: "var(--seed-color-palette-static-white-alpha-700)",
|
|
484
|
-
staticWhiteAlpha800: "var(--seed-color-palette-static-white-alpha-800)",
|
|
485
|
-
staticWhiteAlpha900: "var(--seed-color-palette-static-white-alpha-900)",
|
|
486
|
-
staticWhiteAlpha1000: "var(--seed-color-palette-static-white-alpha-1000)",
|
|
487
|
-
yellow100: "var(--seed-color-palette-yellow-100)",
|
|
488
|
-
yellow200: "var(--seed-color-palette-yellow-200)",
|
|
489
|
-
yellow300: "var(--seed-color-palette-yellow-300)",
|
|
490
|
-
yellow400: "var(--seed-color-palette-yellow-400)",
|
|
491
|
-
yellow500: "var(--seed-color-palette-yellow-500)",
|
|
492
|
-
yellow600: "var(--seed-color-palette-yellow-600)",
|
|
493
|
-
yellow700: "var(--seed-color-palette-yellow-700)",
|
|
494
|
-
yellow800: "var(--seed-color-palette-yellow-800)",
|
|
495
|
-
yellow900: "var(--seed-color-palette-yellow-900)",
|
|
496
|
-
yellow1000: "var(--seed-color-palette-yellow-1000)"
|
|
497
|
-
};
|
|
498
|
-
const fg = {
|
|
499
|
-
neutral: "var(--seed-color-fg-neutral)",
|
|
500
|
-
placeholder: "var(--seed-color-fg-placeholder)",
|
|
501
|
-
disabled: "var(--seed-color-fg-disabled)",
|
|
502
|
-
brand: "var(--seed-color-fg-brand)",
|
|
503
|
-
informative: "var(--seed-color-fg-informative)",
|
|
504
|
-
critical: "var(--seed-color-fg-critical)",
|
|
505
|
-
positive: "var(--seed-color-fg-positive)",
|
|
506
|
-
warning: "var(--seed-color-fg-warning)",
|
|
507
|
-
brandContrast: "var(--seed-color-fg-brand-contrast)",
|
|
508
|
-
criticalContrast: "var(--seed-color-fg-critical-contrast)",
|
|
509
|
-
informativeContrast: "var(--seed-color-fg-informative-contrast)",
|
|
510
|
-
neutralMuted: "var(--seed-color-fg-neutral-muted)",
|
|
511
|
-
neutralSubtle: "var(--seed-color-fg-neutral-subtle)",
|
|
512
|
-
neutralInverted: "var(--seed-color-fg-neutral-inverted)",
|
|
513
|
-
positiveContrast: "var(--seed-color-fg-positive-contrast)",
|
|
514
|
-
warningContrast: "var(--seed-color-fg-warning-contrast)"
|
|
515
|
-
};
|
|
516
|
-
const bg = {
|
|
517
|
-
overlay: "var(--seed-color-bg-overlay)",
|
|
518
|
-
disabled: "var(--seed-color-bg-disabled)",
|
|
519
|
-
brandWeak: "var(--seed-color-bg-brand-weak)",
|
|
520
|
-
brandSolid: "var(--seed-color-bg-brand-solid)",
|
|
521
|
-
brandSolidPressed: "var(--seed-color-bg-brand-solid-pressed)",
|
|
522
|
-
brandWeakPressed: "var(--seed-color-bg-brand-weak-pressed)",
|
|
523
|
-
criticalWeak: "var(--seed-color-bg-critical-weak)",
|
|
524
|
-
criticalSolid: "var(--seed-color-bg-critical-solid)",
|
|
525
|
-
criticalSolidPressed: "var(--seed-color-bg-critical-solid-pressed)",
|
|
526
|
-
criticalWeakPressed: "var(--seed-color-bg-critical-weak-pressed)",
|
|
527
|
-
informativeWeak: "var(--seed-color-bg-informative-weak)",
|
|
528
|
-
informativeSolid: "var(--seed-color-bg-informative-solid)",
|
|
529
|
-
informativeSolidPressed: "var(--seed-color-bg-informative-solid-pressed)",
|
|
530
|
-
informativeWeakPressed: "var(--seed-color-bg-informative-weak-pressed)",
|
|
531
|
-
layerBasement: "var(--seed-color-bg-layer-basement)",
|
|
532
|
-
layerDefault: "var(--seed-color-bg-layer-default)",
|
|
533
|
-
layerFill: "var(--seed-color-bg-layer-fill)",
|
|
534
|
-
layerFloating: "var(--seed-color-bg-layer-floating)",
|
|
535
|
-
layerDefaultPressed: "var(--seed-color-bg-layer-default-pressed)",
|
|
536
|
-
layerFloatingPressed: "var(--seed-color-bg-layer-floating-pressed)",
|
|
537
|
-
magicWeak: "var(--seed-color-bg-magic-weak)",
|
|
538
|
-
neutralWeak: "var(--seed-color-bg-neutral-weak)",
|
|
539
|
-
neutralInverted: "var(--seed-color-bg-neutral-inverted)",
|
|
540
|
-
neutralSolid: "var(--seed-color-bg-neutral-solid)",
|
|
541
|
-
neutralInvertedPressed: "var(--seed-color-bg-neutral-inverted-pressed)",
|
|
542
|
-
neutralSolidMuted: "var(--seed-color-bg-neutral-solid-muted)",
|
|
543
|
-
neutralSolidMutedPressed: "var(--seed-color-bg-neutral-solid-muted-pressed)",
|
|
544
|
-
neutralWeakPressed: "var(--seed-color-bg-neutral-weak-pressed)",
|
|
545
|
-
overlayMuted: "var(--seed-color-bg-overlay-muted)",
|
|
546
|
-
positiveWeak: "var(--seed-color-bg-positive-weak)",
|
|
547
|
-
positiveSolid: "var(--seed-color-bg-positive-solid)",
|
|
548
|
-
positiveSolidPressed: "var(--seed-color-bg-positive-solid-pressed)",
|
|
549
|
-
positiveWeakPressed: "var(--seed-color-bg-positive-weak-pressed)",
|
|
550
|
-
warningWeak: "var(--seed-color-bg-warning-weak)",
|
|
551
|
-
warningSolid: "var(--seed-color-bg-warning-solid)",
|
|
552
|
-
warningSolidPressed: "var(--seed-color-bg-warning-solid-pressed)",
|
|
553
|
-
warningWeakPressed: "var(--seed-color-bg-warning-weak-pressed)"
|
|
554
|
-
};
|
|
555
|
-
const stroke = {
|
|
556
|
-
brandWeak: "var(--seed-color-stroke-brand-weak)",
|
|
557
|
-
brandSolid: "var(--seed-color-stroke-brand-solid)",
|
|
558
|
-
criticalWeak: "var(--seed-color-stroke-critical-weak)",
|
|
559
|
-
criticalSolid: "var(--seed-color-stroke-critical-solid)",
|
|
560
|
-
informativeWeak: "var(--seed-color-stroke-informative-weak)",
|
|
561
|
-
informativeSolid: "var(--seed-color-stroke-informative-solid)",
|
|
562
|
-
neutralContrast: "var(--seed-color-stroke-neutral-contrast)",
|
|
563
|
-
neutralSolid: "var(--seed-color-stroke-neutral-solid)",
|
|
564
|
-
neutralWeak: "var(--seed-color-stroke-neutral-weak)",
|
|
565
|
-
neutralMuted: "var(--seed-color-stroke-neutral-muted)",
|
|
566
|
-
neutralSubtle: "var(--seed-color-stroke-neutral-subtle)",
|
|
567
|
-
positiveWeak: "var(--seed-color-stroke-positive-weak)",
|
|
568
|
-
positiveSolid: "var(--seed-color-stroke-positive-solid)",
|
|
569
|
-
warningWeak: "var(--seed-color-stroke-warning-weak)",
|
|
570
|
-
warningSolid: "var(--seed-color-stroke-warning-solid)"
|
|
571
|
-
};
|
|
572
|
-
const mannerTemp = {
|
|
573
|
-
l1: {
|
|
574
|
-
text: "var(--seed-color-manner-temp-l1-text)",
|
|
575
|
-
bg: "var(--seed-color-manner-temp-l1-bg)"
|
|
576
|
-
},
|
|
577
|
-
l2: {
|
|
578
|
-
text: "var(--seed-color-manner-temp-l2-text)",
|
|
579
|
-
bg: "var(--seed-color-manner-temp-l2-bg)"
|
|
580
|
-
},
|
|
581
|
-
l3: {
|
|
582
|
-
text: "var(--seed-color-manner-temp-l3-text)",
|
|
583
|
-
bg: "var(--seed-color-manner-temp-l3-bg)"
|
|
584
|
-
},
|
|
585
|
-
l4: {
|
|
586
|
-
text: "var(--seed-color-manner-temp-l4-text)",
|
|
587
|
-
bg: "var(--seed-color-manner-temp-l4-bg)"
|
|
588
|
-
},
|
|
589
|
-
l5: {
|
|
590
|
-
text: "var(--seed-color-manner-temp-l5-text)",
|
|
591
|
-
bg: "var(--seed-color-manner-temp-l5-bg)"
|
|
592
|
-
},
|
|
593
|
-
l6: {
|
|
594
|
-
text: "var(--seed-color-manner-temp-l6-text)",
|
|
595
|
-
bg: "var(--seed-color-manner-temp-l6-bg)"
|
|
596
|
-
},
|
|
597
|
-
l7: {
|
|
598
|
-
text: "var(--seed-color-manner-temp-l7-text)",
|
|
599
|
-
bg: "var(--seed-color-manner-temp-l7-bg)"
|
|
600
|
-
},
|
|
601
|
-
l8: {
|
|
602
|
-
text: "var(--seed-color-manner-temp-l8-text)",
|
|
603
|
-
bg: "var(--seed-color-manner-temp-l8-bg)"
|
|
604
|
-
},
|
|
605
|
-
l9: {
|
|
606
|
-
text: "var(--seed-color-manner-temp-l9-text)",
|
|
607
|
-
bg: "var(--seed-color-manner-temp-l9-bg)"
|
|
608
|
-
},
|
|
609
|
-
l10: {
|
|
610
|
-
text: "var(--seed-color-manner-temp-l10-text)",
|
|
611
|
-
bg: "var(--seed-color-manner-temp-l10-bg)"
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
//#endregion
|
|
616
|
-
//#region src/styles/vars/dimension.ts
|
|
617
|
-
var dimension_exports = /* @__PURE__ */ __exportAll({
|
|
618
|
-
lineHeight: () => lineHeight,
|
|
619
|
-
spacingX: () => spacingX,
|
|
620
|
-
spacingY: () => spacingY,
|
|
621
|
-
t1: () => t1,
|
|
622
|
-
t10: () => t10,
|
|
623
|
-
t10Static: () => t10Static,
|
|
624
|
-
t1Static: () => t1Static,
|
|
625
|
-
t2: () => t2,
|
|
626
|
-
t2Static: () => t2Static,
|
|
627
|
-
t3: () => t3,
|
|
628
|
-
t3Static: () => t3Static,
|
|
629
|
-
t4: () => t4,
|
|
630
|
-
t4Static: () => t4Static,
|
|
631
|
-
t5: () => t5,
|
|
632
|
-
t5Static: () => t5Static,
|
|
633
|
-
t6: () => t6,
|
|
634
|
-
t6Static: () => t6Static,
|
|
635
|
-
t7: () => t7,
|
|
636
|
-
t7Static: () => t7Static,
|
|
637
|
-
t8: () => t8,
|
|
638
|
-
t8Static: () => t8Static,
|
|
639
|
-
t9: () => t9,
|
|
640
|
-
t9Static: () => t9Static,
|
|
641
|
-
x0_5: () => x0_5,
|
|
642
|
-
x1: () => x1,
|
|
643
|
-
x10: () => x10,
|
|
644
|
-
x12: () => x12,
|
|
645
|
-
x13: () => x13,
|
|
646
|
-
x14: () => x14,
|
|
647
|
-
x16: () => x16,
|
|
648
|
-
x1_5: () => x1_5,
|
|
649
|
-
x2: () => x2,
|
|
650
|
-
x2_5: () => x2_5,
|
|
651
|
-
x3: () => x3,
|
|
652
|
-
x3_5: () => x3_5,
|
|
653
|
-
x4: () => x4,
|
|
654
|
-
x4_5: () => x4_5,
|
|
655
|
-
x5: () => x5,
|
|
656
|
-
x6: () => x6,
|
|
657
|
-
x7: () => x7,
|
|
658
|
-
x8: () => x8,
|
|
659
|
-
x9: () => x9
|
|
660
|
-
});
|
|
661
|
-
const x0_5 = "var(--seed-dimension-x0_5)";
|
|
662
|
-
const x1 = "var(--seed-dimension-x1)";
|
|
663
|
-
const x1_5 = "var(--seed-dimension-x1_5)";
|
|
664
|
-
const x2 = "var(--seed-dimension-x2)";
|
|
665
|
-
const x2_5 = "var(--seed-dimension-x2_5)";
|
|
666
|
-
const x3 = "var(--seed-dimension-x3)";
|
|
667
|
-
const x3_5 = "var(--seed-dimension-x3_5)";
|
|
668
|
-
const x4 = "var(--seed-dimension-x4)";
|
|
669
|
-
const x4_5 = "var(--seed-dimension-x4_5)";
|
|
670
|
-
const x5 = "var(--seed-dimension-x5)";
|
|
671
|
-
const x6 = "var(--seed-dimension-x6)";
|
|
672
|
-
const x7 = "var(--seed-dimension-x7)";
|
|
673
|
-
const x8 = "var(--seed-dimension-x8)";
|
|
674
|
-
const x9 = "var(--seed-dimension-x9)";
|
|
675
|
-
const x10 = "var(--seed-dimension-x10)";
|
|
676
|
-
const x12 = "var(--seed-dimension-x12)";
|
|
677
|
-
const x13 = "var(--seed-dimension-x13)";
|
|
678
|
-
const x14 = "var(--seed-dimension-x14)";
|
|
679
|
-
const x16 = "var(--seed-dimension-x16)";
|
|
680
|
-
const spacingX = {
|
|
681
|
-
betweenChips: "var(--seed-dimension-spacing-x-between-chips)",
|
|
682
|
-
globalGutter: "var(--seed-dimension-spacing-x-global-gutter)"
|
|
683
|
-
};
|
|
684
|
-
const spacingY = {
|
|
685
|
-
componentDefault: "var(--seed-dimension-spacing-y-component-default)",
|
|
686
|
-
navToTitle: "var(--seed-dimension-spacing-y-nav-to-title)",
|
|
687
|
-
screenBottom: "var(--seed-dimension-spacing-y-screen-bottom)",
|
|
688
|
-
betweenText: "var(--seed-dimension-spacing-y-between-text)"
|
|
689
|
-
};
|
|
690
|
-
const t1 = "var(--seed-font-size-t1)";
|
|
691
|
-
const t2 = "var(--seed-font-size-t2)";
|
|
692
|
-
const t3 = "var(--seed-font-size-t3)";
|
|
693
|
-
const t4 = "var(--seed-font-size-t4)";
|
|
694
|
-
const t5 = "var(--seed-font-size-t5)";
|
|
695
|
-
const t6 = "var(--seed-font-size-t6)";
|
|
696
|
-
const t7 = "var(--seed-font-size-t7)";
|
|
697
|
-
const t8 = "var(--seed-font-size-t8)";
|
|
698
|
-
const t9 = "var(--seed-font-size-t9)";
|
|
699
|
-
const t10 = "var(--seed-font-size-t10)";
|
|
700
|
-
const t1Static = "var(--seed-font-size-t1-static)";
|
|
701
|
-
const t2Static = "var(--seed-font-size-t2-static)";
|
|
702
|
-
const t3Static = "var(--seed-font-size-t3-static)";
|
|
703
|
-
const t4Static = "var(--seed-font-size-t4-static)";
|
|
704
|
-
const t5Static = "var(--seed-font-size-t5-static)";
|
|
705
|
-
const t6Static = "var(--seed-font-size-t6-static)";
|
|
706
|
-
const t7Static = "var(--seed-font-size-t7-static)";
|
|
707
|
-
const t8Static = "var(--seed-font-size-t8-static)";
|
|
708
|
-
const t9Static = "var(--seed-font-size-t9-static)";
|
|
709
|
-
const t10Static = "var(--seed-font-size-t10-static)";
|
|
710
|
-
const lineHeight = {
|
|
711
|
-
t1: "var(--seed-line-height-t1)",
|
|
712
|
-
t2: "var(--seed-line-height-t2)",
|
|
713
|
-
t3: "var(--seed-line-height-t3)",
|
|
714
|
-
t4: "var(--seed-line-height-t4)",
|
|
715
|
-
t5: "var(--seed-line-height-t5)",
|
|
716
|
-
t6: "var(--seed-line-height-t6)",
|
|
717
|
-
t7: "var(--seed-line-height-t7)",
|
|
718
|
-
t8: "var(--seed-line-height-t8)",
|
|
719
|
-
t9: "var(--seed-line-height-t9)",
|
|
720
|
-
t10: "var(--seed-line-height-t10)",
|
|
721
|
-
t1Static: "var(--seed-line-height-t1-static)",
|
|
722
|
-
t2Static: "var(--seed-line-height-t2-static)",
|
|
723
|
-
t3Static: "var(--seed-line-height-t3-static)",
|
|
724
|
-
t4Static: "var(--seed-line-height-t4-static)",
|
|
725
|
-
t5Static: "var(--seed-line-height-t5-static)",
|
|
726
|
-
t6Static: "var(--seed-line-height-t6-static)",
|
|
727
|
-
t7Static: "var(--seed-line-height-t7-static)",
|
|
728
|
-
t8Static: "var(--seed-line-height-t8-static)",
|
|
729
|
-
t9Static: "var(--seed-line-height-t9-static)",
|
|
730
|
-
t10Static: "var(--seed-line-height-t10-static)"
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
//#endregion
|
|
734
|
-
//#region src/styles/vars/radius.ts
|
|
735
|
-
var radius_exports = /* @__PURE__ */ __exportAll({
|
|
736
|
-
full: () => full,
|
|
737
|
-
r0_5: () => r0_5,
|
|
738
|
-
r1: () => r1,
|
|
739
|
-
r1_5: () => r1_5,
|
|
740
|
-
r2: () => r2,
|
|
741
|
-
r2_5: () => r2_5,
|
|
742
|
-
r3: () => r3,
|
|
743
|
-
r3_5: () => r3_5,
|
|
744
|
-
r4: () => r4,
|
|
745
|
-
r5: () => r5,
|
|
746
|
-
r6: () => r6
|
|
747
|
-
});
|
|
748
|
-
const r0_5 = "var(--seed-radius-r0_5)";
|
|
749
|
-
const r1 = "var(--seed-radius-r1)";
|
|
750
|
-
const r1_5 = "var(--seed-radius-r1_5)";
|
|
751
|
-
const r2 = "var(--seed-radius-r2)";
|
|
752
|
-
const r2_5 = "var(--seed-radius-r2_5)";
|
|
753
|
-
const r3 = "var(--seed-radius-r3)";
|
|
754
|
-
const r3_5 = "var(--seed-radius-r3_5)";
|
|
755
|
-
const r4 = "var(--seed-radius-r4)";
|
|
756
|
-
const r5 = "var(--seed-radius-r5)";
|
|
757
|
-
const r6 = "var(--seed-radius-r6)";
|
|
758
|
-
const full = "var(--seed-radius-full)";
|
|
759
|
-
|
|
760
|
-
//#endregion
|
|
761
|
-
//#region src/styles/vars/index.ts
|
|
762
|
-
const vars = {
|
|
763
|
-
$color: color_exports,
|
|
764
|
-
$dimension: dimension_exports,
|
|
765
|
-
$radius: radius_exports,
|
|
766
|
-
$fontWeight: {
|
|
767
|
-
regular: "var(--seed-font-weight-regular)",
|
|
768
|
-
medium: "var(--seed-font-weight-medium)",
|
|
769
|
-
bold: "var(--seed-font-weight-bold)"
|
|
770
|
-
},
|
|
771
|
-
$duration: {
|
|
772
|
-
d1: "var(--seed-duration-d1)",
|
|
773
|
-
d2: "var(--seed-duration-d2)",
|
|
774
|
-
d3: "var(--seed-duration-d3)",
|
|
775
|
-
d4: "var(--seed-duration-d4)",
|
|
776
|
-
d5: "var(--seed-duration-d5)",
|
|
777
|
-
d6: "var(--seed-duration-d6)"
|
|
778
|
-
}
|
|
166
|
+
//#region src/components/FadeList.tsx
|
|
167
|
+
const FadeList = ({ className, listRef: externalListRef, children, ...listProps }) => {
|
|
168
|
+
const internalListRef = (0, _lynx_js_react.useRef)(null);
|
|
169
|
+
const listRef = externalListRef ?? internalListRef;
|
|
170
|
+
return <list ref={listRef} scroll-orientation="vertical" className={className} {...listProps}>
|
|
171
|
+
{children}
|
|
172
|
+
</list>;
|
|
779
173
|
};
|
|
780
174
|
|
|
781
175
|
//#endregion
|
|
@@ -805,14 +199,6 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
805
199
|
const [enabledLevels, setEnabledLevels] = (0, _lynx_js_react.useState)(() => savedEnabledLevels ?? new Set(LOG_LEVELS));
|
|
806
200
|
const [filterOpen, setFilterOpen] = (0, _lynx_js_react.useState)(false);
|
|
807
201
|
const [searchQuery, setSearchQuery] = (0, _lynx_js_react.useState)(savedSearchQuery);
|
|
808
|
-
const [fadeState, setFadeState] = (0, _lynx_js_react.useState)({
|
|
809
|
-
atTop: true,
|
|
810
|
-
atBottom: true
|
|
811
|
-
});
|
|
812
|
-
const fadeRef = (0, _lynx_js_react.useRef)({
|
|
813
|
-
atTop: true,
|
|
814
|
-
atBottom: true
|
|
815
|
-
});
|
|
816
202
|
const inputRef = (0, _lynx_js_react.useRef)(null);
|
|
817
203
|
const searchInputRef = (0, _lynx_js_react.useRef)(null);
|
|
818
204
|
const listRef = (0, _lynx_js_react.useRef)(null);
|
|
@@ -891,23 +277,23 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
891
277
|
const renderArg = (arg, parentKey, level) => {
|
|
892
278
|
const key = parentKey;
|
|
893
279
|
const isExpanded = expandedArgs.has(key);
|
|
894
|
-
if (arg === null) return <text className={argNull}>null</text>;
|
|
895
|
-
if (arg === void 0) return <text className={argUndefined}>undefined</text>;
|
|
280
|
+
if (arg === null) return <text className={"cp-argNull"}>null</text>;
|
|
281
|
+
if (arg === void 0) return <text className={"cp-argUndefined"}>undefined</text>;
|
|
896
282
|
if (typeof arg === "string") {
|
|
897
283
|
const MAX_LENGTH = 80;
|
|
898
|
-
if (!(arg.length > MAX_LENGTH)) return <text className={argString
|
|
899
|
-
return <view className={argObject}>
|
|
900
|
-
<view className={argObjectHeader} bindtap={() => toggleArg(key)}>
|
|
901
|
-
<text className={toggleIndicator}>
|
|
284
|
+
if (!(arg.length > MAX_LENGTH)) return <text className={`cp-argString cp-argString--${level}`}>{arg}</text>;
|
|
285
|
+
return <view className={"cp-argObject"}>
|
|
286
|
+
<view className={"cp-argObjectHeader"} bindtap={() => toggleArg(key)}>
|
|
287
|
+
<text className={"cp-toggleIndicator"}>
|
|
902
288
|
{isExpanded ? "▼" : "▶"}
|
|
903
289
|
</text>
|
|
904
|
-
<text className={argString
|
|
290
|
+
<text className={`cp-argString cp-argString--${level}`}>
|
|
905
291
|
{isExpanded ? arg : `${arg.slice(0, MAX_LENGTH)}...`}
|
|
906
292
|
</text>
|
|
907
293
|
</view>
|
|
908
294
|
</view>;
|
|
909
295
|
}
|
|
910
|
-
if (typeof arg === "number" || typeof arg === "boolean") return <text className={argPrimitive
|
|
296
|
+
if (typeof arg === "number" || typeof arg === "boolean") return <text className={`cp-argPrimitive cp-argPrimitive--${level}`}>{String(arg)}</text>;
|
|
911
297
|
if (typeof arg === "object") {
|
|
912
298
|
let preview = "Object";
|
|
913
299
|
if (Array.isArray(arg)) preview = `Array(${arg.length})`;
|
|
@@ -921,201 +307,120 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
921
307
|
if (arg instanceof Map) jsonString = `{\n${Array.from(arg.entries()).map(([k, v]) => ` [${(0, javascript_stringify.stringify)(k)}, ${(0, javascript_stringify.stringify)(v)}]`).join(",\n")}\n}`;
|
|
922
308
|
else if (arg instanceof Set) jsonString = `{\n${Array.from(arg.values()).map((v) => (0, javascript_stringify.stringify)(v)).join(", ")}\n}`;
|
|
923
309
|
else jsonString = (0, javascript_stringify.stringify)(arg, null, 2, { references: true }) ?? String(arg);
|
|
924
|
-
return <view className={argObject}>
|
|
925
|
-
<view className={argObjectHeader} bindtap={() => toggleArg(key)}>
|
|
926
|
-
<text className={toggleIndicator}>
|
|
310
|
+
return <view className={"cp-argObject"}>
|
|
311
|
+
<view className={"cp-argObjectHeader"} bindtap={() => toggleArg(key)}>
|
|
312
|
+
<text className={"cp-toggleIndicator"}>
|
|
927
313
|
{isExpanded ? "▼" : "▶"}
|
|
928
314
|
</text>
|
|
929
|
-
<text className={argObjectPreview}>{preview}</text>
|
|
315
|
+
<text className={"cp-argObjectPreview"}>{preview}</text>
|
|
930
316
|
</view>
|
|
931
|
-
{isExpanded && <view className={argObjectContent}>
|
|
932
|
-
<text className={argObjectJson}>{jsonString}</text>
|
|
317
|
+
{isExpanded && <view className={"cp-argObjectContent"}>
|
|
318
|
+
<text className={"cp-argObjectJson"}>{jsonString}</text>
|
|
933
319
|
</view>}
|
|
934
320
|
</view>;
|
|
935
321
|
}
|
|
936
|
-
return <text className={argPrimitive
|
|
322
|
+
return <text className={`cp-argPrimitive cp-argPrimitive--${level}`}>{String(arg)}</text>;
|
|
937
323
|
};
|
|
938
|
-
return <view className={logContainer} bindtap={() => {
|
|
324
|
+
return <view className={"cp-logContainer"} bindtap={() => {
|
|
939
325
|
if (filterOpen) setFilterOpen(false);
|
|
940
326
|
}}>
|
|
941
|
-
<view className={logHeader}>
|
|
942
|
-
<view className={filterWrapper}>
|
|
943
|
-
<view className={filterButton} catchtap={() => setFilterOpen((v) => !v)}>
|
|
944
|
-
<text className={filterButtonText}>Filter ▼</text>
|
|
327
|
+
<view className={"cp-logHeader"}>
|
|
328
|
+
<view className={"cp-filterWrapper"}>
|
|
329
|
+
<view className={"cp-filterButton"} catchtap={() => setFilterOpen((v) => !v)}>
|
|
330
|
+
<text className={"cp-filterButtonText"}>Filter ▼</text>
|
|
945
331
|
</view>
|
|
946
|
-
{filterOpen && <view className={filterDropdown} catchtap={() => {}}>
|
|
947
|
-
{LOG_LEVELS.map((level) => <view key={level} className={filterOption} bindtap={() => toggleLevel(level)}>
|
|
948
|
-
<text className={filterCheckbox
|
|
332
|
+
{filterOpen && <view className={"cp-filterDropdown"} catchtap={() => {}}>
|
|
333
|
+
{LOG_LEVELS.map((level) => <view key={level} className={"cp-filterOption"} bindtap={() => toggleLevel(level)}>
|
|
334
|
+
<text className={`cp-filterCheckbox cp-filterCheckbox--${level}`}>
|
|
949
335
|
{enabledLevels.has(level) ? "✅" : "⬜"}
|
|
950
336
|
</text>
|
|
951
|
-
<text className={filterLabel
|
|
337
|
+
<text className={`cp-filterLabel cp-filterLabel--${level}`}>
|
|
952
338
|
{level.toUpperCase()}
|
|
953
339
|
</text>
|
|
954
340
|
</view>)}
|
|
955
341
|
</view>}
|
|
956
342
|
</view>
|
|
957
|
-
<view className={searchWrapper}>
|
|
958
|
-
<text className={searchPrompt}>{"›"}</text>
|
|
959
|
-
<input ref={searchInputRef} className={searchInput} placeholder="Search logs..." bindinput={(e) => setSearchQuery(e.detail.value)} />
|
|
343
|
+
<view className={"cp-searchWrapper"}>
|
|
344
|
+
<text className={"cp-searchPrompt"}>{"›"}</text>
|
|
345
|
+
<input ref={searchInputRef} className={"cp-searchInput"} placeholder="Search logs..." bindinput={(e) => setSearchQuery(e.detail.value)} />
|
|
346
|
+
{searchQuery.length > 0 && <view className={"cp-searchClear"} bindtap={() => {
|
|
347
|
+
setSearchQuery("");
|
|
348
|
+
searchInputRef.current?.invoke({
|
|
349
|
+
method: "setValue",
|
|
350
|
+
params: { value: "" }
|
|
351
|
+
}).exec();
|
|
352
|
+
}}>
|
|
353
|
+
<text className={"cp-searchClearText"}>✕</text>
|
|
354
|
+
</view>}
|
|
960
355
|
</view>
|
|
961
356
|
<view style={{
|
|
962
357
|
display: "flex",
|
|
963
358
|
flexDirection: "row",
|
|
964
359
|
gap: 8
|
|
965
360
|
}}>
|
|
966
|
-
<view className={clearButton
|
|
967
|
-
<text className={clearButtonText
|
|
361
|
+
<view className={"cp-clearButton"} bindtap={clearLogs}>
|
|
362
|
+
<text className={"cp-clearButtonText"}>🗑</text>
|
|
968
363
|
</view>
|
|
969
364
|
</view>
|
|
970
365
|
</view>
|
|
971
|
-
<
|
|
972
|
-
<list ref={listRef} scroll-orientation="vertical" className={logList} preload-buffer-count={10} initial-scroll-index={Math.max(0, filteredLogs.length - 1)} scroll-event-throttle={16} bindscroll={(e) => {
|
|
973
|
-
const { scrollTop, scrollHeight, listHeight } = e.detail;
|
|
974
|
-
const atTop = scrollTop <= 10;
|
|
975
|
-
const atBottom = scrollTop + listHeight >= scrollHeight - 10;
|
|
976
|
-
if (atTop !== fadeRef.current.atTop || atBottom !== fadeRef.current.atBottom) {
|
|
977
|
-
fadeRef.current.atTop = atTop;
|
|
978
|
-
fadeRef.current.atBottom = atBottom;
|
|
979
|
-
setFadeState({
|
|
980
|
-
atTop,
|
|
981
|
-
atBottom
|
|
982
|
-
});
|
|
983
|
-
}
|
|
984
|
-
}}>
|
|
366
|
+
<FadeList listRef={listRef} className={"cp-logList"} preload-buffer-count={10} initial-scroll-index={Math.max(0, filteredLogs.length - 1)}>
|
|
985
367
|
{filteredLogs.length === 0 ? <list-item item-key="empty-state">
|
|
986
|
-
<view className={placeholder
|
|
987
|
-
<text className={placeholderText
|
|
368
|
+
<view className={"cp-placeholder"}>
|
|
369
|
+
<text className={"cp-placeholderText"}>
|
|
988
370
|
No logs yet. Try console.log("Hello!")
|
|
989
371
|
</text>
|
|
990
372
|
</view>
|
|
991
373
|
</list-item> : filteredLogs.map((log) => {
|
|
992
374
|
return <list-item key={log.id} item-key={log.id}>
|
|
993
|
-
<view className={logItem
|
|
994
|
-
<view className={logItemHeader}>
|
|
995
|
-
<text className={logLevel
|
|
375
|
+
<view className={`cp-logItem cp-logItem--${log.level}`}>
|
|
376
|
+
<view className={"cp-logItemHeader"}>
|
|
377
|
+
<text className={`cp-logLevel cp-logLevel--${log.level}`}>
|
|
996
378
|
{log.level.toUpperCase()}
|
|
997
379
|
</text>
|
|
998
|
-
<text className={logTime}>
|
|
380
|
+
<text className={"cp-logTime"}>
|
|
999
381
|
{new Date(log.timestamp).toISOString()}
|
|
1000
382
|
</text>
|
|
1001
383
|
</view>
|
|
1002
|
-
<view className={logArgsContainer}>
|
|
1003
|
-
{log.args.map((arg, index) => <view key={`${log.id}-${index.toString()}`} className={logArgItem}>
|
|
384
|
+
<view className={"cp-logArgsContainer"}>
|
|
385
|
+
{log.args.map((arg, index) => <view key={`${log.id}-${index.toString()}`} className={"cp-logArgItem"}>
|
|
1004
386
|
{renderArg(arg, `${log.id}-${index.toString()}`, log.level)}
|
|
1005
387
|
</view>)}
|
|
1006
388
|
</view>
|
|
1007
389
|
</view>
|
|
1008
390
|
</list-item>;
|
|
1009
391
|
})}
|
|
1010
|
-
</
|
|
1011
|
-
<view className={
|
|
1012
|
-
|
|
1013
|
-
<
|
|
1014
|
-
<
|
|
1015
|
-
|
|
1016
|
-
<text className={replRunButtonText}>Run</text>
|
|
392
|
+
</FadeList>
|
|
393
|
+
<view className={"cp-replInputRow"}>
|
|
394
|
+
<text className={"cp-replPrompt"}>{"›"}</text>
|
|
395
|
+
<input ref={inputRef} className={"cp-replInput"} placeholder="enter code..." bindinput={(e) => setCode(e.detail.value)} bindconfirm={handleRun} />
|
|
396
|
+
<view className={"cp-replRunButton"} bindtap={handleRun}>
|
|
397
|
+
<text className={"cp-replRunButtonText"}>Run</text>
|
|
1017
398
|
</view>
|
|
1018
399
|
</view>
|
|
1019
400
|
</view>;
|
|
1020
401
|
};
|
|
1021
402
|
|
|
1022
|
-
//#endregion
|
|
1023
|
-
//#region src/components/NetworkPanel.css.ts
|
|
1024
|
-
var bodyText = "NetworkPanel_bodyText__1kf6i8q16";
|
|
1025
|
-
var clearButton$1 = "NetworkPanel_clearButton__1kf6i8q3";
|
|
1026
|
-
var clearButtonText$1 = "NetworkPanel_clearButtonText__1kf6i8q4";
|
|
1027
|
-
var container$1 = "NetworkPanel_container__1kf6i8q0";
|
|
1028
|
-
var count$1 = "NetworkPanel_count__1kf6i8q2";
|
|
1029
|
-
var detailSection = "NetworkPanel_detailSection__1kf6i8q10";
|
|
1030
|
-
var detailSectionTitle = "NetworkPanel_detailSectionTitle__1kf6i8q11";
|
|
1031
|
-
var detailsContainer$1 = "NetworkPanel_detailsContainer__1kf6i8qr";
|
|
1032
|
-
var emptyText = "NetworkPanel_emptyText__1kf6i8q18";
|
|
1033
|
-
var errorText = "NetworkPanel_errorText__1kf6i8q17";
|
|
1034
|
-
var header$1 = "NetworkPanel_header__1kf6i8q1";
|
|
1035
|
-
var item$1 = createRuntimeFn({
|
|
1036
|
-
defaultClassName: "NetworkPanel_item__1kf6i8q8",
|
|
1037
|
-
variantClassNames: { status: {
|
|
1038
|
-
pending: "NetworkPanel_item_status_pending__1kf6i8q9",
|
|
1039
|
-
success: "NetworkPanel_item_status_success__1kf6i8qa",
|
|
1040
|
-
error: "NetworkPanel_item_status_error__1kf6i8qb"
|
|
1041
|
-
} },
|
|
1042
|
-
defaultVariants: {},
|
|
1043
|
-
compoundVariants: []
|
|
1044
|
-
});
|
|
1045
|
-
var itemHeader$1 = "NetworkPanel_itemHeader__1kf6i8qc";
|
|
1046
|
-
var list$1 = "NetworkPanel_list__1kf6i8q5";
|
|
1047
|
-
var method = createRuntimeFn({
|
|
1048
|
-
defaultClassName: "NetworkPanel_method__1kf6i8qd",
|
|
1049
|
-
variantClassNames: { type: {
|
|
1050
|
-
GET: "NetworkPanel_method_type_GET__1kf6i8qe",
|
|
1051
|
-
POST: "NetworkPanel_method_type_POST__1kf6i8qf",
|
|
1052
|
-
PUT: "NetworkPanel_method_type_PUT__1kf6i8qg",
|
|
1053
|
-
PATCH: "NetworkPanel_method_type_PATCH__1kf6i8qh",
|
|
1054
|
-
DELETE: "NetworkPanel_method_type_DELETE__1kf6i8qi"
|
|
1055
|
-
} },
|
|
1056
|
-
defaultVariants: {},
|
|
1057
|
-
compoundVariants: []
|
|
1058
|
-
});
|
|
1059
|
-
var path = "NetworkPanel_path__1kf6i8qp";
|
|
1060
|
-
var placeholder$1 = "NetworkPanel_placeholder__1kf6i8q6";
|
|
1061
|
-
var placeholderText$1 = "NetworkPanel_placeholderText__1kf6i8q7";
|
|
1062
|
-
var statusCode = createRuntimeFn({
|
|
1063
|
-
defaultClassName: "NetworkPanel_statusCode__1kf6i8qj",
|
|
1064
|
-
variantClassNames: { type: {
|
|
1065
|
-
success: "NetworkPanel_statusCode_type_success__1kf6i8qk",
|
|
1066
|
-
error: "NetworkPanel_statusCode_type_error__1kf6i8ql",
|
|
1067
|
-
pending: "NetworkPanel_statusCode_type_pending__1kf6i8qm"
|
|
1068
|
-
} },
|
|
1069
|
-
defaultVariants: {},
|
|
1070
|
-
compoundVariants: []
|
|
1071
|
-
});
|
|
1072
|
-
var tab = createRuntimeFn({
|
|
1073
|
-
defaultClassName: "NetworkPanel_tab__1kf6i8qt",
|
|
1074
|
-
variantClassNames: { active: {
|
|
1075
|
-
true: "NetworkPanel_tab_active_true__1kf6i8qu",
|
|
1076
|
-
false: "NetworkPanel_tab_active_false__1kf6i8qv"
|
|
1077
|
-
} },
|
|
1078
|
-
defaultVariants: {},
|
|
1079
|
-
compoundVariants: []
|
|
1080
|
-
});
|
|
1081
|
-
var tabContent$1 = "NetworkPanel_tabContent__1kf6i8qz";
|
|
1082
|
-
var tabText = createRuntimeFn({
|
|
1083
|
-
defaultClassName: "NetworkPanel_tabText__1kf6i8qw",
|
|
1084
|
-
variantClassNames: { active: {
|
|
1085
|
-
true: "NetworkPanel_tabText_active_true__1kf6i8qx",
|
|
1086
|
-
false: "NetworkPanel_tabText_active_false__1kf6i8qy"
|
|
1087
|
-
} },
|
|
1088
|
-
defaultVariants: {},
|
|
1089
|
-
compoundVariants: []
|
|
1090
|
-
});
|
|
1091
|
-
var table = "NetworkPanel_table__1kf6i8q12";
|
|
1092
|
-
var tableKey = "NetworkPanel_tableKey__1kf6i8q14";
|
|
1093
|
-
var tableRow = "NetworkPanel_tableRow__1kf6i8q13";
|
|
1094
|
-
var tableValue = "NetworkPanel_tableValue__1kf6i8q15";
|
|
1095
|
-
var tabs$1 = "NetworkPanel_tabs__1kf6i8qs";
|
|
1096
|
-
var time = "NetworkPanel_time__1kf6i8qn";
|
|
1097
|
-
|
|
1098
403
|
//#endregion
|
|
1099
404
|
//#region src/components/NetworkDetailSection.tsx
|
|
1100
405
|
const NetworkDetailSection = ({ headers = {}, body = "", error = "" }) => {
|
|
1101
406
|
return <>
|
|
1102
407
|
{}
|
|
1103
|
-
<view className={detailSection}>
|
|
1104
|
-
<text className={detailSectionTitle}>Headers</text>
|
|
1105
|
-
{headers && Object.keys(headers).length > 0 ? <view className={table}>
|
|
1106
|
-
{Object.entries(headers).map(([key, value]) => <view key={key} className={tableRow}>
|
|
1107
|
-
<text className={tableKey}>{key}</text>
|
|
1108
|
-
<text className={tableValue}>{value}</text>
|
|
408
|
+
<view className={"np-detailSection"}>
|
|
409
|
+
<text className={"np-detailSectionTitle"}>Headers</text>
|
|
410
|
+
{headers && Object.keys(headers).length > 0 ? <view className={"np-table"}>
|
|
411
|
+
{Object.entries(headers).map(([key, value]) => <view key={key} className={"np-tableRow"}>
|
|
412
|
+
<text className={"np-tableKey"}>{key}</text>
|
|
413
|
+
<text className={"np-tableValue"}>{value}</text>
|
|
1109
414
|
</view>)}
|
|
1110
|
-
</view> : <text className={emptyText}>No headers</text>}
|
|
415
|
+
</view> : <text className={"np-emptyText"}>No headers</text>}
|
|
1111
416
|
</view>
|
|
1112
417
|
|
|
1113
418
|
{}
|
|
1114
|
-
<view className={detailSection}>
|
|
1115
|
-
<text className={detailSectionTitle}>Body</text>
|
|
1116
|
-
{error && <text className={errorText}>{error}</text>}
|
|
1117
|
-
{body && <text className={bodyText}>{body}</text>}
|
|
1118
|
-
{!error && !body && <text className={emptyText}>No body</text>}
|
|
419
|
+
<view className={"np-detailSection"}>
|
|
420
|
+
<text className={"np-detailSectionTitle"}>Body</text>
|
|
421
|
+
{error && <text className={"np-errorText"}>{error}</text>}
|
|
422
|
+
{body && <text className={"np-bodyText"}>{body}</text>}
|
|
423
|
+
{!error && !body && <text className={"np-emptyText"}>No body</text>}
|
|
1119
424
|
</view>
|
|
1120
425
|
</>;
|
|
1121
426
|
};
|
|
@@ -1169,67 +474,67 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
1169
474
|
if (statusCode && statusCode >= 200 && statusCode < 300) return "success";
|
|
1170
475
|
return "error";
|
|
1171
476
|
};
|
|
1172
|
-
return <view className={container
|
|
1173
|
-
<view className={header
|
|
1174
|
-
<text className={count
|
|
1175
|
-
<view className={clearButton
|
|
1176
|
-
<text className={clearButtonText
|
|
477
|
+
return <view className={"np-container"}>
|
|
478
|
+
<view className={"np-header"}>
|
|
479
|
+
<text className={"np-count"}>Total: {networks.length} requests</text>
|
|
480
|
+
<view className={"np-clearButton"} bindtap={clearNetworks}>
|
|
481
|
+
<text className={"np-clearButtonText"}>🗑</text>
|
|
1177
482
|
</view>
|
|
1178
483
|
</view>
|
|
1179
484
|
|
|
1180
|
-
{networks.length === 0 ? <view className={placeholder
|
|
1181
|
-
<text className={placeholderText
|
|
1182
|
-
</view> : <
|
|
485
|
+
{networks.length === 0 ? <view className={"np-placeholder"}>
|
|
486
|
+
<text className={"np-placeholderText"}>No network requests yet</text>
|
|
487
|
+
</view> : <FadeList className={"np-list"}>
|
|
1183
488
|
{networks.map((network) => <list-item key={network.id} item-key={network.id}>
|
|
1184
|
-
<view className={item
|
|
1185
|
-
<view className={itemHeader
|
|
1186
|
-
<text className={method
|
|
489
|
+
<view className={`np-item np-item--${network.status}`}>
|
|
490
|
+
<view className={"np-itemHeader"} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
491
|
+
<text className={`np-method np-method--${network.method}`}>
|
|
1187
492
|
{network.method}
|
|
1188
493
|
</text>
|
|
1189
|
-
{network.statusCode && <text className={statusCode
|
|
494
|
+
{network.statusCode && <text className={`np-statusCode np-statusCode--${getStatusCodeVariant(network.status, network.statusCode)}`}>
|
|
1190
495
|
{network.statusCode}
|
|
1191
496
|
</text>}
|
|
1192
|
-
{network.status === "pending" && <text className={statusCode
|
|
497
|
+
{network.status === "pending" && <text className={"np-statusCode np-statusCode--pending"}>
|
|
1193
498
|
Pending...
|
|
1194
499
|
</text>}
|
|
1195
|
-
<text className={time}>
|
|
500
|
+
<text className={"np-time"}>
|
|
1196
501
|
{formatDuration(network.duration)}
|
|
1197
502
|
</text>
|
|
1198
|
-
<text className={time}>
|
|
503
|
+
<text className={"np-time"}>
|
|
1199
504
|
{new Date(network.startTime).toISOString()}
|
|
1200
505
|
</text>
|
|
1201
506
|
</view>
|
|
1202
507
|
|
|
1203
|
-
<text className={path} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
508
|
+
<text className={"np-path"} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
1204
509
|
{extractPath(network.url)}
|
|
1205
510
|
</text>
|
|
1206
511
|
|
|
1207
|
-
{selectedId === network.id && <view className={detailsContainer
|
|
512
|
+
{selectedId === network.id && <view className={"np-detailsContainer"}>
|
|
1208
513
|
{}
|
|
1209
|
-
<view className={tabs
|
|
1210
|
-
<view className={tab
|
|
1211
|
-
<text className={tabText
|
|
514
|
+
<view className={"np-tabs"}>
|
|
515
|
+
<view className={`np-tab${activeTab === "general" ? " np-tab--active" : ""}`} bindtap={() => setActiveTab("general")}>
|
|
516
|
+
<text className={`np-tabText${activeTab === "general" ? " np-tabText--active" : ""}`}>
|
|
1212
517
|
General
|
|
1213
518
|
</text>
|
|
1214
519
|
</view>
|
|
1215
|
-
<view className={tab
|
|
1216
|
-
<text className={tabText
|
|
520
|
+
<view className={`np-tab${activeTab === "request" ? " np-tab--active" : ""}`} bindtap={() => setActiveTab("request")}>
|
|
521
|
+
<text className={`np-tabText${activeTab === "request" ? " np-tabText--active" : ""}`}>
|
|
1217
522
|
Request
|
|
1218
523
|
</text>
|
|
1219
524
|
</view>
|
|
1220
|
-
<view className={tab
|
|
1221
|
-
<text className={tabText
|
|
525
|
+
<view className={`np-tab${activeTab === "response" ? " np-tab--active" : ""}`} bindtap={() => setActiveTab("response")}>
|
|
526
|
+
<text className={`np-tabText${activeTab === "response" ? " np-tabText--active" : ""}`}>
|
|
1222
527
|
Response
|
|
1223
528
|
</text>
|
|
1224
529
|
</view>
|
|
1225
530
|
</view>
|
|
1226
531
|
|
|
1227
532
|
{}
|
|
1228
|
-
<view className={tabContent
|
|
1229
|
-
{activeTab === "general" && <view className={table}>
|
|
1230
|
-
{getGeneralInfo(network).map((item) => <view key={item.key} className={tableRow}>
|
|
1231
|
-
<text className={tableKey}>{item.key}</text>
|
|
1232
|
-
<text className={tableValue}>
|
|
533
|
+
<view className={"np-tabContent"}>
|
|
534
|
+
{activeTab === "general" && <view className={"np-table"}>
|
|
535
|
+
{getGeneralInfo(network).map((item) => <view key={item.key} className={"np-tableRow"}>
|
|
536
|
+
<text className={"np-tableKey"}>{item.key}</text>
|
|
537
|
+
<text className={"np-tableValue"}>
|
|
1233
538
|
{item.value}
|
|
1234
539
|
</text>
|
|
1235
540
|
</view>)}
|
|
@@ -1242,47 +547,10 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
1242
547
|
</view>}
|
|
1243
548
|
</view>
|
|
1244
549
|
</list-item>)}
|
|
1245
|
-
</
|
|
550
|
+
</FadeList>}
|
|
1246
551
|
</view>;
|
|
1247
552
|
};
|
|
1248
553
|
|
|
1249
|
-
//#endregion
|
|
1250
|
-
//#region src/components/PerformancePanel.css.ts
|
|
1251
|
-
var clearButton = "PerformancePanel_clearButton__19p8bog3";
|
|
1252
|
-
var clearButtonText = "PerformancePanel_clearButtonText__19p8bog4";
|
|
1253
|
-
var container = "PerformancePanel_container__19p8bog0";
|
|
1254
|
-
var count = "PerformancePanel_count__19p8bog2";
|
|
1255
|
-
var detailTitle = "PerformancePanel_detailTitle__19p8bogw";
|
|
1256
|
-
var detailsContainer = "PerformancePanel_detailsContainer__19p8bogn";
|
|
1257
|
-
var entryName = "PerformancePanel_entryName__19p8bogf";
|
|
1258
|
-
var entryType = createRuntimeFn({
|
|
1259
|
-
defaultClassName: "PerformancePanel_entryType__19p8boga",
|
|
1260
|
-
variantClassNames: { type: {
|
|
1261
|
-
init: "PerformancePanel_entryType_type_init__19p8bogb",
|
|
1262
|
-
metric: "PerformancePanel_entryType_type_metric__19p8bogc",
|
|
1263
|
-
pipeline: "PerformancePanel_entryType_type_pipeline__19p8bogd",
|
|
1264
|
-
resource: "PerformancePanel_entryType_type_resource__19p8boge"
|
|
1265
|
-
} },
|
|
1266
|
-
defaultVariants: {},
|
|
1267
|
-
compoundVariants: []
|
|
1268
|
-
});
|
|
1269
|
-
var fcpHighlight = "PerformancePanel_fcpHighlight__19p8bogi";
|
|
1270
|
-
var fcpMetric = "PerformancePanel_fcpMetric__19p8bogq";
|
|
1271
|
-
var fcpMetricDescription = "PerformancePanel_fcpMetricDescription__19p8bogt";
|
|
1272
|
-
var fcpMetricHeader = "PerformancePanel_fcpMetricHeader__19p8bogh";
|
|
1273
|
-
var fcpMetricName = "PerformancePanel_fcpMetricName__19p8bogr";
|
|
1274
|
-
var fcpMetricValue = "PerformancePanel_fcpMetricValue__19p8bogs";
|
|
1275
|
-
var fcpSection = "PerformancePanel_fcpSection__19p8bogo";
|
|
1276
|
-
var header = "PerformancePanel_header__19p8bog1";
|
|
1277
|
-
var item = "PerformancePanel_item__19p8bog8";
|
|
1278
|
-
var itemHeader = "PerformancePanel_itemHeader__19p8bog9";
|
|
1279
|
-
var list = "PerformancePanel_list__19p8bog5";
|
|
1280
|
-
var placeholder = "PerformancePanel_placeholder__19p8bog6";
|
|
1281
|
-
var placeholderText = "PerformancePanel_placeholderText__19p8bog7";
|
|
1282
|
-
var rawEntry = "PerformancePanel_rawEntry__19p8bogx";
|
|
1283
|
-
var rawEntrySection = "PerformancePanel_rawEntrySection__19p8bogv";
|
|
1284
|
-
var timestamp = "PerformancePanel_timestamp__19p8bogg";
|
|
1285
|
-
|
|
1286
554
|
//#endregion
|
|
1287
555
|
//#region src/components/PerformancePanel.tsx
|
|
1288
556
|
const isMetricFcpEntry = (entry) => {
|
|
@@ -1312,9 +580,9 @@ const getPrimaryFcpLabel = (entry) => {
|
|
|
1312
580
|
};
|
|
1313
581
|
const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
1314
582
|
const [selectedId, setSelectedId] = (0, _lynx_js_react.useState)(null);
|
|
1315
|
-
if (performances.length === 0) return <view className={container}>
|
|
1316
|
-
<view className={header}>
|
|
1317
|
-
<text className={count}>0 entries</text>
|
|
583
|
+
if (performances.length === 0) return <view className={"pp-container"}>
|
|
584
|
+
<view className={"pp-header"}>
|
|
585
|
+
<text className={"pp-count"}>0 entries</text>
|
|
1318
586
|
<view bindtap={() => {
|
|
1319
587
|
console.log("[PerformancePanel] performances", performances);
|
|
1320
588
|
}} style={{
|
|
@@ -1323,93 +591,93 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1323
591
|
}}>
|
|
1324
592
|
<text>Log</text>
|
|
1325
593
|
</view>
|
|
1326
|
-
<view bindtap={clearPerformances} className={clearButton}>
|
|
1327
|
-
<text className={clearButtonText}
|
|
594
|
+
<view bindtap={clearPerformances} className={"pp-clearButton"}>
|
|
595
|
+
<text className={"pp-clearButtonText"}>🗑</text>
|
|
1328
596
|
</view>
|
|
1329
597
|
</view>
|
|
1330
|
-
<view className={placeholder}>
|
|
1331
|
-
<text className={placeholderText}>
|
|
598
|
+
<view className={"pp-placeholder"}>
|
|
599
|
+
<text className={"pp-placeholderText"}>
|
|
1332
600
|
No performance data yet...
|
|
1333
601
|
</text>
|
|
1334
602
|
</view>
|
|
1335
603
|
</view>;
|
|
1336
|
-
return <view className={container}>
|
|
1337
|
-
<view className={header}>
|
|
1338
|
-
<text className={count}>{performances.length} entries</text>
|
|
1339
|
-
<view bindtap={clearPerformances} className={clearButton}>
|
|
1340
|
-
<text className={clearButtonText}
|
|
604
|
+
return <view className={"pp-container"}>
|
|
605
|
+
<view className={"pp-header"}>
|
|
606
|
+
<text className={"pp-count"}>{performances.length} entries</text>
|
|
607
|
+
<view bindtap={clearPerformances} className={"pp-clearButton"}>
|
|
608
|
+
<text className={"pp-clearButtonText"}>🗑</text>
|
|
1341
609
|
</view>
|
|
1342
610
|
</view>
|
|
1343
611
|
|
|
1344
|
-
<
|
|
612
|
+
<FadeList className={"pp-list"}>
|
|
1345
613
|
{performances.map((perf) => {
|
|
1346
614
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
1347
615
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
1348
616
|
const primaryFcp = getPrimaryFcpLabel(perf);
|
|
1349
617
|
const { totalFcp, lynxFcp, fcp } = fcpMetrics ?? {};
|
|
1350
618
|
return <list-item key={perf.id} item-key={perf.id}>
|
|
1351
|
-
<view className={item}>
|
|
1352
|
-
<view className={itemHeader} bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1353
|
-
<text className={entryType
|
|
619
|
+
<view className={"pp-item"}>
|
|
620
|
+
<view className={"pp-itemHeader"} bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
621
|
+
<text className={`pp-entryType pp-entryType--${perf.entryType}`}>
|
|
1354
622
|
{perf.entryType}
|
|
1355
623
|
</text>
|
|
1356
|
-
<text className={entryName}>{perf.name}</text>
|
|
1357
|
-
<text className={timestamp}>
|
|
624
|
+
<text className={"pp-entryName"}>{perf.name}</text>
|
|
625
|
+
<text className={"pp-timestamp"}>
|
|
1358
626
|
{new Date(perf.timestamp).toISOString()}
|
|
1359
627
|
</text>
|
|
1360
628
|
</view>
|
|
1361
629
|
|
|
1362
630
|
<view bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1363
|
-
{isMetricFcp && primaryFcp && <text className={fcpHighlight}>{primaryFcp}</text>}
|
|
631
|
+
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight"}>{primaryFcp}</text>}
|
|
1364
632
|
</view>
|
|
1365
633
|
|
|
1366
|
-
{selectedId === perf.id && <view className={detailsContainer}>
|
|
1367
|
-
{isMetricFcp && fcpMetrics && <view className={fcpSection}>
|
|
1368
|
-
{totalFcp !== void 0 && <view className={fcpMetric}>
|
|
1369
|
-
<view className={fcpMetricHeader}>
|
|
1370
|
-
<text className={fcpMetricName}>
|
|
634
|
+
{selectedId === perf.id && <view className={"pp-detailsContainer"}>
|
|
635
|
+
{isMetricFcp && fcpMetrics && <view className={"pp-fcpSection"}>
|
|
636
|
+
{totalFcp !== void 0 && <view className={"pp-fcpMetric"}>
|
|
637
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
638
|
+
<text className={"pp-fcpMetricName"}>
|
|
1371
639
|
전체 FCP
|
|
1372
640
|
</text>
|
|
1373
|
-
<text className={fcpMetricValue}>
|
|
641
|
+
<text className={"pp-fcpMetricValue"}>
|
|
1374
642
|
{formatDuration(totalFcp.duration)}
|
|
1375
643
|
</text>
|
|
1376
644
|
</view>
|
|
1377
|
-
<text className={fcpMetricDescription}>
|
|
645
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1378
646
|
PrepareTemplate Start부터 Paint End 까지 걸리는
|
|
1379
647
|
시간
|
|
1380
648
|
</text>
|
|
1381
649
|
</view>}
|
|
1382
650
|
|
|
1383
|
-
{lynxFcp !== void 0 && <view className={fcpMetric}>
|
|
1384
|
-
<view className={fcpMetricHeader}>
|
|
1385
|
-
<text className={fcpMetricName}>LynxFCP</text>
|
|
1386
|
-
<text className={fcpMetricValue}>
|
|
651
|
+
{lynxFcp !== void 0 && <view className={"pp-fcpMetric"}>
|
|
652
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
653
|
+
<text className={"pp-fcpMetricName"}>LynxFCP</text>
|
|
654
|
+
<text className={"pp-fcpMetricValue"}>
|
|
1387
655
|
{formatDuration(lynxFcp.duration)}
|
|
1388
656
|
</text>
|
|
1389
657
|
</view>
|
|
1390
|
-
<text className={fcpMetricDescription}>
|
|
658
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1391
659
|
Bundle Load 시작부터 Paint End 까지 걸리는 시간
|
|
1392
660
|
</text>
|
|
1393
661
|
</view>}
|
|
1394
662
|
|
|
1395
|
-
{fcp !== void 0 && <view className={fcpMetric}>
|
|
1396
|
-
<view className={fcpMetricHeader}>
|
|
1397
|
-
<text className={fcpMetricName}>
|
|
663
|
+
{fcp !== void 0 && <view className={"pp-fcpMetric"}>
|
|
664
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
665
|
+
<text className={"pp-fcpMetricName"}>
|
|
1398
666
|
렌더링 FCP
|
|
1399
667
|
</text>
|
|
1400
|
-
<text className={fcpMetricValue}>
|
|
668
|
+
<text className={"pp-fcpMetricValue"}>
|
|
1401
669
|
{formatDuration(fcp.duration)}
|
|
1402
670
|
</text>
|
|
1403
671
|
</view>
|
|
1404
|
-
<text className={fcpMetricDescription}>
|
|
672
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1405
673
|
TemplateBundle 준비부터 Paint End 까지 걸리는 시간
|
|
1406
674
|
</text>
|
|
1407
675
|
</view>}
|
|
1408
676
|
</view>}
|
|
1409
677
|
|
|
1410
|
-
{!!perf.rawEntry && <view className={rawEntrySection}>
|
|
1411
|
-
<text className={detailTitle}>Raw Entry</text>
|
|
1412
|
-
<text className={rawEntry}>
|
|
678
|
+
{!!perf.rawEntry && <view className={"pp-rawEntrySection"}>
|
|
679
|
+
<text className={"pp-detailTitle"}>Raw Entry</text>
|
|
680
|
+
<text className={"pp-rawEntry"}>
|
|
1413
681
|
{String((0, javascript_stringify.stringify)(perf.rawEntry, null, 2, { references: true }))}
|
|
1414
682
|
</text>
|
|
1415
683
|
</view>}
|
|
@@ -1417,34 +685,19 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1417
685
|
</view>
|
|
1418
686
|
</list-item>;
|
|
1419
687
|
})}
|
|
1420
|
-
</
|
|
688
|
+
</FadeList>
|
|
1421
689
|
</view>;
|
|
1422
690
|
};
|
|
1423
691
|
|
|
1424
|
-
//#endregion
|
|
1425
|
-
//#region src/components/Tabs.css.ts
|
|
1426
|
-
var tabContent = "Tabs_tabContent__ud1j9z8";
|
|
1427
|
-
var tabContents = "Tabs_tabContents__ud1j9z7";
|
|
1428
|
-
var tabHeader = "Tabs_tabHeader__ud1j9z1";
|
|
1429
|
-
var tabTriggerButton = "Tabs_tabTriggerButton__ud1j9z2";
|
|
1430
|
-
var tabTriggerButtonText = createRuntimeFn({
|
|
1431
|
-
defaultClassName: "Tabs_tabTriggerButtonText__ud1j9z3",
|
|
1432
|
-
variantClassNames: { active: { true: "Tabs_tabTriggerButtonText_active_true__ud1j9z4" } },
|
|
1433
|
-
defaultVariants: {},
|
|
1434
|
-
compoundVariants: []
|
|
1435
|
-
});
|
|
1436
|
-
var tabTriggerIndicator = "Tabs_tabTriggerIndicator__ud1j9z5";
|
|
1437
|
-
var tabTriggerIndicatorLine = "Tabs_tabTriggerIndicatorLine__ud1j9z6";
|
|
1438
|
-
var tabs = "Tabs_tabs__ud1j9z0";
|
|
1439
|
-
|
|
1440
692
|
//#endregion
|
|
1441
693
|
//#region src/components/Tabs.tsx
|
|
1442
694
|
function Tabs(props) {
|
|
1443
695
|
const tabContentsRef = (0, _lynx_js_react.useRef)(null);
|
|
1444
696
|
const [activeIndex, setActiveIndex] = (0, _lynx_js_react.useState)(0);
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
697
|
+
const tabSize = props.items.length < 4 ? void 0 : `t${Math.max(1, 5 - (props.items.length - 3))}`;
|
|
698
|
+
return <view className={"tabs-root"}>
|
|
699
|
+
<view className={"tabs-header"}>
|
|
700
|
+
{props.items.map((item, i) => <view key={item.key} className={"tabs-triggerButton"} bindtap={() => {
|
|
1448
701
|
setActiveIndex(i);
|
|
1449
702
|
props.onTabChange?.();
|
|
1450
703
|
tabContentsRef.current?.invoke({
|
|
@@ -1455,22 +708,22 @@ function Tabs(props) {
|
|
|
1455
708
|
}
|
|
1456
709
|
}).exec();
|
|
1457
710
|
}}>
|
|
1458
|
-
<text className={
|
|
711
|
+
<text className={`tabs-triggerButtonText${i === activeIndex ? " tabs-triggerButtonText--active" : ""}${tabSize ? ` tabs-triggerButtonText--${tabSize}` : ""}`}>
|
|
1459
712
|
{item.label}
|
|
1460
713
|
</text>
|
|
1461
|
-
{i === 0 && <view className={
|
|
1462
|
-
<view className={
|
|
714
|
+
{i === 0 && <view className={"tabs-triggerIndicator"} style={{ transform: `translateX(${activeIndex * 100}%)` }}>
|
|
715
|
+
<view className={"tabs-triggerIndicatorLine"} />
|
|
1463
716
|
</view>}
|
|
1464
717
|
</view>)}
|
|
1465
718
|
</view>
|
|
1466
719
|
|
|
1467
|
-
<list ref={tabContentsRef} className={
|
|
720
|
+
<list ref={tabContentsRef} className={"tabs-contents"} scroll-orientation="horizontal" item-snap={{
|
|
1468
721
|
factor: 0,
|
|
1469
722
|
offset: 0
|
|
1470
723
|
}} bindscroll={() => props.onTabChange?.()} bindsnap={(e) => {
|
|
1471
724
|
setActiveIndex(e.detail.position);
|
|
1472
725
|
}} bounces={false} preload-buffer-count={props.items.length}>
|
|
1473
|
-
{props.items.map((item) => <list-item key={item.key} item-key={item.key} recyclable={false} className={
|
|
726
|
+
{props.items.map((item) => <list-item key={item.key} item-key={item.key} recyclable={false} className={"tabs-content"}>
|
|
1474
727
|
{item.renderContent()}
|
|
1475
728
|
</list-item>)}
|
|
1476
729
|
</list>
|
|
@@ -1479,41 +732,38 @@ function Tabs(props) {
|
|
|
1479
732
|
|
|
1480
733
|
//#endregion
|
|
1481
734
|
//#region src/components/ConsolePanel.tsx
|
|
1482
|
-
const ConsolePanel = () => {
|
|
735
|
+
const ConsolePanel = ({ customTabs }) => {
|
|
1483
736
|
const { logs, clearLogs } = useConsole();
|
|
1484
737
|
const { networks, clearNetworks } = useNetwork();
|
|
1485
738
|
const { performances, clearPerformances } = usePerformance();
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
739
|
+
const state = globalThis.__LYNX_CONSOLE__?.state;
|
|
740
|
+
const items = [];
|
|
741
|
+
if (state?.logs) items.push({
|
|
742
|
+
key: "log",
|
|
743
|
+
label: "Log",
|
|
744
|
+
renderContent: () => <LogPanel logs={logs} clearLogs={clearLogs} />
|
|
745
|
+
});
|
|
746
|
+
if (state?.networks) items.push({
|
|
747
|
+
key: "network",
|
|
748
|
+
label: "Network",
|
|
749
|
+
renderContent: () => <NetworkPanel networks={networks} clearNetworks={clearNetworks} />
|
|
750
|
+
});
|
|
751
|
+
if (state?.performances) items.push({
|
|
752
|
+
key: "performance",
|
|
753
|
+
label: "Perf",
|
|
754
|
+
renderContent: () => <PerformancePanel performances={performances} clearPerformances={clearPerformances} />
|
|
755
|
+
});
|
|
756
|
+
if (customTabs) for (const tab of customTabs) items.push({
|
|
757
|
+
key: tab.key,
|
|
758
|
+
label: tab.label,
|
|
759
|
+
renderContent: tab.renderContent
|
|
760
|
+
});
|
|
761
|
+
if (items.length === 0) return null;
|
|
762
|
+
return <view className="cp-container">
|
|
763
|
+
<Tabs onTabChange={dismissFilterDropdown} items={items} />
|
|
1504
764
|
</view>;
|
|
1505
765
|
};
|
|
1506
766
|
|
|
1507
|
-
//#endregion
|
|
1508
|
-
//#region src/components/FloatingButton.css.ts
|
|
1509
|
-
var button = "FloatingButton_button__1homwpu1";
|
|
1510
|
-
var reloadButton = "FloatingButton_reloadButton__1homwpu5";
|
|
1511
|
-
var reloadIcon = "FloatingButton_reloadIcon__1homwpu6";
|
|
1512
|
-
var shineOverlay = "FloatingButton_shineOverlay__1homwpu2";
|
|
1513
|
-
var subtitle = "FloatingButton_subtitle__1homwpu4";
|
|
1514
|
-
var title = "FloatingButton_title__1homwpu3";
|
|
1515
|
-
var wrapper = "FloatingButton_wrapper__1homwpu0";
|
|
1516
|
-
|
|
1517
767
|
//#endregion
|
|
1518
768
|
//#region src/hooks/useLongPressDrag.ts
|
|
1519
769
|
const LONG_PRESS_DURATION = 400;
|
|
@@ -1584,9 +834,9 @@ function useLongPressDrag(onTap) {
|
|
|
1584
834
|
bottom: isDragging ? tempBottom : bottom,
|
|
1585
835
|
clearTimer,
|
|
1586
836
|
handlers: {
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
837
|
+
catchtouchstart: handleTouchStart,
|
|
838
|
+
catchtouchmove: handleTouchMove,
|
|
839
|
+
catchtouchend: handleTouchEnd
|
|
1590
840
|
}
|
|
1591
841
|
};
|
|
1592
842
|
}
|
|
@@ -1621,24 +871,26 @@ const FloatingButton = ({ bindtap, children }) => {
|
|
|
1621
871
|
}
|
|
1622
872
|
};
|
|
1623
873
|
const isDragging = phase === "dragging";
|
|
1624
|
-
return
|
|
874
|
+
return <>
|
|
875
|
+
<view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1625
876
|
right: `${right}px`,
|
|
1626
877
|
bottom: `${bottom}px`,
|
|
1627
878
|
transform: isDragging ? "scale(1.05)" : "scale(1)"
|
|
1628
879
|
}} {...handlers}>
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
880
|
+
<view className={"fb-button"}>
|
|
881
|
+
{children}
|
|
882
|
+
<view className={"fb-shineOverlay"} style={SHINE_STYLES[phase]} />
|
|
883
|
+
</view>
|
|
884
|
+
<view className={"fb-reloadButton"} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
885
|
+
<text className={"fb-reloadIcon"}>{"↻"}</text>
|
|
886
|
+
</view>
|
|
1635
887
|
</view>
|
|
1636
|
-
|
|
888
|
+
</>;
|
|
1637
889
|
};
|
|
1638
890
|
|
|
1639
891
|
//#endregion
|
|
1640
892
|
//#region src/index.tsx
|
|
1641
|
-
const LynxConsole = (0, _lynx_js_react.forwardRef)(({ theme = "light", safeAreaInsetBottom = "50px" }, ref) => {
|
|
893
|
+
const LynxConsole = (0, _lynx_js_react.forwardRef)(({ theme = "light", safeAreaInsetBottom = "50px", customTabs }, ref) => {
|
|
1642
894
|
const [isOpen, setIsOpen] = (0, _lynx_js_react.useState)(false);
|
|
1643
895
|
const [shouldClose, setShouldClose] = (0, _lynx_js_react.useState)(false);
|
|
1644
896
|
const { performances } = usePerformance();
|
|
@@ -1670,16 +922,16 @@ const LynxConsole = (0, _lynx_js_react.forwardRef)(({ theme = "light", safeAreaI
|
|
|
1670
922
|
setIsOpen(false);
|
|
1671
923
|
setShouldClose(false);
|
|
1672
924
|
};
|
|
1673
|
-
const themeClass = `data-
|
|
925
|
+
const themeClass = `data-lynx-console-color-mode__${theme}-only`;
|
|
1674
926
|
return <view className={themeClass}>
|
|
1675
927
|
<FloatingButton bindtap={handleOpenBottomSheet}>
|
|
1676
|
-
<text className=
|
|
1677
|
-
<text className=
|
|
928
|
+
<text className="fb-title">LynxConsole</text>
|
|
929
|
+
<text className="fb-subtitle">
|
|
1678
930
|
{`${latestFcp?.name ?? "FCP"}: ${latestFcp?.duration ? latestFcp.duration.toFixed(2) : "--"}ms`}
|
|
1679
931
|
</text>
|
|
1680
932
|
</FloatingButton>
|
|
1681
933
|
{isOpen && <BottomSheet isOpen={isOpen} shouldClose={shouldClose} onClose={handleCloseBottomSheet} title="Lynx Console" safeAreaInsetBottom={safeAreaInsetBottom}>
|
|
1682
|
-
<ConsolePanel />
|
|
934
|
+
<ConsolePanel customTabs={customTabs} />
|
|
1683
935
|
</BottomSheet>}
|
|
1684
936
|
</view>;
|
|
1685
937
|
});
|