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,11 @@
|
|
|
1
|
+
export declare const detectGitType: (uri: string) => {
|
|
2
|
+
readonly name: "GitHub";
|
|
3
|
+
readonly key: "github";
|
|
4
|
+
} | {
|
|
5
|
+
readonly name: "GitLab";
|
|
6
|
+
readonly key: "gitlab";
|
|
7
|
+
} | {
|
|
8
|
+
readonly name: "Git";
|
|
9
|
+
readonly key: "git";
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=git-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/git-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM;;;;;;;;;CAQxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-tools.js","sources":["../../../src/core/utils/git-tools.ts"],"sourcesContent":["export const detectGitType = (uri: string) => {\n if (uri.match(/^https?:\\/\\/github.com/)) {\n return { name: \"GitHub\", key: \"github\" } as const;\n } else if (uri.match(/^https?:\\/\\/gitlab.com/)) {\n return { name: \"GitLab\", key: \"gitlab\" } as const;\n } else {\n return { name: \"Git\", key: \"git\" } as const;\n }\n};\n"],"names":["detectGitType","uri","match","name","key"],"mappings":"AAAO,MAAMA,EAAiBC,GACtBA,EAAIC,MAAM,0BACH,CAAEC,KAAM,SAAUC,IAAK,UACvBH,EAAIC,MAAM,0BACV,CAAEC,KAAM,SAAUC,IAAK,UAEvB,CAAED,KAAM,MAAOC,IAAK"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type ArticleProps as ArticlePropsBase } from "../../components/elements/article";
|
|
3
|
+
import { type SidebarProps as SidebarPropsBase } from "../../components/elements/sidebar";
|
|
4
|
+
import { type Structure } from "../types/structure";
|
|
5
|
+
type PageProps = Omit<Partial<ArticlePropsBase>, "uri" | "content" | "provider" | "pathname" | "pages"> & {
|
|
6
|
+
pathname: string;
|
|
7
|
+
};
|
|
8
|
+
type SidebarProps = Omit<SidebarPropsBase, "tree">;
|
|
9
|
+
export declare const initializeRobindoc: (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {
|
|
10
|
+
Page: React.FC<PageProps>;
|
|
11
|
+
Sidebar: React.FC<SidebarProps>;
|
|
12
|
+
getStaticParams: <T extends string = "segments">(prefix?: string, segmentsParamKey?: T) => Promise<Record<T, string[]>[]>;
|
|
13
|
+
getMetadata: (pathname: string) => Promise<Record<string, string>>;
|
|
14
|
+
getPageData: (pathname: string) => Promise<{
|
|
15
|
+
title: string;
|
|
16
|
+
raw: string;
|
|
17
|
+
}>;
|
|
18
|
+
getPageInstruction: (pathname: string) => Promise<import("../types/content").Page>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=initialize-robindoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-robindoc.d.ts","sourceRoot":"","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AACjH,OAAO,EAA0B,KAAK,YAAY,IAAI,gBAAgB,EAAE,0CAAyC;AAEjH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAOpD,KAAK,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IACtG,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAUnD,eAAO,MAAM,kBAAkB,GAAI,mBAAmB,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;;;sBAmDrE,CAAC,SAAS,MAAM,wBACnC,MAAM,qBACI,CAAC;4BAiBc,MAAM;4BAgBN,MAAM;;;;mCAeC,MAAM;CAarD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"react";import{Article as e}from"../../components/elements/article/index.js";import{Sidebar as r}from"../../components/elements/sidebar/index.js";import{parseStructure as a}from"./parse-structure.js";import{getConfiguration as n}from"./get-configuration.js";import{getMetadata as i}from"./get-metadata.js";import{normalizePathname as o,removeTrailingSlash as s}from"./path-tools.js";import{loadContent as c}from"./load-content.js";const u=u=>{const p=(async t=>"function"==typeof t?t():t)(u).then(t=>a(t.items||[],n(t.configuration||{})));return{Page:async({pathname:r,...a})=>{const{pages:n}=await p,i=o(r),s=n[i];if(!s)throw new Error(`Can not find data for "${i}". Please check structure`);const c=Object.keys(n),u=c.indexOf(i),m=c[u-1],f=u<c.length-1&&c[u+1],d=m&&{pathname:m,title:n[m].title},g=f&&{pathname:f,title:n[f].title},l=s.crumbs.map(t=>({title:n[t].title,pathname:t})),h=Object.entries(n).reduce((t,[e,{origPath:r}])=>(r&&t.push({clientPath:e,origPath:r}),t),[]);return t.createElement(e,{pathname:i,provider:s.configuration.provider,uri:s.uri,title:s.title,breadcrumbs:l,prev:d||void 0,next:g||void 0,pages:h,...a})},Sidebar:async e=>{const{tree:a}=await p;return t.createElement(r,{tree:a,...e})},getStaticParams:async(t="",e="segments")=>{const{pages:r}=await p,a=Object.keys(r),n=s(t);return a.reduce((t,r)=>r.startsWith(n)?(t.push({[e]:r.substring(n.length+1).split("/")}),t):t,[])},getMetadata:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return await i({uri:a.uri,provider:a.configuration.provider})},getPageData:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);const n=a.title,{data:i}=await c(a.uri,a.configuration.provider);return{title:n,raw:i}},getPageInstruction:async t=>{const{pages:e}=await p,r=o(t),a=e[r];if(!a)throw new Error(`Can not find data for "${r}". Please check structure`);return a}}};export{u as initializeRobindoc};
|
|
2
|
+
//# sourceMappingURL=initialize-robindoc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-robindoc.js","sources":["../../../src/core/utils/initialize-robindoc.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Article as ArticleBase, type ArticleProps as ArticlePropsBase } from \"@src/components/elements/article\";\nimport { Sidebar as SidebarBase, type SidebarProps as SidebarPropsBase } from \"@src/components/elements/sidebar\";\n\nimport { type Structure } from \"../types/structure\";\nimport { parseStructure } from \"./parse-structure\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata as getMetadataBase } from \"./get-metadata\";\nimport { normalizePathname, removeTrailingSlash } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\ntype PageProps = Omit<Partial<ArticlePropsBase>, \"uri\" | \"content\" | \"provider\" | \"pathname\" | \"pages\"> & {\n pathname: string;\n};\n\ntype SidebarProps = Omit<SidebarPropsBase, \"tree\">;\n\nconst loadStructure = async (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n if (typeof structureTemplate === \"function\") {\n return structureTemplate();\n } else {\n return structureTemplate;\n }\n};\n\nexport const initializeRobindoc = (structureTemplate: Structure | (() => Structure | Promise<Structure>)) => {\n const structureParsedPromise = loadStructure(structureTemplate).then((structure) =>\n parseStructure(structure.items || [], getConfiguration(structure.configuration || {})),\n );\n\n const Page: React.FC<PageProps> = async ({ pathname, ...props }) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const paths = Object.keys(pages);\n const targetPageIndex = paths.indexOf(pathnameNormalized);\n const prevPagePathname = paths[targetPageIndex - 1];\n const nextPagePathname = targetPageIndex < paths.length - 1 && paths[targetPageIndex + 1];\n const prev = prevPagePathname && { pathname: prevPagePathname, title: pages[prevPagePathname].title };\n const next = nextPagePathname && { pathname: nextPagePathname, title: pages[nextPagePathname].title };\n\n const breadcrumbs = pageInstruction.crumbs.map((crumb) => ({ title: pages[crumb].title, pathname: crumb }));\n const clientPages = Object.entries(pages).reduce<{ clientPath: string; origPath: string }[]>(\n (acc, [clientPath, { origPath }]) => {\n if (origPath) acc.push({ clientPath, origPath });\n return acc;\n },\n [],\n );\n\n return (\n <ArticleBase\n pathname={pathnameNormalized}\n provider={pageInstruction.configuration.provider}\n uri={pageInstruction.uri}\n title={pageInstruction.title}\n breadcrumbs={breadcrumbs}\n prev={prev || undefined}\n next={next || undefined}\n pages={clientPages}\n {...props}\n />\n );\n };\n\n const Sidebar: React.FC<SidebarProps> = async (props) => {\n const { tree } = await structureParsedPromise;\n\n return <SidebarBase tree={tree} {...props} />;\n };\n\n const getStaticParams = async <T extends string = \"segments\">(\n prefix: string = \"\",\n segmentsParamKey: T = \"segments\" as T,\n ) => {\n const { pages } = await structureParsedPromise;\n const pagesArr = Object.keys(pages);\n const prefixWithoutTrailingSlash = removeTrailingSlash(prefix);\n\n return pagesArr.reduce<Record<T, string[]>[]>((acc, cur) => {\n if (!cur.startsWith(prefixWithoutTrailingSlash)) return acc;\n\n acc.push({\n [segmentsParamKey]: cur.substring(prefixWithoutTrailingSlash.length + 1).split(\"/\"),\n } as Record<T, string[]>);\n\n return acc;\n }, []);\n };\n\n const getMetadata = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const metadata = await getMetadataBase({\n uri: pageInstruction.uri,\n provider: pageInstruction.configuration.provider,\n });\n return metadata;\n };\n\n const getPageData = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n const title = pageInstruction.title;\n const { data } = await loadContent(pageInstruction.uri, pageInstruction.configuration.provider);\n\n return { title, raw: data };\n };\n\n const getPageInstruction = async (pathname: string) => {\n const { pages } = await structureParsedPromise;\n const pathnameNormalized = normalizePathname(pathname);\n const pageInstruction = pages[pathnameNormalized];\n\n if (!pageInstruction) {\n throw new Error(`Can not find data for \"${pathnameNormalized}\". Please check structure`);\n }\n\n return pageInstruction;\n };\n\n return { Page, Sidebar, getStaticParams, getMetadata, getPageData, getPageInstruction };\n};\n"],"names":["initializeRobindoc","structureTemplate","structureParsedPromise","async","loadStructure","then","structure","parseStructure","items","getConfiguration","configuration","Page","pathname","props","pages","pathnameNormalized","normalizePathname","pageInstruction","Error","paths","Object","keys","targetPageIndex","indexOf","prevPagePathname","nextPagePathname","length","prev","title","next","breadcrumbs","crumbs","map","crumb","clientPages","entries","reduce","acc","clientPath","origPath","push","React","ArticleBase","provider","uri","undefined","Sidebar","tree","createElement","SidebarBase","getStaticParams","prefix","segmentsParamKey","pagesArr","prefixWithoutTrailingSlash","removeTrailingSlash","cur","startsWith","substring","split","getMetadata","getMetadataBase","getPageData","data","loadContent","raw","getPageInstruction"],"mappings":"4bAkBA,MAQaA,EAAsBC,IAC/B,MAAMC,EATYC,OAAOF,GACQ,mBAAtBA,EACAA,IAEAA,EAKoBG,CAAcH,GAAmBI,KAAMC,GAClEC,EAAeD,EAAUE,OAAS,GAAIC,EAAiBH,EAAUI,eAAiB,CAAA,KA+GtF,MAAO,CAAEC,KA5GyBR,OAASS,cAAaC,MACpD,MAAMC,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,MAAMI,EAAQC,OAAOC,KAAKP,GACpBQ,EAAkBH,EAAMI,QAAQR,GAChCS,EAAmBL,EAAMG,EAAkB,GAC3CG,EAAmBH,EAAkBH,EAAMO,OAAS,GAAKP,EAAMG,EAAkB,GACjFK,EAAOH,GAAoB,CAAEZ,SAAUY,EAAkBI,MAAOd,EAAMU,GAAkBI,OACxFC,EAAOJ,GAAoB,CAAEb,SAAUa,EAAkBG,MAAOd,EAAMW,GAAkBG,OAExFE,EAAcb,EAAgBc,OAAOC,IAAKC,IAAK,CAAQL,MAAOd,EAAMmB,GAAOL,MAAOhB,SAAUqB,KAC5FC,EAAcd,OAAOe,QAAQrB,GAAOsB,OACtC,CAACC,GAAMC,GAAcC,gBACbA,GAAUF,EAAIG,KAAK,CAAEF,aAAYC,aAC9BF,GAEX,IAGJ,OACII,gBAACC,EAAW,CACR9B,SAAUG,EACV4B,SAAU1B,EAAgBP,cAAciC,SACxCC,IAAK3B,EAAgB2B,IACrBhB,MAAOX,EAAgBW,MACvBE,YAAaA,EACbH,KAAMA,QAAQkB,EACdhB,KAAMA,QAAQgB,EACd/B,MAAOoB,KACHrB,KAyEHiC,QApE2B3C,MAAOU,IAC3C,MAAMkC,KAAEA,SAAe7C,EAEvB,OAAOuC,EAAAO,cAACC,EAAW,CAACF,KAAMA,KAAUlC,KAiEhBqC,gBA9DA/C,MACpBgD,EAAiB,GACjBC,EAAsB,cAEtB,MAAMtC,MAAEA,SAAgBZ,EAClBmD,EAAWjC,OAAOC,KAAKP,GACvBwC,EAA6BC,EAAoBJ,GAEvD,OAAOE,EAASjB,OAA8B,CAACC,EAAKmB,IAC3CA,EAAIC,WAAWH,IAEpBjB,EAAIG,KAAK,CACLY,CAACA,GAAmBI,EAAIE,UAAUJ,EAA2B5B,OAAS,GAAGiC,MAAM,OAG5EtB,GANiDA,EAOzD,KA8CgCuB,YA3CnBzD,MAAOS,IACvB,MAAME,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAO9C,aAJuB8C,EAAgB,CACnCjB,IAAK3B,EAAgB2B,IACrBD,SAAU1B,EAAgBP,cAAciC,YAgCMmB,YA3BlC3D,MAAOS,IACvB,MAAME,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,MAAMa,EAAQX,EAAgBW,OACxBmC,KAAEA,SAAeC,EAAY/C,EAAgB2B,IAAK3B,EAAgBP,cAAciC,UAEtF,MAAO,CAAEf,QAAOqC,IAAKF,IAe0CG,mBAZxC/D,MAAOS,IAC9B,MAAME,MAAEA,SAAgBZ,EAClBa,EAAqBC,EAAkBJ,GACvCK,EAAkBH,EAAMC,GAE9B,IAAKE,EACD,MAAM,IAAIC,MAAM,0BAA0BH,8BAG9C,OAAOE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BaseProvider } from "../providers/base";
|
|
2
|
+
import { GithubProvider } from "../providers/github";
|
|
3
|
+
import { FileSystemProvider } from "../providers";
|
|
4
|
+
export declare const loadContent: (uri: string, providerArg?: BaseProvider, root?: string) => Promise<{
|
|
5
|
+
data: string;
|
|
6
|
+
type: "local" | "remote";
|
|
7
|
+
provider: BaseProvider;
|
|
8
|
+
} | {
|
|
9
|
+
data: string;
|
|
10
|
+
type: string;
|
|
11
|
+
provider: GithubProvider;
|
|
12
|
+
} | {
|
|
13
|
+
data: string;
|
|
14
|
+
type: string;
|
|
15
|
+
provider: null;
|
|
16
|
+
} | {
|
|
17
|
+
data: string;
|
|
18
|
+
type: string;
|
|
19
|
+
provider: FileSystemProvider;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=load-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-content.d.ts","sourceRoot":"","sources":["../../../src/core/utils/load-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,eAAO,MAAM,WAAW,GAAU,KAAK,MAAM,EAAE,cAAc,YAAY,EAAE,OAAO,MAAM;;;;;;;;;;;;;;;;EA4BvF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{GithubProvider as t}from"../providers/github.js";import{FileSystemProvider as r}from"../providers/file-system.js";const a=async(a,o,e)=>{if(o){return{data:await o.load(a),type:o.type,provider:o}}if(a.startsWith("https://github.com/")){const r=new t(a);if(r.pathname){return{data:await r.load(r.pathname),type:"remote",provider:r}}throw new Error("Can not load content")}if(a.match(/https?:\/\//)){const t=await fetch(a);if(!t.ok)throw new Error("Can not load content");return{data:await t.text(),type:"remote",provider:null}}const n=new r(e);return{data:await n.load(a),type:"local",provider:n}};export{a as loadContent};
|
|
2
|
+
//# sourceMappingURL=load-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-content.js","sources":["../../../src/core/utils/load-content.ts"],"sourcesContent":["import { type BaseProvider } from \"../providers/base\";\nimport { GithubProvider } from \"../providers/github\";\nimport { FileSystemProvider } from \"../providers\";\n\nexport const loadContent = async (uri: string, providerArg?: BaseProvider, root?: string) => {\n if (providerArg) {\n const content = await providerArg.load(uri);\n return { data: content, type: providerArg.type, provider: providerArg };\n }\n\n if (uri.startsWith(\"https://github.com/\")) {\n const provider = new GithubProvider(uri);\n if (provider.pathname) {\n const content = await provider.load(provider.pathname);\n return { data: content, type: \"remote\", provider };\n } else {\n throw new Error(\"Can not load content\");\n }\n }\n\n if (uri.match(/https?:\\/\\//)) {\n const resp = await fetch(uri);\n if (!resp.ok) {\n throw new Error(\"Can not load content\");\n }\n const content = await resp.text();\n return { data: content, type: \"remote\", provider: null };\n }\n\n const provider = new FileSystemProvider(root);\n const content = await provider.load(uri);\n return { data: content, type: \"local\", provider };\n};\n"],"names":["loadContent","async","uri","providerArg","root","data","load","type","provider","startsWith","GithubProvider","pathname","Error","match","resp","fetch","ok","text","FileSystemProvider"],"mappings":"yHAIO,MAAMA,EAAcC,MAAOC,EAAaC,EAA4BC,KACvE,GAAID,EAAa,CAEb,MAAO,CAAEE,WADaF,EAAYG,KAAKJ,GACfK,KAAMJ,EAAYI,KAAMC,SAAUL,EAC9D,CAEA,GAAID,EAAIO,WAAW,uBAAwB,CACvC,MAAMD,EAAW,IAAIE,EAAeR,GACpC,GAAIM,EAASG,SAAU,CAEnB,MAAO,CAAEN,WADaG,EAASF,KAAKE,EAASG,UACrBJ,KAAM,SAAUC,WAC5C,CACI,MAAM,IAAII,MAAM,uBAExB,CAEA,GAAIV,EAAIW,MAAM,eAAgB,CAC1B,MAAMC,QAAaC,MAAMb,GACzB,IAAKY,EAAKE,GACN,MAAM,IAAIJ,MAAM,wBAGpB,MAAO,CAAEP,WADaS,EAAKG,OACHV,KAAM,SAAUC,SAAU,KACtD,CAEA,MAAMA,EAAW,IAAIU,EAAmBd,GAExC,MAAO,CAAEC,WADaG,EAASF,KAAKJ,GACZK,KAAM,QAASC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DocItem } from "../types/structure";
|
|
2
|
+
import { type Pages, type Crumbs, type Configuration } from "../types/content";
|
|
3
|
+
import { type TreeItem } from "../../components/elements/sidebar/types";
|
|
4
|
+
export declare const parseStructure: (items: DocItem[] | "auto", parentConfiguration?: Configuration, crumbs?: Crumbs, pathname?: string, nestingLevel?: number) => Promise<{
|
|
5
|
+
pages: Pages;
|
|
6
|
+
tree: TreeItem[];
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=parse-structure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-structure.d.ts","sourceRoot":"","sources":["../../../src/core/utils/parse-structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAgPxE,eAAO,MAAM,cAAc,GACvB,OAAO,OAAO,EAAE,GAAG,MAAM,EACzB,sBAAqB,aAAkB,EACvC,SAAQ,MAAW,EACnB,WAAU,MAAW,EACrB,eAAc,MAAU;WAjFjB,KAAK;UACN,QAAQ,EAAE;EAyFnB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getConfiguration as t}from"./get-configuration.js";import{getMetadata as e}from"./get-metadata.js";import{mergePathname as r,normalizePathname as i,generatePseudoTitle as a,checkIsLinkExternal as s}from"./path-tools.js";import{loadContent as o}from"./load-content.js";const n=async(t={},c=[],p="",u)=>{const f={},h=[];if(!t.provider)return{pages:f,tree:h};const g=await t.provider.filesPromise;if(g.structures.includes(`${p}/structure.json`)){const e=await(async(t={},e="",a=[],c)=>{const p={},u=[];if(!t.provider)return{pages:p,tree:u};if((await t.provider.filesPromise).structures.includes(`${e}/structure.json`)){const f=await o(`${e}/structure.json`,t.provider);try{const o=JSON.parse(f.data);for(const f in o){const h=o[f],g=i("index"===f?e:e+"/"+f),l=r(t.basePath,g),d=i(l);if(!s(d)){const e=await(t.provider?.getPageSourcePathname(g,d));e&&(p[d]={title:h.title,uri:g,configuration:t,origPath:e,crumbs:a})}let m;if("index"!==f){const e=await n(t,[...a,d],g,c+1);m=e.tree,Object.assign(p,e.pages)}u.push({title:h.title,href:d,items:m,type:"row"})}}catch{throw new Error(`Can't parse structure "${e}/structure.json"`)}return{pages:p,tree:u}}})(t,p,c,u+1);if(e)return e}for await(const s of g.docs){const o=s.clientPath.split("/").filter(Boolean).length;if(!p&&!(o<2)||p&&!s.clientPath.match(new RegExp(`^${p.replace(/\/$/,"")}/[^/]+$`)))continue;const{clientPath:g}=s,l=r(t.basePath,g),d=i(l),m=(await e({provider:t.provider,uri:g})).title||a(d),w=await(t.provider?.getPageSourcePathname(g,d));w&&(f[d]={title:m,uri:g,configuration:t,origPath:w,crumbs:c});const P=await n(t,[...c,d],g,u+1);Object.assign(f,P.pages),u<(t.spreadedLevel||1)?h.push({title:m,href:d,type:0===u?"heading":"row"},...P.tree):h.push({title:m,href:d,items:P.tree,type:0===u?"heading":"row"})}return{pages:f,tree:h}},c=async(e,o={},p=[],u="",f=0)=>{if("auto"===e){return await n(o,p,u,f)}const h=await(async(e,o={},n=[],p,u)=>{const f={},h=[];for await(const g of e){if("string"==typeof g){const t=await c(g,o,n,p,u);Object.assign(f,t.pages),h.push(...t.tree);continue}if("separator"===g.type){h.push({type:"separator"});continue}let e=n;const l=t(g.configuration||{},o),d=g.href,m=r(l.basePath,d),w=i(m);if(!s(w)&&d){const t=await(l.provider?.getPageSourcePathname(d,w));t&&(f[w]={title:g.title||"",uri:d,configuration:l,origPath:t,crumbs:n},e=[...n,w])}let P=[];if(g.items){const t=await c(g.items,l,e,g.href,u+1);P=t.tree,Object.assign(f,t.pages)}g.hidden||(u<(o.spreadedLevel||1)?h.push({title:g.title||a(w),href:g.href?w:void 0,type:g.type},...P):h.push({title:g.title||a(w),href:g.href?w:void 0,items:P,type:g.type}))}return{pages:f,tree:h}})(e,o,p,u,f);return h};export{c as parseStructure};
|
|
2
|
+
//# sourceMappingURL=parse-structure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-structure.js","sources":["../../../src/core/utils/parse-structure.ts"],"sourcesContent":["import { type DocItem } from \"../types/structure\";\nimport { type Pages, type Crumbs, type Configuration } from \"../types/content\";\nimport { type TreeItem } from \"../../components/elements/sidebar/types\";\nimport { getConfiguration } from \"./get-configuration\";\nimport { getMetadata } from \"./get-metadata\";\nimport { generatePseudoTitle, checkIsLinkExternal, mergePathname, normalizePathname } from \"./path-tools\";\nimport { loadContent } from \"./load-content\";\n\nconst parseJSONStructure = async (\n parentConfiguration: Configuration = {},\n parentPathname = \"\",\n crumbs: Crumbs = [],\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const content = await loadContent(`${parentPathname}/structure.json`, parentConfiguration.provider);\n try {\n const structure: { [segment: string]: { title: string } } = JSON.parse(content.data);\n for (const segment in structure) {\n const data = structure[segment];\n const clientPath = normalizePathname(\n segment === \"index\" ? parentPathname : parentPathname + \"/\" + segment,\n );\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized)) {\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(\n clientPath,\n pathnameNormalized,\n );\n if (origPath) {\n pages[pathnameNormalized] = {\n title: data.title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n }\n\n let subTree: TreeItem[] | undefined;\n if (segment !== \"index\") {\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n tree.push({\n title: data.title,\n href: pathnameNormalized,\n items: subTree,\n type: \"row\",\n });\n }\n } catch {\n throw new Error(`Can't parse structure \"${parentPathname}/structure.json\"`);\n }\n return { pages, tree };\n }\n};\n\nconst parseAutoStructure = async (\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname = \"\",\n nestingLevel: number,\n) => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n if (!parentConfiguration.provider) return { pages, tree };\n\n const branchFiles = await parentConfiguration.provider.filesPromise;\n\n if (branchFiles.structures.includes(`${parentPathname}/structure.json`)) {\n const jsonStructureData = await parseJSONStructure(\n parentConfiguration,\n parentPathname,\n crumbs,\n nestingLevel + 1,\n );\n if (jsonStructureData) {\n return jsonStructureData;\n }\n }\n\n for await (const generatedItem of branchFiles.docs) {\n const linkLevel = generatedItem.clientPath.split(\"/\").filter(Boolean).length;\n const topLevelLink = linkLevel < 2;\n\n if (\n (!parentPathname && !topLevelLink) ||\n (parentPathname &&\n !generatedItem.clientPath.match(new RegExp(`^${parentPathname.replace(/\\/$/, \"\")}/[^/]+$`)))\n ) {\n continue;\n }\n\n const { clientPath } = generatedItem;\n const pathname = mergePathname(parentConfiguration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n const metadata = await getMetadata({ provider: parentConfiguration.provider, uri: clientPath });\n const title = metadata.title || generatePseudoTitle(pathnameNormalized);\n const origPath = await parentConfiguration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n if (origPath) {\n pages[pathnameNormalized] = {\n title,\n uri: clientPath,\n configuration: parentConfiguration,\n origPath,\n crumbs,\n };\n }\n\n const subItemsData = await parseAutoStructure(\n parentConfiguration,\n [...crumbs, pathnameNormalized],\n clientPath,\n nestingLevel + 1,\n );\n Object.assign(pages, subItemsData.pages);\n\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title,\n href: pathnameNormalized,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n },\n ...subItemsData.tree,\n );\n } else {\n tree.push({\n title,\n href: pathnameNormalized,\n items: subItemsData.tree,\n type: nestingLevel === 0 ? \"heading\" : \"row\",\n });\n }\n }\n\n return { pages, tree };\n};\n\nconst parseStaticStructure = async (\n items: DocItem[],\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n parentPathname: string,\n nestingLevel: number,\n): Promise<{\n pages: Pages;\n tree: TreeItem[];\n}> => {\n const pages: Pages = {};\n const tree: TreeItem[] = [];\n\n for await (const item of items) {\n if (typeof item === \"string\") {\n const subItemsData = await parseStructure(item, parentConfiguration, crumbs, parentPathname, nestingLevel);\n Object.assign(pages, subItemsData.pages);\n tree.push(...subItemsData.tree);\n continue;\n }\n if (item.type === \"separator\") {\n tree.push({ type: \"separator\" });\n\n continue;\n }\n let subCrumbs = crumbs;\n const configuration = getConfiguration(item.configuration || {}, parentConfiguration);\n const clientPath = item.href;\n const pathname = mergePathname(configuration.basePath, clientPath);\n const pathnameNormalized = normalizePathname(pathname);\n\n if (!checkIsLinkExternal(pathnameNormalized) && clientPath) {\n const origPath = await configuration.provider?.getPageSourcePathname(clientPath, pathnameNormalized);\n\n if (origPath) {\n pages[pathnameNormalized] = {\n title: item.title || \"\",\n uri: clientPath,\n configuration,\n origPath,\n crumbs,\n };\n subCrumbs = [...crumbs, pathnameNormalized];\n }\n }\n\n let subTree: TreeItem[] = [];\n if (item.items) {\n const subItemsData = await parseStructure(\n item.items,\n configuration,\n subCrumbs,\n item.href,\n nestingLevel + 1,\n );\n subTree = subItemsData.tree;\n Object.assign(pages, subItemsData.pages);\n }\n\n if (!item.hidden) {\n if (nestingLevel < (parentConfiguration.spreadedLevel || 1)) {\n tree.push(\n {\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n type: item.type,\n },\n ...subTree,\n );\n } else {\n tree.push({\n title: item.title || generatePseudoTitle(pathnameNormalized),\n href: item.href ? pathnameNormalized : undefined,\n items: subTree,\n type: item.type,\n });\n }\n }\n }\n\n return { pages, tree };\n};\n\nexport const parseStructure = async (\n items: DocItem[] | \"auto\",\n parentConfiguration: Configuration = {},\n crumbs: Crumbs = [],\n pathname: string = \"\",\n nestingLevel: number = 0,\n) => {\n if (items === \"auto\") {\n const structureParsed = await parseAutoStructure(parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n }\n\n const structureParsed = await parseStaticStructure(items, parentConfiguration, crumbs, pathname, nestingLevel);\n return structureParsed;\n};\n"],"names":["parseAutoStructure","async","parentConfiguration","crumbs","parentPathname","nestingLevel","pages","tree","provider","branchFiles","filesPromise","structures","includes","jsonStructureData","content","loadContent","structure","JSON","parse","data","segment","clientPath","normalizePathname","pathname","mergePathname","basePath","pathnameNormalized","checkIsLinkExternal","origPath","getPageSourcePathname","title","uri","configuration","subTree","subItemsData","Object","assign","push","href","items","type","Error","parseJSONStructure","generatedItem","docs","linkLevel","split","filter","Boolean","length","match","RegExp","replace","getMetadata","generatePseudoTitle","spreadedLevel","parseStructure","structureParsed","item","subCrumbs","getConfiguration","hidden","undefined","parseStaticStructure"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getFileUrl: (pathname: string) => string;
|
|
2
|
+
export declare const normalizePathname: (pathname?: string | null) => string;
|
|
3
|
+
export declare const removeTrailingSlash: (pathname?: string | null) => string;
|
|
4
|
+
export declare const addTrailingSlash: (pathname?: string | null) => string;
|
|
5
|
+
export declare const generatePseudoTitle: (pathname?: string | null) => string;
|
|
6
|
+
export declare const checkIsLinkExternal: (href: string) => boolean;
|
|
7
|
+
export declare const mergePathname: (basePath?: string, href?: string) => string | undefined;
|
|
8
|
+
//# sourceMappingURL=path-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/path-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,WAS1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,GAAG,IAAI,WAIzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,GAAG,IAAI,WAI3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,GAAG,IAAI,WAIxD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,GAAG,IAAI,WAS3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,YAG/C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,uBAE7D,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=e=>{const[,t,n]=e.match(/(?:^|\/)([^/]+)(\.mdx?)$/)||[];return e.replace(new RegExp(`((/|^)(readme|README|index|${t}/${t}))?${n}$`),"")},t=e=>e&&e.replace(/\/$/,"")||"/",n=e=>e?e.endsWith("/")?e.substring(0,e.length-1):e:"",r=e=>{const n=t(e).split("/").filter(Boolean);if(0===n.length)return"Index";return n[n.length-1].split("-").map(e=>e[0].toUpperCase()+e.substring(1)).join(" ")},s=e=>"r"!==new URL(e,"http://r").host,p=(e,t)=>!t||s(t)?t:(e||"")+t;export{s as checkIsLinkExternal,r as generatePseudoTitle,e as getFileUrl,p as mergePathname,t as normalizePathname,n as removeTrailingSlash};
|
|
2
|
+
//# sourceMappingURL=path-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-tools.js","sources":["../../../src/core/utils/path-tools.ts"],"sourcesContent":["export const getFileUrl = (pathname: string) => {\n const [, filename, ext] = pathname.match(/(?:^|\\/)([^/]+)(\\.mdx?)$/) || [];\n\n const clientPath = pathname.replace(\n new RegExp(`((\\/|^)(readme|README|index|${filename}/${filename}))?${ext}$`),\n \"\",\n );\n\n return clientPath;\n};\n\nexport const normalizePathname = (pathname?: string | null) => {\n if (!pathname) return \"/\";\n\n return pathname.replace(/\\/$/, \"\") || \"/\";\n};\n\nexport const removeTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname.substring(0, pathname.length - 1) : pathname;\n};\n\nexport const addTrailingSlash = (pathname?: string | null) => {\n if (!pathname) return \"\";\n\n return pathname.endsWith(\"/\") ? pathname : pathname + \"/\";\n};\n\nexport const generatePseudoTitle = (pathname?: string | null) => {\n const pathnamename = normalizePathname(pathname);\n const pathnamenameSegments = pathnamename.split(\"/\").filter(Boolean);\n\n if (pathnamenameSegments.length === 0) return \"Index\";\n\n const lastSegment = pathnamenameSegments[pathnamenameSegments.length - 1];\n const lastSegmentWords = lastSegment.split(\"-\");\n return lastSegmentWords.map((word) => word[0].toUpperCase() + word.substring(1)).join(\" \");\n};\n\nexport const checkIsLinkExternal = (href: string) => {\n const url = new URL(href, \"http://r\");\n return url.host !== \"r\";\n};\n\nexport const mergePathname = (basePath?: string, href?: string) => {\n return !href || checkIsLinkExternal(href) ? href : (basePath || \"\") + href;\n};\n"],"names":["getFileUrl","pathname","filename","ext","match","replace","RegExp","normalizePathname","removeTrailingSlash","endsWith","substring","length","generatePseudoTitle","pathnamenameSegments","split","filter","Boolean","map","word","toUpperCase","join","checkIsLinkExternal","href","URL","host","mergePathname","basePath"],"mappings":"AAAO,MAAMA,EAAcC,IACvB,MAAM,CAAGC,EAAUC,GAAOF,EAASG,MAAM,6BAA+B,GAOxE,OALmBH,EAASI,QACxB,IAAIC,OAAO,8BAA+BJ,KAAYA,OAAcC,MACpE,KAMKI,EAAqBN,GACzBA,GAEEA,EAASI,QAAQ,MAAO,KAFT,IAKbG,EAAuBP,GAC3BA,EAEEA,EAASQ,SAAS,KAAOR,EAASS,UAAU,EAAGT,EAASU,OAAS,GAAKV,EAFvD,GAWbW,EAAuBX,IAChC,MACMY,EADeN,EAAkBN,GACGa,MAAM,KAAKC,OAAOC,SAE5D,GAAoC,IAAhCH,EAAqBF,OAAc,MAAO,QAI9C,OAFoBE,EAAqBA,EAAqBF,OAAS,GAClCG,MAAM,KACnBG,IAAKC,GAASA,EAAK,GAAGC,cAAgBD,EAAKR,UAAU,IAAIU,KAAK,MAG7EC,EAAuBC,GAEZ,MADR,IAAIC,IAAID,EAAM,YACfE,KAGFC,EAAgB,CAACC,EAAmBJ,KACrCA,GAAQD,EAAoBC,GAAQA,GAAQI,GAAY,IAAMJ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const saveTab: (tabsKey: string, tab: string) => void;
|
|
2
|
+
export declare const clearTabs: () => void;
|
|
3
|
+
export declare const getTab: (tabsKey: string) => string | null;
|
|
4
|
+
export declare const getTabs: () => string[][];
|
|
5
|
+
//# sourceMappingURL=tabs-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-tools.d.ts","sourceRoot":"","sources":["../../../src/core/utils/tabs-tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,EAAE,KAAK,MAAM,SAKnD,CAAC;AAEF,eAAO,MAAM,SAAS,YAErB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,SAAS,MAAM,kBAIrC,CAAC;AAEF,eAAO,MAAM,OAAO,kBAInB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-tools.js","sources":["../../../src/core/utils/tabs-tools.ts"],"sourcesContent":["export const saveTab = (tabsKey: string, tab: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && !item.startsWith(`${tabsKey}=`)) || [];\n items.push(`${tabsKey}=${tab}`);\n localStorage.setItem(\"r-tabs\", items.join(\";\"));\n};\n\nexport const clearTabs = () => {\n localStorage.removeItem(\"r-tabs\");\n};\n\nexport const getTab = (tabsKey: string) => {\n const store = localStorage.getItem(\"r-tabs\");\n const tab = store?.split(\";\").find((item) => item && item.startsWith(`${tabsKey}=`));\n return tab?.substring(tabsKey.length) || null;\n};\n\nexport const getTabs = () => {\n const store = localStorage.getItem(\"r-tabs\");\n const items = store?.split(\";\").filter((item) => item && /[\\w-]+=[\\w]+/.test(item)) || [];\n return items.map((item) => item.split(\"=\"));\n};\n"],"names":["saveTab","tabsKey","tab","store","localStorage","getItem","items","split","filter","item","startsWith","push","setItem","join"],"mappings":"MAAaA,EAAU,CAACC,EAAiBC,KACrC,MAAMC,EAAQC,aAAaC,QAAQ,UAC7BC,EAAQH,GAAOI,MAAM,KAAKC,OAAQC,GAASA,IAASA,EAAKC,WAAW,GAAGT,QAAgB,GAC7FK,EAAMK,KAAK,GAAGV,KAAWC,KACzBE,aAAaQ,QAAQ,SAAUN,EAAMO,KAAK"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { initializeRobindoc } from "./core/utils/initialize-robindoc";
|
|
2
|
+
export { Header } from "./components/elements/header";
|
|
3
|
+
export { Footer } from "./components/elements/footer";
|
|
4
|
+
export { RobinProvider } from "./components/elements/robin-provider";
|
|
5
|
+
export { DocsContainer } from "./components/elements/docs-container";
|
|
6
|
+
export { BlogContainer } from "./components/elements/blog-container";
|
|
7
|
+
export { PageContainer } from "./components/elements/page-container";
|
|
8
|
+
export { KeylinkToContent } from "./components/elements/keylink-to-content";
|
|
9
|
+
export { KeylinkToNavigation } from "./components/elements/keylink-to-navigation";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{initializeRobindoc}from"./core/utils/initialize-robindoc.js";export{Header}from"./components/elements/header/index.js";export{Footer}from"./components/elements/footer/index.js";export{RobinProvider}from"./components/elements/robin-provider/index.js";export{DocsContainer}from"./components/elements/docs-container/index.js";export{BlogContainer}from"./components/elements/blog-container/index.js";export{PageContainer}from"./components/elements/page-container/index.js";export{KeylinkToContent}from"./components/elements/keylink-to-content/index.js";export{KeylinkToNavigation}from"./components/elements/keylink-to-navigation/index.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|