fromsrc 0.0.2 → 0.0.21

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 (408) hide show
  1. package/dist/access.d.ts +7 -7
  2. package/dist/access.js +12 -5
  3. package/dist/adapter.js +8 -16
  4. package/dist/adapterbrowser.js +6 -10
  5. package/dist/adapternext.js +7 -18
  6. package/dist/adapterreactrouter.js +5 -9
  7. package/dist/adapterremix.js +8 -17
  8. package/dist/adaptertanstack.js +6 -10
  9. package/dist/algolia.js +43 -21
  10. package/dist/analytics.d.ts +1 -1
  11. package/dist/analytics.js +16 -10
  12. package/dist/ansi.js +76 -37
  13. package/dist/api.d.ts +10 -10
  14. package/dist/api.js +14 -11
  15. package/dist/audit.d.ts +6 -6
  16. package/dist/audit.js +29 -10
  17. package/dist/autotype.js +20 -10
  18. package/dist/batch.d.ts +6 -6
  19. package/dist/batch.js +16 -9
  20. package/dist/changelog.js +28 -14
  21. package/dist/changelogutil.d.ts +4 -4
  22. package/dist/changelogutil.js +33 -13
  23. package/dist/cli.d.ts +6 -6
  24. package/dist/cli.js +7 -3
  25. package/dist/client.d.ts +1 -1
  26. package/dist/codesample.d.ts +4 -4
  27. package/dist/codesample.js +63 -24
  28. package/dist/collapse.js +31 -13
  29. package/dist/collections.js +36 -16
  30. package/dist/components/accordion.d.ts +1 -1
  31. package/dist/components/accordion.js +5 -1
  32. package/dist/components/alert.d.ts +1 -1
  33. package/dist/components/alert.js +24 -13
  34. package/dist/components/announce.js +40 -17
  35. package/dist/components/autofill.js +17 -7
  36. package/dist/components/avatar.js +4 -4
  37. package/dist/components/avatarstack.js +2 -2
  38. package/dist/components/backtotop.d.ts +1 -1
  39. package/dist/components/backtotop.js +17 -4
  40. package/dist/components/badge.js +9 -4
  41. package/dist/components/banner.js +22 -5
  42. package/dist/components/breadcrumb.js +11 -4
  43. package/dist/components/breadcrumbnav.js +37 -21
  44. package/dist/components/button.js +23 -8
  45. package/dist/components/callout.d.ts +1 -1
  46. package/dist/components/callout.js +33 -29
  47. package/dist/components/changelog.js +21 -8
  48. package/dist/components/checkbox.js +32 -19
  49. package/dist/components/code.d.ts +1 -1
  50. package/dist/components/code.js +6 -3
  51. package/dist/components/codeblock.js +157 -39
  52. package/dist/components/codecopy.d.ts +1 -1
  53. package/dist/components/codecopy.js +36 -13
  54. package/dist/components/codegroup.js +87 -25
  55. package/dist/components/collapsible.d.ts +1 -1
  56. package/dist/components/collapsible.js +5 -1
  57. package/dist/components/command.d.ts +1 -1
  58. package/dist/components/command.js +42 -15
  59. package/dist/components/compare.js +20 -8
  60. package/dist/components/content.js +121 -79
  61. package/dist/components/copybutton.d.ts +1 -1
  62. package/dist/components/copybutton.js +14 -7
  63. package/dist/components/countdown.js +9 -3
  64. package/dist/components/create.js +34 -24
  65. package/dist/components/definition.js +11 -4
  66. package/dist/components/diffview.js +63 -29
  67. package/dist/components/divider.js +5 -1
  68. package/dist/components/docheader.js +8 -1
  69. package/dist/components/doclinkcard.js +27 -3
  70. package/dist/components/dropdown.d.ts +1 -1
  71. package/dist/components/dropdown.js +32 -11
  72. package/dist/components/dynamiccode.js +5 -3
  73. package/dist/components/editlink.js +35 -23
  74. package/dist/components/embed.js +15 -7
  75. package/dist/components/endpoint.d.ts +3 -3
  76. package/dist/components/endpoint.js +24 -9
  77. package/dist/components/errormessage.d.ts +1 -1
  78. package/dist/components/errormessage.js +4 -1
  79. package/dist/components/expandcode.d.ts +1 -1
  80. package/dist/components/expandcode.js +6 -2
  81. package/dist/components/feature.js +8 -1
  82. package/dist/components/featuregrid.d.ts +4 -4
  83. package/dist/components/featuregrid.js +7 -1
  84. package/dist/components/feedback.js +6 -2
  85. package/dist/components/feedbackwidget.js +10 -4
  86. package/dist/components/files.d.ts +1 -1
  87. package/dist/components/files.js +52 -18
  88. package/dist/components/folder.d.ts +1 -1
  89. package/dist/components/folder.js +21 -4
  90. package/dist/components/footer.js +5 -1
  91. package/dist/components/formlabel.d.ts +1 -1
  92. package/dist/components/formlabel.js +31 -18
  93. package/dist/components/github.js +43 -14
  94. package/dist/components/graph.js +38 -14
  95. package/dist/components/heading.js +36 -29
  96. package/dist/components/headingcopy.js +13 -5
  97. package/dist/components/hero.js +20 -14
  98. package/dist/components/highlight.d.ts +2 -2
  99. package/dist/components/highlight.js +14 -8
  100. package/dist/components/hover.d.ts +2 -2
  101. package/dist/components/hover.js +11 -4
  102. package/dist/components/icons.js +4 -1
  103. package/dist/components/inlinetoc.js +3 -1
  104. package/dist/components/input.js +13 -3
  105. package/dist/components/install.js +34 -24
  106. package/dist/components/kbd.js +19 -11
  107. package/dist/components/langicon.d.ts +1 -1
  108. package/dist/components/langicon.js +22 -17
  109. package/dist/components/language.d.ts +1 -1
  110. package/dist/components/language.js +12 -4
  111. package/dist/components/lastupdated.d.ts +2 -2
  112. package/dist/components/lastupdated.js +36 -12
  113. package/dist/components/link.d.ts +1 -1
  114. package/dist/components/linkcard.js +3 -1
  115. package/dist/components/list.d.ts +1 -1
  116. package/dist/components/list.js +4 -1
  117. package/dist/components/math.js +33 -8
  118. package/dist/components/mermaid.js +3 -3
  119. package/dist/components/mobilenav.d.ts +2 -1
  120. package/dist/components/mobilenav.js +116 -47
  121. package/dist/components/modal.d.ts +1 -1
  122. package/dist/components/modal.js +9 -2
  123. package/dist/components/navlink.js +17 -3
  124. package/dist/components/openapi.d.ts +1 -1
  125. package/dist/components/openapi.js +102 -32
  126. package/dist/components/openapischema.d.ts +1 -1
  127. package/dist/components/openapischema.js +29 -9
  128. package/dist/components/openapitags.js +6 -2
  129. package/dist/components/pagetransition.js +5 -3
  130. package/dist/components/pagination.js +3 -2
  131. package/dist/components/panel.js +91 -15
  132. package/dist/components/playground.d.ts +1 -1
  133. package/dist/components/playground.js +153 -50
  134. package/dist/components/popover.js +9 -7
  135. package/dist/components/prelink.js +40 -9
  136. package/dist/components/prevnext.d.ts +1 -1
  137. package/dist/components/prevnext.js +36 -16
  138. package/dist/components/progress.js +2 -2
  139. package/dist/components/property.js +3 -1
  140. package/dist/components/quote.d.ts +2 -2
  141. package/dist/components/quote.js +32 -4
  142. package/dist/components/radio.js +36 -18
  143. package/dist/components/rating.js +14 -3
  144. package/dist/components/recent.d.ts +1 -1
  145. package/dist/components/recent.js +26 -10
  146. package/dist/components/responsive.js +21 -13
  147. package/dist/components/results.js +8 -4
  148. package/dist/components/screenshot.js +61 -21
  149. package/dist/components/scrollprogress.js +9 -5
  150. package/dist/components/scrollspy.d.ts +2 -2
  151. package/dist/components/scrollspy.js +9 -3
  152. package/dist/components/search.js +47 -18
  153. package/dist/components/searchbutton.js +3 -1
  154. package/dist/components/searchdialog.js +35 -22
  155. package/dist/components/searcher.d.ts +1 -1
  156. package/dist/components/searcher.js +51 -26
  157. package/dist/components/select.js +27 -13
  158. package/dist/components/shortcuts.d.ts +1 -1
  159. package/dist/components/shortcuts.js +57 -38
  160. package/dist/components/sidebar.d.ts +2 -1
  161. package/dist/components/sidebar.js +221 -56
  162. package/dist/components/sidebarfilter.d.ts +1 -1
  163. package/dist/components/sidebarfilter.js +30 -6
  164. package/dist/components/sidebarscript.d.ts +5 -0
  165. package/dist/components/sidebarscript.js +18 -0
  166. package/dist/components/skeleton.js +15 -3
  167. package/dist/components/spinner.js +13 -3
  168. package/dist/components/status.js +20 -8
  169. package/dist/components/steps.js +3 -1
  170. package/dist/components/switch.js +4 -4
  171. package/dist/components/table.js +37 -12
  172. package/dist/components/tabnav.d.ts +1 -1
  173. package/dist/components/tabnav.js +48 -36
  174. package/dist/components/tabs.d.ts +1 -1
  175. package/dist/components/tabs.js +56 -40
  176. package/dist/components/tag.js +8 -3
  177. package/dist/components/terminal.js +14 -4
  178. package/dist/components/textarea.js +96 -82
  179. package/dist/components/theme.d.ts +1 -1
  180. package/dist/components/theme.js +25 -3
  181. package/dist/components/themeprovider.d.ts +4 -4
  182. package/dist/components/themeprovider.js +16 -5
  183. package/dist/components/toast.d.ts +1 -1
  184. package/dist/components/toast.js +23 -14
  185. package/dist/components/toc/default.d.ts +1 -1
  186. package/dist/components/toc/default.js +28 -13
  187. package/dist/components/toc/hook.js +28 -14
  188. package/dist/components/toc/index.js +8 -4
  189. package/dist/components/toc/inline.js +12 -2
  190. package/dist/components/toc/minimal.js +11 -5
  191. package/dist/components/toc/zigzag.d.ts +1 -1
  192. package/dist/components/toc/zigzag.js +37 -17
  193. package/dist/components/tocprogress.d.ts +1 -1
  194. package/dist/components/tocprogress.js +66 -34
  195. package/dist/components/tooltip.d.ts +1 -1
  196. package/dist/components/tooltip.js +20 -8
  197. package/dist/components/trigger.js +13 -5
  198. package/dist/components/twoslash.js +49 -26
  199. package/dist/components/typetable.js +23 -4
  200. package/dist/components/typewriter.js +6 -2
  201. package/dist/components/version.js +40 -14
  202. package/dist/components/video.js +25 -15
  203. package/dist/components/zoom.js +6 -2
  204. package/dist/config.d.ts +2 -2
  205. package/dist/config.js +56 -30
  206. package/dist/content.d.ts +5 -5
  207. package/dist/content.js +121 -57
  208. package/dist/contentcache.d.ts +10 -10
  209. package/dist/contentcache.js +9 -5
  210. package/dist/contentdiff.d.ts +4 -4
  211. package/dist/contentdiff.js +16 -8
  212. package/dist/contributors.d.ts +4 -4
  213. package/dist/contributors.js +49 -19
  214. package/dist/diff.d.ts +6 -6
  215. package/dist/diff.js +37 -16
  216. package/dist/draft.d.ts +11 -11
  217. package/dist/draft.js +9 -5
  218. package/dist/env.js +21 -7
  219. package/dist/export.js +4 -4
  220. package/dist/frontmatter.js +11 -9
  221. package/dist/github.js +60 -30
  222. package/dist/gitsource.d.ts +1 -1
  223. package/dist/gitsource.js +16 -9
  224. package/dist/hash.d.ts +6 -6
  225. package/dist/hash.js +19 -7
  226. package/dist/highlight.d.ts +4 -4
  227. package/dist/highlight.js +34 -14
  228. package/dist/hooks/anchor.js +26 -14
  229. package/dist/hooks/arrownav.js +25 -7
  230. package/dist/hooks/async.js +3 -3
  231. package/dist/hooks/battery.js +11 -3
  232. package/dist/hooks/breakpoint.js +10 -2
  233. package/dist/hooks/clickoutside.js +10 -3
  234. package/dist/hooks/clipboard-paste.js +7 -3
  235. package/dist/hooks/clipboard.d.ts +2 -2
  236. package/dist/hooks/clipboard.js +21 -15
  237. package/dist/hooks/copy.js +11 -6
  238. package/dist/hooks/countdown.js +1 -1
  239. package/dist/hooks/counter.js +1 -1
  240. package/dist/hooks/escapekey.js +6 -1
  241. package/dist/hooks/eventlistener.js +3 -1
  242. package/dist/hooks/eventsource.js +4 -2
  243. package/dist/hooks/eyedropper.js +7 -3
  244. package/dist/hooks/favicon.js +1 -1
  245. package/dist/hooks/fetch.js +12 -4
  246. package/dist/hooks/focustrap.js +20 -8
  247. package/dist/hooks/focuswithin.js +6 -2
  248. package/dist/hooks/form.d.ts +2 -2
  249. package/dist/hooks/form.js +15 -2
  250. package/dist/hooks/fullscreen.js +1 -1
  251. package/dist/hooks/geolocation.js +8 -8
  252. package/dist/hooks/hotkeys.js +19 -7
  253. package/dist/hooks/hover.d.ts +4 -1
  254. package/dist/hooks/hover.js +3 -1
  255. package/dist/hooks/idle.js +13 -3
  256. package/dist/hooks/infinitescroll.js +4 -2
  257. package/dist/hooks/interval.js +3 -1
  258. package/dist/hooks/inview.js +7 -3
  259. package/dist/hooks/keyboard.js +36 -12
  260. package/dist/hooks/keypress.js +6 -2
  261. package/dist/hooks/list.js +11 -1
  262. package/dist/hooks/longpress.js +3 -3
  263. package/dist/hooks/map.js +1 -1
  264. package/dist/hooks/measure.js +16 -7
  265. package/dist/hooks/mediarecorder.js +7 -3
  266. package/dist/hooks/networkstate.js +4 -2
  267. package/dist/hooks/os.js +12 -4
  268. package/dist/hooks/pagination.js +6 -4
  269. package/dist/hooks/permission.js +6 -2
  270. package/dist/hooks/queue.js +4 -2
  271. package/dist/hooks/readprogress.js +6 -2
  272. package/dist/hooks/resizeobserver.js +6 -4
  273. package/dist/hooks/script.js +1 -1
  274. package/dist/hooks/scrolllock.js +6 -2
  275. package/dist/hooks/scrollspy.js +4 -2
  276. package/dist/hooks/selection.js +6 -3
  277. package/dist/hooks/share.js +18 -9
  278. package/dist/hooks/speechrecognition.js +7 -3
  279. package/dist/hooks/stepper.js +4 -4
  280. package/dist/hooks/storage.js +9 -3
  281. package/dist/hooks/stylesheet.js +4 -2
  282. package/dist/hooks/textselection.js +6 -3
  283. package/dist/hooks/throttle.js +6 -2
  284. package/dist/hooks/undoredo.js +19 -11
  285. package/dist/hooks/vibrate.js +3 -1
  286. package/dist/hooks/viewtransition.js +8 -4
  287. package/dist/hooks/wakelock.js +12 -7
  288. package/dist/hooks/websocket.js +4 -2
  289. package/dist/hooks/windowsize.js +2 -2
  290. package/dist/i18n.d.ts +2 -2
  291. package/dist/i18n.js +27 -14
  292. package/dist/index.d.ts +1 -0
  293. package/dist/index.js +1 -0
  294. package/dist/lastmodified.js +11 -5
  295. package/dist/linkcheck.d.ts +6 -6
  296. package/dist/linkcheck.js +55 -14
  297. package/dist/llms.js +20 -4
  298. package/dist/manifest.js +7 -7
  299. package/dist/mcp.js +28 -22
  300. package/dist/mdtoc.d.ts +4 -4
  301. package/dist/mdtoc.js +11 -5
  302. package/dist/mdxscope.d.ts +2 -2
  303. package/dist/mdxscope.js +3 -1
  304. package/dist/meta.js +19 -7
  305. package/dist/migrate.js +35 -25
  306. package/dist/navgen.d.ts +8 -8
  307. package/dist/navgen.js +73 -30
  308. package/dist/navtree.d.ts +1 -1
  309. package/dist/navtree.js +39 -19
  310. package/dist/oembed.d.ts +4 -4
  311. package/dist/oembed.js +24 -18
  312. package/dist/ogimage.d.ts +11 -11
  313. package/dist/ogimage.js +24 -24
  314. package/dist/openapi.js +60 -33
  315. package/dist/openapiguard.js +21 -11
  316. package/dist/openapiutil.js +66 -20
  317. package/dist/orama.js +52 -34
  318. package/dist/pipeline.d.ts +4 -4
  319. package/dist/pipeline.js +4 -4
  320. package/dist/preload.d.ts +2 -2
  321. package/dist/preload.js +4 -4
  322. package/dist/ranking.d.ts +6 -6
  323. package/dist/ranking.js +39 -13
  324. package/dist/readtime.js +3 -1
  325. package/dist/redirects.d.ts +2 -2
  326. package/dist/redirects.js +20 -12
  327. package/dist/rehype.js +16 -9
  328. package/dist/rehypeautolink.d.ts +2 -2
  329. package/dist/rehypeautolink.js +25 -23
  330. package/dist/rehypecode.js +38 -28
  331. package/dist/rehypecopy.js +17 -13
  332. package/dist/rehypeinline.js +33 -27
  333. package/dist/rehypelinks.js +28 -20
  334. package/dist/rehyperaw.js +9 -3
  335. package/dist/rehypeslug.d.ts +1 -1
  336. package/dist/rehypeslug.js +23 -19
  337. package/dist/rehypetablewrap.d.ts +2 -2
  338. package/dist/rehypetablewrap.js +9 -5
  339. package/dist/rehypetoc.d.ts +1 -1
  340. package/dist/rehypetoc.js +15 -7
  341. package/dist/remark.js +28 -13
  342. package/dist/remarkadmonition.js +40 -14
  343. package/dist/remarkannotation.d.ts +2 -2
  344. package/dist/remarkannotation.js +26 -10
  345. package/dist/remarkbadge.js +43 -31
  346. package/dist/remarkblockmath.js +29 -15
  347. package/dist/remarkcallout.js +32 -14
  348. package/dist/remarkcaption.js +28 -16
  349. package/dist/remarkcodetitle.js +29 -13
  350. package/dist/remarkcolumns.js +22 -10
  351. package/dist/remarkdetails.js +34 -14
  352. package/dist/remarkdirective.js +47 -20
  353. package/dist/remarkembed.js +38 -22
  354. package/dist/remarkfiletree.js +29 -19
  355. package/dist/remarkfootnote.js +46 -18
  356. package/dist/remarkgfm.js +13 -8
  357. package/dist/remarkheadingid.js +16 -6
  358. package/dist/remarkimage.js +54 -34
  359. package/dist/remarkinclude.js +20 -8
  360. package/dist/remarkinstall.js +20 -12
  361. package/dist/remarklinkcard.js +33 -14
  362. package/dist/remarkmath.js +34 -15
  363. package/dist/remarkmermaid.js +10 -6
  364. package/dist/remarkmeta.d.ts +2 -2
  365. package/dist/remarkmeta.js +15 -5
  366. package/dist/remarkreadingtime.d.ts +2 -2
  367. package/dist/remarkreadingtime.js +3 -1
  368. package/dist/remarksteps.js +26 -14
  369. package/dist/remarkstructure.js +16 -10
  370. package/dist/remarktabs.js +31 -14
  371. package/dist/remarktoc.js +40 -24
  372. package/dist/remarkts2js.js +51 -40
  373. package/dist/remarktwoslash.d.ts +4 -4
  374. package/dist/remarktwoslash.js +24 -14
  375. package/dist/remarkvideo.d.ts +4 -4
  376. package/dist/remarkvideo.js +42 -16
  377. package/dist/schema.d.ts +14 -14
  378. package/dist/schema.js +2 -2
  379. package/dist/search.js +106 -48
  380. package/dist/searchindex.js +86 -34
  381. package/dist/searchpolicy.js +1 -1
  382. package/dist/searchscore.js +5 -5
  383. package/dist/searchtypo.js +30 -10
  384. package/dist/seo.d.ts +2 -2
  385. package/dist/seo.js +14 -14
  386. package/dist/shortcodes.d.ts +4 -4
  387. package/dist/shortcodes.js +25 -20
  388. package/dist/sitemap.js +18 -8
  389. package/dist/snippets.js +26 -18
  390. package/dist/source.js +75 -41
  391. package/dist/stats.d.ts +4 -4
  392. package/dist/stats.js +18 -12
  393. package/dist/testing.d.ts +7 -7
  394. package/dist/testing.js +74 -29
  395. package/dist/themeutil.d.ts +6 -6
  396. package/dist/themeutil.js +145 -27
  397. package/dist/typegen.js +31 -12
  398. package/dist/validate.js +19 -7
  399. package/dist/validator.d.ts +11 -11
  400. package/dist/validator.js +68 -19
  401. package/dist/versioning.d.ts +7 -7
  402. package/dist/versioning.js +27 -11
  403. package/dist/watcher.js +39 -15
  404. package/dist/webhook.d.ts +6 -6
  405. package/dist/webhook.js +34 -12
  406. package/dist/workspace.js +26 -12
  407. package/package.json +137 -137
  408. package/styles/reset.css +1 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import Link from 'next/link';
4
4
  import { useState, useRef, useEffect, useCallback } from 'react';
5
5
  import { Folder } from './folder';
@@ -13,15 +13,46 @@ function Sidebar({
13
13
  basePath = "/docs",
14
14
  github,
15
15
  collapsible,
16
- defaultOpenLevel = 0
16
+ defaultOpenLevel = 0,
17
+ width = 268
17
18
  }) {
18
19
  const [collapsed, setCollapsed] = useState(false);
20
+ const [mounted, setMounted] = useState(false);
19
21
  const [hovered, setHovered] = useState(false);
20
22
  const leaveTimer = useRef(null);
23
+ const floatingTimer = useRef(null);
24
+ const [floating, setFloating] = useState(false);
25
+ const containerRef = useRef(null);
26
+ const widthvalue = `${width}px`;
21
27
  useEffect(() => {
22
- const stored = localStorage.getItem("sidebar-collapsed");
23
- if (stored === "true") setCollapsed(true);
28
+ const stored = localStorage.getItem("sidebar-collapsed") === "true";
29
+ setCollapsed(stored);
30
+ if (containerRef.current) {
31
+ delete containerRef.current.dataset.sidebarHide;
32
+ }
33
+ const style = document.getElementById("sidebar-hide");
34
+ if (style) {
35
+ style.remove();
36
+ }
37
+ requestAnimationFrame(() => setMounted(true));
24
38
  }, []);
39
+ useEffect(() => {
40
+ if (floatingTimer.current) {
41
+ clearTimeout(floatingTimer.current);
42
+ floatingTimer.current = null;
43
+ }
44
+ if (!collapsed || hovered) {
45
+ setFloating(false);
46
+ return;
47
+ }
48
+ floatingTimer.current = setTimeout(() => setFloating(true), 220);
49
+ return () => {
50
+ if (floatingTimer.current) {
51
+ clearTimeout(floatingTimer.current);
52
+ floatingTimer.current = null;
53
+ }
54
+ };
55
+ }, [collapsed, hovered]);
25
56
  const toggle = useCallback(() => {
26
57
  setCollapsed((prev) => {
27
58
  const next = !prev;
@@ -30,43 +61,77 @@ function Sidebar({
30
61
  });
31
62
  }, []);
32
63
  const showExpanded = !collapsed || hovered;
33
- const handleEnter = useCallback(() => {
34
- if (leaveTimer.current) {
35
- clearTimeout(leaveTimer.current);
36
- leaveTimer.current = null;
37
- }
38
- if (collapsed) setHovered(true);
39
- }, [collapsed]);
40
- const handleLeave = useCallback(() => {
41
- leaveTimer.current = setTimeout(() => setHovered(false), 150);
42
- }, []);
43
- useEffect(() => {
44
- return () => {
64
+ const handleEnter = useCallback(
65
+ (event) => {
66
+ if (event?.pointerType === "touch") {
67
+ return;
68
+ }
45
69
  if (leaveTimer.current) {
46
70
  clearTimeout(leaveTimer.current);
47
71
  leaveTimer.current = null;
48
72
  }
49
- };
50
- }, []);
73
+ if (collapsed) {
74
+ setHovered(true);
75
+ }
76
+ },
77
+ [collapsed]
78
+ );
79
+ const handleLeave = useCallback(
80
+ (event) => {
81
+ if (event.pointerType === "touch") {
82
+ return;
83
+ }
84
+ if (event.clientX <= 0) {
85
+ return;
86
+ }
87
+ const distance = Math.min(
88
+ event.clientX,
89
+ document.body.clientWidth - event.clientX
90
+ );
91
+ const delay = distance > 100 ? 0 : 500;
92
+ leaveTimer.current = setTimeout(() => setHovered(false), delay);
93
+ },
94
+ []
95
+ );
96
+ useEffect(
97
+ () => () => {
98
+ if (leaveTimer.current) {
99
+ clearTimeout(leaveTimer.current);
100
+ leaveTimer.current = null;
101
+ }
102
+ if (floatingTimer.current) {
103
+ clearTimeout(floatingTimer.current);
104
+ floatingTimer.current = null;
105
+ }
106
+ },
107
+ []
108
+ );
51
109
  const openSearch = useCallback(() => {
52
- const event = new KeyboardEvent("keydown", { key: "k", metaKey: true, bubbles: true });
110
+ const event = new KeyboardEvent("keydown", {
111
+ bubbles: true,
112
+ key: "k",
113
+ metaKey: true
114
+ });
53
115
  window.dispatchEvent(event);
54
116
  }, []);
55
- const translateClass = collapsed ? hovered ? "translate-x-0 shadow-xl" : "-translate-x-[268px]" : "translate-x-0";
56
- return /* @__PURE__ */ jsxs(Fragment, { children: [
57
- /* @__PURE__ */ jsx("div", { className: "hidden lg:block shrink-0 w-[268px]" }),
117
+ const shadow = collapsed && hovered ? "shadow-xl" : "";
118
+ const translate = collapsed && !hovered ? `translateX(-${width}px)` : "translateX(0px)";
119
+ const transition = mounted ? "transition-[transform,box-shadow] duration-250 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : "";
120
+ return /* @__PURE__ */ jsxs("div", { ref: containerRef, "data-sidebar-container": "", children: [
121
+ /* @__PURE__ */ jsx("div", { className: "hidden lg:block shrink-0", style: { width: widthvalue } }),
58
122
  /* @__PURE__ */ jsxs(
59
123
  "div",
60
124
  {
61
- className: "hidden lg:block fixed left-0 top-0 z-40 h-screen w-[268px] pointer-events-none",
62
- onMouseEnter: handleEnter,
63
- onMouseLeave: handleLeave,
125
+ className: "hidden lg:block fixed left-0 top-0 z-40 h-screen pointer-events-none",
126
+ style: { width: widthvalue },
64
127
  children: [
65
128
  collapsed && /* @__PURE__ */ jsx(
66
129
  "div",
67
130
  {
68
- className: "fixed inset-y-0 left-0 w-6 pointer-events-auto z-40",
69
- onMouseEnter: handleEnter
131
+ className: "fixed inset-y-0 left-0 pointer-events-auto z-40",
132
+ style: { width: hovered ? widthvalue : "3px" },
133
+ onPointerEnter: handleEnter,
134
+ onPointerLeave: handleLeave
70
135
  }
71
136
  ),
72
137
  /* @__PURE__ */ jsxs(
@@ -74,7 +139,12 @@ function Sidebar({
74
139
  {
75
140
  "aria-label": "sidebar navigation",
76
141
  "aria-expanded": showExpanded,
77
- className: `${translateClass} w-[268px] h-full flex flex-col bg-bg border-r border-line transition-[transform,box-shadow] duration-250 ease-[cubic-bezier(0.25,0.1,0.25,1)] pointer-events-auto`,
142
+ "data-collapsed": collapsed,
143
+ "data-hovered": collapsed && hovered,
144
+ className: `${shadow} h-full flex flex-col bg-bg border-r border-line ${transition} pointer-events-auto`,
145
+ style: { transform: translate, width: widthvalue },
146
+ onPointerEnter: handleEnter,
147
+ onPointerLeave: handleLeave,
78
148
  children: [
79
149
  /* @__PURE__ */ jsx(
80
150
  SidebarHeader,
@@ -102,32 +172,57 @@ function Sidebar({
102
172
  ]
103
173
  }
104
174
  ),
105
- collapsed && !hovered && /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex fixed left-0 top-0 z-50 flex-col gap-1 p-3 pointer-events-auto", children: [
175
+ mounted && floating && /* @__PURE__ */ jsx("div", { className: "hidden lg:flex fixed left-0 top-0 z-50 p-3 pointer-events-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col rounded-lg border border-line bg-surface/80 backdrop-blur-sm overflow-hidden", children: [
106
176
  /* @__PURE__ */ jsx(
107
177
  "button",
108
178
  {
109
179
  type: "button",
110
180
  onClick: toggle,
111
- className: "w-9 h-9 flex items-center justify-center rounded-lg border border-line bg-surface/80 text-muted hover:text-fg hover:bg-surface transition-colors backdrop-blur-sm",
181
+ className: "w-9 h-9 flex items-center justify-center text-muted hover:text-fg hover:bg-surface transition-colors",
112
182
  "aria-label": "expand sidebar",
113
183
  children: /* @__PURE__ */ jsx(IconPanelLeft, { size: 16 })
114
184
  }
115
185
  ),
186
+ /* @__PURE__ */ jsx("div", { className: "h-px bg-line" }),
116
187
  /* @__PURE__ */ jsx(
117
188
  "button",
118
189
  {
119
190
  type: "button",
120
191
  onClick: openSearch,
121
- className: "w-9 h-9 flex items-center justify-center rounded-lg border border-line bg-surface/80 text-muted hover:text-fg hover:bg-surface transition-colors backdrop-blur-sm",
192
+ className: "w-9 h-9 flex items-center justify-center text-muted hover:text-fg hover:bg-surface transition-colors",
122
193
  "aria-label": "open search",
123
194
  "aria-keyshortcuts": "Meta+K",
124
- children: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) })
195
+ children: /* @__PURE__ */ jsx(
196
+ "svg",
197
+ {
198
+ className: "w-4 h-4",
199
+ fill: "none",
200
+ viewBox: "0 0 24 24",
201
+ stroke: "currentColor",
202
+ "aria-hidden": "true",
203
+ children: /* @__PURE__ */ jsx(
204
+ "path",
205
+ {
206
+ strokeLinecap: "round",
207
+ strokeLinejoin: "round",
208
+ strokeWidth: 2,
209
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
210
+ }
211
+ )
212
+ }
213
+ )
125
214
  }
126
215
  )
127
- ] })
216
+ ] }) })
128
217
  ] });
129
218
  }
130
- function SidebarHeader({ title, logo, collapsible, collapsed, onToggle }) {
219
+ function SidebarHeader({
220
+ title,
221
+ logo,
222
+ collapsible,
223
+ collapsed,
224
+ onToggle
225
+ }) {
131
226
  return /* @__PURE__ */ jsxs("div", { className: "px-4 h-14 flex items-center", children: [
132
227
  collapsible && /* @__PURE__ */ jsx(
133
228
  "button",
@@ -153,7 +248,10 @@ function SidebarHeader({ title, logo, collapsible, collapsed, onToggle }) {
153
248
  )
154
249
  ] });
155
250
  }
156
- function SidebarSearch({ showExpanded, onOpen }) {
251
+ function SidebarSearch({
252
+ showExpanded,
253
+ onOpen
254
+ }) {
157
255
  return /* @__PURE__ */ jsx("div", { className: "px-4 pb-2 flex items-center", children: /* @__PURE__ */ jsxs(
158
256
  "button",
159
257
  {
@@ -163,31 +261,89 @@ function SidebarSearch({ showExpanded, onOpen }) {
163
261
  "aria-label": "open search",
164
262
  "aria-keyshortcuts": "Meta+K",
165
263
  children: [
166
- /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }),
264
+ /* @__PURE__ */ jsx(
265
+ "svg",
266
+ {
267
+ className: "w-4 h-4 shrink-0",
268
+ fill: "none",
269
+ viewBox: "0 0 24 24",
270
+ stroke: "currentColor",
271
+ "aria-hidden": "true",
272
+ children: /* @__PURE__ */ jsx(
273
+ "path",
274
+ {
275
+ strokeLinecap: "round",
276
+ strokeLinejoin: "round",
277
+ strokeWidth: 2,
278
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
279
+ }
280
+ )
281
+ }
282
+ ),
167
283
  /* @__PURE__ */ jsx("span", { className: `text-sm ${showExpanded ? "block" : "hidden"}`, children: "search..." }),
168
- /* @__PURE__ */ jsx("kbd", { className: `ml-auto text-[10px] font-mono text-muted/50 ${showExpanded ? "block" : "hidden"}`, children: "\u2318K" })
284
+ /* @__PURE__ */ jsx(
285
+ "kbd",
286
+ {
287
+ className: `ml-auto text-[10px] font-mono text-muted/50 ${showExpanded ? "block" : "hidden"}`,
288
+ children: "\u2318K"
289
+ }
290
+ )
169
291
  ]
170
292
  }
171
293
  ) });
172
294
  }
173
- function SidebarNav({ navigation, basePath, defaultOpenLevel }) {
295
+ function SidebarNav({
296
+ navigation,
297
+ basePath,
298
+ defaultOpenLevel
299
+ }) {
174
300
  return /* @__PURE__ */ jsx(
175
301
  "nav",
176
302
  {
177
303
  "aria-label": "documentation",
178
304
  className: "px-4 pt-2 pb-8 flex-1 min-h-0 overflow-y-auto overflow-x-hidden overscroll-contain [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
179
- children: navigation.map((section) => /* @__PURE__ */ jsxs("section", { className: "mb-6", "aria-labelledby": `section-${section.title}`, children: [
180
- /* @__PURE__ */ jsx("h3", { id: `section-${section.title}`, className: "px-2 mb-2 text-xs font-medium text-muted/70 whitespace-nowrap", children: section.title }),
181
- /* @__PURE__ */ jsx("ul", { role: "list", className: "space-y-px", children: section.items.map((item, i) => {
182
- if (!("type" in item)) {
183
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: item.slug ? `${basePath}/${item.slug}` : basePath, children: item.title }) }, item.slug || i);
184
- }
185
- if (item.type === "folder") {
186
- return /* @__PURE__ */ jsx(Folder, { folder: item, basePath, depth: 1, defaultOpenLevel }, i);
187
- }
188
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: item.href, icon: item.icon, children: item.title }) }, i);
189
- }) })
190
- ] }, section.title))
305
+ children: navigation.map((section) => /* @__PURE__ */ jsxs(
306
+ "section",
307
+ {
308
+ className: "mb-6",
309
+ "aria-labelledby": `section-${section.title}`,
310
+ children: [
311
+ /* @__PURE__ */ jsx(
312
+ "h3",
313
+ {
314
+ id: `section-${section.title}`,
315
+ className: "px-2 mb-2 text-xs font-medium text-muted/70 whitespace-nowrap",
316
+ children: section.title
317
+ }
318
+ ),
319
+ /* @__PURE__ */ jsx("ul", { role: "list", className: "space-y-px", children: section.items.map((item, i) => {
320
+ if (!("type" in item)) {
321
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
322
+ NavLink,
323
+ {
324
+ href: item.slug ? `${basePath}/${item.slug}` : basePath,
325
+ children: item.title
326
+ }
327
+ ) }, item.slug || i);
328
+ }
329
+ if (item.type === "folder") {
330
+ return /* @__PURE__ */ jsx(
331
+ Folder,
332
+ {
333
+ folder: item,
334
+ basePath,
335
+ depth: 1,
336
+ defaultOpenLevel
337
+ },
338
+ i
339
+ );
340
+ }
341
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: item.href, icon: item.icon, children: item.title }) }, i);
342
+ }) })
343
+ ]
344
+ },
345
+ section.title
346
+ ))
191
347
  }
192
348
  );
193
349
  }
@@ -200,14 +356,23 @@ function SidebarFooter({ github }) {
200
356
  rel: "noopener noreferrer",
201
357
  "aria-label": "view on github",
202
358
  className: "w-9 h-9 flex items-center justify-center rounded-lg text-muted hover:text-fg hover:bg-surface/50 transition-colors",
203
- children: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
204
- "path",
359
+ children: /* @__PURE__ */ jsx(
360
+ "svg",
205
361
  {
206
- fillRule: "evenodd",
207
- d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",
208
- clipRule: "evenodd"
362
+ className: "w-4 h-4",
363
+ fill: "currentColor",
364
+ viewBox: "0 0 24 24",
365
+ "aria-hidden": "true",
366
+ children: /* @__PURE__ */ jsx(
367
+ "path",
368
+ {
369
+ fillRule: "evenodd",
370
+ d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",
371
+ clipRule: "evenodd"
372
+ }
373
+ )
209
374
  }
210
- ) })
375
+ )
211
376
  }
212
377
  ) });
213
378
  }
@@ -5,7 +5,7 @@ import 'zod';
5
5
  import '../schema.js';
6
6
 
7
7
  declare function filternavigation(nav: SidebarSection[], q: string): SidebarSection[];
8
- declare function SidebarFilter({ value, onChange }: {
8
+ declare function SidebarFilter({ value, onChange, }: {
9
9
  value: string;
10
10
  onChange: (v: string) => void;
11
11
  }): ReactNode;
@@ -3,20 +3,32 @@ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useRef, useCallback } from 'react';
4
4
 
5
5
  const matches = (text, q) => text.toLowerCase().includes(q.toLowerCase());
6
- const foldermatches = (f, q) => matches(f.title, q) || f.items.some((i) => i.type === "folder" ? foldermatches(i, q) : matches(i.title, q));
6
+ const foldermatches = (f, q) => matches(f.title, q) || f.items.some(
7
+ (i) => i.type === "folder" ? foldermatches(i, q) : matches(i.title, q)
8
+ );
7
9
  function filternavigation(nav, q) {
8
- if (!q) return nav;
10
+ if (!q) {
11
+ return nav;
12
+ }
9
13
  return nav.map((s) => ({
10
14
  ...s,
11
15
  items: s.items.filter((i) => {
12
- if (!("type" in i)) return matches(i.title, q);
16
+ if (!("type" in i)) {
17
+ return matches(i.title, q);
18
+ }
13
19
  return i.type === "folder" ? foldermatches(i, q) : matches(i.title, q);
14
20
  })
15
21
  })).filter((s) => s.items.length > 0);
16
22
  }
17
- function SidebarFilter({ value, onChange }) {
23
+ function SidebarFilter({
24
+ value,
25
+ onChange
26
+ }) {
18
27
  const ref = useRef(null);
19
- const handle = useCallback((e) => onChange(e.target.value), [onChange]);
28
+ const handle = useCallback(
29
+ (e) => onChange(e.target.value),
30
+ [onChange]
31
+ );
20
32
  const clear = useCallback(() => {
21
33
  onChange("");
22
34
  ref.current?.focus();
@@ -41,7 +53,19 @@ function SidebarFilter({ value, onChange }) {
41
53
  onClick: clear,
42
54
  "aria-label": "clear filter",
43
55
  className: "absolute right-1.5 top-1/2 -translate-y-1/2 w-5 h-5 flex items-center justify-center text-muted hover:text-fg transition-colors",
44
- children: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
56
+ children: /* @__PURE__ */ jsx(
57
+ "svg",
58
+ {
59
+ className: "w-3 h-3",
60
+ viewBox: "0 0 24 24",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ strokeWidth: 2,
64
+ strokeLinecap: "round",
65
+ "aria-hidden": "true",
66
+ children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
67
+ }
68
+ )
45
69
  }
46
70
  )
47
71
  ] });
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ declare function SidebarScript(): ReactNode;
4
+
5
+ export { SidebarScript };
@@ -0,0 +1,18 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+
3
+ const css = `html[data-sidebar-collapsed] [data-sidebar-container]{visibility:hidden}`;
4
+ const code = `(function(){try{if(localStorage.getItem("sidebar-collapsed")==="true"){document.documentElement.setAttribute("data-sidebar-collapsed","")}}catch(e){}})()`;
5
+ function SidebarScript() {
6
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7
+ /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: css } }),
8
+ /* @__PURE__ */ jsx(
9
+ "script",
10
+ {
11
+ suppressHydrationWarning: true,
12
+ dangerouslySetInnerHTML: { __html: code }
13
+ }
14
+ )
15
+ ] });
16
+ }
17
+
18
+ export { SidebarScript };
@@ -14,8 +14,8 @@ const Skeleton = memo(function Skeleton2({
14
14
  {
15
15
  className: `animate-pulse bg-surface ${radiusClass} ${className}`,
16
16
  style: {
17
- width: typeof width === "number" ? `${width}px` : width,
18
17
  height: typeof height === "number" ? `${height}px` : height,
18
+ width: typeof width === "number" ? `${width}px` : width,
19
19
  willChange: "opacity"
20
20
  },
21
21
  role: "status",
@@ -33,8 +33,20 @@ const SkeletonText = memo(function SkeletonText2({
33
33
  "div",
34
34
  {
35
35
  className: "space-y-2",
36
- ...standalone && { role: "status", "aria-busy": true, "aria-label": label },
37
- children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { width: i === lines - 1 ? "75%" : "100%", height: "0.875rem", label: "" }, i))
36
+ ...standalone && {
37
+ "aria-busy": true,
38
+ "aria-label": label,
39
+ role: "status"
40
+ },
41
+ children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx(
42
+ Skeleton,
43
+ {
44
+ width: i === lines - 1 ? "75%" : "100%",
45
+ height: "0.875rem",
46
+ label: ""
47
+ },
48
+ i
49
+ ))
38
50
  }
39
51
  );
40
52
  });
@@ -2,9 +2,9 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { memo } from 'react';
3
3
 
4
4
  const sizes = {
5
- sm: "size-4",
5
+ lg: "size-8",
6
6
  md: "size-6",
7
- lg: "size-8"
7
+ sm: "size-4"
8
8
  };
9
9
  const Spinner = memo(function Spinner2({
10
10
  size = "md",
@@ -21,7 +21,17 @@ const Spinner = memo(function Spinner2({
21
21
  "aria-label": ariaHidden ? void 0 : "Loading",
22
22
  "aria-hidden": ariaHidden,
23
23
  children: [
24
- /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
24
+ /* @__PURE__ */ jsx(
25
+ "circle",
26
+ {
27
+ className: "opacity-25",
28
+ cx: "12",
29
+ cy: "12",
30
+ r: "10",
31
+ stroke: "currentColor",
32
+ strokeWidth: "4"
33
+ }
34
+ ),
25
35
  /* @__PURE__ */ jsx(
26
36
  "path",
27
37
  {
@@ -3,18 +3,18 @@ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
 
5
5
  const statusStyles = {
6
- success: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20",
7
- warning: "bg-amber-500/10 text-amber-400 border-amber-500/20",
8
6
  error: "bg-red-500/10 text-red-400 border-red-500/20",
9
7
  info: "bg-blue-500/10 text-blue-400 border-blue-500/20",
10
- neutral: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20"
8
+ neutral: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20",
9
+ success: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20",
10
+ warning: "bg-amber-500/10 text-amber-400 border-amber-500/20"
11
11
  };
12
12
  const dotStyles = {
13
- success: "bg-emerald-400",
14
- warning: "bg-amber-400",
15
13
  error: "bg-red-400",
16
14
  info: "bg-blue-400",
17
- neutral: "bg-zinc-400"
15
+ neutral: "bg-zinc-400",
16
+ success: "bg-emerald-400",
17
+ warning: "bg-amber-400"
18
18
  };
19
19
  const Status = memo(function Status2({
20
20
  type = "neutral",
@@ -28,7 +28,13 @@ const Status = memo(function Status2({
28
28
  "aria-live": "polite",
29
29
  className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full border ${statusStyles[type]}`,
30
30
  children: [
31
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: `w-1.5 h-1.5 rounded-full ${dotStyles[type]}` }),
31
+ /* @__PURE__ */ jsx(
32
+ "span",
33
+ {
34
+ "aria-hidden": "true",
35
+ className: `w-1.5 h-1.5 rounded-full ${dotStyles[type]}`
36
+ }
37
+ ),
32
38
  children
33
39
  ]
34
40
  }
@@ -47,7 +53,13 @@ const StatusDot = memo(function StatusDot2({
47
53
  "aria-live": "polite",
48
54
  className: "relative inline-flex",
49
55
  children: [
50
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: `w-2 h-2 rounded-full ${dotStyles[type]}` }),
56
+ /* @__PURE__ */ jsx(
57
+ "span",
58
+ {
59
+ "aria-hidden": "true",
60
+ className: `w-2 h-2 rounded-full ${dotStyles[type]}`
61
+ }
62
+ ),
51
63
  pulse && /* @__PURE__ */ jsx(
52
64
  "span",
53
65
  {
@@ -2,7 +2,9 @@
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
 
5
- const Steps = memo(function Steps2({ children }) {
5
+ const Steps = memo(function Steps2({
6
+ children
7
+ }) {
6
8
  return /* @__PURE__ */ jsx("div", { className: "steps my-6 ml-4 border-l border-line pl-6 [counter-reset:step]", children });
7
9
  });
8
10
  const Step = memo(function Step2({ children }) {
@@ -4,14 +4,14 @@ import { memo, useId } from 'react';
4
4
  import { FormLabel } from './formlabel';
5
5
 
6
6
  const trackSizes = {
7
- sm: "h-4 w-7",
7
+ lg: "h-6 w-11",
8
8
  md: "h-5 w-9",
9
- lg: "h-6 w-11"
9
+ sm: "h-4 w-7"
10
10
  };
11
11
  const thumbSizes = {
12
- sm: { size: "size-3", translate: "translate-x-3" },
12
+ lg: { size: "size-5", translate: "translate-x-5" },
13
13
  md: { size: "size-4", translate: "translate-x-4" },
14
- lg: { size: "size-5", translate: "translate-x-5" }
14
+ sm: { size: "size-3", translate: "translate-x-3" }
15
15
  };
16
16
  function SwitchComponent({
17
17
  checked = false,