lynx-console 0.2.2 → 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 -105
- 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 -105
- package/dist/index.mjs.map +1 -1
- package/dist/setup.cjs +0 -1
- package/dist/setup.d.cts +0 -1
- package/dist/setup.d.cts.map +1 -1
- package/dist/setup.d.mts +0 -1
- package/dist/setup.d.mts.map +1 -1
- package/dist/setup.mjs +0 -1
- package/dist/setup.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 -56
- 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.mjs
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 = 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 = 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,22 +979,14 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
989
979
|
const [selectedId, setSelectedId] = 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
|
-
<view bindtap={() => {
|
|
999
|
-
console.log("[PerformancePanel] performances", performances);
|
|
1000
|
-
}} style={{
|
|
1001
|
-
padding: "10px",
|
|
1002
|
-
backgroundColor: "red"
|
|
1003
|
-
}}>
|
|
1004
|
-
<text>Log</text>
|
|
1005
|
-
</view>
|
|
1006
988
|
<view bindtap={clearPerformances} className={"pp-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
1007
|
-
<text className={"pp-clearButtonText"} style={{
|
|
989
|
+
<text className={"pp-clearButtonText t3"} style={{
|
|
1008
990
|
fontWeight: fontWeight.medium,
|
|
1009
991
|
color: colors.fg.neutralMuted
|
|
1010
992
|
}}>
|
|
@@ -1013,7 +995,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1013
995
|
</view>
|
|
1014
996
|
</view>
|
|
1015
997
|
<view className={"pp-placeholder"}>
|
|
1016
|
-
<text className={"pp-placeholderText"} style={{
|
|
998
|
+
<text className={"pp-placeholderText t4"} style={{
|
|
1017
999
|
fontWeight: fontWeight.regular,
|
|
1018
1000
|
color: colors.fg.disabled
|
|
1019
1001
|
}}>
|
|
@@ -1023,14 +1005,14 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1023
1005
|
</view>;
|
|
1024
1006
|
return <view className={"pp-container"}>
|
|
1025
1007
|
<view className={"pp-header"} style={{ borderBottomColor: colors.stroke.neutralSubtle }}>
|
|
1026
|
-
<text className={"pp-count"} style={{
|
|
1008
|
+
<text className={"pp-count t3"} style={{
|
|
1027
1009
|
fontWeight: fontWeight.regular,
|
|
1028
1010
|
color: colors.fg.neutralSubtle
|
|
1029
1011
|
}}>
|
|
1030
1012
|
{performances.length} entries
|
|
1031
1013
|
</text>
|
|
1032
1014
|
<view bindtap={clearPerformances} className={"pp-clearButton"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
1033
|
-
<text className={"pp-clearButtonText"} style={{
|
|
1015
|
+
<text className={"pp-clearButtonText t3"} style={{
|
|
1034
1016
|
fontWeight: fontWeight.medium,
|
|
1035
1017
|
color: colors.fg.neutralMuted
|
|
1036
1018
|
}}>
|
|
@@ -1039,7 +1021,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1039
1021
|
</view>
|
|
1040
1022
|
</view>
|
|
1041
1023
|
|
|
1042
|
-
<
|
|
1024
|
+
<list scroll-orientation="vertical" className={"pp-list"}>
|
|
1043
1025
|
{performances.map((perf) => {
|
|
1044
1026
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
1045
1027
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
@@ -1048,19 +1030,19 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1048
1030
|
return <list-item key={perf.id} item-key={perf.id}>
|
|
1049
1031
|
<view className={"pp-item"} style={{ borderBottomColor: colors.stroke.neutralWeak }}>
|
|
1050
1032
|
<view className={"pp-itemHeader"} bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1051
|
-
<text className={"pp-entryType"} style={{
|
|
1033
|
+
<text className={"pp-entryType t2"} style={{
|
|
1052
1034
|
fontWeight: fontWeight.bold,
|
|
1053
1035
|
...getEntryTypeColors(colors, perf.entryType)
|
|
1054
1036
|
}}>
|
|
1055
1037
|
{perf.entryType}
|
|
1056
1038
|
</text>
|
|
1057
|
-
<text className={"pp-entryName"} style={{
|
|
1039
|
+
<text className={"pp-entryName t2"} style={{
|
|
1058
1040
|
fontWeight: fontWeight.medium,
|
|
1059
1041
|
color: colors.fg.neutral
|
|
1060
1042
|
}}>
|
|
1061
1043
|
{perf.name}
|
|
1062
1044
|
</text>
|
|
1063
|
-
<text className={"pp-timestamp"} style={{
|
|
1045
|
+
<text className={"pp-timestamp t2"} style={{
|
|
1064
1046
|
fontWeight: fontWeight.regular,
|
|
1065
1047
|
color: colors.fg.neutralSubtle
|
|
1066
1048
|
}}>
|
|
@@ -1069,7 +1051,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1069
1051
|
</view>
|
|
1070
1052
|
|
|
1071
1053
|
<view bindtap={() => setSelectedId(selectedId === perf.id ? null : perf.id)}>
|
|
1072
|
-
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight"} style={{
|
|
1054
|
+
{isMetricFcp && primaryFcp && <text className={"pp-fcpHighlight t3"} style={{
|
|
1073
1055
|
fontWeight: fontWeight.bold,
|
|
1074
1056
|
color: colors.palette.blue600,
|
|
1075
1057
|
backgroundColor: colors.palette.blue100
|
|
@@ -1082,20 +1064,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1082
1064
|
{isMetricFcp && fcpMetrics && <view className={"pp-fcpSection"}>
|
|
1083
1065
|
{totalFcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1084
1066
|
<view className={"pp-fcpMetricHeader"}>
|
|
1085
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1067
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1086
1068
|
fontWeight: fontWeight.bold,
|
|
1087
1069
|
color: colors.fg.neutral
|
|
1088
1070
|
}}>
|
|
1089
1071
|
전체 FCP
|
|
1090
1072
|
</text>
|
|
1091
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1073
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1092
1074
|
fontWeight: fontWeight.bold,
|
|
1093
1075
|
color: colors.palette.blue600
|
|
1094
1076
|
}}>
|
|
1095
1077
|
{formatDuration(totalFcp.duration)}
|
|
1096
1078
|
</text>
|
|
1097
1079
|
</view>
|
|
1098
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1080
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1099
1081
|
fontWeight: fontWeight.regular,
|
|
1100
1082
|
color: colors.fg.neutralSubtle
|
|
1101
1083
|
}}>
|
|
@@ -1106,20 +1088,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1106
1088
|
|
|
1107
1089
|
{lynxFcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1108
1090
|
<view className={"pp-fcpMetricHeader"}>
|
|
1109
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1091
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1110
1092
|
fontWeight: fontWeight.bold,
|
|
1111
1093
|
color: colors.fg.neutral
|
|
1112
1094
|
}}>
|
|
1113
1095
|
LynxFCP
|
|
1114
1096
|
</text>
|
|
1115
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1097
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1116
1098
|
fontWeight: fontWeight.bold,
|
|
1117
1099
|
color: colors.palette.blue600
|
|
1118
1100
|
}}>
|
|
1119
1101
|
{formatDuration(lynxFcp.duration)}
|
|
1120
1102
|
</text>
|
|
1121
1103
|
</view>
|
|
1122
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1104
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1123
1105
|
fontWeight: fontWeight.regular,
|
|
1124
1106
|
color: colors.fg.neutralSubtle
|
|
1125
1107
|
}}>
|
|
@@ -1129,20 +1111,20 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1129
1111
|
|
|
1130
1112
|
{fcp !== void 0 && <view className={"pp-fcpMetric"} style={{ backgroundColor: colors.bg.layerDefault }}>
|
|
1131
1113
|
<view className={"pp-fcpMetricHeader"}>
|
|
1132
|
-
<text className={"pp-fcpMetricName"} style={{
|
|
1114
|
+
<text className={"pp-fcpMetricName t2"} style={{
|
|
1133
1115
|
fontWeight: fontWeight.bold,
|
|
1134
1116
|
color: colors.fg.neutral
|
|
1135
1117
|
}}>
|
|
1136
1118
|
렌더링 FCP
|
|
1137
1119
|
</text>
|
|
1138
|
-
<text className={"pp-fcpMetricValue"} style={{
|
|
1120
|
+
<text className={"pp-fcpMetricValue t1"} style={{
|
|
1139
1121
|
fontWeight: fontWeight.bold,
|
|
1140
1122
|
color: colors.palette.blue600
|
|
1141
1123
|
}}>
|
|
1142
1124
|
{formatDuration(fcp.duration)}
|
|
1143
1125
|
</text>
|
|
1144
1126
|
</view>
|
|
1145
|
-
<text className={"pp-fcpMetricDescription"} style={{
|
|
1127
|
+
<text className={"pp-fcpMetricDescription t3"} style={{
|
|
1146
1128
|
fontWeight: fontWeight.regular,
|
|
1147
1129
|
color: colors.fg.neutralSubtle
|
|
1148
1130
|
}}>
|
|
@@ -1152,13 +1134,13 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1152
1134
|
</view>}
|
|
1153
1135
|
|
|
1154
1136
|
{!!perf.rawEntry && <view className={"pp-rawEntrySection"} style={{ backgroundColor: colors.bg.neutralWeak }}>
|
|
1155
|
-
<text className={"pp-detailTitle"} style={{
|
|
1137
|
+
<text className={"pp-detailTitle t3"} style={{
|
|
1156
1138
|
fontWeight: fontWeight.bold,
|
|
1157
1139
|
color: colors.fg.neutral
|
|
1158
1140
|
}}>
|
|
1159
1141
|
Raw Entry
|
|
1160
1142
|
</text>
|
|
1161
|
-
<text className={"pp-rawEntry"} style={{
|
|
1143
|
+
<text className={"pp-rawEntry t3"} style={{
|
|
1162
1144
|
fontWeight: fontWeight.regular,
|
|
1163
1145
|
color: colors.fg.neutralSubtle
|
|
1164
1146
|
}}>
|
|
@@ -1169,7 +1151,7 @@ const PerformancePanel = ({ performances, clearPerformances }) => {
|
|
|
1169
1151
|
</view>
|
|
1170
1152
|
</list-item>;
|
|
1171
1153
|
})}
|
|
1172
|
-
</
|
|
1154
|
+
</list>
|
|
1173
1155
|
</view>;
|
|
1174
1156
|
};
|
|
1175
1157
|
|
|
@@ -1193,7 +1175,7 @@ function Tabs(props) {
|
|
|
1193
1175
|
}
|
|
1194
1176
|
}).exec();
|
|
1195
1177
|
}}>
|
|
1196
|
-
<text className={`tabs-triggerButtonText${tabSize ? `
|
|
1178
|
+
<text className={`tabs-triggerButtonText${tabSize ? ` ${tabSize}` : ""}`} style={{
|
|
1197
1179
|
fontWeight: fontWeight.bold,
|
|
1198
1180
|
color: i === activeIndex ? colors.fg.neutral : colors.fg.neutralSubtle
|
|
1199
1181
|
}}>
|
|
@@ -1360,24 +1342,22 @@ const FloatingButton = ({ bindtap, children }) => {
|
|
|
1360
1342
|
}
|
|
1361
1343
|
};
|
|
1362
1344
|
const isDragging = phase === "dragging";
|
|
1363
|
-
return
|
|
1364
|
-
<view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1345
|
+
return <view className={"fb-wrapper"} consume-slide-event={[[-180, 180]]} style={{
|
|
1365
1346
|
right: `${right}px`,
|
|
1366
1347
|
bottom: `${bottom}px`,
|
|
1367
1348
|
transform: isDragging ? "scale(1.05)" : "scale(1)",
|
|
1368
1349
|
transition: `transform ${duration.d4} cubic-bezier(0.4, 0, 0.2, 1)`
|
|
1369
1350
|
}} {...handlers}>
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
</view>
|
|
1374
|
-
<view className={"fb-reloadButton"} style={{ backgroundColor: colors.palette.green600 }} catchtouchstart={() => clearTimer()} bindtap={handleReload}>
|
|
1375
|
-
<text className={"fb-reloadIcon"} style={{ color: colors.palette.staticWhite }}>
|
|
1376
|
-
{"↻"}
|
|
1377
|
-
</text>
|
|
1378
|
-
</view>
|
|
1351
|
+
<view className={"fb-button"} style={{ backgroundColor: colors.palette.green600 }}>
|
|
1352
|
+
{children}
|
|
1353
|
+
<view className={"fb-shineOverlay"} style={SHINE_STYLES[phase]} />
|
|
1379
1354
|
</view>
|
|
1380
|
-
|
|
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>;
|
|
1381
1361
|
};
|
|
1382
1362
|
|
|
1383
1363
|
//#endregion
|
|
@@ -1421,11 +1401,13 @@ const LynxConsole = forwardRef(({ theme = "light", safeAreaInsetBottom = "50px",
|
|
|
1421
1401
|
color: colors.fg.neutral
|
|
1422
1402
|
}}>
|
|
1423
1403
|
<FloatingButton bindtap={handleOpenBottomSheet}>
|
|
1424
|
-
<text className="fb-title" style={{
|
|
1404
|
+
<text className="fb-title t4" style={{
|
|
1425
1405
|
fontWeight: "400",
|
|
1426
1406
|
color: colors.palette.staticWhite
|
|
1427
|
-
}}>
|
|
1428
|
-
|
|
1407
|
+
}}>
|
|
1408
|
+
LynxConsole
|
|
1409
|
+
</text>
|
|
1410
|
+
<text className="fb-subtitle t3" style={{
|
|
1429
1411
|
fontWeight: "400",
|
|
1430
1412
|
color: colors.palette.staticWhite
|
|
1431
1413
|
}}>
|