@mpxjs/webpack-plugin 2.10.22 → 2.10.24-test.1
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 -0
- package/lib/platform/style/wx/index.js +395 -104
- package/lib/react/index.js +3 -1
- package/lib/react/processTemplate.js +3 -1
- package/lib/react/style-helper.js +6 -6
- package/lib/runtime/components/react/animationHooks/index.ts +7 -3
- package/lib/runtime/components/react/dist/animationHooks/index.d.ts +0 -2
- package/lib/runtime/components/react/dist/animationHooks/index.js +6 -1
- package/lib/runtime/components/react/dist/event.config.d.ts +2 -6
- package/lib/runtime/components/react/dist/event.config.js +28 -24
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts +1 -1
- package/lib/runtime/components/react/dist/getInnerListeners.js +74 -56
- package/lib/runtime/components/react/dist/mpx-button.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-button.jsx +16 -9
- package/lib/runtime/components/react/dist/mpx-camera.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-camera.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-checkbox-group.jsx +3 -4
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-checkbox.jsx +8 -9
- package/lib/runtime/components/react/dist/mpx-form.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-form.jsx +5 -5
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-icon/index.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-image.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-image.jsx +59 -43
- package/lib/runtime/components/react/dist/mpx-input.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-input.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-label.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-label.jsx +5 -6
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-movable-area.jsx +3 -3
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-movable-view.jsx +6 -6
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-picker-view/index.jsx +5 -7
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-progress.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-progress.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-radio-group.jsx +3 -4
- package/lib/runtime/components/react/dist/mpx-radio.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-radio.jsx +8 -9
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-rich-text/index.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +6 -6
- package/lib/runtime/components/react/dist/mpx-simple-text.jsx +36 -31
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +4 -2
- package/lib/runtime/components/react/dist/mpx-simple-view.jsx +24 -17
- package/lib/runtime/components/react/dist/mpx-slider.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-slider.jsx +6 -6
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-sticky-header.jsx +5 -5
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-sticky-section.jsx +6 -6
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-swiper-item.jsx +5 -5
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts +1 -1
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +4 -7
- package/lib/runtime/components/react/dist/mpx-switch.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-switch.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-text.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-text.jsx +44 -40
- package/lib/runtime/components/react/dist/mpx-video.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-video.jsx +4 -4
- package/lib/runtime/components/react/dist/mpx-view.d.ts +2 -1
- package/lib/runtime/components/react/dist/mpx-view.jsx +229 -128
- package/lib/runtime/components/react/dist/mpx-web-view.jsx +5 -1
- package/lib/runtime/components/react/dist/namedColorSet.d.ts +2 -0
- package/lib/runtime/components/react/dist/namedColorSet.js +149 -0
- package/lib/runtime/components/react/dist/utils.d.ts +73 -69
- package/lib/runtime/components/react/dist/utils.jsx +1295 -442
- package/lib/runtime/components/react/event.config.ts +32 -25
- package/lib/runtime/components/react/getInnerListeners.ts +84 -60
- package/lib/runtime/components/react/mpx-button.tsx +18 -16
- package/lib/runtime/components/react/mpx-camera.tsx +0 -3
- package/lib/runtime/components/react/mpx-canvas/index.tsx +1 -3
- package/lib/runtime/components/react/mpx-canvas/utils.tsx +3 -1
- package/lib/runtime/components/react/mpx-checkbox-group.tsx +2 -6
- package/lib/runtime/components/react/mpx-checkbox.tsx +9 -11
- package/lib/runtime/components/react/mpx-form.tsx +6 -6
- package/lib/runtime/components/react/mpx-icon/index.tsx +1 -3
- package/lib/runtime/components/react/mpx-image.tsx +65 -54
- package/lib/runtime/components/react/mpx-input.tsx +1 -3
- package/lib/runtime/components/react/mpx-label.tsx +6 -8
- package/lib/runtime/components/react/mpx-movable-area.tsx +3 -4
- package/lib/runtime/components/react/mpx-movable-view.tsx +7 -7
- package/lib/runtime/components/react/mpx-picker-view/index.tsx +6 -8
- package/lib/runtime/components/react/mpx-picker-view-column/index.tsx +2 -4
- package/lib/runtime/components/react/mpx-progress.tsx +0 -3
- package/lib/runtime/components/react/mpx-radio-group.tsx +2 -6
- package/lib/runtime/components/react/mpx-radio.tsx +9 -11
- package/lib/runtime/components/react/mpx-rich-text/index.tsx +0 -3
- package/lib/runtime/components/react/mpx-scroll-view.tsx +7 -7
- package/lib/runtime/components/react/mpx-simple-text.tsx +36 -38
- package/lib/runtime/components/react/mpx-simple-view.tsx +29 -17
- package/lib/runtime/components/react/mpx-slider.tsx +15 -10
- package/lib/runtime/components/react/mpx-sticky-header.tsx +6 -6
- package/lib/runtime/components/react/mpx-sticky-section.tsx +7 -7
- package/lib/runtime/components/react/mpx-swiper-item.tsx +6 -6
- package/lib/runtime/components/react/mpx-swiper.tsx +5 -8
- package/lib/runtime/components/react/mpx-switch.tsx +0 -3
- package/lib/runtime/components/react/mpx-text.tsx +46 -49
- package/lib/runtime/components/react/mpx-video.tsx +3 -5
- package/lib/runtime/components/react/mpx-view.tsx +250 -141
- package/lib/runtime/components/react/mpx-web-view.tsx +8 -3
- package/lib/runtime/components/react/namedColorSet.ts +150 -0
- package/lib/runtime/components/react/types/getInnerListeners.d.ts +21 -1
- package/lib/runtime/components/react/types/global.d.ts +1 -0
- package/lib/runtime/components/react/utils.tsx +1347 -539
- package/lib/runtime/i18n.wxs +15 -9
- package/lib/style-compiler/strip-conditional.js +19 -4
- package/lib/template-compiler/compiler.js +5 -1
- package/lib/utils/source-location.js +9 -13
- package/lib/web/index.js +3 -1
- package/lib/web/processTemplate.js +3 -1
- package/package.json +5 -4
- package/LICENSE +0 -433
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
const namedColorSet = {
|
|
2
|
+
transparent: true,
|
|
3
|
+
aliceblue: true,
|
|
4
|
+
antiquewhite: true,
|
|
5
|
+
aqua: true,
|
|
6
|
+
aquamarine: true,
|
|
7
|
+
azure: true,
|
|
8
|
+
beige: true,
|
|
9
|
+
bisque: true,
|
|
10
|
+
black: true,
|
|
11
|
+
blanchedalmond: true,
|
|
12
|
+
blue: true,
|
|
13
|
+
blueviolet: true,
|
|
14
|
+
brown: true,
|
|
15
|
+
burlywood: true,
|
|
16
|
+
cadetblue: true,
|
|
17
|
+
chartreuse: true,
|
|
18
|
+
chocolate: true,
|
|
19
|
+
coral: true,
|
|
20
|
+
cornflowerblue: true,
|
|
21
|
+
cornsilk: true,
|
|
22
|
+
crimson: true,
|
|
23
|
+
cyan: true,
|
|
24
|
+
darkblue: true,
|
|
25
|
+
darkcyan: true,
|
|
26
|
+
darkgoldenrod: true,
|
|
27
|
+
darkgray: true,
|
|
28
|
+
darkgreen: true,
|
|
29
|
+
darkgrey: true,
|
|
30
|
+
darkkhaki: true,
|
|
31
|
+
darkmagenta: true,
|
|
32
|
+
darkolivegreen: true,
|
|
33
|
+
darkorange: true,
|
|
34
|
+
darkorchid: true,
|
|
35
|
+
darkred: true,
|
|
36
|
+
darksalmon: true,
|
|
37
|
+
darkseagreen: true,
|
|
38
|
+
darkslateblue: true,
|
|
39
|
+
darkslategrey: true,
|
|
40
|
+
darkturquoise: true,
|
|
41
|
+
darkviolet: true,
|
|
42
|
+
deeppink: true,
|
|
43
|
+
deepskyblue: true,
|
|
44
|
+
dimgray: true,
|
|
45
|
+
dimgrey: true,
|
|
46
|
+
dodgerblue: true,
|
|
47
|
+
firebrick: true,
|
|
48
|
+
floralwhite: true,
|
|
49
|
+
forestgreen: true,
|
|
50
|
+
fuchsia: true,
|
|
51
|
+
gainsboro: true,
|
|
52
|
+
ghostwhite: true,
|
|
53
|
+
gold: true,
|
|
54
|
+
goldenrod: true,
|
|
55
|
+
gray: true,
|
|
56
|
+
green: true,
|
|
57
|
+
greenyellow: true,
|
|
58
|
+
grey: true,
|
|
59
|
+
honeydew: true,
|
|
60
|
+
hotpink: true,
|
|
61
|
+
indianred: true,
|
|
62
|
+
indigo: true,
|
|
63
|
+
ivory: true,
|
|
64
|
+
khaki: true,
|
|
65
|
+
lavender: true,
|
|
66
|
+
lavenderblush: true,
|
|
67
|
+
lawngreen: true,
|
|
68
|
+
lemonchiffon: true,
|
|
69
|
+
lightblue: true,
|
|
70
|
+
lightcoral: true,
|
|
71
|
+
lightcyan: true,
|
|
72
|
+
lightgoldenrodyellow: true,
|
|
73
|
+
lightgray: true,
|
|
74
|
+
lightgreen: true,
|
|
75
|
+
lightgrey: true,
|
|
76
|
+
lightpink: true,
|
|
77
|
+
lightsalmon: true,
|
|
78
|
+
lightseagreen: true,
|
|
79
|
+
lightskyblue: true,
|
|
80
|
+
lightslategrey: true,
|
|
81
|
+
lightsteelblue: true,
|
|
82
|
+
lightyellow: true,
|
|
83
|
+
lime: true,
|
|
84
|
+
limegreen: true,
|
|
85
|
+
linen: true,
|
|
86
|
+
magenta: true,
|
|
87
|
+
maroon: true,
|
|
88
|
+
mediumaquamarine: true,
|
|
89
|
+
mediumblue: true,
|
|
90
|
+
mediumorchid: true,
|
|
91
|
+
mediumpurple: true,
|
|
92
|
+
mediumseagreen: true,
|
|
93
|
+
mediumslateblue: true,
|
|
94
|
+
mediumspringgreen: true,
|
|
95
|
+
mediumturquoise: true,
|
|
96
|
+
mediumvioletred: true,
|
|
97
|
+
midnightblue: true,
|
|
98
|
+
mintcream: true,
|
|
99
|
+
mistyrose: true,
|
|
100
|
+
moccasin: true,
|
|
101
|
+
navajowhite: true,
|
|
102
|
+
navy: true,
|
|
103
|
+
oldlace: true,
|
|
104
|
+
olive: true,
|
|
105
|
+
olivedrab: true,
|
|
106
|
+
orange: true,
|
|
107
|
+
orangered: true,
|
|
108
|
+
orchid: true,
|
|
109
|
+
palegoldenrod: true,
|
|
110
|
+
palegreen: true,
|
|
111
|
+
paleturquoise: true,
|
|
112
|
+
palevioletred: true,
|
|
113
|
+
papayawhip: true,
|
|
114
|
+
peachpuff: true,
|
|
115
|
+
peru: true,
|
|
116
|
+
pink: true,
|
|
117
|
+
plum: true,
|
|
118
|
+
powderblue: true,
|
|
119
|
+
purple: true,
|
|
120
|
+
rebeccapurple: true,
|
|
121
|
+
red: true,
|
|
122
|
+
rosybrown: true,
|
|
123
|
+
royalblue: true,
|
|
124
|
+
saddlebrown: true,
|
|
125
|
+
salmon: true,
|
|
126
|
+
sandybrown: true,
|
|
127
|
+
seagreen: true,
|
|
128
|
+
seashell: true,
|
|
129
|
+
sienna: true,
|
|
130
|
+
silver: true,
|
|
131
|
+
skyblue: true,
|
|
132
|
+
slateblue: true,
|
|
133
|
+
slategray: true,
|
|
134
|
+
snow: true,
|
|
135
|
+
springgreen: true,
|
|
136
|
+
steelblue: true,
|
|
137
|
+
tan: true,
|
|
138
|
+
teal: true,
|
|
139
|
+
thistle: true,
|
|
140
|
+
tomato: true,
|
|
141
|
+
turquoise: true,
|
|
142
|
+
violet: true,
|
|
143
|
+
wheat: true,
|
|
144
|
+
white: true,
|
|
145
|
+
whitesmoke: true,
|
|
146
|
+
yellow: true,
|
|
147
|
+
yellowgreen: true
|
|
148
|
+
};
|
|
149
|
+
export default namedColorSet;
|
|
@@ -2,19 +2,11 @@ import { ReactNode, ReactElement, Dispatch, SetStateAction, MutableRefObject } f
|
|
|
2
2
|
import { LayoutChangeEvent, TextStyle, ImageProps, Image } from 'react-native';
|
|
3
3
|
import { TextPassThroughContextValue } from './context';
|
|
4
4
|
import type { AnyFunc } from './types/common';
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const SVG_REGEXP: RegExp;
|
|
9
|
-
export declare const BACKGROUND_STYLE_MAP: Record<string, boolean>;
|
|
10
|
-
export declare const TEXT_PROPS_MAP: Record<string, boolean>;
|
|
11
|
-
export declare const DEFAULT_FONT_SIZE = 16;
|
|
12
|
-
export declare const HIDDEN_STYLE: {
|
|
5
|
+
export declare const percentRegExp: RegExp;
|
|
6
|
+
export declare const svgRegExp: RegExp;
|
|
7
|
+
export declare const hiddenStyle: {
|
|
13
8
|
opacity: number;
|
|
14
9
|
};
|
|
15
|
-
export declare const DEFAULT_BOX_SIZING_STYLE: {
|
|
16
|
-
boxSizing: string;
|
|
17
|
-
};
|
|
18
10
|
export declare const isIOS: boolean;
|
|
19
11
|
export declare const isAndroid: boolean;
|
|
20
12
|
export declare const isHarmony: boolean;
|
|
@@ -24,88 +16,44 @@ export declare const extendObject: {
|
|
|
24
16
|
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
|
25
17
|
(target: object, ...sources: any[]): any;
|
|
26
18
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare const useUpdateEffect: (effect: any, deps: any) => void;
|
|
36
|
-
export declare const parseUrl: (cssUrl?: string) => string | undefined;
|
|
37
|
-
export declare const getRestProps: (transferProps?: any, originProps?: any, deletePropsKey?: any) => any;
|
|
38
|
-
export declare function isText(ele: ReactNode): ele is ReactElement;
|
|
39
|
-
export declare function isStringChildren(children: ReactNode): boolean;
|
|
40
|
-
type GroupData<T> = Record<string, Partial<T>>;
|
|
41
|
-
export declare function groupBy<T extends Record<string, any>>(obj: T, callback: (key: string, val: T[keyof T]) => string, group?: GroupData<T>): GroupData<T>;
|
|
42
|
-
export declare function splitStyle<T extends Record<string, any>>(styleObj: T, sideEffect?: (key: string, val: T[keyof T]) => void): {
|
|
43
|
-
textStyle?: Partial<T>;
|
|
44
|
-
backgroundStyle?: Partial<T>;
|
|
45
|
-
innerStyle?: Partial<T>;
|
|
46
|
-
};
|
|
47
|
-
export declare function parseValues(str: string, char?: string): string[];
|
|
19
|
+
interface PercentConfig {
|
|
20
|
+
fontSize?: number | string;
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
parentFontSize?: number;
|
|
24
|
+
parentWidth?: number;
|
|
25
|
+
parentHeight?: number;
|
|
26
|
+
}
|
|
48
27
|
interface TransformStyleConfig {
|
|
49
28
|
enableVar?: boolean;
|
|
50
|
-
externalVarContext?: Record<string, any>;
|
|
51
29
|
parentFontSize?: number;
|
|
52
30
|
parentWidth?: number;
|
|
53
31
|
parentHeight?: number;
|
|
54
32
|
transformRadiusPercent?: boolean;
|
|
33
|
+
defaultStyle?: Record<string, any>;
|
|
55
34
|
}
|
|
56
|
-
export declare function useTransformStyle(styleObj: Record<string, any> | undefined, { enableVar, transformRadiusPercent, externalVarContext, parentFontSize, parentWidth, parentHeight }: TransformStyleConfig): {
|
|
57
|
-
hasVarDec: boolean;
|
|
58
|
-
varContextRef: MutableRefObject<{}>;
|
|
59
|
-
setWidth: Dispatch<SetStateAction<number>>;
|
|
60
|
-
setHeight: Dispatch<SetStateAction<number>>;
|
|
61
|
-
normalStyle: Record<string, any>;
|
|
62
|
-
hasSelfPercent: boolean;
|
|
63
|
-
hasPositionFixed: boolean;
|
|
64
|
-
};
|
|
65
35
|
export interface VisitorArg {
|
|
66
36
|
target: Record<string, any>;
|
|
67
37
|
key: string;
|
|
68
38
|
value: any;
|
|
69
39
|
keyPath: Array<string>;
|
|
70
40
|
}
|
|
71
|
-
export declare function traverseStyle(styleObj: Record<string, any>, visitors: Array<(arg: VisitorArg) => void>): void;
|
|
72
|
-
export declare function setStyle(styleObj: Record<string, any>, keyPath: Array<string>, setter: (arg: VisitorArg) => void): void;
|
|
73
|
-
export declare function splitProps<T extends Record<string, any>>(props: T): {
|
|
74
|
-
textProps?: Partial<T>;
|
|
75
|
-
innerProps?: Partial<T>;
|
|
76
|
-
};
|
|
77
41
|
interface LayoutConfig {
|
|
78
42
|
props: Record<string, any>;
|
|
79
43
|
hasSelfPercent: boolean;
|
|
80
44
|
setWidth?: Dispatch<SetStateAction<number>>;
|
|
81
45
|
setHeight?: Dispatch<SetStateAction<number>>;
|
|
82
|
-
onLayout?: (event
|
|
46
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
83
47
|
nodeRef: React.RefObject<any>;
|
|
84
48
|
}
|
|
85
|
-
export declare const useLayout: ({ props, hasSelfPercent, setWidth, setHeight, onLayout, nodeRef }: LayoutConfig) => {
|
|
86
|
-
layoutRef: MutableRefObject<{}>;
|
|
87
|
-
layoutStyle: {};
|
|
88
|
-
layoutProps: Record<string, any>;
|
|
89
|
-
};
|
|
90
49
|
export interface WrapChildrenConfig {
|
|
91
50
|
hasVarDec: boolean;
|
|
92
51
|
varContext?: Record<string, any>;
|
|
93
52
|
textPassThrough?: TextPassThroughContextValue | null;
|
|
94
53
|
}
|
|
95
54
|
export interface TextPassThroughValueOptions {
|
|
96
|
-
|
|
97
|
-
disabled?: boolean;
|
|
55
|
+
enableTextPassThrough?: boolean;
|
|
98
56
|
}
|
|
99
|
-
export declare function useTextPassThroughValue(textStyle?: TextStyle, textProps?: Record<string, any>, { inheritTextProps, disabled }?: TextPassThroughValueOptions): TextPassThroughContextValue | null;
|
|
100
|
-
export declare function wrapChildren(props: Record<string, any> | undefined, { hasVarDec, varContext, textPassThrough }: WrapChildrenConfig): any;
|
|
101
|
-
export declare const debounce: <T extends AnyFunc>(func: T, delay: number) => ((...args: Parameters<T>) => void) & {
|
|
102
|
-
clear: () => void;
|
|
103
|
-
};
|
|
104
|
-
export declare const useDebounceCallback: <T extends AnyFunc>(func: T, delay: number) => ((...args: Parameters<T>) => void) & {
|
|
105
|
-
clear: () => void;
|
|
106
|
-
};
|
|
107
|
-
export declare const useStableCallback: <T extends AnyFunc | null | undefined>(callback: T) => T extends AnyFunc ? T : () => void;
|
|
108
|
-
export declare function usePrevious<T>(value: T): T | undefined;
|
|
109
57
|
export interface GestureHandler {
|
|
110
58
|
nodeRefs?: Array<{
|
|
111
59
|
getNodeInstance: () => {
|
|
@@ -114,10 +62,57 @@ export interface GestureHandler {
|
|
|
114
62
|
}>;
|
|
115
63
|
current?: unknown;
|
|
116
64
|
}
|
|
117
|
-
export declare function
|
|
118
|
-
export declare
|
|
119
|
-
export declare
|
|
65
|
+
export declare function omit<T, K extends string>(obj: T, fields: K[]): Omit<T, K>;
|
|
66
|
+
export declare const parseUrl: (cssUrl?: string) => string | undefined;
|
|
67
|
+
export declare const getRestProps: (transferProps?: any, originProps?: any, deletePropsKey?: any) => any;
|
|
68
|
+
export declare function getDefaultAllowFontScaling(): boolean;
|
|
69
|
+
export declare function isText(ele: ReactNode): ele is ReactElement;
|
|
70
|
+
export declare function isStringChildren(children: ReactNode): boolean;
|
|
71
|
+
export declare function parseValues(str: string, char?: string): string[];
|
|
72
|
+
export declare const debounce: <T extends AnyFunc>(func: T, delay: number) => ((...args: Parameters<T>) => void) & {
|
|
73
|
+
clear: () => void;
|
|
74
|
+
};
|
|
75
|
+
export declare function isBoxSizingAffectingStyle(key: string): boolean;
|
|
76
|
+
export declare function transformBoxSizing(style?: Record<string, any>): void;
|
|
77
|
+
export declare function splitStyle<T extends Record<string, any>>(styleObj: T, sideEffect?: (key: string, val: T[keyof T]) => void): {
|
|
78
|
+
textStyle?: Partial<T>;
|
|
79
|
+
backgroundStyle?: Partial<T>;
|
|
80
|
+
innerStyle?: Partial<T>;
|
|
81
|
+
};
|
|
82
|
+
export declare function splitProps<T extends Record<string, any>>(props: T): {
|
|
83
|
+
textProps?: Partial<T>;
|
|
84
|
+
innerProps?: Partial<T>;
|
|
85
|
+
};
|
|
120
86
|
export declare function pickStyle(styleObj: Record<string, any> | undefined, pickedKeys: Array<string>, callback?: (key: string, val: number | string) => number | string): Record<string, any>;
|
|
87
|
+
export declare function transformShorthand(styleObj: Record<string, any>, shorthandKeys: string[], percentConfig: PercentConfig): void;
|
|
88
|
+
export declare function traverseStyle(styleObj: Record<string, any>, visitor: (arg: VisitorArg) => void): void;
|
|
89
|
+
export declare function setStyle(styleObj: Record<string, any>, keyPath: Array<string>, setter: (arg: VisitorArg) => void): void;
|
|
90
|
+
export declare function useTransformStyle(styleObj: Record<string, any> | undefined, { enableVar, transformRadiusPercent, parentFontSize, parentWidth, parentHeight, defaultStyle }: TransformStyleConfig): {
|
|
91
|
+
hasVarDec: boolean;
|
|
92
|
+
varContextRef: MutableRefObject<Record<string, any>>;
|
|
93
|
+
setWidth: Dispatch<SetStateAction<number>>;
|
|
94
|
+
setHeight: Dispatch<SetStateAction<number>>;
|
|
95
|
+
normalStyle: Record<string, any>;
|
|
96
|
+
hasSelfPercent: boolean;
|
|
97
|
+
hasPositionFixed: boolean;
|
|
98
|
+
};
|
|
99
|
+
export declare function useNavigation(): Record<string, any> | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* 用法等同于 useEffect,但是会忽略首次执行,只在依赖更新时执行
|
|
102
|
+
*/
|
|
103
|
+
export declare const useUpdateEffect: (effect: any, deps: any) => void;
|
|
104
|
+
export declare const useLayout: ({ props, hasSelfPercent, setWidth, setHeight, onLayout, nodeRef }: LayoutConfig) => {
|
|
105
|
+
layoutRef: MutableRefObject<{}>;
|
|
106
|
+
layoutStyle: {
|
|
107
|
+
opacity: number;
|
|
108
|
+
} | undefined;
|
|
109
|
+
layoutProps: Record<string, any>;
|
|
110
|
+
};
|
|
111
|
+
export declare function useTextPassThrough(textStyle?: TextStyle, textProps?: Record<string, any>, { enableTextPassThrough }?: TextPassThroughValueOptions): TextPassThroughContextValue | null;
|
|
112
|
+
export declare function useTextPassThroughText(textStyle?: TextStyle): {
|
|
113
|
+
inheritedText: TextPassThroughContextValue | null;
|
|
114
|
+
textPassThrough: TextPassThroughContextValue | null;
|
|
115
|
+
};
|
|
121
116
|
export declare function useHover({ enableHover, hoverStartTime, hoverStayTime, disabled }: {
|
|
122
117
|
enableHover: boolean;
|
|
123
118
|
hoverStartTime: number;
|
|
@@ -131,4 +126,13 @@ export declare function useHover({ enableHover, hoverStartTime, hoverStayTime, d
|
|
|
131
126
|
gesture: import("react-native-gesture-handler/lib/typescript/handlers/gestures/panGesture").PanGesture;
|
|
132
127
|
};
|
|
133
128
|
export declare function useRunOnJSCallback(callbackMapRef: MutableRefObject<Record<string, AnyFunc>>): (key: string, ...args: any) => any;
|
|
129
|
+
export declare const useDebounceCallback: <T extends AnyFunc>(func: T, delay: number) => ((...args: Parameters<T>) => void) & {
|
|
130
|
+
clear: () => void;
|
|
131
|
+
};
|
|
132
|
+
export declare const useStableCallback: <T extends AnyFunc | null | undefined>(callback: T) => T extends AnyFunc ? T : () => void;
|
|
133
|
+
export declare function usePrevious<T>(value: T): T | undefined;
|
|
134
|
+
export declare function wrapChildren(children: ReactNode, { hasVarDec, varContext, textPassThrough }: WrapChildrenConfig): ReactNode;
|
|
135
|
+
export declare function renderImage(imageProps: ImageProps, enableFastImage?: boolean): import("react").CElement<ImageProps, Image>;
|
|
136
|
+
export declare function flatGesture(gestures?: Array<GestureHandler>): any[];
|
|
137
|
+
export declare function getCurrentPage(pageId: number | null | undefined): any;
|
|
134
138
|
export {};
|