dumi 2.2.3 → 2.2.5
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/compiled/crates/swc_plugin_react_demo.wasm +0 -0
- package/dist/client/theme-api/types.d.ts +1 -1
- package/dist/client/theme-api/useTabMeta.js +1 -1
- package/dist/features/theme/index.js +1 -1
- package/dist/loaders/markdown/transformer/rehypeDemo.js +1 -3
- package/package.json +43 -44
- package/theme-default/builtins/Tree/index.d.ts +2 -1
- package/theme-default/slots/ContentFooter/index.less +12 -4
- package/theme-default/slots/SearchBar/index.js +1 -1
|
Binary file
|
|
@@ -175,7 +175,7 @@ export type INavItems = (INavItem & {
|
|
|
175
175
|
children?: INavItem[];
|
|
176
176
|
})[];
|
|
177
177
|
export type INav = INavItems | Record<string, INavItems>;
|
|
178
|
-
type IUserNavItem = Pick<INavItem, 'title' | 'link'>;
|
|
178
|
+
type IUserNavItem = Pick<INavItem, 'title' | 'link' | 'activePath'>;
|
|
179
179
|
export type IUserNavMode = 'override' | 'append' | 'prepend';
|
|
180
180
|
export type IUserNavItems = (IUserNavItem & {
|
|
181
181
|
children?: IUserNavItem[];
|
|
@@ -17,7 +17,7 @@ export var useTabQueryState = function useTabQueryState() {
|
|
|
17
17
|
if (val) params.set(TAB_QUERY_KEY, val);else params.delete(TAB_QUERY_KEY);
|
|
18
18
|
history.push({
|
|
19
19
|
pathname: pathname,
|
|
20
|
-
search: params.toString()
|
|
20
|
+
search: "?".concat(params.toString())
|
|
21
21
|
});
|
|
22
22
|
}, [params]);
|
|
23
23
|
return [params.get(TAB_QUERY_KEY), setTabQueryState];
|
|
@@ -296,7 +296,7 @@ const entryExports = {
|
|
|
296
296
|
|
|
297
297
|
export default function DumiContextWrapper() {
|
|
298
298
|
const outlet = useOutlet();
|
|
299
|
-
const [loading, setLoading] = useState(
|
|
299
|
+
const [loading, setLoading] = useState(false);
|
|
300
300
|
const prev = useRef(history.location.pathname);
|
|
301
301
|
|
|
302
302
|
useEffect(() => {
|
|
@@ -36,7 +36,6 @@ __export(rehypeDemo_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(rehypeDemo_exports);
|
|
38
38
|
var import_block = __toESM(require("../../../assetParsers/block"));
|
|
39
|
-
var import_tabs = require("../../../features/tabs");
|
|
40
39
|
var import_utils = require("../../../utils");
|
|
41
40
|
var import_path = __toESM(require("path"));
|
|
42
41
|
var import_plugin_utils = require("umi/plugin-utils");
|
|
@@ -209,8 +208,7 @@ function rehypeDemo(opts) {
|
|
|
209
208
|
import_path.default.relative(opts.cwd, parseOpts.fileAbsPath)
|
|
210
209
|
));
|
|
211
210
|
} else {
|
|
212
|
-
const
|
|
213
|
-
const localId = [tabKey, opts.fileLocale, String(index++)].filter(Boolean).join("-");
|
|
211
|
+
const localId = [opts.fileLocale, String(index++)].filter(Boolean).join("-");
|
|
214
212
|
parseOpts.fileAbsPath = opts.fileAbsPath.replace(".md", ".tsx");
|
|
215
213
|
parseOpts.id = getCodeId(
|
|
216
214
|
opts.cwd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dumi",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "📖 Documentation Generator of React Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"generator",
|
|
@@ -78,37 +78,36 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@ant-design/icons-svg": "^4.2.1",
|
|
80
80
|
"@makotot/ghostui": "^2.0.0",
|
|
81
|
-
"@stackblitz/sdk": "^1.
|
|
82
|
-
"@swc/core": "1.3.
|
|
83
|
-
"@types/hast": "^2.3.
|
|
84
|
-
"@types/mdast": "^3.0.
|
|
85
|
-
"@types/nprogress": "^0.2.0",
|
|
81
|
+
"@stackblitz/sdk": "^1.9.0",
|
|
82
|
+
"@swc/core": "1.3.72",
|
|
83
|
+
"@types/hast": "^2.3.5",
|
|
84
|
+
"@types/mdast": "^3.0.12",
|
|
86
85
|
"@umijs/bundler-utils": "^4.0.73",
|
|
87
86
|
"@umijs/core": "^4.0.73",
|
|
88
87
|
"animated-scroll-to": "^2.3.0",
|
|
89
88
|
"classnames": "2.3.2",
|
|
90
89
|
"codesandbox": "^2.2.3",
|
|
91
90
|
"copy-to-clipboard": "^3.3.3",
|
|
92
|
-
"deepmerge": "^4.
|
|
91
|
+
"deepmerge": "^4.3.1",
|
|
93
92
|
"dumi-afx-deps": "^1.0.0-alpha.19",
|
|
94
93
|
"dumi-assets-types": "2.0.0-alpha.0",
|
|
95
|
-
"enhanced-resolve": "^5.
|
|
96
|
-
"estree-util-to-js": "^1.
|
|
97
|
-
"estree-util-visit": "^1.2.
|
|
98
|
-
"file-system-cache": "^2.
|
|
99
|
-
"github-slugger": "^1.
|
|
100
|
-
"hast-util-is-element": "^2.1.
|
|
101
|
-
"hast-util-raw": "^
|
|
102
|
-
"hast-util-to-estree": "^2.
|
|
94
|
+
"enhanced-resolve": "^5.15.0",
|
|
95
|
+
"estree-util-to-js": "^1.2.0",
|
|
96
|
+
"estree-util-visit": "^1.2.1",
|
|
97
|
+
"file-system-cache": "^2.4.3",
|
|
98
|
+
"github-slugger": "^1.5.0",
|
|
99
|
+
"hast-util-is-element": "^2.1.3",
|
|
100
|
+
"hast-util-raw": "^8.0.0",
|
|
101
|
+
"hast-util-to-estree": "^2.3.3",
|
|
103
102
|
"hast-util-to-string": "^2.0.0",
|
|
104
|
-
"heti": "^0.9.
|
|
103
|
+
"heti": "^0.9.4",
|
|
105
104
|
"hosted-git-info": "^6.1.1",
|
|
106
|
-
"html-to-text": "^
|
|
107
|
-
"html2sketch": "^1.0.
|
|
105
|
+
"html-to-text": "^9.0.5",
|
|
106
|
+
"html2sketch": "^1.0.2",
|
|
108
107
|
"js-yaml": "^4.1.0",
|
|
109
108
|
"lodash.throttle": "^4.1.1",
|
|
110
109
|
"mdast-util-find-and-replace": "^2.2.2",
|
|
111
|
-
"mdast-util-to-string": "^3.
|
|
110
|
+
"mdast-util-to-string": "^3.2.0",
|
|
112
111
|
"nprogress": "^0.2.0",
|
|
113
112
|
"pluralize": "^8.0.0",
|
|
114
113
|
"prism-react-renderer": "^1.3.5",
|
|
@@ -116,58 +115,58 @@
|
|
|
116
115
|
"prismjs": "^1.29.0",
|
|
117
116
|
"raw-loader": "^4.0.2",
|
|
118
117
|
"rc-motion": "^2.7.3",
|
|
119
|
-
"rc-tabs": "^12.
|
|
120
|
-
"rc-tree": "^5.7.
|
|
118
|
+
"rc-tabs": "^12.10.0",
|
|
119
|
+
"rc-tree": "^5.7.9",
|
|
121
120
|
"react-copy-to-clipboard": "^5.1.0",
|
|
122
|
-
"react-error-boundary": "^
|
|
123
|
-
"react-intl": "^6.
|
|
121
|
+
"react-error-boundary": "^4.0.10",
|
|
122
|
+
"react-intl": "^6.4.4",
|
|
124
123
|
"rehype-autolink-headings": "^6.1.1",
|
|
125
124
|
"rehype-remove-comments": "^5.0.0",
|
|
126
125
|
"rehype-stringify": "^9.0.3",
|
|
127
126
|
"remark-directive": "^2.0.1",
|
|
128
127
|
"remark-frontmatter": "^4.0.1",
|
|
129
128
|
"remark-gfm": "^3.0.1",
|
|
130
|
-
"remark-parse": "^10.0.
|
|
129
|
+
"remark-parse": "^10.0.2",
|
|
131
130
|
"remark-rehype": "^10.1.0",
|
|
132
|
-
"sass": "^1.
|
|
131
|
+
"sass": "^1.64.1",
|
|
133
132
|
"sitemap": "^7.1.1",
|
|
134
133
|
"umi": "^4.0.73",
|
|
135
134
|
"unified": "^10.1.2",
|
|
136
|
-
"unist-util-visit": "^4.1.
|
|
137
|
-
"unist-util-visit-parents": "^5.1.
|
|
138
|
-
"url": "^0.11.
|
|
135
|
+
"unist-util-visit": "^4.1.2",
|
|
136
|
+
"unist-util-visit-parents": "^5.1.3",
|
|
137
|
+
"url": "^0.11.1",
|
|
139
138
|
"v8-compile-cache": "2.3.0",
|
|
140
|
-
"vfile": "^5.3.
|
|
139
|
+
"vfile": "^5.3.7"
|
|
141
140
|
},
|
|
142
141
|
"devDependencies": {
|
|
143
|
-
"@commitlint/cli": "^17.
|
|
144
|
-
"@commitlint/config-conventional": "^17.
|
|
142
|
+
"@commitlint/cli": "^17.6.7",
|
|
143
|
+
"@commitlint/config-conventional": "^17.6.7",
|
|
145
144
|
"@types/github-slugger": "^1.3.0",
|
|
146
145
|
"@types/highlight-words-core": "^1.2.1",
|
|
147
146
|
"@types/hosted-git-info": "^3.0.2",
|
|
148
147
|
"@types/js-yaml": "^4.0.5",
|
|
149
148
|
"@types/lodash.throttle": "^4.1.7",
|
|
150
|
-
"@types/node": "^18.
|
|
151
|
-
"@types/pluralize": "^0.0.
|
|
152
|
-
"@types/react": "^18.
|
|
149
|
+
"@types/node": "^18.17.1",
|
|
150
|
+
"@types/pluralize": "^0.0.30",
|
|
151
|
+
"@types/react": "^18.2.17",
|
|
153
152
|
"@types/react-copy-to-clipboard": "^5.0.4",
|
|
154
153
|
"@umijs/lint": "^4.0.73",
|
|
155
154
|
"@umijs/plugins": "4.0.32",
|
|
156
155
|
"dumi-theme-mobile": "workspace:*",
|
|
157
|
-
"eslint": "^8.
|
|
158
|
-
"fast-glob": "^3.
|
|
156
|
+
"eslint": "^8.46.0",
|
|
157
|
+
"fast-glob": "^3.3.1",
|
|
159
158
|
"father": "^4.3.0",
|
|
160
159
|
"highlight-words-core": "^1.2.2",
|
|
161
|
-
"husky": "^8.0.
|
|
162
|
-
"lint-staged": "^13.
|
|
163
|
-
"prettier": "^2.
|
|
164
|
-
"prettier-plugin-organize-imports": "^3.
|
|
165
|
-
"prettier-plugin-packagejson": "^2.
|
|
160
|
+
"husky": "^8.0.3",
|
|
161
|
+
"lint-staged": "^13.2.3",
|
|
162
|
+
"prettier": "^2.8.8",
|
|
163
|
+
"prettier-plugin-organize-imports": "^3.2.3",
|
|
164
|
+
"prettier-plugin-packagejson": "^2.4.5",
|
|
166
165
|
"react": "^18.2.0",
|
|
167
|
-
"stylelint": "^15.10.
|
|
168
|
-
"ts-node": "^10.
|
|
166
|
+
"stylelint": "^15.10.2",
|
|
167
|
+
"ts-node": "^10.9.1",
|
|
169
168
|
"typescript": "~5.0.4",
|
|
170
|
-
"vitest": "^0.
|
|
169
|
+
"vitest": "^0.33.0"
|
|
171
170
|
},
|
|
172
171
|
"peerDependencies": {
|
|
173
172
|
"react": ">=16.8",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import './index.less';
|
|
3
|
-
declare const _default: (props: ComponentProps<'div'>) => JSX.Element;
|
|
4
|
+
declare const _default: (props: ComponentProps<'div'>) => React.JSX.Element;
|
|
4
5
|
export default _default;
|
|
@@ -94,28 +94,36 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
&[data-prev] {
|
|
97
|
-
float:
|
|
97
|
+
float: left;
|
|
98
98
|
padding-inline-end: 24px;
|
|
99
99
|
|
|
100
100
|
svg {
|
|
101
101
|
margin-inline-end: 4px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-direction='rtl'] & {
|
|
105
|
+
float: right;
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
svg {
|
|
104
108
|
transform: rotate(180deg);
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
&[data-next] {
|
|
110
|
-
float:
|
|
114
|
+
float: right;
|
|
111
115
|
text-align: end;
|
|
112
116
|
padding-inline-start: 24px;
|
|
113
117
|
|
|
114
118
|
svg {
|
|
115
119
|
margin-inline-start: 4px;
|
|
116
120
|
transform: rotate(180deg);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-direction='rtl'] & {
|
|
124
|
+
float: left;
|
|
117
125
|
|
|
118
|
-
|
|
126
|
+
svg {
|
|
119
127
|
transform: rotate(0);
|
|
120
128
|
}
|
|
121
129
|
}
|
|
@@ -10,7 +10,7 @@ import { ReactComponent as IconArrowUp } from '@ant-design/icons-svg/inline-svg/
|
|
|
10
10
|
import { ReactComponent as IconSearch } from '@ant-design/icons-svg/inline-svg/outlined/search.svg';
|
|
11
11
|
import { useSiteSearch } from 'dumi';
|
|
12
12
|
import React, { useEffect, useRef, useState } from 'react';
|
|
13
|
-
import SearchResult from
|
|
13
|
+
import SearchResult from 'dumi/theme/slots/SearchResult';
|
|
14
14
|
import "./index.less";
|
|
15
15
|
import { Input } from "./Input";
|
|
16
16
|
import { Mask } from "./Mask";
|