@regardio/react 0.3.2 → 0.4.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 (335) hide show
  1. package/dist/components/background-slideshow.d.ts +7 -5
  2. package/dist/components/background-slideshow.js +172 -74
  3. package/dist/components/blurry-gradient.d.ts +11 -4
  4. package/dist/components/blurry-gradient.js +121 -5
  5. package/dist/components/box.d.ts +12 -9
  6. package/dist/components/box.js +48 -23
  7. package/dist/components/carousel.d.ts +12 -10
  8. package/dist/components/carousel.js +146 -66
  9. package/dist/components/countdown.d.ts +5 -2
  10. package/dist/components/countdown.js +55 -21
  11. package/dist/components/definition-list.d.ts +19 -16
  12. package/dist/components/definition-list.js +83 -51
  13. package/dist/components/generic-error.d.ts +25 -5
  14. package/dist/components/generic-error.js +42 -34
  15. package/dist/components/heading.d.ts +13 -10
  16. package/dist/components/heading.js +114 -25
  17. package/dist/components/highlight.d.ts +11 -8
  18. package/dist/components/highlight.js +65 -17
  19. package/dist/components/icon-button.d.ts +7 -4
  20. package/dist/components/icon-button.js +16 -5
  21. package/dist/components/if.d.ts +6 -4
  22. package/dist/components/if.js +22 -14
  23. package/dist/components/iframe.d.ts +6 -4
  24. package/dist/components/iframe.js +26 -3
  25. package/dist/components/item.d.ts +17 -14
  26. package/dist/components/item.js +504 -301
  27. package/dist/components/leaflet-map.d.ts +5 -4
  28. package/dist/components/leaflet-map.js +192 -186
  29. package/dist/components/link.d.ts +24 -16
  30. package/dist/components/link.js +191 -102
  31. package/dist/components/list-item.d.ts +11 -8
  32. package/dist/components/list-item.js +35 -17
  33. package/dist/components/maptiler-map.d.ts +5 -4
  34. package/dist/components/maptiler-map.js +125 -112
  35. package/dist/components/markdown-container.d.ts +10 -8
  36. package/dist/components/markdown-container.js +181 -82
  37. package/dist/components/password-input.d.ts +7 -5
  38. package/dist/components/password-input.js +50 -8
  39. package/dist/components/picture.d.ts +19 -7
  40. package/dist/components/picture.js +75 -34
  41. package/dist/components/protected-email.d.ts +14 -3
  42. package/dist/components/protected-email.js +29 -15
  43. package/dist/components/text.d.ts +12 -9
  44. package/dist/components/text.js +42 -24
  45. package/dist/components/unordered-list.d.ts +11 -8
  46. package/dist/components/unordered-list.js +37 -19
  47. package/dist/hooks/use-current-route-data.d.ts +7 -2
  48. package/dist/hooks/use-current-route-data.js +13 -9
  49. package/dist/hooks/use-focus-search.d.ts +6 -3
  50. package/dist/hooks/use-focus-search.js +17 -13
  51. package/dist/hooks/use-matches-data.d.ts +9 -2
  52. package/dist/hooks/use-matches-data.js +12 -8
  53. package/dist/hooks/use-media-query.d.ts +8 -2
  54. package/dist/hooks/use-media-query.js +19 -15
  55. package/dist/hooks/use-mobile.d.ts +3 -2
  56. package/dist/hooks/use-mobile.js +18 -14
  57. package/dist/hooks/use-nonce.d.ts +12 -5
  58. package/dist/hooks/use-nonce.js +11 -7
  59. package/dist/hooks/use-orientation.d.ts +11 -3
  60. package/dist/hooks/use-orientation.js +28 -24
  61. package/dist/hooks/use-user.d.ts +43 -8
  62. package/dist/hooks/use-user.js +21 -13
  63. package/dist/utils/author.d.ts +4 -4
  64. package/dist/utils/author.js +49 -31
  65. package/dist/utils/cn.d.ts +8 -4
  66. package/dist/utils/cn.js +12 -8
  67. package/dist/utils/is-route-active.d.ts +19 -3
  68. package/dist/utils/is-route-active.js +45 -43
  69. package/dist/utils/locale.d.ts +66 -4
  70. package/dist/utils/locale.js +33 -22
  71. package/dist/utils/text.d.ts +24 -7
  72. package/dist/utils/text.js +114 -89
  73. package/package.json +4 -3
  74. package/src/stories/ListItem.stories.tsx +3 -2
  75. package/dist/components/background-slideshow.d.ts.map +0 -1
  76. package/dist/components/blurry-gradient.d.ts.map +0 -1
  77. package/dist/components/box.d.ts.map +0 -1
  78. package/dist/components/carousel.d.ts.map +0 -1
  79. package/dist/components/countdown.d.ts.map +0 -1
  80. package/dist/components/definition-list.d.ts.map +0 -1
  81. package/dist/components/generic-error.d.ts.map +0 -1
  82. package/dist/components/heading.d.ts.map +0 -1
  83. package/dist/components/highlight.d.ts.map +0 -1
  84. package/dist/components/icon-button.d.ts.map +0 -1
  85. package/dist/components/if.d.ts.map +0 -1
  86. package/dist/components/iframe.d.ts.map +0 -1
  87. package/dist/components/item.d.ts.map +0 -1
  88. package/dist/components/leaflet-map.d.ts.map +0 -1
  89. package/dist/components/link.d.ts.map +0 -1
  90. package/dist/components/link.test.d.ts +0 -2
  91. package/dist/components/link.test.d.ts.map +0 -1
  92. package/dist/components/link.test.js +0 -204
  93. package/dist/components/list-item.d.ts.map +0 -1
  94. package/dist/components/maptiler-map.d.ts.map +0 -1
  95. package/dist/components/markdown-container.d.ts.map +0 -1
  96. package/dist/components/password-input.d.ts.map +0 -1
  97. package/dist/components/picture.d.ts.map +0 -1
  98. package/dist/components/protected-email.d.ts.map +0 -1
  99. package/dist/components/text.d.ts.map +0 -1
  100. package/dist/components/unordered-list.d.ts.map +0 -1
  101. package/dist/hooks/use-current-route-data.d.ts.map +0 -1
  102. package/dist/hooks/use-focus-search.d.ts.map +0 -1
  103. package/dist/hooks/use-matches-data.d.ts.map +0 -1
  104. package/dist/hooks/use-media-query.d.ts.map +0 -1
  105. package/dist/hooks/use-mobile.d.ts.map +0 -1
  106. package/dist/hooks/use-nonce.d.ts.map +0 -1
  107. package/dist/hooks/use-nonce.test.d.ts +0 -2
  108. package/dist/hooks/use-nonce.test.d.ts.map +0 -1
  109. package/dist/hooks/use-nonce.test.js +0 -27
  110. package/dist/hooks/use-orientation.d.ts.map +0 -1
  111. package/dist/hooks/use-user.d.ts.map +0 -1
  112. package/dist/shadcn/accordion.d.ts +0 -25
  113. package/dist/shadcn/accordion.d.ts.map +0 -1
  114. package/dist/shadcn/accordion.js +0 -45
  115. package/dist/shadcn/alert-dialog.d.ts +0 -73
  116. package/dist/shadcn/alert-dialog.d.ts.map +0 -1
  117. package/dist/shadcn/alert-dialog.js +0 -93
  118. package/dist/shadcn/alert.d.ts +0 -34
  119. package/dist/shadcn/alert.d.ts.map +0 -1
  120. package/dist/shadcn/alert.js +0 -42
  121. package/dist/shadcn/aspect-ratio.d.ts +0 -6
  122. package/dist/shadcn/aspect-ratio.d.ts.map +0 -1
  123. package/dist/shadcn/aspect-ratio.js +0 -7
  124. package/dist/shadcn/avatar.d.ts +0 -16
  125. package/dist/shadcn/avatar.d.ts.map +0 -1
  126. package/dist/shadcn/avatar.js +0 -27
  127. package/dist/shadcn/badge.d.ts +0 -29
  128. package/dist/shadcn/badge.d.ts.map +0 -1
  129. package/dist/shadcn/badge.js +0 -29
  130. package/dist/shadcn/breadcrumb.d.ts +0 -42
  131. package/dist/shadcn/breadcrumb.d.ts.map +0 -1
  132. package/dist/shadcn/breadcrumb.js +0 -74
  133. package/dist/shadcn/button.d.ts +0 -38
  134. package/dist/shadcn/button.d.ts.map +0 -1
  135. package/dist/shadcn/button.js +0 -38
  136. package/dist/shadcn/calendar.d.ts +0 -23
  137. package/dist/shadcn/calendar.d.ts.map +0 -1
  138. package/dist/shadcn/calendar.js +0 -163
  139. package/dist/shadcn/card.d.ts +0 -31
  140. package/dist/shadcn/card.d.ts.map +0 -1
  141. package/dist/shadcn/card.js +0 -55
  142. package/dist/shadcn/carousel.d.ts +0 -51
  143. package/dist/shadcn/carousel.d.ts.map +0 -1
  144. package/dist/shadcn/carousel.js +0 -161
  145. package/dist/shadcn/chart.d.ts +0 -103
  146. package/dist/shadcn/chart.d.ts.map +0 -1
  147. package/dist/shadcn/chart.js +0 -248
  148. package/dist/shadcn/checkbox.d.ts +0 -8
  149. package/dist/shadcn/checkbox.d.ts.map +0 -1
  150. package/dist/shadcn/checkbox.js +0 -22
  151. package/dist/shadcn/collapsible.d.ts +0 -16
  152. package/dist/shadcn/collapsible.d.ts.map +0 -1
  153. package/dist/shadcn/collapsible.js +0 -19
  154. package/dist/shadcn/command.d.ts +0 -61
  155. package/dist/shadcn/command.d.ts.map +0 -1
  156. package/dist/shadcn/command.js +0 -123
  157. package/dist/shadcn/context-menu.d.ts +0 -107
  158. package/dist/shadcn/context-menu.d.ts.map +0 -1
  159. package/dist/shadcn/context-menu.js +0 -151
  160. package/dist/shadcn/dialog.d.ts +0 -57
  161. package/dist/shadcn/dialog.d.ts.map +0 -1
  162. package/dist/shadcn/dialog.js +0 -96
  163. package/dist/shadcn/drawer.d.ts +0 -54
  164. package/dist/shadcn/drawer.d.ts.map +0 -1
  165. package/dist/shadcn/drawer.js +0 -96
  166. package/dist/shadcn/dropdown-menu.d.ts +0 -110
  167. package/dist/shadcn/dropdown-menu.d.ts.map +0 -1
  168. package/dist/shadcn/dropdown-menu.js +0 -152
  169. package/dist/shadcn/form.d.ts +0 -59
  170. package/dist/shadcn/form.d.ts.map +0 -1
  171. package/dist/shadcn/form.js +0 -99
  172. package/dist/shadcn/hover-card.d.ts +0 -20
  173. package/dist/shadcn/hover-card.d.ts.map +0 -1
  174. package/dist/shadcn/hover-card.js +0 -26
  175. package/dist/shadcn/input-otp.d.ts +0 -25
  176. package/dist/shadcn/input-otp.d.ts.map +0 -1
  177. package/dist/shadcn/input-otp.js +0 -54
  178. package/dist/shadcn/input.d.ts +0 -14
  179. package/dist/shadcn/input.d.ts.map +0 -1
  180. package/dist/shadcn/input.js +0 -48
  181. package/dist/shadcn/label.d.ts +0 -8
  182. package/dist/shadcn/label.d.ts.map +0 -1
  183. package/dist/shadcn/label.js +0 -16
  184. package/dist/shadcn/menubar.d.ts +0 -108
  185. package/dist/shadcn/menubar.d.ts.map +0 -1
  186. package/dist/shadcn/menubar.js +0 -174
  187. package/dist/shadcn/navigation-menu.d.ts +0 -79
  188. package/dist/shadcn/navigation-menu.d.ts.map +0 -1
  189. package/dist/shadcn/navigation-menu.js +0 -108
  190. package/dist/shadcn/pagination.d.ts +0 -45
  191. package/dist/shadcn/pagination.d.ts.map +0 -1
  192. package/dist/shadcn/pagination.js +0 -83
  193. package/dist/shadcn/popover.d.ts +0 -19
  194. package/dist/shadcn/popover.d.ts.map +0 -1
  195. package/dist/shadcn/popover.js +0 -29
  196. package/dist/shadcn/progress.d.ts +0 -9
  197. package/dist/shadcn/progress.d.ts.map +0 -1
  198. package/dist/shadcn/progress.js +0 -17
  199. package/dist/shadcn/radio-group.d.ts +0 -12
  200. package/dist/shadcn/radio-group.d.ts.map +0 -1
  201. package/dist/shadcn/radio-group.js +0 -32
  202. package/dist/shadcn/resizable.d.ts +0 -20
  203. package/dist/shadcn/resizable.d.ts.map +0 -1
  204. package/dist/shadcn/resizable.js +0 -32
  205. package/dist/shadcn/scroll-area.d.ts +0 -16
  206. package/dist/shadcn/scroll-area.d.ts.map +0 -1
  207. package/dist/shadcn/scroll-area.js +0 -40
  208. package/dist/shadcn/select.d.ts +0 -63
  209. package/dist/shadcn/select.d.ts.map +0 -1
  210. package/dist/shadcn/select.js +0 -120
  211. package/dist/shadcn/separator.d.ts +0 -10
  212. package/dist/shadcn/separator.d.ts.map +0 -1
  213. package/dist/shadcn/separator.js +0 -18
  214. package/dist/shadcn/sheet.d.ts +0 -48
  215. package/dist/shadcn/sheet.d.ts.map +0 -1
  216. package/dist/shadcn/sheet.js +0 -99
  217. package/dist/shadcn/sidebar.d.ts +0 -200
  218. package/dist/shadcn/sidebar.d.ts.map +0 -1
  219. package/dist/shadcn/sidebar.js +0 -528
  220. package/dist/shadcn/skeleton.d.ts +0 -6
  221. package/dist/shadcn/skeleton.d.ts.map +0 -1
  222. package/dist/shadcn/skeleton.js +0 -11
  223. package/dist/shadcn/slider.d.ts +0 -12
  224. package/dist/shadcn/slider.d.ts.map +0 -1
  225. package/dist/shadcn/slider.js +0 -50
  226. package/dist/shadcn/sonner.d.ts +0 -7
  227. package/dist/shadcn/sonner.d.ts.map +0 -1
  228. package/dist/shadcn/sonner.js +0 -20
  229. package/dist/shadcn/switch.d.ts +0 -8
  230. package/dist/shadcn/switch.d.ts.map +0 -1
  231. package/dist/shadcn/switch.js +0 -22
  232. package/dist/shadcn/table.d.ts +0 -35
  233. package/dist/shadcn/table.d.ts.map +0 -1
  234. package/dist/shadcn/table.js +0 -73
  235. package/dist/shadcn/tabs.d.ts +0 -20
  236. package/dist/shadcn/tabs.d.ts.map +0 -1
  237. package/dist/shadcn/tabs.js +0 -40
  238. package/dist/shadcn/textarea.d.ts +0 -7
  239. package/dist/shadcn/textarea.d.ts.map +0 -1
  240. package/dist/shadcn/textarea.js +0 -14
  241. package/dist/shadcn/toggle-group.d.ts +0 -22
  242. package/dist/shadcn/toggle-group.d.ts.map +0 -1
  243. package/dist/shadcn/toggle-group.js +0 -43
  244. package/dist/shadcn/toggle.d.ts +0 -29
  245. package/dist/shadcn/toggle.d.ts.map +0 -1
  246. package/dist/shadcn/toggle.js +0 -31
  247. package/dist/shadcn/tooltip.d.ts +0 -20
  248. package/dist/shadcn/tooltip.d.ts.map +0 -1
  249. package/dist/shadcn/tooltip.js +0 -40
  250. package/dist/stories/BackgroundSlideshow.stories.d.ts +0 -9
  251. package/dist/stories/BackgroundSlideshow.stories.d.ts.map +0 -1
  252. package/dist/stories/BackgroundSlideshow.stories.js +0 -60
  253. package/dist/stories/BlurryGradient.stories.d.ts +0 -11
  254. package/dist/stories/BlurryGradient.stories.d.ts.map +0 -1
  255. package/dist/stories/BlurryGradient.stories.js +0 -53
  256. package/dist/stories/Box.stories.d.ts +0 -13
  257. package/dist/stories/Box.stories.d.ts.map +0 -1
  258. package/dist/stories/Box.stories.js +0 -50
  259. package/dist/stories/Carousel.stories.d.ts +0 -9
  260. package/dist/stories/Carousel.stories.d.ts.map +0 -1
  261. package/dist/stories/Carousel.stories.js +0 -30
  262. package/dist/stories/Countdown.stories.d.ts +0 -7
  263. package/dist/stories/Countdown.stories.d.ts.map +0 -1
  264. package/dist/stories/Countdown.stories.js +0 -11
  265. package/dist/stories/DefinitionList.stories.d.ts +0 -9
  266. package/dist/stories/DefinitionList.stories.d.ts.map +0 -1
  267. package/dist/stories/DefinitionList.stories.js +0 -20
  268. package/dist/stories/GenericError.stories.d.ts +0 -9
  269. package/dist/stories/GenericError.stories.d.ts.map +0 -1
  270. package/dist/stories/GenericError.stories.js +0 -39
  271. package/dist/stories/Heading.stories.d.ts +0 -15
  272. package/dist/stories/Heading.stories.d.ts.map +0 -1
  273. package/dist/stories/Heading.stories.js +0 -61
  274. package/dist/stories/Highlight.stories.d.ts +0 -8
  275. package/dist/stories/Highlight.stories.d.ts.map +0 -1
  276. package/dist/stories/Highlight.stories.js +0 -19
  277. package/dist/stories/IconButton.stories.d.ts +0 -10
  278. package/dist/stories/IconButton.stories.d.ts.map +0 -1
  279. package/dist/stories/IconButton.stories.js +0 -32
  280. package/dist/stories/If.stories.d.ts +0 -13
  281. package/dist/stories/If.stories.d.ts.map +0 -1
  282. package/dist/stories/If.stories.js +0 -54
  283. package/dist/stories/Iframe.stories.d.ts +0 -8
  284. package/dist/stories/Iframe.stories.d.ts.map +0 -1
  285. package/dist/stories/Iframe.stories.js +0 -23
  286. package/dist/stories/Item.stories.d.ts +0 -10
  287. package/dist/stories/Item.stories.d.ts.map +0 -1
  288. package/dist/stories/Item.stories.js +0 -32
  289. package/dist/stories/Link.stories.d.ts +0 -10
  290. package/dist/stories/Link.stories.d.ts.map +0 -1
  291. package/dist/stories/Link.stories.js +0 -36
  292. package/dist/stories/ListItem.stories.d.ts +0 -9
  293. package/dist/stories/ListItem.stories.d.ts.map +0 -1
  294. package/dist/stories/ListItem.stories.js +0 -25
  295. package/dist/stories/MarkdownContainer.stories.d.ts +0 -11
  296. package/dist/stories/MarkdownContainer.stories.d.ts.map +0 -1
  297. package/dist/stories/MarkdownContainer.stories.js +0 -66
  298. package/dist/stories/PasswordInput.stories.d.ts +0 -9
  299. package/dist/stories/PasswordInput.stories.d.ts.map +0 -1
  300. package/dist/stories/PasswordInput.stories.js +0 -27
  301. package/dist/stories/Picture.stories.d.ts +0 -10
  302. package/dist/stories/Picture.stories.d.ts.map +0 -1
  303. package/dist/stories/Picture.stories.js +0 -46
  304. package/dist/stories/ProtectedEmail.stories.d.ts +0 -10
  305. package/dist/stories/ProtectedEmail.stories.d.ts.map +0 -1
  306. package/dist/stories/ProtectedEmail.stories.js +0 -34
  307. package/dist/stories/Text.stories.d.ts +0 -10
  308. package/dist/stories/Text.stories.d.ts.map +0 -1
  309. package/dist/stories/Text.stories.js +0 -31
  310. package/dist/stories/UnorderedList.stories.d.ts +0 -10
  311. package/dist/stories/UnorderedList.stories.d.ts.map +0 -1
  312. package/dist/stories/UnorderedList.stories.js +0 -24
  313. package/dist/test-setup.d.ts +0 -2
  314. package/dist/test-setup.d.ts.map +0 -1
  315. package/dist/test-setup.js +0 -1
  316. package/dist/utils/author.d.ts.map +0 -1
  317. package/dist/utils/author.test.d.ts +0 -2
  318. package/dist/utils/author.test.d.ts.map +0 -1
  319. package/dist/utils/author.test.js +0 -46
  320. package/dist/utils/cn.d.ts.map +0 -1
  321. package/dist/utils/cn.test.d.ts +0 -2
  322. package/dist/utils/cn.test.d.ts.map +0 -1
  323. package/dist/utils/cn.test.js +0 -33
  324. package/dist/utils/is-route-active.d.ts.map +0 -1
  325. package/dist/utils/is-route-active.test.d.ts +0 -2
  326. package/dist/utils/is-route-active.test.d.ts.map +0 -1
  327. package/dist/utils/is-route-active.test.js +0 -61
  328. package/dist/utils/locale.d.ts.map +0 -1
  329. package/dist/utils/locale.test.d.ts +0 -2
  330. package/dist/utils/locale.test.d.ts.map +0 -1
  331. package/dist/utils/locale.test.js +0 -99
  332. package/dist/utils/text.d.ts.map +0 -1
  333. package/dist/utils/text.test.d.ts +0 -2
  334. package/dist/utils/text.test.d.ts.map +0 -1
  335. package/dist/utils/text.test.js +0 -122
@@ -1,27 +1,45 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from '../utils/cn';
3
- const text = cva({
4
- base: ['relative', 'block'],
5
- defaultVariants: {
6
- themeColor: 'primary',
7
- variant: 'primary',
8
- },
9
- variants: {
10
- themeColor: {
11
- primary: [],
12
- },
13
- variant: {
14
- code: ['font-light', 'font-monospace'],
15
- primary: [],
16
- subtitle: ['text-lg'],
17
- },
1
+ import { defineConfig } from 'cva';
2
+ import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ // src/utils/cn.ts
6
+ var { cva, compose } = defineConfig({
7
+ hooks: {
8
+ onComplete: (className) => {
9
+ return twMerge(className);
10
+ }
11
+ }
12
+ });
13
+ var text = cva({
14
+ base: ["relative", "block"],
15
+ defaultVariants: {
16
+ themeColor: "primary",
17
+ variant: "primary"
18
+ },
19
+ variants: {
20
+ themeColor: {
21
+ primary: []
18
22
  },
23
+ variant: {
24
+ code: ["font-light", "font-monospace"],
25
+ primary: [],
26
+ subtitle: ["text-lg"]
27
+ }
28
+ }
19
29
  });
20
- export const Text = (props) => {
21
- const { children, className, variant, themeColor } = props;
22
- return (_jsx("div", { className: text({
23
- className,
24
- themeColor,
25
- variant,
26
- }), children: children }));
30
+ var Text = (props) => {
31
+ const { children, className, variant, themeColor } = props;
32
+ return /* @__PURE__ */ jsx(
33
+ "div",
34
+ {
35
+ className: text({
36
+ className,
37
+ themeColor,
38
+ variant
39
+ }),
40
+ children
41
+ }
42
+ );
27
43
  };
44
+
45
+ export { Text };
@@ -1,16 +1,19 @@
1
- import type { ComponentProps } from 'react';
2
- import { type VariantProps } from '../utils/cn';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as cva from 'cva';
3
+ import { VariantProps } from 'cva';
4
+ import { ComponentProps } from 'react';
5
+
3
6
  declare const ul: (props?: ({
4
7
  variant?: "primary" | "unstyled" | "inline" | undefined;
5
8
  } & ({
6
- class?: import("cva").ClassValue;
9
+ class?: cva.ClassValue;
7
10
  className?: never;
8
11
  } | {
9
12
  class?: never;
10
- className?: import("cva").ClassValue;
13
+ className?: cva.ClassValue;
11
14
  })) | undefined) => string;
12
- export interface UnorderedListProps extends ComponentProps<'ul'>, VariantProps<typeof ul> {
15
+ interface UnorderedListProps extends ComponentProps<'ul'>, VariantProps<typeof ul> {
13
16
  }
14
- export declare const UnorderedList: (props: UnorderedListProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
16
- //# sourceMappingURL=unordered-list.d.ts.map
17
+ declare const UnorderedList: (props: UnorderedListProps) => react_jsx_runtime.JSX.Element;
18
+
19
+ export { UnorderedList, type UnorderedListProps };
@@ -1,21 +1,39 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from '../utils/cn';
3
- const ul = cva({
4
- defaultVariants: {
5
- variant: 'primary',
6
- },
7
- variants: {
8
- variant: {
9
- inline: ['flex', 'flex-wrap', 'list-none'],
10
- primary: [],
11
- unstyled: ['list-none', 'p-0'],
12
- },
13
- },
1
+ import { defineConfig } from 'cva';
2
+ import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ // src/utils/cn.ts
6
+ var { cva, compose } = defineConfig({
7
+ hooks: {
8
+ onComplete: (className) => {
9
+ return twMerge(className);
10
+ }
11
+ }
14
12
  });
15
- export const UnorderedList = (props) => {
16
- const { children, className, variant } = props;
17
- return (_jsx("ul", { className: ul({
18
- className,
19
- variant,
20
- }), children: children }));
13
+ var ul = cva({
14
+ defaultVariants: {
15
+ variant: "primary"
16
+ },
17
+ variants: {
18
+ variant: {
19
+ inline: ["flex", "flex-wrap", "list-none"],
20
+ primary: [],
21
+ unstyled: ["list-none", "p-0"]
22
+ }
23
+ }
24
+ });
25
+ var UnorderedList = (props) => {
26
+ const { children, className, variant } = props;
27
+ return /* @__PURE__ */ jsx(
28
+ "ul",
29
+ {
30
+ className: ul({
31
+ className,
32
+ variant
33
+ }),
34
+ children
35
+ }
36
+ );
21
37
  };
38
+
39
+ export { UnorderedList };
@@ -1,2 +1,7 @@
1
- export declare function useCurrentRouteData<HeaderData>(): {} | HeaderData;
2
- //# sourceMappingURL=use-current-route-data.d.ts.map
1
+ /**
2
+ * This base hook is used to access data related to the current route
3
+ * @returns {JSON|undefined} The router data or undefined if not found
4
+ */
5
+ declare function useCurrentRouteData<HeaderData>(): {} | HeaderData;
6
+
7
+ export { useCurrentRouteData };
@@ -1,12 +1,16 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useLocation, useMatches } from 'react-router';
3
- export function useCurrentRouteData() {
4
- const location = useLocation();
5
- const matchingRoutes = useMatches();
6
- const route = useMemo(() => {
7
- return matchingRoutes.find((route) => {
8
- return route.pathname === location.pathname;
9
- });
10
- }, [matchingRoutes, location]);
11
- return route?.data || undefined;
3
+
4
+ // src/hooks/use-current-route-data.ts
5
+ function useCurrentRouteData() {
6
+ const location = useLocation();
7
+ const matchingRoutes = useMatches();
8
+ const route = useMemo(() => {
9
+ return matchingRoutes.find((route2) => {
10
+ return route2.pathname === location.pathname;
11
+ });
12
+ }, [matchingRoutes, location]);
13
+ return route?.data || void 0;
12
14
  }
15
+
16
+ export { useCurrentRouteData };
@@ -1,3 +1,6 @@
1
- import type { RefObject } from 'react';
2
- export declare function useFocusSearch(ref: RefObject<HTMLInputElement>): void;
3
- //# sourceMappingURL=use-focus-search.d.ts.map
1
+ import { RefObject } from 'react';
2
+
3
+ /** Focuses on the field when user clicks cmd + k or ctrl + k */
4
+ declare function useFocusSearch(ref: RefObject<HTMLInputElement>): void;
5
+
6
+ export { useFocusSearch };
@@ -1,15 +1,19 @@
1
1
  import { useEffect } from 'react';
2
- export function useFocusSearch(ref) {
3
- useEffect(() => {
4
- function handleKeyDown(event) {
5
- if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
6
- event.preventDefault();
7
- ref?.current?.focus();
8
- }
9
- }
10
- document.addEventListener('keydown', handleKeyDown);
11
- return () => {
12
- document.removeEventListener('keydown', handleKeyDown);
13
- };
14
- }, [ref]);
2
+
3
+ // src/hooks/use-focus-search.ts
4
+ function useFocusSearch(ref) {
5
+ useEffect(() => {
6
+ function handleKeyDown(event) {
7
+ if ((event.metaKey || event.ctrlKey) && event.key === "k") {
8
+ event.preventDefault();
9
+ ref?.current?.focus();
10
+ }
11
+ }
12
+ document.addEventListener("keydown", handleKeyDown);
13
+ return () => {
14
+ document.removeEventListener("keydown", handleKeyDown);
15
+ };
16
+ }, [ref]);
15
17
  }
18
+
19
+ export { useFocusSearch };
@@ -1,2 +1,9 @@
1
- export declare function useMatchesData<T>(id: string): T | undefined;
2
- //# sourceMappingURL=use-matches-data.d.ts.map
1
+ /**
2
+ * This base hook is used in other hooks to quickly search for specific data
3
+ * across all loader data using useMatches.
4
+ * @param {string} id The route id
5
+ * @returns {JSON|undefined} The router data or undefined if not found
6
+ */
7
+ declare function useMatchesData<T>(id: string): T | undefined;
8
+
9
+ export { useMatchesData };
@@ -1,11 +1,15 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useMatches } from 'react-router';
3
- export function useMatchesData(id) {
4
- const matchingRoutes = useMatches();
5
- const route = useMemo(() => {
6
- return matchingRoutes.find((route) => {
7
- return route.id === id;
8
- });
9
- }, [matchingRoutes, id]);
10
- return route?.data || undefined;
3
+
4
+ // src/hooks/use-matches-data.ts
5
+ function useMatchesData(id) {
6
+ const matchingRoutes = useMatches();
7
+ const route = useMemo(() => {
8
+ return matchingRoutes.find((route2) => {
9
+ return route2.id === id;
10
+ });
11
+ }, [matchingRoutes, id]);
12
+ return route?.data || void 0;
11
13
  }
14
+
15
+ export { useMatchesData };
@@ -1,2 +1,8 @@
1
- export declare function useMediaQuery(query: string): boolean;
2
- //# sourceMappingURL=use-media-query.d.ts.map
1
+ /**
2
+ * A hook that returns a boolean indicating whether the current viewport matches the provided media query
3
+ * @param query The media query to check against (e.g. '(min-width: 768px)')
4
+ * @returns A boolean indicating whether the media query matches
5
+ */
6
+ declare function useMediaQuery(query: string): boolean;
7
+
8
+ export { useMediaQuery };
@@ -1,16 +1,20 @@
1
- import { useEffect, useState } from 'react';
2
- export function useMediaQuery(query) {
3
- const [matches, setMatches] = useState(false);
4
- useEffect(() => {
5
- const mediaQuery = window.matchMedia(query);
6
- setMatches(mediaQuery.matches);
7
- const handleChange = (event) => {
8
- setMatches(event.matches);
9
- };
10
- mediaQuery.addEventListener('change', handleChange);
11
- return () => {
12
- mediaQuery.removeEventListener('change', handleChange);
13
- };
14
- }, [query]);
15
- return matches;
1
+ import { useState, useEffect } from 'react';
2
+
3
+ // src/hooks/use-media-query.ts
4
+ function useMediaQuery(query) {
5
+ const [matches, setMatches] = useState(false);
6
+ useEffect(() => {
7
+ const mediaQuery = window.matchMedia(query);
8
+ setMatches(mediaQuery.matches);
9
+ const handleChange = (event) => {
10
+ setMatches(event.matches);
11
+ };
12
+ mediaQuery.addEventListener("change", handleChange);
13
+ return () => {
14
+ mediaQuery.removeEventListener("change", handleChange);
15
+ };
16
+ }, [query]);
17
+ return matches;
16
18
  }
19
+
20
+ export { useMediaQuery };
@@ -1,2 +1,3 @@
1
- export declare function useIsMobile(): boolean;
2
- //# sourceMappingURL=use-mobile.d.ts.map
1
+ declare function useIsMobile(): boolean;
2
+
3
+ export { useIsMobile };
@@ -1,15 +1,19 @@
1
- import { useEffect, useState } from 'react';
2
- const MOBILE_BREAKPOINT = 768;
3
- export function useIsMobile() {
4
- const [isMobile, setIsMobile] = useState(undefined);
5
- useEffect(() => {
6
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
7
- const onChange = () => {
8
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
9
- };
10
- mql.addEventListener('change', onChange);
11
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
12
- return () => mql.removeEventListener('change', onChange);
13
- }, []);
14
- return !!isMobile;
1
+ import { useState, useEffect } from 'react';
2
+
3
+ // src/hooks/use-mobile.ts
4
+ var MOBILE_BREAKPOINT = 768;
5
+ function useIsMobile() {
6
+ const [isMobile, setIsMobile] = useState(void 0);
7
+ useEffect(() => {
8
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
9
+ const onChange = () => {
10
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
11
+ };
12
+ mql.addEventListener("change", onChange);
13
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
14
+ return () => mql.removeEventListener("change", onChange);
15
+ }, []);
16
+ return !!isMobile;
15
17
  }
18
+
19
+ export { useIsMobile };
@@ -1,5 +1,12 @@
1
- export declare const NonceContext: import("react").Context<string>;
2
- export declare const NonceProvider: import("react").Provider<string>;
3
- export declare const useNonce: () => string;
4
- export declare function generateNonce(): string;
5
- //# sourceMappingURL=use-nonce.d.ts.map
1
+ import * as react from 'react';
2
+
3
+ declare const NonceContext: react.Context<string>;
4
+ declare const NonceProvider: react.Provider<string>;
5
+ declare const useNonce: () => string;
6
+ /**
7
+ * Generate a cryptographically secure nonce for CSP.
8
+ * @returns A base64-encoded random nonce
9
+ */
10
+ declare function generateNonce(): string;
11
+
12
+ export { NonceContext, NonceProvider, generateNonce, useNonce };
@@ -1,9 +1,13 @@
1
1
  import { createContext, useContext } from 'react';
2
- export const NonceContext = createContext('');
3
- export const NonceProvider = NonceContext.Provider;
4
- export const useNonce = () => useContext(NonceContext);
5
- export function generateNonce() {
6
- const array = new Uint8Array(16);
7
- crypto.getRandomValues(array);
8
- return btoa(String.fromCharCode(...array));
2
+
3
+ // src/hooks/use-nonce.ts
4
+ var NonceContext = createContext("");
5
+ var NonceProvider = NonceContext.Provider;
6
+ var useNonce = () => useContext(NonceContext);
7
+ function generateNonce() {
8
+ const array = new Uint8Array(16);
9
+ crypto.getRandomValues(array);
10
+ return btoa(String.fromCharCode(...array));
9
11
  }
12
+
13
+ export { NonceContext, NonceProvider, generateNonce, useNonce };
@@ -1,3 +1,11 @@
1
- export type Orientation = 'portrait' | 'landscape';
2
- export declare function useOrientation(): Orientation;
3
- //# sourceMappingURL=use-orientation.d.ts.map
1
+ /**
2
+ * Orientation type representing device orientation
3
+ */
4
+ type Orientation = 'portrait' | 'landscape';
5
+ /**
6
+ * Hook that tracks the current device orientation
7
+ * @returns The current orientation ('portrait' or 'landscape')
8
+ */
9
+ declare function useOrientation(): Orientation;
10
+
11
+ export { type Orientation, useOrientation };
@@ -1,25 +1,29 @@
1
- import { useEffect, useState } from 'react';
2
- export function useOrientation() {
3
- const [orientation, setOrientation] = useState(() => {
4
- if (typeof window !== 'undefined') {
5
- return window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
6
- }
7
- return 'portrait';
8
- });
9
- useEffect(() => {
10
- if (typeof window === 'undefined') {
11
- return;
12
- }
13
- const handleResize = () => {
14
- setOrientation(window.innerHeight > window.innerWidth ? 'portrait' : 'landscape');
15
- };
16
- window.addEventListener('resize', handleResize);
17
- window.addEventListener('orientationchange', handleResize);
18
- handleResize();
19
- return () => {
20
- window.removeEventListener('resize', handleResize);
21
- window.removeEventListener('orientationchange', handleResize);
22
- };
23
- }, []);
24
- return orientation;
1
+ import { useState, useEffect } from 'react';
2
+
3
+ // src/hooks/use-orientation.ts
4
+ function useOrientation() {
5
+ const [orientation, setOrientation] = useState(() => {
6
+ if (typeof window !== "undefined") {
7
+ return window.innerHeight > window.innerWidth ? "portrait" : "landscape";
8
+ }
9
+ return "portrait";
10
+ });
11
+ useEffect(() => {
12
+ if (typeof window === "undefined") {
13
+ return;
14
+ }
15
+ const handleResize = () => {
16
+ setOrientation(window.innerHeight > window.innerWidth ? "portrait" : "landscape");
17
+ };
18
+ window.addEventListener("resize", handleResize);
19
+ window.addEventListener("orientationchange", handleResize);
20
+ handleResize();
21
+ return () => {
22
+ window.removeEventListener("resize", handleResize);
23
+ window.removeEventListener("orientationchange", handleResize);
24
+ };
25
+ }, []);
26
+ return orientation;
25
27
  }
28
+
29
+ export { useOrientation };
@@ -1,15 +1,50 @@
1
- import type { User } from '@supabase/supabase-js';
2
- import { type ReactNode } from 'react';
3
- export interface UserContextType {
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ReactNode } from 'react';
4
+ import { User } from '@supabase/supabase-js';
5
+
6
+ /**
7
+ * Context for storing and accessing the current authenticated user
8
+ */
9
+ interface UserContextType {
10
+ /**
11
+ * The current authenticated user, or null if not authenticated
12
+ */
4
13
  user: User | null;
14
+ /**
15
+ * Whether the user data is currently loading
16
+ */
5
17
  isLoading: boolean;
6
18
  }
7
- export declare const UserContext: import("react").Context<UserContextType>;
8
- export interface UserContextProviderProps {
19
+ /**
20
+ * Context for storing and accessing the current authenticated user
21
+ */
22
+ declare const UserContext: react.Context<UserContextType>;
23
+ /**
24
+ * Props for the UserContextProvider component
25
+ */
26
+ interface UserContextProviderProps {
27
+ /**
28
+ * The current authenticated user, or null if not authenticated
29
+ */
9
30
  user: User | null;
31
+ /**
32
+ * Whether the user data is currently loading
33
+ */
10
34
  isLoading?: boolean;
35
+ /**
36
+ * Child components that will have access to the user context
37
+ */
11
38
  children: ReactNode;
12
39
  }
13
- export declare function UserContextProvider({ user, isLoading, children, }: UserContextProviderProps): import("react/jsx-runtime").JSX.Element;
14
- export declare function useUser(): UserContextType;
15
- //# sourceMappingURL=use-user.d.ts.map
40
+ /**
41
+ * Provider component for the UserContext
42
+ */
43
+ declare function UserContextProvider({ user, isLoading, children, }: UserContextProviderProps): react_jsx_runtime.JSX.Element;
44
+ /**
45
+ * Hook to access the current authenticated user from the UserContext
46
+ * @returns The current user context containing the user object and loading state
47
+ */
48
+ declare function useUser(): UserContextType;
49
+
50
+ export { UserContext, UserContextProvider, type UserContextProviderProps, type UserContextType, useUser };
@@ -1,17 +1,25 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { createContext, useContext } from 'react';
3
- const defaultContextValue = {
4
- isLoading: false,
5
- user: null,
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/hooks/use-user.tsx
5
+ var defaultContextValue = {
6
+ isLoading: false,
7
+ user: null
6
8
  };
7
- export const UserContext = createContext(defaultContextValue);
8
- export function UserContextProvider({ user, isLoading = false, children, }) {
9
- return _jsx(UserContext.Provider, { value: { isLoading, user }, children: children });
9
+ var UserContext = createContext(defaultContextValue);
10
+ function UserContextProvider({
11
+ user,
12
+ isLoading = false,
13
+ children
14
+ }) {
15
+ return /* @__PURE__ */ jsx(UserContext.Provider, { value: { isLoading, user }, children });
10
16
  }
11
- export function useUser() {
12
- const context = useContext(UserContext);
13
- if (context === undefined) {
14
- throw new Error('useUser must be used within a UserContextProvider');
15
- }
16
- return context;
17
+ function useUser() {
18
+ const context = useContext(UserContext);
19
+ if (context === void 0) {
20
+ throw new Error("useUser must be used within a UserContextProvider");
21
+ }
22
+ return context;
17
23
  }
24
+
25
+ export { UserContext, UserContextProvider, useUser };
@@ -3,7 +3,7 @@ type AuthorInfo = {
3
3
  email?: string;
4
4
  url?: string;
5
5
  };
6
- export declare function parseAuthorString(input: string): AuthorInfo;
7
- export declare function generateLinkFromAuthorString(input: string): React.ReactNode;
8
- export {};
9
- //# sourceMappingURL=author.d.ts.map
6
+ declare function parseAuthorString(input: string): AuthorInfo;
7
+ declare function generateLinkFromAuthorString(input: string): React.ReactNode;
8
+
9
+ export { generateLinkFromAuthorString, parseAuthorString };