@mpxjs/webpack-plugin 2.10.16-beta.5 → 2.10.16-beta.7
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/loader.js +2 -2
- package/lib/runtime/components/react/context.ts +10 -6
- package/lib/runtime/components/react/dist/context.d.ts +75 -0
- package/lib/runtime/components/react/dist/context.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/event.config.d.ts +8 -0
- package/lib/runtime/components/react/dist/event.config.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts +8 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-button.d.ts +69 -0
- package/lib/runtime/components/react/dist/mpx-button.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-camera.d.ts +28 -0
- package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +11 -0
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +3 -0
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +53 -0
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-form.d.ts +28 -0
- package/lib/runtime/components/react/dist/mpx-form.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +19 -0
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-image.d.ts +22 -0
- package/lib/runtime/components/react/dist/mpx-image.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts +50 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.jsx +35 -9
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +46 -53
- package/lib/runtime/components/react/dist/mpx-label.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-label.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +66 -0
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-nav.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-nav.jsx +132 -0
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts +10 -0
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +3 -0
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +107 -0
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +15 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +14 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +17 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +12 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +17 -0
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +16 -0
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +30 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +10 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-progress.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-radio.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +2 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +25 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +15 -0
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +55 -0
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-slider.d.ts +31 -0
- package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +18 -0
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +16 -0
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +19 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts +53 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-switch.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-text.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts +102 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-view.d.ts +35 -0
- package/lib/runtime/components/react/dist/mpx-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/parser.d.ts +40 -0
- package/lib/runtime/components/react/dist/parser.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +33 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts +12 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/utils.d.ts +123 -0
- package/lib/runtime/components/react/dist/utils.d.ts.map +1 -0
- package/lib/runtime/components/react/mpx-camera.tsx +1 -1
- package/lib/runtime/components/react/mpx-input.tsx +41 -16
- package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +48 -58
- package/lib/runtime/components/react/mpx-nav.tsx +155 -0
- package/lib/runtime/components/react/types/common.d.ts +19 -0
- package/lib/style-compiler/strip-conditional-loader.js +27 -4
- package/package.json +6 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✘ report-submit
|
|
3
|
+
* ✘ report-submit-timeout
|
|
4
|
+
* ✔ bindsubmit
|
|
5
|
+
* ✔ bindreset
|
|
6
|
+
*/
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import { HandlerRef } from './useNodesRef';
|
|
10
|
+
interface FormProps {
|
|
11
|
+
style?: Record<string, any>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
'enable-offset'?: boolean;
|
|
14
|
+
'enable-var'?: boolean;
|
|
15
|
+
'external-var-context'?: Record<string, any>;
|
|
16
|
+
'parent-font-size'?: number;
|
|
17
|
+
'parent-width'?: number;
|
|
18
|
+
'parent-height'?: number;
|
|
19
|
+
bindsubmit?: (evt: {
|
|
20
|
+
detail: {
|
|
21
|
+
value: any;
|
|
22
|
+
};
|
|
23
|
+
}) => void;
|
|
24
|
+
bindreset?: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const _Form: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<HandlerRef<View, FormProps>>>;
|
|
27
|
+
export default _Form;
|
|
28
|
+
//# sourceMappingURL=mpx-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-form.d.ts","sourceRoot":"","sources":["../mpx-form.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAA2B,SAAS,EAA0B,MAAM,OAAO,CAAA;AAClF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE;QACjB,MAAM,EAAE;YACN,KAAK,EAAE,GAAG,CAAA;SACX,CAAA;KACF,KAAK,IAAI,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,mHA+FT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Text, TextStyle } from 'react-native';
|
|
3
|
+
import { HandlerRef } from '../useNodesRef';
|
|
4
|
+
export type IconType = 'success' | 'success_no_circle' | 'info' | 'warn' | 'waiting' | 'cancel' | 'download' | 'search' | 'clear';
|
|
5
|
+
export interface IconProps {
|
|
6
|
+
type: IconType;
|
|
7
|
+
size?: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
style?: TextStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
}
|
|
17
|
+
declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<HandlerRef<Text, IconProps>>>;
|
|
18
|
+
export default Icon;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-icon/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAS,MAAM,cAAc,CAAA;AAErD,OAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAaxD,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,mBAAmB,GACnB,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,CAAA;AAEX,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAcD,QAAA,MAAM,IAAI,mHA0DT,CAAA;AAID,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Image as RNImage, ImageStyle, NativeSyntheticEvent, ImageErrorEventData, ImageLoadEventData } from 'react-native';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
export type Mode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
5
|
+
export interface ImageProps {
|
|
6
|
+
src?: string;
|
|
7
|
+
mode?: Mode;
|
|
8
|
+
svg?: boolean;
|
|
9
|
+
style?: ImageStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
'enable-fast-image'?: boolean;
|
|
17
|
+
bindload?: (evt: NativeSyntheticEvent<ImageLoadEventData> | unknown) => void;
|
|
18
|
+
binderror?: (evt: NativeSyntheticEvent<ImageErrorEventData> | unknown) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const Image: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<HandlerRef<RNImage, ImageProps>>>;
|
|
21
|
+
export default Image;
|
|
22
|
+
//# sourceMappingURL=mpx-image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-image.d.ts","sourceRoot":"","sources":["../mpx-image.tsx"],"names":[],"mappings":";AAaA,OAAO,EACL,KAAK,IAAI,OAAO,EAEhB,UAAU,EAEV,oBAAoB,EACpB,mBAAmB,EAGnB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAIrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,MAAM,IAAI,GACZ,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAA;AAElB,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC5E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CAC/E;AAmED,QAAA,MAAM,KAAK,wHA8XT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-inline-text.d.ts","sourceRoot":"","sources":["../mpx-inline-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAA;AAI1C,QAAA,MAAM,UAAU;YAAW,SAAS,GAAG,WAAW;;CAQjD,CAAA;AAID,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInput, TextStyle, ViewStyle, NativeSyntheticEvent, TextInputTextInputEventData, TextInputKeyPressEventData, TextInputContentSizeChangeEventData, FlexStyle, TextInputSelectionChangeEventData, TextInputFocusEventData, TextInputSubmitEditingEventData } from 'react-native';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
type InputStyle = Omit<TextStyle & ViewStyle & Pick<FlexStyle, 'minHeight'>, 'borderLeftWidth' | 'borderTopWidth' | 'borderRightWidth' | 'borderBottomWidth' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius'>;
|
|
5
|
+
type Type = 'text' | 'number' | 'idcard' | 'digit';
|
|
6
|
+
type ConfirmType = 'done' | 'send' | 'search' | 'next' | 'go' | 'return';
|
|
7
|
+
export interface InputProps {
|
|
8
|
+
name?: string;
|
|
9
|
+
style?: InputStyle & Record<string, any>;
|
|
10
|
+
value?: string | number;
|
|
11
|
+
type?: Type;
|
|
12
|
+
password?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
'cursor-spacing'?: number;
|
|
16
|
+
maxlength?: number;
|
|
17
|
+
'auto-focus'?: boolean;
|
|
18
|
+
focus?: boolean;
|
|
19
|
+
'confirm-type'?: ConfirmType;
|
|
20
|
+
'confirm-hold'?: boolean;
|
|
21
|
+
cursor?: number;
|
|
22
|
+
'cursor-color'?: string;
|
|
23
|
+
'selection-start'?: number;
|
|
24
|
+
'selection-end'?: number;
|
|
25
|
+
'placeholder-style'?: {
|
|
26
|
+
color?: string;
|
|
27
|
+
};
|
|
28
|
+
'enable-offset'?: boolean;
|
|
29
|
+
'enable-var'?: boolean;
|
|
30
|
+
'external-var-context'?: Record<string, any>;
|
|
31
|
+
'parent-font-size'?: number;
|
|
32
|
+
'parent-width'?: number;
|
|
33
|
+
'parent-height'?: number;
|
|
34
|
+
'adjust-position': boolean;
|
|
35
|
+
bindinput?: (evt: NativeSyntheticEvent<TextInputTextInputEventData> | unknown) => void;
|
|
36
|
+
bindfocus?: (evt: NativeSyntheticEvent<TextInputFocusEventData> | unknown) => void;
|
|
37
|
+
bindblur?: (evt: NativeSyntheticEvent<TextInputFocusEventData> | unknown) => void;
|
|
38
|
+
bindconfirm?: (evt: NativeSyntheticEvent<TextInputSubmitEditingEventData | TextInputKeyPressEventData> | unknown) => void;
|
|
39
|
+
bindselectionchange?: (evt: NativeSyntheticEvent<TextInputSelectionChangeEventData> | unknown) => void;
|
|
40
|
+
}
|
|
41
|
+
export interface PrivateInputProps {
|
|
42
|
+
allowFontScaling?: boolean;
|
|
43
|
+
multiline?: boolean;
|
|
44
|
+
'auto-height'?: boolean;
|
|
45
|
+
bindlinechange?: (evt: NativeSyntheticEvent<TextInputContentSizeChangeEventData> | unknown) => void;
|
|
46
|
+
}
|
|
47
|
+
type FinalInputProps = InputProps & PrivateInputProps;
|
|
48
|
+
declare const Input: import("react").ForwardRefExoticComponent<InputProps & PrivateInputProps & import("react").RefAttributes<HandlerRef<TextInput, FinalInputProps>>>;
|
|
49
|
+
export default Input;
|
|
50
|
+
//# sourceMappingURL=mpx-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-input.d.ts","sourceRoot":"","sources":["../mpx-input.tsx"],"names":[],"mappings":";AAwCA,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,mCAAmC,EACnC,SAAS,EACT,iCAAiC,EACjC,uBAAuB,EAEvB,+BAA+B,EAEhC,MAAM,cAAc,CAAA;AAIrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,KAAK,UAAU,GAAG,IAAI,CACpB,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EAClD,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,sBAAsB,GACtB,yBAAyB,GACzB,wBAAwB,CAC3B,CAAA;AAED,KAAK,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAElD,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAA;AAExE,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ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C,iCAAiC,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACvG;AAED,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,mCAAmC,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACpG;AAED,KAAK,eAAe,GAAG,UAAU,GAAG,iBAAiB,CAAA;AASrD,QAAA,MAAM,KAAK,mJAuYT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -144,8 +144,8 @@ const Input = forwardRef((props, ref) => {
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
const setKeyboardAvoidContext = () => {
|
|
147
|
-
if (
|
|
148
|
-
keyboardAvoid.current = { cursorSpacing, ref: nodeRef };
|
|
147
|
+
if (keyboardAvoid) {
|
|
148
|
+
keyboardAvoid.current = { cursorSpacing, ref: nodeRef, adjustPosition };
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
const onTouchStart = () => {
|
|
@@ -156,13 +156,39 @@ const Input = forwardRef((props, ref) => {
|
|
|
156
156
|
evt.nativeEvent.origin = 'input';
|
|
157
157
|
};
|
|
158
158
|
const onFocus = (evt) => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
if (!keyboardAvoid?.current) {
|
|
160
|
+
setKeyboardAvoidContext();
|
|
161
|
+
}
|
|
162
|
+
if (bindfocus) {
|
|
163
|
+
const focusAction = () => {
|
|
164
|
+
bindfocus(getCustomEvent('focus', evt, {
|
|
165
|
+
detail: {
|
|
166
|
+
value: tmpValue.current || '',
|
|
167
|
+
height: keyboardAvoid?.current?.keyboardHeight
|
|
168
|
+
},
|
|
169
|
+
layoutRef
|
|
170
|
+
}, props));
|
|
171
|
+
if (keyboardAvoid?.current?.onKeyboardShow) {
|
|
172
|
+
keyboardAvoid.current.onKeyboardShow = undefined;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
if (keyboardAvoid?.current) {
|
|
176
|
+
// 有 keyboardAvoiding
|
|
177
|
+
if (keyboardAvoid.current.keyboardHeight) {
|
|
178
|
+
// iOS: keyboard 获取高度时机 keyboardWillShow 在 input focus 之前,可以立即执行
|
|
179
|
+
focusAction();
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
// Android,Harmony: keyboard 获取高度时机 keyboardDidShow 在 input focus 之后,需要延迟回调
|
|
183
|
+
evt.persist();
|
|
184
|
+
keyboardAvoid.current.onKeyboardShow = focusAction;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
// 无 keyboardAvoiding,直接执行 focus 回调
|
|
189
|
+
focusAction();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
166
192
|
};
|
|
167
193
|
const onBlur = (evt) => {
|
|
168
194
|
bindblur && bindblur(getCustomEvent('blur', evt, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
type KeyboardAvoidViewProps = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
style?: ViewStyle;
|
|
6
|
+
contentContainerStyle?: ViewStyle;
|
|
7
|
+
};
|
|
8
|
+
declare const KeyboardAvoidingView: {
|
|
9
|
+
({ children, style, contentContainerStyle }: KeyboardAvoidViewProps): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default KeyboardAvoidingView;
|
|
13
|
+
//# sourceMappingURL=mpx-keyboard-avoiding-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-keyboard-avoiding-view.d.ts","sourceRoot":"","sources":["../mpx-keyboard-avoiding-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAA;AACvE,OAAO,EAAuD,SAAS,EAA0C,MAAM,cAAc,CAAA;AAKrI,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,qBAAqB,CAAC,EAAE,SAAS,CAAA;CAClC,CAAA;AAED,QAAA,MAAM,oBAAoB;iDAAgD,sBAAsB;;CA8G/F,CAAA;AAID,eAAe,oBAAoB,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/* eslint-disable space-before-function-paren */
|
|
1
2
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
2
3
|
import { Keyboard, View } from 'react-native';
|
|
3
4
|
import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, cancelAnimation } from 'react-native-reanimated';
|
|
4
5
|
import { KeyboardAvoidContext } from './context';
|
|
5
|
-
import { isIOS } from './utils';
|
|
6
|
+
import { isAndroid, isIOS } from './utils';
|
|
6
7
|
const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
7
8
|
const duration = isIOS ? 250 : 300;
|
|
8
9
|
const easing = isIOS ? Easing.inOut(Easing.ease) : Easing.out(Easing.quad);
|
|
@@ -14,7 +15,8 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
|
14
15
|
// 因此增加状态标记 + cancelAnimation 来优化
|
|
15
16
|
const isShow = useRef(false);
|
|
16
17
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
17
|
-
|
|
18
|
+
// translate/position top可能会导致底部渲染区域缺失
|
|
19
|
+
marginTop: -offset.value,
|
|
18
20
|
flexBasis: basic.value
|
|
19
21
|
}));
|
|
20
22
|
const resetKeyboard = () => {
|
|
@@ -23,6 +25,11 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
|
23
25
|
}
|
|
24
26
|
isShow.current = false;
|
|
25
27
|
if (keyboardAvoid?.current) {
|
|
28
|
+
const inputRef = keyboardAvoid.current.ref?.current;
|
|
29
|
+
if (inputRef && inputRef.isFocused()) {
|
|
30
|
+
// 修复 Android 点击键盘收起按钮时当前 input 没触发失焦的问题
|
|
31
|
+
inputRef.blur();
|
|
32
|
+
}
|
|
26
33
|
keyboardAvoid.current = null;
|
|
27
34
|
}
|
|
28
35
|
cancelAnimation(offset);
|
|
@@ -36,72 +43,58 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
|
|
|
36
43
|
};
|
|
37
44
|
useEffect(() => {
|
|
38
45
|
let subscriptions = [];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
function keybaordAvoding(evt) {
|
|
47
|
+
if (!keyboardAvoid?.current || isShow.current) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
isShow.current = true;
|
|
51
|
+
const { endCoordinates } = evt;
|
|
52
|
+
const { ref, cursorSpacing = 0, adjustPosition, onKeyboardShow } = keyboardAvoid.current;
|
|
53
|
+
keyboardAvoid.current.keyboardHeight = endCoordinates.height;
|
|
54
|
+
onKeyboardShow?.();
|
|
55
|
+
if (adjustPosition) {
|
|
56
|
+
// 默认沿用旧版本逻辑,在 android 原生关闭键盘避让的情况下应该将该配置设置为 false,走 mpx 的键盘避让逻辑,否则bundle内的所有input都会无法避让键盘
|
|
57
|
+
const enableNativeKeyboardAvoiding = mpxGlobal?.__mpx?.config?.rnConfig?.enableNativeKeyboardAvoiding ?? true;
|
|
58
|
+
const callback = () => {
|
|
59
|
+
ref?.current?.measure((x, y, width, height, pageX, pageY) => {
|
|
60
|
+
function calculateOffset() {
|
|
61
|
+
// enableNativeKeyboardAvoding 默认开启
|
|
62
|
+
if (enableNativeKeyboardAvoiding && isAndroid) {
|
|
63
|
+
const aboveOffset = pageY + height - endCoordinates.screenY;
|
|
64
|
+
const belowOffset = endCoordinates.height - aboveOffset;
|
|
65
|
+
const aboveValue = -aboveOffset >= cursorSpacing ? 0 : aboveOffset + cursorSpacing;
|
|
66
|
+
const belowValue = Math.min(belowOffset, cursorSpacing);
|
|
67
|
+
return aboveOffset > 0 ? belowValue : aboveValue;
|
|
68
|
+
}
|
|
50
69
|
const aboveOffset = offset.value + pageY + height - endCoordinates.screenY;
|
|
51
70
|
const aboveValue = -aboveOffset >= cursorSpacing ? 0 : aboveOffset + cursorSpacing;
|
|
52
71
|
const belowValue = Math.min(endCoordinates.height, aboveOffset + cursorSpacing);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
offset.value = withTiming(value, { duration, easing }, (finished) => {
|
|
56
|
-
if (finished) {
|
|
57
|
-
// Set flexBasic after animation to trigger re-layout and reset layout information
|
|
58
|
-
basic.value = '99.99%';
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}),
|
|
64
|
-
Keyboard.addListener('keyboardWillHide', resetKeyboard)
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
subscriptions = [
|
|
69
|
-
Keyboard.addListener('keyboardDidShow', (evt) => {
|
|
70
|
-
if (!keyboardAvoid?.current || isShow.current) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
isShow.current = true;
|
|
74
|
-
const { endCoordinates } = evt;
|
|
75
|
-
const { ref, cursorSpacing = 0 } = keyboardAvoid.current;
|
|
76
|
-
ref?.current?.measure((x, y, width, height, pageX, pageY) => {
|
|
77
|
-
const aboveOffset = pageY + height - endCoordinates.screenY;
|
|
78
|
-
const belowOffset = endCoordinates.height - aboveOffset;
|
|
79
|
-
const aboveValue = -aboveOffset >= cursorSpacing ? 0 : aboveOffset + cursorSpacing;
|
|
80
|
-
const belowValue = Math.min(belowOffset, cursorSpacing);
|
|
81
|
-
const value = aboveOffset > 0 ? belowValue : aboveValue;
|
|
72
|
+
return aboveOffset > 0 ? belowValue : aboveValue;
|
|
73
|
+
}
|
|
82
74
|
cancelAnimation(offset);
|
|
83
|
-
offset.value = withTiming(
|
|
75
|
+
offset.value = withTiming(calculateOffset(), { duration, easing }, finished => {
|
|
84
76
|
if (finished) {
|
|
85
77
|
// Set flexBasic after animation to trigger re-layout and reset layout information
|
|
86
78
|
basic.value = '99.99%';
|
|
87
79
|
}
|
|
88
80
|
});
|
|
89
81
|
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
};
|
|
83
|
+
(isIOS ? () => setTimeout(callback) : callback)();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (isIOS) {
|
|
87
|
+
subscriptions = [Keyboard.addListener('keyboardWillShow', keybaordAvoding), Keyboard.addListener('keyboardWillHide', resetKeyboard)];
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
subscriptions = [Keyboard.addListener('keyboardDidShow', keybaordAvoding), Keyboard.addListener('keyboardDidHide', resetKeyboard)];
|
|
93
91
|
}
|
|
94
92
|
return () => {
|
|
95
93
|
subscriptions.forEach(subscription => subscription.remove());
|
|
96
94
|
};
|
|
97
95
|
}, [keyboardAvoid]);
|
|
98
|
-
return (<View style={style} onTouchEnd={onTouchEnd}>
|
|
99
|
-
<Animated.View style={[
|
|
100
|
-
contentContainerStyle,
|
|
101
|
-
animatedStyle
|
|
102
|
-
]}>
|
|
103
|
-
{children}
|
|
104
|
-
</Animated.View>
|
|
96
|
+
return (<View style={style} onTouchEnd={onTouchEnd} onTouchMove={onTouchEnd}>
|
|
97
|
+
<Animated.View style={[contentContainerStyle, animatedStyle]}>{children}</Animated.View>
|
|
105
98
|
</View>);
|
|
106
99
|
};
|
|
107
100
|
KeyboardAvoidingView.displayName = 'MpxKeyboardAvoidingView';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✘ for
|
|
3
|
+
*/
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { View, ViewStyle, NativeSyntheticEvent } from 'react-native';
|
|
6
|
+
import { HandlerRef } from './useNodesRef';
|
|
7
|
+
export interface LabelProps {
|
|
8
|
+
for?: string;
|
|
9
|
+
style?: ViewStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
bindtap?: (evt: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HandlerRef<View, LabelProps>>>;
|
|
20
|
+
export default Label;
|
|
21
|
+
//# sourceMappingURL=mpx-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-label.d.ts","sourceRoot":"","sources":["../mpx-label.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAA2B,SAAS,EAA8B,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAGpE,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACpE;AAED,QAAA,MAAM,KAAK,qHA0FV,CAAA;AAID,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✘ scale-area
|
|
3
|
+
*/
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import { HandlerRef } from './useNodesRef';
|
|
7
|
+
interface MovableAreaProps {
|
|
8
|
+
style?: Record<string, any>;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
'enable-offset'?: boolean;
|
|
13
|
+
'enable-var'?: boolean;
|
|
14
|
+
'external-var-context'?: Record<string, any>;
|
|
15
|
+
'parent-font-size'?: number;
|
|
16
|
+
'parent-width'?: number;
|
|
17
|
+
'parent-height'?: number;
|
|
18
|
+
}
|
|
19
|
+
declare const _MovableArea: import("react").ForwardRefExoticComponent<MovableAreaProps & import("react").RefAttributes<HandlerRef<View, MovableAreaProps>>>;
|
|
20
|
+
export default _MovableArea;
|
|
21
|
+
//# sourceMappingURL=mpx-movable-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-movable-area.d.ts","sourceRoot":"","sources":["../mpx-movable-area.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAmB,SAAS,EAAkC,MAAM,OAAO,CAAA;AAClF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAMvD,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,QAAA,MAAM,YAAY,iIAsDhB,CAAA;AAIF,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ direction
|
|
3
|
+
* ✔ inertia
|
|
4
|
+
* ✔ out-of-bounds
|
|
5
|
+
* ✔ x
|
|
6
|
+
* ✔ y
|
|
7
|
+
* ✔ damping
|
|
8
|
+
* ✔ friction
|
|
9
|
+
* ✔ disabled
|
|
10
|
+
* ✘ scale
|
|
11
|
+
* ✘ scale-min
|
|
12
|
+
* ✘ scale-max
|
|
13
|
+
* ✘ scale-value
|
|
14
|
+
* ✔ animation
|
|
15
|
+
* ✔ bindchange
|
|
16
|
+
* ✘ bindscale
|
|
17
|
+
* ✔ htouchmove
|
|
18
|
+
* ✔ vtouchmove
|
|
19
|
+
*/
|
|
20
|
+
import { ReactNode } from 'react';
|
|
21
|
+
import { View, LayoutChangeEvent } from 'react-native';
|
|
22
|
+
import { HandlerRef } from './useNodesRef';
|
|
23
|
+
import { GestureHandler } from './utils';
|
|
24
|
+
import { GestureTouchEvent } from 'react-native-gesture-handler';
|
|
25
|
+
interface MovableViewProps {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
style?: Record<string, any>;
|
|
28
|
+
direction: 'all' | 'vertical' | 'horizontal' | 'none';
|
|
29
|
+
x?: number;
|
|
30
|
+
y?: number;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
animation?: boolean;
|
|
33
|
+
damping?: number;
|
|
34
|
+
friction?: number;
|
|
35
|
+
id?: string;
|
|
36
|
+
changeThrottleTime?: number;
|
|
37
|
+
bindchange?: (event: unknown) => void;
|
|
38
|
+
bindtouchstart?: (event: GestureTouchEvent) => void;
|
|
39
|
+
catchtouchstart?: (event: GestureTouchEvent) => void;
|
|
40
|
+
bindtouchmove?: (event: GestureTouchEvent) => void;
|
|
41
|
+
catchtouchmove?: (event: GestureTouchEvent) => void;
|
|
42
|
+
catchtouchend?: (event: GestureTouchEvent) => void;
|
|
43
|
+
bindtouchend?: (event: GestureTouchEvent) => void;
|
|
44
|
+
bindhtouchmove?: (event: GestureTouchEvent) => void;
|
|
45
|
+
bindvtouchmove?: (event: GestureTouchEvent) => void;
|
|
46
|
+
catchhtouchmove?: (event: GestureTouchEvent) => void;
|
|
47
|
+
catchvtouchmove?: (event: GestureTouchEvent) => void;
|
|
48
|
+
bindlongpress?: (event: GestureTouchEvent) => void;
|
|
49
|
+
catchlongpress?: (event: GestureTouchEvent) => void;
|
|
50
|
+
bindtap?: (event: GestureTouchEvent) => void;
|
|
51
|
+
catchtap?: (event: GestureTouchEvent) => void;
|
|
52
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
53
|
+
'out-of-bounds'?: boolean;
|
|
54
|
+
'wait-for'?: Array<GestureHandler>;
|
|
55
|
+
'simultaneous-handlers'?: Array<GestureHandler>;
|
|
56
|
+
inertia?: boolean;
|
|
57
|
+
'enable-var'?: boolean;
|
|
58
|
+
'external-var-context'?: Record<string, any>;
|
|
59
|
+
'parent-font-size'?: number;
|
|
60
|
+
'parent-width'?: number;
|
|
61
|
+
'parent-height'?: number;
|
|
62
|
+
'disable-event-passthrough'?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare const _MovableView: import("react").ForwardRefExoticComponent<MovableViewProps & import("react").RefAttributes<HandlerRef<View, MovableViewProps>>>;
|
|
65
|
+
export default _MovableView;
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E,OAAO,CAAA;CACtC;AAUD,QAAA,MAAM,YAAY,iIAujBhB,CAAA;AAIF,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useInnerHeaderHeight(pageConfig: PageConfig): number;
|
|
3
|
+
export interface MpxNavProps {
|
|
4
|
+
pageConfig: PageConfig;
|
|
5
|
+
navigation: any;
|
|
6
|
+
}
|
|
7
|
+
declare const MpxNav: import("react").MemoExoticComponent<({ pageConfig, navigation }: MpxNavProps) => import("react").JSX.Element>;
|
|
8
|
+
export default MpxNav;
|
|
9
|
+
//# sourceMappingURL=mpx-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-nav.d.ts","sourceRoot":"","sources":["../mpx-nav.tsx"],"names":[],"mappings":";AA0BA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,UAS1D;AA6CD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,GAAG,CAAA;CAChB;AAKD,QAAA,MAAM,MAAM,mEAAqC,WAAW,iCA+D1D,CAAA;AAGF,eAAe,MAAM,CAAA"}
|