@blimu/react 1.1.0 → 1.1.4

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 (489) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/index.cjs +5 -1
  3. package/dist/_virtual/index.cjs.map +1 -1
  4. package/dist/_virtual/index.js +3 -3
  5. package/dist/_virtual/index2.cjs +4 -1
  6. package/dist/_virtual/index2.cjs.map +1 -1
  7. package/dist/_virtual/index2.js +2 -2
  8. package/dist/_virtual/use-sync-external-store-shim.development.cjs +4 -1
  9. package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -1
  10. package/dist/_virtual/use-sync-external-store-shim.development.js +2 -2
  11. package/dist/_virtual/use-sync-external-store-shim.production.cjs +4 -1
  12. package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -1
  13. package/dist/_virtual/use-sync-external-store-shim.production.js +2 -2
  14. package/dist/client/auth.service.cjs +248 -1
  15. package/dist/client/auth.service.cjs.map +1 -1
  16. package/dist/client/auth.service.d.ts.map +1 -1
  17. package/dist/client/auth.service.js +193 -96
  18. package/dist/client/auth.service.js.map +1 -1
  19. package/dist/client/external-store.cjs +26 -1
  20. package/dist/client/external-store.cjs.map +1 -1
  21. package/dist/client/external-store.js +22 -8
  22. package/dist/client/external-store.js.map +1 -1
  23. package/dist/client/runtime-client.cjs +136 -1
  24. package/dist/client/runtime-client.cjs.map +1 -1
  25. package/dist/client/runtime-client.d.ts +1 -1
  26. package/dist/client/runtime-client.d.ts.map +1 -1
  27. package/dist/client/runtime-client.js +85 -51
  28. package/dist/client/runtime-client.js.map +1 -1
  29. package/dist/components/index.cjs +13 -0
  30. package/dist/components/index.cjs.map +1 -0
  31. package/dist/components/index.d.ts +6 -6
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/index.js +13 -0
  34. package/dist/components/index.js.map +1 -0
  35. package/dist/components/members-list.cjs +132 -1
  36. package/dist/components/members-list.cjs.map +1 -1
  37. package/dist/components/members-list.d.ts.map +1 -1
  38. package/dist/components/members-list.js +69 -64
  39. package/dist/components/members-list.js.map +1 -1
  40. package/dist/components/redirect-to-sign-in.cjs +34 -1
  41. package/dist/components/redirect-to-sign-in.cjs.map +1 -1
  42. package/dist/components/redirect-to-sign-in.js +28 -20
  43. package/dist/components/redirect-to-sign-in.js.map +1 -1
  44. package/dist/components/sign-in-button.cjs +36 -1
  45. package/dist/components/sign-in-button.cjs.map +1 -1
  46. package/dist/components/sign-in-button.d.ts.map +1 -1
  47. package/dist/components/sign-in-button.js +25 -21
  48. package/dist/components/sign-in-button.js.map +1 -1
  49. package/dist/components/ui/avatar.cjs +42 -1
  50. package/dist/components/ui/avatar.cjs.map +1 -1
  51. package/dist/components/ui/avatar.d.ts +2 -2
  52. package/dist/components/ui/avatar.d.ts.map +1 -1
  53. package/dist/components/ui/avatar.js +23 -23
  54. package/dist/components/ui/avatar.js.map +1 -1
  55. package/dist/components/ui/badge.d.ts +2 -2
  56. package/dist/components/ui/badge.d.ts.map +1 -1
  57. package/dist/components/ui/dropdown-menu.cjs +148 -1
  58. package/dist/components/ui/dropdown-menu.cjs.map +1 -1
  59. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  60. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  61. package/dist/components/ui/dropdown-menu.js +83 -81
  62. package/dist/components/ui/dropdown-menu.js.map +1 -1
  63. package/dist/components/ui/popover.d.ts +2 -2
  64. package/dist/components/ui/popover.d.ts.map +1 -1
  65. package/dist/components/ui/separator.d.ts +1 -1
  66. package/dist/components/ui/separator.d.ts.map +1 -1
  67. package/dist/components/user-avatar.cjs +22 -1
  68. package/dist/components/user-avatar.cjs.map +1 -1
  69. package/dist/components/user-avatar.d.ts +5 -5
  70. package/dist/components/user-avatar.d.ts.map +1 -1
  71. package/dist/components/user-avatar.js +16 -16
  72. package/dist/components/user-avatar.js.map +1 -1
  73. package/dist/components/user-button/styles.cjs +39 -1
  74. package/dist/components/user-button/styles.cjs.map +1 -1
  75. package/dist/components/user-button/styles.js +6 -5
  76. package/dist/components/user-button/styles.js.map +1 -1
  77. package/dist/components/user-button/user-button.cjs +98 -1
  78. package/dist/components/user-button/user-button.cjs.map +1 -1
  79. package/dist/components/user-button/user-button.d.ts +1 -1
  80. package/dist/components/user-button/user-button.d.ts.map +1 -1
  81. package/dist/components/user-button/user-button.js +64 -58
  82. package/dist/components/user-button/user-button.js.map +1 -1
  83. package/dist/hooks/index.cjs +14 -0
  84. package/dist/hooks/index.cjs.map +1 -0
  85. package/dist/hooks/index.d.ts +3 -2
  86. package/dist/hooks/index.d.ts.map +1 -1
  87. package/dist/hooks/index.js +14 -0
  88. package/dist/hooks/index.js.map +1 -0
  89. package/dist/hooks/use-auth.cjs +44 -1
  90. package/dist/hooks/use-auth.cjs.map +1 -1
  91. package/dist/hooks/use-auth.d.ts +13 -15
  92. package/dist/hooks/use-auth.d.ts.map +1 -1
  93. package/dist/hooks/use-auth.js +30 -26
  94. package/dist/hooks/use-auth.js.map +1 -1
  95. package/dist/hooks/use-client.cjs +9 -1
  96. package/dist/hooks/use-client.cjs.map +1 -1
  97. package/dist/hooks/use-client.d.ts +1 -1
  98. package/dist/hooks/use-client.d.ts.map +1 -1
  99. package/dist/hooks/use-client.js +6 -5
  100. package/dist/hooks/use-client.js.map +1 -1
  101. package/dist/hooks/use-members.cjs +60 -1
  102. package/dist/hooks/use-members.cjs.map +1 -1
  103. package/dist/hooks/use-members.d.ts +5 -5
  104. package/dist/hooks/use-members.d.ts.map +1 -1
  105. package/dist/hooks/use-members.js +53 -41
  106. package/dist/hooks/use-members.js.map +1 -1
  107. package/dist/hooks/use-store.cjs +17 -1
  108. package/dist/hooks/use-store.cjs.map +1 -1
  109. package/dist/hooks/use-store.js +7 -7
  110. package/dist/hooks/use-store.js.map +1 -1
  111. package/dist/index.cjs +37 -1
  112. package/dist/index.cjs.map +1 -1
  113. package/dist/index.d.ts +5 -5
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +35 -35
  116. package/dist/lib/utils.cjs +8 -1
  117. package/dist/lib/utils.cjs.map +1 -1
  118. package/dist/lib/utils.js +5 -5
  119. package/dist/lib/utils.js.map +1 -1
  120. package/dist/lib/variants.cjs +46 -1
  121. package/dist/lib/variants.cjs.map +1 -1
  122. package/dist/lib/variants.d.ts +1 -1
  123. package/dist/lib/variants.js +6 -5
  124. package/dist/lib/variants.js.map +1 -1
  125. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +721 -1
  126. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
  127. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +571 -377
  128. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
  129. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +625 -1
  130. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
  131. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +539 -316
  132. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
  133. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +313 -1
  134. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -1
  135. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +261 -172
  136. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
  137. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +154 -1
  138. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
  139. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +173 -1
  140. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
  141. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -107
  142. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
  143. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +111 -87
  144. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -1
  145. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +11 -1
  146. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
  147. package/dist/node_modules/@radix-ui/primitive/dist/index.js +7 -5
  148. package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
  149. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -1
  150. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  151. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +17 -16
  152. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
  153. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -1
  154. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
  155. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +105 -57
  156. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
  157. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +80 -1
  158. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  159. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +49 -41
  160. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
  161. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -1
  162. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  163. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +17 -10
  164. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  165. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +119 -1
  166. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  167. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +86 -42
  168. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
  169. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +70 -1
  170. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
  171. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +57 -37
  172. package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
  173. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -1
  174. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
  175. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -19
  176. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
  177. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +79 -1
  178. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  179. package/dist/node_modules/@radix-ui/react-context/dist/index.js +48 -39
  180. package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
  181. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -1
  182. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
  183. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +6 -6
  184. package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
  185. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -1
  186. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  187. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +182 -97
  188. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
  189. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +296 -1
  190. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
  191. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +232 -167
  192. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
  193. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -1
  194. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
  195. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +23 -11
  196. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
  197. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -1
  198. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  199. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +169 -98
  200. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
  201. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +31 -1
  202. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
  203. package/dist/node_modules/@radix-ui/react-id/dist/index.js +11 -10
  204. package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
  205. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -1
  206. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
  207. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +662 -442
  208. package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
  209. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -1
  210. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  211. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +209 -137
  212. package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
  213. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +34 -1
  214. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  215. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +14 -12
  216. package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
  217. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +145 -1
  218. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
  219. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +103 -45
  220. package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
  221. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -1
  222. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  223. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +21 -14
  224. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  225. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -1
  226. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
  227. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -135
  228. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
  229. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +105 -1
  230. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  231. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +74 -35
  232. package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
  233. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -1
  234. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
  235. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +8 -7
  236. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
  237. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -1
  238. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
  239. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -40
  240. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
  241. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -1
  242. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -1
  243. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +13 -10
  244. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
  245. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +15 -1
  246. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -1
  247. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +8 -8
  248. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -1
  249. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -1
  250. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
  251. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  252. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
  253. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -1
  254. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
  255. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +34 -22
  256. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
  257. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +122 -1
  258. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -1
  259. package/dist/node_modules/aria-hidden/dist/es2015/index.js +111 -41
  260. package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
  261. package/dist/node_modules/class-variance-authority/dist/index.cjs +45 -1
  262. package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -1
  263. package/dist/node_modules/class-variance-authority/dist/index.js +40 -30
  264. package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
  265. package/dist/node_modules/clsx/dist/clsx.cjs +17 -1
  266. package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
  267. package/dist/node_modules/clsx/dist/clsx.js +13 -13
  268. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  269. package/dist/node_modules/get-nonce/dist/es2015/index.cjs +9 -1
  270. package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -1
  271. package/dist/node_modules/get-nonce/dist/es2015/index.js +5 -3
  272. package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -1
  273. package/dist/node_modules/js-cookie/dist/js.cookie.cjs +99 -1
  274. package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
  275. package/dist/node_modules/js-cookie/dist/js.cookie.js +69 -43
  276. package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -1
  277. package/dist/node_modules/jwt-decode/build/esm/index.cjs +58 -1
  278. package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -1
  279. package/dist/node_modules/jwt-decode/build/esm/index.js +36 -30
  280. package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -1
  281. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +35 -1
  282. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
  283. package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -25
  284. package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -1
  285. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +22 -1
  286. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
  287. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +16 -15
  288. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -1
  289. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +14 -1
  290. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
  291. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +2 -2
  292. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -1
  293. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +7 -1
  294. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
  295. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +5 -4
  296. package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -1
  297. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +7 -1
  298. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
  299. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +5 -4
  300. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
  301. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +7 -1
  302. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
  303. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +5 -4
  304. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -1
  305. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +11 -1
  306. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
  307. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +6 -5
  308. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -1
  309. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +26 -1
  310. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
  311. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -14
  312. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -1
  313. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +28 -1
  314. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
  315. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +8 -8
  316. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
  317. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +197 -4
  318. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
  319. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -98
  320. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
  321. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +55 -1
  322. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -1
  323. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -24
  324. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
  325. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +19 -1
  326. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -1
  327. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +12 -9
  328. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
  329. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +102 -1
  330. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -1
  331. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -51
  332. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
  333. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +5 -1
  334. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -1
  335. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
  336. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -1
  337. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +7 -1
  338. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
  339. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
  340. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -1
  341. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +62 -36
  342. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -1
  343. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +41 -65
  344. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
  345. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +10 -1
  346. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -1
  347. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -5
  348. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -1
  349. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +37 -1
  350. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -1
  351. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +28 -16
  352. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
  353. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +13 -1
  354. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -1
  355. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +9 -7
  356. package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
  357. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +33 -1
  358. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -1
  359. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +11 -10
  360. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
  361. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +48 -1
  362. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -1
  363. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -17
  364. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
  365. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +3014 -1
  366. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
  367. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +804 -555
  368. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  369. package/dist/node_modules/tailwindcss/dist/plugin.cjs +13 -1
  370. package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
  371. package/dist/node_modules/tailwindcss/dist/plugin.js +8 -8
  372. package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -1
  373. package/dist/node_modules/tslib/tslib.es6.cjs +38 -1
  374. package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -1
  375. package/dist/node_modules/tslib/tslib.es6.js +33 -21
  376. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  377. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +11 -1
  378. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -1
  379. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +8 -3
  380. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -1
  381. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +52 -1
  382. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -1
  383. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +28 -19
  384. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  385. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +29 -1
  386. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -1
  387. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +15 -11
  388. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  389. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +38 -1
  390. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -1
  391. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +15 -12
  392. package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -1
  393. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +88 -1
  394. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
  395. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +64 -43
  396. package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  397. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +68 -1
  398. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -1
  399. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +49 -39
  400. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
  401. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +53 -1
  402. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -1
  403. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +39 -32
  404. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
  405. package/dist/node_modules/use-sync-external-store/shim/index.cjs +17 -1
  406. package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -1
  407. package/dist/node_modules/use-sync-external-store/shim/index.js +14 -7
  408. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -1
  409. package/dist/providers/auth/auth.context.cjs +5 -1
  410. package/dist/providers/auth/auth.context.cjs.map +1 -1
  411. package/dist/providers/auth/auth.context.js +3 -3
  412. package/dist/providers/auth/auth.context.js.map +1 -1
  413. package/dist/providers/auth/auth.hook.cjs +12 -1
  414. package/dist/providers/auth/auth.hook.cjs.map +1 -1
  415. package/dist/providers/auth/auth.hook.js +8 -7
  416. package/dist/providers/auth/auth.hook.js.map +1 -1
  417. package/dist/providers/auth/auth.provider.cjs +37 -1
  418. package/dist/providers/auth/auth.provider.cjs.map +1 -1
  419. package/dist/providers/auth/auth.provider.js +31 -22
  420. package/dist/providers/auth/auth.provider.js.map +1 -1
  421. package/dist/providers/blimu/blimu.context.cjs +5 -1
  422. package/dist/providers/blimu/blimu.context.cjs.map +1 -1
  423. package/dist/providers/blimu/blimu.context.d.ts +4 -4
  424. package/dist/providers/blimu/blimu.context.d.ts.map +1 -1
  425. package/dist/providers/blimu/blimu.context.js +3 -3
  426. package/dist/providers/blimu/blimu.context.js.map +1 -1
  427. package/dist/providers/blimu/blimu.hook.cjs +12 -1
  428. package/dist/providers/blimu/blimu.hook.cjs.map +1 -1
  429. package/dist/providers/blimu/blimu.hook.js +8 -7
  430. package/dist/providers/blimu/blimu.hook.js.map +1 -1
  431. package/dist/providers/blimu/blimu.provider.cjs +71 -1
  432. package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
  433. package/dist/providers/blimu/blimu.provider.d.ts +1 -1
  434. package/dist/providers/blimu/blimu.provider.d.ts.map +1 -1
  435. package/dist/providers/blimu/blimu.provider.js +32 -27
  436. package/dist/providers/blimu/blimu.provider.js.map +1 -1
  437. package/dist/providers/index.cjs +13 -0
  438. package/dist/providers/index.cjs.map +1 -0
  439. package/dist/providers/index.d.ts +3 -3
  440. package/dist/providers/index.d.ts.map +1 -1
  441. package/dist/providers/index.js +13 -0
  442. package/dist/providers/index.js.map +1 -0
  443. package/dist/providers/theme/index.d.ts +2 -2
  444. package/dist/providers/theme/index.d.ts.map +1 -1
  445. package/dist/providers/theme/theme.context.cjs +5 -1
  446. package/dist/providers/theme/theme.context.cjs.map +1 -1
  447. package/dist/providers/theme/theme.context.js +3 -3
  448. package/dist/providers/theme/theme.context.js.map +1 -1
  449. package/dist/providers/theme/theme.hook.cjs +12 -1
  450. package/dist/providers/theme/theme.hook.cjs.map +1 -1
  451. package/dist/providers/theme/theme.hook.js +8 -7
  452. package/dist/providers/theme/theme.hook.js.map +1 -1
  453. package/dist/providers/theme/theme.provider.cjs +104 -1
  454. package/dist/providers/theme/theme.provider.cjs.map +1 -1
  455. package/dist/providers/theme/theme.provider.d.ts.map +1 -1
  456. package/dist/providers/theme/theme.provider.js +85 -48
  457. package/dist/providers/theme/theme.provider.js.map +1 -1
  458. package/dist/styles/styles.css +34 -40
  459. package/dist/styles/tw-styles.css +34 -40
  460. package/dist/tailwind.cjs +200 -0
  461. package/dist/tailwind.cjs.map +1 -0
  462. package/dist/{tailwind.plugin.js → tailwind.js} +43 -43
  463. package/dist/tailwind.js.map +1 -0
  464. package/dist/types/index.cjs +11 -1
  465. package/dist/types/index.cjs.map +1 -1
  466. package/dist/types/index.d.ts +22 -8
  467. package/dist/types/index.d.ts.map +1 -1
  468. package/dist/types/index.js +8 -8
  469. package/dist/types/index.js.map +1 -1
  470. package/dist/utils/publishable-key.cjs +62 -1
  471. package/dist/utils/publishable-key.cjs.map +1 -1
  472. package/dist/utils/publishable-key.js +52 -27
  473. package/dist/utils/publishable-key.js.map +1 -1
  474. package/package.json +68 -53
  475. package/dist/components.cjs +0 -2
  476. package/dist/components.cjs.map +0 -1
  477. package/dist/components.js +0 -13
  478. package/dist/components.js.map +0 -1
  479. package/dist/hooks.cjs +0 -2
  480. package/dist/hooks.cjs.map +0 -1
  481. package/dist/hooks.js +0 -14
  482. package/dist/hooks.js.map +0 -1
  483. package/dist/providers.cjs +0 -2
  484. package/dist/providers.cjs.map +0 -1
  485. package/dist/providers.js +0 -13
  486. package/dist/providers.js.map +0 -1
  487. package/dist/tailwind.plugin.cjs +0 -2
  488. package/dist/tailwind.plugin.cjs.map +0 -1
  489. package/dist/tailwind.plugin.js.map +0 -1
@@ -1,2 +1,722 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../utils/dist/floating-ui.utils.cjs");function B(n,t,g){let{reference:l,floating:f}=n;const i=e.getSideAxis(t),a=e.getAlignmentAxis(t),d=e.getAxisLength(a),h=e.getSide(t),w=i==="y",c=l.x+l.width/2-f.width/2,o=l.y+l.height/2-f.height/2,m=l[d]/2-f[d]/2;let s;switch(h){case"top":s={x:c,y:l.y-f.height};break;case"bottom":s={x:c,y:l.y+l.height};break;case"right":s={x:l.x+l.width,y:o};break;case"left":s={x:l.x-f.width,y:o};break;default:s={x:l.x,y:l.y}}switch(e.getAlignment(t)){case"start":s[a]-=m*(g&&w?-1:1);break;case"end":s[a]+=m*(g&&w?-1:1);break}return s}const _=async(n,t,g)=>{const{placement:l="bottom",strategy:f="absolute",middleware:i=[],platform:a}=g,d=i.filter(Boolean),h=await(a.isRTL==null?void 0:a.isRTL(t));let w=await a.getElementRects({reference:n,floating:t,strategy:f}),{x:c,y:o}=B(w,l,h),m=l,s={},r=0;for(let u=0;u<d.length;u++){const{name:x,fn:v}=d[u],{x:y,y:A,data:b,reset:p}=await v({x:c,y:o,initialPlacement:l,placement:m,strategy:f,middlewareData:s,rects:w,platform:a,elements:{reference:n,floating:t}});c=y??c,o=A??o,s={...s,[x]:{...s[x],...b}},p&&r<=50&&(r++,typeof p=="object"&&(p.placement&&(m=p.placement),p.rects&&(w=p.rects===!0?await a.getElementRects({reference:n,floating:t,strategy:f}):p.rects),{x:c,y:o}=B(w,m,h)),u=-1)}return{x:c,y:o,placement:m,strategy:f,middlewareData:s}};async function V(n,t){var g;t===void 0&&(t={});const{x:l,y:f,platform:i,rects:a,elements:d,strategy:h}=n,{boundary:w="clippingAncestors",rootBoundary:c="viewport",elementContext:o="floating",altBoundary:m=!1,padding:s=0}=e.evaluate(t,n),r=e.getPaddingObject(s),x=d[m?o==="floating"?"reference":"floating":o],v=e.rectToClientRect(await i.getClippingRect({element:(g=await(i.isElement==null?void 0:i.isElement(x)))==null||g?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(d.floating)),boundary:w,rootBoundary:c,strategy:h})),y=o==="floating"?{x:l,y:f,width:a.floating.width,height:a.floating.height}:a.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d.floating)),b=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},p=e.rectToClientRect(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:y,offsetParent:A,strategy:h}):y);return{top:(v.top-p.top+r.top)/b.y,bottom:(p.bottom-v.bottom+r.bottom)/b.y,left:(v.left-p.left+r.left)/b.x,right:(p.right-v.right+r.right)/b.x}}const X=n=>({name:"arrow",options:n,async fn(t){const{x:g,y:l,placement:f,rects:i,platform:a,elements:d,middlewareData:h}=t,{element:w,padding:c=0}=e.evaluate(n,t)||{};if(w==null)return{};const o=e.getPaddingObject(c),m={x:g,y:l},s=e.getAlignmentAxis(f),r=e.getAxisLength(s),u=await a.getDimensions(w),x=s==="y",v=x?"top":"left",y=x?"bottom":"right",A=x?"clientHeight":"clientWidth",b=i.reference[r]+i.reference[s]-m[s]-i.floating[r],p=m[s]-i.reference[s],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(w));let C=P?P[A]:0;(!C||!await(a.isElement==null?void 0:a.isElement(P)))&&(C=d.floating[A]||i.floating[r]);const M=b/2-p/2,D=C/2-u[r]/2-1,O=e.min(o[v],D),L=e.min(o[y],D),T=O,H=C-u[r]-L,S=C/2-u[r]/2+M,F=e.clamp(T,S,H),E=!h.arrow&&e.getAlignment(f)!=null&&S!==F&&i.reference[r]/2-(S<T?O:L)-u[r]/2<0,R=E?S<T?S-T:S-H:0;return{[s]:m[s]+R,data:{[s]:F,centerOffset:S-F-R,...E&&{alignmentOffset:R}},reset:E}}}),q=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var g,l;const{placement:f,middlewareData:i,rects:a,initialPlacement:d,platform:h,elements:w}=t,{mainAxis:c=!0,crossAxis:o=!0,fallbackPlacements:m,fallbackStrategy:s="bestFit",fallbackAxisSideDirection:r="none",flipAlignment:u=!0,...x}=e.evaluate(n,t);if((g=i.arrow)!=null&&g.alignmentOffset)return{};const v=e.getSide(f),y=e.getSideAxis(d),A=e.getSide(d)===d,b=await(h.isRTL==null?void 0:h.isRTL(w.floating)),p=m||(A||!u?[e.getOppositePlacement(d)]:e.getExpandedPlacements(d)),P=r!=="none";!m&&P&&p.push(...e.getOppositeAxisPlacements(d,u,r,b));const C=[d,...p],M=await V(t,x),D=[];let O=((l=i.flip)==null?void 0:l.overflows)||[];if(c&&D.push(M[v]),o){const S=e.getAlignmentSides(f,a,b);D.push(M[S[0]],M[S[1]])}if(O=[...O,{placement:f,overflows:D}],!D.every(S=>S<=0)){var L,T;const S=(((L=i.flip)==null?void 0:L.index)||0)+1,F=C[S];if(F&&(!(o==="alignment"?y!==e.getSideAxis(F):!1)||O.every(k=>e.getSideAxis(k.placement)===y?k.overflows[0]>0:!0)))return{data:{index:S,overflows:O},reset:{placement:F}};let E=(T=O.filter(R=>R.overflows[0]<=0).sort((R,k)=>R.overflows[1]-k.overflows[1])[0])==null?void 0:T.placement;if(!E)switch(s){case"bestFit":{var H;const R=(H=O.filter(k=>{if(P){const j=e.getSideAxis(k.placement);return j===y||j==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(j=>j>0).reduce((j,$)=>j+$,0)]).sort((k,j)=>k[1]-j[1])[0])==null?void 0:H[0];R&&(E=R);break}case"initialPlacement":E=d;break}if(f!==E)return{reset:{placement:E}}}return{}}}};function z(n,t){return{top:n.top-t.height,right:n.right-t.width,bottom:n.bottom-t.height,left:n.left-t.width}}function W(n){return e.sides.some(t=>n[t]>=0)}const I=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(t){const{rects:g}=t,{strategy:l="referenceHidden",...f}=e.evaluate(n,t);switch(l){case"referenceHidden":{const i=await V(t,{...f,elementContext:"reference"}),a=z(i,g.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:W(a)}}}case"escaped":{const i=await V(t,{...f,altBoundary:!0}),a=z(i,g.floating);return{data:{escapedOffsets:a,escaped:W(a)}}}default:return{}}}}},Y=new Set(["left","top"]);async function U(n,t){const{placement:g,platform:l,elements:f}=n,i=await(l.isRTL==null?void 0:l.isRTL(f.floating)),a=e.getSide(g),d=e.getAlignment(g),h=e.getSideAxis(g)==="y",w=Y.has(a)?-1:1,c=i&&h?-1:1,o=e.evaluate(t,n);let{mainAxis:m,crossAxis:s,alignmentAxis:r}=typeof o=="number"?{mainAxis:o,crossAxis:0,alignmentAxis:null}:{mainAxis:o.mainAxis||0,crossAxis:o.crossAxis||0,alignmentAxis:o.alignmentAxis};return d&&typeof r=="number"&&(s=d==="end"?r*-1:r),h?{x:s*c,y:m*w}:{x:m*w,y:s*c}}const G=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var g,l;const{x:f,y:i,placement:a,middlewareData:d}=t,h=await U(t,n);return a===((g=d.offset)==null?void 0:g.placement)&&(l=d.arrow)!=null&&l.alignmentOffset?{}:{x:f+h.x,y:i+h.y,data:{...h,placement:a}}}}},J=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:g,y:l,placement:f}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:d={fn:x=>{let{x:v,y}=x;return{x:v,y}}},...h}=e.evaluate(n,t),w={x:g,y:l},c=await V(t,h),o=e.getSideAxis(e.getSide(f)),m=e.getOppositeAxis(o);let s=w[m],r=w[o];if(i){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",y=s+c[x],A=s-c[v];s=e.clamp(y,s,A)}if(a){const x=o==="y"?"top":"left",v=o==="y"?"bottom":"right",y=r+c[x],A=r-c[v];r=e.clamp(y,r,A)}const u=d.fn({...t,[m]:s,[o]:r});return{...u,data:{x:u.x-g,y:u.y-l,enabled:{[m]:i,[o]:a}}}}}},K=function(n){return n===void 0&&(n={}),{options:n,fn(t){const{x:g,y:l,placement:f,rects:i,middlewareData:a}=t,{offset:d=0,mainAxis:h=!0,crossAxis:w=!0}=e.evaluate(n,t),c={x:g,y:l},o=e.getSideAxis(f),m=e.getOppositeAxis(o);let s=c[m],r=c[o];const u=e.evaluate(d,t),x=typeof u=="number"?{mainAxis:u,crossAxis:0}:{mainAxis:0,crossAxis:0,...u};if(h){const A=m==="y"?"height":"width",b=i.reference[m]-i.floating[A]+x.mainAxis,p=i.reference[m]+i.reference[A]-x.mainAxis;s<b?s=b:s>p&&(s=p)}if(w){var v,y;const A=m==="y"?"width":"height",b=Y.has(e.getSide(f)),p=i.reference[o]-i.floating[A]+(b&&((v=a.offset)==null?void 0:v[o])||0)+(b?0:x.crossAxis),P=i.reference[o]+i.reference[A]+(b?0:((y=a.offset)==null?void 0:y[o])||0)-(b?x.crossAxis:0);r<p?r=p:r>P&&(r=P)}return{[m]:s,[o]:r}}}},N=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){var g,l;const{placement:f,rects:i,platform:a,elements:d}=t,{apply:h=()=>{},...w}=e.evaluate(n,t),c=await V(t,w),o=e.getSide(f),m=e.getAlignment(f),s=e.getSideAxis(f)==="y",{width:r,height:u}=i.floating;let x,v;o==="top"||o==="bottom"?(x=o,v=m===(await(a.isRTL==null?void 0:a.isRTL(d.floating))?"start":"end")?"left":"right"):(v=o,x=m==="end"?"top":"bottom");const y=u-c.top-c.bottom,A=r-c.left-c.right,b=e.min(u-c[x],y),p=e.min(r-c[v],A),P=!t.middlewareData.shift;let C=b,M=p;if((g=t.middlewareData.shift)!=null&&g.enabled.x&&(M=A),(l=t.middlewareData.shift)!=null&&l.enabled.y&&(C=y),P&&!m){const O=e.max(c.left,0),L=e.max(c.right,0),T=e.max(c.top,0),H=e.max(c.bottom,0);s?M=r-2*(O!==0||L!==0?O+L:e.max(c.left,c.right)):C=u-2*(T!==0||H!==0?T+H:e.max(c.top,c.bottom))}await h({...t,availableWidth:M,availableHeight:C});const D=await a.getDimensions(d.floating);return r!==D.width||u!==D.height?{reset:{rects:!0}}:{}}}};exports.rectToClientRect=e.rectToClientRect;exports.arrow=X;exports.computePosition=_;exports.detectOverflow=V;exports.flip=q;exports.hide=I;exports.limitShift=K;exports.offset=G;exports.shift=J;exports.size=N;
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const floatingUi_utils = require("../../utils/dist/floating-ui.utils.cjs");
4
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
5
+ let {
6
+ reference,
7
+ floating
8
+ } = _ref;
9
+ const sideAxis = floatingUi_utils.getSideAxis(placement);
10
+ const alignmentAxis = floatingUi_utils.getAlignmentAxis(placement);
11
+ const alignLength = floatingUi_utils.getAxisLength(alignmentAxis);
12
+ const side = floatingUi_utils.getSide(placement);
13
+ const isVertical = sideAxis === "y";
14
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
15
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
16
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
17
+ let coords;
18
+ switch (side) {
19
+ case "top":
20
+ coords = {
21
+ x: commonX,
22
+ y: reference.y - floating.height
23
+ };
24
+ break;
25
+ case "bottom":
26
+ coords = {
27
+ x: commonX,
28
+ y: reference.y + reference.height
29
+ };
30
+ break;
31
+ case "right":
32
+ coords = {
33
+ x: reference.x + reference.width,
34
+ y: commonY
35
+ };
36
+ break;
37
+ case "left":
38
+ coords = {
39
+ x: reference.x - floating.width,
40
+ y: commonY
41
+ };
42
+ break;
43
+ default:
44
+ coords = {
45
+ x: reference.x,
46
+ y: reference.y
47
+ };
48
+ }
49
+ switch (floatingUi_utils.getAlignment(placement)) {
50
+ case "start":
51
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
52
+ break;
53
+ case "end":
54
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
55
+ break;
56
+ }
57
+ return coords;
58
+ }
59
+ const computePosition = async (reference, floating, config) => {
60
+ const {
61
+ placement = "bottom",
62
+ strategy = "absolute",
63
+ middleware = [],
64
+ platform
65
+ } = config;
66
+ const validMiddleware = middleware.filter(Boolean);
67
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
68
+ let rects = await platform.getElementRects({
69
+ reference,
70
+ floating,
71
+ strategy
72
+ });
73
+ let {
74
+ x,
75
+ y
76
+ } = computeCoordsFromPlacement(rects, placement, rtl);
77
+ let statefulPlacement = placement;
78
+ let middlewareData = {};
79
+ let resetCount = 0;
80
+ for (let i = 0; i < validMiddleware.length; i++) {
81
+ const {
82
+ name,
83
+ fn
84
+ } = validMiddleware[i];
85
+ const {
86
+ x: nextX,
87
+ y: nextY,
88
+ data,
89
+ reset
90
+ } = await fn({
91
+ x,
92
+ y,
93
+ initialPlacement: placement,
94
+ placement: statefulPlacement,
95
+ strategy,
96
+ middlewareData,
97
+ rects,
98
+ platform,
99
+ elements: {
100
+ reference,
101
+ floating
102
+ }
103
+ });
104
+ x = nextX != null ? nextX : x;
105
+ y = nextY != null ? nextY : y;
106
+ middlewareData = {
107
+ ...middlewareData,
108
+ [name]: {
109
+ ...middlewareData[name],
110
+ ...data
111
+ }
112
+ };
113
+ if (reset && resetCount <= 50) {
114
+ resetCount++;
115
+ if (typeof reset === "object") {
116
+ if (reset.placement) {
117
+ statefulPlacement = reset.placement;
118
+ }
119
+ if (reset.rects) {
120
+ rects = reset.rects === true ? await platform.getElementRects({
121
+ reference,
122
+ floating,
123
+ strategy
124
+ }) : reset.rects;
125
+ }
126
+ ({
127
+ x,
128
+ y
129
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
130
+ }
131
+ i = -1;
132
+ }
133
+ }
134
+ return {
135
+ x,
136
+ y,
137
+ placement: statefulPlacement,
138
+ strategy,
139
+ middlewareData
140
+ };
141
+ };
142
+ async function detectOverflow(state, options) {
143
+ var _await$platform$isEle;
144
+ if (options === void 0) {
145
+ options = {};
146
+ }
147
+ const {
148
+ x,
149
+ y,
150
+ platform,
151
+ rects,
152
+ elements,
153
+ strategy
154
+ } = state;
155
+ const {
156
+ boundary = "clippingAncestors",
157
+ rootBoundary = "viewport",
158
+ elementContext = "floating",
159
+ altBoundary = false,
160
+ padding = 0
161
+ } = floatingUi_utils.evaluate(options, state);
162
+ const paddingObject = floatingUi_utils.getPaddingObject(padding);
163
+ const altContext = elementContext === "floating" ? "reference" : "floating";
164
+ const element = elements[altBoundary ? altContext : elementContext];
165
+ const clippingClientRect = floatingUi_utils.rectToClientRect(await platform.getClippingRect({
166
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
167
+ boundary,
168
+ rootBoundary,
169
+ strategy
170
+ }));
171
+ const rect = elementContext === "floating" ? {
172
+ x,
173
+ y,
174
+ width: rects.floating.width,
175
+ height: rects.floating.height
176
+ } : rects.reference;
177
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
178
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
179
+ x: 1,
180
+ y: 1
181
+ } : {
182
+ x: 1,
183
+ y: 1
184
+ };
185
+ const elementClientRect = floatingUi_utils.rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
186
+ elements,
187
+ rect,
188
+ offsetParent,
189
+ strategy
190
+ }) : rect);
191
+ return {
192
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
193
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
194
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
195
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
196
+ };
197
+ }
198
+ const arrow = (options) => ({
199
+ name: "arrow",
200
+ options,
201
+ async fn(state) {
202
+ const {
203
+ x,
204
+ y,
205
+ placement,
206
+ rects,
207
+ platform,
208
+ elements,
209
+ middlewareData
210
+ } = state;
211
+ const {
212
+ element,
213
+ padding = 0
214
+ } = floatingUi_utils.evaluate(options, state) || {};
215
+ if (element == null) {
216
+ return {};
217
+ }
218
+ const paddingObject = floatingUi_utils.getPaddingObject(padding);
219
+ const coords = {
220
+ x,
221
+ y
222
+ };
223
+ const axis = floatingUi_utils.getAlignmentAxis(placement);
224
+ const length = floatingUi_utils.getAxisLength(axis);
225
+ const arrowDimensions = await platform.getDimensions(element);
226
+ const isYAxis = axis === "y";
227
+ const minProp = isYAxis ? "top" : "left";
228
+ const maxProp = isYAxis ? "bottom" : "right";
229
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
230
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
231
+ const startDiff = coords[axis] - rects.reference[axis];
232
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
233
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
234
+ if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) {
235
+ clientSize = elements.floating[clientProp] || rects.floating[length];
236
+ }
237
+ const centerToReference = endDiff / 2 - startDiff / 2;
238
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
239
+ const minPadding = floatingUi_utils.min(paddingObject[minProp], largestPossiblePadding);
240
+ const maxPadding = floatingUi_utils.min(paddingObject[maxProp], largestPossiblePadding);
241
+ const min$1 = minPadding;
242
+ const max = clientSize - arrowDimensions[length] - maxPadding;
243
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
244
+ const offset2 = floatingUi_utils.clamp(min$1, center, max);
245
+ const shouldAddOffset = !middlewareData.arrow && floatingUi_utils.getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
246
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
247
+ return {
248
+ [axis]: coords[axis] + alignmentOffset,
249
+ data: {
250
+ [axis]: offset2,
251
+ centerOffset: center - offset2 - alignmentOffset,
252
+ ...shouldAddOffset && {
253
+ alignmentOffset
254
+ }
255
+ },
256
+ reset: shouldAddOffset
257
+ };
258
+ }
259
+ });
260
+ const flip = function(options) {
261
+ if (options === void 0) {
262
+ options = {};
263
+ }
264
+ return {
265
+ name: "flip",
266
+ options,
267
+ async fn(state) {
268
+ var _middlewareData$arrow, _middlewareData$flip;
269
+ const {
270
+ placement,
271
+ middlewareData,
272
+ rects,
273
+ initialPlacement,
274
+ platform,
275
+ elements
276
+ } = state;
277
+ const {
278
+ mainAxis: checkMainAxis = true,
279
+ crossAxis: checkCrossAxis = true,
280
+ fallbackPlacements: specifiedFallbackPlacements,
281
+ fallbackStrategy = "bestFit",
282
+ fallbackAxisSideDirection = "none",
283
+ flipAlignment = true,
284
+ ...detectOverflowOptions
285
+ } = floatingUi_utils.evaluate(options, state);
286
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
287
+ return {};
288
+ }
289
+ const side = floatingUi_utils.getSide(placement);
290
+ const initialSideAxis = floatingUi_utils.getSideAxis(initialPlacement);
291
+ const isBasePlacement = floatingUi_utils.getSide(initialPlacement) === initialPlacement;
292
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
293
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [floatingUi_utils.getOppositePlacement(initialPlacement)] : floatingUi_utils.getExpandedPlacements(initialPlacement));
294
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
295
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
296
+ fallbackPlacements.push(...floatingUi_utils.getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
297
+ }
298
+ const placements = [initialPlacement, ...fallbackPlacements];
299
+ const overflow = await detectOverflow(state, detectOverflowOptions);
300
+ const overflows = [];
301
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
302
+ if (checkMainAxis) {
303
+ overflows.push(overflow[side]);
304
+ }
305
+ if (checkCrossAxis) {
306
+ const sides = floatingUi_utils.getAlignmentSides(placement, rects, rtl);
307
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
308
+ }
309
+ overflowsData = [...overflowsData, {
310
+ placement,
311
+ overflows
312
+ }];
313
+ if (!overflows.every((side2) => side2 <= 0)) {
314
+ var _middlewareData$flip2, _overflowsData$filter;
315
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
316
+ const nextPlacement = placements[nextIndex];
317
+ if (nextPlacement) {
318
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== floatingUi_utils.getSideAxis(nextPlacement) : false;
319
+ if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
320
+ // overflows the main axis.
321
+ overflowsData.every((d) => floatingUi_utils.getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
322
+ return {
323
+ data: {
324
+ index: nextIndex,
325
+ overflows: overflowsData
326
+ },
327
+ reset: {
328
+ placement: nextPlacement
329
+ }
330
+ };
331
+ }
332
+ }
333
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
334
+ if (!resetPlacement) {
335
+ switch (fallbackStrategy) {
336
+ case "bestFit": {
337
+ var _overflowsData$filter2;
338
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
339
+ if (hasFallbackAxisSideDirection) {
340
+ const currentSideAxis = floatingUi_utils.getSideAxis(d.placement);
341
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
342
+ // reading directions favoring greater width.
343
+ currentSideAxis === "y";
344
+ }
345
+ return true;
346
+ }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
347
+ if (placement2) {
348
+ resetPlacement = placement2;
349
+ }
350
+ break;
351
+ }
352
+ case "initialPlacement":
353
+ resetPlacement = initialPlacement;
354
+ break;
355
+ }
356
+ }
357
+ if (placement !== resetPlacement) {
358
+ return {
359
+ reset: {
360
+ placement: resetPlacement
361
+ }
362
+ };
363
+ }
364
+ }
365
+ return {};
366
+ }
367
+ };
368
+ };
369
+ function getSideOffsets(overflow, rect) {
370
+ return {
371
+ top: overflow.top - rect.height,
372
+ right: overflow.right - rect.width,
373
+ bottom: overflow.bottom - rect.height,
374
+ left: overflow.left - rect.width
375
+ };
376
+ }
377
+ function isAnySideFullyClipped(overflow) {
378
+ return floatingUi_utils.sides.some((side) => overflow[side] >= 0);
379
+ }
380
+ const hide = function(options) {
381
+ if (options === void 0) {
382
+ options = {};
383
+ }
384
+ return {
385
+ name: "hide",
386
+ options,
387
+ async fn(state) {
388
+ const {
389
+ rects
390
+ } = state;
391
+ const {
392
+ strategy = "referenceHidden",
393
+ ...detectOverflowOptions
394
+ } = floatingUi_utils.evaluate(options, state);
395
+ switch (strategy) {
396
+ case "referenceHidden": {
397
+ const overflow = await detectOverflow(state, {
398
+ ...detectOverflowOptions,
399
+ elementContext: "reference"
400
+ });
401
+ const offsets = getSideOffsets(overflow, rects.reference);
402
+ return {
403
+ data: {
404
+ referenceHiddenOffsets: offsets,
405
+ referenceHidden: isAnySideFullyClipped(offsets)
406
+ }
407
+ };
408
+ }
409
+ case "escaped": {
410
+ const overflow = await detectOverflow(state, {
411
+ ...detectOverflowOptions,
412
+ altBoundary: true
413
+ });
414
+ const offsets = getSideOffsets(overflow, rects.floating);
415
+ return {
416
+ data: {
417
+ escapedOffsets: offsets,
418
+ escaped: isAnySideFullyClipped(offsets)
419
+ }
420
+ };
421
+ }
422
+ default: {
423
+ return {};
424
+ }
425
+ }
426
+ }
427
+ };
428
+ };
429
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
430
+ async function convertValueToCoords(state, options) {
431
+ const {
432
+ placement,
433
+ platform,
434
+ elements
435
+ } = state;
436
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
437
+ const side = floatingUi_utils.getSide(placement);
438
+ const alignment = floatingUi_utils.getAlignment(placement);
439
+ const isVertical = floatingUi_utils.getSideAxis(placement) === "y";
440
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
441
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
442
+ const rawValue = floatingUi_utils.evaluate(options, state);
443
+ let {
444
+ mainAxis,
445
+ crossAxis,
446
+ alignmentAxis
447
+ } = typeof rawValue === "number" ? {
448
+ mainAxis: rawValue,
449
+ crossAxis: 0,
450
+ alignmentAxis: null
451
+ } : {
452
+ mainAxis: rawValue.mainAxis || 0,
453
+ crossAxis: rawValue.crossAxis || 0,
454
+ alignmentAxis: rawValue.alignmentAxis
455
+ };
456
+ if (alignment && typeof alignmentAxis === "number") {
457
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
458
+ }
459
+ return isVertical ? {
460
+ x: crossAxis * crossAxisMulti,
461
+ y: mainAxis * mainAxisMulti
462
+ } : {
463
+ x: mainAxis * mainAxisMulti,
464
+ y: crossAxis * crossAxisMulti
465
+ };
466
+ }
467
+ const offset = function(options) {
468
+ if (options === void 0) {
469
+ options = 0;
470
+ }
471
+ return {
472
+ name: "offset",
473
+ options,
474
+ async fn(state) {
475
+ var _middlewareData$offse, _middlewareData$arrow;
476
+ const {
477
+ x,
478
+ y,
479
+ placement,
480
+ middlewareData
481
+ } = state;
482
+ const diffCoords = await convertValueToCoords(state, options);
483
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
484
+ return {};
485
+ }
486
+ return {
487
+ x: x + diffCoords.x,
488
+ y: y + diffCoords.y,
489
+ data: {
490
+ ...diffCoords,
491
+ placement
492
+ }
493
+ };
494
+ }
495
+ };
496
+ };
497
+ const shift = function(options) {
498
+ if (options === void 0) {
499
+ options = {};
500
+ }
501
+ return {
502
+ name: "shift",
503
+ options,
504
+ async fn(state) {
505
+ const {
506
+ x,
507
+ y,
508
+ placement
509
+ } = state;
510
+ const {
511
+ mainAxis: checkMainAxis = true,
512
+ crossAxis: checkCrossAxis = false,
513
+ limiter = {
514
+ fn: (_ref) => {
515
+ let {
516
+ x: x2,
517
+ y: y2
518
+ } = _ref;
519
+ return {
520
+ x: x2,
521
+ y: y2
522
+ };
523
+ }
524
+ },
525
+ ...detectOverflowOptions
526
+ } = floatingUi_utils.evaluate(options, state);
527
+ const coords = {
528
+ x,
529
+ y
530
+ };
531
+ const overflow = await detectOverflow(state, detectOverflowOptions);
532
+ const crossAxis = floatingUi_utils.getSideAxis(floatingUi_utils.getSide(placement));
533
+ const mainAxis = floatingUi_utils.getOppositeAxis(crossAxis);
534
+ let mainAxisCoord = coords[mainAxis];
535
+ let crossAxisCoord = coords[crossAxis];
536
+ if (checkMainAxis) {
537
+ const minSide = mainAxis === "y" ? "top" : "left";
538
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
539
+ const min = mainAxisCoord + overflow[minSide];
540
+ const max = mainAxisCoord - overflow[maxSide];
541
+ mainAxisCoord = floatingUi_utils.clamp(min, mainAxisCoord, max);
542
+ }
543
+ if (checkCrossAxis) {
544
+ const minSide = crossAxis === "y" ? "top" : "left";
545
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
546
+ const min = crossAxisCoord + overflow[minSide];
547
+ const max = crossAxisCoord - overflow[maxSide];
548
+ crossAxisCoord = floatingUi_utils.clamp(min, crossAxisCoord, max);
549
+ }
550
+ const limitedCoords = limiter.fn({
551
+ ...state,
552
+ [mainAxis]: mainAxisCoord,
553
+ [crossAxis]: crossAxisCoord
554
+ });
555
+ return {
556
+ ...limitedCoords,
557
+ data: {
558
+ x: limitedCoords.x - x,
559
+ y: limitedCoords.y - y,
560
+ enabled: {
561
+ [mainAxis]: checkMainAxis,
562
+ [crossAxis]: checkCrossAxis
563
+ }
564
+ }
565
+ };
566
+ }
567
+ };
568
+ };
569
+ const limitShift = function(options) {
570
+ if (options === void 0) {
571
+ options = {};
572
+ }
573
+ return {
574
+ options,
575
+ fn(state) {
576
+ const {
577
+ x,
578
+ y,
579
+ placement,
580
+ rects,
581
+ middlewareData
582
+ } = state;
583
+ const {
584
+ offset: offset2 = 0,
585
+ mainAxis: checkMainAxis = true,
586
+ crossAxis: checkCrossAxis = true
587
+ } = floatingUi_utils.evaluate(options, state);
588
+ const coords = {
589
+ x,
590
+ y
591
+ };
592
+ const crossAxis = floatingUi_utils.getSideAxis(placement);
593
+ const mainAxis = floatingUi_utils.getOppositeAxis(crossAxis);
594
+ let mainAxisCoord = coords[mainAxis];
595
+ let crossAxisCoord = coords[crossAxis];
596
+ const rawOffset = floatingUi_utils.evaluate(offset2, state);
597
+ const computedOffset = typeof rawOffset === "number" ? {
598
+ mainAxis: rawOffset,
599
+ crossAxis: 0
600
+ } : {
601
+ mainAxis: 0,
602
+ crossAxis: 0,
603
+ ...rawOffset
604
+ };
605
+ if (checkMainAxis) {
606
+ const len = mainAxis === "y" ? "height" : "width";
607
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
608
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
609
+ if (mainAxisCoord < limitMin) {
610
+ mainAxisCoord = limitMin;
611
+ } else if (mainAxisCoord > limitMax) {
612
+ mainAxisCoord = limitMax;
613
+ }
614
+ }
615
+ if (checkCrossAxis) {
616
+ var _middlewareData$offse, _middlewareData$offse2;
617
+ const len = mainAxis === "y" ? "width" : "height";
618
+ const isOriginSide = originSides.has(floatingUi_utils.getSide(placement));
619
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
620
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
621
+ if (crossAxisCoord < limitMin) {
622
+ crossAxisCoord = limitMin;
623
+ } else if (crossAxisCoord > limitMax) {
624
+ crossAxisCoord = limitMax;
625
+ }
626
+ }
627
+ return {
628
+ [mainAxis]: mainAxisCoord,
629
+ [crossAxis]: crossAxisCoord
630
+ };
631
+ }
632
+ };
633
+ };
634
+ const size = function(options) {
635
+ if (options === void 0) {
636
+ options = {};
637
+ }
638
+ return {
639
+ name: "size",
640
+ options,
641
+ async fn(state) {
642
+ var _state$middlewareData, _state$middlewareData2;
643
+ const {
644
+ placement,
645
+ rects,
646
+ platform,
647
+ elements
648
+ } = state;
649
+ const {
650
+ apply = () => {
651
+ },
652
+ ...detectOverflowOptions
653
+ } = floatingUi_utils.evaluate(options, state);
654
+ const overflow = await detectOverflow(state, detectOverflowOptions);
655
+ const side = floatingUi_utils.getSide(placement);
656
+ const alignment = floatingUi_utils.getAlignment(placement);
657
+ const isYAxis = floatingUi_utils.getSideAxis(placement) === "y";
658
+ const {
659
+ width,
660
+ height
661
+ } = rects.floating;
662
+ let heightSide;
663
+ let widthSide;
664
+ if (side === "top" || side === "bottom") {
665
+ heightSide = side;
666
+ widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
667
+ } else {
668
+ widthSide = side;
669
+ heightSide = alignment === "end" ? "top" : "bottom";
670
+ }
671
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
672
+ const maximumClippingWidth = width - overflow.left - overflow.right;
673
+ const overflowAvailableHeight = floatingUi_utils.min(height - overflow[heightSide], maximumClippingHeight);
674
+ const overflowAvailableWidth = floatingUi_utils.min(width - overflow[widthSide], maximumClippingWidth);
675
+ const noShift = !state.middlewareData.shift;
676
+ let availableHeight = overflowAvailableHeight;
677
+ let availableWidth = overflowAvailableWidth;
678
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
679
+ availableWidth = maximumClippingWidth;
680
+ }
681
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
682
+ availableHeight = maximumClippingHeight;
683
+ }
684
+ if (noShift && !alignment) {
685
+ const xMin = floatingUi_utils.max(overflow.left, 0);
686
+ const xMax = floatingUi_utils.max(overflow.right, 0);
687
+ const yMin = floatingUi_utils.max(overflow.top, 0);
688
+ const yMax = floatingUi_utils.max(overflow.bottom, 0);
689
+ if (isYAxis) {
690
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : floatingUi_utils.max(overflow.left, overflow.right));
691
+ } else {
692
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : floatingUi_utils.max(overflow.top, overflow.bottom));
693
+ }
694
+ }
695
+ await apply({
696
+ ...state,
697
+ availableWidth,
698
+ availableHeight
699
+ });
700
+ const nextDimensions = await platform.getDimensions(elements.floating);
701
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
702
+ return {
703
+ reset: {
704
+ rects: true
705
+ }
706
+ };
707
+ }
708
+ return {};
709
+ }
710
+ };
711
+ };
712
+ exports.rectToClientRect = floatingUi_utils.rectToClientRect;
713
+ exports.arrow = arrow;
714
+ exports.computePosition = computePosition;
715
+ exports.detectOverflow = detectOverflow;
716
+ exports.flip = flip;
717
+ exports.hide = hide;
718
+ exports.limitShift = limitShift;
719
+ exports.offset = offset;
720
+ exports.shift = shift;
721
+ exports.size = size;
2
722
  //# sourceMappingURL=floating-ui.core.cjs.map