@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.643.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/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +151 -136
- package/dist/cjs/StyleSheet/compiler/hash.cjs +15 -18
- package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +21 -24
- package/dist/cjs/StyleSheet/compiler/index.cjs +295 -321
- package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +20 -23
- package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +32 -35
- package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +27 -38
- package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -40
- package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +108 -111
- package/dist/cjs/StyleSheet/dom/index.cjs +70 -72
- package/dist/cjs/StyleSheet/index.cjs +33 -34
- package/dist/cjs/StyleSheet/preprocess.cjs +74 -94
- package/dist/cjs/StyleSheet/validate.cjs +72 -75
- package/dist/cjs/TextAncestorContext.cjs +15 -18
- package/dist/cjs/colorProps.cjs +25 -28
- package/dist/cjs/index.cjs +49 -50
- package/dist/cjs/modules/AccessibilityUtil/index.cjs +18 -21
- package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +15 -18
- package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +46 -49
- package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +34 -39
- package/dist/cjs/modules/AssetRegistry/index.cjs +18 -19
- package/dist/cjs/modules/ImageLoader/index.cjs +135 -141
- package/dist/cjs/modules/InteractionManager.cjs +212 -219
- package/dist/cjs/modules/Platform/index.cjs +18 -21
- package/dist/cjs/modules/TextInputState/index.cjs +55 -58
- package/dist/cjs/modules/UIManager/index.cjs +46 -51
- package/dist/cjs/modules/canUseDOM.cjs +15 -18
- package/dist/cjs/modules/createDOMProps/index.cjs +289 -358
- package/dist/cjs/modules/createEventHandle/index.cjs +57 -62
- package/dist/cjs/modules/dismissKeyboard/index.cjs +16 -19
- package/dist/cjs/modules/forwardedProps/index.cjs +128 -130
- package/dist/cjs/modules/getBoundingClientRect/index.cjs +22 -25
- package/dist/cjs/modules/invariant.cjs +26 -27
- package/dist/cjs/modules/isSelectionValid/index.cjs +22 -25
- package/dist/cjs/modules/isWebColor/index.cjs +15 -18
- package/dist/cjs/modules/mergeRefs/index.cjs +31 -34
- package/dist/cjs/modules/modality/index.cjs +131 -134
- package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +25 -28
- package/dist/cjs/modules/normalizeColor/index.cjs +28 -31
- package/dist/cjs/modules/pick/index.cjs +24 -27
- package/dist/cjs/modules/processColor/index.cjs +28 -36
- package/dist/cjs/modules/requestIdleCallback/index.cjs +28 -29
- package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +39 -42
- package/dist/cjs/modules/setValueForStyles/index.cjs +31 -34
- package/dist/cjs/modules/unitlessNumbers/index.cjs +74 -75
- package/dist/cjs/modules/useElementLayout/index.cjs +24 -31
- package/dist/cjs/modules/useEvent/index.cjs +40 -43
- package/dist/cjs/modules/useHover/index.cjs +113 -118
- package/dist/cjs/modules/useLayoutEffect/index.cjs +18 -26
- package/dist/cjs/modules/useLocale/index.cjs +33 -43
- package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +66 -76
- package/dist/cjs/modules/useMergeRefs/index.cjs +19 -29
- package/dist/cjs/modules/usePlatformMethods/index.cjs +24 -30
- package/dist/cjs/modules/useStable/index.cjs +24 -32
- package/dist/cjs/styleTypes.cjs +10 -11
- package/dist/cjs/types.cjs +10 -11
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +137 -119
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs +2 -2
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +7 -6
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/index.mjs +279 -302
- package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +7 -5
- package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +19 -17
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +14 -20
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +24 -22
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +94 -93
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -1
- package/dist/esm/StyleSheet/dom/index.mjs +57 -54
- package/dist/esm/StyleSheet/dom/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/index.mjs +18 -17
- package/dist/esm/StyleSheet/index.mjs.map +1 -1
- package/dist/esm/StyleSheet/preprocess.mjs +58 -75
- package/dist/esm/StyleSheet/preprocess.mjs.map +1 -1
- package/dist/esm/StyleSheet/validate.mjs +58 -57
- package/dist/esm/StyleSheet/validate.mjs.map +1 -1
- package/dist/esm/TextAncestorContext.mjs +2 -0
- package/dist/esm/TextAncestorContext.mjs.map +1 -1
- package/dist/esm/colorProps.mjs +11 -10
- package/dist/esm/colorProps.mjs.map +1 -1
- package/dist/esm/index.js +22 -15
- package/dist/esm/index.mjs +22 -15
- package/dist/esm/modules/AccessibilityUtil/index.mjs +5 -3
- package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +2 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +33 -31
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +20 -21
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -1
- package/dist/esm/modules/AssetRegistry/index.mjs +3 -2
- package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -1
- package/dist/esm/modules/ImageLoader/index.mjs +120 -124
- package/dist/esm/modules/ImageLoader/index.mjs.map +1 -1
- package/dist/esm/modules/InteractionManager.mjs +199 -201
- package/dist/esm/modules/InteractionManager.mjs.map +1 -1
- package/dist/esm/modules/Platform/index.mjs +4 -3
- package/dist/esm/modules/Platform/index.mjs.map +1 -1
- package/dist/esm/modules/TextInputState/index.mjs +42 -40
- package/dist/esm/modules/TextInputState/index.mjs.map +1 -1
- package/dist/esm/modules/UIManager/index.mjs +33 -33
- package/dist/esm/modules/UIManager/index.mjs.map +1 -1
- package/dist/esm/modules/canUseDOM.mjs +1 -0
- package/dist/esm/modules/canUseDOM.mjs.map +1 -1
- package/dist/esm/modules/createDOMProps/index.mjs +275 -341
- package/dist/esm/modules/createDOMProps/index.mjs.map +1 -1
- package/dist/esm/modules/createEventHandle/index.mjs +44 -44
- package/dist/esm/modules/createEventHandle/index.mjs.map +1 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs +3 -1
- package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -1
- package/dist/esm/modules/forwardedProps/index.mjs +104 -104
- package/dist/esm/modules/forwardedProps/index.mjs.map +1 -1
- package/dist/esm/modules/getBoundingClientRect/index.mjs +8 -7
- package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -1
- package/dist/esm/modules/invariant.mjs +11 -10
- package/dist/esm/modules/invariant.mjs.map +1 -1
- package/dist/esm/modules/isSelectionValid/index.mjs +8 -7
- package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -1
- package/dist/esm/modules/isWebColor/index.mjs +2 -1
- package/dist/esm/modules/isWebColor/index.mjs.map +1 -1
- package/dist/esm/modules/mergeRefs/index.mjs +17 -16
- package/dist/esm/modules/mergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/modality/index.mjs +115 -115
- package/dist/esm/modules/modality/index.mjs.map +1 -1
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +11 -10
- package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -1
- package/dist/esm/modules/normalizeColor/index.mjs +15 -13
- package/dist/esm/modules/normalizeColor/index.mjs.map +1 -1
- package/dist/esm/modules/pick/index.mjs +10 -9
- package/dist/esm/modules/pick/index.mjs.map +1 -1
- package/dist/esm/modules/processColor/index.mjs +12 -10
- package/dist/esm/modules/processColor/index.mjs.map +1 -1
- package/dist/esm/modules/requestIdleCallback/index.mjs +14 -12
- package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +27 -25
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -1
- package/dist/esm/modules/setValueForStyles/index.mjs +18 -16
- package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -1
- package/dist/esm/modules/unitlessNumbers/index.mjs +60 -57
- package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -1
- package/dist/esm/modules/useElementLayout/index.mjs +12 -14
- package/dist/esm/modules/useElementLayout/index.mjs.map +1 -1
- package/dist/esm/modules/useEvent/index.mjs +28 -26
- package/dist/esm/modules/useEvent/index.mjs.map +1 -1
- package/dist/esm/modules/useHover/index.mjs +101 -101
- package/dist/esm/modules/useHover/index.mjs.map +1 -1
- package/dist/esm/modules/useLayoutEffect/index.mjs +2 -0
- package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/index.mjs +15 -17
- package/dist/esm/modules/useLocale/index.mjs.map +1 -1
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs +52 -58
- package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -1
- package/dist/esm/modules/useMergeRefs/index.mjs +3 -3
- package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -1
- package/dist/esm/modules/usePlatformMethods/index.mjs +11 -12
- package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -1
- package/dist/esm/modules/useStable/index.mjs +8 -6
- package/dist/esm/modules/useStable/index.mjs.map +1 -1
- package/dist/esm/styleTypes.mjs +0 -2
- package/dist/esm/types.mjs +0 -2
- package/package.json +8 -8
- package/src/modules/createDOMProps/index.tsx +3 -12
- package/src/modules/forwardedProps/index.tsx +0 -1
- package/src/modules/mergeRefs/index.tsx +1 -1
- package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
- package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -1
- package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -1
- package/types/StyleSheet/index.d.ts +15 -16
- package/types/StyleSheet/index.d.ts.map +1 -1
- package/types/StyleSheet/preprocess.d.ts +1 -1
- package/types/StyleSheet/preprocess.d.ts.map +1 -1
- package/types/colorProps.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/index.d.ts +6 -5
- package/types/modules/AccessibilityUtil/index.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -1
- package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -1
- package/types/modules/ImageLoader/index.d.ts +1 -1
- package/types/modules/ImageLoader/index.d.ts.map +1 -1
- package/types/modules/InteractionManager.d.ts +3 -3
- package/types/modules/InteractionManager.d.ts.map +1 -1
- package/types/modules/Platform/index.d.ts.map +1 -1
- package/types/modules/TextInputState/index.d.ts.map +1 -1
- package/types/modules/createDOMProps/index.d.ts.map +1 -1
- package/types/modules/forwardedProps/index.d.ts +70 -74
- package/types/modules/forwardedProps/index.d.ts.map +1 -1
- package/types/modules/getBoundingClientRect/index.d.ts.map +1 -1
- package/types/modules/isWebColor/index.d.ts.map +1 -1
- package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -1
- package/types/modules/normalizeColor/index.d.ts.map +1 -1
- package/types/modules/processColor/index.d.ts.map +1 -1
- package/types/modules/requestIdleCallback/index.d.ts +3 -1
- package/types/modules/requestIdleCallback/index.d.ts.map +1 -1
- package/types/modules/unitlessNumbers/index.d.ts.map +1 -1
- package/types/modules/useLayoutEffect/index.d.ts +1 -1
- package/types/modules/useLayoutEffect/index.d.ts.map +1 -1
- package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +0 -265
- package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +0 -419
- package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +0 -160
- package/dist/cjs/StyleSheet/__tests__/index-test.cjs +0 -436
- package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +0 -121
- package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +0 -51
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +0 -57
- package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +0 -46
- package/dist/cjs/modules/Platform/__tests__/index-test.cjs +0 -56
- package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +0 -111
- package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +0 -177
- package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +0 -422
- package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +0 -48
- package/dist/cjs/modules/modality/__tests__/index-test.cjs +0 -59
- package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +0 -38
- package/dist/cjs/modules/processColor/__tests__/index-test.cjs +0 -85
- package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +0 -490
- package/dist/cjs/modules/useHover/__tests__/index-test.cjs +0 -382
- package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +0 -125
- package/dist/cjs/modules/useStable/__tests__/index-test.cjs +0 -122
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +0 -242
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +0 -420
- package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +0 -137
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/index-test.mjs +0 -413
- package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +0 -122
- package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs +0 -52
- package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +0 -1
- package/dist/esm/StyleSheet/compiler/hash.mjs.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +0 -34
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +0 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +0 -23
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +0 -1
- package/dist/esm/modules/Platform/__tests__/index-test.mjs +0 -33
- package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs +0 -88
- package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +0 -154
- package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +0 -399
- package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +0 -25
- package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/modality/__tests__/index-test.mjs +0 -60
- package/dist/esm/modules/modality/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +0 -15
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/processColor/__tests__/index-test.mjs +0 -62
- package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs +0 -467
- package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useHover/__tests__/index-test.mjs +0 -359
- package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +0 -102
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/modules/useStable/__tests__/index-test.mjs +0 -99
- package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +0 -1
- package/dist/esm/styleTypes.mjs.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +0 -236
- package/src/StyleSheet/__tests__/compiler-test.tsx +0 -426
- package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +0 -169
- package/src/StyleSheet/__tests__/index-test.tsx +0 -406
- package/src/StyleSheet/__tests__/preprocess-test.tsx +0 -107
- package/src/StyleSheet/__tests__/validate-test.tsx +0 -42
- package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +0 -44
- package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +0 -25
- package/src/modules/Platform/__tests__/index-test.tsx +0 -45
- package/src/modules/UIManager/__tests__/index-test.tsx +0 -87
- package/src/modules/createDOMProps/__tests__/index-test.tsx +0 -138
- package/src/modules/createEventHandle/__tests__/index-test.tsx +0 -459
- package/src/modules/mergeRefs/__tests__/index-test.tsx +0 -32
- package/src/modules/modality/__tests__/index-test.tsx +0 -66
- package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +0 -23
- package/src/modules/processColor/__tests__/index-test.tsx +0 -78
- package/src/modules/useEvent/__tests__/index-test.tsx +0 -511
- package/src/modules/useHover/__tests__/index-test.tsx +0 -342
- package/src/modules/useMergeRefs/__tests__/index-test.tsx +0 -91
- package/src/modules/useStable/__tests__/index-test.tsx +0 -101
|
@@ -1,89 +1,87 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var dom_exports = {};
|
|
24
|
-
__export(dom_exports, {
|
|
25
|
-
createSheet: () => createSheet
|
|
26
|
-
});
|
|
23
|
+
__export(dom_exports, { createSheet: () => createSheet });
|
|
27
24
|
module.exports = __toCommonJS(dom_exports);
|
|
28
25
|
var import_canUseDOM = require("../../modules/canUseDOM.cjs");
|
|
29
26
|
var import_createCSSStyleSheet = require("./createCSSStyleSheet.cjs");
|
|
30
27
|
var import_createOrderedCSSStyleSheet = require("./createOrderedCSSStyleSheet.cjs");
|
|
31
28
|
const defaultId = "react-native-stylesheet";
|
|
32
|
-
const roots = /* @__PURE__ */new WeakMap();
|
|
29
|
+
const roots = /* @__PURE__ */ new WeakMap();
|
|
33
30
|
const sheets = [];
|
|
34
31
|
const initialRules = [
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"
|
|
32
|
+
"html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}",
|
|
33
|
+
"body{margin:0;}",
|
|
34
|
+
"button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}",
|
|
35
|
+
"input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"
|
|
36
|
+
];
|
|
39
37
|
function createSheet(root, id = defaultId) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
38
|
+
let sheet;
|
|
39
|
+
function createSheet2() {
|
|
40
|
+
if (sheet) return;
|
|
41
|
+
if (import_canUseDOM.canUseDOM) {
|
|
42
|
+
const rootNode = root != null ? root.getRootNode() : document;
|
|
43
|
+
if (sheets.length === 0) {
|
|
44
|
+
sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
|
|
45
|
+
initialRules.forEach((rule) => {
|
|
46
|
+
sheet.insert(rule, 0);
|
|
47
|
+
});
|
|
48
|
+
roots.set(rootNode, sheets.length);
|
|
49
|
+
sheets.push(sheet);
|
|
50
|
+
} else {
|
|
51
|
+
const index = roots.get(rootNode);
|
|
52
|
+
if (index == null) {
|
|
53
|
+
const initialSheet = sheets[0];
|
|
54
|
+
const textContent = initialSheet != null ? initialSheet.getTextContent() : "";
|
|
55
|
+
sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id, rootNode, textContent));
|
|
56
|
+
roots.set(rootNode, sheets.length);
|
|
57
|
+
sheets.push(sheet);
|
|
58
|
+
} else {
|
|
59
|
+
sheet = sheets[index];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
if (sheets.length === 0) {
|
|
64
|
+
sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
|
|
65
|
+
initialRules.forEach((rule) => {
|
|
66
|
+
sheet.insert(rule, 0);
|
|
67
|
+
});
|
|
68
|
+
sheets.push(sheet);
|
|
69
|
+
} else {
|
|
70
|
+
sheet = sheets[0];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
getTextContent() {
|
|
76
|
+
createSheet2();
|
|
77
|
+
return sheet.getTextContent();
|
|
78
|
+
},
|
|
79
|
+
id,
|
|
80
|
+
insert(cssText, groupValue) {
|
|
81
|
+
createSheet2();
|
|
82
|
+
sheets.forEach((s) => {
|
|
83
|
+
s.insert(cssText, groupValue);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -1,58 +1,57 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var StyleSheet_exports = {};
|
|
24
23
|
__export(StyleSheet_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
StyleSheet: () => StyleSheet,
|
|
25
|
+
flatten: () => flatten
|
|
27
26
|
});
|
|
28
27
|
module.exports = __toCommonJS(StyleSheet_exports);
|
|
29
28
|
const absoluteFillObject = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
position: "absolute",
|
|
30
|
+
left: 0,
|
|
31
|
+
right: 0,
|
|
32
|
+
top: 0,
|
|
33
|
+
bottom: 0
|
|
35
34
|
};
|
|
36
35
|
const absoluteFill = absoluteFillObject;
|
|
37
36
|
function create(styles) {
|
|
38
|
-
|
|
37
|
+
return styles;
|
|
39
38
|
}
|
|
40
39
|
function compose(style1, style2) {
|
|
41
|
-
|
|
40
|
+
return flatten(style1, style2);
|
|
42
41
|
}
|
|
43
42
|
function flatten(...styles) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
return styles.flat().flat().flat().flat().reduce((acc, cur) => {
|
|
44
|
+
if (cur) {
|
|
45
|
+
Object.assign(acc, cur);
|
|
46
|
+
}
|
|
47
|
+
return acc;
|
|
48
|
+
}, {});
|
|
50
49
|
}
|
|
51
50
|
function getSheet() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
return {
|
|
52
|
+
id: "",
|
|
53
|
+
textContent: sheet.getTextContent()
|
|
54
|
+
};
|
|
56
55
|
}
|
|
57
56
|
function StyleSheet(styles, options) {}
|
|
58
57
|
StyleSheet.absoluteFill = absoluteFill;
|
|
@@ -61,4 +60,4 @@ StyleSheet.create = create;
|
|
|
61
60
|
StyleSheet.compose = compose;
|
|
62
61
|
StyleSheet.flatten = flatten;
|
|
63
62
|
StyleSheet.getSheet = getSheet;
|
|
64
|
-
StyleSheet.hairlineWidth = 1;
|
|
63
|
+
StyleSheet.hairlineWidth = 1;
|
|
@@ -1,114 +1,94 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var preprocess_exports = {};
|
|
24
23
|
__export(preprocess_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
createBoxShadowValue: () => createBoxShadowValue,
|
|
25
|
+
createTextShadowValue: () => createTextShadowValue,
|
|
26
|
+
preprocess: () => preprocess,
|
|
27
|
+
processStyle: () => processStyle
|
|
29
28
|
});
|
|
30
29
|
module.exports = __toCommonJS(preprocess_exports);
|
|
31
30
|
var import_normalizeColor = require("./compiler/normalizeColor.cjs");
|
|
32
31
|
var import_normalizeValueWithProperty = require("./compiler/normalizeValueWithProperty.cjs");
|
|
33
32
|
const emptyObject = {};
|
|
34
33
|
const defaultOffset = {
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
height: 0,
|
|
35
|
+
width: 0
|
|
37
36
|
};
|
|
38
|
-
const createBoxShadowValue = style => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = shadowOffset || defaultOffset;
|
|
49
|
-
const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
|
|
50
|
-
const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
|
|
51
|
-
const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
|
|
52
|
-
const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
|
|
53
|
-
if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
|
|
54
|
-
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
55
|
-
}
|
|
37
|
+
const createBoxShadowValue = (style) => {
|
|
38
|
+
const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
|
|
39
|
+
const { height, width } = shadowOffset || defaultOffset;
|
|
40
|
+
const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
|
|
41
|
+
const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
|
|
42
|
+
const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
|
|
43
|
+
const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
|
|
44
|
+
if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
|
|
45
|
+
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
46
|
+
}
|
|
56
47
|
};
|
|
57
|
-
const createTextShadowValue = style => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
|
|
69
|
-
const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
|
|
70
|
-
const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(radius);
|
|
71
|
-
const color = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(textShadowColor, "textShadowColor");
|
|
72
|
-
if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
|
|
73
|
-
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
74
|
-
}
|
|
48
|
+
const createTextShadowValue = (style) => {
|
|
49
|
+
const { textShadowColor, textShadowOffset, textShadowRadius } = style;
|
|
50
|
+
const { height, width } = textShadowOffset || defaultOffset;
|
|
51
|
+
const radius = textShadowRadius || 0;
|
|
52
|
+
const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
|
|
53
|
+
const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
|
|
54
|
+
const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(radius);
|
|
55
|
+
const color = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(textShadowColor, "textShadowColor");
|
|
56
|
+
if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
|
|
57
|
+
return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
|
|
58
|
+
}
|
|
75
59
|
};
|
|
76
|
-
const preprocess = originalStyle => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
nextStyle[prop] = value;
|
|
111
|
-
}
|
|
112
|
-
return nextStyle;
|
|
60
|
+
const preprocess = (originalStyle) => {
|
|
61
|
+
const style = originalStyle || emptyObject;
|
|
62
|
+
const nextStyle = {};
|
|
63
|
+
for (const originalProp in style) {
|
|
64
|
+
const originalValue = style[originalProp];
|
|
65
|
+
let prop = originalProp;
|
|
66
|
+
let value = originalValue;
|
|
67
|
+
if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
|
|
71
|
+
const boxShadowValue = createBoxShadowValue(style);
|
|
72
|
+
if (boxShadowValue != null && nextStyle.boxShadow == null) {
|
|
73
|
+
const { boxShadow } = style;
|
|
74
|
+
prop = "boxShadow";
|
|
75
|
+
value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
|
|
76
|
+
} else {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
|
|
81
|
+
const textShadowValue = createTextShadowValue(style);
|
|
82
|
+
if (textShadowValue != null && nextStyle.textShadow == null) {
|
|
83
|
+
const { textShadow } = style;
|
|
84
|
+
prop = "textShadow";
|
|
85
|
+
value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
|
|
86
|
+
} else {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
nextStyle[prop] = value;
|
|
91
|
+
}
|
|
92
|
+
return nextStyle;
|
|
113
93
|
};
|
|
114
|
-
const processStyle = preprocess;
|
|
94
|
+
const processStyle = preprocess;
|
|
@@ -1,92 +1,89 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var validate_exports = {};
|
|
24
|
-
__export(validate_exports, {
|
|
25
|
-
validate: () => validate
|
|
26
|
-
});
|
|
23
|
+
__export(validate_exports, { validate: () => validate });
|
|
27
24
|
module.exports = __toCommonJS(validate_exports);
|
|
28
25
|
const invalidShortforms = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
background: true,
|
|
27
|
+
borderBottom: true,
|
|
28
|
+
borderLeft: true,
|
|
29
|
+
borderRight: true,
|
|
30
|
+
borderTop: true,
|
|
31
|
+
font: true,
|
|
32
|
+
grid: true,
|
|
33
|
+
outline: true,
|
|
34
|
+
textDecoration: true
|
|
38
35
|
};
|
|
39
36
|
const invalidMultiValueShortforms = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
37
|
+
flex: true,
|
|
38
|
+
margin: true,
|
|
39
|
+
padding: true,
|
|
40
|
+
borderColor: true,
|
|
41
|
+
borderRadius: true,
|
|
42
|
+
borderStyle: true,
|
|
43
|
+
borderWidth: true,
|
|
44
|
+
marginHorizontal: true,
|
|
45
|
+
marginVertical: true,
|
|
46
|
+
paddingHorizontal: true,
|
|
47
|
+
paddingVertical: true,
|
|
48
|
+
overflow: true,
|
|
49
|
+
overscrollBehavior: true,
|
|
50
|
+
backgroundPosition: true
|
|
54
51
|
};
|
|
55
52
|
function error(message) {
|
|
56
|
-
|
|
53
|
+
console.error(message);
|
|
57
54
|
}
|
|
58
55
|
function validate(obj) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
56
|
+
for (const k in obj) {
|
|
57
|
+
const prop = k.trim();
|
|
58
|
+
const value = obj[prop];
|
|
59
|
+
let isInvalid = false;
|
|
60
|
+
if (value === null) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (typeof value === "string" && value.indexOf("!important") > -1) {
|
|
64
|
+
error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
|
|
65
|
+
isInvalid = true;
|
|
66
|
+
} else {
|
|
67
|
+
let suggestion = "";
|
|
68
|
+
if (prop === "animation" || prop === "animationName") {
|
|
69
|
+
suggestion = "Did you mean \"animationKeyframes\"?";
|
|
70
|
+
isInvalid = true;
|
|
71
|
+
} else if (prop === "direction") {
|
|
72
|
+
suggestion = "Did you mean \"writingDirection\"?";
|
|
73
|
+
isInvalid = true;
|
|
74
|
+
} else if (prop === "verticalAlign") {
|
|
75
|
+
suggestion = "Did you mean \"textAlignVertical\"?";
|
|
76
|
+
isInvalid = true;
|
|
77
|
+
} else if (invalidShortforms[prop]) {
|
|
78
|
+
suggestion = "Please use long-form properties.";
|
|
79
|
+
isInvalid = true;
|
|
80
|
+
} else if (invalidMultiValueShortforms[prop]) {}
|
|
81
|
+
if (suggestion !== "") {
|
|
82
|
+
error(`Invalid style property of "${prop}". ${suggestion}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (isInvalid) {
|
|
86
|
+
delete obj[k];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var TextAncestorContext_exports = {};
|
|
24
|
-
__export(TextAncestorContext_exports, {
|
|
25
|
-
TextAncestorContext: () => TextAncestorContext
|
|
26
|
-
});
|
|
23
|
+
__export(TextAncestorContext_exports, { TextAncestorContext: () => TextAncestorContext });
|
|
27
24
|
module.exports = __toCommonJS(TextAncestorContext_exports);
|
|
28
25
|
var import_react = require("react");
|
|
29
|
-
const TextAncestorContext = (0, import_react.createContext)(false);
|
|
26
|
+
const TextAncestorContext = (0, import_react.createContext)(false);
|