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.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/lib/assets/index.d.ts +2 -0
- package/lib/assets/index.d.ts.map +1 -0
- package/lib/assets/index.js +2 -0
- package/lib/assets/index.js.map +1 -0
- package/lib/components/blocks/anchor-heading/index.d.ts +9 -0
- package/lib/components/blocks/anchor-heading/index.d.ts.map +1 -0
- package/lib/components/blocks/anchor-heading/index.js +3 -0
- package/lib/components/blocks/anchor-heading/index.js.map +1 -0
- package/lib/components/blocks/breadcrumbs/index.d.ts +9 -0
- package/lib/components/blocks/breadcrumbs/index.d.ts.map +1 -0
- package/lib/components/blocks/breadcrumbs/index.js +2 -0
- package/lib/components/blocks/breadcrumbs/index.js.map +1 -0
- package/lib/components/blocks/code-section/index.d.ts +8 -0
- package/lib/components/blocks/code-section/index.d.ts.map +1 -0
- package/lib/components/blocks/code-section/index.js +2 -0
- package/lib/components/blocks/code-section/index.js.map +1 -0
- package/lib/components/blocks/contents/index.d.ts +19 -0
- package/lib/components/blocks/contents/index.d.ts.map +1 -0
- package/lib/components/blocks/contents/index.js +3 -0
- package/lib/components/blocks/contents/index.js.map +1 -0
- package/lib/components/blocks/header-menu/index.d.ts +10 -0
- package/lib/components/blocks/header-menu/index.d.ts.map +1 -0
- package/lib/components/blocks/header-menu/index.js +3 -0
- package/lib/components/blocks/header-menu/index.js.map +1 -0
- package/lib/components/blocks/header-social/index.d.ts +9 -0
- package/lib/components/blocks/header-social/index.d.ts.map +1 -0
- package/lib/components/blocks/header-social/index.js +2 -0
- package/lib/components/blocks/header-social/index.js.map +1 -0
- package/lib/components/blocks/last-modified/index.d.ts +7 -0
- package/lib/components/blocks/last-modified/index.d.ts.map +1 -0
- package/lib/components/blocks/last-modified/index.js +3 -0
- package/lib/components/blocks/last-modified/index.js.map +1 -0
- package/lib/components/blocks/meta/index.d.ts +21 -0
- package/lib/components/blocks/meta/index.d.ts.map +1 -0
- package/lib/components/blocks/nav-content-link/index.d.ts +6 -0
- package/lib/components/blocks/nav-content-link/index.d.ts.map +1 -0
- package/lib/components/blocks/nav-content-link/index.js +3 -0
- package/lib/components/blocks/nav-content-link/index.js.map +1 -0
- package/lib/components/blocks/nav-link/index.d.ts +9 -0
- package/lib/components/blocks/nav-link/index.d.ts.map +1 -0
- package/lib/components/blocks/nav-link/index.js +3 -0
- package/lib/components/blocks/nav-link/index.js.map +1 -0
- package/lib/components/blocks/no-js/index.d.ts +3 -0
- package/lib/components/blocks/no-js/index.d.ts.map +1 -0
- package/lib/components/blocks/no-js/index.js +2 -0
- package/lib/components/blocks/no-js/index.js.map +1 -0
- package/lib/components/blocks/pagination/index.d.ts +20 -0
- package/lib/components/blocks/pagination/index.d.ts.map +1 -0
- package/lib/components/blocks/pagination/index.js +2 -0
- package/lib/components/blocks/pagination/index.js.map +1 -0
- package/lib/components/blocks/search/index.d.ts +12 -0
- package/lib/components/blocks/search/index.d.ts.map +1 -0
- package/lib/components/blocks/search/index.js +3 -0
- package/lib/components/blocks/search/index.js.map +1 -0
- package/lib/components/blocks/search/search-modal/index.d.ts +16 -0
- package/lib/components/blocks/search/search-modal/index.d.ts.map +1 -0
- package/lib/components/blocks/search/search-modal/index.js +3 -0
- package/lib/components/blocks/search/search-modal/index.js.map +1 -0
- package/lib/components/blocks/section-dropdown/index.d.ts +15 -0
- package/lib/components/blocks/section-dropdown/index.d.ts.map +1 -0
- package/lib/components/blocks/section-dropdown/index.js +2 -0
- package/lib/components/blocks/section-dropdown/index.js.map +1 -0
- package/lib/components/blocks/theme-detector/index.d.ts +3 -0
- package/lib/components/blocks/theme-detector/index.d.ts.map +1 -0
- package/lib/components/blocks/theme-detector/index.js +2 -0
- package/lib/components/blocks/theme-detector/index.js.map +1 -0
- package/lib/components/blocks/theme-styles/index.d.ts +7 -0
- package/lib/components/blocks/theme-styles/index.d.ts.map +1 -0
- package/lib/components/blocks/theme-styles/index.js +2 -0
- package/lib/components/blocks/theme-styles/index.js.map +1 -0
- package/lib/components/blocks/theme-switcher/index.d.ts +14 -0
- package/lib/components/blocks/theme-switcher/index.d.ts.map +1 -0
- package/lib/components/blocks/theme-switcher/index.js +3 -0
- package/lib/components/blocks/theme-switcher/index.js.map +1 -0
- package/lib/components/contexts/contents/context.d.ts +3 -0
- package/lib/components/contexts/contents/context.d.ts.map +1 -0
- package/lib/components/contexts/contents/context.js +3 -0
- package/lib/components/contexts/contents/context.js.map +1 -0
- package/lib/components/contexts/contents/provider.d.ts +3 -0
- package/lib/components/contexts/contents/provider.d.ts.map +1 -0
- package/lib/components/contexts/contents/provider.js +3 -0
- package/lib/components/contexts/contents/provider.js.map +1 -0
- package/lib/components/contexts/contents/use-heading-index.d.ts +2 -0
- package/lib/components/contexts/contents/use-heading-index.d.ts.map +1 -0
- package/lib/components/contexts/contents/use-heading-index.js +3 -0
- package/lib/components/contexts/contents/use-heading-index.js.map +1 -0
- package/lib/components/contexts/contents/use-heading-register.d.ts +2 -0
- package/lib/components/contexts/contents/use-heading-register.d.ts.map +1 -0
- package/lib/components/contexts/contents/use-heading-register.js +3 -0
- package/lib/components/contexts/contents/use-heading-register.js.map +1 -0
- package/lib/components/contexts/navigate/context.d.ts +3 -0
- package/lib/components/contexts/navigate/context.d.ts.map +1 -0
- package/lib/components/contexts/navigate/context.js +3 -0
- package/lib/components/contexts/navigate/context.js.map +1 -0
- package/lib/components/contexts/navigate/provider.d.ts +3 -0
- package/lib/components/contexts/navigate/provider.d.ts.map +1 -0
- package/lib/components/contexts/navigate/provider.js +3 -0
- package/lib/components/contexts/navigate/provider.js.map +1 -0
- package/lib/components/contexts/navigate/types.d.ts +9 -0
- package/lib/components/contexts/navigate/types.d.ts.map +1 -0
- package/lib/components/contexts/navigate/use-navigate.d.ts +7 -0
- package/lib/components/contexts/navigate/use-navigate.d.ts.map +1 -0
- package/lib/components/contexts/navigate/use-navigate.js +3 -0
- package/lib/components/contexts/navigate/use-navigate.js.map +1 -0
- package/lib/components/contexts/reference/context.d.ts +2 -0
- package/lib/components/contexts/reference/context.d.ts.map +1 -0
- package/lib/components/contexts/reference/context.js +3 -0
- package/lib/components/contexts/reference/context.js.map +1 -0
- package/lib/components/contexts/reference/provider.d.ts +5 -0
- package/lib/components/contexts/reference/provider.d.ts.map +1 -0
- package/lib/components/contexts/reference/provider.js +3 -0
- package/lib/components/contexts/reference/provider.js.map +1 -0
- package/lib/components/contexts/reference/use-reference.d.ts +2 -0
- package/lib/components/contexts/reference/use-reference.d.ts.map +1 -0
- package/lib/components/contexts/reference/use-reference.js +3 -0
- package/lib/components/contexts/reference/use-reference.js.map +1 -0
- package/lib/components/elements/article/document.d.ts +27 -0
- package/lib/components/elements/article/document.d.ts.map +1 -0
- package/lib/components/elements/article/document.js +2 -0
- package/lib/components/elements/article/document.js.map +1 -0
- package/lib/components/elements/article/index.d.ts +33 -0
- package/lib/components/elements/article/index.d.ts.map +1 -0
- package/lib/components/elements/article/index.js +2 -0
- package/lib/components/elements/article/index.js.map +1 -0
- package/lib/components/elements/article/types.d.ts +5 -0
- package/lib/components/elements/article/types.d.ts.map +1 -0
- package/lib/components/elements/article/utils.d.ts +48 -0
- package/lib/components/elements/article/utils.d.ts.map +1 -0
- package/lib/components/elements/article/utils.js +2 -0
- package/lib/components/elements/article/utils.js.map +1 -0
- package/lib/components/elements/blog-container/index.d.ts +4 -0
- package/lib/components/elements/blog-container/index.d.ts.map +1 -0
- package/lib/components/elements/blog-container/index.js +2 -0
- package/lib/components/elements/blog-container/index.js.map +1 -0
- package/lib/components/elements/docs-container/index.d.ts +4 -0
- package/lib/components/elements/docs-container/index.d.ts.map +1 -0
- package/lib/components/elements/docs-container/index.js +2 -0
- package/lib/components/elements/docs-container/index.js.map +1 -0
- package/lib/components/elements/footer/index.d.ts +8 -0
- package/lib/components/elements/footer/index.d.ts.map +1 -0
- package/lib/components/elements/footer/index.js +2 -0
- package/lib/components/elements/footer/index.js.map +1 -0
- package/lib/components/elements/header/index.d.ts +31 -0
- package/lib/components/elements/header/index.d.ts.map +1 -0
- package/lib/components/elements/header/index.js +2 -0
- package/lib/components/elements/header/index.js.map +1 -0
- package/lib/components/elements/keylink-to-content/index.d.ts +10 -0
- package/lib/components/elements/keylink-to-content/index.d.ts.map +1 -0
- package/lib/components/elements/keylink-to-content/index.js +2 -0
- package/lib/components/elements/keylink-to-content/index.js.map +1 -0
- package/lib/components/elements/keylink-to-navigation/index.d.ts +10 -0
- package/lib/components/elements/keylink-to-navigation/index.d.ts.map +1 -0
- package/lib/components/elements/keylink-to-navigation/index.js +2 -0
- package/lib/components/elements/keylink-to-navigation/index.js.map +1 -0
- package/lib/components/elements/page-container/index.d.ts +4 -0
- package/lib/components/elements/page-container/index.d.ts.map +1 -0
- package/lib/components/elements/page-container/index.js +2 -0
- package/lib/components/elements/page-container/index.js.map +1 -0
- package/lib/components/elements/robin-provider/index.d.ts +8 -0
- package/lib/components/elements/robin-provider/index.d.ts.map +1 -0
- package/lib/components/elements/robin-provider/index.js +2 -0
- package/lib/components/elements/robin-provider/index.js.map +1 -0
- package/lib/components/elements/sidebar/index.d.ts +18 -0
- package/lib/components/elements/sidebar/index.d.ts.map +1 -0
- package/lib/components/elements/sidebar/index.js +2 -0
- package/lib/components/elements/sidebar/index.js.map +1 -0
- package/lib/components/elements/sidebar/sidebar-drop/index.d.ts +9 -0
- package/lib/components/elements/sidebar/sidebar-drop/index.d.ts.map +1 -0
- package/lib/components/elements/sidebar/sidebar-drop/index.js +3 -0
- package/lib/components/elements/sidebar/sidebar-drop/index.js.map +1 -0
- package/lib/components/elements/sidebar/sidebar-link/index.d.ts +12 -0
- package/lib/components/elements/sidebar/sidebar-link/index.d.ts.map +1 -0
- package/lib/components/elements/sidebar/sidebar-link/index.js +3 -0
- package/lib/components/elements/sidebar/sidebar-link/index.js.map +1 -0
- package/lib/components/elements/sidebar/sidebar-menu/index.d.ts +8 -0
- package/lib/components/elements/sidebar/sidebar-menu/index.d.ts.map +1 -0
- package/lib/components/elements/sidebar/sidebar-menu/index.js +3 -0
- package/lib/components/elements/sidebar/sidebar-menu/index.js.map +1 -0
- package/lib/components/elements/sidebar/tools.d.ts +7 -0
- package/lib/components/elements/sidebar/tools.d.ts.map +1 -0
- package/lib/components/elements/sidebar/tools.js +2 -0
- package/lib/components/elements/sidebar/tools.js.map +1 -0
- package/lib/components/elements/sidebar/types.d.ts +9 -0
- package/lib/components/elements/sidebar/types.d.ts.map +1 -0
- package/lib/components/ui/backdrop/index.d.ts +8 -0
- package/lib/components/ui/backdrop/index.d.ts.map +1 -0
- package/lib/components/ui/backdrop/index.js +3 -0
- package/lib/components/ui/backdrop/index.js.map +1 -0
- package/lib/components/ui/block/index.d.ts +8 -0
- package/lib/components/ui/block/index.d.ts.map +1 -0
- package/lib/components/ui/block/index.js +2 -0
- package/lib/components/ui/block/index.js.map +1 -0
- package/lib/components/ui/blockquote/data.d.ts +23 -0
- package/lib/components/ui/blockquote/data.d.ts.map +1 -0
- package/lib/components/ui/blockquote/data.js +2 -0
- package/lib/components/ui/blockquote/data.js.map +1 -0
- package/lib/components/ui/blockquote/icons.d.ts +7 -0
- package/lib/components/ui/blockquote/icons.d.ts.map +1 -0
- package/lib/components/ui/blockquote/icons.js +2 -0
- package/lib/components/ui/blockquote/icons.js.map +1 -0
- package/lib/components/ui/blockquote/index.d.ts +10 -0
- package/lib/components/ui/blockquote/index.d.ts.map +1 -0
- package/lib/components/ui/blockquote/index.js +2 -0
- package/lib/components/ui/blockquote/index.js.map +1 -0
- package/lib/components/ui/code-block/index.d.ts +11 -0
- package/lib/components/ui/code-block/index.d.ts.map +1 -0
- package/lib/components/ui/code-block/index.js +2 -0
- package/lib/components/ui/code-block/index.js.map +1 -0
- package/lib/components/ui/code-block/theme.d.ts +3 -0
- package/lib/components/ui/code-block/theme.d.ts.map +1 -0
- package/lib/components/ui/code-block/theme.js +2 -0
- package/lib/components/ui/code-block/theme.js.map +1 -0
- package/lib/components/ui/code-span/index.d.ts +9 -0
- package/lib/components/ui/code-span/index.d.ts.map +1 -0
- package/lib/components/ui/code-span/index.js +2 -0
- package/lib/components/ui/code-span/index.js.map +1 -0
- package/lib/components/ui/container/index.d.ts +8 -0
- package/lib/components/ui/container/index.d.ts.map +1 -0
- package/lib/components/ui/container/index.js +2 -0
- package/lib/components/ui/container/index.js.map +1 -0
- package/lib/components/ui/content-link/index.d.ts +8 -0
- package/lib/components/ui/content-link/index.d.ts.map +1 -0
- package/lib/components/ui/content-link/index.js +2 -0
- package/lib/components/ui/content-link/index.js.map +1 -0
- package/lib/components/ui/copy-button/index.d.ts +15 -0
- package/lib/components/ui/copy-button/index.d.ts.map +1 -0
- package/lib/components/ui/copy-button/index.js +3 -0
- package/lib/components/ui/copy-button/index.js.map +1 -0
- package/lib/components/ui/copy-text/index.d.ts +12 -0
- package/lib/components/ui/copy-text/index.d.ts.map +1 -0
- package/lib/components/ui/copy-text/index.js +3 -0
- package/lib/components/ui/copy-text/index.js.map +1 -0
- package/lib/components/ui/del/index.d.ts +7 -0
- package/lib/components/ui/del/index.d.ts.map +1 -0
- package/lib/components/ui/del/index.js +2 -0
- package/lib/components/ui/del/index.js.map +1 -0
- package/lib/components/ui/em/index.d.ts +7 -0
- package/lib/components/ui/em/index.d.ts.map +1 -0
- package/lib/components/ui/em/index.js +2 -0
- package/lib/components/ui/em/index.js.map +1 -0
- package/lib/components/ui/external-mark/index.d.ts +4 -0
- package/lib/components/ui/external-mark/index.d.ts.map +1 -0
- package/lib/components/ui/external-mark/index.js +2 -0
- package/lib/components/ui/external-mark/index.js.map +1 -0
- package/lib/components/ui/git-logos/index.d.ts +5 -0
- package/lib/components/ui/git-logos/index.d.ts.map +1 -0
- package/lib/components/ui/git-logos/index.js +2 -0
- package/lib/components/ui/git-logos/index.js.map +1 -0
- package/lib/components/ui/heading/index.d.ts +9 -0
- package/lib/components/ui/heading/index.d.ts.map +1 -0
- package/lib/components/ui/heading/index.js +2 -0
- package/lib/components/ui/heading/index.js.map +1 -0
- package/lib/components/ui/hr/index.d.ts +7 -0
- package/lib/components/ui/hr/index.d.ts.map +1 -0
- package/lib/components/ui/hr/index.js +2 -0
- package/lib/components/ui/hr/index.js.map +1 -0
- package/lib/components/ui/img/index.d.ts +12 -0
- package/lib/components/ui/img/index.d.ts.map +1 -0
- package/lib/components/ui/img/index.js +2 -0
- package/lib/components/ui/img/index.js.map +1 -0
- package/lib/components/ui/kbd/index.d.ts +3 -0
- package/lib/components/ui/kbd/index.d.ts.map +1 -0
- package/lib/components/ui/kbd/kbd-container/index.d.ts +7 -0
- package/lib/components/ui/kbd/kbd-container/index.d.ts.map +1 -0
- package/lib/components/ui/kbd/kbd-container/index.js +2 -0
- package/lib/components/ui/kbd/kbd-container/index.js.map +1 -0
- package/lib/components/ui/kbd/kbd-key/index.d.ts +7 -0
- package/lib/components/ui/kbd/kbd-key/index.d.ts.map +1 -0
- package/lib/components/ui/kbd/kbd-key/index.js +2 -0
- package/lib/components/ui/kbd/kbd-key/index.js.map +1 -0
- package/lib/components/ui/keylink/index.d.ts +8 -0
- package/lib/components/ui/keylink/index.d.ts.map +1 -0
- package/lib/components/ui/keylink/index.js +2 -0
- package/lib/components/ui/keylink/index.js.map +1 -0
- package/lib/components/ui/list/index.d.ts +4 -0
- package/lib/components/ui/list/index.d.ts.map +1 -0
- package/lib/components/ui/list/list-item/index.d.ts +8 -0
- package/lib/components/ui/list/list-item/index.d.ts.map +1 -0
- package/lib/components/ui/list/list-item/index.js +2 -0
- package/lib/components/ui/list/list-item/index.js.map +1 -0
- package/lib/components/ui/list/ordered-list/index.d.ts +8 -0
- package/lib/components/ui/list/ordered-list/index.d.ts.map +1 -0
- package/lib/components/ui/list/ordered-list/index.js +2 -0
- package/lib/components/ui/list/ordered-list/index.js.map +1 -0
- package/lib/components/ui/list/unordered-list/index.d.ts +8 -0
- package/lib/components/ui/list/unordered-list/index.d.ts.map +1 -0
- package/lib/components/ui/list/unordered-list/index.js +2 -0
- package/lib/components/ui/list/unordered-list/index.js.map +1 -0
- package/lib/components/ui/modal/index.d.ts +8 -0
- package/lib/components/ui/modal/index.d.ts.map +1 -0
- package/lib/components/ui/modal/index.js +2 -0
- package/lib/components/ui/modal/index.js.map +1 -0
- package/lib/components/ui/modal/use-modal.d.ts +6 -0
- package/lib/components/ui/modal/use-modal.d.ts.map +1 -0
- package/lib/components/ui/modal/use-modal.js +2 -0
- package/lib/components/ui/modal/use-modal.js.map +1 -0
- package/lib/components/ui/paragraph/index.d.ts +8 -0
- package/lib/components/ui/paragraph/index.d.ts.map +1 -0
- package/lib/components/ui/paragraph/index.js +2 -0
- package/lib/components/ui/paragraph/index.js.map +1 -0
- package/lib/components/ui/strong/index.d.ts +7 -0
- package/lib/components/ui/strong/index.d.ts.map +1 -0
- package/lib/components/ui/strong/index.js +2 -0
- package/lib/components/ui/strong/index.js.map +1 -0
- package/lib/components/ui/table/index.d.ts +7 -0
- package/lib/components/ui/table/index.d.ts.map +1 -0
- package/lib/components/ui/table/table/index.d.ts +8 -0
- package/lib/components/ui/table/table/index.d.ts.map +1 -0
- package/lib/components/ui/table/table/index.js +2 -0
- package/lib/components/ui/table/table/index.js.map +1 -0
- package/lib/components/ui/table/tbody/index.d.ts +7 -0
- package/lib/components/ui/table/tbody/index.d.ts.map +1 -0
- package/lib/components/ui/table/tbody/index.js +2 -0
- package/lib/components/ui/table/tbody/index.js.map +1 -0
- package/lib/components/ui/table/td/index.d.ts +8 -0
- package/lib/components/ui/table/td/index.d.ts.map +1 -0
- package/lib/components/ui/table/td/index.js +2 -0
- package/lib/components/ui/table/td/index.js.map +1 -0
- package/lib/components/ui/table/th/index.d.ts +8 -0
- package/lib/components/ui/table/th/index.d.ts.map +1 -0
- package/lib/components/ui/table/th/index.js +2 -0
- package/lib/components/ui/table/th/index.js.map +1 -0
- package/lib/components/ui/table/thead/index.d.ts +8 -0
- package/lib/components/ui/table/thead/index.d.ts.map +1 -0
- package/lib/components/ui/table/thead/index.js +2 -0
- package/lib/components/ui/table/thead/index.js.map +1 -0
- package/lib/components/ui/table/tr/index.d.ts +7 -0
- package/lib/components/ui/table/tr/index.d.ts.map +1 -0
- package/lib/components/ui/table/tr/index.js +2 -0
- package/lib/components/ui/table/tr/index.js.map +1 -0
- package/lib/components/ui/tabs/index.d.ts +16 -0
- package/lib/components/ui/tabs/index.d.ts.map +1 -0
- package/lib/components/ui/tabs/index.js +2 -0
- package/lib/components/ui/tabs/index.js.map +1 -0
- package/lib/components/ui/tabs/tabs-header/index.d.ts +11 -0
- package/lib/components/ui/tabs/tabs-header/index.d.ts.map +1 -0
- package/lib/components/ui/tabs/tabs-header/index.js +3 -0
- package/lib/components/ui/tabs/tabs-header/index.js.map +1 -0
- package/lib/components/ui/tabs/tabs-styles/index.d.ts +7 -0
- package/lib/components/ui/tabs/tabs-styles/index.d.ts.map +1 -0
- package/lib/components/ui/tabs/tabs-styles/index.js +2 -0
- package/lib/components/ui/tabs/tabs-styles/index.js.map +1 -0
- package/lib/components/ui/task-list/index.d.ts +4 -0
- package/lib/components/ui/task-list/index.d.ts.map +1 -0
- package/lib/components/ui/task-list/task-list-item/index.d.ts +9 -0
- package/lib/components/ui/task-list/task-list-item/index.d.ts.map +1 -0
- package/lib/components/ui/task-list/task-list-item/index.js +2 -0
- package/lib/components/ui/task-list/task-list-item/index.js.map +1 -0
- package/lib/components/ui/task-list/task-ordered-list/index.d.ts +5 -0
- package/lib/components/ui/task-list/task-ordered-list/index.d.ts.map +1 -0
- package/lib/components/ui/task-list/task-ordered-list/index.js +2 -0
- package/lib/components/ui/task-list/task-ordered-list/index.js.map +1 -0
- package/lib/components/ui/task-list/task-unordered-list/index.d.ts +8 -0
- package/lib/components/ui/task-list/task-unordered-list/index.d.ts.map +1 -0
- package/lib/components/ui/task-list/task-unordered-list/index.js +2 -0
- package/lib/components/ui/task-list/task-unordered-list/index.js.map +1 -0
- package/lib/components/ui/tooltip/index.d.ts +14 -0
- package/lib/components/ui/tooltip/index.d.ts.map +1 -0
- package/lib/components/ui/tooltip/index.js +2 -0
- package/lib/components/ui/tooltip/index.js.map +1 -0
- package/lib/core/data/contents.d.ts +11 -0
- package/lib/core/data/contents.d.ts.map +1 -0
- package/lib/core/data/contents.js +2 -0
- package/lib/core/data/contents.js.map +1 -0
- package/lib/core/hooks/use-debouncer.d.ts +4 -0
- package/lib/core/hooks/use-debouncer.d.ts.map +1 -0
- package/lib/core/hooks/use-debouncer.js +2 -0
- package/lib/core/hooks/use-debouncer.js.map +1 -0
- package/lib/core/hooks/use-system-type.d.ts +3 -0
- package/lib/core/hooks/use-system-type.d.ts.map +1 -0
- package/lib/core/hooks/use-system-type.js +2 -0
- package/lib/core/hooks/use-system-type.js.map +1 -0
- package/lib/core/providers/base.d.ts +13 -0
- package/lib/core/providers/base.d.ts.map +1 -0
- package/lib/core/providers/base.js +2 -0
- package/lib/core/providers/base.js.map +1 -0
- package/lib/core/providers/file-system.d.ts +11 -0
- package/lib/core/providers/file-system.d.ts.map +1 -0
- package/lib/core/providers/file-system.js +2 -0
- package/lib/core/providers/file-system.js.map +1 -0
- package/lib/core/providers/github.d.ts +20 -0
- package/lib/core/providers/github.d.ts.map +1 -0
- package/lib/core/providers/github.js +2 -0
- package/lib/core/providers/github.js.map +1 -0
- package/lib/core/providers/index.d.ts +3 -0
- package/lib/core/providers/index.d.ts.map +1 -0
- package/lib/core/types/content.d.ts +41 -0
- package/lib/core/types/content.d.ts.map +1 -0
- package/lib/core/types/search.d.ts +8 -0
- package/lib/core/types/search.d.ts.map +1 -0
- package/lib/core/types/structure.d.ts +16 -0
- package/lib/core/types/structure.d.ts.map +1 -0
- package/lib/core/types/theme.d.ts +49 -0
- package/lib/core/types/theme.d.ts.map +1 -0
- package/lib/core/utils/content-tools.d.ts +3 -0
- package/lib/core/utils/content-tools.d.ts.map +1 -0
- package/lib/core/utils/content-tools.js +2 -0
- package/lib/core/utils/content-tools.js.map +1 -0
- package/lib/core/utils/create-base-searcher.d.ts +3 -0
- package/lib/core/utils/create-base-searcher.d.ts.map +1 -0
- package/lib/core/utils/create-base-searcher.js +2 -0
- package/lib/core/utils/create-base-searcher.js.map +1 -0
- package/lib/core/utils/detect-provider.d.ts +3 -0
- package/lib/core/utils/detect-provider.d.ts.map +1 -0
- package/lib/core/utils/detect-provider.js +2 -0
- package/lib/core/utils/detect-provider.js.map +1 -0
- package/lib/core/utils/get-configuration.d.ts +10 -0
- package/lib/core/utils/get-configuration.d.ts.map +1 -0
- package/lib/core/utils/get-configuration.js +2 -0
- package/lib/core/utils/get-configuration.js.map +1 -0
- package/lib/core/utils/get-metadata.d.ts +13 -0
- package/lib/core/utils/get-metadata.d.ts.map +1 -0
- package/lib/core/utils/get-metadata.js +2 -0
- package/lib/core/utils/get-metadata.js.map +1 -0
- package/lib/core/utils/git-tools.d.ts +11 -0
- package/lib/core/utils/git-tools.d.ts.map +1 -0
- package/lib/core/utils/git-tools.js +2 -0
- package/lib/core/utils/git-tools.js.map +1 -0
- package/lib/core/utils/initialize-robindoc.d.ts +21 -0
- package/lib/core/utils/initialize-robindoc.d.ts.map +1 -0
- package/lib/core/utils/initialize-robindoc.js +2 -0
- package/lib/core/utils/initialize-robindoc.js.map +1 -0
- package/lib/core/utils/load-content.d.ts +21 -0
- package/lib/core/utils/load-content.d.ts.map +1 -0
- package/lib/core/utils/load-content.js +2 -0
- package/lib/core/utils/load-content.js.map +1 -0
- package/lib/core/utils/parse-structure.d.ts +8 -0
- package/lib/core/utils/parse-structure.d.ts.map +1 -0
- package/lib/core/utils/parse-structure.js +2 -0
- package/lib/core/utils/parse-structure.js.map +1 -0
- package/lib/core/utils/path-tools.d.ts +8 -0
- package/lib/core/utils/path-tools.d.ts.map +1 -0
- package/lib/core/utils/path-tools.js +2 -0
- package/lib/core/utils/path-tools.js.map +1 -0
- package/lib/core/utils/tabs-tools.d.ts +5 -0
- package/lib/core/utils/tabs-tools.d.ts.map +1 -0
- package/lib/core/utils/tabs-tools.js +2 -0
- package/lib/core/utils/tabs-tools.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/styles.css +2046 -0
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|