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.
Files changed (49) hide show
  1. package/dist/index.cjs +183 -960
  2. package/dist/index.css +1257 -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 +183 -960
  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 +10 -55
  16. package/{dist/assets/src/components/FloatingButton.css.ts.vanilla-BaG0OI6p.css → src/components/FloatingButton.css} +22 -16
  17. package/src/components/FloatingButton.tsx +6 -6
  18. package/src/components/LogPanel.tsx +46 -47
  19. package/src/components/NetworkDetailSection.tsx +13 -13
  20. package/src/components/NetworkPanel.css +280 -0
  21. package/src/components/NetworkPanel.tsx +30 -50
  22. package/src/components/PerformancePanel.css +249 -0
  23. package/src/components/PerformancePanel.tsx +40 -40
  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/index.tsx +10 -6
  28. package/src/styles/global.css +8 -0
  29. package/src/styles/vars/color.ts +26 -213
  30. package/src/styles/vars/dimension.ts +5 -74
  31. package/src/styles/vars/index.css +65 -457
  32. package/src/styles/vars/index.ts +5 -9
  33. package/src/styles/vars/radius.ts +1 -11
  34. package/src/types.ts +8 -0
  35. package/dist/assets/src/components/BottomSheet.css.ts.vanilla-CulwSDhG.css +0 -83
  36. package/dist/assets/src/components/ConsolePanel.css.ts.vanilla-DWdhFBJq.css +0 -337
  37. package/dist/assets/src/components/FadeList.css.ts.vanilla-sppTKMZj.css +0 -12
  38. package/dist/assets/src/components/NetworkPanel.css.ts.vanilla-BSE4s40D.css +0 -244
  39. package/dist/assets/src/components/PerformancePanel.css.ts.vanilla-Bb3zG5G8.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 -349
  43. package/src/components/FadeList.css.ts +0 -16
  44. package/src/components/FloatingButton.css.ts +0 -73
  45. package/src/components/NetworkPanel.css.ts +0 -277
  46. package/src/components/PerformancePanel.css.ts +0 -224
  47. package/src/components/Tabs.css.ts +0 -66
  48. package/src/styles/global.css.ts +0 -10
  49. 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,277 +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
- });
21
-
22
- export const count = style({
23
- ...typography("t3", "regular"),
24
- color: vars.$color.fg.neutralSubtle,
25
- });
26
-
27
- export const clearButton = style({
28
- padding: "3px 6px",
29
- backgroundColor: vars.$color.bg.neutralWeak,
30
- borderRadius: 4,
31
- });
32
-
33
- export const clearButtonText = style({
34
- ...typography("t3", "medium"),
35
- color: vars.$color.fg.neutralMuted,
36
- });
37
-
38
- export const list = style({
39
- flex: 1,
40
- });
41
-
42
- export const placeholder = style({
43
- display: "flex",
44
- alignItems: "center",
45
- justifyContent: "center",
46
- height: "100%",
47
- });
48
-
49
- export const placeholderText = style({
50
- ...typography("t4", "regular"),
51
- color: vars.$color.fg.disabled,
52
- });
53
-
54
- export const item = recipe({
55
- base: {
56
- padding: "8px",
57
- borderBottomWidth: 1,
58
- borderBottomColor: vars.$color.stroke.neutralWeak,
59
- borderBottomStyle: "solid",
60
- },
61
- variants: {
62
- status: {
63
- pending: {
64
- backgroundColor: vars.$color.palette.gray100,
65
- },
66
- success: {},
67
- error: {
68
- backgroundColor: vars.$color.palette.red100,
69
- },
70
- },
71
- },
72
- });
73
-
74
- export const itemHeader = style({
75
- display: "flex",
76
- flexDirection: "row",
77
- alignItems: "center",
78
- marginBottom: 4,
79
- gap: 8,
80
- });
81
-
82
- export const method = recipe({
83
- base: {
84
- ...typography("t2", "bold"),
85
- padding: "0 4px",
86
- borderRadius: 2,
87
- color: vars.$color.fg.neutral,
88
- backgroundColor: vars.$color.bg.neutralWeak,
89
- },
90
- variants: {
91
- type: {
92
- GET: {
93
- color: vars.$color.palette.blue600,
94
- backgroundColor: vars.$color.palette.blue100,
95
- },
96
- POST: {
97
- color: vars.$color.palette.green600,
98
- backgroundColor: vars.$color.palette.green100,
99
- },
100
- PUT: {
101
- color: vars.$color.palette.yellow600,
102
- backgroundColor: vars.$color.palette.yellow100,
103
- },
104
- PATCH: {
105
- color: vars.$color.palette.purple600,
106
- backgroundColor: vars.$color.palette.purple100,
107
- },
108
- DELETE: {
109
- color: vars.$color.palette.red600,
110
- backgroundColor: vars.$color.palette.red100,
111
- },
112
- },
113
- },
114
- });
115
-
116
- export const statusCode = recipe({
117
- base: {
118
- ...typography("t2", "bold"),
119
- },
120
- variants: {
121
- type: {
122
- success: {
123
- color: vars.$color.palette.green600,
124
- },
125
- error: {
126
- color: vars.$color.palette.red600,
127
- },
128
- pending: {
129
- color: vars.$color.fg.neutralSubtle,
130
- },
131
- },
132
- },
133
- });
134
-
135
- export const time = style({
136
- ...typography("t2", "regular"),
137
- color: vars.$color.fg.neutralSubtle,
138
- });
139
-
140
- export const url = style({
141
- ...typography("t3", "regular"),
142
- color: vars.$color.fg.neutral,
143
- wordBreak: "break-all",
144
- marginBottom: 4,
145
- });
146
-
147
- export const path = style({
148
- ...typography("t3", "regular"),
149
- color: vars.$color.fg.neutral,
150
- wordBreak: "break-all",
151
- whiteSpace: "pre-wrap",
152
- overflow: "visible",
153
- marginBottom: 4,
154
- });
155
-
156
- export const details = style({
157
- ...typography("t3", "regular"),
158
- color: vars.$color.fg.neutralSubtle,
159
- });
160
-
161
- export const detailsContainer = style({
162
- marginTop: 12,
163
- paddingTop: 12,
164
- borderTopWidth: 1,
165
- borderTopColor: vars.$color.stroke.neutralSubtle,
166
- borderTopStyle: "solid",
167
- });
168
-
169
- export const tabs = style({
170
- display: "flex",
171
- flexDirection: "row",
172
- gap: 4,
173
- paddingBottom: 6,
174
- });
175
-
176
- export const tab = recipe({
177
- base: {
178
- padding: "4px 8px",
179
- borderRadius: 4,
180
- cursor: "pointer",
181
- },
182
- variants: {
183
- active: {
184
- true: {
185
- backgroundColor: vars.$color.bg.neutralWeak,
186
- },
187
- false: {
188
- backgroundColor: "transparent",
189
- },
190
- },
191
- },
192
- });
193
-
194
- export const tabText = recipe({
195
- base: {
196
- ...typography("t4", "medium"),
197
- },
198
- variants: {
199
- active: {
200
- true: {
201
- color: vars.$color.fg.neutral,
202
- },
203
- false: {
204
- color: vars.$color.fg.neutralSubtle,
205
- },
206
- },
207
- },
208
- });
209
-
210
- export const tabContent = style({
211
- paddingTop: 8,
212
- });
213
-
214
- export const detailSection = style({
215
- marginBottom: 12,
216
- });
217
-
218
- export const detailSectionTitle = style({
219
- ...typography("t3", "bold"),
220
- color: vars.$color.fg.neutral,
221
- marginBottom: 8,
222
- });
223
-
224
- export const table = style({
225
- display: "flex",
226
- flexDirection: "column",
227
- gap: 4,
228
- });
229
-
230
- export const tableRow = style({
231
- display: "flex",
232
- flexDirection: "row",
233
- gap: 8,
234
- padding: "4px 8px",
235
- backgroundColor: vars.$color.bg.neutralWeak,
236
- borderRadius: 2,
237
- });
238
-
239
- export const tableKey = style({
240
- ...typography("t3", "bold"),
241
- color: vars.$color.fg.neutralSubtle,
242
- minWidth: 70,
243
- flexShrink: 0,
244
- });
245
-
246
- export const tableValue = style({
247
- ...typography("t3", "regular"),
248
- color: vars.$color.fg.neutral,
249
- wordBreak: "break-all",
250
- flex: 1,
251
- });
252
-
253
- export const bodyText = style({
254
- ...typography("t3", "regular"),
255
- color: vars.$color.fg.neutral,
256
- padding: 8,
257
- backgroundColor: vars.$color.bg.neutralWeak,
258
- borderRadius: 4,
259
- wordBreak: "break-all",
260
- whiteSpace: "pre-wrap",
261
- });
262
-
263
- export const errorText = style({
264
- ...typography("t3", "regular"),
265
- color: vars.$color.palette.red600,
266
- padding: 8,
267
- backgroundColor: vars.$color.palette.red100,
268
- borderRadius: 4,
269
- wordBreak: "break-all",
270
- });
271
-
272
- export const emptyText = style({
273
- ...typography("t3", "regular"),
274
- color: vars.$color.fg.disabled,
275
- textAlign: "center",
276
- padding: "16px 0",
277
- });
@@ -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: "3px 6px",
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.neutralMuted,
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
- }