robindoc 0.0.0-experimental-8add2a3

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 (446) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/lib/assets/index.d.ts +2 -0
  4. package/lib/assets/index.d.ts.map +1 -0
  5. package/lib/assets/index.js +2 -0
  6. package/lib/assets/index.js.map +1 -0
  7. package/lib/components/blocks/anchor-heading/index.d.ts +9 -0
  8. package/lib/components/blocks/anchor-heading/index.d.ts.map +1 -0
  9. package/lib/components/blocks/anchor-heading/index.js +3 -0
  10. package/lib/components/blocks/anchor-heading/index.js.map +1 -0
  11. package/lib/components/blocks/breadcrumbs/index.d.ts +9 -0
  12. package/lib/components/blocks/breadcrumbs/index.d.ts.map +1 -0
  13. package/lib/components/blocks/breadcrumbs/index.js +2 -0
  14. package/lib/components/blocks/breadcrumbs/index.js.map +1 -0
  15. package/lib/components/blocks/code-section/index.d.ts +8 -0
  16. package/lib/components/blocks/code-section/index.d.ts.map +1 -0
  17. package/lib/components/blocks/code-section/index.js +2 -0
  18. package/lib/components/blocks/code-section/index.js.map +1 -0
  19. package/lib/components/blocks/contents/index.d.ts +19 -0
  20. package/lib/components/blocks/contents/index.d.ts.map +1 -0
  21. package/lib/components/blocks/contents/index.js +3 -0
  22. package/lib/components/blocks/contents/index.js.map +1 -0
  23. package/lib/components/blocks/header-menu/index.d.ts +10 -0
  24. package/lib/components/blocks/header-menu/index.d.ts.map +1 -0
  25. package/lib/components/blocks/header-menu/index.js +3 -0
  26. package/lib/components/blocks/header-menu/index.js.map +1 -0
  27. package/lib/components/blocks/header-social/index.d.ts +9 -0
  28. package/lib/components/blocks/header-social/index.d.ts.map +1 -0
  29. package/lib/components/blocks/header-social/index.js +2 -0
  30. package/lib/components/blocks/header-social/index.js.map +1 -0
  31. package/lib/components/blocks/last-modified/index.d.ts +7 -0
  32. package/lib/components/blocks/last-modified/index.d.ts.map +1 -0
  33. package/lib/components/blocks/last-modified/index.js +3 -0
  34. package/lib/components/blocks/last-modified/index.js.map +1 -0
  35. package/lib/components/blocks/meta/index.d.ts +21 -0
  36. package/lib/components/blocks/meta/index.d.ts.map +1 -0
  37. package/lib/components/blocks/nav-content-link/index.d.ts +6 -0
  38. package/lib/components/blocks/nav-content-link/index.d.ts.map +1 -0
  39. package/lib/components/blocks/nav-content-link/index.js +3 -0
  40. package/lib/components/blocks/nav-content-link/index.js.map +1 -0
  41. package/lib/components/blocks/nav-link/index.d.ts +9 -0
  42. package/lib/components/blocks/nav-link/index.d.ts.map +1 -0
  43. package/lib/components/blocks/nav-link/index.js +3 -0
  44. package/lib/components/blocks/nav-link/index.js.map +1 -0
  45. package/lib/components/blocks/no-js/index.d.ts +3 -0
  46. package/lib/components/blocks/no-js/index.d.ts.map +1 -0
  47. package/lib/components/blocks/no-js/index.js +2 -0
  48. package/lib/components/blocks/no-js/index.js.map +1 -0
  49. package/lib/components/blocks/pagination/index.d.ts +20 -0
  50. package/lib/components/blocks/pagination/index.d.ts.map +1 -0
  51. package/lib/components/blocks/pagination/index.js +2 -0
  52. package/lib/components/blocks/pagination/index.js.map +1 -0
  53. package/lib/components/blocks/search/index.d.ts +12 -0
  54. package/lib/components/blocks/search/index.d.ts.map +1 -0
  55. package/lib/components/blocks/search/index.js +3 -0
  56. package/lib/components/blocks/search/index.js.map +1 -0
  57. package/lib/components/blocks/search/search-modal/index.d.ts +16 -0
  58. package/lib/components/blocks/search/search-modal/index.d.ts.map +1 -0
  59. package/lib/components/blocks/search/search-modal/index.js +3 -0
  60. package/lib/components/blocks/search/search-modal/index.js.map +1 -0
  61. package/lib/components/blocks/section-dropdown/index.d.ts +15 -0
  62. package/lib/components/blocks/section-dropdown/index.d.ts.map +1 -0
  63. package/lib/components/blocks/section-dropdown/index.js +2 -0
  64. package/lib/components/blocks/section-dropdown/index.js.map +1 -0
  65. package/lib/components/blocks/theme-detector/index.d.ts +3 -0
  66. package/lib/components/blocks/theme-detector/index.d.ts.map +1 -0
  67. package/lib/components/blocks/theme-detector/index.js +2 -0
  68. package/lib/components/blocks/theme-detector/index.js.map +1 -0
  69. package/lib/components/blocks/theme-styles/index.d.ts +7 -0
  70. package/lib/components/blocks/theme-styles/index.d.ts.map +1 -0
  71. package/lib/components/blocks/theme-styles/index.js +2 -0
  72. package/lib/components/blocks/theme-styles/index.js.map +1 -0
  73. package/lib/components/blocks/theme-switcher/index.d.ts +14 -0
  74. package/lib/components/blocks/theme-switcher/index.d.ts.map +1 -0
  75. package/lib/components/blocks/theme-switcher/index.js +3 -0
  76. package/lib/components/blocks/theme-switcher/index.js.map +1 -0
  77. package/lib/components/contexts/contents/context.d.ts +3 -0
  78. package/lib/components/contexts/contents/context.d.ts.map +1 -0
  79. package/lib/components/contexts/contents/context.js +3 -0
  80. package/lib/components/contexts/contents/context.js.map +1 -0
  81. package/lib/components/contexts/contents/provider.d.ts +3 -0
  82. package/lib/components/contexts/contents/provider.d.ts.map +1 -0
  83. package/lib/components/contexts/contents/provider.js +3 -0
  84. package/lib/components/contexts/contents/provider.js.map +1 -0
  85. package/lib/components/contexts/contents/use-heading-index.d.ts +2 -0
  86. package/lib/components/contexts/contents/use-heading-index.d.ts.map +1 -0
  87. package/lib/components/contexts/contents/use-heading-index.js +3 -0
  88. package/lib/components/contexts/contents/use-heading-index.js.map +1 -0
  89. package/lib/components/contexts/contents/use-heading-register.d.ts +2 -0
  90. package/lib/components/contexts/contents/use-heading-register.d.ts.map +1 -0
  91. package/lib/components/contexts/contents/use-heading-register.js +3 -0
  92. package/lib/components/contexts/contents/use-heading-register.js.map +1 -0
  93. package/lib/components/contexts/navigate/context.d.ts +3 -0
  94. package/lib/components/contexts/navigate/context.d.ts.map +1 -0
  95. package/lib/components/contexts/navigate/context.js +3 -0
  96. package/lib/components/contexts/navigate/context.js.map +1 -0
  97. package/lib/components/contexts/navigate/provider.d.ts +3 -0
  98. package/lib/components/contexts/navigate/provider.d.ts.map +1 -0
  99. package/lib/components/contexts/navigate/provider.js +3 -0
  100. package/lib/components/contexts/navigate/provider.js.map +1 -0
  101. package/lib/components/contexts/navigate/types.d.ts +9 -0
  102. package/lib/components/contexts/navigate/types.d.ts.map +1 -0
  103. package/lib/components/contexts/navigate/use-navigate.d.ts +7 -0
  104. package/lib/components/contexts/navigate/use-navigate.d.ts.map +1 -0
  105. package/lib/components/contexts/navigate/use-navigate.js +3 -0
  106. package/lib/components/contexts/navigate/use-navigate.js.map +1 -0
  107. package/lib/components/contexts/reference/context.d.ts +2 -0
  108. package/lib/components/contexts/reference/context.d.ts.map +1 -0
  109. package/lib/components/contexts/reference/context.js +3 -0
  110. package/lib/components/contexts/reference/context.js.map +1 -0
  111. package/lib/components/contexts/reference/provider.d.ts +5 -0
  112. package/lib/components/contexts/reference/provider.d.ts.map +1 -0
  113. package/lib/components/contexts/reference/provider.js +3 -0
  114. package/lib/components/contexts/reference/provider.js.map +1 -0
  115. package/lib/components/contexts/reference/use-reference.d.ts +2 -0
  116. package/lib/components/contexts/reference/use-reference.d.ts.map +1 -0
  117. package/lib/components/contexts/reference/use-reference.js +3 -0
  118. package/lib/components/contexts/reference/use-reference.js.map +1 -0
  119. package/lib/components/elements/article/document.d.ts +27 -0
  120. package/lib/components/elements/article/document.d.ts.map +1 -0
  121. package/lib/components/elements/article/document.js +2 -0
  122. package/lib/components/elements/article/document.js.map +1 -0
  123. package/lib/components/elements/article/index.d.ts +33 -0
  124. package/lib/components/elements/article/index.d.ts.map +1 -0
  125. package/lib/components/elements/article/index.js +2 -0
  126. package/lib/components/elements/article/index.js.map +1 -0
  127. package/lib/components/elements/article/types.d.ts +5 -0
  128. package/lib/components/elements/article/types.d.ts.map +1 -0
  129. package/lib/components/elements/article/utils.d.ts +48 -0
  130. package/lib/components/elements/article/utils.d.ts.map +1 -0
  131. package/lib/components/elements/article/utils.js +2 -0
  132. package/lib/components/elements/article/utils.js.map +1 -0
  133. package/lib/components/elements/blog-container/index.d.ts +4 -0
  134. package/lib/components/elements/blog-container/index.d.ts.map +1 -0
  135. package/lib/components/elements/blog-container/index.js +2 -0
  136. package/lib/components/elements/blog-container/index.js.map +1 -0
  137. package/lib/components/elements/docs-container/index.d.ts +4 -0
  138. package/lib/components/elements/docs-container/index.d.ts.map +1 -0
  139. package/lib/components/elements/docs-container/index.js +2 -0
  140. package/lib/components/elements/docs-container/index.js.map +1 -0
  141. package/lib/components/elements/footer/index.d.ts +8 -0
  142. package/lib/components/elements/footer/index.d.ts.map +1 -0
  143. package/lib/components/elements/footer/index.js +2 -0
  144. package/lib/components/elements/footer/index.js.map +1 -0
  145. package/lib/components/elements/header/index.d.ts +31 -0
  146. package/lib/components/elements/header/index.d.ts.map +1 -0
  147. package/lib/components/elements/header/index.js +2 -0
  148. package/lib/components/elements/header/index.js.map +1 -0
  149. package/lib/components/elements/keylink-to-content/index.d.ts +10 -0
  150. package/lib/components/elements/keylink-to-content/index.d.ts.map +1 -0
  151. package/lib/components/elements/keylink-to-content/index.js +2 -0
  152. package/lib/components/elements/keylink-to-content/index.js.map +1 -0
  153. package/lib/components/elements/keylink-to-navigation/index.d.ts +10 -0
  154. package/lib/components/elements/keylink-to-navigation/index.d.ts.map +1 -0
  155. package/lib/components/elements/keylink-to-navigation/index.js +2 -0
  156. package/lib/components/elements/keylink-to-navigation/index.js.map +1 -0
  157. package/lib/components/elements/page-container/index.d.ts +4 -0
  158. package/lib/components/elements/page-container/index.d.ts.map +1 -0
  159. package/lib/components/elements/page-container/index.js +2 -0
  160. package/lib/components/elements/page-container/index.js.map +1 -0
  161. package/lib/components/elements/robin-provider/index.d.ts +8 -0
  162. package/lib/components/elements/robin-provider/index.d.ts.map +1 -0
  163. package/lib/components/elements/robin-provider/index.js +2 -0
  164. package/lib/components/elements/robin-provider/index.js.map +1 -0
  165. package/lib/components/elements/sidebar/index.d.ts +18 -0
  166. package/lib/components/elements/sidebar/index.d.ts.map +1 -0
  167. package/lib/components/elements/sidebar/index.js +2 -0
  168. package/lib/components/elements/sidebar/index.js.map +1 -0
  169. package/lib/components/elements/sidebar/sidebar-drop/index.d.ts +9 -0
  170. package/lib/components/elements/sidebar/sidebar-drop/index.d.ts.map +1 -0
  171. package/lib/components/elements/sidebar/sidebar-drop/index.js +3 -0
  172. package/lib/components/elements/sidebar/sidebar-drop/index.js.map +1 -0
  173. package/lib/components/elements/sidebar/sidebar-link/index.d.ts +12 -0
  174. package/lib/components/elements/sidebar/sidebar-link/index.d.ts.map +1 -0
  175. package/lib/components/elements/sidebar/sidebar-link/index.js +3 -0
  176. package/lib/components/elements/sidebar/sidebar-link/index.js.map +1 -0
  177. package/lib/components/elements/sidebar/sidebar-menu/index.d.ts +8 -0
  178. package/lib/components/elements/sidebar/sidebar-menu/index.d.ts.map +1 -0
  179. package/lib/components/elements/sidebar/sidebar-menu/index.js +3 -0
  180. package/lib/components/elements/sidebar/sidebar-menu/index.js.map +1 -0
  181. package/lib/components/elements/sidebar/tools.d.ts +7 -0
  182. package/lib/components/elements/sidebar/tools.d.ts.map +1 -0
  183. package/lib/components/elements/sidebar/tools.js +2 -0
  184. package/lib/components/elements/sidebar/tools.js.map +1 -0
  185. package/lib/components/elements/sidebar/types.d.ts +9 -0
  186. package/lib/components/elements/sidebar/types.d.ts.map +1 -0
  187. package/lib/components/ui/backdrop/index.d.ts +8 -0
  188. package/lib/components/ui/backdrop/index.d.ts.map +1 -0
  189. package/lib/components/ui/backdrop/index.js +3 -0
  190. package/lib/components/ui/backdrop/index.js.map +1 -0
  191. package/lib/components/ui/block/index.d.ts +8 -0
  192. package/lib/components/ui/block/index.d.ts.map +1 -0
  193. package/lib/components/ui/block/index.js +2 -0
  194. package/lib/components/ui/block/index.js.map +1 -0
  195. package/lib/components/ui/blockquote/data.d.ts +23 -0
  196. package/lib/components/ui/blockquote/data.d.ts.map +1 -0
  197. package/lib/components/ui/blockquote/data.js +2 -0
  198. package/lib/components/ui/blockquote/data.js.map +1 -0
  199. package/lib/components/ui/blockquote/icons.d.ts +7 -0
  200. package/lib/components/ui/blockquote/icons.d.ts.map +1 -0
  201. package/lib/components/ui/blockquote/icons.js +2 -0
  202. package/lib/components/ui/blockquote/icons.js.map +1 -0
  203. package/lib/components/ui/blockquote/index.d.ts +10 -0
  204. package/lib/components/ui/blockquote/index.d.ts.map +1 -0
  205. package/lib/components/ui/blockquote/index.js +2 -0
  206. package/lib/components/ui/blockquote/index.js.map +1 -0
  207. package/lib/components/ui/code-block/index.d.ts +11 -0
  208. package/lib/components/ui/code-block/index.d.ts.map +1 -0
  209. package/lib/components/ui/code-block/index.js +2 -0
  210. package/lib/components/ui/code-block/index.js.map +1 -0
  211. package/lib/components/ui/code-block/theme.d.ts +3 -0
  212. package/lib/components/ui/code-block/theme.d.ts.map +1 -0
  213. package/lib/components/ui/code-block/theme.js +2 -0
  214. package/lib/components/ui/code-block/theme.js.map +1 -0
  215. package/lib/components/ui/code-span/index.d.ts +9 -0
  216. package/lib/components/ui/code-span/index.d.ts.map +1 -0
  217. package/lib/components/ui/code-span/index.js +2 -0
  218. package/lib/components/ui/code-span/index.js.map +1 -0
  219. package/lib/components/ui/container/index.d.ts +8 -0
  220. package/lib/components/ui/container/index.d.ts.map +1 -0
  221. package/lib/components/ui/container/index.js +2 -0
  222. package/lib/components/ui/container/index.js.map +1 -0
  223. package/lib/components/ui/content-link/index.d.ts +8 -0
  224. package/lib/components/ui/content-link/index.d.ts.map +1 -0
  225. package/lib/components/ui/content-link/index.js +2 -0
  226. package/lib/components/ui/content-link/index.js.map +1 -0
  227. package/lib/components/ui/copy-button/index.d.ts +15 -0
  228. package/lib/components/ui/copy-button/index.d.ts.map +1 -0
  229. package/lib/components/ui/copy-button/index.js +3 -0
  230. package/lib/components/ui/copy-button/index.js.map +1 -0
  231. package/lib/components/ui/copy-text/index.d.ts +12 -0
  232. package/lib/components/ui/copy-text/index.d.ts.map +1 -0
  233. package/lib/components/ui/copy-text/index.js +3 -0
  234. package/lib/components/ui/copy-text/index.js.map +1 -0
  235. package/lib/components/ui/del/index.d.ts +7 -0
  236. package/lib/components/ui/del/index.d.ts.map +1 -0
  237. package/lib/components/ui/del/index.js +2 -0
  238. package/lib/components/ui/del/index.js.map +1 -0
  239. package/lib/components/ui/em/index.d.ts +7 -0
  240. package/lib/components/ui/em/index.d.ts.map +1 -0
  241. package/lib/components/ui/em/index.js +2 -0
  242. package/lib/components/ui/em/index.js.map +1 -0
  243. package/lib/components/ui/external-mark/index.d.ts +4 -0
  244. package/lib/components/ui/external-mark/index.d.ts.map +1 -0
  245. package/lib/components/ui/external-mark/index.js +2 -0
  246. package/lib/components/ui/external-mark/index.js.map +1 -0
  247. package/lib/components/ui/git-logos/index.d.ts +5 -0
  248. package/lib/components/ui/git-logos/index.d.ts.map +1 -0
  249. package/lib/components/ui/git-logos/index.js +2 -0
  250. package/lib/components/ui/git-logos/index.js.map +1 -0
  251. package/lib/components/ui/heading/index.d.ts +9 -0
  252. package/lib/components/ui/heading/index.d.ts.map +1 -0
  253. package/lib/components/ui/heading/index.js +2 -0
  254. package/lib/components/ui/heading/index.js.map +1 -0
  255. package/lib/components/ui/hr/index.d.ts +7 -0
  256. package/lib/components/ui/hr/index.d.ts.map +1 -0
  257. package/lib/components/ui/hr/index.js +2 -0
  258. package/lib/components/ui/hr/index.js.map +1 -0
  259. package/lib/components/ui/img/index.d.ts +12 -0
  260. package/lib/components/ui/img/index.d.ts.map +1 -0
  261. package/lib/components/ui/img/index.js +2 -0
  262. package/lib/components/ui/img/index.js.map +1 -0
  263. package/lib/components/ui/kbd/index.d.ts +3 -0
  264. package/lib/components/ui/kbd/index.d.ts.map +1 -0
  265. package/lib/components/ui/kbd/kbd-container/index.d.ts +7 -0
  266. package/lib/components/ui/kbd/kbd-container/index.d.ts.map +1 -0
  267. package/lib/components/ui/kbd/kbd-container/index.js +2 -0
  268. package/lib/components/ui/kbd/kbd-container/index.js.map +1 -0
  269. package/lib/components/ui/kbd/kbd-key/index.d.ts +7 -0
  270. package/lib/components/ui/kbd/kbd-key/index.d.ts.map +1 -0
  271. package/lib/components/ui/kbd/kbd-key/index.js +2 -0
  272. package/lib/components/ui/kbd/kbd-key/index.js.map +1 -0
  273. package/lib/components/ui/keylink/index.d.ts +8 -0
  274. package/lib/components/ui/keylink/index.d.ts.map +1 -0
  275. package/lib/components/ui/keylink/index.js +2 -0
  276. package/lib/components/ui/keylink/index.js.map +1 -0
  277. package/lib/components/ui/list/index.d.ts +4 -0
  278. package/lib/components/ui/list/index.d.ts.map +1 -0
  279. package/lib/components/ui/list/list-item/index.d.ts +8 -0
  280. package/lib/components/ui/list/list-item/index.d.ts.map +1 -0
  281. package/lib/components/ui/list/list-item/index.js +2 -0
  282. package/lib/components/ui/list/list-item/index.js.map +1 -0
  283. package/lib/components/ui/list/ordered-list/index.d.ts +8 -0
  284. package/lib/components/ui/list/ordered-list/index.d.ts.map +1 -0
  285. package/lib/components/ui/list/ordered-list/index.js +2 -0
  286. package/lib/components/ui/list/ordered-list/index.js.map +1 -0
  287. package/lib/components/ui/list/unordered-list/index.d.ts +8 -0
  288. package/lib/components/ui/list/unordered-list/index.d.ts.map +1 -0
  289. package/lib/components/ui/list/unordered-list/index.js +2 -0
  290. package/lib/components/ui/list/unordered-list/index.js.map +1 -0
  291. package/lib/components/ui/modal/index.d.ts +8 -0
  292. package/lib/components/ui/modal/index.d.ts.map +1 -0
  293. package/lib/components/ui/modal/index.js +2 -0
  294. package/lib/components/ui/modal/index.js.map +1 -0
  295. package/lib/components/ui/modal/use-modal.d.ts +6 -0
  296. package/lib/components/ui/modal/use-modal.d.ts.map +1 -0
  297. package/lib/components/ui/modal/use-modal.js +2 -0
  298. package/lib/components/ui/modal/use-modal.js.map +1 -0
  299. package/lib/components/ui/paragraph/index.d.ts +8 -0
  300. package/lib/components/ui/paragraph/index.d.ts.map +1 -0
  301. package/lib/components/ui/paragraph/index.js +2 -0
  302. package/lib/components/ui/paragraph/index.js.map +1 -0
  303. package/lib/components/ui/strong/index.d.ts +7 -0
  304. package/lib/components/ui/strong/index.d.ts.map +1 -0
  305. package/lib/components/ui/strong/index.js +2 -0
  306. package/lib/components/ui/strong/index.js.map +1 -0
  307. package/lib/components/ui/table/index.d.ts +7 -0
  308. package/lib/components/ui/table/index.d.ts.map +1 -0
  309. package/lib/components/ui/table/table/index.d.ts +8 -0
  310. package/lib/components/ui/table/table/index.d.ts.map +1 -0
  311. package/lib/components/ui/table/table/index.js +2 -0
  312. package/lib/components/ui/table/table/index.js.map +1 -0
  313. package/lib/components/ui/table/tbody/index.d.ts +7 -0
  314. package/lib/components/ui/table/tbody/index.d.ts.map +1 -0
  315. package/lib/components/ui/table/tbody/index.js +2 -0
  316. package/lib/components/ui/table/tbody/index.js.map +1 -0
  317. package/lib/components/ui/table/td/index.d.ts +8 -0
  318. package/lib/components/ui/table/td/index.d.ts.map +1 -0
  319. package/lib/components/ui/table/td/index.js +2 -0
  320. package/lib/components/ui/table/td/index.js.map +1 -0
  321. package/lib/components/ui/table/th/index.d.ts +8 -0
  322. package/lib/components/ui/table/th/index.d.ts.map +1 -0
  323. package/lib/components/ui/table/th/index.js +2 -0
  324. package/lib/components/ui/table/th/index.js.map +1 -0
  325. package/lib/components/ui/table/thead/index.d.ts +8 -0
  326. package/lib/components/ui/table/thead/index.d.ts.map +1 -0
  327. package/lib/components/ui/table/thead/index.js +2 -0
  328. package/lib/components/ui/table/thead/index.js.map +1 -0
  329. package/lib/components/ui/table/tr/index.d.ts +7 -0
  330. package/lib/components/ui/table/tr/index.d.ts.map +1 -0
  331. package/lib/components/ui/table/tr/index.js +2 -0
  332. package/lib/components/ui/table/tr/index.js.map +1 -0
  333. package/lib/components/ui/tabs/index.d.ts +16 -0
  334. package/lib/components/ui/tabs/index.d.ts.map +1 -0
  335. package/lib/components/ui/tabs/index.js +2 -0
  336. package/lib/components/ui/tabs/index.js.map +1 -0
  337. package/lib/components/ui/tabs/tabs-header/index.d.ts +11 -0
  338. package/lib/components/ui/tabs/tabs-header/index.d.ts.map +1 -0
  339. package/lib/components/ui/tabs/tabs-header/index.js +3 -0
  340. package/lib/components/ui/tabs/tabs-header/index.js.map +1 -0
  341. package/lib/components/ui/tabs/tabs-styles/index.d.ts +7 -0
  342. package/lib/components/ui/tabs/tabs-styles/index.d.ts.map +1 -0
  343. package/lib/components/ui/tabs/tabs-styles/index.js +2 -0
  344. package/lib/components/ui/tabs/tabs-styles/index.js.map +1 -0
  345. package/lib/components/ui/task-list/index.d.ts +4 -0
  346. package/lib/components/ui/task-list/index.d.ts.map +1 -0
  347. package/lib/components/ui/task-list/task-list-item/index.d.ts +9 -0
  348. package/lib/components/ui/task-list/task-list-item/index.d.ts.map +1 -0
  349. package/lib/components/ui/task-list/task-list-item/index.js +2 -0
  350. package/lib/components/ui/task-list/task-list-item/index.js.map +1 -0
  351. package/lib/components/ui/task-list/task-ordered-list/index.d.ts +5 -0
  352. package/lib/components/ui/task-list/task-ordered-list/index.d.ts.map +1 -0
  353. package/lib/components/ui/task-list/task-ordered-list/index.js +2 -0
  354. package/lib/components/ui/task-list/task-ordered-list/index.js.map +1 -0
  355. package/lib/components/ui/task-list/task-unordered-list/index.d.ts +8 -0
  356. package/lib/components/ui/task-list/task-unordered-list/index.d.ts.map +1 -0
  357. package/lib/components/ui/task-list/task-unordered-list/index.js +2 -0
  358. package/lib/components/ui/task-list/task-unordered-list/index.js.map +1 -0
  359. package/lib/components/ui/tooltip/index.d.ts +14 -0
  360. package/lib/components/ui/tooltip/index.d.ts.map +1 -0
  361. package/lib/components/ui/tooltip/index.js +2 -0
  362. package/lib/components/ui/tooltip/index.js.map +1 -0
  363. package/lib/core/data/contents.d.ts +11 -0
  364. package/lib/core/data/contents.d.ts.map +1 -0
  365. package/lib/core/data/contents.js +2 -0
  366. package/lib/core/data/contents.js.map +1 -0
  367. package/lib/core/hooks/use-debouncer.d.ts +4 -0
  368. package/lib/core/hooks/use-debouncer.d.ts.map +1 -0
  369. package/lib/core/hooks/use-debouncer.js +2 -0
  370. package/lib/core/hooks/use-debouncer.js.map +1 -0
  371. package/lib/core/hooks/use-system-type.d.ts +3 -0
  372. package/lib/core/hooks/use-system-type.d.ts.map +1 -0
  373. package/lib/core/hooks/use-system-type.js +2 -0
  374. package/lib/core/hooks/use-system-type.js.map +1 -0
  375. package/lib/core/providers/base.d.ts +13 -0
  376. package/lib/core/providers/base.d.ts.map +1 -0
  377. package/lib/core/providers/base.js +2 -0
  378. package/lib/core/providers/base.js.map +1 -0
  379. package/lib/core/providers/file-system.d.ts +11 -0
  380. package/lib/core/providers/file-system.d.ts.map +1 -0
  381. package/lib/core/providers/file-system.js +2 -0
  382. package/lib/core/providers/file-system.js.map +1 -0
  383. package/lib/core/providers/github.d.ts +20 -0
  384. package/lib/core/providers/github.d.ts.map +1 -0
  385. package/lib/core/providers/github.js +2 -0
  386. package/lib/core/providers/github.js.map +1 -0
  387. package/lib/core/providers/index.d.ts +3 -0
  388. package/lib/core/providers/index.d.ts.map +1 -0
  389. package/lib/core/types/content.d.ts +41 -0
  390. package/lib/core/types/content.d.ts.map +1 -0
  391. package/lib/core/types/search.d.ts +8 -0
  392. package/lib/core/types/search.d.ts.map +1 -0
  393. package/lib/core/types/structure.d.ts +16 -0
  394. package/lib/core/types/structure.d.ts.map +1 -0
  395. package/lib/core/types/theme.d.ts +49 -0
  396. package/lib/core/types/theme.d.ts.map +1 -0
  397. package/lib/core/utils/content-tools.d.ts +3 -0
  398. package/lib/core/utils/content-tools.d.ts.map +1 -0
  399. package/lib/core/utils/content-tools.js +2 -0
  400. package/lib/core/utils/content-tools.js.map +1 -0
  401. package/lib/core/utils/create-base-searcher.d.ts +3 -0
  402. package/lib/core/utils/create-base-searcher.d.ts.map +1 -0
  403. package/lib/core/utils/create-base-searcher.js +2 -0
  404. package/lib/core/utils/create-base-searcher.js.map +1 -0
  405. package/lib/core/utils/detect-provider.d.ts +3 -0
  406. package/lib/core/utils/detect-provider.d.ts.map +1 -0
  407. package/lib/core/utils/detect-provider.js +2 -0
  408. package/lib/core/utils/detect-provider.js.map +1 -0
  409. package/lib/core/utils/get-configuration.d.ts +10 -0
  410. package/lib/core/utils/get-configuration.d.ts.map +1 -0
  411. package/lib/core/utils/get-configuration.js +2 -0
  412. package/lib/core/utils/get-configuration.js.map +1 -0
  413. package/lib/core/utils/get-metadata.d.ts +13 -0
  414. package/lib/core/utils/get-metadata.d.ts.map +1 -0
  415. package/lib/core/utils/get-metadata.js +2 -0
  416. package/lib/core/utils/get-metadata.js.map +1 -0
  417. package/lib/core/utils/git-tools.d.ts +11 -0
  418. package/lib/core/utils/git-tools.d.ts.map +1 -0
  419. package/lib/core/utils/git-tools.js +2 -0
  420. package/lib/core/utils/git-tools.js.map +1 -0
  421. package/lib/core/utils/initialize-robindoc.d.ts +21 -0
  422. package/lib/core/utils/initialize-robindoc.d.ts.map +1 -0
  423. package/lib/core/utils/initialize-robindoc.js +2 -0
  424. package/lib/core/utils/initialize-robindoc.js.map +1 -0
  425. package/lib/core/utils/load-content.d.ts +21 -0
  426. package/lib/core/utils/load-content.d.ts.map +1 -0
  427. package/lib/core/utils/load-content.js +2 -0
  428. package/lib/core/utils/load-content.js.map +1 -0
  429. package/lib/core/utils/parse-structure.d.ts +8 -0
  430. package/lib/core/utils/parse-structure.d.ts.map +1 -0
  431. package/lib/core/utils/parse-structure.js +2 -0
  432. package/lib/core/utils/parse-structure.js.map +1 -0
  433. package/lib/core/utils/path-tools.d.ts +8 -0
  434. package/lib/core/utils/path-tools.d.ts.map +1 -0
  435. package/lib/core/utils/path-tools.js +2 -0
  436. package/lib/core/utils/path-tools.js.map +1 -0
  437. package/lib/core/utils/tabs-tools.d.ts +5 -0
  438. package/lib/core/utils/tabs-tools.d.ts.map +1 -0
  439. package/lib/core/utils/tabs-tools.js +2 -0
  440. package/lib/core/utils/tabs-tools.js.map +1 -0
  441. package/lib/index.d.ts +10 -0
  442. package/lib/index.d.ts.map +1 -0
  443. package/lib/index.js +2 -0
  444. package/lib/index.js.map +1 -0
  445. package/lib/styles.css +2046 -0
  446. package/package.json +70 -0
@@ -0,0 +1,11 @@
1
+ export declare const detectGitType: (uri: string) => {
2
+ readonly name: "GitHub";
3
+ readonly key: "github";
4
+ } | {
5
+ readonly name: "GitLab";
6
+ readonly key: "gitlab";
7
+ } | {
8
+ readonly name: "Git";
9
+ readonly key: "git";
10
+ };
11
+ //# sourceMappingURL=git-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/git-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM;;;;;;;;;CAQxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ const t=t=>t.match(/^https?:\/\/github.com/)?{name:"GitHub",key:"github"}:t.match(/^https?:\/\/gitlab.com/)?{name:"GitLab",key:"gitlab"}:{name:"Git",key:"git"};export{t as detectGitType};
2
+ //# sourceMappingURL=git-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-tools.js","sources":["../../../src/core/utils/git-tools.ts"],"sourcesContent":["export const detectGitType = (uri: string) => {\n if (uri.match(/^https?:\\/\\/github.com/)) {\n return { name: \"GitHub\", key: \"github\" } as const;\n } else if (uri.match(/^https?:\\/\\/gitlab.com/)) {\n return { name: \"GitLab\", key: \"gitlab\" } as const;\n } else {\n return { name: \"Git\", key: \"git\" } as const;\n }\n};\n"],"names":["detectGitType","uri","match","name","key"],"mappings":"AAAO,MAAMA,EAAiBC,GACtBA,EAAIC,MAAM,0BACH,CAAEC,KAAM,SAAUC,IAAK,UACvBH,EAAIC,MAAM,0BACV,CAAEC,KAAM,SAAUC,IAAK,UAEvB,CAAED,KAAM,MAAOC,IAAK"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { type ArticleProps as ArticlePropsBase } from "../../components/elements/article";
3
+ import { type SidebarProps as SidebarPropsBase } from "../../components/elements/sidebar";
4
+ import { type Structure } from "../types/structure";
5
+ type PageProps = Omit<Partial<ArticlePropsBase>, "uri" | "content" | "provider" | "pathname" | "pages"> & {
6
+ pathname: string;
7
+ };
8
+ type SidebarProps = Omit<SidebarPropsBase, "tree">;
9
+ export declare const initializeRobindoc: (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {
10
+ Page: React.FC<PageProps>;
11
+ Sidebar: React.FC<SidebarProps>;
12
+ getStaticParams: <T extends string = "segments">(prefix?: string, segmentsParamKey?: T) => Promise<Record<T, string[]>[]>;
13
+ getMetadata: (pathname: string) => Promise<Record<string, string>>;
14
+ getPageData: (pathname: string) => Promise<{
15
+ title: string;
16
+ raw: string;
17
+ }>;
18
+ getPageInstruction: (pathname: string) => Promise<import("../types/content").Page>;
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=initialize-robindoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialize-robindoc.d.ts","sourceRoot":"","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AACjH,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AAEjH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOpD,KAAK,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IACtG,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAUnD,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;;;sBAmDrE,CAAC,SAAS,MAAM,wBACnC,MAAM,qBACI,CAAC;4BAiBc,MAAM;4BAgBN,MAAM;;;;mCAeC,MAAM;CAarD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import t from"react";import{Article as e}from"../../components/elements/article/index.js";import{Sidebar as r}from"../../components/elements/sidebar/index.js";import{parseStructure as a}from"./parse-structure.js";import{getConfiguration as n}from"./get-configuration.js";import{getMetadata as i}from"./get-metadata.js";import{normalizePathname as o,removeTrailingSlash as s}from"./path-tools.js";import{loadContent as c}from"./load-content.js";const u=u=>{const p=(async t=>"function"==typeof t?t():t)(u).then(t=>a(t.items||[],n(t.configuration||{})));return{Page:async({pathname:r,...a})=>{const{pages:n}=await p,i=o(r),s=n[i];if(!s)throw new Error(`Can not find data for "${i}". Please check structure`);const c=Object.keys(n),u=c.indexOf(i),m=c[u-1],f=u<c.length-1&&c[u+1],d=m&&{pathname:m,title:n[m].title},g=f&&{pathname:f,title:n[f].title},l=s.crumbs.map(t=>({title:n[t].title,pathname:t})),h=Object.entries(n).reduce((t,[e,{origPath:r}])=>(r&&t.push({clientPath:e,origPath:r}),t),[]);return t.createElement(e,{pathname:i,provider:s.configuration.provider,uri:s.uri,title:s.title,breadcrumbs:l,prev:d||void 0,next:g||void 0,pages:h,...a})},Sidebar:async e=>{const{tree:a}=await p;return t.createElement(r,{tree:a,...e})},getStaticParams:async(t="",e="segments")=>{const{pages:r}=await p,a=Object.keys(r),n=s(t);return a.reduce((t,r)=>r.startsWith(n)?(t.push({[e]:r.substring(n.length+1).split("/")}),t):t,[])},getMetadata:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return await i({uri:a.uri,provider:a.configuration.provider})},getPageData:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);const n=a.title,{data:i}=await c(a.uri,a.configuration.provider);return{title:n,raw:i}},getPageInstruction:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return a}}};export{u as initializeRobindoc};
2
+ //# sourceMappingURL=initialize-robindoc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialize-robindoc.js","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Article as ArticleBase, type ArticleProps as ArticlePropsBase } from \"@src/components/elements/article\";\nimport { Sidebar as SidebarBase, type SidebarProps as SidebarPropsBase } from \"@src/components/elements/sidebar\";\n\nimport { type Structure } from \"../types/structure\";\nimport { parseStructure } from \"./parse-structure\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata as getMetadataBase } from \"./get-metadata\";\nimport { normalizePathname, removeTrailingSlash } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\ntype PageProps = Omit<Partial<ArticlePropsBase>, \"uri\" | \"content\" | \"provider\" | \"pathname\" | \"pages\"> & {\n pathname: string;\n};\n\ntype SidebarProps = Omit<SidebarPropsBase, \"tree\">;\n\nconst loadStructure = async (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n if (typeof structureTemplate === \"function\") {\n return structureTemplate();\n } else {\n return structureTemplate;\n }\n};\n\nexport const initializeRobindoc = (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n const structureParsedPromise = loadStructure(structureTemplate).then((structure) =>\n parseStructure(structure.items || [], getConfiguration(structure.configuration || {})),\n );\n\n const Page: React.FC<PageProps> = async ({ pathname, ...props }) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const paths = Object.keys(pages);\n const targetPageIndex = paths.indexOf(pathnameNormalized);\n const prevPagePathname = paths[targetPageIndex - 1];\n const nextPagePathname = targetPageIndex < paths.length - 1 && paths[targetPageIndex + 1];\n const prev = prevPagePathname && { pathname: prevPagePathname, title: pages[prevPagePathname].title };\n const next = nextPagePathname && { pathname: nextPagePathname, title: pages[nextPagePathname].title };\n\n const breadcrumbs = pageInstruction.crumbs.map((crumb) => ({ title: pages[crumb].title, pathname: crumb }));\n const clientPages = Object.entries(pages).reduce<{ clientPath: string; origPath: string }[]>(\n (acc, [clientPath, { origPath }]) => {\n if (origPath) acc.push({ clientPath, origPath });\n return acc;\n },\n [],\n );\n\n return (\n <ArticleBase\n pathname={pathnameNormalized}\n provider={pageInstruction.configuration.provider}\n uri={pageInstruction.uri}\n title={pageInstruction.title}\n breadcrumbs={breadcrumbs}\n prev={prev || undefined}\n next={next || undefined}\n pages={clientPages}\n {...props}\n />\n );\n };\n\n const Sidebar: React.FC<SidebarProps> = async (props) => {\n const { tree } = await structureParsedPromise;\n\n return <SidebarBase tree={tree} {...props} />;\n };\n\n const getStaticParams = async <T extends string = \"segments\">(\n prefix: string = \"\",\n segmentsParamKey: T = \"segments\" as T,\n ) => {\n const { pages } = await structureParsedPromise;\n const pagesArr = Object.keys(pages);\n const prefixWithoutTrailingSlash = removeTrailingSlash(prefix);\n\n return pagesArr.reduce<Record<T, string[]>[]>((acc, cur) => {\n if (!cur.startsWith(prefixWithoutTrailingSlash)) return acc;\n\n acc.push({\n [segmentsParamKey]: cur.substring(prefixWithoutTrailingSlash.length + 1).split(\"/\"),\n } as Record<T, string[]>);\n\n return acc;\n }, []);\n };\n\n const getMetadata = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const metadata = await getMetadataBase({\n uri: pageInstruction.uri,\n provider: pageInstruction.configuration.provider,\n });\n return metadata;\n };\n\n const getPageData = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const title = pageInstruction.title;\n const { data } = await loadContent(pageInstruction.uri, pageInstruction.configuration.provider);\n\n return { title, raw: data };\n };\n\n const getPageInstruction = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n return pageInstruction;\n };\n\n return { Page, Sidebar, getStaticParams, getMetadata, getPageData, getPageInstruction };\n};\n"],"names":["initializeRobindoc","structureTemplate","structureParsedPromise","async","loadStructure","then","structure","parseStructure","items","getConfiguration","configuration","Page","pathname","props","pages","pathnameNormalized","normalizePathname","pageInstruction","Error","paths","Object","keys","targetPageIndex","indexOf","prevPagePathname","nextPagePathname","length","prev","title","next","breadcrumbs","crumbs","map","crumb","clientPages","entries","reduce","acc","clientPath","origPath","push","React","ArticleBase","provider","uri","undefined","Sidebar","tree","createElement","SidebarBase","getStaticParams","prefix","segmentsParamKey","pagesArr","prefixWithoutTrailingSlash","removeTrailingSlash","cur","startsWith","substring","split","getMetadata","getMetadataBase","getPageData","data","loadContent","raw","getPageInstruction"],"mappings":"4bAkBA,MAQaA,EAAsBC,IAC/B,MAAMC,EATYC,OAAOF,GACQ,mBAAtBA,EACAA,IAEAA,EAKoBG,CAAcH,GAAmBI,KAAMC,GAClEC,EAAeD,EAAUE,OAAS,GAAIC,EAAiBH,EAAUI,eAAiB,CAAA,KA+GtF,MAAO,CAAEC,KA5GyBR,OAASS,cAAaC,MACpD,MAAMC,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,MAAMI,EAAQC,OAAOC,KAAKP,GACpBQ,EAAkBH,EAAMI,QAAQR,GAChCS,EAAmBL,EAAMG,EAAkB,GAC3CG,EAAmBH,EAAkBH,EAAMO,OAAS,GAAKP,EAAMG,EAAkB,GACjFK,EAAOH,GAAoB,CAAEZ,SAAUY,EAAkBI,MAAOd,EAAMU,GAAkBI,O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BJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,MAAMa,EAAQX,EAAgBW,OACxBmC,KAAEA,SAAeC,EAAY/C,EAAgB2B,IAAK3B,EAAgBP,cAAciC,UAEtF,MAAO,CAAEf,QAAOqC,IAAKF,IAe0CG,mBAZxC/D,MAAOS,IAC9B,MAAME,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,OAAOE"}
@@ -0,0 +1,21 @@
1
+ import { type BaseProvider } from "../providers/base";
2
+ import { GithubProvider } from "../providers/github";
3
+ import { FileSystemProvider } from "../providers";
4
+ export declare const loadContent: (uri: string, providerArg?: BaseProvider, root?: string) => Promise<{
5
+ data: string;
6
+ type: "local" | "remote";
7
+ provider: BaseProvider;
8
+ } | {
9
+ data: string;
10
+ type: string;
11
+ provider: GithubProvider;
12
+ } | {
13
+ data: string;
14
+ type: string;
15
+ provider: null;
16
+ } | {
17
+ data: string;
18
+ type: string;
19
+ provider: FileSystemProvider;
20
+ }>;
21
+ //# sourceMappingURL=load-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-content.d.ts","sourceRoot":"","sources":["../../../src/core/utils/load-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,WAAW,GAAU,KAAK,MAAM,EAAE,cAAc,YAAY,EAAE,OAAO,MAAM;;;;;;;;;;;;;;;;EA4BvF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{GithubProvider as t}from"../providers/github.js";import{FileSystemProvider as r}from"../providers/file-system.js";const a=async(a,o,e)=>{if(o){return{data:await o.load(a),type:o.type,provider:o}}if(a.startsWith("https://github.com/")){const r=new t(a);if(r.pathname){return{data:await r.load(r.pathname),type:"remote",provider:r}}throw new Error("Can not load content")}if(a.match(/https?:\/\//)){const t=await fetch(a);if(!t.ok)throw new Error("Can not load content");return{data:await t.text(),type:"remote",provider:null}}const n=new r(e);return{data:await n.load(a),type:"local",provider:n}};export{a as loadContent};
2
+ //# sourceMappingURL=load-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-content.js","sources":["../../../src/core/utils/load-content.ts"],"sourcesContent":["import { type BaseProvider } from \"../providers/base\";\nimport { GithubProvider } from \"../providers/github\";\nimport { FileSystemProvider } from \"../providers\";\n\nexport const loadContent = async (uri: string, providerArg?: BaseProvider, root?: string) => {\n if (providerArg) {\n const content = await providerArg.load(uri);\n return { data: content, type: providerArg.type, provider: providerArg };\n }\n\n if (uri.startsWith(\"https://github.com/\")) {\n const provider = new GithubProvider(uri);\n if (provider.pathname) {\n const content = await provider.load(provider.pathname);\n return { data: content, type: \"remote\", provider };\n } else {\n throw new Error(\"Can not load content\");\n }\n }\n\n if (uri.match(/https?:\\/\\//)) {\n const resp = await fetch(uri);\n if (!resp.ok) {\n throw new Error(\"Can not load content\");\n }\n const content = await resp.text();\n return { data: content, type: \"remote\", provider: null };\n }\n\n const provider = new FileSystemProvider(root);\n const content = await provider.load(uri);\n return { data: content, type: \"local\", provider };\n};\n"],"names":["loadContent","async","uri","providerArg","root","data","load","type","provider","startsWith","GithubProvider","pathname","Error","match","resp","fetch","ok","text","FileSystemProvider"],"mappings":"yHAIO,MAAMA,EAAcC,MAAOC,EAAaC,EAA4BC,KACvE,GAAID,EAAa,CAEb,MAAO,CAAEE,WADaF,EAAYG,KAAKJ,GACfK,KAAMJ,EAAYI,KAAMC,SAAUL,EAC9D,CAEA,GAAID,EAAIO,WAAW,uBAAwB,CACvC,MAAMD,EAAW,IAAIE,EAAeR,GACpC,GAAIM,EAASG,SAAU,CAEnB,MAAO,CAAEN,WADaG,EAASF,KAAKE,EAASG,UACrBJ,KAAM,SAAUC,WAC5C,CACI,MAAM,IAAII,MAAM,uBAExB,CAEA,GAAIV,EAAIW,MAAM,eAAgB,CAC1B,MAAMC,QAAaC,MAAMb,GACzB,IAAKY,EAAKE,GACN,MAAM,IAAIJ,MAAM,wBAGpB,MAAO,CAAEP,WADaS,EAAKG,OACHV,KAAM,SAAUC,SAAU,KACtD,CAEA,MAAMA,EAAW,IAAIU,EAAmBd,GAExC,MAAO,CAAEC,WADaG,EAASF,KAAKJ,GACZK,KAAM,QAASC"}
@@ -0,0 +1,8 @@
1
+ import { type DocItem } from "../types/structure";
2
+ import { type Pages, type Crumbs, type Configuration } from "../types/content";
3
+ import { type TreeItem } from "../../components/elements/sidebar/types";
4
+ export declare const parseStructure: (items: DocItem[] | "auto", parentConfiguration?: Configuration, crumbs?: Crumbs, pathname?: string, nestingLevel?: number) => Promise<{
5
+ pages: Pages;
6
+ tree: TreeItem[];
7
+ }>;
8
+ //# sourceMappingURL=parse-structure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-structure.d.ts","sourceRoot":"","sources":["../../../src/core/utils/parse-structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAgPxE,eAAO,MAAM,cAAc,GACvB,OAAO,OAAO,EAAE,GAAG,MAAM,EACzB,sBAAqB,aAAkB,EACvC,SAAQ,MAAW,EACnB,WAAU,MAAW,EACrB,eAAc,MAAU;WAjFjB,KAAK;UACN,QAAQ,EAAE;EAyFnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{getConfiguration as t}from"./get-configuration.js";import{getMetadata as e}from"./get-metadata.js";import{mergePathname as r,normalizePathname as i,generatePseudoTitle as a,checkIsLinkExternal as s}from"./path-tools.js";import{loadContent as o}from"./load-content.js";const n=async(t={},c=[],p="",u)=>{const f={},h=[];if(!t.provider)return{pages:f,tree:h};const g=await t.provider.filesPromise;if(g.structures.includes(`${p}/structure.json`)){const e=await(async(t={},e="",a=[],c)=>{const p={},u=[];if(!t.provider)return{pages:p,tree:u};if((await t.provider.filesPromise).structures.includes(`${e}/structure.json`)){const f=await o(`${e}/structure.json`,t.provider);try{const o=JSON.parse(f.data);for(const f in o){const h=o[f],g=i("index"===f?e:e+"/"+f),l=r(t.basePath,g),d=i(l);if(!s(d)){const e=await(t.provider?.getPageSourcePathname(g,d));e&&(p[d]={title:h.title,uri:g,configuration:t,origPath:e,crumbs:a})}let m;if("index"!==f){const e=await n(t,[...a,d],g,c+1);m=e.tree,Object.assign(p,e.pages)}u.push({title:h.title,href:d,items:m,type:"row"})}}catch{throw new Error(`Can't parse structure "${e}/structure.json"`)}return{pages:p,tree:u}}})(t,p,c,u+1);if(e)return e}for await(const s of g.docs){const o=s.clientPath.split("/").filter(Boolean).length;if(!p&&!(o<2)||p&&!s.clientPath.match(new RegExp(`^${p.replace(/\/$/,"")}/[^/]+$`)))continue;const{clientPath:g}=s,l=r(t.basePath,g),d=i(l),m=(await e({provider:t.provider,uri:g})).title||a(d),w=await(t.provider?.getPageSourcePathname(g,d));w&&(f[d]={title:m,uri:g,configuration:t,origPath:w,crumbs:c});const P=await n(t,[...c,d],g,u+1);Object.assign(f,P.pages),u<(t.spreadedLevel||1)?h.push({title:m,href:d,type:0===u?"heading":"row"},...P.tree):h.push({title:m,href:d,items:P.tree,type:0===u?"heading":"row"})}return{pages:f,tree:h}},c=async(e,o={},p=[],u="",f=0)=>{if("auto"===e){return await n(o,p,u,f)}const h=await(async(e,o={},n=[],p,u)=>{const f={},h=[];for await(const g of e){if("string"==typeof g){const t=await c(g,o,n,p,u);Object.assign(f,t.pages),h.push(...t.tree);continue}if("separator"===g.type){h.push({type:"separator"});continue}let e=n;const l=t(g.configuration||{},o),d=g.href,m=r(l.basePath,d),w=i(m);if(!s(w)&&d){const t=await(l.provider?.getPageSourcePathname(d,w));t&&(f[w]={title:g.title||"",uri:d,configuration:l,origPath:t,crumbs:n},e=[...n,w])}let P=[];if(g.items){const t=await c(g.items,l,e,g.href,u+1);P=t.tree,Object.assign(f,t.pages)}g.hidden||(u<(o.spreadedLevel||1)?h.push({title:g.title||a(w),href:g.href?w:void 0,type:g.type},...P):h.push({title:g.title||a(w),href:g.href?w:void 0,items:P,type:g.type}))}return{pages:f,tree:h}})(e,o,p,u,f);return h};export{c as parseStructure};
2
+ //# sourceMappingURL=parse-structure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-structure.js","sources":["../../../src/core/utils/parse-structure.ts"],"sourcesContent":["import { type DocItem } from \"../types/structure\";\nimport { type Pages, type Crumbs, type Configuration } from \"../types/content\";\nimport { type TreeItem } from \"../../components/elements/sidebar/types\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata } from \"./get-metadata\";\nimport { generatePseudoTitle, checkIsLinkExternal, mergePathname, normalizePathname } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\nconst parseJSONStructure = async (\n parentConfiguration: Configuration = {},\n parentPathname = \"\",\n crumbs: Crumbs = [],\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const content = await loadContent(`${parentPathname}/structure.json`, parentConfiguration.provider);\n try {\n const structure: { [segment: string]: { title: string } } = JSON.parse(content.data);\n for (const segment in structure) {\n const data = structure[segment];\n const clientPath = normalizePathname(\n segment === \"index\" ? parentPathname : parentPathname + \"/\" + segment,\n );\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized)) {\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(\n clientPath,\n pathnameNormalized,\n );\n if (origPath) {\n pages[pathnameNormalized] = {\n title: data.title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n }\n\n let subTree: TreeItem[] | undefined;\n if (segment !== \"index\") {\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n tree.push({\n title: data.title,\n href: pathnameNormalized,\n items: subTree,\n type: \"row\",\n });\n }\n } catch {\n throw new Error(`Can't parse structure \"${parentPathname}/structure.json\"`);\n }\n return { pages, tree };\n }\n};\n\nconst parseAutoStructure = async (\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname = \"\",\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const jsonStructureData = await parseJSONStructure(\n parentConfiguration,\n parentPathname,\n crumbs,\n nestingLevel + 1,\n );\n if (jsonStructureData) {\n return jsonStructureData;\n }\n }\n\n for await (const generatedItem of branchFiles.docs) {\n const linkLevel = generatedItem.clientPath.split(\"/\").filter(Boolean).length;\n const topLevelLink = linkLevel < 2;\n\n if (\n (!parentPathname && !topLevelLink) ||\n (parentPathname &&\n !generatedItem.clientPath.match(new RegExp(`^${parentPathname.replace(/\\/$/, \"\")}/[^/]+$`)))\n ) {\n continue;\n }\n\n const { clientPath } = generatedItem;\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n const metadata = await getMetadata({ provider: parentConfiguration.provider, uri: clientPath });\n const title = metadata.title || generatePseudoTitle(pathnameNormalized);\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n if (origPath) {\n pages[pathnameNormalized] = {\n title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n Object.assign(pages, subItemsData.pages);\n\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title,\n href: pathnameNormalized,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n },\n ...subItemsData.tree,\n );\n } else {\n tree.push({\n title,\n href: pathnameNormalized,\n items: subItemsData.tree,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n });\n }\n }\n\n return { pages, tree };\n};\n\nconst parseStaticStructure = async (\n items: DocItem[],\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname: string,\n nestingLevel: number,\n): Promise<{\n pages: Pages;\n tree: TreeItem[];\n}> => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n for await (const item of items) {\n if (typeof item === \"string\") {\n const subItemsData = await parseStructure(item, parentConfiguration, crumbs, parentPathname, nestingLevel);\n Object.assign(pages, subItemsData.pages);\n tree.push(...subItemsData.tree);\n continue;\n }\n if (item.type === \"separator\") {\n tree.push({ type: \"separator\" });\n\n continue;\n }\n let subCrumbs = crumbs;\n const configuration = getConfiguration(item.configuration || {}, parentConfiguration);\n const clientPath = item.href;\n const pathname = mergePathname(configuration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized) && clientPath) {\n const origPath = await configuration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n\n if (origPath) {\n pages[pathnameNormalized] = {\n title: item.title || \"\",\n uri: clientPath,\n configuration,\n origPath,\n crumbs,\n };\n subCrumbs = [...crumbs, pathnameNormalized];\n }\n }\n\n let subTree: TreeItem[] = [];\n if (item.items) {\n const subItemsData = await parseStructure(\n item.items,\n configuration,\n subCrumbs,\n item.href,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n if (!item.hidden) {\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n type: item.type,\n },\n ...subTree,\n );\n } else {\n tree.push({\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n items: subTree,\n type: item.type,\n });\n }\n }\n }\n\n return { pages, tree };\n};\n\nexport const parseStructure = async (\n items: DocItem[] | \"auto\",\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n pathname: string = \"\",\n nestingLevel: number = 0,\n) => {\n if (items === \"auto\") {\n const structureParsed = await parseAutoStructure(parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n }\n\n const structureParsed = await parseStaticStructure(items, parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n};\n"],"names":["parseAutoStructure","async","parentConfiguration","crumbs","parentPathname","nestingLevel","pages","tree","provider","branchFiles","filesPromise","structures","includes","jsonStructureData","content","loadContent","structure","JSON","parse","data","segment","clientPath","normalizePathname","pathname","mergePathname","basePath","pathnameNormalized","checkIsLinkExternal","origPath","getPageSourcePathname","title","uri","configuration","subTree","subItemsData","Object","assign","push","href","items","type","Error","parseJSONStructure","generatedItem","docs","linkLevel","split","filter","Boolean","length","match","RegExp","replace","getMetadata","generatePseudoTitle","spreadedLevel","parseStructure","structureParsed","item","subCrumbs","getConfiguration","hidden","undefined","parseStaticStructure"],"mappings":"mRAQA,MAmEMA,EAAqBC,MACvBC,EAAqC,GACrCC,EAAiB,GACjBC,EAAiB,GACjBC,KAEA,MAAMC,EAAe,CAAA,EACfC,EAAmB,GAEzB,IAAKL,EAAoBM,SAAU,MAAO,CAAEF,QAAOC,QAEnD,MAAME,QAAoBP,EAAoBM,SAASE,aAEvD,G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QoB,EAAUlB,GACjG,OAAOoD"}
@@ -0,0 +1,8 @@
1
+ export declare const getFileUrl: (pathname: string) => string;
2
+ export declare const normalizePathname: (pathname?: string | null) => string;
3
+ export declare const removeTrailingSlash: (pathname?: string | null) => string;
4
+ export declare const addTrailingSlash: (pathname?: string | null) => string;
5
+ export declare const generatePseudoTitle: (pathname?: string | null) => string;
6
+ export declare const checkIsLinkExternal: (href: string) => boolean;
7
+ export declare const mergePathname: (basePath?: string, href?: string) => string | undefined;
8
+ //# sourceMappingURL=path-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/path-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,WAS1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,GAAG,IAAI,WAIzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,GAAG,IAAI,WAI3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,GAAG,IAAI,WAIxD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,GAAG,IAAI,WAS3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,YAG/C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,uBAE7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ const e=e=>{const[,t,n]=e.match(/(?:^|\/)([^/]+)(\.mdx?)$/)||[];return e.replace(new RegExp(`((/|^)(readme|README|index|${t}/${t}))?${n}$`),"")},t=e=>e&&e.replace(/\/$/,"")||"/",n=e=>e?e.endsWith("/")?e.substring(0,e.length-1):e:"",r=e=>{const n=t(e).split("/").filter(Boolean);if(0===n.length)return"Index";return n[n.length-1].split("-").map(e=>e[0].toUpperCase()+e.substring(1)).join(" ")},s=e=>"r"!==new URL(e,"http://r").host,p=(e,t)=>!t||s(t)?t:(e||"")+t;export{s as checkIsLinkExternal,r as generatePseudoTitle,e as getFileUrl,p as mergePathname,t as normalizePathname,n as removeTrailingSlash};
2
+ //# sourceMappingURL=path-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-tools.js","sources":["../../../src/core/utils/path-tools.ts"],"sourcesContent":["export const getFileUrl = (pathname: string) => {\n const [, filename, ext] = pathname.match(/(?:^|\\/)([^/]+)(\\.mdx?)$/) || [];\n\n const clientPath = pathname.replace(\n new RegExp(`((\\/|^)(readme|README|index|${filename}/${filename}))?${ext}$`),\n \"\",\n );\n\n return clientPath;\n};\n\nexport const normalizePathname = (pathname?: string | null) => {\n if (!pathname) return \"/\";\n\n return pathname.replace(/\\/$/, \"\") || \"/\";\n};\n\nexport const removeTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname.substring(0, pathname.length - 1) : pathname;\n};\n\nexport const addTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname : pathname + \"/\";\n};\n\nexport const generatePseudoTitle = (pathname?: string | null) => {\n const pathnamename = normalizePathname(pathname);\n const pathnamenameSegments = pathnamename.split(\"/\").filter(Boolean);\n\n if (pathnamenameSegments.length === 0) return \"Index\";\n\n const lastSegment = pathnamenameSegments[pathnamenameSegments.length - 1];\n const lastSegmentWords = lastSegment.split(\"-\");\n return lastSegmentWords.map((word) => word[0].toUpperCase() + word.substring(1)).join(\" \");\n};\n\nexport const checkIsLinkExternal = (href: string) => {\n const url = new URL(href, \"http://r\");\n return url.host !== \"r\";\n};\n\nexport const mergePathname = (basePath?: string, href?: string) => {\n return !href || checkIsLinkExternal(href) ? href : (basePath || \"\") + href;\n};\n"],"names":["getFileUrl","pathname","filename","ext","match","replace","RegExp","normalizePathname","removeTrailingSlash","endsWith","substring","length","generatePseudoTitle","pathnamenameSegments","split","filter","Boolean","map","word","toUpperCase","join","checkIsLinkExternal","href","URL","host","mergePathname","basePath"],"mappings":"AAAO,MAAMA,EAAcC,IACvB,MAAM,CAAGC,EAAUC,GAAOF,EAASG,MAAM,6BAA+B,GAOxE,OALmBH,EAASI,QACxB,IAAIC,OAAO,8BAA+BJ,KAAYA,OAAcC,MACpE,KAMKI,EAAqBN,GACzBA,GAEEA,EAASI,QAAQ,MAAO,KAFT,IAKbG,EAAuBP,GAC3BA,EAEEA,EAASQ,SAAS,KAAOR,EAASS,UAAU,EAAGT,EAASU,OAAS,GAAKV,EAFvD,GAWbW,EAAuBX,IAChC,MACMY,EADeN,EAAkBN,GACGa,MAAM,KAAKC,OAAOC,SAE5D,GAAoC,IAAhCH,EAAqBF,OAAc,MAAO,QAI9C,OAFoBE,EAAqBA,EAAqBF,OAAS,GAClCG,MAAM,KACnBG,IAAKC,GAASA,EAAK,GAAGC,cAAgBD,EAAKR,UAAU,IAAIU,KAAK,MAG7EC,EAAuBC,GAEZ,MADR,IAAIC,IAAID,EAAM,YACfE,KAGFC,EAAgB,CAACC,EAAmBJ,KACrCA,GAAQD,EAAoBC,GAAQA,GAAQI,GAAY,IAAMJ"}
@@ -0,0 +1,5 @@
1
+ export declare const saveTab: (tabsKey: string, tab: string) => void;
2
+ export declare const clearTabs: () => void;
3
+ export declare const getTab: (tabsKey: string) => string | null;
4
+ export declare const getTabs: () => string[][];
5
+ //# sourceMappingURL=tabs-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/tabs-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,EAAE,KAAK,MAAM,SAKnD,CAAC;AAEF,eAAO,MAAM,SAAS,YAErB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,SAAS,MAAM,kBAIrC,CAAC;AAEF,eAAO,MAAM,OAAO,kBAInB,CAAC"}
@@ -0,0 +1,2 @@
1
+ const t=(t,s)=>{const e=localStorage.getItem("r-tabs"),o=e?.split(";").filter(s=>s&&!s.startsWith(`${t}=`))||[];o.push(`${t}=${s}`),localStorage.setItem("r-tabs",o.join(";"))};export{t as saveTab};
2
+ //# sourceMappingURL=tabs-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs-tools.js","sources":["../../../src/core/utils/tabs-tools.ts"],"sourcesContent":["export const saveTab = (tabsKey: string, tab: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && !item.startsWith(`${tabsKey}=`)) || [];\n items.push(`${tabsKey}=${tab}`);\n localStorage.setItem(\"r-tabs\", items.join(\";\"));\n};\n\nexport const clearTabs = () => {\n localStorage.removeItem(\"r-tabs\");\n};\n\nexport const getTab = (tabsKey: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const tab = store?.split(\";\").find((item) => item && item.startsWith(`${tabsKey}=`));\n return tab?.substring(tabsKey.length) || null;\n};\n\nexport const getTabs = () => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && /[\\w-]+=[\\w]+/.test(item)) || [];\n return items.map((item) => item.split(\"=\"));\n};\n"],"names":["saveTab","tabsKey","tab","store","localStorage","getItem","items","split","filter","item","startsWith","push","setItem","join"],"mappings":"MAAaA,EAAU,CAACC,EAAiBC,KACrC,MAAMC,EAAQC,aAAaC,QAAQ,UAC7BC,EAAQH,GAAOI,MAAM,KAAKC,OAAQC,GAASA,IAASA,EAAKC,WAAW,GAAGT,QAAgB,GAC7FK,EAAMK,KAAK,GAAGV,KAAWC,KACzBE,aAAaQ,QAAQ,SAAUN,EAAMO,KAAK"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export { initializeRobindoc } from "./core/utils/initialize-robindoc";
2
+ export { Header } from "./components/elements/header";
3
+ export { Footer } from "./components/elements/footer";
4
+ export { RobinProvider } from "./components/elements/robin-provider";
5
+ export { DocsContainer } from "./components/elements/docs-container";
6
+ export { BlogContainer } from "./components/elements/blog-container";
7
+ export { PageContainer } from "./components/elements/page-container";
8
+ export { KeylinkToContent } from "./components/elements/keylink-to-content";
9
+ export { KeylinkToNavigation } from "./components/elements/keylink-to-navigation";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export{initializeRobindoc}from"./core/utils/initialize-robindoc.js";export{Header}from"./components/elements/header/index.js";export{Footer}from"./components/elements/footer/index.js";export{RobinProvider}from"./components/elements/robin-provider/index.js";export{DocsContainer}from"./components/elements/docs-container/index.js";export{BlogContainer}from"./components/elements/blog-container/index.js";export{PageContainer}from"./components/elements/page-container/index.js";export{KeylinkToContent}from"./components/elements/keylink-to-content/index.js";export{KeylinkToNavigation}from"./components/elements/keylink-to-navigation/index.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}