@sentry/scraps 0.4.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.
Files changed (352) hide show
  1. package/README.md +74 -8
  2. package/dist/alert/alert.js +0 -3
  3. package/dist/badge/badge.js +1 -2
  4. package/dist/badge/tag.js +4 -4
  5. package/dist/button/button.js +1 -0
  6. package/dist/button/index.d.ts +0 -1
  7. package/dist/button/index.js +0 -1
  8. package/dist/button/linkButton.js +1 -0
  9. package/dist/button/styles.js +157 -152
  10. package/dist/clipboard/copyToClipboardButton.d.ts +15 -0
  11. package/dist/clipboard/copyToClipboardButton.js +32 -0
  12. package/dist/clipboard/index.d.ts +1 -0
  13. package/dist/clipboard/index.js +1 -0
  14. package/dist/code/index.d.ts +1 -0
  15. package/dist/code/index.js +1 -0
  16. package/dist/codeBlock/codeBlock.d.ts +68 -0
  17. package/dist/codeBlock/codeBlock.js +243 -0
  18. package/dist/codeBlock/index.d.ts +2 -0
  19. package/dist/codeBlock/index.js +2 -0
  20. package/dist/codeBlock/prism.d.ts +11 -0
  21. package/dist/codeBlock/prism.js +101 -0
  22. package/dist/codeBlock/styles.d.ts +2 -0
  23. package/dist/codeBlock/styles.js +133 -0
  24. package/dist/compactSelect/compactSelect.d.ts +21 -0
  25. package/dist/compactSelect/compactSelect.js +150 -0
  26. package/dist/compactSelect/composite.d.ts +54 -0
  27. package/dist/compactSelect/composite.js +101 -0
  28. package/dist/compactSelect/control.d.ts +112 -0
  29. package/dist/compactSelect/control.js +355 -0
  30. package/dist/compactSelect/gridList/index.d.ts +46 -0
  31. package/dist/compactSelect/gridList/index.js +102 -0
  32. package/dist/compactSelect/gridList/option.d.ts +15 -0
  33. package/dist/compactSelect/gridList/option.js +111 -0
  34. package/dist/compactSelect/gridList/section.d.ts +15 -0
  35. package/dist/compactSelect/gridList/section.js +58 -0
  36. package/dist/compactSelect/highlightText.d.ts +6 -0
  37. package/dist/compactSelect/highlightText.js +33 -0
  38. package/dist/compactSelect/index.d.ts +9 -0
  39. package/dist/compactSelect/index.js +8 -0
  40. package/dist/compactSelect/list.d.ts +94 -0
  41. package/dist/compactSelect/list.js +167 -0
  42. package/dist/compactSelect/listBox/index.d.ts +84 -0
  43. package/dist/compactSelect/listBox/index.js +175 -0
  44. package/dist/compactSelect/listBox/option.d.ts +19 -0
  45. package/dist/compactSelect/listBox/option.js +101 -0
  46. package/dist/compactSelect/listBox/section.d.ts +21 -0
  47. package/dist/compactSelect/listBox/section.js +58 -0
  48. package/dist/compactSelect/menuComponents.d.ts +89 -0
  49. package/dist/compactSelect/menuComponents.js +117 -0
  50. package/dist/compactSelect/selectFilterContext.d.ts +2 -0
  51. package/dist/compactSelect/selectFilterContext.js +3 -0
  52. package/dist/compactSelect/styles.d.ts +39 -0
  53. package/dist/compactSelect/styles.js +155 -0
  54. package/dist/compactSelect/types.d.ts +1 -0
  55. package/dist/compactSelect/types.js +0 -0
  56. package/dist/compactSelect/useVirtualizedItems.d.ts +52 -0
  57. package/dist/compactSelect/useVirtualizedItems.js +74 -0
  58. package/dist/compactSelect/utils.d.ts +80 -0
  59. package/dist/compactSelect/utils.js +264 -0
  60. package/dist/confirm/index.d.ts +153 -0
  61. package/dist/confirm/index.js +132 -0
  62. package/dist/dateTime/config.d.ts +23 -0
  63. package/dist/dateTime/config.js +50 -0
  64. package/dist/dateTime/context.d.ts +18 -0
  65. package/dist/dateTime/context.js +46 -0
  66. package/dist/dateTime/dateTime.d.ts +6 -0
  67. package/dist/dateTime/dateTime.js +30 -0
  68. package/dist/dateTime/format.d.ts +24 -0
  69. package/dist/dateTime/format.js +45 -0
  70. package/dist/dateTime/index.d.ts +6 -0
  71. package/dist/dateTime/index.js +6 -0
  72. package/dist/dateTime/intlFormatter.d.ts +9 -0
  73. package/dist/dateTime/intlFormatter.js +16 -0
  74. package/dist/dateTime/parseDate.d.ts +3 -0
  75. package/dist/dateTime/parseDate.js +12 -0
  76. package/dist/descriptionList/descriptionList.js +4 -3
  77. package/dist/disclosure/disclosure.js +2 -2
  78. package/dist/dragHandle/dragHandle.d.ts +3 -1
  79. package/dist/dragHandle/dragHandle.js +8 -5
  80. package/dist/drawer/components.d.ts +46 -0
  81. package/dist/drawer/components.js +265 -0
  82. package/dist/drawer/globalDrawer.d.ts +106 -0
  83. package/dist/drawer/globalDrawer.js +173 -0
  84. package/dist/drawer/index.d.ts +3 -0
  85. package/dist/drawer/index.js +2 -0
  86. package/dist/drawer/useDrawerResizing.d.ts +19 -0
  87. package/dist/drawer/useDrawerResizing.js +111 -0
  88. package/dist/drawer/useDrawerWidth.d.ts +1 -0
  89. package/dist/drawer/useDrawerWidth.js +42 -0
  90. package/dist/dropdownMenu/content.d.ts +1 -0
  91. package/dist/dropdownMenu/content.js +1 -0
  92. package/dist/dropdownMenu/context.d.ts +39 -0
  93. package/dist/dropdownMenu/context.js +3 -0
  94. package/dist/dropdownMenu/dropdownMenu.d.ts +70 -0
  95. package/dist/dropdownMenu/dropdownMenu.js +109 -0
  96. package/dist/dropdownMenu/index.d.ts +2 -0
  97. package/dist/dropdownMenu/index.js +1 -0
  98. package/dist/dropdownMenu/item.d.ts +140 -0
  99. package/dist/dropdownMenu/item.js +142 -0
  100. package/dist/dropdownMenu/list.d.ts +85 -0
  101. package/dist/dropdownMenu/list.js +429 -0
  102. package/dist/dropdownMenu/search.d.ts +16 -0
  103. package/dist/dropdownMenu/search.js +16 -0
  104. package/dist/dropdownMenu/section.d.ts +21 -0
  105. package/dist/dropdownMenu/section.js +40 -0
  106. package/dist/dropdownMenu/separator.d.ts +7 -0
  107. package/dist/dropdownMenu/separator.js +15 -0
  108. package/dist/dropdownMenu/useDropdownMenuKeyboard.d.ts +24 -0
  109. package/dist/dropdownMenu/useDropdownMenuKeyboard.js +31 -0
  110. package/dist/dropdownMenu/useDropdownMenuRowLayout.d.ts +29 -0
  111. package/dist/dropdownMenu/useDropdownMenuRowLayout.js +64 -0
  112. package/dist/dropdownMenu/useDropdownRootMenuState.d.ts +13 -0
  113. package/dist/dropdownMenu/useDropdownRootMenuState.js +30 -0
  114. package/dist/dropdownMenu/useDropdownSubmenuState.d.ts +19 -0
  115. package/dist/dropdownMenu/useDropdownSubmenuState.js +25 -0
  116. package/dist/dropdownMenu/utils.d.ts +21 -0
  117. package/dist/dropdownMenu/utils.js +55 -0
  118. package/dist/duration/formatElapsedDuration.d.ts +4 -0
  119. package/dist/duration/formatElapsedDuration.js +10 -0
  120. package/dist/duration/getDuration.d.ts +68 -0
  121. package/dist/duration/getDuration.js +80 -0
  122. package/dist/duration/index.d.ts +2 -0
  123. package/dist/duration/index.js +2 -0
  124. package/dist/form/FormSearch.d.ts +19 -0
  125. package/dist/form/FormSearch.js +4 -0
  126. package/dist/form/autoSaveForm.d.ts +110 -0
  127. package/dist/form/autoSaveForm.js +100 -0
  128. package/dist/{formPresentation → form}/displayField.js +2 -2
  129. package/dist/form/field/baseField.d.ts +23 -0
  130. package/dist/form/field/baseField.js +116 -0
  131. package/dist/form/field/checkboxField.d.ts +11 -0
  132. package/dist/form/field/checkboxField.js +42 -0
  133. package/dist/form/field/checkboxGroupField.d.ts +16 -0
  134. package/dist/form/field/checkboxGroupField.js +80 -0
  135. package/dist/form/field/compactSelectField.d.ts +19 -0
  136. package/dist/form/field/compactSelectField.js +77 -0
  137. package/dist/{formPresentation → form/field}/fieldIds.js +1 -1
  138. package/dist/form/field/inputField.d.ts +19 -0
  139. package/dist/form/field/inputField.js +31 -0
  140. package/dist/{formPresentation → form/field}/meta.js +6 -6
  141. package/dist/form/field/numberField.d.ts +5 -0
  142. package/dist/form/field/numberField.js +11 -0
  143. package/dist/form/field/passwordField.d.ts +3 -0
  144. package/dist/form/field/passwordField.js +27 -0
  145. package/dist/form/field/radioGroupField.d.ts +16 -0
  146. package/dist/form/field/radioGroupField.js +92 -0
  147. package/dist/form/field/rangeField.d.ts +8 -0
  148. package/dist/form/field/rangeField.js +34 -0
  149. package/dist/form/field/selectAsyncField.d.ts +31 -0
  150. package/dist/form/field/selectAsyncField.js +22 -0
  151. package/dist/form/field/selectField.d.ts +9 -0
  152. package/dist/form/field/selectField.js +72 -0
  153. package/dist/form/field/switchField.d.ts +7 -0
  154. package/dist/form/field/switchField.js +37 -0
  155. package/dist/form/field/textAreaField.d.ts +7 -0
  156. package/dist/form/field/textAreaField.js +25 -0
  157. package/dist/{formPresentation → form}/formContext.js +1 -1
  158. package/dist/form/formErrorContext/index.d.ts +9 -0
  159. package/dist/form/formErrorContext/index.js +7 -0
  160. package/dist/form/index.d.ts +9 -0
  161. package/dist/form/index.js +8 -0
  162. package/dist/{formPresentation → form/layout}/base.d.ts +1 -1
  163. package/dist/{formPresentation → form/layout}/base.js +1 -1
  164. package/dist/form/layout/fieldGroup.d.ts +6 -0
  165. package/dist/form/layout/fieldGroup.js +60 -0
  166. package/dist/{formPresentation/fieldLayout.d.ts → form/layout/index.d.ts} +1 -1
  167. package/dist/{formPresentation/fieldLayout.js → form/layout/index.js} +3 -3
  168. package/dist/{formPresentation → form/layout}/useStackedLayout.js +1 -1
  169. package/dist/form/scrapsForm.d.ts +220 -0
  170. package/dist/form/scrapsForm.js +126 -0
  171. package/dist/fzf.d.ts +9 -0
  172. package/dist/fzf.js +155 -0
  173. package/dist/hotkey/hotkey.d.ts +9 -8
  174. package/dist/hotkey/hotkey.js +13 -6
  175. package/dist/hotkey/index.d.ts +2 -1
  176. package/dist/hotkey/index.js +2 -1
  177. package/dist/hotkey/keyMappings.d.ts +1 -15
  178. package/dist/hotkey/keyMappings.js +29 -174
  179. package/dist/hotkey/useHotkeys.d.ts +3 -47
  180. package/dist/hotkey/useHotkeys.js +8 -42
  181. package/dist/image/image.js +2 -1
  182. package/dist/info/infoTip.d.ts +1 -1
  183. package/dist/info/infoTip.js +4 -3
  184. package/dist/input/index.d.ts +0 -3
  185. package/dist/input/index.js +0 -2
  186. package/dist/input/input.d.ts +2 -0
  187. package/dist/input/input.js +2 -0
  188. package/dist/input/passwordManagerIgnoreProps.d.ts +11 -0
  189. package/dist/input/passwordManagerIgnoreProps.js +8 -0
  190. package/dist/layout/container.d.ts +8 -2
  191. package/dist/layout/container.js +2 -2
  192. package/dist/layout/index.d.ts +2 -2
  193. package/dist/layout/index.js +1 -1
  194. package/dist/layout/styles.d.ts +2 -1
  195. package/dist/layout/styles.js +11 -5
  196. package/dist/legacyDatetime.d.ts +21 -0
  197. package/dist/legacyDatetime.js +13 -0
  198. package/dist/link/index.d.ts +1 -1
  199. package/dist/link/index.js +1 -1
  200. package/dist/link/link.js +4 -3
  201. package/dist/link/linkBehaviorContext.d.ts +11 -0
  202. package/dist/link/linkBehaviorContext.js +48 -11
  203. package/dist/menu/index.d.ts +1 -1
  204. package/dist/menu/index.js +1 -1
  205. package/dist/menu/menu.d.ts +14 -8
  206. package/dist/menu/menu.js +163 -60
  207. package/dist/modal/components.d.ts +19 -0
  208. package/dist/modal/components.js +99 -0
  209. package/dist/modal/errorBoundary.d.ts +2 -0
  210. package/dist/modal/errorBoundary.js +35 -0
  211. package/dist/modal/index.d.ts +33 -0
  212. package/dist/modal/index.js +260 -0
  213. package/dist/modal/portal.d.ts +1 -0
  214. package/dist/modal/portal.js +10 -0
  215. package/dist/modal/state.d.ts +17 -0
  216. package/dist/modal/state.js +41 -0
  217. package/dist/modal/types.d.ts +75 -0
  218. package/dist/modal/types.js +0 -0
  219. package/dist/numberInput/index.d.ts +3 -0
  220. package/dist/numberInput/index.js +2 -0
  221. package/dist/{input → numberInput}/numberDragInput.d.ts +1 -1
  222. package/dist/{input → numberInput}/numberDragInput.js +1 -1
  223. package/dist/{input → numberInput}/numberInput.d.ts +1 -1
  224. package/dist/{input → numberInput}/numberInput.js +1 -1
  225. package/dist/overlayContext.d.ts +29 -0
  226. package/dist/overlayContext.js +7 -0
  227. package/dist/pagination/index.d.ts +1 -0
  228. package/dist/pagination/index.js +1 -0
  229. package/dist/pagination/pagination.d.ts +24 -0
  230. package/dist/pagination/pagination.js +63 -0
  231. package/dist/pictureInPicture/index.d.ts +2 -0
  232. package/dist/pictureInPicture/index.js +2 -0
  233. package/dist/pictureInPicture/pictureInPicture.d.ts +47 -0
  234. package/dist/pictureInPicture/pictureInPicture.js +100 -0
  235. package/dist/pictureInPicture/pictureInPicturePortal.d.ts +16 -0
  236. package/dist/pictureInPicture/pictureInPicturePortal.js +46 -0
  237. package/dist/pictureInPicture/portalContext.d.ts +2 -0
  238. package/dist/pictureInPicture/portalContext.js +3 -0
  239. package/dist/relativeTime/getRelativeDate.d.ts +14 -0
  240. package/dist/relativeTime/getRelativeDate.js +107 -0
  241. package/dist/relativeTime/index.d.ts +3 -0
  242. package/dist/relativeTime/index.js +3 -0
  243. package/dist/relativeTime/relativeTime.d.ts +55 -0
  244. package/dist/relativeTime/relativeTime.js +102 -0
  245. package/dist/relativeTime/useRelativeTimeFormatter.d.ts +2 -0
  246. package/dist/relativeTime/useRelativeTimeFormatter.js +10 -0
  247. package/dist/revealOnHover/revealOnHover.js +1 -1
  248. package/dist/segmentedControl/segmentedControl.js +1 -1
  249. package/dist/select/filter.d.ts +4 -0
  250. package/dist/select/filter.js +12 -0
  251. package/dist/select/index.d.ts +3 -0
  252. package/dist/select/index.js +2 -0
  253. package/dist/select/option.d.ts +16 -0
  254. package/dist/select/option.js +81 -0
  255. package/dist/select/reactSelectWrapper.d.ts +8 -0
  256. package/dist/select/reactSelectWrapper.js +25 -0
  257. package/dist/select/select.d.ts +79 -0
  258. package/dist/select/select.js +454 -0
  259. package/dist/select/styles.d.ts +9 -0
  260. package/dist/select/styles.js +27 -0
  261. package/dist/select/types.d.ts +60 -0
  262. package/dist/select/types.js +0 -0
  263. package/dist/select/virtualizedMenuList.d.ts +24 -0
  264. package/dist/select/virtualizedMenuList.js +123 -0
  265. package/dist/slideOverPanel.d.ts +20 -0
  266. package/dist/slideOverPanel.js +141 -0
  267. package/dist/splitPanel/splitPanel.d.ts +3 -1
  268. package/dist/splitPanel/splitPanel.js +2 -1
  269. package/dist/table/table.d.ts +1 -1
  270. package/dist/table/table.js +39 -20
  271. package/dist/table/useColumnResize.d.ts +6 -5
  272. package/dist/table/useColumnResize.js +5 -4
  273. package/dist/tabs/context.d.ts +9 -0
  274. package/dist/tabs/context.js +9 -0
  275. package/dist/tabs/index.d.ts +2 -0
  276. package/dist/tabs/index.js +1 -0
  277. package/dist/tabs/item.d.ts +24 -0
  278. package/dist/tabs/item.js +4 -0
  279. package/dist/tabs/tab.d.ts +22 -0
  280. package/dist/tabs/tab.js +208 -0
  281. package/dist/tabs/tabList.d.ts +18 -0
  282. package/dist/tabs/tabList.js +258 -0
  283. package/dist/tabs/tabPanels.d.ts +13 -0
  284. package/dist/tabs/tabPanels.js +62 -0
  285. package/dist/tabs/tabs.d.ts +53 -0
  286. package/dist/tabs/tabs.js +59 -0
  287. package/dist/tabs/utils.d.ts +3 -0
  288. package/dist/tabs/utils.js +6 -0
  289. package/dist/text/heading.d.ts +1 -1
  290. package/dist/text/heading.js +1 -1
  291. package/dist/text/prose.d.ts +2 -2
  292. package/dist/text/styles.js +1 -1
  293. package/dist/text/text.d.ts +1 -1
  294. package/dist/text/text.js +1 -1
  295. package/dist/theme/dark.js +9 -9
  296. package/dist/theme/light.js +9 -9
  297. package/dist/theme/theme.d.ts +34 -34
  298. package/dist/theme/theme.js +9 -0
  299. package/dist/theme/types.d.ts +20 -2
  300. package/dist/tooltip/tooltip.js +2 -5
  301. package/dist/translation/index.d.ts +1 -0
  302. package/dist/translation/index.js +1 -0
  303. package/dist/translation/translate.d.ts +9 -0
  304. package/dist/translation/translate.js +5 -0
  305. package/dist/translation/translationContext.d.ts +2 -1
  306. package/dist/translation/translationContext.js +2 -1
  307. package/dist/useMedia.d.ts +15 -0
  308. package/dist/useMedia.js +24 -0
  309. package/dist/useOnClickOutside.d.ts +2 -0
  310. package/dist/useOnClickOutside.js +22 -0
  311. package/dist/useOverlay.d.ts +1 -0
  312. package/dist/useOverlay.js +1 -0
  313. package/dist/useVirtualCollection.d.ts +154 -0
  314. package/dist/useVirtualCollection.js +143 -0
  315. package/dist/useVirtualRows.d.ts +26 -0
  316. package/dist/useVirtualRows.js +26 -0
  317. package/dist/virtualCollectionLayout.d.ts +51 -0
  318. package/dist/virtualCollectionLayout.js +49 -0
  319. package/fonts/OFL.txt +94 -0
  320. package/fonts/roboto-mono-variable-cyrillic-ext.woff2 +0 -0
  321. package/fonts/roboto-mono-variable-cyrillic.woff2 +0 -0
  322. package/fonts/roboto-mono-variable-greek.woff2 +0 -0
  323. package/fonts/roboto-mono-variable-latin-ext.woff2 +0 -0
  324. package/fonts/roboto-mono-variable-vietnamese.woff2 +0 -0
  325. package/fonts/roboto-mono-variable.woff2 +0 -0
  326. package/fonts/rubik-variable-cyrillic-ext.woff2 +0 -0
  327. package/fonts/rubik-variable-cyrillic.woff2 +0 -0
  328. package/fonts/rubik-variable-latin-ext.woff2 +0 -0
  329. package/fonts/rubik-variable.woff2 +0 -0
  330. package/fonts.css +211 -0
  331. package/package.json +140 -23
  332. package/dist/datetime.d.ts +0 -39
  333. package/dist/datetime.js +0 -20
  334. package/dist/formPresentation/index.d.ts +0 -8
  335. package/dist/formPresentation/index.js +0 -8
  336. package/dist/interactionStateLayer/index.d.ts +0 -1
  337. package/dist/interactionStateLayer/index.js +0 -1
  338. package/dist/interactionStateLayer/interactionStateLayer.d.ts +0 -23
  339. package/dist/interactionStateLayer/interactionStateLayer.js +0 -67
  340. package/dist/unreachable.d.ts +0 -1
  341. package/dist/unreachable.js +0 -4
  342. /package/dist/{formPresentation → form}/autoSaveContext.d.ts +0 -0
  343. /package/dist/{formPresentation → form}/autoSaveContext.js +0 -0
  344. /package/dist/{formPresentation → form}/displayField.d.ts +0 -0
  345. /package/dist/{formPresentation → form/field}/fieldIds.d.ts +0 -0
  346. /package/dist/{formPresentation → form/field}/groupContext.d.ts +0 -0
  347. /package/dist/{formPresentation → form/field}/groupContext.js +0 -0
  348. /package/dist/{formPresentation → form/field}/meta.d.ts +0 -0
  349. /package/dist/{formPresentation → form}/formContext.d.ts +0 -0
  350. /package/dist/{formPresentation → form}/icons.d.ts +0 -0
  351. /package/dist/{formPresentation → form}/icons.js +0 -0
  352. /package/dist/{formPresentation → form/layout}/useStackedLayout.d.ts +0 -0
@@ -1,223 +1,78 @@
1
1
  import { jsx } from "@emotion/react/jsx-runtime";
2
- import { isMac } from "@react-aria/utils";
3
2
  import { IconArrow } from "@sentry/icons/arrow";
4
3
  import { IconCommand } from "@sentry/icons/command";
5
4
  import { IconControl } from "@sentry/icons/control";
6
5
  import { IconOption } from "@sentry/icons/option";
7
6
  import { IconReturn } from "@sentry/icons/return";
8
7
  import { IconShift } from "@sentry/icons/shift";
9
- import * as __rspack_external__sentry_react_f0cda475 from "@sentry/react";
10
- const aliases = {
11
- cmd: 'command',
12
- meta: 'command',
13
- '\u2318': 'command',
14
- ctrl: 'control',
15
- '\u2303': 'control',
16
- option: 'alt',
17
- '\u2325': 'alt',
18
- '\u21E7': 'shift',
19
- return: 'enter',
20
- esc: 'escape',
21
- del: 'delete',
22
- ins: 'insert',
23
- '\u21EA': 'capslock'
24
- };
25
- function canonicalize(keyName) {
26
- const lower = keyName.toLowerCase();
27
- if ('mod' === lower) return isMac() ? 'command' : 'control';
28
- return aliases[lower] ?? lower;
29
- }
30
- const namedKeyMap = {
31
- backspace: 'Backspace',
32
- tab: 'Tab',
33
- clear: 'Clear',
34
- enter: 'Enter',
35
- escape: 'Escape',
36
- space: ' ',
37
- left: 'ArrowLeft',
38
- up: 'ArrowUp',
39
- right: 'ArrowRight',
40
- down: 'ArrowDown',
41
- delete: 'Delete',
42
- insert: 'Insert',
43
- home: 'Home',
44
- end: 'End',
45
- pageup: 'PageUp',
46
- pagedown: 'PageDown',
47
- capslock: 'CapsLock'
48
- };
49
- const punctuationCodeMap = {
50
- ',': 'Comma',
51
- '.': 'Period',
52
- '/': 'Slash',
53
- '`': 'Backquote',
54
- '-': 'Minus',
55
- '=': 'Equal',
56
- ';': 'Semicolon',
57
- "'": 'Quote',
58
- '[': 'BracketLeft',
59
- ']': 'BracketRight',
60
- '\\': 'Backslash'
61
- };
62
- const modifierPredicates = {
63
- command: (e)=>e.metaKey,
64
- shift: (e)=>e.shiftKey,
65
- control: (e)=>e.ctrlKey,
66
- alt: (e)=>e.altKey
67
- };
68
- const MODIFIER_KEYS = [
69
- 'command',
70
- 'shift',
71
- 'control',
72
- 'alt'
73
- ];
74
- function codeForChar(ch) {
75
- if (ch >= 'a' && ch <= 'z') return `Key${ch.toUpperCase()}`;
76
- if (ch >= '0' && ch <= '9') return `Digit${ch}`;
77
- return punctuationCodeMap[ch];
78
- }
79
- function matchesKey(name, event) {
80
- const key = canonicalize(name);
81
- const modifier = modifierPredicates[key];
82
- if (modifier) return modifier(event);
83
- const namedKey = namedKeyMap[key];
84
- if (namedKey) return event.key === namedKey;
85
- if (1 === key.length) {
86
- if (event.key?.toLowerCase() === key) return true;
87
- const code = codeForChar(key);
88
- if (code && event.code === code) {
89
- const eventKey = event.key;
90
- if (eventKey?.length !== 1 || eventKey.charCodeAt(0) > 0x7f) return true;
91
- if (event.shiftKey) return true;
92
- }
93
- }
94
- return false;
95
- }
96
8
  const sharedProps = {
97
9
  size: 'xs'
98
10
  };
99
- const macGlyphs = {
100
- command: {
11
+ const shiftGlyph = {
12
+ icon: /*#__PURE__*/ jsx(IconShift, {
13
+ ...sharedProps
14
+ }),
15
+ label: '⇧'
16
+ };
17
+ const glyphs = {
18
+ '⌘': {
101
19
  icon: /*#__PURE__*/ jsx(IconCommand, {
102
20
  ...sharedProps
103
21
  }),
104
- label: '\u2318'
22
+ label: '⌘'
105
23
  },
106
- control: {
24
+ '⌃': {
107
25
  icon: /*#__PURE__*/ jsx(IconControl, {
108
26
  ...sharedProps
109
27
  }),
110
- label: '\u2303'
28
+ label: '⌃'
111
29
  },
112
- alt: {
30
+ '⌥': {
113
31
  icon: /*#__PURE__*/ jsx(IconOption, {
114
32
  ...sharedProps
115
33
  }),
116
- label: '\u2325'
117
- }
118
- };
119
- const otherGlyphs = {
120
- command: {
121
- label: 'Ctrl'
122
- },
123
- control: {
124
- label: 'Ctrl'
125
- },
126
- alt: {
127
- label: 'Alt'
128
- }
129
- };
130
- const universalGlyphs = {
131
- shift: {
132
- icon: /*#__PURE__*/ jsx(IconShift, {
133
- ...sharedProps
134
- }),
135
- label: '\u21E7'
34
+ label: '⌥'
136
35
  },
137
- enter: {
36
+ '⇧': shiftGlyph,
37
+ Shift: shiftGlyph,
38
+ '↵': {
138
39
  icon: /*#__PURE__*/ jsx(IconReturn, {
139
40
  ...sharedProps
140
41
  }),
141
- label: '\u21B5'
42
+ label: '↵'
142
43
  },
143
- left: {
44
+ '←': {
144
45
  icon: /*#__PURE__*/ jsx(IconArrow, {
145
46
  ...sharedProps,
146
47
  direction: "left"
147
48
  }),
148
- label: '\u2190'
49
+ label: '←'
149
50
  },
150
- right: {
51
+ '→': {
151
52
  icon: /*#__PURE__*/ jsx(IconArrow, {
152
53
  ...sharedProps,
153
54
  direction: "right"
154
55
  }),
155
- label: '\u2192'
56
+ label: '→'
156
57
  },
157
- up: {
58
+ '↑': {
158
59
  icon: /*#__PURE__*/ jsx(IconArrow, {
159
60
  ...sharedProps,
160
61
  direction: "up"
161
62
  }),
162
- label: '\u2191'
63
+ label: '↑'
163
64
  },
164
- down: {
65
+ '↓': {
165
66
  icon: /*#__PURE__*/ jsx(IconArrow, {
166
67
  ...sharedProps,
167
68
  direction: "down"
168
69
  }),
169
- label: '\u2193'
170
- },
171
- backspace: {
172
- label: '\u232B'
173
- },
174
- delete: {
175
- label: 'Del'
176
- },
177
- tab: {
178
- label: 'Tab'
179
- },
180
- escape: {
181
- label: 'Esc'
182
- },
183
- space: {
184
- label: 'Space'
185
- },
186
- home: {
187
- label: 'Home'
188
- },
189
- end: {
190
- label: 'End'
191
- },
192
- pageup: {
193
- label: 'PageUp'
194
- },
195
- pagedown: {
196
- label: 'PageDown'
197
- },
198
- insert: {
199
- label: 'Insert'
200
- },
201
- clear: {
202
- label: 'Clear'
203
- },
204
- capslock: {
205
- label: 'CapsLock'
70
+ label: '↓'
206
71
  }
207
72
  };
208
- function resolveKeyGlyph(keyName) {
209
- const key = canonicalize(keyName);
210
- const platformGlyphs = isMac() ? macGlyphs : otherGlyphs;
211
- const glyph = platformGlyphs[key] ?? universalGlyphs[key];
212
- if (glyph) return glyph;
213
- if (key.length > 1) {
214
- if ('production' !== process.env.NODE_ENV) throw new Error(`Missing key glyph mapping for "${keyName}"`);
215
- __rspack_external__sentry_react_f0cda475.logger.warn('Missing key glyph mapping', {
216
- keyName
217
- });
218
- }
219
- return {
220
- label: keyName.replace(/\w\S*/g, (word)=>word.charAt(0).toUpperCase() + word.substring(1))
73
+ function resolveKeyGlyph(label) {
74
+ return glyphs[label] ?? {
75
+ label
221
76
  };
222
77
  }
223
- export { MODIFIER_KEYS, canonicalize, matchesKey, resolveKeyGlyph };
78
+ export { resolveKeyGlyph };
@@ -1,47 +1,3 @@
1
- type Hotkey = {
2
- /**
3
- * The callback triggered when the matching key is pressed
4
- */
5
- callback: (e: KeyboardEvent) => void;
6
- /**
7
- * Defines the matching shortcuts.
8
- *
9
- * Multiple shortcuts may be passed as a list.
10
- *
11
- * The format for shorcuts is `<modifiers>+<key>` For example `shift+t` or
12
- * `command+shift+t`.
13
- */
14
- match: string[] | string;
15
- /**
16
- * When `false`, the hotkey is skipped: the callback never fires and
17
- * `preventDefault` is never called. Useful for gating a hotkey on state
18
- * (e.g. only intercept `Escape` while a panel is open) without rebuilding
19
- * the hotkey array. Defaults to `true`.
20
- */
21
- enabled?: boolean;
22
- /**
23
- * Allow shortcuts to be triggered while a text input is foccused
24
- */
25
- includeInputs?: boolean;
26
- /**
27
- * Do not call preventDefault on the keydown event
28
- */
29
- skipPreventDefault?: boolean;
30
- };
31
- /**
32
- * Returns whether an event should trigger one of the supplied hotkey matches.
33
- * Uses the same platform-aware modifier and keyboard-layout behavior as
34
- * useHotkeys, and never matches while an IME is composing text.
35
- */
36
- export declare function matchesHotkey(match: string[] | string, event: KeyboardEvent): boolean;
37
- /**
38
- * Pass in the hotkey combinations under match and the corresponding callback
39
- * function to be called. Separate key names with +. For example,
40
- * 'command+alt+shift+x'
41
- *
42
- * Alternate matchings as an array: ['command+alt+backspace', 'ctrl+alt+delete']
43
- *
44
- * Note: you can only use one non-modifier (keys other than shift, ctrl, alt, command) key at a time.
45
- */
46
- export declare function useHotkeys(hotkeys: Hotkey[]): void;
47
- export {};
1
+ import { type UseHotkeyCommonOptions, type UseHotkeyDefinition } from '@tanstack/react-hotkeys';
2
+ /** Register native TanStack hotkeys with Sentry's input and propagation defaults. */
3
+ export declare function useHotkeys(hotkeys: readonly UseHotkeyDefinition[], options?: UseHotkeyCommonOptions): void;
@@ -1,44 +1,10 @@
1
- import { useEffect, useRef } from "react";
2
- import { MODIFIER_KEYS, canonicalize, matchesKey } from "./keyMappings.js";
3
- function shouldIgnoreHotkeyEvent(event) {
4
- return event.isComposing;
5
- }
6
- function matchesHotkey(match, event) {
7
- if (shouldIgnoreHotkeyEvent(event)) return false;
8
- return (Array.isArray(match) ? match : [
9
- match
10
- ]).some((keyset)=>{
11
- const keys = keyset.toLowerCase().split('+').map((key)=>canonicalize(key));
12
- const unusedModifiers = MODIFIER_KEYS.filter((modifier)=>!keys.includes(modifier));
13
- return keys.every((key)=>matchesKey(key, event)) && unusedModifiers.every((modifier)=>!matchesKey(modifier, event));
14
- });
15
- }
16
- function useHotkeys(hotkeys) {
17
- const hotkeysRef = useRef(hotkeys);
18
- useEffect(()=>{
19
- hotkeysRef.current = hotkeys;
1
+ import { useHotkeys } from "@tanstack/react-hotkeys";
2
+ function useHotkeys_useHotkeys(hotkeys, options) {
3
+ useHotkeys(hotkeys, {
4
+ ignoreInputs: true,
5
+ stopPropagation: false,
6
+ conflictBehavior: 'allow',
7
+ ...options
20
8
  });
21
- useEffect(()=>{
22
- const onKeyDown = (evt)=>{
23
- if (shouldIgnoreHotkeyEvent(evt)) return;
24
- for (const hotkey of hotkeysRef.current){
25
- if (false === hotkey.enabled) continue;
26
- const preventDefault = !hotkey.skipPreventDefault;
27
- const inputHasFocus = !hotkey.includeInputs && evt.target instanceof HTMLElement ? evt.target.isContentEditable || [
28
- 'textarea',
29
- 'input'
30
- ].includes(evt.target.tagName.toLowerCase()) : false;
31
- if (matchesHotkey(hotkey.match, evt) && !inputHasFocus) {
32
- if (preventDefault) evt.preventDefault();
33
- hotkey.callback(evt);
34
- return;
35
- }
36
- }
37
- };
38
- document.addEventListener('keydown', onKeyDown);
39
- return ()=>{
40
- document.removeEventListener('keydown', onKeyDown);
41
- };
42
- }, []);
43
9
  }
44
- export { matchesHotkey, useHotkeys };
10
+ export { useHotkeys_useHotkeys as useHotkeys };
@@ -1,6 +1,7 @@
1
1
  import { jsx } from "@emotion/react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
- import { getRadius, rc } from "../layout/index.js";
3
+ import { getRadius } from "../layout/index.js";
4
+ import { rc } from "../layout/styles.js";
4
5
  function Image({ loading, width, height, ...props }) {
5
6
  return /*#__PURE__*/ jsx(Img, {
6
7
  loading: loading ?? 'lazy',
@@ -5,6 +5,6 @@ interface InfoTooltipProps extends SVGIconProps {
5
5
  title: React.ReactNode;
6
6
  position?: TooltipProps['position'];
7
7
  }
8
- export declare function InfoTip(props: InfoTooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export declare function InfoTip({ variant, ...props }: InfoTooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
9
  export declare function DisabledTip(props: InfoTooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "@emotion/react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
+ import { IconInfo } from "@sentry/icons/info";
3
4
  import { IconLock } from "@sentry/icons/lock";
4
- import { IconQuestion } from "@sentry/icons/question";
5
5
  import { Tooltip } from "../tooltip/index.js";
6
6
  import { useTranslation } from "../translation/useTranslation.js";
7
7
  function IconWithTooltip({ title, position, icon: Icon, 'aria-label': ariaLabel, ...props }) {
@@ -29,11 +29,12 @@ const StyledIconWrapper = styled('span')`
29
29
  ${(p)=>p.theme.focusRing()}
30
30
  }
31
31
  `;
32
- function InfoTip(props) {
32
+ function InfoTip({ variant = 'primary', ...props }) {
33
33
  const { t } = useTranslation();
34
34
  return /*#__PURE__*/ jsx(IconWithTooltip, {
35
35
  ...props,
36
- icon: IconQuestion,
36
+ variant: variant,
37
+ icon: IconInfo,
37
38
  "aria-label": t('More information')
38
39
  });
39
40
  }
@@ -1,8 +1,5 @@
1
1
  export { Input, type InputProps, type InputStylesProps } from './input.js';
2
2
  export { InputGroup } from './inputGroup.js';
3
3
  /** @public */
4
- export { NumberDragInput } from './numberDragInput.js';
5
- export { NumberInput } from './numberInput.js';
6
- /** @public */
7
4
  export { OTPInput, type OTPInputProps } from './otpInput.js';
8
5
  export { useAutosizeInput } from './useAutosizeInput.js';
@@ -1,6 +1,4 @@
1
1
  export { Input } from "./input.js";
2
2
  export { InputGroup } from "./inputGroup.js";
3
- export { NumberDragInput } from "./numberDragInput.js";
4
- export { NumberInput } from "./numberInput.js";
5
3
  export { OTPInput } from "./otpInput.js";
6
4
  export { useAutosizeInput } from "./useAutosizeInput.js";
@@ -13,6 +13,8 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
13
13
  *
14
14
  * To add leading/trailing items (e.g. a search icon on the left side), use
15
15
  * InputControl (components/inputControl) instead.
16
+ *
17
+ * `type="search"` inputs opt out of password manager autofill.
16
18
  */
17
19
  export declare const Input: import("@emotion/styled").StyledComponent<InputProps & {
18
20
  theme?: import("@emotion/react").Theme;
@@ -2,7 +2,9 @@ import { jsx } from "@emotion/react/jsx-runtime";
2
2
  import is_prop_valid from "@emotion/is-prop-valid";
3
3
  import styled from "@emotion/styled";
4
4
  import { inputStyles } from "./inputStyles.js";
5
+ import { passwordManagerIgnoreProps } from "./passwordManagerIgnoreProps.js";
5
6
  const Input = styled(({ ref, size: _size, nativeSize, ...props })=>/*#__PURE__*/ jsx("input", {
7
+ ...'search' === props.type ? passwordManagerIgnoreProps : void 0,
6
8
  ...props,
7
9
  ref: ref,
8
10
  size: nativeSize
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Stops password manager extensions from offering to fill an input. There is
3
+ * no standard attribute, so each manager needs its own.
4
+ */
5
+ export declare const passwordManagerIgnoreProps: {
6
+ readonly 'data-1p-ignore': true;
7
+ readonly 'data-bwignore': true;
8
+ readonly 'data-form-type': "other";
9
+ readonly 'data-lpignore': "true";
10
+ readonly 'data-protonpass-ignore': "true";
11
+ };
@@ -0,0 +1,8 @@
1
+ const passwordManagerIgnoreProps = {
2
+ 'data-1p-ignore': true,
3
+ 'data-bwignore': true,
4
+ 'data-form-type': 'other',
5
+ 'data-lpignore': 'true',
6
+ 'data-protonpass-ignore': 'true'
7
+ };
8
+ export { passwordManagerIgnoreProps };
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { CSS } from '../cssTypes.js';
3
- import type { BorderVariant, RadiusSize, SpaceSize, SurfaceVariant } from '../theme/index.js';
3
+ import type { BackgroundToken, BorderVariant, RadiusSize, SpaceSize } from '../theme/index.js';
4
4
  import { type Responsive, type Shorthand } from './styles.js';
5
5
  type Margin = SpaceSize | 'auto' | '0';
6
6
  interface ContainerLayoutProps {
7
- background?: Responsive<Exclude<SurfaceVariant, 'overlay'>>;
7
+ /**
8
+ * Background color, as a path into `tokens.background`.
9
+ */
10
+ background?: Responsive<BackgroundToken>;
8
11
  display?: Responsive<CSS['display']>;
9
12
  padding?: Responsive<Shorthand<SpaceSize, 4>>;
10
13
  paddingTop?: Responsive<SpaceSize>;
@@ -45,6 +48,9 @@ interface ContainerLayoutProps {
45
48
  height?: Responsive<CSS['height']>;
46
49
  minHeight?: Responsive<CSS['minHeight']>;
47
50
  maxHeight?: Responsive<CSS['maxHeight']>;
51
+ /**
52
+ * Border color on all sides. Renders a 1px solid border.
53
+ */
48
54
  border?: Responsive<BorderVariant>;
49
55
  borderTop?: Responsive<BorderVariant>;
50
56
  borderBottom?: Responsive<BorderVariant>;
@@ -3,7 +3,7 @@ import { useMemo, useRef } from "react";
3
3
  import is_prop_valid from "@emotion/is-prop-valid";
4
4
  import styled from "@emotion/styled";
5
5
  import { mergeRefs } from "@react-aria/utils";
6
- import { ContainerQueryProvider, getBorder, getMargin, getRadius, getSpacing, rc } from "./styles.js";
6
+ import { ContainerQueryProvider, getBackground, getBorder, getMargin, getRadius, getSpacing, rc } from "./styles.js";
7
7
  const omitContainerProps = new Set([
8
8
  'alignSelf',
9
9
  'area',
@@ -118,7 +118,7 @@ const Container = styled((props)=>{
118
118
  ${(p)=>rc('margin-left', p.marginLeft, p.theme, getMargin)};
119
119
  ${(p)=>rc('margin-right', p.marginRight, p.theme, getMargin)};
120
120
 
121
- ${(p)=>rc('background', p.background, p.theme, (v)=>v ? p.theme.tokens.background[v] : void 0)};
121
+ ${(p)=>rc('background', p.background, p.theme, getBackground)};
122
122
 
123
123
  ${(p)=>rc('border-radius', p.radius, p.theme, getRadius)};
124
124
 
@@ -6,8 +6,8 @@ export { Stack, type StackProps } from './stack.js';
6
6
  /**
7
7
  * @TODO: these should probably be private to scraps
8
8
  */
9
- export { ContainerQueryContext, ContainerQueryProvider, rc, type Responsive, type ResponsiveKey,
9
+ export { ContainerQueryContext, ContainerQueryProvider, type Responsive, type ResponsiveKey,
10
10
  /** @public */
11
- useContainerBreakpoint, useHasContainerQuery, useResponsivePropResolver, useResponsivePropValue, } from './styles.js';
11
+ useContainerBreakpoint, useHasContainerQuery, useResponsivePropValue, } from './styles.js';
12
12
  export { getBorder, getMargin, getRadius, getSpacing } from './styles.js';
13
13
  export { FLEX_JUSTIFY_CONTENT, type FlexJustify } from './styles.js';
@@ -3,4 +3,4 @@ export { Surface } from "./surface.js";
3
3
  export { Flex } from "./flex.js";
4
4
  export { Grid } from "./grid.js";
5
5
  export { Stack } from "./stack.js";
6
- export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getBorder, getMargin, getRadius, getSpacing, rc, useContainerBreakpoint, useHasContainerQuery, useResponsivePropResolver, useResponsivePropValue } from "./styles.js";
6
+ export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getBorder, getMargin, getRadius, getSpacing, useContainerBreakpoint, useHasContainerQuery, useResponsivePropValue } from "./styles.js";
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode, RefObject } from 'react';
2
- import type { BorderVariant, BreakpointSize, ContainerBreakpointSize, RadiusSize, SpaceSize, Theme } from '../theme/index.js';
2
+ import type { BackgroundToken, BorderVariant, BreakpointSize, ContainerBreakpointSize, RadiusSize, SpaceSize, Theme } from '../theme/index.js';
3
3
  type ResponsiveBreakpoint = BreakpointSize | ContainerBreakpointSize;
4
4
  export declare function rc<T>(property: string, value: Responsive<T> | undefined, theme: Theme, resolver?: (value: T | undefined, breakpoint: ResponsiveBreakpoint | undefined, theme: Theme) => string | undefined): string | undefined;
5
5
  type Margin = SpaceSize | 'auto' | '0';
@@ -38,6 +38,7 @@ export type Shorthand<T extends string, N extends 4 | 2> = N extends 4 ? `${T} $
38
38
  type ScreenBreakpoint = `screen:${BreakpointSize}`;
39
39
  export type ResponsiveKey = ContainerBreakpointSize | ScreenBreakpoint;
40
40
  export type Responsive<T> = T | Partial<Record<ResponsiveKey, T>>;
41
+ export declare function getBackground(background: BackgroundToken | undefined, _breakpoint: ResponsiveBreakpoint | undefined, theme: Theme): string | undefined;
41
42
  export declare function getBorder(border: BorderVariant | undefined, _breakpoint: ResponsiveBreakpoint | undefined, theme: Theme): string | undefined;
42
43
  export declare function getRadius(radius: Shorthand<RadiusSize, 4> | undefined, _breakpoint: ResponsiveBreakpoint | undefined, theme: Theme): string | undefined;
43
44
  export declare function getSpacing(spacing: Shorthand<SpaceSize, 4> | undefined, _breakpoint: ResponsiveBreakpoint | undefined, theme: Theme): string | undefined;
@@ -95,10 +95,16 @@ function resolveMargin(sizeComponent, theme) {
95
95
  if ('0' === sizeComponent) return '0';
96
96
  return theme.space[sizeComponent] ?? theme.space['0'];
97
97
  }
98
- function borderValue(key, theme) {
99
- if ('primary' === key) return theme.tokens.border[key];
100
- if ('muted' === key || 'secondary' === key) return theme.tokens.border.secondary;
101
- return theme.tokens.border[key].vibrant;
98
+ function getBackground(background, _breakpoint, theme) {
99
+ if (void 0 === background) return;
100
+ let node = theme.tokens.background;
101
+ for (const segment of background.split('.'))node = node[segment];
102
+ return node;
103
+ }
104
+ function borderValue(path, theme) {
105
+ let node = theme.tokens.border;
106
+ for (const segment of path.split('.'))node = node[segment];
107
+ return node;
102
108
  }
103
109
  function getBorder(border, _breakpoint, theme) {
104
110
  if (void 0 === border) return;
@@ -234,4 +240,4 @@ function ContainerQueryProvider({ elementRef, children }) {
234
240
  children: children
235
241
  });
236
242
  }
237
- export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getBorder, getMargin, getRadius, getSpacing, rc, useActiveBreakpoint, useContainerBreakpoint, useHasContainerQuery, useResponsivePropResolver, useResponsivePropValue };
243
+ export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getBackground, getBorder, getMargin, getRadius, getSpacing, rc, useActiveBreakpoint, useContainerBreakpoint, useHasContainerQuery, useResponsivePropResolver, useResponsivePropValue };
@@ -0,0 +1,21 @@
1
+ import type * as React from 'react';
2
+ import { useClock, useTimezone } from './dateTime/index.js';
3
+ /**
4
+ * Published 0.4.0 and 0.5.0 exported this API from `@sentry/scraps/datetime`.
5
+ * It now lives in `@sentry/scraps/dateTime`; these aliases keep existing imports
6
+ * working for one release.
7
+ */
8
+ /** @deprecated Use `DateTimePreferences` from `@sentry/scraps/dateTime`. */
9
+ export interface DateTimeContextValue {
10
+ clockDisplay: '12' | '24';
11
+ timezone: string;
12
+ }
13
+ /** @deprecated Use `DateTimeProvider` from `@sentry/scraps/dateTime`. */
14
+ export declare function DateTimeProvider({ value, children, }: {
15
+ children: React.ReactNode;
16
+ value: DateTimeContextValue;
17
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
18
+ /** @deprecated Use `useTimezone` from `@sentry/scraps/dateTime`. */
19
+ export { useTimezone };
20
+ /** @deprecated Use `useClock` from `@sentry/scraps/dateTime`. */
21
+ export declare const useClockDisplay: typeof useClock;
@@ -0,0 +1,13 @@
1
+ import { jsx } from "@emotion/react/jsx-runtime";
2
+ import { DateTimeProvider, useClock, useTimezone } from "./dateTime/index.js";
3
+ function legacyDatetime_DateTimeProvider({ value, children }) {
4
+ return /*#__PURE__*/ jsx(DateTimeProvider, {
5
+ value: {
6
+ timezone: value.timezone,
7
+ clock: value.clockDisplay
8
+ },
9
+ children: children
10
+ });
11
+ }
12
+ const useClockDisplay = useClock;
13
+ export { legacyDatetime_DateTimeProvider as DateTimeProvider, useClockDisplay, useTimezone };
@@ -1,2 +1,2 @@
1
1
  export { Link, type LinkDestination, type LinkProps, ExternalLink } from './link.js';
2
- export { LinkBehaviorContextProvider } from './linkBehaviorContext.js';
2
+ export { LinkBehaviorContextProvider, useLinkQueryString, useResolveLinkHref, } from './linkBehaviorContext.js';
@@ -1,2 +1,2 @@
1
1
  export { ExternalLink, Link } from "./link.js";
2
- export { LinkBehaviorContextProvider } from "./linkBehaviorContext.js";
2
+ export { LinkBehaviorContextProvider, useLinkQueryString, useResolveLinkHref } from "./linkBehaviorContext.js";
package/dist/link/link.js CHANGED
@@ -8,10 +8,11 @@ import { useLinkBehavior } from "./linkBehaviorContext.js";
8
8
  const getLinkStyles = ({ disabled, theme })=>css`
9
9
  border-radius: 2px;
10
10
  pointer-events: ${disabled ? 'none' : void 0};
11
- color: ${disabled ? theme.tokens.content.disabled : void 0};
11
+ color: ${disabled ? theme.tokens.content.disabled : theme.tokens.interactive.link.accent.rest};
12
12
 
13
- &:hover {
14
- color: ${disabled ? theme.tokens.content.disabled : void 0};
13
+ &:hover,
14
+ &:focus-visible {
15
+ color: ${disabled ? theme.tokens.content.disabled : theme.tokens.interactive.link.accent.hover};
15
16
  }
16
17
 
17
18
  &:focus-visible {
@@ -1,9 +1,16 @@
1
1
  import type * as React from 'react';
2
2
  import { type FunctionComponent } from 'react';
3
3
  import type { LinkProps } from './link.js';
4
+ type QueryString = {
5
+ parse: (search: string) => Record<string, string | string[] | null>;
6
+ stringify: (query: Record<string, unknown>) => string;
7
+ };
4
8
  type LinkBehavior<T extends LinkProps> = {
5
9
  behavior: (props: T) => T;
6
10
  component: FunctionComponent<T>;
11
+ /** Query string helpers default to URLSearchParams behavior. */
12
+ parse?: QueryString['parse'];
13
+ stringify?: QueryString['stringify'];
7
14
  };
8
15
  declare function AnchorLink({ to, replace: _replace, preventScrollReset: _preventScrollReset, reloadDocument: _reloadDocument, state: _state, ...props }: LinkProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
16
  export declare const LinkBehaviorContextProvider: React.Provider<LinkBehavior<LinkProps> | null>;
@@ -11,4 +18,8 @@ export declare const useLinkBehavior: <T extends LinkProps>(props: T) => {
11
18
  Component: typeof AnchorLink | React.FunctionComponent<T>;
12
19
  behavior: () => T;
13
20
  };
21
+ /** Use the provider's query helpers, or the native defaults outside a provider. */
22
+ export declare function useLinkQueryString(): QueryString;
23
+ /** Resolve collection hrefs through the same application behavior as Link. */
24
+ export declare function useResolveLinkHref(): (to: LinkProps["to"]) => string;
14
25
  export {};