@umijs/plugins 4.0.0-beta.11 → 4.0.0-beta.15

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.
Files changed (54) hide show
  1. package/README.md +4 -1
  2. package/dist/access.js +73 -1
  3. package/dist/{sass.d.ts → analytics.d.ts} +0 -0
  4. package/dist/analytics.js +67 -0
  5. package/dist/antd.js +89 -145
  6. package/dist/dva.d.ts +3 -0
  7. package/dist/dva.js +169 -4
  8. package/dist/initial-state.js +112 -1
  9. package/dist/layout.js +458 -1
  10. package/dist/locale.d.ts +1 -0
  11. package/dist/locale.js +199 -1
  12. package/dist/model.js +112 -1
  13. package/dist/moment2dayjs.d.ts +3 -0
  14. package/dist/moment2dayjs.js +96 -0
  15. package/dist/qiankun/constants.d.ts +5 -0
  16. package/dist/qiankun/constants.js +8 -0
  17. package/dist/qiankun/master.d.ts +6 -0
  18. package/dist/qiankun/master.js +116 -0
  19. package/dist/qiankun/slave.d.ts +3 -0
  20. package/dist/qiankun/slave.js +142 -0
  21. package/dist/qiankun.js +15 -1
  22. package/dist/request.js +293 -1
  23. package/dist/utils/astUtils.d.ts +3 -0
  24. package/dist/utils/astUtils.js +34 -0
  25. package/dist/utils/localeUtils.d.ts +33 -0
  26. package/dist/utils/localeUtils.js +135 -0
  27. package/dist/utils/modelUtils.d.ts +35 -0
  28. package/dist/utils/modelUtils.js +145 -0
  29. package/dist/utils/resolveProjectDep.d.ts +5 -0
  30. package/dist/utils/resolveProjectDep.js +15 -0
  31. package/dist/utils/withTmpPath.d.ts +6 -0
  32. package/dist/utils/withTmpPath.js +11 -0
  33. package/libs/dva.ts +10 -0
  34. package/libs/locale/SelectLang.tpl +478 -0
  35. package/libs/locale/locale.tpl +82 -0
  36. package/libs/locale/localeExports.tpl +271 -0
  37. package/libs/locale/runtime.tpl +33 -0
  38. package/libs/model.tsx +140 -0
  39. package/libs/qiankun/master/AntdErrorBoundary.tsx +34 -0
  40. package/libs/qiankun/master/AntdLoader.tsx +15 -0
  41. package/libs/qiankun/master/ErrorBoundary.tsx +7 -0
  42. package/libs/qiankun/master/MicroApp.tsx +262 -0
  43. package/libs/qiankun/master/MicroAppWithMemoHistory.tsx +43 -0
  44. package/libs/qiankun/master/common.ts +133 -0
  45. package/libs/qiankun/master/constants.ts +7 -0
  46. package/libs/qiankun/master/getMicroAppRouteComponent.tsx.tpl +45 -0
  47. package/libs/qiankun/master/masterRuntimePlugin.tsx +133 -0
  48. package/libs/qiankun/master/types.ts +44 -0
  49. package/libs/qiankun/slave/connectMaster.tsx +15 -0
  50. package/libs/qiankun/slave/lifecycles.ts +149 -0
  51. package/libs/qiankun/slave/qiankunModel.ts +19 -0
  52. package/libs/qiankun/slave/slaveRuntimePlugin.ts +21 -0
  53. package/package.json +21 -5
  54. package/dist/sass.js +0 -5
@@ -1,5 +1,116 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const withTmpPath_1 = require("./utils/withTmpPath");
3
4
  exports.default = (api) => {
4
- api;
5
+ api.describe({
6
+ config: {
7
+ schema(Joi) {
8
+ return Joi.object({
9
+ loading: Joi.string(),
10
+ });
11
+ },
12
+ },
13
+ enableBy: api.EnableBy.config,
14
+ });
15
+ api.register({
16
+ key: 'addExtraModels',
17
+ fn: () => [(0, withTmpPath_1.withTmpPath)({ api, path: '@@initialState.ts' })],
18
+ });
19
+ api.addRuntimePluginKey(() => ['getInitialState']);
20
+ api.addRuntimePlugin(() => {
21
+ return [(0, withTmpPath_1.withTmpPath)({ api, path: 'runtime.tsx' })];
22
+ });
23
+ api.onGenerateFiles(() => {
24
+ var _a;
25
+ const { loading } = api.config.initialState;
26
+ // Provider.tsx
27
+ api.writeTmpFile({
28
+ path: 'Provider.tsx',
29
+ content: `
30
+ import React from 'react';
31
+ import { useModel } from '@@/plugin-model';
32
+ ${loading
33
+ ? `import Loading from ${loading}`
34
+ : `function Loading() { return <div>loading</div>; }`}
35
+ export default function InitialStateProvider(props: any) {
36
+ const appLoaded = React.useRef(false);
37
+ const { loading = false } = useModel("@@initialState") || {};
38
+ React.useEffect(() => {
39
+ if (!loading) {
40
+ appLoaded.current = true;
41
+ }
42
+ }, [loading]);
43
+ if (loading && !appLoaded.current) {
44
+ return <Loading />;
45
+ }
46
+ return props.children;
47
+ }
48
+ `,
49
+ });
50
+ // @@initialState.ts
51
+ api.writeTmpFile({
52
+ path: '@@initialState.ts',
53
+ content: ((_a = api.appData.appJS) === null || _a === void 0 ? void 0 : _a.exports.includes('getInitialState'))
54
+ ? `
55
+ import { useState, useEffect, useCallback } from 'react';
56
+ import { getInitialState } from '@/app';
57
+
58
+ const initState = {
59
+ initialState: undefined,
60
+ loading: true,
61
+ error: undefined,
62
+ };
63
+
64
+ export default () => {
65
+ const [state, setState] = useState(initState);
66
+ const refresh = useCallback(async () => {
67
+ setState((s) => ({ ...s, loading: true, error: undefined }));
68
+ try {
69
+ const ret = await getInitialState();
70
+ setState((s) => ({ ...s, initialState: ret, loading: false }));
71
+ } catch (e) {
72
+ setState((s) => ({ ...s, error: e, loading: false }));
73
+ }
74
+ // [?]
75
+ // await sleep(10);
76
+ }, []);
77
+
78
+ const setInitialState = useCallback(async (initialState) => {
79
+ setState((s) => {
80
+ if (typeof initialState === 'function') {
81
+ return { ...s, initialState: initialState(s.initialState), loading: false };
82
+ }
83
+ return { ...s, initialState, loading: false };
84
+ });
85
+ // [?]
86
+ // await sleep(10)
87
+ }, []);
88
+
89
+ useEffect(() => {
90
+ refresh();
91
+ }, []);
92
+
93
+ return {
94
+ ...state,
95
+ refresh,
96
+ setInitialState,
97
+ };
98
+ }
99
+ `
100
+ : `
101
+ export default () => ({ loading: false, refresh: () => {} })
102
+ `,
103
+ });
104
+ // runtime.tsx
105
+ api.writeTmpFile({
106
+ path: 'runtime.tsx',
107
+ content: `
108
+ import React from 'react';
109
+ import Provider from './Provider';
110
+ export function innerProvider(container) {
111
+ return <Provider>{ container }</Provider>;
112
+ }
113
+ `,
114
+ });
115
+ });
5
116
  };
package/dist/layout.js CHANGED
@@ -1,5 +1,462 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
2
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
+ const allIcons = __importStar(require("@ant-design/icons"));
26
+ const assert_1 = __importDefault(require("assert"));
27
+ const path_1 = require("path");
28
+ const plugin_utils_1 = require("umi/plugin-utils");
29
+ const resolveProjectDep_1 = require("./utils/resolveProjectDep");
30
+ const withTmpPath_1 = require("./utils/withTmpPath");
3
31
  exports.default = (api) => {
4
- api;
32
+ api.describe({
33
+ key: 'layout',
34
+ config: {
35
+ schema(joi) {
36
+ return joi.object();
37
+ },
38
+ onChange: api.ConfigChangeType.regenerateTmpFiles,
39
+ },
40
+ enableBy: api.EnableBy.config,
41
+ });
42
+ const pkgPath = (0, resolveProjectDep_1.resolveProjectDep)({
43
+ pkg: api.pkg,
44
+ cwd: api.cwd,
45
+ dep: '@ant-design/pro-layout',
46
+ }) || (0, path_1.dirname)(require.resolve('@ant-design/pro-layout/package.json'));
47
+ api.modifyAppData((memo) => {
48
+ const version = require(`${pkgPath}/package.json`).version;
49
+ memo.pluginLayout = {
50
+ pkgPath,
51
+ version,
52
+ };
53
+ return memo;
54
+ });
55
+ api.modifyConfig((memo) => {
56
+ // import from @ant-design/pro-layout
57
+ memo.alias['@ant-design/pro-layout'] = pkgPath;
58
+ return memo;
59
+ });
60
+ api.onGenerateFiles(() => {
61
+ const hasInitialStatePlugin = api.config.initialState;
62
+ // Layout.tsx
63
+ api.writeTmpFile({
64
+ path: 'Layout.tsx',
65
+ content: `
66
+ import { Link, useLocation, useNavigate, Outlet, useAppData, useRouteContext } from 'umi';
67
+ import ProLayout, {
68
+ PageLoading,
69
+ } from '@ant-design/pro-layout';
70
+ import './Layout.less';
71
+ import Logo from './Logo';
72
+ import { getRightRenderContent } from './rightRender';
73
+ ${hasInitialStatePlugin
74
+ ? `import { useModel } from '@@/plugin-model';`
75
+ : 'const useModel = null;'}
76
+
77
+ export default () => {
78
+ const location = useLocation();
79
+ const navigate = useNavigate();
80
+ const { clientRoutes, pluginManager } = useAppData();
81
+ const initialInfo = (useModel && useModel('@@initialState')) || {
82
+ initialState: undefined,
83
+ loading: false,
84
+ setInitialState: null,
85
+ };
86
+ const { initialState, loading, setInitialState } = initialInfo;
87
+ const userConfig = ${JSON.stringify(api.config.layout, null, 2)};
88
+ const runtimeConfig = pluginManager.applyPlugins({
89
+ key: 'layout',
90
+ type: 'modify',
91
+ initialValue: {},
92
+ });
93
+ return (
94
+ <ProLayout
95
+ route={clientRoutes[0]}
96
+ location={location}
97
+ title={userConfig.name || 'plugin-layout'}
98
+ navTheme="dark"
99
+ siderWidth={256}
100
+ onMenuHeaderClick={(e) => {
101
+ e.stopPropagation();
102
+ e.preventDefault();
103
+ navigate('/');
104
+ }}
105
+ menu={{ locale: userConfig.locale }}
106
+ logo={Logo}
107
+ menuItemRender={(menuItemProps, defaultDom) => {
108
+ if (menuItemProps.isUrl || menuItemProps.children) {
109
+ return defaultDom;
110
+ }
111
+ if (menuItemProps.path && location.pathname !== menuItemProps.path) {
112
+ return (
113
+ <Link to={menuItemProps.path} target={menuItemProps.target}>
114
+ {defaultDom}
115
+ </Link>
116
+ );
117
+ }
118
+ return defaultDom;
119
+ }}
120
+ disableContentMargin
121
+ fixSiderbar
122
+ fixedHeader
123
+ {...runtimeConfig}
124
+ rightContentRender={
125
+ runtimeConfig.rightContentRender !== false &&
126
+ ((layoutProps) => {
127
+ const dom = getRightRenderContent({
128
+ runtimeConfig,
129
+ loading,
130
+ initialState,
131
+ setInitialState,
132
+ });
133
+ if (runtimeConfig.rightContentRender) {
134
+ return runtimeConfig.rightContentRender(layoutProps, dom, {
135
+ // BREAK CHANGE userConfig > runtimeConfig
136
+ userConfig,
137
+ runtimeConfig,
138
+ loading,
139
+ initialState,
140
+ setInitialState,
141
+ });
142
+ }
143
+ return dom;
144
+ })
145
+ }
146
+ >
147
+ <Outlet />
148
+ </ProLayout>
149
+ );
150
+ }
151
+ `,
152
+ });
153
+ const iconsMap = Object.keys(api.appData.routes).reduce((memo, id) => {
154
+ const { icon } = api.appData.routes[id];
155
+ if (icon) {
156
+ const upperIcon = plugin_utils_1.lodash.upperFirst(plugin_utils_1.lodash.camelCase(icon));
157
+ (0, assert_1.default)(
158
+ // @ts-ignore
159
+ allIcons[upperIcon] || allIcons[`${upperIcon}Outlined`], `Icon ${upperIcon} is not found`);
160
+ // @ts-ignore
161
+ if (allIcons[upperIcon]) {
162
+ memo[upperIcon] = true;
163
+ }
164
+ // @ts-ignore
165
+ if (allIcons[`${upperIcon}Outlined`]) {
166
+ memo[`${upperIcon}Outlined`] = true;
167
+ }
168
+ }
169
+ return memo;
170
+ }, {});
171
+ const icons = Object.keys(iconsMap);
172
+ const antIconsPath = (0, path_1.dirname)(require.resolve('@ant-design/icons/package'));
173
+ api.writeTmpFile({
174
+ path: 'icons.tsx',
175
+ content: `
176
+ ${icons
177
+ .map((icon) => {
178
+ return `import ${icon} from '${antIconsPath}/es/icons/${icon}';`;
179
+ })
180
+ .join('\n')}
181
+ export default { ${icons.join(', ')} };
182
+ `,
183
+ });
184
+ // runtime.tsx
185
+ api.writeTmpFile({
186
+ path: 'runtime.tsx',
187
+ content: `
188
+ import React from 'react';
189
+ import icons from './icons';
190
+
191
+ function formatIcon(name: string) {
192
+ return name
193
+ .replace(name[0], name[0].toUpperCase())
194
+ .replace(/-(\w)/g, function(all, letter) {
195
+ return letter.toUpperCase();
196
+ });
197
+ }
198
+
199
+ export function patchRoutes({ routes }) {
200
+ Object.keys(routes).forEach(key => {
201
+ const { icon } = routes[key];
202
+ if (icon && typeof icon === 'string') {
203
+ const upperIcon = formatIcon(icon);
204
+ routes[key].icon = React.createElement(icons[upperIcon] || icons[upperIcon + 'Outlined']);
205
+ }
206
+ });
207
+ }
208
+ `,
209
+ });
210
+ const rightRenderContent = `
211
+ import React from 'react';
212
+ import { Avatar, Dropdown, Menu, Spin } from 'antd';
213
+ import { LogoutOutlined } from '@ant-design/icons';
214
+ {{#Locale}}
215
+ import { SelectLang } from '@@/plugin-locale';
216
+ {{/Locale}}
217
+
218
+ export function getRightRenderContent (opts: {
219
+ runtimeConfig: any,
220
+ loading: boolean,
221
+ initialState: any,
222
+ setInitialState: any,
223
+ }) {
224
+ if (opts.runtimeConfig.rightRender) {
225
+ return opts.runtimeConfig.rightRender(
226
+ opts.initialState,
227
+ opts.setInitialState,
228
+ opts.runtimeConfig,
229
+ );
230
+ }
231
+
232
+ const menu = (
233
+ <Menu className="umi-plugin-layout-menu">
234
+ <Menu.Item
235
+ key="logout"
236
+ onClick={() =>
237
+ opts.runtimeConfig.logout && opts.runtimeConfig?.logout(opts.initialState)
238
+ }
239
+ >
240
+ <LogoutOutlined />
241
+ 退出登录
242
+ </Menu.Item>
243
+ </Menu>
244
+ );
245
+
246
+ const avatar = (
247
+ <span className="umi-plugin-layout-action">
248
+ <Avatar
249
+ size="small"
250
+ className="umi-plugin-layout-avatar"
251
+ src={
252
+ opts.initialState?.avatar ||
253
+ 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png'
254
+ }
255
+ alt="avatar"
256
+ />
257
+ <span className="umi-plugin-layout-name">{opts.initialState?.name}</span>
258
+ </span>
259
+ );
260
+
261
+ if (opts.loading) {
262
+ return (
263
+ <div className="umi-plugin-layout-right">
264
+ <Spin size="small" style={ { marginLeft: 8, marginRight: 8 } } />
265
+ </div>
266
+ );
267
+ }
268
+
269
+ return (
270
+ <div className="umi-plugin-layout-right anticon">
271
+ {opts.runtimeConfig.logout ? (
272
+ <Dropdown overlay={menu} overlayClassName="umi-plugin-layout-container">
273
+ {avatar}
274
+ </Dropdown>
275
+ ) : (
276
+ avatar
277
+ )}
278
+ {{#Locale}}
279
+ <SelectLang />
280
+ {{/Locale}}
281
+ </div>
282
+ );
283
+ }
284
+ `;
285
+ const Locale = api.isPluginEnable('locale');
286
+ // rightRender.tsx
287
+ api.writeTmpFile({
288
+ path: 'rightRender.tsx',
289
+ content: plugin_utils_1.Mustache.render(rightRenderContent, {
290
+ Locale,
291
+ }),
292
+ });
293
+ // Layout.less
294
+ api.writeTmpFile({
295
+ path: 'Layout.less',
296
+ content: `
297
+ @import '~antd/es/style/themes/default.less';
298
+ @pro-header-hover-bg: rgba(0, 0, 0, 0.025);
299
+ @media screen and (max-width: @screen-xs) {
300
+ // 在小屏幕的时候可以有更好的体验
301
+ .umi-plugin-layout-container {
302
+ width: 100% !important;
303
+ }
304
+ .umi-plugin-layout-container > * {
305
+ border-radius: 0 !important;
306
+ }
307
+ }
308
+ .umi-plugin-layout-menu {
309
+ .anticon {
310
+ margin-right: 8px;
311
+ }
312
+ .ant-dropdown-menu-item {
313
+ min-width: 160px;
314
+ }
315
+ }
316
+ .umi-plugin-layout-right {
317
+ display: flex !important;
318
+ float: right;
319
+ height: 100%;
320
+ margin-left: auto;
321
+ overflow: hidden;
322
+ .umi-plugin-layout-action {
323
+ display: flex;
324
+ align-items: center;
325
+ height: 100%;
326
+ padding: 0 12px;
327
+ cursor: pointer;
328
+ transition: all 0.3s;
329
+ > i {
330
+ color: @text-color;
331
+ vertical-align: middle;
332
+ }
333
+ &:hover {
334
+ background: @pro-header-hover-bg;
335
+ }
336
+ &:global(.opened) {
337
+ background: @pro-header-hover-bg;
338
+ }
339
+ }
340
+ .umi-plugin-layout-search {
341
+ padding: 0 12px;
342
+ &:hover {
343
+ background: transparent;
344
+ }
345
+ }
346
+ }
347
+ .umi-plugin-layout-name {
348
+ margin-left: 8px;
349
+ }
350
+ `,
351
+ });
352
+ // Logo.tsx
353
+ api.writeTmpFile({
354
+ path: 'Logo.tsx',
355
+ content: `
356
+ import React from 'react';
357
+
358
+ const LogoIcon: React.FC = () => {
359
+ return (
360
+ <svg
361
+ xmlns="http://www.w3.org/2000/svg"
362
+ width="32"
363
+ height="32"
364
+ viewBox="0 0 200 200"
365
+ >
366
+ <defs>
367
+ <linearGradient
368
+ id="linearGradient-1"
369
+ x1="62.102%"
370
+ x2="108.197%"
371
+ y1="0%"
372
+ y2="37.864%"
373
+ >
374
+ <stop offset="0%" stopColor="#4285EB"></stop>
375
+ <stop offset="100%" stopColor="#2EC7FF"></stop>
376
+ </linearGradient>
377
+ <linearGradient
378
+ id="linearGradient-2"
379
+ x1="69.644%"
380
+ x2="54.043%"
381
+ y1="0%"
382
+ y2="108.457%"
383
+ >
384
+ <stop offset="0%" stopColor="#29CDFF"></stop>
385
+ <stop offset="37.86%" stopColor="#148EFF"></stop>
386
+ <stop offset="100%" stopColor="#0A60FF"></stop>
387
+ </linearGradient>
388
+ <linearGradient
389
+ id="linearGradient-3"
390
+ x1="69.691%"
391
+ x2="16.723%"
392
+ y1="-12.974%"
393
+ y2="117.391%"
394
+ >
395
+ <stop offset="0%" stopColor="#FA816E"></stop>
396
+ <stop offset="41.473%" stopColor="#F74A5C"></stop>
397
+ <stop offset="100%" stopColor="#F51D2C"></stop>
398
+ </linearGradient>
399
+ <linearGradient
400
+ id="linearGradient-4"
401
+ x1="68.128%"
402
+ x2="30.44%"
403
+ y1="-35.691%"
404
+ y2="114.943%"
405
+ >
406
+ <stop offset="0%" stopColor="#FA8E7D"></stop>
407
+ <stop offset="51.264%" stopColor="#F74A5C"></stop>
408
+ <stop offset="100%" stopColor="#F51D2C"></stop>
409
+ </linearGradient>
410
+ </defs>
411
+ <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
412
+ <g transform="translate(-20 -20)">
413
+ <g transform="translate(20 20)">
414
+ <g>
415
+ <g fillRule="nonzero">
416
+ <g>
417
+ <path
418
+ fill="url(#linearGradient-1)"
419
+ d="M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c1.17-1.169 2.944-1.169 4.114 0l27.783 27.76c4.209 4.205 11.032 4.205 15.24 0 4.209-4.205 4.209-11.022 0-15.227L108.581 4.056c-4.719-4.594-12.312-4.557-16.993.12z"
420
+ ></path>
421
+ <path
422
+ fill="url(#linearGradient-2)"
423
+ d="M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c2.912-2.51 7.664-7.596 14.642-8.786 5.186-.883 10.855 1.062 17.009 5.837L108.58 4.056c-4.719-4.594-12.312-4.557-16.993.12z"
424
+ ></path>
425
+ </g>
426
+ <path
427
+ fill="url(#linearGradient-3)"
428
+ d="M153.686 135.855c4.208 4.205 11.031 4.205 15.24 0l27.034-27.012c4.7-4.696 4.7-12.28 0-16.974l-27.27-27.15c-4.218-4.2-11.043-4.195-15.254.013-4.209 4.205-4.209 11.022 0 15.227l18.418 18.403c1.17 1.169 1.17 2.943 0 4.111l-18.168 18.154c-4.209 4.205-4.209 11.023 0 15.228z"
429
+ ></path>
430
+ </g>
431
+ <ellipse
432
+ cx="100.519"
433
+ cy="100.437"
434
+ fill="url(#linearGradient-4)"
435
+ rx="23.6"
436
+ ry="23.581"
437
+ ></ellipse>
438
+ </g>
439
+ </g>
440
+ </g>
441
+ </g>
442
+ </svg>
443
+ );
444
+ };
445
+
446
+ export default LogoIcon;
447
+ `,
448
+ });
449
+ });
450
+ api.addLayouts(() => {
451
+ return [
452
+ {
453
+ id: 'ant-design-pro-layout',
454
+ file: (0, withTmpPath_1.withTmpPath)({ api, path: 'Layout.tsx' }),
455
+ },
456
+ ];
457
+ });
458
+ api.addRuntimePluginKey(() => ['layout']);
459
+ api.addRuntimePlugin(() => {
460
+ return [(0, withTmpPath_1.withTmpPath)({ api, path: 'runtime.tsx' })];
461
+ });
5
462
  };
package/dist/locale.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { IApi } from 'umi';
2
+ export declare const packageNormalize: (packageName: string) => string;
2
3
  declare const _default: (api: IApi) => void;
3
4
  export default _default;