@docusaurus/theme-common 4.0.0-canary-6840 → 4.0.0-canary-6842
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/colorMode.d.ts +1 -1
- package/lib/contexts/colorMode.d.ts.map +1 -1
- package/lib/utils/IntlUtils.d.ts +0 -1
- package/lib/utils/IntlUtils.d.ts.map +1 -1
- package/lib/utils/IntlUtils.js +1 -1
- package/lib/utils/IntlUtils.js.map +1 -1
- package/lib/utils/useThemeConfig.d.ts +5 -5
- package/lib/utils/useThemeConfig.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/contexts/colorMode.tsx +1 -1
- package/src/utils/IntlUtils.ts +1 -1
- package/src/utils/useThemeConfig.ts +5 -5
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactNode } from 'react';
|
|
8
8
|
export type ColorMode = 'light' | 'dark';
|
|
9
|
-
|
|
9
|
+
type ColorModeChoice = ColorMode | null;
|
|
10
10
|
type ContextValue = {
|
|
11
11
|
/** The effective color mode. */
|
|
12
12
|
readonly colorMode: ColorMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorMode.d.ts","sourceRoot":"","sources":["../../src/contexts/colorMode.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAIzC,
|
|
1
|
+
{"version":3,"file":"colorMode.d.ts","sourceRoot":"","sources":["../../src/contexts/colorMode.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAIzC,KAAK,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;AAyBxC,KAAK,YAAY,GAAG;IAClB,gCAAgC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,0BAA0B;IAC1B,QAAQ,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;CAC7D,CAAC;AAqLF,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,SAAS,CAGZ;AAED,wBAAgB,YAAY,IAAI,YAAY,CAS3C"}
|
package/lib/utils/IntlUtils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/IntlUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/IntlUtils.ts"],"names":[],"mappings":"AAeA,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,IAAI,CAAC,qBAA0B,GACvC,IAAI,CAAC,cAAc,CASrB"}
|
package/lib/utils/IntlUtils.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
8
|
-
|
|
8
|
+
function useCalendar() {
|
|
9
9
|
const { i18n: { currentLocale, localeConfigs }, } = useDocusaurusContext();
|
|
10
10
|
return localeConfigs[currentLocale].calendar;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlUtils.js","sourceRoot":"","sources":["../../src/utils/IntlUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AAEpE,
|
|
1
|
+
{"version":3,"file":"IntlUtils.js","sourceRoot":"","sources":["../../src/utils/IntlUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AAEpE,SAAS,WAAW;IAClB,MAAM,EACJ,IAAI,EAAE,EAAC,aAAa,EAAE,aAAa,EAAC,GACrC,GAAG,oBAAoB,EAAE,CAAC;IAC3B,OAAO,aAAa,CAAC,aAAa,CAAE,CAAC,QAAQ,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,OAAO,GAA+B,EAAE;IAExC,MAAM,EACJ,IAAI,EAAE,EAAC,aAAa,EAAC,GACtB,GAAG,oBAAoB,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE;QAC5C,QAAQ;QACR,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -8,7 +8,7 @@ import type { PrismTheme } from 'prism-react-renderer';
|
|
|
8
8
|
import type { DeepPartial } from 'utility-types';
|
|
9
9
|
import type { MagicCommentConfig } from './codeBlockUtils';
|
|
10
10
|
import type { ColorMode } from '../contexts/colorMode';
|
|
11
|
-
|
|
11
|
+
type DocsVersionPersistence = 'localStorage' | 'none';
|
|
12
12
|
export type NavbarItem = {
|
|
13
13
|
type?: string;
|
|
14
14
|
items?: NavbarItem[];
|
|
@@ -41,14 +41,14 @@ export type ColorModeConfig = {
|
|
|
41
41
|
disableSwitch: boolean;
|
|
42
42
|
respectPrefersColorScheme: boolean;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type AnnouncementBarConfig = {
|
|
45
45
|
id: string;
|
|
46
46
|
content: string;
|
|
47
47
|
backgroundColor: string;
|
|
48
48
|
textColor: string;
|
|
49
49
|
isCloseable: boolean;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
type PrismConfig = {
|
|
52
52
|
theme: PrismTheme;
|
|
53
53
|
darkTheme?: PrismTheme;
|
|
54
54
|
defaultLanguage?: string;
|
|
@@ -71,7 +71,7 @@ export type FooterColumnItem = {
|
|
|
71
71
|
items: FooterLinkItem[];
|
|
72
72
|
};
|
|
73
73
|
export type FooterLogo = BaseLogo;
|
|
74
|
-
|
|
74
|
+
type FooterBase = {
|
|
75
75
|
style: 'light' | 'dark';
|
|
76
76
|
logo?: FooterLogo;
|
|
77
77
|
copyright?: string;
|
|
@@ -83,7 +83,7 @@ export type SimpleFooter = FooterBase & {
|
|
|
83
83
|
links: FooterLinkItem[];
|
|
84
84
|
};
|
|
85
85
|
export type Footer = MultiColumnFooter | SimpleFooter;
|
|
86
|
-
|
|
86
|
+
type TableOfContents = {
|
|
87
87
|
minHeadingLevel: number;
|
|
88
88
|
maxHeadingLevel: number;
|
|
89
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeConfig.d.ts","sourceRoot":"","sources":["../../src/utils/useThemeConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"useThemeConfig.d.ts","sourceRoot":"","sources":["../../src/utils/useThemeConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAErD,KAAK,sBAAsB,GAAG,cAAc,GAAG,MAAM,CAAC;AAGtD,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C;AAIF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE;QACJ,kBAAkB,EAAE,sBAAsB,CAAC;QAC3C,OAAO,EAAE;YACP,QAAQ,EAAE,OAAO,CAAC;YAClB,sBAAsB,EAAE,OAAO,CAAC;SACjC,CAAC;KACH,CAAC;IAEF,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,WAAW,EAAE,OAAO,CAAC;SACtB,CAAC;KACH,CAAC;IAOF,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,eAAe,CAAC;IAC3B,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,EAAE,CAAC;IACpC,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;AAEvD;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-common",
|
|
3
|
-
"version": "4.0.0-canary-
|
|
3
|
+
"version": "4.0.0-canary-6842",
|
|
4
4
|
"description": "Common code for Docusaurus themes.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@docusaurus/mdx-loader": "4.0.0-canary-
|
|
34
|
-
"@docusaurus/module-type-aliases": "4.0.0-canary-
|
|
35
|
-
"@docusaurus/utils": "4.0.0-canary-
|
|
36
|
-
"@docusaurus/utils-common": "4.0.0-canary-
|
|
33
|
+
"@docusaurus/mdx-loader": "4.0.0-canary-6842",
|
|
34
|
+
"@docusaurus/module-type-aliases": "4.0.0-canary-6842",
|
|
35
|
+
"@docusaurus/utils": "4.0.0-canary-6842",
|
|
36
|
+
"@docusaurus/utils-common": "4.0.0-canary-6842",
|
|
37
37
|
"@types/history": "^4.7.11",
|
|
38
38
|
"@types/react": "19.3.0",
|
|
39
39
|
"@types/react-router-config": "^5.0.11",
|
|
@@ -44,11 +44,12 @@
|
|
|
44
44
|
"utility-types": "^3.11.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@docusaurus/core": "4.0.0-canary-
|
|
48
|
-
"@docusaurus/types": "4.0.0-canary-
|
|
47
|
+
"@docusaurus/core": "4.0.0-canary-6842",
|
|
48
|
+
"@docusaurus/types": "4.0.0-canary-6842",
|
|
49
49
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
50
50
|
"fs-extra": "^11.4.0",
|
|
51
|
-
"lodash": "^4.18.1"
|
|
51
|
+
"lodash": "^4.18.1",
|
|
52
|
+
"react-router-dom": "^5.3.4"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"react": "^19.3.0",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"engines": {
|
|
58
59
|
"node": ">=24.21"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "631fd51d00303096997d355ae6b6c525b0775c2c"
|
|
61
62
|
}
|
|
@@ -23,7 +23,7 @@ export type ColorMode = 'light' | 'dark';
|
|
|
23
23
|
|
|
24
24
|
// The color mode explicitly chosen by the user
|
|
25
25
|
// null => no choice has been made, or the choice has been reverted to OS value
|
|
26
|
-
|
|
26
|
+
type ColorModeChoice = ColorMode | null;
|
|
27
27
|
|
|
28
28
|
function getSystemColorMode(): ColorMode {
|
|
29
29
|
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
package/src/utils/IntlUtils.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type {DeepPartial} from 'utility-types';
|
|
|
11
11
|
import type {MagicCommentConfig} from './codeBlockUtils';
|
|
12
12
|
import type {ColorMode} from '../contexts/colorMode';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
type DocsVersionPersistence = 'localStorage' | 'none';
|
|
15
15
|
|
|
16
16
|
// TODO improve types, use unions
|
|
17
17
|
export type NavbarItem = {
|
|
@@ -50,7 +50,7 @@ export type ColorModeConfig = {
|
|
|
50
50
|
respectPrefersColorScheme: boolean;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
type AnnouncementBarConfig = {
|
|
54
54
|
id: string;
|
|
55
55
|
content: string;
|
|
56
56
|
backgroundColor: string;
|
|
@@ -58,7 +58,7 @@ export type AnnouncementBarConfig = {
|
|
|
58
58
|
isCloseable: boolean;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
type PrismConfig = {
|
|
62
62
|
theme: PrismTheme;
|
|
63
63
|
darkTheme?: PrismTheme;
|
|
64
64
|
defaultLanguage?: string;
|
|
@@ -83,7 +83,7 @@ export type FooterColumnItem = {
|
|
|
83
83
|
|
|
84
84
|
export type FooterLogo = BaseLogo;
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
type FooterBase = {
|
|
87
87
|
style: 'light' | 'dark';
|
|
88
88
|
logo?: FooterLogo;
|
|
89
89
|
copyright?: string;
|
|
@@ -99,7 +99,7 @@ export type SimpleFooter = FooterBase & {
|
|
|
99
99
|
|
|
100
100
|
export type Footer = MultiColumnFooter | SimpleFooter;
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
type TableOfContents = {
|
|
103
103
|
minHeadingLevel: number;
|
|
104
104
|
maxHeadingLevel: number;
|
|
105
105
|
};
|