@kumix/ui 0.1.3 → 0.2.1

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 (497) hide show
  1. package/README.md +115 -95
  2. package/dist/components/reui/alert.d.ts +12 -0
  3. package/dist/components/reui/alert.d.ts.map +1 -0
  4. package/dist/components/reui/alert.js +58 -0
  5. package/dist/components/reui/alert.js.map +1 -0
  6. package/dist/components/reui/autocomplete.d.ts +43 -0
  7. package/dist/components/reui/autocomplete.d.ts.map +1 -0
  8. package/dist/components/reui/autocomplete.js +165 -0
  9. package/dist/components/reui/autocomplete.js.map +1 -0
  10. package/dist/components/reui/badge.d.ts +17 -0
  11. package/dist/components/reui/badge.d.ts.map +1 -0
  12. package/dist/components/reui/badge.js +75 -0
  13. package/dist/components/reui/badge.js.map +1 -0
  14. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +17 -0
  15. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -0
  16. package/dist/components/reui/data-grid/data-grid-column-filter.js +127 -0
  17. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -0
  18. package/dist/components/reui/data-grid/data-grid-column-header.d.ts +18 -0
  19. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -0
  20. package/dist/components/reui/data-grid/data-grid-column-header.js +228 -0
  21. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -0
  22. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +10 -0
  23. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -0
  24. package/dist/components/reui/data-grid/data-grid-column-visibility.js +28 -0
  25. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -0
  26. package/dist/components/reui/data-grid/data-grid-pagination.d.ts +22 -0
  27. package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -0
  28. package/dist/components/reui/data-grid/data-grid-pagination.js +144 -0
  29. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -0
  30. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +12 -0
  31. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -0
  32. package/dist/components/reui/data-grid/data-grid-scroll-area.js +289 -0
  33. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -0
  34. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +14 -0
  35. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -0
  36. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +166 -0
  37. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -0
  38. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +10 -0
  39. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -0
  40. package/dist/components/reui/data-grid/data-grid-table-dnd.js +171 -0
  41. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -0
  42. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +29 -0
  43. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -0
  44. package/dist/components/reui/data-grid/data-grid-table-virtual.js +269 -0
  45. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -0
  46. package/dist/components/reui/data-grid/data-grid-table.d.ts +116 -0
  47. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -0
  48. package/dist/components/reui/data-grid/data-grid-table.js +864 -0
  49. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -0
  50. package/dist/components/reui/data-grid/data-grid.d.ts +112 -0
  51. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -0
  52. package/dist/components/reui/data-grid/data-grid.js +134 -0
  53. package/dist/components/reui/data-grid/data-grid.js.map +1 -0
  54. package/dist/components/reui/date-selector.d.ts +131 -0
  55. package/dist/components/reui/date-selector.d.ts.map +1 -0
  56. package/dist/components/reui/date-selector.js +783 -0
  57. package/dist/components/reui/date-selector.js.map +1 -0
  58. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +7 -0
  59. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -0
  60. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +108 -0
  61. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -0
  62. package/dist/components/reui/event-calendar/event-calendar-content.d.ts +15 -0
  63. package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -0
  64. package/dist/components/reui/event-calendar/event-calendar-content.js +44 -0
  65. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -0
  66. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +30 -0
  67. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -0
  68. package/dist/components/reui/event-calendar/event-calendar-dnd.js +581 -0
  69. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -0
  70. package/dist/components/reui/event-calendar/event-calendar-event.d.ts +73 -0
  71. package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -0
  72. package/dist/components/reui/event-calendar/event-calendar-event.js +299 -0
  73. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -0
  74. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +103 -0
  75. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -0
  76. package/dist/components/reui/event-calendar/event-calendar-i18n.js +141 -0
  77. package/dist/components/reui/event-calendar/event-calendar-i18n.js.map +1 -0
  78. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +111 -0
  79. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -0
  80. package/dist/components/reui/event-calendar/event-calendar-lib.js +398 -0
  81. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -0
  82. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +29 -0
  83. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -0
  84. package/dist/components/reui/event-calendar/event-calendar-month-view.js +530 -0
  85. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -0
  86. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +71 -0
  87. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -0
  88. package/dist/components/reui/event-calendar/event-calendar-nav.js +319 -0
  89. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -0
  90. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +32 -0
  91. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -0
  92. package/dist/components/reui/event-calendar/event-calendar-recurrence.js +300 -0
  93. package/dist/components/reui/event-calendar/event-calendar-recurrence.js.map +1 -0
  94. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +14 -0
  95. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -0
  96. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +355 -0
  97. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -0
  98. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +35 -0
  99. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -0
  100. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +651 -0
  101. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -0
  102. package/dist/components/reui/event-calendar/event-calendar-types.d.ts +236 -0
  103. package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -0
  104. package/dist/components/reui/event-calendar/event-calendar-types.js +2 -0
  105. package/dist/components/reui/event-calendar/event-calendar.d.ts +561 -0
  106. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -0
  107. package/dist/components/reui/event-calendar/event-calendar.js +817 -0
  108. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -0
  109. package/dist/components/reui/filters.d.ts +176 -0
  110. package/dist/components/reui/filters.d.ts.map +1 -0
  111. package/dist/components/reui/filters.js +1216 -0
  112. package/dist/components/reui/filters.js.map +1 -0
  113. package/dist/components/reui/frame.d.ts +32 -0
  114. package/dist/components/reui/frame.d.ts.map +1 -0
  115. package/dist/components/reui/frame.js +115 -0
  116. package/dist/components/reui/frame.js.map +1 -0
  117. package/dist/components/reui/gantt/gantt-bar.d.ts +44 -0
  118. package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -0
  119. package/dist/components/reui/gantt/gantt-bar.js +229 -0
  120. package/dist/components/reui/gantt/gantt-bar.js.map +1 -0
  121. package/dist/components/reui/gantt/gantt-dnd.d.ts +36 -0
  122. package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -0
  123. package/dist/components/reui/gantt/gantt-dnd.js +615 -0
  124. package/dist/components/reui/gantt/gantt-dnd.js.map +1 -0
  125. package/dist/components/reui/gantt/gantt-i18n.d.ts +91 -0
  126. package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -0
  127. package/dist/components/reui/gantt/gantt-i18n.js +131 -0
  128. package/dist/components/reui/gantt/gantt-i18n.js.map +1 -0
  129. package/dist/components/reui/gantt/gantt-lib.d.ts +123 -0
  130. package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -0
  131. package/dist/components/reui/gantt/gantt-lib.js +354 -0
  132. package/dist/components/reui/gantt/gantt-lib.js.map +1 -0
  133. package/dist/components/reui/gantt/gantt-nav.d.ts +60 -0
  134. package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -0
  135. package/dist/components/reui/gantt/gantt-nav.js +266 -0
  136. package/dist/components/reui/gantt/gantt-nav.js.map +1 -0
  137. package/dist/components/reui/gantt/gantt-recurrence.d.ts +37 -0
  138. package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -0
  139. package/dist/components/reui/gantt/gantt-recurrence.js +230 -0
  140. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -0
  141. package/dist/components/reui/gantt/gantt-types.d.ts +251 -0
  142. package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -0
  143. package/dist/components/reui/gantt/gantt-types.js +2 -0
  144. package/dist/components/reui/gantt/gantt-view.d.ts +10 -0
  145. package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -0
  146. package/dist/components/reui/gantt/gantt-view.js +2193 -0
  147. package/dist/components/reui/gantt/gantt-view.js.map +1 -0
  148. package/dist/components/reui/gantt/gantt.d.ts +602 -0
  149. package/dist/components/reui/gantt/gantt.d.ts.map +1 -0
  150. package/dist/components/reui/gantt/gantt.js +796 -0
  151. package/dist/components/reui/gantt/gantt.js.map +1 -0
  152. package/dist/components/reui/icon-stack.d.ts +7 -0
  153. package/dist/components/reui/icon-stack.d.ts.map +1 -0
  154. package/dist/components/reui/icon-stack.js +76 -0
  155. package/dist/components/reui/icon-stack.js.map +1 -0
  156. package/dist/components/reui/kanban.d.ts +70 -0
  157. package/dist/components/reui/kanban.d.ts.map +1 -0
  158. package/dist/components/reui/kanban.js +519 -0
  159. package/dist/components/reui/kanban.js.map +1 -0
  160. package/dist/components/reui/number-field.d.ts +29 -0
  161. package/dist/components/reui/number-field.d.ts.map +1 -0
  162. package/dist/components/reui/number-field.js +127 -0
  163. package/dist/components/reui/number-field.js.map +1 -0
  164. package/dist/components/reui/phone-input.d.ts +13 -0
  165. package/dist/components/reui/phone-input.d.ts.map +1 -0
  166. package/dist/components/reui/phone-input.js +126 -0
  167. package/dist/components/reui/phone-input.js.map +1 -0
  168. package/dist/components/reui/rating.d.ts +34 -0
  169. package/dist/components/reui/rating.d.ts.map +1 -0
  170. package/dist/components/reui/rating.js +94 -0
  171. package/dist/components/reui/rating.js.map +1 -0
  172. package/dist/components/reui/scrollspy.d.ts +17 -0
  173. package/dist/components/reui/scrollspy.d.ts.map +1 -0
  174. package/dist/components/reui/scrollspy.js +130 -0
  175. package/dist/components/reui/scrollspy.js.map +1 -0
  176. package/dist/components/reui/sortable.d.ts +48 -0
  177. package/dist/components/reui/sortable.d.ts.map +1 -0
  178. package/dist/components/reui/sortable.js +230 -0
  179. package/dist/components/reui/sortable.js.map +1 -0
  180. package/dist/components/reui/stepper.d.ts +63 -0
  181. package/dist/components/reui/stepper.d.ts.map +1 -0
  182. package/dist/components/reui/stepper.js +234 -0
  183. package/dist/components/reui/stepper.js.map +1 -0
  184. package/dist/components/reui/timeline.d.ts +24 -0
  185. package/dist/components/reui/timeline.d.ts.map +1 -0
  186. package/dist/components/reui/timeline.js +123 -0
  187. package/dist/components/reui/timeline.js.map +1 -0
  188. package/dist/components/reui/tree.d.ts +23 -0
  189. package/dist/components/reui/tree.d.ts.map +1 -0
  190. package/dist/components/reui/tree.js +115 -0
  191. package/dist/components/reui/tree.js.map +1 -0
  192. package/dist/components/ui/accordion.d.ts +9 -0
  193. package/dist/components/ui/accordion.d.ts.map +1 -0
  194. package/dist/components/ui/accordion.js +56 -0
  195. package/dist/components/ui/accordion.js.map +1 -0
  196. package/dist/components/ui/alert-dialog.d.ts +21 -0
  197. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  198. package/dist/components/ui/alert-dialog.js +96 -0
  199. package/dist/components/ui/alert-dialog.js.map +1 -0
  200. package/dist/components/ui/alert.d.ts +13 -0
  201. package/dist/components/ui/alert.d.ts.map +1 -0
  202. package/dist/components/ui/alert.js +45 -0
  203. package/dist/components/ui/alert.js.map +1 -0
  204. package/dist/components/ui/aspect-ratio.d.ts +8 -0
  205. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  206. package/dist/components/ui/aspect-ratio.js +16 -0
  207. package/dist/components/ui/aspect-ratio.js.map +1 -0
  208. package/dist/components/ui/attachment.d.ts +26 -0
  209. package/dist/components/ui/attachment.d.ts.map +1 -0
  210. package/dist/components/ui/attachment.js +106 -0
  211. package/dist/components/ui/attachment.js.map +1 -0
  212. package/dist/components/ui/avatar.d.ts +14 -0
  213. package/dist/components/ui/avatar.d.ts.map +1 -0
  214. package/dist/components/ui/avatar.js +52 -0
  215. package/dist/components/ui/avatar.js.map +1 -0
  216. package/dist/components/ui/badge.d.ts +10 -0
  217. package/dist/components/ui/badge.d.ts.map +1 -0
  218. package/dist/components/ui/badge.js +32 -0
  219. package/dist/components/ui/badge.js.map +1 -0
  220. package/dist/components/ui/breadcrumb.d.ts +13 -0
  221. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  222. package/dist/components/ui/breadcrumb.js +72 -0
  223. package/dist/components/ui/breadcrumb.js.map +1 -0
  224. package/dist/components/ui/bubble.d.ts +19 -0
  225. package/dist/components/ui/bubble.d.ts.map +1 -0
  226. package/dist/components/ui/bubble.js +75 -0
  227. package/dist/components/ui/bubble.js.map +1 -0
  228. package/dist/components/ui/button-group.d.ts +14 -0
  229. package/dist/components/ui/button-group.d.ts.map +1 -0
  230. package/dist/components/ui/button-group.js +44 -0
  231. package/dist/components/ui/button-group.js.map +1 -0
  232. package/dist/components/ui/button.d.ts +11 -0
  233. package/dist/components/ui/button.d.ts.map +1 -0
  234. package/dist/components/ui/button.js +47 -0
  235. package/dist/components/ui/button.js.map +1 -0
  236. package/dist/components/ui/calendar.d.ts +13 -0
  237. package/dist/components/ui/calendar.d.ts.map +1 -0
  238. package/dist/components/ui/calendar.js +110 -0
  239. package/dist/components/ui/calendar.js.map +1 -0
  240. package/dist/components/ui/card.d.ts +14 -0
  241. package/dist/components/ui/card.d.ts.map +1 -0
  242. package/dist/components/ui/card.js +58 -0
  243. package/dist/components/ui/card.js.map +1 -0
  244. package/dist/components/ui/carousel.d.ts +31 -0
  245. package/dist/components/ui/carousel.d.ts.map +1 -0
  246. package/dist/components/ui/carousel.js +135 -0
  247. package/dist/components/ui/carousel.js.map +1 -0
  248. package/dist/components/ui/chart.d.ts +47 -0
  249. package/dist/components/ui/chart.d.ts.map +1 -0
  250. package/dist/components/ui/chart.js +151 -0
  251. package/dist/components/ui/chart.js.map +1 -0
  252. package/dist/components/ui/checkbox.d.ts +6 -0
  253. package/dist/components/ui/checkbox.d.ts.map +1 -0
  254. package/dist/components/ui/checkbox.js +22 -0
  255. package/dist/components/ui/checkbox.js.map +1 -0
  256. package/dist/components/ui/collapsible.d.ts +8 -0
  257. package/dist/components/ui/collapsible.d.ts.map +1 -0
  258. package/dist/components/ui/collapsible.js +26 -0
  259. package/dist/components/ui/collapsible.js.map +1 -0
  260. package/dist/components/ui/combobox.d.ts +27 -0
  261. package/dist/components/ui/combobox.d.ts.map +1 -0
  262. package/dist/components/ui/combobox.js +164 -0
  263. package/dist/components/ui/combobox.js.map +1 -0
  264. package/dist/components/ui/command.d.ts +22 -0
  265. package/dist/components/ui/command.d.ts.map +1 -0
  266. package/dist/components/ui/command.js +89 -0
  267. package/dist/components/ui/command.js.map +1 -0
  268. package/dist/components/ui/context-menu.d.ts +32 -0
  269. package/dist/components/ui/context-menu.d.ts.map +1 -0
  270. package/dist/components/ui/context-menu.js +134 -0
  271. package/dist/components/ui/context-menu.js.map +1 -0
  272. package/dist/components/ui/dialog.d.ts +20 -0
  273. package/dist/components/ui/dialog.d.ts.map +1 -0
  274. package/dist/components/ui/dialog.js +93 -0
  275. package/dist/components/ui/dialog.js.map +1 -0
  276. package/dist/components/ui/direction.d.ts +2 -0
  277. package/dist/components/ui/direction.js +3 -0
  278. package/dist/components/ui/drawer.d.ts +19 -0
  279. package/dist/components/ui/drawer.d.ts.map +1 -0
  280. package/dist/components/ui/drawer.js +125 -0
  281. package/dist/components/ui/drawer.js.map +1 -0
  282. package/dist/components/ui/dropdown-menu.d.ts +32 -0
  283. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  284. package/dist/components/ui/dropdown-menu.js +138 -0
  285. package/dist/components/ui/dropdown-menu.js.map +1 -0
  286. package/dist/components/ui/empty.d.ts +15 -0
  287. package/dist/components/ui/empty.d.ts.map +1 -0
  288. package/dist/components/ui/empty.js +62 -0
  289. package/dist/components/ui/empty.js.map +1 -0
  290. package/dist/components/ui/field.d.ts +28 -0
  291. package/dist/components/ui/field.d.ts.map +1 -0
  292. package/dist/components/ui/field.js +112 -0
  293. package/dist/components/ui/field.js.map +1 -0
  294. package/dist/components/ui/hover-card.d.ts +8 -0
  295. package/dist/components/ui/hover-card.d.ts.map +1 -0
  296. package/dist/components/ui/hover-card.js +38 -0
  297. package/dist/components/ui/hover-card.js.map +1 -0
  298. package/dist/components/ui/input-group.d.ts +21 -0
  299. package/dist/components/ui/input-group.d.ts.map +1 -0
  300. package/dist/components/ui/input-group.js +80 -0
  301. package/dist/components/ui/input-group.js.map +1 -0
  302. package/dist/components/ui/input-otp.d.ts +14 -0
  303. package/dist/components/ui/input-otp.d.ts.map +1 -0
  304. package/dist/components/ui/input-otp.js +49 -0
  305. package/dist/components/ui/input-otp.js.map +1 -0
  306. package/dist/components/ui/input.d.ts +6 -0
  307. package/dist/components/ui/input.d.ts.map +1 -0
  308. package/dist/components/ui/input.js +17 -0
  309. package/dist/components/ui/input.js.map +1 -0
  310. package/dist/components/ui/item.d.ts +25 -0
  311. package/dist/components/ui/item.d.ts.map +1 -0
  312. package/dist/components/ui/item.js +123 -0
  313. package/dist/components/ui/item.js.map +1 -0
  314. package/dist/components/ui/kbd.d.ts +7 -0
  315. package/dist/components/ui/kbd.d.ts.map +1 -0
  316. package/dist/components/ui/kbd.js +22 -0
  317. package/dist/components/ui/kbd.js.map +1 -0
  318. package/dist/components/ui/label.d.ts +6 -0
  319. package/dist/components/ui/label.d.ts.map +1 -0
  320. package/dist/components/ui/label.js +15 -0
  321. package/dist/components/ui/label.js.map +1 -0
  322. package/dist/components/ui/marker.d.ts +13 -0
  323. package/dist/components/ui/marker.d.ts.map +1 -0
  324. package/dist/components/ui/marker.js +45 -0
  325. package/dist/components/ui/marker.js.map +1 -0
  326. package/dist/components/ui/menubar.d.ts +32 -0
  327. package/dist/components/ui/menubar.d.ts.map +1 -0
  328. package/dist/components/ui/menubar.js +137 -0
  329. package/dist/components/ui/menubar.js.map +1 -0
  330. package/dist/components/ui/message-scroller.d.ts +13 -0
  331. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  332. package/dist/components/ui/message-scroller.js +62 -0
  333. package/dist/components/ui/message-scroller.js.map +1 -0
  334. package/dist/components/ui/message.d.ts +13 -0
  335. package/dist/components/ui/message.d.ts.map +1 -0
  336. package/dist/components/ui/message.js +51 -0
  337. package/dist/components/ui/message.js.map +1 -0
  338. package/dist/components/ui/native-select.d.ts +11 -0
  339. package/dist/components/ui/native-select.d.ts.map +1 -0
  340. package/dist/components/ui/native-select.js +40 -0
  341. package/dist/components/ui/native-select.js.map +1 -0
  342. package/dist/components/ui/navigation-menu.d.ts +15 -0
  343. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  344. package/dist/components/ui/navigation-menu.js +85 -0
  345. package/dist/components/ui/navigation-menu.js.map +1 -0
  346. package/dist/components/ui/pagination.d.ts +20 -0
  347. package/dist/components/ui/pagination.d.ts.map +1 -0
  348. package/dist/components/ui/pagination.js +81 -0
  349. package/dist/components/ui/pagination.js.map +1 -0
  350. package/dist/components/ui/popover.d.ts +12 -0
  351. package/dist/components/ui/popover.d.ts.map +1 -0
  352. package/dist/components/ui/popover.js +56 -0
  353. package/dist/components/ui/popover.js.map +1 -0
  354. package/dist/components/ui/progress.d.ts +10 -0
  355. package/dist/components/ui/progress.d.ts.map +1 -0
  356. package/dist/components/ui/progress.js +46 -0
  357. package/dist/components/ui/progress.js.map +1 -0
  358. package/dist/components/ui/radio-group.d.ts +8 -0
  359. package/dist/components/ui/radio-group.d.ts.map +1 -0
  360. package/dist/components/ui/radio-group.js +29 -0
  361. package/dist/components/ui/radio-group.js.map +1 -0
  362. package/dist/components/ui/resizable.d.ts +10 -0
  363. package/dist/components/ui/resizable.d.ts.map +1 -0
  364. package/dist/components/ui/resizable.js +30 -0
  365. package/dist/components/ui/resizable.js.map +1 -0
  366. package/dist/components/ui/scroll-area.d.ts +7 -0
  367. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  368. package/dist/components/ui/scroll-area.js +38 -0
  369. package/dist/components/ui/scroll-area.js.map +1 -0
  370. package/dist/components/ui/select.d.ts +18 -0
  371. package/dist/components/ui/select.d.ts.map +1 -0
  372. package/dist/components/ui/select.js +99 -0
  373. package/dist/components/ui/select.js.map +1 -0
  374. package/dist/components/ui/separator.d.ts +6 -0
  375. package/dist/components/ui/separator.d.ts.map +1 -0
  376. package/dist/components/ui/separator.js +17 -0
  377. package/dist/components/ui/separator.js.map +1 -0
  378. package/dist/components/ui/sheet.d.ts +17 -0
  379. package/dist/components/ui/sheet.d.ts.map +1 -0
  380. package/dist/components/ui/sheet.js +90 -0
  381. package/dist/components/ui/sheet.js.map +1 -0
  382. package/dist/components/ui/sidebar.d.ts +66 -0
  383. package/dist/components/ui/sidebar.d.ts.map +1 -0
  384. package/dist/components/ui/sidebar.js +383 -0
  385. package/dist/components/ui/sidebar.js.map +1 -0
  386. package/dist/components/ui/skeleton.d.ts +6 -0
  387. package/dist/components/ui/skeleton.d.ts.map +1 -0
  388. package/dist/components/ui/skeleton.js +15 -0
  389. package/dist/components/ui/skeleton.js.map +1 -0
  390. package/dist/components/ui/slider.d.ts +6 -0
  391. package/dist/components/ui/slider.d.ts.map +1 -0
  392. package/dist/components/ui/slider.js +36 -0
  393. package/dist/components/ui/slider.js.map +1 -0
  394. package/dist/components/ui/sonner.d.ts +7 -0
  395. package/dist/components/ui/sonner.d.ts.map +1 -0
  396. package/dist/components/ui/sonner.js +32 -0
  397. package/dist/components/ui/sonner.js.map +1 -0
  398. package/dist/components/ui/spinner.d.ts +6 -0
  399. package/dist/components/ui/spinner.d.ts.map +1 -0
  400. package/dist/components/ui/spinner.js +18 -0
  401. package/dist/components/ui/spinner.js.map +1 -0
  402. package/dist/components/ui/switch.d.ts +8 -0
  403. package/dist/components/ui/switch.d.ts.map +1 -0
  404. package/dist/components/ui/switch.js +21 -0
  405. package/dist/components/ui/switch.js.map +1 -0
  406. package/dist/components/ui/table.d.ts +13 -0
  407. package/dist/components/ui/table.d.ts.map +1 -0
  408. package/dist/components/ui/table.js +68 -0
  409. package/dist/components/ui/table.js.map +1 -0
  410. package/dist/components/ui/tabs.d.ts +13 -0
  411. package/dist/components/ui/tabs.d.ts.map +1 -0
  412. package/dist/components/ui/tabs.js +47 -0
  413. package/dist/components/ui/tabs.js.map +1 -0
  414. package/dist/components/ui/textarea.d.ts +6 -0
  415. package/dist/components/ui/textarea.d.ts.map +1 -0
  416. package/dist/components/ui/textarea.js +15 -0
  417. package/dist/components/ui/textarea.js.map +1 -0
  418. package/dist/components/ui/toggle-group.d.ts +14 -0
  419. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  420. package/dist/components/ui/toggle-group.js +54 -0
  421. package/dist/components/ui/toggle-group.js.map +1 -0
  422. package/dist/components/ui/toggle.d.ts +11 -0
  423. package/dist/components/ui/toggle.d.ts.map +1 -0
  424. package/dist/components/ui/toggle.js +38 -0
  425. package/dist/components/ui/toggle.js.map +1 -0
  426. package/dist/components/ui/tooltip.d.ts +9 -0
  427. package/dist/components/ui/tooltip.d.ts.map +1 -0
  428. package/dist/components/ui/tooltip.js +43 -0
  429. package/dist/components/ui/tooltip.js.map +1 -0
  430. package/dist/hooks/use-body-classes.d.ts +27 -0
  431. package/dist/hooks/use-body-classes.d.ts.map +1 -0
  432. package/dist/hooks/use-body-classes.js +52 -0
  433. package/dist/hooks/use-body-classes.js.map +1 -0
  434. package/dist/hooks/use-copy-to-clipboard.d.ts +43 -0
  435. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  436. package/dist/hooks/use-copy-to-clipboard.js +69 -0
  437. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  438. package/dist/hooks/use-file-upload.d.ts +49 -0
  439. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  440. package/dist/hooks/use-file-upload.js +227 -0
  441. package/dist/hooks/use-file-upload.js.map +1 -0
  442. package/dist/hooks/use-hydrated.d.ts +37 -0
  443. package/dist/hooks/use-hydrated.d.ts.map +1 -0
  444. package/dist/hooks/use-hydrated.js +50 -0
  445. package/dist/hooks/use-hydrated.js.map +1 -0
  446. package/dist/hooks/use-intersection-observer.d.ts +55 -0
  447. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  448. package/dist/hooks/use-intersection-observer.js +144 -0
  449. package/dist/hooks/use-intersection-observer.js.map +1 -0
  450. package/dist/hooks/use-is-mac.d.ts +28 -0
  451. package/dist/hooks/use-is-mac.d.ts.map +1 -0
  452. package/dist/hooks/use-is-mac.js +38 -0
  453. package/dist/hooks/use-is-mac.js.map +1 -0
  454. package/dist/hooks/use-media-query.d.ts +44 -0
  455. package/dist/hooks/use-media-query.d.ts.map +1 -0
  456. package/dist/hooks/use-media-query.js +58 -0
  457. package/dist/hooks/use-media-query.js.map +1 -0
  458. package/dist/hooks/use-meta-color.d.ts +78 -0
  459. package/dist/hooks/use-meta-color.d.ts.map +1 -0
  460. package/dist/hooks/use-meta-color.js +138 -0
  461. package/dist/hooks/use-meta-color.js.map +1 -0
  462. package/dist/hooks/use-mobile.d.ts +5 -0
  463. package/dist/hooks/use-mobile.d.ts.map +1 -0
  464. package/dist/hooks/use-mobile.js +21 -0
  465. package/dist/hooks/use-mobile.js.map +1 -0
  466. package/dist/hooks/use-mutation-observer.d.ts +61 -0
  467. package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
  468. package/dist/hooks/use-mutation-observer.js +96 -0
  469. package/dist/hooks/use-mutation-observer.js.map +1 -0
  470. package/dist/hooks/use-scroll-position.d.ts +76 -0
  471. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  472. package/dist/hooks/use-scroll-position.js +97 -0
  473. package/dist/hooks/use-scroll-position.js.map +1 -0
  474. package/dist/hooks/use-slider-input.d.ts +94 -0
  475. package/dist/hooks/use-slider-input.d.ts.map +1 -0
  476. package/dist/hooks/use-slider-input.js +116 -0
  477. package/dist/hooks/use-slider-input.js.map +1 -0
  478. package/dist/hooks/use-viewport.d.ts +72 -0
  479. package/dist/hooks/use-viewport.d.ts.map +1 -0
  480. package/dist/hooks/use-viewport.js +91 -0
  481. package/dist/hooks/use-viewport.js.map +1 -0
  482. package/dist/style.css +0 -247
  483. package/dist/theme.css +244 -0
  484. package/dist/theme.css.d.ts +3 -0
  485. package/package.json +42 -40
  486. package/dist/hooks.d.ts +0 -957
  487. package/dist/hooks.d.ts.map +0 -1
  488. package/dist/hooks.js +0 -1391
  489. package/dist/hooks.js.map +0 -1
  490. package/dist/index.d.ts +0 -1993
  491. package/dist/index.d.ts.map +0 -1
  492. package/dist/index.js +0 -10647
  493. package/dist/index.js.map +0 -1
  494. package/dist/source.css +0 -1
  495. package/dist/source.css.d.ts +0 -3
  496. package/dist/use-is-mobile-Dln4-L1O.js +0 -210
  497. package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
@@ -0,0 +1,144 @@
1
+ "use client";
2
+ import * as React$1 from "react";
3
+ //#region src/hooks/use-intersection-observer.ts
4
+ /**
5
+ * Intersection observer hook for React components
6
+ * Efficiently observes visibility of DOM elements using a shared IntersectionObserver instance.
7
+ * Ideal for lazy loading, infinite scrolling, and animating elements when they enter the viewport.
8
+ */
9
+ /**
10
+ * A shared intersection observer to manage multiple targets with a single observer instance.
11
+ * Optimized for high-density lists (like the patterns grid).
12
+ */
13
+ var SharedObserver = class {
14
+ observer = null;
15
+ callbacks = /* @__PURE__ */ new Map();
16
+ options;
17
+ constructor(options) {
18
+ this.options = options;
19
+ }
20
+ getObserver() {
21
+ if (!this.observer) this.observer = new IntersectionObserver((entries) => {
22
+ entries.forEach((entry) => {
23
+ const callback = this.callbacks.get(entry.target);
24
+ if (callback) callback(entry.isIntersecting);
25
+ });
26
+ }, this.options);
27
+ return this.observer;
28
+ }
29
+ observe(element, callback) {
30
+ this.callbacks.set(element, callback);
31
+ this.getObserver().observe(element);
32
+ }
33
+ unobserve(element) {
34
+ this.callbacks.delete(element);
35
+ this.observer?.unobserve(element);
36
+ }
37
+ get size() {
38
+ return this.callbacks.size;
39
+ }
40
+ disconnect() {
41
+ this.observer?.disconnect();
42
+ this.callbacks.clear();
43
+ this.observer = null;
44
+ }
45
+ };
46
+ const observers = /* @__PURE__ */ new Map();
47
+ const rootIds = /* @__PURE__ */ new WeakMap();
48
+ let rootId = 0;
49
+ function getRootKey(root) {
50
+ if (!root) return "null";
51
+ if (!rootIds.has(root)) rootIds.set(root, ++rootId);
52
+ return rootIds.get(root);
53
+ }
54
+ /**
55
+ * Get or create a shared `IntersectionObserver` instance based on the provided options.
56
+ *
57
+ * Using a shared observer reduces the number of underlying `IntersectionObserver`
58
+ * instances created by the browser, which is especially beneficial for pages
59
+ * with many observed elements.
60
+ *
61
+ * @param options - Intersection observer configuration (threshold, root, rootMargin)
62
+ * @returns A shared `SharedObserver` instance for the given options
63
+ */
64
+ function getSharedObserver(options) {
65
+ const threshold = Array.isArray(options.threshold) ? options.threshold.join(",") : options.threshold ?? 0;
66
+ const key = `${getRootKey(options.root)}|${options.rootMargin ?? "0px"}|${threshold}`;
67
+ if (!observers.has(key)) observers.set(key, new SharedObserver(options));
68
+ return {
69
+ key,
70
+ observer: observers.get(key)
71
+ };
72
+ }
73
+ /**
74
+ * React hook that tracks whether a DOM element is currently intersecting the viewport.
75
+ *
76
+ * Features:
77
+ * - Uses a shared `IntersectionObserver` instance for better performance.
78
+ * - Supports custom `threshold`, `root`, and `rootMargin` options.
79
+ * - Optional `freezeOnceVisible` flag to stop observing after first intersection.
80
+ *
81
+ * @param elementRef - React ref pointing to the DOM element to observe.
82
+ * @param options - Optional observer configuration and behavior flags.
83
+ * @param options.threshold - Intersection threshold(s) for triggering visibility changes.
84
+ * @param options.root - Scrollable ancestor element to use as the viewport (defaults to browser viewport).
85
+ * @param options.rootMargin - Margin around the root, expressed in CSS units (e.g. `"0px 0px -20% 0px"`).
86
+ * @param options.freezeOnceVisible - When `true`, stops observing after the element first becomes visible.
87
+ *
88
+ * @returns `true` when the element is intersecting based on the given options, otherwise `false`.
89
+ *
90
+ * @example
91
+ * ```tsx
92
+ * const ref = React.useRef<HTMLDivElement | null>(null);
93
+ * const isVisible = useIntersectionObserver(ref, {
94
+ * threshold: 0.2,
95
+ * rootMargin: "0px 0px -10% 0px",
96
+ * freezeOnceVisible: true,
97
+ * });
98
+ *
99
+ * return (
100
+ * <div ref={ref} className={isVisible ? "animate-in" : "opacity-0"}>
101
+ * I will animate when I enter the viewport.
102
+ * </div>
103
+ * );
104
+ * ```
105
+ */
106
+ function useIntersectionObserver(elementRef, { threshold = 0, root = null, rootMargin = "0%", freezeOnceVisible = false } = {}) {
107
+ const [isIntersecting, setIntersecting] = React$1.useState(false);
108
+ const frozen = React$1.useRef(false);
109
+ React$1.useEffect(() => {
110
+ const element = elementRef?.current;
111
+ if (!element || freezeOnceVisible && frozen.current) return;
112
+ if (typeof IntersectionObserver === "undefined") return;
113
+ const { key, observer } = getSharedObserver({
114
+ threshold,
115
+ root,
116
+ rootMargin
117
+ });
118
+ observer.observe(element, (intersecting) => {
119
+ setIntersecting(intersecting);
120
+ if (intersecting && freezeOnceVisible) {
121
+ frozen.current = true;
122
+ observer.unobserve(element);
123
+ }
124
+ });
125
+ return () => {
126
+ observer.unobserve(element);
127
+ if (observer.size === 0) {
128
+ observer.disconnect();
129
+ observers.delete(key);
130
+ }
131
+ };
132
+ }, [
133
+ elementRef,
134
+ threshold,
135
+ root,
136
+ rootMargin,
137
+ freezeOnceVisible
138
+ ]);
139
+ return isIntersecting;
140
+ }
141
+ //#endregion
142
+ export { useIntersectionObserver };
143
+
144
+ //# sourceMappingURL=use-intersection-observer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-intersection-observer.js","names":["React"],"sources":["../../src/hooks/use-intersection-observer.ts"],"sourcesContent":["/**\n * Intersection observer hook for React components\n * Efficiently observes visibility of DOM elements using a shared IntersectionObserver instance.\n * Ideal for lazy loading, infinite scrolling, and animating elements when they enter the viewport.\n */\n\n\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Configuration options for the `useIntersectionObserver` hook.\n *\n * Extends the native `IntersectionObserverInit` options with an additional\n * convenience flag for freezing the observer state.\n */\ninterface IntersectionObserverOptions extends IntersectionObserverInit {\n /**\n * When `true`, the hook stops observing once the element becomes visible\n * and keeps returning `true` for subsequent renders.\n *\n * This is useful for one-time animations or lazy loading where you only\n * care about the first time an element enters the viewport.\n */\n freezeOnceVisible?: boolean;\n}\n\n/**\n * A shared intersection observer to manage multiple targets with a single observer instance.\n * Optimized for high-density lists (like the patterns grid).\n */\nclass SharedObserver {\n private observer: IntersectionObserver | null = null;\n private callbacks = new Map<Element, (isIntersecting: boolean) => void>();\n private options: IntersectionObserverInit;\n\n constructor(options: IntersectionObserverInit) {\n this.options = options;\n }\n\n private getObserver() {\n if (!this.observer) {\n this.observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n const callback = this.callbacks.get(entry.target);\n if (callback) {\n callback(entry.isIntersecting);\n }\n });\n }, this.options);\n }\n return this.observer;\n }\n\n observe(element: Element, callback: (isIntersecting: boolean) => void) {\n this.callbacks.set(element, callback);\n this.getObserver().observe(element);\n }\n\n unobserve(element: Element) {\n this.callbacks.delete(element);\n this.observer?.unobserve(element);\n }\n\n get size() {\n return this.callbacks.size;\n }\n\n disconnect() {\n this.observer?.disconnect();\n this.callbacks.clear();\n this.observer = null;\n }\n}\n\n// Singleton instances for common observer options to maximize reuse.\nconst observers = new Map<string, SharedObserver>();\nconst rootIds = new WeakMap<Element, number>();\nlet rootId = 0;\n\nfunction getRootKey(root: Element | Document | null | undefined) {\n if (!root) return \"null\";\n if (!rootIds.has(root as Element)) {\n rootIds.set(root as Element, ++rootId);\n }\n return rootIds.get(root as Element);\n}\n\n/**\n * Get or create a shared `IntersectionObserver` instance based on the provided options.\n *\n * Using a shared observer reduces the number of underlying `IntersectionObserver`\n * instances created by the browser, which is especially beneficial for pages\n * with many observed elements.\n *\n * @param options - Intersection observer configuration (threshold, root, rootMargin)\n * @returns A shared `SharedObserver` instance for the given options\n */\nfunction getSharedObserver(options: IntersectionObserverInit) {\n const threshold = Array.isArray(options.threshold)\n ? options.threshold.join(\",\")\n : (options.threshold ?? 0);\n const key = `${getRootKey(options.root)}|${options.rootMargin ?? \"0px\"}|${threshold}`;\n if (!observers.has(key)) {\n observers.set(key, new SharedObserver(options));\n }\n return { key, observer: observers.get(key)! };\n}\n\n/**\n * React hook that tracks whether a DOM element is currently intersecting the viewport.\n *\n * Features:\n * - Uses a shared `IntersectionObserver` instance for better performance.\n * - Supports custom `threshold`, `root`, and `rootMargin` options.\n * - Optional `freezeOnceVisible` flag to stop observing after first intersection.\n *\n * @param elementRef - React ref pointing to the DOM element to observe.\n * @param options - Optional observer configuration and behavior flags.\n * @param options.threshold - Intersection threshold(s) for triggering visibility changes.\n * @param options.root - Scrollable ancestor element to use as the viewport (defaults to browser viewport).\n * @param options.rootMargin - Margin around the root, expressed in CSS units (e.g. `\"0px 0px -20% 0px\"`).\n * @param options.freezeOnceVisible - When `true`, stops observing after the element first becomes visible.\n *\n * @returns `true` when the element is intersecting based on the given options, otherwise `false`.\n *\n * @example\n * ```tsx\n * const ref = React.useRef<HTMLDivElement | null>(null);\n * const isVisible = useIntersectionObserver(ref, {\n * threshold: 0.2,\n * rootMargin: \"0px 0px -10% 0px\",\n * freezeOnceVisible: true,\n * });\n *\n * return (\n * <div ref={ref} className={isVisible ? \"animate-in\" : \"opacity-0\"}>\n * I will animate when I enter the viewport.\n * </div>\n * );\n * ```\n */\nexport function useIntersectionObserver(\n elementRef: React.RefObject<Element | null>,\n {\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n }: IntersectionObserverOptions = {},\n): boolean {\n const [isIntersecting, setIntersecting] = React.useState(false);\n const frozen = React.useRef(false);\n\n React.useEffect(() => {\n const element = elementRef?.current;\n if (!element || (freezeOnceVisible && frozen.current)) return;\n if (typeof IntersectionObserver === \"undefined\") return;\n\n const { key, observer } = getSharedObserver({ threshold, root, rootMargin });\n\n observer.observe(element, (intersecting) => {\n setIntersecting(intersecting);\n if (intersecting && freezeOnceVisible) {\n frozen.current = true;\n observer.unobserve(element);\n }\n });\n\n return () => {\n observer.unobserve(element);\n if (observer.size === 0) {\n observer.disconnect();\n observers.delete(key);\n }\n };\n }, [elementRef, threshold, root, rootMargin, freezeOnceVisible]);\n\n return isIntersecting;\n}\n"],"mappings":";;;;;;;;;;;;AA+BA,IAAM,iBAAN,MAAqB;CACnB,WAAgD;CAChD,4BAAoB,IAAI,IAAgD;CACxE;CAEA,YAAY,SAAmC;EAC7C,KAAK,UAAU;CACjB;CAEA,cAAsB;EACpB,IAAI,CAAC,KAAK,UACR,KAAK,WAAW,IAAI,sBAAsB,YAAY;GACpD,QAAQ,SAAS,UAAU;IACzB,MAAM,WAAW,KAAK,UAAU,IAAI,MAAM,MAAM;IAChD,IAAI,UACF,SAAS,MAAM,cAAc;GAEjC,CAAC;EACH,GAAG,KAAK,OAAO;EAEjB,OAAO,KAAK;CACd;CAEA,QAAQ,SAAkB,UAA6C;EACrE,KAAK,UAAU,IAAI,SAAS,QAAQ;EACpC,KAAK,YAAY,CAAC,CAAC,QAAQ,OAAO;CACpC;CAEA,UAAU,SAAkB;EAC1B,KAAK,UAAU,OAAO,OAAO;EAC7B,KAAK,UAAU,UAAU,OAAO;CAClC;CAEA,IAAI,OAAO;EACT,OAAO,KAAK,UAAU;CACxB;CAEA,aAAa;EACX,KAAK,UAAU,WAAW;EAC1B,KAAK,UAAU,MAAM;EACrB,KAAK,WAAW;CAClB;AACF;AAGA,MAAM,4BAAY,IAAI,IAA4B;AAClD,MAAM,0BAAU,IAAI,QAAyB;AAC7C,IAAI,SAAS;AAEb,SAAS,WAAW,MAA6C;CAC/D,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,CAAC,QAAQ,IAAI,IAAe,GAC9B,QAAQ,IAAI,MAAiB,EAAE,MAAM;CAEvC,OAAO,QAAQ,IAAI,IAAe;AACpC;;;;;;;;;;;AAYA,SAAS,kBAAkB,SAAmC;CAC5D,MAAM,YAAY,MAAM,QAAQ,QAAQ,SAAS,IAC7C,QAAQ,UAAU,KAAK,GAAG,IACzB,QAAQ,aAAa;CAC1B,MAAM,MAAM,GAAG,WAAW,QAAQ,IAAI,EAAE,GAAG,QAAQ,cAAc,MAAM,GAAG;CAC1E,IAAI,CAAC,UAAU,IAAI,GAAG,GACpB,UAAU,IAAI,KAAK,IAAI,eAAe,OAAO,CAAC;CAEhD,OAAO;EAAE;EAAK,UAAU,UAAU,IAAI,GAAG;CAAG;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,wBACd,YACA,EACE,YAAY,GACZ,OAAO,MACP,aAAa,MACb,oBAAoB,UACW,CAAC,GACzB;CACT,MAAM,CAAC,gBAAgB,mBAAmBA,QAAM,SAAS,KAAK;CAC9D,MAAM,SAASA,QAAM,OAAO,KAAK;CAEjC,QAAM,gBAAgB;EACpB,MAAM,UAAU,YAAY;EAC5B,IAAI,CAAC,WAAY,qBAAqB,OAAO,SAAU;EACvD,IAAI,OAAO,yBAAyB,aAAa;EAEjD,MAAM,EAAE,KAAK,aAAa,kBAAkB;GAAE;GAAW;GAAM;EAAW,CAAC;EAE3E,SAAS,QAAQ,UAAU,iBAAiB;GAC1C,gBAAgB,YAAY;GAC5B,IAAI,gBAAgB,mBAAmB;IACrC,OAAO,UAAU;IACjB,SAAS,UAAU,OAAO;GAC5B;EACF,CAAC;EAED,aAAa;GACX,SAAS,UAAU,OAAO;GAC1B,IAAI,SAAS,SAAS,GAAG;IACvB,SAAS,WAAW;IACpB,UAAU,OAAO,GAAG;GACtB;EACF;CACF,GAAG;EAAC;EAAY;EAAW;EAAM;EAAY;CAAiB,CAAC;CAE/D,OAAO;AACT"}
@@ -0,0 +1,28 @@
1
+ //#region src/hooks/use-is-mac.d.ts
2
+ /**
3
+ * Platform detection hook for React components
4
+ * Determines whether the current user agent is running on a macOS device.
5
+ * Useful for rendering platform-specific keyboard shortcuts or UI variations.
6
+ */
7
+ /**
8
+ * React hook that returns whether the current browser reports a macOS platform.
9
+ * It prefers `navigator.userAgentData.platform` when available and falls back
10
+ * to `navigator.userAgent`.
11
+ *
12
+ * @returns `true` if the current platform is macOS, otherwise `false`.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * const isMac = useIsMac();
17
+ *
18
+ * return (
19
+ * <kbd>
20
+ * {isMac ? "⌘" : "Ctrl"} + K
21
+ * </kbd>
22
+ * );
23
+ * ```
24
+ */
25
+ declare function useIsMac(): boolean;
26
+ //#endregion
27
+ export { useIsMac };
28
+ //# sourceMappingURL=use-is-mac.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-mac.d.ts","names":[],"sources":["../../src/hooks/use-is-mac.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBA4BgB"}
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ //#region src/hooks/use-is-mac.ts
4
+ /**
5
+ * Platform detection hook for React components
6
+ * Determines whether the current user agent is running on a macOS device.
7
+ * Useful for rendering platform-specific keyboard shortcuts or UI variations.
8
+ */
9
+ /**
10
+ * React hook that returns whether the current browser reports a macOS platform.
11
+ * It prefers `navigator.userAgentData.platform` when available and falls back
12
+ * to `navigator.userAgent`.
13
+ *
14
+ * @returns `true` if the current platform is macOS, otherwise `false`.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const isMac = useIsMac();
19
+ *
20
+ * return (
21
+ * <kbd>
22
+ * {isMac ? "⌘" : "Ctrl"} + K
23
+ * </kbd>
24
+ * );
25
+ * ```
26
+ */
27
+ function useIsMac() {
28
+ const [isMac, setIsMac] = useState(false);
29
+ useEffect(() => {
30
+ const platform = navigator.userAgentData?.platform ?? navigator.userAgent ?? "";
31
+ setIsMac(platform.toUpperCase().includes("MAC"));
32
+ }, []);
33
+ return isMac;
34
+ }
35
+ //#endregion
36
+ export { useIsMac };
37
+
38
+ //# sourceMappingURL=use-is-mac.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-mac.js","names":[],"sources":["../../src/hooks/use-is-mac.ts"],"sourcesContent":["/**\n * Platform detection hook for React components\n * Determines whether the current user agent is running on a macOS device.\n * Useful for rendering platform-specific keyboard shortcuts or UI variations.\n */\n\n\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\n/**\n * React hook that returns whether the current browser reports a macOS platform.\n * It prefers `navigator.userAgentData.platform` when available and falls back\n * to `navigator.userAgent`.\n *\n * @returns `true` if the current platform is macOS, otherwise `false`.\n *\n * @example\n * ```tsx\n * const isMac = useIsMac();\n *\n * return (\n * <kbd>\n * {isMac ? \"⌘\" : \"Ctrl\"} + K\n * </kbd>\n * );\n * ```\n */\nexport function useIsMac() {\n const [isMac, setIsMac] = useState(false);\n\n useEffect(() => {\n const platform =\n (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData\n ?.platform ??\n navigator.userAgent ??\n \"\";\n setIsMac(platform.toUpperCase().includes(\"MAC\"));\n }, []);\n\n return isMac;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,WAAW;CACzB,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CAExC,gBAAgB;EACd,MAAM,WACH,UAAoE,eACjE,YACJ,UAAU,aACV;EACF,SAAS,SAAS,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC;CACjD,GAAG,CAAC,CAAC;CAEL,OAAO;AACT"}
@@ -0,0 +1,44 @@
1
+ //#region src/hooks/use-media-query.d.ts
2
+ /**
3
+ * Media query hook for responsive React components
4
+ * Provides real-time tracking of CSS media query matches
5
+ * with SSR-safe implementation and automatic cleanup
6
+ */
7
+ /**
8
+ * Hook for tracking CSS media query matches in React components
9
+ *
10
+ * Features:
11
+ * - Real-time updates when media query state changes
12
+ * - SSR-safe implementation
13
+ * - Automatic event listener cleanup
14
+ * - Supports all standard CSS media queries
15
+ *
16
+ * @param query - CSS media query string (e.g., '(min-width: 768px)')
17
+ * @returns Boolean indicating whether the media query currently matches
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Basic responsive behavior
22
+ * const isMobile = useMediaQuery('(max-width: 768px)');
23
+ * const isTablet = useMediaQuery('(min-width: 769px) and (max-width: 1024px)');
24
+ * const isDesktop = useMediaQuery('(min-width: 1025px)');
25
+ *
26
+ * // Dark mode preference
27
+ * const prefersDark = useMediaQuery('(prefers-color-scheme: dark)');
28
+ *
29
+ * // Reduced motion preference
30
+ * const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
31
+ *
32
+ * return (
33
+ * <div>
34
+ * {isMobile && <MobileLayout />}
35
+ * {isTablet && <TabletLayout />}
36
+ * {isDesktop && <DesktopLayout />}
37
+ * </div>
38
+ * );
39
+ * ```
40
+ */
41
+ declare const useMediaQuery: (query: string) => boolean;
42
+ //#endregion
43
+ export { useMediaQuery };
44
+ //# sourceMappingURL=use-media-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-media-query.d.ts","names":[],"sources":["../../src/hooks/use-media-query.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4Ca,gBAAiB"}
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { useCallback, useSyncExternalStore } from "react";
3
+ //#region src/hooks/use-media-query.ts
4
+ /**
5
+ * Media query hook for responsive React components
6
+ * Provides real-time tracking of CSS media query matches
7
+ * with SSR-safe implementation and automatic cleanup
8
+ */
9
+ /**
10
+ * Hook for tracking CSS media query matches in React components
11
+ *
12
+ * Features:
13
+ * - Real-time updates when media query state changes
14
+ * - SSR-safe implementation
15
+ * - Automatic event listener cleanup
16
+ * - Supports all standard CSS media queries
17
+ *
18
+ * @param query - CSS media query string (e.g., '(min-width: 768px)')
19
+ * @returns Boolean indicating whether the media query currently matches
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * // Basic responsive behavior
24
+ * const isMobile = useMediaQuery('(max-width: 768px)');
25
+ * const isTablet = useMediaQuery('(min-width: 769px) and (max-width: 1024px)');
26
+ * const isDesktop = useMediaQuery('(min-width: 1025px)');
27
+ *
28
+ * // Dark mode preference
29
+ * const prefersDark = useMediaQuery('(prefers-color-scheme: dark)');
30
+ *
31
+ * // Reduced motion preference
32
+ * const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
33
+ *
34
+ * return (
35
+ * <div>
36
+ * {isMobile && <MobileLayout />}
37
+ * {isTablet && <TabletLayout />}
38
+ * {isDesktop && <DesktopLayout />}
39
+ * </div>
40
+ * );
41
+ * ```
42
+ */
43
+ const useMediaQuery = (query) => {
44
+ const subscribe = useCallback((onChange) => {
45
+ const matchMedia = window.matchMedia(query);
46
+ matchMedia.addEventListener("change", onChange);
47
+ return () => {
48
+ matchMedia.removeEventListener("change", onChange);
49
+ };
50
+ }, [query]);
51
+ const getSnapshot = useCallback(() => window.matchMedia(query).matches, [query]);
52
+ const getServerSnapshot = () => false;
53
+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
54
+ };
55
+ //#endregion
56
+ export { useMediaQuery };
57
+
58
+ //# sourceMappingURL=use-media-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-media-query.js","names":[],"sources":["../../src/hooks/use-media-query.ts"],"sourcesContent":["/**\n * Media query hook for responsive React components\n * Provides real-time tracking of CSS media query matches\n * with SSR-safe implementation and automatic cleanup\n */\n\n\"use client\";\n\nimport { useCallback, useSyncExternalStore } from \"react\";\n\n/**\n * Hook for tracking CSS media query matches in React components\n *\n * Features:\n * - Real-time updates when media query state changes\n * - SSR-safe implementation\n * - Automatic event listener cleanup\n * - Supports all standard CSS media queries\n *\n * @param query - CSS media query string (e.g., '(min-width: 768px)')\n * @returns Boolean indicating whether the media query currently matches\n *\n * @example\n * ```tsx\n * // Basic responsive behavior\n * const isMobile = useMediaQuery('(max-width: 768px)');\n * const isTablet = useMediaQuery('(min-width: 769px) and (max-width: 1024px)');\n * const isDesktop = useMediaQuery('(min-width: 1025px)');\n *\n * // Dark mode preference\n * const prefersDark = useMediaQuery('(prefers-color-scheme: dark)');\n *\n * // Reduced motion preference\n * const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n *\n * return (\n * <div>\n * {isMobile && <MobileLayout />}\n * {isTablet && <TabletLayout />}\n * {isDesktop && <DesktopLayout />}\n * </div>\n * );\n * ```\n */\nexport const useMediaQuery = (query: string): boolean => {\n // Subscribe to media query changes and clean up automatically\n const subscribe = useCallback(\n (onChange: () => void) => {\n const matchMedia = window.matchMedia(query);\n matchMedia.addEventListener(\"change\", onChange);\n return () => {\n matchMedia.removeEventListener(\"change\", onChange);\n };\n },\n [query],\n );\n\n // Read the current match status on the client\n const getSnapshot = useCallback(() => window.matchMedia(query).matches, [query]);\n\n // Always report false during SSR to avoid hydration mismatches\n const getServerSnapshot = () => false;\n\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,iBAAiB,UAA2B;CAEvD,MAAM,YAAY,aACf,aAAyB;EACxB,MAAM,aAAa,OAAO,WAAW,KAAK;EAC1C,WAAW,iBAAiB,UAAU,QAAQ;EAC9C,aAAa;GACX,WAAW,oBAAoB,UAAU,QAAQ;EACnD;CACF,GACA,CAAC,KAAK,CACR;CAGA,MAAM,cAAc,kBAAkB,OAAO,WAAW,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC;CAG/E,MAAM,0BAA0B;CAEhC,OAAO,qBAAqB,WAAW,aAAa,iBAAiB;AACvE"}
@@ -0,0 +1,78 @@
1
+ import { META_THEME_COLORS } from "@kumix/utils";
2
+ //#region src/hooks/use-meta-color.d.ts
3
+ /**
4
+ * Calculates and applies the HTML `theme-color` meta tag from `next-themes`.
5
+ * The returned setter can be used for temporary manual overrides.
6
+ *
7
+ * @param defaultColors - Optional custom color configuration (defaults to META_THEME_COLORS)
8
+ * @returns Object containing current meta color and setter function.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * // Basic usage with default colors (supports light, dark, and system)
13
+ * function App() {
14
+ * const { metaColor, setMetaColor } = useMetaColor();
15
+ *
16
+ * // metaColor automatically updates based on theme (light/dark/system)
17
+ * useEffect(() => {
18
+ * console.log('Current meta color:', metaColor);
19
+ * }, [metaColor]);
20
+ *
21
+ * return <div>App content</div>;
22
+ * }
23
+ *
24
+ * // Custom colors with system theme support
25
+ * function CustomThemeApp() {
26
+ * const customColors = {
27
+ * light: '#f0f0f0',
28
+ * dark: '#1a1a1a',
29
+ * system: 'auto' // Will resolve to light or dark based on OS preference
30
+ * };
31
+ * const { metaColor } = useMetaColor(customColors);
32
+ *
33
+ * return <div style={{ backgroundColor: metaColor }}>Custom themed app</div>;
34
+ * }
35
+ *
36
+ * // Manual meta color override for special pages
37
+ * function SpecialPage() {
38
+ * const { setMetaColor } = useMetaColor();
39
+ *
40
+ * useEffect(() => {
41
+ * // Override meta color for this page
42
+ * setMetaColor('#ff0000');
43
+ *
44
+ * // Cleanup: reset to theme color when leaving page
45
+ * return () => {
46
+ * setMetaColor(''); // This will revert to theme-based color
47
+ * };
48
+ * }, [setMetaColor]);
49
+ *
50
+ * return <div>Special page with red theme color</div>;
51
+ * }
52
+ *
53
+ * // Integration with theme switcher
54
+ * function ThemeAwareComponent() {
55
+ * const { theme, setTheme } = useTheme();
56
+ * const { metaColor } = useMetaColor();
57
+ *
58
+ * return (
59
+ * <div>
60
+ * <p>Current theme: {theme}</p>
61
+ * <p>Meta color: {metaColor}</p>
62
+ * <button onClick={() => setTheme('light')}>Light</button>
63
+ * <button onClick={() => setTheme('dark')}>Dark</button>
64
+ * <button onClick={() => setTheme('system')}>System</button>
65
+ * </div>
66
+ * );
67
+ * }
68
+ * ```
69
+ */
70
+ declare function useMetaColor(defaultColors?: typeof META_THEME_COLORS): {
71
+ /** Current meta theme color based on resolved theme */
72
+ metaColor: "#09090b" | "#ffffff";
73
+ /** Function to manually set meta theme color */
74
+ setMetaColor: (color: string) => void;
75
+ };
76
+ //#endregion
77
+ export { useMetaColor };
78
+ //# sourceMappingURL=use-meta-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-meta-color.d.ts","names":[],"sources":["../../src/hooks/use-meta-color.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8EgB,aAAa,uBAAuB;;;;EAqDH,eAAA"}
@@ -0,0 +1,138 @@
1
+ "use client";
2
+ import * as React$1 from "react";
3
+ import { META_THEME_COLORS, THEME_MODES } from "@kumix/utils";
4
+ import { useTheme } from "next-themes";
5
+ //#region src/hooks/use-meta-color.ts
6
+ /**
7
+ * Meta theme color management hook for React components.
8
+ */
9
+ /**
10
+ * Calculates and applies the HTML `theme-color` meta tag from `next-themes`.
11
+ * The returned setter can be used for temporary manual overrides.
12
+ *
13
+ * @param defaultColors - Optional custom color configuration (defaults to META_THEME_COLORS)
14
+ * @returns Object containing current meta color and setter function.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // Basic usage with default colors (supports light, dark, and system)
19
+ * function App() {
20
+ * const { metaColor, setMetaColor } = useMetaColor();
21
+ *
22
+ * // metaColor automatically updates based on theme (light/dark/system)
23
+ * useEffect(() => {
24
+ * console.log('Current meta color:', metaColor);
25
+ * }, [metaColor]);
26
+ *
27
+ * return <div>App content</div>;
28
+ * }
29
+ *
30
+ * // Custom colors with system theme support
31
+ * function CustomThemeApp() {
32
+ * const customColors = {
33
+ * light: '#f0f0f0',
34
+ * dark: '#1a1a1a',
35
+ * system: 'auto' // Will resolve to light or dark based on OS preference
36
+ * };
37
+ * const { metaColor } = useMetaColor(customColors);
38
+ *
39
+ * return <div style={{ backgroundColor: metaColor }}>Custom themed app</div>;
40
+ * }
41
+ *
42
+ * // Manual meta color override for special pages
43
+ * function SpecialPage() {
44
+ * const { setMetaColor } = useMetaColor();
45
+ *
46
+ * useEffect(() => {
47
+ * // Override meta color for this page
48
+ * setMetaColor('#ff0000');
49
+ *
50
+ * // Cleanup: reset to theme color when leaving page
51
+ * return () => {
52
+ * setMetaColor(''); // This will revert to theme-based color
53
+ * };
54
+ * }, [setMetaColor]);
55
+ *
56
+ * return <div>Special page with red theme color</div>;
57
+ * }
58
+ *
59
+ * // Integration with theme switcher
60
+ * function ThemeAwareComponent() {
61
+ * const { theme, setTheme } = useTheme();
62
+ * const { metaColor } = useMetaColor();
63
+ *
64
+ * return (
65
+ * <div>
66
+ * <p>Current theme: {theme}</p>
67
+ * <p>Meta color: {metaColor}</p>
68
+ * <button onClick={() => setTheme('light')}>Light</button>
69
+ * <button onClick={() => setTheme('dark')}>Dark</button>
70
+ * <button onClick={() => setTheme('system')}>System</button>
71
+ * </div>
72
+ * );
73
+ * }
74
+ * ```
75
+ */
76
+ function useMetaColor(defaultColors) {
77
+ /** Get resolved theme from next-themes */
78
+ const { resolvedTheme } = useTheme();
79
+ /**
80
+ * Helper function to detect system dark mode preference
81
+ */
82
+ const isSystemDarkMode = React$1.useCallback(() => {
83
+ if (typeof window === "undefined") return false;
84
+ return window.matchMedia("(prefers-color-scheme: dark)").matches;
85
+ }, []);
86
+ /**
87
+ * Get effective theme mode (resolves 'system' to actual preference)
88
+ */
89
+ const getEffectiveTheme = React$1.useCallback((theme) => {
90
+ if (theme === THEME_MODES.SYSTEM) return isSystemDarkMode() ? THEME_MODES.DARK : THEME_MODES.LIGHT;
91
+ return theme;
92
+ }, [isSystemDarkMode]);
93
+ /**
94
+ * Calculate appropriate meta color based on current theme
95
+ * Handles light, dark, and system themes properly
96
+ * Memoized to prevent unnecessary recalculations
97
+ */
98
+ const metaColor = React$1.useMemo(() => {
99
+ const colorsToUse = defaultColors ?? META_THEME_COLORS;
100
+ const effectiveTheme = getEffectiveTheme(resolvedTheme);
101
+ if (effectiveTheme === THEME_MODES.DARK) return colorsToUse[THEME_MODES.DARK];
102
+ else if (effectiveTheme === THEME_MODES.LIGHT) return colorsToUse[THEME_MODES.LIGHT];
103
+ return colorsToUse[THEME_MODES.LIGHT];
104
+ }, [
105
+ resolvedTheme,
106
+ defaultColors,
107
+ getEffectiveTheme
108
+ ]);
109
+ /**
110
+ * Manually set meta theme color in the document
111
+ * Useful for temporary color overrides or custom scenarios
112
+ *
113
+ * @param color - Hex color string to set as meta theme color
114
+ */
115
+ const setMetaColor = React$1.useCallback((color) => {
116
+ const metaTag = document.querySelector("meta[name=\"theme-color\"]");
117
+ if (metaTag) metaTag.setAttribute("content", color);
118
+ else {
119
+ const newMetaTag = document.createElement("meta");
120
+ newMetaTag.name = "theme-color";
121
+ newMetaTag.content = color;
122
+ document.head.appendChild(newMetaTag);
123
+ }
124
+ }, []);
125
+ React$1.useEffect(() => {
126
+ setMetaColor(metaColor);
127
+ }, [metaColor, setMetaColor]);
128
+ return {
129
+ /** Current meta theme color based on resolved theme */
130
+ metaColor,
131
+ /** Function to manually set meta theme color */
132
+ setMetaColor
133
+ };
134
+ }
135
+ //#endregion
136
+ export { useMetaColor };
137
+
138
+ //# sourceMappingURL=use-meta-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-meta-color.js","names":["React"],"sources":["../../src/hooks/use-meta-color.ts"],"sourcesContent":["/**\n * Meta theme color management hook for React components.\n */\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { useTheme } from \"next-themes\";\n\nimport { META_THEME_COLORS, THEME_MODES } from \"@kumix/utils\";\n\n/**\n * Calculates and applies the HTML `theme-color` meta tag from `next-themes`.\n * The returned setter can be used for temporary manual overrides.\n *\n * @param defaultColors - Optional custom color configuration (defaults to META_THEME_COLORS)\n * @returns Object containing current meta color and setter function.\n *\n * @example\n * ```tsx\n * // Basic usage with default colors (supports light, dark, and system)\n * function App() {\n * const { metaColor, setMetaColor } = useMetaColor();\n *\n * // metaColor automatically updates based on theme (light/dark/system)\n * useEffect(() => {\n * console.log('Current meta color:', metaColor);\n * }, [metaColor]);\n *\n * return <div>App content</div>;\n * }\n *\n * // Custom colors with system theme support\n * function CustomThemeApp() {\n * const customColors = {\n * light: '#f0f0f0',\n * dark: '#1a1a1a',\n * system: 'auto' // Will resolve to light or dark based on OS preference\n * };\n * const { metaColor } = useMetaColor(customColors);\n *\n * return <div style={{ backgroundColor: metaColor }}>Custom themed app</div>;\n * }\n *\n * // Manual meta color override for special pages\n * function SpecialPage() {\n * const { setMetaColor } = useMetaColor();\n *\n * useEffect(() => {\n * // Override meta color for this page\n * setMetaColor('#ff0000');\n *\n * // Cleanup: reset to theme color when leaving page\n * return () => {\n * setMetaColor(''); // This will revert to theme-based color\n * };\n * }, [setMetaColor]);\n *\n * return <div>Special page with red theme color</div>;\n * }\n *\n * // Integration with theme switcher\n * function ThemeAwareComponent() {\n * const { theme, setTheme } = useTheme();\n * const { metaColor } = useMetaColor();\n *\n * return (\n * <div>\n * <p>Current theme: {theme}</p>\n * <p>Meta color: {metaColor}</p>\n * <button onClick={() => setTheme('light')}>Light</button>\n * <button onClick={() => setTheme('dark')}>Dark</button>\n * <button onClick={() => setTheme('system')}>System</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useMetaColor(defaultColors?: typeof META_THEME_COLORS) {\n /** Get resolved theme from next-themes */\n const { resolvedTheme } = useTheme();\n\n /**\n * Helper function to detect system dark mode preference\n */\n const isSystemDarkMode = React.useCallback(() => {\n if (typeof window === \"undefined\") return false;\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n }, []);\n\n /**\n * Get effective theme mode (resolves 'system' to actual preference)\n */\n const getEffectiveTheme = React.useCallback(\n (theme: string | undefined) => {\n if (theme === THEME_MODES.SYSTEM) {\n return isSystemDarkMode() ? THEME_MODES.DARK : THEME_MODES.LIGHT;\n }\n return theme;\n },\n [isSystemDarkMode],\n );\n\n /**\n * Calculate appropriate meta color based on current theme\n * Handles light, dark, and system themes properly\n * Memoized to prevent unnecessary recalculations\n */\n const metaColor = React.useMemo(() => {\n const colorsToUse = defaultColors ?? META_THEME_COLORS;\n\n // Get the effective theme (resolves system to light/dark)\n const effectiveTheme = getEffectiveTheme(resolvedTheme);\n\n // Handle different theme modes\n if (effectiveTheme === THEME_MODES.DARK) {\n return colorsToUse[THEME_MODES.DARK];\n } else if (effectiveTheme === THEME_MODES.LIGHT) {\n return colorsToUse[THEME_MODES.LIGHT];\n }\n\n // Fallback to light theme if resolvedTheme is undefined (during hydration)\n return colorsToUse[THEME_MODES.LIGHT];\n }, [resolvedTheme, defaultColors, getEffectiveTheme]);\n\n /**\n * Manually set meta theme color in the document\n * Useful for temporary color overrides or custom scenarios\n *\n * @param color - Hex color string to set as meta theme color\n */\n const setMetaColor = React.useCallback((color: string) => {\n // Find and update the meta theme-color tag\n const metaTag = document.querySelector('meta[name=\"theme-color\"]');\n if (metaTag) {\n metaTag.setAttribute(\"content\", color);\n } else {\n // Create meta tag if it doesn't exist\n const newMetaTag = document.createElement(\"meta\");\n newMetaTag.name = \"theme-color\";\n newMetaTag.content = color;\n document.head.appendChild(newMetaTag);\n }\n }, []);\n\n React.useEffect(() => {\n setMetaColor(metaColor);\n }, [metaColor, setMetaColor]);\n\n return {\n /** Current meta theme color based on resolved theme */\n metaColor,\n /** Function to manually set meta theme color */\n setMetaColor,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,SAAgB,aAAa,eAA0C;;CAErE,MAAM,EAAE,kBAAkB,SAAS;;;;CAKnC,MAAM,mBAAmBA,QAAM,kBAAkB;EAC/C,IAAI,OAAO,WAAW,aAAa,OAAO;EAC1C,OAAO,OAAO,WAAW,8BAA8B,CAAC,CAAC;CAC3D,GAAG,CAAC,CAAC;;;;CAKL,MAAM,oBAAoBA,QAAM,aAC7B,UAA8B;EAC7B,IAAI,UAAU,YAAY,QACxB,OAAO,iBAAiB,IAAI,YAAY,OAAO,YAAY;EAE7D,OAAO;CACT,GACA,CAAC,gBAAgB,CACnB;;;;;;CAOA,MAAM,YAAYA,QAAM,cAAc;EACpC,MAAM,cAAc,iBAAiB;EAGrC,MAAM,iBAAiB,kBAAkB,aAAa;EAGtD,IAAI,mBAAmB,YAAY,MACjC,OAAO,YAAY,YAAY;OAC1B,IAAI,mBAAmB,YAAY,OACxC,OAAO,YAAY,YAAY;EAIjC,OAAO,YAAY,YAAY;CACjC,GAAG;EAAC;EAAe;EAAe;CAAiB,CAAC;;;;;;;CAQpD,MAAM,eAAeA,QAAM,aAAa,UAAkB;EAExD,MAAM,UAAU,SAAS,cAAc,4BAA0B;EACjE,IAAI,SACF,QAAQ,aAAa,WAAW,KAAK;OAChC;GAEL,MAAM,aAAa,SAAS,cAAc,MAAM;GAChD,WAAW,OAAO;GAClB,WAAW,UAAU;GACrB,SAAS,KAAK,YAAY,UAAU;EACtC;CACF,GAAG,CAAC,CAAC;CAEL,QAAM,gBAAgB;EACpB,aAAa,SAAS;CACxB,GAAG,CAAC,WAAW,YAAY,CAAC;CAE5B,OAAO;;EAEL;;EAEA;CACF;AACF"}
@@ -0,0 +1,5 @@
1
+ //#region src/hooks/use-mobile.d.ts
2
+ declare function useIsMobile(): boolean;
3
+ //#endregion
4
+ export { useIsMobile };
5
+ //# sourceMappingURL=use-mobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-mobile.d.ts","names":[],"sources":["../../src/hooks/use-mobile.ts"],"mappings":";iBAMgB"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import * as React$1 from "react";
3
+ //#region src/hooks/use-mobile.ts
4
+ const MOBILE_BREAKPOINT = 768;
5
+ function useIsMobile() {
6
+ const [isMobile, setIsMobile] = React$1.useState(void 0);
7
+ React$1.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;
17
+ }
18
+ //#endregion
19
+ export { useIsMobile };
20
+
21
+ //# sourceMappingURL=use-mobile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-mobile.js","names":["React"],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":";;;AAIA,MAAM,oBAAoB;AAE1B,SAAgB,cAAc;CAC5B,MAAM,CAAC,UAAU,eAAeA,QAAM,SAA8B,KAAA,CAAS;CAE7E,QAAM,gBAAgB;EACpB,MAAM,MAAM,OAAO,WAAW,eAAe,oBAAoB,EAAE,IAAI;EACvE,MAAM,iBAAiB;GACrB,YAAY,OAAO,aAAa,iBAAiB;EACnD;EACA,IAAI,iBAAiB,UAAU,QAAQ;EACvC,YAAY,OAAO,aAAa,iBAAiB;EACjD,aAAa,IAAI,oBAAoB,UAAU,QAAQ;CACzD,GAAG,CAAC,CAAC;CAEL,OAAO,CAAC,CAAC;AACX"}