lynx-console 0.1.1 โ 0.2.1
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 +1257 -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 +10 -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
|
@@ -2,7 +2,7 @@ import { useState } from "@lynx-js/react";
|
|
|
2
2
|
import type { NetworkEntry } from "../types";
|
|
3
3
|
import { FadeList } from "./FadeList";
|
|
4
4
|
import { NetworkDetailSection } from "./NetworkDetailSection";
|
|
5
|
-
import
|
|
5
|
+
import "./NetworkPanel.css";
|
|
6
6
|
|
|
7
7
|
interface NetworkPanelProps {
|
|
8
8
|
networks: NetworkEntry[];
|
|
@@ -67,68 +67,56 @@ export const NetworkPanel = ({
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
|
-
<view className={
|
|
71
|
-
<view className={
|
|
72
|
-
<text className={
|
|
73
|
-
<view className={
|
|
74
|
-
<text className={
|
|
70
|
+
<view className={"np-container"}>
|
|
71
|
+
<view className={"np-header"}>
|
|
72
|
+
<text className={"np-count"}>Total: {networks.length} requests</text>
|
|
73
|
+
<view className={"np-clearButton"} bindtap={clearNetworks}>
|
|
74
|
+
<text className={"np-clearButtonText"}>๐</text>
|
|
75
75
|
</view>
|
|
76
76
|
</view>
|
|
77
77
|
|
|
78
78
|
{networks.length === 0 ? (
|
|
79
|
-
<view className={
|
|
80
|
-
<text className={
|
|
79
|
+
<view className={"np-placeholder"}>
|
|
80
|
+
<text className={"np-placeholderText"}>No network requests yet</text>
|
|
81
81
|
</view>
|
|
82
82
|
) : (
|
|
83
|
-
<FadeList className={
|
|
83
|
+
<FadeList className={"np-list"}>
|
|
84
84
|
{networks.map((network) => (
|
|
85
85
|
<list-item key={network.id} item-key={network.id}>
|
|
86
|
-
<view className={
|
|
86
|
+
<view className={`np-item np-item--${network.status}`}>
|
|
87
87
|
<view
|
|
88
|
-
className={
|
|
88
|
+
className={"np-itemHeader"}
|
|
89
89
|
bindtap={() =>
|
|
90
90
|
setSelectedId(selectedId === network.id ? null : network.id)
|
|
91
91
|
}
|
|
92
92
|
>
|
|
93
93
|
<text
|
|
94
|
-
className={
|
|
95
|
-
type: network.method as
|
|
96
|
-
| "GET"
|
|
97
|
-
| "POST"
|
|
98
|
-
| "PUT"
|
|
99
|
-
| "PATCH"
|
|
100
|
-
| "DELETE",
|
|
101
|
-
})}
|
|
94
|
+
className={`np-method np-method--${network.method}`}
|
|
102
95
|
>
|
|
103
96
|
{network.method}
|
|
104
97
|
</text>
|
|
105
98
|
{network.statusCode && (
|
|
106
99
|
<text
|
|
107
|
-
className={
|
|
108
|
-
type: getStatusCodeVariant(
|
|
109
|
-
network.status,
|
|
110
|
-
network.statusCode,
|
|
111
|
-
),
|
|
112
|
-
})}
|
|
100
|
+
className={`np-statusCode np-statusCode--${getStatusCodeVariant(network.status, network.statusCode)}`}
|
|
113
101
|
>
|
|
114
102
|
{network.statusCode}
|
|
115
103
|
</text>
|
|
116
104
|
)}
|
|
117
105
|
{network.status === "pending" && (
|
|
118
|
-
<text className={
|
|
106
|
+
<text className={"np-statusCode np-statusCode--pending"}>
|
|
119
107
|
Pending...
|
|
120
108
|
</text>
|
|
121
109
|
)}
|
|
122
|
-
<text className={
|
|
110
|
+
<text className={"np-time"}>
|
|
123
111
|
{formatDuration(network.duration)}
|
|
124
112
|
</text>
|
|
125
|
-
<text className={
|
|
113
|
+
<text className={"np-time"}>
|
|
126
114
|
{new Date(network.startTime).toISOString()}
|
|
127
115
|
</text>
|
|
128
116
|
</view>
|
|
129
117
|
|
|
130
118
|
<text
|
|
131
|
-
className={
|
|
119
|
+
className={"np-path"}
|
|
132
120
|
bindtap={() =>
|
|
133
121
|
setSelectedId(selectedId === network.id ? null : network.id)
|
|
134
122
|
}
|
|
@@ -137,43 +125,35 @@ export const NetworkPanel = ({
|
|
|
137
125
|
</text>
|
|
138
126
|
|
|
139
127
|
{selectedId === network.id && (
|
|
140
|
-
<view className={
|
|
128
|
+
<view className={"np-detailsContainer"}>
|
|
141
129
|
{/* Tabs */}
|
|
142
|
-
<view className={
|
|
130
|
+
<view className={"np-tabs"}>
|
|
143
131
|
<view
|
|
144
|
-
className={
|
|
132
|
+
className={`np-tab${activeTab === "general" ? " np-tab--active" : ""}`}
|
|
145
133
|
bindtap={() => setActiveTab("general")}
|
|
146
134
|
>
|
|
147
135
|
<text
|
|
148
|
-
className={
|
|
149
|
-
active: activeTab === "general",
|
|
150
|
-
})}
|
|
136
|
+
className={`np-tabText${activeTab === "general" ? " np-tabText--active" : ""}`}
|
|
151
137
|
>
|
|
152
138
|
General
|
|
153
139
|
</text>
|
|
154
140
|
</view>
|
|
155
141
|
<view
|
|
156
|
-
className={
|
|
142
|
+
className={`np-tab${activeTab === "request" ? " np-tab--active" : ""}`}
|
|
157
143
|
bindtap={() => setActiveTab("request")}
|
|
158
144
|
>
|
|
159
145
|
<text
|
|
160
|
-
className={
|
|
161
|
-
active: activeTab === "request",
|
|
162
|
-
})}
|
|
146
|
+
className={`np-tabText${activeTab === "request" ? " np-tabText--active" : ""}`}
|
|
163
147
|
>
|
|
164
148
|
Request
|
|
165
149
|
</text>
|
|
166
150
|
</view>
|
|
167
151
|
<view
|
|
168
|
-
className={
|
|
169
|
-
active: activeTab === "response",
|
|
170
|
-
})}
|
|
152
|
+
className={`np-tab${activeTab === "response" ? " np-tab--active" : ""}`}
|
|
171
153
|
bindtap={() => setActiveTab("response")}
|
|
172
154
|
>
|
|
173
155
|
<text
|
|
174
|
-
className={
|
|
175
|
-
active: activeTab === "response",
|
|
176
|
-
})}
|
|
156
|
+
className={`np-tabText${activeTab === "response" ? " np-tabText--active" : ""}`}
|
|
177
157
|
>
|
|
178
158
|
Response
|
|
179
159
|
</text>
|
|
@@ -181,13 +161,13 @@ export const NetworkPanel = ({
|
|
|
181
161
|
</view>
|
|
182
162
|
|
|
183
163
|
{/* Tab Content */}
|
|
184
|
-
<view className={
|
|
164
|
+
<view className={"np-tabContent"}>
|
|
185
165
|
{activeTab === "general" && (
|
|
186
|
-
<view className={
|
|
166
|
+
<view className={"np-table"}>
|
|
187
167
|
{getGeneralInfo(network).map((item) => (
|
|
188
|
-
<view key={item.key} className={
|
|
189
|
-
<text className={
|
|
190
|
-
<text className={
|
|
168
|
+
<view key={item.key} className={"np-tableRow"}>
|
|
169
|
+
<text className={"np-tableKey"}>{item.key}</text>
|
|
170
|
+
<text className={"np-tableValue"}>
|
|
191
171
|
{item.value}
|
|
192
172
|
</text>
|
|
193
173
|
</view>
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
.pp-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
flex: 1;
|
|
5
|
+
padding-top: 4px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pp-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
padding-bottom: 4px;
|
|
15
|
+
border-bottom-width: 1px;
|
|
16
|
+
border-bottom-color: var(--lynx-console-color-stroke-neutral-subtle);
|
|
17
|
+
border-bottom-style: solid;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pp-count {
|
|
21
|
+
font-size: 0.8125rem;
|
|
22
|
+
line-height: 1.125rem;
|
|
23
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
24
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pp-clearButton {
|
|
28
|
+
padding: 3px 6px;
|
|
29
|
+
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pp-clearButtonText {
|
|
34
|
+
font-size: 0.8125rem;
|
|
35
|
+
line-height: 1.125rem;
|
|
36
|
+
font-weight: var(--lynx-console-font-weight-medium);
|
|
37
|
+
color: var(--lynx-console-color-fg-neutral-muted);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pp-list {
|
|
41
|
+
flex: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pp-placeholder {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
height: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pp-placeholderText {
|
|
52
|
+
font-size: 0.875rem;
|
|
53
|
+
line-height: 1.1875rem;
|
|
54
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
55
|
+
color: var(--lynx-console-color-fg-disabled);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pp-item {
|
|
59
|
+
padding: 8px;
|
|
60
|
+
border-bottom-width: 1px;
|
|
61
|
+
border-bottom-color: var(--lynx-console-color-stroke-neutral-weak);
|
|
62
|
+
border-bottom-style: solid;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.pp-itemHeader {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
align-items: center;
|
|
69
|
+
margin-bottom: 4px;
|
|
70
|
+
gap: 8px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pp-entryType {
|
|
74
|
+
font-size: 0.75rem;
|
|
75
|
+
line-height: 1rem;
|
|
76
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
77
|
+
padding: 0 6px;
|
|
78
|
+
border-radius: 2px;
|
|
79
|
+
color: var(--lynx-console-color-fg-neutral);
|
|
80
|
+
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pp-entryType--init {
|
|
84
|
+
color: var(--lynx-console-color-palette-blue-600);
|
|
85
|
+
background-color: var(--lynx-console-color-palette-blue-100);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pp-entryType--metric {
|
|
89
|
+
color: var(--lynx-console-color-palette-green-600);
|
|
90
|
+
background-color: var(--lynx-console-color-palette-green-100);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pp-entryType--pipeline {
|
|
94
|
+
color: var(--lynx-console-color-palette-purple-600);
|
|
95
|
+
background-color: var(--lynx-console-color-palette-purple-100);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.pp-entryType--resource {
|
|
99
|
+
color: var(--lynx-console-color-palette-yellow-600);
|
|
100
|
+
background-color: var(--lynx-console-color-palette-yellow-100);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.pp-entryName {
|
|
104
|
+
font-size: 0.75rem;
|
|
105
|
+
line-height: 1rem;
|
|
106
|
+
font-weight: var(--lynx-console-font-weight-medium);
|
|
107
|
+
color: var(--lynx-console-color-fg-neutral);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.pp-timestamp {
|
|
111
|
+
font-size: 0.75rem;
|
|
112
|
+
line-height: 1rem;
|
|
113
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
114
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.pp-fcpMetricHeader {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: row;
|
|
120
|
+
align-items: center;
|
|
121
|
+
gap: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.pp-fcpHighlight {
|
|
125
|
+
font-size: 0.8125rem;
|
|
126
|
+
line-height: 1.125rem;
|
|
127
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
128
|
+
color: var(--lynx-console-color-palette-blue-600);
|
|
129
|
+
background-color: var(--lynx-console-color-palette-blue-100);
|
|
130
|
+
padding: 4px 8px;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
margin-top: 4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.pp-metrics {
|
|
136
|
+
margin-top: 8px;
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
gap: 4px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.pp-metric {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: row;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 8px;
|
|
147
|
+
padding: 4px 8px;
|
|
148
|
+
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
149
|
+
border-radius: 2px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.pp-metricName {
|
|
153
|
+
font-size: 0.8125rem;
|
|
154
|
+
line-height: 1.125rem;
|
|
155
|
+
font-weight: var(--lynx-console-font-weight-medium);
|
|
156
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
157
|
+
min-width: 100px;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.pp-metricValue {
|
|
162
|
+
font-size: 0.8125rem;
|
|
163
|
+
line-height: 1.125rem;
|
|
164
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
165
|
+
color: var(--lynx-console-color-palette-green-600);
|
|
166
|
+
flex: 1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.pp-detailsContainer {
|
|
170
|
+
margin-top: 12px;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
gap: 12px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.pp-fcpSection {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
gap: 8px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.pp-fcpSectionDescription {
|
|
183
|
+
font-size: 0.8125rem;
|
|
184
|
+
line-height: 1.125rem;
|
|
185
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
186
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
187
|
+
margin-bottom: 4px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.pp-fcpMetric {
|
|
191
|
+
background-color: var(--lynx-console-color-bg-layer-default);
|
|
192
|
+
border-radius: 4px;
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: 4px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.pp-fcpMetricName {
|
|
199
|
+
font-size: 0.75rem;
|
|
200
|
+
line-height: 1rem;
|
|
201
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
202
|
+
color: var(--lynx-console-color-fg-neutral);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.pp-fcpMetricValue {
|
|
206
|
+
font-size: 0.6875rem;
|
|
207
|
+
line-height: 0.9375rem;
|
|
208
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
209
|
+
color: var(--lynx-console-color-palette-blue-600);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.pp-fcpMetricDescription {
|
|
213
|
+
font-size: 0.8125rem;
|
|
214
|
+
line-height: 1.125rem;
|
|
215
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
216
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.pp-fcpMetricFormula {
|
|
220
|
+
font-size: 0.875rem;
|
|
221
|
+
line-height: 1.1875rem;
|
|
222
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
223
|
+
color: var(--lynx-console-color-fg-disabled);
|
|
224
|
+
font-family: monospace;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.pp-rawEntrySection {
|
|
228
|
+
padding: 12px;
|
|
229
|
+
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
230
|
+
border-radius: 4px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.pp-detailTitle {
|
|
234
|
+
font-size: 0.8125rem;
|
|
235
|
+
line-height: 1.125rem;
|
|
236
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
237
|
+
color: var(--lynx-console-color-fg-neutral);
|
|
238
|
+
margin-bottom: 8px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.pp-rawEntry {
|
|
242
|
+
font-size: 0.8125rem;
|
|
243
|
+
line-height: 1.125rem;
|
|
244
|
+
font-weight: var(--lynx-console-font-weight-regular);
|
|
245
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
246
|
+
font-family: monospace;
|
|
247
|
+
white-space: pre-wrap;
|
|
248
|
+
word-break: break-all;
|
|
249
|
+
}
|
|
@@ -2,7 +2,7 @@ import { useState } from "@lynx-js/react";
|
|
|
2
2
|
import { stringify } from "javascript-stringify";
|
|
3
3
|
import type { PerformanceEntryData } from "../types";
|
|
4
4
|
import { FadeList } from "./FadeList";
|
|
5
|
-
import
|
|
5
|
+
import "./PerformancePanel.css";
|
|
6
6
|
|
|
7
7
|
interface PerformancePanelProps {
|
|
8
8
|
performances: PerformanceEntryData[];
|
|
@@ -68,9 +68,9 @@ export const PerformancePanel = ({
|
|
|
68
68
|
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
69
69
|
if (performances.length === 0) {
|
|
70
70
|
return (
|
|
71
|
-
<view className={
|
|
72
|
-
<view className={
|
|
73
|
-
<text className={
|
|
71
|
+
<view className={"pp-container"}>
|
|
72
|
+
<view className={"pp-header"}>
|
|
73
|
+
<text className={"pp-count"}>0 entries</text>
|
|
74
74
|
<view
|
|
75
75
|
bindtap={() => {
|
|
76
76
|
console.log("[PerformancePanel] performances", performances);
|
|
@@ -79,12 +79,12 @@ export const PerformancePanel = ({
|
|
|
79
79
|
>
|
|
80
80
|
<text>Log</text>
|
|
81
81
|
</view>
|
|
82
|
-
<view bindtap={clearPerformances} className={
|
|
83
|
-
<text className={
|
|
82
|
+
<view bindtap={clearPerformances} className={"pp-clearButton"}>
|
|
83
|
+
<text className={"pp-clearButtonText"}>๐</text>
|
|
84
84
|
</view>
|
|
85
85
|
</view>
|
|
86
|
-
<view className={
|
|
87
|
-
<text className={
|
|
86
|
+
<view className={"pp-placeholder"}>
|
|
87
|
+
<text className={"pp-placeholderText"}>
|
|
88
88
|
No performance data yet...
|
|
89
89
|
</text>
|
|
90
90
|
</view>
|
|
@@ -93,15 +93,15 @@ export const PerformancePanel = ({
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<view className={
|
|
97
|
-
<view className={
|
|
98
|
-
<text className={
|
|
99
|
-
<view bindtap={clearPerformances} className={
|
|
100
|
-
<text className={
|
|
96
|
+
<view className={"pp-container"}>
|
|
97
|
+
<view className={"pp-header"}>
|
|
98
|
+
<text className={"pp-count"}>{performances.length} entries</text>
|
|
99
|
+
<view bindtap={clearPerformances} className={"pp-clearButton"}>
|
|
100
|
+
<text className={"pp-clearButtonText"}>๐</text>
|
|
101
101
|
</view>
|
|
102
102
|
</view>
|
|
103
103
|
|
|
104
|
-
<FadeList className={
|
|
104
|
+
<FadeList className={"pp-list"}>
|
|
105
105
|
{performances.map((perf) => {
|
|
106
106
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
107
107
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
@@ -110,18 +110,18 @@ export const PerformancePanel = ({
|
|
|
110
110
|
|
|
111
111
|
return (
|
|
112
112
|
<list-item key={perf.id} item-key={perf.id}>
|
|
113
|
-
<view className={
|
|
113
|
+
<view className={"pp-item"}>
|
|
114
114
|
<view
|
|
115
|
-
className={
|
|
115
|
+
className={"pp-itemHeader"}
|
|
116
116
|
bindtap={() =>
|
|
117
117
|
setSelectedId(selectedId === perf.id ? null : perf.id)
|
|
118
118
|
}
|
|
119
119
|
>
|
|
120
|
-
<text className={
|
|
120
|
+
<text className={`pp-entryType pp-entryType--${perf.entryType}`}>
|
|
121
121
|
{perf.entryType}
|
|
122
122
|
</text>
|
|
123
|
-
<text className={
|
|
124
|
-
<text className={
|
|
123
|
+
<text className={"pp-entryName"}>{perf.name}</text>
|
|
124
|
+
<text className={"pp-timestamp"}>
|
|
125
125
|
{new Date(perf.timestamp).toISOString()}
|
|
126
126
|
</text>
|
|
127
127
|
</view>
|
|
@@ -132,25 +132,25 @@ export const PerformancePanel = ({
|
|
|
132
132
|
}
|
|
133
133
|
>
|
|
134
134
|
{isMetricFcp && primaryFcp && (
|
|
135
|
-
<text className={
|
|
135
|
+
<text className={"pp-fcpHighlight"}>{primaryFcp}</text>
|
|
136
136
|
)}
|
|
137
137
|
</view>
|
|
138
138
|
|
|
139
139
|
{selectedId === perf.id && (
|
|
140
|
-
<view className={
|
|
140
|
+
<view className={"pp-detailsContainer"}>
|
|
141
141
|
{isMetricFcp && fcpMetrics && (
|
|
142
|
-
<view className={
|
|
142
|
+
<view className={"pp-fcpSection"}>
|
|
143
143
|
{totalFcp !== undefined && (
|
|
144
|
-
<view className={
|
|
145
|
-
<view className={
|
|
146
|
-
<text className={
|
|
144
|
+
<view className={"pp-fcpMetric"}>
|
|
145
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
146
|
+
<text className={"pp-fcpMetricName"}>
|
|
147
147
|
์ ์ฒด FCP
|
|
148
148
|
</text>
|
|
149
|
-
<text className={
|
|
149
|
+
<text className={"pp-fcpMetricValue"}>
|
|
150
150
|
{formatDuration(totalFcp.duration)}
|
|
151
151
|
</text>
|
|
152
152
|
</view>
|
|
153
|
-
<text className={
|
|
153
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
154
154
|
PrepareTemplate Start๋ถํฐ Paint End ๊น์ง ๊ฑธ๋ฆฌ๋
|
|
155
155
|
์๊ฐ
|
|
156
156
|
</text>
|
|
@@ -158,30 +158,30 @@ export const PerformancePanel = ({
|
|
|
158
158
|
)}
|
|
159
159
|
|
|
160
160
|
{lynxFcp !== undefined && (
|
|
161
|
-
<view className={
|
|
162
|
-
<view className={
|
|
163
|
-
<text className={
|
|
164
|
-
<text className={
|
|
161
|
+
<view className={"pp-fcpMetric"}>
|
|
162
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
163
|
+
<text className={"pp-fcpMetricName"}>LynxFCP</text>
|
|
164
|
+
<text className={"pp-fcpMetricValue"}>
|
|
165
165
|
{formatDuration(lynxFcp.duration)}
|
|
166
166
|
</text>
|
|
167
167
|
</view>
|
|
168
|
-
<text className={
|
|
168
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
169
169
|
Bundle Load ์์๋ถํฐ Paint End ๊น์ง ๊ฑธ๋ฆฌ๋ ์๊ฐ
|
|
170
170
|
</text>
|
|
171
171
|
</view>
|
|
172
172
|
)}
|
|
173
173
|
|
|
174
174
|
{fcp !== undefined && (
|
|
175
|
-
<view className={
|
|
176
|
-
<view className={
|
|
177
|
-
<text className={
|
|
175
|
+
<view className={"pp-fcpMetric"}>
|
|
176
|
+
<view className={"pp-fcpMetricHeader"}>
|
|
177
|
+
<text className={"pp-fcpMetricName"}>
|
|
178
178
|
๋ ๋๋ง FCP
|
|
179
179
|
</text>
|
|
180
|
-
<text className={
|
|
180
|
+
<text className={"pp-fcpMetricValue"}>
|
|
181
181
|
{formatDuration(fcp.duration)}
|
|
182
182
|
</text>
|
|
183
183
|
</view>
|
|
184
|
-
<text className={
|
|
184
|
+
<text className={"pp-fcpMetricDescription"}>
|
|
185
185
|
TemplateBundle ์ค๋น๋ถํฐ Paint End ๊น์ง ๊ฑธ๋ฆฌ๋ ์๊ฐ
|
|
186
186
|
</text>
|
|
187
187
|
</view>
|
|
@@ -190,9 +190,9 @@ export const PerformancePanel = ({
|
|
|
190
190
|
)}
|
|
191
191
|
|
|
192
192
|
{!!perf.rawEntry && (
|
|
193
|
-
<view className={
|
|
194
|
-
<text className={
|
|
195
|
-
<text className={
|
|
193
|
+
<view className={"pp-rawEntrySection"}>
|
|
194
|
+
<text className={"pp-detailTitle"}>Raw Entry</text>
|
|
195
|
+
<text className={"pp-rawEntry"}>
|
|
196
196
|
{String(stringify(perf.rawEntry, null, 2, { references: true }))}
|
|
197
197
|
</text>
|
|
198
198
|
</view>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
.tabs-root {
|
|
2
|
+
flex: 1;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tabs-header {
|
|
8
|
+
display: flex;
|
|
9
|
+
box-shadow: inset 0 -1px 0 0 var(--lynx-console-color-stroke-neutral-subtle);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tabs-triggerButton {
|
|
13
|
+
flex: 1;
|
|
14
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
padding: 12px 0 10px 0;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tabs-triggerButtonText {
|
|
23
|
+
font-size: 1rem;
|
|
24
|
+
line-height: 1.375rem;
|
|
25
|
+
font-weight: var(--lynx-console-font-weight-bold);
|
|
26
|
+
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.tabs-triggerButtonText--active {
|
|
30
|
+
color: var(--lynx-console-color-fg-neutral);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tabs-triggerButtonText--t4 {
|
|
34
|
+
font-size: 0.875rem;
|
|
35
|
+
line-height: 1.1875rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tabs-triggerButtonText--t3 {
|
|
39
|
+
font-size: 0.8125rem;
|
|
40
|
+
line-height: 1.125rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tabs-triggerButtonText--t2 {
|
|
44
|
+
font-size: 0.75rem;
|
|
45
|
+
line-height: 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tabs-triggerButtonText--t1 {
|
|
49
|
+
font-size: 0.6875rem;
|
|
50
|
+
line-height: 0.9375rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tabs-triggerIndicator {
|
|
54
|
+
position: absolute;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
left: 0;
|
|
57
|
+
padding: 0 16px;
|
|
58
|
+
width: 100%;
|
|
59
|
+
transition: 200ms;
|
|
60
|
+
transition-timing-function: cubic-bezier(.35, 0, .35, 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tabs-triggerIndicatorLine {
|
|
64
|
+
background-color: var(--lynx-console-color-fg-neutral);
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 2px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.tabs-contents {
|
|
70
|
+
flex: 1;
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tabs-content {
|
|
75
|
+
width: 100%;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
}
|