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 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/task-list/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./task-list-item.scss";
3
+ interface TaskListItemProps {
4
+ className?: string;
5
+ defaultChecked?: boolean;
6
+ }
7
+ export declare const TaskListItem: React.FC<React.PropsWithChildren<TaskListItemProps>>;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,uBAAuB,CAAC;AAE/B,UAAU,iBAAiB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAa7E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import e from"react";import t from"clsx";import{ListItem as a}from"../../list/list-item/index.js";const l=({className:l,defaultChecked:s,children:c})=>e.createElement(a,{className:t("r-task-li",l)},e.createElement("label",{className:"r-task-label"},e.createElement("input",{type:"checkbox",defaultChecked:s,className:"r-task-checkbox"}),e.createElement("span",{className:"r-task-label-text"},c)));export{l as TaskListItem};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-list-item/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { ListItem } from \"../../list\";\n\nimport \"./task-list-item.scss\";\n\ninterface TaskListItemProps {\n className?: string;\n defaultChecked?: boolean;\n}\n\nexport const TaskListItem: React.FC<React.PropsWithChildren<TaskListItemProps>> = ({\n className,\n defaultChecked,\n children,\n}) => {\n return (\n <ListItem className={clsx(\"r-task-li\", className)}>\n <label className=\"r-task-label\">\n <input type=\"checkbox\" defaultChecked={defaultChecked} className=\"r-task-checkbox\" />\n <span className=\"r-task-label-text\">{children}</span>\n </label>\n </ListItem>\n );\n};\n"],"names":["TaskListItem","className","defaultChecked","children","React","createElement","ListItem","clsx","type"],"mappings":"kGAYO,MAAMA,EAAqE,EAC9EC,YACAC,iBACAC,cAGIC,EAAAC,cAACC,EAAQ,CAACL,UAAWM,EAAK,YAAaN,IACnCG,EAAAC,cAAA,QAAA,CAAOJ,UAAU,gBACbG,EAAAC,cAAA,QAAA,CAAOG,KAAK,WAAWN,eAAgBA,EAAgBD,UAAU,oBACjEG,EAAAC,cAAA,OAAA,CAAMJ,UAAU,qBAAqBE"}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { type OrderedListProps } from "../../list";
3
+ import "./task-ordered-list.scss";
4
+ export declare const TaskOrderedList: React.FC<React.PropsWithChildren<OrderedListProps>>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-ordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,0BAA0B,CAAC;AAElC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAU/E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"react";import t from"clsx";import{OrderedList as e}from"../../list/ordered-list/index.js";const s=({className:s,start:o,children:a})=>r.createElement(e,{className:t("r-task-ol",s),start:o},a);export{s as TaskOrderedList};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-ordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { OrderedList, type OrderedListProps } from \"../../list\";\n\nimport \"./task-ordered-list.scss\";\n\nexport const TaskOrderedList: React.FC<React.PropsWithChildren<OrderedListProps>> = ({\n className,\n start,\n children,\n}) => {\n return (\n <OrderedList className={clsx(\"r-task-ol\", className)} start={start}>\n {children}\n </OrderedList>\n );\n};\n"],"names":["TaskOrderedList","className","start","children","React","OrderedList","clsx"],"mappings":"wGAOO,MAAMA,EAAuE,EAChFC,YACAC,QACAC,cAGIC,gBAACC,EAAW,CAACJ,UAAWK,EAAK,YAAaL,GAAYC,MAAOA,GACxDC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./task-unordered-list.scss";
3
+ interface TaskUnorderedListProps {
4
+ className?: string;
5
+ }
6
+ export declare const TaskUnorderedList: React.FC<React.PropsWithChildren<TaskUnorderedListProps>>;
7
+ export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,4BAA4B,CAAC;AAEpC,UAAU,sBAAsB;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAKvF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"react";import e from"clsx";import{UnorderedList as t}from"../../list/unordered-list/index.js";const s=({className:s,children:m})=>r.createElement(t,{className:e("r-task-ul",s)},m);export{s as TaskUnorderedList};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/ui/task-list/task-unordered-list/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport { UnorderedList } from \"../../list\";\n\nimport \"./task-unordered-list.scss\";\n\ninterface TaskUnorderedListProps {\n className?: string;\n}\n\nexport const TaskUnorderedList: React.FC<React.PropsWithChildren<TaskUnorderedListProps>> = ({\n className,\n children,\n}) => {\n return <UnorderedList className={clsx(\"r-task-ul\", className)}>{children}</UnorderedList>;\n};\n"],"names":["TaskUnorderedList","className","children","React","createElement","UnorderedList","clsx"],"mappings":"4GAWO,MAAMA,EAA+E,EACxFC,YACAC,cAEOC,EAAAC,cAACC,EAAa,CAACJ,UAAWK,EAAK,YAAaL,IAAaC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import "./tooltip.scss";
3
+ export type TooltipProps = React.PropsWithChildren<{
4
+ className?: string;
5
+ position: keyof typeof positionClassNames;
6
+ visible?: boolean;
7
+ }>;
8
+ declare const positionClassNames: {
9
+ "bottom-start": string;
10
+ "bottom-end": string;
11
+ };
12
+ export declare const Tooltip: React.FC<TooltipProps>;
13
+ export {};
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,gBAAgB,CAAC;AAExB,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,kBAAkB,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAI1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import t from"react";import o from"clsx";const e={"bottom-start":"_bottom-start","bottom-end":"_bottom-end"},s=({className:s,position:m,children:r,visible:i})=>t.createElement("span",{className:o("r-tooltip",e[m],i&&"_visible",s)},r);export{s as Tooltip};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/ui/tooltip/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./tooltip.scss\";\n\nexport type TooltipProps = React.PropsWithChildren<{\n className?: string;\n position: keyof typeof positionClassNames;\n visible?: boolean;\n}>;\n\nconst positionClassNames = {\n \"bottom-start\": \"_bottom-start\",\n \"bottom-end\": \"_bottom-end\",\n};\n\nexport const Tooltip: React.FC<TooltipProps> = ({ className, position, children, visible }) => (\n <span className={clsx(\"r-tooltip\", positionClassNames[position], visible && \"_visible\", className)}>\n {children}\n </span>\n);\n"],"names":["positionClassNames","Tooltip","className","position","children","visible","React","createElement","clsx"],"mappings":"yCAWA,MAAMA,EAAqB,CACvB,eAAgB,gBAChB,aAAc,eAGLC,EAAkC,EAAGC,YAAWC,WAAUC,WAAUC,aAC7EC,EAAAC,cAAA,OAAA,CAAML,UAAWM,EAAK,YAAaR,EAAmBG,GAAWE,GAAW,WAAYH,IACnFE"}
@@ -0,0 +1,11 @@
1
+ export declare const extensionsMap: {
2
+ ".svg": string;
3
+ ".jpg": string;
4
+ ".jpeg": string;
5
+ ".png": string;
6
+ ".webp": string;
7
+ ".avif": string;
8
+ ".gif": string;
9
+ ".ico": string;
10
+ };
11
+ //# sourceMappingURL=contents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contents.d.ts","sourceRoot":"","sources":["../../../src/core/data/contents.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;CASzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ const g={".svg":"image/svg+xml",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".webp":"image/webp",".avif":"image/avif",".gif":"image/gif",".ico":"image/vnd.microsoft.icon"};export{g as extensionsMap};
2
+ //# sourceMappingURL=contents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contents.js","sources":["../../../src/core/data/contents.ts"],"sourcesContent":["export const extensionsMap = {\n \".svg\": \"image/svg+xml\",\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".png\": \"image/png\",\n \".webp\": \"image/webp\",\n \".avif\": \"image/avif\",\n \".gif\": \"image/gif\",\n \".ico\": \"image/vnd.microsoft.icon\",\n};\n"],"names":["extensionsMap"],"mappings":"AAAO,MAAMA,EAAgB,CACzB,OAAQ,gBACR,OAAQ,aACR,QAAS,aACT,OAAQ,YACR,QAAS,aACT,QAAS,aACT,OAAQ,YACR,OAAQ"}
@@ -0,0 +1,4 @@
1
+ export declare const useDebouncer: <T extends any[]>(callback: (abortController: AbortController, ...args: T) => unknown) => {
2
+ handler: (...args: T) => Promise<void>;
3
+ };
4
+ //# sourceMappingURL=use-debouncer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debouncer.d.ts","sourceRoot":"","sources":["../../../src/core/hooks/use-debouncer.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,EAAE,EAAE,UAAU,CAAC,eAAe,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO;uBAI7E,CAAC;CAoBpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useRef as r,useEffect as t}from"react";const e=e=>{const n=r(null),c=r(null);return t(()=>()=>{n.current&&clearTimeout(n.current),c.current&&c.current.abort()},[]),{handler:async(...r)=>{n.current&&clearTimeout(n.current),c.current&&!c.current.signal.aborted&&c.current.abort(),n.current=setTimeout(()=>{c.current=new AbortController,e(c.current,...r)},100)}}};export{e as useDebouncer};
2
+ //# sourceMappingURL=use-debouncer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debouncer.js","sources":["../../../src/core/hooks/use-debouncer.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useDebouncer = <T extends any[]>(callback: (abortController: AbortController, ...args: T) => unknown) => {\n const debounceRef = useRef<NodeJS.Timeout | null>(null);\n const abortControllerRef = useRef<AbortController | null>(null);\n\n const handler = async (...args: T) => {\n if (debounceRef.current) clearTimeout(debounceRef.current);\n if (abortControllerRef.current && !abortControllerRef.current.signal.aborted)\n abortControllerRef.current.abort();\n\n debounceRef.current = setTimeout(() => {\n abortControllerRef.current = new AbortController();\n\n callback(abortControllerRef.current, ...args);\n }, 100);\n };\n\n useEffect(() => {\n return () => {\n if (debounceRef.current) clearTimeout(debounceRef.current);\n if (abortControllerRef.current) abortControllerRef.current.abort();\n };\n }, []);\n\n return { handler };\n};\n"],"names":["useDebouncer","callback","debounceRef","useRef","abortControllerRef","useEffect","current","clearTimeout","abort","handler","async","args","signal","aborted","setTimeout","AbortController"],"mappings":"8CAGO,MAAMA,EAAiCC,IAC1C,MAAMC,EAAcC,EAA8B,MAC5CC,EAAqBD,EAA+B,MAqB1D,OAPAE,EAAU,IACC,KACCH,EAAYI,SAASC,aAAaL,EAAYI,SAC9CF,EAAmBE,SAASF,EAAmBE,QAAQE,SAEhE,IAEI,CAAEC,QAnBOC,SAAUC,KAClBT,EAAYI,SAASC,aAAaL,EAAYI,SAC9CF,EAAmBE,UAAYF,EAAmBE,QAAQM,OAAOC,SACjET,EAAmBE,QAAQE,QAE/BN,EAAYI,QAAUQ,WAAW,KAC7BV,EAAmBE,QAAU,IAAIS,gBAEjCd,EAASG,EAAmBE,WAAYK,IACzC"}
@@ -0,0 +1,3 @@
1
+ export type SystemType = null | "other" | "apple";
2
+ export declare const useSystemType: () => SystemType;
3
+ //# sourceMappingURL=use-system-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-system-type.d.ts","sourceRoot":"","sources":["../../../src/core/hooks/use-system-type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,eAAO,MAAM,aAAa,kBAYzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useState as t,useEffect as r}from"react";const e=()=>{const[e,n]=t(null);return r(()=>{navigator.userAgent.includes("Macintosh")?n("apple"):n("other")},[]),e};export{e as useSystemType};
2
+ //# sourceMappingURL=use-system-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-system-type.js","sources":["../../../src/core/hooks/use-system-type.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nexport type SystemType = null | \"other\" | \"apple\";\n\nexport const useSystemType = () => {\n const [system, setSystem] = useState<SystemType>(null);\n\n useEffect(() => {\n if (navigator.userAgent.includes(\"Macintosh\")) {\n setSystem(\"apple\");\n } else {\n setSystem(\"other\");\n }\n }, []);\n\n return system;\n};\n"],"names":["useSystemType","system","setSystem","useState","useEffect","navigator","userAgent","includes"],"mappings":"gDAIO,MAAMA,EAAgB,KACzB,MAAOC,EAAQC,GAAaC,EAAqB,MAUjD,OARAC,EAAU,KACFC,UAAUC,UAAUC,SAAS,aAC7BL,EAAU,SAEVA,EAAU,UAEf,IAEID"}
@@ -0,0 +1,13 @@
1
+ import { type BranchFiles } from "../types/content";
2
+ export declare class BaseProvider {
3
+ type: "local" | "remote";
4
+ sourceRoot: string;
5
+ filesPromise: Promise<BranchFiles> | BranchFiles;
6
+ constructor(sourceRoot: string);
7
+ getPageSourcePathname(uri: string, fullUri: string): Promise<string | null>;
8
+ load(_uri: string): Promise<string>;
9
+ getEditUri(_uri: string): Promise<string | null>;
10
+ getLastModifiedDate(_uri: string): Promise<string | null>;
11
+ getFileSrc(_uri: string, href: string, _publicDirs?: string[]): Promise<string>;
12
+ }
13
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/core/providers/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,qBAAa,YAAY;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAW;IAEnC,UAAU,EAAE,MAAM,CAAC;IAEnB,YAAY,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC;gBAErC,UAAU,EAAE,MAAM;IAKxB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAclD,IAAI,CAAC,IAAI,EAAE,MAAM;IAIjB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIhD,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAGxF"}
@@ -0,0 +1,2 @@
1
+ class e{type="local";sourceRoot;filesPromise;constructor(e){this.sourceRoot=e.replaceAll("\\","/").replace(/\/$/,""),this.filesPromise={docs:[],structures:[]}}async getPageSourcePathname(e,t){let s=null;if(t.endsWith(".md")||t.endsWith(".mdx")||t.endsWith(".json"))s=t;else{const t=(await this.filesPromise).docs.find(t=>t.clientPath===e);t&&(s=t.origPath)}return s}async load(e){return""}async getEditUri(e){return null}async getLastModifiedDate(e){return null}async getFileSrc(e,t,s){return t}}export{e as BaseProvider};
2
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../src/core/providers/base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { type BranchFiles } from \"../types/content\";\n\nexport class BaseProvider {\n type: \"local\" | \"remote\" = \"local\";\n\n sourceRoot: string;\n\n filesPromise: Promise<BranchFiles> | BranchFiles;\n\n constructor(sourceRoot: string) {\n this.sourceRoot = sourceRoot.replaceAll(\"\\\\\", \"/\").replace(/\\/$/, \"\");\n this.filesPromise = { docs: [], structures: [] };\n }\n\n async getPageSourcePathname(uri: string, fullUri: string) {\n let pathname = null;\n if (fullUri.endsWith(\".md\") || fullUri.endsWith(\".mdx\") || fullUri.endsWith(\".json\")) {\n pathname = fullUri;\n } else {\n const files = await this.filesPromise;\n const validFile = files.docs.find((file) => file.clientPath === uri);\n if (validFile) {\n pathname = validFile.origPath;\n }\n }\n return pathname;\n }\n\n async load(_uri: string) {\n return \"\";\n }\n\n async getEditUri(_uri: string): Promise<string | null> {\n return null;\n }\n\n async getLastModifiedDate(_uri: string): Promise<string | null> {\n return null;\n }\n\n async getFileSrc(_uri: string, href: string, _publicDirs?: string[]): Promise<string> {\n return href;\n }\n}\n"],"names":["BaseProvider","type","sourceRoot","filesPromise","constructor","this","replaceAll","replace","docs","structures","getPageSourcePathname","uri","fullUri","pathname","endsWith","validFile","find","file","clientPath","origPath","load","_uri","getEditUri","getLastModifiedDate","getFileSrc","href","_publicDirs"],"mappings":"MAGaA,EACTC,KAA2B,QAE3BC,WAEAC,aAEA,WAAAC,CAAYF,GACRG,KAAKH,WAAaA,EAAWI,WAAW,KAAM,KAAKC,QAAQ,MAAO,IAClEF,KAAKF,aAAe,CAAEK,KAAM,GAAIC,WAAY,GAChD,CAEA,2BAAMC,CAAsBC,EAAaC,GACrC,IAAIC,EAAW,KACf,GAAID,EAAQE,SAAS,QAAUF,EAAQE,SAAS,SAAWF,EAAQE,SAAS,SACxED,EAAWD,MACR,CACH,MACMG,SADcV,KAAKF,cACDK,KAAKQ,KAAMC,GAASA,EAAKC,aAAeP,GAC5DI,IACAF,EAAWE,EAAUI,SAE7B,CACA,OAAON,CACX,CAEA,UAAMO,CAAKC,GACP,MAAO,EACX,CAEA,gBAAMC,CAAWD,GACb,OAAO,IACX,CAEA,yBAAME,CAAoBF,GACtB,OAAO,IACX,CAEA,gBAAMG,CAAWH,EAAcI,EAAcC,GACzC,OAAOD,CACX"}
@@ -0,0 +1,11 @@
1
+ import { BaseProvider } from "./base";
2
+ export declare class FileSystemProvider extends BaseProvider {
3
+ readonly type = "local";
4
+ sourceRoot: string;
5
+ constructor(sourceRoot?: string);
6
+ getPageSourcePathname(uri: string): Promise<string | null>;
7
+ load(uri: string): Promise<string>;
8
+ getFileSrc(uri: string, href: string, publicDirs?: string[]): Promise<string>;
9
+ private loadFiles;
10
+ }
11
+ //# sourceMappingURL=file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../../src/core/providers/file-system.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,kBAAmB,SAAQ,YAAY;IAChD,QAAQ,CAAC,IAAI,WAAW;IAExB,UAAU,EAAE,MAAM,CAAC;gBAEP,UAAU,GAAE,MAAsB;IAMxC,qBAAqB,CAAC,GAAG,EAAE,MAAM;IAQjC,IAAI,CAAC,GAAG,EAAE,MAAM;IAShB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE;YAmBnD,SAAS;CAiC1B"}
@@ -0,0 +1,2 @@
1
+ import{readFile as t}from"fs/promises";import{glob as e}from"glob";import s from"path";import{BaseProvider as o}from"./base.js";import{extensionsMap as r}from"../data/contents.js";import{getFileUrl as i,normalizePathname as a}from"../utils/path-tools.js";class c extends o{type="local";sourceRoot;constructor(t=process.cwd()){super(t),this.sourceRoot=t.replaceAll("\\","/"),this.filesPromise=this.loadFiles("")}async getPageSourcePathname(t){if(this.sourceRoot.endsWith(".md")||this.sourceRoot.endsWith(".mdx"))return this.sourceRoot;const e=s.posix.join(this.sourceRoot,t).replaceAll("\\","/").replace(/\/$/,"");return super.getPageSourcePathname(t,e)}async load(e){const s=await this.getPageSourcePathname(e);if(!s)throw new Error(`Can not find file for "${e}"`);return await t(s,"utf-8")}async getFileSrc(e,o,i){if(o.match(/https?:\/\//))return o;const a=s.posix.join(process.cwd(),e?.replace(/^\//,"./")||"",o.replace(/^\//,"./")),c=s.posix.relative(process.cwd(),a),{dir:n,ext:l}=s.parse(c),p=i&&new RegExp(`^(${i?.join("|")})(/|$)`),u=p&&n.match(p);let h=o;if(u)h=`${c.replace(u[1],"")}`;else if(l in r){const e=await t(c,"base64");h=`data:${r[l]};base64,${e}`}return h}async loadFiles(t){const o=t?.replace(/^\//,""),r=(await e(["**/*.{md,mdx}","**/structure.json"],{cwd:this.sourceRoot,posix:!0})).reduce((t,e)=>{if(!o||o&&e.startsWith(o)){const r=s.relative(process.cwd(),(this.sourceRoot||".")+"/"+e).replace(/\\/g,"/");if(e.match(/\.mdx?$/)){const s=i("/"+e),c=a(s.substring(o?.length||0)),n=c.replace(/\/[0-9]+[-_](.)/g,"/$1");t.docs.push({origPath:r,clientPath:n,origClientPath:c})}else t.structures.push(r)}return t},{docs:[],structures:[]});return r.docs.sort((t,e)=>t.origClientPath.localeCompare(e.origClientPath)),this.filesPromise=r,r}}export{c as FileSystemProvider};
2
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.js","sources":["../../../src/core/providers/file-system.ts"],"sourcesContent":["import { readFile } from \"fs/promises\";\nimport { glob } from \"glob\";\nimport path from \"path\";\n\nimport { type BranchFiles } from \"../types/content\";\nimport { BaseProvider } from \"./base\";\nimport { extensionsMap } from \"../data/contents\";\nimport { getFileUrl, normalizePathname } from \"../utils/path-tools\";\n\nexport class FileSystemProvider extends BaseProvider {\n readonly type = \"local\";\n\n sourceRoot: string;\n\n constructor(sourceRoot: string = process.cwd()) {\n super(sourceRoot);\n this.sourceRoot = sourceRoot.replaceAll(\"\\\\\", \"/\");\n this.filesPromise = this.loadFiles(\"\");\n }\n\n async getPageSourcePathname(uri: string) {\n if (this.sourceRoot.endsWith(\".md\") || this.sourceRoot.endsWith(\".mdx\")) {\n return this.sourceRoot;\n }\n const fullUri = path.posix.join(this.sourceRoot, uri).replaceAll(\"\\\\\", \"/\").replace(/\\/$/, \"\");\n return super.getPageSourcePathname(uri, fullUri);\n }\n\n async load(uri: string) {\n const filePath = await this.getPageSourcePathname(uri);\n if (!filePath) {\n throw new Error(`Can not find file for \"${uri}\"`);\n }\n const content = await readFile(filePath, \"utf-8\");\n return content;\n }\n\n async getFileSrc(uri: string, href: string, publicDirs?: string[]) {\n if (href.match(/https?:\\/\\//)) return href;\n\n const assetPath = path.posix.join(process.cwd(), uri?.replace(/^\\//, \"./\") || \"\", href.replace(/^\\//, \"./\"));\n const relativePath = path.posix.relative(process.cwd(), assetPath);\n const { dir, ext } = path.parse(relativePath);\n const publicDirsRule = publicDirs && new RegExp(`^(${publicDirs?.join(\"|\")})(\\/|$)`);\n const publicDirMatch = publicDirsRule && dir.match(publicDirsRule);\n\n let src = href;\n if (publicDirMatch) {\n src = `${relativePath.replace(publicDirMatch[1], \"\")}`;\n } else if (ext in extensionsMap) {\n const base64Image = await readFile(relativePath, \"base64\");\n src = `data:${extensionsMap[ext as keyof typeof extensionsMap]};base64,${base64Image}`;\n }\n return src;\n }\n\n private async loadFiles(pathname?: string) {\n const pathnameClean = pathname?.replace(/^\\//, \"\");\n const files = await glob([\"**/*.{md,mdx}\", \"**/structure.json\"], { cwd: this.sourceRoot, posix: true });\n\n const fileTree = files.reduce<BranchFiles>(\n (acc, item) => {\n if (!pathnameClean || (pathnameClean && item.startsWith(pathnameClean))) {\n const origPath = path\n .relative(process.cwd(), (this.sourceRoot || \".\") + \"/\" + item)\n .replace(/\\\\/g, \"/\");\n\n if (item.match(/\\.mdx?$/)) {\n const clientUrl = getFileUrl(\"/\" + item);\n const origClientPath = normalizePathname(clientUrl.substring(pathnameClean?.length || 0));\n const clientPath = origClientPath.replace(/\\/[0-9]+[-_](.)/g, \"/$1\");\n\n acc.docs.push({\n origPath,\n clientPath,\n origClientPath,\n });\n } else {\n acc.structures.push(origPath);\n }\n }\n return acc;\n },\n { docs: [], structures: [] },\n );\n fileTree.docs.sort((a, b) => a.origClientPath.localeCompare(b.origClientPath));\n this.filesPromise = fileTree;\n return fileTree;\n }\n}\n"],"names":["FileSystemProvider","BaseProvider","type","sourceRoot","constructor","process","cwd","super","this","replaceAll","filesPromise","loadFiles","getPageSourcePathname","uri","endsWith","fullUri","path","posix","join","replace","load","filePath","Error","readFile","getFileSrc","href","publicDirs","match","assetPath","relativePath","relative","dir","ext","parse","publicDirsRule","RegExp","publicDirMatch","src","extensionsMap","base64Image","pathname","pathnameClean","fileTree","glob","reduce","acc","item","startsWith","origPath","clientUrl","getFileUrl","origClientPath","normalizePathname","substring","length","clientPath","docs","push","structures","sort","a","b","localeCompare"],"mappings":"+PASM,MAAOA,UAA2BC,EAC3BC,KAAO,QAEhBC,WAEA,WAAAC,CAAYD,EAAqBE,QAAQC,OACrCC,MAAMJ,GACNK,KAAKL,WAAaA,EAAWM,WAAW,KAAM,KAC9CD,KAAKE,aAAeF,KAAKG,UAAU,GACvC,CAEA,2BAAMC,CAAsBC,GACxB,GAAIL,KAAKL,WAAWW,SAAS,QAAUN,KAAKL,WAAWW,SAAS,QAC5D,OAAON,KAAKL,WAEhB,MAAMY,EAAUC,EAAKC,MAAMC,KAAKV,KAAKL,WAAYU,GAAKJ,WAAW,KAAM,KAAKU,QAAQ,MAAO,IAC3F,OAAOZ,MAAMK,sBAAsBC,EAAKE,EAC5C,CAEA,UAAMK,CAAKP,GACP,MAAMQ,QAAiBb,KAAKI,sBAAsBC,GAClD,IAAKQ,EACD,MAAM,IAAIC,MAAM,0BAA0BT,MAG9C,aADsBU,EAASF,EAAU,QAE7C,CAEA,gBAAMG,CAAWX,EAAaY,EAAcC,GACxC,GAAID,EAAKE,MAAM,eAAgB,OAAOF,EAEtC,MAAMG,EAAYZ,EAAKC,MAAMC,KAAKb,QAAQC,MAAOO,GAAKM,QAAQ,MAAO,OAAS,GAAIM,EAAKN,QAAQ,MAAO,OAChGU,EAAeb,EAAKC,MAAMa,SAASzB,QAAQC,MAAOsB,IAClDG,IAAEA,EAAGC,IAAEA,GAAQhB,EAAKiB,MAAMJ,GAC1BK,EAAiBR,GAAc,IAAIS,OAAO,KAAKT,GAAYR,KAAK,cAChEkB,EAAiBF,GAAkBH,EAAIJ,MAAMO,GAEnD,IAAIG,EAAMZ,EACV,GAAIW,EACAC,EAAM,GAAGR,EAAaV,QAAQiB,EAAe,GAAI,WAC9C,GAAIJ,KAAOM,EAAe,CAC7B,MAAMC,QAAoBhB,EAASM,EAAc,UACjDQ,EAAM,QAAQC,EAAcN,aAA6CO,GAC7E,CACA,OAAOF,CACX,CAEQ,eAAM1B,CAAU6B,GACpB,MAAMC,EAAgBD,GAAUrB,QAAQ,MAAO,IAGzCuB,SAFcC,EAAK,CAAC,gBAAiB,qBAAsB,CAAErC,IAAKE,KAAKL,WAAYc,OAAO,KAEzE2B,OACnB,CAACC,EAAKC,KACF,IAAKL,GAAkBA,GAAiBK,EAAKC,WAAWN,GAAiB,CACrE,MAAMO,EAAWhC,EACZc,SAASzB,QAAQC,OAAQE,KAAKL,YAAc,KAAO,IAAM2C,GACzD3B,QAAQ,MAAO,KAEpB,GAAI2B,EAAKnB,MAAM,WAAY,CACvB,MAAMsB,EAAYC,EAAW,IAAMJ,GAC7BK,EAAiBC,EAAkBH,EAAUI,UAAUZ,GAAea,QAAU,IAChFC,EAAaJ,EAAehC,QAAQ,mBAAoB,OAE9D0B,EAAIW,KAAKC,KAAK,CACVT,WACAO,aACAJ,kBAER,MACIN,EAAIa,WAAWD,KAAKT,EAE5B,CACA,OAAOH,GAEX,CAAEW,KAAM,GAAIE,WAAY,KAI5B,OAFAhB,EAASc,KAAKG,KAAK,CAACC,EAAGC,IAAMD,EAAET,eAAeW,cAAcD,EAAEV,iBAC9D3C,KAAKE,aAAegC,EACbA,CACX"}
@@ -0,0 +1,20 @@
1
+ import { type Fetcher } from "../types/content";
2
+ import { BaseProvider } from "./base";
3
+ export declare class GithubProvider extends BaseProvider {
4
+ readonly type = "remote";
5
+ owner: string;
6
+ repo: string;
7
+ ref: string;
8
+ token?: string;
9
+ pathname: string;
10
+ fetcher: Fetcher;
11
+ constructor(sourceRoot: string, fetcher?: Fetcher, token?: string);
12
+ getPageSourcePathname(uri: string): Promise<string | null>;
13
+ load(uri: string): Promise<string>;
14
+ private loadTree;
15
+ private parseUri;
16
+ getEditUri(uri: string): Promise<string | null>;
17
+ getLastModifiedDate(uri: string): Promise<any>;
18
+ getFileSrc(uri: string, href: string): Promise<any>;
19
+ }
20
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/core/providers/github.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,cAAe,SAAQ,YAAY;IAC5C,QAAQ,CAAC,IAAI,YAAY;IAEzB,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,MAAM,CAAC;IAEb,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC;IAEjB,OAAO,EAAE,OAAO,CAAC;gBAEL,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,OAAe,EAAE,KAAK,CAAC,EAAE,MAAM;IAkBlE,qBAAqB,CAAC,GAAG,EAAE,MAAM;IASjC,IAAI,CAAC,GAAG,EAAE,MAAM;YAyBR,QAAQ;IA0CtB,OAAO,CAAC,QAAQ;IAQV,UAAU,CAAC,GAAG,EAAE,MAAM;IAStB,mBAAmB,CAAC,GAAG,EAAE,MAAM;IAwB/B,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CA0B7C"}
@@ -0,0 +1,2 @@
1
+ import t from"path";import{BaseProvider as e}from"./base.js";import{extensionsMap as r}from"../data/contents.js";import{getFileUrl as s,normalizePathname as o}from"../utils/path-tools.js";class a extends e{type="remote";owner;repo;ref;token;pathname;fetcher;constructor(t,e=fetch,r){super(t);const s=this.parseUri(t);if(!s)throw new Error(`Invalid URI: "${t}"`);const{owner:o,repo:a,ref:i="main",pathname:n=""}=s;this.owner=o,this.repo=a,this.ref=i,this.token=r,this.pathname=n,this.fetcher=e,this.filesPromise=this.loadTree(n)}async getPageSourcePathname(t){if(this.pathname.endsWith(".md")||this.pathname.endsWith(".mdx"))return this.pathname;const e=[...this.pathname?.split("/")||[],...t.split("/")].filter(Boolean).join("/");return super.getPageSourcePathname(t,e)}async load(t){const e=await this.getPageSourcePathname(t);if(!e)throw new Error(`Can not find md file for "${t}" at "https://github.com/${this.owner}/${this.repo}/blob/${this.ref}"`);const r=new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/contents/${e}`),s=new Headers;s.set("Accept","application/vnd.github.raw+json"),r.searchParams.set("ref",this.ref),this.token&&s.set("Authorization",`Bearer ${this.token}`);const o=await this.fetcher(r.toString(),{headers:s});if(!o.ok)throw new Error(`Can not load "${t}" content from "https://github.com/${this.owner}/${this.repo}/blob/${this.ref}": ${o.statusText}`);return await o.text()}async loadTree(t){const e=t?.replace(/^\//,""),r=new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/git/trees/${this.ref}?recursive=true`),a=new Headers;a.set("Accept","application/vnd.github.raw+json"),this.token&&a.set("Authorization",`Bearer ${this.token}`);const i=await this.fetcher(r.toString(),{headers:a});if(!i.ok)throw new Error("Can not load tree: "+i.statusText);const n=(await i.json()).tree.reduce((t,r)=>{if(!e||e&&r.path.startsWith(e))if(r.path.match(/\.(md|mdx)$/)){const a=s(r.path),i=o(a.substring(e?.length||0)),n=i.replace(/\/[0-9]+[-_](.)/g,"/$1");t.docs.push({origPath:"/"+r.path,clientPath:n,origClientPath:i})}else r.path.endsWith("structure.json")&&t.structures.push(r.path);return t},{docs:[],structures:[]});return n.docs.sort((t,e)=>t.origClientPath.localeCompare(e.origClientPath)),this.filesPromise=n,n}parseUri(t){const e=t.match(/^https:\/\/github.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)(?:\/(blob|tree)\/(?<ref>[^/]+)(?<pathname>\/.*)|\/)?$/),r=e?.groups;return r||null}async getEditUri(t){const e=await this.getPageSourcePathname(t);return e?`https://github.com/${this.owner}/${this.repo}/edit/${this.ref}${e}`:null}async getLastModifiedDate(t){const e=await this.getPageSourcePathname(t);if(!e)return null;const r=new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/commits?page=1&per_page=1`);r.searchParams.set("path",e),r.searchParams.set("sha",this.ref);const s=new Headers;this.token&&s.set("Authorization",`Bearer ${this.token}`);const o=await fetch(r,{headers:s});if(!o.ok)throw new Error(`Can not load last modified date for "${t}" from "https://github.com/${this.owner}/${this.repo}/blob/${this.ref}": ${o.statusText}`);return(await o.json())[0].commit.committer.date}async getFileSrc(e,s){if(s.match(/https?:\/\//))return s;const o=s.startsWith("/")?s:e.replace(/\/$/,"")+"/"+s,a=new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/contents${o}`);a.searchParams.set("ref",this.ref);const i=new Headers;this.token&&i.set("Authorization",`Bearer ${this.token}`);const n=await this.fetcher(a.toString(),{headers:i});if(!n.ok)throw new Error("Can not load asset: "+n.statusText);const h=await n.json();if(new URL(h.download_url).searchParams.get("token")){const{ext:e}=t.parse(o);return`data:${r[e]};base64,${h.content}`}return h.download_url}}export{a as GithubProvider};
2
+ //# sourceMappingURL=github.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.js","sources":["../../../src/core/providers/github.ts"],"sourcesContent":["import path from \"path\";\n\nimport { type BranchFiles, type Fetcher } from \"../types/content\";\nimport { BaseProvider } from \"./base\";\nimport { extensionsMap } from \"../data/contents\";\nimport { getFileUrl, normalizePathname } from \"../utils/path-tools\";\n\nexport class GithubProvider extends BaseProvider {\n readonly type = \"remote\";\n\n owner: string;\n\n repo: string;\n\n ref: string;\n\n token?: string;\n\n pathname: string;\n\n fetcher: Fetcher;\n\n constructor(sourceRoot: string, fetcher: Fetcher = fetch, token?: string) {\n super(sourceRoot);\n\n const groups = this.parseUri(sourceRoot);\n if (!groups) {\n throw new Error(`Invalid URI: \"${sourceRoot}\"`);\n }\n\n const { owner, repo, ref = \"main\", pathname = \"\" } = groups;\n this.owner = owner;\n this.repo = repo;\n this.ref = ref;\n this.token = token;\n this.pathname = pathname;\n this.fetcher = fetcher;\n this.filesPromise = this.loadTree(pathname);\n }\n\n async getPageSourcePathname(uri: string) {\n if (this.pathname.endsWith(\".md\") || this.pathname.endsWith(\".mdx\")) {\n return this.pathname;\n }\n const segments = [...(this.pathname?.split(\"/\") || []), ...uri.split(\"/\")].filter(Boolean);\n const fullUri = segments.join(\"/\");\n return super.getPageSourcePathname(uri, fullUri);\n }\n\n async load(uri: string) {\n const pathname = await this.getPageSourcePathname(uri);\n if (!pathname) {\n throw new Error(\n `Can not find md file for \"${uri}\" at \"https://github.com/${this.owner}/${this.repo}/blob/${this.ref}\"`,\n );\n }\n\n const url = new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/contents/${pathname}`);\n const headers = new Headers();\n headers.set(\"Accept\", \"application/vnd.github.raw+json\");\n\n url.searchParams.set(\"ref\", this.ref);\n if (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\n const resp = await this.fetcher(url.toString(), { headers });\n if (!resp.ok) {\n throw new Error(\n `Can not load \"${uri}\" content from \"https://github.com/${this.owner}/${this.repo}/blob/${this.ref}\": ${resp.statusText}`,\n );\n }\n const content = await resp.text();\n return content;\n }\n\n private async loadTree(pathname?: string) {\n const pathnameClean = pathname?.replace(/^\\//, \"\");\n const url = new URL(\n `https://api.github.com/repos/${this.owner}/${this.repo}/git/trees/${this.ref}?recursive=true`,\n );\n const headers = new Headers();\n headers.set(\"Accept\", \"application/vnd.github.raw+json\");\n\n if (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\n const resp = await this.fetcher(url.toString(), { headers });\n if (!resp.ok) {\n throw new Error(\"Can not load tree: \" + resp.statusText);\n }\n const data = (await resp.json()) as { tree: { path: string }[] };\n\n const fileTree = data.tree.reduce<BranchFiles>(\n (acc, item) => {\n if (!pathnameClean || (pathnameClean && item.path.startsWith(pathnameClean))) {\n if (item.path.match(/\\.(md|mdx)$/)) {\n const clientUrl = getFileUrl(item.path);\n const origClientPath = normalizePathname(clientUrl.substring(pathnameClean?.length || 0));\n const clientPath = origClientPath.replace(/\\/[0-9]+[-_](.)/g, \"/$1\");\n\n acc.docs.push({\n origPath: \"/\" + item.path,\n clientPath,\n origClientPath,\n });\n } else if (item.path.endsWith(\"structure.json\")) {\n acc.structures.push(item.path);\n }\n }\n return acc;\n },\n { docs: [], structures: [] },\n );\n fileTree.docs.sort((a, b) => a.origClientPath.localeCompare(b.origClientPath));\n this.filesPromise = fileTree;\n return fileTree;\n }\n\n private parseUri(uri: string) {\n const match = uri.match(\n /^https:\\/\\/github.com\\/(?<owner>[^/]+)\\/(?<repo>[^/]+)(?:\\/(blob|tree)\\/(?<ref>[^/]+)(?<pathname>\\/.*)|\\/)?$/,\n );\n const groups = match?.groups;\n return groups || null;\n }\n\n async getEditUri(uri: string) {\n const pathname = await this.getPageSourcePathname(uri);\n if (!pathname) {\n return null;\n }\n\n return `https://github.com/${this.owner}/${this.repo}/edit/${this.ref}${pathname}`;\n }\n\n async getLastModifiedDate(uri: string) {\n const pathname = await this.getPageSourcePathname(uri);\n if (!pathname) {\n return null;\n }\n\n const url = new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/commits?page=1&per_page=1`);\n url.searchParams.set(\"path\", pathname);\n url.searchParams.set(\"sha\", this.ref);\n\n const headers = new Headers();\n if (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\n const resp = await fetch(url, { headers });\n if (!resp.ok) {\n throw new Error(\n `Can not load last modified date for \"${uri}\" from \"https://github.com/${this.owner}/${this.repo}/blob/${this.ref}\": ${resp.statusText}`,\n );\n }\n\n const data = await resp.json();\n return data[0].commit.committer.date;\n }\n\n async getFileSrc(uri: string, href: string) {\n if (href.match(/https?:\\/\\//)) return href;\n\n const filePath = href.startsWith(\"/\") ? href : uri.replace(/\\/$/, \"\") + \"/\" + href;\n const url = new URL(`https://api.github.com/repos/${this.owner}/${this.repo}/contents${filePath}`);\n url.searchParams.set(\"ref\", this.ref);\n\n const headers = new Headers();\n if (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\n const resp = await this.fetcher(url.toString(), { headers });\n\n if (!resp.ok) {\n throw new Error(\"Can not load asset: \" + resp.statusText);\n }\n\n const fileData = await resp.json();\n const srcUrl = new URL(fileData.download_url);\n\n if (srcUrl.searchParams.get(\"token\")) {\n const { ext } = path.parse(filePath);\n return `data:${extensionsMap[ext as keyof typeof extensionsMap]};base64,${fileData.content}`;\n } else {\n return fileData.download_url;\n }\n }\n}\n"],"names":["GithubProvider","BaseProvider","type","owner","repo","ref","token","pathname","fetcher","constructor","sourceRoot","fetch","super","groups","this","parseUri","Error","filesPromise","loadTree","getPageSourcePathname","uri","endsWith","fullUri","split","filter","Boolean","join","load","url","URL","headers","Headers","set","searchParams","resp","toString","ok","statusText","text","pathnameClean","replace","fileTree","json","tree","reduce","acc","item","path","startsWith","match","clientUrl","getFileUrl","origClientPath","normalizePathname","substring","length","clientPath","docs","push","origPath","structures","sort","a","b","localeCompare","getEditUri","getLastModifiedDate","commit","committer","date","getFileSrc","href","filePath","fileData","download_url","get","ext","parse","extensionsMap","content"],"mappings":"4LAOM,MAAOA,UAAuBC,EACvBC,KAAO,SAEhBC,MAEAC,KAEAC,IAEAC,MAEAC,SAEAC,QAEA,WAAAC,CAAYC,EAAoBF,EAAmBG,MAAOL,GACtDM,MAAMF,GAEN,MAAMG,EAASC,KAAKC,SAASL,GAC7B,IAAKG,EACD,MAAM,IAAIG,MAAM,iBAAiBN,MAGrC,MAAMP,MAAEA,EAAKC,KAAEA,EAAIC,IAAEA,EAAM,OAAME,SAAEA,EAAW,IAAOM,EACrDC,KAAKX,MAAQA,EACbW,KAAKV,KAAOA,EACZU,KAAKT,IAAMA,EACXS,KAAKR,MAAQA,EACbQ,KAAKP,SAAWA,EAChBO,KAAKN,QAAUA,EACfM,KAAKG,aAAeH,KAAKI,SAASX,EACtC,CAEA,2BAAMY,CAAsBC,GACxB,GAAIN,KAAKP,SAASc,SAAS,QAAUP,KAAKP,SAASc,SAAS,QACxD,OAAOP,KAAKP,SAEhB,MACMe,EADW,IAAKR,KAAKP,UAAUgB,MAAM,MAAQ,MAAQH,EAAIG,MAAM,MAAMC,OAAOC,SACzDC,KAAK,KAC9B,OAAOd,MAAMO,sBAAsBC,EAAKE,EAC5C,CAEA,UAAMK,CAAKP,GACP,MAAMb,QAAiBO,KAAKK,sBAAsBC,GAClD,IAAKb,EACD,MAAM,IAAIS,MACN,6BAA6BI,6BAA+BN,KAAKX,SAASW,KAAKV,aAAaU,KAAKT,QAIzG,MAAMuB,EAAM,IAAIC,IAAI,gCAAgCf,KAAKX,SAASW,KAAKV,iBAAiBG,KAClFuB,EAAU,IAAIC,QACpBD,EAAQE,IAAI,SAAU,mCAEtBJ,EAAIK,aAAaD,IAAI,MAAOlB,KAAKT,KAC7BS,KAAKR,OAAOwB,EAAQE,IAAI,gBAAiB,UAAUlB,KAAKR,SAE5D,MAAM4B,QAAapB,KAAKN,QAAQoB,EAAIO,WAAY,CAAEL,YAClD,IAAKI,EAAKE,GACN,MAAM,IAAIpB,MACN,iBAAiBI,uCAAyCN,KAAKX,SAASW,KAAKV,aAAaU,KAAKT,SAAS6B,EAAKG,cAIrH,aADsBH,EAAKI,MAE/B,CAEQ,cAAMpB,CAASX,GACnB,MAAMgC,EAAgBhC,GAAUiC,QAAQ,MAAO,IACzCZ,EAAM,IAAIC,IACZ,gCAAgCf,KAAKX,SAASW,KAAKV,kBAAkBU,KAAKT,sBAExEyB,EAAU,IAAIC,QACpBD,EAAQE,IAAI,SAAU,mCAElBlB,KAAKR,OAAOwB,EAAQE,IAAI,gBAAiB,UAAUlB,KAAKR,SAE5D,MAAM4B,QAAapB,KAAKN,QAAQoB,EAAIO,WAAY,CAAEL,YAClD,IAAKI,EAAKE,GACN,MAAM,IAAIpB,MAAM,sBAAwBkB,EAAKG,YAEjD,MAEMI,SAFcP,EAAKQ,QAEHC,KAAKC,OACvB,CAACC,EAAKC,KACF,IAAKP,GAAkBA,GAAiBO,EAAKC,KAAKC,WAAWT,GACzD,GAAIO,EAAKC,KAAKE,MAAM,eAAgB,CAChC,MAAMC,EAAYC,EAAWL,EAAKC,MAC5BK,EAAiBC,EAAkBH,EAAUI,UAAUf,GAAegB,QAAU,IAChFC,EAAaJ,EAAeZ,QAAQ,mBAAoB,OAE9DK,EAAIY,KAAKC,KAAK,CACVC,SAAU,IAAMb,EAAKC,KACrBS,aACAJ,kBAER,MAAWN,EAAKC,KAAK1B,SAAS,mBAC1BwB,EAAIe,WAAWF,KAAKZ,EAAKC,MAGjC,OAAOF,GAEX,CAAEY,KAAM,GAAIG,WAAY,KAI5B,OAFAnB,EAASgB,KAAKI,KAAK,CAACC,EAAGC,IAAMD,EAAEV,eAAeY,cAAcD,EAAEX,iBAC9DtC,KAAKG,aAAewB,EACbA,CACX,CAEQ,QAAA1B,CAASK,GACb,MAAM6B,EAAQ7B,EAAI6B,MACd,gHAEEpC,EAASoC,GAAOpC,OACtB,OAAOA,GAAU,IACrB,CAEA,gBAAMoD,CAAW7C,GACb,MAAMb,QAAiBO,KAAKK,sBAAsBC,GAClD,OAAKb,EAIE,sBAAsBO,KAAKX,SAASW,KAAKV,aAAaU,KAAKT,MAAME,IAH7D,IAIf,CAEA,yBAAM2D,CAAoB9C,GACtB,MAAMb,QAAiBO,KAAKK,sBAAsBC,GAClD,IAAKb,EACD,OAAO,KAGX,MAAMqB,EAAM,IAAIC,IAAI,gCAAgCf,KAAKX,SAASW,KAAKV,kCACvEwB,EAAIK,aAAaD,IAAI,OAAQzB,GAC7BqB,EAAIK,aAAaD,IAAI,MAAOlB,KAAKT,KAEjC,MAAMyB,EAAU,IAAIC,QAChBjB,KAAKR,OAAOwB,EAAQE,IAAI,gBAAiB,UAAUlB,KAAKR,SAE5D,MAAM4B,QAAavB,MAAMiB,EAAK,CAAEE,YAChC,IAAKI,EAAKE,GACN,MAAM,IAAIpB,MACN,wCAAwCI,+BAAiCN,KAAKX,SAASW,KAAKV,aAAaU,KAAKT,SAAS6B,EAAKG,cAKpI,aADmBH,EAAKQ,QACZ,GAAGyB,OAAOC,UAAUC,IACpC,CAEA,gBAAMC,CAAWlD,EAAamD,GAC1B,GAAIA,EAAKtB,MAAM,eAAgB,OAAOsB,EAEtC,MAAMC,EAAWD,EAAKvB,WAAW,KAAOuB,EAAOnD,EAAIoB,QAAQ,MAAO,IAAM,IAAM+B,EACxE3C,EAAM,IAAIC,IAAI,gCAAgCf,KAAKX,SAASW,KAAKV,gBAAgBoE,KACvF5C,EAAIK,aAAaD,IAAI,MAAOlB,KAAKT,KAEjC,MAAMyB,EAAU,IAAIC,QAChBjB,KAAKR,OAAOwB,EAAQE,IAAI,gBAAiB,UAAUlB,KAAKR,SAE5D,MAAM4B,QAAapB,KAAKN,QAAQoB,EAAIO,WAAY,CAAEL,YAElD,IAAKI,EAAKE,GACN,MAAM,IAAIpB,MAAM,uBAAyBkB,EAAKG,YAGlD,MAAMoC,QAAiBvC,EAAKQ,OAG5B,GAFe,IAAIb,IAAI4C,EAASC,cAErBzC,aAAa0C,IAAI,SAAU,CAClC,MAAMC,IAAEA,GAAQ7B,EAAK8B,MAAML,GAC3B,MAAO,QAAQM,EAAcF,aAA6CH,EAASM,SACvF,CACI,OAAON,EAASC,YAExB"}
@@ -0,0 +1,3 @@
1
+ export { GithubProvider } from "./github";
2
+ export { FileSystemProvider } from "./file-system";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type BaseProvider } from "../providers/base";
2
+ export type RobinProps = {
3
+ [key: string]: string | true;
4
+ };
5
+ export type Components = {
6
+ [key: string]: (props: any) => React.ReactNode | Promise<React.ReactNode>;
7
+ };
8
+ export type DocsTree = {
9
+ origPath: string;
10
+ clientPath: string;
11
+ origClientPath: string;
12
+ }[];
13
+ export type BranchFiles = {
14
+ docs: DocsTree;
15
+ structures: string[];
16
+ };
17
+ export type Fetcher<T = Response> = (input: RequestInfo | URL, init?: RequestInit) => Promise<T>;
18
+ export type Configuration = {
19
+ sourceRoot?: string;
20
+ gitToken?: string;
21
+ provider?: BaseProvider;
22
+ basePath?: string;
23
+ fetcher?: Fetcher;
24
+ spreadedLevel?: number;
25
+ };
26
+ export type Crumbs = string[];
27
+ export type Page = {
28
+ title: string;
29
+ uri: string;
30
+ configuration: Configuration;
31
+ crumbs: Crumbs;
32
+ origPath: string;
33
+ };
34
+ export type Pages = {
35
+ [key: string]: Page;
36
+ };
37
+ export type Breadcrumbs = {
38
+ pathname: string;
39
+ title: string;
40
+ }[];
41
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/core/types/content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IAErB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;CAC7E,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC;AAE1F,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,QAAQ,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEjG,MAAM,MAAM,aAAa,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;AAE9B,MAAM,MAAM,IAAI,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type SearchItem = {
2
+ title: string;
3
+ href: string;
4
+ description?: string;
5
+ };
6
+ export type SearchResults = SearchItem[];
7
+ export type Searcher = (search: string, abortController: AbortController) => Promise<SearchItem[]>;
8
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/core/types/search.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,MAAM,MAAM,aAAa,GAAG,UAAU,EAAE,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type Configuration } from "./content";
2
+ export type DocItem = {
3
+ type?: "heading" | "row";
4
+ title: string;
5
+ hidden?: boolean;
6
+ items?: DocItem[] | null;
7
+ href?: string;
8
+ configuration?: Configuration;
9
+ } | {
10
+ type: "separator";
11
+ } | "auto";
12
+ export type Structure = {
13
+ configuration?: Configuration;
14
+ items?: DocItem[] | "auto";
15
+ };
16
+ //# sourceMappingURL=structure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structure.d.ts","sourceRoot":"","sources":["../../../src/core/types/structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,OAAO,GACb;IACI,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,GACD;IACI,IAAI,EAAE,WAAW,CAAC;CACrB,GACD,MAAM,CAAC;AAEb,MAAM,MAAM,SAAS,GAAG;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,49 @@
1
+ export type ThemeColors = {
2
+ primary?: {
3
+ "50": string;
4
+ "100": string;
5
+ "200": string;
6
+ "300": string;
7
+ "400": string;
8
+ "500": string;
9
+ "600": string;
10
+ "700": string;
11
+ "800": string;
12
+ "900": string;
13
+ "950": string;
14
+ };
15
+ secondary?: {
16
+ "50": string;
17
+ "100": string;
18
+ "200": string;
19
+ "300": string;
20
+ "400": string;
21
+ "500": string;
22
+ "600": string;
23
+ "700": string;
24
+ "800": string;
25
+ "900": string;
26
+ "950": string;
27
+ };
28
+ neutral?: {
29
+ "50": string;
30
+ "100": string;
31
+ "200": string;
32
+ "300": string;
33
+ "400": string;
34
+ "500": string;
35
+ "600": string;
36
+ "700": string;
37
+ "800": string;
38
+ "900": string;
39
+ "950": string;
40
+ };
41
+ body?: {
42
+ "50": string;
43
+ "950": string;
44
+ };
45
+ };
46
+ export type Theme = {
47
+ colors?: ThemeColors;
48
+ };
49
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/core/types/theme.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Token } from "marked";
2
+ export declare const parseTokenText: (token: Token) => string;
3
+ //# sourceMappingURL=content-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/content-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,KAAG,MAgB7C,CAAC"}
@@ -0,0 +1,2 @@
1
+ const t=n=>n?"tokens"in n?n.tokens?.map(n=>t(n)).join("")||"":"text"in n?n.text:"raw"in n?n.raw:"":"";export{t as parseTokenText};
2
+ //# sourceMappingURL=content-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-tools.js","sources":["../../../src/core/utils/content-tools.ts"],"sourcesContent":["import { type Token } from \"marked\";\n\nexport const parseTokenText = (token: Token): string => {\n if (!token) return \"\";\n\n if (\"tokens\" in token) {\n return token.tokens?.map((el) => parseTokenText(el)).join(\"\") || \"\";\n }\n\n if (\"text\" in token) {\n return token.text;\n }\n\n if (\"raw\" in token) {\n return token.raw;\n }\n\n return \"\";\n};\n"],"names":["parseTokenText","token","tokens","map","el","join","text","raw"],"mappings":"AAEO,MAAMA,EAAkBC,GACtBA,EAED,WAAYA,EACLA,EAAMC,QAAQC,IAAKC,GAAOJ,EAAeI,IAAKC,KAAK,KAAO,GAGjE,SAAUJ,EACHA,EAAMK,KAGb,QAASL,EACFA,EAAMM,IAGV,GAdY"}
@@ -0,0 +1,3 @@
1
+ import { type Searcher } from "../types/search";
2
+ export declare const createBaseSearcher: (searchUri: string) => Searcher;
3
+ //# sourceMappingURL=create-base-searcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-base-searcher.d.ts","sourceRoot":"","sources":["../../../src/core/utils/create-base-searcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,kBAAkB,GAC1B,WAAW,MAAM,KAAG,QAUpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ const r=r=>(t,n)=>{const o=new URLSearchParams([["s",t]]);return fetch(`${r}?${o.toString()}`,{signal:n.signal}).then(r=>r.json()).catch(r=>{if("AbortError"!==r.name)throw r})};export{r as createBaseSearcher};
2
+ //# sourceMappingURL=create-base-searcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-base-searcher.js","sources":["../../../src/core/utils/create-base-searcher.ts"],"sourcesContent":["import { type Searcher } from \"../types/search\";\n\nexport const createBaseSearcher =\n (searchUri: string): Searcher =>\n (search: string, abortController: AbortController) => {\n const qs = new URLSearchParams([[\"s\", search]]);\n return fetch(`${searchUri}?${qs.toString()}`, { signal: abortController.signal })\n .then((response) => response.json())\n .catch((error) => {\n if (error.name !== \"AbortError\") {\n throw error;\n }\n });\n };\n"],"names":["createBaseSearcher","searchUri","search","abortController","qs","URLSearchParams","fetch","toString","signal","then","response","json","catch","error","name"],"mappings":"AAEO,MAAMA,EACRC,GACD,CAACC,EAAgBC,KACb,MAAMC,EAAK,IAAIC,gBAAgB,CAAC,CAAC,IAAKH,KACtC,OAAOI,MAAM,GAAGL,KAAaG,EAAGG,aAAc,CAAEC,OAAQL,EAAgBK,SACnEC,KAAMC,GAAaA,EAASC,QAC5BC,MAAOC,IACJ,GAAmB,eAAfA,EAAMC,KACN,MAAMD"}
@@ -0,0 +1,3 @@
1
+ import { GithubProvider, FileSystemProvider } from "../providers";
2
+ export declare const detectProvider: (uri: string) => typeof FileSystemProvider | typeof GithubProvider;
3
+ //# sourceMappingURL=detect-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-provider.d.ts","sourceRoot":"","sources":["../../../src/core/utils/detect-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElE,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,sDASzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{GithubProvider as r}from"../providers/github.js";import{FileSystemProvider as t}from"../providers/file-system.js";const s=s=>{if(s.startsWith("https://github.com/"))return r;if(s.match(/https?:\/\//))throw new Error(`Unknown uri "${s}". Please use custom provider or create issue`);return t};export{s as detectProvider};
2
+ //# sourceMappingURL=detect-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-provider.js","sources":["../../../src/core/utils/detect-provider.ts"],"sourcesContent":["import { GithubProvider, FileSystemProvider } from \"../providers\";\n\nexport const detectProvider = (uri: string) => {\n if (uri.startsWith(\"https://github.com/\")) {\n return GithubProvider;\n }\n if (uri.match(/https?:\\/\\//)) {\n throw new Error(`Unknown uri \"${uri}\". Please use custom provider or create issue`);\n }\n\n return FileSystemProvider;\n};\n"],"names":["detectProvider","uri","startsWith","GithubProvider","match","Error","FileSystemProvider"],"mappings":"yHAEO,MAAMA,EAAkBC,IAC3B,GAAIA,EAAIC,WAAW,uBACf,OAAOC,EAEX,GAAIF,EAAIG,MAAM,eACV,MAAM,IAAIC,MAAM,gBAAgBJ,kDAGpC,OAAOK"}
@@ -0,0 +1,10 @@
1
+ import { type Configuration } from "../types/content";
2
+ export declare const getConfiguration: (currentConfiguration: Configuration, previousConfiguration?: Configuration) => {
3
+ sourceRoot: string | undefined;
4
+ provider: import("../providers/base").BaseProvider | undefined;
5
+ basePath: string | undefined;
6
+ gitToken: string | undefined;
7
+ fetcher: typeof fetch;
8
+ spreadedLevel: number | undefined;
9
+ };
10
+ //# sourceMappingURL=get-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../../src/core/utils/get-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,gBAAgB,GAAI,sBAAsB,aAAa,EAAE,wBAAuB,aAAkB;;;;;;;CAmC9G,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{detectProvider as e}from"./detect-provider.js";const o=(o,r={})=>{let t=r.basePath,d=r.gitToken,s=r.spreadedLevel,i=r.sourceRoot,c=r.fetcher||fetch,v=r.provider;if(o.basePath&&(t=o.basePath),o.gitToken&&(d=o.gitToken),void 0!==o.spreadedLevel&&(s=o.spreadedLevel),void 0!==o.sourceRoot&&(i=o.sourceRoot),void 0!==o.fetcher&&(c=o.fetcher||fetch),o.provider)v=o.provider;else if((o.sourceRoot&&o.sourceRoot!==r.sourceRoot||!v)&&i){v=new(o.provider||e(i))(i,c,d)}return{sourceRoot:i,provider:v,basePath:t,gitToken:d,fetcher:c,spreadedLevel:s}};export{o as getConfiguration};
2
+ //# sourceMappingURL=get-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-configuration.js","sources":["../../../src/core/utils/get-configuration.ts"],"sourcesContent":["import { type Configuration } from \"../types/content\";\nimport { detectProvider } from \"./detect-provider\";\n\nexport const getConfiguration = (currentConfiguration: Configuration, previousConfiguration: Configuration = {}) => {\n let basePath = previousConfiguration.basePath;\n let gitToken = previousConfiguration.gitToken;\n let spreadedLevel = previousConfiguration.spreadedLevel;\n let sourceRoot = previousConfiguration.sourceRoot;\n let fetcher = previousConfiguration.fetcher || fetch;\n let provider = previousConfiguration.provider;\n\n if (currentConfiguration.basePath) {\n basePath = currentConfiguration.basePath;\n }\n if (currentConfiguration.gitToken) {\n gitToken = currentConfiguration.gitToken;\n }\n if (currentConfiguration.spreadedLevel !== undefined) {\n spreadedLevel = currentConfiguration.spreadedLevel;\n }\n if (currentConfiguration.sourceRoot !== undefined) {\n sourceRoot = currentConfiguration.sourceRoot;\n }\n if (currentConfiguration.fetcher !== undefined) {\n fetcher = currentConfiguration.fetcher || fetch;\n }\n if (currentConfiguration.provider) {\n provider = currentConfiguration.provider;\n } else if (\n (currentConfiguration.sourceRoot && currentConfiguration.sourceRoot !== previousConfiguration.sourceRoot) ||\n !provider\n ) {\n if (sourceRoot) {\n const Provider = currentConfiguration.provider || detectProvider(sourceRoot);\n provider = new Provider(sourceRoot, fetcher, gitToken);\n }\n }\n return { sourceRoot, provider, basePath, gitToken, fetcher, spreadedLevel };\n};\n"],"names":["getConfiguration","currentConfiguration","previousConfiguration","basePath","gitToken","spreadedLevel","sourceRoot","fetcher","fetch","provider","undefined","detectProvider"],"mappings":"sDAGO,MAAMA,EAAmB,CAACC,EAAqCC,EAAuC,MACzG,IAAIC,EAAWD,EAAsBC,SACjCC,EAAWF,EAAsBE,SACjCC,EAAgBH,EAAsBG,cACtCC,EAAaJ,EAAsBI,WACnCC,EAAUL,EAAsBK,SAAWC,MAC3CC,EAAWP,EAAsBO,SAiBrC,GAfIR,EAAqBE,WACrBA,EAAWF,EAAqBE,UAEhCF,EAAqBG,WACrBA,EAAWH,EAAqBG,eAEOM,IAAvCT,EAAqBI,gBACrBA,EAAgBJ,EAAqBI,oBAEDK,IAApCT,EAAqBK,aACrBA,EAAaL,EAAqBK,iBAEDI,IAAjCT,EAAqBM,UACrBA,EAAUN,EAAqBM,SAAWC,OAE1CP,EAAqBQ,SACrBA,EAAWR,EAAqBQ,cAC7B,IACFR,EAAqBK,YAAcL,EAAqBK,aAAeJ,EAAsBI,aAC7FG,IAEGH,EAAY,CAEZG,EAAW,IADMR,EAAqBQ,UAAYE,EAAeL,IACzCA,EAAYC,EAASH,EACjD,CAEJ,MAAO,CAAEE,aAAYG,WAAUN,WAAUC,WAAUG,UAASF"}
@@ -0,0 +1,13 @@
1
+ import { type BaseProvider } from "../providers/base";
2
+ type GetMetadataOptions = {
3
+ uri: string;
4
+ provider?: BaseProvider;
5
+ content?: undefined;
6
+ } | {
7
+ uri?: undefined;
8
+ provider?: undefined;
9
+ content: string;
10
+ };
11
+ export declare const getMetadata: (opts: GetMetadataOptions) => Promise<Record<string, string>>;
12
+ export {};
13
+ //# sourceMappingURL=get-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-metadata.d.ts","sourceRoot":"","sources":["../../../src/core/utils/get-metadata.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,KAAK,kBAAkB,GACjB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GAC7D;IAAE,GAAG,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,eAAO,MAAM,WAAW,GAAU,MAAM,kBAAkB,oCAsCzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import t from"gray-matter";import{lexer as o}from"marked";import{setProperty as r}from"dot-prop";import{loadContent as e}from"./load-content.js";import{parseTokenText as n}from"./content-tools.js";const i=async i=>{const{uri:a,provider:s,content:c}=i,{data:d}=a?await e(a,s):{data:c};if(!d)throw new Error("Robindoc: Please provide content or valid URI");const{content:p,data:m}=t(d),f=o(p),l=Object.entries(f.links).reduce((t,o)=>{const[e,n]=o,i=n.title,a=e.startsWith("robin.")&&e.substring(6);return i&&a&&r(t,a,i),t},m);if(!l.title){const t=f.find(t=>"heading"===t.type&&1===t.depth);t?.text&&(l.title=n(t))}if(!l.description){const t=f.find(t=>"paragraph"===t.type);t?.text&&(l.description=n(t))}return l};export{i as getMetadata};
2
+ //# sourceMappingURL=get-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-metadata.js","sources":["../../../src/core/utils/get-metadata.ts"],"sourcesContent":["import matter from \"gray-matter\";\nimport { lexer, Tokens } from \"marked\";\nimport { setProperty } from \"dot-prop\";\n\nimport { type BaseProvider } from \"../providers/base\";\nimport { loadContent } from \"./load-content\";\nimport { parseTokenText } from \"./content-tools\";\n\ntype GetMetadataOptions =\n | { uri: string; provider?: BaseProvider; content?: undefined }\n | { uri?: undefined; provider?: undefined; content: string };\n\nexport const getMetadata = async (opts: GetMetadataOptions) => {\n const { uri, provider, content } = opts;\n const { data } = uri ? await loadContent(uri, provider) : { data: content };\n\n if (!data) {\n throw new Error(\"Robindoc: Please provide content or valid URI\");\n }\n\n const { content: matterContent, data: matterData } = matter(data);\n const tree = lexer(matterContent);\n\n const robinData = Object.entries(tree.links).reduce<Record<string, string>>((acc, cur) => {\n const [key, value] = cur;\n const content = value.title;\n const metaKey = key.startsWith(\"robin.\") && key.substring(6);\n\n if (content && metaKey) {\n setProperty(acc, metaKey, content);\n }\n\n return acc;\n }, matterData);\n\n if (!robinData.title) {\n const pageHeading = tree.find((el) => el.type === \"heading\" && el.depth === 1) as Tokens.Heading | undefined;\n if (pageHeading?.text) {\n robinData.title = parseTokenText(pageHeading);\n }\n }\n\n if (!robinData.description) {\n const firstParagraph = tree.find((el) => el.type === \"paragraph\") as Tokens.Heading | undefined;\n if (firstParagraph?.text) {\n robinData.description = parseTokenText(firstParagraph);\n }\n }\n\n return robinData;\n};\n"],"names":["getMetadata","async","opts","uri","provider","content","data","loadContent","Error","matterContent","matterData","matter","tree","lexer","robinData","Object","entries","links","reduce","acc","cur","key","value","title","metaKey","startsWith","substring","setProperty","pageHeading","find","el","type","depth","text","parseTokenText","description","firstParagraph"],"mappings":"2MAYaA,EAAcC,MAAOC,IAC9B,MAAMC,IAAEA,EAAGC,SAAEA,EAAQC,QAAEA,GAAYH,GAC7BI,KAAEA,GAASH,QAAYI,EAAYJ,EAAKC,GAAY,CAAEE,KAAMD,GAElE,IAAKC,EACD,MAAM,IAAIE,MAAM,iDAGpB,MAAQH,QAASI,EAAeH,KAAMI,GAAeC,EAAOL,GACtDM,EAAOC,EAAMJ,GAEbK,EAAYC,OAAOC,QAAQJ,EAAKK,OAAOC,OAA+B,CAACC,EAAKC,KAC9E,MAAOC,EAAKC,GAASF,EACff,EAAUiB,EAAMC,MAChBC,EAAUH,EAAII,WAAW,WAAaJ,EAAIK,UAAU,GAM1D,OAJIrB,GAAWmB,GACXG,EAAYR,EAAKK,EAASnB,GAGvBc,GACRT,GAEH,IAAKI,EAAUS,MAAO,CAClB,MAAMK,EAAchB,EAAKiB,KAAMC,GAAmB,YAAZA,EAAGC,MAAmC,IAAbD,EAAGE,OAC9DJ,GAAaK,OACbnB,EAAUS,MAAQW,EAAeN,GAEzC,CAEA,IAAKd,EAAUqB,YAAa,CACxB,MAAMC,EAAiBxB,EAAKiB,KAAMC,GAAmB,cAAZA,EAAGC,MACxCK,GAAgBH,OAChBnB,EAAUqB,YAAcD,EAAeE,GAE/C,CAEA,OAAOtB"}