@vx-oss/docs-react 1.0.3

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 (262) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/css/aspen.css +39 -0
  4. package/css/black.css +39 -0
  5. package/css/catppuccin.css +49 -0
  6. package/css/dusk.css +47 -0
  7. package/css/emerald.css +39 -0
  8. package/css/generated/docs.css +1 -0
  9. package/css/generated/flux.css +1 -0
  10. package/css/generated/glass.css +1 -0
  11. package/css/generated/home.css +1 -0
  12. package/css/generated/notebook.css +1 -0
  13. package/css/generated/shared.css +1 -0
  14. package/css/lib/base.css +296 -0
  15. package/css/lib/default-colors.css +51 -0
  16. package/css/lib/shiki.css +108 -0
  17. package/css/neutral.css +7 -0
  18. package/css/ocean.css +44 -0
  19. package/css/preset-legacy.css +43 -0
  20. package/css/preset.css +11 -0
  21. package/css/purple.css +39 -0
  22. package/css/ruby.css +39 -0
  23. package/css/shadcn.css +36 -0
  24. package/css/solar.css +65 -0
  25. package/css/style.css +9 -0
  26. package/css/vitepress.css +72 -0
  27. package/dist/.translations/index.d.ts +55 -0
  28. package/dist/.translations/keys.js +55 -0
  29. package/dist/_virtual/_rolldown/runtime.js +13 -0
  30. package/dist/components/accordion.d.ts +10 -0
  31. package/dist/components/accordion.js +68 -0
  32. package/dist/components/banner.d.ts +25 -0
  33. package/dist/components/banner.js +85 -0
  34. package/dist/components/callout.d.ts +21 -0
  35. package/dist/components/callout.js +60 -0
  36. package/dist/components/card.d.ts +13 -0
  37. package/dist/components/card.js +39 -0
  38. package/dist/components/codeblock.d.ts +45 -0
  39. package/dist/components/codeblock.js +126 -0
  40. package/dist/components/codeblock.rsc.d.ts +15 -0
  41. package/dist/components/codeblock.rsc.js +22 -0
  42. package/dist/components/dialog/search-algolia.d.ts +27 -0
  43. package/dist/components/dialog/search-algolia.js +64 -0
  44. package/dist/components/dialog/search-default.d.ts +29 -0
  45. package/dist/components/dialog/search-default.js +66 -0
  46. package/dist/components/dialog/search-orama.d.ts +32 -0
  47. package/dist/components/dialog/search-orama.js +69 -0
  48. package/dist/components/dialog/search.d.ts +76 -0
  49. package/dist/components/dialog/search.js +351 -0
  50. package/dist/components/dynamic-codeblock.core.d.ts +26 -0
  51. package/dist/components/dynamic-codeblock.core.js +51 -0
  52. package/dist/components/dynamic-codeblock.d.ts +8 -0
  53. package/dist/components/dynamic-codeblock.js +17 -0
  54. package/dist/components/files.d.ts +21 -0
  55. package/dist/components/files.js +40 -0
  56. package/dist/components/github-info.d.ts +20 -0
  57. package/dist/components/github-info.js +75 -0
  58. package/dist/components/heading.d.ts +9 -0
  59. package/dist/components/heading.js +38 -0
  60. package/dist/components/image-zoom.d.ts +18 -0
  61. package/dist/components/image-zoom.js +32 -0
  62. package/dist/components/image-zoom2.css +71 -0
  63. package/dist/components/inline-toc.d.ts +10 -0
  64. package/dist/components/inline-toc.js +28 -0
  65. package/dist/components/sidebar/base.d.ts +85 -0
  66. package/dist/components/sidebar/base.js +277 -0
  67. package/dist/components/sidebar/link-item.d.ts +12 -0
  68. package/dist/components/sidebar/link-item.js +37 -0
  69. package/dist/components/sidebar/page-tree.d.ts +20 -0
  70. package/dist/components/sidebar/page-tree.js +69 -0
  71. package/dist/components/sidebar/tabs/dropdown.d.ts +15 -0
  72. package/dist/components/sidebar/tabs/dropdown.js +83 -0
  73. package/dist/components/sidebar/tabs/index.d.ts +8 -0
  74. package/dist/components/sidebar/tabs/index.js +46 -0
  75. package/dist/components/steps.d.ts +10 -0
  76. package/dist/components/steps.js +16 -0
  77. package/dist/components/tabs.d.ts +33 -0
  78. package/dist/components/tabs.js +95 -0
  79. package/dist/components/toc/clerk.d.ts +11 -0
  80. package/dist/components/toc/clerk.js +227 -0
  81. package/dist/components/toc/default.d.ts +13 -0
  82. package/dist/components/toc/default.js +260 -0
  83. package/dist/components/toc/index.d.ts +10 -0
  84. package/dist/components/toc/index.js +45 -0
  85. package/dist/components/type-table.d.ts +37 -0
  86. package/dist/components/type-table.js +117 -0
  87. package/dist/components/ui/accordion.d.ts +10 -0
  88. package/dist/components/ui/accordion.js +42 -0
  89. package/dist/components/ui/button.d.ts +10 -0
  90. package/dist/components/ui/button.js +20 -0
  91. package/dist/components/ui/collapsible.d.ts +11 -0
  92. package/dist/components/ui/collapsible.js +21 -0
  93. package/dist/components/ui/navigation-menu.d.ts +14 -0
  94. package/dist/components/ui/navigation-menu.js +41 -0
  95. package/dist/components/ui/popover.d.ts +9 -0
  96. package/dist/components/ui/popover.js +20 -0
  97. package/dist/components/ui/scroll-area.d.ts +9 -0
  98. package/dist/components/ui/scroll-area.js +34 -0
  99. package/dist/components/ui/tabs.d.ts +23 -0
  100. package/dist/components/ui/tabs.js +102 -0
  101. package/dist/contexts/i18n.d.ts +34 -0
  102. package/dist/contexts/i18n.js +37 -0
  103. package/dist/contexts/search.d.ts +64 -0
  104. package/dist/contexts/search.js +68 -0
  105. package/dist/contexts/tree.d.ts +29 -0
  106. package/dist/contexts/tree.js +91 -0
  107. package/dist/i18n.d.ts +15 -0
  108. package/dist/i18n.js +38 -0
  109. package/dist/layouts/docs/client.d.ts +33 -0
  110. package/dist/layouts/docs/client.js +94 -0
  111. package/dist/layouts/docs/index.d.ts +32 -0
  112. package/dist/layouts/docs/index.js +23 -0
  113. package/dist/layouts/docs/page/index.d.ts +76 -0
  114. package/dist/layouts/docs/page/index.js +124 -0
  115. package/dist/layouts/docs/page/slots/breadcrumb.d.ts +7 -0
  116. package/dist/layouts/docs/page/slots/breadcrumb.js +44 -0
  117. package/dist/layouts/docs/page/slots/container.d.ts +5 -0
  118. package/dist/layouts/docs/page/slots/container.js +22 -0
  119. package/dist/layouts/docs/page/slots/footer.d.ts +16 -0
  120. package/dist/layouts/docs/page/slots/footer.js +56 -0
  121. package/dist/layouts/docs/page/slots/toc.d.ts +47 -0
  122. package/dist/layouts/docs/page/slots/toc.js +182 -0
  123. package/dist/layouts/docs/slots/container.d.ts +5 -0
  124. package/dist/layouts/docs/slots/container.js +36 -0
  125. package/dist/layouts/docs/slots/header.d.ts +5 -0
  126. package/dist/layouts/docs/slots/header.js +38 -0
  127. package/dist/layouts/docs/slots/sidebar.d.ts +22 -0
  128. package/dist/layouts/docs/slots/sidebar.js +268 -0
  129. package/dist/layouts/flux/index.d.ts +61 -0
  130. package/dist/layouts/flux/index.js +146 -0
  131. package/dist/layouts/flux/page/index.d.ts +67 -0
  132. package/dist/layouts/flux/page/index.js +104 -0
  133. package/dist/layouts/flux/page/slots/breadcrumb.d.ts +7 -0
  134. package/dist/layouts/flux/page/slots/breadcrumb.js +44 -0
  135. package/dist/layouts/flux/page/slots/container.d.ts +5 -0
  136. package/dist/layouts/flux/page/slots/container.js +22 -0
  137. package/dist/layouts/flux/page/slots/footer.d.ts +16 -0
  138. package/dist/layouts/flux/page/slots/footer.js +56 -0
  139. package/dist/layouts/flux/page/slots/toc.d.ts +29 -0
  140. package/dist/layouts/flux/page/slots/toc.js +181 -0
  141. package/dist/layouts/flux/slots/container.d.ts +5 -0
  142. package/dist/layouts/flux/slots/container.js +13 -0
  143. package/dist/layouts/flux/slots/sidebar.d.ts +16 -0
  144. package/dist/layouts/flux/slots/sidebar.js +243 -0
  145. package/dist/layouts/flux/slots/tab-dropdown.d.ts +10 -0
  146. package/dist/layouts/flux/slots/tab-dropdown.js +88 -0
  147. package/dist/layouts/glass/index.d.ts +39 -0
  148. package/dist/layouts/glass/index.js +70 -0
  149. package/dist/layouts/glass/layout-tabs.js +54 -0
  150. package/dist/layouts/glass/page/index.d.ts +31 -0
  151. package/dist/layouts/glass/page/index.js +92 -0
  152. package/dist/layouts/glass/page/slots/breadcrumb.d.ts +7 -0
  153. package/dist/layouts/glass/page/slots/breadcrumb.js +44 -0
  154. package/dist/layouts/glass/page/slots/footer.d.ts +16 -0
  155. package/dist/layouts/glass/page/slots/footer.js +56 -0
  156. package/dist/layouts/glass/page/slots/toc.d.ts +19 -0
  157. package/dist/layouts/glass/page/slots/toc.js +108 -0
  158. package/dist/layouts/glass/slots/header.d.ts +6 -0
  159. package/dist/layouts/glass/slots/header.js +68 -0
  160. package/dist/layouts/glass/slots/sidebar.d.ts +21 -0
  161. package/dist/layouts/glass/slots/sidebar.js +267 -0
  162. package/dist/layouts/home/index.d.ts +27 -0
  163. package/dist/layouts/home/index.js +40 -0
  164. package/dist/layouts/home/navbar.d.ts +9 -0
  165. package/dist/layouts/home/navbar.js +34 -0
  166. package/dist/layouts/home/not-found.d.ts +7 -0
  167. package/dist/layouts/home/not-found.js +41 -0
  168. package/dist/layouts/home/slots/container.d.ts +5 -0
  169. package/dist/layouts/home/slots/container.js +13 -0
  170. package/dist/layouts/home/slots/header.d.ts +8 -0
  171. package/dist/layouts/home/slots/header.js +239 -0
  172. package/dist/layouts/notebook/client.d.ts +35 -0
  173. package/dist/layouts/notebook/client.js +69 -0
  174. package/dist/layouts/notebook/index.d.ts +26 -0
  175. package/dist/layouts/notebook/index.js +23 -0
  176. package/dist/layouts/notebook/page/index.d.ts +76 -0
  177. package/dist/layouts/notebook/page/index.js +124 -0
  178. package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +7 -0
  179. package/dist/layouts/notebook/page/slots/breadcrumb.js +44 -0
  180. package/dist/layouts/notebook/page/slots/container.d.ts +5 -0
  181. package/dist/layouts/notebook/page/slots/container.js +22 -0
  182. package/dist/layouts/notebook/page/slots/footer.d.ts +16 -0
  183. package/dist/layouts/notebook/page/slots/footer.js +56 -0
  184. package/dist/layouts/notebook/page/slots/toc.d.ts +47 -0
  185. package/dist/layouts/notebook/page/slots/toc.js +181 -0
  186. package/dist/layouts/notebook/slots/container.d.ts +5 -0
  187. package/dist/layouts/notebook/slots/container.js +38 -0
  188. package/dist/layouts/notebook/slots/header.d.ts +5 -0
  189. package/dist/layouts/notebook/slots/header.js +204 -0
  190. package/dist/layouts/notebook/slots/sidebar.d.ts +23 -0
  191. package/dist/layouts/notebook/slots/sidebar.js +240 -0
  192. package/dist/layouts/shared/client.d.ts +37 -0
  193. package/dist/layouts/shared/client.js +85 -0
  194. package/dist/layouts/shared/index.d.ts +169 -0
  195. package/dist/layouts/shared/index.js +98 -0
  196. package/dist/layouts/shared/page-actions.d.ts +27 -0
  197. package/dist/layouts/shared/page-actions.js +199 -0
  198. package/dist/layouts/shared/slots/language-select.d.ts +12 -0
  199. package/dist/layouts/shared/slots/language-select.js +43 -0
  200. package/dist/layouts/shared/slots/search-trigger.d.ts +13 -0
  201. package/dist/layouts/shared/slots/search-trigger.js +53 -0
  202. package/dist/layouts/shared/slots/theme-switch.d.ts +8 -0
  203. package/dist/layouts/shared/slots/theme-switch.js +70 -0
  204. package/dist/legacy/layout.d.ts +29 -0
  205. package/dist/legacy/layout.js +44 -0
  206. package/dist/legacy/sidebar.d.ts +14 -0
  207. package/dist/legacy/sidebar.js +34 -0
  208. package/dist/mdx.d.ts +44 -0
  209. package/dist/mdx.js +70 -0
  210. package/dist/mdx.server.d.ts +14 -0
  211. package/dist/mdx.server.js +20 -0
  212. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/controlled.d.ts +30 -0
  213. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/controlled.js +461 -0
  214. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/index.d.ts +3 -0
  215. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +6 -0
  216. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/uncontrolled.js +17 -0
  217. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +53 -0
  218. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +25 -0
  219. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +12 -0
  220. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +45 -0
  221. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +10 -0
  222. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +57 -0
  223. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +21 -0
  224. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +14 -0
  225. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +22 -0
  226. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +27 -0
  227. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +31 -0
  228. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +75 -0
  229. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +4 -0
  230. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +7 -0
  231. package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +5 -0
  232. package/dist/og/takumi.d.ts +15 -0
  233. package/dist/og/takumi.js +91 -0
  234. package/dist/og.d.ts +16 -0
  235. package/dist/og.js +91 -0
  236. package/dist/page.d.ts +29 -0
  237. package/dist/page.js +33 -0
  238. package/dist/provider/astro.d.ts +29 -0
  239. package/dist/provider/astro.js +20 -0
  240. package/dist/provider/base.d.ts +48 -0
  241. package/dist/provider/base.js +73 -0
  242. package/dist/provider/next.d.ts +16 -0
  243. package/dist/provider/next.js +17 -0
  244. package/dist/provider/react-router.d.ts +16 -0
  245. package/dist/provider/react-router.js +17 -0
  246. package/dist/provider/tanstack.d.ts +16 -0
  247. package/dist/provider/tanstack.js +17 -0
  248. package/dist/provider/waku.d.ts +16 -0
  249. package/dist/provider/waku.js +17 -0
  250. package/dist/style.css +3640 -0
  251. package/dist/tailwind/typography.d.ts +2 -0
  252. package/dist/tailwind/typography.js +2 -0
  253. package/dist/utils/cn.js +2 -0
  254. package/dist/utils/merge-refs.js +11 -0
  255. package/dist/utils/urls.js +15 -0
  256. package/dist/utils/use-copy-button.d.ts +5 -0
  257. package/dist/utils/use-copy-button.js +26 -0
  258. package/dist/utils/use-footer-items.d.ts +8 -0
  259. package/dist/utils/use-footer-items.js +24 -0
  260. package/dist/utils/use-is-scroll-top.d.ts +6 -0
  261. package/dist/utils/use-is-scroll-top.js +20 -0
  262. package/package.json +212 -0
@@ -0,0 +1,10 @@
1
+ import { testImg } from "./element-tests.js";
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js
3
+ const getImgAlt = (imgEl) => {
4
+ if (imgEl !== null) {
5
+ if (testImg(imgEl)) return imgEl.alt;
6
+ else return imgEl.getAttribute("aria-label") ?? void 0;
7
+ }
8
+ };
9
+ //#endregion
10
+ export { getImgAlt };
@@ -0,0 +1,57 @@
1
+ import { getScale } from "./get-scale.js";
2
+ import { computePositionedStyle } from "./compute-positioned-style.js";
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js
4
+ const getImgObjectFitStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, objectFit: objectFitParam, objectPosition, offset, targetHeight, targetWidth }) => {
5
+ let resolvedObjectFit = objectFitParam;
6
+ if (resolvedObjectFit === "scale-down") {
7
+ if (targetWidth <= containerWidth && targetHeight <= containerHeight) resolvedObjectFit = "none";
8
+ else resolvedObjectFit = "contain";
9
+ }
10
+ const base = {
11
+ containerHeight,
12
+ containerLeft,
13
+ containerTop,
14
+ containerWidth,
15
+ hasScalableSrc,
16
+ offset,
17
+ position: objectPosition,
18
+ targetHeight,
19
+ targetWidth
20
+ };
21
+ if (resolvedObjectFit === "cover" || resolvedObjectFit === "contain") {
22
+ const widthRatio = containerWidth / targetWidth;
23
+ const heightRatio = containerHeight / targetHeight;
24
+ const ratio = resolvedObjectFit === "cover" ? Math.max(widthRatio, heightRatio) : Math.min(widthRatio, heightRatio);
25
+ return computePositionedStyle({
26
+ ...base,
27
+ visibleWidth: targetWidth * ratio,
28
+ visibleHeight: targetHeight * ratio
29
+ });
30
+ } else if (resolvedObjectFit === "none") return computePositionedStyle({
31
+ ...base,
32
+ visibleWidth: targetWidth,
33
+ visibleHeight: targetHeight
34
+ });
35
+ else {
36
+ const widthRatio = containerWidth / targetWidth;
37
+ const heightRatio = containerHeight / targetHeight;
38
+ const ratio = Math.max(widthRatio, heightRatio);
39
+ const scale = getScale({
40
+ containerHeight: targetHeight * ratio,
41
+ containerWidth: targetWidth * ratio,
42
+ hasScalableSrc,
43
+ offset,
44
+ targetHeight,
45
+ targetWidth
46
+ });
47
+ return {
48
+ top: containerTop,
49
+ left: containerLeft,
50
+ width: containerWidth * scale,
51
+ height: containerHeight * scale,
52
+ initialTransform: `translate(0,0) scale(${1 / scale})`
53
+ };
54
+ }
55
+ };
56
+ //#endregion
57
+ export { getImgObjectFitStyle };
@@ -0,0 +1,21 @@
1
+ import { getScale } from "./get-scale.js";
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js
3
+ const getImgRegularStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
4
+ const scale = getScale({
5
+ containerHeight,
6
+ containerWidth,
7
+ hasScalableSrc,
8
+ offset,
9
+ targetHeight,
10
+ targetWidth
11
+ });
12
+ return {
13
+ top: containerTop,
14
+ left: containerLeft,
15
+ width: containerWidth * scale,
16
+ height: containerHeight * scale,
17
+ initialTransform: `translate(0,0) scale(${1 / scale})`
18
+ };
19
+ };
20
+ //#endregion
21
+ export { getImgRegularStyle };
@@ -0,0 +1,14 @@
1
+ import { testDiv, testImg } from "./element-tests.js";
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js
3
+ const URL_REGEX = /url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/;
4
+ const getImgSrc = (imgEl) => {
5
+ if (imgEl !== null) {
6
+ if (testImg(imgEl)) return imgEl.currentSrc === "" ? void 0 : imgEl.currentSrc;
7
+ else if (testDiv(imgEl)) {
8
+ const { backgroundImage: bgImg } = window.getComputedStyle(imgEl);
9
+ if (bgImg !== "") return URL_REGEX.exec(bgImg)?.[1];
10
+ }
11
+ }
12
+ };
13
+ //#endregion
14
+ export { getImgSrc };
@@ -0,0 +1,22 @@
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js
2
+ const getModalImgTransform = ({ height, initialTransform, isZoomed, left, top, userTransform, width }) => {
3
+ let centeredUserTransform = "";
4
+ if (userTransform !== "none" && userTransform !== "") {
5
+ const halfWidth = width / 2;
6
+ const halfHeight = height / 2;
7
+ centeredUserTransform = `translate(${halfWidth}px,${halfHeight}px) ${userTransform} translate(${-halfWidth}px,${-halfHeight}px)`;
8
+ }
9
+ if (!isZoomed) {
10
+ if (centeredUserTransform === "") return initialTransform;
11
+ return `${initialTransform} ${centeredUserTransform}`;
12
+ }
13
+ const viewportX = window.innerWidth / 2;
14
+ const viewportY = window.innerHeight / 2;
15
+ const childCenterX = left + width / 2;
16
+ const childCenterY = top + height / 2;
17
+ const base = `translate(${viewportX - childCenterX}px,${viewportY - childCenterY}px) scale(1)`;
18
+ if (centeredUserTransform === "") return base;
19
+ return `${base} ${centeredUserTransform}`;
20
+ };
21
+ //#endregion
22
+ export { getModalImgTransform };
@@ -0,0 +1,27 @@
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-scale.js
2
+ const getScaleToWindow = ({ height, offset, width }) => Math.min((window.innerWidth - offset * 2) / width, (window.innerHeight - offset * 2) / height);
3
+ const getScaleToWindowMax = ({ containerHeight, containerWidth, offset, targetHeight, targetWidth }) => {
4
+ const scale = getScaleToWindow({
5
+ height: targetHeight,
6
+ offset,
7
+ width: targetWidth
8
+ });
9
+ const ratio = targetWidth > targetHeight ? targetWidth / containerWidth : targetHeight / containerHeight;
10
+ return scale > 1 ? ratio : scale * ratio;
11
+ };
12
+ const getScale = ({ containerHeight, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
13
+ if (containerHeight === 0 || containerWidth === 0) return 1;
14
+ return !hasScalableSrc && targetHeight !== 0 && targetWidth !== 0 ? getScaleToWindowMax({
15
+ containerHeight,
16
+ containerWidth,
17
+ offset,
18
+ targetHeight,
19
+ targetWidth
20
+ }) : getScaleToWindow({
21
+ height: containerHeight,
22
+ offset,
23
+ width: containerWidth
24
+ });
25
+ };
26
+ //#endregion
27
+ export { getScale };
@@ -0,0 +1,31 @@
1
+ import { testSvg } from "./element-tests.js";
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js
3
+ const getStyleGhost = (imgEl) => {
4
+ if (imgEl == null) return {};
5
+ if (testSvg(imgEl)) {
6
+ const { parentElement: parentEl } = imgEl;
7
+ const rect = imgEl.getBoundingClientRect();
8
+ if (parentEl == null) return {
9
+ height: rect.height,
10
+ left: rect.left,
11
+ width: rect.width,
12
+ top: rect.top
13
+ };
14
+ else {
15
+ const parentRect = parentEl.getBoundingClientRect();
16
+ return {
17
+ height: rect.height,
18
+ left: parentRect.left - rect.left,
19
+ top: parentRect.top - rect.top,
20
+ width: rect.width
21
+ };
22
+ }
23
+ } else return {
24
+ height: imgEl.offsetHeight,
25
+ left: imgEl.offsetLeft,
26
+ width: imgEl.offsetWidth,
27
+ top: imgEl.offsetTop
28
+ };
29
+ };
30
+ //#endregion
31
+ export { getStyleGhost };
@@ -0,0 +1,75 @@
1
+ import { testDiv } from "./element-tests.js";
2
+ import { getImgRegularStyle } from "./get-img-regular-style.js";
3
+ import { getImgObjectFitStyle } from "./get-img-object-fit-style.js";
4
+ import { getDivImgStyle } from "./get-div-img-style.js";
5
+ import { getModalImgTransform } from "./get-modal-img-transform.js";
6
+ import { getTargetDimension } from "./get-target-dimension.js";
7
+ import { testHasScalableSrc } from "./test-has-scalable-src.js";
8
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js
9
+ const getStyleModalImg = ({ hasZoomImg, imgSrc, isSvg, isZoomed, loadedImgEl, offset, shouldRefresh, targetEl }) => {
10
+ const hasScalableSrc = testHasScalableSrc({
11
+ hasZoomImg,
12
+ imgSrc,
13
+ isSvg
14
+ });
15
+ const imgRect = targetEl.getBoundingClientRect();
16
+ const targetElComputedStyle = window.getComputedStyle(targetEl);
17
+ const isDivImg = loadedImgEl != null && testDiv(targetEl);
18
+ const isImgObjectFit = loadedImgEl != null && !isDivImg;
19
+ const targetHeight = getTargetDimension({
20
+ fallback: imgRect.height,
21
+ natural: loadedImgEl?.naturalHeight
22
+ });
23
+ const targetWidth = getTargetDimension({
24
+ fallback: imgRect.width,
25
+ natural: loadedImgEl?.naturalWidth
26
+ });
27
+ const { height: containerHeight, left: containerLeft, top: containerTop, width: containerWidth } = imgRect;
28
+ const position = isDivImg ? getDivImgStyle({
29
+ backgroundPosition: targetElComputedStyle.backgroundPosition,
30
+ backgroundSize: targetElComputedStyle.backgroundSize,
31
+ containerHeight,
32
+ containerLeft,
33
+ containerTop,
34
+ containerWidth,
35
+ hasScalableSrc,
36
+ offset,
37
+ targetHeight,
38
+ targetWidth
39
+ }) : isImgObjectFit ? getImgObjectFitStyle({
40
+ containerHeight,
41
+ containerLeft,
42
+ containerTop,
43
+ containerWidth,
44
+ hasScalableSrc,
45
+ objectFit: targetElComputedStyle.objectFit,
46
+ objectPosition: targetElComputedStyle.objectPosition,
47
+ offset,
48
+ targetHeight,
49
+ targetWidth
50
+ }) : getImgRegularStyle({
51
+ containerHeight,
52
+ containerLeft,
53
+ containerTop,
54
+ containerWidth,
55
+ hasScalableSrc,
56
+ offset,
57
+ targetHeight,
58
+ targetWidth
59
+ });
60
+ const result = {
61
+ top: position.top,
62
+ left: position.left,
63
+ width: position.width,
64
+ height: position.height,
65
+ transform: getModalImgTransform({
66
+ ...position,
67
+ isZoomed,
68
+ userTransform: targetElComputedStyle.transform
69
+ })
70
+ };
71
+ if (isZoomed && shouldRefresh) result.transitionDuration = "0.01ms";
72
+ return result;
73
+ };
74
+ //#endregion
75
+ export { getStyleModalImg };
@@ -0,0 +1,4 @@
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js
2
+ const getTargetDimension = ({ fallback, natural }) => natural !== void 0 && natural !== 0 ? natural : fallback;
3
+ //#endregion
4
+ export { getTargetDimension };
@@ -0,0 +1,7 @@
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/parse-position.js
2
+ const parsePosition = (position, relativeNum) => {
3
+ const positionNum = parseFloat(position);
4
+ return position.endsWith("%") ? relativeNum * positionNum / 100 : positionNum;
5
+ };
6
+ //#endregion
7
+ export { parsePosition };
@@ -0,0 +1,5 @@
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js
2
+ const SRC_SVG_REGEX = /\.svg$/i;
3
+ const testHasScalableSrc = ({ hasZoomImg, imgSrc, isSvg }) => isSvg || imgSrc?.slice(0, 18) === "data:image/svg+xml" || hasZoomImg || imgSrc !== void 0 && SRC_SVG_REGEX.test(imgSrc);
4
+ //#endregion
5
+ export { testHasScalableSrc };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from "react";
2
+ import { ImageResponse, ImageResponseOptions } from "takumi-js/response";
3
+ //#region src/og/takumi.d.ts
4
+ interface GenerateProps {
5
+ title: ReactNode;
6
+ description?: ReactNode;
7
+ icon?: ReactNode;
8
+ primaryColor?: string;
9
+ primaryTextColor?: string;
10
+ site?: ReactNode;
11
+ }
12
+ declare function generateOGImage(options: GenerateProps & ImageResponseOptions): ImageResponse;
13
+ declare function generate({ primaryColor, primaryTextColor, icon, ...props }: GenerateProps): import("react").JSX.Element;
14
+ //#endregion
15
+ export { GenerateProps, generate, generateOGImage };
@@ -0,0 +1,91 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { ImageResponse } from "takumi-js/response";
3
+ //#region src/og/takumi.tsx
4
+ function generateOGImage(options) {
5
+ const { title, description, icon, site, primaryColor, primaryTextColor, ...rest } = options;
6
+ return new ImageResponse(generate({
7
+ title,
8
+ description,
9
+ icon,
10
+ site,
11
+ primaryTextColor,
12
+ primaryColor
13
+ }), {
14
+ width: 1200,
15
+ height: 630,
16
+ ...rest
17
+ });
18
+ }
19
+ function generate({ primaryColor = "rgba(255,150,255,0.3)", primaryTextColor = "rgb(255,150,255)", icon = /* @__PURE__ */ jsx("svg", {
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: "56",
22
+ height: "56",
23
+ viewBox: "0 0 24 24",
24
+ fill: "none",
25
+ stroke: "currentColor",
26
+ strokeWidth: "2",
27
+ strokeLinecap: "round",
28
+ strokeLinejoin: "round",
29
+ className: "lucide lucide-book-icon lucide-book",
30
+ children: /* @__PURE__ */ jsx("circle", {
31
+ cx: "12",
32
+ cy: "12",
33
+ r: "11",
34
+ stroke: primaryTextColor,
35
+ strokeWidth: "2"
36
+ })
37
+ }), ...props }) {
38
+ return /* @__PURE__ */ jsxs("div", {
39
+ style: {
40
+ display: "flex",
41
+ flexDirection: "column",
42
+ width: "100%",
43
+ height: "100%",
44
+ color: "white",
45
+ padding: "4rem",
46
+ backgroundColor: "#0c0c0c",
47
+ borderBottom: `18px solid ${primaryColor}`
48
+ },
49
+ children: [
50
+ /* @__PURE__ */ jsx("p", {
51
+ style: {
52
+ fontWeight: 800,
53
+ fontSize: "82px",
54
+ margin: 0
55
+ },
56
+ children: props.title
57
+ }),
58
+ /* @__PURE__ */ jsx("p", {
59
+ style: {
60
+ fontSize: "52px",
61
+ color: "rgba(240,240,240,0.8)",
62
+ margin: 0,
63
+ marginTop: "16px",
64
+ paddingBottom: "28px",
65
+ borderBottom: `10px dashed ${primaryColor}`
66
+ },
67
+ children: props.description
68
+ }),
69
+ /* @__PURE__ */ jsxs("div", {
70
+ style: {
71
+ display: "flex",
72
+ flexDirection: "row",
73
+ alignItems: "center",
74
+ gap: "20px",
75
+ marginTop: "auto",
76
+ color: primaryTextColor
77
+ },
78
+ children: [icon, props.site && /* @__PURE__ */ jsx("p", {
79
+ style: {
80
+ fontSize: "56px",
81
+ fontWeight: 600,
82
+ margin: 0
83
+ },
84
+ children: props.site
85
+ })]
86
+ })
87
+ ]
88
+ });
89
+ }
90
+ //#endregion
91
+ export { generate, generateOGImage };
package/dist/og.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from "react";
2
+ import { ImageResponse } from "next/og.js";
3
+ import { ImageResponseOptions } from "next/dist/compiled/@vercel/og/types";
4
+ //#region src/og.d.ts
5
+ interface GenerateProps {
6
+ title: ReactNode;
7
+ description?: ReactNode;
8
+ icon?: ReactNode;
9
+ primaryColor?: string;
10
+ primaryTextColor?: string;
11
+ site?: ReactNode;
12
+ }
13
+ declare function generateOGImage(options: GenerateProps & ImageResponseOptions): ImageResponse;
14
+ declare function generate({ primaryColor, primaryTextColor, icon, ...props }: GenerateProps): import("react").JSX.Element;
15
+ //#endregion
16
+ export { generate, generateOGImage };
package/dist/og.js ADDED
@@ -0,0 +1,91 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { ImageResponse } from "next/og.js";
3
+ //#region src/og.tsx
4
+ function generateOGImage(options) {
5
+ const { title, description, icon, site, primaryColor, primaryTextColor, ...rest } = options;
6
+ return new ImageResponse(generate({
7
+ title,
8
+ description,
9
+ icon,
10
+ site,
11
+ primaryTextColor,
12
+ primaryColor
13
+ }), {
14
+ width: 1200,
15
+ height: 630,
16
+ ...rest
17
+ });
18
+ }
19
+ function generate({ primaryColor = "rgba(255,150,255,0.3)", primaryTextColor = "rgb(255,150,255)", icon = /* @__PURE__ */ jsx("svg", {
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: "56",
22
+ height: "56",
23
+ viewBox: "0 0 24 24",
24
+ fill: "none",
25
+ stroke: "currentColor",
26
+ strokeWidth: "2",
27
+ strokeLinecap: "round",
28
+ strokeLinejoin: "round",
29
+ className: "lucide lucide-book-icon lucide-book",
30
+ children: /* @__PURE__ */ jsx("circle", {
31
+ cx: "12",
32
+ cy: "12",
33
+ r: "11",
34
+ stroke: primaryTextColor,
35
+ strokeWidth: "2"
36
+ })
37
+ }), ...props }) {
38
+ return /* @__PURE__ */ jsxs("div", {
39
+ style: {
40
+ display: "flex",
41
+ flexDirection: "column",
42
+ width: "100%",
43
+ height: "100%",
44
+ color: "white",
45
+ padding: "4rem",
46
+ backgroundColor: "#0c0c0c",
47
+ borderBottom: `18px solid ${primaryColor}`
48
+ },
49
+ children: [
50
+ /* @__PURE__ */ jsx("p", {
51
+ style: {
52
+ fontWeight: 800,
53
+ fontSize: "82px",
54
+ margin: 0
55
+ },
56
+ children: props.title
57
+ }),
58
+ /* @__PURE__ */ jsx("p", {
59
+ style: {
60
+ fontSize: "52px",
61
+ color: "rgba(240,240,240,0.8)",
62
+ margin: 0,
63
+ marginTop: "16px",
64
+ paddingBottom: "28px",
65
+ borderBottom: `10px dashed ${primaryColor}`
66
+ },
67
+ children: props.description
68
+ }),
69
+ /* @__PURE__ */ jsxs("div", {
70
+ style: {
71
+ display: "flex",
72
+ flexDirection: "row",
73
+ alignItems: "center",
74
+ gap: "20px",
75
+ marginTop: "auto",
76
+ color: primaryTextColor
77
+ },
78
+ children: [icon, props.site && /* @__PURE__ */ jsx("p", {
79
+ style: {
80
+ fontSize: "56px",
81
+ fontWeight: 600,
82
+ margin: 0
83
+ },
84
+ children: props.site
85
+ })]
86
+ })
87
+ ]
88
+ });
89
+ }
90
+ //#endregion
91
+ export { generate, generateOGImage };
package/dist/page.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { Breadcrumb } from "./layouts/docs/page/slots/breadcrumb.js";
2
+ import { DocsBody, DocsDescription, DocsPageProps as DocsPageProps$1, DocsTitle, EditOnGitHub, PageLastUpdate } from "./layouts/docs/page/index.js";
3
+ import { ComponentProps } from "react";
4
+ //#region src/page.d.ts
5
+ interface EditOnGitHubOptions extends Omit<ComponentProps<'a'>, 'href' | 'children'> {
6
+ owner: string;
7
+ repo: string;
8
+ /**
9
+ * SHA or ref (branch or tag) name.
10
+ *
11
+ * @defaultValue main
12
+ */
13
+ sha?: string;
14
+ /**
15
+ * File path in the repo
16
+ */
17
+ path: string;
18
+ }
19
+ interface DocsPageProps extends DocsPageProps$1 {
20
+ editOnGithub?: EditOnGitHubOptions;
21
+ lastUpdate?: Date | string | number;
22
+ }
23
+ /**
24
+ * For separate MDX page
25
+ */
26
+ declare function withArticle(props: ComponentProps<'main'>): import("react").JSX.Element;
27
+ declare function DocsPage({ lastUpdate, editOnGithub, children, ...props }: DocsPageProps): import("react").JSX.Element;
28
+ //#endregion
29
+ export { DocsBody, DocsDescription, DocsPage, DocsPageProps, DocsTitle, EditOnGitHub, Breadcrumb as PageBreadcrumb, PageLastUpdate, withArticle };
package/dist/page.js ADDED
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { cn } from "./utils/cn.js";
3
+ import { useIsDocsLayout } from "./layouts/docs/client.js";
4
+ import { Breadcrumb } from "./layouts/docs/page/slots/breadcrumb.js";
5
+ import { DocsBody, DocsDescription, DocsTitle, EditOnGitHub, PageLastUpdate, page_exports } from "./layouts/docs/page/index.js";
6
+ import { page_exports as page_exports$1 } from "./layouts/notebook/page/index.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/page.tsx
9
+ /**
10
+ * For separate MDX page
11
+ */
12
+ function withArticle(props) {
13
+ return /* @__PURE__ */ jsx("main", {
14
+ ...props,
15
+ className: cn("w-full max-w-[1400px] mx-auto px-4 py-12", props.className),
16
+ children: /* @__PURE__ */ jsx("article", {
17
+ className: "prose",
18
+ children: props.children
19
+ })
20
+ });
21
+ }
22
+ function DocsPage({ lastUpdate, editOnGithub, children, ...props }) {
23
+ const { DocsPage, EditOnGitHub, PageLastUpdate } = useIsDocsLayout() ? page_exports : page_exports$1;
24
+ return /* @__PURE__ */ jsxs(DocsPage, {
25
+ ...props,
26
+ children: [children, /* @__PURE__ */ jsxs("div", {
27
+ className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden",
28
+ children: [editOnGithub && /* @__PURE__ */ jsx(EditOnGitHub, { href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha}/${editOnGithub.path.startsWith("/") ? editOnGithub.path.slice(1) : editOnGithub.path}` }), lastUpdate && /* @__PURE__ */ jsx(PageLastUpdate, { date: new Date(lastUpdate) })]
29
+ })]
30
+ });
31
+ }
32
+ //#endregion
33
+ export { DocsBody, DocsDescription, DocsPage, DocsTitle, EditOnGitHub, Breadcrumb as PageBreadcrumb, PageLastUpdate, withArticle };
@@ -0,0 +1,29 @@
1
+ import { RootProvider as RootProvider$1 } from "./base.js";
2
+ import { Framework } from "@vx-oss/docs-core/framework";
3
+ import { ComponentProps } from "react";
4
+ import { AstroProviderProps } from "@vx-oss/docs-core/framework/astro";
5
+ //#region src/provider/astro.d.ts
6
+ interface RootProviderProps extends ComponentProps<typeof RootProvider$1> {
7
+ /**
8
+ * The current Astro pathname, usually `Astro.url.pathname`.
9
+ */
10
+ pathname: AstroProviderProps['pathname'];
11
+ /**
12
+ * The current Astro route params, usually `Astro.params`.
13
+ */
14
+ params?: AstroProviderProps['params'];
15
+ /**
16
+ * Optional Astro client navigation function from `astro:transitions/client`.
17
+ */
18
+ navigate?: AstroProviderProps['navigate'];
19
+ /**
20
+ * Custom framework components to override Astro defaults
21
+ */
22
+ components?: {
23
+ Link?: Framework['Link'];
24
+ Image?: Framework['Image'];
25
+ };
26
+ }
27
+ declare function RootProvider({ components, pathname, params, navigate, ...props }: RootProviderProps): import("react").JSX.Element;
28
+ //#endregion
29
+ export { RootProvider, RootProviderProps };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { RootProvider as RootProvider$1 } from "./base.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { AstroProvider } from "@vx-oss/docs-core/framework/astro";
5
+ //#region src/provider/astro.tsx
6
+ function RootProvider({ components, pathname, params, navigate, ...props }) {
7
+ return /* @__PURE__ */ jsx(AstroProvider, {
8
+ pathname,
9
+ params,
10
+ navigate,
11
+ Link: components?.Link,
12
+ Image: components?.Image,
13
+ children: /* @__PURE__ */ jsx(RootProvider$1, {
14
+ ...props,
15
+ children: props.children
16
+ })
17
+ });
18
+ }
19
+ //#endregion
20
+ export { RootProvider };
@@ -0,0 +1,48 @@
1
+ import { SearchProviderProps } from "../contexts/search.js";
2
+ import { I18nProviderProps } from "../contexts/i18n.js";
3
+ import { ReactNode } from "react";
4
+ import { ThemeProviderProps, UseThemeProps, useTheme } from "next-themes";
5
+ //#region src/provider/base.d.ts
6
+ interface SearchOptions extends Omit<SearchProviderProps, 'children'> {
7
+ /**
8
+ * Enable search functionality
9
+ *
10
+ * @defaultValue `true`
11
+ */
12
+ enabled?: boolean;
13
+ }
14
+ interface ThemeOptions extends ThemeProviderProps {
15
+ /**
16
+ * Enable `next-themes`
17
+ *
18
+ * @defaultValue true
19
+ */
20
+ enabled?: boolean;
21
+ /**
22
+ * Hotkey for toggling between light/dark mode, pass `false` to disable it.
23
+ *
24
+ * It is ignored while typing in an editable element (e.g. `<input />`), or when a dialog is opened.
25
+ *
26
+ * @defaultValue `d`
27
+ */
28
+ hotKey?: string | ((e: KeyboardEvent) => boolean) | false;
29
+ }
30
+ interface RootProviderProps {
31
+ /**
32
+ * `dir` option for Radix UI
33
+ */
34
+ dir?: 'rtl' | 'ltr';
35
+ /**
36
+ * @remarks `SearchProviderProps`
37
+ */
38
+ search?: Partial<SearchOptions>;
39
+ /**
40
+ * Customize options for `next-themes`
41
+ */
42
+ theme?: ThemeOptions;
43
+ i18n?: Omit<I18nProviderProps, 'children'>;
44
+ children?: ReactNode;
45
+ }
46
+ declare function RootProvider({ children, dir, theme, search, i18n }: RootProviderProps): import("react").JSX.Element;
47
+ //#endregion
48
+ export { RootProvider, RootProviderProps, type UseThemeProps, useTheme };