mado-ui 0.5.0 → 0.5.2

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 (387) hide show
  1. package/dist/components/button.d.ts +3 -2
  2. package/dist/components/button.d.ts.map +1 -0
  3. package/dist/components/details.d.ts +5 -4
  4. package/dist/components/details.d.ts.map +1 -0
  5. package/dist/components/drop-down.d.ts +8 -7
  6. package/dist/components/drop-down.d.ts.map +1 -0
  7. package/dist/components/form/fieldset.d.ts +3 -1
  8. package/dist/components/form/fieldset.d.ts.map +1 -0
  9. package/dist/components/form/index.d.ts +2 -1
  10. package/dist/components/form/index.d.ts.map +1 -0
  11. package/dist/components/form/input/date/index.d.ts +3 -1
  12. package/dist/components/form/input/date/index.d.ts.map +1 -0
  13. package/dist/components/form/input/index.d.ts +3 -2
  14. package/dist/components/form/input/index.d.ts.map +1 -0
  15. package/dist/components/form/submit-button.d.ts +3 -2
  16. package/dist/components/form/submit-button.d.ts.map +1 -0
  17. package/dist/components/form/textarea.d.ts +3 -2
  18. package/dist/components/form/textarea.d.ts.map +1 -0
  19. package/dist/components/ghost.d.ts +4 -4
  20. package/dist/components/ghost.d.ts.map +1 -0
  21. package/dist/components/heading.d.ts +3 -2
  22. package/dist/components/heading.d.ts.map +1 -0
  23. package/dist/components/iframe.d.ts +3 -2
  24. package/dist/components/iframe.d.ts.map +1 -0
  25. package/dist/components/index.d.ts +1 -0
  26. package/dist/components/index.d.ts.map +1 -0
  27. package/dist/components/link.d.ts +4 -3
  28. package/dist/components/link.d.ts.map +1 -0
  29. package/dist/components/modal.d.ts +7 -6
  30. package/dist/components/modal.d.ts.map +1 -0
  31. package/dist/components/time.d.ts +3 -2
  32. package/dist/components/time.d.ts.map +1 -0
  33. package/dist/components/tooltip.d.ts +5 -4
  34. package/dist/components/tooltip.d.ts.map +1 -0
  35. package/dist/components/video.d.ts +3 -2
  36. package/dist/components/video.d.ts.map +1 -0
  37. package/dist/components.d.ts +665 -1
  38. package/dist/components.d.ts.map +1 -0
  39. package/dist/components.esm.js +262 -100
  40. package/dist/components.esm.js.map +1 -1
  41. package/dist/components.js +261 -99
  42. package/dist/components.js.map +1 -1
  43. package/dist/hooks/create-fast-context.d.ts +1 -0
  44. package/dist/hooks/create-fast-context.d.ts.map +1 -0
  45. package/dist/hooks/index.d.ts +2 -0
  46. package/dist/hooks/index.d.ts.map +1 -0
  47. package/dist/hooks/use-fieldset-context.d.ts +1 -0
  48. package/dist/hooks/use-fieldset-context.d.ts.map +1 -0
  49. package/dist/hooks/use-form-context.d.ts +1 -0
  50. package/dist/hooks/use-form-context.d.ts.map +1 -0
  51. package/dist/hooks/use-form-status.d.ts +1 -0
  52. package/dist/hooks/use-form-status.d.ts.map +1 -0
  53. package/dist/hooks/use-pointer-movement.d.ts +17 -0
  54. package/dist/hooks/use-pointer-movement.d.ts.map +1 -0
  55. package/dist/hooks.d.ts +95 -1
  56. package/dist/hooks.d.ts.map +1 -0
  57. package/dist/hooks.esm.js +104 -2
  58. package/dist/hooks.esm.js.map +1 -1
  59. package/dist/hooks.js +103 -0
  60. package/dist/hooks.js.map +1 -1
  61. package/dist/icons/10-arrow-trianglehead-clockwise.d.ts +1 -0
  62. package/dist/icons/10-arrow-trianglehead-clockwise.d.ts.map +1 -0
  63. package/dist/icons/10-arrow-trianglehead-counterclockwise.d.ts +1 -0
  64. package/dist/icons/10-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  65. package/dist/icons/15-arrow-trianglehead-clockwise.d.ts +1 -0
  66. package/dist/icons/15-arrow-trianglehead-clockwise.d.ts.map +1 -0
  67. package/dist/icons/15-arrow-trianglehead-counterclockwise.d.ts +1 -0
  68. package/dist/icons/15-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  69. package/dist/icons/3-people.d.ts +1 -0
  70. package/dist/icons/3-people.d.ts.map +1 -0
  71. package/dist/icons/3-rectangles-desktop-fill.d.ts +1 -0
  72. package/dist/icons/3-rectangles-desktop-fill.d.ts.map +1 -0
  73. package/dist/icons/3-rectangles-desktop.d.ts +1 -0
  74. package/dist/icons/3-rectangles-desktop.d.ts.map +1 -0
  75. package/dist/icons/30-arrow-trianglehead-clockwise.d.ts +1 -0
  76. package/dist/icons/30-arrow-trianglehead-clockwise.d.ts.map +1 -0
  77. package/dist/icons/30-arrow-trianglehead-counterclockwise.d.ts +1 -0
  78. package/dist/icons/30-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  79. package/dist/icons/45-arrow-trianglehead-clockwise.d.ts +1 -0
  80. package/dist/icons/45-arrow-trianglehead-clockwise.d.ts.map +1 -0
  81. package/dist/icons/45-arrow-trianglehead-counterclockwise.d.ts +1 -0
  82. package/dist/icons/45-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  83. package/dist/icons/5-arrow-trianglehead-clockwise.d.ts +1 -0
  84. package/dist/icons/5-arrow-trianglehead-clockwise.d.ts.map +1 -0
  85. package/dist/icons/5-arrow-trianglehead-counterclockwise.d.ts +1 -0
  86. package/dist/icons/5-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  87. package/dist/icons/60-arrow-trianglehead-clockwise.d.ts +1 -0
  88. package/dist/icons/60-arrow-trianglehead-clockwise.d.ts.map +1 -0
  89. package/dist/icons/60-arrow-trianglehead-counterclockwise.d.ts +1 -0
  90. package/dist/icons/60-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  91. package/dist/icons/75-arrow-trianglehead-clockwise.d.ts +1 -0
  92. package/dist/icons/75-arrow-trianglehead-clockwise.d.ts.map +1 -0
  93. package/dist/icons/75-arrow-trianglehead-counterclockwise.d.ts +1 -0
  94. package/dist/icons/75-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  95. package/dist/icons/90-arrow-trianglehead-clockwise.d.ts +1 -0
  96. package/dist/icons/90-arrow-trianglehead-clockwise.d.ts.map +1 -0
  97. package/dist/icons/90-arrow-trianglehead-counterclockwise.d.ts +1 -0
  98. package/dist/icons/90-arrow-trianglehead-counterclockwise.d.ts.map +1 -0
  99. package/dist/icons/airplane.d.ts +1 -0
  100. package/dist/icons/airplane.d.ts.map +1 -0
  101. package/dist/icons/arrow-down-backward-and-arrow-up-forward-rectangle.d.ts +1 -0
  102. package/dist/icons/arrow-down-backward-and-arrow-up-forward-rectangle.d.ts.map +1 -0
  103. package/dist/icons/arrow-triangle-2-circlepath-circle-fill.d.ts +1 -0
  104. package/dist/icons/arrow-triangle-2-circlepath-circle-fill.d.ts.map +1 -0
  105. package/dist/icons/arrow-triangle-2-circlepath-circle.d.ts +1 -0
  106. package/dist/icons/arrow-triangle-2-circlepath-circle.d.ts.map +1 -0
  107. package/dist/icons/arrow-up-forward-and-arrow-down-backward-rectangle.d.ts +1 -0
  108. package/dist/icons/arrow-up-forward-and-arrow-down-backward-rectangle.d.ts.map +1 -0
  109. package/dist/icons/bag-fill.d.ts +1 -0
  110. package/dist/icons/bag-fill.d.ts.map +1 -0
  111. package/dist/icons/banknote.d.ts +1 -0
  112. package/dist/icons/banknote.d.ts.map +1 -0
  113. package/dist/icons/bell-fill.d.ts +1 -0
  114. package/dist/icons/bell-fill.d.ts.map +1 -0
  115. package/dist/icons/bolt-car.d.ts +1 -0
  116. package/dist/icons/bolt-car.d.ts.map +1 -0
  117. package/dist/icons/bolt-fill.d.ts +1 -0
  118. package/dist/icons/bolt-fill.d.ts.map +1 -0
  119. package/dist/icons/bolt-ring-closed.d.ts +1 -0
  120. package/dist/icons/bolt-ring-closed.d.ts.map +1 -0
  121. package/dist/icons/bolt-trianglebadge-exclamationmark.d.ts +1 -0
  122. package/dist/icons/bolt-trianglebadge-exclamationmark.d.ts.map +1 -0
  123. package/dist/icons/book-fill.d.ts +1 -0
  124. package/dist/icons/book-fill.d.ts.map +1 -0
  125. package/dist/icons/bookmark-fill.d.ts +1 -0
  126. package/dist/icons/bookmark-fill.d.ts.map +1 -0
  127. package/dist/icons/briefcase-fill.d.ts +1 -0
  128. package/dist/icons/briefcase-fill.d.ts.map +1 -0
  129. package/dist/icons/bubble-left-fill.d.ts +1 -0
  130. package/dist/icons/bubble-left-fill.d.ts.map +1 -0
  131. package/dist/icons/building-2-fill.d.ts +1 -0
  132. package/dist/icons/building-2-fill.d.ts.map +1 -0
  133. package/dist/icons/calendar.d.ts +1 -0
  134. package/dist/icons/calendar.d.ts.map +1 -0
  135. package/dist/icons/camera-fill.d.ts +1 -0
  136. package/dist/icons/camera-fill.d.ts.map +1 -0
  137. package/dist/icons/car-fill.d.ts +1 -0
  138. package/dist/icons/car-fill.d.ts.map +1 -0
  139. package/dist/icons/cart-fill.d.ts +1 -0
  140. package/dist/icons/cart-fill.d.ts.map +1 -0
  141. package/dist/icons/chart-bar-doc-horizontal.d.ts +1 -0
  142. package/dist/icons/chart-bar-doc-horizontal.d.ts.map +1 -0
  143. package/dist/icons/checkmark-seal.d.ts +1 -0
  144. package/dist/icons/checkmark-seal.d.ts.map +1 -0
  145. package/dist/icons/checkmark.d.ts +1 -0
  146. package/dist/icons/checkmark.d.ts.map +1 -0
  147. package/dist/icons/chevron-compact-down.d.ts +1 -0
  148. package/dist/icons/chevron-compact-down.d.ts.map +1 -0
  149. package/dist/icons/chevron-down.d.ts +1 -0
  150. package/dist/icons/chevron-down.d.ts.map +1 -0
  151. package/dist/icons/chevron-left-forwardslash-chevron-right.d.ts +1 -0
  152. package/dist/icons/chevron-left-forwardslash-chevron-right.d.ts.map +1 -0
  153. package/dist/icons/chevron-left.d.ts +1 -0
  154. package/dist/icons/chevron-left.d.ts.map +1 -0
  155. package/dist/icons/chevron-right.d.ts +1 -0
  156. package/dist/icons/chevron-right.d.ts.map +1 -0
  157. package/dist/icons/chevron-up-chevron-down.d.ts +1 -0
  158. package/dist/icons/chevron-up-chevron-down.d.ts.map +1 -0
  159. package/dist/icons/circle-fill.d.ts +1 -0
  160. package/dist/icons/circle-fill.d.ts.map +1 -0
  161. package/dist/icons/clock-badge-checkmark.d.ts +1 -0
  162. package/dist/icons/clock-badge-checkmark.d.ts.map +1 -0
  163. package/dist/icons/clock-fill.d.ts +1 -0
  164. package/dist/icons/clock-fill.d.ts.map +1 -0
  165. package/dist/icons/cloud-fill.d.ts +1 -0
  166. package/dist/icons/cloud-fill.d.ts.map +1 -0
  167. package/dist/icons/cube-fill.d.ts +1 -0
  168. package/dist/icons/cube-fill.d.ts.map +1 -0
  169. package/dist/icons/curve-point-left.d.ts +1 -0
  170. package/dist/icons/curve-point-left.d.ts.map +1 -0
  171. package/dist/icons/dial-high.d.ts +1 -0
  172. package/dist/icons/dial-high.d.ts.map +1 -0
  173. package/dist/icons/doc-fill.d.ts +1 -0
  174. package/dist/icons/doc-fill.d.ts.map +1 -0
  175. package/dist/icons/doc-on-clipboard.d.ts +1 -0
  176. package/dist/icons/doc-on-clipboard.d.ts.map +1 -0
  177. package/dist/icons/doc-on-doc-fill.d.ts +1 -0
  178. package/dist/icons/doc-on-doc-fill.d.ts.map +1 -0
  179. package/dist/icons/doc-on-doc.d.ts +1 -0
  180. package/dist/icons/doc-on-doc.d.ts.map +1 -0
  181. package/dist/icons/doc-text-magnifyingglass.d.ts +1 -0
  182. package/dist/icons/doc-text-magnifyingglass.d.ts.map +1 -0
  183. package/dist/icons/dollar-sign.d.ts +1 -0
  184. package/dist/icons/dollar-sign.d.ts.map +1 -0
  185. package/dist/icons/ellipsis-circle-fill.d.ts +1 -0
  186. package/dist/icons/ellipsis-circle-fill.d.ts.map +1 -0
  187. package/dist/icons/ellipsis-circle.d.ts +1 -0
  188. package/dist/icons/ellipsis-circle.d.ts.map +1 -0
  189. package/dist/icons/envelope-fill.d.ts +1 -0
  190. package/dist/icons/envelope-fill.d.ts.map +1 -0
  191. package/dist/icons/envelope.d.ts +1 -0
  192. package/dist/icons/envelope.d.ts.map +1 -0
  193. package/dist/icons/exclamationmark-octagon.d.ts +1 -0
  194. package/dist/icons/exclamationmark-octagon.d.ts.map +1 -0
  195. package/dist/icons/eye.d.ts +1 -0
  196. package/dist/icons/eye.d.ts.map +1 -0
  197. package/dist/icons/figure-water-fitness.d.ts +1 -0
  198. package/dist/icons/figure-water-fitness.d.ts.map +1 -0
  199. package/dist/icons/flag-fill.d.ts +1 -0
  200. package/dist/icons/flag-fill.d.ts.map +1 -0
  201. package/dist/icons/flame-fill.d.ts +1 -0
  202. package/dist/icons/flame-fill.d.ts.map +1 -0
  203. package/dist/icons/folder-fill.d.ts +1 -0
  204. package/dist/icons/folder-fill.d.ts.map +1 -0
  205. package/dist/icons/folder.d.ts +1 -0
  206. package/dist/icons/folder.d.ts.map +1 -0
  207. package/dist/icons/gearshape-fill.d.ts +1 -0
  208. package/dist/icons/gearshape-fill.d.ts.map +1 -0
  209. package/dist/icons/gearshape.d.ts +1 -0
  210. package/dist/icons/gearshape.d.ts.map +1 -0
  211. package/dist/icons/gift-fill.d.ts +1 -0
  212. package/dist/icons/gift-fill.d.ts.map +1 -0
  213. package/dist/icons/globe-americas-fill.d.ts +1 -0
  214. package/dist/icons/globe-americas-fill.d.ts.map +1 -0
  215. package/dist/icons/hare-fill.d.ts +1 -0
  216. package/dist/icons/hare-fill.d.ts.map +1 -0
  217. package/dist/icons/house-deskclock.d.ts +1 -0
  218. package/dist/icons/house-deskclock.d.ts.map +1 -0
  219. package/dist/icons/house-fill.d.ts +1 -0
  220. package/dist/icons/house-fill.d.ts.map +1 -0
  221. package/dist/icons/house.d.ts +1 -0
  222. package/dist/icons/house.d.ts.map +1 -0
  223. package/dist/icons/index.d.ts +1 -0
  224. package/dist/icons/index.d.ts.map +1 -0
  225. package/dist/icons/iphone-house.d.ts +1 -0
  226. package/dist/icons/iphone-house.d.ts.map +1 -0
  227. package/dist/icons/light-ribbon.d.ts +1 -0
  228. package/dist/icons/light-ribbon.d.ts.map +1 -0
  229. package/dist/icons/lightbulb-fill.d.ts +1 -0
  230. package/dist/icons/lightbulb-fill.d.ts.map +1 -0
  231. package/dist/icons/lightbulb-led.d.ts +1 -0
  232. package/dist/icons/lightbulb-led.d.ts.map +1 -0
  233. package/dist/icons/list-bullet-clipboard-fill.d.ts +1 -0
  234. package/dist/icons/list-bullet-clipboard-fill.d.ts.map +1 -0
  235. package/dist/icons/magnifyingglass.d.ts +1 -0
  236. package/dist/icons/magnifyingglass.d.ts.map +1 -0
  237. package/dist/icons/map-pin-ellipse.d.ts +1 -0
  238. package/dist/icons/map-pin-ellipse.d.ts.map +1 -0
  239. package/dist/icons/minus-plus-batterblock.d.ts +1 -0
  240. package/dist/icons/minus-plus-batterblock.d.ts.map +1 -0
  241. package/dist/icons/network-shield.d.ts +1 -0
  242. package/dist/icons/network-shield.d.ts.map +1 -0
  243. package/dist/icons/network.d.ts +1 -0
  244. package/dist/icons/network.d.ts.map +1 -0
  245. package/dist/icons/newspaper-fill.d.ts +1 -0
  246. package/dist/icons/newspaper-fill.d.ts.map +1 -0
  247. package/dist/icons/number.d.ts +1 -0
  248. package/dist/icons/number.d.ts.map +1 -0
  249. package/dist/icons/paperplane-fill.d.ts +1 -0
  250. package/dist/icons/paperplane-fill.d.ts.map +1 -0
  251. package/dist/icons/pause-fill.d.ts +1 -0
  252. package/dist/icons/pause-fill.d.ts.map +1 -0
  253. package/dist/icons/person-crop-square.d.ts +1 -0
  254. package/dist/icons/person-crop-square.d.ts.map +1 -0
  255. package/dist/icons/person-fill-questionmark.d.ts +1 -0
  256. package/dist/icons/person-fill-questionmark.d.ts.map +1 -0
  257. package/dist/icons/person-fill.d.ts +1 -0
  258. package/dist/icons/person-fill.d.ts.map +1 -0
  259. package/dist/icons/person.d.ts +1 -0
  260. package/dist/icons/person.d.ts.map +1 -0
  261. package/dist/icons/phone-arrow-up-right.d.ts +1 -0
  262. package/dist/icons/phone-arrow-up-right.d.ts.map +1 -0
  263. package/dist/icons/phone-fill.d.ts +1 -0
  264. package/dist/icons/phone-fill.d.ts.map +1 -0
  265. package/dist/icons/phone.d.ts +1 -0
  266. package/dist/icons/phone.d.ts.map +1 -0
  267. package/dist/icons/photo-badge-arrow-down-fill.d.ts +1 -0
  268. package/dist/icons/photo-badge-arrow-down-fill.d.ts.map +1 -0
  269. package/dist/icons/photo-badge-arrow-down.d.ts +1 -0
  270. package/dist/icons/photo-badge-arrow-down.d.ts.map +1 -0
  271. package/dist/icons/play-fill.d.ts +1 -0
  272. package/dist/icons/play-fill.d.ts.map +1 -0
  273. package/dist/icons/play-rectangle-fill.d.ts +1 -0
  274. package/dist/icons/play-rectangle-fill.d.ts.map +1 -0
  275. package/dist/icons/plus.d.ts +1 -0
  276. package/dist/icons/plus.d.ts.map +1 -0
  277. package/dist/icons/qrcode.d.ts +1 -0
  278. package/dist/icons/qrcode.d.ts.map +1 -0
  279. package/dist/icons/rectangle-fill-on-arrow-down-forward-topleading-rectangle.d.ts +1 -0
  280. package/dist/icons/rectangle-fill-on-arrow-down-forward-topleading-rectangle.d.ts.map +1 -0
  281. package/dist/icons/rectangle-fill.d.ts +1 -0
  282. package/dist/icons/rectangle-fill.d.ts.map +1 -0
  283. package/dist/icons/rectangle-portrait-and-arrow-left-fill.d.ts +1 -0
  284. package/dist/icons/rectangle-portrait-and-arrow-left-fill.d.ts.map +1 -0
  285. package/dist/icons/rectangle-portrait-and-arrow-left.d.ts +1 -0
  286. package/dist/icons/rectangle-portrait-and-arrow-left.d.ts.map +1 -0
  287. package/dist/icons/rectangle-triangle-up.d.ts +1 -0
  288. package/dist/icons/rectangle-triangle-up.d.ts.map +1 -0
  289. package/dist/icons/rectangle.d.ts +1 -0
  290. package/dist/icons/rectangle.d.ts.map +1 -0
  291. package/dist/icons/sensor.d.ts +1 -0
  292. package/dist/icons/sensor.d.ts.map +1 -0
  293. package/dist/icons/signature.d.ts +1 -0
  294. package/dist/icons/signature.d.ts.map +1 -0
  295. package/dist/icons/solar-panel.d.ts +1 -0
  296. package/dist/icons/solar-panel.d.ts.map +1 -0
  297. package/dist/icons/speaker-fill.d.ts +1 -0
  298. package/dist/icons/speaker-fill.d.ts.map +1 -0
  299. package/dist/icons/speaker-minus-fill.d.ts +1 -0
  300. package/dist/icons/speaker-minus-fill.d.ts.map +1 -0
  301. package/dist/icons/speaker-minus.d.ts +1 -0
  302. package/dist/icons/speaker-minus.d.ts.map +1 -0
  303. package/dist/icons/speaker-plus-fill.d.ts +1 -0
  304. package/dist/icons/speaker-plus-fill.d.ts.map +1 -0
  305. package/dist/icons/speaker-plus.d.ts +1 -0
  306. package/dist/icons/speaker-plus.d.ts.map +1 -0
  307. package/dist/icons/speaker-slash-fill.d.ts +1 -0
  308. package/dist/icons/speaker-slash-fill.d.ts.map +1 -0
  309. package/dist/icons/speaker-slash.d.ts +1 -0
  310. package/dist/icons/speaker-slash.d.ts.map +1 -0
  311. package/dist/icons/speaker-wave-1-fill.d.ts +1 -0
  312. package/dist/icons/speaker-wave-1-fill.d.ts.map +1 -0
  313. package/dist/icons/speaker-wave-1.d.ts +1 -0
  314. package/dist/icons/speaker-wave-1.d.ts.map +1 -0
  315. package/dist/icons/speaker-wave-2-fill.d.ts +1 -0
  316. package/dist/icons/speaker-wave-2-fill.d.ts.map +1 -0
  317. package/dist/icons/speaker-wave-2.d.ts +1 -0
  318. package/dist/icons/speaker-wave-2.d.ts.map +1 -0
  319. package/dist/icons/speaker-wave-3-fill.d.ts +1 -0
  320. package/dist/icons/speaker-wave-3-fill.d.ts.map +1 -0
  321. package/dist/icons/speaker-wave-3.d.ts +1 -0
  322. package/dist/icons/speaker-wave-3.d.ts.map +1 -0
  323. package/dist/icons/speaker.d.ts +1 -0
  324. package/dist/icons/speaker.d.ts.map +1 -0
  325. package/dist/icons/square-and-arrow-down-fill.d.ts +1 -0
  326. package/dist/icons/square-and-arrow-down-fill.d.ts.map +1 -0
  327. package/dist/icons/square-and-arrow-down.d.ts +1 -0
  328. package/dist/icons/square-and-arrow-down.d.ts.map +1 -0
  329. package/dist/icons/square-and-arrow-up-fill.d.ts +1 -0
  330. package/dist/icons/square-and-arrow-up-fill.d.ts.map +1 -0
  331. package/dist/icons/square-and-arrow-up.d.ts +1 -0
  332. package/dist/icons/square-and-arrow-up.d.ts.map +1 -0
  333. package/dist/icons/square-and-pencil-fill.d.ts +1 -0
  334. package/dist/icons/square-and-pencil-fill.d.ts.map +1 -0
  335. package/dist/icons/square-and-pencil.d.ts +1 -0
  336. package/dist/icons/square-and-pencil.d.ts.map +1 -0
  337. package/dist/icons/text-bubble.d.ts +1 -0
  338. package/dist/icons/text-bubble.d.ts.map +1 -0
  339. package/dist/icons/trash-fill.d.ts +1 -0
  340. package/dist/icons/trash-fill.d.ts.map +1 -0
  341. package/dist/icons/trash.d.ts +1 -0
  342. package/dist/icons/trash.d.ts.map +1 -0
  343. package/dist/icons/tree.d.ts +1 -0
  344. package/dist/icons/tree.d.ts.map +1 -0
  345. package/dist/icons/umbrella-fill.d.ts +1 -0
  346. package/dist/icons/umbrella-fill.d.ts.map +1 -0
  347. package/dist/icons/xmark.d.ts +1 -0
  348. package/dist/icons/xmark.d.ts.map +1 -0
  349. package/dist/icons.d.ts +290 -1
  350. package/dist/icons.d.ts.map +1 -0
  351. package/dist/icons.esm.js +1 -1
  352. package/dist/icons.esm.js.map +1 -1
  353. package/dist/icons.js +1 -1
  354. package/dist/icons.js.map +1 -1
  355. package/dist/index.d.ts +665 -1
  356. package/dist/index.d.ts.map +1 -0
  357. package/dist/index.esm.js +262 -100
  358. package/dist/index.esm.js.map +1 -1
  359. package/dist/index.js +261 -99
  360. package/dist/index.js.map +1 -1
  361. package/dist/types/index.d.ts +1 -0
  362. package/dist/types/index.d.ts.map +1 -0
  363. package/dist/types/utils.d.ts +1 -0
  364. package/dist/types/utils.d.ts.map +1 -0
  365. package/dist/types.d.ts +39 -1
  366. package/dist/types.d.ts.map +1 -0
  367. package/dist/utils/class-management.d.ts +1 -0
  368. package/dist/utils/class-management.d.ts.map +1 -0
  369. package/dist/utils/custom-tailwind-merge.d.ts +1 -0
  370. package/dist/utils/custom-tailwind-merge.d.ts.map +1 -0
  371. package/dist/utils/get-date.d.ts +1 -0
  372. package/dist/utils/get-date.d.ts.map +1 -0
  373. package/dist/utils/helpers.d.ts +1 -0
  374. package/dist/utils/helpers.d.ts.map +1 -0
  375. package/dist/utils/index.d.ts +1 -0
  376. package/dist/utils/index.d.ts.map +1 -0
  377. package/dist/utils/math.d.ts +1 -0
  378. package/dist/utils/math.d.ts.map +1 -0
  379. package/dist/utils/regex.d.ts +1 -0
  380. package/dist/utils/regex.d.ts.map +1 -0
  381. package/dist/utils/string-manipulation.d.ts +1 -0
  382. package/dist/utils/string-manipulation.d.ts.map +1 -0
  383. package/dist/utils/tw-sort.d.ts +1 -0
  384. package/dist/utils/tw-sort.d.ts.map +1 -0
  385. package/dist/utils.d.ts +287 -1
  386. package/dist/utils.d.ts.map +1 -0
  387. package/package.json +6 -5
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import { extendTailwindMerge, twJoin } from 'tailwind-merge';
3
3
  import * as React from 'react';
4
- import { Children, isValidElement, Fragment, createContext, useContext, useSyncExternalStore, useRef, useCallback, useEffect, Suspense, useId, useLayoutEffect, cloneElement, useState } from 'react';
4
+ import { Children, isValidElement, Fragment, createContext, useContext, useSyncExternalStore, useRef, useCallback, useEffect, Suspense, useState, useId, useLayoutEffect, cloneElement } from 'react';
5
5
  import { Button as Button$1, DisclosureButton, DisclosurePanel, Disclosure, MenuButton, MenuItem, MenuItems, MenuSection, MenuHeading, MenuSeparator, Menu, Fieldset as Fieldset$1, Legend, Field, Label, Input as Input$1, Description, Textarea as Textarea$1, DialogTitle, Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
6
6
  import * as ReactDOM from 'react-dom';
7
7
  import { createPortal } from 'react-dom';
@@ -1087,10 +1087,6 @@ function SpeakerPlusFill(props) {
1087
1087
  return (jsxs("svg", { ...props, viewBox: '0 0 64 47', children: [jsx("path", { d: 'M28.32,46.325C30.027,46.325 31.276,45.08 31.276,43.362L31.276,3.102C31.276,1.411 30.027,0 28.264,0C27.037,0 26.183,0.536 24.85,1.807L13.652,12.313C13.496,12.47 13.272,12.571 13.02,12.571L5.497,12.571C1.938,12.571 0,14.509 0,18.319L0,28.091C0,31.867 1.938,33.833 5.497,33.833L13.02,33.833C13.272,33.833 13.496,33.911 13.652,34.068L24.85,44.679C26.071,45.817 27.092,46.325 28.32,46.325Z' }), jsx("path", { d: 'M39.659,23.135C39.659,24.411 40.579,25.303 41.916,25.303L49.617,25.303L49.617,33.059C49.617,34.368 50.509,35.283 51.785,35.283C53.1,35.283 54.02,34.374 54.02,33.059L54.02,25.303L61.777,25.303C63.086,25.303 64,24.411 64,23.135C64,21.819 63.092,20.899 61.777,20.899L54.02,20.899L54.02,13.171C54.02,11.828 53.1,10.919 51.785,10.919C50.509,10.919 49.617,11.834 49.617,13.171L49.617,20.899L41.916,20.899C40.545,20.899 39.659,21.819 39.659,23.135Z' })] }));
1088
1088
  }
1089
1089
 
1090
- function SpeakerWave3Fill(props) {
1091
- return (jsxs("svg", { viewBox: '0 0 64 47', ...props, children: [jsx("path", { d: 'M25.707,44.076C27.257,44.076 28.39,42.947 28.39,41.387L28.39,4.841C28.39,3.307 27.257,2.025 25.656,2.025C24.542,2.025 23.767,2.512 22.558,3.666L12.393,13.203C12.251,13.345 12.047,13.436 11.818,13.436L4.99,13.436C1.759,13.436 0,15.195 0,18.654L0,27.525C0,30.953 1.759,32.737 4.99,32.737L11.818,32.737C12.047,32.737 12.251,32.808 12.393,32.95L22.558,42.583C23.666,43.615 24.593,44.076 25.707,44.076Z' }), jsx("path", { "data-wave": '1', d: 'M36.874,33.192C37.684,33.728 38.797,33.566 39.439,32.64C41.265,30.222 42.371,26.683 42.371,23.026C42.371,19.368 41.265,15.855 39.439,13.411C38.797,12.485 37.684,12.323 36.874,12.885C35.923,13.553 35.761,14.721 36.505,15.713C37.901,17.607 38.662,20.249 38.662,23.026C38.662,25.802 37.876,28.419 36.505,30.338C35.786,31.355 35.923,32.498 36.874,33.192Z' }), jsx("path", { "data-wave": '2', d: 'M45.738,39.394C46.624,39.981 47.712,39.799 48.354,38.868C51.402,34.69 53.208,28.904 53.208,23.026C53.208,17.148 51.427,11.31 48.354,7.183C47.712,6.252 46.624,6.07 45.738,6.657C44.858,7.249 44.701,8.362 45.399,9.354C48.023,13.032 49.499,17.952 49.499,23.026C49.499,28.099 47.972,32.994 45.399,36.697C44.726,37.689 44.858,38.802 45.738,39.394Z' }), jsx("path", { "data-wave": '3', d: 'M54.679,45.708C55.514,46.32 56.683,46.082 57.315,45.121C61.498,39.091 64,31.447 64,23.026C64,14.604 61.422,6.986 57.315,0.93C56.683,-0.056 55.514,-0.269 54.679,0.343C53.804,0.956 53.668,2.079 54.33,3.071C58.012,8.514 60.342,15.379 60.342,23.026C60.342,30.647 58.012,37.562 54.33,42.98C53.668,43.972 53.804,45.095 54.679,45.708Z' })] }));
1092
- }
1093
-
1094
1090
  function TenArrowTriangleheadClockwise(props) {
1095
1091
  return (jsxs("svg", { viewBox: "0 0 59 64", ...props, children: [jsx("path", { d: "M29.213,64C45.355,64 58.456,50.929 58.456,34.787C58.456,24.967 53.645,16.446 46.273,11.115C45.02,10.166 43.366,10.489 42.667,11.662C41.944,12.848 42.327,14.192 43.476,15.079C49.571,19.462 53.573,26.628 53.573,34.787C53.573,48.254 42.679,59.148 29.213,59.148C15.746,59.148 4.877,48.254 4.877,34.787C4.877,23.179 12.932,13.576 23.706,11.072L23.706,15.18C23.706,17.212 25.087,17.76 26.657,16.652L35.809,10.242C37.117,9.311 37.147,7.954 35.809,7.023L26.687,0.583C25.087,-0.555 23.706,-0.007 23.706,2.055L23.706,6.098C10.28,8.639 -0,20.497 -0,34.787C-0,50.929 13.101,64 29.213,64Z" }), jsx("path", { d: "M21.596,46.561C22.831,46.561 23.585,45.673 23.585,44.438L23.585,26.365C23.585,24.935 22.709,24.096 21.286,24.096C20.118,24.096 19.316,24.613 18.416,25.288L15.162,27.705C14.602,28.131 14.267,28.587 14.267,29.287C14.267,30.108 14.864,30.765 15.685,30.765C16.081,30.765 16.361,30.638 16.689,30.376L19.522,28.258L19.577,28.258L19.577,44.438C19.577,45.679 20.355,46.561 21.596,46.561Z" }), jsx("path", { d: "M36.048,46.731C30.406,46.731 28.426,41.001 28.426,35.298C28.426,29.686 30.375,23.919 36.048,23.919C41.685,23.919 43.659,29.649 43.659,35.298C43.659,40.97 41.679,46.731 36.048,46.731ZM36.048,43.513C38.45,43.513 39.626,39.978 39.626,35.298C39.626,30.673 38.444,27.174 36.048,27.174C33.647,27.174 32.458,30.661 32.458,35.298C32.458,39.984 33.647,43.513 36.048,43.513Z" })] }));
1096
1092
  }
@@ -1316,6 +1312,108 @@ function useFormStatus() {
1316
1312
  return useStore(store => store);
1317
1313
  }
1318
1314
 
1315
+ function usePointerMovement(props) {
1316
+ const pointerTypeRef = useRef('pointer'), [isTracking, setIsTracking] = useState(false), [delta, setDelta] = useState({ x: 0, y: 0 }), startCoordsRef = useRef({ x: 0, y: 0 });
1317
+ const styleID = useId();
1318
+ const changeCursor = (cursor) => {
1319
+ if (cursor === false) {
1320
+ document.querySelector(`#${styleID}`)?.remove();
1321
+ return;
1322
+ }
1323
+ const css = `*, *:active { cursor: ${cursor}; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }`;
1324
+ const style = document.createElement('style');
1325
+ style.id = styleID;
1326
+ style.innerHTML = css;
1327
+ document.body.prepend(style);
1328
+ };
1329
+ const trackPointerMovement = (e) => {
1330
+ changeCursor(props?.activeCursor || 'grabbing');
1331
+ const { type } = e;
1332
+ switch (type) {
1333
+ case 'mousemove':
1334
+ case 'mouseup':
1335
+ case 'pointermove':
1336
+ case 'pointerup':
1337
+ case 'touchmove':
1338
+ case 'touchend':
1339
+ throw new Error('To initiate the tracking of pointer movement, you must use a `mousedown`, `pointerdown`, or `touchstart`.');
1340
+ case 'mousedown':
1341
+ pointerTypeRef.current = 'mouse';
1342
+ break;
1343
+ case 'pointerdown':
1344
+ pointerTypeRef.current = 'pointer';
1345
+ break;
1346
+ case 'touchstart':
1347
+ pointerTypeRef.current = 'touch';
1348
+ break;
1349
+ }
1350
+ let x = 0, y = 0;
1351
+ if ('touches' in e) {
1352
+ const { touches } = e;
1353
+ if (touches.length > 1)
1354
+ return;
1355
+ x = touches[0].clientX;
1356
+ y = touches[0].clientY;
1357
+ }
1358
+ else {
1359
+ x = e.clientX;
1360
+ y = e.clientY;
1361
+ }
1362
+ startCoordsRef.current = { x, y };
1363
+ setIsTracking(true);
1364
+ };
1365
+ const updateDelta = useCallback((e) => {
1366
+ let clientX = 0, clientY = 0;
1367
+ if ('touches' in e) {
1368
+ const { touches } = e;
1369
+ if (touches.length > 1)
1370
+ return;
1371
+ clientX = touches[0].clientX;
1372
+ clientY = touches[0].clientY;
1373
+ }
1374
+ else {
1375
+ clientX = e.clientX;
1376
+ clientY = e.clientY;
1377
+ }
1378
+ const { x, y } = startCoordsRef.current, newDelta = { x: clientX - x, y: clientY - y };
1379
+ setDelta(newDelta);
1380
+ props?.onChange?.(newDelta);
1381
+ }, []);
1382
+ const stopTracking = useCallback(() => {
1383
+ changeCursor(false);
1384
+ setIsTracking(false);
1385
+ props?.onEnd?.(delta);
1386
+ }, [delta]);
1387
+ useEffect(() => {
1388
+ if (typeof window === 'undefined')
1389
+ return;
1390
+ const controller = new AbortController(), signal = controller.signal;
1391
+ if (isTracking) {
1392
+ switch (pointerTypeRef.current) {
1393
+ case 'mouse':
1394
+ document.body.addEventListener('mousemove', updateDelta, { signal });
1395
+ document.body.addEventListener('mouseup', stopTracking, { signal });
1396
+ break;
1397
+ case 'pointer':
1398
+ document.body.addEventListener('pointermove', updateDelta, { signal });
1399
+ document.body.addEventListener('pointerup', stopTracking, { signal });
1400
+ break;
1401
+ case 'touch':
1402
+ document.body.addEventListener('touchmove', updateDelta, { signal });
1403
+ document.body.addEventListener('touchend', stopTracking, { signal });
1404
+ break;
1405
+ }
1406
+ }
1407
+ else {
1408
+ controller.abort();
1409
+ }
1410
+ return () => {
1411
+ controller.abort();
1412
+ };
1413
+ }, [isTracking, updateDelta, stopTracking]);
1414
+ return { delta, stopTracking, trackPointerMovement };
1415
+ }
1416
+
1319
1417
  function Fieldset({ children, className, decorative = false, join, legend, legendProps, name, ...props }) {
1320
1418
  const uniqueID = useId();
1321
1419
  const fieldsetId = toLowerCase(legend || name, [' ', '_']) + '§' + uniqueID;
@@ -4236,37 +4334,30 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
4236
4334
 
4237
4335
  const MAX_PROGRESS = 100;
4238
4336
  function Video({ autoPlay, className, controls = true, poster, ref, srcSet, title, ...props }) {
4239
- const uniqueID = useId(), figureRef = useRef(null), videoPlayerRef = useRef(null), [isPlaying, setIsPlaying] = useState(autoPlay), isFullscreenRef = useRef(false), [isFullscreen, setIsFullscreen] = useState(false), [progress, setProgress] = useState(0), [showControls, setShowControls] = useState(true), pressedKeyListRef = useRef([]), [pressedKeyList, setPressedKeyList] = useState([]), [volume, setVolume] = useState(1);
4240
- const [seekIndicator, setSeekIndicator] = useState({ isInPlayedArea: false, position: 0 });
4241
- const sortedSrcSet = srcSet.sort((a, b) => a.width - b.width);
4337
+ // * General/Core
4338
+ const uniqueID = useId(), figureRef = useRef(null), videoPlayerRef = useRef(null), sortedSrcSet = srcSet.sort((a, b) => a.width - b.width);
4242
4339
  const primaryPoster = poster ? poster.find(({ primary }) => primary)?.src || poster[0].src : '';
4340
+ const preventDefaultEvent = e => e.preventDefault();
4341
+ // * Play/Pause Controls
4342
+ const [isPlaying, setIsPlaying] = useState(autoPlay);
4343
+ const togglePlay = useCallback(() => {
4344
+ setIsPlaying(previous => {
4345
+ if (!previous)
4346
+ videoPlayerRef.current?.play();
4347
+ if (previous)
4348
+ videoPlayerRef.current?.pause();
4349
+ return !previous;
4350
+ });
4351
+ handleMouseMoveControls();
4352
+ }, []);
4353
+ // * Fullscreen Controls
4354
+ const isFullscreenRef = useRef(false), [isFullscreen, setIsFullscreen] = useState(false);
4243
4355
  const updateFullscreenState = useCallback(() => {
4244
4356
  if (Boolean(document.fullscreenElement) !== isFullscreenRef.current) {
4245
4357
  setIsFullscreen(Boolean(document.fullscreenElement));
4246
4358
  isFullscreenRef.current = Boolean(document.fullscreenElement);
4247
4359
  }
4248
4360
  }, []);
4249
- useEffect(() => {
4250
- if (typeof window === 'undefined')
4251
- return;
4252
- document.addEventListener('fullscreenchange', updateFullscreenState);
4253
- return () => {
4254
- document.removeEventListener('fullscreenchange', updateFullscreenState);
4255
- };
4256
- }, []);
4257
- const handleTimeUpdate = () => {
4258
- if (videoPlayerRef.current) {
4259
- const newProgress = (videoPlayerRef.current.currentTime / videoPlayerRef.current.duration) * 100;
4260
- setProgress(prev => (Math.abs(prev - newProgress) > 0.1 ? newProgress : prev));
4261
- }
4262
- };
4263
- const togglePlay = useCallback(() => setIsPlaying(previous => {
4264
- if (!previous)
4265
- videoPlayerRef.current?.play();
4266
- if (previous)
4267
- videoPlayerRef.current?.pause();
4268
- return !previous;
4269
- }), []);
4270
4361
  const toggleFullscreen = () => {
4271
4362
  if (document.fullscreenElement) {
4272
4363
  document.exitFullscreen();
@@ -4280,6 +4371,60 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4280
4371
  figureRef.current?.requestFullscreen();
4281
4372
  }, []);
4282
4373
  const enterPictureInPicture = () => videoPlayerRef.current?.requestPictureInPicture();
4374
+ useEffect(() => {
4375
+ if (typeof window === 'undefined')
4376
+ return;
4377
+ document.addEventListener('fullscreenchange', updateFullscreenState);
4378
+ return () => {
4379
+ document.removeEventListener('fullscreenchange', updateFullscreenState);
4380
+ };
4381
+ }, []);
4382
+ // * Progress/Seeking Controls
4383
+ const [progress, setProgress] = useState(0), trackProgressStartTimeRef = useRef(0), [seekIndicator, setSeekIndicator] = useState({ isInPlayedArea: false, position: 0 }), seekIndicatorMouseDownPositionRef = useRef(0), scrubberRef = useRef(null), [timeRemaining, setTimeRemaining] = useState(0);
4384
+ const handleTimeUpdate = () => {
4385
+ const videoPlayer = videoPlayerRef.current;
4386
+ if (!videoPlayer)
4387
+ return;
4388
+ const { currentTime, duration } = videoPlayer;
4389
+ const newProgress = (currentTime / duration) * 100;
4390
+ setProgress(prev => (Math.abs(prev - newProgress) > 0.1 ? newProgress : prev));
4391
+ setTimeRemaining(duration - currentTime);
4392
+ };
4393
+ const handleProgressSlider = ({ x }) => {
4394
+ const videoPlayer = videoPlayerRef.current, scrubber = scrubberRef.current;
4395
+ if (!videoPlayer || !scrubber)
4396
+ return;
4397
+ const { duration } = videoPlayer, { width } = scrubber.getBoundingClientRect();
4398
+ videoPlayer.fastSeek(Math.max(Math.min(trackProgressStartTimeRef.current + x / (width / duration), duration - 1), 0));
4399
+ };
4400
+ const { trackPointerMovement: trackProgress } = usePointerMovement({ onChange: handleProgressSlider });
4401
+ const initiateTrackProgress = (e) => {
4402
+ const videoPlayer = videoPlayerRef.current;
4403
+ if (!videoPlayer)
4404
+ return;
4405
+ trackProgress(e);
4406
+ trackProgressStartTimeRef.current = videoPlayer.currentTime;
4407
+ };
4408
+ const handleSeekIndicatorMovement = e => {
4409
+ const videoPlayer = videoPlayerRef.current;
4410
+ if (!videoPlayer)
4411
+ return;
4412
+ const { currentTime, duration } = videoPlayer;
4413
+ const { clientX, currentTarget } = e, { width, x } = currentTarget.getBoundingClientRect();
4414
+ const position = clientX - x;
4415
+ const isInPlayedArea = position <= width / (duration / currentTime);
4416
+ setSeekIndicator({ isInPlayedArea, position });
4417
+ };
4418
+ const initializeSeeking = () => (seekIndicatorMouseDownPositionRef.current = seekIndicator.position);
4419
+ const handleSeekRelease = e => {
4420
+ const videoPlayer = videoPlayerRef.current;
4421
+ if (!videoPlayer)
4422
+ return;
4423
+ const { duration } = videoPlayer, { currentTarget } = e, { width } = currentTarget.getBoundingClientRect();
4424
+ if (seekIndicatorMouseDownPositionRef.current === seekIndicator.position)
4425
+ videoPlayer.fastSeek(Math.min(duration / (width / seekIndicatorMouseDownPositionRef.current), duration - 1));
4426
+ };
4427
+ // * Skip Controls
4283
4428
  const [skipDuration, setSkipDuration] = useState(10);
4284
4429
  const getSkipAmount = () => {
4285
4430
  const modifierKeyList = pressedKeyListRef.current;
@@ -4301,19 +4446,71 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4301
4446
  return skipAmount;
4302
4447
  };
4303
4448
  const skipBack = useCallback(() => {
4304
- if (!videoPlayerRef.current)
4449
+ const videoPlayer = videoPlayerRef.current;
4450
+ if (!videoPlayer)
4305
4451
  return;
4306
- const { currentTime } = videoPlayerRef.current;
4452
+ const { currentTime } = videoPlayer;
4307
4453
  const skipAmount = getSkipAmount();
4308
- videoPlayerRef.current.fastSeek(Math.max(currentTime - skipAmount, 0));
4454
+ videoPlayer.fastSeek(Math.max(currentTime - skipAmount, 0));
4309
4455
  }, []);
4310
4456
  const skipForward = useCallback(() => {
4311
- if (!videoPlayerRef.current)
4457
+ const videoPlayer = videoPlayerRef.current;
4458
+ if (!videoPlayer)
4312
4459
  return;
4313
- const { currentTime, duration } = videoPlayerRef.current;
4460
+ const { currentTime, duration } = videoPlayer;
4314
4461
  const skipAmount = getSkipAmount();
4315
- videoPlayerRef.current.fastSeek(Math.min(currentTime + skipAmount, duration - 1));
4462
+ videoPlayer.fastSeek(Math.min(currentTime + skipAmount, duration - 1));
4316
4463
  }, []);
4464
+ // * Volume Controls
4465
+ const [volume, setVolume] = useState(1), trackVolumeStartRef = useRef(0);
4466
+ const handleVolumeChange = e => {
4467
+ const { currentTarget } = e, { volume } = currentTarget;
4468
+ setVolume(volume);
4469
+ };
4470
+ const handleVolumeSlider = ({ y }) => {
4471
+ const videoPlayer = videoPlayerRef.current;
4472
+ if (!videoPlayer)
4473
+ return;
4474
+ videoPlayer.volume = Math.max(Math.min(trackVolumeStartRef.current + (y / 96) * -1, 1), 0);
4475
+ };
4476
+ const { trackPointerMovement: trackVolume } = usePointerMovement({ onChange: handleVolumeSlider });
4477
+ const initiateTrackVolume = (e) => {
4478
+ const videoPlayer = videoPlayerRef.current;
4479
+ if (!videoPlayer)
4480
+ return;
4481
+ trackVolume(e);
4482
+ trackVolumeStartRef.current = videoPlayer.volume;
4483
+ };
4484
+ const increaseVolume = () => {
4485
+ const videoPlayer = videoPlayerRef.current;
4486
+ if (!videoPlayer)
4487
+ return;
4488
+ videoPlayer.volume += 0.1;
4489
+ };
4490
+ const decreaseVolume = () => {
4491
+ const videoPlayer = videoPlayerRef.current;
4492
+ if (!videoPlayer)
4493
+ return;
4494
+ videoPlayer.volume -= 0.1;
4495
+ };
4496
+ // * Controls Visibility
4497
+ const [showControls, setShowControls] = useState(true), mouseMoveTimeoutRef = useRef(undefined);
4498
+ const displayControls = () => {
4499
+ if (!showControls)
4500
+ setShowControls(true);
4501
+ };
4502
+ const hideControls = () => {
4503
+ if (!videoPlayerRef.current?.paused)
4504
+ setShowControls(false);
4505
+ };
4506
+ const handleMouseMoveControls = () => {
4507
+ clearTimeout(mouseMoveTimeoutRef.current);
4508
+ displayControls();
4509
+ mouseMoveTimeoutRef.current = setTimeout(() => hideControls(), 1500);
4510
+ };
4511
+ const clearMouseMoveControlsTimeout = () => clearTimeout(mouseMoveTimeoutRef.current);
4512
+ // * Keyboard Controls
4513
+ const pressedKeyListRef = useRef([]), [pressedKeyList, setPressedKeyList] = useState([]);
4317
4514
  const updateModifierKeys = useCallback(({ metaKey, altKey, shiftKey, ctrlKey, }) => {
4318
4515
  if ((metaKey && !pressedKeyListRef.current.includes('meta')) ||
4319
4516
  (altKey && !pressedKeyListRef.current.includes('alt')) ||
@@ -4337,7 +4534,6 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4337
4534
  getSkipAmount();
4338
4535
  }
4339
4536
  }, []);
4340
- const preventContextMenu = e => e.preventDefault();
4341
4537
  const handleKeydown = useCallback((e) => {
4342
4538
  const { key, metaKey, altKey, shiftKey, ctrlKey } = e;
4343
4539
  updateModifierKeys({ metaKey, altKey, shiftKey, ctrlKey });
@@ -4356,10 +4552,10 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4356
4552
  skipBack();
4357
4553
  break;
4358
4554
  case 'ArrowUp':
4359
- // Volume up
4555
+ increaseVolume();
4360
4556
  break;
4361
4557
  case 'ArrowDown':
4362
- // Volume down
4558
+ decreaseVolume();
4363
4559
  break;
4364
4560
  case 'f':
4365
4561
  requestFullscreen();
@@ -4373,85 +4569,54 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4373
4569
  useEffect(() => {
4374
4570
  if (typeof window === 'undefined')
4375
4571
  return;
4376
- document.addEventListener('keydown', handleKeydown);
4377
- document.addEventListener('keyup', handleKeyup);
4572
+ const controller = new AbortController(), signal = controller.signal;
4573
+ document.addEventListener('keydown', handleKeydown, { signal });
4574
+ document.addEventListener('keyup', handleKeyup, { signal });
4378
4575
  return () => {
4379
- document.removeEventListener('keydown', handleKeydown);
4380
- document.removeEventListener('keyup', handleKeyup);
4576
+ controller.abort();
4381
4577
  };
4382
4578
  }, [handleKeydown, handleKeyup]);
4579
+ // * Remote Playback Controls
4383
4580
  const handleRemotePlayback = () => videoPlayerRef.current?.remote.prompt();
4384
- const handleSeekIndicatorMovement = e => {
4385
- if (!videoPlayerRef.current)
4386
- return;
4387
- const { currentTime, duration } = videoPlayerRef.current;
4388
- const { clientX, currentTarget } = e, { width, x } = currentTarget.getBoundingClientRect();
4389
- const position = clientX - x;
4390
- const isInPlayedArea = position <= width / (duration / currentTime);
4391
- setSeekIndicator({ isInPlayedArea, position });
4392
- };
4393
- const seekIndicatorMouseDownPositionRef = useRef(0);
4394
- const initializeSeeking = () => (seekIndicatorMouseDownPositionRef.current = seekIndicator.position);
4395
- const handleSeekRelease = e => {
4396
- if (!videoPlayerRef.current)
4397
- return;
4398
- const { duration } = videoPlayerRef.current, { currentTarget } = e, { width } = currentTarget.getBoundingClientRect();
4399
- if (seekIndicatorMouseDownPositionRef.current === seekIndicator.position)
4400
- videoPlayerRef.current.fastSeek(Math.min(duration / (width / seekIndicatorMouseDownPositionRef.current), duration - 1));
4401
- };
4402
- const mouseMoveTimeoutRef = useRef(undefined);
4403
- const displayControls = () => {
4404
- if (!showControls)
4405
- setShowControls(true);
4406
- };
4407
- const hideControls = () => {
4408
- if (!videoPlayerRef.current?.paused)
4409
- setShowControls(false);
4410
- };
4411
- const handleMouseMoveControls = () => {
4412
- clearTimeout(mouseMoveTimeoutRef.current);
4413
- displayControls();
4414
- mouseMoveTimeoutRef.current = setTimeout(() => hideControls(), 1500);
4415
- };
4416
- const clearMouseMoveControlsTimeout = () => clearTimeout(mouseMoveTimeoutRef.current);
4581
+ // * Progressive Enhancement
4417
4582
  const progressiveEnhancementSourceLengthRef = useRef(1);
4418
4583
  const [progressiveEnhancementList, setProgressiveEnhancementList] = useState(sortedSrcSet.filter((_, index) => index < progressiveEnhancementSourceLengthRef.current));
4419
4584
  const handleProEnhance = e => {
4420
4585
  const { currentTarget } = e, { currentSrc, currentTime } = currentTarget;
4421
- console.log('current:', currentSrc);
4422
4586
  const proEnhanceSrcLength = progressiveEnhancementSourceLengthRef.current + 1, updatedProEnhanceList = sortedSrcSet.filter((_, index) => index < proEnhanceSrcLength);
4423
4587
  console.log(updatedProEnhanceList);
4424
4588
  setProgressiveEnhancementList(updatedProEnhanceList);
4425
4589
  progressiveEnhancementSourceLengthRef.current = proEnhanceSrcLength;
4426
- const srcToCompare = typeof updatedProEnhanceList[-1].src === 'string'
4427
- ? updatedProEnhanceList[-1].src
4428
- : updatedProEnhanceList[-1].srcGroup;
4590
+ const srcToCompare = typeof updatedProEnhanceList.at(-1)?.src === 'string'
4591
+ ? updatedProEnhanceList.at(-1)?.src
4592
+ : updatedProEnhanceList.at(-1)?.srcGroup;
4429
4593
  if (!srcToCompare)
4430
4594
  return;
4431
4595
  if ((Array.isArray(srcToCompare) && srcToCompare.every(({ src }) => src !== currentSrc)) ||
4432
4596
  (!Array.isArray(srcToCompare) && srcToCompare !== currentSrc)) {
4433
- const srcType = currentSrc.split('.')[-1];
4597
+ const srcType = currentSrc.split('.').at(-1);
4434
4598
  const src = Array.isArray(srcToCompare)
4435
- ? srcToCompare.find(({ src }) => src.split('.')[-1] === srcType)?.src || srcToCompare[0].src
4599
+ ? srcToCompare.find(({ src }) => src.split('.').at(-1) === srcType)?.src || srcToCompare[0].src
4436
4600
  : srcToCompare;
4437
4601
  if (!src)
4438
4602
  return;
4439
- console.log('updated:', src);
4440
4603
  currentTarget.src = src;
4441
4604
  currentTarget.currentTime = currentTime || 0;
4442
4605
  currentTarget.load();
4443
4606
  }
4444
4607
  };
4608
+ // * Download Controls
4445
4609
  const captureCurrentFrame = () => {
4446
- if (!videoPlayerRef.current)
4610
+ const videoPlayer = videoPlayerRef.current;
4611
+ if (!videoPlayer)
4447
4612
  return;
4448
- const { videoHeight, videoWidth } = videoPlayerRef.current;
4613
+ const { videoHeight, videoWidth } = videoPlayer;
4449
4614
  const canvas = document.createElement('canvas'), canvasContext = canvas.getContext('2d');
4450
4615
  if (!canvasContext)
4451
4616
  return;
4452
4617
  canvas.width = videoWidth;
4453
4618
  canvas.height = videoHeight;
4454
- canvasContext.drawImage(videoPlayerRef.current, 0, 0, canvas.width, canvas.height);
4619
+ canvasContext.drawImage(videoPlayer, 0, 0, canvas.width, canvas.height);
4455
4620
  canvas.toBlob(blob => {
4456
4621
  if (!blob)
4457
4622
  return;
@@ -4464,30 +4629,27 @@ function Video({ autoPlay, className, controls = true, poster, ref, srcSet, titl
4464
4629
  URL.revokeObjectURL(url);
4465
4630
  }, 'image/jpeg', 0.9);
4466
4631
  };
4467
- const increaseVolume = () => {
4468
- if (!videoPlayerRef.current)
4469
- return;
4470
- videoPlayerRef.current.volume += 0.1;
4471
- setVolume(videoPlayerRef.current.volume);
4472
- };
4473
- const decreaseVolume = () => {
4474
- if (!videoPlayerRef.current)
4475
- return;
4476
- videoPlayerRef.current.volume -= 0.1;
4477
- setVolume(videoPlayerRef.current.volume);
4478
- };
4479
- return (jsxs("figure", { ...(showControls ? { 'data-controls': true } : {}), ...(isFullscreen ? { 'data-fullscreen': true } : {}), ...(isPlaying ? { 'data-playing': true } : {}), ...Object.fromEntries(pressedKeyList.map(key => [`data-${key}`, true])), className: twMerge('group/video isolate aspect-video w-full overflow-clip', className), onMouseEnter: displayControls, onMouseLeave: hideControls, ref: figureRef, children: [jsx("video", { ...props, className: 'size-full object-cover', onLoad: handleProEnhance, onLoadedMetadata: handleProEnhance, onTimeUpdate: handleTimeUpdate, poster: primaryPoster, ref: videoPlayerRef || ref, title: title, children: progressiveEnhancementList.map(({ width, ...source }) => {
4632
+ return (jsxs("figure", { ...(showControls ? { 'data-controls': true } : {}), ...(isFullscreen ? { 'data-fullscreen': true } : {}), ...(isPlaying ? { 'data-playing': true } : {}), ...Object.fromEntries(pressedKeyList.map(key => [`data-${key}`, true])), className: twMerge('group/video isolate aspect-video w-full overflow-clip', className), onMouseEnter: displayControls, onMouseLeave: hideControls, ref: figureRef, children: [jsx("video", { ...props, className: 'size-full object-cover', onLoad: handleProEnhance, onTimeUpdate: handleTimeUpdate, onVolumeChange: handleVolumeChange, poster: primaryPoster, ref: videoPlayerRef || ref, title: title, children: progressiveEnhancementList.map(({ width, ...source }) => {
4480
4633
  if (source.srcGroup) {
4481
4634
  const { srcGroup } = source;
4482
4635
  return srcGroup.map(({ src, type }) => (jsx("source", { src: src, type: type }, `${title}${type}${width}${uniqueID}`)));
4483
4636
  }
4484
4637
  const { src, type } = source;
4485
4638
  return jsx("source", { src: src, type: type }, `${title}${type}${width}${uniqueID}`);
4486
- }) }), controls && (jsxs("div", { className: 'absolute inset-0 isolate text-neutral-50 opacity-0 transition-opacity duration-1000 ease-exponential group-data-controls/video:opacity-100', children: [jsxs("div", { className: 'grid-flow-cols absolute top-1/2 left-1/2 grid -translate-x-1/2 -translate-y-1/2 place-items-center gap-2', children: [jsxs("button", { className: 'col-start-1 col-end-2 row-start-0 row-end-1 grid size-16 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: togglePlay, onContextMenu: preventContextMenu, title: isPlaying ? 'Pause' : 'Play', children: [jsx(PauseFill, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-0 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 transition-[scale,opacity] duration-500 ease-exponential group-data-playing/video:scale-60 group-data-playing/video:opacity-100' }), jsx(PlayFill, { className: '-right-0.5 col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 transition-[scale,opacity] duration-500 ease-exponential group-data-playing/video:scale-0 group-data-playing/video:opacity-0' })] }), jsxs("button", { className: 'col-start-0 col-end-1 row-start-0 row-end-1 grid size-12 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: skipBack, onContextMenu: preventContextMenu, title: `Skip Back ${skipDuration} Seconds`, children: [jsx(FiveArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-meta/video:group-data-ctrl/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(TenArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-0 group-data-alt/video:group-data-ctrl/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(FifteenArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-100 group-data-ctrl/video:opacity-0 group-data-meta/video:opacity-0 group-data-shift/video:opacity-0' }), jsx(ThirtyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:opacity-100 group-data-alt/video:group-data-ctrl/video:group-data-shift/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(SixtyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(NinetyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-100' })] }), jsxs("button", { className: 'col-start-2 col-end-3 row-start-0 row-end-1 grid size-12 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: skipForward, onContextMenu: preventContextMenu, title: `Skip Forward ${skipDuration} Seconds`, children: [jsx(FiveArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-meta/video:group-data-ctrl/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(TenArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-0 group-data-alt/video:group-data-ctrl/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(FifteenArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-100 group-data-ctrl/video:opacity-0 group-data-meta/video:opacity-0 group-data-shift/video:opacity-0' }), jsx(ThirtyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:opacity-100 group-data-alt/video:group-data-ctrl/video:group-data-shift/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(SixtyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(NinetyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-100' })] })] }), jsxs("div", { className: 'absolute inset-x-2 bottom-2 flex items-center gap-2 rounded-xl bg-neutral-900/50 px-2 py-1 shadow-2xl backdrop-blur-xs backdrop-brightness-110', children: [jsxs("div", { className: 'group/scrubber h-2 w-max flex-grow cursor-grab overflow-clip rounded-md bg-neutral-50/50 backdrop-blur-xs backdrop-brightness-110 transition-[height] duration-300 ease-exponential active:h-4 pointer-fine:hover:h-4 pointer-fine:active:h-4', onMouseDown: initializeSeeking, onMouseMove: handleSeekIndicatorMovement, onMouseUp: handleSeekRelease, children: [jsx("div", { "aria-hidden": 'true', className: 'absolute inset-0 grid transition-cols duration-100 ease-linear', style: { gridTemplateColumns: `${progress / MAX_PROGRESS}fr` }, children: jsx("div", { className: 'overflow-hidden', children: jsxs("div", { className: 'h-full bg-neutral-50/70 text-[1px] text-transparent backdrop-blur-xs backdrop-brightness-125', children: [progress, "/", MAX_PROGRESS] }) }) }), jsx("div", { ...(seekIndicator.isInPlayedArea ? { 'data-in-played-area': true } : {}), "aria-hidden": 'true', className: 'absolute inset-y-0 w-1 cursor-grab bg-neutral-50 opacity-0 transition-opacity duration-300 ease-exponential group-hover/scrubber:opacity-100 data-in-played-area:bg-neutral-500 pointer-coarse:hidden', style: { transform: `translateX(${seekIndicator.position}px)` }, children: "\u00A0" }), jsx("progress", { className: 'sr-only', max: MAX_PROGRESS, value: progress })] }), jsxs(DropDown, { children: [jsx(DropDownButton, { arrow: false, className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', title: 'Volume', children: jsx(SpeakerWave3Fill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsxs(DropDownItems, { anchor: {
4639
+ }) }), controls && (jsxs("div", { className: 'absolute inset-0 isolate text-neutral-50 opacity-0 transition-opacity duration-1000 ease-exponential select-none group-data-controls/video:opacity-100', children: [jsxs("div", { className: 'grid-flow-cols absolute top-1/2 left-1/2 grid -translate-x-1/2 -translate-y-1/2 place-items-center gap-2', children: [jsxs("button", { className: 'col-start-1 col-end-2 row-start-0 row-end-1 grid size-16 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: togglePlay, onContextMenu: preventDefaultEvent, title: isPlaying ? 'Pause' : 'Play', children: [jsx(PauseFill, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-0 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 transition-[scale,opacity] duration-500 ease-exponential group-data-playing/video:scale-60 group-data-playing/video:opacity-100' }), jsx(PlayFill, { className: '-right-0.5 col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 transition-[scale,opacity] duration-500 ease-exponential group-data-playing/video:scale-0 group-data-playing/video:opacity-0' })] }), jsxs("button", { className: 'col-start-0 col-end-1 row-start-0 row-end-1 grid size-12 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: skipBack, onContextMenu: preventDefaultEvent, title: `Skip Back ${skipDuration} Seconds`, children: [jsx(FiveArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-meta/video:group-data-ctrl/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(TenArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-0 group-data-alt/video:group-data-ctrl/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(FifteenArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-100 group-data-ctrl/video:opacity-0 group-data-meta/video:opacity-0 group-data-shift/video:opacity-0' }), jsx(ThirtyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:opacity-100 group-data-alt/video:group-data-ctrl/video:group-data-shift/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(SixtyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(NinetyArrowTriangleheadCounterclockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-100' })] }), jsxs("button", { className: 'col-start-2 col-end-3 row-start-0 row-end-1 grid size-12 rounded-full backdrop-blur-[1px] backdrop-brightness-101 transition-[scale,-webkit-backdrop-filter,backdrop-filter] duration-300 ease-exponential active:scale-95 active:backdrop-blur-[2px] active:backdrop-brightness-125 pointer-fine:hover:scale-105 pointer-fine:hover:backdrop-blur-xs pointer-fine:hover:backdrop-brightness-110 pointer-fine:active:scale-95 pointer-fine:active:backdrop-blur-[2px] pointer-fine:active:backdrop-brightness-125', onClick: skipForward, onContextMenu: preventDefaultEvent, title: `Skip Forward ${skipDuration} Seconds`, children: [jsx(FiveArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-meta/video:group-data-ctrl/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(TenArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-0 group-data-alt/video:group-data-ctrl/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(FifteenArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:opacity-100 group-data-ctrl/video:opacity-0 group-data-meta/video:opacity-0 group-data-shift/video:opacity-0' }), jsx(ThirtyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:opacity-100 group-data-alt/video:group-data-ctrl/video:group-data-shift/video:opacity-0 group-data-alt/video:group-data-meta/video:group-data-shift/video:opacity-0' }), jsx(SixtyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:opacity-100 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-0' }), jsx(NinetyArrowTriangleheadClockwise, { className: 'col-start-0 col-end-1 row-start-0 row-end-1 size-full scale-60 opacity-0 drop-shadow-[0_.25rem_2rem] drop-shadow-neutral-950/75 group-data-alt/video:group-data-shift/video:group-data-meta/video:group-data-ctrl/video:opacity-100' })] })] }), jsxs("div", { className: 'absolute inset-x-2 bottom-2 flex items-center gap-2 rounded-xl bg-neutral-900/50 px-2 py-1 shadow-2xl backdrop-blur-xs backdrop-brightness-110', children: [jsxs("div", { className: 'group/scrubber h-2 w-max flex-grow cursor-grab overflow-clip rounded-md bg-neutral-50/50 backdrop-blur-xs backdrop-brightness-110 transition-[height] duration-300 ease-exponential active:h-4 pointer-fine:hover:h-4 pointer-fine:active:h-4', onMouseDown: e => {
4640
+ initiateTrackProgress(e);
4641
+ initializeSeeking();
4642
+ }, onMouseMove: handleSeekIndicatorMovement, onMouseUp: handleSeekRelease, onTouchStart: initiateTrackProgress, ref: scrubberRef, children: [jsx("div", { "aria-hidden": 'true', className: 'absolute inset-0 grid transition-cols duration-100 ease-linear', style: { gridTemplateColumns: `${progress / MAX_PROGRESS}fr` }, children: jsx("div", { className: 'overflow-hidden', children: jsxs("div", { className: 'h-full bg-neutral-50/70 text-[1px] text-transparent backdrop-blur-xs backdrop-brightness-125', children: [progress, "/", MAX_PROGRESS] }) }) }), jsx("div", { ...(seekIndicator.isInPlayedArea ? { 'data-in-played-area': true } : {}), "aria-hidden": 'true', className: 'absolute inset-y-0 w-1 cursor-grab bg-neutral-50 opacity-0 transition-opacity duration-300 ease-exponential group-hover/scrubber:opacity-100 data-in-played-area:bg-neutral-500 pointer-coarse:hidden', style: { transform: `translateX(${seekIndicator.position}px)` }, children: "\u00A0" }), jsx("progress", { className: 'sr-only', max: MAX_PROGRESS, value: progress })] }), jsx("span", { className: 'block text-xs', children: timeRemaining / 60 >= 1
4643
+ ? `${Math.round(timeRemaining / 60)}:${Math.round((timeRemaining / 60 - Math.round(timeRemaining / 60)) * 60)
4644
+ .toString()
4645
+ .padStart(2, '0')}`
4646
+ : Math.round(timeRemaining) === 60
4647
+ ? `1:00`
4648
+ : `0:${Math.round(timeRemaining).toString().padStart(2, '0')}` }), jsxs(DropDown, { children: [jsx(DropDownButton, { arrow: false, className: 'group/button flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', title: 'Volume', children: jsxs("svg", { viewBox: '0 0 64 47', className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75 transition-transform duration-300 ease-exponential', style: { translate: `${volume > 0.66 ? '0' : volume > 0.33 ? '2px' : volume > 0 ? '4px' : '6px'} 0` }, children: [jsx("path", { d: 'M25.707,44.076C27.257,44.076 28.39,42.947 28.39,41.387L28.39,4.841C28.39,3.307 27.257,2.025 25.656,2.025C24.542,2.025 23.767,2.512 22.558,3.666L12.393,13.203C12.251,13.345 12.047,13.436 11.818,13.436L4.99,13.436C1.759,13.436 0,15.195 0,18.654L0,27.525C0,30.953 1.759,32.737 4.99,32.737L11.818,32.737C12.047,32.737 12.251,32.808 12.393,32.95L22.558,42.583C23.666,43.615 24.593,44.076 25.707,44.076Z' }), jsx("path", { className: 'transition-opacity duration-300 ease-exponential', d: 'M36.874,33.192C37.684,33.728 38.797,33.566 39.439,32.64C41.265,30.222 42.371,26.683 42.371,23.026C42.371,19.368 41.265,15.855 39.439,13.411C38.797,12.485 37.684,12.323 36.874,12.885C35.923,13.553 35.761,14.721 36.505,15.713C37.901,17.607 38.662,20.249 38.662,23.026C38.662,25.802 37.876,28.419 36.505,30.338C35.786,31.355 35.923,32.498 36.874,33.192Z', style: { opacity: volume > 0 ? 1 : 0 } }), jsx("path", { className: 'transition-opacity duration-300 ease-exponential', d: 'M45.738,39.394C46.624,39.981 47.712,39.799 48.354,38.868C51.402,34.69 53.208,28.904 53.208,23.026C53.208,17.148 51.427,11.31 48.354,7.183C47.712,6.252 46.624,6.07 45.738,6.657C44.858,7.249 44.701,8.362 45.399,9.354C48.023,13.032 49.499,17.952 49.499,23.026C49.499,28.099 47.972,32.994 45.399,36.697C44.726,37.689 44.858,38.802 45.738,39.394Z', style: { opacity: volume > 0.33 ? 1 : 0 } }), jsx("path", { className: 'transition-opacity duration-300 ease-exponential', d: 'M54.679,45.708C55.514,46.32 56.683,46.082 57.315,45.121C61.498,39.091 64,31.447 64,23.026C64,14.604 61.422,6.986 57.315,0.93C56.683,-0.056 55.514,-0.269 54.679,0.343C53.804,0.956 53.668,2.079 54.33,3.071C58.012,8.514 60.342,15.379 60.342,23.026C60.342,30.647 58.012,37.562 54.33,42.98C53.668,43.972 53.804,45.095 54.679,45.708Z', style: { opacity: volume > 0.66 ? 1 : 0 } })] }) }), jsxs(DropDownItems, { anchor: {
4487
4649
  gap: '.5rem',
4488
4650
  padding: '.375rem',
4489
4651
  to: 'top',
4490
- }, className: 'bg-neutral-900/50 px-1.5 py-1.5 text-neutral-50 backdrop-blur-xs backdrop-brightness-110', static: true, children: [jsx(DropDownItem, { as: 'button', className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: increaseVolume, title: 'Increase volume', children: jsx(SpeakerPlusFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx(DropDownSeparator, { className: 'mx-auto my-2 h-24 w-2 cursor-grab overflow-clip rounded-md bg-neutral-50/50 backdrop-blur-xs backdrop-brightness-110 transition-[width] duration-300 ease-exponential active:w-4 pointer-fine:hover:w-4 pointer-fine:active:w-4', children: jsx("div", { className: 'grid size-full rotate-180 transition-rows duration-300 ease-exponential', style: { gridTemplateRows: `${volume}fr` }, children: jsx("div", { className: 'overflow-y-hidden', children: jsxs("div", { className: 'size-full bg-neutral-50/70 text-[1px] text-transparent backdrop-blur-xs backdrop-brightness-125', children: [volume * 100, "%"] }) }) }) }), jsx(DropDownItem, { as: 'button', className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: decreaseVolume, title: 'Decrease volume', children: jsx(SpeakerMinusFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) })] })] }), jsx("button", { className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: enterPictureInPicture, title: 'Enter Picture-in-Picture', children: jsx(RectangleFillOnArrowDownForwardTopleadingRectangle, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx("button", { className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: handleRemotePlayback, title: 'Remote Playback', children: jsx(RectangleTriangleUp, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsxs(DropDown, { children: [jsx(DropDownButton, { arrow: false, className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', title: 'Other Settings', children: jsx(GearshapeFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx(DropDownItems, { anchor: {
4652
+ }, className: 'bg-neutral-900/50 px-1.5 py-1.5 text-neutral-50 backdrop-blur-xs backdrop-brightness-110', children: [jsx(DropDownItem, { as: 'button', className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: increaseVolume, title: 'Increase volume', children: jsx(SpeakerPlusFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx(DropDownSeparator, { "aria-label": 'Volume slider', "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": volume * 100, className: 'mx-auto my-2 h-24 w-2 cursor-grab overflow-clip rounded-md bg-neutral-50/50 backdrop-blur-xs backdrop-brightness-110 transition-[width] duration-300 ease-exponential active:w-4 pointer-fine:hover:w-4 pointer-fine:active:w-4', onMouseDown: initiateTrackVolume, onTouchStart: initiateTrackVolume, role: 'slider', children: jsx("div", { "aria-hidden": 'true', className: 'grid size-full rotate-180 transition-rows duration-300 ease-exponential', style: { gridTemplateRows: `${volume}fr` }, children: jsx("div", { className: 'overflow-y-hidden', children: jsxs("div", { className: 'size-full bg-neutral-50/70 text-[1px] text-transparent backdrop-blur-xs backdrop-brightness-125', children: [volume * 100, "%"] }) }) }) }), jsx(DropDownItem, { as: 'button', className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: decreaseVolume, title: 'Decrease volume', children: jsx(SpeakerMinusFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) })] })] }), jsx("button", { className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: enterPictureInPicture, title: 'Enter Picture-in-Picture', children: jsx(RectangleFillOnArrowDownForwardTopleadingRectangle, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx("button", { className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', onClick: handleRemotePlayback, title: 'Remote Playback', children: jsx(RectangleTriangleUp, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsxs(DropDown, { children: [jsx(DropDownButton, { arrow: false, className: 'flex size-6 items-center justify-center rounded-xs transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:hover:scale-105 pointer-fine:active:scale-95', title: 'Other Settings', children: jsx(GearshapeFill, { className: 'size-full scale-80 drop-shadow-[0_.125rem_1rem] drop-shadow-neutral-950/75' }) }), jsx(DropDownItems, { anchor: {
4491
4653
  gap: '.5rem',
4492
4654
  padding: '.375rem',
4493
4655
  to: 'top end',