@wavemaker-ai/app-rn-runtime 12.0.2-rc.647771 → 12.1.0-rc.647821
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/components/advanced/webview/webview.component.js +1 -1
- package/components/advanced/webview/webview.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/label/label.component.js +2 -2
- package/components/basic/label/label.component.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/container/tabs/tabheader/tabheader.component.js +10 -3
- package/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +5 -0
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form.component.js +12 -8
- package/components/data/form/form.component.js.map +1 -1
- package/components/data/list/list.component.js +5 -2
- package/components/data/list/list.component.js.map +1 -1
- package/components/dialogs/dialog/dialog.component.js +1 -1
- package/components/dialogs/dialog/dialog.component.js.map +1 -1
- package/components/input/chips/chips.component.js +1 -1
- package/components/input/chips/chips.component.js.map +1 -1
- package/components/input/chips/chips.props.js +1 -0
- package/components/input/chips/chips.props.js.map +1 -1
- package/components/input/textarea/textarea.component.js +1 -1
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/page/page-content/page-content.component.js +152 -17
- package/components/page/page-content/page-content.component.js.map +1 -1
- package/components/page/page-content/page-content.props.js +5 -0
- package/components/page/page-content/page-content.props.js.map +1 -1
- package/components/page/page-content/pull-to-refresh.component.js +288 -0
- package/components/page/page-content/pull-to-refresh.component.js.map +1 -0
- package/core/AppConfig.js.map +1 -1
- package/core/base.component.js +14 -0
- package/core/base.component.js.map +1 -1
- package/core/sticky-wrapper.js +37 -34
- package/core/sticky-wrapper.js.map +1 -1
- package/gestures/carousel-swipe.animation.js +1 -0
- package/gestures/carousel-swipe.animation.js.map +1 -1
- package/npm-shrinkwrap.json +1285 -570
- package/package-lock.json +1285 -570
- package/package.json +3 -3
- package/runtime/App.js +52 -36
- package/runtime/App.js.map +1 -1
- package/runtime/App.navigator.js +4 -1
- package/runtime/App.navigator.js.map +1 -1
- package/runtime/base-fragment.component.js +1 -0
- package/runtime/base-fragment.component.js.map +1 -1
- package/runtime/services/app-security.service.js +40 -19
- package/runtime/services/app-security.service.js.map +1 -1
- package/runtime/services/browser.constants.js +3 -0
- package/runtime/services/browser.constants.js.map +1 -0
- package/runtime/services/browser.service.js +321 -0
- package/runtime/services/browser.service.js.map +1 -0
- package/runtime/services/external-auth-callback.service.js +44 -0
- package/runtime/services/external-auth-callback.service.js.map +1 -0
- package/runtime/services/webprocess.service.js +8 -3
- package/runtime/services/webprocess.service.js.map +1 -1
- package/styles/background.component.js +61 -2
- package/styles/background.component.js.map +1 -1
- package/styles/style-prop.validator.js +4 -0
- package/styles/style-prop.validator.js.map +1 -1
- package/styles/style-props.js +2 -0
- package/styles/style-props.js.map +1 -1
- package/styles/theme.js +52 -11
- package/styles/theme.js.map +1 -1
- package/components-prism/basic/search/search.component.js +0 -208
- package/components-prism/basic/search/search.component.js.map +0 -1
- package/components-prism/basic/search/search.props.js +0 -16
- package/components-prism/basic/search/search.props.js.map +0 -1
- package/components-prism/basic/search/search.styles.js +0 -127
- package/components-prism/basic/search/search.styles.js.map +0 -1
- package/core/outside-press-handler.js +0 -65
- package/core/outside-press-handler.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","LinearGradient","ExpoLinearGradient","Image","StyleSheet","View","isEmpty","isNil","isNumber","imageSizeEstimator","AssetConsumer","isFullPathUrl","IMAGE_URL_REGEX","LINEAT_GRADIENT_REGEX","DIMENSION_REGEX","BACKGROUND_POSITION_REGEX","BACKGROUND_SIZE_REGEX","ASSET_CACHE","Component","constructor","props","state","parse","val","value","splits","split","map","v","trim","angle","locations","endsWith","parseInt","shift","delta","Math","round","tan","PI","abs","end","x","y","start","colors","s","_s$matchAll$next","p","matchAll","next","push","parseFloat","replace","componentDidUpdate","prevProps","prevState","snapshot","setState","render","_this$props$size","_this$props$style","createElement","style","borderWidth","overflow","absoluteFill","middle","flexDirection","justifyContent","alignItems","testID","size","width","position","borderRadius","children","BackgroundComponent","_defineProperty","imageSrc","image","undefined","caluculateSize","height","resolveAssetSource","naturalImageWidth","naturalImageHeight","uri","getSize","getDimension","dim","getPosition","result","top","bottom","left","right","getPositionAndSize","_this$props$size2","_this$getGradient","resizeMode","getGradient","length","repeat","renderLinearGradient","data","psresult","Fragment","setImage","componentDidMount","setTimeout","_this$props$image","_source","source","startsWith","_this$props$image2","loadAsset","_this$props$image3","renderImage","_psresult$position","_psresult$position2","loadImage","minWidth","minHeight","_gradientData$value","gradientData"],"sources":["background.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LinearGradient as ExpoLinearGradient, LinearGradientPoint } from 'expo-linear-gradient';\nimport { DimensionValue, Image, StyleSheet, View, ViewStyle } from 'react-native';\nimport { isEmpty, isNil, isNumber, isString } from 'lodash-es';\nimport imageSizeEstimator from '@wavemaker-ai/app-rn-runtime/core/imageSizeEstimator';\nimport { AssetConsumer } from '@wavemaker-ai/app-rn-runtime/core/asset.provider';\nimport { isFullPathUrl } from '@wavemaker-ai/app-rn-runtime/core/utils';\n\nexport interface LinearGradientProps {\n value: string;\n children: any;\n style?: ViewStyle;\n size?: ViewStyle;\n position?: ViewStyle;\n middle?: boolean;\n}\n\nexport interface LinearGradientState {\n colors: string[];\n locations: number[];\n start: LinearGradientPoint;\n end: LinearGradientPoint;\n}\n\nconst IMAGE_URL_REGEX = /url\\(['|\"]?(.+)['|\"]?\\)$/gi;\nconst LINEAT_GRADIENT_REGEX = /linear-gradient\\((.+)\\)$/gi;\nconst DIMENSION_REGEX = /([0-9%]+)[a-z]*/g;\nconst BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\nconst BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\n\nconst ASSET_CACHE = {} as any;\n\nexport class LinearGradient extends React.Component<LinearGradientProps, LinearGradientState> {\n\n constructor(props: LinearGradientProps) {\n super(props);\n this.state = this.parse();\n }\n\n parse(val = this.props.value) {\n let state = {} as LinearGradientState;\n const splits = val.split(',').map(v => v.trim());\n let angle = 0;\n const locations: LinearGradientPoint[] = [];\n if (splits[0].endsWith('deg')) {\n angle = (parseInt(splits[0].split('deg')[0]))%360;\n angle = angle < 0 ? (360 + angle) : angle;\n splits.shift();\n }\n angle += 90;\n const delta = Math.round(Math.tan((angle * Math.PI) / 180) * 100)/100;\n if (Math.abs(delta) > 1) {\n state = {\n end: {\n x: -0.5 / delta + 0.5,\n y: 0\n },\n start: {\n x: 0.5 / delta + 0.5,\n y: 1\n }\n } as LinearGradientState;\n } else {\n state = {\n start: {\n x: 0,\n y: -0.5 * delta + 0.5\n },\n end: {\n x: 1,\n y: 0.5 * delta + 0.5\n }\n } as LinearGradientState;\n }\n if (angle >= 270 && angle <= 450) {\n state = {\n start : state.end,\n end: state.start\n } as LinearGradientState;\n }\n state.colors = [];\n state.locations = [];\n splits.map(s => {\n const p = s.matchAll(/\\s*([0-9.]+)%/g).next()?.value;\n if (p) {\n state.locations.push(parseFloat(p[1]) / 100);\n state.colors.push(s.replace(p[0], ''));\n } else {\n // state.locations.push(null as any);\n state.colors.push(s);\n }\n });\n return state;\n }\n\n componentDidUpdate(prevProps: Readonly<LinearGradientProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.value !== this.props.value) {\n this.setState(this.parse());\n }\n }\n\n\n public render() {\n return (\n <View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.middle ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <ExpoLinearGradient testID=\"wm-expo-linear-gradient\"\n colors={this.state.colors as any}\n locations={this.state.locations as any}\n start={this.state.start}\n end={this.state.end}\n style={[\n this.props.size?.width ? this.props.size : StyleSheet.absoluteFill,\n this.props.position,\n {position: 'absolute', borderRadius: this.props.style?.borderRadius}\n ]}\n />\n </View>\n {this.props.children}\n </View>\n );\n }\n}\n\nexport interface BackgroundProps {\n image?: string;\n position?: string;\n children?: any;\n resizeMode?: string;\n repeat?: string;\n style?: ViewStyle;\n size: string;\n}\n\nexport interface BackgroundState {\n imageSrc: any;\n naturalImageWidth: number,\n naturalImageHeight: number\n}\n\nexport class BackgroundComponent extends React.Component<BackgroundProps, BackgroundState> {\n\n private loadAsset: (path: string) => number | string = null as any;\n\n constructor(props: BackgroundProps) {\n super(props);\n this.state = {\n imageSrc : this.props.image ? ASSET_CACHE[this.props.image] : undefined\n } as BackgroundState;\n }\n\n public caluculateSize(imageSrc: any) {\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n } else if (!isNil(imageSrc?.uri)) {\n imageSizeEstimator.getSize(imageSrc.uri, (width: number, height: number) => {\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n });\n }\n }\n\n getDimension(dim: string) {\n if (dim) {\n const value = dim.matchAll(DIMENSION_REGEX).next().value!;\n if (value[1]) {\n return value[1].endsWith('%') ? value[1] : parseInt(value[1]);\n }\n }\n return null;\n }\n\n public getPosition() {\n const result = {} as ViewStyle;\n if (!this.props.position) {\n return result;\n }\n const position = this.props.position.split(' ').map(s => s.trim());\n if (position[0] === 'center') {\n result.alignItems = 'center';\n } else if (position[0] === 'top') {\n result.top = 0;\n } else if (position[0] === 'bottom') {\n result.bottom = 0;\n } else {\n result.top = this.getDimension(position[0]) as DimensionValue;\n }\n if (position[1] === 'center') {\n result.justifyContent = 'center';\n } else if (position[1] === 'left') {\n result.left = 0;\n } else if (position[1] === 'bottom') {\n result.right = 0;\n } else {\n result.left = this.getDimension(position[1]) as DimensionValue;\n }\n return result;\n }\n\n public getPositionAndSize() {\n const result: {\n resizeMode? : string,\n position?: ViewStyle,\n size?: ViewStyle\n } = {} as any;\n if (this.props.resizeMode) {\n result.resizeMode = this.props.resizeMode;\n return result;\n }\n if (this.props.size === 'contain' || this.props.size === 'cover') {\n result.resizeMode = this.props.size;\n }\n if (this.props.position === 'center') {\n if (!result.resizeMode) {\n result.resizeMode = 'center';\n }\n result.position = {\n justifyContent: 'center',\n alignItems: 'center'\n };\n }\n if (result.resizeMode === 'cover' || result.resizeMode === 'contain') {\n return result;\n }\n const size = this.props.size?.matchAll(BACKGROUND_SIZE_REGEX).next().value;\n result.size = {};\n if (size) {\n result.size.width = (size[1].endsWith('%') ? size[1] : parseInt(size[1])) as DimensionValue;\n result.size.height = (size[2].endsWith('%') ? size[2] : parseInt(size[2])) as DimensionValue\n }\n if (!result.resizeMode && this.props.position) {\n result.position = this.getPosition();\n }\n if (!this.getGradient()?.value?.length) {\n if (this.props.repeat === 'no-repeat') {\n result.size.width = result.size.width || this.state.naturalImageWidth;\n result.size.height = result.size.height || this.state.naturalImageHeight;\n } else if (this.props.repeat === 'repeat-x') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || '100%';\n result.size.height = result.size.height || this.state.naturalImageHeight;\n } else if (this.props.repeat === 'repeat-y') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || this.state.naturalImageWidth;\n result.size.height = result.size.height || '100%';\n } else {\n result.resizeMode = 'repeat';\n }\n }\n return result;\n }\n\n public renderLinearGradient(data: string) {\n const psresult = this.getPositionAndSize();\n return (\n <LinearGradient\n value={data || ''}\n style={this.props.style}\n size={psresult.size}\n position={psresult.position}\n middle={psresult.resizeMode === 'center'}>\n <></>\n </LinearGradient>\n );\n }\n\n componentDidUpdate(prevProps: Readonly<BackgroundProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (this.props.image && prevProps.image !== this.props.image) {\n this.setImage();\n }\n }\n\n componentDidMount(): void {\n setTimeout(() => this.setImage(), 100);\n }\n\n setImage() {\n let source = this.props.image?.trim() as any;\n if (!source) {\n return;\n }\n if (source?.startsWith('url')) {\n source = this.props.image?.matchAll(IMAGE_URL_REGEX)?.next()?.value?.[1];\n }\n if (this.loadAsset) {\n source = this.loadAsset(source);\n }\n if (isFullPathUrl(source)) {\n source = {\n uri: source\n };\n }\n this.caluculateSize(source);\n this.setState({\n imageSrc: source\n } as BackgroundState);\n if (this.props.image) {\n ASSET_CACHE[this.props.image] = source;\n }\n }\n\n public getGradient() {\n return this.props.image?.trim().matchAll(LINEAT_GRADIENT_REGEX).next();\n }\n\n public renderImage() {\n const psresult = this.getPositionAndSize();\n return (\n <AssetConsumer>\n {(loadAsset) => {\n const loadImage = this.loadAsset !== loadAsset;\n this.loadAsset = loadAsset;\n if (loadImage) {\n setTimeout(() => this.setImage(), 10);\n }\n return (<View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, {\n flexDirection: 'row',\n justifyContent: psresult.position?.justifyContent,\n alignItems: psresult.position?.alignItems\n }]}>\n <View style={[\n { position: 'absolute', overflow: 'hidden' },\n psresult.position,\n isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size\n ]}>\n <Image\n source={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n style={[\n {\n width: '100%',\n height: '100%'\n },\n !isEmpty(psresult.size)\n || (psresult.resizeMode === 'cover'\n || psresult.resizeMode === 'contain') ? null : {\n minWidth: this.state.naturalImageWidth,\n minHeight: this.state.naturalImageHeight\n }\n ]}/>\n </View>\n </View>\n </View>);\n }}\n </AssetConsumer>\n );\n }\n\n public render() {\n const gradientData = this.getGradient();\n if (gradientData?.value?.length) {\n return this.renderLinearGradient(gradientData.value[1]);\n } else if (this.props.image && this.state.imageSrc) {\n return this.renderImage();\n }\n return null;\n }\n}\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;A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gE,iBAAiB;UACtCsC,SAAS,EAAE,IAAI,CAACtG,KAAK,CAACiE;QAC1B,CAAC;MACH,CAAC,CACL,CACJ,CACJ,CAAC;IACP,CACW,CAAC;EAEpB;EAEO3B,MAAMA,CAAA,EAAG;IAAA,IAAAiE,mBAAA;IACZ,MAAMC,YAAY,GAAG,IAAI,CAACxB,WAAW,CAAC,CAAC;IACvC,IAAIwB,YAAY,aAAZA,YAAY,gBAAAD,mBAAA,GAAZC,YAAY,CAAErG,KAAK,cAAAoG,mBAAA,eAAnBA,mBAAA,CAAqBtB,MAAM,EAAE;MAC7B,OAAO,IAAI,CAACE,oBAAoB,CAACqB,YAAY,CAACrG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,MAAM,IAAI,IAAI,CAACJ,KAAK,CAAC4D,KAAK,IAAI,IAAI,CAAC3D,KAAK,CAAC0D,QAAQ,EAAE;MAChD,OAAO,IAAI,CAACuC,WAAW,CAAC,CAAC;IAC7B;IACA,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","LinearGradient","ExpoLinearGradient","Image","StyleSheet","View","isEmpty","isNil","isNumber","isString","imageSizeEstimator","AssetConsumer","isFullPathUrl","Blur","Canvas","SkiaImage","useImage","RESIZE_MODE_TO_FIT","stretch","center","contain","cover","repeat","SkiaBackgroundImage","props","_props$imageSrc","source","imageSrc","uri","image","layout","setLayout","useState","width","height","boxWidth","minWidth","boxHeight","minHeight","fit","resizeMode","x","y","createElement","style","onLayout","e","nativeEvent","testID","blur","mode","IMAGE_URL_REGEX","LINEAT_GRADIENT_REGEX","DIMENSION_REGEX","BACKGROUND_POSITION_REGEX","BACKGROUND_SIZE_REGEX","ASSET_CACHE","Component","constructor","state","parse","val","value","splits","split","map","v","trim","angle","locations","endsWith","parseInt","shift","delta","Math","round","tan","PI","abs","end","start","colors","s","_s$matchAll$next","p","matchAll","next","push","parseFloat","replace","componentDidUpdate","prevProps","prevState","snapshot","setState","render","_this$props$size","_this$props$style","borderWidth","overflow","absoluteFill","middle","flexDirection","justifyContent","alignItems","size","position","borderRadius","children","BackgroundComponent","_defineProperty","undefined","caluculateSize","resolveAssetSource","naturalImageWidth","naturalImageHeight","getSize","getDimension","dim","getPosition","result","top","bottom","left","right","getPositionAndSize","_this$props$size2","_this$getGradient","getGradient","length","renderLinearGradient","data","psresult","Fragment","setImage","componentDidMount","setTimeout","_this$props$image","_source","startsWith","_this$props$image2","loadAsset","_this$props$image3","renderImage","_psresult$position","_psresult$position2","loadImage","_gradientData$value","gradientData"],"sources":["background.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { LinearGradient as ExpoLinearGradient, LinearGradientPoint } from 'expo-linear-gradient';\nimport { DimensionValue, Image, StyleSheet, View, ViewStyle } from 'react-native';\nimport { isEmpty, isNil, isNumber, isString } from 'lodash-es';\nimport imageSizeEstimator from '@wavemaker-ai/app-rn-runtime/core/imageSizeEstimator';\nimport { AssetConsumer } from '@wavemaker-ai/app-rn-runtime/core/asset.provider';\nimport { isFullPathUrl } from '@wavemaker-ai/app-rn-runtime/core/utils';\nimport { Blur, Canvas, Image as SkiaImage, useImage } from '@shopify/react-native-skia';\n\ntype SkiaFit = 'cover' | 'contain' | 'fill' | 'none' | 'scaleDown';\nconst RESIZE_MODE_TO_FIT: { [key: string]: SkiaFit } = {\n stretch: 'fill',\n center: 'none',\n contain: 'contain',\n cover: 'cover',\n repeat: 'cover'\n};\n\nconst SkiaBackgroundImage = (props: {\n imageSrc: any;\n resizeMode?: string;\n minWidth?: number;\n minHeight?: number;\n blur: number;\n}) => {\n const source = isString(props.imageSrc) || isNumber(props.imageSrc)\n ? props.imageSrc : props.imageSrc?.uri;\n const image = useImage(source);\n const [layout, setLayout] = React.useState({ width: 0, height: 0 });\n if (!image) {\n return null;\n }\n const boxWidth = layout.width || props.minWidth || image.width();\n const boxHeight = layout.height || props.minHeight || image.height();\n const fit = RESIZE_MODE_TO_FIT[props.resizeMode || 'cover'] || 'cover';\n\n const width = fit === 'none' ? image.width() : boxWidth;\n const height = fit === 'none' ? image.height() : boxHeight;\n const x = fit === 'none' ? (boxWidth - width) / 2 : 0;\n const y = fit === 'none' ? (boxHeight - height) / 2 : 0;\n\n return (\n <View\n style={{ width: '100%', height: '100%' }}\n onLayout={(e) => setLayout({\n width: e.nativeEvent.layout.width,\n height: e.nativeEvent.layout.height\n })}>\n <Canvas testID=\"wm-skia-canvas\" style={{ width: '100%', height: '100%' }}>\n <SkiaImage image={image} x={x} y={y} width={width} height={height} fit={fit}>\n <Blur blur={props.blur} mode=\"clamp\" />\n </SkiaImage>\n </Canvas>\n </View>\n );\n};\n\nexport interface LinearGradientProps {\n value: string;\n children: any;\n style?: ViewStyle;\n size?: ViewStyle;\n position?: ViewStyle;\n middle?: boolean;\n}\n\nexport interface LinearGradientState {\n colors: string[];\n locations: number[];\n start: LinearGradientPoint;\n end: LinearGradientPoint;\n}\n\nconst IMAGE_URL_REGEX = /url\\(['|\"]?(.+)['|\"]?\\)$/gi;\nconst LINEAT_GRADIENT_REGEX = /linear-gradient\\((.+)\\)$/gi;\nconst DIMENSION_REGEX = /([0-9%]+)[a-z]*/g;\nconst BACKGROUND_POSITION_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\nconst BACKGROUND_SIZE_REGEX = /([0-9%]+)[a-z]*\\s*([0-9%]+)[a-z]*/g;\n\nconst ASSET_CACHE = {} as any;\n\nexport class LinearGradient extends React.Component<LinearGradientProps, LinearGradientState> {\n\n constructor(props: LinearGradientProps) {\n super(props);\n this.state = this.parse();\n }\n\n parse(val = this.props.value) {\n let state = {} as LinearGradientState;\n const splits = val.split(',').map(v => v.trim());\n let angle = 0;\n const locations: LinearGradientPoint[] = [];\n if (splits[0].endsWith('deg')) {\n angle = (parseInt(splits[0].split('deg')[0]))%360;\n angle = angle < 0 ? (360 + angle) : angle;\n splits.shift();\n }\n angle += 90;\n const delta = Math.round(Math.tan((angle * Math.PI) / 180) * 100)/100;\n if (Math.abs(delta) > 1) {\n state = {\n end: {\n x: -0.5 / delta + 0.5,\n y: 0\n },\n start: {\n x: 0.5 / delta + 0.5,\n y: 1\n }\n } as LinearGradientState;\n } else {\n state = {\n start: {\n x: 0,\n y: -0.5 * delta + 0.5\n },\n end: {\n x: 1,\n y: 0.5 * delta + 0.5\n }\n } as LinearGradientState;\n }\n if (angle >= 270 && angle <= 450) {\n state = {\n start : state.end,\n end: state.start\n } as LinearGradientState;\n }\n state.colors = [];\n state.locations = [];\n splits.map(s => {\n const p = s.matchAll(/\\s*([0-9.]+)%/g).next()?.value;\n if (p) {\n state.locations.push(parseFloat(p[1]) / 100);\n state.colors.push(s.replace(p[0], ''));\n } else {\n // state.locations.push(null as any);\n state.colors.push(s);\n }\n });\n return state;\n }\n\n componentDidUpdate(prevProps: Readonly<LinearGradientProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (prevProps.value !== this.props.value) {\n this.setState(this.parse());\n }\n }\n\n\n public render() {\n return (\n <View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, this.props.middle ? {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center'\n } : null]}>\n <ExpoLinearGradient testID=\"wm-expo-linear-gradient\"\n colors={this.state.colors as any}\n locations={this.state.locations as any}\n start={this.state.start}\n end={this.state.end}\n style={[\n this.props.size?.width ? this.props.size : StyleSheet.absoluteFill,\n this.props.position,\n {position: 'absolute', borderRadius: this.props.style?.borderRadius}\n ]}\n />\n </View>\n {this.props.children}\n </View>\n );\n }\n}\n\nexport interface BackgroundProps {\n image?: string;\n position?: string;\n children?: any;\n resizeMode?: string;\n repeat?: string;\n style?: ViewStyle;\n size: string;\n blur?: number;\n}\n\nexport interface BackgroundState {\n imageSrc: any;\n naturalImageWidth: number,\n naturalImageHeight: number\n}\n\nexport class BackgroundComponent extends React.Component<BackgroundProps, BackgroundState> {\n\n private loadAsset: (path: string) => number | string = null as any;\n\n constructor(props: BackgroundProps) {\n super(props);\n this.state = {\n imageSrc : this.props.image ? ASSET_CACHE[this.props.image] : undefined\n } as BackgroundState;\n }\n\n public caluculateSize(imageSrc: any) {\n if (isNumber(imageSrc)) {\n const {width, height} = Image.resolveAssetSource(imageSrc);\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n } else if (!isNil(imageSrc?.uri)) {\n imageSizeEstimator.getSize(imageSrc.uri, (width: number, height: number) => {\n this.setState({\n naturalImageWidth: width,\n naturalImageHeight: height\n } as BackgroundState);\n });\n }\n }\n\n getDimension(dim: string) {\n if (dim) {\n const value = dim.matchAll(DIMENSION_REGEX).next().value!;\n if (value[1]) {\n return value[1].endsWith('%') ? value[1] : parseInt(value[1]);\n }\n }\n return null;\n }\n\n public getPosition() {\n const result = {} as ViewStyle;\n if (!this.props.position) {\n return result;\n }\n const position = this.props.position.split(' ').map(s => s.trim());\n if (position[0] === 'center') {\n result.alignItems = 'center';\n } else if (position[0] === 'top') {\n result.top = 0;\n } else if (position[0] === 'bottom') {\n result.bottom = 0;\n } else {\n result.top = this.getDimension(position[0]) as DimensionValue;\n }\n if (position[1] === 'center') {\n result.justifyContent = 'center';\n } else if (position[1] === 'left') {\n result.left = 0;\n } else if (position[1] === 'bottom') {\n result.right = 0;\n } else {\n result.left = this.getDimension(position[1]) as DimensionValue;\n }\n return result;\n }\n\n public getPositionAndSize() {\n const result: {\n resizeMode? : string,\n position?: ViewStyle,\n size?: ViewStyle\n } = {} as any;\n if (this.props.resizeMode) {\n result.resizeMode = this.props.resizeMode;\n return result;\n }\n if (this.props.size === 'contain' || this.props.size === 'cover') {\n result.resizeMode = this.props.size;\n }\n if (this.props.position === 'center') {\n if (!result.resizeMode) {\n result.resizeMode = 'center';\n }\n result.position = {\n justifyContent: 'center',\n alignItems: 'center'\n };\n }\n if (result.resizeMode === 'cover' || result.resizeMode === 'contain') {\n return result;\n }\n const size = this.props.size?.matchAll(BACKGROUND_SIZE_REGEX).next().value;\n result.size = {};\n if (size) {\n result.size.width = (size[1].endsWith('%') ? size[1] : parseInt(size[1])) as DimensionValue;\n result.size.height = (size[2].endsWith('%') ? size[2] : parseInt(size[2])) as DimensionValue\n }\n if (!result.resizeMode && this.props.position) {\n result.position = this.getPosition();\n }\n if (!this.getGradient()?.value?.length) {\n if (this.props.repeat === 'no-repeat') {\n result.size.width = result.size.width || this.state.naturalImageWidth;\n result.size.height = result.size.height || this.state.naturalImageHeight;\n } else if (this.props.repeat === 'repeat-x') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || '100%';\n result.size.height = result.size.height || this.state.naturalImageHeight;\n } else if (this.props.repeat === 'repeat-y') {\n result.resizeMode = 'repeat';\n result.size.width = result.size.width || this.state.naturalImageWidth;\n result.size.height = result.size.height || '100%';\n } else {\n result.resizeMode = 'repeat';\n }\n }\n return result;\n }\n\n public renderLinearGradient(data: string) {\n const psresult = this.getPositionAndSize();\n return (\n <LinearGradient\n value={data || ''}\n style={this.props.style}\n size={psresult.size}\n position={psresult.position}\n middle={psresult.resizeMode === 'center'}>\n <></>\n </LinearGradient>\n );\n }\n\n componentDidUpdate(prevProps: Readonly<BackgroundProps>, prevState: Readonly<{}>, snapshot?: any): void {\n if (this.props.image && prevProps.image !== this.props.image) {\n this.setImage();\n }\n }\n\n componentDidMount(): void {\n setTimeout(() => this.setImage(), 100);\n }\n\n setImage() {\n let source = this.props.image?.trim() as any;\n if (!source) {\n return;\n }\n if (source?.startsWith('url')) {\n source = this.props.image?.matchAll(IMAGE_URL_REGEX)?.next()?.value?.[1];\n }\n if (this.loadAsset) {\n source = this.loadAsset(source);\n }\n if (isFullPathUrl(source)) {\n source = {\n uri: source\n };\n }\n this.caluculateSize(source);\n this.setState({\n imageSrc: source\n } as BackgroundState);\n if (this.props.image) {\n ASSET_CACHE[this.props.image] = source;\n }\n }\n\n public getGradient() {\n return this.props.image?.trim().matchAll(LINEAT_GRADIENT_REGEX).next();\n }\n\n public renderImage() {\n const psresult = this.getPositionAndSize();\n return (\n <AssetConsumer>\n {(loadAsset) => {\n const loadImage = this.loadAsset !== loadAsset;\n this.loadAsset = loadAsset;\n if (loadImage) {\n setTimeout(() => this.setImage(), 10);\n }\n return (<View style={[{borderWidth: 0, overflow: 'hidden'}, StyleSheet.absoluteFill, this.props.style]}>\n <View style={[\n StyleSheet.absoluteFill, {\n flexDirection: 'row',\n justifyContent: psresult.position?.justifyContent,\n alignItems: psresult.position?.alignItems\n }]}>\n <View style={[\n { position: 'absolute', overflow: 'hidden' },\n psresult.position,\n isEmpty(psresult.size) ? StyleSheet.absoluteFill : psresult.size\n ]}>\n {this.state.imageSrc && this.props.blur ? (\n <SkiaBackgroundImage\n imageSrc={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n minWidth={this.state.naturalImageWidth}\n minHeight={this.state.naturalImageHeight}\n blur={this.props.blur}\n />\n ) : (\n <Image\n source={this.state.imageSrc}\n resizeMode={psresult.resizeMode as any || 'cover'}\n style={[\n {\n width: '100%',\n height: '100%'\n },\n !isEmpty(psresult.size)\n || (psresult.resizeMode === 'cover'\n || psresult.resizeMode === 'contain') ? null : {\n minWidth: this.state.naturalImageWidth,\n minHeight: this.state.naturalImageHeight\n }\n ]}/>\n )}\n </View>\n </View>\n </View>);\n }}\n </AssetConsumer>\n );\n }\n\n public render() {\n const gradientData = this.getGradient();\n if (gradientData?.value?.length) {\n return this.renderLinearGradient(gradientData.value[1]);\n } else if (this.props.image && this.state.imageSrc) {\n return this.renderImage();\n }\n return null;\n }\n}\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,kBAAkB,QAA6B,sBAAsB;AAChG,SAAyBC,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACjF,SAASC,OAAO,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,WAAW;AAC9D,OAAOC,kBAAkB,MAAM,sDAAsD;AACrF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AI,CAACuB,KAAK,CAACuD,iBAAiB;UACtC5E,SAAS,EAAE,IAAI,CAACqB,KAAK,CAACwD;QAC1B,CAAC;MACH,CAAC,CAET,CACJ,CACJ,CAAC;IACP,CACW,CAAC;EAEpB;EAEOpB,MAAMA,CAAA,EAAG;IAAA,IAAAoD,mBAAA;IACZ,MAAMC,YAAY,GAAG,IAAI,CAACpB,WAAW,CAAC,CAAC;IACvC,IAAIoB,YAAY,aAAZA,YAAY,gBAAAD,mBAAA,GAAZC,YAAY,CAAEtF,KAAK,cAAAqF,mBAAA,eAAnBA,mBAAA,CAAqBlB,MAAM,EAAE;MAC7B,OAAO,IAAI,CAACC,oBAAoB,CAACkB,YAAY,CAACtF,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,MAAM,IAAI,IAAI,CAACtC,KAAK,CAACK,KAAK,IAAI,IAAI,CAAC8B,KAAK,CAAChC,QAAQ,EAAE;MAChD,OAAO,IAAI,CAACoH,WAAW,CAAC,CAAC;IAC7B;IACA,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
|
|
@@ -38,6 +38,10 @@ const STYLE_PROP_TYPE_INFO = {
|
|
|
38
38
|
isValid: isString,
|
|
39
39
|
ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'
|
|
40
40
|
},
|
|
41
|
+
backdropFilter: {
|
|
42
|
+
isValid: isString,
|
|
43
|
+
ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'
|
|
44
|
+
},
|
|
41
45
|
borderBottomColor: {
|
|
42
46
|
isValid: isColor,
|
|
43
47
|
ref: 'https://reactnative.dev/docs/view-style-props#borderbottomcolor'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNumber","isString","Font","isColor","c","isStringOrNumber","v","isIn","arr","obj","forEach","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","backgroundImage","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","backgroundPosition","backgroundRepeat","backgroundSize","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopColor","borderTopWidth","borderWidth","bottom","color","columnGap","direction","display","elevation","end","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","fontFamily","isLoaded","errorMsg","fontSize","fontStyle","fontVariant","fontWeight","gap","height","justifyContent","left","letterSpacing","lineHeight","margin","marginBottom","marginEnd","marginHorizontal","marginLeft","marginRight","marginStart","marginTop","marginVertical","maxHeight","maxWidth","minHeight","minWidth","opacity","overflow","overlayColor","padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","pointerEvents","position","resizeMode","right","rowGap","shadowColor","shadowOpacity","shadowRadius","start","textAlign","textAlignVertical","textDecorationColor","textDecorationLine","textDecorationStyle","textShadowColor","textShadowRadius","textTransform","tintColor","top","userSelect","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value","trim","startsWith","getErrorMessage","replace","g","toLowerCase"],"sources":["style-prop.validator.ts"],"sourcesContent":["import {isNumber, isNil, isString } from 'lodash-es';\nimport * as Font from 'expo-font';\n\nconst isColor = (c: string) => true;\nconst isStringOrNumber = (v: any) => isNumber(v) || isString(v);\nconst isIn = (...arr: any) => {\n const obj = {};\n arr.forEach((v: any) => {\n (obj as any)[v] = true;\n })\n return (k: any) => (obj as any)[k] === true ;\n};\n\nconst STYLE_PROP_TYPE_INFO = {\n alignContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around'),\n ref: 'https://reactnative.dev/docs/layout-props#aligncontent'\n },\n alignItems: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignitems'\n },\n alignSelf: {\n isValid: isIn('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignself'\n },\n aspectRatio: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#aspectratio'\n },\n backfaceVisibility: {\n isValid: isIn('visible', 'hidden'),\n ref: 'https://reactnative.dev/docs/image-style-props#backfacevisibility'\n },\n backgroundColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#backgroundcolor'\n },\n backgroundImage: {\n isValid: isString,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n borderBottomColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomcolor'\n },\n borderBottomEndRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomendradius'\n },\n borderBottomLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomleftradius'\n },\n backgroundPosition: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundRepeat: {\n isValid: isIn('repeat', 'repeat-x', 'repeat-y', 'no-repeat'),\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundSize: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n borderBottomRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomrightradius'\n },\n borderBottomStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomstartradius'\n },\n borderBottomWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderbottomwidth'\n },\n borderColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#bordercolor'\n },\n borderCurve: {\n isValid: isIn('circular', 'continuous'),\n ref: 'https://reactnative.dev/docs/view-style-props#bordercurve-ios'\n },\n borderEndColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderendcolor'\n },\n borderEndWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderendwidth'\n },\n borderLeftColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderleftcolor'\n },\n borderLeftWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderleftwidth'\n },\n borderRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderradius'\n },\n borderRightColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderrightcolor'\n },\n borderRightWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderrightwidth'\n },\n borderStartColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderstartcolor'\n },\n borderStartWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderstartwidth'\n },\n borderStyle: {\n isValid: isIn('solid', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/view-style-props#borderstyle'\n },\n borderTopEndRadius: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopendradius'\n },\n borderTopLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertopleftradius'\n },\n borderTopRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertoprightradius'\n },\n borderTopStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopstartradius'\n },\n borderTopColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderTopWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderwidth'\n },\n bottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bottom'\n },\n color: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#color'\n },\n columnGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#columngap'\n },\n direction: {\n isValid: isIn('inherit', 'LTR', 'RTL'),\n ref: 'https://reactnative.dev/docs/layout-props#direction'\n },\n display: {\n isValid: isIn('none', 'flex'),\n ref: 'https://reactnative.dev/docs/layout-props#display'\n },\n elevation: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#elevation-android'\n },\n end: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#end'\n },\n flex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flex'\n },\n flexBasis: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexbasis'\n },\n flexDirection: {\n isValid: isIn('column', 'row', 'column-reverse', 'row-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexdirection'\n },\n flexGrow: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexgrow'\n },\n flexShrink: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexshrink'\n },\n flexWrap: {\n isValid: isIn('wrap', 'nowrap', 'wrap-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexwrap'\n },\n fontFamily: {\n isValid: (v: string) => Font.isLoaded(v),\n errorMsg: (v: string) => `Font '${v}' is not loaded. Font family names are case-sensitive. Please add font either in theme or app.`,\n ref: 'https://reactnative.dev/docs/text-style-props#fontfamily'\n },\n fontSize: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#fontsize'\n },\n fontStyle: {\n isValid: isIn('normal', 'italic'),\n ref: 'https://reactnative.dev/docs/text-style-props#fontstyle'\n },\n fontVariant: {\n isValid: (v: any) => isIn('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') || isString(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontvariant'\n },\n fontWeight: {\n isValid: (v: any) => isIn('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') || isNumber(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontweight'\n },\n gap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#gap'\n },\n height: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#height'\n },\n justifyContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'),\n ref: 'https://reactnative.dev/docs/layout-props#justifycontent'\n },\n left: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#left'\n },\n letterSpacing: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#letterspacing'\n },\n lineHeight: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#lineheight'\n },\n margin: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margin'\n },\n marginBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginbottom'\n },\n marginEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginend'\n },\n marginHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginhorizontal'\n },\n marginLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginleft'\n },\n marginRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginright'\n },\n marginStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginstart'\n },\n marginTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margintop'\n },\n marginVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginvertical'\n },\n maxHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxheight'\n },\n maxWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxwidth'\n },\n minHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minheight'\n },\n minWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minwidth'\n },\n opacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#opacity'\n },\n overflow: {\n isValid: isIn('visible', 'hidden', 'scroll'),\n ref: 'https://reactnative.dev/docs/image-style-props#overflow'\n },\n overlayColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#overlaycolor-android'\n },\n padding: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#padding'\n },\n paddingBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingbottom'\n },\n paddingEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingend'\n },\n paddingHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddinghorizontal'\n },\n paddingLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingleft'\n },\n paddingRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingright'\n },\n paddingStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingstart'\n },\n paddingTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingtop'\n },\n paddingVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingvertical'\n },\n pointerEvents: {\n isValid: isIn('auto', 'box-none', 'box-only', 'none' ),\n ref: 'https://reactnative.dev/docs/view-style-props#pointerevents'\n },\n position: {\n isValid: isIn('absolute', 'relative', 'fixed'),\n ref: 'https://reactnative.dev/docs/layout-props#position'\n },\n resizeMode: {\n isValid: isIn('cover', 'contain', 'stretch', 'repeat', 'center'),\n ref: 'https://reactnative.dev/docs/image-style-props#resizemode'\n },\n right: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#right'\n },\n rowGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#rowgap'\n },\n shadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowcolor'\n },\n shadowOpacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowopacity-ios'\n },\n shadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowradius-ios'\n },\n start: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#start'\n },\n textAlign: {\n isValid: isIn('auto', 'left', 'right', 'center', 'justify'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalign'\n },\n textAlignVertical: {\n isValid: isIn('auto', 'top', 'bottom', 'center'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalignvertical-android'\n },\n textDecorationColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationcolor-ios'\n },\n textDecorationLine: {\n isValid: isIn('none', 'underline', 'line-through', 'underline line-through'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationline'\n },\n textDecorationStyle: {\n isValid: isIn('solid', 'double', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationstyle-ios'\n },\n textShadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowcolor'\n },\n textShadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowoffset'\n },\n textTransform: {\n isValid: isIn('none', 'uppercase', 'lowercase', 'capitalize'),\n ref: 'https://reactnative.dev/docs/text-style-props#texttransform'\n },\n tintColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#tintcolor'\n },\n top: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#top'\n },\n userSelect: {\n isValid: isIn('text', 'none'),\n ref: 'valid values to user-select are text, none.'\n },\n verticalAlign: {\n isValid: isIn('auto', 'top', 'bottom', 'middle'),\n ref: 'https://reactnative.dev/docs/text-style-props#verticalalign-android'\n },\n width: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#width'\n },\n writingDirection: {\n isValid: isIn('auto', 'ltr', 'rtl'),\n ref: 'https://reactnative.dev/docs/text-style-props#writingdirection-ios'\n },\n zIndex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#zindex'\n },\n};\n\nexport const getStyleReference = (name: string) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.ref;\n};\n\nexport const isValidStyleProp = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return name?.trim().startsWith('__') || (info && info.isValid(value));\n};\n\nexport const getErrorMessage = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n name = name.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);\n if (info) {\n if (info.errorMsg) {\n return info.errorMsg(value);\n } else {\n return `'${value}' is not a valid value to '${name}'.`;\n }\n }\n return `'${name}' is not a supported style property in one or all Native Platforms.`\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,MAAMC,OAAO,GAAIC,CAAS,IAAK,IAAI;AACnC,MAAMC,gBAAgB,GAAIC,CAAM,IAAKN,QAAQ,CAACM,CAAC,CAAC,IAAIL,QAAQ,CAACK,CAAC,CAAC;AAC/D,MAAMC,IAAI,GAAGA,CAAC,GAAGC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;IACN,IAAIA,IAAI,CAAC9D,QAAQ,EAAE;MACf,OAAO8D,IAAI,CAAC9D,QAAQ,CAACgE,KAAK,CAAC;IAC/B,CAAC,MAAM;MACH,OAAO,IAAIA,KAAK,8BAA8BH,IAAI,IAAI;IAC1D;EACJ;EACA,OAAO,IAAIA,IAAI,qEAAqE;AACxF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["isNumber","isString","Font","isColor","c","isStringOrNumber","v","isIn","arr","obj","forEach","k","STYLE_PROP_TYPE_INFO","alignContent","isValid","ref","alignItems","alignSelf","aspectRatio","backfaceVisibility","backgroundColor","backgroundImage","backdropFilter","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","backgroundPosition","backgroundRepeat","backgroundSize","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopColor","borderTopWidth","borderWidth","bottom","color","columnGap","direction","display","elevation","end","flex","flexBasis","flexDirection","flexGrow","flexShrink","flexWrap","fontFamily","isLoaded","errorMsg","fontSize","fontStyle","fontVariant","fontWeight","gap","height","justifyContent","left","letterSpacing","lineHeight","margin","marginBottom","marginEnd","marginHorizontal","marginLeft","marginRight","marginStart","marginTop","marginVertical","maxHeight","maxWidth","minHeight","minWidth","opacity","overflow","overlayColor","padding","paddingBottom","paddingEnd","paddingHorizontal","paddingLeft","paddingRight","paddingStart","paddingTop","paddingVertical","pointerEvents","position","resizeMode","right","rowGap","shadowColor","shadowOpacity","shadowRadius","start","textAlign","textAlignVertical","textDecorationColor","textDecorationLine","textDecorationStyle","textShadowColor","textShadowRadius","textTransform","tintColor","top","userSelect","verticalAlign","width","writingDirection","zIndex","getStyleReference","name","info","isValidStyleProp","value","trim","startsWith","getErrorMessage","replace","g","toLowerCase"],"sources":["style-prop.validator.ts"],"sourcesContent":["import {isNumber, isNil, isString } from 'lodash-es';\nimport * as Font from 'expo-font';\n\nconst isColor = (c: string) => true;\nconst isStringOrNumber = (v: any) => isNumber(v) || isString(v);\nconst isIn = (...arr: any) => {\n const obj = {};\n arr.forEach((v: any) => {\n (obj as any)[v] = true;\n })\n return (k: any) => (obj as any)[k] === true ;\n};\n\nconst STYLE_PROP_TYPE_INFO = {\n alignContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around'),\n ref: 'https://reactnative.dev/docs/layout-props#aligncontent'\n },\n alignItems: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignitems'\n },\n alignSelf: {\n isValid: isIn('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline'),\n ref: 'https://reactnative.dev/docs/layout-props#alignself'\n },\n aspectRatio: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#aspectratio'\n },\n backfaceVisibility: {\n isValid: isIn('visible', 'hidden'),\n ref: 'https://reactnative.dev/docs/image-style-props#backfacevisibility'\n },\n backgroundColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#backgroundcolor'\n },\n backgroundImage: {\n isValid: isString,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backdropFilter: {\n isValid: isString,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n borderBottomColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomcolor'\n },\n borderBottomEndRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomendradius'\n },\n borderBottomLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomleftradius'\n },\n backgroundPosition: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundRepeat: {\n isValid: isIn('repeat', 'repeat-x', 'repeat-y', 'no-repeat'),\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n backgroundSize: {\n isValid: isStringOrNumber,\n ref: 'http://www.wavemakeronline.com/app-runtime/latest/rn/style-docs/widgets/view'\n },\n borderBottomRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderbottomrightradius'\n },\n borderBottomStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#borderbottomstartradius'\n },\n borderBottomWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderbottomwidth'\n },\n borderColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#bordercolor'\n },\n borderCurve: {\n isValid: isIn('circular', 'continuous'),\n ref: 'https://reactnative.dev/docs/view-style-props#bordercurve-ios'\n },\n borderEndColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderendcolor'\n },\n borderEndWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderendwidth'\n },\n borderLeftColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderleftcolor'\n },\n borderLeftWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderleftwidth'\n },\n borderRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderradius'\n },\n borderRightColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderrightcolor'\n },\n borderRightWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderrightwidth'\n },\n borderStartColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#borderstartcolor'\n },\n borderStartWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#borderstartwidth'\n },\n borderStyle: {\n isValid: isIn('solid', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/view-style-props#borderstyle'\n },\n borderTopEndRadius: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopendradius'\n },\n borderTopLeftRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertopleftradius'\n },\n borderTopRightRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#bordertoprightradius'\n },\n borderTopStartRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#bordertopstartradius'\n },\n borderTopColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderTopWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bordertopwidth'\n },\n borderWidth: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#borderwidth'\n },\n bottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#bottom'\n },\n color: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#color'\n },\n columnGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#columngap'\n },\n direction: {\n isValid: isIn('inherit', 'LTR', 'RTL'),\n ref: 'https://reactnative.dev/docs/layout-props#direction'\n },\n display: {\n isValid: isIn('none', 'flex'),\n ref: 'https://reactnative.dev/docs/layout-props#display'\n },\n elevation: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/view-style-props#elevation-android'\n },\n end: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#end'\n },\n flex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flex'\n },\n flexBasis: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexbasis'\n },\n flexDirection: {\n isValid: isIn('column', 'row', 'column-reverse', 'row-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexdirection'\n },\n flexGrow: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexgrow'\n },\n flexShrink: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#flexshrink'\n },\n flexWrap: {\n isValid: isIn('wrap', 'nowrap', 'wrap-reverse'),\n ref: 'https://reactnative.dev/docs/layout-props#flexwrap'\n },\n fontFamily: {\n isValid: (v: string) => Font.isLoaded(v),\n errorMsg: (v: string) => `Font '${v}' is not loaded. Font family names are case-sensitive. Please add font either in theme or app.`,\n ref: 'https://reactnative.dev/docs/text-style-props#fontfamily'\n },\n fontSize: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#fontsize'\n },\n fontStyle: {\n isValid: isIn('normal', 'italic'),\n ref: 'https://reactnative.dev/docs/text-style-props#fontstyle'\n },\n fontVariant: {\n isValid: (v: any) => isIn('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') || isString(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontvariant'\n },\n fontWeight: {\n isValid: (v: any) => isIn('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') || isNumber(v),\n ref: 'https://reactnative.dev/docs/text-style-props#fontweight'\n },\n gap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#gap'\n },\n height: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#height'\n },\n justifyContent: {\n isValid: isIn('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'),\n ref: 'https://reactnative.dev/docs/layout-props#justifycontent'\n },\n left: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#left'\n },\n letterSpacing: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#letterspacing'\n },\n lineHeight: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#lineheight'\n },\n margin: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margin'\n },\n marginBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginbottom'\n },\n marginEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginend'\n },\n marginHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginhorizontal'\n },\n marginLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginleft'\n },\n marginRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginright'\n },\n marginStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginstart'\n },\n marginTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#margintop'\n },\n marginVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#marginvertical'\n },\n maxHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxheight'\n },\n maxWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#maxwidth'\n },\n minHeight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minheight'\n },\n minWidth: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#minwidth'\n },\n opacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/image-style-props#opacity'\n },\n overflow: {\n isValid: isIn('visible', 'hidden', 'scroll'),\n ref: 'https://reactnative.dev/docs/image-style-props#overflow'\n },\n overlayColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#overlaycolor-android'\n },\n padding: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#padding'\n },\n paddingBottom: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingbottom'\n },\n paddingEnd: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingend'\n },\n paddingHorizontal: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddinghorizontal'\n },\n paddingLeft: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingleft'\n },\n paddingRight: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingright'\n },\n paddingStart: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingstart'\n },\n paddingTop: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingtop'\n },\n paddingVertical: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#paddingvertical'\n },\n pointerEvents: {\n isValid: isIn('auto', 'box-none', 'box-only', 'none' ),\n ref: 'https://reactnative.dev/docs/view-style-props#pointerevents'\n },\n position: {\n isValid: isIn('absolute', 'relative', 'fixed'),\n ref: 'https://reactnative.dev/docs/layout-props#position'\n },\n resizeMode: {\n isValid: isIn('cover', 'contain', 'stretch', 'repeat', 'center'),\n ref: 'https://reactnative.dev/docs/image-style-props#resizemode'\n },\n right: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#right'\n },\n rowGap: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#rowgap'\n },\n shadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowcolor'\n },\n shadowOpacity: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowopacity-ios'\n },\n shadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/shadow-props#shadowradius-ios'\n },\n start: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#start'\n },\n textAlign: {\n isValid: isIn('auto', 'left', 'right', 'center', 'justify'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalign'\n },\n textAlignVertical: {\n isValid: isIn('auto', 'top', 'bottom', 'center'),\n ref: 'https://reactnative.dev/docs/text-style-props#textalignvertical-android'\n },\n textDecorationColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationcolor-ios'\n },\n textDecorationLine: {\n isValid: isIn('none', 'underline', 'line-through', 'underline line-through'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationline'\n },\n textDecorationStyle: {\n isValid: isIn('solid', 'double', 'dotted', 'dashed'),\n ref: 'https://reactnative.dev/docs/text-style-props#textdecorationstyle-ios'\n },\n textShadowColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowcolor'\n },\n textShadowRadius: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/text-style-props#textshadowoffset'\n },\n textTransform: {\n isValid: isIn('none', 'uppercase', 'lowercase', 'capitalize'),\n ref: 'https://reactnative.dev/docs/text-style-props#texttransform'\n },\n tintColor: {\n isValid: isColor,\n ref: 'https://reactnative.dev/docs/image-style-props#tintcolor'\n },\n top: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#top'\n },\n userSelect: {\n isValid: isIn('text', 'none'),\n ref: 'valid values to user-select are text, none.'\n },\n verticalAlign: {\n isValid: isIn('auto', 'top', 'bottom', 'middle'),\n ref: 'https://reactnative.dev/docs/text-style-props#verticalalign-android'\n },\n width: {\n isValid: isStringOrNumber,\n ref: 'https://reactnative.dev/docs/layout-props#width'\n },\n writingDirection: {\n isValid: isIn('auto', 'ltr', 'rtl'),\n ref: 'https://reactnative.dev/docs/text-style-props#writingdirection-ios'\n },\n zIndex: {\n isValid: isNumber,\n ref: 'https://reactnative.dev/docs/layout-props#zindex'\n },\n};\n\nexport const getStyleReference = (name: string) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return !info || info.ref;\n};\n\nexport const isValidStyleProp = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n return name?.trim().startsWith('__') || (info && info.isValid(value));\n};\n\nexport const getErrorMessage = (name: string, value: any) => {\n const info = (STYLE_PROP_TYPE_INFO as any)[name];\n name = name.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);\n if (info) {\n if (info.errorMsg) {\n return info.errorMsg(value);\n } else {\n return `'${value}' is not a valid value to '${name}'.`;\n }\n }\n return `'${name}' is not a supported style property in one or all Native Platforms.`\n};"],"mappings":"AAAA,SAAQA,QAAQ,EAASC,QAAQ,QAAQ,WAAW;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,MAAMC,OAAO,GAAIC,CAAS,IAAK,IAAI;AACnC,MAAMC,gBAAgB,GAAIC,CAAM,IAAKN,QAAQ,CAACM,CAAC,CAAC,IAAIL,QAAQ,CAACK,CAAC,CAAC;AAC/D,MAAMC,IAAI,GAAGA,CAAC,GAAGC,GAAQ,KAAK;EAC1B,MAAMC,GAAG,GAAG,CAAC,CAAC;EACdD,GAAG,CAACE,OAAO,CAAEJ,CAAM,IAAK;IACnBG,GAAG,CAASH,CAAC,CAAC,GAAG,IAAI;EAC1B,CAAC,CAAC;EACF,OAAQK,CAAM,IAAMF,GAAG,CAASE,CAAC,CAAC,KAAK,IAAI;AAC/C,CAAC;AAED,MAAMC,oBAAoB,GAAG;EACzBC,YAAY,EAAE;IACVC,OAAO,EAAEP,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,CAAC;IAC7FQ,GAAG,EAAE;EACT,CAAC;EACDC,UAAU,EAAE;IACRF,OAAO,EAAEP,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;IACxEQ,GAAG,EAAE;EACT,CAAC;EACDE,SAAS,EAAE;IACPH,OAAO,EAAEP,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;IAChFQ,GAAG,EAAE;EACT,CAAC;EACDG,WAAW,EAAE;IACTJ,OA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AAMkH,gBAAgB,GAAGA,CAACF,IAAY,EAAEG,KAAU,KAAK;EAC1D,MAAMF,IAAI,GAAIpH,oBAAoB,CAASmH,IAAI,CAAC;EAChD,OAAO,CAAAA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEI,IAAI,CAAC,CAAC,CAACC,UAAU,CAAC,IAAI,CAAC,KAAKJ,IAAI,IAAIA,IAAI,CAAClH,OAAO,CAACoH,KAAK,CAAE;AACzE,CAAC;AAED,OAAO,MAAMG,eAAe,GAAGA,CAACN,IAAY,EAAEG,KAAU,KAAK;EACzD,MAAMF,IAAI,GAAIpH,oBAAoB,CAASmH,IAAI,CAAC;EAChDA,IAAI,GAAGA,IAAI,CAACO,OAAO,CAAC,UAAU,EAAGC,CAAC,IAAK,IAAIA,CAAC,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC;EAChE,IAAIR,IAAI,EAAE;IACN,IAAIA,IAAI,CAAC9D,QAAQ,EAAE;MACf,OAAO8D,IAAI,CAAC9D,QAAQ,CAACgE,KAAK,CAAC;IAC/B,CAAC,MAAM;MACH,OAAO,IAAIA,KAAK,8BAA8BH,IAAI,IAAI;IAC1D;EACJ;EACA,OAAO,IAAIA,IAAI,qEAAqE;AACxF,CAAC","ignoreList":[]}
|
package/styles/style-props.js
CHANGED
|
@@ -3,6 +3,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
export class StyleProps {
|
|
5
5
|
constructor() {
|
|
6
|
+
_defineProperty(this, "backdropfilter", void 0);
|
|
6
7
|
_defineProperty(this, "backgroundimage", void 0);
|
|
7
8
|
_defineProperty(this, "backgroundsize", void 0);
|
|
8
9
|
_defineProperty(this, "backgroundrepeat", void 0);
|
|
@@ -54,6 +55,7 @@ export class StyleProps {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
const styleMapping = {
|
|
58
|
+
backdropfilter: 'backdropFilter',
|
|
57
59
|
backgroundimage: 'backgroundImage',
|
|
58
60
|
backgroundsize: 'backgroundSize',
|
|
59
61
|
backgroundrepeat: 'backgroundRepeat',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleProps","constructor","_defineProperty","styleMapping","backgroundimage","backgroundsize","backgroundrepeat","backgroundresizemode","backgroundposition","backgroundcolor","bordercolor","borderradius","borderstyle","borderwidth","borderbottomwidth","borderleftwidth","borderrightwidth","bordertopwidth","color","display","fontsize","fontfamily","fontstyle","fontvariant","fontweight","height","lineheight","margin","marginbottom","marginleft","marginright","margintop","opacity","position","overflow","padding","paddingbottom","paddingleft","paddingright","paddingtop","textalign","textdecoration","verticalalign","width","zindex","top","bottom","left","right","getStyleName","name"],"sources":["style-props.ts"],"sourcesContent":["export class StyleProps {\n backgroundimage?: any;\n backgroundsize?: any;\n backgroundrepeat?: any;\n backgroundresizemode?: any;\n backgroundposition?: any;\n backgroundcolor?: any;\n bordercolor?: any;\n borderradius?: any;\n borderstyle?: any;\n borderwidth?: any;\n borderbottomwidth?: any;\n borderleftwidth?: any;\n borderrightwidth?: any;\n bordertopwidth?: any;\n color?: any;\n display?: any;\n fontsize?: any;\n fontfamily?: any;\n fontstyle?: any;\n fontvariant?: any;\n fontweight?: any;\n height?: any;\n horizontalalign?: any;\n lineheight?: any;\n margin?: any;\n marginbottom?: any;\n marginleft?: any;\n marginright?: any;\n margintop?: any;\n opacity?: any;\n position?: 'relative' | 'sticky' | 'absolute' | 'fixed';\n overflow?: 'none' | 'scroll';\n padding?: any;\n paddingbottom?: any;\n paddingleft?: any;\n paddingright?: any;\n paddingtop?: any;\n textalign?: any;\n textdecoration?: any;\n verticalalign?: any;\n width?: any;\n zindex?: number;\n positionvalue?: string;\n\n top?: number | string; // Use appropriate type (number, string, etc.)\n bottom?: number | string;\n left?: number | string;\n right?: number | string;\n}\n\nconst styleMapping = {\n backgroundimage: 'backgroundImage',\n backgroundsize: 'backgroundSize',\n backgroundrepeat: 'backgroundRepeat',\n backgroundresizemode: 'backgroundResizeMode',\n backgroundposition: 'backgroundPosition',\n backgroundcolor: 'backgroundColor',\n bordercolor: 'borderColor',\n borderradius: 'borderRadius',\n borderstyle: 'borderStyle',\n borderwidth: 'borderWidth',\n borderbottomwidth: 'borderBottomWidth',\n borderleftwidth: 'borderLeftWidth',\n borderrightwidth: 'borderRightWidth',\n bordertopwidth: 'borderTopWidth',\n color: 'color',\n display: 'display',\n fontsize: 'fontSize',\n fontfamily: 'fontFamily',\n fontstyle: 'fontStyle',\n fontvariant: 'fontVariant',\n fontweight: 'fontWeight',\n height: 'height',\n //horizontalalign: any;\n lineheight: 'lineHeight',\n margin: 'margin',\n marginbottom: 'marginBottom',\n marginleft: 'marginLeft',\n marginright: 'marginRight',\n margintop: 'marginTop',\n opacity: 'opacity',\n position: 'position',\n overflow: 'overflow',\n padding: 'padding',\n paddingbottom: 'paddingBottom',\n paddingleft: 'paddingLeft',\n paddingright: 'paddingRight',\n paddingtop: 'paddingTop',\n textalign: 'textAlign',\n textdecoration: 'textDecoration',\n verticalalign: 'verticalAlign',\n width: 'width',\n zindex: 'zindex',\n top: 'top',\n bottom: 'bottom',\n left: 'left',\n right: 'right'\n };\n\nexport const getStyleName = (name: string) => (styleMapping as any)[name];\n"],"mappings":";;;AAAA,OAAO,MAAMA,UAAU,CAAC;EAAAC,YAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;
|
|
1
|
+
{"version":3,"names":["StyleProps","constructor","_defineProperty","styleMapping","backdropfilter","backgroundimage","backgroundsize","backgroundrepeat","backgroundresizemode","backgroundposition","backgroundcolor","bordercolor","borderradius","borderstyle","borderwidth","borderbottomwidth","borderleftwidth","borderrightwidth","bordertopwidth","color","display","fontsize","fontfamily","fontstyle","fontvariant","fontweight","height","lineheight","margin","marginbottom","marginleft","marginright","margintop","opacity","position","overflow","padding","paddingbottom","paddingleft","paddingright","paddingtop","textalign","textdecoration","verticalalign","width","zindex","top","bottom","left","right","getStyleName","name"],"sources":["style-props.ts"],"sourcesContent":["export class StyleProps {\n backdropfilter?: any;\n backgroundimage?: any;\n backgroundsize?: any;\n backgroundrepeat?: any;\n backgroundresizemode?: any;\n backgroundposition?: any;\n backgroundcolor?: any;\n bordercolor?: any;\n borderradius?: any;\n borderstyle?: any;\n borderwidth?: any;\n borderbottomwidth?: any;\n borderleftwidth?: any;\n borderrightwidth?: any;\n bordertopwidth?: any;\n color?: any;\n display?: any;\n fontsize?: any;\n fontfamily?: any;\n fontstyle?: any;\n fontvariant?: any;\n fontweight?: any;\n height?: any;\n horizontalalign?: any;\n lineheight?: any;\n margin?: any;\n marginbottom?: any;\n marginleft?: any;\n marginright?: any;\n margintop?: any;\n opacity?: any;\n position?: 'relative' | 'sticky' | 'absolute' | 'fixed';\n overflow?: 'none' | 'scroll';\n padding?: any;\n paddingbottom?: any;\n paddingleft?: any;\n paddingright?: any;\n paddingtop?: any;\n textalign?: any;\n textdecoration?: any;\n verticalalign?: any;\n width?: any;\n zindex?: number;\n positionvalue?: string;\n\n top?: number | string; // Use appropriate type (number, string, etc.)\n bottom?: number | string;\n left?: number | string;\n right?: number | string;\n}\n\nconst styleMapping = {\n backdropfilter: 'backdropFilter',\n backgroundimage: 'backgroundImage',\n backgroundsize: 'backgroundSize',\n backgroundrepeat: 'backgroundRepeat',\n backgroundresizemode: 'backgroundResizeMode',\n backgroundposition: 'backgroundPosition',\n backgroundcolor: 'backgroundColor',\n bordercolor: 'borderColor',\n borderradius: 'borderRadius',\n borderstyle: 'borderStyle',\n borderwidth: 'borderWidth',\n borderbottomwidth: 'borderBottomWidth',\n borderleftwidth: 'borderLeftWidth',\n borderrightwidth: 'borderRightWidth',\n bordertopwidth: 'borderTopWidth',\n color: 'color',\n display: 'display',\n fontsize: 'fontSize',\n fontfamily: 'fontFamily',\n fontstyle: 'fontStyle',\n fontvariant: 'fontVariant',\n fontweight: 'fontWeight',\n height: 'height',\n //horizontalalign: any;\n lineheight: 'lineHeight',\n margin: 'margin',\n marginbottom: 'marginBottom',\n marginleft: 'marginLeft',\n marginright: 'marginRight',\n margintop: 'marginTop',\n opacity: 'opacity',\n position: 'position',\n overflow: 'overflow',\n padding: 'padding',\n paddingbottom: 'paddingBottom',\n paddingleft: 'paddingLeft',\n paddingright: 'paddingRight',\n paddingtop: 'paddingTop',\n textalign: 'textAlign',\n textdecoration: 'textDecoration',\n verticalalign: 'verticalAlign',\n width: 'width',\n zindex: 'zindex',\n top: 'top',\n bottom: 'bottom',\n left: 'left',\n right: 'right'\n };\n\nexport const getStyleName = (name: string) => (styleMapping as any)[name];\n"],"mappings":";;;AAAA,OAAO,MAAMA,UAAU,CAAC;EAAAC,YAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eA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AAM,EAAE,QAAQ;EAChBC,YAAY,EAAE,cAAc;EAC5BC,UAAU,EAAE,YAAY;EACxBC,WAAW,EAAE,aAAa;EAC1BC,SAAS,EAAE,WAAW;EACtBC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,eAAe;EAC9BC,WAAW,EAAE,aAAa;EAC1BC,YAAY,EAAE,cAAc;EAC5BC,UAAU,EAAE,YAAY;EACxBC,SAAS,EAAE,WAAW;EACtBC,cAAc,EAAE,gBAAgB;EAChCC,aAAa,EAAE,eAAe;EAC9BC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE;AACP,CAAC;AAEL,OAAO,MAAMC,YAAY,GAAIC,IAAY,IAAMhD,YAAY,CAASgD,IAAI,CAAC","ignoreList":[]}
|
package/styles/theme.js
CHANGED
|
@@ -2,7 +2,7 @@ var _Theme;
|
|
|
2
2
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
-
import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, get, reverse, isNumber } from 'lodash';
|
|
5
|
+
import { cloneDeep, isNil, forEach, flatten, isArray, isEmpty, isObject, isString, get, set, reverse, isNumber } from 'lodash';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { camelCase } from 'lodash-es';
|
|
8
8
|
import { Dimensions, Platform } from 'react-native';
|
|
@@ -229,7 +229,37 @@ export class Theme {
|
|
|
229
229
|
}
|
|
230
230
|
return vars;
|
|
231
231
|
}
|
|
232
|
+
resolvePaddingPrecedence(layers) {
|
|
233
|
+
let overlay = null;
|
|
234
|
+
const visit = (nodes, path, depth) => {
|
|
235
|
+
let last = -1;
|
|
236
|
+
nodes.forEach((n, i) => {
|
|
237
|
+
if (!isNil(n === null || n === void 0 ? void 0 : n.padding)) {
|
|
238
|
+
last = i;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
if (last >= 0) {
|
|
242
|
+
Theme.PADDING_SIDES.forEach(sd => {
|
|
243
|
+
if (nodes.some(n => !isNil(n === null || n === void 0 ? void 0 : n['_Padding' + sd]))) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const v = nodes.reduce((a, n, i) => i > last && !isNil(n === null || n === void 0 ? void 0 : n['padding' + sd]) ? n['padding' + sd] : a, undefined);
|
|
247
|
+
if (!isNil(v)) {
|
|
248
|
+
set(overlay = overlay || {}, [...path, '_Padding' + sd], v);
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (depth >= 4) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const kids = nodes.map(n => n ? Object.keys(n).filter(k => isObject(n[k]) && !isArray(n[k])) : []);
|
|
256
|
+
new Set(flatten(kids)).forEach(k => visit(nodes.map(n => n === null || n === void 0 ? void 0 : n[k]), [...path, k], depth + 1));
|
|
257
|
+
};
|
|
258
|
+
visit(layers, [], 0);
|
|
259
|
+
return overlay ? [...layers, overlay] : layers;
|
|
260
|
+
}
|
|
232
261
|
mergeStyle(...styles) {
|
|
262
|
+
styles = this.resolvePaddingPrecedence(styles);
|
|
233
263
|
const style = deepCopy(...styles);
|
|
234
264
|
if (this.traceEnabled) {
|
|
235
265
|
const flattenStyles = this.flatten(style);
|
|
@@ -310,8 +340,25 @@ export class Theme {
|
|
|
310
340
|
style['opacity'] = percentage / 100;
|
|
311
341
|
}
|
|
312
342
|
}
|
|
343
|
+
const isViewportUnit = value => value.endsWith('vw') || value.endsWith('vh');
|
|
344
|
+
const convertViewportUnitToPx = value => {
|
|
345
|
+
if (value.endsWith('vw')) {
|
|
346
|
+
const screenWidth = Dimensions.get('window').width;
|
|
347
|
+
const stylePropertyValue = value.replace('vw', '');
|
|
348
|
+
return Number(stylePropertyValue) / 100 * screenWidth;
|
|
349
|
+
}
|
|
350
|
+
if (value.endsWith('vh')) {
|
|
351
|
+
const screenHeight = Dimensions.get('window').height;
|
|
352
|
+
const stylePropertyValue = value.replace('vh', '');
|
|
353
|
+
return Number(stylePropertyValue) / 100 * screenHeight;
|
|
354
|
+
}
|
|
355
|
+
return value;
|
|
356
|
+
};
|
|
313
357
|
const processStyleValue = value => {
|
|
314
358
|
if (typeof value === 'string') {
|
|
359
|
+
if (isViewportUnit(value)) {
|
|
360
|
+
return convertViewportUnitToPx(value);
|
|
361
|
+
}
|
|
315
362
|
const num = parseFloat(value);
|
|
316
363
|
return isNaN(num) ? value : num;
|
|
317
364
|
}
|
|
@@ -498,17 +545,10 @@ export class Theme {
|
|
|
498
545
|
if (!isNil(style['color']) && style['color'] === 'transparent') {
|
|
499
546
|
style['color'] = 'rgba(255, 255, 255, 0)';
|
|
500
547
|
}
|
|
501
|
-
let screenWidth = Dimensions.get('window').width;
|
|
502
|
-
let screenHeight = Dimensions.get('window').height;
|
|
503
548
|
Object.keys(style).forEach((k, i) => {
|
|
504
|
-
|
|
505
|
-
if (typeof stylePropertyValue === 'string' && stylePropertyValue
|
|
506
|
-
|
|
507
|
-
style[k] = Number(stylePropertyValue) / 100 * screenWidth;
|
|
508
|
-
}
|
|
509
|
-
if (typeof stylePropertyValue === 'string' && stylePropertyValue.endsWith('vh')) {
|
|
510
|
-
stylePropertyValue = stylePropertyValue.replace('vh', '');
|
|
511
|
-
style[k] = Number(stylePropertyValue) / 100 * screenHeight;
|
|
549
|
+
const stylePropertyValue = style[k];
|
|
550
|
+
if (typeof stylePropertyValue === 'string' && isViewportUnit(stylePropertyValue)) {
|
|
551
|
+
style[k] = convertViewportUnitToPx(stylePropertyValue);
|
|
512
552
|
}
|
|
513
553
|
});
|
|
514
554
|
return style;
|
|
@@ -616,6 +656,7 @@ _defineProperty(Theme, "BASE", new _Theme(null, 'default'));
|
|
|
616
656
|
ViewPort.subscribe(ViewPortEvents.SIZE_CHANGE, () => {
|
|
617
657
|
_Theme.BASE.reset();
|
|
618
658
|
});
|
|
659
|
+
_defineProperty(Theme, "PADDING_SIDES", ['Top', 'Right', 'Bottom', 'Left']);
|
|
619
660
|
export default Theme.BASE;
|
|
620
661
|
const ThemeContext = /*#__PURE__*/React.createContext(null);
|
|
621
662
|
export const ThemeProvider = ThemeContext.Provider;
|