@sentry/scraps 0.1.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 (63) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +67 -0
  3. package/dist/code/inlineCode.d.ts +7 -0
  4. package/dist/code/inlineCode.js +38 -0
  5. package/dist/cssTypes.d.ts +57 -0
  6. package/dist/cssTypes.js +0 -0
  7. package/dist/hotkey/kbd.d.ts +8 -0
  8. package/dist/hotkey/kbd.js +31 -0
  9. package/dist/index.d.ts +9 -0
  10. package/dist/index.js +9 -0
  11. package/dist/layout/container.d.ts +114 -0
  12. package/dist/layout/container.js +161 -0
  13. package/dist/layout/flex.d.ts +42 -0
  14. package/dist/layout/flex.js +42 -0
  15. package/dist/layout/grid.d.ts +65 -0
  16. package/dist/layout/grid.js +83 -0
  17. package/dist/layout/index.d.ts +13 -0
  18. package/dist/layout/index.js +6 -0
  19. package/dist/layout/stack.d.ts +15 -0
  20. package/dist/layout/stack.js +55 -0
  21. package/dist/layout/styles.d.ts +118 -0
  22. package/dist/layout/styles.js +237 -0
  23. package/dist/layout/surface.d.ts +27 -0
  24. package/dist/layout/surface.js +28 -0
  25. package/dist/loader/indeterminateLoader.d.ts +5 -0
  26. package/dist/loader/indeterminateLoader.js +122 -0
  27. package/dist/loader/index.d.ts +1 -0
  28. package/dist/loader/index.js +1 -0
  29. package/dist/quote/index.d.ts +1 -0
  30. package/dist/quote/index.js +1 -0
  31. package/dist/quote/quote.d.ts +13 -0
  32. package/dist/quote/quote.js +73 -0
  33. package/dist/separator/index.d.ts +1 -0
  34. package/dist/separator/index.js +1 -0
  35. package/dist/separator/separator.d.ts +15 -0
  36. package/dist/separator/separator.js +29 -0
  37. package/dist/text/heading.d.ts +44 -0
  38. package/dist/text/heading.js +69 -0
  39. package/dist/text/index.d.ts +2 -0
  40. package/dist/text/index.js +2 -0
  41. package/dist/text/styles.d.ts +5 -0
  42. package/dist/text/styles.js +18 -0
  43. package/dist/text/text.d.ts +152 -0
  44. package/dist/text/text.js +81 -0
  45. package/dist/theme/base.d.ts +106 -0
  46. package/dist/theme/base.js +7 -0
  47. package/dist/theme/dark.d.ts +1904 -0
  48. package/dist/theme/dark.js +430 -0
  49. package/dist/theme/index.d.ts +14 -0
  50. package/dist/theme/index.js +3 -0
  51. package/dist/theme/light.d.ts +1904 -0
  52. package/dist/theme/light.js +430 -0
  53. package/dist/theme/types.d.ts +80 -0
  54. package/dist/theme/types.js +0 -0
  55. package/dist/tokens/color.d.ts +3309 -0
  56. package/dist/tokens/color.js +453 -0
  57. package/dist/tokens/index.d.ts +3 -0
  58. package/dist/tokens/index.js +3 -0
  59. package/dist/tokens/size.d.ts +372 -0
  60. package/dist/tokens/size.js +75 -0
  61. package/dist/tokens/typography.d.ts +88 -0
  62. package/dist/tokens/typography.js +35 -0
  63. package/package.json +83 -0
@@ -0,0 +1,430 @@
1
+ import { color } from "../tokens/color.js";
2
+ import { baseTheme } from "./base.js";
3
+ const background = {
4
+ primary: color.neutral.dark.opaque500,
5
+ secondary: color.neutral.dark.opaque400,
6
+ tertiary: color.neutral.dark.opaque300,
7
+ overlay: color.neutral.dark.opaque600,
8
+ accent: {
9
+ vibrant: color.blue.dark.opaque900
10
+ },
11
+ promotion: {
12
+ vibrant: color.pink.dark.opaque1000
13
+ },
14
+ danger: {
15
+ vibrant: color.red.dark.opaque900
16
+ },
17
+ warning: {
18
+ vibrant: color.yellow.dark.opaque1200
19
+ },
20
+ success: {
21
+ vibrant: color.green.dark.opaque1100
22
+ },
23
+ transparent: {
24
+ neutral: {
25
+ muted: color.neutral.dark.transparent200
26
+ },
27
+ accent: {
28
+ muted: color.blue.dark.transparent500
29
+ },
30
+ promotion: {
31
+ muted: color.pink.dark.transparent200
32
+ },
33
+ danger: {
34
+ muted: color.red.dark.transparent200
35
+ },
36
+ warning: {
37
+ muted: color.yellow.dark.transparent200
38
+ },
39
+ success: {
40
+ muted: color.green.dark.transparent200
41
+ }
42
+ }
43
+ };
44
+ const border = {
45
+ primary: color.neutral.dark.opaque200,
46
+ secondary: color.neutral.dark.opaque300,
47
+ neutral: {
48
+ muted: color.neutral.dark.opaque800,
49
+ moderate: color.neutral.dark.opaque900,
50
+ vibrant: color.neutral.dark.opaque1200
51
+ },
52
+ accent: {
53
+ muted: color.blue.dark.opaque800,
54
+ moderate: color.blue.dark.opaque900,
55
+ vibrant: color.blue.dark.opaque900
56
+ },
57
+ promotion: {
58
+ muted: color.pink.dark.opaque800,
59
+ moderate: color.pink.dark.opaque900,
60
+ vibrant: color.pink.dark.opaque1000
61
+ },
62
+ danger: {
63
+ muted: color.red.dark.opaque800,
64
+ moderate: color.red.dark.opaque900,
65
+ vibrant: color.red.dark.opaque900
66
+ },
67
+ warning: {
68
+ muted: color.yellow.dark.opaque900,
69
+ moderate: color.yellow.dark.opaque1100,
70
+ vibrant: color.yellow.dark.opaque1200
71
+ },
72
+ success: {
73
+ muted: color.green.dark.opaque800,
74
+ moderate: color.green.dark.opaque900,
75
+ vibrant: color.green.dark.opaque1100
76
+ },
77
+ onVibrant: {
78
+ light: color.white,
79
+ dark: color.black
80
+ },
81
+ transparent: {
82
+ neutral: {
83
+ muted: color.neutral.dark.transparent500,
84
+ moderate: color.neutral.dark.transparent900,
85
+ vibrant: color.neutral.dark.transparent900
86
+ },
87
+ accent: {
88
+ muted: color.blue.dark.transparent800,
89
+ moderate: color.blue.dark.transparent900,
90
+ vibrant: color.blue.dark.transparent900
91
+ },
92
+ promotion: {
93
+ muted: color.pink.dark.transparent700,
94
+ moderate: color.pink.dark.transparent900,
95
+ vibrant: color.pink.dark.transparent1000
96
+ },
97
+ danger: {
98
+ muted: color.red.dark.transparent600,
99
+ moderate: color.red.dark.transparent900,
100
+ vibrant: color.red.dark.transparent900
101
+ },
102
+ warning: {
103
+ muted: color.yellow.dark.transparent900,
104
+ moderate: color.yellow.dark.transparent1100,
105
+ vibrant: color.yellow.dark.transparent1200
106
+ },
107
+ success: {
108
+ muted: color.green.dark.transparent600,
109
+ moderate: color.green.dark.transparent900,
110
+ vibrant: color.green.dark.transparent1100
111
+ }
112
+ }
113
+ };
114
+ const content = {
115
+ primary: color.neutral.dark.opaque1500,
116
+ secondary: color.neutral.dark.opaque1200,
117
+ accent: color.blue.dark.opaque1200,
118
+ promotion: color.pink.dark.opaque1200,
119
+ danger: color.red.dark.opaque1200,
120
+ warning: color.yellow.dark.opaque1200,
121
+ success: color.green.dark.opaque1200,
122
+ disabled: color.neutral.dark.opaque1000,
123
+ headings: color.white,
124
+ onVibrant: {
125
+ light: color.white,
126
+ dark: color.black
127
+ }
128
+ };
129
+ const dataviz = {
130
+ categorical: [
131
+ [
132
+ color.categorical.dark.blurple
133
+ ],
134
+ [
135
+ color.categorical.dark.blurple,
136
+ color.categorical.dark.indigo
137
+ ],
138
+ [
139
+ color.categorical.dark.blurple,
140
+ color.categorical.dark.indigo,
141
+ color.categorical.dark.pink
142
+ ],
143
+ [
144
+ color.categorical.dark.blurple,
145
+ color.categorical.dark.indigo,
146
+ color.categorical.dark.pink,
147
+ color.categorical.dark.orange
148
+ ],
149
+ [
150
+ color.categorical.dark.blurple,
151
+ color.categorical.dark.indigo,
152
+ color.categorical.dark.pink,
153
+ color.categorical.dark.orange,
154
+ color.categorical.dark.yellow
155
+ ],
156
+ [
157
+ color.categorical.dark.blurple,
158
+ color.categorical.dark.indigo,
159
+ color.categorical.dark.pink,
160
+ color.categorical.dark.orange,
161
+ color.categorical.dark.yellow,
162
+ color.categorical.dark.green
163
+ ],
164
+ [
165
+ color.categorical.dark.blurple,
166
+ color.categorical.dark.purple,
167
+ color.categorical.dark.indigo,
168
+ color.categorical.dark.pink,
169
+ color.categorical.dark.orange,
170
+ color.categorical.dark.yellow,
171
+ color.categorical.dark.green
172
+ ],
173
+ [
174
+ color.categorical.dark.blurple,
175
+ color.categorical.dark.purple,
176
+ color.categorical.dark.indigo,
177
+ color.categorical.dark.plum,
178
+ color.categorical.dark.pink,
179
+ color.categorical.dark.orange,
180
+ color.categorical.dark.yellow,
181
+ color.categorical.dark.green
182
+ ],
183
+ [
184
+ color.categorical.dark.blurple,
185
+ color.categorical.dark.purple,
186
+ color.categorical.dark.indigo,
187
+ color.categorical.dark.plum,
188
+ color.categorical.dark.magenta,
189
+ color.categorical.dark.pink,
190
+ color.categorical.dark.orange,
191
+ color.categorical.dark.yellow,
192
+ color.categorical.dark.green
193
+ ],
194
+ [
195
+ color.categorical.dark.blurple,
196
+ color.categorical.dark.purple,
197
+ color.categorical.dark.indigo,
198
+ color.categorical.dark.plum,
199
+ color.categorical.dark.magenta,
200
+ color.categorical.dark.pink,
201
+ color.categorical.dark.salmon,
202
+ color.categorical.dark.orange,
203
+ color.categorical.dark.yellow,
204
+ color.categorical.dark.green
205
+ ],
206
+ [
207
+ color.categorical.dark.blurple,
208
+ color.categorical.dark.purple,
209
+ color.categorical.dark.indigo,
210
+ color.categorical.dark.plum,
211
+ color.categorical.dark.magenta,
212
+ color.categorical.dark.pink,
213
+ color.categorical.dark.salmon,
214
+ color.categorical.dark.orange,
215
+ color.categorical.dark.yellow,
216
+ color.categorical.dark.lime,
217
+ color.categorical.dark.green
218
+ ]
219
+ ],
220
+ semantic: {
221
+ neutral: color.neutral.dark.opaque900,
222
+ accent: color.categorical.dark.blurple,
223
+ good: color.green.dark.opaque1200,
224
+ meh: color.yellow.dark.opaque1200,
225
+ bad: color.red.dark.opaque900,
226
+ release: color.neutral.dark.opaque1100,
227
+ other: color.neutral.dark.opaque800
228
+ }
229
+ };
230
+ const elevation = {
231
+ high: color.neutral.light.transparent300,
232
+ low: color.neutral.light.transparent800
233
+ };
234
+ const dark_focus = {
235
+ default: border.accent.vibrant,
236
+ invalid: border.danger.vibrant,
237
+ onVibrant: {
238
+ light: border.onVibrant.light,
239
+ dark: border.onVibrant.dark
240
+ }
241
+ };
242
+ const graphics = {
243
+ neutral: {
244
+ muted: color.neutral.dark.opaque800,
245
+ moderate: color.neutral.dark.opaque900,
246
+ vibrant: color.neutral.dark.opaque1100
247
+ },
248
+ accent: {
249
+ muted: color.blue.dark.opaque800,
250
+ moderate: color.blue.dark.opaque900,
251
+ vibrant: color.blue.dark.opaque1100
252
+ },
253
+ promotion: {
254
+ muted: color.pink.dark.opaque800,
255
+ moderate: color.pink.dark.opaque900,
256
+ vibrant: color.pink.dark.opaque1100
257
+ },
258
+ danger: {
259
+ muted: color.red.dark.opaque800,
260
+ moderate: color.red.dark.opaque900,
261
+ vibrant: color.red.dark.opaque1100
262
+ },
263
+ warning: {
264
+ muted: color.yellow.dark.opaque900,
265
+ moderate: color.yellow.dark.opaque1100,
266
+ vibrant: color.yellow.dark.opaque1200
267
+ },
268
+ success: {
269
+ muted: color.green.dark.opaque800,
270
+ moderate: color.green.dark.opaque900,
271
+ vibrant: color.green.dark.opaque1200
272
+ }
273
+ };
274
+ const interactive = {
275
+ chonky: {
276
+ debossed: {
277
+ neutral: {
278
+ content: {
279
+ primary: content.headings,
280
+ secondary: content.secondary,
281
+ danger: content.danger
282
+ },
283
+ background: color.neutral.light.transparent500,
284
+ chonk: border.primary
285
+ },
286
+ accent: {
287
+ background: background.accent.vibrant,
288
+ chonk: color.blue.dark.opaque200
289
+ }
290
+ },
291
+ embossed: {
292
+ neutral: {
293
+ content: {
294
+ primary: content.headings,
295
+ secondary: content.secondary,
296
+ accent: content.accent
297
+ },
298
+ background: background.primary,
299
+ chonk: border.primary
300
+ },
301
+ accent: {
302
+ content: content.onVibrant.light,
303
+ background: background.accent.vibrant,
304
+ chonk: color.blue.dark.opaque200
305
+ },
306
+ promotion: {
307
+ content: content.onVibrant.dark,
308
+ background: background.promotion.vibrant,
309
+ chonk: color.pink.dark.opaque200
310
+ },
311
+ danger: {
312
+ content: content.onVibrant.light,
313
+ background: background.danger.vibrant,
314
+ chonk: color.red.dark.opaque200
315
+ },
316
+ warning: {
317
+ content: content.onVibrant.dark,
318
+ background: background.warning.vibrant,
319
+ chonk: color.yellow.dark.opaque200
320
+ },
321
+ success: {
322
+ content: content.onVibrant.dark,
323
+ background: background.success.vibrant,
324
+ chonk: color.green.dark.opaque200
325
+ }
326
+ }
327
+ },
328
+ disabled: '0.6',
329
+ link: {
330
+ neutral: {
331
+ rest: content.secondary,
332
+ hover: color.neutral.dark.opaque1300,
333
+ active: color.neutral.dark.opaque1400
334
+ },
335
+ accent: {
336
+ rest: content.accent,
337
+ hover: color.blue.dark.opaque1300,
338
+ active: color.blue.dark.opaque1400
339
+ }
340
+ },
341
+ transparent: {
342
+ neutral: {
343
+ border: border.transparent.neutral.muted,
344
+ content: {
345
+ primary: content.primary,
346
+ secondary: content.secondary,
347
+ headings: content.headings
348
+ },
349
+ background: {
350
+ rest: '#c0a8f800',
351
+ hover: color.neutral.dark.transparent100,
352
+ active: color.neutral.dark.transparent200
353
+ }
354
+ },
355
+ accent: {
356
+ border: border.transparent.accent.muted,
357
+ content: {
358
+ primary: content.accent,
359
+ secondary: content.secondary,
360
+ headings: content.headings
361
+ },
362
+ background: {
363
+ rest: '#4828b800',
364
+ hover: color.blue.dark.transparent500,
365
+ active: color.blue.dark.transparent600
366
+ },
367
+ selected: {
368
+ background: {
369
+ rest: color.blue.dark.transparent400,
370
+ hover: color.blue.dark.transparent500,
371
+ active: color.blue.dark.transparent600
372
+ }
373
+ }
374
+ }
375
+ }
376
+ };
377
+ const syntax = {
378
+ base: content.primary,
379
+ codeBackground: background.secondary,
380
+ comment: content.secondary,
381
+ function: content.accent,
382
+ hightlightAccent: color.neutral.dark.transparent400,
383
+ hightlightBackground: background.transparent.neutral.muted,
384
+ inlineCode: content.primary,
385
+ keyWord: content.danger,
386
+ operator: content.accent,
387
+ property: content.accent,
388
+ punctuation: content.primary,
389
+ selector: content.success,
390
+ variable: content.primary,
391
+ ansi: {
392
+ black: color.neutral.dark.opaque1500,
393
+ red: color.red.dark.opaque1200,
394
+ green: color.green.dark.opaque1300,
395
+ yellow: color.yellow.dark.opaque1300,
396
+ blue: color.blue.dark.opaque1200,
397
+ magenta: color.pink.dark.opaque1200,
398
+ cyan: color.blue.dark.opaque1100,
399
+ white: color.neutral.dark.opaque1500,
400
+ brightBlack: color.neutral.dark.opaque1200,
401
+ brightRed: color.red.dark.opaque1300,
402
+ brightGreen: color.green.dark.opaque1400,
403
+ brightYellow: color.yellow.dark.opaque1400,
404
+ brightBlue: color.blue.dark.opaque1300,
405
+ brightMagenta: color.pink.dark.opaque1300,
406
+ brightCyan: color.blue.dark.opaque1100,
407
+ brightWhite: color.neutral.dark.opaque1500
408
+ }
409
+ };
410
+ const shadow = {
411
+ low: `0px ${baseTheme.elevation.sm} 0px 0px ${elevation.low}`,
412
+ medium: `0px ${baseTheme.elevation.md} 0px 1px ${elevation.high}, 0px ${baseTheme.elevation.sm} 0px 0px ${elevation.high}`,
413
+ high: `0px ${baseTheme.elevation.lg} 0px 2px ${elevation.high}, 0px ${baseTheme.elevation.sm} 0px 1px ${elevation.high}`
414
+ };
415
+ const darkTheme = {
416
+ ...baseTheme,
417
+ shadow: shadow,
418
+ tokens: {
419
+ background: background,
420
+ border: border,
421
+ content: content,
422
+ dataviz: dataviz,
423
+ elevation: elevation,
424
+ focus: dark_focus,
425
+ graphics: graphics,
426
+ interactive: interactive,
427
+ syntax: syntax
428
+ }
429
+ };
430
+ export { darkTheme };
@@ -0,0 +1,14 @@
1
+ import type { darkTheme } from './dark.js';
2
+ import type { lightTheme } from './light.js';
3
+ export { lightTheme } from './light.js';
4
+ export { darkTheme } from './dark.js';
5
+ export { baseTheme } from './base.js';
6
+ export type * from './types.js';
7
+ export type Theme = {
8
+ [Key in keyof typeof lightTheme]: (typeof lightTheme)[Key] | (typeof darkTheme)[Key];
9
+ };
10
+ type ScrapsTheme = Theme;
11
+ declare module '@emotion/react' {
12
+ interface Theme extends ScrapsTheme {
13
+ }
14
+ }
@@ -0,0 +1,3 @@
1
+ export { lightTheme } from "./light.js";
2
+ export { darkTheme } from "./dark.js";
3
+ export { baseTheme } from "./base.js";