@sentry/scraps 0.5.0 → 0.7.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.
- package/README.md +95 -3
- package/dist/alert/alert.js +10 -7
- package/dist/badge/tag.js +4 -2
- package/dist/button/button.js +1 -0
- package/dist/button/linkButton.js +1 -0
- package/dist/button/styles.js +157 -152
- package/dist/codeBlock/codeBlock.js +1 -0
- package/dist/compactSelect/compactSelect.d.ts +2 -2
- package/dist/compactSelect/compactSelect.js +37 -23
- package/dist/compactSelect/control.js +14 -10
- package/dist/compactSelect/gridList/index.js +35 -36
- package/dist/compactSelect/gridList/option.d.ts +4 -1
- package/dist/compactSelect/gridList/option.js +4 -3
- package/dist/compactSelect/gridList/section.d.ts +10 -3
- package/dist/compactSelect/gridList/section.js +16 -33
- package/dist/compactSelect/listBox/index.d.ts +1 -1
- package/dist/compactSelect/listBox/index.js +46 -58
- package/dist/compactSelect/listBox/section.d.ts +10 -8
- package/dist/compactSelect/listBox/section.js +11 -30
- package/dist/compactSelect/styles.d.ts +6 -7
- package/dist/compactSelect/styles.js +1 -23
- package/dist/compactSelect/utils.js +2 -6
- package/dist/dateTime/config.d.ts +23 -0
- package/dist/dateTime/config.js +50 -0
- package/dist/dateTime/context.d.ts +18 -0
- package/dist/dateTime/context.js +46 -0
- package/dist/dateTime/dateTime.d.ts +6 -0
- package/dist/dateTime/dateTime.js +30 -0
- package/dist/dateTime/format.d.ts +24 -0
- package/dist/dateTime/format.js +45 -0
- package/dist/dateTime/index.d.ts +6 -0
- package/dist/dateTime/index.js +6 -0
- package/dist/dateTime/intlFormatter.d.ts +9 -0
- package/dist/dateTime/intlFormatter.js +16 -0
- package/dist/dateTime/parseDate.d.ts +3 -0
- package/dist/dateTime/parseDate.js +12 -0
- package/dist/diagnostics/context.d.ts +12 -0
- package/dist/diagnostics/context.js +11 -0
- package/dist/diagnostics/index.d.ts +2 -0
- package/dist/diagnostics/index.js +1 -0
- package/dist/disclosure/disclosure.js +1 -1
- package/dist/dragHandle/dragHandle.js +3 -5
- package/dist/dropdownMenu/context.d.ts +36 -11
- package/dist/dropdownMenu/context.js +2 -1
- package/dist/dropdownMenu/dropdownMenu.d.ts +2 -2
- package/dist/dropdownMenu/dropdownMenu.js +9 -3
- package/dist/dropdownMenu/item.d.ts +7 -8
- package/dist/dropdownMenu/item.js +43 -77
- package/dist/dropdownMenu/list.d.ts +31 -5
- package/dist/dropdownMenu/list.js +154 -133
- package/dist/dropdownMenu/useDropdownMenuKeyboard.d.ts +5 -241
- package/dist/dropdownMenu/useDropdownMenuKeyboard.js +5 -29
- package/dist/dropdownMenu/useDropdownMenuRowLayout.js +6 -14
- package/dist/dropdownMenu/useDropdownRootMenuState.d.ts +13 -0
- package/dist/dropdownMenu/useDropdownRootMenuState.js +30 -0
- package/dist/dropdownMenu/useDropdownSubmenuState.d.ts +19 -0
- package/dist/dropdownMenu/useDropdownSubmenuState.js +25 -0
- package/dist/dropdownMenu/utils.js +5 -7
- package/dist/duration/formatElapsedDuration.d.ts +4 -0
- package/dist/duration/formatElapsedDuration.js +10 -0
- package/dist/duration/getDuration.d.ts +68 -0
- package/dist/duration/getDuration.js +80 -0
- package/dist/duration/index.d.ts +2 -0
- package/dist/duration/index.js +2 -0
- package/dist/form/field/radioGroupField.d.ts +7 -0
- package/dist/form/field/radioGroupField.js +14 -0
- package/dist/form/field/selectField.d.ts +3 -4
- package/dist/form/field/selectField.js +16 -24
- package/dist/{compactSelect/fzf.d.ts → fzf.d.ts} +1 -0
- package/dist/{compactSelect/fzf.js → fzf.js} +5 -1
- package/dist/layout/container.d.ts +24 -7
- package/dist/layout/container.js +9 -12
- package/dist/layout/flex.js +1 -1
- package/dist/layout/grid.js +2 -2
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/stack.js +1 -1
- package/dist/layout/styles.d.ts +28 -7
- package/dist/layout/styles.js +76 -16
- package/dist/layout/surface.d.ts +2 -2
- package/dist/layout/surface.js +6 -3
- package/dist/legacyDatetime.d.ts +21 -0
- package/dist/legacyDatetime.js +13 -0
- package/dist/link/index.d.ts +1 -1
- package/dist/link/index.js +1 -1
- package/dist/link/linkBehaviorContext.d.ts +9 -0
- package/dist/link/linkBehaviorContext.js +37 -7
- package/dist/menu/menu.d.ts +1 -3
- package/dist/menu/menu.js +5 -6
- package/dist/menu/selectValue.d.ts +2 -6
- package/dist/modal/components.js +2 -2
- package/dist/overlayArrow.js +2 -2
- package/dist/relativeTime/getRelativeDate.d.ts +14 -0
- package/dist/relativeTime/getRelativeDate.js +107 -0
- package/dist/relativeTime/index.d.ts +3 -0
- package/dist/relativeTime/index.js +3 -0
- package/dist/relativeTime/relativeTime.d.ts +55 -0
- package/dist/relativeTime/relativeTime.js +102 -0
- package/dist/relativeTime/useRelativeTimeFormatter.d.ts +2 -0
- package/dist/relativeTime/useRelativeTimeFormatter.js +10 -0
- package/dist/select/chips.d.ts +14 -0
- package/dist/select/chips.js +45 -0
- package/dist/select/filter.js +7 -11
- package/dist/select/index.d.ts +1 -1
- package/dist/select/indicators.d.ts +11 -0
- package/dist/select/indicators.js +61 -0
- package/dist/select/menu.d.ts +44 -0
- package/dist/select/menu.js +103 -0
- package/dist/select/option.d.ts +23 -15
- package/dist/select/option.js +66 -58
- package/dist/select/options.d.ts +31 -0
- package/dist/select/options.js +74 -0
- package/dist/select/select.d.ts +24 -11
- package/dist/select/select.js +527 -429
- package/dist/select/styles.d.ts +148 -2
- package/dist/select/styles.js +156 -1
- package/dist/select/types.d.ts +6 -7
- package/dist/select/types.js +4 -0
- package/dist/select/utils.d.ts +2 -0
- package/dist/select/utils.js +4 -0
- package/dist/separator/separator.d.ts +2 -2
- package/dist/separator/separator.js +4 -3
- package/dist/slot/slot.js +16 -12
- package/dist/tabs/context.d.ts +9 -0
- package/dist/tabs/context.js +9 -0
- package/dist/tabs/index.d.ts +2 -4
- package/dist/tabs/index.js +1 -3
- package/dist/tabs/item.d.ts +16 -5
- package/dist/tabs/tab.js +9 -4
- package/dist/tabs/tabList.d.ts +5 -5
- package/dist/tabs/tabList.js +8 -6
- package/dist/tabs/tabPanels.d.ts +2 -3
- package/dist/tabs/tabPanels.js +1 -1
- package/dist/tabs/tabs.d.ts +46 -31
- package/dist/tabs/tabs.js +38 -35
- package/dist/text/prose.d.ts +2 -2
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/theme.d.ts +34 -34
- package/dist/theme/theme.js +9 -0
- package/dist/theme/types.d.ts +21 -2
- package/dist/theme/useResolvedTheme.d.ts +12 -0
- package/dist/theme/useResolvedTheme.js +20 -0
- package/dist/theme/variables.css +1116 -0
- package/dist/theme/variables.d.ts +985 -0
- package/dist/theme/variables.js +455 -0
- package/dist/translation/index.d.ts +1 -0
- package/dist/translation/index.js +1 -0
- package/dist/translation/translate.d.ts +9 -0
- package/dist/translation/translate.js +5 -0
- package/dist/translation/translationContext.d.ts +2 -1
- package/dist/translation/translationContext.js +2 -1
- package/dist/useVirtualCollection.d.ts +14 -1
- package/dist/useVirtualCollection.js +59 -3
- package/fonts/OFL.txt +94 -0
- package/fonts/roboto-mono-variable-cyrillic-ext.woff2 +0 -0
- package/fonts/roboto-mono-variable-cyrillic.woff2 +0 -0
- package/fonts/roboto-mono-variable-greek.woff2 +0 -0
- package/fonts/roboto-mono-variable-latin-ext.woff2 +0 -0
- package/fonts/roboto-mono-variable-vietnamese.woff2 +0 -0
- package/fonts/roboto-mono-variable.woff2 +0 -0
- package/fonts/rubik-variable-cyrillic-ext.woff2 +0 -0
- package/fonts/rubik-variable-cyrillic.woff2 +0 -0
- package/fonts/rubik-variable-latin-ext.woff2 +0 -0
- package/fonts/rubik-variable.woff2 +0 -0
- package/fonts.css +211 -0
- package/package.json +39 -15
- package/dist/compactSelect/useVirtualizedItems.d.ts +0 -52
- package/dist/compactSelect/useVirtualizedItems.js +0 -74
- package/dist/datetime.d.ts +0 -39
- package/dist/datetime.js +0 -20
- package/dist/dropdownMenu/useSafetyTriangle.d.ts +0 -12
- package/dist/dropdownMenu/useSafetyTriangle.js +0 -119
- package/dist/select/reactSelectWrapper.d.ts +0 -8
- package/dist/select/reactSelectWrapper.js +0 -25
- package/dist/select/virtualizedMenuList.d.ts +0 -24
- package/dist/select/virtualizedMenuList.js +0 -123
package/fonts/OFL.txt
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Copyright 2015 The Rubik Project Authors (https://github.com/googlefonts/rubik)
|
|
2
|
+
Copyright 2015 The Roboto Mono Project Authors (https://github.com/googlefonts/robotomono)
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
http://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/fonts.css
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/* Rubik, weights 400-500, declared up to 600 so semibold isn't synthesized */
|
|
2
|
+
|
|
3
|
+
/* latin */
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: 'Rubik';
|
|
6
|
+
font-style: normal;
|
|
7
|
+
font-weight: 400 600;
|
|
8
|
+
ascent-override: 93.5%;
|
|
9
|
+
descent-override: 23%;
|
|
10
|
+
line-gap-override: 0%;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
src: url('./fonts/rubik-variable.woff2') format('woff2');
|
|
13
|
+
unicode-range:
|
|
14
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
|
|
15
|
+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* latin-ext */
|
|
19
|
+
@font-face {
|
|
20
|
+
font-family: 'Rubik';
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 400 600;
|
|
23
|
+
ascent-override: 93.5%;
|
|
24
|
+
descent-override: 23%;
|
|
25
|
+
line-gap-override: 0%;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
src: url('./fonts/rubik-variable-latin-ext.woff2') format('woff2');
|
|
28
|
+
unicode-range:
|
|
29
|
+
U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
|
|
30
|
+
U+2C60-2C7F, U+A720-A7FF;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* cyrillic */
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'Rubik';
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 400 600;
|
|
38
|
+
ascent-override: 93.5%;
|
|
39
|
+
descent-override: 23%;
|
|
40
|
+
line-gap-override: 0%;
|
|
41
|
+
font-display: swap;
|
|
42
|
+
src: url('./fonts/rubik-variable-cyrillic.woff2') format('woff2');
|
|
43
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* cyrillic-ext */
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: 'Rubik';
|
|
49
|
+
font-style: normal;
|
|
50
|
+
font-weight: 400 600;
|
|
51
|
+
ascent-override: 93.5%;
|
|
52
|
+
descent-override: 23%;
|
|
53
|
+
line-gap-override: 0%;
|
|
54
|
+
font-display: swap;
|
|
55
|
+
src: url('./fonts/rubik-variable-cyrillic-ext.woff2') format('woff2');
|
|
56
|
+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Roboto Mono, weights 425-600 */
|
|
60
|
+
|
|
61
|
+
/* latin */
|
|
62
|
+
@font-face {
|
|
63
|
+
font-family: 'Roboto Mono';
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: 425 600;
|
|
66
|
+
size-adjust: 98.46154%;
|
|
67
|
+
ascent-override: 94.96094%;
|
|
68
|
+
descent-override: 23.35938%;
|
|
69
|
+
line-gap-override: 0%;
|
|
70
|
+
font-display: swap;
|
|
71
|
+
src: url('./fonts/roboto-mono-variable.woff2') format('woff2');
|
|
72
|
+
unicode-range:
|
|
73
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
|
|
74
|
+
U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
|
|
75
|
+
U+FFFD;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* latin-ext */
|
|
79
|
+
@font-face {
|
|
80
|
+
font-family: 'Roboto Mono';
|
|
81
|
+
font-style: normal;
|
|
82
|
+
font-weight: 425 600;
|
|
83
|
+
size-adjust: 98.46154%;
|
|
84
|
+
ascent-override: 94.96094%;
|
|
85
|
+
descent-override: 23.35938%;
|
|
86
|
+
line-gap-override: 0%;
|
|
87
|
+
font-display: swap;
|
|
88
|
+
src: url('./fonts/roboto-mono-variable-latin-ext.woff2') format('woff2');
|
|
89
|
+
unicode-range:
|
|
90
|
+
U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
|
|
91
|
+
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* vietnamese */
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: 'Roboto Mono';
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-weight: 425 600;
|
|
99
|
+
size-adjust: 98.46154%;
|
|
100
|
+
ascent-override: 94.96094%;
|
|
101
|
+
descent-override: 23.35938%;
|
|
102
|
+
line-gap-override: 0%;
|
|
103
|
+
font-display: swap;
|
|
104
|
+
src: url('./fonts/roboto-mono-variable-vietnamese.woff2') format('woff2');
|
|
105
|
+
unicode-range:
|
|
106
|
+
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
|
|
107
|
+
U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* greek */
|
|
111
|
+
@font-face {
|
|
112
|
+
font-family: 'Roboto Mono';
|
|
113
|
+
font-style: normal;
|
|
114
|
+
font-weight: 425 600;
|
|
115
|
+
size-adjust: 98.46154%;
|
|
116
|
+
ascent-override: 94.96094%;
|
|
117
|
+
descent-override: 23.35938%;
|
|
118
|
+
line-gap-override: 0%;
|
|
119
|
+
font-display: swap;
|
|
120
|
+
src: url('./fonts/roboto-mono-variable-greek.woff2') format('woff2');
|
|
121
|
+
unicode-range: U+0370-03FF;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* cyrillic */
|
|
125
|
+
@font-face {
|
|
126
|
+
font-family: 'Roboto Mono';
|
|
127
|
+
font-style: normal;
|
|
128
|
+
font-weight: 425 600;
|
|
129
|
+
size-adjust: 98.46154%;
|
|
130
|
+
ascent-override: 94.96094%;
|
|
131
|
+
descent-override: 23.35938%;
|
|
132
|
+
line-gap-override: 0%;
|
|
133
|
+
font-display: swap;
|
|
134
|
+
src: url('./fonts/roboto-mono-variable-cyrillic.woff2') format('woff2');
|
|
135
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* cyrillic-ext */
|
|
139
|
+
@font-face {
|
|
140
|
+
font-family: 'Roboto Mono';
|
|
141
|
+
font-style: normal;
|
|
142
|
+
font-weight: 425 600;
|
|
143
|
+
size-adjust: 98.46154%;
|
|
144
|
+
ascent-override: 94.96094%;
|
|
145
|
+
descent-override: 23.35938%;
|
|
146
|
+
line-gap-override: 0%;
|
|
147
|
+
font-display: swap;
|
|
148
|
+
src: url('./fonts/roboto-mono-variable-cyrillic-ext.woff2') format('woff2');
|
|
149
|
+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Local fallbacks with the same line metrics as Rubik and Roboto Mono. */
|
|
153
|
+
|
|
154
|
+
@font-face {
|
|
155
|
+
font-family: 'scraps-fallback-sans';
|
|
156
|
+
font-style: normal;
|
|
157
|
+
font-weight: 400 499;
|
|
158
|
+
src: local('ArialMT'), local('Arial');
|
|
159
|
+
size-adjust: 103.18287%;
|
|
160
|
+
ascent-override: 90.61582%;
|
|
161
|
+
descent-override: 22.29052%;
|
|
162
|
+
line-gap-override: 0%;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@font-face {
|
|
166
|
+
font-family: 'scraps-fallback-sans';
|
|
167
|
+
font-style: normal;
|
|
168
|
+
font-weight: 500 599;
|
|
169
|
+
src: local('ArialMT'), local('Arial');
|
|
170
|
+
size-adjust: 106.80257%;
|
|
171
|
+
ascent-override: 87.54471%;
|
|
172
|
+
descent-override: 21.53506%;
|
|
173
|
+
line-gap-override: 0%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@font-face {
|
|
177
|
+
font-family: 'scraps-fallback-sans';
|
|
178
|
+
font-style: normal;
|
|
179
|
+
font-weight: 600 700;
|
|
180
|
+
src: local('Arial-BoldMT'), local('Arial Bold');
|
|
181
|
+
size-adjust: 100.15483%;
|
|
182
|
+
ascent-override: 93.35546%;
|
|
183
|
+
descent-override: 22.96444%;
|
|
184
|
+
line-gap-override: 0%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@font-face {
|
|
188
|
+
font-family: 'scraps-fallback-mono';
|
|
189
|
+
font-style: normal;
|
|
190
|
+
font-weight: 400 500;
|
|
191
|
+
src:
|
|
192
|
+
local('AndaleMono'), local('Andale Mono'), local('CourierNewPSMT'),
|
|
193
|
+
local('Courier New');
|
|
194
|
+
size-adjust: 98.46154%;
|
|
195
|
+
ascent-override: 94.96094%;
|
|
196
|
+
descent-override: 23.35938%;
|
|
197
|
+
line-gap-override: 0%;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@font-face {
|
|
201
|
+
font-family: 'scraps-fallback-mono';
|
|
202
|
+
font-style: normal;
|
|
203
|
+
font-weight: 501 700;
|
|
204
|
+
src:
|
|
205
|
+
local('CourierNewPS-BoldMT'), local('Courier New Bold'), local('AndaleMono'),
|
|
206
|
+
local('Andale Mono'), local('CourierNewPSMT'), local('Courier New');
|
|
207
|
+
size-adjust: 98.46154%;
|
|
208
|
+
ascent-override: 94.96094%;
|
|
209
|
+
descent-override: 23.35938%;
|
|
210
|
+
line-gap-override: 0%;
|
|
211
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/scraps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/getsentry/sentry.git",
|
|
7
7
|
"directory": "static/packages/scraps"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"fonts.css",
|
|
12
|
+
"fonts/*.woff2",
|
|
13
|
+
"fonts/OFL.txt"
|
|
11
14
|
],
|
|
12
15
|
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
13
19
|
"exports": {
|
|
20
|
+
"./fonts.css": "./fonts.css",
|
|
21
|
+
"./fonts/*.woff2": "./fonts/*.woff2",
|
|
14
22
|
"./code/inlineCode": {
|
|
15
23
|
"types": "./dist/code/inlineCode.d.ts",
|
|
16
24
|
"import": "./dist/code/inlineCode.js"
|
|
@@ -23,6 +31,7 @@
|
|
|
23
31
|
"types": "./dist/theme/index.d.ts",
|
|
24
32
|
"import": "./dist/theme/index.js"
|
|
25
33
|
},
|
|
34
|
+
"./theme.css": "./dist/theme/variables.css",
|
|
26
35
|
"./form": {
|
|
27
36
|
"types": "./dist/form/index.d.ts",
|
|
28
37
|
"import": "./dist/form/index.js"
|
|
@@ -103,10 +112,6 @@
|
|
|
103
112
|
"types": "./dist/boundaryContext.d.ts",
|
|
104
113
|
"import": "./dist/boundaryContext.js"
|
|
105
114
|
},
|
|
106
|
-
"./datetime": {
|
|
107
|
-
"types": "./dist/datetime.d.ts",
|
|
108
|
-
"import": "./dist/datetime.js"
|
|
109
|
-
},
|
|
110
115
|
"./sizeContext": {
|
|
111
116
|
"types": "./dist/sizeContext.d.ts",
|
|
112
117
|
"import": "./dist/sizeContext.js"
|
|
@@ -135,6 +140,10 @@
|
|
|
135
140
|
"types": "./dist/trackingContext.d.ts",
|
|
136
141
|
"import": "./dist/trackingContext.js"
|
|
137
142
|
},
|
|
143
|
+
"./diagnostics": {
|
|
144
|
+
"types": "./dist/diagnostics/index.d.ts",
|
|
145
|
+
"import": "./dist/diagnostics/index.js"
|
|
146
|
+
},
|
|
138
147
|
"./image": {
|
|
139
148
|
"types": "./dist/image/index.d.ts",
|
|
140
149
|
"import": "./dist/image/index.js"
|
|
@@ -322,6 +331,22 @@
|
|
|
322
331
|
"./pagination": {
|
|
323
332
|
"types": "./dist/pagination/index.d.ts",
|
|
324
333
|
"import": "./dist/pagination/index.js"
|
|
334
|
+
},
|
|
335
|
+
"./duration": {
|
|
336
|
+
"types": "./dist/duration/index.d.ts",
|
|
337
|
+
"import": "./dist/duration/index.js"
|
|
338
|
+
},
|
|
339
|
+
"./relativeTime": {
|
|
340
|
+
"types": "./dist/relativeTime/index.d.ts",
|
|
341
|
+
"import": "./dist/relativeTime/index.js"
|
|
342
|
+
},
|
|
343
|
+
"./dateTime": {
|
|
344
|
+
"types": "./dist/dateTime/index.d.ts",
|
|
345
|
+
"import": "./dist/dateTime/index.js"
|
|
346
|
+
},
|
|
347
|
+
"./datetime": {
|
|
348
|
+
"types": "./dist/legacyDatetime.d.ts",
|
|
349
|
+
"import": "./dist/legacyDatetime.js"
|
|
325
350
|
}
|
|
326
351
|
},
|
|
327
352
|
"publishConfig": {
|
|
@@ -332,6 +357,7 @@
|
|
|
332
357
|
"@emotion/is-prop-valid": "^1.4.0",
|
|
333
358
|
"@emotion/styled": "^11.14.0",
|
|
334
359
|
"@floating-ui/react-dom": "^2.1.9",
|
|
360
|
+
"@js-temporal/polyfill": "0.5.1",
|
|
335
361
|
"@react-aria/button": "3.15.1",
|
|
336
362
|
"@react-aria/disclosure": "3.2.1",
|
|
337
363
|
"@react-aria/focus": "3.22.1",
|
|
@@ -343,6 +369,7 @@
|
|
|
343
369
|
"@react-aria/numberfield": "3.13.1",
|
|
344
370
|
"@react-aria/overlays": "3.32.1",
|
|
345
371
|
"@react-aria/radio": "3.13.1",
|
|
372
|
+
"@react-aria/selection": "3.28.1",
|
|
346
373
|
"@react-aria/separator": "3.5.1",
|
|
347
374
|
"@react-aria/slider": "3.9.1",
|
|
348
375
|
"@react-aria/tabs": "3.12.1",
|
|
@@ -351,6 +378,7 @@
|
|
|
351
378
|
"@react-stately/collections": "3.13.1",
|
|
352
379
|
"@react-stately/disclosure": "3.1.1",
|
|
353
380
|
"@react-stately/list": "3.14.1",
|
|
381
|
+
"@react-stately/menu": "3.10.1",
|
|
354
382
|
"@react-stately/numberfield": "3.12.1",
|
|
355
383
|
"@react-stately/overlays": "3.7.1",
|
|
356
384
|
"@react-stately/radio": "3.12.1",
|
|
@@ -359,20 +387,16 @@
|
|
|
359
387
|
"@react-stately/tree": "3.10.1",
|
|
360
388
|
"@react-types/shared": "3.36.0",
|
|
361
389
|
"@sentry/icons": "0.1.0",
|
|
362
|
-
"@sentry/react": "11.12.0",
|
|
363
390
|
"@tanstack/react-hotkeys": "0.18.0",
|
|
364
391
|
"@tanstack/react-pacer": "^0.22.1",
|
|
365
392
|
"@tanstack/react-virtual": "3.14.6",
|
|
366
393
|
"@types/react": "19.3.0",
|
|
367
|
-
"@types/react-select": "4.0.18",
|
|
368
394
|
"classnames": "2.3.1",
|
|
369
395
|
"focus-trap": "8.2.2",
|
|
370
396
|
"framer-motion": "12.38.0",
|
|
371
397
|
"input-otp": "^1.5.0",
|
|
372
398
|
"prismjs": "^1.30.0",
|
|
373
|
-
"query-string": "7.0.1",
|
|
374
399
|
"react-error-boundary": "^6.1.6",
|
|
375
|
-
"react-select": "4.3.1",
|
|
376
400
|
"react-textarea-autosize": "8.5.7",
|
|
377
401
|
"sonner": "2.0.8",
|
|
378
402
|
"type-fest": "^5.10.0",
|
|
@@ -382,13 +406,13 @@
|
|
|
382
406
|
"@jest/environment": "30.5.1",
|
|
383
407
|
"@jest/environment-jsdom-abstract": "30.5.1",
|
|
384
408
|
"@rsbuild/plugin-react": "2.1.1",
|
|
385
|
-
"@rslib/core": "1.0.
|
|
409
|
+
"@rslib/core": "1.0.7",
|
|
386
410
|
"@swc/core": "1.16.22",
|
|
387
411
|
"@swc/jest": "0.2.39",
|
|
388
412
|
"@tanstack/react-form": "1.28.6",
|
|
389
413
|
"@tanstack/react-query": "5.101.4",
|
|
390
414
|
"@testing-library/dom": "10.4.1",
|
|
391
|
-
"@testing-library/jest-dom": "
|
|
415
|
+
"@testing-library/jest-dom": "8.0.0",
|
|
392
416
|
"@testing-library/react": "16.3.2",
|
|
393
417
|
"@testing-library/user-event": "14.6.7",
|
|
394
418
|
"@types/jest": "30.0.0",
|
|
@@ -398,8 +422,8 @@
|
|
|
398
422
|
"expect-type": "1.4.0",
|
|
399
423
|
"jest": "30.5.1",
|
|
400
424
|
"jsdom": "30.1.1",
|
|
401
|
-
"
|
|
402
|
-
"oxlint
|
|
425
|
+
"moment-timezone": "0.6.2",
|
|
426
|
+
"oxlint": "1.96.0",
|
|
403
427
|
"stylelint": "16.26.1",
|
|
404
428
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
405
429
|
"zod": "4.6.7"
|
|
@@ -415,7 +439,7 @@
|
|
|
415
439
|
"scripts": {
|
|
416
440
|
"build": "rslib build",
|
|
417
441
|
"test": "NODE_ENV=test jest --config jest.config.mjs",
|
|
418
|
-
"typecheck": "
|
|
442
|
+
"typecheck": "tsrs --build tsconfig.test.json",
|
|
419
443
|
"lint": "pnpm run lint:js && pnpm run lint:css",
|
|
420
444
|
"lint:js": "oxlint --type-aware --report-unused-disable-directives",
|
|
421
445
|
"lint:css": "stylelint '**/*.[jt]sx' --allow-empty-input"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@react-types/shared';
|
|
2
|
-
import type { FormSize } from '../theme/index.js';
|
|
3
|
-
type ObjectLike = object;
|
|
4
|
-
export declare function useVirtualizedItems<T extends ObjectLike>({ listItems, listPadding, virtualized, size, }: {
|
|
5
|
-
listItems: Array<Node<T>>;
|
|
6
|
-
size: FormSize;
|
|
7
|
-
virtualized: boolean | undefined;
|
|
8
|
-
listPadding?: number;
|
|
9
|
-
}): {
|
|
10
|
-
readonly items: import("@tanstack/react-virtual").VirtualItem[];
|
|
11
|
-
readonly scrollToIndex: (index: number) => void;
|
|
12
|
-
readonly scrollElementRef: import("react").RefObject<HTMLDivElement | null>;
|
|
13
|
-
readonly itemProps: (index: number) => {
|
|
14
|
-
ref: (node: Element | null) => void;
|
|
15
|
-
'data-index': number;
|
|
16
|
-
};
|
|
17
|
-
readonly wrapperProps: {
|
|
18
|
-
readonly 'data-is-virtualized': true;
|
|
19
|
-
readonly style: {
|
|
20
|
-
readonly height: number;
|
|
21
|
-
readonly width: "100%";
|
|
22
|
-
readonly position: "relative";
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
readonly listWrapStyle: {
|
|
26
|
-
readonly position: "absolute";
|
|
27
|
-
readonly top: 0;
|
|
28
|
-
readonly left: 0;
|
|
29
|
-
readonly width: "100%";
|
|
30
|
-
readonly transform: `translateY(${number}px)`;
|
|
31
|
-
};
|
|
32
|
-
} | {
|
|
33
|
-
readonly items: {
|
|
34
|
-
index: number;
|
|
35
|
-
start: number;
|
|
36
|
-
}[];
|
|
37
|
-
readonly scrollToIndex: () => void;
|
|
38
|
-
readonly scrollElementRef: undefined;
|
|
39
|
-
readonly itemProps: () => void;
|
|
40
|
-
readonly wrapperProps: {
|
|
41
|
-
readonly 'data-is-virtualized': false;
|
|
42
|
-
readonly style?: undefined;
|
|
43
|
-
};
|
|
44
|
-
readonly listWrapStyle: {
|
|
45
|
-
readonly position?: undefined;
|
|
46
|
-
readonly top?: undefined;
|
|
47
|
-
readonly left?: undefined;
|
|
48
|
-
readonly width?: undefined;
|
|
49
|
-
readonly transform?: undefined;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { useRef } from "react";
|
|
2
|
-
import { useVirtualRows } from "../useVirtualRows.js";
|
|
3
|
-
const heightEstimations = {
|
|
4
|
-
sm: {
|
|
5
|
-
regular: 32,
|
|
6
|
-
large: 49
|
|
7
|
-
},
|
|
8
|
-
md: {
|
|
9
|
-
regular: 36,
|
|
10
|
-
large: 53
|
|
11
|
-
},
|
|
12
|
-
xs: {
|
|
13
|
-
regular: 25,
|
|
14
|
-
large: 42
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const listPaddingVertical = 4;
|
|
18
|
-
function useVirtualizedItems({ listItems, listPadding = listPaddingVertical, virtualized = false, size }) {
|
|
19
|
-
const scrollElementRef = useRef(null);
|
|
20
|
-
const heightEstimation = heightEstimations[size];
|
|
21
|
-
const { totalSize, virtualItems, virtualizer } = useVirtualRows({
|
|
22
|
-
count: listItems.length,
|
|
23
|
-
getScrollElement: ()=>scrollElementRef?.current,
|
|
24
|
-
estimateSize: (index)=>{
|
|
25
|
-
const item = listItems[index];
|
|
26
|
-
if (item?.props?.details) return heightEstimation.large;
|
|
27
|
-
return heightEstimation.regular;
|
|
28
|
-
},
|
|
29
|
-
enabled: virtualized,
|
|
30
|
-
overscan: 1
|
|
31
|
-
});
|
|
32
|
-
if (virtualized) return {
|
|
33
|
-
items: virtualItems,
|
|
34
|
-
scrollToIndex: (index)=>{
|
|
35
|
-
virtualizer.scrollToIndex(index, {
|
|
36
|
-
align: 'auto'
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
scrollElementRef,
|
|
40
|
-
itemProps: (index)=>({
|
|
41
|
-
ref: virtualizer.measureElement,
|
|
42
|
-
'data-index': index
|
|
43
|
-
}),
|
|
44
|
-
wrapperProps: {
|
|
45
|
-
'data-is-virtualized': true,
|
|
46
|
-
style: {
|
|
47
|
-
height: totalSize + 2 * listPadding,
|
|
48
|
-
width: '100%',
|
|
49
|
-
position: 'relative'
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
listWrapStyle: {
|
|
53
|
-
position: 'absolute',
|
|
54
|
-
top: 0,
|
|
55
|
-
left: 0,
|
|
56
|
-
width: '100%',
|
|
57
|
-
transform: `translateY(${virtualItems[0]?.start ?? 0}px)`
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return {
|
|
61
|
-
items: listItems.map((_, index)=>({
|
|
62
|
-
index,
|
|
63
|
-
start: 0
|
|
64
|
-
})),
|
|
65
|
-
scrollToIndex: ()=>{},
|
|
66
|
-
scrollElementRef: void 0,
|
|
67
|
-
itemProps: ()=>{},
|
|
68
|
-
wrapperProps: {
|
|
69
|
-
'data-is-virtualized': false
|
|
70
|
-
},
|
|
71
|
-
listWrapStyle: {}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export { useVirtualizedItems };
|
package/dist/datetime.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* How an absolute time should be written out for the person reading it.
|
|
4
|
-
*
|
|
5
|
-
* Scraps has no notion of who is viewing, so it cannot resolve either of these
|
|
6
|
-
* on its own. The defaults are the neutral reading of a timestamp before anyone
|
|
7
|
-
* localizes it: UTC, on a 12 hour clock, which is what the unprefixed formats
|
|
8
|
-
* in `getFormat` already produce.
|
|
9
|
-
*
|
|
10
|
-
* Applications provide the viewer's values with <DateTimeProvider>.
|
|
11
|
-
*/
|
|
12
|
-
export interface DateTimeContextValue {
|
|
13
|
-
/**
|
|
14
|
-
* Whether times are written on a 12 or 24 hour clock.
|
|
15
|
-
*/
|
|
16
|
-
clockDisplay: '12' | '24';
|
|
17
|
-
/**
|
|
18
|
-
* IANA timezone name, e.g. "America/New_York".
|
|
19
|
-
*/
|
|
20
|
-
timezone: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Provide the timezone and clock that absolute times should be written in.
|
|
24
|
-
*
|
|
25
|
-
* Takes the whole value rather than separate props so that consumers wire up
|
|
26
|
-
* one thing; memoize it if you are building it inline.
|
|
27
|
-
*/
|
|
28
|
-
export declare function DateTimeProvider({ value, children, }: {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
value: DateTimeContextValue;
|
|
31
|
-
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
|
-
/**
|
|
33
|
-
* The timezone absolute times should be written in.
|
|
34
|
-
*/
|
|
35
|
-
export declare function useTimezone(): string;
|
|
36
|
-
/**
|
|
37
|
-
* Whether absolute times should be written on a 12 or 24 hour clock.
|
|
38
|
-
*/
|
|
39
|
-
export declare function useClockDisplay(): DateTimeContextValue['clockDisplay'];
|
package/dist/datetime.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
3
|
-
const DEFAULT_DATE_TIME = {
|
|
4
|
-
timezone: 'UTC',
|
|
5
|
-
clockDisplay: '12'
|
|
6
|
-
};
|
|
7
|
-
const DateTimeContext = /*#__PURE__*/ createContext(DEFAULT_DATE_TIME);
|
|
8
|
-
function DateTimeProvider({ value, children }) {
|
|
9
|
-
return /*#__PURE__*/ jsx(DateTimeContext, {
|
|
10
|
-
value: value,
|
|
11
|
-
children: children
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function useTimezone() {
|
|
15
|
-
return useContext(DateTimeContext).timezone;
|
|
16
|
-
}
|
|
17
|
-
function useClockDisplay() {
|
|
18
|
-
return useContext(DateTimeContext).clockDisplay;
|
|
19
|
-
}
|
|
20
|
-
export { DateTimeProvider, useClockDisplay, useTimezone };
|