@sentry/scraps 0.5.0 → 0.6.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 +68 -3
- 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/control.js +3 -2
- 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/dropdownMenu/context.d.ts +28 -13
- package/dist/dropdownMenu/dropdownMenu.d.ts +2 -2
- package/dist/dropdownMenu/dropdownMenu.js +9 -3
- package/dist/dropdownMenu/item.d.ts +6 -2
- package/dist/dropdownMenu/item.js +31 -71
- package/dist/dropdownMenu/list.d.ts +31 -5
- package/dist/dropdownMenu/list.js +143 -124
- package/dist/dropdownMenu/useDropdownMenuKeyboard.d.ts +5 -241
- package/dist/dropdownMenu/useDropdownMenuKeyboard.js +5 -29
- 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/{compactSelect/fzf.d.ts → fzf.d.ts} +1 -0
- package/dist/{compactSelect/fzf.js → fzf.js} +5 -1
- package/dist/layout/container.d.ts +8 -2
- package/dist/layout/container.js +2 -2
- package/dist/layout/styles.d.ts +2 -1
- package/dist/layout/styles.js +11 -5
- 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 +4 -5
- 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/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 +6 -3
- 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/theme.d.ts +34 -34
- package/dist/theme/theme.js +9 -0
- package/dist/theme/types.d.ts +20 -2
- 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/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 +30 -12
- 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/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,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/scraps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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",
|
|
13
16
|
"exports": {
|
|
17
|
+
"./fonts.css": "./fonts.css",
|
|
18
|
+
"./fonts/*.woff2": "./fonts/*.woff2",
|
|
14
19
|
"./code/inlineCode": {
|
|
15
20
|
"types": "./dist/code/inlineCode.d.ts",
|
|
16
21
|
"import": "./dist/code/inlineCode.js"
|
|
@@ -103,10 +108,6 @@
|
|
|
103
108
|
"types": "./dist/boundaryContext.d.ts",
|
|
104
109
|
"import": "./dist/boundaryContext.js"
|
|
105
110
|
},
|
|
106
|
-
"./datetime": {
|
|
107
|
-
"types": "./dist/datetime.d.ts",
|
|
108
|
-
"import": "./dist/datetime.js"
|
|
109
|
-
},
|
|
110
111
|
"./sizeContext": {
|
|
111
112
|
"types": "./dist/sizeContext.d.ts",
|
|
112
113
|
"import": "./dist/sizeContext.js"
|
|
@@ -322,6 +323,22 @@
|
|
|
322
323
|
"./pagination": {
|
|
323
324
|
"types": "./dist/pagination/index.d.ts",
|
|
324
325
|
"import": "./dist/pagination/index.js"
|
|
326
|
+
},
|
|
327
|
+
"./duration": {
|
|
328
|
+
"types": "./dist/duration/index.d.ts",
|
|
329
|
+
"import": "./dist/duration/index.js"
|
|
330
|
+
},
|
|
331
|
+
"./relativeTime": {
|
|
332
|
+
"types": "./dist/relativeTime/index.d.ts",
|
|
333
|
+
"import": "./dist/relativeTime/index.js"
|
|
334
|
+
},
|
|
335
|
+
"./dateTime": {
|
|
336
|
+
"types": "./dist/dateTime/index.d.ts",
|
|
337
|
+
"import": "./dist/dateTime/index.js"
|
|
338
|
+
},
|
|
339
|
+
"./datetime": {
|
|
340
|
+
"types": "./dist/legacyDatetime.d.ts",
|
|
341
|
+
"import": "./dist/legacyDatetime.js"
|
|
325
342
|
}
|
|
326
343
|
},
|
|
327
344
|
"publishConfig": {
|
|
@@ -332,6 +349,7 @@
|
|
|
332
349
|
"@emotion/is-prop-valid": "^1.4.0",
|
|
333
350
|
"@emotion/styled": "^11.14.0",
|
|
334
351
|
"@floating-ui/react-dom": "^2.1.9",
|
|
352
|
+
"@js-temporal/polyfill": "0.5.1",
|
|
335
353
|
"@react-aria/button": "3.15.1",
|
|
336
354
|
"@react-aria/disclosure": "3.2.1",
|
|
337
355
|
"@react-aria/focus": "3.22.1",
|
|
@@ -351,6 +369,7 @@
|
|
|
351
369
|
"@react-stately/collections": "3.13.1",
|
|
352
370
|
"@react-stately/disclosure": "3.1.1",
|
|
353
371
|
"@react-stately/list": "3.14.1",
|
|
372
|
+
"@react-stately/menu": "3.10.1",
|
|
354
373
|
"@react-stately/numberfield": "3.12.1",
|
|
355
374
|
"@react-stately/overlays": "3.7.1",
|
|
356
375
|
"@react-stately/radio": "3.12.1",
|
|
@@ -359,7 +378,7 @@
|
|
|
359
378
|
"@react-stately/tree": "3.10.1",
|
|
360
379
|
"@react-types/shared": "3.36.0",
|
|
361
380
|
"@sentry/icons": "0.1.0",
|
|
362
|
-
"@sentry/react": "11.
|
|
381
|
+
"@sentry/react": "11.17.0",
|
|
363
382
|
"@tanstack/react-hotkeys": "0.18.0",
|
|
364
383
|
"@tanstack/react-pacer": "^0.22.1",
|
|
365
384
|
"@tanstack/react-virtual": "3.14.6",
|
|
@@ -370,7 +389,6 @@
|
|
|
370
389
|
"framer-motion": "12.38.0",
|
|
371
390
|
"input-otp": "^1.5.0",
|
|
372
391
|
"prismjs": "^1.30.0",
|
|
373
|
-
"query-string": "7.0.1",
|
|
374
392
|
"react-error-boundary": "^6.1.6",
|
|
375
393
|
"react-select": "4.3.1",
|
|
376
394
|
"react-textarea-autosize": "8.5.7",
|
|
@@ -382,7 +400,7 @@
|
|
|
382
400
|
"@jest/environment": "30.5.1",
|
|
383
401
|
"@jest/environment-jsdom-abstract": "30.5.1",
|
|
384
402
|
"@rsbuild/plugin-react": "2.1.1",
|
|
385
|
-
"@rslib/core": "1.0.
|
|
403
|
+
"@rslib/core": "1.0.7",
|
|
386
404
|
"@swc/core": "1.16.22",
|
|
387
405
|
"@swc/jest": "0.2.39",
|
|
388
406
|
"@tanstack/react-form": "1.28.6",
|
|
@@ -398,8 +416,8 @@
|
|
|
398
416
|
"expect-type": "1.4.0",
|
|
399
417
|
"jest": "30.5.1",
|
|
400
418
|
"jsdom": "30.1.1",
|
|
401
|
-
"
|
|
402
|
-
"oxlint
|
|
419
|
+
"moment-timezone": "0.6.2",
|
|
420
|
+
"oxlint": "1.94.0",
|
|
403
421
|
"stylelint": "16.26.1",
|
|
404
422
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
405
423
|
"zod": "4.6.7"
|
|
@@ -415,7 +433,7 @@
|
|
|
415
433
|
"scripts": {
|
|
416
434
|
"build": "rslib build",
|
|
417
435
|
"test": "NODE_ENV=test jest --config jest.config.mjs",
|
|
418
|
-
"typecheck": "
|
|
436
|
+
"typecheck": "tsrs --build tsconfig.test.json",
|
|
419
437
|
"lint": "pnpm run lint:js && pnpm run lint:css",
|
|
420
438
|
"lint:js": "oxlint --type-aware --report-unused-disable-directives",
|
|
421
439
|
"lint:css": "stylelint '**/*.[jt]sx' --allow-empty-input"
|
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 };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
type Point = {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
};
|
|
6
|
-
export declare function useSafetyTriangle(): {
|
|
7
|
-
cancel: () => void;
|
|
8
|
-
start(origin: Point, submenu: HTMLElement): void;
|
|
9
|
-
defer(event: React.PointerEvent<HTMLElement>, enter: () => void): void;
|
|
10
|
-
leave(target: HTMLElement): void;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
function useSafetyTriangle() {
|
|
3
|
-
const [triangle] = useState(()=>{
|
|
4
|
-
let corridor = null;
|
|
5
|
-
let pending = null;
|
|
6
|
-
let timeout;
|
|
7
|
-
let abortController;
|
|
8
|
-
function cancel() {
|
|
9
|
-
abortController?.abort();
|
|
10
|
-
corridor = null;
|
|
11
|
-
pending = null;
|
|
12
|
-
clearTimeout(timeout);
|
|
13
|
-
}
|
|
14
|
-
function release() {
|
|
15
|
-
const hover = pending;
|
|
16
|
-
cancel();
|
|
17
|
-
if (hover?.target.isConnected) hover.enter();
|
|
18
|
-
}
|
|
19
|
-
function contains(point) {
|
|
20
|
-
if (!corridor) return false;
|
|
21
|
-
const { origin, edge } = corridor;
|
|
22
|
-
const cross = (a, b)=>(b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x);
|
|
23
|
-
const sides = [
|
|
24
|
-
cross(origin, edge[0]),
|
|
25
|
-
cross(edge[0], edge[1]),
|
|
26
|
-
cross(edge[1], origin)
|
|
27
|
-
];
|
|
28
|
-
return sides.every((side)=>side >= 0) || sides.every((side)=>side <= 0);
|
|
29
|
-
}
|
|
30
|
-
function move(event) {
|
|
31
|
-
if (corridor?.submenu.contains(event.target)) cancel();
|
|
32
|
-
else if (!contains({
|
|
33
|
-
x: event.clientX,
|
|
34
|
-
y: event.clientY
|
|
35
|
-
})) release();
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
cancel,
|
|
39
|
-
start (origin, submenu) {
|
|
40
|
-
cancel();
|
|
41
|
-
const rect = submenu.getBoundingClientRect();
|
|
42
|
-
if (!rect.width || !rect.height) return;
|
|
43
|
-
let edge;
|
|
44
|
-
if (origin.x < rect.left || origin.x > rect.right) {
|
|
45
|
-
const x = origin.x < rect.left ? rect.left : rect.right;
|
|
46
|
-
edge = [
|
|
47
|
-
{
|
|
48
|
-
x,
|
|
49
|
-
y: rect.top
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
x,
|
|
53
|
-
y: rect.bottom
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
} else {
|
|
57
|
-
if (!(origin.y < rect.top) && !(origin.y > rect.bottom)) return;
|
|
58
|
-
const y = origin.y < rect.top ? rect.top : rect.bottom;
|
|
59
|
-
edge = [
|
|
60
|
-
{
|
|
61
|
-
x: rect.left,
|
|
62
|
-
y
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
x: rect.right,
|
|
66
|
-
y
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
}
|
|
70
|
-
corridor = {
|
|
71
|
-
origin,
|
|
72
|
-
edge,
|
|
73
|
-
submenu
|
|
74
|
-
};
|
|
75
|
-
timeout = setTimeout(release, 300);
|
|
76
|
-
abortController = new AbortController();
|
|
77
|
-
const { signal } = abortController;
|
|
78
|
-
document.addEventListener('pointermove', move, {
|
|
79
|
-
signal
|
|
80
|
-
});
|
|
81
|
-
document.addEventListener('pointerdown', release, {
|
|
82
|
-
capture: true,
|
|
83
|
-
signal
|
|
84
|
-
});
|
|
85
|
-
document.addEventListener('keydown', cancel, {
|
|
86
|
-
capture: true,
|
|
87
|
-
signal
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
defer (event, enter) {
|
|
91
|
-
if ('mouse' !== event.pointerType) {
|
|
92
|
-
release();
|
|
93
|
-
enter();
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (!contains({
|
|
97
|
-
x: event.clientX,
|
|
98
|
-
y: event.clientY
|
|
99
|
-
})) {
|
|
100
|
-
cancel();
|
|
101
|
-
enter();
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
pending = {
|
|
105
|
-
target: event.currentTarget,
|
|
106
|
-
enter
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
leave (target) {
|
|
110
|
-
if (pending?.target === target) pending = null;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
useEffect(()=>()=>triangle.cancel(), [
|
|
115
|
-
triangle
|
|
116
|
-
]);
|
|
117
|
-
return triangle;
|
|
118
|
-
}
|
|
119
|
-
export { useSafetyTriangle };
|