zudoku 0.0.0-e5be921 → 0.0.0-e614aaa

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 (903) hide show
  1. package/cli.js +3 -0
  2. package/dist/app/demo.js +1 -2
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/entry.client.d.ts +5 -0
  5. package/dist/app/entry.client.js +2 -15
  6. package/dist/app/entry.client.js.map +1 -1
  7. package/dist/app/entry.server.d.ts +1 -1
  8. package/dist/app/entry.server.js +1 -2
  9. package/dist/app/entry.server.js.map +1 -1
  10. package/dist/app/main.d.ts +2 -2
  11. package/dist/app/main.js +19 -9
  12. package/dist/app/main.js.map +1 -1
  13. package/dist/app/sentry.js +1 -1
  14. package/dist/app/sentry.js.map +1 -1
  15. package/dist/app/standalone.js +1 -2
  16. package/dist/app/standalone.js.map +1 -1
  17. package/dist/app/tailwind.js +6 -0
  18. package/dist/app/tailwind.js.map +1 -1
  19. package/dist/cli/build/handler.d.ts +1 -3
  20. package/dist/cli/build/handler.js +7 -0
  21. package/dist/cli/build/handler.js.map +1 -1
  22. package/dist/cli/cli.js +5 -0
  23. package/dist/cli/cli.js.map +1 -1
  24. package/dist/cli/cmds/build.d.ts +11 -3
  25. package/dist/cli/cmds/build.js +21 -13
  26. package/dist/cli/cmds/build.js.map +1 -1
  27. package/dist/cli/cmds/dev.js +5 -0
  28. package/dist/cli/cmds/dev.js.map +1 -1
  29. package/dist/cli/cmds/preview.d.ts +16 -0
  30. package/dist/cli/cmds/preview.js +25 -0
  31. package/dist/cli/cmds/preview.js.map +1 -0
  32. package/dist/cli/common/output.js.map +1 -1
  33. package/dist/cli/common/utils/ports.d.ts +1 -1
  34. package/dist/cli/common/utils/ports.js +16 -15
  35. package/dist/cli/common/utils/ports.js.map +1 -1
  36. package/dist/cli/dev/handler.d.ts +1 -0
  37. package/dist/cli/dev/handler.js +14 -12
  38. package/dist/cli/dev/handler.js.map +1 -1
  39. package/dist/cli/preview/handler.d.ts +3 -0
  40. package/dist/cli/preview/handler.js +37 -0
  41. package/dist/cli/preview/handler.js.map +1 -0
  42. package/dist/config/common.d.ts +5 -2
  43. package/dist/config/config.d.ts +3 -7
  44. package/dist/config/loader.d.ts +4 -4
  45. package/dist/config/loader.js +11 -5
  46. package/dist/config/loader.js.map +1 -1
  47. package/dist/config/validators/InputSidebarSchema.d.ts +32 -17
  48. package/dist/config/validators/InputSidebarSchema.js +11 -1
  49. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  50. package/dist/config/validators/common.d.ts +821 -194
  51. package/dist/config/validators/common.js +71 -16
  52. package/dist/config/validators/common.js.map +1 -1
  53. package/dist/config/validators/icon-types.d.ts +1 -1
  54. package/dist/config/validators/validate.d.ts +378 -131
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +1 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/lib/MissingIcon.d.ts +2 -0
  59. package/dist/lib/MissingIcon.js +7 -0
  60. package/dist/lib/MissingIcon.js.map +1 -0
  61. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  62. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  63. package/dist/lib/authentication/components/SignIn.js +1 -1
  64. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  65. package/dist/lib/authentication/components/SignOut.js +2 -2
  66. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  67. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  68. package/dist/lib/authentication/providers/auth0.js +2 -1
  69. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  70. package/dist/lib/authentication/providers/clerk.js +35 -12
  71. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  72. package/dist/lib/authentication/providers/openid.d.ts +11 -3
  73. package/dist/lib/authentication/providers/openid.js +17 -9
  74. package/dist/lib/authentication/providers/openid.js.map +1 -1
  75. package/dist/lib/authentication/state.d.ts +9 -0
  76. package/dist/lib/authentication/state.js +19 -2
  77. package/dist/lib/authentication/state.js.map +1 -1
  78. package/dist/lib/components/AnchorLink.d.ts +1 -1
  79. package/dist/lib/components/AnchorLink.js +6 -3
  80. package/dist/lib/components/AnchorLink.js.map +1 -1
  81. package/dist/lib/components/Autocomplete.d.ts +13 -0
  82. package/dist/lib/components/Autocomplete.js +47 -0
  83. package/dist/lib/components/Autocomplete.js.map +1 -0
  84. package/dist/lib/components/Banner.js +1 -1
  85. package/dist/lib/components/Banner.js.map +1 -1
  86. package/dist/lib/components/Bootstrap.d.ts +1 -2
  87. package/dist/lib/components/Bootstrap.js +3 -3
  88. package/dist/lib/components/Bootstrap.js.map +1 -1
  89. package/dist/lib/components/Header.js +15 -15
  90. package/dist/lib/components/Header.js.map +1 -1
  91. package/dist/lib/components/Heading.d.ts +2 -2
  92. package/dist/lib/components/Layout.js +2 -2
  93. package/dist/lib/components/Layout.js.map +1 -1
  94. package/dist/lib/components/Markdown.d.ts +2 -2
  95. package/dist/lib/components/Markdown.js +3 -1
  96. package/dist/lib/components/Markdown.js.map +1 -1
  97. package/dist/lib/components/MobileTopNavigation.js +1 -1
  98. package/dist/lib/components/NotFoundPage.js +1 -1
  99. package/dist/lib/components/NotFoundPage.js.map +1 -1
  100. package/dist/lib/components/PathRenderer.d.ts +11 -0
  101. package/dist/lib/components/PathRenderer.js +28 -0
  102. package/dist/lib/components/PathRenderer.js.map +1 -0
  103. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  104. package/dist/lib/components/StatusPage.d.ts +7 -0
  105. package/dist/lib/components/StatusPage.js +71 -0
  106. package/dist/lib/components/StatusPage.js.map +1 -0
  107. package/dist/lib/components/ThemeSwitch.js +8 -5
  108. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  109. package/dist/lib/components/TopNavigation.js +5 -4
  110. package/dist/lib/components/TopNavigation.js.map +1 -1
  111. package/dist/lib/components/Zudoku.d.ts +1 -1
  112. package/dist/lib/components/Zudoku.js +8 -7
  113. package/dist/lib/components/Zudoku.js.map +1 -1
  114. package/dist/lib/components/cache.d.ts +6 -0
  115. package/dist/lib/components/cache.js +13 -0
  116. package/dist/lib/components/cache.js.map +1 -0
  117. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  118. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  119. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  120. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  121. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  122. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  123. package/dist/lib/components/context/ZudokuContext.js +11 -4
  124. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  125. package/dist/lib/components/index.d.ts +32 -15
  126. package/dist/lib/components/index.js +17 -4
  127. package/dist/lib/components/index.js.map +1 -1
  128. package/dist/lib/components/navigation/Sidebar.js +7 -2
  129. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  130. package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
  131. package/dist/lib/components/navigation/SidebarBadge.js +13 -11
  132. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  133. package/dist/lib/components/navigation/SidebarCategory.js +18 -16
  134. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  135. package/dist/lib/components/navigation/SidebarItem.js +4 -3
  136. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  137. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  138. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  139. package/dist/lib/components/navigation/utils.js +1 -1
  140. package/dist/lib/components/navigation/utils.js.map +1 -1
  141. package/dist/lib/core/RouteGuard.d.ts +1 -0
  142. package/dist/lib/core/RouteGuard.js +45 -0
  143. package/dist/lib/core/RouteGuard.js.map +1 -0
  144. package/dist/lib/core/ZudokuContext.d.ts +15 -3
  145. package/dist/lib/core/ZudokuContext.js +26 -8
  146. package/dist/lib/core/ZudokuContext.js.map +1 -1
  147. package/dist/lib/core/plugins.d.ts +13 -7
  148. package/dist/lib/core/plugins.js +3 -0
  149. package/dist/lib/core/plugins.js.map +1 -1
  150. package/dist/lib/errors/RouterError.js +1 -1
  151. package/dist/lib/errors/RouterError.js.map +1 -1
  152. package/dist/lib/hooks/index.d.ts +3 -0
  153. package/dist/lib/hooks/index.js +5 -0
  154. package/dist/lib/hooks/index.js.map +1 -0
  155. package/dist/lib/hooks/useEvent.d.ts +11 -0
  156. package/dist/lib/hooks/useEvent.js +19 -0
  157. package/dist/lib/hooks/useEvent.js.map +1 -0
  158. package/dist/lib/hooks/useEvent.test.d.ts +1 -0
  159. package/dist/lib/hooks/useEvent.test.js +100 -0
  160. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  161. package/dist/lib/icons.d.ts +1 -0
  162. package/dist/lib/icons.js +1 -0
  163. package/dist/lib/icons.js.map +1 -1
  164. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  165. package/dist/lib/oas/graphql/circular.js +38 -0
  166. package/dist/lib/oas/graphql/circular.js.map +1 -0
  167. package/dist/lib/oas/graphql/index.d.ts +11 -0
  168. package/dist/lib/oas/graphql/index.js +93 -59
  169. package/dist/lib/oas/graphql/index.js.map +1 -1
  170. package/dist/lib/oas/parser/dereference/index.js +6 -3
  171. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  172. package/dist/lib/oas/parser/upgrade/index.js +19 -4
  173. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  174. package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -5
  175. package/dist/lib/plugins/api-catalog/Catalog.js +23 -26
  176. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  177. package/dist/lib/plugins/api-catalog/index.d.ts +9 -1
  178. package/dist/lib/plugins/api-catalog/index.js +37 -8
  179. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  180. package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
  181. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  182. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  183. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  184. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  185. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  186. package/dist/lib/plugins/api-keys/index.d.ts +1 -0
  187. package/dist/lib/plugins/api-keys/index.js +1 -0
  188. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  189. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  190. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  191. package/dist/lib/plugins/markdown/index.d.ts +1 -0
  192. package/dist/lib/plugins/markdown/index.js.map +1 -1
  193. package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
  194. package/dist/lib/plugins/markdown/resolver.js +0 -29
  195. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  196. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  197. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  198. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  199. package/dist/lib/plugins/openapi/ColorizedParam.js +18 -7
  200. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  201. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  202. package/dist/lib/plugins/openapi/Endpoint.js +8 -7
  203. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  204. package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
  205. package/dist/lib/plugins/openapi/OasProvider.js +29 -0
  206. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
  207. package/dist/lib/plugins/openapi/OperationList.d.ts +5 -2
  208. package/dist/lib/plugins/openapi/OperationList.js +39 -49
  209. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  210. package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -2
  211. package/dist/lib/plugins/openapi/OperationListItem.js +16 -5
  212. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  213. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  214. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  215. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  216. package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
  217. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  218. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
  219. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +10 -3
  220. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  221. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
  222. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
  223. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  224. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +7 -13
  225. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  226. package/dist/lib/plugins/openapi/Sidecar.js +22 -34
  227. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  228. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  229. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  230. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  231. package/dist/lib/plugins/openapi/SidecarExamples.js +68 -0
  232. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  233. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  234. package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -93
  235. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  236. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  237. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  238. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  239. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  240. package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -4
  241. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  242. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  243. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
  244. package/dist/lib/plugins/openapi/graphql/gql.js +3 -13
  245. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  246. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
  247. package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
  248. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  249. package/dist/lib/plugins/openapi/index.d.ts +10 -1
  250. package/dist/lib/plugins/openapi/index.js +84 -84
  251. package/dist/lib/plugins/openapi/index.js.map +1 -1
  252. package/dist/lib/plugins/openapi/interfaces.d.ts +29 -2
  253. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  254. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  255. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  256. package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
  257. package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
  258. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  259. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  260. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  261. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  262. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  263. package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
  264. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  265. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -2
  266. package/dist/lib/plugins/openapi/playground/Playground.js +64 -56
  267. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  268. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  269. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  270. package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
  271. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  272. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  273. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  274. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  275. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  276. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  277. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  278. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  279. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  280. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  281. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  282. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  283. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  284. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  285. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  286. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  287. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  288. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  289. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  290. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  291. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  292. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  293. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  294. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  295. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  296. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  297. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  298. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  299. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  300. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  301. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +37 -0
  302. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  303. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  304. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  305. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  306. package/dist/lib/plugins/openapi/schema/utils.js +2 -0
  307. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  308. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +9 -0
  309. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +25 -0
  310. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
  311. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
  312. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  313. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
  314. package/dist/lib/plugins/openapi/util/getRoutes.js +74 -0
  315. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
  316. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
  317. package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
  318. package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
  319. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  320. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  321. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  322. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  323. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  324. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  325. package/dist/lib/plugins/redirect/index.js +1 -1
  326. package/dist/lib/plugins/redirect/index.js.map +1 -1
  327. package/dist/lib/plugins/search-inkeep/index.js +21 -7
  328. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  329. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  330. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +67 -0
  331. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  332. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +7 -0
  333. package/dist/lib/plugins/search-pagefind/ResultList.js +30 -0
  334. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  335. package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
  336. package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
  337. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  338. package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
  339. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  340. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  341. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  342. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  343. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  344. package/dist/lib/ui/Badge.d.ts +1 -1
  345. package/dist/lib/ui/Badge.js +2 -1
  346. package/dist/lib/ui/Badge.js.map +1 -1
  347. package/dist/lib/ui/Button.d.ts +1 -1
  348. package/dist/lib/ui/Card.js +1 -1
  349. package/dist/lib/ui/Card.js.map +1 -1
  350. package/dist/lib/ui/Checkbox.d.ts +8 -2
  351. package/dist/lib/ui/Checkbox.js +13 -1
  352. package/dist/lib/ui/Checkbox.js.map +1 -1
  353. package/dist/lib/ui/Command.d.ts +17 -3
  354. package/dist/lib/ui/Command.js +7 -3
  355. package/dist/lib/ui/Command.js.map +1 -1
  356. package/dist/lib/ui/Input.d.ts +1 -2
  357. package/dist/lib/ui/Input.js.map +1 -1
  358. package/dist/lib/ui/Select.js +2 -2
  359. package/dist/lib/ui/Select.js.map +1 -1
  360. package/dist/lib/ui/Stepper.d.ts +4 -0
  361. package/dist/lib/ui/Stepper.js +7 -0
  362. package/dist/lib/ui/Stepper.js.map +1 -0
  363. package/dist/lib/ui/SyntaxHighlight.d.ts +14 -0
  364. package/dist/lib/{components → ui}/SyntaxHighlight.js +9 -6
  365. package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
  366. package/dist/lib/ui/util.d.ts +2 -0
  367. package/dist/lib/ui/util.js +3 -0
  368. package/dist/lib/ui/util.js.map +1 -0
  369. package/dist/lib/util/MdxComponents.d.ts +19 -17
  370. package/dist/lib/util/MdxComponents.js +7 -6
  371. package/dist/lib/util/MdxComponents.js.map +1 -1
  372. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  373. package/dist/lib/util/joinUrl.d.ts +1 -0
  374. package/dist/lib/util/joinUrl.js +40 -0
  375. package/dist/lib/util/joinUrl.js.map +1 -0
  376. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  377. package/dist/lib/util/joinUrl.test.js +43 -0
  378. package/dist/lib/util/joinUrl.test.js.map +1 -0
  379. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  380. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  381. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  382. package/dist/lib/util/traverse.d.ts +8 -1
  383. package/dist/lib/util/traverse.js +7 -3
  384. package/dist/lib/util/traverse.js.map +1 -1
  385. package/dist/lib/util/useExposedProps.js +1 -1
  386. package/dist/lib/util/useExposedProps.js.map +1 -1
  387. package/dist/lib/util/useLatest.d.ts +1 -0
  388. package/dist/lib/util/useLatest.js +15 -0
  389. package/dist/lib/util/useLatest.js.map +1 -0
  390. package/dist/lib/util/useOnScreen.d.ts +1 -1
  391. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  392. package/dist/lib/util/useScrollToAnchor.js +26 -29
  393. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  394. package/dist/lib/util/useScrollToTop.js +7 -5
  395. package/dist/lib/util/useScrollToTop.js.map +1 -1
  396. package/dist/vite/api/schema-codegen.d.ts +12 -0
  397. package/dist/vite/api/schema-codegen.js +62 -0
  398. package/dist/vite/api/schema-codegen.js.map +1 -0
  399. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  400. package/dist/vite/api/schema-codegen.test.js +247 -0
  401. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  402. package/dist/vite/build.js +41 -25
  403. package/dist/vite/build.js.map +1 -1
  404. package/dist/vite/config.d.ts +2 -5
  405. package/dist/vite/config.js +69 -61
  406. package/dist/vite/config.js.map +1 -1
  407. package/dist/vite/config.test.js +5 -1
  408. package/dist/vite/config.test.js.map +1 -1
  409. package/dist/vite/css/collect.d.ts +2 -0
  410. package/dist/vite/css/collect.js +27 -0
  411. package/dist/vite/css/collect.js.map +1 -0
  412. package/dist/vite/css/plugin.d.ts +5 -0
  413. package/dist/vite/css/plugin.js +79 -0
  414. package/dist/vite/css/plugin.js.map +1 -0
  415. package/dist/vite/dev-server.d.ts +5 -2
  416. package/dist/vite/dev-server.js +52 -11
  417. package/dist/vite/dev-server.js.map +1 -1
  418. package/dist/vite/error-handler.d.ts +1 -1
  419. package/dist/vite/error-handler.js +1 -1
  420. package/dist/vite/error-handler.js.map +1 -1
  421. package/dist/vite/output.d.ts +14 -2
  422. package/dist/vite/output.js +12 -14
  423. package/dist/vite/output.js.map +1 -1
  424. package/dist/vite/pagefind.d.ts +4 -0
  425. package/dist/vite/pagefind.js +15 -0
  426. package/dist/vite/pagefind.js.map +1 -0
  427. package/dist/vite/plugin-api-keys.d.ts +2 -2
  428. package/dist/vite/plugin-api-keys.js +5 -5
  429. package/dist/vite/plugin-api-keys.js.map +1 -1
  430. package/dist/vite/plugin-api.d.ts +2 -2
  431. package/dist/vite/plugin-api.js +175 -59
  432. package/dist/vite/plugin-api.js.map +1 -1
  433. package/dist/vite/plugin-auth.d.ts +2 -2
  434. package/dist/vite/plugin-auth.js +7 -4
  435. package/dist/vite/plugin-auth.js.map +1 -1
  436. package/dist/vite/plugin-component.d.ts +2 -2
  437. package/dist/vite/plugin-component.js +7 -3
  438. package/dist/vite/plugin-component.js.map +1 -1
  439. package/dist/vite/plugin-config-reload.d.ts +4 -3
  440. package/dist/vite/plugin-config-reload.js +11 -5
  441. package/dist/vite/plugin-config-reload.js.map +1 -1
  442. package/dist/vite/plugin-config.d.ts +2 -2
  443. package/dist/vite/plugin-config.js +9 -5
  444. package/dist/vite/plugin-config.js.map +1 -1
  445. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  446. package/dist/vite/plugin-custom-pages.js +3 -3
  447. package/dist/vite/plugin-custom-pages.js.map +1 -1
  448. package/dist/vite/plugin-docs.d.ts +2 -2
  449. package/dist/vite/plugin-docs.js +5 -5
  450. package/dist/vite/plugin-docs.js.map +1 -1
  451. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  452. package/dist/vite/plugin-frontmatter.js +5 -4
  453. package/dist/vite/plugin-frontmatter.js.map +1 -1
  454. package/dist/vite/plugin-mdx.d.ts +2 -2
  455. package/dist/vite/plugin-mdx.js +34 -16
  456. package/dist/vite/plugin-mdx.js.map +1 -1
  457. package/dist/vite/plugin-redirect.d.ts +2 -2
  458. package/dist/vite/plugin-redirect.js +3 -3
  459. package/dist/vite/plugin-redirect.js.map +1 -1
  460. package/dist/vite/plugin-search.d.ts +2 -2
  461. package/dist/vite/plugin-search.js +5 -1
  462. package/dist/vite/plugin-search.js.map +1 -1
  463. package/dist/vite/plugin-sidebar.d.ts +2 -2
  464. package/dist/vite/plugin-sidebar.js +13 -4
  465. package/dist/vite/plugin-sidebar.js.map +1 -1
  466. package/dist/vite/plugin-theme-css.d.ts +2 -2
  467. package/dist/vite/plugin-theme-css.js +57 -2
  468. package/dist/vite/plugin-theme-css.js.map +1 -1
  469. package/dist/vite/plugin.d.ts +2 -2
  470. package/dist/vite/plugin.js +4 -0
  471. package/dist/vite/plugin.js.map +1 -1
  472. package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +8 -9
  473. package/dist/vite/prerender/FileWritingResponse.js +51 -0
  474. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  475. package/dist/vite/prerender/prerender.d.ts +14 -0
  476. package/dist/vite/prerender/prerender.js +84 -0
  477. package/dist/vite/prerender/prerender.js.map +1 -0
  478. package/dist/vite/prerender/worker.d.ts +13 -0
  479. package/dist/vite/prerender/worker.js +32 -0
  480. package/dist/vite/prerender/worker.js.map +1 -0
  481. package/dist/vite/reporter.d.ts +3 -0
  482. package/dist/vite/reporter.js +33 -0
  483. package/dist/vite/reporter.js.map +1 -0
  484. package/dist/vite/sitemap.js +2 -1
  485. package/dist/vite/sitemap.js.map +1 -1
  486. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  487. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  488. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  489. package/dist/zuplo/env.d.ts +1 -0
  490. package/dist/zuplo/env.js +3 -0
  491. package/dist/zuplo/env.js.map +1 -1
  492. package/dist/zuplo/policy-types.d.ts +33 -0
  493. package/dist/zuplo/policy-types.js +8 -0
  494. package/dist/zuplo/policy-types.js.map +1 -0
  495. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  496. package/dist/zuplo/with-zuplo-processors.js +26 -0
  497. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  498. package/dist/zuplo/with-zuplo.d.ts +1 -1
  499. package/dist/zuplo/with-zuplo.js +7 -26
  500. package/dist/zuplo/with-zuplo.js.map +1 -1
  501. package/lib/AuthenticationPlugin-CiO1FM6Q.js +58 -0
  502. package/lib/AuthenticationPlugin-CiO1FM6Q.js.map +1 -0
  503. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-DpB47wvk.js} +3 -3
  504. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
  505. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  506. package/lib/{Dialog-k70Qfukb.js → Dialog-DIKGQxQc.js} +36 -20
  507. package/lib/{Dialog-k70Qfukb.js.map → Dialog-DIKGQxQc.js.map} +1 -1
  508. package/lib/{Markdown-CRsmPPfY.js → Markdown-DePfm7oQ.js} +5972 -5888
  509. package/lib/Markdown-DePfm7oQ.js.map +1 -0
  510. package/lib/MdxPage-BN6l6zXL.js +201 -0
  511. package/lib/MdxPage-BN6l6zXL.js.map +1 -0
  512. package/lib/OasProvider-BSuptFK-.js +34 -0
  513. package/lib/OasProvider-BSuptFK-.js.map +1 -0
  514. package/lib/OperationList-DOcfDmJP.js +5217 -0
  515. package/lib/OperationList-DOcfDmJP.js.map +1 -0
  516. package/lib/{Select-O9ZM3ZgX.js → Select-Dqtcn53H.js} +49 -49
  517. package/lib/Select-Dqtcn53H.js.map +1 -0
  518. package/lib/SlotletProvider-DdtIOUi6.js +221 -0
  519. package/lib/SlotletProvider-DdtIOUi6.js.map +1 -0
  520. package/lib/{Button-jK0EsymC.js → Spinner-1KrEmx1V.js} +17 -14
  521. package/lib/Spinner-1KrEmx1V.js.map +1 -0
  522. package/lib/chunk-IR6S3I6Y-D_3UmFIn.js +1821 -0
  523. package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +1 -0
  524. package/lib/circular-v7K6lDDh.js +15409 -0
  525. package/lib/circular-v7K6lDDh.js.map +1 -0
  526. package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
  527. package/lib/cn-qaFjX9_3.js.map +1 -0
  528. package/lib/{context-D1nXWxm7.js → context-DLCwaMXN.js} +2 -2
  529. package/lib/context-DLCwaMXN.js.map +1 -0
  530. package/lib/createServer-DmusVVsi.js +12728 -0
  531. package/lib/createServer-DmusVVsi.js.map +1 -0
  532. package/lib/hook-CN__aZIt.js +1464 -0
  533. package/lib/hook-CN__aZIt.js.map +1 -0
  534. package/lib/index-BTbP6Lgf.js +2103 -0
  535. package/lib/index-BTbP6Lgf.js.map +1 -0
  536. package/lib/index-CPNSgwSb.js +36 -0
  537. package/lib/index-CPNSgwSb.js.map +1 -0
  538. package/lib/{index-CkwDvuPt.js → index-Dl3Yl0yb.js} +303 -286
  539. package/lib/index-Dl3Yl0yb.js.map +1 -0
  540. package/lib/index-DwT-v3zK.js +86 -0
  541. package/lib/index-DwT-v3zK.js.map +1 -0
  542. package/lib/index-LNp6rxyU.js.map +1 -1
  543. package/lib/index-gQD2h1wX.js +447 -0
  544. package/lib/index-gQD2h1wX.js.map +1 -0
  545. package/lib/index.esm--gIChbWs.js +1207 -0
  546. package/lib/index.esm--gIChbWs.js.map +1 -0
  547. package/lib/index.esm-CQHE3GEU.js +691 -0
  548. package/lib/{index.esm-Bm8pj-bc.js.map → index.esm-CQHE3GEU.js.map} +1 -1
  549. package/lib/invariant-Caa8-XvF.js.map +1 -1
  550. package/lib/joinUrl-10po2Jdj.js +20 -0
  551. package/lib/joinUrl-10po2Jdj.js.map +1 -0
  552. package/lib/jsx-runtime-CYK1ROHF.js +446 -0
  553. package/lib/jsx-runtime-CYK1ROHF.js.map +1 -0
  554. package/lib/{hook-hEqe7fPB.js → mutation-EclmI0is.js} +39 -58
  555. package/lib/mutation-EclmI0is.js.map +1 -0
  556. package/lib/objectEntries-yMIkr2mI.js +5 -0
  557. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  558. package/lib/post-processors/removeExtensions.js +7 -7
  559. package/lib/post-processors/removeExtensions.js.map +1 -1
  560. package/lib/post-processors/removeParameters.js +48 -0
  561. package/lib/post-processors/removeParameters.js.map +1 -0
  562. package/lib/post-processors/removePaths.js.map +1 -1
  563. package/lib/post-processors/traverse.js +11 -8
  564. package/lib/post-processors/traverse.js.map +1 -1
  565. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  566. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  567. package/lib/prism-csharp.min-bQAo2pmx.js +63 -0
  568. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  569. package/lib/prism-java.min-BpvsOuIa.js +35 -0
  570. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  571. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  572. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  573. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  574. package/lib/prism-ruby.min-Dx9KO9ds.js +38 -0
  575. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  576. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  577. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  578. package/lib/ui/Accordion.js +2 -2
  579. package/lib/ui/Accordion.js.map +1 -1
  580. package/lib/ui/ActionButton.js +10 -11
  581. package/lib/ui/ActionButton.js.map +1 -1
  582. package/lib/ui/Alert.js +3 -3
  583. package/lib/ui/Alert.js.map +1 -1
  584. package/lib/ui/AlertDialog.js +2 -2
  585. package/lib/ui/AlertDialog.js.map +1 -1
  586. package/lib/ui/Badge.js +5 -4
  587. package/lib/ui/Badge.js.map +1 -1
  588. package/lib/ui/Breadcrumb.js +5 -5
  589. package/lib/ui/Breadcrumb.js.map +1 -1
  590. package/lib/ui/Button.js +3 -3
  591. package/lib/ui/Button.js.map +1 -1
  592. package/lib/ui/Callout.js +5 -5
  593. package/lib/ui/Callout.js.map +1 -1
  594. package/lib/ui/Card.js +9 -9
  595. package/lib/ui/Card.js.map +1 -1
  596. package/lib/ui/Carousel.js +408 -402
  597. package/lib/ui/Carousel.js.map +1 -1
  598. package/lib/ui/Checkbox.js +26 -15
  599. package/lib/ui/Checkbox.js.map +1 -1
  600. package/lib/ui/Command.js +114 -508
  601. package/lib/ui/Command.js.map +1 -1
  602. package/lib/ui/Dialog.js +2 -2
  603. package/lib/ui/Dialog.js.map +1 -1
  604. package/lib/ui/Drawer.js +357 -378
  605. package/lib/ui/Drawer.js.map +1 -1
  606. package/lib/ui/DropdownMenu.js +2 -2
  607. package/lib/ui/DropdownMenu.js.map +1 -1
  608. package/lib/ui/Form.js +6 -6
  609. package/lib/ui/Form.js.map +1 -1
  610. package/lib/ui/HoverCard.js +2 -2
  611. package/lib/ui/Input.js +2 -2
  612. package/lib/ui/Input.js.map +1 -1
  613. package/lib/ui/Label.js +3 -3
  614. package/lib/ui/Pagination.js +5 -5
  615. package/lib/ui/Pagination.js.map +1 -1
  616. package/lib/ui/Popover.js +2 -2
  617. package/lib/ui/Popover.js.map +1 -1
  618. package/lib/ui/Progress.js +2 -2
  619. package/lib/ui/Progress.js.map +1 -1
  620. package/lib/ui/RadioGroup.js +2 -2
  621. package/lib/ui/RadioGroup.js.map +1 -1
  622. package/lib/ui/ScrollArea.js +2 -2
  623. package/lib/ui/ScrollArea.js.map +1 -1
  624. package/lib/ui/Select.js +4 -4
  625. package/lib/ui/Select.js.map +1 -1
  626. package/lib/ui/Skeleton.js +2 -2
  627. package/lib/ui/Skeleton.js.map +1 -1
  628. package/lib/ui/Slider.js +2 -2
  629. package/lib/ui/Stepper.js +6 -0
  630. package/lib/ui/Stepper.js.map +1 -0
  631. package/lib/ui/Switch.js +2 -2
  632. package/lib/ui/Switch.js.map +1 -1
  633. package/lib/{SyntaxHighlight-C31iouiO.js → ui/SyntaxHighlight.js} +460 -536
  634. package/lib/ui/SyntaxHighlight.js.map +1 -0
  635. package/lib/ui/Tabs.js +2 -2
  636. package/lib/ui/Textarea.js +2 -2
  637. package/lib/ui/Textarea.js.map +1 -1
  638. package/lib/ui/Toggle.js +3 -3
  639. package/lib/ui/Toggle.js.map +1 -1
  640. package/lib/ui/ToggleGroup.js +2 -2
  641. package/lib/ui/ToggleGroup.js.map +1 -1
  642. package/lib/ui/Tooltip.js +2 -2
  643. package/lib/ui/util.js +6 -0
  644. package/lib/ui/util.js.map +1 -0
  645. package/lib/useExposedProps-RIvey2Oy.js +9 -0
  646. package/lib/useExposedProps-RIvey2Oy.js.map +1 -0
  647. package/lib/useScrollToAnchor-RyqO3lj4.js +290 -0
  648. package/lib/useScrollToAnchor-RyqO3lj4.js.map +1 -0
  649. package/lib/zudoku.auth-auth0.js +19 -20
  650. package/lib/zudoku.auth-auth0.js.map +1 -1
  651. package/lib/zudoku.auth-clerk.js +81 -53
  652. package/lib/zudoku.auth-clerk.js.map +1 -1
  653. package/lib/zudoku.auth-openid.js +379 -410
  654. package/lib/zudoku.auth-openid.js.map +1 -1
  655. package/lib/zudoku.components.js +1003 -1263
  656. package/lib/zudoku.components.js.map +1 -1
  657. package/lib/zudoku.css +1 -0
  658. package/lib/zudoku.hooks.js +19 -0
  659. package/lib/zudoku.hooks.js.map +1 -0
  660. package/lib/zudoku.icons.js +10 -0
  661. package/lib/zudoku.icons.js.map +1 -1
  662. package/lib/zudoku.plugin-api-catalog.js +109 -109
  663. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  664. package/lib/zudoku.plugin-api-keys.js +108 -107
  665. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  666. package/lib/zudoku.plugin-custom-pages.js +4 -4
  667. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  668. package/lib/zudoku.plugin-markdown.js +23 -44
  669. package/lib/zudoku.plugin-markdown.js.map +1 -1
  670. package/lib/zudoku.plugin-openapi.js +8 -6
  671. package/lib/zudoku.plugin-openapi.js.map +1 -1
  672. package/lib/zudoku.plugin-redirect.js +1 -1
  673. package/lib/zudoku.plugin-redirect.js.map +1 -1
  674. package/lib/zudoku.plugin-search-inkeep.js +34 -26
  675. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  676. package/lib/zudoku.plugins.js +14 -0
  677. package/lib/zudoku.plugins.js.map +1 -0
  678. package/package.json +104 -89
  679. package/src/app/demo-cdn.html +31 -31
  680. package/src/app/demo.tsx +1 -2
  681. package/src/app/entry.client.tsx +9 -15
  682. package/src/app/entry.server.tsx +3 -3
  683. package/src/app/main.css +59 -45
  684. package/src/app/main.tsx +33 -10
  685. package/src/app/sentry.ts +1 -1
  686. package/src/app/standalone.tsx +1 -2
  687. package/src/app/tailwind.ts +6 -0
  688. package/src/lib/MissingIcon.tsx +22 -0
  689. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  690. package/src/lib/authentication/components/SignIn.tsx +1 -1
  691. package/src/lib/authentication/components/SignOut.tsx +3 -2
  692. package/src/lib/authentication/providers/auth0.tsx +4 -6
  693. package/src/lib/authentication/providers/clerk.tsx +48 -13
  694. package/src/lib/authentication/providers/openid.tsx +32 -15
  695. package/src/lib/authentication/state.ts +26 -2
  696. package/src/lib/components/AnchorLink.tsx +6 -3
  697. package/src/lib/components/Autocomplete.tsx +113 -0
  698. package/src/lib/components/Banner.tsx +1 -0
  699. package/src/lib/components/Bootstrap.tsx +4 -6
  700. package/src/lib/components/Header.tsx +14 -10
  701. package/src/lib/components/Heading.tsx +1 -1
  702. package/src/lib/components/Layout.tsx +4 -3
  703. package/src/lib/components/Markdown.tsx +14 -15
  704. package/src/lib/components/MobileTopNavigation.tsx +1 -1
  705. package/src/lib/components/NotFoundPage.tsx +1 -1
  706. package/src/lib/components/PathRenderer.tsx +61 -0
  707. package/src/lib/components/SlotletProvider.tsx +1 -1
  708. package/src/lib/components/StatusPage.tsx +91 -0
  709. package/src/lib/components/ThemeSwitch.tsx +29 -9
  710. package/src/lib/components/TopNavigation.tsx +15 -11
  711. package/src/lib/components/Zudoku.tsx +10 -6
  712. package/src/lib/components/cache.ts +15 -0
  713. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  714. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  715. package/src/lib/components/context/ZudokuContext.ts +17 -4
  716. package/src/lib/components/index.ts +22 -5
  717. package/src/lib/components/navigation/Sidebar.tsx +8 -2
  718. package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
  719. package/src/lib/components/navigation/SidebarCategory.tsx +46 -47
  720. package/src/lib/components/navigation/SidebarItem.tsx +4 -2
  721. package/src/lib/components/navigation/SidebarWrapper.tsx +3 -2
  722. package/src/lib/components/navigation/utils.ts +1 -1
  723. package/src/lib/core/RouteGuard.tsx +73 -0
  724. package/src/lib/core/ZudokuContext.ts +41 -9
  725. package/src/lib/core/plugins.ts +27 -9
  726. package/src/lib/errors/RouterError.tsx +1 -1
  727. package/src/lib/hooks/index.ts +5 -0
  728. package/src/lib/hooks/useEvent.test.tsx +149 -0
  729. package/src/lib/hooks/useEvent.ts +41 -0
  730. package/src/lib/icons.ts +1 -0
  731. package/src/lib/oas/graphql/circular.ts +50 -0
  732. package/src/lib/oas/graphql/index.ts +135 -92
  733. package/src/lib/oas/parser/dereference/index.ts +8 -4
  734. package/src/lib/oas/parser/upgrade/index.ts +21 -5
  735. package/src/lib/plugins/api-catalog/Catalog.tsx +62 -110
  736. package/src/lib/plugins/api-catalog/index.tsx +69 -9
  737. package/src/lib/plugins/api-keys/CreateApiKey.tsx +8 -4
  738. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  739. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  740. package/src/lib/plugins/api-keys/index.tsx +4 -1
  741. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  742. package/src/lib/plugins/markdown/MdxPage.tsx +15 -3
  743. package/src/lib/plugins/markdown/index.tsx +2 -1
  744. package/src/lib/plugins/markdown/resolver.ts +0 -33
  745. package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
  746. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  747. package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
  748. package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
  749. package/src/lib/plugins/openapi/OperationList.tsx +106 -67
  750. package/src/lib/plugins/openapi/OperationListItem.tsx +48 -6
  751. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  752. package/src/lib/plugins/openapi/ParameterListItem.tsx +7 -8
  753. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +14 -2
  754. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
  755. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +46 -63
  756. package/src/lib/plugins/openapi/Sidecar.tsx +44 -60
  757. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  758. package/src/lib/plugins/openapi/SidecarExamples.tsx +162 -0
  759. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -120
  760. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  761. package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -5
  762. package/src/lib/plugins/openapi/context.tsx +2 -2
  763. package/src/lib/plugins/openapi/graphql/gql.ts +21 -5
  764. package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
  765. package/src/lib/plugins/openapi/index.tsx +130 -97
  766. package/src/lib/plugins/openapi/interfaces.ts +27 -2
  767. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  768. package/src/lib/plugins/openapi/playground/Headers.tsx +166 -36
  769. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  770. package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -65
  771. package/src/lib/plugins/openapi/playground/Playground.tsx +288 -235
  772. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
  773. package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -88
  774. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  775. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  776. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  777. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  778. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  779. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  780. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  781. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  782. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  783. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  784. package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +34 -9
  785. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  786. package/src/lib/plugins/openapi/schema/utils.ts +4 -0
  787. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +39 -0
  788. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
  789. package/src/lib/plugins/openapi/util/getRoutes.tsx +123 -0
  790. package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
  791. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  792. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  793. package/src/lib/plugins/redirect/index.tsx +1 -1
  794. package/src/lib/plugins/search-inkeep/index.tsx +27 -8
  795. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +139 -0
  796. package/src/lib/plugins/search-pagefind/ResultList.tsx +98 -0
  797. package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
  798. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  799. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  800. package/src/lib/ui/Badge.tsx +2 -1
  801. package/src/lib/ui/Card.tsx +1 -1
  802. package/src/lib/ui/Checkbox.tsx +24 -7
  803. package/src/lib/ui/Command.tsx +45 -3
  804. package/src/lib/ui/Input.tsx +1 -2
  805. package/src/lib/ui/Select.tsx +1 -1
  806. package/src/lib/ui/Stepper.css +43 -0
  807. package/src/lib/ui/Stepper.tsx +8 -0
  808. package/src/lib/{components → ui}/SyntaxHighlight.tsx +37 -8
  809. package/src/lib/ui/util.tsx +3 -0
  810. package/src/lib/util/MdxComponents.tsx +8 -6
  811. package/src/lib/util/createVariantComponent.tsx +2 -2
  812. package/src/lib/util/joinUrl.test.ts +62 -0
  813. package/src/lib/util/joinUrl.ts +57 -0
  814. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  815. package/src/lib/util/traverse.ts +15 -5
  816. package/src/lib/util/useExposedProps.tsx +1 -1
  817. package/src/lib/util/useLatest.ts +18 -0
  818. package/src/lib/util/useScrollToAnchor.ts +33 -34
  819. package/src/lib/util/useScrollToTop.ts +9 -4
  820. package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
  821. package/dist/lib/components/SyntaxHighlight.js.map +0 -1
  822. package/dist/lib/plugins/openapi/Route.d.ts +0 -6
  823. package/dist/lib/plugins/openapi/Route.js +0 -6
  824. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  825. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  826. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  827. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  828. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  829. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  830. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  831. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
  832. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  833. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  834. package/dist/lib/plugins/openapi-worker.js +0 -8
  835. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  836. package/dist/vite/prerender.js +0 -89
  837. package/dist/vite/prerender.js.map +0 -1
  838. package/lib/AnchorLink-BR0MvI7n.js +0 -35
  839. package/lib/AnchorLink-BR0MvI7n.js.map +0 -1
  840. package/lib/AuthenticationPlugin-D0Em0SwR.js +0 -59
  841. package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
  842. package/lib/Button-jK0EsymC.js.map +0 -1
  843. package/lib/Markdown-CRsmPPfY.js.map +0 -1
  844. package/lib/MdxPage-Wp8QU0-q.js +0 -188
  845. package/lib/MdxPage-Wp8QU0-q.js.map +0 -1
  846. package/lib/OperationList-u8xHU9-b.js +0 -4706
  847. package/lib/OperationList-u8xHU9-b.js.map +0 -1
  848. package/lib/Route-DlG_HTMu.js +0 -11
  849. package/lib/Route-DlG_HTMu.js.map +0 -1
  850. package/lib/Select-O9ZM3ZgX.js.map +0 -1
  851. package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
  852. package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
  853. package/lib/SlotletProvider-BgvYIPQe.js +0 -252
  854. package/lib/SlotletProvider-BgvYIPQe.js.map +0 -1
  855. package/lib/Spinner-3cQDBVGr.js +0 -7
  856. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  857. package/lib/SyntaxHighlight-C31iouiO.js.map +0 -1
  858. package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
  859. package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
  860. package/lib/assets/index-B_Jk_Yzp.js +0 -4820
  861. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  862. package/lib/assets/worker-C_2va8B8.js +0 -18200
  863. package/lib/assets/worker-C_2va8B8.js.map +0 -1
  864. package/lib/cn-BmFQLtkS.js.map +0 -1
  865. package/lib/context-D1nXWxm7.js.map +0 -1
  866. package/lib/createServer-BCAHdrpE.js +0 -15302
  867. package/lib/createServer-BCAHdrpE.js.map +0 -1
  868. package/lib/hook-hEqe7fPB.js.map +0 -1
  869. package/lib/index-BuAyrJe3.js +0 -46
  870. package/lib/index-BuAyrJe3.js.map +0 -1
  871. package/lib/index-CkwDvuPt.js.map +0 -1
  872. package/lib/index-CmdLGbbk.js +0 -1279
  873. package/lib/index-CmdLGbbk.js.map +0 -1
  874. package/lib/index-Czzd9rjU.js +0 -899
  875. package/lib/index-Czzd9rjU.js.map +0 -1
  876. package/lib/index-Yn8c3UWE.js +0 -921
  877. package/lib/index-Yn8c3UWE.js.map +0 -1
  878. package/lib/index.esm-Bm8pj-bc.js +0 -675
  879. package/lib/index.esm-C5mr_sKO.js +0 -1193
  880. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  881. package/lib/jsx-runtime-B6kdoens.js +0 -635
  882. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  883. package/lib/object_hash-CvlLgU-M.js +0 -785
  884. package/lib/object_hash-CvlLgU-M.js.map +0 -1
  885. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  886. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  887. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  888. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  889. package/lib/router-lfyopgBI.js +0 -3024
  890. package/lib/router-lfyopgBI.js.map +0 -1
  891. package/lib/state-tsXBLONe.js +0 -203
  892. package/lib/state-tsXBLONe.js.map +0 -1
  893. package/lib/useExposedProps-CTPtylCV.js +0 -10
  894. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
  895. package/lib/utils-DcpDOncX.js +0 -1218
  896. package/lib/utils-DcpDOncX.js.map +0 -1
  897. package/lib/zudoku.openapi-worker.js +0 -15
  898. package/lib/zudoku.openapi-worker.js.map +0 -1
  899. package/src/lib/plugins/openapi/Route.tsx +0 -19
  900. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  901. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  902. package/src/lib/plugins/openapi-worker.ts +0 -11
  903. /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
package/lib/ui/Drawer.js CHANGED
@@ -1,8 +1,8 @@
1
- import { j as X } from "../jsx-runtime-B6kdoens.js";
2
- import * as wt from "react";
3
- import r, { useMemo as Se, useLayoutEffect as Re, useEffect as De } from "react";
1
+ import { j as X } from "../jsx-runtime-CYK1ROHF.js";
2
+ import * as mt from "react";
3
+ import r, { useMemo as ye, useLayoutEffect as be, useEffect as Se } from "react";
4
4
  import * as Z from "@radix-ui/react-dialog";
5
- import { c as it } from "../cn-BmFQLtkS.js";
5
+ import { c as ot } from "../cn-qaFjX9_3.js";
6
6
  function Te(t) {
7
7
  if (typeof document > "u") return;
8
8
  let n = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
@@ -55,7 +55,7 @@ const qt = r.createContext({
55
55
  noBodyStyles: !1,
56
56
  container: null,
57
57
  autoFocus: !1
58
- }), st = () => {
58
+ }), pt = () => {
59
59
  const t = r.useContext(qt);
60
60
  if (!t)
61
61
  throw new Error("useDrawerContext must be used within a Drawer.Root");
@@ -64,31 +64,31 @@ const qt = r.createContext({
64
64
  Te(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
65
65
  [data-state=closed]
66
66
  ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
67
- function Ee() {
67
+ function De() {
68
68
  const t = navigator.userAgent;
69
69
  return typeof window < "u" && (/Firefox/.test(t) && /Mobile/.test(t) || // Android Firefox
70
70
  /FxiOS/.test(t));
71
71
  }
72
- function xe() {
73
- return Mt(/^Mac/);
72
+ function Re() {
73
+ return Nt(/^Mac/);
74
74
  }
75
- function Oe() {
76
- return Mt(/^iPhone/);
75
+ function Ee() {
76
+ return Nt(/^iPhone/);
77
77
  }
78
78
  function Wt() {
79
79
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
80
80
  }
81
- function Ce() {
82
- return Mt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
83
- xe() && navigator.maxTouchPoints > 1;
81
+ function xe() {
82
+ return Nt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
83
+ Re() && navigator.maxTouchPoints > 1;
84
84
  }
85
85
  function Xt() {
86
- return Oe() || Ce();
86
+ return Ee() || xe();
87
87
  }
88
- function Mt(t) {
88
+ function Nt(t) {
89
89
  return typeof window < "u" && window.navigator != null ? t.test(window.navigator.platform) : void 0;
90
90
  }
91
- const $e = 24, Ae = typeof window < "u" ? Re : De;
91
+ const Oe = 24, Ce = typeof window < "u" ? be : Se;
92
92
  function zt(...t) {
93
93
  return (...n) => {
94
94
  for (let e of t)
@@ -105,7 +105,7 @@ function Kt(t) {
105
105
  t = t.parentElement;
106
106
  return t || document.scrollingElement || document.documentElement;
107
107
  }
108
- const Ne = /* @__PURE__ */ new Set([
108
+ const $e = /* @__PURE__ */ new Set([
109
109
  "checkbox",
110
110
  "radio",
111
111
  "range",
@@ -116,67 +116,67 @@ const Ne = /* @__PURE__ */ new Set([
116
116
  "submit",
117
117
  "reset"
118
118
  ]);
119
- let yt = 0, Ot;
120
- function Me(t = {}) {
119
+ let vt = 0, Ot;
120
+ function Ae(t = {}) {
121
121
  let { isDisabled: n } = t;
122
- Ae(() => {
122
+ Ce(() => {
123
123
  if (!n)
124
- return yt++, yt === 1 && Xt() && (Ot = Pe()), () => {
125
- yt--, yt === 0 && (Ot == null || Ot());
124
+ return vt++, vt === 1 && Xt() && (Ot = Me()), () => {
125
+ vt--, vt === 0 && (Ot == null || Ot());
126
126
  };
127
127
  }, [
128
128
  n
129
129
  ]);
130
130
  }
131
- function Pe() {
132
- let t, n = 0, e = (p) => {
133
- t = Kt(p.target), !(t === document.documentElement && t === document.body) && (n = p.changedTouches[0].pageY);
134
- }, a = (p) => {
131
+ function Me() {
132
+ let t, n = 0, e = (f) => {
133
+ t = Kt(f.target), !(t === document.documentElement && t === document.body) && (n = f.changedTouches[0].pageY);
134
+ }, a = (f) => {
135
135
  if (!t || t === document.documentElement || t === document.body) {
136
- p.preventDefault();
136
+ f.preventDefault();
137
137
  return;
138
138
  }
139
- let w = p.changedTouches[0].pageY, B = t.scrollTop, k = t.scrollHeight - t.clientHeight;
140
- k !== 0 && ((B <= 0 && w > n || B >= k && w < n) && p.preventDefault(), n = w);
141
- }, i = (p) => {
142
- let w = p.target;
143
- At(w) && w !== document.activeElement && (p.preventDefault(), w.style.transform = "translateY(-2000px)", w.focus(), requestAnimationFrame(() => {
144
- w.style.transform = "";
139
+ let m = f.changedTouches[0].pageY, B = t.scrollTop, k = t.scrollHeight - t.clientHeight;
140
+ k !== 0 && ((B <= 0 && m > n || B >= k && m < n) && f.preventDefault(), n = m);
141
+ }, i = (f) => {
142
+ let m = f.target;
143
+ At(m) && m !== document.activeElement && (f.preventDefault(), m.style.transform = "translateY(-2000px)", m.focus(), requestAnimationFrame(() => {
144
+ m.style.transform = "";
145
145
  }));
146
- }, o = (p) => {
147
- let w = p.target;
148
- At(w) && (w.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
149
- w.style.transform = "", xt && (xt.height < window.innerHeight ? requestAnimationFrame(() => {
150
- Yt(w);
151
- }) : xt.addEventListener("resize", () => Yt(w), {
146
+ }, o = (f) => {
147
+ let m = f.target;
148
+ At(m) && (m.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
149
+ m.style.transform = "", xt && (xt.height < window.innerHeight ? requestAnimationFrame(() => {
150
+ Yt(m);
151
+ }) : xt.addEventListener("resize", () => Yt(m), {
152
152
  once: !0
153
153
  }));
154
154
  }));
155
- }, f = () => {
155
+ }, v = () => {
156
156
  window.scrollTo(0, 0);
157
- }, m = window.pageXOffset, R = window.pageYOffset, T = zt(Ie(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
157
+ }, w = window.pageXOffset, T = window.pageYOffset, R = zt(Ne(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
158
158
  window.scrollTo(0, 0);
159
- let g = zt(mt(document, "touchstart", e, {
159
+ let h = zt(dt(document, "touchstart", e, {
160
160
  passive: !1,
161
161
  capture: !0
162
- }), mt(document, "touchmove", a, {
162
+ }), dt(document, "touchmove", a, {
163
163
  passive: !1,
164
164
  capture: !0
165
- }), mt(document, "touchend", i, {
165
+ }), dt(document, "touchend", i, {
166
166
  passive: !1,
167
167
  capture: !0
168
- }), mt(document, "focus", o, !0), mt(window, "scroll", f));
168
+ }), dt(document, "focus", o, !0), dt(window, "scroll", v));
169
169
  return () => {
170
- T(), g(), window.scrollTo(m, R);
170
+ R(), h(), window.scrollTo(w, T);
171
171
  };
172
172
  }
173
- function Ie(t, n, e) {
173
+ function Ne(t, n, e) {
174
174
  let a = t.style[n];
175
175
  return t.style[n] = e, () => {
176
176
  t.style[n] = a;
177
177
  };
178
178
  }
179
- function mt(t, n, e, a) {
179
+ function dt(t, n, e, a) {
180
180
  return t.addEventListener(n, e, a), () => {
181
181
  t.removeEventListener(n, e, a);
182
182
  };
@@ -187,23 +187,23 @@ function Yt(t) {
187
187
  let e = Kt(t);
188
188
  if (e !== document.documentElement && e !== document.body && e !== t) {
189
189
  let a = e.getBoundingClientRect().top, i = t.getBoundingClientRect().top, o = t.getBoundingClientRect().bottom;
190
- const f = e.getBoundingClientRect().bottom + $e;
191
- o > f && (e.scrollTop += i - a);
190
+ const v = e.getBoundingClientRect().bottom + Oe;
191
+ o > v && (e.scrollTop += i - a);
192
192
  }
193
193
  t = e.parentElement;
194
194
  }
195
195
  }
196
196
  function At(t) {
197
- return t instanceof HTMLInputElement && !Ne.has(t.type) || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable;
197
+ return t instanceof HTMLInputElement && !$e.has(t.type) || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable;
198
198
  }
199
- function _e(t, n) {
199
+ function Pe(t, n) {
200
200
  typeof t == "function" ? t(n) : t != null && (t.current = n);
201
201
  }
202
- function He(...t) {
203
- return (n) => t.forEach((e) => _e(e, n));
202
+ function Ie(...t) {
203
+ return (n) => t.forEach((e) => Pe(e, n));
204
204
  }
205
205
  function Gt(...t) {
206
- return wt.useCallback(He(...t), t);
206
+ return mt.useCallback(Ie(...t), t);
207
207
  }
208
208
  const Jt = /* @__PURE__ */ new WeakMap();
209
209
  function $(t, n, e = !1) {
@@ -217,7 +217,7 @@ function $(t, n, e = !1) {
217
217
  a[i] = t.style[i], t.style[i] = o;
218
218
  }), !e && Jt.set(t, a);
219
219
  }
220
- function ke(t, n) {
220
+ function _e(t, n) {
221
221
  if (!t || !(t instanceof HTMLElement)) return;
222
222
  let e = Jt.get(t);
223
223
  e && (t.style[n] = e[n]);
@@ -234,7 +234,7 @@ const C = (t) => {
234
234
  return t;
235
235
  }
236
236
  };
237
- function bt(t, n) {
237
+ function yt(t, n) {
238
238
  if (!t)
239
239
  return null;
240
240
  const e = window.getComputedStyle(t), a = (
@@ -244,7 +244,7 @@ function bt(t, n) {
244
244
  let i = a.match(/^matrix3d\((.+)\)$/);
245
245
  return i ? parseFloat(i[1].split(", ")[C(n) ? 13 : 12]) : (i = a.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[C(n) ? 5 : 4]) : null);
246
246
  }
247
- function Le(t) {
247
+ function He(t) {
248
248
  return 8 * (Math.log(t + 1) - 2);
249
249
  }
250
250
  function Ct(t, n) {
@@ -255,7 +255,7 @@ function Ct(t, n) {
255
255
  t.style.cssText = e;
256
256
  };
257
257
  }
258
- function Be(...t) {
258
+ function ke(...t) {
259
259
  return (...n) => {
260
260
  for (const e of t)
261
261
  typeof e == "function" && e(...n);
@@ -269,14 +269,14 @@ const x = {
269
269
  0,
270
270
  1
271
271
  ]
272
- }, Qt = 0.4, Fe = 0.25, Ue = 100, Zt = 8, nt = 16, Nt = 26, $t = "vaul-dragging";
272
+ }, Qt = 0.4, Le = 0.25, Be = 100, Zt = 8, bt = 16, Mt = 26, $t = "vaul-dragging";
273
273
  function te(t) {
274
274
  const n = r.useRef(t);
275
275
  return r.useEffect(() => {
276
276
  n.current = t;
277
277
  }), r.useMemo(() => (...e) => n.current == null ? void 0 : n.current.call(n, ...e), []);
278
278
  }
279
- function je({ defaultProp: t, onChange: n }) {
279
+ function Fe({ defaultProp: t, onChange: n }) {
280
280
  const e = r.useState(t), [a] = e, i = r.useRef(a), o = te(n);
281
281
  return r.useEffect(() => {
282
282
  i.current !== a && (o(a), i.current = a);
@@ -288,32 +288,32 @@ function je({ defaultProp: t, onChange: n }) {
288
288
  }
289
289
  function ee({ prop: t, defaultProp: n, onChange: e = () => {
290
290
  } }) {
291
- const [a, i] = je({
291
+ const [a, i] = Fe({
292
292
  defaultProp: n,
293
293
  onChange: e
294
- }), o = t !== void 0, f = o ? t : a, m = te(e), R = r.useCallback((T) => {
294
+ }), o = t !== void 0, v = o ? t : a, w = te(e), T = r.useCallback((R) => {
295
295
  if (o) {
296
- const p = typeof T == "function" ? T(t) : T;
297
- p !== t && m(p);
296
+ const f = typeof R == "function" ? R(t) : R;
297
+ f !== t && w(f);
298
298
  } else
299
- i(T);
299
+ i(R);
300
300
  }, [
301
301
  o,
302
302
  t,
303
303
  i,
304
- m
304
+ w
305
305
  ]);
306
306
  return [
307
- f,
308
- R
307
+ v,
308
+ T
309
309
  ];
310
310
  }
311
- function We({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e, drawerRef: a, overlayRef: i, fadeFromIndex: o, onSnapPointChange: f, direction: m = "bottom", container: R, snapToSequentialPoint: T }) {
312
- const [g, p] = ee({
311
+ function Ue({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e, drawerRef: a, overlayRef: i, fadeFromIndex: o, onSnapPointChange: v, direction: w = "bottom", container: T, snapToSequentialPoint: R }) {
312
+ const [h, f] = ee({
313
313
  prop: t,
314
314
  defaultProp: e == null ? void 0 : e[0],
315
315
  onChange: n
316
- }), [w, B] = r.useState(typeof window < "u" ? {
316
+ }), [m, B] = r.useState(typeof window < "u" ? {
317
317
  innerWidth: window.innerWidth,
318
318
  innerHeight: window.innerHeight
319
319
  } : void 0);
@@ -326,19 +326,19 @@ function We({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
326
326
  }
327
327
  return window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
328
328
  }, []);
329
- const k = r.useMemo(() => g === (e == null ? void 0 : e[e.length - 1]) || null, [
329
+ const k = r.useMemo(() => h === (e == null ? void 0 : e[e.length - 1]) || null, [
330
330
  e,
331
- g
331
+ h
332
332
  ]), E = r.useMemo(() => {
333
333
  var u;
334
- return (u = e == null ? void 0 : e.findIndex((b) => b === g)) != null ? u : null;
334
+ return (u = e == null ? void 0 : e.findIndex((b) => b === h)) != null ? u : null;
335
335
  }, [
336
336
  e,
337
- g
338
- ]), F = e && e.length > 0 && (o || o === 0) && !Number.isNaN(o) && e[o] === g || !e, h = r.useMemo(() => {
339
- const u = R ? {
340
- width: R.getBoundingClientRect().width,
341
- height: R.getBoundingClientRect().height
337
+ h
338
+ ]), F = e && e.length > 0 && (o || o === 0) && !Number.isNaN(o) && e[o] === h || !e, p = r.useMemo(() => {
339
+ const u = T ? {
340
+ width: T.getBoundingClientRect().width,
341
+ height: T.getBoundingClientRect().height
342
342
  } : typeof window < "u" ? {
343
343
  width: window.innerWidth,
344
344
  height: window.innerHeight
@@ -349,322 +349,322 @@ function We({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
349
349
  var b;
350
350
  return (b = e == null ? void 0 : e.map((y) => {
351
351
  const I = typeof y == "string";
352
- let M = 0;
353
- if (I && (M = parseInt(y, 10)), C(m)) {
354
- const l = I ? M : w ? y * u.height : 0;
355
- return w ? m === "bottom" ? u.height - l : -u.height + l : l;
352
+ let N = 0;
353
+ if (I && (N = parseInt(y, 10)), C(w)) {
354
+ const l = I ? N : m ? y * u.height : 0;
355
+ return m ? w === "bottom" ? u.height - l : -u.height + l : l;
356
356
  }
357
- const j = I ? M : w ? y * u.width : 0;
358
- return w ? m === "right" ? u.width - j : -u.width + j : j;
357
+ const j = I ? N : m ? y * u.width : 0;
358
+ return m ? w === "right" ? u.width - j : -u.width + j : j;
359
359
  })) != null ? b : [];
360
360
  }, [
361
361
  e,
362
- w,
363
- R
364
- ]), N = r.useMemo(() => E !== null ? h == null ? void 0 : h[E] : null, [
365
- h,
362
+ m,
363
+ T
364
+ ]), M = r.useMemo(() => E !== null ? p == null ? void 0 : p[E] : null, [
365
+ p,
366
366
  E
367
367
  ]), A = r.useCallback((u) => {
368
368
  var b;
369
- const y = (b = h == null ? void 0 : h.findIndex((I) => I === u)) != null ? b : null;
370
- f(y), $(a.current, {
369
+ const y = (b = p == null ? void 0 : p.findIndex((I) => I === u)) != null ? b : null;
370
+ v(y), $(a.current, {
371
371
  transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
372
- transform: C(m) ? `translate3d(0, ${u}px, 0)` : `translate3d(${u}px, 0, 0)`
373
- }), h && y !== h.length - 1 && o !== void 0 && y !== o && y < o ? $(i.current, {
372
+ transform: C(w) ? `translate3d(0, ${u}px, 0)` : `translate3d(${u}px, 0, 0)`
373
+ }), p && y !== p.length - 1 && o !== void 0 && y !== o && y < o ? $(i.current, {
374
374
  transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
375
375
  opacity: "0"
376
376
  }) : $(i.current, {
377
377
  transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
378
378
  opacity: "1"
379
- }), p(e == null ? void 0 : e[Math.max(y, 0)]);
379
+ }), f(e == null ? void 0 : e[Math.max(y, 0)]);
380
380
  }, [
381
381
  a.current,
382
382
  e,
383
- h,
383
+ p,
384
384
  o,
385
385
  i,
386
- p
386
+ f
387
387
  ]);
388
388
  r.useEffect(() => {
389
- if (g || t) {
389
+ if (h || t) {
390
390
  var u;
391
- const b = (u = e == null ? void 0 : e.findIndex((y) => y === t || y === g)) != null ? u : -1;
392
- h && b !== -1 && typeof h[b] == "number" && A(h[b]);
391
+ const b = (u = e == null ? void 0 : e.findIndex((y) => y === t || y === h)) != null ? u : -1;
392
+ p && b !== -1 && typeof p[b] == "number" && A(p[b]);
393
393
  }
394
394
  }, [
395
- g,
395
+ h,
396
396
  t,
397
397
  e,
398
- h,
398
+ p,
399
399
  A
400
400
  ]);
401
401
  function c({ draggedDistance: u, closeDrawer: b, velocity: y, dismissible: I }) {
402
402
  if (o === void 0) return;
403
- const M = m === "bottom" || m === "right" ? (N ?? 0) - u : (N ?? 0) + u, j = E === o - 1, l = E === 0, U = u > 0;
403
+ const N = w === "bottom" || w === "right" ? (M ?? 0) - u : (M ?? 0) + u, j = E === o - 1, l = E === 0, U = u > 0;
404
404
  if (j && $(i.current, {
405
405
  transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`
406
- }), !T && y > 2 && !U) {
407
- I ? b() : A(h[0]);
406
+ }), !R && y > 2 && !U) {
407
+ I ? b() : A(p[0]);
408
408
  return;
409
409
  }
410
- if (!T && y > 2 && U && h && e) {
411
- A(h[e.length - 1]);
410
+ if (!R && y > 2 && U && p && e) {
411
+ A(p[e.length - 1]);
412
412
  return;
413
413
  }
414
- const _ = h == null ? void 0 : h.reduce((P, K) => typeof P != "number" || typeof K != "number" ? P : Math.abs(K - M) < Math.abs(P - M) ? K : P), W = C(m) ? window.innerHeight : window.innerWidth;
414
+ const _ = p == null ? void 0 : p.reduce((P, K) => typeof P != "number" || typeof K != "number" ? P : Math.abs(K - N) < Math.abs(P - N) ? K : P), W = C(w) ? window.innerHeight : window.innerWidth;
415
415
  if (y > Qt && Math.abs(u) < W * 0.4) {
416
416
  const P = U ? 1 : -1;
417
417
  if (P > 0 && k && e) {
418
- A(h[e.length - 1]);
418
+ A(p[e.length - 1]);
419
419
  return;
420
420
  }
421
421
  if (l && P < 0 && I && b(), E === null) return;
422
- A(h[E + P]);
422
+ A(p[E + P]);
423
423
  return;
424
424
  }
425
425
  A(_);
426
426
  }
427
427
  function Y({ draggedDistance: u }) {
428
- if (N === null) return;
429
- const b = m === "bottom" || m === "right" ? N - u : N + u;
430
- (m === "bottom" || m === "right") && b < h[h.length - 1] || (m === "top" || m === "left") && b > h[h.length - 1] || $(a.current, {
431
- transform: C(m) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
428
+ if (M === null) return;
429
+ const b = w === "bottom" || w === "right" ? M - u : M + u;
430
+ (w === "bottom" || w === "right") && b < p[p.length - 1] || (w === "top" || w === "left") && b > p[p.length - 1] || $(a.current, {
431
+ transform: C(w) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
432
432
  });
433
433
  }
434
434
  function tt(u, b) {
435
- if (!e || typeof E != "number" || !h || o === void 0) return null;
435
+ if (!e || typeof E != "number" || !p || o === void 0) return null;
436
436
  const y = E === o - 1;
437
437
  if (E >= o && b)
438
438
  return 0;
439
439
  if (y && !b) return 1;
440
440
  if (!F && !y) return null;
441
- const M = y ? E + 1 : E - 1, j = y ? h[M] - h[M - 1] : h[M + 1] - h[M], l = u / Math.abs(j);
441
+ const N = y ? E + 1 : E - 1, j = y ? p[N] - p[N - 1] : p[N + 1] - p[N], l = u / Math.abs(j);
442
442
  return y ? 1 - l : l;
443
443
  }
444
444
  return {
445
445
  isLastSnapPoint: k,
446
- activeSnapPoint: g,
446
+ activeSnapPoint: h,
447
447
  shouldFade: F,
448
448
  getPercentageDragged: tt,
449
- setActiveSnapPoint: p,
449
+ setActiveSnapPoint: f,
450
450
  activeSnapPointIndex: E,
451
451
  onRelease: c,
452
452
  onDrag: Y,
453
- snapPointsOffset: h
453
+ snapPointsOffset: p
454
454
  };
455
455
  }
456
- const ze = () => () => {
456
+ const je = () => () => {
457
457
  };
458
- function Ve() {
459
- const { direction: t, isOpen: n, shouldScaleBackground: e, setBackgroundColorOnScale: a, noBodyStyles: i } = st(), o = r.useRef(null), f = Se(() => document.body.style.backgroundColor, []);
460
- function m() {
461
- return (window.innerWidth - Nt) / window.innerWidth;
458
+ function We() {
459
+ const { direction: t, isOpen: n, shouldScaleBackground: e, setBackgroundColorOnScale: a, noBodyStyles: i } = pt(), o = r.useRef(null), v = ye(() => document.body.style.backgroundColor, []);
460
+ function w() {
461
+ return (window.innerWidth - Mt) / window.innerWidth;
462
462
  }
463
463
  r.useEffect(() => {
464
464
  if (n && e) {
465
465
  o.current && clearTimeout(o.current);
466
- const R = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
467
- if (!R) return;
468
- Be(a && !i ? Ct(document.body, {
466
+ const T = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
467
+ if (!T) return;
468
+ ke(a && !i ? Ct(document.body, {
469
469
  background: "black"
470
- }) : ze, Ct(R, {
470
+ }) : je, Ct(T, {
471
471
  transformOrigin: C(t) ? "top" : "left",
472
472
  transitionProperty: "transform, border-radius",
473
473
  transitionDuration: `${x.DURATION}s`,
474
474
  transitionTimingFunction: `cubic-bezier(${x.EASE.join(",")})`
475
475
  }));
476
- const T = Ct(R, {
476
+ const R = Ct(T, {
477
477
  borderRadius: `${Zt}px`,
478
478
  overflow: "hidden",
479
479
  ...C(t) ? {
480
- transform: `scale(${m()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
480
+ transform: `scale(${w()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
481
481
  } : {
482
- transform: `scale(${m()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
482
+ transform: `scale(${w()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
483
483
  }
484
484
  });
485
485
  return () => {
486
- T(), o.current = window.setTimeout(() => {
487
- f ? document.body.style.background = f : document.body.style.removeProperty("background");
486
+ R(), o.current = window.setTimeout(() => {
487
+ v ? document.body.style.background = v : document.body.style.removeProperty("background");
488
488
  }, x.DURATION * 1e3);
489
489
  };
490
490
  }
491
491
  }, [
492
492
  n,
493
493
  e,
494
- f
494
+ v
495
495
  ]);
496
496
  }
497
- let pt = null;
498
- function Ye({ isOpen: t, modal: n, nested: e, hasBeenOpened: a, preventScrollRestoration: i, noBodyStyles: o }) {
499
- const [f, m] = r.useState(() => typeof window < "u" ? window.location.href : ""), R = r.useRef(0), T = r.useCallback(() => {
500
- if (Wt() && pt === null && t && !o) {
501
- pt = {
497
+ let ft = null;
498
+ function ze({ isOpen: t, modal: n, nested: e, hasBeenOpened: a, preventScrollRestoration: i, noBodyStyles: o }) {
499
+ const [v, w] = r.useState(() => typeof window < "u" ? window.location.href : ""), T = r.useRef(0), R = r.useCallback(() => {
500
+ if (Wt() && ft === null && t && !o) {
501
+ ft = {
502
502
  position: document.body.style.position,
503
503
  top: document.body.style.top,
504
504
  left: document.body.style.left,
505
505
  height: document.body.style.height,
506
506
  right: "unset"
507
507
  };
508
- const { scrollX: p, innerHeight: w } = window;
508
+ const { scrollX: f, innerHeight: m } = window;
509
509
  document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
510
- top: `${-R.current}px`,
511
- left: `${-p}px`,
510
+ top: `${-T.current}px`,
511
+ left: `${-f}px`,
512
512
  right: "0px",
513
513
  height: "auto"
514
514
  }), window.setTimeout(() => window.requestAnimationFrame(() => {
515
- const B = w - window.innerHeight;
516
- B && R.current >= w && (document.body.style.top = `${-(R.current + B)}px`);
515
+ const B = m - window.innerHeight;
516
+ B && T.current >= m && (document.body.style.top = `${-(T.current + B)}px`);
517
517
  }), 300);
518
518
  }
519
519
  }, [
520
520
  t
521
- ]), g = r.useCallback(() => {
522
- if (Wt() && pt !== null && !o) {
523
- const p = -parseInt(document.body.style.top, 10), w = -parseInt(document.body.style.left, 10);
524
- Object.assign(document.body.style, pt), window.requestAnimationFrame(() => {
525
- if (i && f !== window.location.href) {
526
- m(window.location.href);
521
+ ]), h = r.useCallback(() => {
522
+ if (Wt() && ft !== null && !o) {
523
+ const f = -parseInt(document.body.style.top, 10), m = -parseInt(document.body.style.left, 10);
524
+ Object.assign(document.body.style, ft), window.requestAnimationFrame(() => {
525
+ if (i && v !== window.location.href) {
526
+ w(window.location.href);
527
527
  return;
528
528
  }
529
- window.scrollTo(w, p);
530
- }), pt = null;
529
+ window.scrollTo(m, f);
530
+ }), ft = null;
531
531
  }
532
532
  }, [
533
- f
533
+ v
534
534
  ]);
535
535
  return r.useEffect(() => {
536
- function p() {
537
- R.current = window.scrollY;
536
+ function f() {
537
+ T.current = window.scrollY;
538
538
  }
539
- return p(), window.addEventListener("scroll", p), () => {
540
- window.removeEventListener("scroll", p);
539
+ return f(), window.addEventListener("scroll", f), () => {
540
+ window.removeEventListener("scroll", f);
541
541
  };
542
542
  }, []), r.useEffect(() => {
543
543
  if (n)
544
544
  return () => {
545
- typeof document > "u" || document.querySelector("[data-vaul-drawer]") || g();
545
+ typeof document > "u" || document.querySelector("[data-vaul-drawer]") || h();
546
546
  };
547
547
  }, [
548
548
  n,
549
- g
549
+ h
550
550
  ]), r.useEffect(() => {
551
- e || !a || (t ? (!window.matchMedia("(display-mode: standalone)").matches && T(), n || window.setTimeout(() => {
552
- g();
553
- }, 500)) : g());
551
+ e || !a || (t ? (!window.matchMedia("(display-mode: standalone)").matches && R(), n || window.setTimeout(() => {
552
+ h();
553
+ }, 500)) : h());
554
554
  }, [
555
555
  t,
556
556
  a,
557
- f,
557
+ v,
558
558
  n,
559
559
  e,
560
- T,
561
- g
560
+ R,
561
+ h
562
562
  ]), {
563
- restorePositionSetting: g
563
+ restorePositionSetting: h
564
564
  };
565
565
  }
566
- function ne({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, snapPoints: o, shouldScaleBackground: f = !1, setBackgroundColorOnScale: m = !0, closeThreshold: R = Fe, scrollLockTimeout: T = Ue, dismissible: g = !0, handleOnly: p = !1, fadeFromIndex: w = o && o.length - 1, activeSnapPoint: B, setActiveSnapPoint: k, fixed: E, modal: F = !0, onClose: h, nested: N, noBodyStyles: A = !1, direction: c = "bottom", defaultOpen: Y = !1, disablePreventScroll: tt = !0, snapToSequentialPoint: u = !1, preventScrollRestoration: b = !1, repositionInputs: y = !0, onAnimationEnd: I, container: M, autoFocus: j = !1 }) {
566
+ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, snapPoints: o, shouldScaleBackground: v = !1, setBackgroundColorOnScale: w = !0, closeThreshold: T = Le, scrollLockTimeout: R = Be, dismissible: h = !0, handleOnly: f = !1, fadeFromIndex: m = o && o.length - 1, activeSnapPoint: B, setActiveSnapPoint: k, fixed: E, modal: F = !0, onClose: p, nested: M, noBodyStyles: A = !1, direction: c = "bottom", defaultOpen: Y = !1, disablePreventScroll: tt = !0, snapToSequentialPoint: u = !1, preventScrollRestoration: b = !1, repositionInputs: y = !0, onAnimationEnd: I, container: N, autoFocus: j = !1 }) {
567
567
  var l, U;
568
568
  const [_ = !1, W] = ee({
569
569
  defaultProp: Y,
570
570
  prop: t,
571
571
  onChange: (s) => {
572
- n == null || n(s), !s && !N && me(), setTimeout(() => {
572
+ n == null || n(s), !s && !M && de(), setTimeout(() => {
573
573
  I == null || I(s);
574
574
  }, x.DURATION * 1e3), s && !F && typeof window < "u" && window.requestAnimationFrame(() => {
575
575
  document.body.style.pointerEvents = "auto";
576
576
  }), s || (document.body.style.pointerEvents = "auto");
577
577
  }
578
- }), [P, K] = r.useState(!1), [G, lt] = r.useState(!1), [se, Pt] = r.useState(!1), rt = r.useRef(null), ht = r.useRef(null), St = r.useRef(null), Rt = r.useRef(null), ut = r.useRef(null), ct = r.useRef(!1), Dt = r.useRef(null), Tt = r.useRef(0), at = r.useRef(!1), It = r.useRef(!Y), _t = r.useRef(0), d = r.useRef(null), Ht = r.useRef(((l = d.current) == null ? void 0 : l.getBoundingClientRect().height) || 0), kt = r.useRef(((U = d.current) == null ? void 0 : U.getBoundingClientRect().width) || 0), Et = r.useRef(0), le = r.useCallback((s) => {
579
- o && s === dt.length - 1 && (ht.current = /* @__PURE__ */ new Date());
580
- }, []), { activeSnapPoint: ue, activeSnapPointIndex: ot, setActiveSnapPoint: Lt, onRelease: ce, snapPointsOffset: dt, onDrag: de, shouldFade: Bt, getPercentageDragged: fe } = We({
578
+ }), [P, K] = r.useState(!1), [G, it] = r.useState(!1), [oe, Pt] = r.useState(!1), nt = r.useRef(null), wt = r.useRef(null), St = r.useRef(null), Tt = r.useRef(null), st = r.useRef(null), lt = r.useRef(!1), Dt = r.useRef(null), Rt = r.useRef(0), rt = r.useRef(!1), It = r.useRef(!Y), _t = r.useRef(0), d = r.useRef(null), Ht = r.useRef(((l = d.current) == null ? void 0 : l.getBoundingClientRect().height) || 0), kt = r.useRef(((U = d.current) == null ? void 0 : U.getBoundingClientRect().width) || 0), Et = r.useRef(0), ie = r.useCallback((s) => {
579
+ o && s === ut.length - 1 && (wt.current = /* @__PURE__ */ new Date());
580
+ }, []), { activeSnapPoint: se, activeSnapPointIndex: at, setActiveSnapPoint: Lt, onRelease: le, snapPointsOffset: ut, onDrag: ue, shouldFade: Bt, getPercentageDragged: ce } = Ue({
581
581
  snapPoints: o,
582
582
  activeSnapPointProp: B,
583
583
  setActiveSnapPointProp: k,
584
584
  drawerRef: d,
585
- fadeFromIndex: w,
586
- overlayRef: rt,
587
- onSnapPointChange: le,
585
+ fadeFromIndex: m,
586
+ overlayRef: nt,
587
+ onSnapPointChange: ie,
588
588
  direction: c,
589
- container: M,
589
+ container: N,
590
590
  snapToSequentialPoint: u
591
591
  });
592
- Me({
593
- isDisabled: !_ || G || !F || se || !P || !y || !tt
592
+ Ae({
593
+ isDisabled: !_ || G || !F || oe || !P || !y || !tt
594
594
  });
595
- const { restorePositionSetting: me } = Ye({
595
+ const { restorePositionSetting: de } = ze({
596
596
  isOpen: _,
597
597
  modal: F,
598
- nested: N ?? !1,
598
+ nested: M ?? !1,
599
599
  hasBeenOpened: P,
600
600
  preventScrollRestoration: b,
601
601
  noBodyStyles: A
602
602
  });
603
- function gt() {
604
- return (window.innerWidth - Nt) / window.innerWidth;
603
+ function ht() {
604
+ return (window.innerWidth - Mt) / window.innerWidth;
605
605
  }
606
- function pe(s) {
606
+ function fe(s) {
607
607
  var S, D;
608
- !g && !o || d.current && !d.current.contains(s.target) || (Ht.current = ((S = d.current) == null ? void 0 : S.getBoundingClientRect().height) || 0, kt.current = ((D = d.current) == null ? void 0 : D.getBoundingClientRect().width) || 0, lt(!0), St.current = /* @__PURE__ */ new Date(), Xt() && window.addEventListener("touchend", () => ct.current = !1, {
608
+ !h && !o || d.current && !d.current.contains(s.target) || (Ht.current = ((S = d.current) == null ? void 0 : S.getBoundingClientRect().height) || 0, kt.current = ((D = d.current) == null ? void 0 : D.getBoundingClientRect().width) || 0, it(!0), St.current = /* @__PURE__ */ new Date(), Xt() && window.addEventListener("touchend", () => lt.current = !1, {
609
609
  once: !0
610
- }), s.target.setPointerCapture(s.pointerId), Tt.current = C(c) ? s.pageY : s.pageX);
610
+ }), s.target.setPointerCapture(s.pointerId), Rt.current = C(c) ? s.pageY : s.pageX);
611
611
  }
612
612
  function Ft(s, S) {
613
613
  var D;
614
- let v = s;
615
- const O = (D = window.getSelection()) == null ? void 0 : D.toString(), L = d.current ? bt(d.current, c) : null, H = /* @__PURE__ */ new Date();
616
- if (v.tagName === "SELECT" || v.hasAttribute("data-vaul-no-drag") || v.closest("[data-vaul-no-drag]"))
614
+ let g = s;
615
+ const O = (D = window.getSelection()) == null ? void 0 : D.toString(), L = d.current ? yt(d.current, c) : null, H = /* @__PURE__ */ new Date();
616
+ if (g.tagName === "SELECT" || g.hasAttribute("data-vaul-no-drag") || g.closest("[data-vaul-no-drag]"))
617
617
  return !1;
618
618
  if (c === "right" || c === "left")
619
619
  return !0;
620
- if (ht.current && H.getTime() - ht.current.getTime() < 500)
620
+ if (wt.current && H.getTime() - wt.current.getTime() < 500)
621
621
  return !1;
622
622
  if (L !== null && (c === "bottom" ? L > 0 : L < 0))
623
623
  return !0;
624
624
  if (O && O.length > 0)
625
625
  return !1;
626
- if (ut.current && H.getTime() - ut.current.getTime() < T && L === 0 || S)
627
- return ut.current = H, !1;
628
- for (; v; ) {
629
- if (v.scrollHeight > v.clientHeight) {
630
- if (v.scrollTop !== 0)
631
- return ut.current = /* @__PURE__ */ new Date(), !1;
632
- if (v.getAttribute("role") === "dialog")
626
+ if (st.current && H.getTime() - st.current.getTime() < R && L === 0 || S)
627
+ return st.current = H, !1;
628
+ for (; g; ) {
629
+ if (g.scrollHeight > g.clientHeight) {
630
+ if (g.scrollTop !== 0)
631
+ return st.current = /* @__PURE__ */ new Date(), !1;
632
+ if (g.getAttribute("role") === "dialog")
633
633
  return !0;
634
634
  }
635
- v = v.parentNode;
635
+ g = g.parentNode;
636
636
  }
637
637
  return !0;
638
638
  }
639
- function we(s) {
639
+ function me(s) {
640
640
  if (d.current && G) {
641
- const S = c === "bottom" || c === "right" ? 1 : -1, D = (Tt.current - (C(c) ? s.pageY : s.pageX)) * S, v = D > 0, O = o && !g && !v;
642
- if (O && ot === 0) return;
641
+ const S = c === "bottom" || c === "right" ? 1 : -1, D = (Rt.current - (C(c) ? s.pageY : s.pageX)) * S, g = D > 0, O = o && !h && !g;
642
+ if (O && at === 0) return;
643
643
  const L = Math.abs(D), H = document.querySelector("[data-vaul-drawer-wrapper]"), J = c === "bottom" || c === "top" ? Ht.current : kt.current;
644
644
  let z = L / J;
645
- const et = fe(L, v);
646
- if (et !== null && (z = et), O && z >= 1 || !ct.current && !Ft(s.target, v)) return;
647
- if (d.current.classList.add($t), ct.current = !0, $(d.current, {
645
+ const et = ce(L, g);
646
+ if (et !== null && (z = et), O && z >= 1 || !lt.current && !Ft(s.target, g)) return;
647
+ if (d.current.classList.add($t), lt.current = !0, $(d.current, {
648
648
  transition: "none"
649
- }), $(rt.current, {
649
+ }), $(nt.current, {
650
650
  transition: "none"
651
- }), o && de({
651
+ }), o && ue({
652
652
  draggedDistance: D
653
- }), v && !o) {
654
- const q = Le(D), vt = Math.min(q * -1, 0) * S;
653
+ }), g && !o) {
654
+ const q = He(D), gt = Math.min(q * -1, 0) * S;
655
655
  $(d.current, {
656
- transform: C(c) ? `translate3d(0, ${vt}px, 0)` : `translate3d(${vt}px, 0, 0)`
656
+ transform: C(c) ? `translate3d(0, ${gt}px, 0)` : `translate3d(${gt}px, 0, 0)`
657
657
  });
658
658
  return;
659
659
  }
660
660
  const Q = 1 - z;
661
- if ((Bt || w && ot === w - 1) && (a == null || a(s, z), $(rt.current, {
661
+ if ((Bt || m && at === m - 1) && (a == null || a(s, z), $(nt.current, {
662
662
  opacity: `${Q}`,
663
663
  transition: "none"
664
- }, !0)), H && rt.current && f) {
665
- const q = Math.min(gt() + z * (1 - gt()), 1), vt = 8 - z * 8, jt = Math.max(0, 14 - z * 14);
664
+ }, !0)), H && nt.current && v) {
665
+ const q = Math.min(ht() + z * (1 - ht()), 1), gt = 8 - z * 8, jt = Math.max(0, 14 - z * 14);
666
666
  $(H, {
667
- borderRadius: `${vt}px`,
667
+ borderRadius: `${gt}px`,
668
668
  transform: C(c) ? `scale(${q}) translate3d(0, ${jt}px, 0)` : `scale(${q}) translate3d(${jt}px, 0, 0)`,
669
669
  transition: "none"
670
670
  }, !0);
@@ -686,23 +686,23 @@ function ne({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
686
686
  function S() {
687
687
  if (!d.current || !y) return;
688
688
  const D = document.activeElement;
689
- if (At(D) || at.current) {
690
- var v;
691
- const O = ((v = window.visualViewport) == null ? void 0 : v.height) || 0, L = window.innerHeight;
689
+ if (At(D) || rt.current) {
690
+ var g;
691
+ const O = ((g = window.visualViewport) == null ? void 0 : g.height) || 0, L = window.innerHeight;
692
692
  let H = L - O;
693
693
  const J = d.current.getBoundingClientRect().height || 0, z = J > L * 0.8;
694
694
  Et.current || (Et.current = J);
695
695
  const et = d.current.getBoundingClientRect().top;
696
- if (Math.abs(_t.current - H) > 60 && (at.current = !at.current), o && o.length > 0 && dt && ot) {
697
- const Q = dt[ot] || 0;
696
+ if (Math.abs(_t.current - H) > 60 && (rt.current = !rt.current), o && o.length > 0 && ut && at) {
697
+ const Q = ut[at] || 0;
698
698
  H += Q;
699
699
  }
700
- if (_t.current = H, J > O || at.current) {
700
+ if (_t.current = H, J > O || rt.current) {
701
701
  const Q = d.current.getBoundingClientRect().height;
702
702
  let q = Q;
703
- Q > O && (q = O - (z ? et : Nt)), E ? d.current.style.height = `${Q - Math.max(H, 0)}px` : d.current.style.height = `${Math.max(q, O - et)}px`;
704
- } else Ee() || (d.current.style.height = `${Et.current}px`);
705
- o && o.length > 0 && !at.current ? d.current.style.bottom = "0px" : d.current.style.bottom = `${Math.max(H, 0)}px`;
703
+ Q > O && (q = O - (z ? et : Mt)), E ? d.current.style.height = `${Q - Math.max(H, 0)}px` : d.current.style.height = `${Math.max(q, O - et)}px`;
704
+ } else De() || (d.current.style.height = `${Et.current}px`);
705
+ o && o.length > 0 && !rt.current ? d.current.style.bottom = "0px" : d.current.style.bottom = `${Math.max(H, 0)}px`;
706
706
  }
707
707
  }
708
708
  return (s = window.visualViewport) == null || s.addEventListener("resize", S), () => {
@@ -710,32 +710,32 @@ function ne({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
710
710
  return (D = window.visualViewport) == null ? void 0 : D.removeEventListener("resize", S);
711
711
  };
712
712
  }, [
713
- ot,
713
+ at,
714
714
  o,
715
- dt
715
+ ut
716
716
  ]);
717
- function ft(s) {
718
- he(), h == null || h(), s || W(!1), setTimeout(() => {
717
+ function ct(s) {
718
+ pe(), p == null || p(), s || W(!1), setTimeout(() => {
719
719
  o && Lt(o[0]);
720
720
  }, x.DURATION * 1e3);
721
721
  }
722
722
  function Ut() {
723
723
  if (!d.current) return;
724
- const s = document.querySelector("[data-vaul-drawer-wrapper]"), S = bt(d.current, c);
724
+ const s = document.querySelector("[data-vaul-drawer-wrapper]"), S = yt(d.current, c);
725
725
  $(d.current, {
726
726
  transform: "translate3d(0, 0, 0)",
727
727
  transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`
728
- }), $(rt.current, {
728
+ }), $(nt.current, {
729
729
  transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
730
730
  opacity: "1"
731
- }), f && S && S > 0 && _ && $(s, {
731
+ }), v && S && S > 0 && _ && $(s, {
732
732
  borderRadius: `${Zt}px`,
733
733
  overflow: "hidden",
734
734
  ...C(c) ? {
735
- transform: `scale(${gt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
735
+ transform: `scale(${ht()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
736
736
  transformOrigin: "top"
737
737
  } : {
738
- transform: `scale(${gt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
738
+ transform: `scale(${ht()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
739
739
  transformOrigin: "left"
740
740
  },
741
741
  transitionProperty: "transform, border-radius",
@@ -743,77 +743,77 @@ function ne({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
743
743
  transitionTimingFunction: `cubic-bezier(${x.EASE.join(",")})`
744
744
  }, !0);
745
745
  }
746
- function he() {
747
- !G || !d.current || (d.current.classList.remove($t), ct.current = !1, lt(!1), Rt.current = /* @__PURE__ */ new Date());
746
+ function pe() {
747
+ !G || !d.current || (d.current.classList.remove($t), lt.current = !1, it(!1), Tt.current = /* @__PURE__ */ new Date());
748
748
  }
749
- function ge(s) {
749
+ function we(s) {
750
750
  if (!G || !d.current) return;
751
- d.current.classList.remove($t), ct.current = !1, lt(!1), Rt.current = /* @__PURE__ */ new Date();
752
- const S = bt(d.current, c);
751
+ d.current.classList.remove($t), lt.current = !1, it(!1), Tt.current = /* @__PURE__ */ new Date();
752
+ const S = yt(d.current, c);
753
753
  if (!s || !Ft(s.target, !1) || !S || Number.isNaN(S) || St.current === null) return;
754
- const D = Rt.current.getTime() - St.current.getTime(), v = Tt.current - (C(c) ? s.pageY : s.pageX), O = Math.abs(v) / D;
754
+ const D = Tt.current.getTime() - St.current.getTime(), g = Rt.current - (C(c) ? s.pageY : s.pageX), O = Math.abs(g) / D;
755
755
  if (O > 0.05 && (Pt(!0), setTimeout(() => {
756
756
  Pt(!1);
757
757
  }, 200)), o) {
758
- ce({
759
- draggedDistance: v * (c === "bottom" || c === "right" ? 1 : -1),
760
- closeDrawer: ft,
758
+ le({
759
+ draggedDistance: g * (c === "bottom" || c === "right" ? 1 : -1),
760
+ closeDrawer: ct,
761
761
  velocity: O,
762
- dismissible: g
762
+ dismissible: h
763
763
  }), i == null || i(s, !0);
764
764
  return;
765
765
  }
766
- if (c === "bottom" || c === "right" ? v > 0 : v < 0) {
766
+ if (c === "bottom" || c === "right" ? g > 0 : g < 0) {
767
767
  Ut(), i == null || i(s, !0);
768
768
  return;
769
769
  }
770
770
  if (O > Qt) {
771
- ft(), i == null || i(s, !1);
771
+ ct(), i == null || i(s, !1);
772
772
  return;
773
773
  }
774
774
  var L;
775
775
  const H = Math.min((L = d.current.getBoundingClientRect().height) != null ? L : 0, window.innerHeight);
776
776
  var J;
777
777
  const z = Math.min((J = d.current.getBoundingClientRect().width) != null ? J : 0, window.innerWidth), et = c === "left" || c === "right";
778
- if (Math.abs(S) >= (et ? z : H) * R) {
779
- ft(), i == null || i(s, !1);
778
+ if (Math.abs(S) >= (et ? z : H) * T) {
779
+ ct(), i == null || i(s, !1);
780
780
  return;
781
781
  }
782
782
  i == null || i(s, !0), Ut();
783
783
  }
784
784
  r.useEffect(() => (_ && ($(document.documentElement, {
785
785
  scrollBehavior: "auto"
786
- }), ht.current = /* @__PURE__ */ new Date()), () => {
787
- ke(document.documentElement, "scrollBehavior");
786
+ }), wt.current = /* @__PURE__ */ new Date()), () => {
787
+ _e(document.documentElement, "scrollBehavior");
788
788
  }), [
789
789
  _
790
790
  ]);
791
- function ve(s) {
792
- const S = s ? (window.innerWidth - nt) / window.innerWidth : 1, D = s ? -nt : 0;
791
+ function he(s) {
792
+ const S = s ? (window.innerWidth - bt) / window.innerWidth : 1, D = s ? -16 : 0;
793
793
  Dt.current && window.clearTimeout(Dt.current), $(d.current, {
794
794
  transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
795
- transform: C(c) ? `scale(${S}) translate3d(0, ${D}px, 0)` : `scale(${S}) translate3d(${D}, 0, 0)`
795
+ transform: C(c) ? `scale(${S}) translate3d(0, ${D}px, 0)` : `scale(${S}) translate3d(${D}px, 0, 0)`
796
796
  }), !s && d.current && (Dt.current = setTimeout(() => {
797
- const v = bt(d.current, c);
797
+ const g = yt(d.current, c);
798
798
  $(d.current, {
799
799
  transition: "none",
800
- transform: C(c) ? `translate3d(0, ${v}px, 0)` : `translate3d(${v}px, 0, 0)`
800
+ transform: C(c) ? `translate3d(0, ${g}px, 0)` : `translate3d(${g}px, 0, 0)`
801
801
  });
802
802
  }, 500));
803
803
  }
804
- function ye(s, S) {
804
+ function ge(s, S) {
805
805
  if (S < 0) return;
806
- const D = (window.innerWidth - nt) / window.innerWidth, v = D + S * (1 - D), O = -nt + S * nt;
806
+ const D = (window.innerWidth - bt) / window.innerWidth, g = D + S * (1 - D), O = -16 + S * bt;
807
807
  $(d.current, {
808
- transform: C(c) ? `scale(${v}) translate3d(0, ${O}px, 0)` : `scale(${v}) translate3d(${O}px, 0, 0)`,
808
+ transform: C(c) ? `scale(${g}) translate3d(0, ${O}px, 0)` : `scale(${g}) translate3d(${O}px, 0, 0)`,
809
809
  transition: "none"
810
810
  });
811
811
  }
812
- function be(s, S) {
813
- const D = C(c) ? window.innerHeight : window.innerWidth, v = S ? (D - nt) / D : 1, O = S ? -nt : 0;
812
+ function ve(s, S) {
813
+ const D = C(c) ? window.innerHeight : window.innerWidth, g = S ? (D - bt) / D : 1, O = S ? -16 : 0;
814
814
  S && $(d.current, {
815
815
  transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
816
- transform: C(c) ? `scale(${v}) translate3d(0, ${O}px, 0)` : `scale(${v}) translate3d(${O}px, 0, 0)`
816
+ transform: C(c) ? `scale(${g}) translate3d(0, ${O}px, 0)` : `scale(${g}) translate3d(${O}px, 0, 0)`
817
817
  });
818
818
  }
819
819
  return r.useEffect(() => {
@@ -825,65 +825,65 @@ function ne({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
825
825
  ]), /* @__PURE__ */ r.createElement(Z.Root, {
826
826
  defaultOpen: Y,
827
827
  onOpenChange: (s) => {
828
- !g && !s || (s ? K(!0) : ft(!0), W(s));
828
+ !h && !s || (s ? K(!0) : ct(!0), W(s));
829
829
  },
830
830
  open: _
831
831
  }, /* @__PURE__ */ r.createElement(qt.Provider, {
832
832
  value: {
833
- activeSnapPoint: ue,
833
+ activeSnapPoint: se,
834
834
  snapPoints: o,
835
835
  setActiveSnapPoint: Lt,
836
836
  drawerRef: d,
837
- overlayRef: rt,
837
+ overlayRef: nt,
838
838
  onOpenChange: n,
839
- onPress: pe,
840
- onRelease: ge,
841
- onDrag: we,
842
- dismissible: g,
839
+ onPress: fe,
840
+ onRelease: we,
841
+ onDrag: me,
842
+ dismissible: h,
843
843
  shouldAnimate: It,
844
- handleOnly: p,
844
+ handleOnly: f,
845
845
  isOpen: _,
846
846
  isDragging: G,
847
847
  shouldFade: Bt,
848
- closeDrawer: ft,
849
- onNestedDrag: ye,
850
- onNestedOpenChange: ve,
851
- onNestedRelease: be,
852
- keyboardIsOpen: at,
848
+ closeDrawer: ct,
849
+ onNestedDrag: ge,
850
+ onNestedOpenChange: he,
851
+ onNestedRelease: ve,
852
+ keyboardIsOpen: rt,
853
853
  modal: F,
854
- snapPointsOffset: dt,
855
- activeSnapPointIndex: ot,
854
+ snapPointsOffset: ut,
855
+ activeSnapPointIndex: at,
856
856
  direction: c,
857
- shouldScaleBackground: f,
858
- setBackgroundColorOnScale: m,
857
+ shouldScaleBackground: v,
858
+ setBackgroundColorOnScale: w,
859
859
  noBodyStyles: A,
860
- container: M,
860
+ container: N,
861
861
  autoFocus: j
862
862
  }
863
863
  }, e));
864
864
  }
865
- const re = /* @__PURE__ */ r.forwardRef(function({ ...t }, n) {
866
- const { overlayRef: e, snapPoints: a, onRelease: i, shouldFade: o, isOpen: f, modal: m, shouldAnimate: R } = st(), T = Gt(n, e), g = a && a.length > 0;
867
- if (!m)
865
+ const ne = /* @__PURE__ */ r.forwardRef(function({ ...t }, n) {
866
+ const { overlayRef: e, snapPoints: a, onRelease: i, shouldFade: o, isOpen: v, modal: w, shouldAnimate: T } = pt(), R = Gt(n, e), h = a && a.length > 0;
867
+ if (!w)
868
868
  return null;
869
- const p = r.useCallback((w) => i(w), [
869
+ const f = r.useCallback((m) => i(m), [
870
870
  i
871
871
  ]);
872
872
  return /* @__PURE__ */ r.createElement(Z.Overlay, {
873
- onMouseUp: p,
874
- ref: T,
873
+ onMouseUp: f,
874
+ ref: R,
875
875
  "data-vaul-overlay": "",
876
- "data-vaul-snap-points": f && g ? "true" : "false",
877
- "data-vaul-snap-points-overlay": f && o ? "true" : "false",
878
- "data-vaul-animate": R != null && R.current ? "true" : "false",
876
+ "data-vaul-snap-points": v && h ? "true" : "false",
877
+ "data-vaul-snap-points-overlay": v && o ? "true" : "false",
878
+ "data-vaul-animate": T != null && T.current ? "true" : "false",
879
879
  ...t
880
880
  });
881
881
  });
882
- re.displayName = "Drawer.Overlay";
883
- const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, style: n, onOpenAutoFocus: e, ...a }, i) {
884
- const { drawerRef: o, onPress: f, onRelease: m, onDrag: R, keyboardIsOpen: T, snapPointsOffset: g, activeSnapPointIndex: p, modal: w, isOpen: B, direction: k, snapPoints: E, container: F, handleOnly: h, shouldAnimate: N, autoFocus: A } = st(), [c, Y] = r.useState(!1), tt = Gt(i, o), u = r.useRef(null), b = r.useRef(null), y = r.useRef(!1), I = E && E.length > 0;
885
- Ve();
886
- const M = (l, U, _ = 0) => {
882
+ ne.displayName = "Drawer.Overlay";
883
+ const re = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, style: n, onOpenAutoFocus: e, ...a }, i) {
884
+ const { drawerRef: o, onPress: v, onRelease: w, onDrag: T, keyboardIsOpen: R, snapPointsOffset: h, activeSnapPointIndex: f, modal: m, isOpen: B, direction: k, snapPoints: E, container: F, handleOnly: p, shouldAnimate: M, autoFocus: A } = pt(), [c, Y] = r.useState(!1), tt = Gt(i, o), u = r.useRef(null), b = r.useRef(null), y = r.useRef(!1), I = E && E.length > 0;
885
+ We();
886
+ const N = (l, U, _ = 0) => {
887
887
  if (y.current) return !0;
888
888
  const W = Math.abs(l.y), P = Math.abs(l.x), K = P > W, G = [
889
889
  "bottom",
@@ -902,7 +902,7 @@ const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
902
902
  });
903
903
  }, []);
904
904
  function j(l) {
905
- u.current = null, y.current = !1, m(l);
905
+ u.current = null, y.current = !1, w(l);
906
906
  }
907
907
  return /* @__PURE__ */ r.createElement(Z.Content, {
908
908
  "data-vaul-drawer-direction": k,
@@ -910,45 +910,45 @@ const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
910
910
  "data-vaul-delayed-snap-points": c ? "true" : "false",
911
911
  "data-vaul-snap-points": B && I ? "true" : "false",
912
912
  "data-vaul-custom-container": F ? "true" : "false",
913
- "data-vaul-animate": N != null && N.current ? "true" : "false",
913
+ "data-vaul-animate": M != null && M.current ? "true" : "false",
914
914
  ...a,
915
915
  ref: tt,
916
- style: g && g.length > 0 ? {
917
- "--snap-point-height": `${g[p ?? 0]}px`,
916
+ style: h && h.length > 0 ? {
917
+ "--snap-point-height": `${h[f ?? 0]}px`,
918
918
  ...n
919
919
  } : n,
920
920
  onPointerDown: (l) => {
921
- h || (a.onPointerDown == null || a.onPointerDown.call(a, l), u.current = {
921
+ p || (a.onPointerDown == null || a.onPointerDown.call(a, l), u.current = {
922
922
  x: l.pageX,
923
923
  y: l.pageY
924
- }, f(l));
924
+ }, v(l));
925
925
  },
926
926
  onOpenAutoFocus: (l) => {
927
927
  e == null || e(l), A || l.preventDefault();
928
928
  },
929
929
  onPointerDownOutside: (l) => {
930
- if (t == null || t(l), !w || l.defaultPrevented) {
930
+ if (t == null || t(l), !m || l.defaultPrevented) {
931
931
  l.preventDefault();
932
932
  return;
933
933
  }
934
- T.current && (T.current = !1);
934
+ R.current && (R.current = !1);
935
935
  },
936
936
  onFocusOutside: (l) => {
937
- if (!w) {
937
+ if (!m) {
938
938
  l.preventDefault();
939
939
  return;
940
940
  }
941
941
  },
942
942
  onPointerMove: (l) => {
943
- if (b.current = l, h || (a.onPointerMove == null || a.onPointerMove.call(a, l), !u.current)) return;
943
+ if (b.current = l, p || (a.onPointerMove == null || a.onPointerMove.call(a, l), !u.current)) return;
944
944
  const U = l.pageY - u.current.y, _ = l.pageX - u.current.x, W = l.pointerType === "touch" ? 10 : 2;
945
- M({
945
+ N({
946
946
  x: _,
947
947
  y: U
948
- }, k, W) ? R(l) : (Math.abs(_) > W || Math.abs(U) > W) && (u.current = null);
948
+ }, k, W) ? T(l) : (Math.abs(_) > W || Math.abs(U) > W) && (u.current = null);
949
949
  },
950
950
  onPointerUp: (l) => {
951
- a.onPointerUp == null || a.onPointerUp.call(a, l), u.current = null, y.current = !1, m(l);
951
+ a.onPointerUp == null || a.onPointerUp.call(a, l), u.current = null, y.current = !1, w(l);
952
952
  },
953
953
  onPointerOut: (l) => {
954
954
  a.onPointerOut == null || a.onPointerOut.call(a, l), j(b.current);
@@ -958,40 +958,40 @@ const ae = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
958
958
  }
959
959
  });
960
960
  });
961
- ae.displayName = "Drawer.Content";
962
- const qe = 250, Xe = 120, oe = /* @__PURE__ */ r.forwardRef(function({ preventCycle: t = !1, children: n, ...e }, a) {
963
- const { closeDrawer: i, isDragging: o, snapPoints: f, activeSnapPoint: m, setActiveSnapPoint: R, dismissible: T, handleOnly: g, isOpen: p, onPress: w, onDrag: B } = st(), k = r.useRef(null), E = r.useRef(!1);
961
+ re.displayName = "Drawer.Content";
962
+ const Ye = 250, qe = 120, Xe = /* @__PURE__ */ r.forwardRef(function({ preventCycle: t = !1, children: n, ...e }, a) {
963
+ const { closeDrawer: i, isDragging: o, snapPoints: v, activeSnapPoint: w, setActiveSnapPoint: T, dismissible: R, handleOnly: h, isOpen: f, onPress: m, onDrag: B } = pt(), k = r.useRef(null), E = r.useRef(!1);
964
964
  function F() {
965
965
  if (E.current) {
966
966
  A();
967
967
  return;
968
968
  }
969
969
  window.setTimeout(() => {
970
- h();
971
- }, Xe);
970
+ p();
971
+ }, qe);
972
972
  }
973
- function h() {
973
+ function p() {
974
974
  if (o || t || E.current) {
975
975
  A();
976
976
  return;
977
977
  }
978
- if (A(), !f || f.length === 0) {
979
- T || i();
978
+ if (A(), !v || v.length === 0) {
979
+ R || i();
980
980
  return;
981
981
  }
982
- if (m === f[f.length - 1] && T) {
982
+ if (w === v[v.length - 1] && R) {
983
983
  i();
984
984
  return;
985
985
  }
986
- const Y = f.findIndex((u) => u === m);
986
+ const Y = v.findIndex((u) => u === w);
987
987
  if (Y === -1) return;
988
- const tt = f[Y + 1];
989
- R(tt);
988
+ const tt = v[Y + 1];
989
+ T(tt);
990
990
  }
991
- function N() {
991
+ function M() {
992
992
  k.current = window.setTimeout(() => {
993
993
  E.current = !0;
994
- }, qe);
994
+ }, Ye);
995
995
  }
996
996
  function A() {
997
997
  k.current && window.clearTimeout(k.current), E.current = !1;
@@ -1000,14 +1000,14 @@ const qe = 250, Xe = 120, oe = /* @__PURE__ */ r.forwardRef(function({ preventCy
1000
1000
  onClick: F,
1001
1001
  onPointerCancel: A,
1002
1002
  onPointerDown: (c) => {
1003
- g && w(c), N();
1003
+ h && m(c), M();
1004
1004
  },
1005
1005
  onPointerMove: (c) => {
1006
- g && B(c);
1006
+ h && B(c);
1007
1007
  },
1008
1008
  // onPointerUp is already handled by the content component
1009
1009
  ref: a,
1010
- "data-vaul-drawer-visible": p ? "true" : "false",
1010
+ "data-vaul-drawer-visible": f ? "true" : "false",
1011
1011
  "data-vaul-handle": "",
1012
1012
  "aria-hidden": "true",
1013
1013
  ...e
@@ -1016,45 +1016,24 @@ const qe = 250, Xe = 120, oe = /* @__PURE__ */ r.forwardRef(function({ preventCy
1016
1016
  "aria-hidden": "true"
1017
1017
  }, n));
1018
1018
  });
1019
- oe.displayName = "Drawer.Handle";
1020
- function Ke({ onDrag: t, onOpenChange: n, ...e }) {
1021
- const { onNestedDrag: a, onNestedOpenChange: i, onNestedRelease: o } = st();
1022
- if (!a)
1023
- throw new Error("Drawer.NestedRoot must be placed in another drawer");
1024
- return /* @__PURE__ */ r.createElement(ne, {
1025
- nested: !0,
1026
- onClose: () => {
1027
- i(!1);
1028
- },
1029
- onDrag: (f, m) => {
1030
- a(f, m), t == null || t(f, m);
1031
- },
1032
- onOpenChange: (f) => {
1033
- f && i(f);
1034
- },
1035
- onRelease: o,
1036
- ...e
1037
- });
1038
- }
1039
- function Ge(t) {
1040
- const n = st(), { container: e = n.container, ...a } = t;
1019
+ Xe.displayName = "Drawer.Handle";
1020
+ function Ke(t) {
1021
+ const n = pt(), { container: e = n.container, ...a } = t;
1041
1022
  return /* @__PURE__ */ r.createElement(Z.Portal, {
1042
1023
  container: e,
1043
1024
  ...a
1044
1025
  });
1045
1026
  }
1046
1027
  const V = {
1047
- Root: ne,
1048
- NestedRoot: Ke,
1049
- Content: ae,
1050
- Overlay: re,
1028
+ Root: Ve,
1029
+ Content: re,
1030
+ Overlay: ne,
1051
1031
  Trigger: Z.Trigger,
1052
- Portal: Ge,
1053
- Handle: oe,
1032
+ Portal: Ke,
1054
1033
  Close: Z.Close,
1055
1034
  Title: Z.Title,
1056
1035
  Description: Z.Description
1057
- }, Je = ({
1036
+ }, Ge = ({
1058
1037
  shouldScaleBackground: t = !0,
1059
1038
  ...n
1060
1039
  }) => /* @__PURE__ */ X.jsx(
@@ -1064,24 +1043,24 @@ const V = {
1064
1043
  ...n
1065
1044
  }
1066
1045
  );
1067
- Je.displayName = "Drawer";
1068
- const ln = V.Trigger, Qe = V.Portal, un = V.Close, ie = wt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1046
+ Ge.displayName = "Drawer";
1047
+ const sn = V.Trigger, Je = V.Portal, ln = V.Close, ae = mt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1069
1048
  V.Overlay,
1070
1049
  {
1071
1050
  ref: e,
1072
- className: it("fixed inset-0 z-50 bg-black/80", t),
1051
+ className: ot("fixed inset-0 z-50 bg-black/80", t),
1073
1052
  ...n
1074
1053
  }
1075
1054
  ));
1076
- ie.displayName = V.Overlay.displayName;
1077
- const Ze = wt.forwardRef(
1078
- ({ className: t, children: n, hideBar: e = !0, ...a }, i) => /* @__PURE__ */ X.jsxs(Qe, { children: [
1079
- /* @__PURE__ */ X.jsx(ie, {}),
1055
+ ae.displayName = V.Overlay.displayName;
1056
+ const Qe = mt.forwardRef(
1057
+ ({ className: t, children: n, hideBar: e = !0, ...a }, i) => /* @__PURE__ */ X.jsxs(Je, { children: [
1058
+ /* @__PURE__ */ X.jsx(ae, {}),
1080
1059
  /* @__PURE__ */ X.jsxs(
1081
1060
  V.Content,
1082
1061
  {
1083
1062
  ref: i,
1084
- className: it(
1063
+ className: ot(
1085
1064
  "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
1086
1065
  t
1087
1066
  ),
@@ -1094,60 +1073,60 @@ const Ze = wt.forwardRef(
1094
1073
  )
1095
1074
  ] })
1096
1075
  );
1097
- Ze.displayName = "DrawerContent";
1098
- const tn = ({
1076
+ Qe.displayName = "DrawerContent";
1077
+ const Ze = ({
1099
1078
  className: t,
1100
1079
  ...n
1101
1080
  }) => /* @__PURE__ */ X.jsx(
1102
1081
  "div",
1103
1082
  {
1104
- className: it("grid gap-1.5 p-4 text-center sm:text-left", t),
1083
+ className: ot("grid gap-1.5 p-4 text-center sm:text-left", t),
1105
1084
  ...n
1106
1085
  }
1107
1086
  );
1108
- tn.displayName = "DrawerHeader";
1109
- const en = ({
1087
+ Ze.displayName = "DrawerHeader";
1088
+ const tn = ({
1110
1089
  className: t,
1111
1090
  ...n
1112
1091
  }) => /* @__PURE__ */ X.jsx(
1113
1092
  "div",
1114
1093
  {
1115
- className: it("mt-auto flex flex-col gap-2 p-4", t),
1094
+ className: ot("mt-auto flex flex-col gap-2 p-4", t),
1116
1095
  ...n
1117
1096
  }
1118
1097
  );
1119
- en.displayName = "DrawerFooter";
1120
- const nn = wt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1098
+ tn.displayName = "DrawerFooter";
1099
+ const en = mt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1121
1100
  V.Title,
1122
1101
  {
1123
1102
  ref: e,
1124
- className: it(
1103
+ className: ot(
1125
1104
  "text-lg font-semibold leading-none tracking-tight",
1126
1105
  t
1127
1106
  ),
1128
1107
  ...n
1129
1108
  }
1130
1109
  ));
1131
- nn.displayName = V.Title.displayName;
1132
- const rn = wt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1110
+ en.displayName = V.Title.displayName;
1111
+ const nn = mt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
1133
1112
  V.Description,
1134
1113
  {
1135
1114
  ref: e,
1136
- className: it("text-sm text-muted-foreground", t),
1115
+ className: ot("text-sm text-muted-foreground", t),
1137
1116
  ...n
1138
1117
  }
1139
1118
  ));
1140
- rn.displayName = V.Description.displayName;
1119
+ nn.displayName = V.Description.displayName;
1141
1120
  export {
1142
- Je as Drawer,
1143
- un as DrawerClose,
1144
- Ze as DrawerContent,
1145
- rn as DrawerDescription,
1146
- en as DrawerFooter,
1147
- tn as DrawerHeader,
1148
- ie as DrawerOverlay,
1149
- Qe as DrawerPortal,
1150
- nn as DrawerTitle,
1151
- ln as DrawerTrigger
1121
+ Ge as Drawer,
1122
+ ln as DrawerClose,
1123
+ Qe as DrawerContent,
1124
+ nn as DrawerDescription,
1125
+ tn as DrawerFooter,
1126
+ Ze as DrawerHeader,
1127
+ ae as DrawerOverlay,
1128
+ Je as DrawerPortal,
1129
+ en as DrawerTitle,
1130
+ sn as DrawerTrigger
1152
1131
  };
1153
1132
  //# sourceMappingURL=Drawer.js.map