@mpxjs/webpack-plugin 2.9.67 → 2.9.69-beta.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/index.js +30 -9
- package/lib/platform/json/wx/index.js +21 -8
- package/lib/platform/style/wx/index.js +51 -54
- package/lib/platform/template/wx/component-config/canvas.js +8 -0
- package/lib/platform/template/wx/component-config/fix-component-name.js +15 -12
- package/lib/platform/template/wx/component-config/index.js +1 -1
- package/lib/platform/template/wx/component-config/input.js +1 -1
- package/lib/platform/template/wx/component-config/movable-view.js +8 -1
- package/lib/platform/template/wx/component-config/rich-text.js +8 -0
- package/lib/platform/template/wx/component-config/scroll-view.js +1 -1
- package/lib/platform/template/wx/component-config/swiper.js +1 -1
- package/lib/platform/template/wx/component-config/textarea.js +1 -1
- package/lib/platform/template/wx/component-config/unsupported.js +1 -1
- package/lib/react/processStyles.js +14 -4
- package/lib/react/processTemplate.js +3 -0
- package/lib/resolver/AddEnvPlugin.js +1 -0
- package/lib/resolver/AddModePlugin.js +9 -8
- package/lib/runtime/components/react/context.ts +14 -0
- package/lib/runtime/components/react/dist/context.js +4 -0
- package/lib/runtime/components/react/dist/event.config.js +24 -24
- package/lib/runtime/components/react/dist/getInnerListeners.js +183 -175
- package/lib/runtime/components/react/dist/mpx-button.jsx +77 -49
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.js +60 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.js +15 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.js +84 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Image.js +87 -0
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.js +15 -0
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.js +28 -0
- package/lib/runtime/components/react/dist/mpx-canvas/html.js +343 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +232 -0
- package/lib/runtime/components/react/dist/mpx-canvas/utils.jsx +89 -0
- package/lib/runtime/components/react/dist/mpx-checkbox-group.jsx +13 -19
- package/lib/runtime/components/react/dist/mpx-checkbox.jsx +29 -38
- package/lib/runtime/components/react/dist/mpx-form.jsx +16 -19
- package/lib/runtime/components/react/dist/mpx-icon.jsx +8 -16
- package/lib/runtime/components/react/dist/mpx-image.jsx +291 -0
- package/lib/runtime/components/react/dist/mpx-input.jsx +54 -27
- package/lib/runtime/components/react/dist/mpx-label.jsx +15 -22
- package/lib/runtime/components/react/dist/mpx-movable-area.jsx +13 -16
- package/lib/runtime/components/react/dist/mpx-movable-view.jsx +14 -14
- package/lib/runtime/components/react/dist/mpx-navigator.jsx +2 -4
- package/lib/runtime/components/react/dist/mpx-picker/date.jsx +6 -2
- package/lib/runtime/components/react/dist/mpx-picker/index.jsx +5 -3
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.jsx +6 -2
- package/lib/runtime/components/react/dist/mpx-picker/region.jsx +6 -2
- package/lib/runtime/components/react/dist/mpx-picker/selector.jsx +6 -2
- package/lib/runtime/components/react/dist/mpx-picker/time.jsx +10 -15
- package/lib/runtime/components/react/dist/mpx-picker-view-column-item.jsx +39 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column.jsx +171 -88
- package/lib/runtime/components/react/dist/mpx-picker-view.jsx +80 -121
- package/lib/runtime/components/react/dist/mpx-radio-group.jsx +11 -19
- package/lib/runtime/components/react/dist/mpx-radio.jsx +27 -42
- package/lib/runtime/components/react/dist/mpx-rich-text/html.js +39 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.jsx +62 -0
- package/lib/runtime/components/react/dist/mpx-root-portal.jsx +6 -4
- package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +53 -42
- package/lib/runtime/components/react/dist/mpx-simple-text.jsx +11 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.jsx +28 -9
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +608 -0
- package/lib/runtime/components/react/dist/mpx-switch.jsx +20 -10
- package/lib/runtime/components/react/dist/mpx-text.jsx +11 -10
- package/lib/runtime/components/react/dist/mpx-textarea.jsx +8 -3
- package/lib/runtime/components/react/dist/mpx-view.jsx +67 -94
- package/lib/runtime/components/react/dist/mpx-web-view.jsx +152 -37
- package/lib/runtime/components/react/dist/pickerFaces.js +81 -0
- package/lib/runtime/components/react/dist/pickerVIewContext.js +9 -0
- package/lib/runtime/components/react/dist/pickerViewMask.jsx +18 -0
- package/lib/runtime/components/react/dist/pickerViewOverlay.jsx +23 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.js +36 -10
- package/lib/runtime/components/react/dist/utils.jsx +129 -24
- package/lib/runtime/components/react/event.config.ts +25 -26
- package/lib/runtime/components/react/getInnerListeners.ts +238 -202
- package/lib/runtime/components/react/mpx-button.tsx +104 -57
- package/lib/runtime/components/react/mpx-canvas/Bus.ts +70 -0
- package/lib/runtime/components/react/mpx-canvas/CanvasGradient.ts +18 -0
- package/lib/runtime/components/react/mpx-canvas/CanvasRenderingContext2D.ts +87 -0
- package/lib/runtime/components/react/mpx-canvas/Image.ts +102 -0
- package/lib/runtime/components/react/mpx-canvas/ImageData.ts +23 -0
- package/lib/runtime/components/react/mpx-canvas/constructorsRegistry.ts +38 -0
- package/lib/runtime/components/react/mpx-canvas/html.ts +343 -0
- package/lib/runtime/components/react/mpx-canvas/index.tsx +296 -0
- package/lib/runtime/components/react/mpx-canvas/utils.tsx +150 -0
- package/lib/runtime/components/react/mpx-checkbox-group.tsx +28 -25
- package/lib/runtime/components/react/mpx-checkbox.tsx +48 -49
- package/lib/runtime/components/react/mpx-form.tsx +25 -28
- package/lib/runtime/components/react/mpx-icon.tsx +12 -17
- package/lib/runtime/components/react/mpx-image.tsx +436 -0
- package/lib/runtime/components/react/mpx-input.tsx +77 -57
- package/lib/runtime/components/react/mpx-label.tsx +26 -27
- package/lib/runtime/components/react/mpx-movable-area.tsx +18 -23
- package/lib/runtime/components/react/mpx-movable-view.tsx +22 -26
- package/lib/runtime/components/react/mpx-navigator.tsx +2 -8
- package/lib/runtime/components/react/mpx-picker/date.tsx +5 -2
- package/lib/runtime/components/react/mpx-picker/index.tsx +3 -2
- package/lib/runtime/components/react/mpx-picker/multiSelector.tsx +5 -2
- package/lib/runtime/components/react/mpx-picker/region.tsx +5 -2
- package/lib/runtime/components/react/mpx-picker/selector.tsx +5 -2
- package/lib/runtime/components/react/mpx-picker/time.tsx +10 -15
- package/lib/runtime/components/react/mpx-picker/type.ts +48 -43
- package/lib/runtime/components/react/mpx-picker-view-column-item.tsx +88 -0
- package/lib/runtime/components/react/mpx-picker-view-column.tsx +276 -112
- package/lib/runtime/components/react/mpx-picker-view.tsx +137 -129
- package/lib/runtime/components/react/mpx-radio-group.tsx +24 -27
- package/lib/runtime/components/react/mpx-radio.tsx +45 -54
- package/lib/runtime/components/react/mpx-rich-text/html.ts +40 -0
- package/lib/runtime/components/react/mpx-rich-text/index.tsx +115 -0
- package/lib/runtime/components/react/mpx-root-portal.tsx +3 -5
- package/lib/runtime/components/react/mpx-scroll-view.tsx +83 -73
- package/lib/runtime/components/react/mpx-simple-text.tsx +18 -0
- package/lib/runtime/components/react/mpx-swiper-item.tsx +41 -12
- package/lib/runtime/components/react/mpx-swiper.tsx +690 -0
- package/lib/runtime/components/react/mpx-switch.tsx +29 -23
- package/lib/runtime/components/react/mpx-text.tsx +14 -18
- package/lib/runtime/components/react/mpx-textarea.tsx +11 -10
- package/lib/runtime/components/react/mpx-view.tsx +93 -117
- package/lib/runtime/components/react/mpx-web-view.tsx +162 -56
- package/lib/runtime/components/react/pickerFaces.ts +112 -0
- package/lib/runtime/components/react/pickerVIewContext.ts +18 -0
- package/lib/runtime/components/react/pickerViewMask.tsx +30 -0
- package/lib/runtime/components/react/pickerViewOverlay.tsx +34 -0
- package/lib/runtime/components/react/types/common.ts +2 -0
- package/lib/runtime/components/react/types/global.d.ts +7 -17
- package/lib/runtime/components/react/useAnimationHooks.ts +37 -12
- package/lib/runtime/components/react/utils.tsx +169 -29
- package/lib/runtime/components/web/getInnerListeners.js +6 -6
- package/lib/runtime/components/web/mpx-movable-view.vue +334 -344
- package/lib/runtime/components/web/mpx-picker-view-column.vue +75 -75
- package/lib/runtime/components/web/mpx-picker.vue +382 -385
- package/lib/runtime/components/web/mpx-web-view.vue +175 -161
- package/lib/runtime/optionProcessor.js +7 -38
- package/lib/runtime/utils.js +2 -0
- package/lib/style-compiler/index.js +3 -4
- package/lib/style-compiler/plugins/scope-id.js +30 -2
- package/lib/style-compiler/strip-conditional-loader.js +118 -0
- package/lib/template-compiler/bind-this.js +7 -2
- package/lib/template-compiler/compiler.js +66 -39
- package/lib/template-compiler/gen-node-react.js +3 -3
- package/package.json +6 -4
- package/LICENSE +0 -433
- package/lib/runtime/components/react/dist/mpx-image/index.jsx +0 -226
- package/lib/runtime/components/react/dist/mpx-image/svg.jsx +0 -7
- package/lib/runtime/components/react/dist/mpx-swiper/carouse.jsx +0 -478
- package/lib/runtime/components/react/dist/mpx-swiper/index.jsx +0 -68
- package/lib/runtime/components/react/dist/mpx-swiper/type.js +0 -1
- package/lib/runtime/components/react/mpx-image/index.tsx +0 -345
- package/lib/runtime/components/react/mpx-image/svg.tsx +0 -22
- package/lib/runtime/components/react/mpx-swiper/carouse.tsx +0 -525
- package/lib/runtime/components/react/mpx-swiper/index.tsx +0 -80
- package/lib/runtime/components/react/mpx-swiper/type.ts +0 -87
- package/lib/runtime/components/web/event.js +0 -105
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ✔ src
|
|
3
|
-
* - mode: Partially, Only SVG format do not support
|
|
4
|
-
* ✘ show-menu-by-longpress
|
|
5
|
-
* ✔ binderror
|
|
6
|
-
* ✔ bindload
|
|
7
|
-
* ✘ fade-in
|
|
8
|
-
* ✔ webp
|
|
9
|
-
* ✘ lazy-load
|
|
10
|
-
* ✔ bindtap
|
|
11
|
-
* ✔ DEFAULT_SIZE
|
|
12
|
-
*/
|
|
13
|
-
import { useEffect, useMemo, useState, useRef, forwardRef } from 'react';
|
|
14
|
-
import { Image as RNImage, View, StyleSheet } from 'react-native';
|
|
15
|
-
import useInnerProps, { getCustomEvent } from '../getInnerListeners';
|
|
16
|
-
import useNodesRef from '../useNodesRef';
|
|
17
|
-
import { useLayout, useTransformStyle } from '../utils';
|
|
18
|
-
const DEFAULT_IMAGE_WIDTH = 320;
|
|
19
|
-
const DEFAULT_IMAGE_HEIGHT = 240;
|
|
20
|
-
// const REMOTE_SVG_REGEXP = /https?:\/\/.*\.(?:svg)/i
|
|
21
|
-
// const styls = StyleSheet.create({
|
|
22
|
-
// suspense: {
|
|
23
|
-
// display: 'flex',
|
|
24
|
-
// justifyContent: 'center',
|
|
25
|
-
// alignItems: 'center',
|
|
26
|
-
// width: '100%',
|
|
27
|
-
// height: '100%',
|
|
28
|
-
// },
|
|
29
|
-
// })
|
|
30
|
-
const cropMode = [
|
|
31
|
-
'top',
|
|
32
|
-
'bottom',
|
|
33
|
-
'center',
|
|
34
|
-
'right',
|
|
35
|
-
'left',
|
|
36
|
-
'top left',
|
|
37
|
-
'top right',
|
|
38
|
-
'bottom left',
|
|
39
|
-
'bottom right'
|
|
40
|
-
];
|
|
41
|
-
const ModeMap = new Map([
|
|
42
|
-
['scaleToFill', 'stretch'],
|
|
43
|
-
['aspectFit', 'contain'],
|
|
44
|
-
['aspectFill', 'cover'],
|
|
45
|
-
['widthFix', 'stretch'],
|
|
46
|
-
['heightFix', 'stretch'],
|
|
47
|
-
...cropMode.map(mode => [mode, 'stretch'])
|
|
48
|
-
]);
|
|
49
|
-
const isNumber = (value) => typeof value === 'number';
|
|
50
|
-
const relativeCenteredSize = (viewSize, imageSize) => (viewSize - imageSize) / 2;
|
|
51
|
-
// const Svg = lazy(() => import('./svg'))
|
|
52
|
-
// const Fallback = (
|
|
53
|
-
// <View style={styls.suspense}>
|
|
54
|
-
// <Text>loading ...</Text>
|
|
55
|
-
// </View>
|
|
56
|
-
// )
|
|
57
|
-
const Image = forwardRef((props, ref) => {
|
|
58
|
-
const { src = '', mode = 'scaleToFill',
|
|
59
|
-
// svg = false,
|
|
60
|
-
style = {}, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, bindload, binderror } = props;
|
|
61
|
-
const defaultStyle = {
|
|
62
|
-
width: DEFAULT_IMAGE_WIDTH,
|
|
63
|
-
height: DEFAULT_IMAGE_HEIGHT
|
|
64
|
-
};
|
|
65
|
-
const styleObj = {
|
|
66
|
-
...defaultStyle,
|
|
67
|
-
...style,
|
|
68
|
-
overflow: 'hidden'
|
|
69
|
-
};
|
|
70
|
-
const nodeRef = useRef(null);
|
|
71
|
-
useNodesRef(props, ref, nodeRef, {
|
|
72
|
-
defaultStyle
|
|
73
|
-
});
|
|
74
|
-
const onLayout = ({ nativeEvent: { layout: { width, height } } }) => {
|
|
75
|
-
setViewWidth(width);
|
|
76
|
-
setViewHeight(height);
|
|
77
|
-
};
|
|
78
|
-
const { normalStyle, hasSelfPercent, setWidth, setHeight } = useTransformStyle(styleObj, { enableVar, externalVarContext, parentFontSize, parentWidth, parentHeight });
|
|
79
|
-
const { layoutRef, layoutStyle, layoutProps } = useLayout({ props, hasSelfPercent, setWidth, setHeight, nodeRef, onLayout });
|
|
80
|
-
const { width, height } = normalStyle;
|
|
81
|
-
const preSrc = useRef();
|
|
82
|
-
const resizeMode = ModeMap.get(mode) || 'stretch';
|
|
83
|
-
const isWidthFixMode = mode === 'widthFix';
|
|
84
|
-
const isHeightFixMode = mode === 'heightFix';
|
|
85
|
-
const isCropMode = cropMode.includes(mode);
|
|
86
|
-
const source = typeof src === 'string' ? { uri: src } : src;
|
|
87
|
-
const [viewWidth, setViewWidth] = useState(isNumber(width) ? width : 0);
|
|
88
|
-
const [viewHeight, setViewHeight] = useState(isNumber(height) ? height : 0);
|
|
89
|
-
const [imageWidth, setImageWidth] = useState(0);
|
|
90
|
-
const [imageHeight, setImageHeight] = useState(0);
|
|
91
|
-
const [ratio, setRatio] = useState(0);
|
|
92
|
-
const [loaded, setLoaded] = useState(false);
|
|
93
|
-
const fixedHeight = useMemo(() => {
|
|
94
|
-
const fixed = viewWidth * ratio;
|
|
95
|
-
return !fixed ? viewHeight : fixed;
|
|
96
|
-
}, [ratio, viewWidth, viewHeight]);
|
|
97
|
-
const fixedWidth = useMemo(() => {
|
|
98
|
-
if (!ratio)
|
|
99
|
-
return viewWidth;
|
|
100
|
-
const fixed = viewHeight / ratio;
|
|
101
|
-
return !fixed ? viewWidth : fixed;
|
|
102
|
-
}, [ratio, viewWidth, viewHeight]);
|
|
103
|
-
const cropModeStyle = useMemo(() => {
|
|
104
|
-
switch (mode) {
|
|
105
|
-
case 'top':
|
|
106
|
-
return { top: 0, left: relativeCenteredSize(viewWidth, imageWidth) };
|
|
107
|
-
case 'bottom':
|
|
108
|
-
return { top: 'auto', bottom: 0, left: relativeCenteredSize(viewWidth, imageWidth) };
|
|
109
|
-
case 'center':
|
|
110
|
-
return { top: relativeCenteredSize(viewHeight, imageHeight), left: relativeCenteredSize(viewWidth, imageWidth) };
|
|
111
|
-
case 'left':
|
|
112
|
-
return { top: relativeCenteredSize(viewHeight, imageHeight), left: 0 };
|
|
113
|
-
case 'right':
|
|
114
|
-
return { top: relativeCenteredSize(viewHeight, imageHeight), left: 'auto', right: 0 };
|
|
115
|
-
case 'top left':
|
|
116
|
-
return { top: 0, left: 0 };
|
|
117
|
-
case 'top right':
|
|
118
|
-
return { top: 0, left: 'auto', right: 0 };
|
|
119
|
-
case 'bottom left':
|
|
120
|
-
return { top: 'auto', bottom: 0, left: 0 };
|
|
121
|
-
case 'bottom right':
|
|
122
|
-
return { top: 'auto', bottom: 0, left: 'auto', right: 0 };
|
|
123
|
-
default:
|
|
124
|
-
return {};
|
|
125
|
-
}
|
|
126
|
-
}, [mode, viewWidth, viewHeight, imageWidth, imageHeight]);
|
|
127
|
-
const onImageLoad = (evt) => {
|
|
128
|
-
if (!bindload)
|
|
129
|
-
return;
|
|
130
|
-
if (typeof src === 'string') {
|
|
131
|
-
evt.persist();
|
|
132
|
-
RNImage.getSize(src, (width, height) => {
|
|
133
|
-
bindload(getCustomEvent('load', evt, {
|
|
134
|
-
detail: { width, height },
|
|
135
|
-
layoutRef
|
|
136
|
-
}, props));
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
const { width = 0, height = 0 } = RNImage.resolveAssetSource(src) || {};
|
|
141
|
-
bindload(getCustomEvent('load', evt, {
|
|
142
|
-
detail: { width, height },
|
|
143
|
-
layoutRef
|
|
144
|
-
}, props));
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
const onImageError = (evt) => {
|
|
148
|
-
binderror &&
|
|
149
|
-
binderror(getCustomEvent('error', evt, {
|
|
150
|
-
detail: { errMsg: evt.nativeEvent.error },
|
|
151
|
-
layoutRef
|
|
152
|
-
}, props));
|
|
153
|
-
};
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
if (!isWidthFixMode && !isHeightFixMode && !isCropMode) {
|
|
156
|
-
setLoaded(true);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
const changed = preSrc.current !== src;
|
|
160
|
-
preSrc.current = src;
|
|
161
|
-
changed && setLoaded(false);
|
|
162
|
-
if (typeof src === 'string') {
|
|
163
|
-
RNImage.getSize(src, (width, height) => {
|
|
164
|
-
if (isWidthFixMode || isHeightFixMode) {
|
|
165
|
-
setRatio(width === 0 ? 0 : height / width);
|
|
166
|
-
}
|
|
167
|
-
if (isCropMode) {
|
|
168
|
-
setImageWidth(width);
|
|
169
|
-
setImageHeight(height);
|
|
170
|
-
}
|
|
171
|
-
changed && setLoaded(true);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
const { width = 0, height = 0 } = RNImage.resolveAssetSource(src) || {};
|
|
176
|
-
if (isWidthFixMode || isHeightFixMode) {
|
|
177
|
-
setRatio(width === 0 ? 0 : height / width);
|
|
178
|
-
}
|
|
179
|
-
if (isCropMode) {
|
|
180
|
-
setImageWidth(width);
|
|
181
|
-
setImageHeight(height);
|
|
182
|
-
}
|
|
183
|
-
changed && setLoaded(true);
|
|
184
|
-
}
|
|
185
|
-
}, [isWidthFixMode, isHeightFixMode, isCropMode, src]);
|
|
186
|
-
const innerProps = useInnerProps(props, {
|
|
187
|
-
ref: nodeRef,
|
|
188
|
-
style: {
|
|
189
|
-
...normalStyle,
|
|
190
|
-
...layoutStyle,
|
|
191
|
-
...(isHeightFixMode && { width: fixedWidth }),
|
|
192
|
-
...(isWidthFixMode && { height: fixedHeight })
|
|
193
|
-
},
|
|
194
|
-
...layoutProps
|
|
195
|
-
}, [], {
|
|
196
|
-
layoutRef
|
|
197
|
-
});
|
|
198
|
-
// if (typeof src === 'string' && REMOTE_SVG_REGEXP.test(src)) {
|
|
199
|
-
// return (
|
|
200
|
-
// <Suspense fallback={Fallback} {...innerProps}>
|
|
201
|
-
// <View {...innerProps}>
|
|
202
|
-
// <Svg src={src} style={style} width={width as SvgNumberProp} height={height as SvgNumberProp} />
|
|
203
|
-
// </View>
|
|
204
|
-
// </Suspense>
|
|
205
|
-
// )
|
|
206
|
-
// }
|
|
207
|
-
// if (svg) {
|
|
208
|
-
// return (
|
|
209
|
-
// <Suspense fallback={Fallback}>
|
|
210
|
-
// <View {...innerProps}>
|
|
211
|
-
// <Svg local src={src} style={style} width={width as SvgNumberProp} height={height as SvgNumberProp} />
|
|
212
|
-
// </View>
|
|
213
|
-
// </Suspense>
|
|
214
|
-
// )
|
|
215
|
-
// }
|
|
216
|
-
return (<View {...innerProps}>
|
|
217
|
-
{loaded && <RNImage source={source} resizeMode={resizeMode} onLoad={onImageLoad} onError={onImageError} style={{
|
|
218
|
-
...StyleSheet.absoluteFillObject,
|
|
219
|
-
width: isCropMode ? imageWidth : '100%',
|
|
220
|
-
height: isCropMode ? imageHeight : '100%',
|
|
221
|
-
...(isCropMode && cropModeStyle)
|
|
222
|
-
}}/>}
|
|
223
|
-
</View>);
|
|
224
|
-
});
|
|
225
|
-
Image.displayName = 'MpxImage';
|
|
226
|
-
export default Image;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SvgCssUri, WithLocalSvg } from 'react-native-svg/css';
|
|
2
|
-
const Svg = ({ local = false, src, style, width, height }) => {
|
|
3
|
-
return local
|
|
4
|
-
? (<WithLocalSvg style={style} asset={src} width={width} height={height}/>)
|
|
5
|
-
: (<SvgCssUri style={style} uri={src} width={width} height={height}/>);
|
|
6
|
-
};
|
|
7
|
-
export default Svg;
|