@docusaurus/theme-common 3.3.2 → 3.5.0
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/lib/contexts/announcementBar.d.ts +0 -1
- package/lib/contexts/announcementBar.d.ts.map +1 -1
- package/lib/contexts/announcementBar.js +4 -4
- package/lib/contexts/announcementBar.js.map +1 -1
- package/lib/index.d.ts +5 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -6
- package/lib/index.js.map +1 -1
- package/lib/internal.d.ts +2 -9
- package/lib/internal.d.ts.map +1 -1
- package/lib/internal.js +2 -9
- package/lib/internal.js.map +1 -1
- package/lib/translations/blogTranslations.d.ts +19 -0
- package/lib/translations/blogTranslations.d.ts.map +1 -0
- package/lib/translations/blogTranslations.js +48 -0
- package/lib/translations/blogTranslations.js.map +1 -0
- package/lib/{utils/unlistedUtils.d.ts → translations/contentVisibilityTranslations.d.ts} +3 -2
- package/lib/translations/contentVisibilityTranslations.d.ts.map +1 -0
- package/lib/translations/contentVisibilityTranslations.js +39 -0
- package/lib/translations/contentVisibilityTranslations.js.map +1 -0
- package/lib/utils/ThemeClassNames.d.ts +3 -0
- package/lib/utils/ThemeClassNames.d.ts.map +1 -1
- package/lib/utils/ThemeClassNames.js +3 -0
- package/lib/utils/ThemeClassNames.js.map +1 -1
- package/lib/utils/errorBoundaryUtils.d.ts +0 -1
- package/lib/utils/errorBoundaryUtils.d.ts.map +1 -1
- package/lib/utils/jsUtils.d.ts +1 -0
- package/lib/utils/jsUtils.d.ts.map +1 -1
- package/lib/utils/jsUtils.js +14 -0
- package/lib/utils/jsUtils.js.map +1 -1
- package/lib/utils/searchUtils.d.ts +0 -13
- package/lib/utils/searchUtils.d.ts.map +1 -1
- package/lib/utils/searchUtils.js +0 -39
- package/lib/utils/searchUtils.js.map +1 -1
- package/lib/utils/storageUtils.d.ts +3 -4
- package/lib/utils/storageUtils.d.ts.map +1 -1
- package/lib/utils/storageUtils.js +7 -3
- package/lib/utils/storageUtils.js.map +1 -1
- package/lib/utils/tabsUtils.d.ts +2 -2
- package/lib/utils/tabsUtils.d.ts.map +1 -1
- package/lib/utils/useThemeConfig.d.ts +5 -0
- package/lib/utils/useThemeConfig.d.ts.map +1 -1
- package/lib/utils/useThemeConfig.js.map +1 -1
- package/package.json +9 -11
- package/src/contexts/announcementBar.tsx +4 -6
- package/src/index.ts +27 -16
- package/src/internal.ts +8 -36
- package/src/translations/blogTranslations.tsx +79 -0
- package/src/{utils/unlistedUtils.tsx → translations/contentVisibilityTranslations.tsx} +25 -2
- package/src/types.d.ts +0 -3
- package/src/utils/ThemeClassNames.ts +3 -0
- package/src/utils/jsUtils.ts +18 -0
- package/src/utils/searchUtils.ts +0 -58
- package/src/utils/storageUtils.ts +8 -4
- package/src/utils/useThemeConfig.ts +6 -0
- package/lib/contexts/blogPost.d.ts +0 -33
- package/lib/contexts/blogPost.d.ts.map +0 -1
- package/lib/contexts/blogPost.js +0 -46
- package/lib/contexts/blogPost.js.map +0 -1
- package/lib/contexts/doc.d.ts +0 -30
- package/lib/contexts/doc.d.ts.map +0 -1
- package/lib/contexts/doc.js +0 -48
- package/lib/contexts/doc.js.map +0 -1
- package/lib/contexts/docSidebarItemsExpandedState.d.ts +0 -31
- package/lib/contexts/docSidebarItemsExpandedState.d.ts.map +0 -1
- package/lib/contexts/docSidebarItemsExpandedState.js +0 -28
- package/lib/contexts/docSidebarItemsExpandedState.js.map +0 -1
- package/lib/contexts/docsPreferredVersion.d.ts +0 -30
- package/lib/contexts/docsPreferredVersion.d.ts.map +0 -1
- package/lib/contexts/docsPreferredVersion.js +0 -130
- package/lib/contexts/docsPreferredVersion.js.map +0 -1
- package/lib/contexts/docsSidebar.d.ts +0 -26
- package/lib/contexts/docsSidebar.d.ts.map +0 -1
- package/lib/contexts/docsSidebar.js +0 -30
- package/lib/contexts/docsSidebar.js.map +0 -1
- package/lib/contexts/docsVersion.d.ts +0 -20
- package/lib/contexts/docsVersion.d.ts.map +0 -1
- package/lib/contexts/docsVersion.js +0 -26
- package/lib/contexts/docsVersion.js.map +0 -1
- package/lib/utils/blogUtils.d.ts +0 -13
- package/lib/utils/blogUtils.d.ts.map +0 -1
- package/lib/utils/blogUtils.js +0 -24
- package/lib/utils/blogUtils.js.map +0 -1
- package/lib/utils/docsUtils.d.ts +0 -109
- package/lib/utils/docsUtils.d.ts.map +0 -1
- package/lib/utils/docsUtils.js +0 -276
- package/lib/utils/docsUtils.js.map +0 -1
- package/lib/utils/structuredDataUtils.d.ts +0 -12
- package/lib/utils/structuredDataUtils.d.ts.map +0 -1
- package/lib/utils/structuredDataUtils.js +0 -123
- package/lib/utils/structuredDataUtils.js.map +0 -1
- package/lib/utils/unlistedUtils.d.ts.map +0 -1
- package/lib/utils/unlistedUtils.js +0 -26
- package/lib/utils/unlistedUtils.js.map +0 -1
- package/src/contexts/blogPost.tsx +0 -80
- package/src/contexts/doc.tsx +0 -71
- package/src/contexts/docSidebarItemsExpandedState.tsx +0 -55
- package/src/contexts/docsPreferredVersion.tsx +0 -251
- package/src/contexts/docsSidebar.tsx +0 -50
- package/src/contexts/docsVersion.tsx +0 -36
- package/src/utils/blogUtils.ts +0 -32
- package/src/utils/docsUtils.tsx +0 -418
- package/src/utils/structuredDataUtils.ts +0 -177
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactNode } from 'react';
|
|
8
|
-
export declare const AnnouncementBarDismissStorageKey = "docusaurus.announcement.dismiss";
|
|
9
8
|
type ContextValue = {
|
|
10
9
|
/** Whether the announcement bar should be displayed. */
|
|
11
10
|
readonly isActive: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"announcementBar.d.ts","sourceRoot":"","sources":["../../src/contexts/announcementBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"announcementBar.d.ts","sourceRoot":"","sources":["../../src/contexts/announcementBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAkBf,KAAK,YAAY,GAAG;IAClB,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AA8DF,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CAGd;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAMjD"}
|
|
@@ -9,10 +9,10 @@ import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
|
9
9
|
import { createStorageSlot } from '../utils/storageUtils';
|
|
10
10
|
import { ReactContextError } from '../utils/reactUtils';
|
|
11
11
|
import { useThemeConfig } from '../utils/useThemeConfig';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const AnnouncementBarDismissStorage = createStorageSlot(
|
|
15
|
-
const IdStorage = createStorageSlot(
|
|
12
|
+
// Keep these keys in sync with the inlined script
|
|
13
|
+
// See packages/docusaurus-theme-classic/src/inlineScripts.ts
|
|
14
|
+
const AnnouncementBarDismissStorage = createStorageSlot('docusaurus.announcement.dismiss');
|
|
15
|
+
const IdStorage = createStorageSlot('docusaurus.announcement.id');
|
|
16
16
|
const isDismissedInStorage = () => AnnouncementBarDismissStorage.get() === 'true';
|
|
17
17
|
const setDismissedInStorage = (bool) => AnnouncementBarDismissStorage.set(String(bool));
|
|
18
18
|
const Context = React.createContext(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"announcementBar.js","sourceRoot":"","sources":["../../src/contexts/announcementBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EACZ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QACxC,KAAK,EAAE,WAAW;KACnB,CAAC,EACF,CAAC,eAAe,EAAE,QAAQ,EAAE,WAAW,CAAC,CACzC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,EACtC,QAAQ,GAGT;IACC,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
export declare function useCurrentSidebarCategory(...args: unknown[]): unknown;
|
|
8
|
+
export declare function filterDocCardListItems(...args: unknown[]): unknown;
|
|
9
|
+
export declare function useDocsPreferredVersion(...args: unknown[]): unknown;
|
|
7
10
|
export { useThemeConfig, type ThemeConfig, type UserThemeConfig, type Navbar, type NavbarItem, type NavbarLogo, type MultiColumnFooter, type SimpleFooter, type Footer, type FooterLogo, type FooterLinkItem, type ColorModeConfig, } from './utils/useThemeConfig';
|
|
8
11
|
export { default as ThemedComponent } from './components/ThemedComponent';
|
|
9
12
|
export { createStorageSlot, useStorageSlot, listStorageKeys, } from './utils/storageUtils';
|
|
10
|
-
export { useContextualSearchFilters } from './utils/searchUtils';
|
|
11
|
-
export { useCurrentSidebarCategory, filterDocCardListItems, } from './utils/docsUtils';
|
|
12
|
-
export { useBlogListPageStructuredData, useBlogPostStructuredData, } from './utils/structuredDataUtils';
|
|
13
13
|
export { usePluralForm } from './utils/usePluralForm';
|
|
14
14
|
export { useCollapsible, Collapsible } from './components/Collapsible';
|
|
15
15
|
export { ThemeClassNames } from './utils/ThemeClassNames';
|
|
@@ -23,12 +23,11 @@ export { translateTagsPageTitle, listTagsByLetters, type TagLetterEntry, } from
|
|
|
23
23
|
export { useSearchQueryString, useSearchLinkCreator, } from './hooks/useSearchPage';
|
|
24
24
|
export { isMultiColumnFooterLinks } from './utils/footerUtils';
|
|
25
25
|
export { isRegexpStringMatch } from './utils/regexpUtils';
|
|
26
|
-
export { duplicates, uniq } from './utils/jsUtils';
|
|
26
|
+
export { duplicates, uniq, groupBy } from './utils/jsUtils';
|
|
27
27
|
export { usePrismTheme } from './hooks/usePrismTheme';
|
|
28
|
-
export { useDocsPreferredVersion } from './contexts/docsPreferredVersion';
|
|
29
28
|
export { processAdmonitionProps } from './utils/admonitionUtils';
|
|
30
29
|
export { useHistorySelector, useQueryString, useQueryStringList, useClearQueryString, } from './utils/historyUtils';
|
|
31
30
|
export { SkipToContentFallbackId, SkipToContentLink, } from './utils/skipToContentUtils';
|
|
32
|
-
export { UnlistedBannerTitle, UnlistedBannerMessage, UnlistedMetadata, } from './
|
|
31
|
+
export { UnlistedBannerTitle, UnlistedBannerMessage, UnlistedMetadata, DraftBannerTitle, DraftBannerMessage, } from './translations/contentVisibilityTranslations';
|
|
33
32
|
export { ErrorBoundaryTryAgainButton, ErrorBoundaryError, ErrorBoundaryErrorMessageFallback, ErrorCauseBoundary, } from './utils/errorBoundaryUtils';
|
|
34
33
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX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This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
// TODO Docusaurus v4: remove these workarounds as a breaking change
|
|
8
|
+
// and remove docs plugin peerDeps in theme-common/package.json
|
|
9
|
+
// This is public API surface that we need to keep for v3
|
|
10
|
+
// See https://github.com/facebook/docusaurus/pull/10316
|
|
11
|
+
export function useCurrentSidebarCategory(...args) {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
13
|
+
return require('@docusaurus/plugin-content-docs/client').useCurrentSidebarCategory(...args);
|
|
14
|
+
}
|
|
15
|
+
export function filterDocCardListItems(...args) {
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
17
|
+
return require('@docusaurus/plugin-content-docs/client').filterDocCardListItems(...args);
|
|
18
|
+
}
|
|
19
|
+
export function useDocsPreferredVersion(...args) {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
21
|
+
return require('@docusaurus/plugin-content-docs/client').useDocsPreferredVersion(...args);
|
|
22
|
+
}
|
|
7
23
|
/*
|
|
8
24
|
* APIs to document
|
|
9
25
|
*/
|
|
10
26
|
export { useThemeConfig, } from './utils/useThemeConfig';
|
|
11
27
|
export { default as ThemedComponent } from './components/ThemedComponent';
|
|
12
28
|
export { createStorageSlot, useStorageSlot, listStorageKeys, } from './utils/storageUtils';
|
|
13
|
-
export { useContextualSearchFilters } from './utils/searchUtils';
|
|
14
|
-
export { useCurrentSidebarCategory, filterDocCardListItems, } from './utils/docsUtils';
|
|
15
|
-
export { useBlogListPageStructuredData, useBlogPostStructuredData, } from './utils/structuredDataUtils';
|
|
16
29
|
export { usePluralForm } from './utils/usePluralForm';
|
|
17
30
|
export { useCollapsible, Collapsible } from './components/Collapsible';
|
|
18
31
|
export { ThemeClassNames } from './utils/ThemeClassNames';
|
|
@@ -30,12 +43,11 @@ export { translateTagsPageTitle, listTagsByLetters, } from './utils/tagsUtils';
|
|
|
30
43
|
export { useSearchQueryString, useSearchLinkCreator, } from './hooks/useSearchPage';
|
|
31
44
|
export { isMultiColumnFooterLinks } from './utils/footerUtils';
|
|
32
45
|
export { isRegexpStringMatch } from './utils/regexpUtils';
|
|
33
|
-
export { duplicates, uniq } from './utils/jsUtils';
|
|
46
|
+
export { duplicates, uniq, groupBy } from './utils/jsUtils';
|
|
34
47
|
export { usePrismTheme } from './hooks/usePrismTheme';
|
|
35
|
-
export { useDocsPreferredVersion } from './contexts/docsPreferredVersion';
|
|
36
48
|
export { processAdmonitionProps } from './utils/admonitionUtils';
|
|
37
49
|
export { useHistorySelector, useQueryString, useQueryStringList, useClearQueryString, } from './utils/historyUtils';
|
|
38
50
|
export { SkipToContentFallbackId, SkipToContentLink, } from './utils/skipToContentUtils';
|
|
39
|
-
export { UnlistedBannerTitle, UnlistedBannerMessage, UnlistedMetadata, } from './
|
|
51
|
+
export { UnlistedBannerTitle, UnlistedBannerMessage, UnlistedMetadata, DraftBannerTitle, DraftBannerMessage, } from './translations/contentVisibilityTranslations';
|
|
40
52
|
export { ErrorBoundaryTryAgainButton, ErrorBoundaryError, ErrorBoundaryErrorMessageFallback, ErrorCauseBoundary, } from './utils/errorBoundaryUtils';
|
|
41
53
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oEAAoE;AACpE,gEAAgE;AAChE,0DAA0D;AAC1D,yDAAyD;AACzD,MAAM,UAAU,yBAAyB,CAAC,GAAG,IAAe;IAC1D,8DAA8D;IAC9D,OAAO,OAAO,CAAC,wCAAwC,CAAC,CAAC,yBAAyB,CAChF,GAAG,IAAI,CACR,CAAC;AACJ,CAAC;AACD,M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CAAC;AAE7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,iCAAiC,EACjC,kBAAkB,GACnB,MAAM,4BAA4B,CAAC"}
|
package/lib/internal.d.ts
CHANGED
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
export * from './index';
|
|
8
|
-
export { DocSidebarItemsExpandedStateProvider, useDocSidebarItemsExpandedState, } from './contexts/docSidebarItemsExpandedState';
|
|
9
|
-
export { DocsVersionProvider, useDocsVersion } from './contexts/docsVersion';
|
|
10
|
-
export { DocsSidebarProvider, useDocsSidebar } from './contexts/docsSidebar';
|
|
11
|
-
export { DocProvider, useDoc, type DocContextValue } from './contexts/doc';
|
|
12
|
-
export { BlogPostProvider, useBlogPost, type BlogPostContextValue, } from './contexts/blogPost';
|
|
13
|
-
export { useDocsPreferredVersionByPluginId, DocsPreferredVersionContextProvider, } from './contexts/docsPreferredVersion';
|
|
14
8
|
export { AnnouncementBarProvider, useAnnouncementBar, } from './contexts/announcementBar';
|
|
15
9
|
export { useTabs, sanitizeTabsChildren } from './utils/tabsUtils';
|
|
16
10
|
export type { TabValue, TabsProps, TabItemProps } from './utils/tabsUtils';
|
|
@@ -19,8 +13,7 @@ export { useNavbarSecondaryMenu } from './contexts/navbarSecondaryMenu/display';
|
|
|
19
13
|
export { ColorModeProvider } from './contexts/colorMode';
|
|
20
14
|
export { useAlternatePageUtils } from './utils/useAlternatePageUtils';
|
|
21
15
|
export { parseCodeBlockTitle, parseLanguage, parseLines, containsLineNumbers, } from './utils/codeBlockUtils';
|
|
22
|
-
export {
|
|
23
|
-
export { isDocsPluginEnabled, useDocById, findSidebarCategory, findFirstSidebarItemLink, isActiveSidebarItem, isVisibleSidebarItem, useVisibleSidebarItems, useSidebarBreadcrumbs, useDocsVersionCandidates, useLayoutDoc, useLayoutDocsSidebar, useDocRootMetadata, } from './utils/docsUtils';
|
|
16
|
+
export { DEFAULT_SEARCH_TAG } from './utils/searchUtils';
|
|
24
17
|
export { useTitleFormatter } from './utils/generalUtils';
|
|
25
18
|
export { useLocationChange } from './utils/useLocationChange';
|
|
26
19
|
export { useLocalPathname } from './utils/useLocalPathname';
|
|
@@ -31,7 +24,6 @@ export { useHomePageRoute, isSamePath } from './utils/routesUtils';
|
|
|
31
24
|
export { PluginHtmlClassNameProvider } from './utils/metadataUtils';
|
|
32
25
|
export { splitNavbarItems, NavbarProvider } from './utils/navbarUtils';
|
|
33
26
|
export { useTOCHighlight, type TOCHighlightConfig, } from './hooks/useTOCHighlight';
|
|
34
|
-
export { useVisibleBlogSidebarItems } from './utils/blogUtils';
|
|
35
27
|
export { useDateTimeFormat } from './utils/IntlUtils';
|
|
36
28
|
export { useHideableNavbar } from './hooks/useHideableNavbar';
|
|
37
29
|
export { useKeyboardNavigation, keyboardFocusedClassName, } from './hooks/useKeyboardNavigation';
|
|
@@ -39,4 +31,5 @@ export { useLockBodyScroll } from './hooks/useLockBodyScroll';
|
|
|
39
31
|
export { useCodeWordWrap } from './hooks/useCodeWordWrap';
|
|
40
32
|
export { getPrismCssVariables } from './utils/codeBlockUtils';
|
|
41
33
|
export { useBackToTopButton } from './hooks/useBackToTopButton';
|
|
34
|
+
export { useBlogTagsPostsPageTitle, useBlogAuthorPageTitle, translateBlogAuthorsListPageTitle, BlogAuthorsListViewAllLabel, } from './translations/blogTranslations';
|
|
42
35
|
//# sourceMappingURL=internal.d.ts.map
|
package/lib/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAC,sBAAsB,EAAC,MAAM,wCAAwC,CAAC;AAE9E,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,KAAK,WAAW,GACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAC,2BAA2B,EAAC,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAErE,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC"}
|
package/lib/internal.js
CHANGED
|
@@ -16,12 +16,6 @@
|
|
|
16
16
|
//
|
|
17
17
|
// eslint-disable-next-line no-restricted-syntax
|
|
18
18
|
export * from './index';
|
|
19
|
-
export { DocSidebarItemsExpandedStateProvider, useDocSidebarItemsExpandedState, } from './contexts/docSidebarItemsExpandedState';
|
|
20
|
-
export { DocsVersionProvider, useDocsVersion } from './contexts/docsVersion';
|
|
21
|
-
export { DocsSidebarProvider, useDocsSidebar } from './contexts/docsSidebar';
|
|
22
|
-
export { DocProvider, useDoc } from './contexts/doc';
|
|
23
|
-
export { BlogPostProvider, useBlogPost, } from './contexts/blogPost';
|
|
24
|
-
export { useDocsPreferredVersionByPluginId, DocsPreferredVersionContextProvider, } from './contexts/docsPreferredVersion';
|
|
25
19
|
export { AnnouncementBarProvider, useAnnouncementBar, } from './contexts/announcementBar';
|
|
26
20
|
export { useTabs, sanitizeTabsChildren } from './utils/tabsUtils';
|
|
27
21
|
export { useNavbarMobileSidebar } from './contexts/navbarMobileSidebar';
|
|
@@ -29,8 +23,7 @@ export { useNavbarSecondaryMenu } from './contexts/navbarSecondaryMenu/display';
|
|
|
29
23
|
export { ColorModeProvider } from './contexts/colorMode';
|
|
30
24
|
export { useAlternatePageUtils } from './utils/useAlternatePageUtils';
|
|
31
25
|
export { parseCodeBlockTitle, parseLanguage, parseLines, containsLineNumbers, } from './utils/codeBlockUtils';
|
|
32
|
-
export {
|
|
33
|
-
export { isDocsPluginEnabled, useDocById, findSidebarCategory, findFirstSidebarItemLink, isActiveSidebarItem, isVisibleSidebarItem, useVisibleSidebarItems, useSidebarBreadcrumbs, useDocsVersionCandidates, useLayoutDoc, useLayoutDocsSidebar, useDocRootMetadata, } from './utils/docsUtils';
|
|
26
|
+
export { DEFAULT_SEARCH_TAG } from './utils/searchUtils';
|
|
34
27
|
export { useTitleFormatter } from './utils/generalUtils';
|
|
35
28
|
export { useLocationChange } from './utils/useLocationChange';
|
|
36
29
|
export { useLocalPathname } from './utils/useLocalPathname';
|
|
@@ -41,7 +34,6 @@ export { useHomePageRoute, isSamePath } from './utils/routesUtils';
|
|
|
41
34
|
export { PluginHtmlClassNameProvider } from './utils/metadataUtils';
|
|
42
35
|
export { splitNavbarItems, NavbarProvider } from './utils/navbarUtils';
|
|
43
36
|
export { useTOCHighlight, } from './hooks/useTOCHighlight';
|
|
44
|
-
export { useVisibleBlogSidebarItems } from './utils/blogUtils';
|
|
45
37
|
export { useDateTimeFormat } from './utils/IntlUtils';
|
|
46
38
|
export { useHideableNavbar } from './hooks/useHideableNavbar';
|
|
47
39
|
export { useKeyboardNavigation, keyboardFocusedClassName, } from './hooks/useKeyboardNavigation';
|
|
@@ -49,4 +41,5 @@ export { useLockBodyScroll } from './hooks/useLockBodyScroll';
|
|
|
49
41
|
export { useCodeWordWrap } from './hooks/useCodeWordWrap';
|
|
50
42
|
export { getPrismCssVariables } from './utils/codeBlockUtils';
|
|
51
43
|
export { useBackToTopButton } from './hooks/useBackToTopButton';
|
|
44
|
+
export { useBlogTagsPostsPageTitle, useBlogAuthorPageTitle, translateBlogAuthorsListPageTitle, BlogAuthorsListViewAllLabel, } from './translations/blogTranslations';
|
|
52
45
|
//# sourceMappingURL=internal.js.map
|
package/lib/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,uDAAuD;AACvD,EAAE;AACF,6DAA6D;AAC7D,gFAAgF;AAChF,yEAAyE;AACzE,oDAAoD;AACpD,EAAE;AACF,gDAAgD;AAChD,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,uDAAuD;AACvD,EAAE;AACF,6DAA6D;AAC7D,gFAAgF;AAChF,yEAAyE;AACzE,oDAAoD;AACpD,EAAE;AACF,gDAAgD;AAChD,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;A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AA2B,CAAC;AAC5D,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
export declare function useBlogTagsPostsPageTitle(tag: {
|
|
9
|
+
label: string;
|
|
10
|
+
count: number;
|
|
11
|
+
}): string;
|
|
12
|
+
export declare function useBlogAuthorPageTitle(author: {
|
|
13
|
+
key: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
count: number;
|
|
16
|
+
}): string;
|
|
17
|
+
export declare const translateBlogAuthorsListPageTitle: () => string;
|
|
18
|
+
export declare function BlogAuthorsListViewAllLabel(): ReactNode;
|
|
19
|
+
//# sourceMappingURL=blogTranslations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blogTranslations.d.ts","sourceRoot":"","sources":["../../src/translations/blogTranslations.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAsB5C,wBAAgB,yBAAyB,CAAC,GAAG,EAAE;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAUT;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAaT;AAED,eAAO,MAAM,iCAAiC,QAAO,MAKjD,CAAC;AAEL,wBAAgB,2BAA2B,IAAI,SAAS,CAQvD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Translate, { translate } from '@docusaurus/Translate';
|
|
9
|
+
import { usePluralForm } from '../utils/usePluralForm';
|
|
10
|
+
// Only used locally
|
|
11
|
+
function useBlogPostsPlural() {
|
|
12
|
+
const { selectMessage } = usePluralForm();
|
|
13
|
+
return (count) => selectMessage(count, translate({
|
|
14
|
+
id: 'theme.blog.post.plurals',
|
|
15
|
+
description: 'Pluralized label for "{count} posts". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',
|
|
16
|
+
message: 'One post|{count} posts',
|
|
17
|
+
}, { count }));
|
|
18
|
+
}
|
|
19
|
+
export function useBlogTagsPostsPageTitle(tag) {
|
|
20
|
+
const blogPostsPlural = useBlogPostsPlural();
|
|
21
|
+
return translate({
|
|
22
|
+
id: 'theme.blog.tagTitle',
|
|
23
|
+
description: 'The title of the page for a blog tag',
|
|
24
|
+
message: '{nPosts} tagged with "{tagName}"',
|
|
25
|
+
}, { nPosts: blogPostsPlural(tag.count), tagName: tag.label });
|
|
26
|
+
}
|
|
27
|
+
export function useBlogAuthorPageTitle(author) {
|
|
28
|
+
const blogPostsPlural = useBlogPostsPlural();
|
|
29
|
+
return translate({
|
|
30
|
+
id: 'theme.blog.author.pageTitle',
|
|
31
|
+
description: 'The title of the page for a blog author',
|
|
32
|
+
message: '{authorName} - {nPosts}',
|
|
33
|
+
}, {
|
|
34
|
+
nPosts: blogPostsPlural(author.count),
|
|
35
|
+
authorName: author.name || author.key,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export const translateBlogAuthorsListPageTitle = () => translate({
|
|
39
|
+
id: 'theme.blog.authorsList.pageTitle',
|
|
40
|
+
message: 'Authors',
|
|
41
|
+
description: 'The title of the authors page',
|
|
42
|
+
});
|
|
43
|
+
export function BlogAuthorsListViewAllLabel() {
|
|
44
|
+
return (<Translate id="theme.blog.authorsList.viewAll" description="The label of the link targeting the blog authors page">
|
|
45
|
+
View All Authors
|
|
46
|
+
</Translate>);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=blogTranslations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blogTranslations.js","sourceRoot":"","sources":["../../src/translations/blogTranslations.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAErD,oBAAoB;AACpB,SAAS,kBAAkB;IACzB,MAAM,EAAC,aAAa,EAAC,GAAG,aAAa,EAAE,CAAC;IACxC,OAAO,CAAC,KAAa,EAAE,EAAE,CACvB,aAAa,CACX,KAAK,EACL,SAAS,CACP;QACE,EAAE,EAAE,yBAAyB;QAC7B,WAAW,EACT,0MAA0M;QAC5M,OAAO,EAAE,wBAAwB;KAClC,EACD,EAAC,KAAK,EAAC,CACR,CACF,CAAC;AACN,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,GAGzC;IACC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,OAAO,SAAS,CACd;QACE,EAAE,EAAE,qBAAqB;QACzB,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,kCAAkC;KAC5C,EACD,EAAC,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,EAAC,CACzD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,MAItC;IACC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,OAAO,SAAS,CACd;QACE,EAAE,EAAE,6BAA6B;QACjC,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,yBAAyB;KACnC,EACD;QACE,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC;QACrC,UAAU,EAAE,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,GAAG;KACtC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAW,EAAE,CAC5D,SAAS,CAAC;IACR,EAAE,EAAE,kCAAkC;IACtC,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,+BAA+B;CAC7C,CAAC,CAAC;AAEL,MAAM,UAAU,2BAA2B;IACzC,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,gCAAgC,CACnC,WAAW,CAAC,uDAAuD,CACnE;;IACF,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare function UnlistedBannerTitle(): JSX.Element;
|
|
9
8
|
export declare function UnlistedBannerMessage(): JSX.Element;
|
|
10
9
|
export declare function UnlistedMetadata(): JSX.Element;
|
|
11
|
-
|
|
10
|
+
export declare function DraftBannerTitle(): JSX.Element;
|
|
11
|
+
export declare function DraftBannerMessage(): JSX.Element;
|
|
12
|
+
//# sourceMappingURL=contentVisibilityTranslations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentVisibilityTranslations.d.ts","sourceRoot":"","sources":["../../src/translations/contentVisibilityTranslations.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,OAAO,CAQjD;AAED,wBAAgB,qBAAqB,IAAI,GAAG,CAAC,OAAO,CASnD;AAID,wBAAgB,gBAAgB,IAAI,GAAG,CAAC,OAAO,CAM9C;AAED,wBAAgB,gBAAgB,IAAI,GAAG,CAAC,OAAO,CAQ9C;AAED,wBAAgB,kBAAkB,IAAI,GAAG,CAAC,OAAO,CAShD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Translate from '@docusaurus/Translate';
|
|
9
|
+
import Head from '@docusaurus/Head';
|
|
10
|
+
export function UnlistedBannerTitle() {
|
|
11
|
+
return (<Translate id="theme.contentVisibility.unlistedBanner.title" description="The unlisted content banner title">
|
|
12
|
+
Unlisted page
|
|
13
|
+
</Translate>);
|
|
14
|
+
}
|
|
15
|
+
export function UnlistedBannerMessage() {
|
|
16
|
+
return (<Translate id="theme.contentVisibility.unlistedBanner.message" description="The unlisted content banner message">
|
|
17
|
+
This page is unlisted. Search engines will not index it, and only users
|
|
18
|
+
having a direct link can access it.
|
|
19
|
+
</Translate>);
|
|
20
|
+
}
|
|
21
|
+
// TODO Docusaurus v4 breaking change (since it's v3 public theme-common API :/)
|
|
22
|
+
// Move this to theme/ContentVisibility/Unlisted
|
|
23
|
+
export function UnlistedMetadata() {
|
|
24
|
+
return (<Head>
|
|
25
|
+
<meta name="robots" content="noindex, nofollow"/>
|
|
26
|
+
</Head>);
|
|
27
|
+
}
|
|
28
|
+
export function DraftBannerTitle() {
|
|
29
|
+
return (<Translate id="theme.contentVisibility.draftBanner.title" description="The draft content banner title">
|
|
30
|
+
Draft page
|
|
31
|
+
</Translate>);
|
|
32
|
+
}
|
|
33
|
+
export function DraftBannerMessage() {
|
|
34
|
+
return (<Translate id="theme.contentVisibility.draftBanner.message" description="The draft content banner message">
|
|
35
|
+
This page is a draft. It will only be visible in dev and be excluded from
|
|
36
|
+
the production build.
|
|
37
|
+
</Translate>);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=contentVisibilityTranslations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentVisibilityTranslations.js","sourceRoot":"","sources":["../../src/translations/contentVisibilityTranslations.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAEpC,MAAM,UAAU,mBAAmB;IACjC,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,8CAA8C,CACjD,WAAW,CAAC,mCAAmC,CAC/C;;IACF,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,gDAAgD,CACnD,WAAW,CAAC,qCAAqC,CACjD;;;IAEF,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,iDAAiD;AACjD,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EACjD;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,2CAA2C,CAC9C,WAAW,CAAC,gCAAgC,CAC5C;;IACF,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,6CAA6C,CAChD,WAAW,CAAC,kCAAkC,CAC9C;;;IAEF,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -14,6 +14,8 @@ export declare const ThemeClassNames: {
|
|
|
14
14
|
readonly blogPostPage: "blog-post-page";
|
|
15
15
|
readonly blogTagsListPage: "blog-tags-list-page";
|
|
16
16
|
readonly blogTagPostListPage: "blog-tags-post-list-page";
|
|
17
|
+
readonly blogAuthorsListPage: "blog-authors-list-page";
|
|
18
|
+
readonly blogAuthorsPostsPage: "blog-authors-posts-page";
|
|
17
19
|
readonly docsDocPage: "docs-doc-page";
|
|
18
20
|
readonly docsTagsListPage: "docs-tags-list-page";
|
|
19
21
|
readonly docsTagDocListPage: "docs-tags-doc-list-page";
|
|
@@ -32,6 +34,7 @@ export declare const ThemeClassNames: {
|
|
|
32
34
|
readonly codeBlock: "theme-code-block";
|
|
33
35
|
readonly admonition: "theme-admonition";
|
|
34
36
|
readonly unlistedBanner: "theme-unlisted-banner";
|
|
37
|
+
readonly draftBanner: "theme-draft-banner";
|
|
35
38
|
readonly admonitionType: (type: string) => string;
|
|
36
39
|
};
|
|
37
40
|
readonly layout: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeClassNames.d.ts","sourceRoot":"","sources":["../../src/utils/ThemeClassNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;GAGG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"ThemeClassNames.d.ts","sourceRoot":"","sources":["../../src/utils/ThemeClassNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAiCD,MAAM;;;IAM/B;;OAEG;;;;;;;;;;;;;;;sDAeoC,MAAM;kDAEV,MAAM;;;;;;;;;CAYjC,CAAC"}
|
|
@@ -16,6 +16,8 @@ export const ThemeClassNames = {
|
|
|
16
16
|
blogPostPage: 'blog-post-page',
|
|
17
17
|
blogTagsListPage: 'blog-tags-list-page',
|
|
18
18
|
blogTagPostListPage: 'blog-tags-post-list-page',
|
|
19
|
+
blogAuthorsListPage: 'blog-authors-list-page',
|
|
20
|
+
blogAuthorsPostsPage: 'blog-authors-posts-page',
|
|
19
21
|
docsDocPage: 'docs-doc-page',
|
|
20
22
|
docsTagsListPage: 'docs-tags-list-page',
|
|
21
23
|
docsTagDocListPage: 'docs-tags-doc-list-page',
|
|
@@ -37,6 +39,7 @@ export const ThemeClassNames = {
|
|
|
37
39
|
codeBlock: 'theme-code-block',
|
|
38
40
|
admonition: 'theme-admonition',
|
|
39
41
|
unlistedBanner: 'theme-unlisted-banner',
|
|
42
|
+
draftBanner: 'theme-draft-banner',
|
|
40
43
|
admonitionType: (type) => `theme-admonition-${type}`,
|
|
41
44
|
},
|
|
42
45
|
layout: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeClassNames.js","sourceRoot":"","sources":["../../src/utils/ThemeClassNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,aAAa;AAEb;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE;QACJ,YAAY,EAAE,gBAAgB;QAC9B,YAAY,EAAE,gBAAgB;QAC9B,gBAAgB,EAAE,qBAAqB;QACvC,mBAAmB,EAAE,0BAA0B;QAE/C,WAAW,EAAE,eAAe;QAC5B,gBAAgB,EAAE,qBAAqB;QACvC,kBAAkB,EAAE,yBAAyB;QAE7C,OAAO,EAAE,UAAU;KACpB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,cAAc;QACpB,uDAAuD;QACvD,uCAAuC;QACvC,+DAA+D;QAC/D,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,QAAQ,EAAE,aAAa;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AE,yBAAyB;QAC1C,cAAc,EAAE,uBAAuB;QACvC,WAAW,EAAE,oBAAoB;QACjC,YAAY,EAAE,sBAAsB;QACpC,aAAa,EAAE,uBAAuB;QACtC,SAAS,EAAE,kBAAkB;QAC7B,gBAAgB,EAAE,2BAA2B;QAC7C,oBAAoB,EAAE,gCAAgC;QACtD,mBAAmB,EAAE,6BAA6B;QAClD,cAAc,EAAE,wBAAwB;QACxC,sBAAsB,EAAE,iCAAiC;QACzD,kBAAkB,EAAE,6BAA6B;QACjD,2BAA2B,EAAE,CAAC,KAAa,EAAE,EAAE,CAC7C,yCAAyC,KAAK,EAAW;QAC3D,uBAAuB,EAAE,CAAC,KAAa,EAAE,EAAE,CACzC,qCAAqC,KAAK,EAAW;QACvD,wCAAwC;KACzC;IACD,IAAI,EAAE;QACJ,wCAAwC;QACxC,iBAAiB,EAAE,4BAA4B;QAC/C,qBAAqB,EAAE,iCAAiC;KACzD;IACD,KAAK,EAAE;QACL,qBAAqB,EAAE,kCAAkC;KAC1D;CACO,CAAC"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="@docusaurus/module-type-aliases" />
|
|
8
7
|
import React, { type ComponentProps } from 'react';
|
|
9
8
|
import type { Props as ErrorProps } from '@theme/Error';
|
|
10
9
|
export declare function ErrorBoundaryTryAgainButton(props: ComponentProps<'button'>): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorBoundaryUtils.d.ts","sourceRoot":"","sources":["../../src/utils/errorBoundaryUtils.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"errorBoundaryUtils.d.ts","sourceRoot":"","sources":["../../src/utils/errorBoundaryUtils.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,cAAc,EAAC,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,cAAc,CAAC;AAGtD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,GAC9B,GAAG,CAAC,OAAO,CAUb;AAGD,wBAAgB,iCAAiC,CAAC,EAChD,KAAK,EACL,QAAQ,GACT,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAO1B;AAED,wBAAgB,kBAAkB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAIvE;AAED;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CACrD;IACE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC;CAC9D,EACD,OAAO,CACR;IACU,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK;IAIlE,MAAM,IAAI,KAAK,CAAC,SAAS;CAGnC"}
|
package/lib/utils/jsUtils.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export declare function duplicates<T>(arr: readonly T[], comparator?: (a: T, b:
|
|
|
20
20
|
* @returns An array with duplicate elements removed by reference comparison.
|
|
21
21
|
*/
|
|
22
22
|
export declare function uniq<T>(arr: T[]): T[];
|
|
23
|
+
export declare function groupBy<K extends PropertyKey, T>(items: Iterable<T>, keySelector: (item: T, index: number) => K): Partial<Record<K, T[]>>;
|
|
23
24
|
//# sourceMappingURL=jsUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jsUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,GAAG,EAAE,SAAS,CAAC,EAAE,EACjB,UAAU,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAA2B,GACtD,CAAC,EAAE,CAIL;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAGrC"}
|
|
1
|
+
{"version":3,"file":"jsUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jsUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,GAAG,EAAE,SAAS,CAAC,EAAE,EACjB,UAAU,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAA2B,GACtD,CAAC,EAAE,CAIL;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAGrC;AAKD,wBAAgB,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,EAC9C,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACzC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAUzB"}
|
package/lib/utils/jsUtils.js
CHANGED
|
@@ -26,4 +26,18 @@ export function uniq(arr) {
|
|
|
26
26
|
// Note: had problems with [...new Set()]: https://github.com/facebook/docusaurus/issues/4972#issuecomment-863895061
|
|
27
27
|
return Array.from(new Set(arr));
|
|
28
28
|
}
|
|
29
|
+
// TODO 2025: replace by std Object.groupBy ?
|
|
30
|
+
// This is a local polyfill with exact same TS signature
|
|
31
|
+
// see https://github.com/microsoft/TypeScript/blob/main/src/lib/esnext.object.d.ts
|
|
32
|
+
export function groupBy(items, keySelector) {
|
|
33
|
+
const result = {};
|
|
34
|
+
let index = 0;
|
|
35
|
+
for (const item of items) {
|
|
36
|
+
const key = keySelector(item, index);
|
|
37
|
+
result[key] ??= [];
|
|
38
|
+
result[key].push(item);
|
|
39
|
+
index += 1;
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
29
43
|
//# sourceMappingURL=jsUtils.js.map
|
package/lib/utils/jsUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsUtils.js","sourceRoot":"","sources":["../../src/utils/jsUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yCAAyC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,GAAiB,EACjB,aAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAEvD,OAAO,GAAG,CAAC,MAAM,CACf,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,MAAM,CACjE,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAI,GAAQ;IAC9B,oHAAoH;IACpH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
|
1
|
+
{"version":3,"file":"jsUtils.js","sourceRoot":"","sources":["../../src/utils/jsUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yCAAyC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,GAAiB,EACjB,aAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAEvD,OAAO,GAAG,CAAC,MAAM,CACf,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,MAAM,CACjE,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAI,GAAQ;IAC9B,oHAAoH;IACpH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,6CAA6C;AAC7C,wDAAwD;AACxD,mFAAmF;AACnF,MAAM,UAAU,OAAO,CACrB,KAAkB,EAClB,WAA0C;IAE1C,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,CAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,KAAK,IAAI,CAAC,CAAC;IACb,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -5,17 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
export declare const DEFAULT_SEARCH_TAG = "default";
|
|
8
|
-
/** The search tag to append as each doc's metadata. */
|
|
9
|
-
export declare function docVersionSearchTag(pluginId: string, versionName: string): string;
|
|
10
|
-
/**
|
|
11
|
-
* Gets the relevant context information for contextual search.
|
|
12
|
-
*
|
|
13
|
-
* The value is generic and not coupled to Algolia/DocSearch, since we may want
|
|
14
|
-
* to support multiple search engines, or allowing users to use their own search
|
|
15
|
-
* engine solution.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useContextualSearchFilters(): {
|
|
18
|
-
locale: string;
|
|
19
|
-
tags: string[];
|
|
20
|
-
};
|
|
21
8
|
//# sourceMappingURL=searchUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchUtils.d.ts","sourceRoot":"","sources":["../../src/utils/searchUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"searchUtils.d.ts","sourceRoot":"","sources":["../../src/utils/searchUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,kBAAkB,YAAY,CAAC"}
|
package/lib/utils/searchUtils.js
CHANGED
|
@@ -4,44 +4,5 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import { useAllDocsData, useActivePluginAndVersion, } from '@docusaurus/plugin-content-docs/client';
|
|
8
|
-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
|
-
import { useDocsPreferredVersionByPluginId } from '../contexts/docsPreferredVersion';
|
|
10
7
|
export const DEFAULT_SEARCH_TAG = 'default';
|
|
11
|
-
/** The search tag to append as each doc's metadata. */
|
|
12
|
-
export function docVersionSearchTag(pluginId, versionName) {
|
|
13
|
-
return `docs-${pluginId}-${versionName}`;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Gets the relevant context information for contextual search.
|
|
17
|
-
*
|
|
18
|
-
* The value is generic and not coupled to Algolia/DocSearch, since we may want
|
|
19
|
-
* to support multiple search engines, or allowing users to use their own search
|
|
20
|
-
* engine solution.
|
|
21
|
-
*/
|
|
22
|
-
export function useContextualSearchFilters() {
|
|
23
|
-
const { i18n } = useDocusaurusContext();
|
|
24
|
-
const allDocsData = useAllDocsData();
|
|
25
|
-
const activePluginAndVersion = useActivePluginAndVersion();
|
|
26
|
-
const docsPreferredVersionByPluginId = useDocsPreferredVersionByPluginId();
|
|
27
|
-
// This can't use more specialized hooks because we are mapping over all
|
|
28
|
-
// plugin instances.
|
|
29
|
-
function getDocPluginTags(pluginId) {
|
|
30
|
-
const activeVersion = activePluginAndVersion?.activePlugin.pluginId === pluginId
|
|
31
|
-
? activePluginAndVersion.activeVersion
|
|
32
|
-
: undefined;
|
|
33
|
-
const preferredVersion = docsPreferredVersionByPluginId[pluginId];
|
|
34
|
-
const latestVersion = allDocsData[pluginId].versions.find((v) => v.isLast);
|
|
35
|
-
const version = activeVersion ?? preferredVersion ?? latestVersion;
|
|
36
|
-
return docVersionSearchTag(pluginId, version.name);
|
|
37
|
-
}
|
|
38
|
-
const tags = [
|
|
39
|
-
DEFAULT_SEARCH_TAG,
|
|
40
|
-
...Object.keys(allDocsData).map(getDocPluginTags),
|
|
41
|
-
];
|
|
42
|
-
return {
|
|
43
|
-
locale: i18n.currentLocale,
|
|
44
|
-
tags,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
8
|
//# sourceMappingURL=searchUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchUtils.js","sourceRoot":"","sources":["../../src/utils/searchUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,
|
|
1
|
+
{"version":3,"file":"searchUtils.js","sourceRoot":"","sources":["../../src/utils/searchUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
export type StorageType = (typeof
|
|
7
|
+
import SiteStorage from '@generated/site-storage';
|
|
8
|
+
export type StorageType = (typeof SiteStorage)['type'] | 'none';
|
|
9
9
|
export type StorageSlot = {
|
|
10
10
|
get: () => string | null;
|
|
11
11
|
set: (value: string) => void;
|
|
@@ -22,7 +22,7 @@ export type StorageSlot = {
|
|
|
22
22
|
* security) or operations might fail individually. Please assume that using
|
|
23
23
|
* this API can be a no-op. See also https://github.com/facebook/docusaurus/issues/6036
|
|
24
24
|
*/
|
|
25
|
-
export declare function createStorageSlot(
|
|
25
|
+
export declare function createStorageSlot(keyInput: string, options?: {
|
|
26
26
|
persistence?: StorageType;
|
|
27
27
|
}): StorageSlot;
|
|
28
28
|
export declare function useStorageSlot(key: string | null, options?: {
|
|
@@ -33,5 +33,4 @@ export declare function useStorageSlot(key: string | null, options?: {
|
|
|
33
33
|
* or an empty list if browser storage can't be accessed.
|
|
34
34
|
*/
|
|
35
35
|
export declare function listStorageKeys(storageType?: StorageType): string[];
|
|
36
|
-
export {};
|
|
37
36
|
//# sourceMappingURL=storageUtils.d.ts.map
|