robindoc 0.0.1 → 1.0.1
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 +52 -1
- 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 +10 -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 +8 -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 +7 -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/pagination/index.d.ts +21 -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 +13 -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 +17 -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 +16 -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/index.d.ts +14 -0
- package/lib/components/blocks/theme/index.d.ts.map +1 -0
- package/lib/components/blocks/theme/index.js +3 -0
- package/lib/components/blocks/theme/index.js.map +1 -0
- package/lib/components/contexts/contents/context.d.ts +4 -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 +4 -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/sidebar/context.d.ts +3 -0
- package/lib/components/contexts/sidebar/context.d.ts.map +1 -0
- package/lib/components/contexts/sidebar/context.js +2 -0
- package/lib/components/contexts/sidebar/context.js.map +1 -0
- package/lib/components/contexts/sidebar/provider.d.ts +3 -0
- package/lib/components/contexts/sidebar/provider.d.ts.map +1 -0
- package/lib/components/contexts/sidebar/provider.js +3 -0
- package/lib/components/contexts/sidebar/provider.js.map +1 -0
- package/lib/components/contexts/sidebar/use-sidebar-store.d.ts +6 -0
- package/lib/components/contexts/sidebar/use-sidebar-store.d.ts.map +1 -0
- package/lib/components/contexts/sidebar/use-sidebar-store.js +3 -0
- package/lib/components/contexts/sidebar/use-sidebar-store.js.map +1 -0
- package/lib/components/elements/article/document.d.ts +29 -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 +34 -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/utils.d.ts +24 -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/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 +32 -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/main/index.d.ts +4 -0
- package/lib/components/elements/main/index.d.ts.map +1 -0
- package/lib/components/elements/main/index.js +2 -0
- package/lib/components/elements/main/index.js.map +1 -0
- package/lib/components/elements/robin-provider/index.d.ts +3 -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 +22 -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 +8 -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 +10 -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 +4 -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 +7 -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/index.d.ts +8 -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 +10 -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 +8 -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 +12 -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/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/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 +11 -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 +6 -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 +8 -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/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 +7 -0
- package/lib/core/types/search.d.ts.map +1 -0
- package/lib/core/types/structure.d.ts +14 -0
- package/lib/core/types/structure.d.ts.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 +9 -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-meta.d.ts +13 -0
- package/lib/core/utils/get-meta.d.ts.map +1 -0
- package/lib/core/utils/get-meta.js +2 -0
- package/lib/core/utils/get-meta.js.map +1 -0
- package/lib/core/utils/git-data.d.ts +11 -0
- package/lib/core/utils/git-data.d.ts.map +1 -0
- package/lib/core/utils/git-data.js +2 -0
- package/lib/core/utils/git-data.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 +4 -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-store.d.ts +5 -0
- package/lib/core/utils/tabs-store.d.ts.map +1 -0
- package/lib/core/utils/tabs-store.js +2 -0
- package/lib/core/utils/tabs-store.js.map +1 -0
- package/lib/index.d.ts +8 -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 +3 -0
- package/lib/styles.css.map +1 -0
- package/package.json +40 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/strong/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,WAAW;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAEjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/ui/strong/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface StrongProps {\n className?: string;\n}\n\nexport const Strong: React.FC<React.PropsWithChildren<StrongProps>> = ({ className, children }) => {\n return <strong className={clsx(\"r-strong\", className)}>{children}</strong>;\n};\n"],"names":["Strong","className","children","React","createElement","clsx"],"mappings":"yCAOa,MAAAA,EAAyD,EAAGC,YAAWC,cACzEC,EAAQC,cAAA,SAAA,CAAAH,UAAWI,EAAK,WAAYJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/table/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./table.scss\";\n\ninterface TableProps {\n className?: string;\n}\n\nexport const Table: React.FC<React.PropsWithChildren<TableProps>> = ({ className, children }) => {\n return <table className={clsx(\"r-table\", className)}>{children}</table>;\n};\n"],"names":["Table","className","children","React","createElement","clsx"],"mappings":"yCASa,MAAAA,EAAuD,EAAGC,YAAWC,cACvEC,EAAOC,cAAA,QAAA,CAAAH,UAAWI,EAAK,UAAWJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tbody/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface TbodyProps {\n className?: string;\n}\n\nexport const Tbody: React.FC<React.PropsWithChildren<TbodyProps>> = ({ className, children }) => {\n return <tbody className={clsx(\"r-tbody\", className)}>{children}</tbody>;\n};\n"],"names":["Tbody","className","children","React","createElement","clsx"],"mappings":"yCAOa,MAAAA,EAAuD,EAAGC,YAAWC,cACvEC,EAAOC,cAAA,QAAA,CAAAH,UAAWI,EAAK,UAAWJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/td/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/td/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./td.scss\";\n\ninterface TdProps {\n className?: string;\n}\n\nexport const Td: React.FC<React.PropsWithChildren<TdProps>> = ({ className, children }) => {\n return <td className={clsx(\"r-td\", className)}>{children}</td>;\n};\n"],"names":["Td","className","children","React","createElement","clsx"],"mappings":"yCASa,MAAAA,EAAiD,EAAGC,YAAWC,cACjEC,EAAIC,cAAA,KAAA,CAAAH,UAAWI,EAAK,OAAQJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/th/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,WAAW,CAAC;AAEnB,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/th/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./th.scss\";\n\ninterface ThProps {\n className?: string;\n}\n\nexport const Th: React.FC<React.PropsWithChildren<ThProps>> = ({ className, children }) => {\n return <th className={clsx(\"r-th\", className)}>{children}</th>;\n};\n"],"names":["Th","className","children","React","createElement","clsx"],"mappings":"yCASa,MAAAA,EAAiD,EAAGC,YAAWC,cACjEC,EAAIC,cAAA,KAAA,CAAAH,UAAWI,EAAK,OAAQJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,CAAC;AAEtB,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAE/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/thead/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\nimport \"./thead.scss\";\n\ninterface TheadProps {\n className?: string;\n}\n\nexport const Thead: React.FC<React.PropsWithChildren<TheadProps>> = ({ className, children }) => {\n return <thead className={clsx(\"r-thead\", className)}>{children}</thead>;\n};\n"],"names":["Thead","className","children","React","createElement","clsx"],"mappings":"yCASa,MAAAA,EAAuD,EAAGC,YAAWC,cACvEC,EAAOC,cAAA,QAAA,CAAAH,UAAWI,EAAK,UAAWJ,IAAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,OAAO;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAEzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/table/tr/index.tsx"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\n\ninterface TrProps {\n className?: string;\n}\n\nexport const Tr: React.FC<React.PropsWithChildren<TrProps>> = ({ className, children }) => {\n return <tr className={clsx(\"r-tr\", className)}>{children}</tr>;\n};\n"],"names":["Tr","className","children","React","createElement","clsx"],"mappings":"yCAOa,MAAAA,EAAiD,EAAGC,YAAWC,cACjEC,EAAIC,cAAA,KAAA,CAAAH,UAAWI,EAAK,OAAQJ,IAAaC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./tabs.scss";
|
|
3
|
+
export interface TabsProps {
|
|
4
|
+
insertStyles?: boolean;
|
|
5
|
+
tabsData: {
|
|
6
|
+
[tabKey: string]: JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
blockKey?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,SAAS;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAA;KAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAsBpC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import t from"react";import{TabsHeader as e}from"./tabs-header/index.js";import{TabsStyles as a}from"./tabs-styles/index.js";const s=({insertStyles:s,tabsData:r,blockKey:b})=>{const m=Object.keys(r);if(1===m.length)return r[m[0]];const n=b||m.sort().join("-");return t.createElement("div",{className:`r-tabs r-tabs__${n}`},s&&t.createElement(a,{tabs:m,tabsKey:n}),t.createElement(e,{tabs:m,tabsKey:n}),t.createElement("div",{className:`r-tab-list r-tab-list__${n}`},m.map((e=>t.createElement("div",{key:e,className:`r-tab r-tab_${e}`},r[e])))))};export{s as Tabs};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/ui/tabs/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { TabsHeader } from \"./tabs-header\";\n\nimport \"./tabs.scss\";\nimport { TabsStyles } from \"./tabs-styles\";\n\nexport interface TabsProps {\n insertStyles?: boolean;\n tabsData: { [tabKey: string]: JSX.Element };\n blockKey?: string;\n}\n\nexport const Tabs: React.FC<TabsProps> = ({ insertStyles, tabsData, blockKey }) => {\n const tabs = Object.keys(tabsData);\n\n if (tabs.length === 1) {\n return tabsData[tabs[0]];\n }\n\n const tabsKey = blockKey || tabs.sort().join(\"-\");\n\n return (\n <div className={`r-tabs r-tabs__${tabsKey}`}>\n {insertStyles && <TabsStyles tabs={tabs} tabsKey={tabsKey} />}\n <TabsHeader tabs={tabs} tabsKey={tabsKey} />\n <div className={`r-tab-list r-tab-list__${tabsKey}`}>\n {tabs.map((tabKey) => (\n <div key={tabKey} className={`r-tab r-tab_${tabKey}`}>\n {tabsData[tabKey]}\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["Tabs","insertStyles","tabsData","blockKey","tabs","Object","keys","length","tabsKey","sort","join","React","createElement","className","TabsStyles","TabsHeader","map","tabKey","key"],"mappings":"6HAYO,MAAMA,EAA4B,EAAGC,eAAcC,WAAUC,eAChE,MAAMC,EAAOC,OAAOC,KAAKJ,GAEzB,GAAoB,IAAhBE,EAAKG,OACL,OAAOL,EAASE,EAAK,IAGzB,MAAMI,EAAUL,GAAYC,EAAKK,OAAOC,KAAK,KAE7C,OACIC,EAAKC,cAAA,MAAA,CAAAC,UAAW,kBAAkBL,KAC7BP,GAAgBU,EAACC,cAAAE,EAAW,CAAAV,KAAMA,EAAMI,QAASA,IAClDG,EAACC,cAAAG,GAAWX,KAAMA,EAAMI,QAASA,IACjCG,EAAAC,cAAA,MAAA,CAAKC,UAAW,0BAA0BL,KACrCJ,EAAKY,KAAKC,GACPN,EAAKC,cAAA,MAAA,CAAAM,IAAKD,EAAQJ,UAAW,eAAeI,KACvCf,EAASe,OAK5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/tabs/tabs-header/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAqBpE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import e from"react";import{saveTab as t}from"../../../../core/utils/tabs-store.js";const a=({tabs:a,tabsKey:s})=>e.createElement("div",{className:"r-tabs-header"},a.map((a=>e.createElement("div",{key:a,className:`r-tab-header r-tab-header_${a}`,onClick:()=>(e=>{Array.from(document.documentElement.classList).forEach((e=>{e.startsWith(`r-tabs-global__${s}`)&&document.documentElement.classList.remove(e)})),document.documentElement.classList.add(`r-tabs-global__${s}`,`r-tabs-global__${s}_${e}`),t(s,e)})(a)},a))));export{a as TabsHeader};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/tabs/tabs-header/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { saveTab } from \"@src/core/utils/tabs-store\";\n\nexport const TabsHeader: React.FC<{ tabs: string[]; tabsKey: string }> = ({ tabs, tabsKey }) => {\n const changeTabHandler = (tab: string) => {\n const classNames = Array.from(document.documentElement.classList);\n classNames.forEach((className) => {\n if (className.startsWith(`r-tabs-global__${tabsKey}`)) {\n document.documentElement.classList.remove(className);\n }\n });\n document.documentElement.classList.add(`r-tabs-global__${tabsKey}`, `r-tabs-global__${tabsKey}_${tab}`);\n saveTab(tabsKey, tab);\n };\n\n return (\n <div className=\"r-tabs-header\">\n {tabs.map((tab) => (\n <div key={tab} className={`r-tab-header r-tab-header_${tab}`} onClick={() => changeTabHandler(tab)}>\n {tab}\n </div>\n ))}\n </div>\n );\n};\n"],"names":["TabsHeader","tabs","tabsKey","React","createElement","className","map","tab","key","onClick","Array","from","document","documentElement","classList","forEach","startsWith","remove","add","saveTab","changeTabHandler"],"mappings":";8CAKa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAA,CAA4D,CAAA,CAAA,CAAGC,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAa1EC,CAAKC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAC,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACVJ,CAAKK,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAKC,CACPJ,CAAAA,CAAAA,CAAAA,CAAKC,CAAA,CAAA,CAAA,CA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AK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAWhD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import a from"react";const t=({tabsKey:t,tabs:r})=>a.createElement("style",{dangerouslySetInnerHTML:{__html:`\nhtml:not(.r-tabs-global__${t}) .r-tabs__${t} .r-tab:not(.r-tab_${r[0]}) {display: none}\nhtml:not(.r-tabs-global__${t}) .r-tabs__${t} .r-tab-header_${r[0]} {background: var(--neutral50);z-index: 2;pointer-events: none;color:var(--neutral950)}\n${r.map((a=>`.r-tabs-global__${t}_${a} .r-tabs__${t} .r-tab:not(.r-tab_${a}) {display: none}`)).join("")}\n${r.map((a=>`.r-tabs-global__${t}_${a} .r-tabs__${t} .r-tab-header_${a} {background: var(--neutral50);z-index: 2;pointer-events: none;color:var(--neutral950)}`)).join("")}\n`}});export{t as TabsStyles};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ui/tabs/tabs-styles/index.tsx"],"sourcesContent":["import React from \"react\";\n\nexport interface TabsStylesProps {\n tabsKey: string;\n tabs: string[];\n}\n\nexport const TabsStyles: React.FC<TabsStylesProps> = ({ tabsKey, tabs }) => (\n <style\n dangerouslySetInnerHTML={{\n __html: `\nhtml:not(.r-tabs-global__${tabsKey}) .r-tabs__${tabsKey} .r-tab:not(.r-tab_${tabs[0]}) {display: none}\nhtml:not(.r-tabs-global__${tabsKey}) .r-tabs__${tabsKey} .r-tab-header_${tabs[0]} {background: var(--neutral50);z-index: 2;pointer-events: none;color:var(--neutral950)}\n${tabs.map((lang) => `.r-tabs-global__${tabsKey}_${lang} .r-tabs__${tabsKey} .r-tab:not(.r-tab_${lang}) {display: none}`).join(\"\")}\n${tabs.map((lang) => `.r-tabs-global__${tabsKey}_${lang} .r-tabs__${tabsKey} .r-tab-header_${lang} {background: var(--neutral50);z-index: 2;pointer-events: none;color:var(--neutral950)}`).join(\"\")}\n`,\n }}\n />\n);\n"],"names":["TabsStyles","tabsKey","tabs","React","createElement","dangerouslySetInnerHTML","__html","map","lang","join"],"mappings":"qBAOa,MAAAA,EAAwC,EAAGC,UAASC,UAC7DC,EAAAC,cAAA,QAAA,CACIC,wBAAyB,CACrBC,OAAQ,8BACOL,eAAqBA,uBAA6BC,EAAK,iDACvDD,eAAqBA,mBAAyBC,EAAK,8FAC5EA,EAAKK,KAAKC,GAAS,mBAAmBP,KAAWO,cAAiBP,uBAA6BO,uBAAyBC,KAAK,QAC7HP,EAAKK,KAAKC,GAAS,mBAAmBP,KAAWO,cAAiBP,mBAAyBO,6FAA+FC,KAAK"}
|
|
@@ -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,EAACC,cAAAC,EAAS,CAAAL,UAAWM,EAAK,YAAaN,IACnCG,EAAOC,cAAA,QAAA,CAAAJ,UAAU,gBACbG,EAAOC,cAAA,QAAA,CAAAG,KAAK,WAAWN,eAAgBA,EAAgBD,UAAU,oBACjEG,EAAMC,cAAA,OAAA,CAAAJ,UAAU,qBAAqBE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./task-ordered-list.scss";
|
|
3
|
+
interface TaskOrderedListProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const TaskOrderedList: React.FC<React.PropsWithChildren<TaskOrderedListProps>>;
|
|
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-ordered-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,0BAA0B,CAAC;AAElC,UAAU,oBAAoB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAEnF,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 } from \"../../list\";\n\nimport \"./task-ordered-list.scss\";\n\ninterface TaskOrderedListProps {\n className?: string;\n}\n\nexport const TaskOrderedList: React.FC<React.PropsWithChildren<TaskOrderedListProps>> = ({ className, children }) => {\n return <OrderedList className={clsx(\"r-task-ol\", className)}>{children}</OrderedList>;\n};\n"],"names":["TaskOrderedList","className","children","React","createElement","OrderedList","clsx"],"mappings":"wGAWa,MAAAA,EAA2E,EAAGC,YAAWC,cAC3FC,EAACC,cAAAC,EAAY,CAAAJ,UAAWK,EAAK,YAAaL,IAAaC"}
|
|
@@ -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":"4GAWa,MAAAA,EAA+E,EACxFC,YACAC,cAEOC,EAACC,cAAAC,EAAc,CAAAJ,UAAWK,EAAK,YAAaL,IAAaC"}
|
|
@@ -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":"AAAa,MAAAA,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,8BAA+B,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":"8CAGa,MAAAA,EAAiCC,IAC1C,MAAMC,EAAcC,EAA8B,MAC5CC,EAAqBD,EAA+B,MAqB1D,OAPAE,GAAU,IACC,KACCH,EAAYI,SAASC,aAAaL,EAAYI,SAC9CF,EAAmBE,SAASF,EAAmBE,QAAQE,OAAO,GAEvE,IAEI,CAAEC,QAnBOC,SAAUC,KAClBT,EAAYI,SAASC,aAAaL,EAAYI,SAC9CF,EAAmBE,UAAYF,EAAmBE,QAAQM,OAAOC,SACjET,EAAmBE,QAAQE,QAE/BN,EAAYI,QAAUQ,YAAW,KAC7BV,EAAmBE,QAAU,IAAIS,gBAEjCd,EAASG,EAAmBE,WAAYK,EAAK,GAC9C,IAAI,EAUO"}
|
|
@@ -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,GAAU,KACFC,UAAUC,UAAUC,SAAS,aAC7BL,EAAU,SAEVA,EAAU,QACb,GACF,IAEID,CAAM"}
|
|
@@ -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,GAC/C,CAED,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,MAAMC,GAASA,EAAKC,aAAeP,IAC5DI,IACAF,EAAWE,EAAUI,SAE5B,CACD,OAAON,CACV,CAED,UAAMO,CAAKC,GACP,MAAO,EACV,CAED,gBAAMC,CAAWD,GACb,OAAO,IACV,CAED,yBAAME,CAAoBF,GACtB,OAAO,IACV,CAED,gBAAMG,CAAWH,EAAcI,EAAcC,GACzC,OAAOD,CACV"}
|
|
@@ -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;IAKjC,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 e}from"fs/promises";import{glob as t}from"glob";import s from"path";import{BaseProvider as r}from"./base.js";import{extensionsMap as o}from"../data/contents.js";import{getFileUrl as a,normalizePathname as i}from"../utils/path-tools.js";class c extends r{type="local";sourceRoot;constructor(e=process.cwd()){super(e),this.sourceRoot=e.replaceAll("\\","/"),this.filesPromise=this.loadFiles("")}async getPageSourcePathname(e){const t=s.posix.join(this.sourceRoot,e).replaceAll("\\","/").replace(/\/$/,"");return super.getPageSourcePathname(e,t)}async load(t){const s=await this.getPageSourcePathname(t);if(!s)throw new Error(`Can not find file for "${t}"`);return await e(s,"utf-8")}async getFileSrc(t,r,a){if(r.match(/https?:\/\//))return r;const i=s.posix.join(process.cwd(),t?.replace(/^\//,"./")||"",r.replace(/^\//,"./")),c=s.posix.relative(process.cwd(),i),{dir:l,ext:n}=s.parse(c),p=a&&new RegExp(`^(${a?.join("|")})(/|$)`),u=p&&l.match(p);let h=r;if(u)h=`${c.replace(u[1],"")}`;else if(n in o){const t=await e(c,"base64");h=`data:${o[n]};base64,${t}`}return h}async loadFiles(e){const r=e?.replace(/^\//,""),o=(await t(["**/*.{md,mdx}","**/structure.json"],{cwd:this.sourceRoot,posix:!0})).reduce(((e,t)=>{if(!r||r&&t.startsWith(r)){const o=s.relative(process.cwd(),(this.sourceRoot||".")+"/"+t).replace(/\\/g,"/");if(t.match(/\.mdx?$/)){const s=a("/"+t),c=i(s.substring(r?.length||0)),l=c.replace(/\/[0-9]+[-_](.)/g,"/$1");e.docs.push({origPath:o,clientPath:l,origClientPath:c})}else e.structures.push(o)}return e}),{docs:[],structures:[]});return o.docs.sort(((e,t)=>e.origClientPath.localeCompare(t.origClientPath))),this.filesPromise=o,o}}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 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","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,GACtC,CAED,2BAAMC,CAAsBC,GACxB,MAAMC,EAAUC,EAAKC,MAAMC,KAAKT,KAAKL,WAAYU,GAAKJ,WAAW,KAAM,KAAKS,QAAQ,MAAO,IAC3F,OAAOX,MAAMK,sBAAsBC,EAAKC,EAC3C,CAED,UAAMK,CAAKN,GACP,MAAMO,QAAiBZ,KAAKI,sBAAsBC,GAClD,IAAKO,EACD,MAAM,IAAIC,MAAM,0BAA0BR,MAG9C,aADsBS,EAASF,EAAU,QAE5C,CAED,gBAAMG,CAAWV,EAAaW,EAAcC,GACxC,GAAID,EAAKE,MAAM,eAAgB,OAAOF,EAEtC,MAAMG,EAAYZ,EAAKC,MAAMC,KAAKZ,QAAQC,MAAOO,GAAKK,QAAQ,MAAO,OAAS,GAAIM,EAAKN,QAAQ,MAAO,OAChGU,EAAeb,EAAKC,MAAMa,SAASxB,QAAQC,MAAOqB,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,GAC5E,CACD,OAAOF,CACV,CAEO,eAAMzB,CAAU4B,GACpB,MAAMC,EAAgBD,GAAUrB,QAAQ,MAAO,IAGzCuB,SAFcC,EAAK,CAAC,gBAAiB,qBAAsB,CAAEpC,IAAKE,KAAKL,WAAYa,OAAO,KAEzE2B,QACnB,CAACC,EAAKC,KACF,IAAKL,GAAkBA,GAAiBK,EAAKC,WAAWN,GAAiB,CACrE,MAAMO,EAAWhC,EACZc,SAASxB,QAAQC,OAAQE,KAAKL,YAAc,KAAO,IAAM0C,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,kBAEP,MACGN,EAAIa,WAAWD,KAAKT,EAE3B,CACD,OAAOH,CAAG,GAEd,CAAEW,KAAM,GAAIE,WAAY,KAI5B,OAFAhB,EAASc,KAAKG,MAAK,CAACC,EAAGC,IAAMD,EAAET,eAAeW,cAAcD,EAAEV,kBAC9D1C,KAAKE,aAAe+B,EACbA,CACV"}
|
|
@@ -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;IAMjC,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){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 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","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","endsWith","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,EACrC,CAED,2BAAMY,CAAsBC,GACxB,MACMC,EADW,IAAKP,KAAKP,UAAUe,MAAM,MAAQ,MAAQF,EAAIE,MAAM,MAAMC,OAAOC,SACzDC,KAAK,KAC9B,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