zudoku 0.0.0-fdf886de → 0.0.0-fe92c9e1

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 (1220) hide show
  1. package/README.md +32 -12
  2. package/cli.js +1 -0
  3. package/client.d.ts +8 -0
  4. package/dist/app/ZuploBuildConfig.d.ts +1 -1
  5. package/dist/app/ZuploBuildConfig.js +1 -1
  6. package/dist/app/ZuploBuildConfig.js.map +1 -1
  7. package/dist/app/entry.client.js +5 -4
  8. package/dist/app/entry.client.js.map +1 -1
  9. package/dist/app/entry.server.js +16 -3
  10. package/dist/app/entry.server.js.map +1 -1
  11. package/dist/app/env.js +6 -6
  12. package/dist/app/env.js.map +1 -1
  13. package/dist/app/main.d.ts +91 -1
  14. package/dist/app/main.js +5 -1
  15. package/dist/app/main.js.map +1 -1
  16. package/dist/app/standalone.js +4 -1
  17. package/dist/app/standalone.js.map +1 -1
  18. package/dist/cli/cli.d.ts +9 -0
  19. package/dist/cli/cli.js +5 -10
  20. package/dist/cli/cli.js.map +1 -1
  21. package/dist/cli/cmds/build.d.ts +1 -1
  22. package/dist/cli/cmds/dev.d.ts +1 -1
  23. package/dist/cli/cmds/preview.d.ts +1 -1
  24. package/dist/cli/common/analytics/lib.js +1 -1
  25. package/dist/cli/common/analytics/lib.js.map +1 -1
  26. package/dist/cli/common/logger.js +0 -1
  27. package/dist/cli/common/logger.js.map +1 -1
  28. package/dist/cli/common/machine-id/lib.js +3 -2
  29. package/dist/cli/common/machine-id/lib.js.map +1 -1
  30. package/dist/cli/common/outdated.js +2 -1
  31. package/dist/cli/common/outdated.js.map +1 -1
  32. package/dist/cli/common/output.js +2 -3
  33. package/dist/cli/common/output.js.map +1 -1
  34. package/dist/cli/common/utils/box.js +2 -2
  35. package/dist/cli/common/utils/box.js.map +1 -1
  36. package/dist/cli/common/validators/lib.js +1 -1
  37. package/dist/cli/common/validators/lib.js.map +1 -1
  38. package/dist/cli/common/version-check.d.ts +2 -0
  39. package/dist/cli/common/version-check.js +58 -0
  40. package/dist/cli/common/version-check.js.map +1 -0
  41. package/dist/cli/dev/handler.js +0 -4
  42. package/dist/cli/dev/handler.js.map +1 -1
  43. package/dist/codegen.js +2 -2
  44. package/dist/codegen.js.map +1 -1
  45. package/dist/config/config.d.ts +15 -41
  46. package/dist/config/loader.js.map +1 -1
  47. package/dist/config/validators/BuildSchema.d.ts +16 -8
  48. package/dist/config/validators/BuildSchema.js +22 -5
  49. package/dist/config/validators/BuildSchema.js.map +1 -1
  50. package/dist/config/validators/InputNavigationSchema.d.ts +260 -78
  51. package/dist/config/validators/InputNavigationSchema.js +5 -2
  52. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  53. package/dist/config/validators/InputNavigationSchema.test-d.js +2 -1
  54. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
  55. package/dist/config/validators/NavigationSchema.d.ts +1 -1
  56. package/dist/config/validators/NavigationSchema.js +2 -2
  57. package/dist/config/validators/NavigationSchema.js.map +1 -1
  58. package/dist/config/validators/ProtectedRoutesSchema.d.ts +2 -2
  59. package/dist/config/validators/ProtectedRoutesSchema.js +1 -1
  60. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
  61. package/dist/config/validators/auth.d.ts +2 -2
  62. package/dist/config/validators/auth.js +1 -1
  63. package/dist/config/validators/auth.js.map +1 -1
  64. package/dist/config/validators/icon-types.d.ts +1 -1
  65. package/dist/config/validators/icon-types.js +43 -0
  66. package/dist/config/validators/icon-types.js.map +1 -1
  67. package/dist/config/validators/validate.d.ts +202 -20
  68. package/dist/config/validators/validate.js +70 -11
  69. package/dist/config/validators/validate.js.map +1 -1
  70. package/dist/config/validators/validate.test.js +1 -2
  71. package/dist/config/validators/validate.test.js.map +1 -1
  72. package/dist/flat-config.d.ts +52 -3
  73. package/dist/index.d.ts +5 -5
  74. package/dist/index.js +2 -2
  75. package/dist/index.js.map +1 -1
  76. package/dist/lib/MissingIcon.d.ts +1 -1
  77. package/dist/lib/MissingIcon.js.map +1 -1
  78. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  79. package/dist/lib/assets/language-icons/c.js +4 -0
  80. package/dist/lib/assets/language-icons/c.js.map +1 -0
  81. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  82. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  83. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  84. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  85. package/dist/lib/assets/language-icons/cpp.js +4 -0
  86. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  87. package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
  88. package/dist/lib/assets/language-icons/csharp.js +4 -0
  89. package/dist/lib/assets/language-icons/csharp.js.map +1 -0
  90. package/dist/lib/assets/language-icons/css.d.ts +3 -0
  91. package/dist/lib/assets/language-icons/css.js +4 -0
  92. package/dist/lib/assets/language-icons/css.js.map +1 -0
  93. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  94. package/dist/lib/assets/language-icons/dart.js +4 -0
  95. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  96. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  97. package/dist/lib/assets/language-icons/elixir.js +4 -0
  98. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  99. package/dist/lib/assets/language-icons/go.d.ts +3 -0
  100. package/dist/lib/assets/language-icons/go.js +4 -0
  101. package/dist/lib/assets/language-icons/go.js.map +1 -0
  102. package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
  103. package/dist/lib/assets/language-icons/graphql.js +4 -0
  104. package/dist/lib/assets/language-icons/graphql.js.map +1 -0
  105. package/dist/lib/assets/language-icons/html.d.ts +3 -0
  106. package/dist/lib/assets/language-icons/html.js +4 -0
  107. package/dist/lib/assets/language-icons/html.js.map +1 -0
  108. package/dist/lib/assets/language-icons/java.d.ts +3 -0
  109. package/dist/lib/assets/language-icons/java.js +4 -0
  110. package/dist/lib/assets/language-icons/java.js.map +1 -0
  111. package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
  112. package/dist/lib/assets/language-icons/javascript.js +4 -0
  113. package/dist/lib/assets/language-icons/javascript.js.map +1 -0
  114. package/dist/lib/assets/language-icons/json.d.ts +3 -0
  115. package/dist/lib/assets/language-icons/json.js +4 -0
  116. package/dist/lib/assets/language-icons/json.js.map +1 -0
  117. package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
  118. package/dist/lib/assets/language-icons/kotlin.js +4 -0
  119. package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
  120. package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
  121. package/dist/lib/assets/language-icons/markdown.js +4 -0
  122. package/dist/lib/assets/language-icons/markdown.js.map +1 -0
  123. package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
  124. package/dist/lib/assets/language-icons/mdx.js +4 -0
  125. package/dist/lib/assets/language-icons/mdx.js.map +1 -0
  126. package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
  127. package/dist/lib/assets/language-icons/objectivec.js +4 -0
  128. package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
  129. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  130. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  131. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  132. package/dist/lib/assets/language-icons/php.d.ts +3 -0
  133. package/dist/lib/assets/language-icons/php.js +4 -0
  134. package/dist/lib/assets/language-icons/php.js.map +1 -0
  135. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  136. package/dist/lib/assets/language-icons/powershell.js +4 -0
  137. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  138. package/dist/lib/assets/language-icons/python.d.ts +3 -0
  139. package/dist/lib/assets/language-icons/python.js +4 -0
  140. package/dist/lib/assets/language-icons/python.js.map +1 -0
  141. package/dist/lib/assets/language-icons/react.d.ts +3 -0
  142. package/dist/lib/assets/language-icons/react.js +4 -0
  143. package/dist/lib/assets/language-icons/react.js.map +1 -0
  144. package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
  145. package/dist/lib/assets/language-icons/ruby.js +4 -0
  146. package/dist/lib/assets/language-icons/ruby.js.map +1 -0
  147. package/dist/lib/assets/language-icons/rust.d.ts +3 -0
  148. package/dist/lib/assets/language-icons/rust.js +4 -0
  149. package/dist/lib/assets/language-icons/rust.js.map +1 -0
  150. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  151. package/dist/lib/assets/language-icons/scala.js +4 -0
  152. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  153. package/dist/lib/assets/language-icons/shell.d.ts +3 -0
  154. package/dist/lib/assets/language-icons/shell.js +4 -0
  155. package/dist/lib/assets/language-icons/shell.js.map +1 -0
  156. package/dist/lib/assets/language-icons/swift.d.ts +3 -0
  157. package/dist/lib/assets/language-icons/swift.js +4 -0
  158. package/dist/lib/assets/language-icons/swift.js.map +1 -0
  159. package/dist/lib/assets/language-icons/toml.d.ts +3 -0
  160. package/dist/lib/assets/language-icons/toml.js +4 -0
  161. package/dist/lib/assets/language-icons/toml.js.map +1 -0
  162. package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
  163. package/dist/lib/assets/language-icons/typescript.js +4 -0
  164. package/dist/lib/assets/language-icons/typescript.js.map +1 -0
  165. package/dist/lib/assets/language-icons/xml.d.ts +3 -0
  166. package/dist/lib/assets/language-icons/xml.js +4 -0
  167. package/dist/lib/assets/language-icons/xml.js.map +1 -0
  168. package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
  169. package/dist/lib/assets/language-icons/yaml.js +4 -0
  170. package/dist/lib/assets/language-icons/yaml.js.map +1 -0
  171. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  172. package/dist/lib/assets/language-icons/zig.js +4 -0
  173. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  174. package/dist/lib/auth/issuer.js +3 -0
  175. package/dist/lib/auth/issuer.js.map +1 -1
  176. package/dist/lib/auth/issuer.test.js +1 -0
  177. package/dist/lib/auth/issuer.test.js.map +1 -1
  178. package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
  179. package/dist/lib/authentication/authentication.d.ts +19 -13
  180. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +1 -1
  181. package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
  182. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
  183. package/dist/lib/authentication/components/SignIn.js +6 -5
  184. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  185. package/dist/lib/authentication/components/SignOut.js +6 -6
  186. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  187. package/dist/lib/authentication/components/SignUp.js +5 -5
  188. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  189. package/dist/lib/authentication/hook.d.ts +3 -2
  190. package/dist/lib/authentication/hook.js +12 -8
  191. package/dist/lib/authentication/hook.js.map +1 -1
  192. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  193. package/dist/lib/authentication/providers/auth0.js +9 -5
  194. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  195. package/dist/lib/authentication/providers/azureb2c.d.ts +5 -5
  196. package/dist/lib/authentication/providers/azureb2c.js +3 -3
  197. package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
  198. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  199. package/dist/lib/authentication/providers/clerk.js +2 -2
  200. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  201. package/dist/lib/authentication/providers/firebase.d.ts +4 -0
  202. package/dist/lib/authentication/providers/firebase.js +215 -0
  203. package/dist/lib/authentication/providers/firebase.js.map +1 -0
  204. package/dist/lib/authentication/providers/openid.d.ts +8 -8
  205. package/dist/lib/authentication/providers/openid.js +5 -3
  206. package/dist/lib/authentication/providers/openid.js.map +1 -1
  207. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
  208. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
  209. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
  210. package/dist/lib/authentication/providers/supabase.d.ts +2 -2
  211. package/dist/lib/authentication/providers/supabase.js +30 -30
  212. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  213. package/dist/lib/authentication/state.d.ts +5 -7
  214. package/dist/lib/authentication/state.js +2 -14
  215. package/dist/lib/authentication/state.js.map +1 -1
  216. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
  217. package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
  218. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
  219. package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
  220. package/dist/lib/authentication/ui/icons/Apple.js +4 -0
  221. package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
  222. package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
  223. package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
  224. package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
  225. package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
  226. package/dist/lib/authentication/ui/icons/Github.js +4 -0
  227. package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
  228. package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
  229. package/dist/lib/authentication/ui/icons/Google.js +4 -0
  230. package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
  231. package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
  232. package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
  233. package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
  234. package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
  235. package/dist/lib/authentication/ui/icons/X.js +4 -0
  236. package/dist/lib/authentication/ui/icons/X.js.map +1 -0
  237. package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
  238. package/dist/lib/authentication/use-broadcast/shared.js +3 -3
  239. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
  240. package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
  241. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
  242. package/dist/lib/components/Autocomplete.d.ts +3 -1
  243. package/dist/lib/components/Autocomplete.js +6 -2
  244. package/dist/lib/components/Autocomplete.js.map +1 -1
  245. package/dist/lib/components/Bootstrap.js.map +1 -1
  246. package/dist/lib/components/BuildCheck.js +4 -3
  247. package/dist/lib/components/BuildCheck.js.map +1 -1
  248. package/dist/lib/components/Header.js +1 -3
  249. package/dist/lib/components/Header.js.map +1 -1
  250. package/dist/lib/components/Heading.d.ts +2 -2
  251. package/dist/lib/components/Heading.js +2 -6
  252. package/dist/lib/components/Heading.js.map +1 -1
  253. package/dist/lib/components/LanguageIcon.d.ts +3 -0
  254. package/dist/lib/components/LanguageIcon.js +163 -0
  255. package/dist/lib/components/LanguageIcon.js.map +1 -0
  256. package/dist/lib/components/Layout.js.map +1 -1
  257. package/dist/lib/components/Main.js +1 -1
  258. package/dist/lib/components/Main.js.map +1 -1
  259. package/dist/lib/components/Markdown.js +2 -2
  260. package/dist/lib/components/Markdown.js.map +1 -1
  261. package/dist/lib/components/Meta.js +1 -1
  262. package/dist/lib/components/Meta.js.map +1 -1
  263. package/dist/lib/components/MobileTopNavigation.js +4 -4
  264. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  265. package/dist/lib/components/PathRenderer.js +1 -1
  266. package/dist/lib/components/PathRenderer.js.map +1 -1
  267. package/dist/lib/components/Search.js +1 -1
  268. package/dist/lib/components/Search.js.map +1 -1
  269. package/dist/lib/components/Slot.js.map +1 -1
  270. package/dist/lib/components/Slot.test.js +7 -3
  271. package/dist/lib/components/Slot.test.js.map +1 -1
  272. package/dist/lib/components/TopNavigation.d.ts +1 -1
  273. package/dist/lib/components/TopNavigation.js +2 -2
  274. package/dist/lib/components/TopNavigation.js.map +1 -1
  275. package/dist/lib/components/Zudoku.js +5 -5
  276. package/dist/lib/components/Zudoku.js.map +1 -1
  277. package/dist/lib/components/cache.d.ts +3 -1
  278. package/dist/lib/components/cache.js +3 -5
  279. package/dist/lib/components/cache.js.map +1 -1
  280. package/dist/lib/components/context/ComponentsContext.js.map +1 -1
  281. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
  282. package/dist/lib/components/context/SlotProvider.js.map +1 -1
  283. package/dist/lib/components/context/ViewportAnchorContext.js +1 -1
  284. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  285. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  286. package/dist/lib/components/context/ZudokuContext.js +10 -2
  287. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  288. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  289. package/dist/lib/components/index.d.ts +14 -4
  290. package/dist/lib/components/index.js +3 -1
  291. package/dist/lib/components/index.js.map +1 -1
  292. package/dist/lib/components/navigation/NavigationCategory.js +6 -1
  293. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  294. package/dist/lib/components/navigation/NavigationItem.js +3 -3
  295. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  296. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  297. package/dist/lib/components/navigation/Toc.js +1 -1
  298. package/dist/lib/components/navigation/Toc.js.map +1 -1
  299. package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
  300. package/dist/lib/components/navigation/utils.d.ts +3 -3
  301. package/dist/lib/components/navigation/utils.js +1 -2
  302. package/dist/lib/components/navigation/utils.js.map +1 -1
  303. package/dist/lib/core/RouteGuard.d.ts +1 -1
  304. package/dist/lib/core/RouteGuard.js +12 -20
  305. package/dist/lib/core/RouteGuard.js.map +1 -1
  306. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  307. package/dist/lib/core/ZudokuContext.js +3 -0
  308. package/dist/lib/core/ZudokuContext.js.map +1 -1
  309. package/dist/lib/core/__internal.d.ts +1 -1
  310. package/dist/lib/errors/ErrorAlert.js +1 -2
  311. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  312. package/dist/lib/errors/RouterError.d.ts +3 -1
  313. package/dist/lib/errors/RouterError.js +3 -2
  314. package/dist/lib/errors/RouterError.js.map +1 -1
  315. package/dist/lib/errors/TopLevelError.d.ts +2 -2
  316. package/dist/lib/errors/TopLevelError.js +1 -2
  317. package/dist/lib/errors/TopLevelError.js.map +1 -1
  318. package/dist/lib/hooks/index.d.ts +3 -3
  319. package/dist/lib/oas/graphql/circular.js +2 -2
  320. package/dist/lib/oas/graphql/circular.js.map +1 -1
  321. package/dist/lib/oas/graphql/index.js +39 -3
  322. package/dist/lib/oas/graphql/index.js.map +1 -1
  323. package/dist/lib/oas/parser/dereference/index.js +2 -1
  324. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  325. package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
  326. package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
  327. package/dist/lib/oas/parser/index.js +8 -4
  328. package/dist/lib/oas/parser/index.js.map +1 -1
  329. package/dist/lib/oas/parser/upgrade/index.js +2 -1
  330. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  331. package/dist/lib/plugins/api-catalog/Catalog.js +7 -1
  332. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  333. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
  334. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
  335. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
  336. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
  337. package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
  338. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  339. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  340. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +10 -16
  341. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  342. package/dist/lib/plugins/api-keys/index.d.ts +3 -3
  343. package/dist/lib/plugins/api-keys/index.js +1 -1
  344. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  345. package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
  346. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  347. package/dist/lib/plugins/markdown/MdxPage.js +32 -8
  348. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  349. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  350. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  351. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  352. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  353. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  354. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  355. package/dist/lib/plugins/markdown/index.d.ts +4 -2
  356. package/dist/lib/plugins/markdown/index.js +1 -1
  357. package/dist/lib/plugins/markdown/index.js.map +1 -1
  358. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
  359. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  360. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  361. package/dist/lib/plugins/openapi/ColorizedParam.js +4 -1
  362. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  363. package/dist/lib/plugins/openapi/Endpoint.js +2 -2
  364. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  365. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
  366. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
  367. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
  368. package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
  369. package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
  370. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
  371. package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
  372. package/dist/lib/plugins/openapi/OasProvider.js +1 -0
  373. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  374. package/dist/lib/plugins/openapi/OperationList.d.ts +0 -2
  375. package/dist/lib/plugins/openapi/OperationList.js +31 -8
  376. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  377. package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -3
  378. package/dist/lib/plugins/openapi/OperationListItem.js +12 -5
  379. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  380. package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
  381. package/dist/lib/plugins/openapi/ParamInfos.js +11 -9
  382. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  383. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
  384. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  385. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  386. package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
  387. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  388. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  389. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
  390. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -5
  391. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  392. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +11 -4
  393. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
  394. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  395. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -1
  396. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +14 -2
  397. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  398. package/dist/lib/plugins/openapi/Sidecar.d.ts +5 -3
  399. package/dist/lib/plugins/openapi/Sidecar.js +54 -30
  400. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  401. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +11 -6
  402. package/dist/lib/plugins/openapi/SidecarExamples.js +15 -33
  403. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  404. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
  405. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
  406. package/dist/lib/plugins/openapi/client/createServer.js +1 -2
  407. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  408. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  409. package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
  410. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
  411. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
  412. package/dist/lib/plugins/openapi/components/ResponseContent.js +1 -1
  413. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  414. package/dist/lib/plugins/openapi/context.d.ts +1 -1
  415. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
  416. package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
  417. package/dist/lib/plugins/openapi/graphql/gql.js +2 -2
  418. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  419. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +11 -2
  420. package/dist/lib/plugins/openapi/graphql/graphql.js +11 -0
  421. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  422. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  423. package/dist/lib/plugins/openapi/index.js +7 -11
  424. package/dist/lib/plugins/openapi/index.js.map +1 -1
  425. package/dist/lib/plugins/openapi/interfaces.d.ts +18 -4
  426. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
  427. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  428. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  429. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  430. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  431. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
  432. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  433. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  434. package/dist/lib/plugins/openapi/playground/Headers.d.ts +1 -1
  435. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  436. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  437. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
  438. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
  439. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
  440. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  441. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  442. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  443. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  444. package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -2
  445. package/dist/lib/plugins/openapi/playground/Playground.js +70 -32
  446. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  447. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
  448. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  449. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  450. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  451. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  452. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
  453. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
  454. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
  455. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
  456. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  457. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  458. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  459. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  460. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  461. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  462. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  463. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  464. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  465. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  466. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  467. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
  468. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +4 -2
  469. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
  470. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -19
  471. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  472. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  473. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
  474. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  475. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
  476. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
  477. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
  478. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
  479. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
  480. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
  481. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
  482. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
  483. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
  484. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
  485. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
  486. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
  487. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
  488. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +6 -15
  489. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  490. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
  491. package/dist/lib/plugins/openapi/schema/SchemaView.js +12 -11
  492. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  493. package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
  494. package/dist/lib/plugins/openapi/schema/UnionView.js +36 -0
  495. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
  496. package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
  497. package/dist/lib/plugins/openapi/schema/union-helpers.js +71 -0
  498. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
  499. package/dist/lib/plugins/openapi/schema/utils.d.ts +0 -7
  500. package/dist/lib/plugins/openapi/schema/utils.js +0 -6
  501. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  502. package/dist/lib/plugins/openapi/state.d.ts +5 -3
  503. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +1 -1
  504. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +1 -1
  505. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  506. package/dist/lib/plugins/openapi/util/createNavigationCategory.js +1 -0
  507. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -1
  508. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  509. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +10 -13
  510. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  511. package/dist/lib/plugins/openapi/util/getRoutes.js +1 -1
  512. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  513. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
  514. package/dist/lib/plugins/search-inkeep/index.js +1 -1
  515. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  516. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  517. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  518. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  519. package/dist/lib/plugins/search-pagefind/ResultList.js +4 -1
  520. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  521. package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
  522. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  523. package/dist/lib/shiki.d.ts +3 -6
  524. package/dist/lib/shiki.js +29 -8
  525. package/dist/lib/shiki.js.map +1 -1
  526. package/dist/lib/ui/Breadcrumb.js +1 -1
  527. package/dist/lib/ui/Breadcrumb.js.map +1 -1
  528. package/dist/lib/ui/Button.d.ts +1 -1
  529. package/dist/lib/ui/Button.js +1 -0
  530. package/dist/lib/ui/Button.js.map +1 -1
  531. package/dist/lib/ui/Callout.d.ts +5 -5
  532. package/dist/lib/ui/Callout.js +5 -5
  533. package/dist/lib/ui/Callout.js.map +1 -1
  534. package/dist/lib/ui/Checkbox.d.ts +2 -2
  535. package/dist/lib/ui/Checkbox.js +4 -4
  536. package/dist/lib/ui/Checkbox.js.map +1 -1
  537. package/dist/lib/ui/CodeBlock.d.ts +1 -2
  538. package/dist/lib/ui/CodeBlock.js +3 -28
  539. package/dist/lib/ui/CodeBlock.js.map +1 -1
  540. package/dist/lib/ui/Command.d.ts +5 -5
  541. package/dist/lib/ui/Command.js +2 -6
  542. package/dist/lib/ui/Command.js.map +1 -1
  543. package/dist/lib/ui/Dialog.d.ts +12 -18
  544. package/dist/lib/ui/Dialog.js +30 -17
  545. package/dist/lib/ui/Dialog.js.map +1 -1
  546. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -2
  547. package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
  548. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  549. package/dist/lib/ui/Form.d.ts +2 -2
  550. package/dist/lib/ui/Pagination.d.ts +1 -1
  551. package/dist/lib/ui/Pagination.js +1 -1
  552. package/dist/lib/ui/Pagination.js.map +1 -1
  553. package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
  554. package/dist/lib/ui/ReactComponentDoc.js +10 -0
  555. package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
  556. package/dist/lib/ui/Secret.d.ts +18 -0
  557. package/dist/lib/ui/Secret.js +26 -0
  558. package/dist/lib/ui/Secret.js.map +1 -0
  559. package/dist/lib/ui/Separator.d.ts +4 -0
  560. package/dist/lib/ui/Separator.js +8 -0
  561. package/dist/lib/ui/Separator.js.map +1 -0
  562. package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
  563. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  564. package/dist/lib/ui/ToggleGroup.d.ts +1 -1
  565. package/dist/lib/ui/Tooltip.d.ts +7 -7
  566. package/dist/lib/ui/Tooltip.js +16 -10
  567. package/dist/lib/ui/Tooltip.js.map +1 -1
  568. package/dist/lib/ui/Value.d.ts +5 -0
  569. package/dist/lib/ui/Value.js +13 -0
  570. package/dist/lib/ui/Value.js.map +1 -0
  571. package/dist/lib/util/MdxComponents.d.ts +3 -2
  572. package/dist/lib/util/MdxComponents.js +7 -4
  573. package/dist/lib/util/MdxComponents.js.map +1 -1
  574. package/dist/lib/util/cn.js.map +1 -1
  575. package/dist/lib/util/createVariantComponent.d.ts +7 -4
  576. package/dist/lib/util/createVariantComponent.js +5 -2
  577. package/dist/lib/util/createVariantComponent.js.map +1 -1
  578. package/dist/lib/util/flattenAllOf.d.ts +4 -0
  579. package/dist/lib/util/flattenAllOf.js +65 -0
  580. package/dist/lib/util/flattenAllOf.js.map +1 -0
  581. package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
  582. package/dist/lib/util/flattenAllOf.test.js +532 -0
  583. package/dist/lib/util/flattenAllOf.test.js.map +1 -0
  584. package/dist/lib/util/groupBy.js +1 -0
  585. package/dist/lib/util/groupBy.js.map +1 -1
  586. package/dist/lib/util/humanFileSize.js +1 -1
  587. package/dist/lib/util/humanFileSize.js.map +1 -1
  588. package/dist/lib/util/invariant.js +3 -1
  589. package/dist/lib/util/invariant.js.map +1 -1
  590. package/dist/lib/util/pastellize.js +4 -4
  591. package/dist/lib/util/pastellize.js.map +1 -1
  592. package/dist/lib/util/syncZustandState.d.ts +5 -0
  593. package/dist/lib/util/syncZustandState.js +14 -0
  594. package/dist/lib/util/syncZustandState.js.map +1 -0
  595. package/dist/lib/util/traverse.d.ts +1 -0
  596. package/dist/lib/util/traverse.js +25 -0
  597. package/dist/lib/util/traverse.js.map +1 -1
  598. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
  599. package/dist/lib/util/useScrollToAnchor.js +2 -0
  600. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  601. package/dist/ts.js +3 -3
  602. package/dist/ts.js.map +1 -1
  603. package/dist/vite/api/SchemaManager.d.ts +3 -1
  604. package/dist/vite/api/SchemaManager.js +43 -32
  605. package/dist/vite/api/SchemaManager.js.map +1 -1
  606. package/dist/vite/api/SchemaManager.test.js +2 -2
  607. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  608. package/dist/vite/api/schema-codegen.js +60 -42
  609. package/dist/vite/api/schema-codegen.js.map +1 -1
  610. package/dist/vite/api/schema-codegen.test.js +76 -3
  611. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  612. package/dist/vite/build.js +1 -1
  613. package/dist/vite/build.js.map +1 -1
  614. package/dist/vite/dev-server.js +2 -2
  615. package/dist/vite/dev-server.js.map +1 -1
  616. package/dist/vite/error-handler.d.ts +2 -2
  617. package/dist/vite/error-handler.js.map +1 -1
  618. package/dist/vite/llms.d.ts +12 -0
  619. package/dist/vite/llms.js +66 -0
  620. package/dist/vite/llms.js.map +1 -0
  621. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  622. package/dist/vite/mdx/remark-last-modified.js +57 -4
  623. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  624. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  625. package/dist/vite/mdx/remark-static-generation.js +1 -1
  626. package/dist/vite/mdx/remark-static-generation.js.map +1 -1
  627. package/dist/vite/output.d.ts +1 -1
  628. package/dist/vite/output.js +1 -1
  629. package/dist/vite/output.js.map +1 -1
  630. package/dist/vite/plugin-api-keys.d.ts +1 -1
  631. package/dist/vite/plugin-api-keys.js +1 -1
  632. package/dist/vite/plugin-api-keys.js.map +1 -1
  633. package/dist/vite/plugin-api.js +22 -21
  634. package/dist/vite/plugin-api.js.map +1 -1
  635. package/dist/vite/plugin-auth.d.ts +1 -1
  636. package/dist/vite/plugin-auth.js +1 -1
  637. package/dist/vite/plugin-auth.js.map +1 -1
  638. package/dist/vite/plugin-component.d.ts +1 -1
  639. package/dist/vite/plugin-config-reload.d.ts +1 -1
  640. package/dist/vite/plugin-custom-pages.d.ts +1 -1
  641. package/dist/vite/plugin-custom-pages.js +1 -1
  642. package/dist/vite/plugin-custom-pages.js.map +1 -1
  643. package/dist/vite/plugin-docs.d.ts +9 -0
  644. package/dist/vite/plugin-docs.js +70 -47
  645. package/dist/vite/plugin-docs.js.map +1 -1
  646. package/dist/vite/plugin-frontmatter.js +1 -1
  647. package/dist/vite/plugin-frontmatter.js.map +1 -1
  648. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  649. package/dist/vite/plugin-markdown-export.js +141 -0
  650. package/dist/vite/plugin-markdown-export.js.map +1 -0
  651. package/dist/vite/plugin-mdx.d.ts +2 -2
  652. package/dist/vite/plugin-mdx.js +44 -34
  653. package/dist/vite/plugin-mdx.js.map +1 -1
  654. package/dist/vite/plugin-metadata.d.ts +1 -1
  655. package/dist/vite/plugin-navigation.d.ts +2 -2
  656. package/dist/vite/plugin-navigation.js +38 -35
  657. package/dist/vite/plugin-navigation.js.map +1 -1
  658. package/dist/vite/plugin-redirect.d.ts +1 -1
  659. package/dist/vite/plugin-redirect.js +1 -1
  660. package/dist/vite/plugin-redirect.js.map +1 -1
  661. package/dist/vite/plugin-search.d.ts +1 -1
  662. package/dist/vite/plugin-search.js +1 -1
  663. package/dist/vite/plugin-search.js.map +1 -1
  664. package/dist/vite/plugin-shiki-register.js +1 -1
  665. package/dist/vite/plugin-shiki-register.js.map +1 -1
  666. package/dist/vite/plugin-theme.js +16 -7
  667. package/dist/vite/plugin-theme.js.map +1 -1
  668. package/dist/vite/plugin-theme.test.js +2 -0
  669. package/dist/vite/plugin-theme.test.js.map +1 -1
  670. package/dist/vite/plugin.d.ts +1 -1
  671. package/dist/vite/plugin.js +4 -2
  672. package/dist/vite/plugin.js.map +1 -1
  673. package/dist/vite/prerender/FileWritingResponse.js +5 -3
  674. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  675. package/dist/vite/prerender/InMemoryResponse.js +3 -1
  676. package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
  677. package/dist/vite/prerender/prerender.js +38 -5
  678. package/dist/vite/prerender/prerender.js.map +1 -1
  679. package/dist/vite/prerender/worker.d.ts +1 -1
  680. package/dist/vite/prerender/worker.js.map +1 -1
  681. package/dist/vite/reporter.js +2 -2
  682. package/dist/vite/reporter.js.map +1 -1
  683. package/dist/vite/shadcn-registry.d.ts +8 -33
  684. package/dist/vite/sitemap.js +4 -4
  685. package/dist/vite/sitemap.js.map +1 -1
  686. package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
  687. package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
  688. package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
  689. package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
  690. package/dist/zuplo/enrich-with-zuplo.js +4 -4
  691. package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
  692. package/dist/zuplo/policy-types.js +0 -1
  693. package/dist/zuplo/policy-types.js.map +1 -1
  694. package/dist/zuplo/with-zuplo-processors.js +2 -0
  695. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  696. package/dist/zuplo/with-zuplo.js +1 -1
  697. package/dist/zuplo/with-zuplo.js.map +1 -1
  698. package/lib/{Button-B3o-2Xdf.js → Button-B3ucvvQw.js} +7 -6
  699. package/lib/Button-B3ucvvQw.js.map +1 -0
  700. package/lib/{Card-CMDQUPM4.js → Card-KFniaZn5.js} +2 -2
  701. package/lib/{Card-CMDQUPM4.js.map → Card-KFniaZn5.js.map} +1 -1
  702. package/lib/{CategoryHeading-DCpZu3yG.js → CategoryHeading-DhmodDcq.js} +2 -2
  703. package/lib/{CategoryHeading-DCpZu3yG.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
  704. package/lib/{Command-CDn17s8X.js → Command-CUcrW3qs.js} +22 -28
  705. package/lib/Command-CUcrW3qs.js.map +1 -0
  706. package/lib/Dialog-BQciPiHN.js +144 -0
  707. package/lib/Dialog-BQciPiHN.js.map +1 -0
  708. package/lib/{Drawer-DJ05s2pH.js → Drawer-Ci7XwhqT.js} +2 -2
  709. package/lib/{Drawer-DJ05s2pH.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
  710. package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
  711. package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
  712. package/lib/{Slot-DOtTvoyj.js → ErrorAlert-B4eXGBQj.js} +2413 -2431
  713. package/lib/ErrorAlert-B4eXGBQj.js.map +1 -0
  714. package/lib/MdxPage-BSxjb_Mb.js +240 -0
  715. package/lib/MdxPage-BSxjb_Mb.js.map +1 -0
  716. package/lib/{OAuthErrorPage-Jv3r8wnL.js → OAuthErrorPage-YbraVLZt.js} +9 -9
  717. package/lib/OAuthErrorPage-YbraVLZt.js.map +1 -0
  718. package/lib/{OasProvider-CA_lpILt.js → OasProvider-CgHWBl16.js} +5 -4
  719. package/lib/OasProvider-CgHWBl16.js.map +1 -0
  720. package/lib/OperationList-BNNhgkkk.js +5482 -0
  721. package/lib/OperationList-BNNhgkkk.js.map +1 -0
  722. package/lib/{Pagination-CBiRGddW.js → Pagination-BpxzD3Tn.js} +4 -4
  723. package/lib/{Pagination-CBiRGddW.js.map → Pagination-BpxzD3Tn.js.map} +1 -1
  724. package/lib/RouteGuard-Brz95MSt.js +77 -0
  725. package/lib/RouteGuard-Brz95MSt.js.map +1 -0
  726. package/lib/RouterError-BsnUU8eo.js +42 -0
  727. package/lib/RouterError-BsnUU8eo.js.map +1 -0
  728. package/lib/{SchemaList-BeYWvBC7.js → SchemaList-C8-SHBql.js} +10 -10
  729. package/lib/{SchemaList-BeYWvBC7.js.map → SchemaList-C8-SHBql.js.map} +1 -1
  730. package/lib/SchemaView-VsgUbgRw.js +397 -0
  731. package/lib/SchemaView-VsgUbgRw.js.map +1 -0
  732. package/lib/Select-C1DeCqKv.js +372 -0
  733. package/lib/Select-C1DeCqKv.js.map +1 -0
  734. package/lib/SignUp-Bnvel-zK.js +50 -0
  735. package/lib/SignUp-Bnvel-zK.js.map +1 -0
  736. package/lib/{Spinner-mNLZ6awP.js → Spinner-CI6bRyZw.js} +2 -2
  737. package/lib/{Spinner-mNLZ6awP.js.map → Spinner-CI6bRyZw.js.map} +1 -1
  738. package/lib/{SyntaxHighlight-GR0eix_L.js → SyntaxHighlight-C19vH0V_.js} +1074 -1030
  739. package/lib/SyntaxHighlight-C19vH0V_.js.map +1 -0
  740. package/lib/{Toc-BlcGIkXc.js → Toc-DR_4nkDQ.js} +6 -6
  741. package/lib/Toc-DR_4nkDQ.js.map +1 -0
  742. package/lib/ZudokuContext-BUZ5hkWB.js +1508 -0
  743. package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
  744. package/lib/c-B-NUhs61.js +46 -0
  745. package/lib/c-B-NUhs61.js.map +1 -0
  746. package/lib/chunk-PVWAREVJ-BMhpCH5D.js +7965 -0
  747. package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +1 -0
  748. package/lib/{circular-CGTcsqA3.js → circular-BHuymtcS.js} +30 -30
  749. package/lib/{circular-CGTcsqA3.js.map → circular-BHuymtcS.js.map} +1 -1
  750. package/lib/cn-dYga0KKN.js.map +1 -1
  751. package/lib/commonlisp-De080z23.js +28 -0
  752. package/lib/commonlisp-De080z23.js.map +1 -0
  753. package/lib/cpp-79Paht7T.js +53 -0
  754. package/lib/cpp-79Paht7T.js.map +1 -0
  755. package/lib/{createServer-DjgpuLne.js → createServer-C4Kx4Ah4.js} +3703 -3225
  756. package/lib/createServer-C4Kx4Ah4.js.map +1 -0
  757. package/lib/csharp-D8MIL50B.js +53 -0
  758. package/lib/csharp-D8MIL50B.js.map +1 -0
  759. package/lib/css-Bt6hr1td.js +54 -0
  760. package/lib/css-Bt6hr1td.js.map +1 -0
  761. package/lib/dart-B0vy1jWB.js +60 -0
  762. package/lib/dart-B0vy1jWB.js.map +1 -0
  763. package/lib/elixir-Ds8r0sF8.js +25 -0
  764. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  765. package/lib/{errors-CrI3s7mR.js → errors-C43bc4dH.js} +3 -3
  766. package/lib/errors-C43bc4dH.js.map +1 -0
  767. package/lib/go-D2VsmIOS.js +25 -0
  768. package/lib/go-D2VsmIOS.js.map +1 -0
  769. package/lib/graphql-BtA6M4m5.js +25 -0
  770. package/lib/graphql-BtA6M4m5.js.map +1 -0
  771. package/lib/hook-CMeoxziF.js +40 -0
  772. package/lib/hook-CMeoxziF.js.map +1 -0
  773. package/lib/html-MGnI2uzP.js +33 -0
  774. package/lib/html-MGnI2uzP.js.map +1 -0
  775. package/lib/index-BlL_RtG2.js +3665 -0
  776. package/lib/index-BlL_RtG2.js.map +1 -0
  777. package/lib/{index-DzO-Qh6S.js → index-CfR_Jx5Q.js} +276 -278
  778. package/lib/index-CfR_Jx5Q.js.map +1 -0
  779. package/lib/index-CrcNWbel.js.map +1 -1
  780. package/lib/{index-HarEI51d.js → index-Dc4KrhPf.js} +166 -50
  781. package/lib/index-Dc4KrhPf.js.map +1 -0
  782. package/lib/{index-DmNq2fbN.js → index-nGbmHh_A.js} +2 -2
  783. package/lib/index-nGbmHh_A.js.map +1 -0
  784. package/lib/index.esm-BYObtETB.js +1294 -0
  785. package/lib/index.esm-BYObtETB.js.map +1 -0
  786. package/lib/index.esm-BnYHxCYC.js.map +1 -1
  787. package/lib/invariant-Bm-FVUQE.js.map +1 -1
  788. package/lib/java-CVLzHfb1.js +53 -0
  789. package/lib/java-CVLzHfb1.js.map +1 -0
  790. package/lib/javascript-CcmIpL4G.js +10 -0
  791. package/lib/javascript-CcmIpL4G.js.map +1 -0
  792. package/lib/json-4AyP4uiY.js +25 -0
  793. package/lib/json-4AyP4uiY.js.map +1 -0
  794. package/lib/{jsx-runtime-C5mzlN2N.js → jsx-runtime-BzflLqGi.js} +110 -112
  795. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  796. package/lib/kotlin-v2plddBQ.js +37 -0
  797. package/lib/kotlin-v2plddBQ.js.map +1 -0
  798. package/lib/markdown-DYGWCmGQ.js +25 -0
  799. package/lib/markdown-DYGWCmGQ.js.map +1 -0
  800. package/lib/mdx-CHwYvXd4.js +32 -0
  801. package/lib/mdx-CHwYvXd4.js.map +1 -0
  802. package/lib/{mutation-Dy_5up8v.js → mutation-BSU0xu4m.js} +2 -2
  803. package/lib/{mutation-Dy_5up8v.js.map → mutation-BSU0xu4m.js.map} +1 -1
  804. package/lib/objectivec-HZY8shkd.js +32 -0
  805. package/lib/objectivec-HZY8shkd.js.map +1 -0
  806. package/lib/ocaml-DqsdDdwb.js +52 -0
  807. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  808. package/lib/php-rQXzo7K_.js +25 -0
  809. package/lib/php-rQXzo7K_.js.map +1 -0
  810. package/lib/powershell-CQje9pm1.js +39 -0
  811. package/lib/powershell-CQje9pm1.js.map +1 -0
  812. package/lib/processors/traverse.js.map +1 -1
  813. package/lib/python-QIQAE5Ei.js +32 -0
  814. package/lib/python-QIQAE5Ei.js.map +1 -0
  815. package/lib/react-DHpVpxRv.js +24 -0
  816. package/lib/react-DHpVpxRv.js.map +1 -0
  817. package/lib/ruby-B2dU8Ny5.js +25 -0
  818. package/lib/ruby-B2dU8Ny5.js.map +1 -0
  819. package/lib/rust-DYnLHAi2.js +25 -0
  820. package/lib/rust-DYnLHAi2.js.map +1 -0
  821. package/lib/scala-CeKInBR8.js +25 -0
  822. package/lib/scala-CeKInBR8.js.map +1 -0
  823. package/lib/shell-HUv9oVtp.js +25 -0
  824. package/lib/shell-HUv9oVtp.js.map +1 -0
  825. package/lib/swift-B4z6ig1Z.js +25 -0
  826. package/lib/swift-B4z6ig1Z.js.map +1 -0
  827. package/lib/toml-Co9mpdct.js +32 -0
  828. package/lib/toml-Co9mpdct.js.map +1 -0
  829. package/lib/typescript-C26xdBDC.js +32 -0
  830. package/lib/typescript-C26xdBDC.js.map +1 -0
  831. package/lib/ui/Accordion.js +1 -1
  832. package/lib/ui/ActionButton.js +3 -3
  833. package/lib/ui/Alert.js +1 -1
  834. package/lib/ui/AlertDialog.js +1 -1
  835. package/lib/ui/Badge.js +1 -1
  836. package/lib/ui/Breadcrumb.js +23 -22
  837. package/lib/ui/Breadcrumb.js.map +1 -1
  838. package/lib/ui/Button.js +6 -5
  839. package/lib/ui/Button.js.map +1 -1
  840. package/lib/ui/Callout.js +19 -19
  841. package/lib/ui/Callout.js.map +1 -1
  842. package/lib/ui/Card.js +1 -1
  843. package/lib/ui/Carousel.js +1 -1
  844. package/lib/ui/Carousel.js.map +1 -1
  845. package/lib/ui/Checkbox.js +29 -26
  846. package/lib/ui/Checkbox.js.map +1 -1
  847. package/lib/ui/CodeBlock.js +217 -6
  848. package/lib/ui/CodeBlock.js.map +1 -1
  849. package/lib/ui/Command.js +21 -27
  850. package/lib/ui/Command.js.map +1 -1
  851. package/lib/ui/Dialog.js +135 -105
  852. package/lib/ui/Dialog.js.map +1 -1
  853. package/lib/ui/Drawer.js +2 -2
  854. package/lib/ui/DropdownMenu.js +1 -1
  855. package/lib/ui/EmbeddedCodeBlock.js +25 -22
  856. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  857. package/lib/ui/Form.js +2 -2
  858. package/lib/ui/Form.js.map +1 -1
  859. package/lib/ui/HoverCard.js +1 -1
  860. package/lib/ui/Input.js +1 -1
  861. package/lib/ui/Label.js +1 -1
  862. package/lib/ui/Pagination.js +28 -29
  863. package/lib/ui/Pagination.js.map +1 -1
  864. package/lib/ui/Popover.js +1 -1
  865. package/lib/ui/Progress.js +1 -1
  866. package/lib/ui/RadioGroup.js +1 -1
  867. package/lib/ui/ReactComponentDoc.js +28 -0
  868. package/lib/ui/ReactComponentDoc.js.map +1 -0
  869. package/lib/ui/ScrollArea.js +1 -1
  870. package/lib/ui/Secret.js +106 -0
  871. package/lib/ui/Secret.js.map +1 -0
  872. package/lib/ui/Select.js +1 -1
  873. package/lib/ui/Separator.js +27 -0
  874. package/lib/ui/Separator.js.map +1 -0
  875. package/lib/ui/Skeleton.js +1 -1
  876. package/lib/ui/Slider.js +1 -1
  877. package/lib/ui/Stepper.js +1 -1
  878. package/lib/ui/Switch.js +1 -1
  879. package/lib/ui/SyntaxHighlight.js +4 -4
  880. package/lib/ui/Tabs.js +1 -1
  881. package/lib/ui/Textarea.js +1 -1
  882. package/lib/ui/Toggle.js +1 -1
  883. package/lib/ui/ToggleGroup.js +1 -1
  884. package/lib/ui/ToggleGroup.js.map +1 -1
  885. package/lib/ui/Tooltip.js +55 -28
  886. package/lib/ui/Tooltip.js.map +1 -1
  887. package/lib/ui/Value.js +39 -0
  888. package/lib/ui/Value.js.map +1 -0
  889. package/lib/useCopyToClipboard-B_085nfO.js +14 -0
  890. package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
  891. package/lib/{useExposedProps-BH9aq4MD.js → useExposedProps-U3pmsHaG.js} +34 -34
  892. package/lib/{useExposedProps-BH9aq4MD.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
  893. package/lib/xml-BQOOC04j.js +25 -0
  894. package/lib/xml-BQOOC04j.js.map +1 -0
  895. package/lib/yaml-BGsJItKv.js +32 -0
  896. package/lib/yaml-BGsJItKv.js.map +1 -0
  897. package/lib/zig-CUV2sTct.js +35 -0
  898. package/lib/zig-CUV2sTct.js.map +1 -0
  899. package/lib/zudoku.__internal.js +1192 -1073
  900. package/lib/zudoku.__internal.js.map +1 -1
  901. package/lib/zudoku.auth-auth0.js +23 -22
  902. package/lib/zudoku.auth-auth0.js.map +1 -1
  903. package/lib/zudoku.auth-azureb2c.js +34 -35
  904. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  905. package/lib/zudoku.auth-clerk.js +41 -41
  906. package/lib/zudoku.auth-clerk.js.map +1 -1
  907. package/lib/zudoku.auth-openid.js +104 -108
  908. package/lib/zudoku.auth-openid.js.map +1 -1
  909. package/lib/zudoku.auth-supabase.js +108 -51
  910. package/lib/zudoku.auth-supabase.js.map +1 -1
  911. package/lib/zudoku.components.js +21 -20
  912. package/lib/zudoku.hooks.js +6 -6
  913. package/lib/zudoku.hooks.js.map +1 -1
  914. package/lib/zudoku.icons.js +1 -1
  915. package/lib/zudoku.icons.js.map +1 -1
  916. package/lib/zudoku.plugin-api-catalog.js +34 -28
  917. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  918. package/lib/zudoku.plugin-api-keys.js +302 -327
  919. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  920. package/lib/zudoku.plugin-custom-pages.js +1 -1
  921. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  922. package/lib/zudoku.plugin-markdown.js +10 -9
  923. package/lib/zudoku.plugin-markdown.js.map +1 -1
  924. package/lib/zudoku.plugin-openapi.js +7 -8
  925. package/lib/zudoku.plugin-openapi.js.map +1 -1
  926. package/lib/zudoku.plugin-redirect.js +3 -3
  927. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  928. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  929. package/lib/zudoku.plugin-search-pagefind.js +48 -49
  930. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  931. package/lib/zudoku.router.js +2502 -118
  932. package/lib/zudoku.router.js.map +1 -1
  933. package/package.json +93 -92
  934. package/src/app/ZuploBuildConfig.ts +1 -1
  935. package/src/app/entry.client.tsx +6 -5
  936. package/src/app/entry.server.tsx +19 -9
  937. package/src/app/env.ts +6 -6
  938. package/src/app/main.css +71 -19
  939. package/src/app/main.tsx +7 -3
  940. package/src/app/standalone.tsx +7 -2
  941. package/src/lib/MissingIcon.tsx +1 -1
  942. package/src/lib/assets/language-icons/c.tsx +31 -0
  943. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  944. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  945. package/src/lib/assets/language-icons/csharp.tsx +35 -0
  946. package/src/lib/assets/language-icons/css.tsx +36 -0
  947. package/src/lib/assets/language-icons/dart.tsx +39 -0
  948. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  949. package/src/lib/assets/language-icons/go.tsx +19 -0
  950. package/src/lib/assets/language-icons/graphql.tsx +19 -0
  951. package/src/lib/assets/language-icons/html.tsx +24 -0
  952. package/src/lib/assets/language-icons/java.tsx +35 -0
  953. package/src/lib/assets/language-icons/javascript.tsx +11 -0
  954. package/src/lib/assets/language-icons/json.tsx +19 -0
  955. package/src/lib/assets/language-icons/kotlin.tsx +30 -0
  956. package/src/lib/assets/language-icons/markdown.tsx +19 -0
  957. package/src/lib/assets/language-icons/mdx.tsx +23 -0
  958. package/src/lib/assets/language-icons/objectivec.tsx +23 -0
  959. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  960. package/src/lib/assets/language-icons/php.tsx +19 -0
  961. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  962. package/src/lib/assets/language-icons/python.tsx +23 -0
  963. package/src/lib/assets/language-icons/react.tsx +21 -0
  964. package/src/lib/assets/language-icons/ruby.tsx +19 -0
  965. package/src/lib/assets/language-icons/rust.tsx +19 -0
  966. package/src/lib/assets/language-icons/scala.tsx +19 -0
  967. package/src/lib/assets/language-icons/shell.tsx +19 -0
  968. package/src/lib/assets/language-icons/swift.tsx +19 -0
  969. package/src/lib/assets/language-icons/toml.tsx +23 -0
  970. package/src/lib/assets/language-icons/typescript.tsx +23 -0
  971. package/src/lib/assets/language-icons/xml.tsx +19 -0
  972. package/src/lib/assets/language-icons/yaml.tsx +23 -0
  973. package/src/lib/assets/language-icons/zig.tsx +32 -0
  974. package/src/lib/auth/issuer.test.ts +1 -0
  975. package/src/lib/auth/issuer.ts +3 -0
  976. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
  977. package/src/lib/authentication/authentication.ts +26 -8
  978. package/src/lib/authentication/components/OAuthErrorPage.tsx +2 -2
  979. package/src/lib/authentication/components/SignIn.tsx +7 -5
  980. package/src/lib/authentication/components/SignOut.tsx +7 -6
  981. package/src/lib/authentication/components/SignUp.tsx +5 -8
  982. package/src/lib/authentication/hook.ts +21 -10
  983. package/src/lib/authentication/providers/auth0.tsx +14 -9
  984. package/src/lib/authentication/providers/azureb2c.tsx +15 -8
  985. package/src/lib/authentication/providers/clerk.tsx +14 -7
  986. package/src/lib/authentication/providers/firebase.tsx +284 -0
  987. package/src/lib/authentication/providers/openid.tsx +26 -21
  988. package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
  989. package/src/lib/authentication/providers/supabase.tsx +61 -49
  990. package/src/lib/authentication/state.ts +3 -23
  991. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
  992. package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
  993. package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
  994. package/src/lib/authentication/ui/icons/Github.tsx +16 -0
  995. package/src/lib/authentication/ui/icons/Google.tsx +16 -0
  996. package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
  997. package/src/lib/authentication/ui/icons/X.tsx +10 -0
  998. package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
  999. package/src/lib/authentication/use-broadcast/shared.ts +4 -4
  1000. package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
  1001. package/src/lib/components/AnchorLink.tsx +1 -1
  1002. package/src/lib/components/Autocomplete.tsx +12 -3
  1003. package/src/lib/components/Bootstrap.tsx +1 -0
  1004. package/src/lib/components/BuildCheck.tsx +14 -11
  1005. package/src/lib/components/Header.tsx +2 -3
  1006. package/src/lib/components/Heading.tsx +4 -9
  1007. package/src/lib/components/LanguageIcon.tsx +181 -0
  1008. package/src/lib/components/Layout.tsx +1 -1
  1009. package/src/lib/components/Main.tsx +1 -1
  1010. package/src/lib/components/Markdown.tsx +5 -2
  1011. package/src/lib/components/Meta.tsx +13 -0
  1012. package/src/lib/components/MobileTopNavigation.tsx +11 -13
  1013. package/src/lib/components/PathRenderer.tsx +2 -2
  1014. package/src/lib/components/Search.tsx +1 -1
  1015. package/src/lib/components/Slot.test.tsx +8 -8
  1016. package/src/lib/components/Slot.tsx +2 -2
  1017. package/src/lib/components/TopNavigation.tsx +3 -3
  1018. package/src/lib/components/Zudoku.tsx +5 -5
  1019. package/src/lib/components/cache.ts +9 -5
  1020. package/src/lib/components/context/ComponentsContext.tsx +2 -2
  1021. package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
  1022. package/src/lib/components/context/SlotProvider.tsx +4 -4
  1023. package/src/lib/components/context/ViewportAnchorContext.tsx +2 -2
  1024. package/src/lib/components/context/ZudokuContext.ts +12 -3
  1025. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  1026. package/src/lib/components/index.ts +3 -1
  1027. package/src/lib/components/navigation/NavigationCategory.tsx +8 -1
  1028. package/src/lib/components/navigation/NavigationItem.tsx +3 -3
  1029. package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
  1030. package/src/lib/components/navigation/Toc.tsx +5 -5
  1031. package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
  1032. package/src/lib/components/navigation/utils.ts +5 -6
  1033. package/src/lib/core/RouteGuard.tsx +41 -21
  1034. package/src/lib/core/ZudokuContext.ts +5 -1
  1035. package/src/lib/errors/ErrorAlert.tsx +1 -2
  1036. package/src/lib/errors/RouterError.tsx +7 -2
  1037. package/src/lib/errors/TopLevelError.tsx +2 -4
  1038. package/src/lib/hooks/useEvent.test.tsx +2 -2
  1039. package/src/lib/oas/graphql/circular.ts +3 -3
  1040. package/src/lib/oas/graphql/index.ts +39 -3
  1041. package/src/lib/oas/parser/dereference/index.ts +2 -1
  1042. package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
  1043. package/src/lib/oas/parser/index.ts +10 -5
  1044. package/src/lib/oas/parser/upgrade/index.ts +2 -1
  1045. package/src/lib/plugins/api-catalog/Catalog.tsx +7 -0
  1046. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  1047. package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
  1048. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
  1049. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +23 -70
  1050. package/src/lib/plugins/api-keys/index.tsx +8 -8
  1051. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  1052. package/src/lib/plugins/markdown/MdxPage.tsx +131 -14
  1053. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  1054. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  1055. package/src/lib/plugins/markdown/index.tsx +6 -8
  1056. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
  1057. package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
  1058. package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
  1059. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
  1060. package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
  1061. package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
  1062. package/src/lib/plugins/openapi/OperationList.tsx +39 -13
  1063. package/src/lib/plugins/openapi/OperationListItem.tsx +103 -76
  1064. package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
  1065. package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
  1066. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -12
  1067. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -13
  1068. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +23 -4
  1069. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +27 -2
  1070. package/src/lib/plugins/openapi/Sidecar.tsx +112 -64
  1071. package/src/lib/plugins/openapi/SidecarExamples.tsx +40 -57
  1072. package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
  1073. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
  1074. package/src/lib/plugins/openapi/client/createServer.ts +1 -2
  1075. package/src/lib/plugins/openapi/client/useCreateQuery.ts +3 -2
  1076. package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
  1077. package/src/lib/plugins/openapi/components/ResponseContent.tsx +1 -1
  1078. package/src/lib/plugins/openapi/context.tsx +1 -1
  1079. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
  1080. package/src/lib/plugins/openapi/graphql/gql.ts +6 -6
  1081. package/src/lib/plugins/openapi/graphql/graphql.ts +25 -3
  1082. package/src/lib/plugins/openapi/index.tsx +14 -33
  1083. package/src/lib/plugins/openapi/interfaces.ts +19 -4
  1084. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +249 -33
  1085. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  1086. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +6 -5
  1087. package/src/lib/plugins/openapi/playground/Headers.tsx +104 -220
  1088. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +1 -1
  1089. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +1 -1
  1090. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  1091. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  1092. package/src/lib/plugins/openapi/playground/Playground.tsx +90 -41
  1093. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +13 -2
  1094. package/src/lib/plugins/openapi/playground/QueryParams.tsx +83 -137
  1095. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
  1096. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  1097. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +1 -1
  1098. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +2 -2
  1099. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  1100. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  1101. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +5 -3
  1102. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +124 -56
  1103. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +4 -4
  1104. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
  1105. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
  1106. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
  1107. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
  1108. package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
  1109. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +6 -27
  1110. package/src/lib/plugins/openapi/schema/SchemaView.tsx +30 -23
  1111. package/src/lib/plugins/openapi/schema/UnionView.tsx +143 -0
  1112. package/src/lib/plugins/openapi/schema/union-helpers.ts +123 -0
  1113. package/src/lib/plugins/openapi/schema/utils.ts +0 -11
  1114. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
  1115. package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +1 -0
  1116. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +14 -15
  1117. package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
  1118. package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
  1119. package/src/lib/plugins/search-inkeep/index.tsx +3 -3
  1120. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +2 -4
  1121. package/src/lib/plugins/search-pagefind/ResultList.tsx +3 -4
  1122. package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
  1123. package/src/lib/shiki.ts +35 -8
  1124. package/src/lib/ui/Breadcrumb.tsx +1 -0
  1125. package/src/lib/ui/Button.tsx +1 -0
  1126. package/src/lib/ui/Callout.tsx +10 -5
  1127. package/src/lib/ui/Checkbox.tsx +23 -24
  1128. package/src/lib/ui/CodeBlock.tsx +7 -41
  1129. package/src/lib/ui/Command.tsx +2 -4
  1130. package/src/lib/ui/Dialog.tsx +112 -107
  1131. package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -4
  1132. package/src/lib/ui/Form.tsx +4 -4
  1133. package/src/lib/ui/Pagination.tsx +1 -2
  1134. package/src/lib/ui/ReactComponentDoc.tsx +68 -0
  1135. package/src/lib/ui/Secret.tsx +123 -0
  1136. package/src/lib/ui/Separator.tsx +25 -0
  1137. package/src/lib/ui/SyntaxHighlight.tsx +6 -1
  1138. package/src/lib/ui/ToggleGroup.tsx +1 -1
  1139. package/src/lib/ui/Tooltip.tsx +54 -32
  1140. package/src/lib/ui/Value.tsx +42 -0
  1141. package/src/lib/util/MdxComponents.tsx +12 -4
  1142. package/src/lib/util/cn.ts +1 -1
  1143. package/src/lib/util/createVariantComponent.tsx +33 -7
  1144. package/src/lib/util/flattenAllOf.test.ts +637 -0
  1145. package/src/lib/util/flattenAllOf.ts +101 -0
  1146. package/src/lib/util/groupBy.ts +1 -0
  1147. package/src/lib/util/humanFileSize.ts +2 -3
  1148. package/src/lib/util/invariant.ts +1 -0
  1149. package/src/lib/util/pastellize.ts +4 -4
  1150. package/src/lib/util/syncZustandState.ts +22 -0
  1151. package/src/lib/util/traverse.ts +36 -0
  1152. package/src/lib/util/types.ts +1 -1
  1153. package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
  1154. package/src/lib/util/useScrollToAnchor.ts +3 -1
  1155. package/src/shiki/langs/hurl.js +1 -0
  1156. package/src/shiki/langs/kdl.js +1 -0
  1157. package/src/shiki/langs/pkl.js +1 -0
  1158. package/src/shiki/langs/rosmsg.js +1 -0
  1159. package/dist/lib/components/ReactMarkdown.d.ts +0 -29
  1160. package/dist/lib/components/ReactMarkdown.js +0 -182
  1161. package/dist/lib/components/ReactMarkdown.js.map +0 -1
  1162. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  1163. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  1164. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  1165. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
  1166. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
  1167. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
  1168. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
  1169. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
  1170. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
  1171. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -6
  1172. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
  1173. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
  1174. package/lib/Button-B3o-2Xdf.js.map +0 -1
  1175. package/lib/CodeBlock-yJjjRwj-.js +0 -98
  1176. package/lib/CodeBlock-yJjjRwj-.js.map +0 -1
  1177. package/lib/Command-CDn17s8X.js.map +0 -1
  1178. package/lib/Dialog-BrIjMmUK.js +0 -114
  1179. package/lib/Dialog-BrIjMmUK.js.map +0 -1
  1180. package/lib/MdxPage-BmOQ5m5g.js +0 -111
  1181. package/lib/MdxPage-BmOQ5m5g.js.map +0 -1
  1182. package/lib/OAuthErrorPage-Jv3r8wnL.js.map +0 -1
  1183. package/lib/OasProvider-CA_lpILt.js.map +0 -1
  1184. package/lib/OperationList-C-TObVw6.js +0 -5169
  1185. package/lib/OperationList-C-TObVw6.js.map +0 -1
  1186. package/lib/RouteGuard-JLH6tCY8.js +0 -56
  1187. package/lib/RouteGuard-JLH6tCY8.js.map +0 -1
  1188. package/lib/RouterError-DcVonMP1.js +0 -41
  1189. package/lib/RouterError-DcVonMP1.js.map +0 -1
  1190. package/lib/SchemaView-CRcShewo.js +0 -366
  1191. package/lib/SchemaView-CRcShewo.js.map +0 -1
  1192. package/lib/Select-C3efYI1n.js +0 -273
  1193. package/lib/Select-C3efYI1n.js.map +0 -1
  1194. package/lib/SignUp-CxBGHgba.js +0 -56
  1195. package/lib/SignUp-CxBGHgba.js.map +0 -1
  1196. package/lib/Slot-DOtTvoyj.js.map +0 -1
  1197. package/lib/SyntaxHighlight-GR0eix_L.js.map +0 -1
  1198. package/lib/Toc-BlcGIkXc.js.map +0 -1
  1199. package/lib/ZudokuContext-BuJD7yIX.js +0 -1286
  1200. package/lib/ZudokuContext-BuJD7yIX.js.map +0 -1
  1201. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +0 -9204
  1202. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +0 -1
  1203. package/lib/createServer-DjgpuLne.js.map +0 -1
  1204. package/lib/errors-CrI3s7mR.js.map +0 -1
  1205. package/lib/hook-bv3iuX7X.js +0 -247
  1206. package/lib/hook-bv3iuX7X.js.map +0 -1
  1207. package/lib/index-CvTWnHZF.js +0 -3391
  1208. package/lib/index-CvTWnHZF.js.map +0 -1
  1209. package/lib/index-DmNq2fbN.js.map +0 -1
  1210. package/lib/index-DzO-Qh6S.js.map +0 -1
  1211. package/lib/index-HarEI51d.js.map +0 -1
  1212. package/lib/index.esm-CdzlRw50.js +0 -1254
  1213. package/lib/index.esm-CdzlRw50.js.map +0 -1
  1214. package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
  1215. package/src/lib/components/ReactMarkdown.license.txt +0 -21
  1216. package/src/lib/components/ReactMarkdown.tsx +0 -264
  1217. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
  1218. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
  1219. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +0 -57
  1220. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +0 -33
@@ -1,1254 +0,0 @@
1
- import * as nt from "react";
2
- import v from "react";
3
- var he = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, $ = (e) => e == null;
4
- const ht = (e) => typeof e == "object";
5
- var P = (e) => !$(e) && !Array.isArray(e) && ht(e) && !ue(e), mt = (e) => P(e) && e.target ? he(e.target) ? e.target.checked : e.target.value : e, Nt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, vt = (e, r) => e.has(Nt(r)), Bt = (e) => {
6
- const r = e.constructor && e.constructor.prototype;
7
- return P(r) && r.hasOwnProperty("isPrototypeOf");
8
- }, je = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
9
- function O(e) {
10
- let r;
11
- const t = Array.isArray(e), i = typeof FileList < "u" ? e instanceof FileList : !1;
12
- if (e instanceof Date)
13
- r = new Date(e);
14
- else if (!(je && (e instanceof Blob || i)) && (t || P(e)))
15
- if (r = t ? [] : {}, !t && !Bt(e))
16
- r = e;
17
- else
18
- for (const n in e)
19
- e.hasOwnProperty(n) && (r[n] = O(e[n]));
20
- else
21
- return e;
22
- return r;
23
- }
24
- var Se = (e) => /^\w*$/.test(e), M = (e) => e === void 0, we = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Ke = (e) => we(e.replace(/["|']|\]/g, "").split(/\.|\[/)), c = (e, r, t) => {
25
- if (!r || !P(e))
26
- return t;
27
- const i = (Se(r) ? [r] : Ke(r)).reduce((n, l) => $(n) ? n : n[l], e);
28
- return M(i) || i === e ? M(e[r]) ? t : e[r] : i;
29
- }, Q = (e) => typeof e == "boolean", p = (e, r, t) => {
30
- let i = -1;
31
- const n = Se(r) ? [r] : Ke(r), l = n.length, f = l - 1;
32
- for (; ++i < l; ) {
33
- const d = n[i];
34
- let b = t;
35
- if (i !== f) {
36
- const x = e[d];
37
- b = P(x) || Array.isArray(x) ? x : isNaN(+n[i + 1]) ? {} : [];
38
- }
39
- if (d === "__proto__" || d === "constructor" || d === "prototype")
40
- return;
41
- e[d] = b, e = e[d];
42
- }
43
- };
44
- const Fe = {
45
- BLUR: "blur",
46
- FOCUS_OUT: "focusout",
47
- CHANGE: "change"
48
- }, Z = {
49
- onBlur: "onBlur",
50
- onChange: "onChange",
51
- onSubmit: "onSubmit",
52
- onTouched: "onTouched",
53
- all: "all"
54
- }, ie = {
55
- max: "max",
56
- min: "min",
57
- maxLength: "maxLength",
58
- minLength: "minLength",
59
- pattern: "pattern",
60
- required: "required",
61
- validate: "validate"
62
- }, ze = v.createContext(null);
63
- ze.displayName = "HookFormContext";
64
- const ke = () => v.useContext(ze), ar = (e) => {
65
- const { children: r, ...t } = e;
66
- return v.createElement(ze.Provider, { value: t }, r);
67
- };
68
- var bt = (e, r, t, i = !0) => {
69
- const n = {
70
- defaultValues: r._defaultValues
71
- };
72
- for (const l in e)
73
- Object.defineProperty(n, l, {
74
- get: () => {
75
- const f = l;
76
- return r._proxyFormState[f] !== Z.all && (r._proxyFormState[f] = !i || Z.all), t && (t[f] = !0), e[f];
77
- }
78
- });
79
- return n;
80
- };
81
- const De = typeof window < "u" ? nt.useLayoutEffect : nt.useEffect;
82
- function Pt(e) {
83
- const r = ke(), { control: t = r.control, disabled: i, name: n, exact: l } = e || {}, [f, d] = v.useState(t._formState), b = v.useRef({
84
- isDirty: !1,
85
- isLoading: !1,
86
- dirtyFields: !1,
87
- touchedFields: !1,
88
- validatingFields: !1,
89
- isValidating: !1,
90
- isValid: !1,
91
- errors: !1
92
- });
93
- return De(() => t._subscribe({
94
- name: n,
95
- formState: b.current,
96
- exact: l,
97
- callback: (x) => {
98
- !i && d({
99
- ...t._formState,
100
- ...x
101
- });
102
- }
103
- }), [n, i, l]), v.useEffect(() => {
104
- b.current.isValid && t._setValid(!0);
105
- }, [t]), v.useMemo(() => bt(f, t, b.current, !1), [f, t]);
106
- }
107
- var se = (e) => typeof e == "string", Ft = (e, r, t, i, n) => se(e) ? (i && r.watch.add(e), c(t, e, n)) : Array.isArray(e) ? e.map((l) => (i && r.watch.add(l), c(t, l))) : (i && (r.watchAll = !0), t);
108
- function Wt(e) {
109
- const r = ke(), { control: t = r.control, name: i, defaultValue: n, disabled: l, exact: f } = e || {}, d = v.useRef(n), [b, x] = v.useState(t._getWatch(i, d.current));
110
- return De(() => t._subscribe({
111
- name: i,
112
- formState: {
113
- values: !0
114
- },
115
- exact: f,
116
- callback: (k) => !l && x(Ft(i, t._names, k.values || t._formValues, !1, d.current))
117
- }), [i, t, l, f]), v.useEffect(() => t._removeUnmounted()), b;
118
- }
119
- function qt(e) {
120
- const r = ke(), { name: t, disabled: i, control: n = r.control, shouldUnregister: l } = e, f = vt(n._names.array, t), d = Wt({
121
- control: n,
122
- name: t,
123
- defaultValue: c(n._formValues, t, c(n._defaultValues, t, e.defaultValue)),
124
- exact: !0
125
- }), b = Pt({
126
- control: n,
127
- name: t,
128
- exact: !0
129
- }), x = v.useRef(e), k = v.useRef(n.register(t, {
130
- ...e.rules,
131
- value: d,
132
- ...Q(e.disabled) ? { disabled: e.disabled } : {}
133
- })), C = v.useMemo(() => Object.defineProperties({}, {
134
- invalid: {
135
- enumerable: !0,
136
- get: () => !!c(b.errors, t)
137
- },
138
- isDirty: {
139
- enumerable: !0,
140
- get: () => !!c(b.dirtyFields, t)
141
- },
142
- isTouched: {
143
- enumerable: !0,
144
- get: () => !!c(b.touchedFields, t)
145
- },
146
- isValidating: {
147
- enumerable: !0,
148
- get: () => !!c(b.validatingFields, t)
149
- },
150
- error: {
151
- enumerable: !0,
152
- get: () => c(b.errors, t)
153
- }
154
- }), [b, t]), F = v.useCallback((T) => k.current.onChange({
155
- target: {
156
- value: mt(T),
157
- name: t
158
- },
159
- type: Fe.CHANGE
160
- }), [t]), U = v.useCallback(() => k.current.onBlur({
161
- target: {
162
- value: c(n._formValues, t),
163
- name: t
164
- },
165
- type: Fe.BLUR
166
- }), [t, n._formValues]), z = v.useCallback((T) => {
167
- const ee = c(n._fields, t);
168
- ee && T && (ee._f.ref = {
169
- focus: () => T.focus && T.focus(),
170
- select: () => T.select && T.select(),
171
- setCustomValidity: (V) => T.setCustomValidity(V),
172
- reportValidity: () => T.reportValidity()
173
- });
174
- }, [n._fields, t]), L = v.useMemo(() => ({
175
- name: t,
176
- value: d,
177
- ...Q(i) || b.disabled ? { disabled: b.disabled || i } : {},
178
- onChange: F,
179
- onBlur: U,
180
- ref: z
181
- }), [t, i, b.disabled, F, U, z, d]);
182
- return v.useEffect(() => {
183
- const T = n._options.shouldUnregister || l;
184
- n.register(t, {
185
- ...x.current.rules,
186
- ...Q(x.current.disabled) ? { disabled: x.current.disabled } : {}
187
- });
188
- const ee = (V, G) => {
189
- const W = c(n._fields, V);
190
- W && W._f && (W._f.mount = G);
191
- };
192
- if (ee(t, !0), T) {
193
- const V = O(c(n._options.defaultValues, t));
194
- p(n._defaultValues, t, V), M(c(n._formValues, t)) && p(n._formValues, t, V);
195
- }
196
- return !f && n.register(t), () => {
197
- (f ? T && !n._state.action : T) ? n.unregister(t) : ee(t, !1);
198
- };
199
- }, [t, n, f, l]), v.useEffect(() => {
200
- n._setDisabledField({
201
- disabled: i,
202
- name: t
203
- });
204
- }, [i, t, n]), v.useMemo(() => ({
205
- field: L,
206
- formState: b,
207
- fieldState: C
208
- }), [L, b, C]);
209
- }
210
- const nr = (e) => e.render(qt(e));
211
- var Ht = (e, r, t, i, n) => r ? {
212
- ...t[e],
213
- types: {
214
- ...t[e] && t[e].types ? t[e].types : {},
215
- [i]: n || !0
216
- }
217
- } : {}, K = (e) => Array.isArray(e) ? e : [e], lt = () => {
218
- let e = [];
219
- return {
220
- get observers() {
221
- return e;
222
- },
223
- next: (n) => {
224
- for (const l of e)
225
- l.next && l.next(n);
226
- },
227
- subscribe: (n) => (e.push(n), {
228
- unsubscribe: () => {
229
- e = e.filter((l) => l !== n);
230
- }
231
- }),
232
- unsubscribe: () => {
233
- e = [];
234
- }
235
- };
236
- }, qe = (e) => $(e) || !ht(e);
237
- function le(e, r, t = /* @__PURE__ */ new WeakSet()) {
238
- if (qe(e) || qe(r))
239
- return e === r;
240
- if (ue(e) && ue(r))
241
- return e.getTime() === r.getTime();
242
- const i = Object.keys(e), n = Object.keys(r);
243
- if (i.length !== n.length)
244
- return !1;
245
- if (t.has(e) || t.has(r))
246
- return !0;
247
- t.add(e), t.add(r);
248
- for (const l of i) {
249
- const f = e[l];
250
- if (!n.includes(l))
251
- return !1;
252
- if (l !== "ref") {
253
- const d = r[l];
254
- if (ue(f) && ue(d) || P(f) && P(d) || Array.isArray(f) && Array.isArray(d) ? !le(f, d, t) : f !== d)
255
- return !1;
256
- }
257
- }
258
- return !0;
259
- }
260
- var H = (e) => P(e) && !Object.keys(e).length, Ge = (e) => e.type === "file", te = (e) => typeof e == "function", Ve = (e) => {
261
- if (!je)
262
- return !1;
263
- const r = e ? e.ownerDocument : 0;
264
- return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
265
- }, Vt = (e) => e.type === "select-multiple", Ye = (e) => e.type === "radio", $t = (e) => Ye(e) || he(e), Oe = (e) => Ve(e) && e.isConnected;
266
- function jt(e, r) {
267
- const t = r.slice(0, -1).length;
268
- let i = 0;
269
- for (; i < t; )
270
- e = M(e) ? i++ : e[r[i++]];
271
- return e;
272
- }
273
- function Kt(e) {
274
- for (const r in e)
275
- if (e.hasOwnProperty(r) && !M(e[r]))
276
- return !1;
277
- return !0;
278
- }
279
- function B(e, r) {
280
- const t = Array.isArray(r) ? r : Se(r) ? [r] : Ke(r), i = t.length === 1 ? e : jt(e, t), n = t.length - 1, l = t[n];
281
- return i && delete i[l], n !== 0 && (P(i) && H(i) || Array.isArray(i) && Kt(i)) && B(e, t.slice(0, -1)), e;
282
- }
283
- var At = (e) => {
284
- for (const r in e)
285
- if (te(e[r]))
286
- return !0;
287
- return !1;
288
- };
289
- function Ae(e, r = {}) {
290
- const t = Array.isArray(e);
291
- if (P(e) || t)
292
- for (const i in e)
293
- Array.isArray(e[i]) || P(e[i]) && !At(e[i]) ? (r[i] = Array.isArray(e[i]) ? [] : {}, Ae(e[i], r[i])) : $(e[i]) || (r[i] = !0);
294
- return r;
295
- }
296
- function xt(e, r, t) {
297
- const i = Array.isArray(e);
298
- if (P(e) || i)
299
- for (const n in e)
300
- Array.isArray(e[n]) || P(e[n]) && !At(e[n]) ? M(r) || qe(t[n]) ? t[n] = Array.isArray(e[n]) ? Ae(e[n], []) : { ...Ae(e[n]) } : xt(e[n], $(r) ? {} : r[n], t[n]) : t[n] = !le(e[n], r[n]);
301
- return t;
302
- }
303
- var ge = (e, r) => xt(e, r, Ae(r));
304
- const ut = {
305
- value: !1,
306
- isValid: !1
307
- }, ot = { value: !0, isValid: !0 };
308
- var St = (e) => {
309
- if (Array.isArray(e)) {
310
- if (e.length > 1) {
311
- const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
312
- return { value: r, isValid: !!r.length };
313
- }
314
- return e[0].checked && !e[0].disabled ? (
315
- // @ts-expect-error expected to work in the browser
316
- e[0].attributes && !M(e[0].attributes.value) ? M(e[0].value) || e[0].value === "" ? ot : { value: e[0].value, isValid: !0 } : ot
317
- ) : ut;
318
- }
319
- return ut;
320
- }, wt = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: i }) => M(e) ? e : r ? e === "" ? NaN : e && +e : t && se(e) ? new Date(e) : i ? i(e) : e;
321
- const dt = {
322
- isValid: !1,
323
- value: null
324
- };
325
- var kt = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
326
- isValid: !0,
327
- value: t.value
328
- } : r, dt) : dt;
329
- function ct(e) {
330
- const r = e.ref;
331
- return Ge(r) ? r.files : Ye(r) ? kt(e.refs).value : Vt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : he(r) ? St(e.refs).value : wt(M(r.value) ? e.ref.value : r.value, e);
332
- }
333
- var zt = (e, r, t, i) => {
334
- const n = {};
335
- for (const l of e) {
336
- const f = c(r, l);
337
- f && p(n, l, f._f);
338
- }
339
- return {
340
- criteriaMode: t,
341
- names: [...e],
342
- fields: n,
343
- shouldUseNativeValidation: i
344
- };
345
- }, xe = (e) => e instanceof RegExp, _e = (e) => M(e) ? e : xe(e) ? e.source : P(e) ? xe(e.value) ? e.value.source : e.value : e, ce = (e) => ({
346
- isOnSubmit: !e || e === Z.onSubmit,
347
- isOnBlur: e === Z.onBlur,
348
- isOnChange: e === Z.onChange,
349
- isOnAll: e === Z.all,
350
- isOnTouch: e === Z.onTouched
351
- });
352
- const ft = "AsyncFunction";
353
- var Gt = (e) => !!e && !!e.validate && !!(te(e.validate) && e.validate.constructor.name === ft || P(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === ft)), Yt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), He = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
354
- const fe = (e, r, t, i) => {
355
- for (const n of t || Object.keys(e)) {
356
- const l = c(e, n);
357
- if (l) {
358
- const { _f: f, ...d } = l;
359
- if (f) {
360
- if (f.refs && f.refs[0] && r(f.refs[0], n) && !i)
361
- return !0;
362
- if (f.ref && r(f.ref, f.name) && !i)
363
- return !0;
364
- if (fe(d, r))
365
- break;
366
- } else if (P(d) && fe(d, r))
367
- break;
368
- }
369
- }
370
- };
371
- function yt(e, r, t) {
372
- const i = c(e, t);
373
- if (i || Se(t))
374
- return {
375
- error: i,
376
- name: t
377
- };
378
- const n = t.split(".");
379
- for (; n.length; ) {
380
- const l = n.join("."), f = c(r, l), d = c(e, l);
381
- if (f && !Array.isArray(f) && t !== l)
382
- return { name: t };
383
- if (d && d.type)
384
- return {
385
- name: l,
386
- error: d
387
- };
388
- if (d && d.root && d.root.type)
389
- return {
390
- name: `${l}.root`,
391
- error: d.root
392
- };
393
- n.pop();
394
- }
395
- return {
396
- name: t
397
- };
398
- }
399
- var Jt = (e, r, t, i) => {
400
- t(e);
401
- const { name: n, ...l } = e;
402
- return H(l) || Object.keys(l).length >= Object.keys(r).length || Object.keys(l).find((f) => r[f] === (!i || Z.all));
403
- }, Qt = (e, r, t) => !e || !r || e === r || K(e).some((i) => i && (t ? i === r : i.startsWith(r) || r.startsWith(i))), Xt = (e, r, t, i, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? i.isOnBlur : n.isOnBlur) ? !e : (t ? i.isOnChange : n.isOnChange) ? e : !0, Zt = (e, r) => !we(c(e, r)).length && B(e, r), Dt = (e, r, t) => {
404
- const i = K(c(e, t));
405
- return p(i, "root", r[t]), p(e, t, i), e;
406
- }, be = (e) => se(e);
407
- function gt(e, r, t = "validate") {
408
- if (be(e) || Array.isArray(e) && e.every(be) || Q(e) && !e)
409
- return {
410
- type: t,
411
- message: be(e) ? e : "",
412
- ref: r
413
- };
414
- }
415
- var de = (e) => P(e) && !xe(e) ? e : {
416
- value: e,
417
- message: ""
418
- }, $e = async (e, r, t, i, n, l) => {
419
- const { ref: f, refs: d, required: b, maxLength: x, minLength: k, min: C, max: F, pattern: U, validate: z, name: L, valueAsNumber: T, mount: ee } = e._f, V = c(t, L);
420
- if (!ee || r.has(L))
421
- return {};
422
- const G = d ? d[0] : f, W = (w) => {
423
- n && G.reportValidity && (G.setCustomValidity(Q(w) ? "" : w || ""), G.reportValidity());
424
- }, I = {}, m = Ye(f), _ = he(f), A = m || _, S = (T || Ge(f)) && M(f.value) && M(V) || Ve(f) && f.value === "" || V === "" || Array.isArray(V) && !V.length, Y = Ht.bind(null, L, i, I), J = (w, E, N, q = ie.maxLength, j = ie.minLength) => {
425
- const re = w ? E : N;
426
- I[L] = {
427
- type: w ? q : j,
428
- message: re,
429
- ref: f,
430
- ...Y(w ? q : j, re)
431
- };
432
- };
433
- if (l ? !Array.isArray(V) || !V.length : b && (!A && (S || $(V)) || Q(V) && !V || _ && !St(d).isValid || m && !kt(d).isValid)) {
434
- const { value: w, message: E } = be(b) ? { value: !!b, message: b } : de(b);
435
- if (w && (I[L] = {
436
- type: ie.required,
437
- message: E,
438
- ref: G,
439
- ...Y(ie.required, E)
440
- }, !i))
441
- return W(E), I;
442
- }
443
- if (!S && (!$(C) || !$(F))) {
444
- let w, E;
445
- const N = de(F), q = de(C);
446
- if (!$(V) && !isNaN(V)) {
447
- const j = f.valueAsNumber || V && +V;
448
- $(N.value) || (w = j > N.value), $(q.value) || (E = j < q.value);
449
- } else {
450
- const j = f.valueAsDate || new Date(V), re = (me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + me), ye = f.type == "time", oe = f.type == "week";
451
- se(N.value) && V && (w = ye ? re(V) > re(N.value) : oe ? V > N.value : j > new Date(N.value)), se(q.value) && V && (E = ye ? re(V) < re(q.value) : oe ? V < q.value : j < new Date(q.value));
452
- }
453
- if ((w || E) && (J(!!w, N.message, q.message, ie.max, ie.min), !i))
454
- return W(I[L].message), I;
455
- }
456
- if ((x || k) && !S && (se(V) || l && Array.isArray(V))) {
457
- const w = de(x), E = de(k), N = !$(w.value) && V.length > +w.value, q = !$(E.value) && V.length < +E.value;
458
- if ((N || q) && (J(N, w.message, E.message), !i))
459
- return W(I[L].message), I;
460
- }
461
- if (U && !S && se(V)) {
462
- const { value: w, message: E } = de(U);
463
- if (xe(w) && !V.match(w) && (I[L] = {
464
- type: ie.pattern,
465
- message: E,
466
- ref: f,
467
- ...Y(ie.pattern, E)
468
- }, !i))
469
- return W(E), I;
470
- }
471
- if (z) {
472
- if (te(z)) {
473
- const w = await z(V, t), E = gt(w, G);
474
- if (E && (I[L] = {
475
- ...E,
476
- ...Y(ie.validate, E.message)
477
- }, !i))
478
- return W(E.message), I;
479
- } else if (P(z)) {
480
- let w = {};
481
- for (const E in z) {
482
- if (!H(w) && !i)
483
- break;
484
- const N = gt(await z[E](V, t), G, E);
485
- N && (w = {
486
- ...N,
487
- ...Y(E, N.message)
488
- }, W(N.message), i && (I[L] = w));
489
- }
490
- if (!H(w) && (I[L] = {
491
- ref: G,
492
- ...w
493
- }, !i))
494
- return I;
495
- }
496
- }
497
- return W(!0), I;
498
- };
499
- const er = {
500
- mode: Z.onSubmit,
501
- reValidateMode: Z.onChange,
502
- shouldFocusError: !0
503
- };
504
- function tr(e = {}) {
505
- let r = {
506
- ...er,
507
- ...e
508
- }, t = {
509
- submitCount: 0,
510
- isDirty: !1,
511
- isReady: !1,
512
- isLoading: te(r.defaultValues),
513
- isValidating: !1,
514
- isSubmitted: !1,
515
- isSubmitting: !1,
516
- isSubmitSuccessful: !1,
517
- isValid: !1,
518
- touchedFields: {},
519
- dirtyFields: {},
520
- validatingFields: {},
521
- errors: r.errors || {},
522
- disabled: r.disabled || !1
523
- }, i = {}, n = P(r.defaultValues) || P(r.values) ? O(r.defaultValues || r.values) || {} : {}, l = r.shouldUnregister ? {} : O(n), f = {
524
- action: !1,
525
- mount: !1,
526
- watch: !1
527
- }, d = {
528
- mount: /* @__PURE__ */ new Set(),
529
- disabled: /* @__PURE__ */ new Set(),
530
- unMount: /* @__PURE__ */ new Set(),
531
- array: /* @__PURE__ */ new Set(),
532
- watch: /* @__PURE__ */ new Set()
533
- }, b, x = 0;
534
- const k = {
535
- isDirty: !1,
536
- dirtyFields: !1,
537
- validatingFields: !1,
538
- touchedFields: !1,
539
- isValidating: !1,
540
- isValid: !1,
541
- errors: !1
542
- };
543
- let C = {
544
- ...k
545
- };
546
- const F = {
547
- array: lt(),
548
- state: lt()
549
- }, U = r.criteriaMode === Z.all, z = (s) => (a) => {
550
- clearTimeout(x), x = setTimeout(s, a);
551
- }, L = async (s) => {
552
- if (!r.disabled && (k.isValid || C.isValid || s)) {
553
- const a = r.resolver ? H((await _()).errors) : await S(i, !0);
554
- a !== t.isValid && F.state.next({
555
- isValid: a
556
- });
557
- }
558
- }, T = (s, a) => {
559
- !r.disabled && (k.isValidating || k.validatingFields || C.isValidating || C.validatingFields) && ((s || Array.from(d.mount)).forEach((u) => {
560
- u && (a ? p(t.validatingFields, u, a) : B(t.validatingFields, u));
561
- }), F.state.next({
562
- validatingFields: t.validatingFields,
563
- isValidating: !H(t.validatingFields)
564
- }));
565
- }, ee = (s, a = [], u, g, y = !0, o = !0) => {
566
- if (g && u && !r.disabled) {
567
- if (f.action = !0, o && Array.isArray(c(i, s))) {
568
- const h = u(c(i, s), g.argA, g.argB);
569
- y && p(i, s, h);
570
- }
571
- if (o && Array.isArray(c(t.errors, s))) {
572
- const h = u(c(t.errors, s), g.argA, g.argB);
573
- y && p(t.errors, s, h), Zt(t.errors, s);
574
- }
575
- if ((k.touchedFields || C.touchedFields) && o && Array.isArray(c(t.touchedFields, s))) {
576
- const h = u(c(t.touchedFields, s), g.argA, g.argB);
577
- y && p(t.touchedFields, s, h);
578
- }
579
- (k.dirtyFields || C.dirtyFields) && (t.dirtyFields = ge(n, l)), F.state.next({
580
- name: s,
581
- isDirty: J(s, a),
582
- dirtyFields: t.dirtyFields,
583
- errors: t.errors,
584
- isValid: t.isValid
585
- });
586
- } else
587
- p(l, s, a);
588
- }, V = (s, a) => {
589
- p(t.errors, s, a), F.state.next({
590
- errors: t.errors
591
- });
592
- }, G = (s) => {
593
- t.errors = s, F.state.next({
594
- errors: t.errors,
595
- isValid: !1
596
- });
597
- }, W = (s, a, u, g) => {
598
- const y = c(i, s);
599
- if (y) {
600
- const o = c(l, s, M(u) ? c(n, s) : u);
601
- M(o) || g && g.defaultChecked || a ? p(l, s, a ? o : ct(y._f)) : N(s, o), f.mount && L();
602
- }
603
- }, I = (s, a, u, g, y) => {
604
- let o = !1, h = !1;
605
- const D = {
606
- name: s
607
- };
608
- if (!r.disabled) {
609
- if (!u || g) {
610
- (k.isDirty || C.isDirty) && (h = t.isDirty, t.isDirty = D.isDirty = J(), o = h !== D.isDirty);
611
- const R = le(c(n, s), a);
612
- h = !!c(t.dirtyFields, s), R ? B(t.dirtyFields, s) : p(t.dirtyFields, s, !0), D.dirtyFields = t.dirtyFields, o = o || (k.dirtyFields || C.dirtyFields) && h !== !R;
613
- }
614
- if (u) {
615
- const R = c(t.touchedFields, s);
616
- R || (p(t.touchedFields, s, u), D.touchedFields = t.touchedFields, o = o || (k.touchedFields || C.touchedFields) && R !== u);
617
- }
618
- o && y && F.state.next(D);
619
- }
620
- return o ? D : {};
621
- }, m = (s, a, u, g) => {
622
- const y = c(t.errors, s), o = (k.isValid || C.isValid) && Q(a) && t.isValid !== a;
623
- if (r.delayError && u ? (b = z(() => V(s, u)), b(r.delayError)) : (clearTimeout(x), b = null, u ? p(t.errors, s, u) : B(t.errors, s)), (u ? !le(y, u) : y) || !H(g) || o) {
624
- const h = {
625
- ...g,
626
- ...o && Q(a) ? { isValid: a } : {},
627
- errors: t.errors,
628
- name: s
629
- };
630
- t = {
631
- ...t,
632
- ...h
633
- }, F.state.next(h);
634
- }
635
- }, _ = async (s) => {
636
- T(s, !0);
637
- const a = await r.resolver(l, r.context, zt(s || d.mount, i, r.criteriaMode, r.shouldUseNativeValidation));
638
- return T(s), a;
639
- }, A = async (s) => {
640
- const { errors: a } = await _(s);
641
- if (s)
642
- for (const u of s) {
643
- const g = c(a, u);
644
- g ? p(t.errors, u, g) : B(t.errors, u);
645
- }
646
- else
647
- t.errors = a;
648
- return a;
649
- }, S = async (s, a, u = {
650
- valid: !0
651
- }) => {
652
- for (const g in s) {
653
- const y = s[g];
654
- if (y) {
655
- const { _f: o, ...h } = y;
656
- if (o) {
657
- const D = d.array.has(o.name), R = y._f && Gt(y._f);
658
- R && k.validatingFields && T([g], !0);
659
- const X = await $e(y, d.disabled, l, U, r.shouldUseNativeValidation && !a, D);
660
- if (R && k.validatingFields && T([g]), X[o.name] && (u.valid = !1, a))
661
- break;
662
- !a && (c(X, o.name) ? D ? Dt(t.errors, X, o.name) : p(t.errors, o.name, X[o.name]) : B(t.errors, o.name));
663
- }
664
- !H(h) && await S(h, a, u);
665
- }
666
- }
667
- return u.valid;
668
- }, Y = () => {
669
- for (const s of d.unMount) {
670
- const a = c(i, s);
671
- a && (a._f.refs ? a._f.refs.every((u) => !Oe(u)) : !Oe(a._f.ref)) && Ee(s);
672
- }
673
- d.unMount = /* @__PURE__ */ new Set();
674
- }, J = (s, a) => !r.disabled && (s && a && p(l, s, a), !le(me(), n)), w = (s, a, u) => Ft(s, d, {
675
- ...f.mount ? l : M(a) ? n : se(s) ? { [s]: a } : a
676
- }, u, a), E = (s) => we(c(f.mount ? l : n, s, r.shouldUnregister ? c(n, s, []) : [])), N = (s, a, u = {}) => {
677
- const g = c(i, s);
678
- let y = a;
679
- if (g) {
680
- const o = g._f;
681
- o && (!o.disabled && p(l, s, wt(a, o)), y = Ve(o.ref) && $(a) ? "" : a, Vt(o.ref) ? [...o.ref.options].forEach((h) => h.selected = y.includes(h.value)) : o.refs ? he(o.ref) ? o.refs.forEach((h) => {
682
- (!h.defaultChecked || !h.disabled) && (Array.isArray(y) ? h.checked = !!y.find((D) => D === h.value) : h.checked = y === h.value || !!y);
683
- }) : o.refs.forEach((h) => h.checked = h.value === y) : Ge(o.ref) ? o.ref.value = "" : (o.ref.value = y, o.ref.type || F.state.next({
684
- name: s,
685
- values: O(l)
686
- })));
687
- }
688
- (u.shouldDirty || u.shouldTouch) && I(s, y, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && oe(s);
689
- }, q = (s, a, u) => {
690
- for (const g in a) {
691
- if (!a.hasOwnProperty(g))
692
- return;
693
- const y = a[g], o = s + "." + g, h = c(i, o);
694
- (d.array.has(s) || P(y) || h && !h._f) && !ue(y) ? q(o, y, u) : N(o, y, u);
695
- }
696
- }, j = (s, a, u = {}) => {
697
- const g = c(i, s), y = d.array.has(s), o = O(a);
698
- p(l, s, o), y ? (F.array.next({
699
- name: s,
700
- values: O(l)
701
- }), (k.isDirty || k.dirtyFields || C.isDirty || C.dirtyFields) && u.shouldDirty && F.state.next({
702
- name: s,
703
- dirtyFields: ge(n, l),
704
- isDirty: J(s, o)
705
- })) : g && !g._f && !$(o) ? q(s, o, u) : N(s, o, u), He(s, d) && F.state.next({ ...t }), F.state.next({
706
- name: f.mount ? s : void 0,
707
- values: O(l)
708
- });
709
- }, re = async (s) => {
710
- f.mount = !0;
711
- const a = s.target;
712
- let u = a.name, g = !0;
713
- const y = c(i, u), o = (R) => {
714
- g = Number.isNaN(R) || ue(R) && isNaN(R.getTime()) || le(R, c(l, u, R));
715
- }, h = ce(r.mode), D = ce(r.reValidateMode);
716
- if (y) {
717
- let R, X;
718
- const ve = a.type ? ct(y._f) : mt(s), ae = s.type === Fe.BLUR || s.type === Fe.FOCUS_OUT, Lt = !Yt(y._f) && !r.resolver && !c(t.errors, u) && !y._f.deps || Xt(ae, c(t.touchedFields, u), t.isSubmitted, D, h), Re = He(u, d, ae);
719
- p(l, u, ve), ae ? (y._f.onBlur && y._f.onBlur(s), b && b(0)) : y._f.onChange && y._f.onChange(s);
720
- const Ue = I(u, ve, ae), Tt = !H(Ue) || Re;
721
- if (!ae && F.state.next({
722
- name: u,
723
- type: s.type,
724
- values: O(l)
725
- }), Lt)
726
- return (k.isValid || C.isValid) && (r.mode === "onBlur" ? ae && L() : ae || L()), Tt && F.state.next({ name: u, ...Re ? {} : Ue });
727
- if (!ae && Re && F.state.next({ ...t }), r.resolver) {
728
- const { errors: it } = await _([u]);
729
- if (o(ve), g) {
730
- const It = yt(t.errors, i, u), at = yt(it, i, It.name || u);
731
- R = at.error, u = at.name, X = H(it);
732
- }
733
- } else
734
- T([u], !0), R = (await $e(y, d.disabled, l, U, r.shouldUseNativeValidation))[u], T([u]), o(ve), g && (R ? X = !1 : (k.isValid || C.isValid) && (X = await S(i, !0)));
735
- g && (y._f.deps && oe(y._f.deps), m(u, X, R, Ue));
736
- }
737
- }, ye = (s, a) => {
738
- if (c(t.errors, a) && s.focus)
739
- return s.focus(), 1;
740
- }, oe = async (s, a = {}) => {
741
- let u, g;
742
- const y = K(s);
743
- if (r.resolver) {
744
- const o = await A(M(s) ? s : y);
745
- u = H(o), g = s ? !y.some((h) => c(o, h)) : u;
746
- } else s ? (g = (await Promise.all(y.map(async (o) => {
747
- const h = c(i, o);
748
- return await S(h && h._f ? { [o]: h } : h);
749
- }))).every(Boolean), !(!g && !t.isValid) && L()) : g = u = await S(i);
750
- return F.state.next({
751
- ...!se(s) || (k.isValid || C.isValid) && u !== t.isValid ? {} : { name: s },
752
- ...r.resolver || !s ? { isValid: u } : {},
753
- errors: t.errors
754
- }), a.shouldFocus && !g && fe(i, ye, s ? y : d.mount), g;
755
- }, me = (s) => {
756
- const a = {
757
- ...f.mount ? l : n
758
- };
759
- return M(s) ? a : se(s) ? c(a, s) : s.map((u) => c(a, u));
760
- }, Je = (s, a) => ({
761
- invalid: !!c((a || t).errors, s),
762
- isDirty: !!c((a || t).dirtyFields, s),
763
- error: c((a || t).errors, s),
764
- isValidating: !!c(t.validatingFields, s),
765
- isTouched: !!c((a || t).touchedFields, s)
766
- }), Et = (s) => {
767
- s && K(s).forEach((a) => B(t.errors, a)), F.state.next({
768
- errors: s ? t.errors : {}
769
- });
770
- }, Qe = (s, a, u) => {
771
- const g = (c(i, s, { _f: {} })._f || {}).ref, y = c(t.errors, s) || {}, { ref: o, message: h, type: D, ...R } = y;
772
- p(t.errors, s, {
773
- ...R,
774
- ...a,
775
- ref: g
776
- }), F.state.next({
777
- name: s,
778
- errors: t.errors,
779
- isValid: !1
780
- }), u && u.shouldFocus && g && g.focus && g.focus();
781
- }, pt = (s, a) => te(s) ? F.state.subscribe({
782
- next: (u) => s(w(void 0, a), u)
783
- }) : w(s, a, !0), Xe = (s) => F.state.subscribe({
784
- next: (a) => {
785
- Qt(s.name, a.name, s.exact) && Jt(a, s.formState || k, Mt, s.reRenderRoot) && s.callback({
786
- values: { ...l },
787
- ...t,
788
- ...a
789
- });
790
- }
791
- }).unsubscribe, Ct = (s) => (f.mount = !0, C = {
792
- ...C,
793
- ...s.formState
794
- }, Xe({
795
- ...s,
796
- formState: C
797
- })), Ee = (s, a = {}) => {
798
- for (const u of s ? K(s) : d.mount)
799
- d.mount.delete(u), d.array.delete(u), a.keepValue || (B(i, u), B(l, u)), !a.keepError && B(t.errors, u), !a.keepDirty && B(t.dirtyFields, u), !a.keepTouched && B(t.touchedFields, u), !a.keepIsValidating && B(t.validatingFields, u), !r.shouldUnregister && !a.keepDefaultValue && B(n, u);
800
- F.state.next({
801
- values: O(l)
802
- }), F.state.next({
803
- ...t,
804
- ...a.keepDirty ? { isDirty: J() } : {}
805
- }), !a.keepIsValid && L();
806
- }, Ze = ({ disabled: s, name: a }) => {
807
- (Q(s) && f.mount || s || d.disabled.has(a)) && (s ? d.disabled.add(a) : d.disabled.delete(a));
808
- }, pe = (s, a = {}) => {
809
- let u = c(i, s);
810
- const g = Q(a.disabled) || Q(r.disabled);
811
- return p(i, s, {
812
- ...u || {},
813
- _f: {
814
- ...u && u._f ? u._f : { ref: { name: s } },
815
- name: s,
816
- mount: !0,
817
- ...a
818
- }
819
- }), d.mount.add(s), u ? Ze({
820
- disabled: Q(a.disabled) ? a.disabled : r.disabled,
821
- name: s
822
- }) : W(s, !0, a.value), {
823
- ...g ? { disabled: a.disabled || r.disabled } : {},
824
- ...r.progressive ? {
825
- required: !!a.required,
826
- min: _e(a.min),
827
- max: _e(a.max),
828
- minLength: _e(a.minLength),
829
- maxLength: _e(a.maxLength),
830
- pattern: _e(a.pattern)
831
- } : {},
832
- name: s,
833
- onChange: re,
834
- onBlur: re,
835
- ref: (y) => {
836
- if (y) {
837
- pe(s, a), u = c(i, s);
838
- const o = M(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, h = $t(o), D = u._f.refs || [];
839
- if (h ? D.find((R) => R === o) : o === u._f.ref)
840
- return;
841
- p(i, s, {
842
- _f: {
843
- ...u._f,
844
- ...h ? {
845
- refs: [
846
- ...D.filter(Oe),
847
- o,
848
- ...Array.isArray(c(n, s)) ? [{}] : []
849
- ],
850
- ref: { type: o.type, name: s }
851
- } : { ref: o }
852
- }
853
- }), W(s, !1, void 0, o);
854
- } else
855
- u = c(i, s, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(vt(d.array, s) && f.action) && d.unMount.add(s);
856
- }
857
- };
858
- }, Ce = () => r.shouldFocusError && fe(i, ye, d.mount), Rt = (s) => {
859
- Q(s) && (F.state.next({ disabled: s }), fe(i, (a, u) => {
860
- const g = c(i, u);
861
- g && (a.disabled = g._f.disabled || s, Array.isArray(g._f.refs) && g._f.refs.forEach((y) => {
862
- y.disabled = g._f.disabled || s;
863
- }));
864
- }, 0, !1));
865
- }, et = (s, a) => async (u) => {
866
- let g;
867
- u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
868
- let y = O(l);
869
- if (F.state.next({
870
- isSubmitting: !0
871
- }), r.resolver) {
872
- const { errors: o, values: h } = await _();
873
- t.errors = o, y = O(h);
874
- } else
875
- await S(i);
876
- if (d.disabled.size)
877
- for (const o of d.disabled)
878
- B(y, o);
879
- if (B(t.errors, "root"), H(t.errors)) {
880
- F.state.next({
881
- errors: {}
882
- });
883
- try {
884
- await s(y, u);
885
- } catch (o) {
886
- g = o;
887
- }
888
- } else
889
- a && await a({ ...t.errors }, u), Ce(), setTimeout(Ce);
890
- if (F.state.next({
891
- isSubmitted: !0,
892
- isSubmitting: !1,
893
- isSubmitSuccessful: H(t.errors) && !g,
894
- submitCount: t.submitCount + 1,
895
- errors: t.errors
896
- }), g)
897
- throw g;
898
- }, Ut = (s, a = {}) => {
899
- c(i, s) && (M(a.defaultValue) ? j(s, O(c(n, s))) : (j(s, a.defaultValue), p(n, s, O(a.defaultValue))), a.keepTouched || B(t.touchedFields, s), a.keepDirty || (B(t.dirtyFields, s), t.isDirty = a.defaultValue ? J(s, O(c(n, s))) : J()), a.keepError || (B(t.errors, s), k.isValid && L()), F.state.next({ ...t }));
900
- }, tt = (s, a = {}) => {
901
- const u = s ? O(s) : n, g = O(u), y = H(s), o = y ? n : g;
902
- if (a.keepDefaultValues || (n = u), !a.keepValues) {
903
- if (a.keepDirtyValues) {
904
- const h = /* @__PURE__ */ new Set([
905
- ...d.mount,
906
- ...Object.keys(ge(n, l))
907
- ]);
908
- for (const D of Array.from(h))
909
- c(t.dirtyFields, D) ? p(o, D, c(l, D)) : j(D, c(o, D));
910
- } else {
911
- if (je && M(s))
912
- for (const h of d.mount) {
913
- const D = c(i, h);
914
- if (D && D._f) {
915
- const R = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref;
916
- if (Ve(R)) {
917
- const X = R.closest("form");
918
- if (X) {
919
- X.reset();
920
- break;
921
- }
922
- }
923
- }
924
- }
925
- if (a.keepFieldsRef)
926
- for (const h of d.mount)
927
- j(h, c(o, h));
928
- else
929
- i = {};
930
- }
931
- l = r.shouldUnregister ? a.keepDefaultValues ? O(n) : {} : O(o), F.array.next({
932
- values: { ...o }
933
- }), F.state.next({
934
- values: { ...o }
935
- });
936
- }
937
- d = {
938
- mount: a.keepDirtyValues ? d.mount : /* @__PURE__ */ new Set(),
939
- unMount: /* @__PURE__ */ new Set(),
940
- array: /* @__PURE__ */ new Set(),
941
- disabled: /* @__PURE__ */ new Set(),
942
- watch: /* @__PURE__ */ new Set(),
943
- watchAll: !1,
944
- focus: ""
945
- }, f.mount = !k.isValid || !!a.keepIsValid || !!a.keepDirtyValues, f.watch = !!r.shouldUnregister, F.state.next({
946
- submitCount: a.keepSubmitCount ? t.submitCount : 0,
947
- isDirty: y ? !1 : a.keepDirty ? t.isDirty : !!(a.keepDefaultValues && !le(s, n)),
948
- isSubmitted: a.keepIsSubmitted ? t.isSubmitted : !1,
949
- dirtyFields: y ? {} : a.keepDirtyValues ? a.keepDefaultValues && l ? ge(n, l) : t.dirtyFields : a.keepDefaultValues && s ? ge(n, s) : a.keepDirty ? t.dirtyFields : {},
950
- touchedFields: a.keepTouched ? t.touchedFields : {},
951
- errors: a.keepErrors ? t.errors : {},
952
- isSubmitSuccessful: a.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
953
- isSubmitting: !1
954
- });
955
- }, rt = (s, a) => tt(te(s) ? s(l) : s, a), Ot = (s, a = {}) => {
956
- const u = c(i, s), g = u && u._f;
957
- if (g) {
958
- const y = g.refs ? g.refs[0] : g.ref;
959
- y.focus && (y.focus(), a.shouldSelect && te(y.select) && y.select());
960
- }
961
- }, Mt = (s) => {
962
- t = {
963
- ...t,
964
- ...s
965
- };
966
- }, st = {
967
- control: {
968
- register: pe,
969
- unregister: Ee,
970
- getFieldState: Je,
971
- handleSubmit: et,
972
- setError: Qe,
973
- _subscribe: Xe,
974
- _runSchema: _,
975
- _focusError: Ce,
976
- _getWatch: w,
977
- _getDirty: J,
978
- _setValid: L,
979
- _setFieldArray: ee,
980
- _setDisabledField: Ze,
981
- _setErrors: G,
982
- _getFieldArray: E,
983
- _reset: tt,
984
- _resetDefaultValues: () => te(r.defaultValues) && r.defaultValues().then((s) => {
985
- rt(s, r.resetOptions), F.state.next({
986
- isLoading: !1
987
- });
988
- }),
989
- _removeUnmounted: Y,
990
- _disableForm: Rt,
991
- _subjects: F,
992
- _proxyFormState: k,
993
- get _fields() {
994
- return i;
995
- },
996
- get _formValues() {
997
- return l;
998
- },
999
- get _state() {
1000
- return f;
1001
- },
1002
- set _state(s) {
1003
- f = s;
1004
- },
1005
- get _defaultValues() {
1006
- return n;
1007
- },
1008
- get _names() {
1009
- return d;
1010
- },
1011
- set _names(s) {
1012
- d = s;
1013
- },
1014
- get _formState() {
1015
- return t;
1016
- },
1017
- get _options() {
1018
- return r;
1019
- },
1020
- set _options(s) {
1021
- r = {
1022
- ...r,
1023
- ...s
1024
- };
1025
- }
1026
- },
1027
- subscribe: Ct,
1028
- trigger: oe,
1029
- register: pe,
1030
- handleSubmit: et,
1031
- watch: pt,
1032
- setValue: j,
1033
- getValues: me,
1034
- reset: rt,
1035
- resetField: Ut,
1036
- clearErrors: Et,
1037
- unregister: Ee,
1038
- setError: Qe,
1039
- setFocus: Ot,
1040
- getFieldState: Je
1041
- };
1042
- return {
1043
- ...st,
1044
- formControl: st
1045
- };
1046
- }
1047
- var ne = () => {
1048
- if (typeof crypto < "u" && crypto.randomUUID)
1049
- return crypto.randomUUID();
1050
- const e = typeof performance > "u" ? Date.now() : performance.now() * 1e3;
1051
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
1052
- const t = (Math.random() * 16 + e) % 16 | 0;
1053
- return (r == "x" ? t : t & 3 | 8).toString(16);
1054
- });
1055
- }, Me = (e, r, t = {}) => t.shouldFocus || M(t.shouldFocus) ? t.focusName || `${e}.${M(t.focusIndex) ? r : t.focusIndex}.` : "", Le = (e, r) => [
1056
- ...e,
1057
- ...K(r)
1058
- ], Te = (e) => Array.isArray(e) ? e.map(() => {
1059
- }) : void 0;
1060
- function Ie(e, r, t) {
1061
- return [
1062
- ...e.slice(0, r),
1063
- ...K(t),
1064
- ...e.slice(r)
1065
- ];
1066
- }
1067
- var Ne = (e, r, t) => Array.isArray(e) ? (M(e[t]) && (e[t] = void 0), e.splice(t, 0, e.splice(r, 1)[0]), e) : [], Be = (e, r) => [
1068
- ...K(r),
1069
- ...K(e)
1070
- ];
1071
- function rr(e, r) {
1072
- let t = 0;
1073
- const i = [...e];
1074
- for (const n of r)
1075
- i.splice(n - t, 1), t++;
1076
- return we(i).length ? i : [];
1077
- }
1078
- var Pe = (e, r) => M(r) ? [] : rr(e, K(r).sort((t, i) => t - i)), We = (e, r, t) => {
1079
- [e[r], e[t]] = [e[t], e[r]];
1080
- }, _t = (e, r, t) => (e[r] = t, e);
1081
- function lr(e) {
1082
- const r = ke(), { control: t = r.control, name: i, keyName: n = "id", shouldUnregister: l, rules: f } = e, [d, b] = v.useState(t._getFieldArray(i)), x = v.useRef(t._getFieldArray(i).map(ne)), k = v.useRef(d), C = v.useRef(i), F = v.useRef(!1);
1083
- C.current = i, k.current = d, t._names.array.add(i), f && t.register(i, f), De(() => t._subjects.array.subscribe({
1084
- next: ({ values: m, name: _ }) => {
1085
- if (_ === C.current || !_) {
1086
- const A = c(m, C.current);
1087
- Array.isArray(A) && (b(A), x.current = A.map(ne));
1088
- }
1089
- }
1090
- }).unsubscribe, [t]);
1091
- const U = v.useCallback((m) => {
1092
- F.current = !0, t._setFieldArray(i, m);
1093
- }, [t, i]), z = (m, _) => {
1094
- const A = K(O(m)), S = Le(t._getFieldArray(i), A);
1095
- t._names.focus = Me(i, S.length - 1, _), x.current = Le(x.current, A.map(ne)), U(S), b(S), t._setFieldArray(i, S, Le, {
1096
- argA: Te(m)
1097
- });
1098
- }, L = (m, _) => {
1099
- const A = K(O(m)), S = Be(t._getFieldArray(i), A);
1100
- t._names.focus = Me(i, 0, _), x.current = Be(x.current, A.map(ne)), U(S), b(S), t._setFieldArray(i, S, Be, {
1101
- argA: Te(m)
1102
- });
1103
- }, T = (m) => {
1104
- const _ = Pe(t._getFieldArray(i), m);
1105
- x.current = Pe(x.current, m), U(_), b(_), !Array.isArray(c(t._fields, i)) && p(t._fields, i, void 0), t._setFieldArray(i, _, Pe, {
1106
- argA: m
1107
- });
1108
- }, ee = (m, _, A) => {
1109
- const S = K(O(_)), Y = Ie(t._getFieldArray(i), m, S);
1110
- t._names.focus = Me(i, m, A), x.current = Ie(x.current, m, S.map(ne)), U(Y), b(Y), t._setFieldArray(i, Y, Ie, {
1111
- argA: m,
1112
- argB: Te(_)
1113
- });
1114
- }, V = (m, _) => {
1115
- const A = t._getFieldArray(i);
1116
- We(A, m, _), We(x.current, m, _), U(A), b(A), t._setFieldArray(i, A, We, {
1117
- argA: m,
1118
- argB: _
1119
- }, !1);
1120
- }, G = (m, _) => {
1121
- const A = t._getFieldArray(i);
1122
- Ne(A, m, _), Ne(x.current, m, _), U(A), b(A), t._setFieldArray(i, A, Ne, {
1123
- argA: m,
1124
- argB: _
1125
- }, !1);
1126
- }, W = (m, _) => {
1127
- const A = O(_), S = _t(t._getFieldArray(i), m, A);
1128
- x.current = [...S].map((Y, J) => !Y || J === m ? ne() : x.current[J]), U(S), b([...S]), t._setFieldArray(i, S, _t, {
1129
- argA: m,
1130
- argB: A
1131
- }, !0, !1);
1132
- }, I = (m) => {
1133
- const _ = K(O(m));
1134
- x.current = _.map(ne), U([..._]), b([..._]), t._setFieldArray(i, [..._], (A) => A, {}, !0, !1);
1135
- };
1136
- return v.useEffect(() => {
1137
- if (t._state.action = !1, He(i, t._names) && t._subjects.state.next({
1138
- ...t._formState
1139
- }), F.current && (!ce(t._options.mode).isOnSubmit || t._formState.isSubmitted) && !ce(t._options.reValidateMode).isOnSubmit)
1140
- if (t._options.resolver)
1141
- t._runSchema([i]).then((m) => {
1142
- const _ = c(m.errors, i), A = c(t._formState.errors, i);
1143
- (A ? !_ && A.type || _ && (A.type !== _.type || A.message !== _.message) : _ && _.type) && (_ ? p(t._formState.errors, i, _) : B(t._formState.errors, i), t._subjects.state.next({
1144
- errors: t._formState.errors
1145
- }));
1146
- });
1147
- else {
1148
- const m = c(t._fields, i);
1149
- m && m._f && !(ce(t._options.reValidateMode).isOnSubmit && ce(t._options.mode).isOnSubmit) && $e(m, t._names.disabled, t._formValues, t._options.criteriaMode === Z.all, t._options.shouldUseNativeValidation, !0).then((_) => !H(_) && t._subjects.state.next({
1150
- errors: Dt(t._formState.errors, _, i)
1151
- }));
1152
- }
1153
- t._subjects.state.next({
1154
- name: i,
1155
- values: O(t._formValues)
1156
- }), t._names.focus && fe(t._fields, (m, _) => {
1157
- if (t._names.focus && _.startsWith(t._names.focus) && m.focus)
1158
- return m.focus(), 1;
1159
- }), t._names.focus = "", t._setValid(), F.current = !1;
1160
- }, [d, i, t]), v.useEffect(() => (!c(t._formValues, i) && t._setFieldArray(i), () => {
1161
- const m = (_, A) => {
1162
- const S = c(t._fields, _);
1163
- S && S._f && (S._f.mount = A);
1164
- };
1165
- t._options.shouldUnregister || l ? t.unregister(i) : m(i, !1);
1166
- }), [i, t, n, l]), {
1167
- swap: v.useCallback(V, [U, i, t]),
1168
- move: v.useCallback(G, [U, i, t]),
1169
- prepend: v.useCallback(L, [U, i, t]),
1170
- append: v.useCallback(z, [U, i, t]),
1171
- remove: v.useCallback(T, [U, i, t]),
1172
- insert: v.useCallback(ee, [U, i, t]),
1173
- update: v.useCallback(W, [U, i, t]),
1174
- replace: v.useCallback(I, [U, i, t]),
1175
- fields: v.useMemo(() => d.map((m, _) => ({
1176
- ...m,
1177
- [n]: x.current[_] || ne()
1178
- })), [d, n])
1179
- };
1180
- }
1181
- function ur(e = {}) {
1182
- const r = v.useRef(void 0), t = v.useRef(void 0), [i, n] = v.useState({
1183
- isDirty: !1,
1184
- isValidating: !1,
1185
- isLoading: te(e.defaultValues),
1186
- isSubmitted: !1,
1187
- isSubmitting: !1,
1188
- isSubmitSuccessful: !1,
1189
- isValid: !1,
1190
- submitCount: 0,
1191
- dirtyFields: {},
1192
- touchedFields: {},
1193
- validatingFields: {},
1194
- errors: e.errors || {},
1195
- disabled: e.disabled || !1,
1196
- isReady: !1,
1197
- defaultValues: te(e.defaultValues) ? void 0 : e.defaultValues
1198
- });
1199
- if (!r.current)
1200
- if (e.formControl)
1201
- r.current = {
1202
- ...e.formControl,
1203
- formState: i
1204
- }, e.defaultValues && !te(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1205
- else {
1206
- const { formControl: f, ...d } = tr(e);
1207
- r.current = {
1208
- ...d,
1209
- formState: i
1210
- };
1211
- }
1212
- const l = r.current.control;
1213
- return l._options = e, De(() => {
1214
- const f = l._subscribe({
1215
- formState: l._proxyFormState,
1216
- callback: () => n({ ...l._formState }),
1217
- reRenderRoot: !0
1218
- });
1219
- return n((d) => ({
1220
- ...d,
1221
- isReady: !0
1222
- })), l._formState.isReady = !0, f;
1223
- }, [l]), v.useEffect(() => l._disableForm(e.disabled), [l, e.disabled]), v.useEffect(() => {
1224
- e.mode && (l._options.mode = e.mode), e.reValidateMode && (l._options.reValidateMode = e.reValidateMode);
1225
- }, [l, e.mode, e.reValidateMode]), v.useEffect(() => {
1226
- e.errors && (l._setErrors(e.errors), l._focusError());
1227
- }, [l, e.errors]), v.useEffect(() => {
1228
- e.shouldUnregister && l._subjects.state.next({
1229
- values: l._getWatch()
1230
- });
1231
- }, [l, e.shouldUnregister]), v.useEffect(() => {
1232
- if (l._proxyFormState.isDirty) {
1233
- const f = l._getDirty();
1234
- f !== i.isDirty && l._subjects.state.next({
1235
- isDirty: f
1236
- });
1237
- }
1238
- }, [l, i.isDirty]), v.useEffect(() => {
1239
- e.values && !le(e.values, t.current) ? (l._reset(e.values, {
1240
- keepFieldsRef: !0,
1241
- ...l._options.resetOptions
1242
- }), t.current = e.values, n((f) => ({ ...f }))) : l._resetDefaultValues();
1243
- }, [l, e.values]), v.useEffect(() => {
1244
- l._state.mount || (l._setValid(), l._state.mount = !0), l._state.watch && (l._state.watch = !1, l._subjects.state.next({ ...l._formState })), l._removeUnmounted();
1245
- }), r.current.formState = bt(i, l), r.current;
1246
- }
1247
- export {
1248
- nr as C,
1249
- ar as F,
1250
- ur as a,
1251
- lr as b,
1252
- ke as u
1253
- };
1254
- //# sourceMappingURL=index.esm-CdzlRw50.js.map