@docusaurus/plugin-content-docs 0.0.0-4539 → 0.0.0-4540

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.
@@ -19,6 +19,11 @@ export declare type SidebarItemDoc = SidebarItemBase & {
19
19
  label?: string;
20
20
  id: string;
21
21
  };
22
+ export declare type SidebarItemHtml = SidebarItemBase & {
23
+ type: 'html';
24
+ value: string;
25
+ defaultStyle?: boolean;
26
+ };
22
27
  export declare type SidebarItemLink = SidebarItemBase & {
23
28
  type: 'link';
24
29
  href: string;
@@ -64,7 +69,7 @@ export declare type SidebarItemCategoryConfig = Expand<Optional<SidebarItemCateg
64
69
  export declare type SidebarCategoriesShorthand = {
65
70
  [sidebarCategory: string]: SidebarItemConfig[];
66
71
  };
67
- export declare type SidebarItemConfig = SidebarItemDoc | SidebarItemLink | SidebarItemAutogenerated | SidebarItemCategoryConfig | string | SidebarCategoriesShorthand;
72
+ export declare type SidebarItemConfig = SidebarItemDoc | SidebarItemHtml | SidebarItemLink | SidebarItemAutogenerated | SidebarItemCategoryConfig | string | SidebarCategoriesShorthand;
68
73
  export declare type SidebarConfig = SidebarCategoriesShorthand | SidebarItemConfig[];
69
74
  export declare type SidebarsConfig = {
70
75
  [sidebarId: string]: SidebarConfig;
@@ -73,7 +78,7 @@ export declare type NormalizedSidebarItemCategory = Expand<SidebarItemCategoryBa
73
78
  items: NormalizedSidebarItem[];
74
79
  link?: SidebarItemCategoryLink;
75
80
  }>;
76
- export declare type NormalizedSidebarItem = SidebarItemDoc | SidebarItemLink | NormalizedSidebarItemCategory | SidebarItemAutogenerated;
81
+ export declare type NormalizedSidebarItem = SidebarItemDoc | SidebarItemHtml | SidebarItemLink | NormalizedSidebarItemCategory | SidebarItemAutogenerated;
77
82
  export declare type NormalizedSidebar = NormalizedSidebarItem[];
78
83
  export declare type NormalizedSidebars = {
79
84
  [sidebarId: string]: NormalizedSidebar;
@@ -86,7 +91,7 @@ export declare type SidebarItemCategoryWithLink = Required<SidebarItemCategory,
86
91
  export declare type SidebarItemCategoryWithGeneratedIndex = SidebarItemCategoryWithLink & {
87
92
  link: SidebarItemCategoryLinkGeneratedIndex;
88
93
  };
89
- export declare type SidebarItem = SidebarItemDoc | SidebarItemLink | SidebarItemCategory;
94
+ export declare type SidebarItem = SidebarItemDoc | SidebarItemHtml | SidebarItemLink | SidebarItemCategory;
90
95
  export declare type SidebarNavigationItem = SidebarItemDoc | SidebarItemCategoryWithLink;
91
96
  export declare type Sidebar = SidebarItem[];
92
97
  export declare type SidebarItemType = SidebarItem['type'];
@@ -100,7 +105,8 @@ export declare type PropSidebarItemCategory = Expand<SidebarItemCategoryBase & {
100
105
  export declare type PropSidebarItemLink = SidebarItemLink & {
101
106
  docId?: string;
102
107
  };
103
- export declare type PropSidebarItem = PropSidebarItemLink | PropSidebarItemCategory;
108
+ export declare type PropSidebarItemHtml = SidebarItemHtml;
109
+ export declare type PropSidebarItem = PropSidebarItemLink | PropSidebarItemCategory | PropSidebarItemHtml;
104
110
  export declare type PropSidebar = PropSidebarItem[];
105
111
  export declare type PropSidebars = {
106
112
  [sidebarId: string]: PropSidebar;
@@ -28,6 +28,11 @@ const sidebarItemDocSchema = sidebarItemBaseSchema.append({
28
28
  id: utils_validation_1.Joi.string().required(),
29
29
  label: utils_validation_1.Joi.string(),
30
30
  });
31
+ const sidebarItemHtmlSchema = sidebarItemBaseSchema.append({
32
+ type: 'html',
33
+ value: utils_validation_1.Joi.string().required(),
34
+ defaultStyle: utils_validation_1.Joi.boolean().default(false),
35
+ });
31
36
  const sidebarItemLinkSchema = sidebarItemBaseSchema.append({
32
37
  type: 'link',
33
38
  href: utils_validation_1.URISchema.required(),
@@ -93,6 +98,7 @@ const sidebarItemSchema = utils_validation_1.Joi.object()
93
98
  is: utils_validation_1.Joi.string().valid('doc', 'ref').required(),
94
99
  then: sidebarItemDocSchema,
95
100
  },
101
+ { is: 'html', then: sidebarItemHtmlSchema },
96
102
  { is: 'autogenerated', then: sidebarItemAutogeneratedSchema },
97
103
  { is: 'category', then: sidebarItemCategorySchema },
98
104
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "0.0.0-4539",
3
+ "version": "0.0.0-4540",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@docusaurus/core": "0.0.0-4539",
27
- "@docusaurus/logger": "0.0.0-4539",
28
- "@docusaurus/mdx-loader": "0.0.0-4539",
29
- "@docusaurus/utils": "0.0.0-4539",
30
- "@docusaurus/utils-validation": "0.0.0-4539",
26
+ "@docusaurus/core": "0.0.0-4540",
27
+ "@docusaurus/logger": "0.0.0-4540",
28
+ "@docusaurus/mdx-loader": "0.0.0-4540",
29
+ "@docusaurus/utils": "0.0.0-4540",
30
+ "@docusaurus/utils-validation": "0.0.0-4540",
31
31
  "combine-promises": "^1.1.0",
32
32
  "fs-extra": "^10.0.0",
33
33
  "import-fresh": "^3.2.2",
@@ -40,8 +40,8 @@
40
40
  "webpack": "^5.68.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@docusaurus/module-type-aliases": "0.0.0-4539",
44
- "@docusaurus/types": "0.0.0-4539",
43
+ "@docusaurus/module-type-aliases": "0.0.0-4540",
44
+ "@docusaurus/types": "0.0.0-4540",
45
45
  "@types/js-yaml": "^4.0.0",
46
46
  "@types/picomatch": "^2.2.1",
47
47
  "commander": "^5.1.0",
@@ -57,5 +57,5 @@
57
57
  "engines": {
58
58
  "node": ">=14"
59
59
  },
60
- "gitHead": "7b82719906447f76637ad0452ad8df1d9698f805"
60
+ "gitHead": "3bb46cc9766cd9a6e87fee3407d038b45eeee93a"
61
61
  }
@@ -27,6 +27,12 @@ export type SidebarItemDoc = SidebarItemBase & {
27
27
  id: string;
28
28
  };
29
29
 
30
+ export type SidebarItemHtml = SidebarItemBase & {
31
+ type: 'html';
32
+ value: string;
33
+ defaultStyle?: boolean;
34
+ };
35
+
30
36
  export type SidebarItemLink = SidebarItemBase & {
31
37
  type: 'link';
32
38
  href: string;
@@ -87,6 +93,7 @@ export type SidebarCategoriesShorthand = {
87
93
 
88
94
  export type SidebarItemConfig =
89
95
  | SidebarItemDoc
96
+ | SidebarItemHtml
90
97
  | SidebarItemLink
91
98
  | SidebarItemAutogenerated
92
99
  | SidebarItemCategoryConfig
@@ -108,6 +115,7 @@ export type NormalizedSidebarItemCategory = Expand<
108
115
 
109
116
  export type NormalizedSidebarItem =
110
117
  | SidebarItemDoc
118
+ | SidebarItemHtml
111
119
  | SidebarItemLink
112
120
  | NormalizedSidebarItemCategory
113
121
  | SidebarItemAutogenerated;
@@ -131,6 +139,7 @@ export type SidebarItemCategoryWithGeneratedIndex =
131
139
 
132
140
  export type SidebarItem =
133
141
  | SidebarItemDoc
142
+ | SidebarItemHtml
134
143
  | SidebarItemLink
135
144
  | SidebarItemCategory;
136
145
 
@@ -158,7 +167,12 @@ export type PropSidebarItemLink = SidebarItemLink & {
158
167
  docId?: string;
159
168
  };
160
169
 
161
- export type PropSidebarItem = PropSidebarItemLink | PropSidebarItemCategory;
170
+ export type PropSidebarItemHtml = SidebarItemHtml;
171
+
172
+ export type PropSidebarItem =
173
+ | PropSidebarItemLink
174
+ | PropSidebarItemCategory
175
+ | PropSidebarItemHtml;
162
176
  export type PropSidebar = PropSidebarItem[];
163
177
  export type PropSidebars = {
164
178
  [sidebarId: string]: PropSidebar;
@@ -12,6 +12,7 @@ import type {
12
12
  SidebarItemBase,
13
13
  SidebarItemAutogenerated,
14
14
  SidebarItemDoc,
15
+ SidebarItemHtml,
15
16
  SidebarItemLink,
16
17
  SidebarItemCategoryConfig,
17
18
  SidebarItemCategoryLink,
@@ -48,6 +49,12 @@ const sidebarItemDocSchema = sidebarItemBaseSchema.append<SidebarItemDoc>({
48
49
  label: Joi.string(),
49
50
  });
50
51
 
52
+ const sidebarItemHtmlSchema = sidebarItemBaseSchema.append<SidebarItemHtml>({
53
+ type: 'html',
54
+ value: Joi.string().required(),
55
+ defaultStyle: Joi.boolean().default(false),
56
+ });
57
+
51
58
  const sidebarItemLinkSchema = sidebarItemBaseSchema.append<SidebarItemLink>({
52
59
  type: 'link',
53
60
  href: URISchema.required(),
@@ -117,6 +124,7 @@ const sidebarItemSchema: Joi.Schema<SidebarItemConfig> = Joi.object()
117
124
  is: Joi.string().valid('doc', 'ref').required(),
118
125
  then: sidebarItemDocSchema,
119
126
  },
127
+ {is: 'html', then: sidebarItemHtmlSchema},
120
128
  {is: 'autogenerated', then: sidebarItemAutogeneratedSchema},
121
129
  {is: 'category', then: sidebarItemCategorySchema},
122
130
  {