lynx-console 0.1.1 → 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 +183 -960
- 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 +183 -960
- 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 +10 -55
- package/{dist/assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css → src/components/FloatingButton.css} +22 -16
- package/src/components/FloatingButton.tsx +6 -6
- package/src/components/LogPanel.tsx +46 -47
- package/src/components/NetworkDetailSection.tsx +13 -13
- package/src/components/NetworkPanel.css +280 -0
- package/src/components/NetworkPanel.tsx +30 -50
- package/src/components/PerformancePanel.css +249 -0
- package/src/components/PerformancePanel.tsx +40 -40
- package/src/components/Tabs.css +78 -0
- package/src/components/Tabs.tsx +13 -11
- package/src/globals.d.ts +0 -5
- 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-DWdhFBJq.css +0 -337
- package/dist/assets/src/components/FadeList.css.ts.vanilla-sppTKMZj.css +0 -12
- package/dist/assets/src/components/NetworkPanel.css.ts.vanilla-BSE4s40D.css +0 -244
- package/dist/assets/src/components/PerformancePanel.css.ts.vanilla-Bb3zG5G8.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 -349
- package/src/components/FadeList.css.ts +0 -16
- package/src/components/FloatingButton.css.ts +0 -73
- package/src/components/NetworkPanel.css.ts +0 -277
- 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,50 +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-DWdhFBJq.css");
|
|
22
3
|
let javascript_stringify = require("javascript-stringify");
|
|
23
|
-
require("./assets/src/components/FadeList.css.ts.vanilla-sppTKMZj.css");
|
|
24
|
-
require("./assets/src/components/NetworkPanel.css.ts.vanilla-BSE4s40D.css");
|
|
25
|
-
require("./assets/src/components/PerformancePanel.css.ts.vanilla-Bb3zG5G8.css");
|
|
26
|
-
require("./assets/src/components/Tabs.css.ts.vanilla-DD7L2oXt.css");
|
|
27
|
-
require("./assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css");
|
|
28
|
-
|
|
29
|
-
//#region src/components/BottomSheet.css.ts
|
|
30
|
-
var backdrop = "BottomSheet_backdrop__5pjw6y1";
|
|
31
|
-
var body = "BottomSheet_body__5pjw6y7";
|
|
32
|
-
var content = "BottomSheet_content__5pjw6y2";
|
|
33
|
-
var footer = "BottomSheet_footer__5pjw6y8";
|
|
34
|
-
var handle = "BottomSheet_handle__5pjw6y4";
|
|
35
|
-
var handleContainer = "BottomSheet_handleContainer__5pjw6y3";
|
|
36
|
-
var header$2 = "BottomSheet_header__5pjw6y5";
|
|
37
|
-
var overlay = "BottomSheet_overlay__5pjw6y0";
|
|
38
|
-
var title$1 = "BottomSheet_title__5pjw6y6";
|
|
39
4
|
|
|
40
|
-
//#endregion
|
|
41
5
|
//#region src/components/BottomSheet.tsx
|
|
42
6
|
const MIN_HEIGHT = 200;
|
|
43
7
|
const MAX_HEIGHT = 700;
|
|
44
8
|
const DEFAULT_HEIGHT = 500;
|
|
45
9
|
const CLOSE_DRAG_THRESHOLD = 30;
|
|
46
10
|
let savedHeight = null;
|
|
47
|
-
function BottomSheet({ children, title, footer
|
|
11
|
+
function BottomSheet({ children, title, footer, onClose, isOpen, shouldClose = false, safeAreaInsetBottom = "25px" }) {
|
|
48
12
|
const [sheetHeight, setSheetHeight] = (0, _lynx_js_react.useState)(savedHeight ?? DEFAULT_HEIGHT);
|
|
49
13
|
const [tempHeight, setTempHeight] = (0, _lynx_js_react.useState)(savedHeight ?? DEFAULT_HEIGHT);
|
|
50
14
|
const [isDragging, setIsDragging] = (0, _lynx_js_react.useState)(false);
|
|
@@ -87,24 +51,24 @@ function BottomSheet({ children, title, footer: footer$1, onClose, isOpen, shoul
|
|
|
87
51
|
setSheetHeight(tempHeight);
|
|
88
52
|
if (dragDistance > CLOSE_DRAG_THRESHOLD) handleClose();
|
|
89
53
|
};
|
|
90
|
-
return <scroll-view className=
|
|
91
|
-
<view className=
|
|
92
|
-
<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={{
|
|
93
57
|
height: `${isDragging ? tempHeight : sheetHeight}px`,
|
|
94
58
|
transform: isOpening || isClosing ? "translateY(100%)" : "translateY(0)",
|
|
95
59
|
transition: isDragging ? "none" : void 0
|
|
96
60
|
}}>
|
|
97
61
|
{}
|
|
98
|
-
<view className=
|
|
99
|
-
<view className=
|
|
62
|
+
<view className="bs-handleContainer" bindtouchstart={handleTouchStart} bindtouchmove={handleTouchMove} bindtouchend={handleTouchEnd}>
|
|
63
|
+
<view className="bs-handle" />
|
|
100
64
|
</view>
|
|
101
|
-
<view className=
|
|
102
|
-
{title && <text className=
|
|
65
|
+
<view className="bs-header">
|
|
66
|
+
{title && <text className="bs-title">{title}</text>}
|
|
103
67
|
</view>
|
|
104
|
-
<view className=
|
|
68
|
+
<view className="bs-body" style={{ paddingBottom: safeAreaInsetBottom }}>
|
|
105
69
|
{children}
|
|
106
70
|
</view>
|
|
107
|
-
{footer
|
|
71
|
+
{footer && <view className="bs-footer">{footer}</view>}
|
|
108
72
|
</view>
|
|
109
73
|
</view>
|
|
110
74
|
</scroll-view>;
|
|
@@ -198,624 +162,14 @@ const usePerformance = () => {
|
|
|
198
162
|
};
|
|
199
163
|
};
|
|
200
164
|
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region ../node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js
|
|
203
|
-
function toPrimitive(t, r) {
|
|
204
|
-
if ("object" != typeof t || !t) return t;
|
|
205
|
-
var e = t[Symbol.toPrimitive];
|
|
206
|
-
if (void 0 !== e) {
|
|
207
|
-
var i = e.call(t, r || "default");
|
|
208
|
-
if ("object" != typeof i) return i;
|
|
209
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
210
|
-
}
|
|
211
|
-
return ("string" === r ? String : Number)(t);
|
|
212
|
-
}
|
|
213
|
-
function toPropertyKey(t) {
|
|
214
|
-
var i = toPrimitive(t, "string");
|
|
215
|
-
return "symbol" == typeof i ? i : String(i);
|
|
216
|
-
}
|
|
217
|
-
function _defineProperty(obj, key, value) {
|
|
218
|
-
key = toPropertyKey(key);
|
|
219
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
220
|
-
value,
|
|
221
|
-
enumerable: true,
|
|
222
|
-
configurable: true,
|
|
223
|
-
writable: true
|
|
224
|
-
});
|
|
225
|
-
else obj[key] = value;
|
|
226
|
-
return obj;
|
|
227
|
-
}
|
|
228
|
-
function ownKeys(e, r) {
|
|
229
|
-
var t = Object.keys(e);
|
|
230
|
-
if (Object.getOwnPropertySymbols) {
|
|
231
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
232
|
-
r && (o = o.filter(function(r) {
|
|
233
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
234
|
-
})), t.push.apply(t, o);
|
|
235
|
-
}
|
|
236
|
-
return t;
|
|
237
|
-
}
|
|
238
|
-
function _objectSpread2(e) {
|
|
239
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
240
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
241
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
242
|
-
_defineProperty(e, r, t[r]);
|
|
243
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
244
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
return e;
|
|
248
|
-
}
|
|
249
|
-
function mapValues(input, fn) {
|
|
250
|
-
var result = {};
|
|
251
|
-
for (var _key in input) result[_key] = fn(input[_key], _key);
|
|
252
|
-
return result;
|
|
253
|
-
}
|
|
254
|
-
var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
255
|
-
for (var key of Object.keys(compoundCheck)) {
|
|
256
|
-
var _selections$key;
|
|
257
|
-
if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) return false;
|
|
258
|
-
}
|
|
259
|
-
return true;
|
|
260
|
-
};
|
|
261
|
-
var createRuntimeFn = (config) => {
|
|
262
|
-
var runtimeFn = (options) => {
|
|
263
|
-
var className = config.defaultClassName;
|
|
264
|
-
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
265
|
-
for (var variantName in selections) {
|
|
266
|
-
var _selections$variantNa;
|
|
267
|
-
var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
268
|
-
if (variantSelection != null) {
|
|
269
|
-
var selection = variantSelection;
|
|
270
|
-
if (typeof selection === "boolean") selection = selection === true ? "true" : "false";
|
|
271
|
-
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
272
|
-
if (selectionClassName) className += " " + selectionClassName;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
for (var [compoundCheck, compoundClassName] of config.compoundVariants) if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += " " + compoundClassName;
|
|
276
|
-
return className;
|
|
277
|
-
};
|
|
278
|
-
runtimeFn.variants = () => Object.keys(config.variantClassNames);
|
|
279
|
-
runtimeFn.classNames = {
|
|
280
|
-
get base() {
|
|
281
|
-
return config.defaultClassName.split(" ")[0];
|
|
282
|
-
},
|
|
283
|
-
get variants() {
|
|
284
|
-
return mapValues(config.variantClassNames, (classNames) => mapValues(classNames, (className) => className.split(" ")[0]));
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
return runtimeFn;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
//#endregion
|
|
291
|
-
//#region src/components/ConsolePanel.css.ts
|
|
292
|
-
var argNull = "ConsolePanel_argNull__db6kuu18";
|
|
293
|
-
var argObject = "ConsolePanel_argObject__db6kuu1k";
|
|
294
|
-
var argObjectContent = "ConsolePanel_argObjectContent__db6kuu1n";
|
|
295
|
-
var argObjectHeader = "ConsolePanel_argObjectHeader__db6kuu1l";
|
|
296
|
-
var argObjectJson = "ConsolePanel_argObjectJson__db6kuu1q";
|
|
297
|
-
var argObjectPreview = "ConsolePanel_argObjectPreview__db6kuu1m";
|
|
298
|
-
var argPrimitive = createRuntimeFn({
|
|
299
|
-
defaultClassName: "ConsolePanel_argPrimitive__db6kuu1f",
|
|
300
|
-
variantClassNames: { level: {
|
|
301
|
-
log: "ConsolePanel_argPrimitive_level_log__db6kuu1g",
|
|
302
|
-
info: "ConsolePanel_argPrimitive_level_info__db6kuu1h",
|
|
303
|
-
warn: "ConsolePanel_argPrimitive_level_warn__db6kuu1i",
|
|
304
|
-
error: "ConsolePanel_argPrimitive_level_error__db6kuu1j"
|
|
305
|
-
} },
|
|
306
|
-
defaultVariants: {},
|
|
307
|
-
compoundVariants: []
|
|
308
|
-
});
|
|
309
|
-
var argString = createRuntimeFn({
|
|
310
|
-
defaultClassName: "ConsolePanel_argString__db6kuu1a",
|
|
311
|
-
variantClassNames: { level: {
|
|
312
|
-
log: "ConsolePanel_argString_level_log__db6kuu1b",
|
|
313
|
-
info: "ConsolePanel_argString_level_info__db6kuu1c",
|
|
314
|
-
warn: "ConsolePanel_argString_level_warn__db6kuu1d",
|
|
315
|
-
error: "ConsolePanel_argString_level_error__db6kuu1e"
|
|
316
|
-
} },
|
|
317
|
-
defaultVariants: {},
|
|
318
|
-
compoundVariants: []
|
|
319
|
-
});
|
|
320
|
-
var argUndefined = "ConsolePanel_argUndefined__db6kuu19";
|
|
321
|
-
var clearButton$2 = "ConsolePanel_clearButton__db6kuup";
|
|
322
|
-
var clearButtonText$2 = "ConsolePanel_clearButtonText__db6kuuq";
|
|
323
|
-
var container$2 = "ConsolePanel_container__db6kuu0";
|
|
324
|
-
var filterButton = "ConsolePanel_filterButton__db6kuu6";
|
|
325
|
-
var filterButtonText = "ConsolePanel_filterButtonText__db6kuu7";
|
|
326
|
-
var filterCheckbox = createRuntimeFn({
|
|
327
|
-
defaultClassName: "ConsolePanel_filterCheckbox__db6kuua",
|
|
328
|
-
variantClassNames: { level: {
|
|
329
|
-
log: "ConsolePanel_filterCheckbox_level_log__db6kuub",
|
|
330
|
-
info: "ConsolePanel_filterCheckbox_level_info__db6kuuc",
|
|
331
|
-
warn: "ConsolePanel_filterCheckbox_level_warn__db6kuud",
|
|
332
|
-
error: "ConsolePanel_filterCheckbox_level_error__db6kuue"
|
|
333
|
-
} },
|
|
334
|
-
defaultVariants: {},
|
|
335
|
-
compoundVariants: []
|
|
336
|
-
});
|
|
337
|
-
var filterDropdown = "ConsolePanel_filterDropdown__db6kuu8";
|
|
338
|
-
var filterLabel = createRuntimeFn({
|
|
339
|
-
defaultClassName: "ConsolePanel_filterLabel__db6kuuf",
|
|
340
|
-
variantClassNames: { level: {
|
|
341
|
-
log: "ConsolePanel_filterLabel_level_log__db6kuug",
|
|
342
|
-
info: "ConsolePanel_filterLabel_level_info__db6kuuh",
|
|
343
|
-
warn: "ConsolePanel_filterLabel_level_warn__db6kuui",
|
|
344
|
-
error: "ConsolePanel_filterLabel_level_error__db6kuuj"
|
|
345
|
-
} },
|
|
346
|
-
defaultVariants: {},
|
|
347
|
-
compoundVariants: []
|
|
348
|
-
});
|
|
349
|
-
var filterOption = "ConsolePanel_filterOption__db6kuu9";
|
|
350
|
-
var filterWrapper = "ConsolePanel_filterWrapper__db6kuu5";
|
|
351
|
-
var logArgItem = "ConsolePanel_logArgItem__db6kuu17";
|
|
352
|
-
var logArgsContainer = "ConsolePanel_logArgsContainer__db6kuu16";
|
|
353
|
-
var logContainer = "ConsolePanel_logContainer__db6kuu3";
|
|
354
|
-
var logHeader = "ConsolePanel_logHeader__db6kuu4";
|
|
355
|
-
var logItem = createRuntimeFn({
|
|
356
|
-
defaultClassName: "ConsolePanel_logItem__db6kuus",
|
|
357
|
-
variantClassNames: { level: {
|
|
358
|
-
log: "ConsolePanel_logItem_level_log__db6kuut",
|
|
359
|
-
info: "ConsolePanel_logItem_level_info__db6kuuu",
|
|
360
|
-
warn: "ConsolePanel_logItem_level_warn__db6kuuv",
|
|
361
|
-
error: "ConsolePanel_logItem_level_error__db6kuuw"
|
|
362
|
-
} },
|
|
363
|
-
defaultVariants: {},
|
|
364
|
-
compoundVariants: []
|
|
365
|
-
});
|
|
366
|
-
var logItemHeader = "ConsolePanel_logItemHeader__db6kuux";
|
|
367
|
-
var logLevel = createRuntimeFn({
|
|
368
|
-
defaultClassName: "ConsolePanel_logLevel__db6kuuy",
|
|
369
|
-
variantClassNames: { level: {
|
|
370
|
-
log: "ConsolePanel_logLevel_level_log__db6kuuz",
|
|
371
|
-
info: "ConsolePanel_logLevel_level_info__db6kuu10",
|
|
372
|
-
warn: "ConsolePanel_logLevel_level_warn__db6kuu11",
|
|
373
|
-
error: "ConsolePanel_logLevel_level_error__db6kuu12"
|
|
374
|
-
} },
|
|
375
|
-
defaultVariants: {},
|
|
376
|
-
compoundVariants: []
|
|
377
|
-
});
|
|
378
|
-
var logList = "ConsolePanel_logList__db6kuur";
|
|
379
|
-
var logTime = "ConsolePanel_logTime__db6kuu13";
|
|
380
|
-
var placeholder$2 = "ConsolePanel_placeholder__db6kuu1";
|
|
381
|
-
var placeholderText$2 = "ConsolePanel_placeholderText__db6kuu2";
|
|
382
|
-
var replInput = "ConsolePanel_replInput__db6kuu1t";
|
|
383
|
-
var replInputRow = "ConsolePanel_replInputRow__db6kuu1r";
|
|
384
|
-
var replPrompt = "ConsolePanel_replPrompt__db6kuu1s";
|
|
385
|
-
var replRunButton = "ConsolePanel_replRunButton__db6kuu1u";
|
|
386
|
-
var replRunButtonText = "ConsolePanel_replRunButtonText__db6kuu1v";
|
|
387
|
-
var searchClear = "ConsolePanel_searchClear__db6kuun";
|
|
388
|
-
var searchClearText = "ConsolePanel_searchClearText__db6kuuo";
|
|
389
|
-
var searchInput = "ConsolePanel_searchInput__db6kuum";
|
|
390
|
-
var searchPrompt = "ConsolePanel_searchPrompt__db6kuul";
|
|
391
|
-
var searchWrapper = "ConsolePanel_searchWrapper__db6kuuk";
|
|
392
|
-
var toggleIndicator = "ConsolePanel_toggleIndicator__db6kuu14";
|
|
393
|
-
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region src/styles/vars/color.ts
|
|
396
|
-
var color_exports = /* @__PURE__ */ __exportAll({
|
|
397
|
-
bg: () => bg,
|
|
398
|
-
fg: () => fg,
|
|
399
|
-
mannerTemp: () => mannerTemp,
|
|
400
|
-
palette: () => palette,
|
|
401
|
-
stroke: () => stroke
|
|
402
|
-
});
|
|
403
|
-
const palette = {
|
|
404
|
-
blue100: "var(--seed-color-palette-blue-100)",
|
|
405
|
-
blue200: "var(--seed-color-palette-blue-200)",
|
|
406
|
-
blue300: "var(--seed-color-palette-blue-300)",
|
|
407
|
-
blue400: "var(--seed-color-palette-blue-400)",
|
|
408
|
-
blue500: "var(--seed-color-palette-blue-500)",
|
|
409
|
-
blue600: "var(--seed-color-palette-blue-600)",
|
|
410
|
-
blue700: "var(--seed-color-palette-blue-700)",
|
|
411
|
-
blue800: "var(--seed-color-palette-blue-800)",
|
|
412
|
-
blue900: "var(--seed-color-palette-blue-900)",
|
|
413
|
-
blue1000: "var(--seed-color-palette-blue-1000)",
|
|
414
|
-
carrot100: "var(--seed-color-palette-carrot-100)",
|
|
415
|
-
carrot200: "var(--seed-color-palette-carrot-200)",
|
|
416
|
-
carrot300: "var(--seed-color-palette-carrot-300)",
|
|
417
|
-
carrot400: "var(--seed-color-palette-carrot-400)",
|
|
418
|
-
carrot500: "var(--seed-color-palette-carrot-500)",
|
|
419
|
-
carrot600: "var(--seed-color-palette-carrot-600)",
|
|
420
|
-
carrot700: "var(--seed-color-palette-carrot-700)",
|
|
421
|
-
carrot800: "var(--seed-color-palette-carrot-800)",
|
|
422
|
-
carrot900: "var(--seed-color-palette-carrot-900)",
|
|
423
|
-
carrot1000: "var(--seed-color-palette-carrot-1000)",
|
|
424
|
-
gray00: "var(--seed-color-palette-gray-00)",
|
|
425
|
-
gray100: "var(--seed-color-palette-gray-100)",
|
|
426
|
-
gray200: "var(--seed-color-palette-gray-200)",
|
|
427
|
-
gray300: "var(--seed-color-palette-gray-300)",
|
|
428
|
-
gray400: "var(--seed-color-palette-gray-400)",
|
|
429
|
-
gray500: "var(--seed-color-palette-gray-500)",
|
|
430
|
-
gray600: "var(--seed-color-palette-gray-600)",
|
|
431
|
-
gray700: "var(--seed-color-palette-gray-700)",
|
|
432
|
-
gray800: "var(--seed-color-palette-gray-800)",
|
|
433
|
-
gray900: "var(--seed-color-palette-gray-900)",
|
|
434
|
-
gray1000: "var(--seed-color-palette-gray-1000)",
|
|
435
|
-
green100: "var(--seed-color-palette-green-100)",
|
|
436
|
-
green200: "var(--seed-color-palette-green-200)",
|
|
437
|
-
green300: "var(--seed-color-palette-green-300)",
|
|
438
|
-
green400: "var(--seed-color-palette-green-400)",
|
|
439
|
-
green500: "var(--seed-color-palette-green-500)",
|
|
440
|
-
green600: "var(--seed-color-palette-green-600)",
|
|
441
|
-
green700: "var(--seed-color-palette-green-700)",
|
|
442
|
-
green800: "var(--seed-color-palette-green-800)",
|
|
443
|
-
green900: "var(--seed-color-palette-green-900)",
|
|
444
|
-
green1000: "var(--seed-color-palette-green-1000)",
|
|
445
|
-
purple100: "var(--seed-color-palette-purple-100)",
|
|
446
|
-
purple200: "var(--seed-color-palette-purple-200)",
|
|
447
|
-
purple300: "var(--seed-color-palette-purple-300)",
|
|
448
|
-
purple400: "var(--seed-color-palette-purple-400)",
|
|
449
|
-
purple500: "var(--seed-color-palette-purple-500)",
|
|
450
|
-
purple600: "var(--seed-color-palette-purple-600)",
|
|
451
|
-
purple700: "var(--seed-color-palette-purple-700)",
|
|
452
|
-
purple800: "var(--seed-color-palette-purple-800)",
|
|
453
|
-
purple900: "var(--seed-color-palette-purple-900)",
|
|
454
|
-
purple1000: "var(--seed-color-palette-purple-1000)",
|
|
455
|
-
red100: "var(--seed-color-palette-red-100)",
|
|
456
|
-
red200: "var(--seed-color-palette-red-200)",
|
|
457
|
-
red300: "var(--seed-color-palette-red-300)",
|
|
458
|
-
red400: "var(--seed-color-palette-red-400)",
|
|
459
|
-
red500: "var(--seed-color-palette-red-500)",
|
|
460
|
-
red600: "var(--seed-color-palette-red-600)",
|
|
461
|
-
red700: "var(--seed-color-palette-red-700)",
|
|
462
|
-
red800: "var(--seed-color-palette-red-800)",
|
|
463
|
-
red900: "var(--seed-color-palette-red-900)",
|
|
464
|
-
red1000: "var(--seed-color-palette-red-1000)",
|
|
465
|
-
staticBlack: "var(--seed-color-palette-static-black)",
|
|
466
|
-
staticWhite: "var(--seed-color-palette-static-white)",
|
|
467
|
-
staticBlackAlpha100: "var(--seed-color-palette-static-black-alpha-100)",
|
|
468
|
-
staticBlackAlpha200: "var(--seed-color-palette-static-black-alpha-200)",
|
|
469
|
-
staticBlackAlpha300: "var(--seed-color-palette-static-black-alpha-300)",
|
|
470
|
-
staticBlackAlpha400: "var(--seed-color-palette-static-black-alpha-400)",
|
|
471
|
-
staticBlackAlpha500: "var(--seed-color-palette-static-black-alpha-500)",
|
|
472
|
-
staticBlackAlpha600: "var(--seed-color-palette-static-black-alpha-600)",
|
|
473
|
-
staticBlackAlpha700: "var(--seed-color-palette-static-black-alpha-700)",
|
|
474
|
-
staticBlackAlpha800: "var(--seed-color-palette-static-black-alpha-800)",
|
|
475
|
-
staticBlackAlpha900: "var(--seed-color-palette-static-black-alpha-900)",
|
|
476
|
-
staticBlackAlpha1000: "var(--seed-color-palette-static-black-alpha-1000)",
|
|
477
|
-
staticWhiteAlpha50: "var(--seed-color-palette-static-white-alpha-50)",
|
|
478
|
-
staticWhiteAlpha100: "var(--seed-color-palette-static-white-alpha-100)",
|
|
479
|
-
staticWhiteAlpha200: "var(--seed-color-palette-static-white-alpha-200)",
|
|
480
|
-
staticWhiteAlpha300: "var(--seed-color-palette-static-white-alpha-300)",
|
|
481
|
-
staticWhiteAlpha400: "var(--seed-color-palette-static-white-alpha-400)",
|
|
482
|
-
staticWhiteAlpha500: "var(--seed-color-palette-static-white-alpha-500)",
|
|
483
|
-
staticWhiteAlpha600: "var(--seed-color-palette-static-white-alpha-600)",
|
|
484
|
-
staticWhiteAlpha700: "var(--seed-color-palette-static-white-alpha-700)",
|
|
485
|
-
staticWhiteAlpha800: "var(--seed-color-palette-static-white-alpha-800)",
|
|
486
|
-
staticWhiteAlpha900: "var(--seed-color-palette-static-white-alpha-900)",
|
|
487
|
-
staticWhiteAlpha1000: "var(--seed-color-palette-static-white-alpha-1000)",
|
|
488
|
-
yellow100: "var(--seed-color-palette-yellow-100)",
|
|
489
|
-
yellow200: "var(--seed-color-palette-yellow-200)",
|
|
490
|
-
yellow300: "var(--seed-color-palette-yellow-300)",
|
|
491
|
-
yellow400: "var(--seed-color-palette-yellow-400)",
|
|
492
|
-
yellow500: "var(--seed-color-palette-yellow-500)",
|
|
493
|
-
yellow600: "var(--seed-color-palette-yellow-600)",
|
|
494
|
-
yellow700: "var(--seed-color-palette-yellow-700)",
|
|
495
|
-
yellow800: "var(--seed-color-palette-yellow-800)",
|
|
496
|
-
yellow900: "var(--seed-color-palette-yellow-900)",
|
|
497
|
-
yellow1000: "var(--seed-color-palette-yellow-1000)"
|
|
498
|
-
};
|
|
499
|
-
const fg = {
|
|
500
|
-
neutral: "var(--seed-color-fg-neutral)",
|
|
501
|
-
placeholder: "var(--seed-color-fg-placeholder)",
|
|
502
|
-
disabled: "var(--seed-color-fg-disabled)",
|
|
503
|
-
brand: "var(--seed-color-fg-brand)",
|
|
504
|
-
informative: "var(--seed-color-fg-informative)",
|
|
505
|
-
critical: "var(--seed-color-fg-critical)",
|
|
506
|
-
positive: "var(--seed-color-fg-positive)",
|
|
507
|
-
warning: "var(--seed-color-fg-warning)",
|
|
508
|
-
brandContrast: "var(--seed-color-fg-brand-contrast)",
|
|
509
|
-
criticalContrast: "var(--seed-color-fg-critical-contrast)",
|
|
510
|
-
informativeContrast: "var(--seed-color-fg-informative-contrast)",
|
|
511
|
-
neutralMuted: "var(--seed-color-fg-neutral-muted)",
|
|
512
|
-
neutralSubtle: "var(--seed-color-fg-neutral-subtle)",
|
|
513
|
-
neutralInverted: "var(--seed-color-fg-neutral-inverted)",
|
|
514
|
-
positiveContrast: "var(--seed-color-fg-positive-contrast)",
|
|
515
|
-
warningContrast: "var(--seed-color-fg-warning-contrast)"
|
|
516
|
-
};
|
|
517
|
-
const bg = {
|
|
518
|
-
overlay: "var(--seed-color-bg-overlay)",
|
|
519
|
-
disabled: "var(--seed-color-bg-disabled)",
|
|
520
|
-
brandWeak: "var(--seed-color-bg-brand-weak)",
|
|
521
|
-
brandSolid: "var(--seed-color-bg-brand-solid)",
|
|
522
|
-
brandSolidPressed: "var(--seed-color-bg-brand-solid-pressed)",
|
|
523
|
-
brandWeakPressed: "var(--seed-color-bg-brand-weak-pressed)",
|
|
524
|
-
criticalWeak: "var(--seed-color-bg-critical-weak)",
|
|
525
|
-
criticalSolid: "var(--seed-color-bg-critical-solid)",
|
|
526
|
-
criticalSolidPressed: "var(--seed-color-bg-critical-solid-pressed)",
|
|
527
|
-
criticalWeakPressed: "var(--seed-color-bg-critical-weak-pressed)",
|
|
528
|
-
informativeWeak: "var(--seed-color-bg-informative-weak)",
|
|
529
|
-
informativeSolid: "var(--seed-color-bg-informative-solid)",
|
|
530
|
-
informativeSolidPressed: "var(--seed-color-bg-informative-solid-pressed)",
|
|
531
|
-
informativeWeakPressed: "var(--seed-color-bg-informative-weak-pressed)",
|
|
532
|
-
layerBasement: "var(--seed-color-bg-layer-basement)",
|
|
533
|
-
layerDefault: "var(--seed-color-bg-layer-default)",
|
|
534
|
-
layerFill: "var(--seed-color-bg-layer-fill)",
|
|
535
|
-
layerFloating: "var(--seed-color-bg-layer-floating)",
|
|
536
|
-
layerDefaultPressed: "var(--seed-color-bg-layer-default-pressed)",
|
|
537
|
-
layerFloatingPressed: "var(--seed-color-bg-layer-floating-pressed)",
|
|
538
|
-
magicWeak: "var(--seed-color-bg-magic-weak)",
|
|
539
|
-
neutralWeak: "var(--seed-color-bg-neutral-weak)",
|
|
540
|
-
neutralInverted: "var(--seed-color-bg-neutral-inverted)",
|
|
541
|
-
neutralSolid: "var(--seed-color-bg-neutral-solid)",
|
|
542
|
-
neutralInvertedPressed: "var(--seed-color-bg-neutral-inverted-pressed)",
|
|
543
|
-
neutralSolidMuted: "var(--seed-color-bg-neutral-solid-muted)",
|
|
544
|
-
neutralSolidMutedPressed: "var(--seed-color-bg-neutral-solid-muted-pressed)",
|
|
545
|
-
neutralWeakPressed: "var(--seed-color-bg-neutral-weak-pressed)",
|
|
546
|
-
overlayMuted: "var(--seed-color-bg-overlay-muted)",
|
|
547
|
-
positiveWeak: "var(--seed-color-bg-positive-weak)",
|
|
548
|
-
positiveSolid: "var(--seed-color-bg-positive-solid)",
|
|
549
|
-
positiveSolidPressed: "var(--seed-color-bg-positive-solid-pressed)",
|
|
550
|
-
positiveWeakPressed: "var(--seed-color-bg-positive-weak-pressed)",
|
|
551
|
-
warningWeak: "var(--seed-color-bg-warning-weak)",
|
|
552
|
-
warningSolid: "var(--seed-color-bg-warning-solid)",
|
|
553
|
-
warningSolidPressed: "var(--seed-color-bg-warning-solid-pressed)",
|
|
554
|
-
warningWeakPressed: "var(--seed-color-bg-warning-weak-pressed)"
|
|
555
|
-
};
|
|
556
|
-
const stroke = {
|
|
557
|
-
brandWeak: "var(--seed-color-stroke-brand-weak)",
|
|
558
|
-
brandSolid: "var(--seed-color-stroke-brand-solid)",
|
|
559
|
-
criticalWeak: "var(--seed-color-stroke-critical-weak)",
|
|
560
|
-
criticalSolid: "var(--seed-color-stroke-critical-solid)",
|
|
561
|
-
informativeWeak: "var(--seed-color-stroke-informative-weak)",
|
|
562
|
-
informativeSolid: "var(--seed-color-stroke-informative-solid)",
|
|
563
|
-
neutralContrast: "var(--seed-color-stroke-neutral-contrast)",
|
|
564
|
-
neutralSolid: "var(--seed-color-stroke-neutral-solid)",
|
|
565
|
-
neutralWeak: "var(--seed-color-stroke-neutral-weak)",
|
|
566
|
-
neutralMuted: "var(--seed-color-stroke-neutral-muted)",
|
|
567
|
-
neutralSubtle: "var(--seed-color-stroke-neutral-subtle)",
|
|
568
|
-
positiveWeak: "var(--seed-color-stroke-positive-weak)",
|
|
569
|
-
positiveSolid: "var(--seed-color-stroke-positive-solid)",
|
|
570
|
-
warningWeak: "var(--seed-color-stroke-warning-weak)",
|
|
571
|
-
warningSolid: "var(--seed-color-stroke-warning-solid)"
|
|
572
|
-
};
|
|
573
|
-
const mannerTemp = {
|
|
574
|
-
l1: {
|
|
575
|
-
text: "var(--seed-color-manner-temp-l1-text)",
|
|
576
|
-
bg: "var(--seed-color-manner-temp-l1-bg)"
|
|
577
|
-
},
|
|
578
|
-
l2: {
|
|
579
|
-
text: "var(--seed-color-manner-temp-l2-text)",
|
|
580
|
-
bg: "var(--seed-color-manner-temp-l2-bg)"
|
|
581
|
-
},
|
|
582
|
-
l3: {
|
|
583
|
-
text: "var(--seed-color-manner-temp-l3-text)",
|
|
584
|
-
bg: "var(--seed-color-manner-temp-l3-bg)"
|
|
585
|
-
},
|
|
586
|
-
l4: {
|
|
587
|
-
text: "var(--seed-color-manner-temp-l4-text)",
|
|
588
|
-
bg: "var(--seed-color-manner-temp-l4-bg)"
|
|
589
|
-
},
|
|
590
|
-
l5: {
|
|
591
|
-
text: "var(--seed-color-manner-temp-l5-text)",
|
|
592
|
-
bg: "var(--seed-color-manner-temp-l5-bg)"
|
|
593
|
-
},
|
|
594
|
-
l6: {
|
|
595
|
-
text: "var(--seed-color-manner-temp-l6-text)",
|
|
596
|
-
bg: "var(--seed-color-manner-temp-l6-bg)"
|
|
597
|
-
},
|
|
598
|
-
l7: {
|
|
599
|
-
text: "var(--seed-color-manner-temp-l7-text)",
|
|
600
|
-
bg: "var(--seed-color-manner-temp-l7-bg)"
|
|
601
|
-
},
|
|
602
|
-
l8: {
|
|
603
|
-
text: "var(--seed-color-manner-temp-l8-text)",
|
|
604
|
-
bg: "var(--seed-color-manner-temp-l8-bg)"
|
|
605
|
-
},
|
|
606
|
-
l9: {
|
|
607
|
-
text: "var(--seed-color-manner-temp-l9-text)",
|
|
608
|
-
bg: "var(--seed-color-manner-temp-l9-bg)"
|
|
609
|
-
},
|
|
610
|
-
l10: {
|
|
611
|
-
text: "var(--seed-color-manner-temp-l10-text)",
|
|
612
|
-
bg: "var(--seed-color-manner-temp-l10-bg)"
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
//#endregion
|
|
617
|
-
//#region src/styles/vars/dimension.ts
|
|
618
|
-
var dimension_exports = /* @__PURE__ */ __exportAll({
|
|
619
|
-
lineHeight: () => lineHeight,
|
|
620
|
-
spacingX: () => spacingX,
|
|
621
|
-
spacingY: () => spacingY,
|
|
622
|
-
t1: () => t1,
|
|
623
|
-
t10: () => t10,
|
|
624
|
-
t10Static: () => t10Static,
|
|
625
|
-
t1Static: () => t1Static,
|
|
626
|
-
t2: () => t2,
|
|
627
|
-
t2Static: () => t2Static,
|
|
628
|
-
t3: () => t3,
|
|
629
|
-
t3Static: () => t3Static,
|
|
630
|
-
t4: () => t4,
|
|
631
|
-
t4Static: () => t4Static,
|
|
632
|
-
t5: () => t5,
|
|
633
|
-
t5Static: () => t5Static,
|
|
634
|
-
t6: () => t6,
|
|
635
|
-
t6Static: () => t6Static,
|
|
636
|
-
t7: () => t7,
|
|
637
|
-
t7Static: () => t7Static,
|
|
638
|
-
t8: () => t8,
|
|
639
|
-
t8Static: () => t8Static,
|
|
640
|
-
t9: () => t9,
|
|
641
|
-
t9Static: () => t9Static,
|
|
642
|
-
x0_5: () => x0_5,
|
|
643
|
-
x1: () => x1,
|
|
644
|
-
x10: () => x10,
|
|
645
|
-
x12: () => x12,
|
|
646
|
-
x13: () => x13,
|
|
647
|
-
x14: () => x14,
|
|
648
|
-
x16: () => x16,
|
|
649
|
-
x1_5: () => x1_5,
|
|
650
|
-
x2: () => x2,
|
|
651
|
-
x2_5: () => x2_5,
|
|
652
|
-
x3: () => x3,
|
|
653
|
-
x3_5: () => x3_5,
|
|
654
|
-
x4: () => x4,
|
|
655
|
-
x4_5: () => x4_5,
|
|
656
|
-
x5: () => x5,
|
|
657
|
-
x6: () => x6,
|
|
658
|
-
x7: () => x7,
|
|
659
|
-
x8: () => x8,
|
|
660
|
-
x9: () => x9
|
|
661
|
-
});
|
|
662
|
-
const x0_5 = "var(--seed-dimension-x0_5)";
|
|
663
|
-
const x1 = "var(--seed-dimension-x1)";
|
|
664
|
-
const x1_5 = "var(--seed-dimension-x1_5)";
|
|
665
|
-
const x2 = "var(--seed-dimension-x2)";
|
|
666
|
-
const x2_5 = "var(--seed-dimension-x2_5)";
|
|
667
|
-
const x3 = "var(--seed-dimension-x3)";
|
|
668
|
-
const x3_5 = "var(--seed-dimension-x3_5)";
|
|
669
|
-
const x4 = "var(--seed-dimension-x4)";
|
|
670
|
-
const x4_5 = "var(--seed-dimension-x4_5)";
|
|
671
|
-
const x5 = "var(--seed-dimension-x5)";
|
|
672
|
-
const x6 = "var(--seed-dimension-x6)";
|
|
673
|
-
const x7 = "var(--seed-dimension-x7)";
|
|
674
|
-
const x8 = "var(--seed-dimension-x8)";
|
|
675
|
-
const x9 = "var(--seed-dimension-x9)";
|
|
676
|
-
const x10 = "var(--seed-dimension-x10)";
|
|
677
|
-
const x12 = "var(--seed-dimension-x12)";
|
|
678
|
-
const x13 = "var(--seed-dimension-x13)";
|
|
679
|
-
const x14 = "var(--seed-dimension-x14)";
|
|
680
|
-
const x16 = "var(--seed-dimension-x16)";
|
|
681
|
-
const spacingX = {
|
|
682
|
-
betweenChips: "var(--seed-dimension-spacing-x-between-chips)",
|
|
683
|
-
globalGutter: "var(--seed-dimension-spacing-x-global-gutter)"
|
|
684
|
-
};
|
|
685
|
-
const spacingY = {
|
|
686
|
-
componentDefault: "var(--seed-dimension-spacing-y-component-default)",
|
|
687
|
-
navToTitle: "var(--seed-dimension-spacing-y-nav-to-title)",
|
|
688
|
-
screenBottom: "var(--seed-dimension-spacing-y-screen-bottom)",
|
|
689
|
-
betweenText: "var(--seed-dimension-spacing-y-between-text)"
|
|
690
|
-
};
|
|
691
|
-
const t1 = "var(--seed-font-size-t1)";
|
|
692
|
-
const t2 = "var(--seed-font-size-t2)";
|
|
693
|
-
const t3 = "var(--seed-font-size-t3)";
|
|
694
|
-
const t4 = "var(--seed-font-size-t4)";
|
|
695
|
-
const t5 = "var(--seed-font-size-t5)";
|
|
696
|
-
const t6 = "var(--seed-font-size-t6)";
|
|
697
|
-
const t7 = "var(--seed-font-size-t7)";
|
|
698
|
-
const t8 = "var(--seed-font-size-t8)";
|
|
699
|
-
const t9 = "var(--seed-font-size-t9)";
|
|
700
|
-
const t10 = "var(--seed-font-size-t10)";
|
|
701
|
-
const t1Static = "var(--seed-font-size-t1-static)";
|
|
702
|
-
const t2Static = "var(--seed-font-size-t2-static)";
|
|
703
|
-
const t3Static = "var(--seed-font-size-t3-static)";
|
|
704
|
-
const t4Static = "var(--seed-font-size-t4-static)";
|
|
705
|
-
const t5Static = "var(--seed-font-size-t5-static)";
|
|
706
|
-
const t6Static = "var(--seed-font-size-t6-static)";
|
|
707
|
-
const t7Static = "var(--seed-font-size-t7-static)";
|
|
708
|
-
const t8Static = "var(--seed-font-size-t8-static)";
|
|
709
|
-
const t9Static = "var(--seed-font-size-t9-static)";
|
|
710
|
-
const t10Static = "var(--seed-font-size-t10-static)";
|
|
711
|
-
const lineHeight = {
|
|
712
|
-
t1: "var(--seed-line-height-t1)",
|
|
713
|
-
t2: "var(--seed-line-height-t2)",
|
|
714
|
-
t3: "var(--seed-line-height-t3)",
|
|
715
|
-
t4: "var(--seed-line-height-t4)",
|
|
716
|
-
t5: "var(--seed-line-height-t5)",
|
|
717
|
-
t6: "var(--seed-line-height-t6)",
|
|
718
|
-
t7: "var(--seed-line-height-t7)",
|
|
719
|
-
t8: "var(--seed-line-height-t8)",
|
|
720
|
-
t9: "var(--seed-line-height-t9)",
|
|
721
|
-
t10: "var(--seed-line-height-t10)",
|
|
722
|
-
t1Static: "var(--seed-line-height-t1-static)",
|
|
723
|
-
t2Static: "var(--seed-line-height-t2-static)",
|
|
724
|
-
t3Static: "var(--seed-line-height-t3-static)",
|
|
725
|
-
t4Static: "var(--seed-line-height-t4-static)",
|
|
726
|
-
t5Static: "var(--seed-line-height-t5-static)",
|
|
727
|
-
t6Static: "var(--seed-line-height-t6-static)",
|
|
728
|
-
t7Static: "var(--seed-line-height-t7-static)",
|
|
729
|
-
t8Static: "var(--seed-line-height-t8-static)",
|
|
730
|
-
t9Static: "var(--seed-line-height-t9-static)",
|
|
731
|
-
t10Static: "var(--seed-line-height-t10-static)"
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region src/styles/vars/radius.ts
|
|
736
|
-
var radius_exports = /* @__PURE__ */ __exportAll({
|
|
737
|
-
full: () => full,
|
|
738
|
-
r0_5: () => r0_5,
|
|
739
|
-
r1: () => r1,
|
|
740
|
-
r1_5: () => r1_5,
|
|
741
|
-
r2: () => r2,
|
|
742
|
-
r2_5: () => r2_5,
|
|
743
|
-
r3: () => r3,
|
|
744
|
-
r3_5: () => r3_5,
|
|
745
|
-
r4: () => r4,
|
|
746
|
-
r5: () => r5,
|
|
747
|
-
r6: () => r6
|
|
748
|
-
});
|
|
749
|
-
const r0_5 = "var(--seed-radius-r0_5)";
|
|
750
|
-
const r1 = "var(--seed-radius-r1)";
|
|
751
|
-
const r1_5 = "var(--seed-radius-r1_5)";
|
|
752
|
-
const r2 = "var(--seed-radius-r2)";
|
|
753
|
-
const r2_5 = "var(--seed-radius-r2_5)";
|
|
754
|
-
const r3 = "var(--seed-radius-r3)";
|
|
755
|
-
const r3_5 = "var(--seed-radius-r3_5)";
|
|
756
|
-
const r4 = "var(--seed-radius-r4)";
|
|
757
|
-
const r5 = "var(--seed-radius-r5)";
|
|
758
|
-
const r6 = "var(--seed-radius-r6)";
|
|
759
|
-
const full = "var(--seed-radius-full)";
|
|
760
|
-
|
|
761
|
-
//#endregion
|
|
762
|
-
//#region src/styles/vars/index.ts
|
|
763
|
-
const vars = {
|
|
764
|
-
$color: color_exports,
|
|
765
|
-
$dimension: dimension_exports,
|
|
766
|
-
$radius: radius_exports,
|
|
767
|
-
$fontWeight: {
|
|
768
|
-
regular: "var(--seed-font-weight-regular)",
|
|
769
|
-
medium: "var(--seed-font-weight-medium)",
|
|
770
|
-
bold: "var(--seed-font-weight-bold)"
|
|
771
|
-
},
|
|
772
|
-
$duration: {
|
|
773
|
-
d1: "var(--seed-duration-d1)",
|
|
774
|
-
d2: "var(--seed-duration-d2)",
|
|
775
|
-
d3: "var(--seed-duration-d3)",
|
|
776
|
-
d4: "var(--seed-duration-d4)",
|
|
777
|
-
d5: "var(--seed-duration-d5)",
|
|
778
|
-
d6: "var(--seed-duration-d6)"
|
|
779
|
-
}
|
|
780
|
-
};
|
|
781
|
-
|
|
782
|
-
//#endregion
|
|
783
|
-
//#region src/components/FadeList.css.ts
|
|
784
|
-
var fadeBottom = "FadeList_fadeBottom__uvxsyd1";
|
|
785
|
-
var fadeTop = "FadeList_fadeTop__uvxsyd0";
|
|
786
|
-
|
|
787
165
|
//#endregion
|
|
788
166
|
//#region src/components/FadeList.tsx
|
|
789
167
|
const FadeList = ({ className, listRef: externalListRef, children, ...listProps }) => {
|
|
790
|
-
const [fadeState, setFadeState] = (0, _lynx_js_react.useState)({
|
|
791
|
-
atTop: true,
|
|
792
|
-
atBottom: true
|
|
793
|
-
});
|
|
794
|
-
const fadeRef = (0, _lynx_js_react.useRef)({
|
|
795
|
-
atTop: true,
|
|
796
|
-
atBottom: true
|
|
797
|
-
});
|
|
798
168
|
const internalListRef = (0, _lynx_js_react.useRef)(null);
|
|
799
169
|
const listRef = externalListRef ?? internalListRef;
|
|
800
|
-
return
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
const { scrollTop, scrollHeight, listHeight } = e.detail;
|
|
804
|
-
const atTop = scrollTop <= 10;
|
|
805
|
-
const atBottom = scrollTop + listHeight >= scrollHeight - 10;
|
|
806
|
-
if (atTop !== fadeRef.current.atTop || atBottom !== fadeRef.current.atBottom) {
|
|
807
|
-
fadeRef.current.atTop = atTop;
|
|
808
|
-
fadeRef.current.atBottom = atBottom;
|
|
809
|
-
setFadeState({
|
|
810
|
-
atTop,
|
|
811
|
-
atBottom
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
}} {...listProps}>
|
|
815
|
-
{children}
|
|
816
|
-
</list>
|
|
817
|
-
<view className={fadeBottom} style={{ background: fadeState.atBottom ? "linear-gradient(to top, #ffffff00, #ffffff00)" : `linear-gradient(to top, ${vars.$color.bg.layerFloating}, #ffffff00)` }} />
|
|
818
|
-
</>;
|
|
170
|
+
return <list ref={listRef} scroll-orientation="vertical" className={className} {...listProps}>
|
|
171
|
+
{children}
|
|
172
|
+
</list>;
|
|
819
173
|
};
|
|
820
174
|
|
|
821
175
|
//#endregion
|
|
@@ -923,23 +277,23 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
923
277
|
const renderArg = (arg, parentKey, level) => {
|
|
924
278
|
const key = parentKey;
|
|
925
279
|
const isExpanded = expandedArgs.has(key);
|
|
926
|
-
if (arg === null) return <text className={argNull}>null</text>;
|
|
927
|
-
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>;
|
|
928
282
|
if (typeof arg === "string") {
|
|
929
283
|
const MAX_LENGTH = 80;
|
|
930
|
-
if (!(arg.length > MAX_LENGTH)) return <text className={argString
|
|
931
|
-
return <view className={argObject}>
|
|
932
|
-
<view className={argObjectHeader} bindtap={() => toggleArg(key)}>
|
|
933
|
-
<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"}>
|
|
934
288
|
{isExpanded ? "▼" : "▶"}
|
|
935
289
|
</text>
|
|
936
|
-
<text className={argString
|
|
290
|
+
<text className={`cp-argString cp-argString--${level}`}>
|
|
937
291
|
{isExpanded ? arg : `${arg.slice(0, MAX_LENGTH)}...`}
|
|
938
292
|
</text>
|
|
939
293
|
</view>
|
|
940
294
|
</view>;
|
|
941
295
|
}
|
|
942
|
-
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>;
|
|
943
297
|
if (typeof arg === "object") {
|
|
944
298
|
let preview = "Object";
|
|
945
299
|
if (Array.isArray(arg)) preview = `Array(${arg.length})`;
|
|
@@ -953,50 +307,50 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
953
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}`;
|
|
954
308
|
else if (arg instanceof Set) jsonString = `{\n${Array.from(arg.values()).map((v) => (0, javascript_stringify.stringify)(v)).join(", ")}\n}`;
|
|
955
309
|
else jsonString = (0, javascript_stringify.stringify)(arg, null, 2, { references: true }) ?? String(arg);
|
|
956
|
-
return <view className={argObject}>
|
|
957
|
-
<view className={argObjectHeader} bindtap={() => toggleArg(key)}>
|
|
958
|
-
<text className={toggleIndicator}>
|
|
310
|
+
return <view className={"cp-argObject"}>
|
|
311
|
+
<view className={"cp-argObjectHeader"} bindtap={() => toggleArg(key)}>
|
|
312
|
+
<text className={"cp-toggleIndicator"}>
|
|
959
313
|
{isExpanded ? "▼" : "▶"}
|
|
960
314
|
</text>
|
|
961
|
-
<text className={argObjectPreview}>{preview}</text>
|
|
315
|
+
<text className={"cp-argObjectPreview"}>{preview}</text>
|
|
962
316
|
</view>
|
|
963
|
-
{isExpanded && <view className={argObjectContent}>
|
|
964
|
-
<text className={argObjectJson}>{jsonString}</text>
|
|
317
|
+
{isExpanded && <view className={"cp-argObjectContent"}>
|
|
318
|
+
<text className={"cp-argObjectJson"}>{jsonString}</text>
|
|
965
319
|
</view>}
|
|
966
320
|
</view>;
|
|
967
321
|
}
|
|
968
|
-
return <text className={argPrimitive
|
|
322
|
+
return <text className={`cp-argPrimitive cp-argPrimitive--${level}`}>{String(arg)}</text>;
|
|
969
323
|
};
|
|
970
|
-
return <view className={logContainer} bindtap={() => {
|
|
324
|
+
return <view className={"cp-logContainer"} bindtap={() => {
|
|
971
325
|
if (filterOpen) setFilterOpen(false);
|
|
972
326
|
}}>
|
|
973
|
-
<view className={logHeader}>
|
|
974
|
-
<view className={filterWrapper}>
|
|
975
|
-
<view className={filterButton} catchtap={() => setFilterOpen((v) => !v)}>
|
|
976
|
-
<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>
|
|
977
331
|
</view>
|
|
978
|
-
{filterOpen && <view className={filterDropdown} catchtap={() => {}}>
|
|
979
|
-
{LOG_LEVELS.map((level) => <view key={level} className={filterOption} bindtap={() => toggleLevel(level)}>
|
|
980
|
-
<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}`}>
|
|
981
335
|
{enabledLevels.has(level) ? "✅" : "⬜"}
|
|
982
336
|
</text>
|
|
983
|
-
<text className={filterLabel
|
|
337
|
+
<text className={`cp-filterLabel cp-filterLabel--${level}`}>
|
|
984
338
|
{level.toUpperCase()}
|
|
985
339
|
</text>
|
|
986
340
|
</view>)}
|
|
987
341
|
</view>}
|
|
988
342
|
</view>
|
|
989
|
-
<view className={searchWrapper}>
|
|
990
|
-
<text className={searchPrompt}>{"›"}</text>
|
|
991
|
-
<input ref={searchInputRef} className={searchInput} placeholder="Search logs..." bindinput={(e) => setSearchQuery(e.detail.value)} />
|
|
992
|
-
{searchQuery.length > 0 && <view className={searchClear} bindtap={() => {
|
|
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={() => {
|
|
993
347
|
setSearchQuery("");
|
|
994
348
|
searchInputRef.current?.invoke({
|
|
995
349
|
method: "setValue",
|
|
996
350
|
params: { value: "" }
|
|
997
351
|
}).exec();
|
|
998
352
|
}}>
|
|
999
|
-
<text className={searchClearText}>✕</text>
|
|
353
|
+
<text className={"cp-searchClearText"}>✕</text>
|
|
1000
354
|
</view>}
|
|
1001
355
|
</view>
|
|
1002
356
|
<view style={{
|
|
@@ -1004,31 +358,31 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
1004
358
|
flexDirection: "row",
|
|
1005
359
|
gap: 8
|
|
1006
360
|
}}>
|
|
1007
|
-
<view className={clearButton
|
|
1008
|
-
<text className={clearButtonText
|
|
361
|
+
<view className={"cp-clearButton"} bindtap={clearLogs}>
|
|
362
|
+
<text className={"cp-clearButtonText"}>🗑</text>
|
|
1009
363
|
</view>
|
|
1010
364
|
</view>
|
|
1011
365
|
</view>
|
|
1012
|
-
<FadeList listRef={listRef} className={logList} preload-buffer-count={10} initial-scroll-index={Math.max(0, filteredLogs.length - 1)}>
|
|
366
|
+
<FadeList listRef={listRef} className={"cp-logList"} preload-buffer-count={10} initial-scroll-index={Math.max(0, filteredLogs.length - 1)}>
|
|
1013
367
|
{filteredLogs.length === 0 ? <list-item item-key="empty-state">
|
|
1014
|
-
<view className={placeholder
|
|
1015
|
-
<text className={placeholderText
|
|
368
|
+
<view className={"cp-placeholder"}>
|
|
369
|
+
<text className={"cp-placeholderText"}>
|
|
1016
370
|
No logs yet. Try console.log("Hello!")
|
|
1017
371
|
</text>
|
|
1018
372
|
</view>
|
|
1019
373
|
</list-item> : filteredLogs.map((log) => {
|
|
1020
374
|
return <list-item key={log.id} item-key={log.id}>
|
|
1021
|
-
<view className={logItem
|
|
1022
|
-
<view className={logItemHeader}>
|
|
1023
|
-
<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}`}>
|
|
1024
378
|
{log.level.toUpperCase()}
|
|
1025
379
|
</text>
|
|
1026
|
-
<text className={logTime}>
|
|
380
|
+
<text className={"cp-logTime"}>
|
|
1027
381
|
{new Date(log.timestamp).toISOString()}
|
|
1028
382
|
</text>
|
|
1029
383
|
</view>
|
|
1030
|
-
<view className={logArgsContainer}>
|
|
1031
|
-
{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"}>
|
|
1032
386
|
{renderArg(arg, `${log.id}-${index.toString()}`, log.level)}
|
|
1033
387
|
</view>)}
|
|
1034
388
|
</view>
|
|
@@ -1036,113 +390,37 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
1036
390
|
</list-item>;
|
|
1037
391
|
})}
|
|
1038
392
|
</FadeList>
|
|
1039
|
-
<view className={replInputRow}>
|
|
1040
|
-
<text className={replPrompt}>{"›"}</text>
|
|
1041
|
-
<input ref={inputRef} className={replInput} placeholder="enter code..." bindinput={(e) => setCode(e.detail.value)} bindconfirm={handleRun} />
|
|
1042
|
-
<view className={replRunButton} bindtap={handleRun}>
|
|
1043
|
-
<text className={replRunButtonText}>Run</text>
|
|
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>
|
|
1044
398
|
</view>
|
|
1045
399
|
</view>
|
|
1046
400
|
</view>;
|
|
1047
401
|
};
|
|
1048
402
|
|
|
1049
|
-
//#endregion
|
|
1050
|
-
//#region src/components/NetworkPanel.css.ts
|
|
1051
|
-
var bodyText = "NetworkPanel_bodyText__1kf6i8q16";
|
|
1052
|
-
var clearButton$1 = "NetworkPanel_clearButton__1kf6i8q3";
|
|
1053
|
-
var clearButtonText$1 = "NetworkPanel_clearButtonText__1kf6i8q4";
|
|
1054
|
-
var container$1 = "NetworkPanel_container__1kf6i8q0";
|
|
1055
|
-
var count$1 = "NetworkPanel_count__1kf6i8q2";
|
|
1056
|
-
var detailSection = "NetworkPanel_detailSection__1kf6i8q10";
|
|
1057
|
-
var detailSectionTitle = "NetworkPanel_detailSectionTitle__1kf6i8q11";
|
|
1058
|
-
var detailsContainer$1 = "NetworkPanel_detailsContainer__1kf6i8qr";
|
|
1059
|
-
var emptyText = "NetworkPanel_emptyText__1kf6i8q18";
|
|
1060
|
-
var errorText = "NetworkPanel_errorText__1kf6i8q17";
|
|
1061
|
-
var header$1 = "NetworkPanel_header__1kf6i8q1";
|
|
1062
|
-
var item$1 = createRuntimeFn({
|
|
1063
|
-
defaultClassName: "NetworkPanel_item__1kf6i8q8",
|
|
1064
|
-
variantClassNames: { status: {
|
|
1065
|
-
pending: "NetworkPanel_item_status_pending__1kf6i8q9",
|
|
1066
|
-
success: "NetworkPanel_item_status_success__1kf6i8qa",
|
|
1067
|
-
error: "NetworkPanel_item_status_error__1kf6i8qb"
|
|
1068
|
-
} },
|
|
1069
|
-
defaultVariants: {},
|
|
1070
|
-
compoundVariants: []
|
|
1071
|
-
});
|
|
1072
|
-
var itemHeader$1 = "NetworkPanel_itemHeader__1kf6i8qc";
|
|
1073
|
-
var list$1 = "NetworkPanel_list__1kf6i8q5";
|
|
1074
|
-
var method = createRuntimeFn({
|
|
1075
|
-
defaultClassName: "NetworkPanel_method__1kf6i8qd",
|
|
1076
|
-
variantClassNames: { type: {
|
|
1077
|
-
GET: "NetworkPanel_method_type_GET__1kf6i8qe",
|
|
1078
|
-
POST: "NetworkPanel_method_type_POST__1kf6i8qf",
|
|
1079
|
-
PUT: "NetworkPanel_method_type_PUT__1kf6i8qg",
|
|
1080
|
-
PATCH: "NetworkPanel_method_type_PATCH__1kf6i8qh",
|
|
1081
|
-
DELETE: "NetworkPanel_method_type_DELETE__1kf6i8qi"
|
|
1082
|
-
} },
|
|
1083
|
-
defaultVariants: {},
|
|
1084
|
-
compoundVariants: []
|
|
1085
|
-
});
|
|
1086
|
-
var path = "NetworkPanel_path__1kf6i8qp";
|
|
1087
|
-
var placeholder$1 = "NetworkPanel_placeholder__1kf6i8q6";
|
|
1088
|
-
var placeholderText$1 = "NetworkPanel_placeholderText__1kf6i8q7";
|
|
1089
|
-
var statusCode = createRuntimeFn({
|
|
1090
|
-
defaultClassName: "NetworkPanel_statusCode__1kf6i8qj",
|
|
1091
|
-
variantClassNames: { type: {
|
|
1092
|
-
success: "NetworkPanel_statusCode_type_success__1kf6i8qk",
|
|
1093
|
-
error: "NetworkPanel_statusCode_type_error__1kf6i8ql",
|
|
1094
|
-
pending: "NetworkPanel_statusCode_type_pending__1kf6i8qm"
|
|
1095
|
-
} },
|
|
1096
|
-
defaultVariants: {},
|
|
1097
|
-
compoundVariants: []
|
|
1098
|
-
});
|
|
1099
|
-
var tab = createRuntimeFn({
|
|
1100
|
-
defaultClassName: "NetworkPanel_tab__1kf6i8qt",
|
|
1101
|
-
variantClassNames: { active: {
|
|
1102
|
-
true: "NetworkPanel_tab_active_true__1kf6i8qu",
|
|
1103
|
-
false: "NetworkPanel_tab_active_false__1kf6i8qv"
|
|
1104
|
-
} },
|
|
1105
|
-
defaultVariants: {},
|
|
1106
|
-
compoundVariants: []
|
|
1107
|
-
});
|
|
1108
|
-
var tabContent$1 = "NetworkPanel_tabContent__1kf6i8qz";
|
|
1109
|
-
var tabText = createRuntimeFn({
|
|
1110
|
-
defaultClassName: "NetworkPanel_tabText__1kf6i8qw",
|
|
1111
|
-
variantClassNames: { active: {
|
|
1112
|
-
true: "NetworkPanel_tabText_active_true__1kf6i8qx",
|
|
1113
|
-
false: "NetworkPanel_tabText_active_false__1kf6i8qy"
|
|
1114
|
-
} },
|
|
1115
|
-
defaultVariants: {},
|
|
1116
|
-
compoundVariants: []
|
|
1117
|
-
});
|
|
1118
|
-
var table = "NetworkPanel_table__1kf6i8q12";
|
|
1119
|
-
var tableKey = "NetworkPanel_tableKey__1kf6i8q14";
|
|
1120
|
-
var tableRow = "NetworkPanel_tableRow__1kf6i8q13";
|
|
1121
|
-
var tableValue = "NetworkPanel_tableValue__1kf6i8q15";
|
|
1122
|
-
var tabs$1 = "NetworkPanel_tabs__1kf6i8qs";
|
|
1123
|
-
var time = "NetworkPanel_time__1kf6i8qn";
|
|
1124
|
-
|
|
1125
403
|
//#endregion
|
|
1126
404
|
//#region src/components/NetworkDetailSection.tsx
|
|
1127
405
|
const NetworkDetailSection = ({ headers = {}, body = "", error = "" }) => {
|
|
1128
406
|
return <>
|
|
1129
407
|
{}
|
|
1130
|
-
<view className={detailSection}>
|
|
1131
|
-
<text className={detailSectionTitle}>Headers</text>
|
|
1132
|
-
{headers && Object.keys(headers).length > 0 ? <view className={table}>
|
|
1133
|
-
{Object.entries(headers).map(([key, value]) => <view key={key} className={tableRow}>
|
|
1134
|
-
<text className={tableKey}>{key}</text>
|
|
1135
|
-
<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>
|
|
1136
414
|
</view>)}
|
|
1137
|
-
</view> : <text className={emptyText}>No headers</text>}
|
|
415
|
+
</view> : <text className={"np-emptyText"}>No headers</text>}
|
|
1138
416
|
</view>
|
|
1139
417
|
|
|
1140
418
|
{}
|
|
1141
|
-
<view className={detailSection}>
|
|
1142
|
-
<text className={detailSectionTitle}>Body</text>
|
|
1143
|
-
{error && <text className={errorText}>{error}</text>}
|
|
1144
|
-
{body && <text className={bodyText}>{body}</text>}
|
|
1145
|
-
{!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>}
|
|
1146
424
|
</view>
|
|
1147
425
|
</>;
|
|
1148
426
|
};
|
|
@@ -1196,67 +474,67 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
1196
474
|
if (statusCode && statusCode >= 200 && statusCode < 300) return "success";
|
|
1197
475
|
return "error";
|
|
1198
476
|
};
|
|
1199
|
-
return <view className={container
|
|
1200
|
-
<view className={header
|
|
1201
|
-
<text className={count
|
|
1202
|
-
<view className={clearButton
|
|
1203
|
-
<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>
|
|
1204
482
|
</view>
|
|
1205
483
|
</view>
|
|
1206
484
|
|
|
1207
|
-
{networks.length === 0 ? <view className={placeholder
|
|
1208
|
-
<text className={placeholderText
|
|
1209
|
-
</view> : <FadeList className={list
|
|
485
|
+
{networks.length === 0 ? <view className={"np-placeholder"}>
|
|
486
|
+
<text className={"np-placeholderText"}>No network requests yet</text>
|
|
487
|
+
</view> : <FadeList className={"np-list"}>
|
|
1210
488
|
{networks.map((network) => <list-item key={network.id} item-key={network.id}>
|
|
1211
|
-
<view className={item
|
|
1212
|
-
<view className={itemHeader
|
|
1213
|
-
<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}`}>
|
|
1214
492
|
{network.method}
|
|
1215
493
|
</text>
|
|
1216
|
-
{network.statusCode && <text className={statusCode
|
|
494
|
+
{network.statusCode && <text className={`np-statusCode np-statusCode--${getStatusCodeVariant(network.status, network.statusCode)}`}>
|
|
1217
495
|
{network.statusCode}
|
|
1218
496
|
</text>}
|
|
1219
|
-
{network.status === "pending" && <text className={statusCode
|
|
497
|
+
{network.status === "pending" && <text className={"np-statusCode np-statusCode--pending"}>
|
|
1220
498
|
Pending...
|
|
1221
499
|
</text>}
|
|
1222
|
-
<text className={time}>
|
|
500
|
+
<text className={"np-time"}>
|
|
1223
501
|
{formatDuration(network.duration)}
|
|
1224
502
|
</text>
|
|
1225
|
-
<text className={time}>
|
|
503
|
+
<text className={"np-time"}>
|
|
1226
504
|
{new Date(network.startTime).toISOString()}
|
|
1227
505
|
</text>
|
|
1228
506
|
</view>
|
|
1229
507
|
|
|
1230
|
-
<text className={path} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
508
|
+
<text className={"np-path"} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
1231
509
|
{extractPath(network.url)}
|
|
1232
510
|
</text>
|
|
1233
511
|
|
|
1234
|
-
{selectedId === network.id && <view className={detailsContainer
|
|
512
|
+
{selectedId === network.id && <view className={"np-detailsContainer"}>
|
|
1235
513
|
{}
|
|
1236
|
-
<view className={tabs
|
|
1237
|
-
<view className={tab
|
|
1238
|
-
<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" : ""}`}>
|
|
1239
517
|
General
|
|
1240
518
|
</text>
|
|
1241
519
|
</view>
|
|
1242
|
-
<view className={tab
|
|
1243
|
-
<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" : ""}`}>
|
|
1244
522
|
Request
|
|
1245
523
|
</text>
|
|
1246
524
|
</view>
|
|
1247
|
-
<view className={tab
|
|
1248
|
-
<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" : ""}`}>
|
|
1249
527
|
Response
|
|
1250
528
|
</text>
|
|
1251
529
|
</view>
|
|
1252
530
|
</view>
|
|
1253
531
|
|
|
1254
532
|
{}
|
|
1255
|
-
<view className={tabContent
|
|
1256
|
-
{activeTab === "general" && <view className={table}>
|
|
1257
|
-
{getGeneralInfo(network).map((item) => <view key={item.key} className={tableRow}>
|
|
1258
|
-
<text className={tableKey}>{item.key}</text>
|
|
1259
|
-
<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"}>
|
|
1260
538
|
{item.value}
|
|
1261
539
|
</text>
|
|
1262
540
|
</view>)}
|
|
@@ -1273,43 +551,6 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
1273
551
|
</view>;
|
|
1274
552
|
};
|
|
1275
553
|
|
|
1276
|
-
//#endregion
|
|
1277
|
-
//#region src/components/PerformancePanel.css.ts
|
|
1278
|
-
var clearButton = "PerformancePanel_clearButton__19p8bog3";
|
|
1279
|
-
var clearButtonText = "PerformancePanel_clearButtonText__19p8bog4";
|
|
1280
|
-
var container = "PerformancePanel_container__19p8bog0";
|
|
1281
|
-
var count = "PerformancePanel_count__19p8bog2";
|
|
1282
|
-
var detailTitle = "PerformancePanel_detailTitle__19p8bogw";
|
|
1283
|
-
var detailsContainer = "PerformancePanel_detailsContainer__19p8bogn";
|
|
1284
|
-
var entryName = "PerformancePanel_entryName__19p8bogf";
|
|
1285
|
-
var entryType = createRuntimeFn({
|
|
1286
|
-
defaultClassName: "PerformancePanel_entryType__19p8boga",
|
|
1287
|
-
variantClassNames: { type: {
|
|
1288
|
-
init: "PerformancePanel_entryType_type_init__19p8bogb",
|
|
1289
|
-
metric: "PerformancePanel_entryType_type_metric__19p8bogc",
|
|
1290
|
-
pipeline: "PerformancePanel_entryType_type_pipeline__19p8bogd",
|
|
1291
|
-
resource: "PerformancePanel_entryType_type_resource__19p8boge"
|
|
1292
|
-
} },
|
|
1293
|
-
defaultVariants: {},
|
|
1294
|
-
compoundVariants: []
|
|
1295
|
-
});
|
|
1296
|
-
var fcpHighlight = "PerformancePanel_fcpHighlight__19p8bogi";
|
|
1297
|
-
var fcpMetric = "PerformancePanel_fcpMetric__19p8bogq";
|
|
1298
|
-
var fcpMetricDescription = "PerformancePanel_fcpMetricDescription__19p8bogt";
|
|
1299
|
-
var fcpMetricHeader = "PerformancePanel_fcpMetricHeader__19p8bogh";
|
|
1300
|
-
var fcpMetricName = "PerformancePanel_fcpMetricName__19p8bogr";
|
|
1301
|
-
var fcpMetricValue = "PerformancePanel_fcpMetricValue__19p8bogs";
|
|
1302
|
-
var fcpSection = "PerformancePanel_fcpSection__19p8bogo";
|
|
1303
|
-
var header = "PerformancePanel_header__19p8bog1";
|
|
1304
|
-
var item = "PerformancePanel_item__19p8bog8";
|
|
1305
|
-
var itemHeader = "PerformancePanel_itemHeader__19p8bog9";
|
|
1306
|
-
var list = "PerformancePanel_list__19p8bog5";
|
|
1307
|
-
var placeholder = "PerformancePanel_placeholder__19p8bog6";
|
|
1308
|
-
var placeholderText = "PerformancePanel_placeholderText__19p8bog7";
|
|
1309
|
-
var rawEntry = "PerformancePanel_rawEntry__19p8bogx";
|
|
1310
|
-
var rawEntrySection = "PerformancePanel_rawEntrySection__19p8bogv";
|
|
1311
|
-
var timestamp = "PerformancePanel_timestamp__19p8bogg";
|
|
1312
|
-
|
|
1313
554
|
//#endregion
|
|
1314
555
|
//#region src/components/PerformancePanel.tsx
|
|
1315
556
|
const isMetricFcpEntry = (entry) => {
|
|
@@ -1339,9 +580,9 @@ const getPrimaryFcpLabel = (entry) => {
|
|
|
1339
580
|
};
|
|
1340
581
|
const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
1341
582
|
const [selectedId, setSelectedId] = (0, _lynx_js_react.useState)(null);
|
|
1342
|
-
if (performances.length === 0) return <view className={container}>
|
|
1343
|
-
<view className={header}>
|
|
1344
|
-
<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>
|
|
1345
586
|
<view bindtap={() => {
|
|
1346
587
|
console.log("[PerformancePanel] performances", performances);
|
|
1347
588
|
}} style={{
|
|
@@ -1350,93 +591,93 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1350
591
|
}}>
|
|
1351
592
|
<text>Log</text>
|
|
1352
593
|
</view>
|
|
1353
|
-
<view bindtap={clearPerformances} className={clearButton}>
|
|
1354
|
-
<text className={clearButtonText}>🗑</text>
|
|
594
|
+
<view bindtap={clearPerformances} className={"pp-clearButton"}>
|
|
595
|
+
<text className={"pp-clearButtonText"}>🗑</text>
|
|
1355
596
|
</view>
|
|
1356
597
|
</view>
|
|
1357
|
-
<view className={placeholder}>
|
|
1358
|
-
<text className={placeholderText}>
|
|
598
|
+
<view className={"pp-placeholder"}>
|
|
599
|
+
<text className={"pp-placeholderText"}>
|
|
1359
600
|
No performance data yet...
|
|
1360
601
|
</text>
|
|
1361
602
|
</view>
|
|
1362
603
|
</view>;
|
|
1363
|
-
return <view className={container}>
|
|
1364
|
-
<view className={header}>
|
|
1365
|
-
<text className={count}>{performances.length} entries</text>
|
|
1366
|
-
<view bindtap={clearPerformances} className={clearButton}>
|
|
1367
|
-
<text className={clearButtonText}>🗑</text>
|
|
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>
|
|
1368
609
|
</view>
|
|
1369
610
|
</view>
|
|
1370
611
|
|
|
1371
|
-
<FadeList className={list}>
|
|
612
|
+
<FadeList className={"pp-list"}>
|
|
1372
613
|
{performances.map((perf) => {
|
|
1373
614
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
1374
615
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
1375
616
|
const primaryFcp = getPrimaryFcpLabel(perf);
|
|
1376
617
|
const { totalFcp, lynxFcp, fcp } = fcpMetrics ?? {};
|
|
1377
618
|
return <list-item key={perf.id} item-key={perf.id}>
|
|
1378
|
-
<view className={item}>
|
|
1379
|
-
<view className={itemHeader} bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1380
|
-
<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}`}>
|
|
1381
622
|
{perf.entryType}
|
|
1382
623
|
</text>
|
|
1383
|
-
<text className={entryName}>{perf.name}</text>
|
|
1384
|
-
<text className={timestamp}>
|
|
624
|
+
<text className={"pp-entryName"}>{perf.name}</text>
|
|
625
|
+
<text className={"pp-timestamp"}>
|
|
1385
626
|
{new Date(perf.timestamp).toISOString()}
|
|
1386
627
|
</text>
|
|
1387
628
|
</view>
|
|
1388
629
|
|
|
1389
630
|
<view bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1390
|
-
{isMetricFcp && primaryFcp && <text className={fcpHighlight}>{primaryFcp}</text>}
|
|
631
|
+
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight"}>{primaryFcp}</text>}
|
|
1391
632
|
</view>
|
|
1392
633
|
|
|
1393
|
-
{selectedId === perf.id && <view className={detailsContainer}>
|
|
1394
|
-
{isMetricFcp && fcpMetrics && <view className={fcpSection}>
|
|
1395
|
-
{totalFcp !== void 0 && <view className={fcpMetric}>
|
|
1396
|
-
<view className={fcpMetricHeader}>
|
|
1397
|
-
<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"}>
|
|
1398
639
|
전체 FCP
|
|
1399
640
|
</text>
|
|
1400
|
-
<text className={fcpMetricValue}>
|
|
641
|
+
<text className={"pp-fcpMetricValue"}>
|
|
1401
642
|
{formatDuration(totalFcp.duration)}
|
|
1402
643
|
</text>
|
|
1403
644
|
</view>
|
|
1404
|
-
<text className={fcpMetricDescription}>
|
|
645
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1405
646
|
PrepareTemplate Start부터 Paint End 까지 걸리는
|
|
1406
647
|
시간
|
|
1407
648
|
</text>
|
|
1408
649
|
</view>}
|
|
1409
650
|
|
|
1410
|
-
{lynxFcp !== void 0 && <view className={fcpMetric}>
|
|
1411
|
-
<view className={fcpMetricHeader}>
|
|
1412
|
-
<text className={fcpMetricName}>LynxFCP</text>
|
|
1413
|
-
<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"}>
|
|
1414
655
|
{formatDuration(lynxFcp.duration)}
|
|
1415
656
|
</text>
|
|
1416
657
|
</view>
|
|
1417
|
-
<text className={fcpMetricDescription}>
|
|
658
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1418
659
|
Bundle Load 시작부터 Paint End 까지 걸리는 시간
|
|
1419
660
|
</text>
|
|
1420
661
|
</view>}
|
|
1421
662
|
|
|
1422
|
-
{fcp !== void 0 && <view className={fcpMetric}>
|
|
1423
|
-
<view className={fcpMetricHeader}>
|
|
1424
|
-
<text className={fcpMetricName}>
|
|
663
|
+
{fcp !== void 0 && <view className={"pp-fcpMetric"}>
|
|
664
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
665
|
+
<text className={"pp-fcpMetricName"}>
|
|
1425
666
|
렌더링 FCP
|
|
1426
667
|
</text>
|
|
1427
|
-
<text className={fcpMetricValue}>
|
|
668
|
+
<text className={"pp-fcpMetricValue"}>
|
|
1428
669
|
{formatDuration(fcp.duration)}
|
|
1429
670
|
</text>
|
|
1430
671
|
</view>
|
|
1431
|
-
<text className={fcpMetricDescription}>
|
|
672
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
1432
673
|
TemplateBundle 준비부터 Paint End 까지 걸리는 시간
|
|
1433
674
|
</text>
|
|
1434
675
|
</view>}
|
|
1435
676
|
</view>}
|
|
1436
677
|
|
|
1437
|
-
{!!perf.rawEntry && <view className={rawEntrySection}>
|
|
1438
|
-
<text className={detailTitle}>Raw Entry</text>
|
|
1439
|
-
<text className={rawEntry}>
|
|
678
|
+
{!!perf.rawEntry && <view className={"pp-rawEntrySection"}>
|
|
679
|
+
<text className={"pp-detailTitle"}>Raw Entry</text>
|
|
680
|
+
<text className={"pp-rawEntry"}>
|
|
1440
681
|
{String((0, javascript_stringify.stringify)(perf.rawEntry, null, 2, { references: true }))}
|
|
1441
682
|
</text>
|
|
1442
683
|
</view>}
|
|
@@ -1448,30 +689,15 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1448
689
|
</view>;
|
|
1449
690
|
};
|
|
1450
691
|
|
|
1451
|
-
//#endregion
|
|
1452
|
-
//#region src/components/Tabs.css.ts
|
|
1453
|
-
var tabContent = "Tabs_tabContent__ud1j9z8";
|
|
1454
|
-
var tabContents = "Tabs_tabContents__ud1j9z7";
|
|
1455
|
-
var tabHeader = "Tabs_tabHeader__ud1j9z1";
|
|
1456
|
-
var tabTriggerButton = "Tabs_tabTriggerButton__ud1j9z2";
|
|
1457
|
-
var tabTriggerButtonText = createRuntimeFn({
|
|
1458
|
-
defaultClassName: "Tabs_tabTriggerButtonText__ud1j9z3",
|
|
1459
|
-
variantClassNames: { active: { true: "Tabs_tabTriggerButtonText_active_true__ud1j9z4" } },
|
|
1460
|
-
defaultVariants: {},
|
|
1461
|
-
compoundVariants: []
|
|
1462
|
-
});
|
|
1463
|
-
var tabTriggerIndicator = "Tabs_tabTriggerIndicator__ud1j9z5";
|
|
1464
|
-
var tabTriggerIndicatorLine = "Tabs_tabTriggerIndicatorLine__ud1j9z6";
|
|
1465
|
-
var tabs = "Tabs_tabs__ud1j9z0";
|
|
1466
|
-
|
|
1467
692
|
//#endregion
|
|
1468
693
|
//#region src/components/Tabs.tsx
|
|
1469
694
|
function Tabs(props) {
|
|
1470
695
|
const tabContentsRef = (0, _lynx_js_react.useRef)(null);
|
|
1471
696
|
const [activeIndex, setActiveIndex] = (0, _lynx_js_react.useState)(0);
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
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={() => {
|
|
1475
701
|
setActiveIndex(i);
|
|
1476
702
|
props.onTabChange?.();
|
|
1477
703
|
tabContentsRef.current?.invoke({
|
|
@@ -1482,22 +708,22 @@ function Tabs(props) {
|
|
|
1482
708
|
}
|
|
1483
709
|
}).exec();
|
|
1484
710
|
}}>
|
|
1485
|
-
<text className={
|
|
711
|
+
<text className={`tabs-triggerButtonText${i === activeIndex ? " tabs-triggerButtonText--active" : ""}${tabSize ? ` tabs-triggerButtonText--${tabSize}` : ""}`}>
|
|
1486
712
|
{item.label}
|
|
1487
713
|
</text>
|
|
1488
|
-
{i === 0 && <view className={
|
|
1489
|
-
<view className={
|
|
714
|
+
{i === 0 && <view className={"tabs-triggerIndicator"} style={{ transform: `translateX(${activeIndex * 100}%)` }}>
|
|
715
|
+
<view className={"tabs-triggerIndicatorLine"} />
|
|
1490
716
|
</view>}
|
|
1491
717
|
</view>)}
|
|
1492
718
|
</view>
|
|
1493
719
|
|
|
1494
|
-
<list ref={tabContentsRef} className={
|
|
720
|
+
<list ref={tabContentsRef} className={"tabs-contents"} scroll-orientation="horizontal" item-snap={{
|
|
1495
721
|
factor: 0,
|
|
1496
722
|
offset: 0
|
|
1497
723
|
}} bindscroll={() => props.onTabChange?.()} bindsnap={(e) => {
|
|
1498
724
|
setActiveIndex(e.detail.position);
|
|
1499
725
|
}} bounces={false} preload-buffer-count={props.items.length}>
|
|
1500
|
-
{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"}>
|
|
1501
727
|
{item.renderContent()}
|
|
1502
728
|
</list-item>)}
|
|
1503
729
|
</list>
|
|
@@ -1506,41 +732,38 @@ function Tabs(props) {
|
|
|
1506
732
|
|
|
1507
733
|
//#endregion
|
|
1508
734
|
//#region src/components/ConsolePanel.tsx
|
|
1509
|
-
const ConsolePanel = () => {
|
|
735
|
+
const ConsolePanel = ({ customTabs }) => {
|
|
1510
736
|
const { logs, clearLogs } = useConsole();
|
|
1511
737
|
const { networks, clearNetworks } = useNetwork();
|
|
1512
738
|
const { performances, clearPerformances } = usePerformance();
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
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} />
|
|
1531
764
|
</view>;
|
|
1532
765
|
};
|
|
1533
766
|
|
|
1534
|
-
//#endregion
|
|
1535
|
-
//#region src/components/FloatingButton.css.ts
|
|
1536
|
-
var button = "FloatingButton_button__1homwpu1";
|
|
1537
|
-
var reloadButton = "FloatingButton_reloadButton__1homwpu5";
|
|
1538
|
-
var reloadIcon = "FloatingButton_reloadIcon__1homwpu6";
|
|
1539
|
-
var shineOverlay = "FloatingButton_shineOverlay__1homwpu2";
|
|
1540
|
-
var subtitle = "FloatingButton_subtitle__1homwpu4";
|
|
1541
|
-
var title = "FloatingButton_title__1homwpu3";
|
|
1542
|
-
var wrapper = "FloatingButton_wrapper__1homwpu0";
|
|
1543
|
-
|
|
1544
767
|
//#endregion
|
|
1545
768
|
//#region src/hooks/useLongPressDrag.ts
|
|
1546
769
|
const LONG_PRESS_DURATION = 400;
|
|
@@ -1649,17 +872,17 @@ const FloatingButton = ({ bindtap, children }) => {
|
|
|
1649
872
|
};
|
|
1650
873
|
const isDragging = phase === "dragging";
|
|
1651
874
|
return <>
|
|
1652
|
-
<view className={wrapper} consume-slide-event={[[-180, 180]]} style={{
|
|
875
|
+
<view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1653
876
|
right: `${right}px`,
|
|
1654
877
|
bottom: `${bottom}px`,
|
|
1655
878
|
transform: isDragging ? "scale(1.05)" : "scale(1)"
|
|
1656
879
|
}} {...handlers}>
|
|
1657
|
-
<view className={button}>
|
|
880
|
+
<view className={"fb-button"}>
|
|
1658
881
|
{children}
|
|
1659
|
-
<view className={shineOverlay} style={SHINE_STYLES[phase]} />
|
|
882
|
+
<view className={"fb-shineOverlay"} style={SHINE_STYLES[phase]} />
|
|
1660
883
|
</view>
|
|
1661
|
-
<view className={reloadButton} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
1662
|
-
<text className={reloadIcon}>{"↻"}</text>
|
|
884
|
+
<view className={"fb-reloadButton"} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
885
|
+
<text className={"fb-reloadIcon"}>{"↻"}</text>
|
|
1663
886
|
</view>
|
|
1664
887
|
</view>
|
|
1665
888
|
</>;
|
|
@@ -1667,7 +890,7 @@ const FloatingButton = ({ bindtap, children }) => {
|
|
|
1667
890
|
|
|
1668
891
|
//#endregion
|
|
1669
892
|
//#region src/index.tsx
|
|
1670
|
-
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) => {
|
|
1671
894
|
const [isOpen, setIsOpen] = (0, _lynx_js_react.useState)(false);
|
|
1672
895
|
const [shouldClose, setShouldClose] = (0, _lynx_js_react.useState)(false);
|
|
1673
896
|
const { performances } = usePerformance();
|
|
@@ -1699,16 +922,16 @@ const LynxConsole = (0, _lynx_js_react.forwardRef)(({ theme = "light", safeAreaI
|
|
|
1699
922
|
setIsOpen(false);
|
|
1700
923
|
setShouldClose(false);
|
|
1701
924
|
};
|
|
1702
|
-
const themeClass = `data-
|
|
925
|
+
const themeClass = `data-lynx-console-color-mode__${theme}-only`;
|
|
1703
926
|
return <view className={themeClass}>
|
|
1704
927
|
<FloatingButton bindtap={handleOpenBottomSheet}>
|
|
1705
|
-
<text className=
|
|
1706
|
-
<text className=
|
|
928
|
+
<text className="fb-title">LynxConsole</text>
|
|
929
|
+
<text className="fb-subtitle">
|
|
1707
930
|
{`${latestFcp?.name ?? "FCP"}: ${latestFcp?.duration ? latestFcp.duration.toFixed(2) : "--"}ms`}
|
|
1708
931
|
</text>
|
|
1709
932
|
</FloatingButton>
|
|
1710
933
|
{isOpen && <BottomSheet isOpen={isOpen} shouldClose={shouldClose} onClose={handleCloseBottomSheet} title="Lynx Console" safeAreaInsetBottom={safeAreaInsetBottom}>
|
|
1711
|
-
<ConsolePanel />
|
|
934
|
+
<ConsolePanel customTabs={customTabs} />
|
|
1712
935
|
</BottomSheet>}
|
|
1713
936
|
</view>;
|
|
1714
937
|
});
|