lynx-console 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/index.cjs +205 -953
  2. package/dist/index.css +1248 -461
  3. package/dist/index.css.map +1 -1
  4. package/dist/index.d.cts +79 -1
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.mts +79 -1
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +205 -953
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +1 -4
  11. package/src/components/BottomSheet.css +91 -0
  12. package/src/components/BottomSheet.tsx +10 -10
  13. package/src/components/ConsolePanel.css +402 -0
  14. package/src/components/ConsolePanel.tsx +62 -28
  15. package/src/components/FadeList.tsx +31 -0
  16. package/{dist/assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css → src/components/FloatingButton.css} +22 -16
  17. package/src/components/FloatingButton.tsx +22 -19
  18. package/src/components/LogPanel.tsx +61 -79
  19. package/src/components/NetworkDetailSection.tsx +13 -13
  20. package/src/components/NetworkPanel.css +280 -0
  21. package/src/components/NetworkPanel.tsx +32 -52
  22. package/src/components/PerformancePanel.css +249 -0
  23. package/src/components/PerformancePanel.tsx +42 -42
  24. package/src/components/Tabs.css +78 -0
  25. package/src/components/Tabs.tsx +13 -11
  26. package/src/globals.d.ts +0 -5
  27. package/src/hooks/useLongPressDrag.ts +3 -3
  28. package/src/index.tsx +9 -6
  29. package/src/styles/global.css +8 -0
  30. package/src/styles/vars/color.ts +26 -213
  31. package/src/styles/vars/dimension.ts +5 -74
  32. package/src/styles/vars/index.css +65 -457
  33. package/src/styles/vars/index.ts +5 -9
  34. package/src/styles/vars/radius.ts +1 -11
  35. package/src/types.ts +8 -0
  36. package/dist/assets/src/components/BottomSheet.css.ts.vanilla-CulwSDhG.css +0 -83
  37. package/dist/assets/src/components/ConsolePanel.css.ts.vanilla-DFvHPEyg.css +0 -340
  38. package/dist/assets/src/components/NetworkPanel.css.ts.vanilla-DFMduT0T.css +0 -247
  39. package/dist/assets/src/components/PerformancePanel.css.ts.vanilla-D35LuXlW.css +0 -216
  40. package/dist/assets/src/components/Tabs.css.ts.vanilla-DD7L2oXt.css +0 -50
  41. package/src/components/BottomSheet.css.ts +0 -93
  42. package/src/components/ConsolePanel.css.ts +0 -354
  43. package/src/components/FloatingButton.css.ts +0 -73
  44. package/src/components/NetworkPanel.css.ts +0 -280
  45. package/src/components/PerformancePanel.css.ts +0 -224
  46. package/src/components/Tabs.css.ts +0 -66
  47. package/src/styles/global.css.ts +0 -10
  48. package/src/styles/typography.ts +0 -25
@@ -1,73 +0,0 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { typography } from "../styles/typography";
3
- import { vars } from "../styles/vars";
4
-
5
- export const wrapper = style({
6
- position: "fixed",
7
- zIndex: 9999,
8
- display: "flex",
9
- flexDirection: "row",
10
- alignItems: "center",
11
- gap: "8px",
12
- overflow: "visible",
13
- transition: `transform ${vars.$duration.d4} cubic-bezier(0.4, 0, 0.2, 1)`,
14
- });
15
-
16
- export const button = style({
17
- position: "relative",
18
- overflow: "hidden",
19
- paddingLeft: "8px",
20
- paddingRight: "8px",
21
- paddingTop: "4px",
22
- paddingBottom: "4px",
23
- borderRadius: "12px",
24
- backgroundColor: vars.$color.palette.green600,
25
- display: "flex",
26
- flexDirection: "column",
27
- alignItems: "center",
28
- justifyContent: "center",
29
- gap: "2px",
30
- boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
31
- });
32
-
33
- export const shineOverlay = style({
34
- position: "absolute",
35
- top: "-50%",
36
- left: "-25%",
37
- width: "150%",
38
- height: "200%",
39
- backgroundColor: "rgba(255, 255, 255, 0.2)",
40
- borderRadius: "9999px",
41
- });
42
-
43
- export const title = style({
44
- ...typography("t4", "regular"),
45
- color: vars.$color.palette.staticWhite,
46
- textAlign: "center",
47
- });
48
-
49
- export const subtitle = style({
50
- ...typography("t3", "regular"),
51
- color: vars.$color.palette.staticWhite,
52
- textAlign: "center",
53
- });
54
-
55
- export const reloadButton = style({
56
- overflow: "visible",
57
- width: "32px",
58
- height: "32px",
59
- borderRadius: "16px",
60
- backgroundColor: vars.$color.palette.green600,
61
- display: "flex",
62
- alignItems: "center",
63
- justifyContent: "center",
64
- boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
65
- });
66
-
67
- export const reloadIcon = style({
68
- fontSize: "20px",
69
- lineHeight: "32px",
70
- marginBottom: "5px",
71
- color: vars.$color.palette.staticWhite,
72
- textAlign: "center",
73
- });
@@ -1,280 +0,0 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { recipe } from "@vanilla-extract/recipes";
3
- import { typography } from "../styles/typography";
4
- import { vars } from "../styles/vars";
5
-
6
- export const container = style({
7
- display: "flex",
8
- flexDirection: "column",
9
- flex: 1,
10
- paddingTop: 4,
11
- });
12
-
13
- export const header = style({
14
- display: "flex",
15
- flexDirection: "row",
16
- alignItems: "center",
17
- justifyContent: "space-between",
18
- marginBottom: 8,
19
- paddingBottom: 4,
20
- borderBottomWidth: 1,
21
- borderBottomColor: vars.$color.stroke.neutralSubtle,
22
- borderBottomStyle: "solid",
23
- });
24
-
25
- export const count = style({
26
- ...typography("t3", "regular"),
27
- color: vars.$color.fg.neutralSubtle,
28
- });
29
-
30
- export const clearButton = style({
31
- padding: "6px 12px",
32
- backgroundColor: vars.$color.bg.neutralWeak,
33
- borderRadius: 4,
34
- });
35
-
36
- export const clearButtonText = style({
37
- ...typography("t3", "medium"),
38
- color: vars.$color.fg.neutral,
39
- });
40
-
41
- export const list = style({
42
- flex: 1,
43
- });
44
-
45
- export const placeholder = style({
46
- display: "flex",
47
- alignItems: "center",
48
- justifyContent: "center",
49
- height: "100%",
50
- });
51
-
52
- export const placeholderText = style({
53
- ...typography("t4", "regular"),
54
- color: vars.$color.fg.disabled,
55
- });
56
-
57
- export const item = recipe({
58
- base: {
59
- padding: "8px",
60
- borderBottomWidth: 1,
61
- borderBottomColor: vars.$color.stroke.neutralWeak,
62
- borderBottomStyle: "solid",
63
- },
64
- variants: {
65
- status: {
66
- pending: {
67
- backgroundColor: vars.$color.palette.gray100,
68
- },
69
- success: {},
70
- error: {
71
- backgroundColor: vars.$color.palette.red100,
72
- },
73
- },
74
- },
75
- });
76
-
77
- export const itemHeader = style({
78
- display: "flex",
79
- flexDirection: "row",
80
- alignItems: "center",
81
- marginBottom: 4,
82
- gap: 8,
83
- });
84
-
85
- export const method = recipe({
86
- base: {
87
- ...typography("t2", "bold"),
88
- padding: "0 4px",
89
- borderRadius: 2,
90
- color: vars.$color.fg.neutral,
91
- backgroundColor: vars.$color.bg.neutralWeak,
92
- },
93
- variants: {
94
- type: {
95
- GET: {
96
- color: vars.$color.palette.blue600,
97
- backgroundColor: vars.$color.palette.blue100,
98
- },
99
- POST: {
100
- color: vars.$color.palette.green600,
101
- backgroundColor: vars.$color.palette.green100,
102
- },
103
- PUT: {
104
- color: vars.$color.palette.yellow600,
105
- backgroundColor: vars.$color.palette.yellow100,
106
- },
107
- PATCH: {
108
- color: vars.$color.palette.purple600,
109
- backgroundColor: vars.$color.palette.purple100,
110
- },
111
- DELETE: {
112
- color: vars.$color.palette.red600,
113
- backgroundColor: vars.$color.palette.red100,
114
- },
115
- },
116
- },
117
- });
118
-
119
- export const statusCode = recipe({
120
- base: {
121
- ...typography("t2", "bold"),
122
- },
123
- variants: {
124
- type: {
125
- success: {
126
- color: vars.$color.palette.green600,
127
- },
128
- error: {
129
- color: vars.$color.palette.red600,
130
- },
131
- pending: {
132
- color: vars.$color.fg.neutralSubtle,
133
- },
134
- },
135
- },
136
- });
137
-
138
- export const time = style({
139
- ...typography("t2", "regular"),
140
- color: vars.$color.fg.neutralSubtle,
141
- });
142
-
143
- export const url = style({
144
- ...typography("t3", "regular"),
145
- color: vars.$color.fg.neutral,
146
- wordBreak: "break-all",
147
- marginBottom: 4,
148
- });
149
-
150
- export const path = style({
151
- ...typography("t3", "regular"),
152
- color: vars.$color.fg.neutral,
153
- wordBreak: "break-all",
154
- whiteSpace: "pre-wrap",
155
- overflow: "visible",
156
- marginBottom: 4,
157
- });
158
-
159
- export const details = style({
160
- ...typography("t3", "regular"),
161
- color: vars.$color.fg.neutralSubtle,
162
- });
163
-
164
- export const detailsContainer = style({
165
- marginTop: 12,
166
- paddingTop: 12,
167
- borderTopWidth: 1,
168
- borderTopColor: vars.$color.stroke.neutralSubtle,
169
- borderTopStyle: "solid",
170
- });
171
-
172
- export const tabs = style({
173
- display: "flex",
174
- flexDirection: "row",
175
- gap: 4,
176
- paddingBottom: 6,
177
- });
178
-
179
- export const tab = recipe({
180
- base: {
181
- padding: "4px 8px",
182
- borderRadius: 4,
183
- cursor: "pointer",
184
- },
185
- variants: {
186
- active: {
187
- true: {
188
- backgroundColor: vars.$color.bg.neutralWeak,
189
- },
190
- false: {
191
- backgroundColor: "transparent",
192
- },
193
- },
194
- },
195
- });
196
-
197
- export const tabText = recipe({
198
- base: {
199
- ...typography("t4", "medium"),
200
- },
201
- variants: {
202
- active: {
203
- true: {
204
- color: vars.$color.fg.neutral,
205
- },
206
- false: {
207
- color: vars.$color.fg.neutralSubtle,
208
- },
209
- },
210
- },
211
- });
212
-
213
- export const tabContent = style({
214
- paddingTop: 8,
215
- });
216
-
217
- export const detailSection = style({
218
- marginBottom: 12,
219
- });
220
-
221
- export const detailSectionTitle = style({
222
- ...typography("t3", "bold"),
223
- color: vars.$color.fg.neutral,
224
- marginBottom: 8,
225
- });
226
-
227
- export const table = style({
228
- display: "flex",
229
- flexDirection: "column",
230
- gap: 4,
231
- });
232
-
233
- export const tableRow = style({
234
- display: "flex",
235
- flexDirection: "row",
236
- gap: 8,
237
- padding: "4px 8px",
238
- backgroundColor: vars.$color.bg.neutralWeak,
239
- borderRadius: 2,
240
- });
241
-
242
- export const tableKey = style({
243
- ...typography("t3", "bold"),
244
- color: vars.$color.fg.neutralSubtle,
245
- minWidth: 70,
246
- flexShrink: 0,
247
- });
248
-
249
- export const tableValue = style({
250
- ...typography("t3", "regular"),
251
- color: vars.$color.fg.neutral,
252
- wordBreak: "break-all",
253
- flex: 1,
254
- });
255
-
256
- export const bodyText = style({
257
- ...typography("t3", "regular"),
258
- color: vars.$color.fg.neutral,
259
- padding: 8,
260
- backgroundColor: vars.$color.bg.neutralWeak,
261
- borderRadius: 4,
262
- wordBreak: "break-all",
263
- whiteSpace: "pre-wrap",
264
- });
265
-
266
- export const errorText = style({
267
- ...typography("t3", "regular"),
268
- color: vars.$color.palette.red600,
269
- padding: 8,
270
- backgroundColor: vars.$color.palette.red100,
271
- borderRadius: 4,
272
- wordBreak: "break-all",
273
- });
274
-
275
- export const emptyText = style({
276
- ...typography("t3", "regular"),
277
- color: vars.$color.fg.disabled,
278
- textAlign: "center",
279
- padding: "16px 0",
280
- });
@@ -1,224 +0,0 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { recipe } from "@vanilla-extract/recipes";
3
- import { typography } from "../styles/typography";
4
- import { vars } from "../styles/vars";
5
-
6
- export const container = style({
7
- display: "flex",
8
- flexDirection: "column",
9
- flex: 1,
10
- paddingTop: 4,
11
- });
12
-
13
- export const header = style({
14
- display: "flex",
15
- flexDirection: "row",
16
- alignItems: "center",
17
- justifyContent: "space-between",
18
- marginBottom: 8,
19
- paddingBottom: 4,
20
- borderBottomWidth: 1,
21
- borderBottomColor: vars.$color.stroke.neutralSubtle,
22
- borderBottomStyle: "solid",
23
- });
24
-
25
- export const count = style({
26
- ...typography("t3", "regular"),
27
- color: vars.$color.fg.neutralSubtle,
28
- });
29
-
30
- export const clearButton = style({
31
- padding: "6px 12px",
32
- backgroundColor: vars.$color.bg.neutralWeak,
33
- borderRadius: 4,
34
- });
35
-
36
- export const clearButtonText = style({
37
- ...typography("t3", "medium"),
38
- color: vars.$color.fg.neutral,
39
- });
40
-
41
- export const list = style({
42
- flex: 1,
43
- });
44
-
45
- export const placeholder = style({
46
- display: "flex",
47
- alignItems: "center",
48
- justifyContent: "center",
49
- height: "100%",
50
- });
51
-
52
- export const placeholderText = style({
53
- ...typography("t4", "regular"),
54
- color: vars.$color.fg.disabled,
55
- });
56
-
57
- export const item = style({
58
- padding: "8px",
59
- borderBottomWidth: 1,
60
- borderBottomColor: vars.$color.stroke.neutralWeak,
61
- borderBottomStyle: "solid",
62
- });
63
-
64
- export const itemHeader = style({
65
- display: "flex",
66
- flexDirection: "row",
67
- alignItems: "center",
68
- marginBottom: 4,
69
- gap: 8,
70
- });
71
-
72
- export const entryType = recipe({
73
- base: {
74
- ...typography("t2", "bold"),
75
- padding: "0 6px",
76
- borderRadius: 2,
77
- color: vars.$color.fg.neutral,
78
- backgroundColor: vars.$color.bg.neutralWeak,
79
- },
80
- variants: {
81
- type: {
82
- init: {
83
- color: vars.$color.palette.blue600,
84
- backgroundColor: vars.$color.palette.blue100,
85
- },
86
- metric: {
87
- color: vars.$color.palette.green600,
88
- backgroundColor: vars.$color.palette.green100,
89
- },
90
- pipeline: {
91
- color: vars.$color.palette.purple600,
92
- backgroundColor: vars.$color.palette.purple100,
93
- },
94
- resource: {
95
- color: vars.$color.palette.yellow600,
96
- backgroundColor: vars.$color.palette.yellow100,
97
- },
98
- },
99
- },
100
- });
101
-
102
- export const entryName = style({
103
- ...typography("t2", "medium"),
104
- color: vars.$color.fg.neutral,
105
- });
106
-
107
- export const timestamp = style({
108
- ...typography("t2", "regular"),
109
- color: vars.$color.fg.neutralSubtle,
110
- });
111
-
112
- export const fcpMetricHeader = style({
113
- display: "flex",
114
- flexDirection: "row",
115
- alignItems: "center",
116
- gap: 8,
117
- });
118
-
119
- export const fcpHighlight = style({
120
- ...typography("t3", "bold"),
121
- color: vars.$color.palette.blue600,
122
- backgroundColor: vars.$color.palette.blue100,
123
- padding: "4px 8px",
124
- borderRadius: 4,
125
- marginTop: 4,
126
- });
127
-
128
- export const metrics = style({
129
- marginTop: 8,
130
- display: "flex",
131
- flexDirection: "column",
132
- gap: 4,
133
- });
134
-
135
- export const metric = style({
136
- display: "flex",
137
- flexDirection: "row",
138
- alignItems: "center",
139
- gap: 8,
140
- padding: "4px 8px",
141
- backgroundColor: vars.$color.bg.neutralWeak,
142
- borderRadius: 2,
143
- });
144
-
145
- export const metricName = style({
146
- ...typography("t3", "medium"),
147
- color: vars.$color.fg.neutralSubtle,
148
- minWidth: 100,
149
- flexShrink: 0,
150
- });
151
-
152
- export const metricValue = style({
153
- ...typography("t3", "bold"),
154
- color: vars.$color.palette.green600,
155
- flex: 1,
156
- });
157
-
158
- export const detailsContainer = style({
159
- marginTop: 12,
160
- display: "flex",
161
- flexDirection: "column",
162
- gap: 12,
163
- });
164
-
165
- export const fcpSection = style({
166
- display: "flex",
167
- flexDirection: "column",
168
- gap: 8,
169
- });
170
-
171
- export const fcpSectionDescription = style({
172
- ...typography("t3", "regular"),
173
- color: vars.$color.fg.neutralSubtle,
174
- marginBottom: 4,
175
- });
176
-
177
- export const fcpMetric = style({
178
- backgroundColor: vars.$color.bg.layerDefault,
179
- borderRadius: 4,
180
- display: "flex",
181
- flexDirection: "column",
182
- gap: 4,
183
- });
184
-
185
- export const fcpMetricName = style({
186
- ...typography("t2", "bold"),
187
- color: vars.$color.fg.neutral,
188
- });
189
-
190
- export const fcpMetricValue = style({
191
- ...typography("t1", "bold"),
192
- color: vars.$color.palette.blue600,
193
- });
194
-
195
- export const fcpMetricDescription = style({
196
- ...typography("t3", "regular"),
197
- color: vars.$color.fg.neutralSubtle,
198
- });
199
-
200
- export const fcpMetricFormula = style({
201
- ...typography("t4", "regular"),
202
- color: vars.$color.fg.disabled,
203
- fontFamily: "monospace",
204
- });
205
-
206
- export const rawEntrySection = style({
207
- padding: 12,
208
- backgroundColor: vars.$color.bg.neutralWeak,
209
- borderRadius: 4,
210
- });
211
-
212
- export const detailTitle = style({
213
- ...typography("t3", "bold"),
214
- color: vars.$color.fg.neutral,
215
- marginBottom: 8,
216
- });
217
-
218
- export const rawEntry = style({
219
- ...typography("t3", "regular"),
220
- color: vars.$color.fg.neutralSubtle,
221
- fontFamily: "monospace",
222
- whiteSpace: "pre-wrap",
223
- wordBreak: "break-all",
224
- });
@@ -1,66 +0,0 @@
1
- import { style } from "@vanilla-extract/css";
2
- import { recipe } from "@vanilla-extract/recipes";
3
- import { typography } from "../styles/typography";
4
- import { vars } from "../styles/vars";
5
-
6
- export const tabs = style({
7
- flex: 1,
8
- display: "flex",
9
- flexDirection: "column",
10
- });
11
-
12
- export const tabHeader = style({
13
- display: "flex",
14
- boxShadow: `inset 0 -1px 0 0 ${vars.$color.stroke.neutralSubtle}`,
15
- });
16
-
17
- export const tabTriggerButton = style({
18
- flex: 1,
19
- color: vars.$color.fg.neutralSubtle,
20
- display: "flex",
21
- justifyContent: "center",
22
- alignItems: "center",
23
- padding: "12px 0 10px 0",
24
- position: "relative",
25
- });
26
-
27
- export const tabTriggerButtonText = recipe({
28
- base: {
29
- ...typography("t5", "bold"),
30
- color: vars.$color.fg.neutralSubtle,
31
- },
32
- variants: {
33
- active: {
34
- true: {
35
- color: vars.$color.fg.neutral,
36
- },
37
- },
38
- },
39
- });
40
-
41
- export const tabTriggerIndicator = style({
42
- position: "absolute",
43
- bottom: 0,
44
- left: 0,
45
- padding: "0 16px",
46
- width: "100%",
47
- transition: "200ms",
48
- transitionTimingFunction: "cubic-bezier(.35, 0, .35, 1)",
49
- });
50
-
51
- export const tabTriggerIndicatorLine = style({
52
- backgroundColor: vars.$color.fg.neutral,
53
- width: "100%",
54
- height: "2px",
55
- });
56
-
57
- export const tabContents = style({
58
- flex: 1,
59
- width: "100%",
60
- });
61
-
62
- export const tabContent = style({
63
- width: "100%",
64
- display: "flex",
65
- flexDirection: "column",
66
- });
@@ -1,10 +0,0 @@
1
- import { globalStyle } from "@vanilla-extract/css";
2
- import { vars } from "./vars";
3
-
4
- globalStyle("page", {
5
- backgroundColor: vars.$color.bg.layerDefault,
6
- fontSize: "16px",
7
- });
8
- globalStyle("text", {
9
- color: vars.$color.fg.neutral,
10
- });
@@ -1,25 +0,0 @@
1
- import { type DimensionTokenId, getDimensionValue } from "./getDimensionValue";
2
- import { vars } from "./vars";
3
-
4
- type TypographyTokenId =
5
- Extract<
6
- DimensionTokenId,
7
- `$font-size.${string}`
8
- > extends `$font-size.${infer U}`
9
- ? U
10
- : never;
11
-
12
- export function typography(
13
- tokenId: TypographyTokenId,
14
- weight: "regular" | "medium" | "bold",
15
- ) {
16
- const fontSize = getDimensionValue(`$font-size.${tokenId}`);
17
- const lineHeight = getDimensionValue(`$line-height.${tokenId}`);
18
- const fontWeight = vars.$fontWeight[weight];
19
-
20
- return {
21
- fontSize,
22
- lineHeight,
23
- fontWeight,
24
- };
25
- }