@sentry/scraps 0.3.0 → 0.5.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 (321) hide show
  1. package/README.md +6 -5
  2. package/dist/alert/alert.js +0 -3
  3. package/dist/badge/badge.js +1 -2
  4. package/dist/badge/tag.js +0 -2
  5. package/dist/button/index.d.ts +0 -1
  6. package/dist/button/index.js +0 -1
  7. package/dist/clipboard/copyToClipboardButton.d.ts +15 -0
  8. package/dist/clipboard/copyToClipboardButton.js +32 -0
  9. package/dist/clipboard/index.d.ts +1 -0
  10. package/dist/clipboard/index.js +1 -0
  11. package/dist/code/index.d.ts +1 -0
  12. package/dist/code/index.js +1 -0
  13. package/dist/codeBlock/codeBlock.d.ts +68 -0
  14. package/dist/codeBlock/codeBlock.js +242 -0
  15. package/dist/codeBlock/index.d.ts +2 -0
  16. package/dist/codeBlock/index.js +2 -0
  17. package/dist/codeBlock/prism.d.ts +11 -0
  18. package/dist/codeBlock/prism.js +101 -0
  19. package/dist/codeBlock/styles.d.ts +2 -0
  20. package/dist/codeBlock/styles.js +133 -0
  21. package/dist/compactSelect/compactSelect.d.ts +21 -0
  22. package/dist/compactSelect/compactSelect.js +150 -0
  23. package/dist/compactSelect/composite.d.ts +54 -0
  24. package/dist/compactSelect/composite.js +101 -0
  25. package/dist/compactSelect/control.d.ts +112 -0
  26. package/dist/compactSelect/control.js +354 -0
  27. package/dist/compactSelect/fzf.d.ts +8 -0
  28. package/dist/compactSelect/fzf.js +151 -0
  29. package/dist/compactSelect/gridList/index.d.ts +46 -0
  30. package/dist/compactSelect/gridList/index.js +102 -0
  31. package/dist/compactSelect/gridList/option.d.ts +15 -0
  32. package/dist/compactSelect/gridList/option.js +111 -0
  33. package/dist/compactSelect/gridList/section.d.ts +15 -0
  34. package/dist/compactSelect/gridList/section.js +58 -0
  35. package/dist/compactSelect/highlightText.d.ts +6 -0
  36. package/dist/compactSelect/highlightText.js +33 -0
  37. package/dist/compactSelect/index.d.ts +9 -0
  38. package/dist/compactSelect/index.js +8 -0
  39. package/dist/compactSelect/list.d.ts +94 -0
  40. package/dist/compactSelect/list.js +167 -0
  41. package/dist/compactSelect/listBox/index.d.ts +84 -0
  42. package/dist/compactSelect/listBox/index.js +175 -0
  43. package/dist/compactSelect/listBox/option.d.ts +19 -0
  44. package/dist/compactSelect/listBox/option.js +101 -0
  45. package/dist/compactSelect/listBox/section.d.ts +21 -0
  46. package/dist/compactSelect/listBox/section.js +58 -0
  47. package/dist/compactSelect/menuComponents.d.ts +89 -0
  48. package/dist/compactSelect/menuComponents.js +117 -0
  49. package/dist/compactSelect/selectFilterContext.d.ts +2 -0
  50. package/dist/compactSelect/selectFilterContext.js +3 -0
  51. package/dist/compactSelect/styles.d.ts +39 -0
  52. package/dist/compactSelect/styles.js +155 -0
  53. package/dist/compactSelect/types.d.ts +1 -0
  54. package/dist/compactSelect/types.js +0 -0
  55. package/dist/compactSelect/useVirtualizedItems.d.ts +52 -0
  56. package/dist/compactSelect/useVirtualizedItems.js +74 -0
  57. package/dist/compactSelect/utils.d.ts +80 -0
  58. package/dist/compactSelect/utils.js +268 -0
  59. package/dist/confirm/index.d.ts +153 -0
  60. package/dist/confirm/index.js +132 -0
  61. package/dist/descriptionList/descriptionList.js +4 -3
  62. package/dist/disclosure/disclosure.js +2 -2
  63. package/dist/dragHandle/dragHandle.d.ts +3 -1
  64. package/dist/dragHandle/dragHandle.js +8 -5
  65. package/dist/drawer/components.d.ts +46 -0
  66. package/dist/drawer/components.js +265 -0
  67. package/dist/drawer/globalDrawer.d.ts +106 -0
  68. package/dist/drawer/globalDrawer.js +173 -0
  69. package/dist/drawer/index.d.ts +3 -0
  70. package/dist/drawer/index.js +2 -0
  71. package/dist/drawer/useDrawerResizing.d.ts +19 -0
  72. package/dist/drawer/useDrawerResizing.js +111 -0
  73. package/dist/drawer/useDrawerWidth.d.ts +1 -0
  74. package/dist/drawer/useDrawerWidth.js +42 -0
  75. package/dist/dropdownMenu/content.d.ts +1 -0
  76. package/dist/dropdownMenu/content.js +1 -0
  77. package/dist/dropdownMenu/context.d.ts +24 -0
  78. package/dist/dropdownMenu/context.js +3 -0
  79. package/dist/dropdownMenu/dropdownMenu.d.ts +70 -0
  80. package/dist/dropdownMenu/dropdownMenu.js +103 -0
  81. package/dist/dropdownMenu/index.d.ts +2 -0
  82. package/dist/dropdownMenu/index.js +1 -0
  83. package/dist/dropdownMenu/item.d.ts +136 -0
  84. package/dist/dropdownMenu/item.js +182 -0
  85. package/dist/dropdownMenu/list.d.ts +59 -0
  86. package/dist/dropdownMenu/list.js +410 -0
  87. package/dist/dropdownMenu/search.d.ts +16 -0
  88. package/dist/dropdownMenu/search.js +16 -0
  89. package/dist/dropdownMenu/section.d.ts +21 -0
  90. package/dist/dropdownMenu/section.js +40 -0
  91. package/dist/dropdownMenu/separator.d.ts +7 -0
  92. package/dist/dropdownMenu/separator.js +15 -0
  93. package/dist/dropdownMenu/useDropdownMenuKeyboard.d.ts +260 -0
  94. package/dist/dropdownMenu/useDropdownMenuKeyboard.js +55 -0
  95. package/dist/dropdownMenu/useDropdownMenuRowLayout.d.ts +29 -0
  96. package/dist/dropdownMenu/useDropdownMenuRowLayout.js +64 -0
  97. package/dist/dropdownMenu/useSafetyTriangle.d.ts +12 -0
  98. package/dist/dropdownMenu/useSafetyTriangle.js +119 -0
  99. package/dist/dropdownMenu/utils.d.ts +21 -0
  100. package/dist/dropdownMenu/utils.js +57 -0
  101. package/dist/form/FormSearch.d.ts +19 -0
  102. package/dist/form/FormSearch.js +4 -0
  103. package/dist/form/autoSaveForm.d.ts +110 -0
  104. package/dist/form/autoSaveForm.js +100 -0
  105. package/dist/{formPresentation → form}/displayField.js +2 -2
  106. package/dist/form/field/baseField.d.ts +23 -0
  107. package/dist/form/field/baseField.js +116 -0
  108. package/dist/form/field/checkboxField.d.ts +11 -0
  109. package/dist/form/field/checkboxField.js +42 -0
  110. package/dist/form/field/checkboxGroupField.d.ts +16 -0
  111. package/dist/form/field/checkboxGroupField.js +80 -0
  112. package/dist/form/field/compactSelectField.d.ts +19 -0
  113. package/dist/form/field/compactSelectField.js +77 -0
  114. package/dist/{formPresentation → form/field}/fieldIds.js +1 -1
  115. package/dist/form/field/inputField.d.ts +19 -0
  116. package/dist/form/field/inputField.js +31 -0
  117. package/dist/{formPresentation → form/field}/meta.js +6 -6
  118. package/dist/form/field/numberField.d.ts +5 -0
  119. package/dist/form/field/numberField.js +11 -0
  120. package/dist/form/field/passwordField.d.ts +3 -0
  121. package/dist/form/field/passwordField.js +27 -0
  122. package/dist/form/field/radioGroupField.d.ts +16 -0
  123. package/dist/form/field/radioGroupField.js +92 -0
  124. package/dist/form/field/rangeField.d.ts +8 -0
  125. package/dist/form/field/rangeField.js +34 -0
  126. package/dist/form/field/selectAsyncField.d.ts +31 -0
  127. package/dist/form/field/selectAsyncField.js +22 -0
  128. package/dist/form/field/selectField.d.ts +9 -0
  129. package/dist/form/field/selectField.js +72 -0
  130. package/dist/form/field/switchField.d.ts +7 -0
  131. package/dist/form/field/switchField.js +37 -0
  132. package/dist/form/field/textAreaField.d.ts +7 -0
  133. package/dist/form/field/textAreaField.js +25 -0
  134. package/dist/{formPresentation → form}/formContext.js +1 -1
  135. package/dist/form/formErrorContext/index.d.ts +9 -0
  136. package/dist/form/formErrorContext/index.js +7 -0
  137. package/dist/form/index.d.ts +9 -0
  138. package/dist/form/index.js +8 -0
  139. package/dist/{formPresentation → form/layout}/base.d.ts +1 -1
  140. package/dist/{formPresentation → form/layout}/base.js +1 -1
  141. package/dist/form/layout/fieldGroup.d.ts +6 -0
  142. package/dist/form/layout/fieldGroup.js +60 -0
  143. package/dist/{formPresentation/fieldLayout.d.ts → form/layout/index.d.ts} +1 -1
  144. package/dist/{formPresentation/fieldLayout.js → form/layout/index.js} +3 -3
  145. package/dist/{formPresentation → form/layout}/useStackedLayout.js +1 -1
  146. package/dist/form/scrapsForm.d.ts +220 -0
  147. package/dist/form/scrapsForm.js +126 -0
  148. package/dist/hotkey/hotkey.d.ts +9 -8
  149. package/dist/hotkey/hotkey.js +13 -6
  150. package/dist/hotkey/index.d.ts +2 -1
  151. package/dist/hotkey/index.js +2 -1
  152. package/dist/hotkey/keyMappings.d.ts +1 -15
  153. package/dist/hotkey/keyMappings.js +29 -174
  154. package/dist/hotkey/useHotkeys.d.ts +3 -47
  155. package/dist/hotkey/useHotkeys.js +8 -42
  156. package/dist/image/image.js +2 -1
  157. package/dist/info/infoTip.d.ts +1 -1
  158. package/dist/info/infoTip.js +4 -3
  159. package/dist/input/index.d.ts +0 -3
  160. package/dist/input/index.js +0 -2
  161. package/dist/input/input.d.ts +2 -0
  162. package/dist/input/input.js +2 -0
  163. package/dist/input/passwordManagerIgnoreProps.d.ts +11 -0
  164. package/dist/input/passwordManagerIgnoreProps.js +8 -0
  165. package/dist/layout/index.d.ts +2 -2
  166. package/dist/layout/index.js +1 -1
  167. package/dist/layout/styles.d.ts +1 -1
  168. package/dist/link/link.js +4 -3
  169. package/dist/link/linkBehaviorContext.d.ts +2 -0
  170. package/dist/link/linkBehaviorContext.js +17 -10
  171. package/dist/menu/controlContext.d.ts +32 -0
  172. package/dist/menu/controlContext.js +7 -0
  173. package/dist/menu/dropdownButton.d.ts +18 -0
  174. package/dist/menu/dropdownButton.js +66 -0
  175. package/dist/menu/index.d.ts +7 -0
  176. package/dist/menu/index.js +3 -0
  177. package/dist/menu/menu.d.ts +167 -0
  178. package/dist/menu/menu.js +568 -0
  179. package/dist/menu/selectTypes.d.ts +96 -0
  180. package/dist/menu/selectTypes.js +0 -0
  181. package/dist/menu/selectValue.d.ts +13 -0
  182. package/dist/menu/selectValue.js +0 -0
  183. package/dist/modal/components.d.ts +19 -0
  184. package/dist/modal/components.js +99 -0
  185. package/dist/modal/errorBoundary.d.ts +2 -0
  186. package/dist/modal/errorBoundary.js +35 -0
  187. package/dist/modal/index.d.ts +33 -0
  188. package/dist/modal/index.js +260 -0
  189. package/dist/modal/portal.d.ts +1 -0
  190. package/dist/modal/portal.js +10 -0
  191. package/dist/modal/state.d.ts +17 -0
  192. package/dist/modal/state.js +41 -0
  193. package/dist/modal/types.d.ts +75 -0
  194. package/dist/modal/types.js +0 -0
  195. package/dist/numberInput/index.d.ts +3 -0
  196. package/dist/numberInput/index.js +2 -0
  197. package/dist/{input → numberInput}/numberDragInput.d.ts +1 -1
  198. package/dist/{input → numberInput}/numberDragInput.js +1 -1
  199. package/dist/{input → numberInput}/numberInput.d.ts +1 -1
  200. package/dist/{input → numberInput}/numberInput.js +1 -1
  201. package/dist/overlayContext.d.ts +29 -0
  202. package/dist/overlayContext.js +7 -0
  203. package/dist/overlayTrigger.d.ts +22 -0
  204. package/dist/overlayTrigger.js +30 -0
  205. package/dist/pagination/index.d.ts +1 -0
  206. package/dist/pagination/index.js +1 -0
  207. package/dist/pagination/pagination.d.ts +24 -0
  208. package/dist/pagination/pagination.js +63 -0
  209. package/dist/pictureInPicture/index.d.ts +2 -0
  210. package/dist/pictureInPicture/index.js +2 -0
  211. package/dist/pictureInPicture/pictureInPicture.d.ts +47 -0
  212. package/dist/pictureInPicture/pictureInPicture.js +100 -0
  213. package/dist/pictureInPicture/pictureInPicturePortal.d.ts +16 -0
  214. package/dist/pictureInPicture/pictureInPicturePortal.js +46 -0
  215. package/dist/pictureInPicture/portalContext.d.ts +2 -0
  216. package/dist/pictureInPicture/portalContext.js +3 -0
  217. package/dist/revealOnHover/revealOnHover.js +1 -1
  218. package/dist/segmentedControl/segmentedControl.js +1 -1
  219. package/dist/select/filter.d.ts +4 -0
  220. package/dist/select/filter.js +12 -0
  221. package/dist/select/index.d.ts +3 -0
  222. package/dist/select/index.js +2 -0
  223. package/dist/select/option.d.ts +16 -0
  224. package/dist/select/option.js +81 -0
  225. package/dist/select/reactSelectWrapper.d.ts +8 -0
  226. package/dist/select/reactSelectWrapper.js +25 -0
  227. package/dist/select/select.d.ts +79 -0
  228. package/dist/select/select.js +454 -0
  229. package/dist/select/styles.d.ts +9 -0
  230. package/dist/select/styles.js +27 -0
  231. package/dist/select/types.d.ts +60 -0
  232. package/dist/select/types.js +0 -0
  233. package/dist/select/virtualizedMenuList.d.ts +24 -0
  234. package/dist/select/virtualizedMenuList.js +123 -0
  235. package/dist/slideOverPanel.d.ts +20 -0
  236. package/dist/slideOverPanel.js +141 -0
  237. package/dist/slot/knownContexts.d.ts +1 -1
  238. package/dist/spinner/index.d.ts +1 -0
  239. package/dist/spinner/index.js +1 -0
  240. package/dist/spinner/spinner.d.ts +14 -0
  241. package/dist/spinner/spinner.js +126 -0
  242. package/dist/splitPanel/index.d.ts +1 -0
  243. package/dist/splitPanel/index.js +1 -0
  244. package/dist/splitPanel/splitPanel.d.ts +38 -0
  245. package/dist/splitPanel/splitPanel.js +145 -0
  246. package/dist/table/table.d.ts +1 -1
  247. package/dist/table/table.js +39 -20
  248. package/dist/table/useColumnResize.d.ts +6 -5
  249. package/dist/table/useColumnResize.js +5 -4
  250. package/dist/tabs/index.d.ts +4 -0
  251. package/dist/tabs/index.js +3 -0
  252. package/dist/tabs/item.d.ts +13 -0
  253. package/dist/tabs/item.js +4 -0
  254. package/dist/tabs/tab.d.ts +22 -0
  255. package/dist/tabs/tab.js +205 -0
  256. package/dist/tabs/tabList.d.ts +18 -0
  257. package/dist/tabs/tabList.js +256 -0
  258. package/dist/tabs/tabPanels.d.ts +14 -0
  259. package/dist/tabs/tabPanels.js +62 -0
  260. package/dist/tabs/tabs.d.ts +38 -0
  261. package/dist/tabs/tabs.js +56 -0
  262. package/dist/tabs/utils.d.ts +3 -0
  263. package/dist/tabs/utils.js +6 -0
  264. package/dist/text/heading.d.ts +1 -1
  265. package/dist/text/heading.js +1 -1
  266. package/dist/text/styles.js +1 -1
  267. package/dist/text/text.d.ts +1 -1
  268. package/dist/text/text.js +1 -1
  269. package/dist/theme/dark.js +9 -9
  270. package/dist/theme/light.js +9 -9
  271. package/dist/toast/index.d.ts +5 -0
  272. package/dist/toast/index.js +4 -0
  273. package/dist/toast/toast.d.ts +10 -0
  274. package/dist/toast/toast.js +182 -0
  275. package/dist/toast/toastApi.d.ts +10 -0
  276. package/dist/toast/toastApi.js +53 -0
  277. package/dist/toast/toaster.d.ts +4 -0
  278. package/dist/toast/toaster.js +42 -0
  279. package/dist/toast/types.d.ts +17 -0
  280. package/dist/toast/types.js +2 -0
  281. package/dist/toggleCard/index.d.ts +1 -0
  282. package/dist/toggleCard/index.js +1 -0
  283. package/dist/toggleCard/toggleCard.d.ts +32 -0
  284. package/dist/toggleCard/toggleCard.js +301 -0
  285. package/dist/tooltip/tooltip.js +2 -5
  286. package/dist/useDimensions.d.ts +12 -0
  287. package/dist/useDimensions.js +31 -0
  288. package/dist/useMedia.d.ts +15 -0
  289. package/dist/useMedia.js +24 -0
  290. package/dist/useOnClickOutside.d.ts +2 -0
  291. package/dist/useOnClickOutside.js +22 -0
  292. package/dist/useOverlay.d.ts +1 -0
  293. package/dist/useOverlay.js +1 -0
  294. package/dist/useResizableDrawer.d.ts +72 -0
  295. package/dist/useResizableDrawer.js +136 -0
  296. package/dist/useVirtualCollection.d.ts +154 -0
  297. package/dist/useVirtualCollection.js +143 -0
  298. package/dist/useVirtualRows.d.ts +26 -0
  299. package/dist/useVirtualRows.js +26 -0
  300. package/dist/virtualCollectionLayout.d.ts +51 -0
  301. package/dist/virtualCollectionLayout.js +49 -0
  302. package/package.json +148 -16
  303. package/dist/formPresentation/index.d.ts +0 -8
  304. package/dist/formPresentation/index.js +0 -8
  305. package/dist/interactionStateLayer/index.d.ts +0 -1
  306. package/dist/interactionStateLayer/index.js +0 -1
  307. package/dist/interactionStateLayer/interactionStateLayer.d.ts +0 -23
  308. package/dist/interactionStateLayer/interactionStateLayer.js +0 -67
  309. package/dist/unreachable.d.ts +0 -1
  310. package/dist/unreachable.js +0 -4
  311. /package/dist/{formPresentation → form}/autoSaveContext.d.ts +0 -0
  312. /package/dist/{formPresentation → form}/autoSaveContext.js +0 -0
  313. /package/dist/{formPresentation → form}/displayField.d.ts +0 -0
  314. /package/dist/{formPresentation → form/field}/fieldIds.d.ts +0 -0
  315. /package/dist/{formPresentation → form/field}/groupContext.d.ts +0 -0
  316. /package/dist/{formPresentation → form/field}/groupContext.js +0 -0
  317. /package/dist/{formPresentation → form/field}/meta.d.ts +0 -0
  318. /package/dist/{formPresentation → form}/formContext.d.ts +0 -0
  319. /package/dist/{formPresentation → form}/icons.d.ts +0 -0
  320. /package/dist/{formPresentation → form}/icons.js +0 -0
  321. /package/dist/{formPresentation → form/layout}/useStackedLayout.d.ts +0 -0
@@ -0,0 +1,220 @@
1
+ import type * as React from 'react';
2
+ import { formOptions, type AnyFormApi, type DeepKeys } from '@tanstack/react-form';
3
+ import { type ButtonProps } from '../button/index.js';
4
+ import { BaseField } from './field/baseField.js';
5
+ import { CheckboxField } from './field/checkboxField.js';
6
+ import { FieldMeta } from './field/meta.js';
7
+ import { FieldLayout } from './layout/index.js';
8
+ import { FieldGroup } from './layout/fieldGroup.js';
9
+ import { CompactSelectField } from './field/compactSelectField.js';
10
+ import { InputField } from './field/inputField.js';
11
+ import { NumberField } from './field/numberField.js';
12
+ import { PasswordField } from './field/passwordField.js';
13
+ import { RangeField } from './field/rangeField.js';
14
+ import { SelectAsyncField } from './field/selectAsyncField.js';
15
+ import { SelectField } from './field/selectField.js';
16
+ import { SwitchField } from './field/switchField.js';
17
+ import { TextAreaField } from './field/textAreaField.js';
18
+ export declare const defaultFormOptions: {
19
+ onSubmitInvalid({ formApi, }: {
20
+ formApi: {
21
+ formId: string;
22
+ validateSync: (cause: "submit") => unknown;
23
+ };
24
+ }): void;
25
+ validationLogic: import("@tanstack/react-form").ValidationLogicFn;
26
+ };
27
+ declare const fieldComponents: {
28
+ readonly Base: typeof BaseField;
29
+ readonly Checkbox: typeof CheckboxField;
30
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
31
+ readonly CompactSelect: typeof CompactSelectField;
32
+ readonly Input: typeof InputField;
33
+ readonly Number: typeof NumberField;
34
+ readonly Password: typeof PasswordField;
35
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
36
+ readonly Range: typeof RangeField;
37
+ readonly Select: typeof SelectField;
38
+ readonly SelectAsync: typeof SelectAsyncField;
39
+ readonly Switch: typeof SwitchField;
40
+ readonly TextArea: typeof TextAreaField;
41
+ readonly Meta: typeof FieldMeta;
42
+ readonly Layout: typeof FieldLayout;
43
+ };
44
+ export type BoundFieldComponents = typeof fieldComponents;
45
+ declare const withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends object = {}>({ render, props, defaultValues, }: import("@tanstack/react-form").WithFieldGroupProps<TFieldGroupData, {
46
+ readonly Base: typeof BaseField;
47
+ readonly Checkbox: typeof CheckboxField;
48
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
49
+ readonly CompactSelect: typeof CompactSelectField;
50
+ readonly Input: typeof InputField;
51
+ readonly Number: typeof NumberField;
52
+ readonly Password: typeof PasswordField;
53
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
54
+ readonly Range: typeof RangeField;
55
+ readonly Select: typeof SelectField;
56
+ readonly SelectAsync: typeof SelectAsyncField;
57
+ readonly Switch: typeof SwitchField;
58
+ readonly TextArea: typeof TextAreaField;
59
+ readonly Meta: typeof FieldMeta;
60
+ readonly Layout: typeof FieldLayout;
61
+ }, {
62
+ readonly FieldGroup: typeof FieldGroup;
63
+ readonly SubmitButton: typeof SubmitButton;
64
+ readonly ResetButton: typeof ResetButton;
65
+ readonly AppForm: typeof AppForm;
66
+ }, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChange extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TFormSubmitMeta>(params: React.PropsWithChildren<NoInfer<TRenderProps> & {
67
+ form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
68
+ readonly Base: typeof BaseField;
69
+ readonly Checkbox: typeof CheckboxField;
70
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
71
+ readonly CompactSelect: typeof CompactSelectField;
72
+ readonly Input: typeof InputField;
73
+ readonly Number: typeof NumberField;
74
+ readonly Password: typeof PasswordField;
75
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
76
+ readonly Range: typeof RangeField;
77
+ readonly Select: typeof SelectField;
78
+ readonly SelectAsync: typeof SelectAsyncField;
79
+ readonly Switch: typeof SwitchField;
80
+ readonly TextArea: typeof TextAreaField;
81
+ readonly Meta: typeof FieldMeta;
82
+ readonly Layout: typeof FieldLayout;
83
+ }, {
84
+ readonly FieldGroup: typeof FieldGroup;
85
+ readonly SubmitButton: typeof SubmitButton;
86
+ readonly ResetButton: typeof ResetButton;
87
+ readonly AppForm: typeof AppForm;
88
+ }> | import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
89
+ readonly Base: typeof BaseField;
90
+ readonly Checkbox: typeof CheckboxField;
91
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
92
+ readonly CompactSelect: typeof CompactSelectField;
93
+ readonly Input: typeof InputField;
94
+ readonly Number: typeof NumberField;
95
+ readonly Password: typeof PasswordField;
96
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
97
+ readonly Range: typeof RangeField;
98
+ readonly Select: typeof SelectField;
99
+ readonly SelectAsync: typeof SelectAsyncField;
100
+ readonly Switch: typeof SwitchField;
101
+ readonly TextArea: typeof TextAreaField;
102
+ readonly Meta: typeof FieldMeta;
103
+ readonly Layout: typeof FieldLayout;
104
+ }, {
105
+ readonly FieldGroup: typeof FieldGroup;
106
+ readonly SubmitButton: typeof SubmitButton;
107
+ readonly ResetButton: typeof ResetButton;
108
+ readonly AppForm: typeof AppForm;
109
+ }>;
110
+ fields: TFields;
111
+ }>) => ReturnType<React.FunctionComponent>, withForm: <TFormData, TOnMount extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChange extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
112
+ readonly Base: typeof BaseField;
113
+ readonly Checkbox: typeof CheckboxField;
114
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
115
+ readonly CompactSelect: typeof CompactSelectField;
116
+ readonly Input: typeof InputField;
117
+ readonly Number: typeof NumberField;
118
+ readonly Password: typeof PasswordField;
119
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
120
+ readonly Range: typeof RangeField;
121
+ readonly Select: typeof SelectField;
122
+ readonly SelectAsync: typeof SelectAsyncField;
123
+ readonly Switch: typeof SwitchField;
124
+ readonly TextArea: typeof TextAreaField;
125
+ readonly Meta: typeof FieldMeta;
126
+ readonly Layout: typeof FieldLayout;
127
+ }, {
128
+ readonly FieldGroup: typeof FieldGroup;
129
+ readonly SubmitButton: typeof SubmitButton;
130
+ readonly ResetButton: typeof ResetButton;
131
+ readonly AppForm: typeof AppForm;
132
+ }, TRenderProps>) => React.FunctionComponent<React.PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
133
+ form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
134
+ readonly Base: typeof BaseField;
135
+ readonly Checkbox: typeof CheckboxField;
136
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
137
+ readonly CompactSelect: typeof CompactSelectField;
138
+ readonly Input: typeof InputField;
139
+ readonly Number: typeof NumberField;
140
+ readonly Password: typeof PasswordField;
141
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
142
+ readonly Range: typeof RangeField;
143
+ readonly Select: typeof SelectField;
144
+ readonly SelectAsync: typeof SelectAsyncField;
145
+ readonly Switch: typeof SwitchField;
146
+ readonly TextArea: typeof TextAreaField;
147
+ readonly Meta: typeof FieldMeta;
148
+ readonly Layout: typeof FieldLayout;
149
+ }, {
150
+ readonly FieldGroup: typeof FieldGroup;
151
+ readonly SubmitButton: typeof SubmitButton;
152
+ readonly ResetButton: typeof ResetButton;
153
+ readonly AppForm: typeof AppForm;
154
+ }>;
155
+ }>>;
156
+ declare function SubmitButton(props: ButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
157
+ declare function ResetButton(props: ButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
158
+ declare function AppForm({ children, form }: {
159
+ children: React.ReactNode;
160
+ form: AnyFormApi;
161
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
162
+ export declare const useScrapsForm: <TFormData, TOnMount extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChange extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
163
+ readonly Base: typeof BaseField;
164
+ readonly Checkbox: typeof CheckboxField;
165
+ readonly CheckboxGroup: <T extends string>(props: import("./field/checkboxGroupField.js").CheckboxGroupProps<T>) => React.JSX.Element;
166
+ readonly CompactSelect: typeof CompactSelectField;
167
+ readonly Input: typeof InputField;
168
+ readonly Number: typeof NumberField;
169
+ readonly Password: typeof PasswordField;
170
+ readonly RadioGroup: <T extends string>(props: import("./field/radioGroupField.js").RadioGroupProps<T>) => React.JSX.Element;
171
+ readonly Range: typeof RangeField;
172
+ readonly Select: typeof SelectField;
173
+ readonly SelectAsync: typeof SelectAsyncField;
174
+ readonly Switch: typeof SwitchField;
175
+ readonly TextArea: typeof TextAreaField;
176
+ readonly Meta: typeof FieldMeta;
177
+ readonly Layout: typeof FieldLayout;
178
+ }, {
179
+ readonly FieldGroup: typeof FieldGroup;
180
+ readonly SubmitButton: typeof SubmitButton;
181
+ readonly ResetButton: typeof ResetButton;
182
+ readonly AppForm: typeof AppForm;
183
+ }>;
184
+ /** @public */
185
+ export { formOptions, withFieldGroup, withForm };
186
+ /**
187
+ * Type for field errors that can be set after form submission (e.g., from backend validation).
188
+ * Keys are constrained to valid field paths (including nested paths like 'address.city').
189
+ */
190
+ export type FieldErrors<TFormData> = Partial<Record<DeepKeys<TFormData>, {
191
+ message: string;
192
+ }>>;
193
+ /**
194
+ * Infers the form data type from a form API instance.
195
+ */
196
+ type InferFormData<T> = T extends {
197
+ state: {
198
+ values: infer D;
199
+ };
200
+ } ? D : never;
201
+ /**
202
+ * Sets field errors on a form after submission (e.g., from backend validation).
203
+ * This provides a type-safe way to set errors on specific fields.
204
+ *
205
+ * @returns `true` if field errors were set, or `false` if the object was empty.
206
+ *
207
+ * @example
208
+ * ```tsx
209
+ * setFieldErrors(formApi, {
210
+ * firstName: { message: 'This name is already taken' },
211
+ * 'address.city': { message: 'City not found' },
212
+ * });
213
+ * ```
214
+ */
215
+ export declare function setFieldErrors<TForm extends {
216
+ setErrorMap: (...args: any[]) => unknown;
217
+ state: {
218
+ values: unknown;
219
+ };
220
+ }>(formApi: TForm, errors: FieldErrors<InferFormData<TForm>>): boolean;
@@ -0,0 +1,126 @@
1
+ import { jsx } from "@emotion/react/jsx-runtime";
2
+ import { createFormHook, formOptions, revalidateLogic } from "@tanstack/react-form";
3
+ import { Button } from "../button/index.js";
4
+ import { BaseField } from "./field/baseField.js";
5
+ import { CheckboxField } from "./field/checkboxField.js";
6
+ import { FieldMeta } from "./field/meta.js";
7
+ import { FormElementContext, fieldContext, formContext, useFormContext, useIsInsideFormElement } from "./formContext.js";
8
+ import { FieldLayout } from "./layout/index.js";
9
+ import { FieldGroup } from "./layout/fieldGroup.js";
10
+ import { CheckboxGroupField } from "./field/checkboxGroupField.js";
11
+ import { CompactSelectField } from "./field/compactSelectField.js";
12
+ import { InputField } from "./field/inputField.js";
13
+ import { NumberField } from "./field/numberField.js";
14
+ import { PasswordField } from "./field/passwordField.js";
15
+ import { RadioGroupField } from "./field/radioGroupField.js";
16
+ import { RangeField } from "./field/rangeField.js";
17
+ import { SelectAsyncField } from "./field/selectAsyncField.js";
18
+ import { SelectField } from "./field/selectField.js";
19
+ import { SwitchField } from "./field/switchField.js";
20
+ import { TextAreaField } from "./field/textAreaField.js";
21
+ const defaultFormOptions = formOptions({
22
+ onSubmitInvalid ({ formApi }) {
23
+ formApi.validateSync('submit');
24
+ const InvalidInput = document.querySelector(`#${CSS.escape(formApi.formId)} [aria-invalid="true"]`);
25
+ InvalidInput?.focus();
26
+ },
27
+ validationLogic: revalidateLogic({
28
+ mode: 'submit',
29
+ modeAfterSubmission: 'change'
30
+ })
31
+ });
32
+ const fieldComponents = {
33
+ Base: BaseField,
34
+ Checkbox: CheckboxField,
35
+ CheckboxGroup: CheckboxGroupField,
36
+ CompactSelect: CompactSelectField,
37
+ Input: InputField,
38
+ Number: NumberField,
39
+ Password: PasswordField,
40
+ RadioGroup: RadioGroupField,
41
+ Range: RangeField,
42
+ Select: SelectField,
43
+ SelectAsync: SelectAsyncField,
44
+ Switch: SwitchField,
45
+ TextArea: TextAreaField,
46
+ Meta: FieldMeta,
47
+ Layout: FieldLayout
48
+ };
49
+ const { useAppForm, withFieldGroup, withForm } = createFormHook({
50
+ fieldComponents,
51
+ formComponents: {
52
+ FieldGroup: FieldGroup,
53
+ SubmitButton,
54
+ ResetButton,
55
+ AppForm
56
+ },
57
+ fieldContext: fieldContext,
58
+ formContext: formContext
59
+ });
60
+ function SubmitButton(props) {
61
+ const form = useFormContext();
62
+ const isInsideForm = useIsInsideFormElement();
63
+ return /*#__PURE__*/ jsx(form.Subscribe, {
64
+ selector: (state)=>state.isSubmitting,
65
+ children: (isSubmitting)=>/*#__PURE__*/ jsx(Button, {
66
+ variant: "primary",
67
+ ...props,
68
+ type: "submit",
69
+ form: isInsideForm ? void 0 : form.formId,
70
+ busy: isSubmitting || props.busy,
71
+ disabled: isSubmitting || props.disabled
72
+ })
73
+ });
74
+ }
75
+ function ResetButton(props) {
76
+ const form = useFormContext();
77
+ return /*#__PURE__*/ jsx(form.Subscribe, {
78
+ selector: (state)=>state.isPristine,
79
+ children: (isPristine)=>/*#__PURE__*/ jsx(Button, {
80
+ ...props,
81
+ disabled: props.disabled || isPristine,
82
+ onClick: (e)=>{
83
+ form.reset();
84
+ props.onClick?.(e);
85
+ }
86
+ })
87
+ });
88
+ }
89
+ function AppForm({ children, form }) {
90
+ return /*#__PURE__*/ jsx(formContext.Provider, {
91
+ value: form,
92
+ children: /*#__PURE__*/ jsx(FormWrapper, {
93
+ children: children
94
+ })
95
+ });
96
+ }
97
+ function FormWrapper({ children }) {
98
+ const form = useFormContext();
99
+ return /*#__PURE__*/ jsx("form", {
100
+ noValidate: true,
101
+ "data-test-id": form.formId,
102
+ id: form.formId,
103
+ style: {
104
+ width: '100%'
105
+ },
106
+ onSubmit: (e)=>{
107
+ e.preventDefault();
108
+ form.handleSubmit();
109
+ },
110
+ children: /*#__PURE__*/ jsx(FormElementContext.Provider, {
111
+ value: true,
112
+ children: children
113
+ })
114
+ });
115
+ }
116
+ const useScrapsForm = useAppForm;
117
+ function setFieldErrors(formApi, errors) {
118
+ if (0 === Object.keys(errors).length) return false;
119
+ formApi.setErrorMap({
120
+ onSubmit: {
121
+ fields: errors
122
+ }
123
+ });
124
+ return true;
125
+ }
126
+ export { defaultFormOptions, formOptions, setFieldErrors, useScrapsForm, withFieldGroup, withForm };
@@ -1,21 +1,22 @@
1
+ import { type CanonicalModifier, type HotkeyChord } from '@tanstack/react-hotkeys';
1
2
  interface HotkeyProps {
2
3
  /**
3
- * Key combination string(s) in the same format as `useHotkeys` match strings.
4
- * Keys are separated by `+`. For example: `"command+k"`, `"shift+enter"`.
4
+ * Shortcuts in TanStack's native syntax, such as `"Mod+K"` or `"Shift+Enter"`.
5
+ * A single modifier can also be displayed, such as `"Mod"` or `"Shift"`.
5
6
  *
6
7
  * Platform modifiers are mapped automatically:
7
- * - `command` renders as `⌘` on Mac, `CTRL` on other platforms
8
- * - `ctrl` renders as `⌃` on Mac, `CTRL` on other platforms
9
- * - `alt`/`option` renders as `⌥` on Mac, `ALT` on other platforms
8
+ * - `Mod` renders as `⌘` on Mac, `Ctrl` on other platforms
9
+ * - `Control` renders as `⌃` on Mac, `Ctrl` on other platforms
10
+ * - `Alt` renders as `⌥` on Mac, `Alt` on other platforms
10
11
  *
11
12
  * Pass an array only when the actual keys differ across platforms
12
- * (not just modifier names). The first compatible combo is used:
13
+ * (not just modifier names). The first combo is displayed:
13
14
  *
14
15
  * ```tsx
15
- * <Hotkey value={['command+backspace', 'delete']} />
16
+ * <Hotkey value={['Mod+Backspace', 'Delete']} />
16
17
  * ```
17
18
  */
18
- value: string | string[];
19
+ value: HotkeyChord | CanonicalModifier | 'Mod' | readonly HotkeyChord[];
19
20
  variant?: 'embossed' | 'debossed';
20
21
  }
21
22
  export declare function Hotkey({ value, variant }: HotkeyProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
@@ -1,14 +1,21 @@
1
1
  import { jsx } from "@emotion/react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
+ import { isMac } from "@react-aria/utils";
4
+ import { formatForDisplay } from "@tanstack/react-hotkeys";
3
5
  import { Kbd } from "./kbd.js";
4
6
  import { resolveKeyGlyph } from "./keyMappings.js";
5
7
  function Hotkey({ value, variant }) {
6
- const keySets = (Array.isArray(value) ? value : [
7
- value
8
- ]).map((v)=>v.trim().split('+'));
9
- const resolved = keySets.map((keys)=>keys.map((key)=>resolveKeyGlyph(key)));
10
- const finalKeys = resolved[0];
11
- if (!finalKeys || 0 === finalKeys.length) return null;
8
+ const hotkey = 'string' == typeof value ? value : value[0];
9
+ if (!hotkey) return null;
10
+ const finalKeys = formatForDisplay(hotkey, {
11
+ platform: isMac() ? 'mac' : 'linux',
12
+ parts: true,
13
+ keyLabels: {
14
+ Delete: 'Del',
15
+ Tab: 'Tab',
16
+ Space: 'Space'
17
+ }
18
+ }).map(resolveKeyGlyph);
12
19
  return /*#__PURE__*/ jsx(WrapperKbd, {
13
20
  variant: variant,
14
21
  children: finalKeys.map((glyph, i)=>'icon' in glyph ? /*#__PURE__*/ jsx(StyledKbd, {
@@ -1,4 +1,5 @@
1
1
  /** @public */
2
2
  export { Kbd } from './kbd.js';
3
3
  export { Hotkey } from './hotkey.js';
4
- export { matchesHotkey, useHotkeys } from './useHotkeys.js';
4
+ export { matchesKeyboardEvent } from '@tanstack/react-hotkeys';
5
+ export { useHotkeys } from './useHotkeys.js';
@@ -1,3 +1,4 @@
1
1
  export { Kbd } from "./kbd.js";
2
2
  export { Hotkey } from "./hotkey.js";
3
- export { matchesHotkey, useHotkeys } from "./useHotkeys.js";
3
+ export { matchesKeyboardEvent } from "@tanstack/react-hotkeys";
4
+ export { useHotkeys } from "./useHotkeys.js";
@@ -1,23 +1,9 @@
1
1
  import type * as React from 'react';
2
- export declare function canonicalize(keyName: string): string;
3
- export declare const MODIFIER_KEYS: readonly ["command", "shift", "control", "alt"];
4
- /**
5
- * Tests whether a single key name from a hotkey match string is currently
6
- * pressed in the given keyboard event. Layout-aware: matches against
7
- * `event.key` (so an AZERTY user pressing the K-labeled key fires `'k'`
8
- * shortcuts) with `event.code` as a physical-position fallback (so
9
- * `shift+1` works even though `event.key === '!'` on US QWERTY).
10
- */
11
- export declare function matchesKey(name: string, event: KeyboardEvent): boolean;
12
2
  type KeyGlyph = {
13
3
  icon: React.ReactNode;
14
4
  label: string;
15
5
  } | {
16
6
  label: string;
17
7
  };
18
- /**
19
- * Resolve a key name to its display glyph for the given platform.
20
- * Non-special keys fall through to title-cased text (e.g. `'k'` → `'K'`).
21
- */
22
- export declare function resolveKeyGlyph(keyName: string): KeyGlyph;
8
+ export declare function resolveKeyGlyph(label: string): KeyGlyph;
23
9
  export {};