@takazudo/zudo-doc 5.28.2 → 6.0.1

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 (511) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +49 -16
  3. package/bin/gen-z-index.mjs +18 -18
  4. package/dist/agent-docs/identity.d.ts +4 -0
  5. package/dist/agent-docs/identity.js +24 -0
  6. package/dist/agent-docs/index.d.ts +5 -0
  7. package/dist/agent-docs/index.js +5 -0
  8. package/dist/agent-docs/limits.d.ts +11 -0
  9. package/dist/agent-docs/limits.js +24 -0
  10. package/dist/agent-docs/search.d.ts +14 -0
  11. package/dist/agent-docs/search.js +82 -0
  12. package/dist/agent-docs/tokenize.d.ts +2 -0
  13. package/dist/agent-docs/tokenize.js +22 -0
  14. package/dist/agent-docs/types.d.ts +68 -0
  15. package/dist/agent-docs/types.js +0 -0
  16. package/dist/ai-chat-modal/index.d.ts +1 -4
  17. package/dist/ai-chat-modal/index.js +183 -123
  18. package/dist/asset-components/asset-card.d.ts +1 -2
  19. package/dist/asset-components/asset-card.js +12 -12
  20. package/dist/asset-components/asset-code.d.ts +1 -2
  21. package/dist/asset-components/asset-code.js +10 -10
  22. package/dist/asset-components/shared.d.ts +3 -4
  23. package/dist/asset-components/shared.js +4 -4
  24. package/dist/asset-index-page/body.d.ts +5 -6
  25. package/dist/asset-index-page/body.js +6 -6
  26. package/dist/asset-index-page/index.d.ts +1 -2
  27. package/dist/asset-index-page/index.js +1 -1
  28. package/dist/asset-page/body.d.ts +5 -9
  29. package/dist/asset-page/body.js +3 -3
  30. package/dist/asset-page/components.d.ts +16 -17
  31. package/dist/asset-page/components.js +10 -9
  32. package/dist/asset-page/index.d.ts +1 -2
  33. package/dist/asset-page/index.js +1 -1
  34. package/dist/auto-logo/index.d.ts +1 -2
  35. package/dist/auto-logo/index.js +2 -2
  36. package/dist/body-foot-util/body-foot-util-area.d.ts +3 -4
  37. package/dist/body-foot-util/body-foot-util-area.js +1 -2
  38. package/dist/body-foot-util/edit-link.d.ts +2 -3
  39. package/dist/body-foot-util/edit-link.js +1 -2
  40. package/dist/breadcrumb/breadcrumb.d.ts +6 -6
  41. package/dist/breadcrumb/breadcrumb.js +3 -4
  42. package/dist/catalog.js +1 -1
  43. package/dist/category-nav/index.d.ts +1 -2
  44. package/dist/category-nav/index.js +11 -5
  45. package/dist/category-tree-nav/index.d.ts +1 -2
  46. package/dist/category-tree-nav/index.js +3 -3
  47. package/dist/chrome/derive.d.ts +18 -27
  48. package/dist/chrome/derive.js +47 -29
  49. package/dist/chrome/index.d.ts +5 -5
  50. package/dist/chrome/index.js +1 -1
  51. package/dist/chrome/island-data.d.ts +4 -0
  52. package/dist/chrome/island-data.js +52 -0
  53. package/dist/chrome/primary-slots.d.ts +2 -3
  54. package/dist/chrome-bindings.d.ts +30 -22
  55. package/dist/code-group/index.d.ts +3 -4
  56. package/dist/code-group/index.js +3 -7
  57. package/dist/code-syntax/code-block-enhancer.d.ts +1 -2
  58. package/dist/code-syntax/code-block-enhancer.js +2 -2
  59. package/dist/code-syntax/mermaid-init.d.ts +1 -2
  60. package/dist/code-syntax/mermaid-init.js +5 -2
  61. package/dist/code-syntax/tabs-init-script.js +1 -1
  62. package/dist/code-syntax/tabs-init.d.ts +1 -2
  63. package/dist/code-syntax/tabs-init.js +2 -2
  64. package/dist/code-syntax/tabs.d.ts +6 -6
  65. package/dist/code-syntax/tabs.js +8 -8
  66. package/dist/compiled.css +2937 -2942
  67. package/dist/config/component-tokens.d.ts +1 -1
  68. package/dist/config/component-tokens.js +22 -0
  69. package/dist/config-assertions/index.d.ts +13 -0
  70. package/dist/config-assertions/index.js +14 -0
  71. package/dist/config.d.ts +36 -17
  72. package/dist/config.js +23 -95
  73. package/dist/content/content-blockquote.d.ts +2 -3
  74. package/dist/content/content-blockquote.js +3 -3
  75. package/dist/content/content-code.d.ts +3 -4
  76. package/dist/content/content-code.js +5 -5
  77. package/dist/content/content-link.d.ts +3 -4
  78. package/dist/content/content-link.js +10 -10
  79. package/dist/content/content-ol.d.ts +2 -3
  80. package/dist/content/content-ol.js +5 -4
  81. package/dist/content/content-paragraph.d.ts +2 -3
  82. package/dist/content/content-paragraph.js +1 -1
  83. package/dist/content/content-strong.d.ts +2 -3
  84. package/dist/content/content-strong.js +3 -3
  85. package/dist/content/content-table.d.ts +2 -3
  86. package/dist/content/content-table.js +4 -4
  87. package/dist/content/content-ul.d.ts +2 -3
  88. package/dist/content/content-ul.js +4 -4
  89. package/dist/content/heading-h2.d.ts +2 -3
  90. package/dist/content/heading-h2.js +4 -4
  91. package/dist/content/heading-h3.d.ts +2 -3
  92. package/dist/content/heading-h3.js +4 -4
  93. package/dist/content/heading-h4.d.ts +2 -3
  94. package/dist/content/heading-h4.js +4 -4
  95. package/dist/content-admonition/index.d.ts +3 -4
  96. package/dist/content-admonition/index.js +2 -2
  97. package/dist/content.css +35 -33
  98. package/dist/design-token-panel-bootstrap-controller.d.ts +178 -0
  99. package/dist/design-token-panel-bootstrap-controller.js +359 -0
  100. package/dist/design-token-panel-bootstrap-island.d.ts +5 -0
  101. package/dist/design-token-panel-bootstrap-island.js +19 -0
  102. package/dist/design-token-panel-bootstrap.d.ts +5 -195
  103. package/dist/design-token-panel-bootstrap.js +3 -288
  104. package/dist/desktop-sidebar-toggle-island/index.d.ts +2 -7
  105. package/dist/desktop-sidebar-toggle-island/index.js +2 -58
  106. package/dist/desktop-sidebar-toggle-island/island.d.ts +4 -0
  107. package/dist/desktop-sidebar-toggle-island/island.js +43 -0
  108. package/dist/desktop-sidebar-toggle-island/storage.d.ts +4 -0
  109. package/dist/desktop-sidebar-toggle-island/storage.js +29 -0
  110. package/dist/desktop-toc-toggle-island/index.d.ts +2 -7
  111. package/dist/desktop-toc-toggle-island/index.js +2 -58
  112. package/dist/desktop-toc-toggle-island/island.d.ts +4 -0
  113. package/dist/desktop-toc-toggle-island/island.js +43 -0
  114. package/dist/desktop-toc-toggle-island/storage.d.ts +4 -0
  115. package/dist/desktop-toc-toggle-island/storage.js +29 -0
  116. package/dist/details/details.d.ts +3 -4
  117. package/dist/details/details.js +1 -1
  118. package/dist/doc-body-end/index.d.ts +1 -2
  119. package/dist/doc-body-end/index.js +1 -1
  120. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +2 -2
  121. package/dist/doc-body-end-islands/design-token-panel-island.js +3 -7
  122. package/dist/doc-body-end-islands/index.d.ts +4 -21
  123. package/dist/doc-body-end-islands/index.js +5 -3
  124. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +3 -13
  125. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +11 -13
  126. package/dist/doc-content-header/index.d.ts +1 -2
  127. package/dist/doc-content-header/index.js +1 -1
  128. package/dist/doc-history/index.d.ts +1 -1
  129. package/dist/doc-history/index.js +166 -141
  130. package/dist/doc-history-area/index.d.ts +6 -4
  131. package/dist/doc-history-area/index.js +17 -16
  132. package/dist/doc-metainfo-area/index.d.ts +2 -3
  133. package/dist/doc-metainfo-area/index.js +1 -1
  134. package/dist/doc-page-renderer/index.d.ts +13 -7
  135. package/dist/doc-page-renderer/index.js +10 -1
  136. package/dist/doc-page-shell/index.d.ts +20 -7
  137. package/dist/doc-page-shell/index.js +17 -6
  138. package/dist/doc-pager/index.d.ts +1 -2
  139. package/dist/doc-pager/index.js +3 -3
  140. package/dist/doc-tags-area/index.d.ts +2 -3
  141. package/dist/doc-tags-area/index.js +1 -1
  142. package/dist/doclayout/doc-layout-with-defaults.d.ts +9 -9
  143. package/dist/doclayout/doc-layout-with-defaults.js +5 -15
  144. package/dist/doclayout/doc-layout.d.ts +26 -27
  145. package/dist/doclayout/doc-layout.js +23 -14
  146. package/dist/docs-schema/index.d.ts +4 -0
  147. package/dist/docs-schema/index.js +1 -0
  148. package/dist/extract-headings/index.js +43 -12
  149. package/dist/factory-context/index.d.ts +22 -19
  150. package/dist/features.css +75 -8
  151. package/dist/find-in-page/find-bar.d.ts +4 -2
  152. package/dist/find-in-page/find-bar.js +58 -69
  153. package/dist/find-in-page/index.d.ts +2 -8
  154. package/dist/find-in-page/index.js +33 -30
  155. package/dist/footer/footer.d.ts +3 -4
  156. package/dist/footer/footer.js +3 -3
  157. package/dist/footer-with-defaults/index.d.ts +2 -3
  158. package/dist/footer-with-defaults/index.js +1 -1
  159. package/dist/frontmatter-preview-defaults/index.js +1 -0
  160. package/dist/head/doc-head.d.ts +1 -1
  161. package/dist/head/doc-head.js +24 -32
  162. package/dist/head/og-tags.d.ts +1 -1
  163. package/dist/head/og-tags.js +8 -7
  164. package/dist/head/twitter-card.d.ts +1 -1
  165. package/dist/head/twitter-card.js +1 -1
  166. package/dist/head-with-defaults/index.d.ts +7 -2
  167. package/dist/head-with-defaults/index.js +46 -32
  168. package/dist/header/header.d.ts +8 -8
  169. package/dist/header/header.js +9 -11
  170. package/dist/header/types.d.ts +7 -7
  171. package/dist/header-with-defaults/index.d.ts +3 -4
  172. package/dist/header-with-defaults/index.js +27 -14
  173. package/dist/home-intro/index.d.ts +2 -5
  174. package/dist/home-intro/index.js +7 -5
  175. package/dist/home-intro/prepare.js +4 -3
  176. package/dist/home-page/index.d.ts +3 -3
  177. package/dist/home-page/index.js +19 -17
  178. package/dist/html-preview-wrapper/highlighted-code.d.ts +3 -4
  179. package/dist/html-preview-wrapper/highlighted-code.js +19 -17
  180. package/dist/html-preview-wrapper/html-preview-wrapper.d.ts +4 -25
  181. package/dist/html-preview-wrapper/html-preview-wrapper.js +2 -87
  182. package/dist/html-preview-wrapper/html-preview.d.ts +3 -10
  183. package/dist/html-preview-wrapper/html-preview.js +13 -37
  184. package/dist/html-preview-wrapper/index.d.ts +2 -1
  185. package/dist/html-preview-wrapper/index.js +1 -1
  186. package/dist/html-preview-wrapper/preview-base.d.ts +3 -5
  187. package/dist/html-preview-wrapper/preview-base.js +56 -59
  188. package/dist/html-preview-wrapper/wrapper.d.ts +20 -0
  189. package/dist/html-preview-wrapper/wrapper.js +37 -0
  190. package/dist/hydration-pending.d.ts +3 -5
  191. package/dist/hydration-pending.js +7 -5
  192. package/dist/i18n-version/language-switcher.d.ts +5 -32
  193. package/dist/i18n-version/language-switcher.js +5 -106
  194. package/dist/i18n-version/switcher-generated-scripts.d.ts +2 -0
  195. package/dist/i18n-version/switcher-generated-scripts.js +107 -0
  196. package/dist/i18n-version/switcher-url-state.d.ts +76 -0
  197. package/dist/i18n-version/switcher-url-state.js +103 -0
  198. package/dist/i18n-version/version-banner.d.ts +2 -3
  199. package/dist/i18n-version/version-banner.js +1 -1
  200. package/dist/i18n-version/version-switcher.d.ts +5 -50
  201. package/dist/i18n-version/version-switcher.js +5 -157
  202. package/dist/icons/index.d.ts +18 -19
  203. package/dist/icons/index.js +17 -33
  204. package/dist/image-enlarge/index.d.ts +1 -10
  205. package/dist/image-enlarge/index.js +80 -55
  206. package/dist/image-enlarge/public.d.ts +2 -0
  207. package/dist/image-enlarge/public.js +6 -0
  208. package/dist/image-enlarge/ssr-fallback.d.ts +2 -0
  209. package/dist/image-enlarge/ssr-fallback.js +8 -0
  210. package/dist/index.d.ts +11 -4
  211. package/dist/inline-version-switcher/index.d.ts +1 -2
  212. package/dist/inline-version-switcher/index.js +1 -1
  213. package/dist/island-types/index.d.ts +2 -2
  214. package/dist/island-types/index.js +1 -5
  215. package/dist/math-block/index.d.ts +4 -7
  216. package/dist/math-block/index.js +5 -5
  217. package/dist/mcp/handler.d.ts +8 -0
  218. package/dist/mcp/handler.js +129 -0
  219. package/dist/mcp/index.d.ts +4 -0
  220. package/dist/mcp/index.js +7 -0
  221. package/dist/mcp/loader.d.ts +19 -0
  222. package/dist/mcp/loader.js +202 -0
  223. package/dist/mdx-components/index.js +40 -108
  224. package/dist/mermaid-enlarge/index.d.ts +1 -8
  225. package/dist/mermaid-enlarge/index.js +174 -158
  226. package/dist/mermaid-enlarge/public.d.ts +2 -0
  227. package/dist/mermaid-enlarge/public.js +6 -0
  228. package/dist/mermaid-enlarge/ssr-fallback.d.ts +2 -0
  229. package/dist/mermaid-enlarge/ssr-fallback.js +8 -0
  230. package/dist/metainfo/doc-metainfo.d.ts +2 -3
  231. package/dist/metainfo/doc-metainfo.js +1 -4
  232. package/dist/metainfo/doc-tags.d.ts +2 -3
  233. package/dist/metainfo/doc-tags.js +1 -1
  234. package/dist/metainfo/frontmatter-preview.d.ts +3 -4
  235. package/dist/metainfo/frontmatter-preview.js +1 -1
  236. package/dist/nav-data-prep/index.js +6 -4
  237. package/dist/nav-indexing/category-nav.d.ts +2 -3
  238. package/dist/nav-indexing/category-nav.js +1 -2
  239. package/dist/nav-indexing/category-tree-nav.d.ts +2 -3
  240. package/dist/nav-indexing/category-tree-nav.js +1 -1
  241. package/dist/nav-indexing/doc-card-grid.d.ts +2 -3
  242. package/dist/nav-indexing/doc-card-grid.js +1 -2
  243. package/dist/nav-indexing/docs-sitemap.d.ts +2 -3
  244. package/dist/nav-indexing/docs-sitemap.js +2 -2
  245. package/dist/nav-indexing/index.d.ts +1 -1
  246. package/dist/nav-indexing/nav-card-grid.d.ts +2 -3
  247. package/dist/nav-indexing/nav-card-grid.js +1 -2
  248. package/dist/nav-indexing/note-tray-index-parts/card-list.d.ts +1 -2
  249. package/dist/nav-indexing/note-tray-index-parts/card-list.js +4 -4
  250. package/dist/nav-indexing/note-tray-index-parts/date-line.d.ts +2 -3
  251. package/dist/nav-indexing/note-tray-index-parts/date-line.js +1 -1
  252. package/dist/nav-indexing/note-tray-index-parts/index-list.d.ts +1 -2
  253. package/dist/nav-indexing/note-tray-index-parts/index-list.js +2 -2
  254. package/dist/nav-indexing/note-tray-index-parts/timeline.d.ts +1 -2
  255. package/dist/nav-indexing/note-tray-index-parts/timeline.js +2 -2
  256. package/dist/nav-indexing/note-tray-index.d.ts +1 -2
  257. package/dist/nav-indexing/note-tray-index.js +1 -1
  258. package/dist/nav-indexing/site-tree-nav-demo.d.ts +2 -3
  259. package/dist/nav-indexing/site-tree-nav-demo.js +2 -2
  260. package/dist/nav-indexing/tag-nav.d.ts +1 -2
  261. package/dist/nav-indexing/tag-nav.js +1 -1
  262. package/dist/nav-indexing/types.d.ts +2 -2
  263. package/dist/nav-indexing/versions-page-content.d.ts +2 -3
  264. package/dist/nav-indexing/versions-page-content.js +8 -8
  265. package/dist/note-tray-index/index.d.ts +1 -2
  266. package/dist/note-tray-index/index.js +1 -1
  267. package/dist/page-loading/page-loading-overlay.d.ts +1 -2
  268. package/dist/page-loading/page-loading-overlay.js +3 -5
  269. package/dist/plugins/agent-export.d.ts +3 -0
  270. package/dist/plugins/agent-export.js +34 -0
  271. package/dist/plugins/internal/agent-export/chunk.d.ts +5 -0
  272. package/dist/plugins/internal/agent-export/chunk.js +90 -0
  273. package/dist/plugins/internal/agent-export/index.d.ts +24 -0
  274. package/dist/plugins/internal/agent-export/index.js +123 -0
  275. package/dist/plugins/internal/agent-export/normalize.d.ts +5 -0
  276. package/dist/plugins/internal/agent-export/normalize.js +73 -0
  277. package/dist/plugins/internal/llms-txt/dev-middleware.d.ts +6 -0
  278. package/dist/plugins/internal/llms-txt/dev-middleware.js +8 -3
  279. package/dist/plugins/internal/llms-txt/emit.js +23 -6
  280. package/dist/plugins/internal/llms-txt/generate.d.ts +7 -1
  281. package/dist/plugins/internal/llms-txt/generate.js +9 -2
  282. package/dist/plugins/internal/llms-txt/load.d.ts +2 -0
  283. package/dist/plugins/internal/llms-txt/load.js +20 -4
  284. package/dist/plugins/internal/llms-txt/types.d.ts +10 -0
  285. package/dist/plugins/routes.js +4 -0
  286. package/dist/preset.d.ts +19 -9
  287. package/dist/preset.js +20 -1
  288. package/dist/route-context-payload/index.js +1 -1
  289. package/dist/routes/404.d.ts +2 -3
  290. package/dist/routes/404.js +1 -1
  291. package/dist/routes/_chrome.d.ts +5 -5
  292. package/dist/routes/_chrome.js +7 -2
  293. package/dist/routes/_context.d.ts +4 -4
  294. package/dist/routes/_design-token-panel-bootstrap.d.ts +1 -4
  295. package/dist/routes/_design-token-panel-bootstrap.js +9 -1
  296. package/dist/routes/docs-slug.d.ts +2 -3
  297. package/dist/routes/docs-tags-index.d.ts +2 -3
  298. package/dist/routes/docs-tags-index.js +1 -1
  299. package/dist/routes/docs-tags-tag.d.ts +2 -3
  300. package/dist/routes/docs-tags-tag.js +1 -1
  301. package/dist/routes/docs-versions.d.ts +2 -3
  302. package/dist/routes/docs-versions.js +1 -1
  303. package/dist/routes/files-path.d.ts +2 -3
  304. package/dist/routes/files-path.js +1 -1
  305. package/dist/routes/index.d.ts +2 -3
  306. package/dist/routes/index.js +1 -1
  307. package/dist/routes/locale-docs-slug.d.ts +2 -3
  308. package/dist/routes/locale-docs-tags-index.d.ts +2 -3
  309. package/dist/routes/locale-docs-tags-index.js +1 -1
  310. package/dist/routes/locale-docs-tags-tag.d.ts +2 -3
  311. package/dist/routes/locale-docs-tags-tag.js +1 -1
  312. package/dist/routes/locale-docs-versions.d.ts +2 -3
  313. package/dist/routes/locale-docs-versions.js +1 -1
  314. package/dist/routes/locale-files-path.d.ts +2 -3
  315. package/dist/routes/locale-files-path.js +1 -1
  316. package/dist/routes/locale-index.d.ts +2 -3
  317. package/dist/routes/locale-index.js +1 -1
  318. package/dist/routes/mcp.d.ts +5 -0
  319. package/dist/routes/mcp.js +25 -0
  320. package/dist/routes/v-docs-slug.d.ts +2 -3
  321. package/dist/routes/v-locale-docs-slug.d.ts +2 -3
  322. package/dist/search-widget/index.d.ts +1 -2
  323. package/dist/search-widget/index.js +4 -7
  324. package/dist/search-widget-script/generated-script.js +12 -5
  325. package/dist/settings-defaults.d.ts +2 -0
  326. package/dist/settings-defaults.js +93 -0
  327. package/dist/settings.d.ts +8 -2
  328. package/dist/sidebar/client-data.d.ts +18 -0
  329. package/dist/sidebar/client-data.js +47 -0
  330. package/dist/sidebar/index.d.ts +3 -1
  331. package/dist/sidebar/index.js +3 -1
  332. package/dist/sidebar/sidebar.d.ts +12 -44
  333. package/dist/sidebar/sidebar.js +4 -3
  334. package/dist/sidebar/types.d.ts +14 -0
  335. package/dist/sidebar-prepaint/index.d.ts +1 -2
  336. package/dist/sidebar-prepaint/index.js +4 -6
  337. package/dist/sidebar-resizer/sidebar-resizer-init.d.ts +2 -3
  338. package/dist/sidebar-resizer/sidebar-resizer-init.js +3 -3
  339. package/dist/sidebar-toggle-island/index.d.ts +8 -11
  340. package/dist/sidebar-toggle-island/index.js +75 -62
  341. package/dist/sidebar-tree/build-tree.js +5 -6
  342. package/dist/sidebar-tree/types.d.ts +2 -0
  343. package/dist/sidebar-tree-island/index.d.ts +4 -19
  344. package/dist/sidebar-tree-island/index.js +782 -436
  345. package/dist/sidebar-tree-island/scope-state.d.ts +38 -0
  346. package/dist/sidebar-tree-island/scope-state.js +151 -0
  347. package/dist/sidebar-tree-island/sidebar-scroll-preserve.js +6 -2
  348. package/dist/sidebar-utils/index.d.ts +17 -19
  349. package/dist/sidebar-utils/index.js +100 -3
  350. package/dist/sidebar-utils/scope.d.ts +11 -0
  351. package/dist/sidebar-utils/scope.js +67 -0
  352. package/dist/sidebar-with-defaults/index.d.ts +1 -2
  353. package/dist/sidebar-with-defaults/index.js +19 -18
  354. package/dist/site-schema/nav-tree.js +15 -15
  355. package/dist/site-schema/types.d.ts +1 -0
  356. package/dist/site-tree-nav/index.d.ts +2 -3
  357. package/dist/site-tree-nav/index.js +11 -12
  358. package/dist/site-tree-nav/normalize-island-props.d.ts +16 -0
  359. package/dist/site-tree-nav/normalize-island-props.js +122 -0
  360. package/dist/site-tree-nav-island/index.d.ts +3 -3
  361. package/dist/site-tree-nav-island/index.js +243 -144
  362. package/dist/smart-break/index.d.ts +3 -4
  363. package/dist/smart-break/index.js +1 -1
  364. package/dist/tab-item/tab-item.d.ts +3 -4
  365. package/dist/tab-item/tab-item.js +1 -1
  366. package/dist/tag-pages/index.d.ts +3 -3
  367. package/dist/tag-pages/index.js +10 -10
  368. package/dist/theme/color-scheme-provider.d.ts +3 -3
  369. package/dist/theme/color-scheme-provider.js +3 -3
  370. package/dist/theme/theme-pack-provider.d.ts +1 -1
  371. package/dist/theme/theme-pack-provider.js +3 -3
  372. package/dist/theme/theme-toggle.d.ts +2 -3
  373. package/dist/theme/theme-toggle.js +1 -1
  374. package/dist/theme-pack-dialog/index.d.ts +1 -1
  375. package/dist/theme-pack-dialog/index.js +69 -75
  376. package/dist/theme-pack-dialog/theme-pack-card.d.ts +3 -4
  377. package/dist/theme-pack-dialog/theme-pack-card.js +19 -17
  378. package/dist/theme-pack-switcher/index.d.ts +4 -5
  379. package/dist/theme-pack-switcher/index.js +52 -49
  380. package/dist/theme-packs/academia/meta.json +1 -1
  381. package/dist/theme-packs/academia/pack.css +1 -1
  382. package/dist/theme-packs/bauhaus/meta.json +1 -1
  383. package/dist/theme-packs/bauhaus/pack.css +2 -2
  384. package/dist/theme-packs/blueprint/meta.json +1 -1
  385. package/dist/theme-packs/blueprint/pack.css +2 -2
  386. package/dist/theme-packs/botanica/meta.json +1 -1
  387. package/dist/theme-packs/botanica/pack.css +2 -2
  388. package/dist/theme-packs/broadsheet/meta.json +1 -1
  389. package/dist/theme-packs/broadsheet/pack.css +2 -2
  390. package/dist/theme-packs/brutalist/meta.json +1 -1
  391. package/dist/theme-packs/brutalist/pack.css +2 -2
  392. package/dist/theme-packs/eink/meta.json +1 -1
  393. package/dist/theme-packs/eink/pack.css +1 -1
  394. package/dist/theme-packs/futura-editorial/meta.json +1 -1
  395. package/dist/theme-packs/futura-editorial/pack.css +2 -2
  396. package/dist/theme-packs/hearth/meta.json +1 -1
  397. package/dist/theme-packs/hearth/pack.css +2 -2
  398. package/dist/theme-packs/ledger/meta.json +1 -1
  399. package/dist/theme-packs/ledger/pack.css +1 -1
  400. package/dist/theme-packs/manuscript/meta.json +1 -1
  401. package/dist/theme-packs/manuscript/pack.css +1 -1
  402. package/dist/theme-packs/matcha/meta.json +1 -1
  403. package/dist/theme-packs/matcha/pack.css +2 -2
  404. package/dist/theme-packs/nocturne/meta.json +1 -1
  405. package/dist/theme-packs/nocturne/pack.css +2 -2
  406. package/dist/theme-packs/observatory/meta.json +1 -1
  407. package/dist/theme-packs/observatory/pack.css +2 -2
  408. package/dist/theme-packs/onyx/meta.json +1 -1
  409. package/dist/theme-packs/onyx/pack.css +2 -2
  410. package/dist/theme-packs/phosphor/meta.json +1 -1
  411. package/dist/theme-packs/phosphor/pack.css +2 -2
  412. package/dist/theme-packs/riso/meta.json +1 -1
  413. package/dist/theme-packs/riso/pack.css +2 -2
  414. package/dist/theme-packs/sakura/meta.json +1 -1
  415. package/dist/theme-packs/sakura/pack.css +2 -2
  416. package/dist/theme-packs/scandi/meta.json +1 -1
  417. package/dist/theme-packs/scandi/pack.css +1 -1
  418. package/dist/theme-packs/solar/meta.json +1 -1
  419. package/dist/theme-packs/solar/pack.css +1 -1
  420. package/dist/theme-packs/sumi/meta.json +1 -1
  421. package/dist/theme-packs/sumi/pack.css +2 -2
  422. package/dist/theme-packs/swissgrid/meta.json +1 -1
  423. package/dist/theme-packs/swissgrid/pack.css +1 -1
  424. package/dist/theme-packs/timberline/meta.json +1 -1
  425. package/dist/theme-packs/timberline/pack.css +2 -2
  426. package/dist/theme-packs/washi/meta.json +1 -1
  427. package/dist/theme-packs/washi/pack.css +2 -2
  428. package/dist/theme-toggle/index.d.ts +1 -1
  429. package/dist/theme-toggle/index.js +154 -167
  430. package/dist/theme.css +47 -121
  431. package/dist/toc/mobile-toc.d.ts +3 -5
  432. package/dist/toc/mobile-toc.js +29 -27
  433. package/dist/toc/toc.d.ts +3 -4
  434. package/dist/toc/toc.js +18 -18
  435. package/dist/toc/use-active-heading.d.ts +5 -4
  436. package/dist/toc/use-active-heading.js +36 -30
  437. package/dist/toc-prepaint/index.d.ts +1 -2
  438. package/dist/toc-prepaint/index.js +4 -6
  439. package/dist/transitions/nested-island-props-refresh.d.ts +3 -16
  440. package/dist/transitions/nested-island-props-refresh.js +133 -151
  441. package/dist/transitions/page-events.d.ts +8 -13
  442. package/dist/tree-nav-shared/index.d.ts +4 -5
  443. package/dist/tree-nav-shared/index.js +6 -7
  444. package/dist/use-modal-dialog/index.d.ts +9 -63
  445. package/dist/use-modal-dialog/index.js +41 -59
  446. package/dist/versions-page/index.d.ts +3 -3
  447. package/dist/versions-page/index.js +5 -5
  448. package/dist/wind/index.d.ts +5 -0
  449. package/dist/wind/index.js +169 -0
  450. package/dist/wind.json +498 -0
  451. package/dist/z-index-defaults/index.d.ts +4 -4
  452. package/dist/zdtp-loader.d.ts +7 -0
  453. package/dist/zdtp-loader.js +8 -0
  454. package/eject/asset-components/asset-card.tsx +14 -16
  455. package/eject/asset-components/asset-code.tsx +10 -12
  456. package/eject/asset-components/shared.tsx +5 -7
  457. package/eject/breadcrumb/breadcrumb.tsx +15 -16
  458. package/eject/code-group/index.tsx +4 -10
  459. package/eject/content-admonition/index.tsx +5 -6
  460. package/eject/desktop-sidebar-toggle-island/index.ts +4 -0
  461. package/eject/desktop-sidebar-toggle-island/island.tsx +50 -0
  462. package/eject/desktop-sidebar-toggle-island/storage.ts +27 -0
  463. package/eject/details/details.tsx +3 -5
  464. package/eject/doc-history/index.tsx +193 -179
  465. package/eject/doc-pager/index.tsx +3 -4
  466. package/eject/footer/footer.tsx +7 -9
  467. package/eject/header/header.tsx +42 -54
  468. package/eject/header/nav-overflow-script.ts +1 -1
  469. package/eject/header/types.ts +12 -13
  470. package/eject/image-enlarge/index.tsx +84 -69
  471. package/eject/image-enlarge/public.ts +2 -0
  472. package/eject/image-enlarge/ssr-fallback.tsx +7 -0
  473. package/eject/page-loading/page-loading-overlay.tsx +8 -15
  474. package/eject/sidebar/client-data.ts +68 -0
  475. package/eject/sidebar/index.ts +3 -0
  476. package/eject/sidebar/sidebar.tsx +16 -97
  477. package/eject/sidebar/types.ts +15 -0
  478. package/eject/sidebar-toggle-island/index.tsx +103 -102
  479. package/eject/sidebar-tree-island/index.tsx +827 -615
  480. package/eject/sidebar-tree-island/scope-state.ts +154 -0
  481. package/eject/sidebar-tree-island/sidebar-scroll-preserve.ts +8 -2
  482. package/eject/site-tree-nav-island/index.tsx +349 -222
  483. package/eject/tab-item/tab-item.tsx +2 -4
  484. package/eject/theme-toggle/hydration-pending.ts +6 -10
  485. package/eject/theme-toggle/index.tsx +133 -173
  486. package/eject/toc/mobile-toc.tsx +27 -31
  487. package/eject/toc/toc.tsx +21 -24
  488. package/eject/toc/use-active-heading.ts +43 -38
  489. package/package.json +40 -22
  490. package/routes-src/404.tsx +2 -3
  491. package/routes-src/_chrome.tsx +7 -2
  492. package/routes-src/_design-token-panel-bootstrap.tsx +1 -63
  493. package/routes-src/docs-slug.tsx +2 -3
  494. package/routes-src/docs-tags-index.tsx +2 -3
  495. package/routes-src/docs-tags-tag.tsx +2 -3
  496. package/routes-src/docs-versions.tsx +2 -3
  497. package/routes-src/files-path.tsx +2 -4
  498. package/routes-src/index.tsx +2 -3
  499. package/routes-src/locale-docs-slug.tsx +2 -3
  500. package/routes-src/locale-docs-tags-index.tsx +2 -3
  501. package/routes-src/locale-docs-tags-tag.tsx +2 -3
  502. package/routes-src/locale-docs-versions.tsx +2 -3
  503. package/routes-src/locale-files-path.tsx +2 -4
  504. package/routes-src/locale-index.tsx +2 -3
  505. package/routes-src/mcp.tsx +25 -0
  506. package/routes-src/v-docs-slug.tsx +2 -3
  507. package/routes-src/v-locale-docs-slug.tsx +2 -3
  508. package/tsconfig.base.json +1 -1
  509. package/dist/safelist.css +0 -2
  510. package/dist/theme-no-reset.css +0 -379
  511. package/eject/desktop-sidebar-toggle-island/index.tsx +0 -110
@@ -1,15 +1,30 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
3
- import { useState, useCallback, useEffect, useMemo, useRef } from "preact/hooks";
4
- import { memo } from "preact/compat";
5
- import { INDENT, BASE_PAD, connectorLeft, ConnectorLines, CategoryLinkIcon } from "../tree-nav-shared/index.js";
2
+ import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
3
+ import {
4
+ computed,
5
+ For,
6
+ getScope,
7
+ Show,
8
+ signal
9
+ } from "@takazudo/zfb/zudo-react";
10
+ import {
11
+ INDENT,
12
+ BASE_PAD,
13
+ connectorLeft,
14
+ ConnectorLines,
15
+ CategoryLinkIcon
16
+ } from "../tree-nav-shared/index.js";
6
17
  import { ChevronRight, ChevronLeft, Search } from "../icons/index.js";
7
18
  import { ThemeToggle } from "../theme-toggle/index.js";
8
19
  import { smartBreakToHtml } from "../smart-break/index.js";
9
- import { AFTER_NAVIGATE_EVENT, BEFORE_NAVIGATE_EVENT } from "../transitions/index.js";
20
+ import { AFTER_NAVIGATE_EVENT } from "../transitions/index.js";
21
+ import { useSidebarScope } from "./scope-state.js";
10
22
  import { filterTree } from "../sidebar-filter/index.js";
11
23
  import { findActiveSlug, normalizePath } from "../sidebar-active-slug/index.js";
12
- import { CURRENT_PATH_DATASET_KEY, readCurrentPath } from "../current-path/index.js";
24
+ import {
25
+ CURRENT_PATH_DATASET_KEY,
26
+ readCurrentPath
27
+ } from "../current-path/index.js";
13
28
  import { ensureSidebarScrollPreserve } from "./sidebar-scroll-preserve.js";
14
29
  import {
15
30
  formatYearLabel,
@@ -19,19 +34,26 @@ import {
19
34
  rankWidth
20
35
  } from "../note-tray-model/index.js";
21
36
  import { formatMonthDay } from "../format-date/index.js";
22
- ensureSidebarScrollPreserve();
23
- function ToggleChevron({ isExpanded, className }) {
37
+ const STORAGE_KEY = "zd-sidebar-open";
38
+ const GROUPED_TRAY_ITEM_DEPTH = 3;
39
+ function ToggleChevron({
40
+ isExpanded,
41
+ className
42
+ }) {
24
43
  return /* @__PURE__ */ jsx(
25
- ChevronRight,
44
+ For,
26
45
  {
27
- className: `h-[0.625rem] w-[0.625rem] shrink-0 transition-transform duration-150 ${isExpanded ? "rotate-90" : ""} ${className ?? ""}`
46
+ each: computed(() => [
47
+ `h-[0.625rem] w-[0.625rem] shrink-0 transition-transform duration-150 ${isExpanded.value ? "rotate-90" : ""} ${typeof className === "string" ? className : className?.value ?? ""}`
48
+ ]),
49
+ by: (value) => value,
50
+ children: (value) => /* @__PURE__ */ jsx(ChevronRight, { class: value.value })
28
51
  }
29
52
  );
30
53
  }
31
- const STORAGE_KEY = "zd-sidebar-open";
32
- const GROUPED_TRAY_ITEM_DEPTH = 3;
33
54
  function padLeft(depth, forCategory) {
34
- if (depth === 0) return `calc(${BASE_PAD} + ${forCategory ? "0.15rem" : "0rem"})`;
55
+ if (depth === 0)
56
+ return `calc(${BASE_PAD} + ${forCategory ? "0.15rem" : "0rem"})`;
35
57
  return `calc(${depth} * ${INDENT} + 1.25rem + 5px)`;
36
58
  }
37
59
  function getOpenSet() {
@@ -39,7 +61,9 @@ function getOpenSet() {
39
61
  const raw = sessionStorage.getItem(STORAGE_KEY);
40
62
  if (!raw) return /* @__PURE__ */ new Set();
41
63
  const parsed = JSON.parse(raw);
42
- return Array.isArray(parsed) ? new Set(parsed.filter((v) => typeof v === "string")) : /* @__PURE__ */ new Set();
64
+ return Array.isArray(parsed) ? new Set(
65
+ parsed.filter((value) => typeof value === "string")
66
+ ) : /* @__PURE__ */ new Set();
43
67
  } catch {
44
68
  return /* @__PURE__ */ new Set();
45
69
  }
@@ -52,186 +76,305 @@ function saveOpenSet(set) {
52
76
  }
53
77
  function deriveActiveSlug(nodes, pathname) {
54
78
  const resolved = readCurrentPath(CURRENT_PATH_DATASET_KEY, pathname);
55
- if (!resolved) return void 0;
56
- return findActiveSlug(nodes, normalizePath(resolved));
79
+ return resolved ? findActiveSlug(nodes, normalizePath(resolved)) : void 0;
57
80
  }
58
81
  function useActiveSlug(nodes, initial, currentPath) {
59
- const [slug, setSlug] = useState(
60
- () => initial !== void 0 ? initial : deriveActiveSlug(nodes, currentPath)
61
- );
62
- useEffect(() => {
82
+ const slug = signal(initial);
83
+ getScope().onActivate(() => {
63
84
  const update = (pathname) => {
64
85
  const found = deriveActiveSlug(nodes, pathname);
65
- if (found !== void 0) setSlug(found);
86
+ if (found !== void 0) slug.value = found;
66
87
  };
67
- const onNavigate = () => update();
68
88
  update(currentPath);
89
+ const onNavigate = () => update();
69
90
  document.addEventListener(AFTER_NAVIGATE_EVENT, onNavigate);
70
91
  return () => document.removeEventListener(AFTER_NAVIGATE_EVENT, onNavigate);
71
- }, [nodes, currentPath]);
92
+ });
72
93
  return slug;
73
94
  }
74
- function RootMenuItemEntry({ item }) {
75
- const [expanded, setExpanded] = useState(false);
76
- const hasChildren = item.children && item.children.length > 0;
77
- return /* @__PURE__ */ jsxs("div", { className: "border-t border-muted", children: [
78
- /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
95
+ function RootMenuItemEntry({
96
+ item
97
+ }) {
98
+ const expanded = signal(false);
99
+ const hasChildren = computed(() => !!item.value.children?.length);
100
+ return /* @__PURE__ */ jsxs("div", { class: "border-t border-muted", children: [
101
+ /* @__PURE__ */ jsxs("div", { class: "flex items-center", children: [
79
102
  /* @__PURE__ */ jsxs(
80
103
  "a",
81
104
  {
82
- href: item.href,
83
- className: "flex flex-1 items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-small font-semibold text-fg hover:text-accent hover:underline break-words",
105
+ href: computed(() => item.value.href ?? ""),
106
+ class: "flex flex-1 items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-small font-semibold text-fg hover:text-accent hover:underline break-words",
84
107
  children: [
85
- /* @__PURE__ */ jsx(CategoryLinkIcon, { className: "w-[14px]" }),
86
- /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: smartBreakToHtml(item.label) } })
108
+ /* @__PURE__ */ jsx(CategoryLinkIcon, { class: "w-[14px]" }),
109
+ /* @__PURE__ */ jsx("span", { rawHtml: computed(() => smartBreakToHtml(item.value.label)) })
87
110
  ]
88
111
  }
89
112
  ),
90
- hasChildren && /* @__PURE__ */ jsx(
113
+ /* @__PURE__ */ jsx(Show, { when: hasChildren, children: () => /* @__PURE__ */ jsx(
91
114
  "button",
92
115
  {
93
116
  type: "button",
94
- onClick: () => setExpanded((prev) => !prev),
95
- className: "flex items-center justify-center px-hsp-sm py-vsp-xs text-muted hover:text-fg",
96
- "aria-expanded": expanded,
97
- "aria-label": expanded ? `Collapse ${item.label}` : `Expand ${item.label}`,
117
+ "on:click": () => {
118
+ expanded.value = !expanded.value;
119
+ },
120
+ class: "flex items-center justify-center px-hsp-sm py-vsp-xs text-muted hover:text-fg",
121
+ "aria-expanded": computed(
122
+ () => expanded.value ? "true" : "false"
123
+ ),
124
+ "aria-label": computed(
125
+ () => `${expanded.value ? "Collapse" : "Expand"} ${item.value.label}`
126
+ ),
98
127
  children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded: expanded, className: "text-muted" })
99
128
  }
100
- )
129
+ ) })
101
130
  ] }),
102
- hasChildren && expanded && /* @__PURE__ */ jsx("div", { className: "pb-vsp-xs", children: item.children.map((child) => /* @__PURE__ */ jsx(
103
- "a",
131
+ /* @__PURE__ */ jsx(Show, { when: computed(() => hasChildren.value && expanded.value), children: () => /* @__PURE__ */ jsx("div", { class: "pb-vsp-xs", children: /* @__PURE__ */ jsx(
132
+ For,
104
133
  {
105
- href: child.href,
106
- className: "block pl-hsp-xl pr-hsp-sm py-vsp-2xs text-small text-muted hover:text-accent hover:underline break-words",
107
- children: /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: smartBreakToHtml(child.label) } })
108
- },
109
- child.href
110
- )) })
134
+ each: computed(() => item.value.children ?? []),
135
+ by: (child) => child.href,
136
+ children: (child) => /* @__PURE__ */ jsx(
137
+ "a",
138
+ {
139
+ href: computed(() => child.value.href),
140
+ class: "block pl-hsp-xl pr-hsp-sm py-vsp-2xs text-small text-muted hover:text-accent hover:underline break-words",
141
+ children: /* @__PURE__ */ jsx(
142
+ "span",
143
+ {
144
+ rawHtml: computed(
145
+ () => smartBreakToHtml(child.value.label)
146
+ )
147
+ }
148
+ )
149
+ }
150
+ )
151
+ }
152
+ ) }) })
111
153
  ] });
112
154
  }
113
- function SidebarFooter({ links, themeDefaultMode, themeLabels, themeRespectSystem }) {
155
+ function SidebarFooter({
156
+ links,
157
+ themeDefaultMode,
158
+ themeLabels,
159
+ themeRespectSystem
160
+ }) {
114
161
  if (!links && !themeDefaultMode) return null;
115
- return (
116
- // pb-[50vh] provides scroll room so the footer doesn't sit at the very bottom of the viewport
117
- /* @__PURE__ */ jsxs("div", { className: "lg:hidden flex items-center gap-hsp-md border-t border-muted px-hsp-sm py-vsp-xs pb-[50vh] text-small", children: [
118
- themeDefaultMode && /* @__PURE__ */ jsx(ThemeToggle, { defaultMode: themeDefaultMode, labels: themeLabels, respectPrefersColorScheme: themeRespectSystem, pendingUntilHydrated: true }),
119
- links && links.map((link, i) => /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-hsp-xs", children: [
120
- i > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted", children: "/" }),
121
- link.active ? /* @__PURE__ */ jsx("span", { "aria-current": "true", className: "font-medium text-fg", children: link.label }) : /* @__PURE__ */ jsx("a", { href: link.href, lang: link.code, className: "text-muted hover:text-fg", children: link.label })
122
- ] }, link.href))
123
- ] })
124
- );
162
+ return /* @__PURE__ */ jsxs("div", { class: "lg:hidden flex items-center gap-hsp-md border-t border-muted px-hsp-sm py-vsp-xs pb-[50vh] text-small", children: [
163
+ themeDefaultMode ? /* @__PURE__ */ jsx(
164
+ ThemeToggle,
165
+ {
166
+ defaultMode: themeDefaultMode,
167
+ labels: themeLabels,
168
+ respectPrefersColorScheme: themeRespectSystem,
169
+ pendingUntilHydrated: true
170
+ }
171
+ ) : null,
172
+ /* @__PURE__ */ jsx(For, { each: computed(() => links ?? []), by: (link) => link.href, children: (link, index) => /* @__PURE__ */ jsxs("span", { class: "flex items-center gap-hsp-xs", children: [
173
+ /* @__PURE__ */ jsx(Show, { when: computed(() => index.value > 0), children: () => /* @__PURE__ */ jsx("span", { class: "text-muted", children: "/" }) }),
174
+ /* @__PURE__ */ jsx(
175
+ Show,
176
+ {
177
+ when: computed(() => link.value.active),
178
+ fallback: () => /* @__PURE__ */ jsx(
179
+ "a",
180
+ {
181
+ href: computed(() => link.value.href),
182
+ lang: computed(() => link.value.code),
183
+ class: "text-muted hover:text-fg",
184
+ children: computed(() => link.value.label)
185
+ }
186
+ ),
187
+ children: () => /* @__PURE__ */ jsx("span", { "aria-current": "true", class: "font-medium text-fg", children: computed(() => link.value.label) })
188
+ }
189
+ )
190
+ ] }) })
191
+ ] });
125
192
  }
126
- function SidebarTree({ nodes, currentSlug, currentPath, rootMenuItems, backToMenuLabel, locale: localeProp, localeLinks, themeDefaultMode, themeLabels, themeRespectSystem, dateFormats }) {
127
- const activeSlug = useActiveSlug(nodes, currentSlug, currentPath);
128
- const [query, setQuery] = useState("");
129
- const [showingRootMenu, setShowingRootMenu] = useState(false);
130
- const filterRef = useRef(null);
131
- const [filterPlaceholder, setFilterPlaceholder] = useState("Filter...");
132
- useEffect(() => {
193
+ function SidebarTree({
194
+ nodes,
195
+ navigation,
196
+ currentSlug,
197
+ currentPath,
198
+ rootMenuItems,
199
+ backToMenuLabel,
200
+ locale: localeProp,
201
+ localeLinks,
202
+ themeDefaultMode,
203
+ themeLabels,
204
+ themeRespectSystem,
205
+ dateFormats
206
+ }) {
207
+ const scope = getScope();
208
+ const activeSlug = useActiveSlug(navigation?.roots ?? nodes, currentSlug, currentPath);
209
+ const query = signal("");
210
+ const { selected, selectedNodes, broader, labels, canRestore, changeScope, save, navRef, scopeControls } = useSidebarScope({
211
+ nodes,
212
+ navigation,
213
+ activeSlug,
214
+ query,
215
+ locale: localeProp ?? localeLinks?.find((link) => link.active)?.code ?? "en"
216
+ });
217
+ const showingRootMenu = signal(false);
218
+ const filterRef = { current: null };
219
+ const filterPlaceholder = signal("Filter...");
220
+ scope.onActivate(() => {
221
+ ensureSidebarScrollPreserve();
133
222
  const platform = navigator.userAgentData?.platform ?? navigator.platform;
134
- const isMac = /mac/i.test(platform);
135
- setFilterPlaceholder(isMac ? "Filter... (\u2318 + /)" : "Filter... (Ctrl + /)");
136
- }, []);
137
- useEffect(() => {
138
- function handleKeyDown(e) {
139
- if (e.isComposing) return;
140
- if (e.key === "/" && (e.metaKey || e.ctrlKey)) {
141
- const el = filterRef.current;
142
- if (!el || el.offsetParent === null) return;
143
- e.preventDefault();
144
- el.focus();
145
- el.select();
146
- }
147
- }
223
+ filterPlaceholder.value = /mac/i.test(platform) ? "Filter... (\u2318 + /)" : "Filter... (Ctrl + /)";
224
+ const handleKeyDown = (event) => {
225
+ const keyEvent = event;
226
+ if (keyEvent.isComposing || keyEvent.key !== "/" || !(keyEvent.metaKey || keyEvent.ctrlKey))
227
+ return;
228
+ const input = filterRef.current;
229
+ if (!input || input.offsetParent === null) return;
230
+ event.preventDefault();
231
+ input.focus();
232
+ input.select();
233
+ };
148
234
  document.addEventListener("keydown", handleKeyDown);
149
235
  return () => document.removeEventListener("keydown", handleKeyDown);
150
- }, []);
151
- const filteredNodes = useMemo(
152
- () => query ? filterTree(nodes, query) : nodes,
153
- [nodes, query]
154
- );
155
- const footer = useMemo(
156
- () => localeLinks || themeDefaultMode ? /* @__PURE__ */ jsx(SidebarFooter, { links: localeLinks, themeDefaultMode, themeLabels, themeRespectSystem }) : null,
157
- [localeLinks, themeDefaultMode, themeLabels, themeRespectSystem]
236
+ });
237
+ const filteredNodes = computed(
238
+ () => query.value ? filterTree(selectedNodes.value, query.value) : selectedNodes.value
158
239
  );
159
- const noteTrayRoot = nodes.length === 1 && nodes[0]?.shape === "note-tray" ? nodes[0] : void 0;
160
- const filteredNoteTrayRoot = noteTrayRoot ? filteredNodes.find((node) => node.slug === noteTrayRoot.slug) : void 0;
161
240
  const locale = localeProp ?? localeLinks?.find((link) => link.active)?.code ?? "en";
162
- if (showingRootMenu && rootMenuItems) {
163
- return /* @__PURE__ */ jsxs("nav", { children: [
164
- /* @__PURE__ */ jsxs(
165
- "button",
241
+ const footer = /* @__PURE__ */ jsx(
242
+ SidebarFooter,
243
+ {
244
+ links: localeLinks,
245
+ themeDefaultMode,
246
+ themeLabels,
247
+ themeRespectSystem
248
+ }
249
+ );
250
+ const menu = /* @__PURE__ */ jsx(For, { each: computed(() => rootMenuItems ?? []), by: (item) => item.href, children: (item) => /* @__PURE__ */ jsx(RootMenuItemEntry, { item }) });
251
+ return /* @__PURE__ */ jsx(
252
+ Show,
253
+ {
254
+ when: computed(() => showingRootMenu.value && !!rootMenuItems),
255
+ fallback: () => /* @__PURE__ */ jsx(
256
+ Show,
166
257
  {
167
- type: "button",
168
- onClick: () => setShowingRootMenu(false),
169
- className: "flex w-full items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-left text-small text-muted hover:text-fg border-b border-muted",
170
- children: [
171
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-icon-sm w-icon-sm shrink-0" }),
172
- backToMenuLabel ?? "Back to main menu"
173
- ]
258
+ when: computed(
259
+ () => activeSlug.value === void 0 && !!rootMenuItems
260
+ ),
261
+ fallback: () => /* @__PURE__ */ jsxs("nav", { ref: navRef, tabindex: -1, children: [
262
+ rootMenuItems ? /* @__PURE__ */ jsxs(
263
+ "button",
264
+ {
265
+ type: "button",
266
+ "on:click": () => {
267
+ showingRootMenu.value = true;
268
+ },
269
+ class: "lg:hidden flex w-full items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-left text-small text-muted hover:text-fg border-b border-muted",
270
+ children: [
271
+ /* @__PURE__ */ jsx(ChevronLeft, { class: "h-icon-sm w-icon-sm shrink-0" }),
272
+ backToMenuLabel ?? "Back to main menu"
273
+ ]
274
+ }
275
+ ) : null,
276
+ /* @__PURE__ */ jsx("div", { class: "px-hsp-sm py-vsp-xs border-b border-muted", "data-sidebar-filter-region": true, children: /* @__PURE__ */ jsxs("div", { class: "flex items-center gap-hsp-xs bg-surface rounded px-hsp-sm py-vsp-2xs", children: [
277
+ /* @__PURE__ */ jsx(Search, { class: "h-[14px] w-[14px] text-muted shrink-0" }),
278
+ /* @__PURE__ */ jsx(
279
+ "input",
280
+ {
281
+ ref: filterRef,
282
+ type: "text",
283
+ "aria-label": "Filter navigation",
284
+ placeholder: filterPlaceholder,
285
+ modelValue: query,
286
+ "on:input": (event) => {
287
+ query.value = event.target.value;
288
+ save();
289
+ },
290
+ class: "bg-transparent text-small outline-none w-full text-fg placeholder:text-muted focus-visible:outline-2 focus-visible:outline-accent",
291
+ style: "outline-offset:-4px"
292
+ }
293
+ )
294
+ ] }) }),
295
+ navigation ? /* @__PURE__ */ jsx(Show, { when: computed(() => broader.value !== null), children: () => /* @__PURE__ */ jsx("div", { class: "border-b border-muted px-hsp-md py-vsp-2xs text-small", "data-sidebar-scope-toolbar": true, children: /* @__PURE__ */ jsxs("div", { class: "flex items-center justify-between gap-hsp-xs", "data-sidebar-scope-actions": true, children: [
296
+ /* @__PURE__ */ jsxs(
297
+ "button",
298
+ {
299
+ type: "button",
300
+ "data-sidebar-broaden": true,
301
+ disabled: computed(() => broader.value === null),
302
+ "on:click": () => {
303
+ if (broader.value !== null) changeScope(broader.value);
304
+ },
305
+ style: "min-height:40px",
306
+ class: "flex items-center gap-hsp-sm px-hsp-xs font-medium rounded text-fg hover:bg-surface focus-visible:bg-surface focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:text-muted disabled:opacity-50",
307
+ children: [
308
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2191" }),
309
+ labels.broaden
310
+ ]
311
+ }
312
+ ),
313
+ /* @__PURE__ */ jsx(Show, { when: canRestore, children: () => /* @__PURE__ */ jsx(
314
+ "button",
315
+ {
316
+ type: "button",
317
+ "data-sidebar-restore": true,
318
+ "on:click": () => changeScope(null),
319
+ title: labels.restore,
320
+ "aria-label": labels.restore,
321
+ style: "width:40px;height:40px",
322
+ class: "grid place-items-center shrink-0 rounded text-muted hover:text-fg focus-visible:text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",
323
+ children: /* @__PURE__ */ jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true", children: [
324
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
325
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "6" }),
326
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" })
327
+ ] })
328
+ }
329
+ ) })
330
+ ] }) }) }) : null,
331
+ /* @__PURE__ */ jsx("div", { "data-sidebar-tree-root": true, children: /* @__PURE__ */ jsx(
332
+ Show,
333
+ {
334
+ when: computed(() => selectedNodes.value.length === 1 && selectedNodes.value[0]?.shape === "note-tray"),
335
+ fallback: () => /* @__PURE__ */ jsx(NodeList, { nodes: filteredNodes, currentSlug: activeSlug, depth: 0, forceOpen: computed(() => !!query.value), scopeControls }),
336
+ children: () => /* @__PURE__ */ jsx(Show, { when: computed(() => !!filteredNodes.value[0]), children: () => /* @__PURE__ */ jsx(
337
+ TrayList,
338
+ {
339
+ tray: computed(() => filteredNodes.value[0]),
340
+ itemCount: getNoteTrayItems(selectedNodes.value[0]).length,
341
+ currentSlug: activeSlug,
342
+ forceOpen: computed(() => !!query.value),
343
+ locale,
344
+ dateFormats,
345
+ scopeControls
346
+ }
347
+ ) })
348
+ }
349
+ ) }),
350
+ footer
351
+ ] }),
352
+ children: () => /* @__PURE__ */ jsxs("nav", { children: [
353
+ menu,
354
+ footer
355
+ ] })
174
356
  }
175
357
  ),
176
- rootMenuItems.map((item) => /* @__PURE__ */ jsx(RootMenuItemEntry, { item }, item.href)),
177
- footer
178
- ] });
179
- }
180
- if (activeSlug === void 0 && rootMenuItems) {
181
- return /* @__PURE__ */ jsxs("nav", { children: [
182
- rootMenuItems.map((item) => /* @__PURE__ */ jsx(RootMenuItemEntry, { item }, item.href)),
183
- footer
184
- ] });
185
- }
186
- return /* @__PURE__ */ jsxs("nav", { children: [
187
- rootMenuItems && /* @__PURE__ */ jsxs(
188
- "button",
189
- {
190
- type: "button",
191
- onClick: () => setShowingRootMenu(true),
192
- className: "lg:hidden flex w-full items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-left text-small text-muted hover:text-fg border-b border-muted",
193
- children: [
194
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-icon-sm w-icon-sm shrink-0" }),
195
- backToMenuLabel ?? "Back to main menu"
196
- ]
197
- }
198
- ),
199
- /* @__PURE__ */ jsx("div", { className: "px-hsp-sm py-vsp-xs", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-hsp-xs bg-surface rounded px-hsp-sm py-vsp-2xs", children: [
200
- /* @__PURE__ */ jsx(Search, { className: "h-[14px] w-[14px] text-muted shrink-0" }),
201
- /* @__PURE__ */ jsx(
202
- "input",
203
- {
204
- ref: filterRef,
205
- type: "text",
206
- "aria-label": "Filter navigation",
207
- placeholder: filterPlaceholder,
208
- value: query,
209
- onInput: (e) => setQuery(e.currentTarget.value),
210
- className: "bg-transparent text-small outline-none w-full text-fg placeholder:text-muted"
211
- }
212
- )
213
- ] }) }),
214
- noteTrayRoot ? filteredNoteTrayRoot && /* @__PURE__ */ jsx(
215
- TrayList,
216
- {
217
- tray: filteredNoteTrayRoot,
218
- itemCount: getNoteTrayItems(noteTrayRoot).length,
219
- currentSlug: activeSlug,
220
- forceOpen: !!query,
221
- locale,
222
- dateFormats
223
- }
224
- ) : /* @__PURE__ */ jsx(
225
- NodeList,
226
- {
227
- nodes: filteredNodes,
228
- currentSlug: activeSlug,
229
- depth: 0,
230
- forceOpen: !!query
231
- }
232
- ),
233
- footer
234
- ] });
358
+ children: () => /* @__PURE__ */ jsxs("nav", { children: [
359
+ /* @__PURE__ */ jsxs(
360
+ "button",
361
+ {
362
+ type: "button",
363
+ "on:click": () => {
364
+ showingRootMenu.value = false;
365
+ },
366
+ class: "flex w-full items-center gap-hsp-xs px-hsp-sm py-vsp-xs text-left text-small text-muted hover:text-fg border-b border-muted",
367
+ children: [
368
+ /* @__PURE__ */ jsx(ChevronRight, { class: "h-icon-sm w-icon-sm shrink-0" }),
369
+ backToMenuLabel ?? "Back to main menu"
370
+ ]
371
+ }
372
+ ),
373
+ menu,
374
+ footer
375
+ ] })
376
+ }
377
+ );
235
378
  }
236
379
  SidebarTree.displayName = "SidebarTree";
237
380
  function TrayList({
@@ -239,39 +382,77 @@ function TrayList({
239
382
  itemCount,
240
383
  currentSlug,
241
384
  forceOpen,
385
+ scopeControls,
242
386
  locale,
243
387
  dateFormats
244
388
  }) {
245
- const items = getNoteTrayItems(tray);
246
- const sidebarStyle = tray.noteTraySidebar ?? "index";
389
+ const items = computed(() => getNoteTrayItems(tray.value));
390
+ const sidebarStyle = computed(() => tray.value.noteTraySidebar ?? "index");
247
391
  const width = rankWidth(itemCount);
248
392
  return /* @__PURE__ */ jsxs(Fragment, { children: [
249
- /* @__PURE__ */ jsx(LeafNode, { node: tray, currentSlug, depth: 0, isLast: items.length === 0 }),
250
- sidebarStyle === "index" ? items.map((item, index) => /* @__PURE__ */ jsx(
251
- TrayItem,
393
+ /* @__PURE__ */ jsx(
394
+ LeafNode,
252
395
  {
253
- item,
396
+ node: tray,
254
397
  currentSlug,
255
- rankDigits: width,
256
- isLast: index === items.length - 1,
257
- locale,
258
- dateFormats
259
- },
260
- item.slug
261
- )) : groupItems(items, sidebarStyle, tray.sortOrder ?? "asc").map((group, index, groups) => /* @__PURE__ */ jsx(
262
- TrayGroupNode,
398
+ depth: 0,
399
+ isLast: computed(() => items.value.length === 0),
400
+ forceOpen
401
+ }
402
+ ),
403
+ /* @__PURE__ */ jsx(
404
+ Show,
263
405
  {
264
- traySlug: tray.slug,
265
- group,
266
- grouping: sidebarStyle,
267
- locale,
268
- dateFormats,
269
- currentSlug,
270
- forceOpen,
271
- isLast: index === groups.length - 1
272
- },
273
- group.key
274
- ))
406
+ when: computed(() => sidebarStyle.value === "index"),
407
+ fallback: () => /* @__PURE__ */ jsx(
408
+ For,
409
+ {
410
+ each: computed(
411
+ () => groupItems(
412
+ items.value,
413
+ sidebarStyle.value,
414
+ tray.value.sortOrder ?? "asc"
415
+ )
416
+ ),
417
+ by: (group) => group.key,
418
+ children: (group, index) => /* @__PURE__ */ jsx(
419
+ TrayGroupNode,
420
+ {
421
+ traySlug: computed(() => tray.value.slug),
422
+ trayOccurrence: computed(() => tray.value.occurrenceId ?? tray.value.slug),
423
+ scopeControls,
424
+ group,
425
+ grouping: computed(
426
+ () => sidebarStyle.value
427
+ ),
428
+ locale,
429
+ dateFormats,
430
+ currentSlug,
431
+ forceOpen,
432
+ isLast: computed(
433
+ () => index.value === groupItems(
434
+ items.value,
435
+ sidebarStyle.value,
436
+ tray.value.sortOrder ?? "asc"
437
+ ).length - 1
438
+ )
439
+ }
440
+ )
441
+ }
442
+ ),
443
+ children: () => /* @__PURE__ */ jsx(For, { each: items, by: (item) => item.slug, children: (item, index) => /* @__PURE__ */ jsx(
444
+ TrayItem,
445
+ {
446
+ item,
447
+ currentSlug,
448
+ rankDigits: width,
449
+ isLast: computed(() => index.value === items.value.length - 1),
450
+ locale,
451
+ dateFormats
452
+ }
453
+ ) })
454
+ }
455
+ )
275
456
  ] });
276
457
  }
277
458
  function TrayItem({
@@ -284,34 +465,83 @@ function TrayItem({
284
465
  locale,
285
466
  dateFormats
286
467
  }) {
287
- if (!item.href) return null;
288
- const isActive = item.slug === currentSlug;
289
- const labelHtml = smartBreakToHtml(item.label);
290
- const shortDate = item.date ? formatMonthDay(item.date, dateFormats?.numericMonthDay, locale) : void 0;
291
- return /* @__PURE__ */ jsx("div", { className: isLast ? "pb-vsp-md" : "", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
292
- /* @__PURE__ */ jsx(ConnectorLines, { depth, isLast, topPad: "var(--spacing-vsp-2xs)" }),
468
+ const active = computed(() => item.value.slug === currentSlug.value);
469
+ const shortDate = computed(
470
+ () => item.value.date ? formatMonthDay(item.value.date, dateFormats?.numericMonthDay, locale) : void 0
471
+ );
472
+ return /* @__PURE__ */ jsx(Show, { when: computed(() => !!item.value.href), children: () => /* @__PURE__ */ jsx("div", { class: computed(() => isLast.value ? "pb-vsp-md" : ""), children: /* @__PURE__ */ jsxs("div", { class: "relative", children: [
473
+ /* @__PURE__ */ jsx(
474
+ ConnectorLinesLive,
475
+ {
476
+ depth,
477
+ isLast,
478
+ topPad: "var(--spacing-vsp-2xs)"
479
+ }
480
+ ),
293
481
  /* @__PURE__ */ jsxs(
294
482
  "a",
295
483
  {
296
- href: item.href,
297
- "aria-current": isActive ? "page" : void 0,
298
- "data-nav-active": isActive ? "" : void 0,
299
- className: `flex items-start gap-hsp-xs py-vsp-2xs pr-hsp-xs lg:pr-hsp-sm text-small break-words ${isActive ? "bg-fg font-medium text-bg" : "text-muted hover:text-accent hover:underline focus:underline focus:text-accent"}`,
300
- style: { paddingLeft: padLeft(depth, false) },
484
+ href: computed(() => item.value.href ?? ""),
485
+ "aria-current": computed(() => active.value ? "page" : "false"),
486
+ "data-nav-active": computed(() => active.value ? "" : null),
487
+ class: computed(
488
+ () => `flex items-start gap-hsp-xs py-vsp-2xs pr-hsp-xs lg:pr-hsp-sm text-small break-words ${active.value ? "bg-fg font-medium text-bg" : "text-muted hover:text-accent hover:underline focus:underline focus:text-accent"}`
489
+ ),
490
+ style: { "padding-left": padLeft(depth, false) },
301
491
  children: [
302
- rankDigits !== void 0 && /* @__PURE__ */ jsx("span", { className: `shrink-0 tabular-nums${isActive ? "" : " text-muted"}`, children: item.rank === void 0 ? "" : String(item.rank).padStart(rankDigits, "0") }),
303
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", dangerouslySetInnerHTML: { __html: labelHtml } }),
304
- showDate && shortDate && /* @__PURE__ */ jsx("span", { className: `shrink-0 tabular-nums${isActive ? "" : " text-muted"}`, children: shortDate })
492
+ rankDigits !== void 0 ? /* @__PURE__ */ jsx(
493
+ "span",
494
+ {
495
+ class: computed(
496
+ () => `shrink-0 tabular-nums${active.value ? "" : " text-muted"}`
497
+ ),
498
+ children: computed(
499
+ () => item.value.rank === void 0 ? "" : String(item.value.rank).padStart(rankDigits, "0")
500
+ )
501
+ }
502
+ ) : null,
503
+ /* @__PURE__ */ jsx(
504
+ "span",
505
+ {
506
+ class: "min-w-0 flex-1",
507
+ rawHtml: computed(() => smartBreakToHtml(item.value.label))
508
+ }
509
+ ),
510
+ /* @__PURE__ */ jsx(Show, { when: computed(() => showDate && !!shortDate.value), children: () => /* @__PURE__ */ jsx(
511
+ "span",
512
+ {
513
+ class: computed(
514
+ () => `shrink-0 tabular-nums${active.value ? "" : " text-muted"}`
515
+ ),
516
+ children: shortDate
517
+ }
518
+ ) })
305
519
  ]
306
520
  }
307
521
  )
308
- ] }) });
522
+ ] }) }) });
523
+ }
524
+ function ConnectorLinesLive({
525
+ depth,
526
+ isLast,
527
+ topPad
528
+ }) {
529
+ return /* @__PURE__ */ jsx(
530
+ Show,
531
+ {
532
+ when: isLast,
533
+ fallback: () => /* @__PURE__ */ jsx(ConnectorLines, { depth, isLast: false, topPad }),
534
+ children: () => /* @__PURE__ */ jsx(ConnectorLines, { depth, isLast: true, topPad })
535
+ }
536
+ );
309
537
  }
310
538
  function noteTrayGroupStorageKey(traySlug, groupKey) {
311
539
  return `${traySlug}#${groupKey}`;
312
540
  }
313
541
  function TrayGroupNode({
314
542
  traySlug,
543
+ trayOccurrence,
544
+ scopeControls,
315
545
  group,
316
546
  grouping,
317
547
  locale,
@@ -320,274 +550,390 @@ function TrayGroupNode({
320
550
  forceOpen,
321
551
  isLast
322
552
  }) {
323
- const containsCurrent = group.items.some((item) => item.slug === currentSlug);
324
- const [open, setOpen] = useState(containsCurrent);
325
- const storageKey = noteTrayGroupStorageKey(traySlug, group.key);
326
- const label = grouping === "year" ? formatYearLabel(group.key, locale, dateFormats?.year) : formatYearMonthLabel(group.key, locale, dateFormats?.yearMonth);
327
- useEffect(() => {
328
- const stored = getOpenSet();
329
- if (stored.has(storageKey) && !open) setOpen(true);
330
- }, []);
331
- useEffect(() => {
332
- if (containsCurrent && !open) {
333
- setOpen(true);
334
- const stored = getOpenSet();
335
- stored.add(storageKey);
336
- saveOpenSet(stored);
337
- }
338
- }, [containsCurrent]);
339
- useEffect(() => {
340
- if (open) {
553
+ const scope = getScope();
554
+ const containsCurrent = computed(
555
+ () => group.value.items.some((item) => item.slug === currentSlug.value)
556
+ );
557
+ const occurrenceKey = computed(() => `${trayOccurrence.value}#${group.value.key}`);
558
+ const open = signal(scopeControls?.expansion.value[occurrenceKey.value] ?? (scopeControls?.defaultGroupOpen(group.value.items) ?? containsCurrent.value));
559
+ const storageKey = computed(
560
+ () => noteTrayGroupStorageKey(traySlug.value, group.value.key)
561
+ );
562
+ const label = computed(
563
+ () => grouping.value === "year" ? formatYearLabel(group.value.key, locale, dateFormats?.year) : formatYearMonthLabel(group.value.key, locale, dateFormats?.yearMonth)
564
+ );
565
+ scope.onActivate(() => {
566
+ if (!scopeControls && getOpenSet().has(storageKey.value)) open.value = true;
567
+ });
568
+ scope.effect(() => {
569
+ if (containsCurrent.value) open.value = true;
570
+ });
571
+ scope.effect(() => {
572
+ if (!scopeControls && open.value) {
341
573
  const stored = getOpenSet();
342
- if (!stored.has(storageKey)) {
343
- stored.add(storageKey);
574
+ if (!stored.has(storageKey.value)) {
575
+ stored.add(storageKey.value);
344
576
  saveOpenSet(stored);
345
577
  }
346
578
  }
347
- }, [open, storageKey]);
348
- const toggle = useCallback(() => {
349
- setOpen((previous) => {
350
- const next = !previous;
351
- const stored = getOpenSet();
352
- if (next) stored.add(storageKey);
353
- else stored.delete(storageKey);
354
- saveOpenSet(stored);
355
- return next;
356
- });
357
- }, [storageKey]);
358
- const isExpanded = forceOpen || open;
359
- return /* @__PURE__ */ jsxs("div", { className: !isLast && isExpanded ? "relative" : "", children: [
360
- !isLast && isExpanded && /* @__PURE__ */ jsx(
361
- "div",
362
- {
363
- className: "absolute border-l border-solid border-muted z-local-1",
364
- style: { left: connectorLeft(1), top: 0, bottom: 0 }
365
- }
366
- ),
367
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
368
- /* @__PURE__ */ jsx(ConnectorLines, { depth: 1, isLast, topPad: "var(--spacing-vsp-xs)" }),
369
- /* @__PURE__ */ jsxs(
370
- "button",
371
- {
372
- type: "button",
373
- onClick: toggle,
374
- className: "flex w-full items-center gap-hsp-md py-vsp-xs text-left text-small font-semibold text-fg hover:text-accent hover:underline focus:underline focus:text-accent break-words",
375
- style: { paddingLeft: padLeft(1, true) },
376
- "aria-expanded": isExpanded,
377
- "aria-label": isExpanded ? `Collapse ${label}` : `Expand ${label}`,
378
- "data-zd-sidebar-open-key": storageKey,
379
- children: [
380
- /* @__PURE__ */ jsx("span", { className: "aspect-square flex items-center justify-center w-[1.5rem] shrink-0 border border-muted", children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded, className: "text-muted" }) }),
381
- /* @__PURE__ */ jsx("span", { children: label })
382
- ]
383
- }
384
- )
385
- ] }),
386
- isExpanded && /* @__PURE__ */ jsx("div", { children: group.items.map((item, index) => /* @__PURE__ */ jsx(
387
- TrayItem,
388
- {
389
- item,
390
- currentSlug,
391
- isLast: index === group.items.length - 1,
392
- showDate: true,
393
- locale,
394
- dateFormats,
395
- depth: GROUPED_TRAY_ITEM_DEPTH
396
- },
397
- item.slug
398
- )) })
399
- ] });
579
+ });
580
+ const toggle = () => {
581
+ open.value = !open.value;
582
+ if (scopeControls) {
583
+ scopeControls.expansion.value = { ...scopeControls.expansion.value, [occurrenceKey.value]: open.value };
584
+ scopeControls.save();
585
+ return;
586
+ }
587
+ const stored = getOpenSet();
588
+ if (open.value) stored.add(storageKey.value);
589
+ else stored.delete(storageKey.value);
590
+ saveOpenSet(stored);
591
+ };
592
+ scope.effect(() => {
593
+ const stored = scopeControls?.expansion.value[occurrenceKey.value];
594
+ if (scopeControls) open.value = stored ?? scopeControls.defaultGroupOpen(group.value.items);
595
+ });
596
+ const expanded = computed(() => forceOpen.value || open.value);
597
+ const items = computed(() => group.value.items);
598
+ return /* @__PURE__ */ jsxs(
599
+ "div",
600
+ {
601
+ class: computed(
602
+ () => !isLast.value && expanded.value ? "relative" : ""
603
+ ),
604
+ children: [
605
+ /* @__PURE__ */ jsx(Show, { when: computed(() => !isLast.value && expanded.value), children: () => /* @__PURE__ */ jsx(
606
+ "div",
607
+ {
608
+ class: "absolute border-l border-solid border-muted z-local-1",
609
+ style: { left: connectorLeft(1), top: "0px", bottom: "0px" }
610
+ }
611
+ ) }),
612
+ /* @__PURE__ */ jsxs("div", { class: "relative", children: [
613
+ /* @__PURE__ */ jsx(
614
+ ConnectorLinesLive,
615
+ {
616
+ depth: 1,
617
+ isLast,
618
+ topPad: "var(--spacing-vsp-xs)"
619
+ }
620
+ ),
621
+ /* @__PURE__ */ jsxs(
622
+ "button",
623
+ {
624
+ type: "button",
625
+ "on:click": toggle,
626
+ class: "flex w-full items-center gap-hsp-md py-vsp-xs text-left text-small font-semibold text-fg hover:text-accent hover:underline focus:underline focus:text-accent break-words",
627
+ style: { "padding-left": padLeft(1, true) },
628
+ "aria-expanded": computed(() => expanded.value ? "true" : "false"),
629
+ "aria-label": computed(
630
+ () => `${expanded.value ? "Collapse" : "Expand"} ${label.value}`
631
+ ),
632
+ "data-zd-sidebar-open-key": storageKey,
633
+ children: [
634
+ /* @__PURE__ */ jsx("span", { class: "aspect-square flex items-center justify-center w-[1.5rem] shrink-0 border border-muted", children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded: expanded, className: "text-muted" }) }),
635
+ /* @__PURE__ */ jsx("span", { children: label })
636
+ ]
637
+ }
638
+ )
639
+ ] }),
640
+ /* @__PURE__ */ jsx(Show, { when: expanded, children: () => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(For, { each: items, by: (item) => item.slug, children: (item, index) => /* @__PURE__ */ jsx(
641
+ TrayItem,
642
+ {
643
+ item,
644
+ currentSlug,
645
+ isLast: computed(
646
+ () => index.value === items.value.length - 1
647
+ ),
648
+ showDate: true,
649
+ locale,
650
+ dateFormats,
651
+ depth: GROUPED_TRAY_ITEM_DEPTH
652
+ }
653
+ ) }) }) })
654
+ ]
655
+ }
656
+ );
400
657
  }
401
- const NodeList = memo(function NodeList2({
658
+ function NodeList({
402
659
  nodes,
403
660
  currentSlug,
404
661
  depth,
405
- forceOpen
662
+ forceOpen,
663
+ scopeControls
406
664
  }) {
407
- return /* @__PURE__ */ jsx(Fragment, { children: nodes.map((node, index) => {
408
- const isLast = index === nodes.length - 1;
409
- return node.children.length > 0 ? /* @__PURE__ */ jsx(
410
- CategoryNode,
665
+ return /* @__PURE__ */ jsx(For, { each: nodes, by: (node) => node.occurrenceId ?? node.slug, children: (node, index) => {
666
+ const isLast = computed(() => index.value === nodes.value.length - 1);
667
+ return /* @__PURE__ */ jsx(
668
+ Show,
411
669
  {
412
- node,
413
- currentSlug,
414
- depth,
415
- isLast,
416
- forceOpen
417
- },
418
- node.slug
419
- ) : /* @__PURE__ */ jsx(
420
- LeafNode,
421
- {
422
- node,
423
- currentSlug,
424
- depth,
425
- isLast
426
- },
427
- node.slug
670
+ when: computed(() => node.value.children.length > 0),
671
+ fallback: () => /* @__PURE__ */ jsx(
672
+ LeafNode,
673
+ {
674
+ node,
675
+ currentSlug,
676
+ depth,
677
+ isLast,
678
+ forceOpen,
679
+ scopeControls
680
+ }
681
+ ),
682
+ children: () => /* @__PURE__ */ jsx(
683
+ CategoryNode,
684
+ {
685
+ node,
686
+ currentSlug,
687
+ depth,
688
+ isLast,
689
+ forceOpen,
690
+ scopeControls
691
+ }
692
+ )
693
+ }
428
694
  );
429
- }) });
430
- });
695
+ } });
696
+ }
431
697
  function subtreeContainsSlug(node, slug) {
432
- if (!slug) return false;
433
- if (node.slug === slug) return true;
434
- return node.children.some((child) => subtreeContainsSlug(child, slug));
698
+ return slug !== void 0 && (node.slug === slug || node.children.some((child) => subtreeContainsSlug(child, slug)));
435
699
  }
436
- const CategoryNode = memo(function CategoryNode2({
700
+ function CategoryNode({
437
701
  node,
438
702
  currentSlug,
439
703
  depth,
440
704
  isLast,
441
- forceOpen
705
+ forceOpen,
706
+ scopeControls
442
707
  }) {
443
- const containsCurrent = useMemo(
444
- () => subtreeContainsSlug(node, currentSlug),
445
- [node, currentSlug]
708
+ const scope = getScope();
709
+ const containsCurrent = computed(
710
+ () => subtreeContainsSlug(node.value, currentSlug.value)
446
711
  );
447
- const isActive = node.slug === currentSlug;
448
- const labelHtml = useMemo(() => smartBreakToHtml(node.label), [node.label]);
449
- const [open, setOpen] = useState(containsCurrent ? true : !node.collapsed);
450
- useEffect(() => {
451
- const stored = getOpenSet();
452
- if (stored.has(node.slug) && !open) {
453
- setOpen(true);
454
- }
455
- }, []);
456
- useEffect(() => {
457
- if (subtreeContainsSlug(node, currentSlug) && !open) {
458
- setOpen(true);
712
+ const active = computed(() => node.value.slug === currentSlug.value);
713
+ const occurrenceKey = () => node.value.occurrenceId ?? node.value.slug;
714
+ const open = signal(scopeControls?.expansion.value[occurrenceKey()] ?? (scopeControls?.defaultOpen(node.value) ?? (containsCurrent.value || !node.value.collapsed)));
715
+ scope.onActivate(() => {
716
+ if (!scopeControls && getOpenSet().has(node.value.slug)) open.value = true;
717
+ });
718
+ scope.effect(() => {
719
+ const slug = currentSlug.value;
720
+ const revision = scopeControls?.reveal.value;
721
+ if (slug !== void 0 && subtreeContainsSlug(node.value, slug)) open.value = true;
722
+ void revision;
723
+ });
724
+ scope.effect(() => {
725
+ if (!scopeControls && open.value) {
459
726
  const stored = getOpenSet();
460
- stored.add(node.slug);
461
- saveOpenSet(stored);
462
- }
463
- }, [currentSlug]);
464
- useEffect(() => {
465
- if (open) {
466
- const stored = getOpenSet();
467
- if (!stored.has(node.slug)) {
468
- stored.add(node.slug);
727
+ if (!stored.has(node.value.slug)) {
728
+ stored.add(node.value.slug);
469
729
  saveOpenSet(stored);
470
730
  }
471
731
  }
472
- }, [open, node.slug]);
473
- const toggle = useCallback(() => {
474
- setOpen((prev) => {
475
- const next = !prev;
476
- const stored = getOpenSet();
477
- if (next) {
478
- stored.add(node.slug);
479
- } else {
480
- stored.delete(node.slug);
481
- }
482
- saveOpenSet(stored);
483
- return next;
484
- });
485
- }, [node.slug]);
486
- const isExpanded = forceOpen || open;
732
+ });
733
+ const toggle = () => {
734
+ open.value = !open.value;
735
+ if (scopeControls) {
736
+ scopeControls.expansion.value = { ...scopeControls.expansion.value, [occurrenceKey()]: open.value };
737
+ scopeControls.save();
738
+ return;
739
+ }
740
+ const stored = getOpenSet();
741
+ if (open.value) stored.add(node.value.slug);
742
+ else stored.delete(node.value.slug);
743
+ saveOpenSet(stored);
744
+ };
745
+ scope.effect(() => {
746
+ const stored = scopeControls?.expansion.value[occurrenceKey()];
747
+ if (scopeControls) open.value = stored ?? scopeControls.defaultOpen(node.value);
748
+ });
749
+ const expanded = computed(() => forceOpen.value || open.value);
750
+ const focusButton = scopeControls ? /* @__PURE__ */ jsx(
751
+ "button",
752
+ {
753
+ type: "button",
754
+ "data-sidebar-focus": true,
755
+ "data-sidebar-focus-scope": computed(() => node.value.occurrenceId ?? ""),
756
+ "on:click": () => scopeControls.focus(node.value),
757
+ "aria-label": computed(() => `${scopeControls.focusLabel}: ${node.value.label}`),
758
+ title: computed(() => `${scopeControls.focusLabel}: ${node.value.label}`),
759
+ class: computed(() => `ml-auto shrink-0 rounded px-hsp-xs py-vsp-2xs ${active.value ? "text-bg hover:bg-bg/10 focus-visible:bg-bg/10" : "text-muted hover:bg-surface hover:text-fg focus-visible:bg-surface focus-visible:text-fg"}`),
760
+ children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u25CE" })
761
+ }
762
+ ) : null;
487
763
  const paddingLeft = padLeft(depth, true);
488
- return /* @__PURE__ */ jsxs("div", { className: `${depth === 0 ? "border-t border-muted" : ""} ${depth >= 1 && !isLast ? "relative" : ""}`, children: [
489
- depth >= 1 && !isLast && isExpanded && /* @__PURE__ */ jsx(
490
- "div",
491
- {
492
- className: "absolute border-l border-solid border-muted z-local-1",
493
- style: {
494
- left: connectorLeft(depth),
495
- top: 0,
496
- bottom: 0
497
- }
498
- }
499
- ),
500
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
501
- /* @__PURE__ */ jsx(ConnectorLines, { depth, isLast, topPad: "calc(0.15rem + var(--spacing-vsp-xs))" }),
502
- node.href ? /* @__PURE__ */ jsxs(
503
- "div",
504
- {
505
- className: `flex w-full items-center text-small font-semibold pt-[0.15rem] ${isActive ? "bg-fg text-bg" : "text-fg"}`,
506
- children: [
507
- /* @__PURE__ */ jsxs(
508
- "a",
764
+ return /* @__PURE__ */ jsxs(
765
+ "div",
766
+ {
767
+ class: computed(
768
+ () => `${depth === 0 ? "border-t border-muted first:border-t-0" : ""} ${depth >= 1 && !isLast.value ? "relative" : ""}`
769
+ ),
770
+ children: [
771
+ /* @__PURE__ */ jsx(
772
+ Show,
773
+ {
774
+ when: computed(() => depth >= 1 && !isLast.value && expanded.value),
775
+ children: () => /* @__PURE__ */ jsx(
776
+ "div",
509
777
  {
510
- href: node.href,
511
- "aria-current": isActive ? "page" : void 0,
512
- className: `flex-1 flex items-start gap-hsp-xs py-vsp-xs hover:underline focus:underline break-words ${isActive ? "text-bg" : "text-fg hover:text-accent focus:text-accent"}`,
513
- style: { paddingLeft },
514
- children: [
515
- depth === 0 && /* @__PURE__ */ jsx("span", { className: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, { className: `w-[14px] ${isActive ? "text-bg" : ""}` }) }),
516
- /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: labelHtml } })
517
- ]
518
- }
519
- ),
520
- /* @__PURE__ */ jsx(
521
- "button",
522
- {
523
- type: "button",
524
- onClick: toggle,
525
- className: `aspect-square flex items-center justify-center w-[1.5rem] border-y border-l hover:underline focus:underline ${isActive ? "border-bg/30" : "border-muted"}`,
526
- "aria-expanded": isExpanded,
527
- "aria-label": isExpanded ? `Collapse ${node.label}` : `Expand ${node.label}`,
528
- children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded, className: isActive ? "text-bg" : "text-muted" })
778
+ class: "absolute border-l border-solid border-muted z-local-1",
779
+ style: { left: connectorLeft(depth), top: "0px", bottom: "0px" }
529
780
  }
530
781
  )
531
- ]
532
- }
533
- ) : /* @__PURE__ */ jsxs(
534
- "button",
535
- {
536
- type: "button",
537
- onClick: toggle,
538
- className: `flex w-full items-center gap-hsp-md text-left text-small font-semibold py-vsp-xs text-fg hover:text-accent hover:underline focus:underline focus:text-accent break-words`,
539
- style: { paddingLeft },
540
- "aria-expanded": isExpanded,
541
- "aria-label": isExpanded ? `Collapse ${node.label}` : `Expand ${node.label}`,
542
- children: [
543
- /* @__PURE__ */ jsx("span", { className: "aspect-square flex items-center justify-center w-[1.5rem] shrink-0 border border-muted", children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded, className: "text-muted" }) }),
544
- /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: labelHtml } })
545
- ]
546
- }
547
- )
548
- ] }),
549
- isExpanded && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
550
- NodeList,
551
- {
552
- nodes: node.children,
553
- currentSlug,
554
- depth: depth + 1,
555
- forceOpen
556
- }
557
- ) })
558
- ] });
559
- });
560
- const LeafNode = memo(function LeafNode2({
561
- node,
562
- currentSlug,
563
- depth,
564
- isLast
565
- }) {
566
- const labelHtml = useMemo(() => smartBreakToHtml(node.label), [node.label]);
567
- if (!node.href) return null;
568
- const isActive = node.slug === currentSlug;
782
+ }
783
+ ),
784
+ /* @__PURE__ */ jsxs("div", { class: "relative", children: [
785
+ /* @__PURE__ */ jsx(
786
+ ConnectorLinesLive,
787
+ {
788
+ depth,
789
+ isLast,
790
+ topPad: "calc(0.15rem + var(--spacing-vsp-xs))"
791
+ }
792
+ ),
793
+ /* @__PURE__ */ jsx(
794
+ Show,
795
+ {
796
+ when: computed(() => !!node.value.href),
797
+ fallback: () => /* @__PURE__ */ jsxs("div", { class: "flex flex-wrap items-center", children: [
798
+ /* @__PURE__ */ jsxs(
799
+ "button",
800
+ {
801
+ type: "button",
802
+ "on:click": toggle,
803
+ class: "flex flex-1 max-w-full items-center gap-hsp-md text-left text-small font-semibold py-vsp-xs text-fg hover:text-accent hover:underline focus:underline focus:text-accent break-words",
804
+ style: { "padding-left": paddingLeft },
805
+ "aria-expanded": computed(
806
+ () => expanded.value ? "true" : "false"
807
+ ),
808
+ "aria-label": computed(
809
+ () => `${expanded.value ? "Collapse" : "Expand"} ${node.value.label}`
810
+ ),
811
+ children: [
812
+ /* @__PURE__ */ jsx("span", { class: "aspect-square flex items-center justify-center w-[1.5rem] shrink-0 border border-muted", children: /* @__PURE__ */ jsx(ToggleChevron, { isExpanded: expanded, className: "text-muted" }) }),
813
+ /* @__PURE__ */ jsx(
814
+ "span",
815
+ {
816
+ rawHtml: computed(() => smartBreakToHtml(node.value.label))
817
+ }
818
+ )
819
+ ]
820
+ }
821
+ ),
822
+ focusButton
823
+ ] }),
824
+ children: () => /* @__PURE__ */ jsxs(
825
+ "div",
826
+ {
827
+ class: computed(
828
+ () => `flex w-full items-center text-small font-semibold pt-[0.15rem] ${active.value ? "bg-fg text-bg" : "text-fg"}`
829
+ ),
830
+ children: [
831
+ /* @__PURE__ */ jsxs(
832
+ "a",
833
+ {
834
+ href: computed(() => node.value.href ?? ""),
835
+ "aria-current": computed(() => active.value ? "page" : "false"),
836
+ class: computed(
837
+ () => `flex-1 flex items-start gap-hsp-xs py-vsp-xs hover:underline focus:underline break-words ${active.value ? "text-bg" : "text-fg hover:text-accent focus:text-accent"}`
838
+ ),
839
+ style: { "padding-left": paddingLeft },
840
+ children: [
841
+ depth === 0 ? /* @__PURE__ */ jsx("span", { class: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, { class: "w-[14px]" }) }) : null,
842
+ /* @__PURE__ */ jsx(
843
+ "span",
844
+ {
845
+ rawHtml: computed(() => smartBreakToHtml(node.value.label))
846
+ }
847
+ )
848
+ ]
849
+ }
850
+ ),
851
+ focusButton,
852
+ /* @__PURE__ */ jsx(
853
+ "button",
854
+ {
855
+ type: "button",
856
+ "on:click": toggle,
857
+ class: computed(
858
+ () => `aspect-square flex items-center justify-center w-[1.5rem] border-y border-l hover:underline focus:underline ${active.value ? "border-bg/30" : "border-muted"}`
859
+ ),
860
+ "aria-expanded": computed(
861
+ () => expanded.value ? "true" : "false"
862
+ ),
863
+ "aria-label": computed(
864
+ () => `${expanded.value ? "Collapse" : "Expand"} ${node.value.label}`
865
+ ),
866
+ children: /* @__PURE__ */ jsx(
867
+ ToggleChevron,
868
+ {
869
+ isExpanded: expanded,
870
+ className: computed(
871
+ () => active.value ? "text-bg" : "text-muted"
872
+ )
873
+ }
874
+ )
875
+ }
876
+ )
877
+ ]
878
+ }
879
+ )
880
+ }
881
+ )
882
+ ] }),
883
+ /* @__PURE__ */ jsx(Show, { when: expanded, children: () => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
884
+ NodeList,
885
+ {
886
+ nodes: computed(() => node.value.children),
887
+ currentSlug,
888
+ depth: depth + 1,
889
+ forceOpen,
890
+ scopeControls
891
+ }
892
+ ) }) })
893
+ ]
894
+ }
895
+ );
896
+ }
897
+ function LeafNode({ node, currentSlug, depth, isLast }) {
898
+ const active = computed(() => node.value.slug === currentSlug.value);
569
899
  const isRoot = depth === 0;
570
900
  const paddingLeft = padLeft(depth, isRoot);
571
- const outerClass = isRoot ? "border-t border-muted" : !isRoot && isLast ? "pb-vsp-md" : "";
572
901
  const topPad = isRoot ? "calc(var(--spacing-vsp-xs) + 0.15rem)" : "var(--spacing-vsp-2xs)";
573
- return /* @__PURE__ */ jsx("div", { className: outerClass, children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
574
- /* @__PURE__ */ jsx(ConnectorLines, { depth, isLast, topPad }),
575
- /* @__PURE__ */ jsxs(
576
- "a",
577
- {
578
- href: node.href,
579
- "aria-current": isActive ? "page" : void 0,
580
- "data-nav-active": !isRoot && isActive ? "" : void 0,
581
- className: isRoot ? `flex items-start gap-hsp-xs py-[calc(var(--spacing-vsp-xs)+0.15rem)] pr-hsp-xs lg:pr-hsp-sm text-small font-semibold break-words ${isActive ? "bg-fg text-bg" : "text-fg hover:text-accent hover:underline focus:underline focus:text-accent"}` : `block py-vsp-2xs pr-hsp-xs lg:pr-hsp-sm text-small break-words ${isActive ? "bg-fg font-medium text-bg" : "text-muted hover:text-accent hover:underline focus:underline focus:text-accent"}`,
582
- style: { paddingLeft },
583
- children: [
584
- isRoot && /* @__PURE__ */ jsx("span", { className: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, { className: `w-[14px] ${isActive ? "text-bg" : ""}` }) }),
585
- /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: labelHtml } })
586
- ]
587
- }
588
- )
589
- ] }) });
590
- });
902
+ return /* @__PURE__ */ jsx(Show, { when: computed(() => !!node.value.href), children: () => /* @__PURE__ */ jsx(
903
+ "div",
904
+ {
905
+ class: computed(
906
+ () => isRoot ? "border-t border-muted first:border-t-0" : isLast.value ? "pb-vsp-md" : ""
907
+ ),
908
+ children: /* @__PURE__ */ jsxs("div", { class: "relative", children: [
909
+ /* @__PURE__ */ jsx(ConnectorLinesLive, { depth, isLast, topPad }),
910
+ /* @__PURE__ */ jsxs(
911
+ "a",
912
+ {
913
+ href: computed(() => node.value.href ?? ""),
914
+ "aria-current": computed(() => active.value ? "page" : "false"),
915
+ "data-nav-active": computed(
916
+ () => !isRoot && active.value ? "" : null
917
+ ),
918
+ class: computed(
919
+ () => isRoot ? `flex items-start gap-hsp-xs py-[calc(var(--spacing-vsp-xs)_+_0.15rem)] pr-hsp-xs lg:pr-hsp-sm text-small font-semibold break-words ${active.value ? "bg-fg text-bg" : "text-fg hover:text-accent hover:underline focus:underline focus:text-accent"}` : `block py-vsp-2xs pr-hsp-xs lg:pr-hsp-sm text-small break-words ${active.value ? "bg-fg font-medium text-bg" : "text-muted hover:text-accent hover:underline focus:underline focus:text-accent"}`
920
+ ),
921
+ style: { "padding-left": paddingLeft },
922
+ children: [
923
+ isRoot ? /* @__PURE__ */ jsx("span", { class: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, { class: "w-[14px]" }) }) : null,
924
+ /* @__PURE__ */ jsx(
925
+ "span",
926
+ {
927
+ rawHtml: computed(() => smartBreakToHtml(node.value.label))
928
+ }
929
+ )
930
+ ]
931
+ }
932
+ )
933
+ ] })
934
+ }
935
+ ) });
936
+ }
591
937
  export {
592
938
  SidebarTree
593
939
  };