lynx-console 0.2.0 → 0.2.2

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.
@@ -14,8 +14,6 @@
14
14
  .cp-placeholderText {
15
15
  font-size: 0.875rem;
16
16
  line-height: 1.1875rem;
17
- font-weight: var(--lynx-console-font-weight-regular);
18
- color: var(--lynx-console-color-fg-disabled);
19
17
  }
20
18
 
21
19
  .cp-logContainer {
@@ -42,15 +40,12 @@
42
40
  flex-direction: row;
43
41
  align-items: center;
44
42
  padding: 3px 6px;
45
- background-color: var(--lynx-console-color-bg-neutral-weak);
46
43
  border-radius: 4px;
47
44
  }
48
45
 
49
46
  .cp-filterButtonText {
50
47
  font-size: 0.8125rem;
51
48
  line-height: 1.125rem;
52
- font-weight: var(--lynx-console-font-weight-medium);
53
- color: var(--lynx-console-color-fg-neutral-muted);
54
49
  }
55
50
 
56
51
  .cp-filterDropdown {
@@ -58,9 +53,7 @@
58
53
  top: 100%;
59
54
  left: 0;
60
55
  margin-top: 4px;
61
- background-color: var(--lynx-console-color-bg-layer-floating);
62
56
  border-width: 1px;
63
- border-color: var(--lynx-console-color-stroke-neutral-subtle);
64
57
  border-style: solid;
65
58
  border-radius: 8px;
66
59
  padding: 4px 0;
@@ -79,46 +72,12 @@
79
72
  .cp-filterCheckbox {
80
73
  font-size: 0.8125rem;
81
74
  line-height: 1.125rem;
82
- font-weight: var(--lynx-console-font-weight-medium);
83
75
  width: 16px;
84
76
  }
85
77
 
86
- .cp-filterCheckbox--log {
87
- color: var(--lynx-console-color-palette-green-600);
88
- }
89
-
90
- .cp-filterCheckbox--info {
91
- color: var(--lynx-console-color-palette-blue-600);
92
- }
93
-
94
- .cp-filterCheckbox--warn {
95
- color: var(--lynx-console-color-palette-yellow-600);
96
- }
97
-
98
- .cp-filterCheckbox--error {
99
- color: var(--lynx-console-color-palette-red-600);
100
- }
101
-
102
78
  .cp-filterLabel {
103
79
  font-size: 0.8125rem;
104
80
  line-height: 1.125rem;
105
- font-weight: var(--lynx-console-font-weight-medium);
106
- }
107
-
108
- .cp-filterLabel--log {
109
- color: var(--lynx-console-color-palette-green-600);
110
- }
111
-
112
- .cp-filterLabel--info {
113
- color: var(--lynx-console-color-palette-blue-600);
114
- }
115
-
116
- .cp-filterLabel--warn {
117
- color: var(--lynx-console-color-palette-yellow-600);
118
- }
119
-
120
- .cp-filterLabel--error {
121
- color: var(--lynx-console-color-palette-red-600);
122
81
  }
123
82
 
124
83
  .cp-searchWrapper {
@@ -129,7 +88,6 @@
129
88
  margin-left: 8px;
130
89
  margin-right: 8px;
131
90
  border-bottom-width: 1px;
132
- border-bottom-color: var(--lynx-console-color-stroke-neutral-subtle);
133
91
  border-bottom-style: solid;
134
92
  gap: 8px;
135
93
  }
@@ -137,17 +95,12 @@
137
95
  .cp-searchPrompt {
138
96
  font-size: 1.125rem;
139
97
  line-height: 1.5rem;
140
- font-weight: var(--lynx-console-font-weight-medium);
141
- color: var(--lynx-console-color-fg-placeholder);
142
98
  }
143
99
 
144
100
  .cp-searchInput {
145
101
  flex: 1;
146
102
  font-size: 0.8125rem;
147
103
  line-height: 1.125rem;
148
- font-weight: var(--lynx-console-font-weight-regular);
149
- color: var(--lynx-console-color-fg-neutral);
150
- caret-color: var(--lynx-console-color-palette-green-600);
151
104
  }
152
105
 
153
106
  .cp-searchClear {
@@ -157,21 +110,16 @@
157
110
  .cp-searchClearText {
158
111
  font-size: 0.8125rem;
159
112
  line-height: 1.125rem;
160
- font-weight: var(--lynx-console-font-weight-medium);
161
- color: var(--lynx-console-color-fg-placeholder);
162
113
  }
163
114
 
164
115
  .cp-clearButton {
165
116
  padding: 3px 6px;
166
- background-color: var(--lynx-console-color-bg-neutral-weak);
167
117
  border-radius: 4px;
168
118
  }
169
119
 
170
120
  .cp-clearButtonText {
171
121
  font-size: 0.8125rem;
172
122
  line-height: 1.125rem;
173
- font-weight: var(--lynx-console-font-weight-medium);
174
- color: var(--lynx-console-color-fg-neutral-muted);
175
123
  }
176
124
 
177
125
  .cp-logList {
@@ -183,18 +131,9 @@
183
131
  .cp-logItem {
184
132
  padding: 8px;
185
133
  border-bottom-width: 1px;
186
- border-bottom-color: var(--lynx-console-color-stroke-neutral-weak);
187
134
  border-bottom-style: solid;
188
135
  }
189
136
 
190
- .cp-logItem--warn {
191
- background-color: var(--lynx-console-color-palette-yellow-100);
192
- }
193
-
194
- .cp-logItem--error {
195
- background-color: var(--lynx-console-color-palette-red-100);
196
- }
197
-
198
137
  .cp-logItemHeader {
199
138
  display: flex;
200
139
  flex-direction: row;
@@ -205,38 +144,17 @@
205
144
  .cp-logLevel {
206
145
  font-size: 0.75rem;
207
146
  line-height: 1rem;
208
- font-weight: var(--lynx-console-font-weight-bold);
209
147
  margin-right: 8px;
210
148
  }
211
149
 
212
- .cp-logLevel--log {
213
- color: var(--lynx-console-color-palette-green-600);
214
- }
215
-
216
- .cp-logLevel--info {
217
- color: var(--lynx-console-color-palette-blue-600);
218
- }
219
-
220
- .cp-logLevel--warn {
221
- color: var(--lynx-console-color-palette-yellow-600);
222
- }
223
-
224
- .cp-logLevel--error {
225
- color: var(--lynx-console-color-palette-red-600);
226
- }
227
-
228
150
  .cp-logTime {
229
151
  font-size: 0.75rem;
230
152
  line-height: 1rem;
231
- font-weight: var(--lynx-console-font-weight-regular);
232
- color: var(--lynx-console-color-fg-neutral-subtle);
233
153
  }
234
154
 
235
155
  .cp-toggleIndicator {
236
156
  font-size: 0.75rem;
237
157
  line-height: 1rem;
238
- font-weight: var(--lynx-console-font-weight-regular);
239
- color: var(--lynx-console-color-fg-neutral-subtle);
240
158
  margin-left: 4px;
241
159
  align-self: flex-start;
242
160
  }
@@ -244,8 +162,6 @@
244
162
  .cp-logMessage {
245
163
  font-size: 0.8125rem;
246
164
  line-height: 1.125rem;
247
- font-weight: var(--lynx-console-font-weight-regular);
248
- color: var(--lynx-console-color-fg-neutral);
249
165
  word-break: break-all;
250
166
  }
251
167
 
@@ -259,59 +175,16 @@
259
175
  .cp-logArgItem {
260
176
  font-size: 0.8125rem;
261
177
  line-height: 1.125rem;
262
- font-weight: var(--lynx-console-font-weight-regular);
263
- }
264
-
265
- .cp-argNull {
266
- color: var(--lynx-console-color-fg-neutral-subtle);
267
- }
268
-
269
- .cp-argUndefined {
270
- color: var(--lynx-console-color-fg-neutral-subtle);
271
178
  }
272
179
 
273
180
  .cp-argString {
274
181
  font-size: 0.8125rem;
275
182
  line-height: 1.125rem;
276
- font-weight: var(--lynx-console-font-weight-regular);
277
- }
278
-
279
- .cp-argString--log {
280
- color: var(--lynx-console-color-fg-neutral);
281
- }
282
-
283
- .cp-argString--info {
284
- color: var(--lynx-console-color-fg-neutral);
285
- }
286
-
287
- .cp-argString--warn {
288
- color: var(--lynx-console-color-palette-yellow-900);
289
- }
290
-
291
- .cp-argString--error {
292
- color: var(--lynx-console-color-palette-red-900);
293
183
  }
294
184
 
295
185
  .cp-argPrimitive {
296
186
  font-size: 0.8125rem;
297
187
  line-height: 1.125rem;
298
- font-weight: var(--lynx-console-font-weight-regular);
299
- }
300
-
301
- .cp-argPrimitive--log {
302
- color: var(--lynx-console-color-palette-blue-600);
303
- }
304
-
305
- .cp-argPrimitive--info {
306
- color: var(--lynx-console-color-palette-blue-600);
307
- }
308
-
309
- .cp-argPrimitive--warn {
310
- color: var(--lynx-console-color-palette-yellow-900);
311
- }
312
-
313
- .cp-argPrimitive--error {
314
- color: var(--lynx-console-color-palette-red-900);
315
188
  }
316
189
 
317
190
  .cp-argObject {
@@ -329,8 +202,6 @@
329
202
  .cp-argObjectPreview {
330
203
  font-size: 0.8125rem;
331
204
  line-height: 1.125rem;
332
- font-weight: var(--lynx-console-font-weight-medium);
333
- color: var(--lynx-console-color-fg-neutral);
334
205
  }
335
206
 
336
207
  .cp-argObjectContent {
@@ -349,15 +220,11 @@
349
220
  .cp-argObjectKey {
350
221
  font-size: 0.8125rem;
351
222
  line-height: 1.125rem;
352
- font-weight: var(--lynx-console-font-weight-medium);
353
- color: var(--lynx-console-color-palette-purple-600);
354
223
  }
355
224
 
356
225
  .cp-argObjectJson {
357
226
  font-size: 0.8125rem;
358
227
  line-height: 1.125rem;
359
- font-weight: var(--lynx-console-font-weight-regular);
360
- color: var(--lynx-console-color-fg-neutral);
361
228
  }
362
229
 
363
230
  .cp-replInputRow {
@@ -372,8 +239,6 @@
372
239
  .cp-replPrompt {
373
240
  font-size: 1.625rem;
374
241
  line-height: 2.1875rem;
375
- font-weight: var(--lynx-console-font-weight-medium);
376
- color: var(--lynx-console-color-fg-placeholder);
377
242
  padding-bottom: 8px;
378
243
  }
379
244
 
@@ -381,15 +246,11 @@
381
246
  flex: 1;
382
247
  font-size: 1rem;
383
248
  line-height: 1.375rem;
384
- font-weight: var(--lynx-console-font-weight-regular);
385
- color: var(--lynx-console-color-fg-neutral);
386
- caret-color: var(--lynx-console-color-palette-green-600);
387
249
  padding-bottom: 8px;
388
250
  }
389
251
 
390
252
  .cp-replRunButton {
391
253
  padding: 4px 10px;
392
- background-color: var(--lynx-console-color-palette-green-100);
393
254
  border-radius: 4px;
394
255
  margin-bottom: 8px;
395
256
  }
@@ -397,6 +258,4 @@
397
258
  .cp-replRunButtonText {
398
259
  font-size: 0.8125rem;
399
260
  line-height: 1.125rem;
400
- font-weight: var(--lynx-console-font-weight-medium);
401
- color: var(--lynx-console-color-palette-green-600);
402
261
  }
@@ -6,7 +6,6 @@
6
6
  align-items: center;
7
7
  gap: 8px;
8
8
  overflow: visible;
9
- transition: transform var(--lynx-console-duration-d4) cubic-bezier(0.4, 0, 0.2, 1);
10
9
  }
11
10
 
12
11
  .fb-button {
@@ -17,7 +16,6 @@
17
16
  padding-top: 4px;
18
17
  padding-bottom: 4px;
19
18
  border-radius: 12px;
20
- background-color: var(--lynx-console-color-palette-green-600);
21
19
  display: flex;
22
20
  flex-direction: column;
23
21
  align-items: center;
@@ -39,16 +37,12 @@
39
37
  .fb-title {
40
38
  font-size: 0.875rem;
41
39
  line-height: 1.1875rem;
42
- font-weight: var(--lynx-console-font-weight-regular);
43
- color: var(--lynx-console-color-palette-static-white);
44
40
  text-align: center;
45
41
  }
46
42
 
47
43
  .fb-subtitle {
48
44
  font-size: 0.8125rem;
49
45
  line-height: 1.125rem;
50
- font-weight: var(--lynx-console-font-weight-regular);
51
- color: var(--lynx-console-color-palette-static-white);
52
46
  text-align: center;
53
47
  }
54
48
 
@@ -57,7 +51,6 @@
57
51
  width: 32px;
58
52
  height: 32px;
59
53
  border-radius: 16px;
60
- background-color: var(--lynx-console-color-palette-green-600);
61
54
  display: flex;
62
55
  align-items: center;
63
56
  justify-content: center;
@@ -68,6 +61,5 @@
68
61
  font-size: 20px;
69
62
  line-height: 32px;
70
63
  margin-bottom: 5px;
71
- color: var(--lynx-console-color-palette-static-white);
72
64
  text-align: center;
73
65
  }
@@ -1,5 +1,7 @@
1
1
  import type { ReactNode } from "@lynx-js/react";
2
2
  import { useLongPressDrag } from "../hooks/useLongPressDrag";
3
+ import { useThemeColors } from "../styles/ThemeContext";
4
+ import { duration } from "../styles/theme";
3
5
  import "./FloatingButton.css";
4
6
 
5
7
  interface FloatingButtonProps {
@@ -28,6 +30,7 @@ export const FloatingButton = ({
28
30
  bindtap,
29
31
  children,
30
32
  }: FloatingButtonProps) => {
33
+ const colors = useThemeColors();
31
34
  const { phase, right, bottom, clearTimer, handlers } =
32
35
  useLongPressDrag(bindtap);
33
36
 
@@ -53,19 +56,29 @@ export const FloatingButton = ({
53
56
  right: `${right}px`,
54
57
  bottom: `${bottom}px`,
55
58
  transform: isDragging ? "scale(1.05)" : "scale(1)",
59
+ transition: `transform ${duration.d4} cubic-bezier(0.4, 0, 0.2, 1)`,
56
60
  }}
57
61
  {...handlers}
58
62
  >
59
- <view className={"fb-button"}>
63
+ <view
64
+ className={"fb-button"}
65
+ style={{ backgroundColor: colors.palette.green600 }}
66
+ >
60
67
  {children}
61
68
  <view className={"fb-shineOverlay"} style={SHINE_STYLES[phase]} />
62
69
  </view>
63
70
  <view
64
71
  className={"fb-reloadButton"}
72
+ style={{ backgroundColor: colors.palette.green600 }}
65
73
  catchtouchstart={() => clearTimer()}
66
74
  bindtap={handleReload}
67
75
  >
68
- <text className={"fb-reloadIcon"}>{"\u21BB"}</text>
76
+ <text
77
+ className={"fb-reloadIcon"}
78
+ style={{ color: colors.palette.staticWhite }}
79
+ >
80
+ {"\u21BB"}
81
+ </text>
69
82
  </view>
70
83
  </view>
71
84
  </>