lynx-console 0.2.3 → 0.3.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 +87 -97
- package/dist/index.css +45 -243
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +87 -97
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/BottomSheet.css +2 -13
- package/src/components/BottomSheet.tsx +1 -1
- package/src/components/ConsolePanel.css +0 -84
- package/src/components/ConsolePanel.tsx +3 -2
- package/src/components/FloatingButton.css +1 -8
- package/src/components/FloatingButton.tsx +29 -35
- package/src/components/LogPanel.tsx +108 -47
- package/src/components/NetworkDetailSection.tsx +24 -12
- package/src/components/NetworkPanel.css +0 -53
- package/src/components/NetworkPanel.tsx +78 -34
- package/src/components/PerformancePanel.css +0 -64
- package/src/components/PerformancePanel.tsx +120 -48
- package/src/components/Tabs.css +1 -21
- package/src/components/Tabs.tsx +2 -2
- package/src/index.tsx +11 -2
- package/src/styles/ThemeContext.ts +1 -1
- package/src/styles/theme.ts +0 -14
- package/src/styles/tokens.css +40 -0
- package/src/components/FadeList.tsx +0 -31
- package/src/styles/getDimensionValue.ts +0 -7
package/dist/index.cjs
CHANGED
|
@@ -166,7 +166,7 @@ function BottomSheet({ children, title, footer, onClose, isOpen, shouldClose = f
|
|
|
166
166
|
<view className="bs-handle" style={{ backgroundColor: colors.palette.gray400 }} />
|
|
167
167
|
</view>
|
|
168
168
|
<view className="bs-header">
|
|
169
|
-
{title && <text className="bs-title" style={{
|
|
169
|
+
{title && <text className="bs-title t7" style={{
|
|
170
170
|
fontWeight: fontWeight.bold,
|
|
171
171
|
color: colors.fg.neutral
|
|
172
172
|
}}>
|
|
@@ -270,16 +270,6 @@ const usePerformance = () => {
|
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
//#endregion
|
|
274
|
-
//#region src/components/FadeList.tsx
|
|
275
|
-
const FadeList = ({ className, listRef: externalListRef, children, ...listProps }) => {
|
|
276
|
-
const internalListRef = (0, _lynx_js_react.useRef)(null);
|
|
277
|
-
const listRef = externalListRef ?? internalListRef;
|
|
278
|
-
return <list ref={listRef} scroll-orientation="vertical" className={className} {...listProps}>
|
|
279
|
-
{children}
|
|
280
|
-
</list>;
|
|
281
|
-
};
|
|
282
|
-
|
|
283
273
|
//#endregion
|
|
284
274
|
//#region src/components/LogPanel.tsx
|
|
285
275
|
const LOG_LEVELS = [
|
|
@@ -431,7 +421,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
431
421
|
const MAX_LENGTH = 80;
|
|
432
422
|
const shouldTruncate = arg.length > MAX_LENGTH;
|
|
433
423
|
const strColor = getStringColor(colors, level);
|
|
434
|
-
if (!shouldTruncate) return <text className={"cp-argString"} style={{
|
|
424
|
+
if (!shouldTruncate) return <text className={"cp-argString t3"} style={{
|
|
435
425
|
color: strColor,
|
|
436
426
|
fontWeight: fontWeight.regular
|
|
437
427
|
}}>
|
|
@@ -439,13 +429,13 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
439
429
|
</text>;
|
|
440
430
|
return <view className={"cp-argObject"}>
|
|
441
431
|
<view className={"cp-argObjectHeader"} bindtap={() => toggleArg(key)}>
|
|
442
|
-
<text className={"cp-toggleIndicator"} style={{
|
|
432
|
+
<text className={"cp-toggleIndicator t2"} style={{
|
|
443
433
|
color: colors.fg.neutralSubtle,
|
|
444
434
|
fontWeight: fontWeight.regular
|
|
445
435
|
}}>
|
|
446
436
|
{isExpanded ? "▼" : "▶"}
|
|
447
437
|
</text>
|
|
448
|
-
<text className={"cp-argString"} style={{
|
|
438
|
+
<text className={"cp-argString t3"} style={{
|
|
449
439
|
color: strColor,
|
|
450
440
|
fontWeight: fontWeight.regular
|
|
451
441
|
}}>
|
|
@@ -454,7 +444,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
454
444
|
</view>
|
|
455
445
|
</view>;
|
|
456
446
|
}
|
|
457
|
-
if (typeof arg === "number" || typeof arg === "boolean") return <text className={"cp-argPrimitive"} style={{
|
|
447
|
+
if (typeof arg === "number" || typeof arg === "boolean") return <text className={"cp-argPrimitive t3"} style={{
|
|
458
448
|
color: getPrimitiveColor(colors, level),
|
|
459
449
|
fontWeight: fontWeight.regular
|
|
460
450
|
}}>
|
|
@@ -475,13 +465,13 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
475
465
|
else jsonString = (0, javascript_stringify.stringify)(arg, null, 2, { references: true }) ?? String(arg);
|
|
476
466
|
return <view className={"cp-argObject"}>
|
|
477
467
|
<view className={"cp-argObjectHeader"} bindtap={() => toggleArg(key)}>
|
|
478
|
-
<text className={"cp-toggleIndicator"} style={{
|
|
468
|
+
<text className={"cp-toggleIndicator t2"} style={{
|
|
479
469
|
color: colors.fg.neutralSubtle,
|
|
480
470
|
fontWeight: fontWeight.regular
|
|
481
471
|
}}>
|
|
482
472
|
{isExpanded ? "▼" : "▶"}
|
|
483
473
|
</text>
|
|
484
|
-
<text className={"cp-argObjectPreview"} style={{
|
|
474
|
+
<text className={"cp-argObjectPreview t3"} style={{
|
|
485
475
|
fontWeight: fontWeight.medium,
|
|
486
476
|
color: colors.fg.neutral
|
|
487
477
|
}}>
|
|
@@ -489,7 +479,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
489
479
|
</text>
|
|
490
480
|
</view>
|
|
491
481
|
{isExpanded && <view className={"cp-argObjectContent"}>
|
|
492
|
-
<text className={"cp-argObjectJson"} style={{
|
|
482
|
+
<text className={"cp-argObjectJson t3"} style={{
|
|
493
483
|
fontWeight: fontWeight.regular,
|
|
494
484
|
color: colors.fg.neutral
|
|
495
485
|
}}>
|
|
@@ -498,7 +488,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
498
488
|
</view>}
|
|
499
489
|
</view>;
|
|
500
490
|
}
|
|
501
|
-
return <text className={"cp-argPrimitive"} style={{
|
|
491
|
+
return <text className={"cp-argPrimitive t3"} style={{
|
|
502
492
|
color: getPrimitiveColor(colors, level),
|
|
503
493
|
fontWeight: fontWeight.regular
|
|
504
494
|
}}>
|
|
@@ -511,11 +501,11 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
511
501
|
<view className={"cp-logHeader"}>
|
|
512
502
|
<view className={"cp-filterWrapper"}>
|
|
513
503
|
<view className={"cp-filterButton"} style={{ backgroundColor: colors.bg.neutralWeak }} catchtap={() => setFilterOpen((v) => !v)}>
|
|
514
|
-
<text className={"cp-filterButtonText"} style={{
|
|
504
|
+
<text className={"cp-filterButtonText t3"} style={{
|
|
515
505
|
fontWeight: fontWeight.medium,
|
|
516
506
|
color: colors.fg.neutralMuted
|
|
517
507
|
}}>
|
|
518
|
-
Filter
|
|
508
|
+
Filter ▼
|
|
519
509
|
</text>
|
|
520
510
|
</view>
|
|
521
511
|
{filterOpen && <view className={"cp-filterDropdown"} style={{
|
|
@@ -523,13 +513,13 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
523
513
|
borderColor: colors.stroke.neutralSubtle
|
|
524
514
|
}} catchtap={() => {}}>
|
|
525
515
|
{LOG_LEVELS.map((level) => <view key={level} className={"cp-filterOption"} bindtap={() => toggleLevel(level)}>
|
|
526
|
-
<text className={"cp-filterCheckbox"} style={{
|
|
516
|
+
<text className={"cp-filterCheckbox t3"} style={{
|
|
527
517
|
fontWeight: fontWeight.medium,
|
|
528
518
|
color: getLevelColor(colors, level)
|
|
529
519
|
}}>
|
|
530
520
|
{enabledLevels.has(level) ? "✅" : "⬜"}
|
|
531
521
|
</text>
|
|
532
|
-
<text className={"cp-filterLabel"} style={{
|
|
522
|
+
<text className={"cp-filterLabel t3"} style={{
|
|
533
523
|
fontWeight: fontWeight.medium,
|
|
534
524
|
color: getLevelColor(colors, level)
|
|
535
525
|
}}>
|
|
@@ -539,13 +529,13 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
539
529
|
</view>}
|
|
540
530
|
</view>
|
|
541
531
|
<view className={"cp-searchWrapper"} style={{ borderBottomColor: colors.stroke.neutralSubtle }}>
|
|
542
|
-
<text className={"cp-searchPrompt"} style={{
|
|
532
|
+
<text className={"cp-searchPrompt t6"} style={{
|
|
543
533
|
fontWeight: fontWeight.medium,
|
|
544
534
|
color: colors.fg.placeholder
|
|
545
535
|
}}>
|
|
546
536
|
{"›"}
|
|
547
537
|
</text>
|
|
548
|
-
<input ref={searchInputRef} className={"cp-searchInput"} style={{
|
|
538
|
+
<input ref={searchInputRef} className={"cp-searchInput t3"} style={{
|
|
549
539
|
fontWeight: fontWeight.regular,
|
|
550
540
|
color: colors.fg.neutral,
|
|
551
541
|
caretColor: colors.palette.green600
|
|
@@ -557,7 +547,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
557
547
|
params: { value: "" }
|
|
558
548
|
}).exec();
|
|
559
549
|
}}>
|
|
560
|
-
<text className={"cp-searchClearText"} style={{
|
|
550
|
+
<text className={"cp-searchClearText t3"} style={{
|
|
561
551
|
fontWeight: fontWeight.medium,
|
|
562
552
|
color: colors.fg.placeholder
|
|
563
553
|
}}>
|
|
@@ -571,7 +561,7 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
571
561
|
gap: 8
|
|
572
562
|
}}>
|
|
573
563
|
<view className={"cp-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }} bindtap={clearLogs}>
|
|
574
|
-
<text className={"cp-clearButtonText"} style={{
|
|
564
|
+
<text className={"cp-clearButtonText t3"} style={{
|
|
575
565
|
fontWeight: fontWeight.medium,
|
|
576
566
|
color: colors.fg.neutralMuted
|
|
577
567
|
}}>
|
|
@@ -580,10 +570,10 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
580
570
|
</view>
|
|
581
571
|
</view>
|
|
582
572
|
</view>
|
|
583
|
-
<
|
|
573
|
+
<list ref={listRef} scroll-orientation="vertical" className={"cp-logList"} preload-buffer-count={10} initial-scroll-index={Math.max(0, filteredLogs.length - 1)}>
|
|
584
574
|
{filteredLogs.length === 0 ? <list-item item-key="empty-state">
|
|
585
575
|
<view className={"cp-placeholder"}>
|
|
586
|
-
<text className={"cp-placeholderText"} style={{
|
|
576
|
+
<text className={"cp-placeholderText t4"} style={{
|
|
587
577
|
fontWeight: fontWeight.regular,
|
|
588
578
|
color: colors.fg.disabled
|
|
589
579
|
}}>
|
|
@@ -597,13 +587,13 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
597
587
|
borderBottomColor: colors.stroke.neutralWeak
|
|
598
588
|
}}>
|
|
599
589
|
<view className={"cp-logItemHeader"}>
|
|
600
|
-
<text className={"cp-logLevel"} style={{
|
|
590
|
+
<text className={"cp-logLevel t2"} style={{
|
|
601
591
|
fontWeight: fontWeight.bold,
|
|
602
592
|
color: getLevelColor(colors, log.level)
|
|
603
593
|
}}>
|
|
604
594
|
{log.level.toUpperCase()}
|
|
605
595
|
</text>
|
|
606
|
-
<text className={"cp-logTime"} style={{
|
|
596
|
+
<text className={"cp-logTime t2"} style={{
|
|
607
597
|
fontWeight: fontWeight.regular,
|
|
608
598
|
color: colors.fg.neutralSubtle
|
|
609
599
|
}}>
|
|
@@ -618,21 +608,21 @@ const LogPanel = ({ logs, clearLogs }) => {
|
|
|
618
608
|
</view>
|
|
619
609
|
</list-item>;
|
|
620
610
|
})}
|
|
621
|
-
</
|
|
611
|
+
</list>
|
|
622
612
|
<view className={"cp-replInputRow"}>
|
|
623
|
-
<text className={"cp-replPrompt"} style={{
|
|
613
|
+
<text className={"cp-replPrompt t10"} style={{
|
|
624
614
|
fontWeight: fontWeight.medium,
|
|
625
615
|
color: colors.fg.placeholder
|
|
626
616
|
}}>
|
|
627
617
|
{"›"}
|
|
628
618
|
</text>
|
|
629
|
-
<input ref={inputRef} className={"cp-replInput"} style={{
|
|
619
|
+
<input ref={inputRef} className={"cp-replInput t5"} style={{
|
|
630
620
|
fontWeight: fontWeight.regular,
|
|
631
621
|
color: colors.fg.neutral,
|
|
632
622
|
caretColor: colors.palette.green600
|
|
633
623
|
}} placeholder="enter code..." bindinput={(e) => setCode(e.detail.value)} bindconfirm={handleRun} />
|
|
634
624
|
<view className={"cp-replRunButton"} style={{ backgroundColor: colors.palette.green100 }} bindtap={handleRun}>
|
|
635
|
-
<text className={"cp-replRunButtonText"} style={{
|
|
625
|
+
<text className={"cp-replRunButtonText t3"} style={{
|
|
636
626
|
fontWeight: fontWeight.medium,
|
|
637
627
|
color: colors.palette.green600
|
|
638
628
|
}}>
|
|
@@ -650,7 +640,7 @@ const NetworkDetailSection = ({ headers = {}, body = "", error = "" }) => {
|
|
|
650
640
|
return <>
|
|
651
641
|
{}
|
|
652
642
|
<view className={"np-detailSection"}>
|
|
653
|
-
<text className={"np-detailSectionTitle"} style={{
|
|
643
|
+
<text className={"np-detailSectionTitle t3"} style={{
|
|
654
644
|
fontWeight: fontWeight.bold,
|
|
655
645
|
color: colors.fg.neutral
|
|
656
646
|
}}>
|
|
@@ -658,20 +648,20 @@ const NetworkDetailSection = ({ headers = {}, body = "", error = "" }) => {
|
|
|
658
648
|
</text>
|
|
659
649
|
{headers && Object.keys(headers).length > 0 ? <view className={"np-table"}>
|
|
660
650
|
{Object.entries(headers).map(([key, value]) => <view key={key} className={"np-tableRow"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
661
|
-
<text className={"np-tableKey"} style={{
|
|
651
|
+
<text className={"np-tableKey t3"} style={{
|
|
662
652
|
fontWeight: fontWeight.bold,
|
|
663
653
|
color: colors.fg.neutralSubtle
|
|
664
654
|
}}>
|
|
665
655
|
{key}
|
|
666
656
|
</text>
|
|
667
|
-
<text className={"np-tableValue"} style={{
|
|
657
|
+
<text className={"np-tableValue t3"} style={{
|
|
668
658
|
fontWeight: fontWeight.regular,
|
|
669
659
|
color: colors.fg.neutral
|
|
670
660
|
}}>
|
|
671
661
|
{value}
|
|
672
662
|
</text>
|
|
673
663
|
</view>)}
|
|
674
|
-
</view> : <text className={"np-emptyText"} style={{
|
|
664
|
+
</view> : <text className={"np-emptyText t3"} style={{
|
|
675
665
|
fontWeight: fontWeight.regular,
|
|
676
666
|
color: colors.fg.disabled
|
|
677
667
|
}}>
|
|
@@ -681,27 +671,27 @@ const NetworkDetailSection = ({ headers = {}, body = "", error = "" }) => {
|
|
|
681
671
|
|
|
682
672
|
{}
|
|
683
673
|
<view className={"np-detailSection"}>
|
|
684
|
-
<text className={"np-detailSectionTitle"} style={{
|
|
674
|
+
<text className={"np-detailSectionTitle t3"} style={{
|
|
685
675
|
fontWeight: fontWeight.bold,
|
|
686
676
|
color: colors.fg.neutral
|
|
687
677
|
}}>
|
|
688
678
|
Body
|
|
689
679
|
</text>
|
|
690
|
-
{error && <text className={"np-errorText"} style={{
|
|
680
|
+
{error && <text className={"np-errorText t3"} style={{
|
|
691
681
|
fontWeight: fontWeight.regular,
|
|
692
682
|
color: colors.palette.red600,
|
|
693
683
|
backgroundColor: colors.palette.red100
|
|
694
684
|
}}>
|
|
695
685
|
{error}
|
|
696
686
|
</text>}
|
|
697
|
-
{body && <text className={"np-bodyText"} style={{
|
|
687
|
+
{body && <text className={"np-bodyText t3"} style={{
|
|
698
688
|
fontWeight: fontWeight.regular,
|
|
699
689
|
color: colors.fg.neutral,
|
|
700
690
|
backgroundColor: colors.bg.neutralWeak
|
|
701
691
|
}}>
|
|
702
692
|
{body}
|
|
703
693
|
</text>}
|
|
704
|
-
{!error && !body && <text className={"np-emptyText"} style={{
|
|
694
|
+
{!error && !body && <text className={"np-emptyText t3"} style={{
|
|
705
695
|
fontWeight: fontWeight.regular,
|
|
706
696
|
color: colors.fg.disabled
|
|
707
697
|
}}>
|
|
@@ -805,14 +795,14 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
805
795
|
};
|
|
806
796
|
return <view className={"np-container"}>
|
|
807
797
|
<view className={"np-header"}>
|
|
808
|
-
<text className={"np-count"} style={{
|
|
798
|
+
<text className={"np-count t3"} style={{
|
|
809
799
|
fontWeight: fontWeight.regular,
|
|
810
800
|
color: colors.fg.neutralSubtle
|
|
811
801
|
}}>
|
|
812
802
|
Total: {networks.length} requests
|
|
813
803
|
</text>
|
|
814
804
|
<view className={"np-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }} bindtap={clearNetworks}>
|
|
815
|
-
<text className={"np-clearButtonText"} style={{
|
|
805
|
+
<text className={"np-clearButtonText t3"} style={{
|
|
816
806
|
fontWeight: fontWeight.medium,
|
|
817
807
|
color: colors.fg.neutralMuted
|
|
818
808
|
}}>
|
|
@@ -822,44 +812,44 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
822
812
|
</view>
|
|
823
813
|
|
|
824
814
|
{networks.length === 0 ? <view className={"np-placeholder"}>
|
|
825
|
-
<text className={"np-placeholderText"} style={{
|
|
815
|
+
<text className={"np-placeholderText t4"} style={{
|
|
826
816
|
fontWeight: fontWeight.regular,
|
|
827
817
|
color: colors.fg.disabled
|
|
828
818
|
}}>
|
|
829
819
|
No network requests yet
|
|
830
820
|
</text>
|
|
831
|
-
</view> : <
|
|
821
|
+
</view> : <list scroll-orientation="vertical" className={"np-list"}>
|
|
832
822
|
{networks.map((network) => <list-item key={network.id} item-key={network.id}>
|
|
833
823
|
<view className={"np-item"} style={{
|
|
834
824
|
backgroundColor: getItemBg(colors, network.status),
|
|
835
825
|
borderBottomColor: colors.stroke.neutralWeak
|
|
836
826
|
}}>
|
|
837
827
|
<view className={"np-itemHeader"} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
838
|
-
<text className={"np-method"} style={{
|
|
828
|
+
<text className={"np-method t2"} style={{
|
|
839
829
|
fontWeight: fontWeight.bold,
|
|
840
830
|
...getMethodColors(colors, network.method)
|
|
841
831
|
}}>
|
|
842
832
|
{network.method}
|
|
843
833
|
</text>
|
|
844
|
-
{network.statusCode && <text className={"np-statusCode"} style={{
|
|
834
|
+
{network.statusCode && <text className={"np-statusCode t2"} style={{
|
|
845
835
|
fontWeight: fontWeight.bold,
|
|
846
836
|
color: getStatusCodeColor(colors, getStatusCodeVariant(network.status, network.statusCode))
|
|
847
837
|
}}>
|
|
848
838
|
{network.statusCode}
|
|
849
839
|
</text>}
|
|
850
|
-
{network.status === "pending" && <text className={"np-statusCode"} style={{
|
|
840
|
+
{network.status === "pending" && <text className={"np-statusCode t2"} style={{
|
|
851
841
|
fontWeight: fontWeight.bold,
|
|
852
842
|
color: colors.fg.neutralSubtle
|
|
853
843
|
}}>
|
|
854
844
|
Pending...
|
|
855
845
|
</text>}
|
|
856
|
-
<text className={"np-time"} style={{
|
|
846
|
+
<text className={"np-time t2"} style={{
|
|
857
847
|
fontWeight: fontWeight.regular,
|
|
858
848
|
color: colors.fg.neutralSubtle
|
|
859
849
|
}}>
|
|
860
850
|
{formatDuration(network.duration)}
|
|
861
851
|
</text>
|
|
862
|
-
<text className={"np-time"} style={{
|
|
852
|
+
<text className={"np-time t2"} style={{
|
|
863
853
|
fontWeight: fontWeight.regular,
|
|
864
854
|
color: colors.fg.neutralSubtle
|
|
865
855
|
}}>
|
|
@@ -867,7 +857,7 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
867
857
|
</text>
|
|
868
858
|
</view>
|
|
869
859
|
|
|
870
|
-
<text className={"np-path"} style={{
|
|
860
|
+
<text className={"np-path t3"} style={{
|
|
871
861
|
fontWeight: fontWeight.regular,
|
|
872
862
|
color: colors.fg.neutral
|
|
873
863
|
}} bindtap={() => setSelectedId(selectedId === network.id ? null : network.id)}>
|
|
@@ -878,7 +868,7 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
878
868
|
{}
|
|
879
869
|
<view className={"np-tabs"}>
|
|
880
870
|
<view className={"np-tab"} style={{ backgroundColor: activeTab === "general" ? colors.bg.neutralWeak : void 0 }} bindtap={() => setActiveTab("general")}>
|
|
881
|
-
<text className={"np-tabText"} style={{
|
|
871
|
+
<text className={"np-tabText t4"} style={{
|
|
882
872
|
fontWeight: fontWeight.medium,
|
|
883
873
|
color: activeTab === "general" ? colors.fg.neutral : colors.fg.neutralSubtle
|
|
884
874
|
}}>
|
|
@@ -886,7 +876,7 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
886
876
|
</text>
|
|
887
877
|
</view>
|
|
888
878
|
<view className={"np-tab"} style={{ backgroundColor: activeTab === "request" ? colors.bg.neutralWeak : void 0 }} bindtap={() => setActiveTab("request")}>
|
|
889
|
-
<text className={"np-tabText"} style={{
|
|
879
|
+
<text className={"np-tabText t4"} style={{
|
|
890
880
|
fontWeight: fontWeight.medium,
|
|
891
881
|
color: activeTab === "request" ? colors.fg.neutral : colors.fg.neutralSubtle
|
|
892
882
|
}}>
|
|
@@ -894,7 +884,7 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
894
884
|
</text>
|
|
895
885
|
</view>
|
|
896
886
|
<view className={"np-tab"} style={{ backgroundColor: activeTab === "response" ? colors.bg.neutralWeak : void 0 }} bindtap={() => setActiveTab("response")}>
|
|
897
|
-
<text className={"np-tabText"} style={{
|
|
887
|
+
<text className={"np-tabText t4"} style={{
|
|
898
888
|
fontWeight: fontWeight.medium,
|
|
899
889
|
color: activeTab === "response" ? colors.fg.neutral : colors.fg.neutralSubtle
|
|
900
890
|
}}>
|
|
@@ -907,13 +897,13 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
907
897
|
<view className={"np-tabContent"}>
|
|
908
898
|
{activeTab === "general" && <view className={"np-table"}>
|
|
909
899
|
{getGeneralInfo(network).map((item) => <view key={item.key} className={"np-tableRow"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
910
|
-
<text className={"np-tableKey"} style={{
|
|
900
|
+
<text className={"np-tableKey t3"} style={{
|
|
911
901
|
fontWeight: fontWeight.bold,
|
|
912
902
|
color: colors.fg.neutralSubtle
|
|
913
903
|
}}>
|
|
914
904
|
{item.key}
|
|
915
905
|
</text>
|
|
916
|
-
<text className={"np-tableValue"} style={{
|
|
906
|
+
<text className={"np-tableValue t3"} style={{
|
|
917
907
|
fontWeight: fontWeight.regular,
|
|
918
908
|
color: colors.fg.neutral
|
|
919
909
|
}}>
|
|
@@ -929,7 +919,7 @@ const NetworkPanel = ({ networks, clearNetworks }) => {
|
|
|
929
919
|
</view>}
|
|
930
920
|
</view>
|
|
931
921
|
</list-item>)}
|
|
932
|
-
</
|
|
922
|
+
</list>}
|
|
933
923
|
</view>;
|
|
934
924
|
};
|
|
935
925
|
|
|
@@ -989,14 +979,14 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
989
979
|
const [selectedId, setSelectedId] = (0, _lynx_js_react.useState)(null);
|
|
990
980
|
if (performances.length === 0) return <view className={"pp-container"}>
|
|
991
981
|
<view className={"pp-header"} style={{ borderBottomColor: colors.stroke.neutralSubtle }}>
|
|
992
|
-
<text className={"pp-count"} style={{
|
|
982
|
+
<text className={"pp-count t3"} style={{
|
|
993
983
|
fontWeight: fontWeight.regular,
|
|
994
984
|
color: colors.fg.neutralSubtle
|
|
995
985
|
}}>
|
|
996
986
|
0 entries
|
|
997
987
|
</text>
|
|
998
988
|
<view bindtap={clearPerformances} className={"pp-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
999
|
-
<text className={"pp-clearButtonText"} style={{
|
|
989
|
+
<text className={"pp-clearButtonText t3"} style={{
|
|
1000
990
|
fontWeight: fontWeight.medium,
|
|
1001
991
|
color: colors.fg.neutralMuted
|
|
1002
992
|
}}>
|
|
@@ -1005,7 +995,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1005
995
|
</view>
|
|
1006
996
|
</view>
|
|
1007
997
|
<view className={"pp-placeholder"}>
|
|
1008
|
-
<text className={"pp-placeholderText"} style={{
|
|
998
|
+
<text className={"pp-placeholderText t4"} style={{
|
|
1009
999
|
fontWeight: fontWeight.regular,
|
|
1010
1000
|
color: colors.fg.disabled
|
|
1011
1001
|
}}>
|
|
@@ -1015,14 +1005,14 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1015
1005
|
</view>;
|
|
1016
1006
|
return <view className={"pp-container"}>
|
|
1017
1007
|
<view className={"pp-header"} style={{ borderBottomColor: colors.stroke.neutralSubtle }}>
|
|
1018
|
-
<text className={"pp-count"} style={{
|
|
1008
|
+
<text className={"pp-count t3"} style={{
|
|
1019
1009
|
fontWeight: fontWeight.regular,
|
|
1020
1010
|
color: colors.fg.neutralSubtle
|
|
1021
1011
|
}}>
|
|
1022
1012
|
{performances.length} entries
|
|
1023
1013
|
</text>
|
|
1024
1014
|
<view bindtap={clearPerformances} className={"pp-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
1025
|
-
<text className={"pp-clearButtonText"} style={{
|
|
1015
|
+
<text className={"pp-clearButtonText t3"} style={{
|
|
1026
1016
|
fontWeight: fontWeight.medium,
|
|
1027
1017
|
color: colors.fg.neutralMuted
|
|
1028
1018
|
}}>
|
|
@@ -1031,7 +1021,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1031
1021
|
</view>
|
|
1032
1022
|
</view>
|
|
1033
1023
|
|
|
1034
|
-
<
|
|
1024
|
+
<list scroll-orientation="vertical" className={"pp-list"}>
|
|
1035
1025
|
{performances.map((perf) => {
|
|
1036
1026
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
1037
1027
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
@@ -1040,19 +1030,19 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1040
1030
|
return <list-item key={perf.id} item-key={perf.id}>
|
|
1041
1031
|
<view className={"pp-item"} style={{ borderBottomColor: colors.stroke.neutralWeak }}>
|
|
1042
1032
|
<view className={"pp-itemHeader"} bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1043
|
-
<text className={"pp-entryType"} style={{
|
|
1033
|
+
<text className={"pp-entryType t2"} style={{
|
|
1044
1034
|
fontWeight: fontWeight.bold,
|
|
1045
1035
|
...getEntryTypeColors(colors, perf.entryType)
|
|
1046
1036
|
}}>
|
|
1047
1037
|
{perf.entryType}
|
|
1048
1038
|
</text>
|
|
1049
|
-
<text className={"pp-entryName"} style={{
|
|
1039
|
+
<text className={"pp-entryName t2"} style={{
|
|
1050
1040
|
fontWeight: fontWeight.medium,
|
|
1051
1041
|
color: colors.fg.neutral
|
|
1052
1042
|
}}>
|
|
1053
1043
|
{perf.name}
|
|
1054
1044
|
</text>
|
|
1055
|
-
<text className={"pp-timestamp"} style={{
|
|
1045
|
+
<text className={"pp-timestamp t2"} style={{
|
|
1056
1046
|
fontWeight: fontWeight.regular,
|
|
1057
1047
|
color: colors.fg.neutralSubtle
|
|
1058
1048
|
}}>
|
|
@@ -1061,7 +1051,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1061
1051
|
</view>
|
|
1062
1052
|
|
|
1063
1053
|
<view bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1064
|
-
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight"} style={{
|
|
1054
|
+
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight t3"} style={{
|
|
1065
1055
|
fontWeight: fontWeight.bold,
|
|
1066
1056
|
color: colors.palette.blue600,
|
|
1067
1057
|
backgroundColor: colors.palette.blue100
|
|
@@ -1074,20 +1064,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1074
1064
|
{isMetricFcp && fcpMetrics && <view className={"pp-fcpSection"}>
|
|
1075
1065
|
{totalFcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1076
1066
|
<view className={"pp-fcpMetricHeader"}>
|
|
1077
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1067
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1078
1068
|
fontWeight: fontWeight.bold,
|
|
1079
1069
|
color: colors.fg.neutral
|
|
1080
1070
|
}}>
|
|
1081
1071
|
전체 FCP
|
|
1082
1072
|
</text>
|
|
1083
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1073
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1084
1074
|
fontWeight: fontWeight.bold,
|
|
1085
1075
|
color: colors.palette.blue600
|
|
1086
1076
|
}}>
|
|
1087
1077
|
{formatDuration(totalFcp.duration)}
|
|
1088
1078
|
</text>
|
|
1089
1079
|
</view>
|
|
1090
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1080
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1091
1081
|
fontWeight: fontWeight.regular,
|
|
1092
1082
|
color: colors.fg.neutralSubtle
|
|
1093
1083
|
}}>
|
|
@@ -1098,20 +1088,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1098
1088
|
|
|
1099
1089
|
{lynxFcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1100
1090
|
<view className={"pp-fcpMetricHeader"}>
|
|
1101
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1091
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1102
1092
|
fontWeight: fontWeight.bold,
|
|
1103
1093
|
color: colors.fg.neutral
|
|
1104
1094
|
}}>
|
|
1105
1095
|
LynxFCP
|
|
1106
1096
|
</text>
|
|
1107
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1097
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1108
1098
|
fontWeight: fontWeight.bold,
|
|
1109
1099
|
color: colors.palette.blue600
|
|
1110
1100
|
}}>
|
|
1111
1101
|
{formatDuration(lynxFcp.duration)}
|
|
1112
1102
|
</text>
|
|
1113
1103
|
</view>
|
|
1114
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1104
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1115
1105
|
fontWeight: fontWeight.regular,
|
|
1116
1106
|
color: colors.fg.neutralSubtle
|
|
1117
1107
|
}}>
|
|
@@ -1121,20 +1111,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1121
1111
|
|
|
1122
1112
|
{fcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1123
1113
|
<view className={"pp-fcpMetricHeader"}>
|
|
1124
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1114
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1125
1115
|
fontWeight: fontWeight.bold,
|
|
1126
1116
|
color: colors.fg.neutral
|
|
1127
1117
|
}}>
|
|
1128
1118
|
렌더링 FCP
|
|
1129
1119
|
</text>
|
|
1130
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1120
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1131
1121
|
fontWeight: fontWeight.bold,
|
|
1132
1122
|
color: colors.palette.blue600
|
|
1133
1123
|
}}>
|
|
1134
1124
|
{formatDuration(fcp.duration)}
|
|
1135
1125
|
</text>
|
|
1136
1126
|
</view>
|
|
1137
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1127
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1138
1128
|
fontWeight: fontWeight.regular,
|
|
1139
1129
|
color: colors.fg.neutralSubtle
|
|
1140
1130
|
}}>
|
|
@@ -1144,13 +1134,13 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1144
1134
|
</view>}
|
|
1145
1135
|
|
|
1146
1136
|
{!!perf.rawEntry && <view className={"pp-rawEntrySection"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
1147
|
-
<text className={"pp-detailTitle"} style={{
|
|
1137
|
+
<text className={"pp-detailTitle t3"} style={{
|
|
1148
1138
|
fontWeight: fontWeight.bold,
|
|
1149
1139
|
color: colors.fg.neutral
|
|
1150
1140
|
}}>
|
|
1151
1141
|
Raw Entry
|
|
1152
1142
|
</text>
|
|
1153
|
-
<text className={"pp-rawEntry"} style={{
|
|
1143
|
+
<text className={"pp-rawEntry t3"} style={{
|
|
1154
1144
|
fontWeight: fontWeight.regular,
|
|
1155
1145
|
color: colors.fg.neutralSubtle
|
|
1156
1146
|
}}>
|
|
@@ -1161,7 +1151,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1161
1151
|
</view>
|
|
1162
1152
|
</list-item>;
|
|
1163
1153
|
})}
|
|
1164
|
-
</
|
|
1154
|
+
</list>
|
|
1165
1155
|
</view>;
|
|
1166
1156
|
};
|
|
1167
1157
|
|
|
@@ -1185,7 +1175,7 @@ function Tabs(props) {
|
|
|
1185
1175
|
}
|
|
1186
1176
|
}).exec();
|
|
1187
1177
|
}}>
|
|
1188
|
-
<text className={`tabs-triggerButtonText${tabSize ? `
|
|
1178
|
+
<text className={`tabs-triggerButtonText${tabSize ? ` ${tabSize}` : ""}`} style={{
|
|
1189
1179
|
fontWeight: fontWeight.bold,
|
|
1190
1180
|
color: i === activeIndex ? colors.fg.neutral : colors.fg.neutralSubtle
|
|
1191
1181
|
}}>
|
|
@@ -1352,24 +1342,22 @@ const FloatingButton = ({ bindtap, children }) => {
|
|
|
1352
1342
|
}
|
|
1353
1343
|
};
|
|
1354
1344
|
const isDragging = phase === "dragging";
|
|
1355
|
-
return
|
|
1356
|
-
<view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1345
|
+
return <view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1357
1346
|
right: `${right}px`,
|
|
1358
1347
|
bottom: `${bottom}px`,
|
|
1359
1348
|
transform: isDragging ? "scale(1.05)" : "scale(1)",
|
|
1360
1349
|
transition: `transform ${duration.d4} cubic-bezier(0.4, 0, 0.2, 1)`
|
|
1361
1350
|
}} {...handlers}>
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
</view>
|
|
1366
|
-
<view className={"fb-reloadButton"} style={{ backgroundColor: colors.palette.green600 }} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
1367
|
-
<text className={"fb-reloadIcon"} style={{ color: colors.palette.staticWhite }}>
|
|
1368
|
-
{"↻"}
|
|
1369
|
-
</text>
|
|
1370
|
-
</view>
|
|
1351
|
+
<view className={"fb-button"} style={{ backgroundColor: colors.palette.green600 }}>
|
|
1352
|
+
{children}
|
|
1353
|
+
<view className={"fb-shineOverlay"} style={SHINE_STYLES[phase]} />
|
|
1371
1354
|
</view>
|
|
1372
|
-
|
|
1355
|
+
<view className={"fb-reloadButton"} style={{ backgroundColor: colors.palette.green600 }} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
1356
|
+
<text className={"fb-reloadIcon"} style={{ color: colors.palette.staticWhite }}>
|
|
1357
|
+
{"↻"}
|
|
1358
|
+
</text>
|
|
1359
|
+
</view>
|
|
1360
|
+
</view>;
|
|
1373
1361
|
};
|
|
1374
1362
|
|
|
1375
1363
|
//#endregion
|
|
@@ -1413,11 +1401,13 @@ const LynxConsole = (0, _lynx_js_react.forwardRef)(({ theme = "light", safeAreaI
|
|
|
1413
1401
|
color: colors.fg.neutral
|
|
1414
1402
|
}}>
|
|
1415
1403
|
<FloatingButton bindtap={handleOpenBottomSheet}>
|
|
1416
|
-
<text className="fb-title" style={{
|
|
1404
|
+
<text className="fb-title t4" style={{
|
|
1417
1405
|
fontWeight: "400",
|
|
1418
1406
|
color: colors.palette.staticWhite
|
|
1419
|
-
}}>
|
|
1420
|
-
|
|
1407
|
+
}}>
|
|
1408
|
+
LynxConsole
|
|
1409
|
+
</text>
|
|
1410
|
+
<text className="fb-subtitle t3" style={{
|
|
1421
1411
|
fontWeight: "400",
|
|
1422
1412
|
color: colors.palette.staticWhite
|
|
1423
1413
|
}}>
|