antd-mobile 5.39.0 → 5.40.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/2x/README.md +8 -1
- package/2x/bundle/antd-mobile.cjs.development.js +2351 -1604
- package/2x/bundle/antd-mobile.cjs.js +7 -7
- package/2x/bundle/antd-mobile.es.development.js +1385 -638
- package/2x/bundle/antd-mobile.es.js +6070 -5443
- package/2x/bundle/antd-mobile.umd.development.js +2350 -1603
- package/2x/bundle/antd-mobile.umd.js +7 -7
- package/2x/bundle/style.css +7 -4
- package/2x/cjs/components/button/button.d.ts +2 -2
- package/2x/cjs/components/button/button.js +1 -0
- package/2x/cjs/components/calendar-picker-view/calendar-picker-view.js +3 -0
- package/2x/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/2x/cjs/components/date-picker/date-picker-date-utils.js +23 -8
- package/2x/cjs/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
- package/2x/cjs/components/date-picker/date-picker-quarter-utils.js +7 -2
- package/2x/cjs/components/date-picker/date-picker-week-utils.d.ts +3 -1
- package/2x/cjs/components/date-picker/date-picker-week-utils.js +10 -3
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +5 -3
- package/2x/cjs/components/date-picker-view/date-picker-view.js +3 -3
- package/2x/cjs/components/date-picker-view/useRenderLabel.js +2 -2
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/2x/cjs/components/popover/wrapper.d.ts +6 -9
- package/2x/cjs/components/popover/wrapper.js +32 -6
- package/2x/cjs/components/space/space.css +4 -4
- package/2x/cjs/components/virtual-input/virtual-input.css +3 -0
- package/2x/cjs/components/virtual-input/virtual-input.js +34 -5
- package/2x/cjs/index.d.ts +1 -0
- package/2x/cjs/index.js +7 -0
- package/2x/cjs/locales/ar-SA.d.ts +1 -0
- package/2x/cjs/locales/ar-SA.js +1 -0
- package/2x/cjs/locales/base.d.ts +1 -0
- package/2x/cjs/locales/base.js +1 -0
- package/2x/cjs/locales/cnr-ME.d.ts +1 -0
- package/2x/cjs/locales/cnr-ME.js +1 -0
- package/2x/cjs/locales/da-DK.d.ts +1 -0
- package/2x/cjs/locales/de-DE.d.ts +1 -0
- package/2x/cjs/locales/de-DE.js +1 -0
- package/2x/cjs/locales/en-US.d.ts +1 -0
- package/2x/cjs/locales/es-ES.d.ts +1 -0
- package/2x/cjs/locales/fa-IR.d.ts +1 -0
- package/2x/cjs/locales/fr-FR.d.ts +1 -0
- package/2x/cjs/locales/hr-HR.d.ts +1 -0
- package/2x/cjs/locales/hr-HR.js +1 -0
- package/2x/cjs/locales/hu-HU.d.ts +1 -0
- package/2x/cjs/locales/id-ID.d.ts +1 -0
- package/2x/cjs/locales/in-ID.d.ts +1 -0
- package/2x/cjs/locales/in-ID.js +1 -0
- package/2x/cjs/locales/it-IT.d.ts +1 -0
- package/2x/cjs/locales/ja-JP.d.ts +1 -0
- package/2x/cjs/locales/kk-KZ.d.ts +1 -0
- package/2x/cjs/locales/ko-KR.d.ts +1 -0
- package/2x/cjs/locales/ms-MY.d.ts +1 -0
- package/2x/cjs/locales/ms-MY.js +1 -0
- package/2x/cjs/locales/nb-NO.d.ts +1 -0
- package/2x/cjs/locales/nl-NL.d.ts +1 -0
- package/2x/cjs/locales/pt-BR.d.ts +1 -0
- package/2x/cjs/locales/ru-RU.d.ts +1 -0
- package/2x/cjs/locales/ru-RU.js +8 -2
- package/2x/cjs/locales/sr-RS.d.ts +1 -0
- package/2x/cjs/locales/sr-RS.js +1 -0
- package/2x/cjs/locales/th-TH.d.ts +1 -0
- package/2x/cjs/locales/th-TH.js +1 -0
- package/2x/cjs/locales/tr-TR.d.ts +1 -0
- package/2x/cjs/locales/vi-VN.d.ts +1 -0
- package/2x/cjs/locales/vi-VN.js +1 -0
- package/2x/cjs/locales/zh-CN.js +1 -0
- package/2x/cjs/locales/zh-HK.d.ts +1 -0
- package/2x/cjs/locales/zh-TW.d.ts +1 -0
- package/2x/cjs/utils/render-to-body.d.ts +1 -1
- package/2x/cjs/utils/render-to-body.js +2 -9
- package/2x/cjs/utils/render.d.ts +1 -9
- package/2x/cjs/utils/render.js +10 -68
- package/2x/cjs/utils/unstable-render.d.ts +9 -0
- package/2x/cjs/utils/unstable-render.js +37 -0
- package/2x/es/components/button/button.d.ts +2 -2
- package/2x/es/components/button/button.js +1 -0
- package/2x/es/components/calendar-picker-view/calendar-picker-view.js +3 -0
- package/2x/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/2x/es/components/date-picker/date-picker-date-utils.js +23 -8
- package/2x/es/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
- package/2x/es/components/date-picker/date-picker-quarter-utils.js +7 -2
- package/2x/es/components/date-picker/date-picker-week-utils.d.ts +3 -1
- package/2x/es/components/date-picker/date-picker-week-utils.js +10 -3
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +5 -3
- package/2x/es/components/date-picker-view/date-picker-view.js +4 -4
- package/2x/es/components/date-picker-view/useRenderLabel.js +2 -2
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/2x/es/components/popover/wrapper.d.ts +6 -9
- package/2x/es/components/popover/wrapper.js +30 -5
- package/2x/es/components/space/space.css +4 -4
- package/2x/es/components/virtual-input/virtual-input.css +3 -0
- package/2x/es/components/virtual-input/virtual-input.js +34 -5
- package/2x/es/index.d.ts +1 -0
- package/2x/es/index.js +3 -1
- package/2x/es/locales/ar-SA.d.ts +1 -0
- package/2x/es/locales/ar-SA.js +1 -0
- package/2x/es/locales/base.d.ts +1 -0
- package/2x/es/locales/base.js +1 -0
- package/2x/es/locales/cnr-ME.d.ts +1 -0
- package/2x/es/locales/cnr-ME.js +1 -0
- package/2x/es/locales/da-DK.d.ts +1 -0
- package/2x/es/locales/de-DE.d.ts +1 -0
- package/2x/es/locales/de-DE.js +1 -0
- package/2x/es/locales/en-US.d.ts +1 -0
- package/2x/es/locales/es-ES.d.ts +1 -0
- package/2x/es/locales/fa-IR.d.ts +1 -0
- package/2x/es/locales/fr-FR.d.ts +1 -0
- package/2x/es/locales/hr-HR.d.ts +1 -0
- package/2x/es/locales/hr-HR.js +1 -0
- package/2x/es/locales/hu-HU.d.ts +1 -0
- package/2x/es/locales/id-ID.d.ts +1 -0
- package/2x/es/locales/in-ID.d.ts +1 -0
- package/2x/es/locales/in-ID.js +1 -0
- package/2x/es/locales/it-IT.d.ts +1 -0
- package/2x/es/locales/ja-JP.d.ts +1 -0
- package/2x/es/locales/kk-KZ.d.ts +1 -0
- package/2x/es/locales/ko-KR.d.ts +1 -0
- package/2x/es/locales/ms-MY.d.ts +1 -0
- package/2x/es/locales/ms-MY.js +1 -0
- package/2x/es/locales/nb-NO.d.ts +1 -0
- package/2x/es/locales/nl-NL.d.ts +1 -0
- package/2x/es/locales/pt-BR.d.ts +1 -0
- package/2x/es/locales/ru-RU.d.ts +1 -0
- package/2x/es/locales/ru-RU.js +8 -2
- package/2x/es/locales/sr-RS.d.ts +1 -0
- package/2x/es/locales/sr-RS.js +1 -0
- package/2x/es/locales/th-TH.d.ts +1 -0
- package/2x/es/locales/th-TH.js +1 -0
- package/2x/es/locales/tr-TR.d.ts +1 -0
- package/2x/es/locales/vi-VN.d.ts +1 -0
- package/2x/es/locales/vi-VN.js +1 -0
- package/2x/es/locales/zh-CN.js +1 -0
- package/2x/es/locales/zh-HK.d.ts +1 -0
- package/2x/es/locales/zh-TW.d.ts +1 -0
- package/2x/es/utils/render-to-body.d.ts +1 -1
- package/2x/es/utils/render-to-body.js +2 -9
- package/2x/es/utils/render.d.ts +1 -9
- package/2x/es/utils/render.js +1 -65
- package/2x/es/utils/unstable-render.d.ts +9 -0
- package/2x/es/utils/unstable-render.js +28 -0
- package/2x/package.json +2 -2
- package/README.md +8 -1
- package/bundle/antd-mobile.cjs.development.js +2351 -1604
- package/bundle/antd-mobile.cjs.js +7 -7
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +1385 -638
- package/bundle/antd-mobile.es.js +6070 -5443
- package/bundle/antd-mobile.umd.development.js +2350 -1603
- package/bundle/antd-mobile.umd.js +7 -7
- package/bundle/style.css +1 -1
- package/cjs/components/button/button.d.ts +2 -2
- package/cjs/components/button/button.js +1 -0
- package/cjs/components/calendar-picker-view/calendar-picker-view.js +3 -0
- package/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/cjs/components/date-picker/date-picker-date-utils.js +23 -8
- package/cjs/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
- package/cjs/components/date-picker/date-picker-quarter-utils.js +7 -2
- package/cjs/components/date-picker/date-picker-week-utils.d.ts +3 -1
- package/cjs/components/date-picker/date-picker-week-utils.js +10 -3
- package/cjs/components/date-picker-view/date-picker-view.d.ts +5 -3
- package/cjs/components/date-picker-view/date-picker-view.js +3 -3
- package/cjs/components/date-picker-view/useRenderLabel.js +2 -2
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/cjs/components/popover/wrapper.d.ts +6 -9
- package/cjs/components/popover/wrapper.js +32 -6
- package/cjs/components/space/space.css +3 -3
- package/cjs/components/virtual-input/virtual-input.css +3 -0
- package/cjs/components/virtual-input/virtual-input.js +34 -5
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -0
- package/cjs/locales/ar-SA.d.ts +1 -0
- package/cjs/locales/ar-SA.js +1 -0
- package/cjs/locales/base.d.ts +1 -0
- package/cjs/locales/base.js +1 -0
- package/cjs/locales/cnr-ME.d.ts +1 -0
- package/cjs/locales/cnr-ME.js +1 -0
- package/cjs/locales/da-DK.d.ts +1 -0
- package/cjs/locales/de-DE.d.ts +1 -0
- package/cjs/locales/de-DE.js +1 -0
- package/cjs/locales/en-US.d.ts +1 -0
- package/cjs/locales/es-ES.d.ts +1 -0
- package/cjs/locales/fa-IR.d.ts +1 -0
- package/cjs/locales/fr-FR.d.ts +1 -0
- package/cjs/locales/hr-HR.d.ts +1 -0
- package/cjs/locales/hr-HR.js +1 -0
- package/cjs/locales/hu-HU.d.ts +1 -0
- package/cjs/locales/id-ID.d.ts +1 -0
- package/cjs/locales/in-ID.d.ts +1 -0
- package/cjs/locales/in-ID.js +1 -0
- package/cjs/locales/it-IT.d.ts +1 -0
- package/cjs/locales/ja-JP.d.ts +1 -0
- package/cjs/locales/kk-KZ.d.ts +1 -0
- package/cjs/locales/ko-KR.d.ts +1 -0
- package/cjs/locales/ms-MY.d.ts +1 -0
- package/cjs/locales/ms-MY.js +1 -0
- package/cjs/locales/nb-NO.d.ts +1 -0
- package/cjs/locales/nl-NL.d.ts +1 -0
- package/cjs/locales/pt-BR.d.ts +1 -0
- package/cjs/locales/ru-RU.d.ts +1 -0
- package/cjs/locales/ru-RU.js +8 -2
- package/cjs/locales/sr-RS.d.ts +1 -0
- package/cjs/locales/sr-RS.js +1 -0
- package/cjs/locales/th-TH.d.ts +1 -0
- package/cjs/locales/th-TH.js +1 -0
- package/cjs/locales/tr-TR.d.ts +1 -0
- package/cjs/locales/vi-VN.d.ts +1 -0
- package/cjs/locales/vi-VN.js +1 -0
- package/cjs/locales/zh-CN.js +1 -0
- package/cjs/locales/zh-HK.d.ts +1 -0
- package/cjs/locales/zh-TW.d.ts +1 -0
- package/cjs/utils/render-to-body.d.ts +1 -1
- package/cjs/utils/render-to-body.js +2 -9
- package/cjs/utils/render.d.ts +1 -9
- package/cjs/utils/render.js +10 -68
- package/cjs/utils/unstable-render.d.ts +9 -0
- package/cjs/utils/unstable-render.js +37 -0
- package/es/components/button/button.d.ts +2 -2
- package/es/components/button/button.js +1 -0
- package/es/components/calendar-picker-view/calendar-picker-view.js +3 -0
- package/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/es/components/date-picker/date-picker-date-utils.js +23 -8
- package/es/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
- package/es/components/date-picker/date-picker-quarter-utils.js +7 -2
- package/es/components/date-picker/date-picker-week-utils.d.ts +3 -1
- package/es/components/date-picker/date-picker-week-utils.js +10 -3
- package/es/components/date-picker-view/date-picker-view.d.ts +5 -3
- package/es/components/date-picker-view/date-picker-view.js +4 -4
- package/es/components/date-picker-view/useRenderLabel.js +2 -2
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/es/components/popover/wrapper.d.ts +6 -9
- package/es/components/popover/wrapper.js +30 -5
- package/es/components/space/space.css +3 -3
- package/es/components/virtual-input/virtual-input.css +3 -0
- package/es/components/virtual-input/virtual-input.js +34 -5
- package/es/index.d.ts +1 -0
- package/es/index.js +3 -1
- package/es/locales/ar-SA.d.ts +1 -0
- package/es/locales/ar-SA.js +1 -0
- package/es/locales/base.d.ts +1 -0
- package/es/locales/base.js +1 -0
- package/es/locales/cnr-ME.d.ts +1 -0
- package/es/locales/cnr-ME.js +1 -0
- package/es/locales/da-DK.d.ts +1 -0
- package/es/locales/de-DE.d.ts +1 -0
- package/es/locales/de-DE.js +1 -0
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/es-ES.d.ts +1 -0
- package/es/locales/fa-IR.d.ts +1 -0
- package/es/locales/fr-FR.d.ts +1 -0
- package/es/locales/hr-HR.d.ts +1 -0
- package/es/locales/hr-HR.js +1 -0
- package/es/locales/hu-HU.d.ts +1 -0
- package/es/locales/id-ID.d.ts +1 -0
- package/es/locales/in-ID.d.ts +1 -0
- package/es/locales/in-ID.js +1 -0
- package/es/locales/it-IT.d.ts +1 -0
- package/es/locales/ja-JP.d.ts +1 -0
- package/es/locales/kk-KZ.d.ts +1 -0
- package/es/locales/ko-KR.d.ts +1 -0
- package/es/locales/ms-MY.d.ts +1 -0
- package/es/locales/ms-MY.js +1 -0
- package/es/locales/nb-NO.d.ts +1 -0
- package/es/locales/nl-NL.d.ts +1 -0
- package/es/locales/pt-BR.d.ts +1 -0
- package/es/locales/ru-RU.d.ts +1 -0
- package/es/locales/ru-RU.js +8 -2
- package/es/locales/sr-RS.d.ts +1 -0
- package/es/locales/sr-RS.js +1 -0
- package/es/locales/th-TH.d.ts +1 -0
- package/es/locales/th-TH.js +1 -0
- package/es/locales/tr-TR.d.ts +1 -0
- package/es/locales/vi-VN.d.ts +1 -0
- package/es/locales/vi-VN.js +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-HK.d.ts +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/utils/render-to-body.d.ts +1 -1
- package/es/utils/render-to-body.js +2 -9
- package/es/utils/render.d.ts +1 -9
- package/es/utils/render.js +1 -65
- package/es/utils/unstable-render.d.ts +9 -0
- package/es/utils/unstable-render.js +28 -0
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
package/es/locales/zh-CN.js
CHANGED
package/es/locales/zh-HK.d.ts
CHANGED
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
export declare function renderToBody(element: ReactElement): ()
|
|
2
|
+
export declare function renderToBody(element: ReactElement): import("./unstable-render").UnmountType;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { unstableSetRender } from './unstable-render';
|
|
2
2
|
export function renderToBody(element) {
|
|
3
3
|
const container = document.createElement('div');
|
|
4
4
|
document.body.appendChild(container);
|
|
5
|
-
|
|
6
|
-
const unmountResult = reactUnmount(container);
|
|
7
|
-
if (unmountResult && container.parentNode) {
|
|
8
|
-
container.parentNode.removeChild(container);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
render(element, container);
|
|
12
|
-
return unmount;
|
|
5
|
+
return unstableSetRender()(element, container);
|
|
13
6
|
}
|
package/es/utils/render.d.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Root } from 'react-dom/client';
|
|
3
|
-
declare const MARK = "__antd_mobile_root__";
|
|
4
|
-
declare type ContainerType = (Element | DocumentFragment) & {
|
|
5
|
-
[MARK]?: Root;
|
|
6
|
-
};
|
|
7
|
-
export declare function render(node: ReactElement, container: ContainerType): void;
|
|
8
|
-
export declare function unmount(container: ContainerType): boolean | Promise<void>;
|
|
9
|
-
export {};
|
|
1
|
+
export * from 'rc-util/lib/React/render';
|
package/es/utils/render.js
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as ReactDOM from 'react-dom';
|
|
3
|
-
// Let compiler not to search module usage
|
|
4
|
-
const fullClone = Object.assign({}, ReactDOM);
|
|
5
|
-
const {
|
|
6
|
-
version,
|
|
7
|
-
render: reactRender,
|
|
8
|
-
unmountComponentAtNode
|
|
9
|
-
} = fullClone;
|
|
10
|
-
let createRoot;
|
|
11
|
-
try {
|
|
12
|
-
const mainVersion = Number((version || '').split('.')[0]);
|
|
13
|
-
if (mainVersion >= 18 && fullClone.createRoot) {
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
15
|
-
createRoot = fullClone.createRoot;
|
|
16
|
-
}
|
|
17
|
-
} catch (e) {
|
|
18
|
-
// Do nothing;
|
|
19
|
-
}
|
|
20
|
-
function toggleWarning(skip) {
|
|
21
|
-
const {
|
|
22
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
23
|
-
} = fullClone;
|
|
24
|
-
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === 'object') {
|
|
25
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const MARK = '__antd_mobile_root__';
|
|
29
|
-
function legacyRender(node, container) {
|
|
30
|
-
reactRender(node, container);
|
|
31
|
-
}
|
|
32
|
-
function concurrentRender(node, container) {
|
|
33
|
-
toggleWarning(true);
|
|
34
|
-
const root = container[MARK] || createRoot(container);
|
|
35
|
-
toggleWarning(false);
|
|
36
|
-
root.render(node);
|
|
37
|
-
container[MARK] = root;
|
|
38
|
-
}
|
|
39
|
-
export function render(node, container) {
|
|
40
|
-
if (createRoot) {
|
|
41
|
-
concurrentRender(node, container);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
legacyRender(node, container);
|
|
45
|
-
}
|
|
46
|
-
// ========================== Unmount =========================
|
|
47
|
-
function legacyUnmount(container) {
|
|
48
|
-
return unmountComponentAtNode(container);
|
|
49
|
-
}
|
|
50
|
-
function concurrentUnmount(container) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
// Delay to unmount to avoid React 18 sync warning
|
|
53
|
-
return Promise.resolve().then(() => {
|
|
54
|
-
var _a;
|
|
55
|
-
(_a = container[MARK]) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
56
|
-
delete container[MARK];
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
export function unmount(container) {
|
|
61
|
-
if (createRoot) {
|
|
62
|
-
return concurrentUnmount(container);
|
|
63
|
-
}
|
|
64
|
-
return legacyUnmount(container);
|
|
65
|
-
}
|
|
1
|
+
export * from 'rc-util/lib/React/render';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type UnmountType = () => Promise<void>;
|
|
3
|
+
export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Set React render function for compatible usage.
|
|
6
|
+
* This is internal usage only compatible with React 19.
|
|
7
|
+
* And will be removed in next major version.
|
|
8
|
+
*/
|
|
9
|
+
export declare function unstableSetRender(render?: RenderType): RenderType;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import warningOnce from 'rc-util/lib/warning';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ReactDOM from 'react-dom';
|
|
4
|
+
import { render, unmount } from './render';
|
|
5
|
+
const defaultReactRender = (node, container) => {
|
|
6
|
+
// Warning for React 19
|
|
7
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
8
|
+
const majorVersion = parseInt(React.version.split('.')[0], 10);
|
|
9
|
+
const fullKeys = Object.keys(ReactDOM);
|
|
10
|
+
warningOnce(majorVersion < 19 || fullKeys.includes('createRoot'), `[Compatible] antd-mobile v5 support React is 16 ~ 18. see https://mobile.ant.design/guide/v5-for-19 for compatible.`);
|
|
11
|
+
}
|
|
12
|
+
render(node, container);
|
|
13
|
+
return () => {
|
|
14
|
+
return unmount(container);
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
let unstableRender = defaultReactRender;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Set React render function for compatible usage.
|
|
20
|
+
* This is internal usage only compatible with React 19.
|
|
21
|
+
* And will be removed in next major version.
|
|
22
|
+
*/
|
|
23
|
+
export function unstableSetRender(render) {
|
|
24
|
+
if (render) {
|
|
25
|
+
unstableRender = render;
|
|
26
|
+
}
|
|
27
|
+
return unstableRender;
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.40.0",
|
|
4
4
|
"homepage": "https://github.com/ant-design/ant-design-mobile#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/ant-design/ant-design-mobile/issues"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"nano-memoize": "^3.0.16",
|
|
45
45
|
"rc-field-form": "^1.34.2",
|
|
46
46
|
"rc-segmented": "~2.4.1",
|
|
47
|
-
"rc-util": "^5.
|
|
47
|
+
"rc-util": "^5.44.4",
|
|
48
48
|
"react-fast-compare": "^3.2.2",
|
|
49
49
|
"react-is": "^18.2.0",
|
|
50
50
|
"runes2": "^1.1.2",
|