@epic-web/workshop-app 4.6.5 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (811) hide show
  1. package/build/client/assets/{_-COWH0sBh.js → _-Bd2gNcck.js} +2 -2
  2. package/build/client/assets/{_-COWH0sBh.js.map → _-Bd2gNcck.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-D5XVFEL6.js → _exerciseNumber-CFOo2dQj.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-D5XVFEL6.js.map → _exerciseNumber-CFOo2dQj.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-C37pli7_.js → _exerciseNumber_._stepNumber-DCbWNWpZ.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-C37pli7_.js.map → _exerciseNumber_._stepNumber-DCbWNWpZ.js.map} +1 -1
  7. package/build/client/assets/_exerciseNumber_.finished-P7xMAtl1.js +2 -0
  8. package/build/client/assets/_exerciseNumber_.finished-P7xMAtl1.js.map +1 -0
  9. package/build/client/assets/_layout-Bdd3mpVx.js +2 -0
  10. package/build/client/assets/_layout-Bdd3mpVx.js.map +1 -0
  11. package/build/client/assets/_layout-DHBLG7Ti.js +6 -0
  12. package/build/client/assets/_layout-DHBLG7Ti.js.map +1 -0
  13. package/build/client/assets/_layout-DaZNLfOL.js +2 -0
  14. package/build/client/assets/{_layout-BR-Qyofe.js.map → _layout-DaZNLfOL.js.map} +1 -1
  15. package/build/client/assets/{_layout-D0zbQZjf.js → _layout-rEQoj43V.js} +2 -2
  16. package/build/client/assets/{_layout-D0zbQZjf.js.map → _layout-rEQoj43V.js.map} +1 -1
  17. package/build/client/assets/{account-DesvwOeg.js → account-CnLkZd_O.js} +2 -2
  18. package/build/client/assets/{account-DesvwOeg.js.map → account-CnLkZd_O.js.map} +1 -1
  19. package/build/client/assets/{button-BfWwrI9B.js → button-CyZl24U2.js} +2 -2
  20. package/build/client/assets/{button-BfWwrI9B.js.map → button-CyZl24U2.js.map} +1 -1
  21. package/build/client/assets/{client-hints-BKxdo5Js.js → client-hints-BE5mB4r0.js} +2 -2
  22. package/build/client/assets/{client-hints-BKxdo5Js.js.map → client-hints-BE5mB4r0.js.map} +1 -1
  23. package/build/client/assets/components-BMzmvxYw.js +166 -0
  24. package/build/client/assets/components-BMzmvxYw.js.map +1 -0
  25. package/build/client/assets/diff-P5f7-8E4.js +2 -0
  26. package/build/client/assets/diff-P5f7-8E4.js.map +1 -0
  27. package/build/client/assets/diff-PfwTHr6-.js +2 -0
  28. package/build/client/assets/{diff-KDzcgGYL.js.map → diff-PfwTHr6-.js.map} +1 -1
  29. package/build/client/assets/{discord-0kv66Q6F.js → discord-COPE8EOZ.js} +2 -2
  30. package/build/client/assets/{discord-0kv66Q6F.js.map → discord-COPE8EOZ.js.map} +1 -1
  31. package/build/client/assets/discord-DIog7bBO.js +2 -0
  32. package/build/client/assets/discord-DIog7bBO.js.map +1 -0
  33. package/build/client/assets/entry.client-B0vV2fsa.js +43 -0
  34. package/build/client/assets/entry.client-B0vV2fsa.js.map +1 -0
  35. package/build/client/assets/{epic-video-BwtXsHGU.js → epic-video-CYnG2ziQ.js} +128 -128
  36. package/build/client/assets/epic-video-CYnG2ziQ.js.map +1 -0
  37. package/build/client/assets/{error-boundary-Bcric_4t.js → error-boundary-DxfVshQ5.js} +2 -2
  38. package/build/client/assets/{error-boundary-Bcric_4t.js.map → error-boundary-DxfVshQ5.js.map} +1 -1
  39. package/build/client/assets/finished-DP5ynR5u.js +2 -0
  40. package/build/client/assets/finished-DP5ynR5u.js.map +1 -0
  41. package/build/client/assets/index-4E9_Sx3m.js +42 -0
  42. package/build/client/assets/index-4E9_Sx3m.js.map +1 -0
  43. package/build/client/assets/{index-Bg9MMnnf.js → index-90bzTYUX.js} +2 -2
  44. package/build/client/assets/index-90bzTYUX.js.map +1 -0
  45. package/build/client/assets/{index-BQRtqn3g.js → index-BXefr1BB.js} +2 -2
  46. package/build/client/assets/{index-BQRtqn3g.js.map → index-BXefr1BB.js.map} +1 -1
  47. package/build/client/assets/index-Czg1ruVn.js +37 -0
  48. package/build/client/assets/index-Czg1ruVn.js.map +1 -0
  49. package/build/client/assets/{index-9nNr0Zqr.js → index-D6ukHE4T.js} +2 -2
  50. package/build/client/assets/{index-9nNr0Zqr.js.map → index-D6ukHE4T.js.map} +1 -1
  51. package/build/client/assets/index-Doi37489.js +3 -0
  52. package/build/client/assets/index-Doi37489.js.map +1 -0
  53. package/build/client/assets/{loading-C9f_vBoM.js → loading-CNWJVymJ.js} +2 -2
  54. package/build/client/assets/{loading-C9f_vBoM.js.map → loading-CNWJVymJ.js.map} +1 -1
  55. package/build/client/assets/{login-D8zyjBAb.js → login-DxG854vQ.js} +2 -2
  56. package/build/client/assets/{login-D8zyjBAb.js.map → login-DxG854vQ.js.map} +1 -1
  57. package/build/client/assets/manifest-a1fde59b.js +1 -0
  58. package/build/client/assets/mdx-CR7Me1v_.js +2 -0
  59. package/build/client/assets/{mdx-BYvGbvEr.js.map → mdx-CR7Me1v_.js.map} +1 -1
  60. package/build/client/assets/misc-CypjEQkt.js +2 -0
  61. package/build/client/assets/misc-CypjEQkt.js.map +1 -0
  62. package/build/client/assets/{nav-chevrons-DOYtx9XE.js → nav-chevrons-BYKwyIgG.js} +2 -2
  63. package/build/client/assets/{nav-chevrons-DOYtx9XE.js.map → nav-chevrons-BYKwyIgG.js.map} +1 -1
  64. package/build/client/assets/{onboarding-euWyXpCL.js → onboarding-b9lcdh4n.js} +2 -2
  65. package/build/client/assets/{onboarding-euWyXpCL.js.map → onboarding-b9lcdh4n.js.map} +1 -1
  66. package/build/client/assets/{presence-BJPzwbUy.js → presence-DXXVJbaH.js} +2 -2
  67. package/build/client/assets/{presence-BJPzwbUy.js.map → presence-DXXVJbaH.js.map} +1 -1
  68. package/build/client/assets/progress-B_mReZVE.js +2 -0
  69. package/build/client/assets/progress-B_mReZVE.js.map +1 -0
  70. package/build/client/assets/{progress-bar-7LK87ZMh.js → progress-bar-DCrt7X4t.js} +2 -2
  71. package/build/client/assets/{progress-bar-7LK87ZMh.js.map → progress-bar-DCrt7X4t.js.map} +1 -1
  72. package/build/client/assets/{request-info-Dyls4H67.js → request-info-CUT0ULYN.js} +2 -2
  73. package/build/client/assets/{request-info-Dyls4H67.js.map → request-info-CUT0ULYN.js.map} +1 -1
  74. package/build/client/assets/{root-BXq0yevS.js → root-bgHbi7rA.js} +4 -4
  75. package/build/client/assets/root-bgHbi7rA.js.map +1 -0
  76. package/build/client/assets/{seo-CHrqghsC.js → seo-Bu3_n5my.js} +2 -2
  77. package/build/client/assets/{seo-CHrqghsC.js.map → seo-Bu3_n5my.js.map} +1 -1
  78. package/build/client/assets/{support-DUAHYT3r.js → support-DrY-qRGh.js} +2 -2
  79. package/build/client/assets/{support-DUAHYT3r.js.map → support-DrY-qRGh.js.map} +1 -1
  80. package/build/client/assets/tailwind-D2vjZZFL.css +1 -0
  81. package/build/client/assets/tooltip-CfmIzAYi.js +2 -0
  82. package/build/client/assets/tooltip-CfmIzAYi.js.map +1 -0
  83. package/build/client/assets/{use-event-source-aW6X9lN1.js → use-event-source-ySol3hbz.js} +2 -2
  84. package/build/client/assets/{use-event-source-aW6X9lN1.js.map → use-event-source-ySol3hbz.js.map} +1 -1
  85. package/build/client/assets/{user-73ocDYRe.js → user-C4QTtQw5.js} +2 -2
  86. package/build/client/assets/{user-73ocDYRe.js.map → user-C4QTtQw5.js.map} +1 -1
  87. package/build/server/index.js +850 -616
  88. package/build/server/index.js.map +1 -1
  89. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +65 -3
  90. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +65 -3
  91. package/node_modules/@babel/runtime/package.json +1 -28
  92. package/node_modules/@conform-to/dom/dom.d.ts +17 -5
  93. package/node_modules/@conform-to/dom/form.d.ts +221 -122
  94. package/node_modules/@conform-to/dom/index.d.ts +24 -2
  95. package/node_modules/@conform-to/dom/intent.d.ts +92 -60
  96. package/node_modules/@conform-to/dom/package.json +1 -1
  97. package/node_modules/@conform-to/dom/parse.d.ts +47 -27
  98. package/node_modules/@conform-to/dom/types.d.ts +17 -14
  99. package/node_modules/@conform-to/dom/util.d.ts +4 -1
  100. package/node_modules/@conform-to/react/context.d.ts +187 -59
  101. package/node_modules/@conform-to/react/context.js +3 -5
  102. package/node_modules/@conform-to/react/context.mjs +4 -6
  103. package/node_modules/@conform-to/react/experimental.d.ts +0 -0
  104. package/node_modules/@conform-to/react/hooks.d.ts +53 -24
  105. package/node_modules/@conform-to/react/index.d.ts +28 -4
  106. package/node_modules/@conform-to/react/integrations.js +14 -1
  107. package/node_modules/@conform-to/react/integrations.mjs +14 -1
  108. package/node_modules/@conform-to/react/package.json +2 -2
  109. package/node_modules/@conform-to/zod/coercion.d.ts +14 -4
  110. package/node_modules/@conform-to/zod/constraint.d.ts +3 -1
  111. package/node_modules/@conform-to/zod/package.json +2 -2
  112. package/node_modules/@conform-to/zod/parse.d.ts +43 -25
  113. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -1
  114. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +14 -3
  115. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +51 -51
  116. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +51 -51
  117. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +14 -3
  118. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +14 -3
  119. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +14 -3
  120. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -1
  121. package/node_modules/@floating-ui/core/package.json +2 -2
  122. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -1
  123. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +12 -11
  124. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +11 -8
  125. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +11 -8
  126. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +1 -12
  127. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +1 -12
  128. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +12 -11
  129. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -1
  130. package/node_modules/@floating-ui/dom/package.json +2 -2
  131. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +12 -4
  132. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +12 -4
  133. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +1 -0
  134. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -0
  135. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +1 -0
  136. package/node_modules/@floating-ui/react-dom/package.json +1 -1
  137. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +11 -6
  138. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +11 -6
  139. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +2 -0
  140. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +2 -0
  141. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +13 -1
  142. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +13 -1
  143. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +13 -0
  144. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -1
  145. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +2 -0
  146. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +13 -1
  147. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +13 -0
  148. package/node_modules/@floating-ui/utils/package.json +1 -1
  149. package/node_modules/@radix-ui/number/dist/index.d.mts +2 -2
  150. package/node_modules/@radix-ui/number/dist/index.d.ts +2 -2
  151. package/node_modules/@radix-ui/number/dist/index.js +28 -10
  152. package/node_modules/@radix-ui/number/dist/index.js.map +7 -1
  153. package/node_modules/@radix-ui/number/dist/index.mjs +6 -7
  154. package/node_modules/@radix-ui/number/dist/index.mjs.map +7 -1
  155. package/node_modules/@radix-ui/number/package.json +1 -4
  156. package/node_modules/@radix-ui/primitive/dist/index.d.mts +2 -2
  157. package/node_modules/@radix-ui/primitive/dist/index.d.ts +2 -2
  158. package/node_modules/@radix-ui/primitive/dist/index.js +33 -13
  159. package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -1
  160. package/node_modules/@radix-ui/primitive/dist/index.mjs +11 -10
  161. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -1
  162. package/node_modules/@radix-ui/primitive/package.json +1 -4
  163. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +40 -28
  164. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +40 -28
  165. package/node_modules/@radix-ui/react-accordion/dist/index.js +324 -316
  166. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +7 -1
  167. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +293 -300
  168. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +7 -1
  169. package/node_modules/@radix-ui/react-accordion/package.json +12 -13
  170. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +8 -8
  171. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +8 -8
  172. package/node_modules/@radix-ui/react-arrow/dist/index.js +57 -37
  173. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +7 -1
  174. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +25 -30
  175. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +7 -1
  176. package/node_modules/@radix-ui/react-arrow/package.json +4 -5
  177. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +27 -16
  178. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +27 -16
  179. package/node_modules/@radix-ui/react-collapsible/dist/index.js +176 -167
  180. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -1
  181. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +143 -153
  182. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -1
  183. package/node_modules/@radix-ui/react-collapsible/package.json +11 -12
  184. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +27 -15
  185. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +27 -15
  186. package/node_modules/@radix-ui/react-collection/dist/index.js +99 -112
  187. package/node_modules/@radix-ui/react-collection/dist/index.js.map +7 -1
  188. package/node_modules/@radix-ui/react-collection/dist/index.mjs +68 -106
  189. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +7 -1
  190. package/node_modules/@radix-ui/react-collection/package.json +7 -8
  191. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +5 -4
  192. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +5 -4
  193. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +47 -30
  194. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -1
  195. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +16 -27
  196. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -1
  197. package/node_modules/@radix-ui/react-compose-refs/package.json +2 -5
  198. package/node_modules/@radix-ui/react-context/dist/index.d.mts +10 -8
  199. package/node_modules/@radix-ui/react-context/dist/index.d.ts +10 -8
  200. package/node_modules/@radix-ui/react-context/dist/index.js +104 -123
  201. package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -1
  202. package/node_modules/@radix-ui/react-context/dist/index.mjs +73 -120
  203. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -1
  204. package/node_modules/@radix-ui/react-context/package.json +2 -5
  205. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +6 -5
  206. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +6 -5
  207. package/node_modules/@radix-ui/react-direction/dist/index.js +47 -24
  208. package/node_modules/@radix-ui/react-direction/dist/index.js.map +7 -1
  209. package/node_modules/@radix-ui/react-direction/dist/index.mjs +16 -20
  210. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +7 -1
  211. package/node_modules/@radix-ui/react-direction/package.json +2 -5
  212. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +10 -10
  213. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +10 -10
  214. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +230 -270
  215. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +7 -1
  216. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +199 -261
  217. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +7 -1
  218. package/node_modules/@radix-ui/react-dismissable-layer/package.json +9 -10
  219. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +4 -4
  220. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +4 -4
  221. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +63 -39
  222. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +7 -1
  223. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +32 -34
  224. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +7 -1
  225. package/node_modules/@radix-ui/react-focus-guards/package.json +2 -5
  226. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +8 -8
  227. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +8 -8
  228. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +228 -282
  229. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +7 -1
  230. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +197 -275
  231. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +7 -1
  232. package/node_modules/@radix-ui/react-focus-scope/package.json +6 -7
  233. package/node_modules/@radix-ui/react-id/dist/index.d.mts +2 -2
  234. package/node_modules/@radix-ui/react-id/dist/index.d.ts +2 -2
  235. package/node_modules/@radix-ui/react-id/dist/index.js +47 -26
  236. package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -1
  237. package/node_modules/@radix-ui/react-id/dist/index.mjs +14 -22
  238. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -1
  239. package/node_modules/@radix-ui/react-id/package.json +3 -4
  240. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +48 -37
  241. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +48 -37
  242. package/node_modules/@radix-ui/react-popover/dist/index.js +319 -311
  243. package/node_modules/@radix-ui/react-popover/dist/index.js.map +7 -1
  244. package/node_modules/@radix-ui/react-popover/dist/index.mjs +288 -291
  245. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +7 -1
  246. package/node_modules/@radix-ui/react-popover/package.json +17 -18
  247. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +36 -25
  248. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +36 -25
  249. package/node_modules/@radix-ui/react-popper/dist/index.js +305 -321
  250. package/node_modules/@radix-ui/react-popper/dist/index.js.map +7 -1
  251. package/node_modules/@radix-ui/react-popper/dist/index.mjs +284 -305
  252. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +7 -1
  253. package/node_modules/@radix-ui/react-popper/package.json +12 -13
  254. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +9 -9
  255. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +9 -9
  256. package/node_modules/@radix-ui/react-portal/dist/index.js +52 -34
  257. package/node_modules/@radix-ui/react-portal/dist/index.js.map +7 -1
  258. package/node_modules/@radix-ui/react-portal/dist/index.mjs +21 -27
  259. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +7 -1
  260. package/node_modules/@radix-ui/react-portal/package.json +5 -5
  261. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +5 -4
  262. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +5 -4
  263. package/node_modules/@radix-ui/react-presence/dist/index.js +147 -132
  264. package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -1
  265. package/node_modules/@radix-ui/react-presence/dist/index.mjs +116 -129
  266. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -1
  267. package/node_modules/@radix-ui/react-presence/package.json +5 -6
  268. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +8 -9
  269. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +8 -9
  270. package/node_modules/@radix-ui/react-primitive/dist/index.js +73 -100
  271. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -1
  272. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +42 -93
  273. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -1
  274. package/node_modules/@radix-ui/react-primitive/package.json +4 -5
  275. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +25 -13
  276. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +25 -13
  277. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +239 -247
  278. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +7 -1
  279. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +209 -238
  280. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +7 -1
  281. package/node_modules/@radix-ui/react-roving-focus/package.json +12 -13
  282. package/node_modules/@radix-ui/react-select/dist/index.d.mts +77 -65
  283. package/node_modules/@radix-ui/react-select/dist/index.d.ts +77 -65
  284. package/node_modules/@radix-ui/react-select/dist/index.js +1107 -1235
  285. package/node_modules/@radix-ui/react-select/dist/index.js.map +7 -1
  286. package/node_modules/@radix-ui/react-select/dist/index.mjs +1076 -1197
  287. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +7 -1
  288. package/node_modules/@radix-ui/react-select/package.json +23 -24
  289. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +9 -7
  290. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +9 -7
  291. package/node_modules/@radix-ui/react-slot/dist/index.js +107 -87
  292. package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -1
  293. package/node_modules/@radix-ui/react-slot/dist/index.mjs +76 -80
  294. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -1
  295. package/node_modules/@radix-ui/react-slot/package.json +3 -4
  296. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +32 -21
  297. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +32 -21
  298. package/node_modules/@radix-ui/react-tabs/dist/index.js +217 -184
  299. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +7 -1
  300. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +185 -169
  301. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +7 -1
  302. package/node_modules/@radix-ui/react-tabs/package.json +11 -12
  303. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +43 -32
  304. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +43 -32
  305. package/node_modules/@radix-ui/react-toast/dist/index.js +645 -715
  306. package/node_modules/@radix-ui/react-toast/dist/index.js.map +7 -1
  307. package/node_modules/@radix-ui/react-toast/dist/index.mjs +614 -695
  308. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +7 -1
  309. package/node_modules/@radix-ui/react-toast/package.json +15 -16
  310. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +2 -2
  311. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +2 -2
  312. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +42 -23
  313. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +7 -1
  314. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +11 -21
  315. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +7 -1
  316. package/node_modules/@radix-ui/react-use-callback-ref/package.json +2 -5
  317. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +4 -3
  318. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +4 -3
  319. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +75 -52
  320. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -1
  321. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +44 -50
  322. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -1
  323. package/node_modules/@radix-ui/react-use-controllable-state/package.json +3 -4
  324. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +2 -2
  325. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +2 -2
  326. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +50 -29
  327. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +7 -1
  328. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +17 -25
  329. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +7 -1
  330. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +3 -4
  331. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +4 -3
  332. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +4 -3
  333. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +38 -17
  334. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -1
  335. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +7 -15
  336. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -1
  337. package/node_modules/@radix-ui/react-use-layout-effect/package.json +2 -5
  338. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +2 -2
  339. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +2 -2
  340. package/node_modules/@radix-ui/react-use-previous/dist/index.js +45 -26
  341. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +7 -1
  342. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +14 -24
  343. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +7 -1
  344. package/node_modules/@radix-ui/react-use-previous/package.json +2 -5
  345. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +4 -3
  346. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +4 -3
  347. package/node_modules/@radix-ui/react-use-rect/dist/index.js +52 -32
  348. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +7 -1
  349. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +19 -28
  350. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +7 -1
  351. package/node_modules/@radix-ui/react-use-rect/package.json +3 -4
  352. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +2 -2
  353. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +2 -2
  354. package/node_modules/@radix-ui/react-use-size/dist/index.js +70 -57
  355. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +7 -1
  356. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +39 -55
  357. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +7 -1
  358. package/node_modules/@radix-ui/react-use-size/package.json +3 -4
  359. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +8 -8
  360. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +8 -8
  361. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +64 -41
  362. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +7 -1
  363. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +33 -35
  364. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +7 -1
  365. package/node_modules/@radix-ui/react-visually-hidden/package.json +4 -5
  366. package/node_modules/@radix-ui/rect/dist/index.d.mts +3 -3
  367. package/node_modules/@radix-ui/rect/dist/index.d.ts +3 -3
  368. package/node_modules/@radix-ui/rect/dist/index.js +69 -66
  369. package/node_modules/@radix-ui/rect/dist/index.js.map +7 -1
  370. package/node_modules/@radix-ui/rect/dist/index.mjs +47 -63
  371. package/node_modules/@radix-ui/rect/dist/index.mjs.map +7 -1
  372. package/node_modules/@radix-ui/rect/package.json +1 -4
  373. package/node_modules/@remix-run/react/CHANGELOG.md +18 -0
  374. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
  375. package/node_modules/@remix-run/react/dist/browser.js +14 -3
  376. package/node_modules/@remix-run/react/dist/components.d.ts +9 -0
  377. package/node_modules/@remix-run/react/dist/components.js +23 -19
  378. package/node_modules/@remix-run/react/dist/data.js +1 -1
  379. package/node_modules/@remix-run/react/dist/entry.d.ts +1 -0
  380. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +5 -2
  381. package/node_modules/@remix-run/react/dist/errorBoundaries.js +26 -5
  382. package/node_modules/@remix-run/react/dist/errors.js +1 -1
  383. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +1 -1
  384. package/node_modules/@remix-run/react/dist/esm/browser.js +14 -3
  385. package/node_modules/@remix-run/react/dist/esm/components.js +24 -20
  386. package/node_modules/@remix-run/react/dist/esm/data.js +1 -1
  387. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +26 -5
  388. package/node_modules/@remix-run/react/dist/esm/errors.js +1 -1
  389. package/node_modules/@remix-run/react/dist/esm/fallback.js +1 -1
  390. package/node_modules/@remix-run/react/dist/esm/fog-of-war.js +226 -0
  391. package/node_modules/@remix-run/react/dist/esm/index.js +1 -1
  392. package/node_modules/@remix-run/react/dist/esm/invariant.js +1 -1
  393. package/node_modules/@remix-run/react/dist/esm/links.js +2 -2
  394. package/node_modules/@remix-run/react/dist/esm/markup.js +1 -1
  395. package/node_modules/@remix-run/react/dist/esm/routeModules.js +1 -1
  396. package/node_modules/@remix-run/react/dist/esm/routes.js +1 -1
  397. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +1 -1
  398. package/node_modules/@remix-run/react/dist/esm/server.js +1 -1
  399. package/node_modules/@remix-run/react/dist/esm/single-fetch.js +1 -1
  400. package/node_modules/@remix-run/react/dist/fallback.js +1 -1
  401. package/node_modules/@remix-run/react/dist/fog-of-war.d.ts +37 -0
  402. package/node_modules/@remix-run/react/dist/fog-of-war.js +254 -0
  403. package/node_modules/@remix-run/react/dist/index.js +1 -1
  404. package/node_modules/@remix-run/react/dist/invariant.js +1 -1
  405. package/node_modules/@remix-run/react/dist/links.js +2 -2
  406. package/node_modules/@remix-run/react/dist/markup.js +1 -1
  407. package/node_modules/@remix-run/react/dist/routeModules.js +1 -1
  408. package/node_modules/@remix-run/react/dist/routes.d.ts +1 -1
  409. package/node_modules/@remix-run/react/dist/routes.js +1 -1
  410. package/node_modules/@remix-run/react/dist/scroll-restoration.js +1 -1
  411. package/node_modules/@remix-run/react/dist/server.js +1 -1
  412. package/node_modules/@remix-run/react/dist/single-fetch.js +1 -1
  413. package/node_modules/@remix-run/react/package.json +8 -8
  414. package/node_modules/@remix-run/router/CHANGELOG.md +9 -0
  415. package/node_modules/@remix-run/router/dist/index.d.ts +1 -1
  416. package/node_modules/@remix-run/router/dist/router.cjs.js +467 -80
  417. package/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -1
  418. package/node_modules/@remix-run/router/dist/router.d.ts +11 -1
  419. package/node_modules/@remix-run/router/dist/router.js +457 -76
  420. package/node_modules/@remix-run/router/dist/router.js.map +1 -1
  421. package/node_modules/@remix-run/router/dist/router.umd.js +467 -80
  422. package/node_modules/@remix-run/router/dist/router.umd.js.map +1 -1
  423. package/node_modules/@remix-run/router/dist/router.umd.min.js +2 -2
  424. package/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -1
  425. package/node_modules/@remix-run/router/dist/utils.d.ts +9 -1
  426. package/node_modules/@remix-run/router/index.ts +1 -0
  427. package/node_modules/@remix-run/router/package.json +1 -1
  428. package/node_modules/@remix-run/router/router.ts +586 -73
  429. package/node_modules/@remix-run/router/utils.ts +51 -8
  430. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +17 -0
  431. package/node_modules/@remix-run/server-runtime/dist/cookies.js +1 -1
  432. package/node_modules/@remix-run/server-runtime/dist/data.js +1 -1
  433. package/node_modules/@remix-run/server-runtime/dist/deprecations.js +1 -1
  434. package/node_modules/@remix-run/server-runtime/dist/dev.js +1 -1
  435. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +1 -0
  436. package/node_modules/@remix-run/server-runtime/dist/entry.js +1 -1
  437. package/node_modules/@remix-run/server-runtime/dist/errors.js +1 -1
  438. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +1 -1
  439. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +1 -1
  440. package/node_modules/@remix-run/server-runtime/dist/esm/deprecations.js +1 -1
  441. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +1 -1
  442. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +1 -1
  443. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +1 -1
  444. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +1 -1
  445. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +1 -1
  446. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +1 -1
  447. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +1 -1
  448. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +1 -1
  449. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +1 -1
  450. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +1 -1
  451. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +1 -1
  452. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +1 -1
  453. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +76 -11
  454. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +1 -1
  455. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +1 -1
  456. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +1 -1
  457. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +1 -1
  458. package/node_modules/@remix-run/server-runtime/dist/esm/single-fetch.js +17 -8
  459. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +1 -1
  460. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +1 -1
  461. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +1 -1
  462. package/node_modules/@remix-run/server-runtime/dist/formData.js +1 -1
  463. package/node_modules/@remix-run/server-runtime/dist/headers.js +1 -1
  464. package/node_modules/@remix-run/server-runtime/dist/index.js +1 -1
  465. package/node_modules/@remix-run/server-runtime/dist/invariant.js +1 -1
  466. package/node_modules/@remix-run/server-runtime/dist/markup.js +1 -1
  467. package/node_modules/@remix-run/server-runtime/dist/mode.js +1 -1
  468. package/node_modules/@remix-run/server-runtime/dist/responses.js +1 -1
  469. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +1 -1
  470. package/node_modules/@remix-run/server-runtime/dist/routes.js +1 -1
  471. package/node_modules/@remix-run/server-runtime/dist/server.js +70 -5
  472. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +1 -1
  473. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +1 -1
  474. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +1 -1
  475. package/node_modules/@remix-run/server-runtime/dist/sessions.js +1 -1
  476. package/node_modules/@remix-run/server-runtime/dist/single-fetch.d.ts +3 -0
  477. package/node_modules/@remix-run/server-runtime/dist/single-fetch.js +18 -7
  478. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +1 -1
  479. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +1 -1
  480. package/node_modules/@remix-run/server-runtime/dist/warnings.js +1 -1
  481. package/node_modules/@remix-run/server-runtime/package.json +3 -3
  482. package/node_modules/deep-eql/index.js +10 -5
  483. package/node_modules/deep-eql/package.json +1 -1
  484. package/node_modules/framer-motion/dist/cjs/{dom-entry-DSxBucW4.js → dom-entry-GDJJhIpT.js} +59 -106
  485. package/node_modules/framer-motion/dist/cjs/dom-entry.js +1 -1
  486. package/node_modules/framer-motion/dist/cjs/index.js +123 -36
  487. package/node_modules/framer-motion/dist/dom.js +1 -1
  488. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +3 -3
  489. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +6 -3
  490. package/node_modules/framer-motion/dist/es/motion/index.mjs +33 -13
  491. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +6 -3
  492. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +54 -3
  493. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +5 -2
  494. package/node_modules/framer-motion/dist/es/projection-entry.mjs +11 -0
  495. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +30 -78
  496. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +5 -1
  497. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
  498. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +8 -2
  499. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +1 -3
  500. package/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs +5 -0
  501. package/node_modules/framer-motion/dist/es/value/index.mjs +1 -1
  502. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +1 -1
  503. package/node_modules/framer-motion/dist/framer-motion.dev.js +175 -134
  504. package/node_modules/framer-motion/dist/framer-motion.js +1 -1
  505. package/node_modules/framer-motion/dist/index.d.ts +78 -78
  506. package/node_modules/framer-motion/dist/three-entry.d.ts +59 -72
  507. package/node_modules/framer-motion/package.json +14 -28
  508. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +15 -4
  509. package/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
  510. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +12 -4
  511. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +10 -2
  512. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +15 -4
  513. package/node_modules/react-remove-scroll/dist/es2019/UI.js +2 -2
  514. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +12 -4
  515. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +10 -2
  516. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +15 -4
  517. package/node_modules/react-remove-scroll/dist/es5/UI.js +2 -2
  518. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +12 -4
  519. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +10 -2
  520. package/node_modules/react-remove-scroll/dist/index.js +93 -0
  521. package/node_modules/react-remove-scroll/package.json +4 -3
  522. package/node_modules/react-router/CHANGELOG.md +14 -0
  523. package/node_modules/react-router/dist/index.d.ts +4 -1
  524. package/node_modules/react-router/dist/index.js +3 -2
  525. package/node_modules/react-router/dist/index.js.map +1 -1
  526. package/node_modules/react-router/dist/main.js +1 -1
  527. package/node_modules/react-router/dist/react-router.development.js +3 -2
  528. package/node_modules/react-router/dist/react-router.development.js.map +1 -1
  529. package/node_modules/react-router/dist/react-router.production.min.js +2 -2
  530. package/node_modules/react-router/dist/react-router.production.min.js.map +1 -1
  531. package/node_modules/react-router/dist/umd/react-router.development.js +3 -2
  532. package/node_modules/react-router/dist/umd/react-router.development.js.map +1 -1
  533. package/node_modules/react-router/dist/umd/react-router.production.min.js +2 -2
  534. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +1 -1
  535. package/node_modules/react-router/package.json +3 -3
  536. package/node_modules/react-router-dom/CHANGELOG.md +17 -0
  537. package/node_modules/react-router-dom/dist/dom.d.ts +29 -16
  538. package/node_modules/react-router-dom/dist/index.d.ts +18 -6
  539. package/node_modules/react-router-dom/dist/index.js +3 -1
  540. package/node_modules/react-router-dom/dist/index.js.map +1 -1
  541. package/node_modules/react-router-dom/dist/main.js +1 -1
  542. package/node_modules/react-router-dom/dist/react-router-dom.development.js +29 -1
  543. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +1 -1
  544. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +2 -2
  545. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +1 -1
  546. package/node_modules/react-router-dom/dist/server.js +4 -1
  547. package/node_modules/react-router-dom/dist/server.mjs +4 -1
  548. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +29 -1
  549. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +1 -1
  550. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +2 -2
  551. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +1 -1
  552. package/node_modules/react-router-dom/package.json +3 -3
  553. package/node_modules/react-router-dom/server.js +4 -1
  554. package/node_modules/react-router-dom/server.mjs +4 -1
  555. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/README.md +32 -112
  556. package/node_modules/source-map/dist/source-map.debug.js +3234 -0
  557. package/node_modules/source-map/dist/source-map.js +3233 -0
  558. package/node_modules/source-map/dist/source-map.min.js +2 -0
  559. package/node_modules/source-map/dist/source-map.min.js.map +1 -0
  560. package/node_modules/source-map/lib/array-set.js +121 -0
  561. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/base64-vlq.js +40 -11
  562. package/node_modules/source-map/lib/base64.js +67 -0
  563. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/binary-search.js +19 -15
  564. package/node_modules/source-map/lib/mapping-list.js +79 -0
  565. package/node_modules/source-map/lib/quick-sort.js +114 -0
  566. package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  567. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/source-map-generator.js +169 -157
  568. package/node_modules/source-map/lib/source-node.js +413 -0
  569. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/util.js +51 -109
  570. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/package.json +9 -27
  571. package/node_modules/source-map/source-map.d.ts +98 -0
  572. package/node_modules/source-map/source-map.js +8 -0
  573. package/node_modules/turbo-stream/dist/flatten.d.ts +1 -1
  574. package/node_modules/turbo-stream/dist/flatten.js +44 -9
  575. package/node_modules/turbo-stream/dist/turbo-stream.js +11 -2
  576. package/node_modules/turbo-stream/dist/turbo-stream.mjs +58 -7
  577. package/node_modules/turbo-stream/dist/unflatten.js +2 -0
  578. package/node_modules/turbo-stream/dist/utils.d.ts +1 -0
  579. package/node_modules/turbo-stream/dist/utils.js +2 -1
  580. package/node_modules/turbo-stream/package.json +1 -1
  581. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/index.d.ts +1 -0
  582. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/package.json +2 -1
  583. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/readme.md +1 -0
  584. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-literal.d.ts +6 -4
  585. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge-deep.d.ts +8 -9
  586. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/omit-deep.d.ts +3 -3
  587. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/paths.d.ts +14 -8
  588. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/schema.d.ts +12 -12
  589. package/node_modules/type-fest/source/simplify-deep.d.ts +115 -0
  590. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/simplify.d.ts +1 -1
  591. package/package.json +4 -4
  592. package/build/client/assets/_exerciseNumber_.finished-B7SgnqdS.js +0 -2
  593. package/build/client/assets/_exerciseNumber_.finished-B7SgnqdS.js.map +0 -1
  594. package/build/client/assets/_layout-BG1Jwh7V.js +0 -2
  595. package/build/client/assets/_layout-BG1Jwh7V.js.map +0 -1
  596. package/build/client/assets/_layout-BR-Qyofe.js +0 -2
  597. package/build/client/assets/_layout-CNgYirUN.js +0 -2
  598. package/build/client/assets/_layout-CNgYirUN.js.map +0 -1
  599. package/build/client/assets/components-C5xBZAiL.js +0 -119
  600. package/build/client/assets/components-C5xBZAiL.js.map +0 -1
  601. package/build/client/assets/diff-BKsbFB6w.js +0 -42
  602. package/build/client/assets/diff-BKsbFB6w.js.map +0 -1
  603. package/build/client/assets/diff-KDzcgGYL.js +0 -2
  604. package/build/client/assets/discord-Xp0X4-Fl.js +0 -2
  605. package/build/client/assets/discord-Xp0X4-Fl.js.map +0 -1
  606. package/build/client/assets/entry.client-0j1eoieD.js +0 -80
  607. package/build/client/assets/entry.client-0j1eoieD.js.map +0 -1
  608. package/build/client/assets/epic-video-BwtXsHGU.js.map +0 -1
  609. package/build/client/assets/finished-BI2-0Ykt.js +0 -2
  610. package/build/client/assets/finished-BI2-0Ykt.js.map +0 -1
  611. package/build/client/assets/index-Bg9MMnnf.js.map +0 -1
  612. package/build/client/assets/index-D6ygCrVn.js +0 -37
  613. package/build/client/assets/index-D6ygCrVn.js.map +0 -1
  614. package/build/client/assets/index-r90CY6Wk.js +0 -8
  615. package/build/client/assets/index-r90CY6Wk.js.map +0 -1
  616. package/build/client/assets/manifest-f472ec85.js +0 -1
  617. package/build/client/assets/mdx-BYvGbvEr.js +0 -2
  618. package/build/client/assets/misc-DNgC2Frq.js +0 -2
  619. package/build/client/assets/misc-DNgC2Frq.js.map +0 -1
  620. package/build/client/assets/progress-CF9Xwfxf.js +0 -2
  621. package/build/client/assets/progress-CF9Xwfxf.js.map +0 -1
  622. package/build/client/assets/root-BXq0yevS.js.map +0 -1
  623. package/build/client/assets/tailwind-Ck4g-nq0.css +0 -1
  624. package/build/client/assets/tooltip-Kw0lYWBI.js +0 -2
  625. package/build/client/assets/tooltip-Kw0lYWBI.js.map +0 -1
  626. package/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -64
  627. package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -64
  628. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -10
  629. package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -8
  630. package/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -10
  631. package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -8
  632. package/node_modules/@conform-to/dom/rollup.config.js +0 -100
  633. package/node_modules/@conform-to/react/rollup.config.js +0 -102
  634. package/node_modules/@conform-to/zod/rollup.config.js +0 -100
  635. package/node_modules/@radix-ui/number/dist/index.d.ts.map +0 -1
  636. package/node_modules/@radix-ui/primitive/dist/index.d.ts.map +0 -1
  637. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts.map +0 -1
  638. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts.map +0 -1
  639. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts.map +0 -1
  640. package/node_modules/@radix-ui/react-collection/dist/index.d.ts.map +0 -1
  641. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts.map +0 -1
  642. package/node_modules/@radix-ui/react-context/dist/index.d.ts.map +0 -1
  643. package/node_modules/@radix-ui/react-direction/dist/index.d.ts.map +0 -1
  644. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts.map +0 -1
  645. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts.map +0 -1
  646. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts.map +0 -1
  647. package/node_modules/@radix-ui/react-id/dist/index.d.ts.map +0 -1
  648. package/node_modules/@radix-ui/react-popover/dist/index.d.ts.map +0 -1
  649. package/node_modules/@radix-ui/react-popper/dist/index.d.ts.map +0 -1
  650. package/node_modules/@radix-ui/react-portal/dist/index.d.ts.map +0 -1
  651. package/node_modules/@radix-ui/react-presence/dist/index.d.ts.map +0 -1
  652. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts.map +0 -1
  653. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts.map +0 -1
  654. package/node_modules/@radix-ui/react-select/dist/index.d.ts.map +0 -1
  655. package/node_modules/@radix-ui/react-slot/dist/index.d.ts.map +0 -1
  656. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts.map +0 -1
  657. package/node_modules/@radix-ui/react-toast/dist/index.d.ts.map +0 -1
  658. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts.map +0 -1
  659. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts.map +0 -1
  660. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts.map +0 -1
  661. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts.map +0 -1
  662. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts.map +0 -1
  663. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts.map +0 -1
  664. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts.map +0 -1
  665. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts.map +0 -1
  666. package/node_modules/@radix-ui/rect/dist/index.d.ts.map +0 -1
  667. package/node_modules/@remix-run/server-runtime/node_modules/source-map/dist/source-map.js +0 -1
  668. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/array-set.js +0 -100
  669. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/base64.js +0 -18
  670. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/mapping-list.js +0 -80
  671. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/source-map-consumer.js +0 -1237
  672. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/source-node.js +0 -404
  673. package/node_modules/@remix-run/server-runtime/node_modules/source-map/source-map.d.ts +0 -369
  674. package/node_modules/@remix-run/server-runtime/node_modules/source-map/source-map.js +0 -8
  675. package/node_modules/framer-motion/dist/projection.dev.js +0 -6659
  676. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/LICENSE +0 -0
  677. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/mappings.wasm +0 -0
  678. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/read-wasm.js +0 -0
  679. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/wasm.js +0 -0
  680. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/and.d.ts +0 -0
  681. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-indices.d.ts +0 -0
  682. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-slice.d.ts +0 -0
  683. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-splice.d.ts +0 -0
  684. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-values.d.ts +0 -0
  685. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/async-return-type.d.ts +0 -0
  686. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/asyncify.d.ts +0 -0
  687. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/basic.d.ts +0 -0
  688. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-case.d.ts +0 -0
  689. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-cased-properties-deep.d.ts +0 -0
  690. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-cased-properties.d.ts +0 -0
  691. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-except.d.ts +0 -0
  692. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-keys.d.ts +0 -0
  693. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-pick-deep.d.ts +0 -0
  694. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-pick.d.ts +0 -0
  695. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-simplify.d.ts +0 -0
  696. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-case.d.ts +0 -0
  697. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-cased-properties-deep.d.ts +0 -0
  698. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-cased-properties.d.ts +0 -0
  699. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/distributed-omit.d.ts +0 -0
  700. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/distributed-pick.d.ts +0 -0
  701. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/empty-object.d.ts +0 -0
  702. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/enforce-optional.d.ts +0 -0
  703. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/entries.d.ts +0 -0
  704. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/entry.d.ts +0 -0
  705. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/exact.d.ts +0 -0
  706. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/except.d.ts +0 -0
  707. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/fixed-length-array.d.ts +0 -0
  708. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/get.d.ts +0 -0
  709. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/global-this.d.ts +0 -0
  710. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/greater-than-or-equal.d.ts +0 -0
  711. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/greater-than.d.ts +0 -0
  712. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-optional-keys.d.ts +0 -0
  713. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-readonly-keys.d.ts +0 -0
  714. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-required-keys.d.ts +0 -0
  715. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-writable-keys.d.ts +0 -0
  716. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-any.d.ts +0 -0
  717. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-empty-object.d.ts +0 -0
  718. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-never.d.ts +0 -0
  719. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-null.d.ts +0 -0
  720. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-unknown.d.ts +0 -0
  721. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/includes.d.ts +0 -0
  722. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/int-range.d.ts +0 -0
  723. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/internal.d.ts +0 -0
  724. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/invariant-of.d.ts +0 -0
  725. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-any.d.ts +0 -0
  726. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-equal.d.ts +0 -0
  727. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-float.d.ts +0 -0
  728. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-integer.d.ts +0 -0
  729. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-never.d.ts +0 -0
  730. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-null.d.ts +0 -0
  731. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-unknown.d.ts +0 -0
  732. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/iterable-element.d.ts +0 -0
  733. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/join.d.ts +0 -0
  734. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/jsonifiable.d.ts +0 -0
  735. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/jsonify.d.ts +0 -0
  736. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-case.d.ts +0 -0
  737. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-cased-properties-deep.d.ts +0 -0
  738. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-cased-properties.d.ts +0 -0
  739. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/keys-of-union.d.ts +0 -0
  740. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/last-array-element.d.ts +0 -0
  741. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/less-than-or-equal.d.ts +0 -0
  742. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/less-than.d.ts +0 -0
  743. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-to-primitive-deep.d.ts +0 -0
  744. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-to-primitive.d.ts +0 -0
  745. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-union.d.ts +0 -0
  746. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge-exclusive.d.ts +0 -0
  747. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge.d.ts +0 -0
  748. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/multidimensional-array.d.ts +0 -0
  749. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/multidimensional-readonly-array.d.ts +0 -0
  750. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/non-empty-object.d.ts +0 -0
  751. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/numeric.d.ts +0 -0
  752. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/observable-like.d.ts +0 -0
  753. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/omit-index-signature.d.ts +0 -0
  754. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/opaque.d.ts +0 -0
  755. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/optional-keys-of.d.ts +0 -0
  756. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/or.d.ts +0 -0
  757. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/override-properties.d.ts +0 -0
  758. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/package-json.d.ts +0 -0
  759. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/partial-deep.d.ts +0 -0
  760. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/partial-on-undefined-deep.d.ts +0 -0
  761. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-case.d.ts +0 -0
  762. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-cased-properties-deep.d.ts +0 -0
  763. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-cased-properties.d.ts +0 -0
  764. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pick-deep.d.ts +0 -0
  765. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pick-index-signature.d.ts +0 -0
  766. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/primitive.d.ts +0 -0
  767. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/promisable.d.ts +0 -0
  768. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-deep.d.ts +0 -0
  769. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-keys-of.d.ts +0 -0
  770. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-tuple.d.ts +0 -0
  771. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/replace.d.ts +0 -0
  772. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-all-or-none.d.ts +0 -0
  773. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-at-least-one.d.ts +0 -0
  774. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-exactly-one.d.ts +0 -0
  775. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-one-or-none.d.ts +0 -0
  776. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/required-deep.d.ts +0 -0
  777. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/required-keys-of.d.ts +0 -0
  778. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/screaming-snake-case.d.ts +0 -0
  779. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-field-type.d.ts +0 -0
  780. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-non-nullable.d.ts +0 -0
  781. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-optional.d.ts +0 -0
  782. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-parameter-type.d.ts +0 -0
  783. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-readonly.d.ts +0 -0
  784. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-required.d.ts +0 -0
  785. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-return-type.d.ts +0 -0
  786. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/shared-union-fields-deep.d.ts +0 -0
  787. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/single-key-object.d.ts +0 -0
  788. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-case.d.ts +0 -0
  789. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-cased-properties-deep.d.ts +0 -0
  790. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-cased-properties.d.ts +0 -0
  791. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/split-words.d.ts +0 -0
  792. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/split.d.ts +0 -0
  793. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/spread.d.ts +0 -0
  794. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/string-key-of.d.ts +0 -0
  795. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/string-slice.d.ts +0 -0
  796. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/stringified.d.ts +0 -0
  797. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/subtract.d.ts +0 -0
  798. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/sum.d.ts +0 -0
  799. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tagged-union.d.ts +0 -0
  800. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/trim.d.ts +0 -0
  801. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tsconfig-json.d.ts +0 -0
  802. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tuple-to-union.d.ts +0 -0
  803. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/typed-array.d.ts +0 -0
  804. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/undefined-on-partial-deep.d.ts +0 -0
  805. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/union-to-intersection.d.ts +0 -0
  806. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/unknown-array.d.ts +0 -0
  807. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/unknown-record.d.ts +0 -0
  808. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/value-of.d.ts +0 -0
  809. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable-deep.d.ts +0 -0
  810. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable-keys-of.d.ts +0 -0
  811. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable.d.ts +0 -0
@@ -1 +1,7 @@
1
- {"mappings":"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","sources":["packages/react/presence/src/index.ts","packages/react/presence/src/Presence.tsx","packages/react/presence/src/useStateMachine.tsx"],"sourcesContent":["export { Presence } from './Presence';\nexport type { PresenceProps } from './Presence';\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './useStateMachine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement;\n\n const ref = useComposedRefs(presence.ref, (child as any).ref);\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration>({} as any);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied\n // a frame after the animation ends, creating a flash of visible content.\n // By manually flushing we ensure they sync within a frame, removing the flash.\n ReactDOM.flushSync(() => send('ANIMATION_END'));\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n if (node) stylesRef.current = getComputedStyle(node);\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles?: CSSStyleDeclaration) {\n return styles?.animationName || 'none';\n}\n\nexport { Presence };\nexport type { PresenceProps };\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n"],"names":["Presence","React","ReactDOM","useComposedRefs","useLayoutEffect","useStateMachine","props","present","children","presence","usePresence","child","isPresent","Children","only","ref","forceMount","cloneElement","displayName","node","setNode","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","current","styles","wasPresent","hasPresentChanged","prevAnimationName","display","isAnimating","handleAnimationEnd","event","isCurrentAnimation","includes","animationName","target","flushSync","handleAnimationStart","addEventListener","removeEventListener","useCallback","getComputedStyle","machine","useReducer","nextState"],"version":3,"file":"index.mjs.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Presence.tsx", "../src/useStateMachine.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useStateMachine } from './useStateMachine';\n\ninterface PresenceProps {\n children: React.ReactElement | ((props: { present: boolean }) => React.ReactElement);\n present: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n\n const child = (\n typeof children === 'function'\n ? children({ present: presence.isPresent })\n : React.Children.only(children)\n ) as React.ReactElement;\n\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;\n};\n\nPresence.displayName = 'Presence';\n\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/\n\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement>();\n const stylesRef = React.useRef<CSSStyleDeclaration>({} as any);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n });\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n } else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currentAnimationName;\n\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n useLayoutEffect(() => {\n if (node) {\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n // With React 18 concurrency this update is applied\n // a frame after the animation ends, creating a flash of visible content.\n // By manually flushing we ensure they sync within a frame, removing the flash.\n ReactDOM.flushSync(() => send('ANIMATION_END'));\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n return () => {\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n };\n } else {\n // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }\n }, [node, send]);\n\n return {\n isPresent: ['mounted', 'unmountSuspended'].includes(state),\n ref: React.useCallback((node: HTMLElement) => {\n if (node) stylesRef.current = getComputedStyle(node);\n setNode(node);\n }, []),\n };\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getAnimationName(styles?: CSSStyleDeclaration) {\n return styles?.animationName || 'none';\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n\n // Not DEV\n return element.props.ref || (element as any).ref;\n}\n\nexport { Presence };\nexport type { PresenceProps };\n", "import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// \uD83E\uDD2F https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n"],
5
+ "mappings": "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",
6
+ "names": ["React", "node"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-presence",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,15 +28,14 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.13.10",
32
- "@radix-ui/react-compose-refs": "1.0.1",
33
- "@radix-ui/react-use-layout-effect": "1.0.1"
31
+ "@radix-ui/react-compose-refs": "1.1.0",
32
+ "@radix-ui/react-use-layout-effect": "1.1.0"
34
33
  },
35
34
  "peerDependencies": {
36
35
  "@types/react": "*",
37
36
  "@types/react-dom": "*",
38
- "react": "^16.8 || ^17.0 || ^18.0",
39
- "react-dom": "^16.8 || ^17.0 || ^18.0"
37
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
38
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
40
39
  },
41
40
  "peerDependenciesMeta": {
42
41
  "@types/react": {
@@ -1,16 +1,15 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
+
2
3
  declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "span", "svg", "ul"];
3
- type PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;
4
- export type ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<React.ComponentProps<T>>;
5
4
  type Primitives = {
6
- [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E>;
5
+ [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
7
6
  };
8
- export type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
7
+ type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
9
8
  asChild?: boolean;
10
9
  };
11
10
  interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
12
11
  }
13
- export const Primitive: Primitives;
12
+ declare const Primitive: Primitives;
14
13
  /**
15
14
  * Flush custom event dispatch
16
15
  * https://github.com/radix-ui/primitives/pull/1378
@@ -47,7 +46,7 @@ export const Primitive: Primitives;
47
46
  * this utility with them. This is because it's possible for those handlers to be called implicitly during render
48
47
  * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
49
48
  */
50
- export function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
51
- export const Root: Primitives;
49
+ declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
50
+ declare const Root: Primitives;
52
51
 
53
- //# sourceMappingURL=index.d.ts.map
52
+ export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
@@ -1,16 +1,15 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
+
2
3
  declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "span", "svg", "ul"];
3
- type PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;
4
- export type ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<React.ComponentProps<T>>;
5
4
  type Primitives = {
6
- [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E>;
5
+ [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
7
6
  };
8
- export type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
7
+ type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
9
8
  asChild?: boolean;
10
9
  };
11
10
  interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
12
11
  }
13
- export const Primitive: Primitives;
12
+ declare const Primitive: Primitives;
14
13
  /**
15
14
  * Flush custom event dispatch
16
15
  * https://github.com/radix-ui/primitives/pull/1378
@@ -47,7 +46,7 @@ export const Primitive: Primitives;
47
46
  * this utility with them. This is because it's possible for those handlers to be called implicitly during render
48
47
  * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
49
48
  */
50
- export function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
51
- export const Root: Primitives;
49
+ declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
50
+ declare const Root: Primitives;
52
51
 
53
- //# sourceMappingURL=index.d.ts.map
52
+ export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
@@ -1,105 +1,78 @@
1
- var $iMixA$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");
2
- var $iMixA$react = require("react");
3
- var $iMixA$reactdom = require("react-dom");
4
- var $iMixA$radixuireactslot = require("@radix-ui/react-slot");
5
-
6
- function $parcel$export(e, n, v, s) {
7
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
- }
9
- function $parcel$interopDefault(a) {
10
- return a && a.__esModule ? a.default : a;
11
- }
12
-
13
- $parcel$export(module.exports, "Primitive", () => $c3def6332c2749a6$export$250ffa63cdc0d034);
14
- $parcel$export(module.exports, "Root", () => $c3def6332c2749a6$export$be92b6f5f03c0fe9);
15
- $parcel$export(module.exports, "dispatchDiscreteCustomEvent", () => $c3def6332c2749a6$export$6d1a0317bde7de7f);
16
-
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
17
29
 
30
+ // packages/react/primitive/src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ Primitive: () => Primitive,
34
+ Root: () => Root,
35
+ dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
36
+ });
37
+ module.exports = __toCommonJS(src_exports);
18
38
 
19
-
20
- const $c3def6332c2749a6$var$NODES = [
21
- 'a',
22
- 'button',
23
- 'div',
24
- 'form',
25
- 'h2',
26
- 'h3',
27
- 'img',
28
- 'input',
29
- 'label',
30
- 'li',
31
- 'nav',
32
- 'ol',
33
- 'p',
34
- 'span',
35
- 'svg',
36
- 'ul'
37
- ]; // Temporary while we await merge of this fix:
38
- // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
39
- // prettier-ignore
40
- /* -------------------------------------------------------------------------------------------------
41
- * Primitive
42
- * -----------------------------------------------------------------------------------------------*/ const $c3def6332c2749a6$export$250ffa63cdc0d034 = $c3def6332c2749a6$var$NODES.reduce((primitive, node)=>{
43
- const Node = /*#__PURE__*/ $iMixA$react.forwardRef((props, forwardedRef)=>{
44
- const { asChild: asChild , ...primitiveProps } = props;
45
- const Comp = asChild ? $iMixA$radixuireactslot.Slot : node;
46
- $iMixA$react.useEffect(()=>{
47
- window[Symbol.for('radix-ui')] = true;
48
- }, []);
49
- return /*#__PURE__*/ $iMixA$react.createElement(Comp, ($parcel$interopDefault($iMixA$babelruntimehelpersextends))({}, primitiveProps, {
50
- ref: forwardedRef
51
- }));
52
- });
53
- Node.displayName = `Primitive.${node}`;
54
- return {
55
- ...primitive,
56
- [node]: Node
57
- };
39
+ // packages/react/primitive/src/Primitive.tsx
40
+ var React = __toESM(require("react"));
41
+ var ReactDOM = __toESM(require("react-dom"));
42
+ var import_react_slot = require("@radix-ui/react-slot");
43
+ var import_jsx_runtime = require("react/jsx-runtime");
44
+ var NODES = [
45
+ "a",
46
+ "button",
47
+ "div",
48
+ "form",
49
+ "h2",
50
+ "h3",
51
+ "img",
52
+ "input",
53
+ "label",
54
+ "li",
55
+ "nav",
56
+ "ol",
57
+ "p",
58
+ "span",
59
+ "svg",
60
+ "ul"
61
+ ];
62
+ var Primitive = NODES.reduce((primitive, node) => {
63
+ const Node = React.forwardRef((props, forwardedRef) => {
64
+ const { asChild, ...primitiveProps } = props;
65
+ const Comp = asChild ? import_react_slot.Slot : node;
66
+ if (typeof window !== "undefined") {
67
+ window[Symbol.for("radix-ui")] = true;
68
+ }
69
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
70
+ });
71
+ Node.displayName = `Primitive.${node}`;
72
+ return { ...primitive, [node]: Node };
58
73
  }, {});
59
- /* -------------------------------------------------------------------------------------------------
60
- * Utils
61
- * -----------------------------------------------------------------------------------------------*/ /**
62
- * Flush custom event dispatch
63
- * https://github.com/radix-ui/primitives/pull/1378
64
- *
65
- * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
66
- *
67
- * Internally, React prioritises events in the following order:
68
- * - discrete
69
- * - continuous
70
- * - default
71
- *
72
- * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
73
- *
74
- * `discrete` is an important distinction as updates within these events are applied immediately.
75
- * React however, is not able to infer the priority of custom event types due to how they are detected internally.
76
- * Because of this, it's possible for updates from custom events to be unexpectedly batched when
77
- * dispatched by another `discrete` event.
78
- *
79
- * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
80
- * This utility should be used when dispatching a custom event from within another `discrete` event, this utility
81
- * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
82
- * For example:
83
- *
84
- * dispatching a known click 👎
85
- * target.dispatchEvent(new Event(‘click’))
86
- *
87
- * dispatching a custom type within a non-discrete event 👎
88
- * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
89
- *
90
- * dispatching a custom type within a `discrete` event 👍
91
- * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
92
- *
93
- * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
94
- * this utility with them. This is because it's possible for those handlers to be called implicitly during render
95
- * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
96
- */ function $c3def6332c2749a6$export$6d1a0317bde7de7f(target, event) {
97
- if (target) $iMixA$reactdom.flushSync(()=>target.dispatchEvent(event)
98
- );
74
+ function dispatchDiscreteCustomEvent(target, event) {
75
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
99
76
  }
100
- /* -----------------------------------------------------------------------------------------------*/ const $c3def6332c2749a6$export$be92b6f5f03c0fe9 = $c3def6332c2749a6$export$250ffa63cdc0d034;
101
-
102
-
103
-
104
-
77
+ var Root = Primitive;
105
78
  //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"mappings":";;;;;;;;;;;;;;;A;;;;ACIA,MAAMM,2BAAK,GAAG;IACZ,GADY;IAEZ,QAFY;IAGZ,KAHY;IAIZ,MAJY;IAKZ,IALY;IAMZ,IANY;IAOZ,KAPY;IAQZ,OARY;IASZ,OATY;IAUZ,IAVY;IAWZ,KAXY;IAYZ,IAZY;IAaZ,GAbY;IAcZ,MAdY;IAeZ,KAfY;IAgBZ,IAhBY;CAAd,A,EAmBA,8CAnBA;AAoBA,gEAAA;AACA,kBAAA;AAcA;;oGAEA,CAEA,MAAMN,yCAAS,GAAGM,2BAAK,CAACC,MAAN,CAAa,CAACC,SAAD,EAAYC,IAAZ,GAAqB;IAClD,MAAMC,IAAI,GAAA,aAAGP,CAAAA,uBAAA,CAAiB,CAACS,KAAD,EAA4CC,YAA5C,GAAkE;QAC9F,MAAM,E,SAAEC,OAAF,CAAA,EAAW,GAAGC,cAAH,EAAX,GAAiCH,KAAvC,AAAM;QACN,MAAMI,IAAS,GAAGF,OAAO,GAAGT,4BAAH,GAAUI,IAAnC,AAAA;QAEAN,sBAAA,CAAgB,IAAM;YACnBe,MAAD,CAAgBC,MAAM,CAACC,GAAP,CAAW,UAAX,CAAhB,CAAA,GAA0C,IAA1C,CAACF;SADH,EAEG,EAFH,CAEC,CAAA;QAED,OAAA,aAAO,CAAA,0BAAA,CAAC,IAAD,EAAA,2DAAA,CAAA,EAAA,EAAUH,cAAV,EAAP;YAAiC,GAAG,EAAEF,YAAL;SAA1B,CAAA,CAAP,CAAO;KARI,CAAb,AASC;IAEDH,IAAI,CAACW,WAAL,GAAoB,CAAA,UAAA,EAAYZ,IAAK,CAAA,CAArC,CAAAC;IAEA,OAAO;QAAE,GAAGF,SAAL;QAAgB,CAACC,IAAD,CAAA,EAAQC,IAAR;KAAvB,CAAO;CAdS,EAef,EAfe,CAAlB,AAeC;AAED;;oGAEA,CAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCA,CAEA,SAASR,yCAAT,CAA4DoB,MAA5D,EAAiFC,KAAjF,EAA2F;IACzF,IAAID,MAAJ,EAAYlB,yBAAA,CAAmB,IAAMkB,MAAM,CAACG,aAAP,CAAqBF,KAArB,CAAzB;IAAA,CAAZ,CAAA;CACD;AAED,oGAAA,CAEA,MAAMtB,yCAAI,GAAGD,yCAAb,AAAA;;AD3GA","sources":["packages/react/primitive/src/index.ts","packages/react/primitive/src/Primitive.tsx"],"sourcesContent":["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './Primitive';\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef } from './Primitive';\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\n// Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\ntype PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;\ntype ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<\n React.ComponentProps<T>\n>;\n\ntype Primitives = { [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n React.useEffect(() => {\n (window as any)[Symbol.for('radix-ui')] = true;\n }, []);\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef };\n"],"names":["Primitive","Root","dispatchDiscreteCustomEvent","React","ReactDOM","Slot","NODES","reduce","primitive","node","Node","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","useEffect","window","Symbol","for","displayName","target","event","flushSync","dispatchEvent"],"version":3,"file":"index.js.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/Primitive.tsx"],
4
+ "sourcesContent": ["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './Primitive';\nexport type { PrimitivePropsWithRef } from './Primitive';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,wBAAqB;AA0CV;AAxCX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,yBAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,4CAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
6
+ "names": []
7
+ }
@@ -1,96 +1,45 @@
1
- import $4q5Fq$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
2
- import {forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement} from "react";
3
- import {flushSync as $4q5Fq$flushSync} from "react-dom";
4
- import {Slot as $4q5Fq$Slot} from "@radix-ui/react-slot";
5
-
6
-
7
-
8
-
9
-
10
- const $8927f6f2acc4f386$var$NODES = [
11
- 'a',
12
- 'button',
13
- 'div',
14
- 'form',
15
- 'h2',
16
- 'h3',
17
- 'img',
18
- 'input',
19
- 'label',
20
- 'li',
21
- 'nav',
22
- 'ol',
23
- 'p',
24
- 'span',
25
- 'svg',
26
- 'ul'
27
- ]; // Temporary while we await merge of this fix:
28
- // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
29
- // prettier-ignore
30
- /* -------------------------------------------------------------------------------------------------
31
- * Primitive
32
- * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
33
- const Node = /*#__PURE__*/ $4q5Fq$forwardRef((props, forwardedRef)=>{
34
- const { asChild: asChild , ...primitiveProps } = props;
35
- const Comp = asChild ? $4q5Fq$Slot : node;
36
- $4q5Fq$useEffect(()=>{
37
- window[Symbol.for('radix-ui')] = true;
38
- }, []);
39
- return /*#__PURE__*/ $4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {
40
- ref: forwardedRef
41
- }));
42
- });
43
- Node.displayName = `Primitive.${node}`;
44
- return {
45
- ...primitive,
46
- [node]: Node
47
- };
1
+ // packages/react/primitive/src/Primitive.tsx
2
+ import * as React from "react";
3
+ import * as ReactDOM from "react-dom";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var NODES = [
7
+ "a",
8
+ "button",
9
+ "div",
10
+ "form",
11
+ "h2",
12
+ "h3",
13
+ "img",
14
+ "input",
15
+ "label",
16
+ "li",
17
+ "nav",
18
+ "ol",
19
+ "p",
20
+ "span",
21
+ "svg",
22
+ "ul"
23
+ ];
24
+ var Primitive = NODES.reduce((primitive, node) => {
25
+ const Node = React.forwardRef((props, forwardedRef) => {
26
+ const { asChild, ...primitiveProps } = props;
27
+ const Comp = asChild ? Slot : node;
28
+ if (typeof window !== "undefined") {
29
+ window[Symbol.for("radix-ui")] = true;
30
+ }
31
+ return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
32
+ });
33
+ Node.displayName = `Primitive.${node}`;
34
+ return { ...primitive, [node]: Node };
48
35
  }, {});
49
- /* -------------------------------------------------------------------------------------------------
50
- * Utils
51
- * -----------------------------------------------------------------------------------------------*/ /**
52
- * Flush custom event dispatch
53
- * https://github.com/radix-ui/primitives/pull/1378
54
- *
55
- * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
56
- *
57
- * Internally, React prioritises events in the following order:
58
- * - discrete
59
- * - continuous
60
- * - default
61
- *
62
- * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
63
- *
64
- * `discrete` is an important distinction as updates within these events are applied immediately.
65
- * React however, is not able to infer the priority of custom event types due to how they are detected internally.
66
- * Because of this, it's possible for updates from custom events to be unexpectedly batched when
67
- * dispatched by another `discrete` event.
68
- *
69
- * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
70
- * This utility should be used when dispatching a custom event from within another `discrete` event, this utility
71
- * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
72
- * For example:
73
- *
74
- * dispatching a known click 👎
75
- * target.dispatchEvent(new Event(‘click’))
76
- *
77
- * dispatching a custom type within a non-discrete event 👎
78
- * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
79
- *
80
- * dispatching a custom type within a `discrete` event 👍
81
- * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
82
- *
83
- * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
84
- * this utility with them. This is because it's possible for those handlers to be called implicitly during render
85
- * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
86
- */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
87
- if (target) $4q5Fq$flushSync(()=>target.dispatchEvent(event)
88
- );
36
+ function dispatchDiscreteCustomEvent(target, event) {
37
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
89
38
  }
90
- /* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;
91
-
92
-
93
-
94
-
95
- export {$8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent};
39
+ var Root = Primitive;
40
+ export {
41
+ Primitive,
42
+ Root,
43
+ dispatchDiscreteCustomEvent
44
+ };
96
45
  //# sourceMappingURL=index.mjs.map
@@ -1 +1,7 @@
1
- {"mappings":";;;;;A;;;;ACIA,MAAMM,2BAAK,GAAG;IACZ,GADY;IAEZ,QAFY;IAGZ,KAHY;IAIZ,MAJY;IAKZ,IALY;IAMZ,IANY;IAOZ,KAPY;IAQZ,OARY;IASZ,OATY;IAUZ,IAVY;IAWZ,KAXY;IAYZ,IAZY;IAaZ,GAbY;IAcZ,MAdY;IAeZ,KAfY;IAgBZ,IAhBY;CAAd,A,EAmBA,8CAnBA;AAoBA,gEAAA;AACA,kBAAA;AAcA;;oGAEA,CAEA,MAAMN,yCAAS,GAAGM,2BAAK,CAACC,MAAN,CAAa,CAACC,SAAD,EAAYC,IAAZ,GAAqB;IAClD,MAAMC,IAAI,GAAA,aAAGP,CAAAA,iBAAA,CAAiB,CAACS,KAAD,EAA4CC,YAA5C,GAAkE;QAC9F,MAAM,E,SAAEC,OAAF,CAAA,EAAW,GAAGC,cAAH,EAAX,GAAiCH,KAAvC,AAAM;QACN,MAAMI,IAAS,GAAGF,OAAO,GAAGT,WAAH,GAAUI,IAAnC,AAAA;QAEAN,gBAAA,CAAgB,IAAM;YACnBe,MAAD,CAAgBC,MAAM,CAACC,GAAP,CAAW,UAAX,CAAhB,CAAA,GAA0C,IAA1C,CAACF;SADH,EAEG,EAFH,CAEC,CAAA;QAED,OAAA,aAAO,CAAA,oBAAA,CAAC,IAAD,EAAA,oCAAA,CAAA,EAAA,EAAUH,cAAV,EAAP;YAAiC,GAAG,EAAEF,YAAL;SAA1B,CAAA,CAAP,CAAO;KARI,CAAb,AASC;IAEDH,IAAI,CAACW,WAAL,GAAoB,CAAA,UAAA,EAAYZ,IAAK,CAAA,CAArC,CAAAC;IAEA,OAAO;QAAE,GAAGF,SAAL;QAAgB,CAACC,IAAD,CAAA,EAAQC,IAAR;KAAvB,CAAO;CAdS,EAef,EAfe,CAAlB,AAeC;AAED;;oGAEA,CAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCA,CAEA,SAASR,yCAAT,CAA4DoB,MAA5D,EAAiFC,KAAjF,EAA2F;IACzF,IAAID,MAAJ,EAAYlB,gBAAA,CAAmB,IAAMkB,MAAM,CAACG,aAAP,CAAqBF,KAArB,CAAzB;IAAA,CAAZ,CAAA;CACD;AAED,oGAAA,CAEA,MAAMtB,yCAAI,GAAGD,yCAAb,AAAA;;AD3GA","sources":["packages/react/primitive/src/index.ts","packages/react/primitive/src/Primitive.tsx"],"sourcesContent":["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './Primitive';\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef } from './Primitive';\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\n// Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\ntype PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;\ntype ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<\n React.ComponentProps<T>\n>;\n\ntype Primitives = { [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n React.useEffect(() => {\n (window as any)[Symbol.for('radix-ui')] = true;\n }, []);\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef };\n"],"names":["Primitive","Root","dispatchDiscreteCustomEvent","React","ReactDOM","Slot","NODES","reduce","primitive","node","Node","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","useEffect","window","Symbol","for","displayName","target","event","flushSync","dispatchEvent"],"version":3,"file":"index.mjs.map"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Primitive.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
5
+ "mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,YAAY;AA0CV;AAxCX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-primitive",
3
- "version": "1.0.3",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,8 +28,7 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.13.10",
32
- "@radix-ui/react-slot": "1.0.2"
31
+ "@radix-ui/react-slot": "1.1.0"
33
32
  },
34
33
  "devDependencies": {
35
34
  "@testing-library/react": "^10.4.8"
@@ -37,8 +36,8 @@
37
36
  "peerDependencies": {
38
37
  "@types/react": "*",
39
38
  "@types/react-dom": "*",
40
- "react": "^16.8 || ^17.0 || ^18.0",
41
- "react-dom": "^16.8 || ^17.0 || ^18.0"
39
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
40
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
42
41
  },
43
42
  "peerDependenciesMeta": {
44
43
  "@types/react": {