@tamagui/react-native-web-internals 1.132.21 → 1.132.22
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/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.native.js +73 -43
- package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/__tests__/compiler-test.native.js +174 -166
- package/dist/esm/StyleSheet/__tests__/compiler-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.native.js +18 -20
- package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/__tests__/index-test.native.js +203 -149
- package/dist/esm/StyleSheet/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/__tests__/preprocess-test.native.js +16 -16
- package/dist/esm/StyleSheet/__tests__/preprocess-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/__tests__/validate-test.native.js +11 -10
- package/dist/esm/StyleSheet/__tests__/validate-test.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.native.js +114 -63
- package/dist/esm/StyleSheet/compiler/createReactDOMStyle.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/hash.native.js +4 -2
- package/dist/esm/StyleSheet/compiler/hash.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.native.js +7 -6
- package/dist/esm/StyleSheet/compiler/hyphenateStyleName.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/index.native.js +221 -220
- package/dist/esm/StyleSheet/compiler/index.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/normalizeColor.native.js +15 -17
- package/dist/esm/StyleSheet/compiler/normalizeColor.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.native.js +6 -4
- package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.native.js.map +6 -1
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.native.js +13 -25
- package/dist/esm/StyleSheet/compiler/resolveShadowValue.native.js.map +6 -1
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.native.js +15 -10
- package/dist/esm/StyleSheet/dom/createCSSStyleSheet.native.js.map +6 -1
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.native.js +22 -22
- package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.native.js.map +6 -1
- package/dist/esm/StyleSheet/dom/index.native.js +34 -29
- package/dist/esm/StyleSheet/dom/index.native.js.map +6 -1
- package/dist/esm/StyleSheet/index.native.js +16 -12
- package/dist/esm/StyleSheet/index.native.js.map +6 -1
- package/dist/esm/StyleSheet/preprocess.native.js +44 -73
- package/dist/esm/StyleSheet/preprocess.native.js.map +6 -1
- package/dist/esm/StyleSheet/validate.native.js +33 -32
- package/dist/esm/StyleSheet/validate.native.js.map +6 -1
- package/dist/esm/TextAncestorContext.native.js +6 -4
- package/dist/esm/TextAncestorContext.native.js.map +6 -1
- package/dist/esm/colorProps.native.js +4 -2
- package/dist/esm/colorProps.native.js.map +6 -1
- package/dist/esm/index.native.js +78 -43
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.native.js +9 -9
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.native.js +6 -6
- package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/index.native.js +12 -10
- package/dist/esm/modules/AccessibilityUtil/index.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/isDisabled.native.js +7 -6
- package/dist/esm/modules/AccessibilityUtil/isDisabled.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.native.js +34 -34
- package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.native.js.map +6 -1
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.native.js +24 -25
- package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.native.js.map +6 -1
- package/dist/esm/modules/AssetRegistry/index.native.js +5 -2
- package/dist/esm/modules/AssetRegistry/index.native.js.map +6 -1
- package/dist/esm/modules/ImageLoader/index.native.js +75 -79
- package/dist/esm/modules/ImageLoader/index.native.js.map +6 -1
- package/dist/esm/modules/InteractionManager.native.js +133 -135
- package/dist/esm/modules/InteractionManager.native.js.map +6 -1
- package/dist/esm/modules/Platform/__tests__/index-test.native.js +9 -9
- package/dist/esm/modules/Platform/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/Platform/index.native.js +9 -8
- package/dist/esm/modules/Platform/index.native.js.map +6 -1
- package/dist/esm/modules/TextInputState/index.native.js +31 -30
- package/dist/esm/modules/TextInputState/index.native.js.map +6 -1
- package/dist/esm/modules/UIManager/__tests__/index-test.native.js +49 -51
- package/dist/esm/modules/UIManager/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/UIManager/index.native.js +39 -36
- package/dist/esm/modules/UIManager/index.native.js.map +6 -1
- package/dist/esm/modules/canUseDOM.native.js +6 -4
- package/dist/esm/modules/canUseDOM.native.js.map +6 -1
- package/dist/esm/modules/createDOMProps/__tests__/index-test.native.js +45 -51
- package/dist/esm/modules/createDOMProps/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/createDOMProps/index.native.js +92 -96
- package/dist/esm/modules/createDOMProps/index.native.js.map +6 -1
- package/dist/esm/modules/createEventHandle/__tests__/index-test.native.js +189 -189
- package/dist/esm/modules/createEventHandle/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/createEventHandle/index.native.js +24 -17
- package/dist/esm/modules/createEventHandle/index.native.js.map +6 -1
- package/dist/esm/modules/dismissKeyboard/index.native.js +8 -7
- package/dist/esm/modules/dismissKeyboard/index.native.js.map +6 -1
- package/dist/esm/modules/forwardedProps/index.native.js +128 -126
- package/dist/esm/modules/forwardedProps/index.native.js.map +6 -1
- package/dist/esm/modules/getBoundingClientRect/index.native.js +11 -9
- package/dist/esm/modules/getBoundingClientRect/index.native.js.map +6 -1
- package/dist/esm/modules/invariant.native.js +22 -12
- package/dist/esm/modules/invariant.native.js.map +6 -1
- package/dist/esm/modules/isSelectionValid/index.native.js +5 -6
- package/dist/esm/modules/isSelectionValid/index.native.js.map +6 -1
- package/dist/esm/modules/isWebColor/index.native.js +7 -6
- package/dist/esm/modules/isWebColor/index.native.js.map +6 -1
- package/dist/esm/modules/mergeRefs/__tests__/index-test.native.js +7 -9
- package/dist/esm/modules/mergeRefs/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/mergeRefs/index.native.js +8 -5
- package/dist/esm/modules/mergeRefs/index.native.js.map +6 -1
- package/dist/esm/modules/modality/__tests__/index-test.native.js +8 -8
- package/dist/esm/modules/modality/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/modality/index.native.js +19 -55
- package/dist/esm/modules/modality/index.native.js.map +6 -1
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.native.js +4 -4
- package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/multiplyStyleLengthValue/index.native.js +15 -17
- package/dist/esm/modules/multiplyStyleLengthValue/index.native.js.map +6 -1
- package/dist/esm/modules/normalizeColor/index.native.js +17 -19
- package/dist/esm/modules/normalizeColor/index.native.js.map +6 -1
- package/dist/esm/modules/pick/index.native.js +6 -3
- package/dist/esm/modules/pick/index.native.js.map +6 -1
- package/dist/esm/modules/processColor/__tests__/index-test.native.js +27 -36
- package/dist/esm/modules/processColor/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/processColor/index.native.js +9 -5
- package/dist/esm/modules/processColor/index.native.js.map +6 -1
- package/dist/esm/modules/requestIdleCallback/index.native.js +19 -21
- package/dist/esm/modules/requestIdleCallback/index.native.js.map +6 -1
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.native.js +5 -3
- package/dist/esm/modules/setValueForStyles/dangerousStyleValue.native.js.map +6 -1
- package/dist/esm/modules/setValueForStyles/index.native.js +10 -8
- package/dist/esm/modules/setValueForStyles/index.native.js.map +6 -1
- package/dist/esm/modules/unitlessNumbers/index.native.js +66 -60
- package/dist/esm/modules/unitlessNumbers/index.native.js.map +6 -1
- package/dist/esm/modules/useElementLayout/index.native.js +9 -5
- package/dist/esm/modules/useElementLayout/index.native.js.map +6 -1
- package/dist/esm/modules/useEvent/__tests__/index-test.native.js +214 -210
- package/dist/esm/modules/useEvent/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/useEvent/index.native.js +24 -21
- package/dist/esm/modules/useEvent/index.native.js.map +6 -1
- package/dist/esm/modules/useHover/__tests__/index-test.native.js +134 -161
- package/dist/esm/modules/useHover/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/useHover/index.native.js +51 -65
- package/dist/esm/modules/useHover/index.native.js.map +6 -1
- package/dist/esm/modules/useLayoutEffect/index.native.js +6 -5
- package/dist/esm/modules/useLayoutEffect/index.native.js.map +6 -1
- package/dist/esm/modules/useLocale/index.native.js +12 -14
- package/dist/esm/modules/useLocale/index.native.js.map +6 -1
- package/dist/esm/modules/useLocale/isLocaleRTL.native.js +25 -9
- package/dist/esm/modules/useLocale/isLocaleRTL.native.js.map +6 -1
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.native.js +54 -54
- package/dist/esm/modules/useMergeRefs/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/useMergeRefs/index.native.js +16 -9
- package/dist/esm/modules/useMergeRefs/index.native.js.map +6 -1
- package/dist/esm/modules/usePlatformMethods/index.native.js +11 -12
- package/dist/esm/modules/usePlatformMethods/index.native.js.map +6 -1
- package/dist/esm/modules/useStable/__tests__/index-test.native.js +36 -45
- package/dist/esm/modules/useStable/__tests__/index-test.native.js.map +6 -1
- package/dist/esm/modules/useStable/index.native.js +4 -2
- package/dist/esm/modules/useStable/index.native.js.map +6 -1
- package/dist/esm/styleTypes.native.js +1 -2
- package/dist/esm/styleTypes.native.js.map +6 -1
- package/dist/esm/types.native.js +1 -2
- package/dist/esm/types.native.js.map +6 -1
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import StyleSheet from "../index
|
|
2
|
-
describe("StyleSheet", function
|
|
3
|
-
test("getSheet", function
|
|
1
|
+
import StyleSheet from "../index";
|
|
2
|
+
describe("StyleSheet", function() {
|
|
3
|
+
test("getSheet", function() {
|
|
4
4
|
expect(StyleSheet.getSheet()).toMatchInlineSnapshot(`
|
|
5
5
|
{
|
|
6
6
|
"id": "react-native-stylesheet",
|
|
@@ -17,7 +17,7 @@ describe("StyleSheet", function () {
|
|
|
17
17
|
.r-top-ipm5af{top:0px;}",
|
|
18
18
|
}
|
|
19
19
|
`);
|
|
20
|
-
}), test("absoluteFill", function
|
|
20
|
+
}), test("absoluteFill", function() {
|
|
21
21
|
expect(StyleSheet.absoluteFill).toMatchInlineSnapshot(`
|
|
22
22
|
{
|
|
23
23
|
"bottom": 0,
|
|
@@ -27,7 +27,7 @@ describe("StyleSheet", function () {
|
|
|
27
27
|
"top": 0,
|
|
28
28
|
}
|
|
29
29
|
`);
|
|
30
|
-
}), test("absoluteFillObject", function
|
|
30
|
+
}), test("absoluteFillObject", function() {
|
|
31
31
|
expect(StyleSheet.absoluteFillObject).toMatchInlineSnapshot(`
|
|
32
32
|
{
|
|
33
33
|
"bottom": 0,
|
|
@@ -37,10 +37,13 @@ describe("StyleSheet", function () {
|
|
|
37
37
|
"top": 0,
|
|
38
38
|
}
|
|
39
39
|
`);
|
|
40
|
-
}), test("compose", function
|
|
41
|
-
expect(StyleSheet.compose(1, 2)).toEqual([
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
}), test("compose", function() {
|
|
41
|
+
expect(StyleSheet.compose(1, 2)).toEqual([
|
|
42
|
+
1,
|
|
43
|
+
2
|
|
44
|
+
]), expect(StyleSheet.compose(1, null)).toBe(1), expect(StyleSheet.compose(null, 2)).toBe(2);
|
|
45
|
+
}), describe("create", function() {
|
|
46
|
+
test("returns original style objects", function() {
|
|
44
47
|
var style = StyleSheet.create({
|
|
45
48
|
root: {
|
|
46
49
|
position: "absolute"
|
|
@@ -51,7 +54,7 @@ describe("StyleSheet", function () {
|
|
|
51
54
|
"position": "absolute",
|
|
52
55
|
}
|
|
53
56
|
`);
|
|
54
|
-
}), test("e2e resolves to classname", function
|
|
57
|
+
}), test("e2e resolves to classname", function() {
|
|
55
58
|
var style = StyleSheet.create({
|
|
56
59
|
root: {
|
|
57
60
|
position: "absolute"
|
|
@@ -63,7 +66,7 @@ describe("StyleSheet", function () {
|
|
|
63
66
|
null,
|
|
64
67
|
]
|
|
65
68
|
`);
|
|
66
|
-
}), test("e2e flattens shadow style properties", function
|
|
69
|
+
}), test("e2e flattens shadow style properties", function() {
|
|
67
70
|
var style = StyleSheet.create({
|
|
68
71
|
root: {
|
|
69
72
|
shadowColor: "rgba(50,60,70,0.5)",
|
|
@@ -88,56 +91,77 @@ describe("StyleSheet", function () {
|
|
|
88
91
|
]
|
|
89
92
|
`);
|
|
90
93
|
});
|
|
91
|
-
}), describe("flatten", function
|
|
92
|
-
test("should merge style objects", function
|
|
93
|
-
var style = StyleSheet.flatten([
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
}), describe("flatten", function() {
|
|
95
|
+
test("should merge style objects", function() {
|
|
96
|
+
var style = StyleSheet.flatten([
|
|
97
|
+
{
|
|
98
|
+
opacity: 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
order: 2
|
|
102
|
+
}
|
|
103
|
+
]);
|
|
98
104
|
expect(style).toMatchInlineSnapshot(`
|
|
99
105
|
{
|
|
100
106
|
"opacity": 1,
|
|
101
107
|
"order": 2,
|
|
102
108
|
}
|
|
103
109
|
`);
|
|
104
|
-
}), test("should override style properties", function
|
|
105
|
-
var style = StyleSheet.flatten([
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
}), test("should override style properties", function() {
|
|
111
|
+
var style = StyleSheet.flatten([
|
|
112
|
+
{
|
|
113
|
+
backgroundColor: "#000",
|
|
114
|
+
order: 1
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
backgroundColor: "#023c69",
|
|
118
|
+
order: null
|
|
119
|
+
}
|
|
120
|
+
]);
|
|
112
121
|
expect(style).toMatchInlineSnapshot(`
|
|
113
122
|
{
|
|
114
123
|
"backgroundColor": "#023c69",
|
|
115
124
|
"order": null,
|
|
116
125
|
}
|
|
117
126
|
`);
|
|
118
|
-
}), test("should overwrite properties with `undefined`", function
|
|
119
|
-
var style = StyleSheet.flatten([
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
127
|
+
}), test("should overwrite properties with `undefined`", function() {
|
|
128
|
+
var style = StyleSheet.flatten([
|
|
129
|
+
{
|
|
130
|
+
backgroundColor: "#000"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
backgroundColor: void 0
|
|
134
|
+
}
|
|
135
|
+
]);
|
|
124
136
|
expect(style).toMatchInlineSnapshot(`
|
|
125
137
|
{
|
|
126
138
|
"backgroundColor": undefined,
|
|
127
139
|
}
|
|
128
140
|
`);
|
|
129
|
-
}), test("should not fail on falsy values", function
|
|
130
|
-
expect(function
|
|
131
|
-
return StyleSheet.flatten([
|
|
141
|
+
}), test("should not fail on falsy values", function() {
|
|
142
|
+
expect(function() {
|
|
143
|
+
return StyleSheet.flatten([
|
|
144
|
+
null,
|
|
145
|
+
!1,
|
|
146
|
+
void 0
|
|
147
|
+
]);
|
|
132
148
|
}).not.toThrow();
|
|
133
|
-
}), test("should recursively flatten arrays", function
|
|
134
|
-
var style = StyleSheet.flatten([
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
}), test("should recursively flatten arrays", function() {
|
|
150
|
+
var style = StyleSheet.flatten([
|
|
151
|
+
null,
|
|
152
|
+
[],
|
|
153
|
+
[
|
|
154
|
+
{
|
|
155
|
+
order: 2
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
opacity: 1
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
{
|
|
162
|
+
order: 3
|
|
163
|
+
}
|
|
164
|
+
]);
|
|
141
165
|
expect(style).toMatchInlineSnapshot(`
|
|
142
166
|
{
|
|
143
167
|
"opacity": 1,
|
|
@@ -145,10 +169,10 @@ describe("StyleSheet", function () {
|
|
|
145
169
|
}
|
|
146
170
|
`);
|
|
147
171
|
});
|
|
148
|
-
}), test("hairlineWidth", function
|
|
172
|
+
}), test("hairlineWidth", function() {
|
|
149
173
|
expect(Number.isInteger(StyleSheet.hairlineWidth) === !0).toBeTruthy();
|
|
150
|
-
}), describe("resolve", function
|
|
151
|
-
test("empty", function
|
|
174
|
+
}), describe("resolve", function() {
|
|
175
|
+
test("empty", function() {
|
|
152
176
|
expect(StyleSheet()).toMatchInlineSnapshot(`
|
|
153
177
|
[
|
|
154
178
|
"",
|
|
@@ -165,70 +189,85 @@ describe("StyleSheet", function () {
|
|
|
165
189
|
null,
|
|
166
190
|
]
|
|
167
191
|
`);
|
|
168
|
-
}), test("transforms compiled object to className", function
|
|
169
|
-
expect(StyleSheet([
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
192
|
+
}), test("transforms compiled object to className", function() {
|
|
193
|
+
expect(StyleSheet([
|
|
194
|
+
{
|
|
195
|
+
$$css: !0,
|
|
196
|
+
position: "position-absolute",
|
|
197
|
+
opacity: "opacity-05",
|
|
198
|
+
width: "width-200"
|
|
199
|
+
}
|
|
200
|
+
])).toMatchInlineSnapshot(`
|
|
175
201
|
[
|
|
176
202
|
"position-absolute opacity-05 width-200",
|
|
177
203
|
null,
|
|
178
204
|
]
|
|
179
205
|
`);
|
|
180
|
-
}), test("transforms array of compiled objects to className", function
|
|
181
|
-
expect(StyleSheet([
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
}), test("transforms array of compiled objects to className", function() {
|
|
207
|
+
expect(StyleSheet([
|
|
208
|
+
{
|
|
209
|
+
$$css: !0,
|
|
210
|
+
borderWidth: "borderWidth-0",
|
|
211
|
+
borderColor: "borderColor-red",
|
|
212
|
+
display: "display-flex",
|
|
213
|
+
width: "width-100"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
$$css: !0,
|
|
217
|
+
position: "position-absolute",
|
|
218
|
+
opacity: "opacity-05"
|
|
219
|
+
},
|
|
220
|
+
[
|
|
221
|
+
{
|
|
222
|
+
$$css: !0,
|
|
223
|
+
width: "width-200"
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
])).toMatchInlineSnapshot(`
|
|
195
227
|
[
|
|
196
228
|
"borderWidth-0 borderColor-red display-flex position-absolute opacity-05 width-200",
|
|
197
229
|
null,
|
|
198
230
|
]
|
|
199
231
|
`);
|
|
200
|
-
}), test("dedupes class names and inline styles", function
|
|
232
|
+
}), test("dedupes class names and inline styles", function() {
|
|
201
233
|
var styleACompiled = {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
234
|
+
$$css: !0,
|
|
235
|
+
backgroundColor: "backgroundColor-red",
|
|
236
|
+
display: "display-block"
|
|
237
|
+
}, styleBCompiled = {
|
|
238
|
+
$$css: !0,
|
|
239
|
+
backgroundColor: "backgroundColor-green",
|
|
240
|
+
color: "color-green"
|
|
241
|
+
}, styleBInline = {
|
|
242
|
+
backgroundColor: "rgba(0,0,255,1.00)",
|
|
243
|
+
color: null
|
|
244
|
+
}, [className1, inlineStyle1] = StyleSheet([
|
|
245
|
+
styleACompiled,
|
|
246
|
+
styleBCompiled,
|
|
247
|
+
styleBInline
|
|
248
|
+
]);
|
|
216
249
|
expect(className1).toBe("display-block"), expect(inlineStyle1).toEqual({
|
|
217
250
|
backgroundColor: "rgba(0,0,255,1.00)"
|
|
218
251
|
});
|
|
219
|
-
var [className2, inlineStyle2] = StyleSheet([
|
|
252
|
+
var [className2, inlineStyle2] = StyleSheet([
|
|
253
|
+
styleACompiled,
|
|
254
|
+
styleBInline,
|
|
255
|
+
styleBCompiled
|
|
256
|
+
]);
|
|
220
257
|
expect(className2).toBe("display-block backgroundColor-green color-green"), expect(inlineStyle2).toEqual(null);
|
|
221
|
-
}), test("long form inline style properties take precedence over static shorthand properties", function
|
|
258
|
+
}), test("long form inline style properties take precedence over static shorthand properties", function() {
|
|
222
259
|
var styles1 = StyleSheet.create({
|
|
223
|
-
|
|
224
|
-
paddingHorizontal: "40px"
|
|
225
|
-
}
|
|
226
|
-
}),
|
|
227
|
-
inlineStyle1 = {
|
|
228
|
-
padding: "8px",
|
|
260
|
+
test: {
|
|
229
261
|
paddingHorizontal: "40px"
|
|
230
|
-
}
|
|
231
|
-
|
|
262
|
+
}
|
|
263
|
+
}), inlineStyle1 = {
|
|
264
|
+
padding: "8px",
|
|
265
|
+
paddingHorizontal: "40px"
|
|
266
|
+
};
|
|
267
|
+
expect(StyleSheet([
|
|
268
|
+
styles1.test,
|
|
269
|
+
inlineStyle1
|
|
270
|
+
])).toMatchInlineSnapshot(`
|
|
232
271
|
[
|
|
233
272
|
"",
|
|
234
273
|
{
|
|
@@ -240,15 +279,17 @@ describe("StyleSheet", function () {
|
|
|
240
279
|
]
|
|
241
280
|
`);
|
|
242
281
|
var styles2 = StyleSheet.create({
|
|
243
|
-
|
|
244
|
-
marginVertical: "40px"
|
|
245
|
-
}
|
|
246
|
-
}),
|
|
247
|
-
inlineStyle2 = {
|
|
248
|
-
margin: "8px",
|
|
282
|
+
test: {
|
|
249
283
|
marginVertical: "40px"
|
|
250
|
-
}
|
|
251
|
-
|
|
284
|
+
}
|
|
285
|
+
}), inlineStyle2 = {
|
|
286
|
+
margin: "8px",
|
|
287
|
+
marginVertical: "40px"
|
|
288
|
+
};
|
|
289
|
+
expect(StyleSheet([
|
|
290
|
+
styles2.test,
|
|
291
|
+
inlineStyle2
|
|
292
|
+
])).toMatchInlineSnapshot(`
|
|
252
293
|
[
|
|
253
294
|
"",
|
|
254
295
|
{
|
|
@@ -259,33 +300,30 @@ describe("StyleSheet", function () {
|
|
|
259
300
|
},
|
|
260
301
|
]
|
|
261
302
|
`);
|
|
262
|
-
}), test("polyfills logical styles", function
|
|
303
|
+
}), test("polyfills logical styles", function() {
|
|
263
304
|
var inlineA = {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}).x,
|
|
287
|
-
writingDirection = "rtl",
|
|
288
|
-
inlineStyle = [inlineA, inlineB, inlineC];
|
|
305
|
+
start: "12.34%"
|
|
306
|
+
}, inlineB = {
|
|
307
|
+
textAlign: "start"
|
|
308
|
+
}, inlineC = {
|
|
309
|
+
marginEnd: 10
|
|
310
|
+
}, a = StyleSheet.create({
|
|
311
|
+
x: {
|
|
312
|
+
...inlineA
|
|
313
|
+
}
|
|
314
|
+
}).x, b = StyleSheet.create({
|
|
315
|
+
x: {
|
|
316
|
+
...inlineB
|
|
317
|
+
}
|
|
318
|
+
}).x, c = StyleSheet.create({
|
|
319
|
+
x: {
|
|
320
|
+
...inlineC
|
|
321
|
+
}
|
|
322
|
+
}).x, writingDirection = "rtl", inlineStyle = [
|
|
323
|
+
inlineA,
|
|
324
|
+
inlineB,
|
|
325
|
+
inlineC
|
|
326
|
+
];
|
|
289
327
|
expect(StyleSheet(inlineStyle)).toMatchInlineSnapshot(`
|
|
290
328
|
[
|
|
291
329
|
"",
|
|
@@ -306,12 +344,15 @@ describe("StyleSheet", function () {
|
|
|
306
344
|
"textAlign": "right",
|
|
307
345
|
},
|
|
308
346
|
]
|
|
309
|
-
`), expect(StyleSheet([
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
347
|
+
`), expect(StyleSheet([
|
|
348
|
+
inlineStyle,
|
|
349
|
+
{
|
|
350
|
+
marginLeft: 1,
|
|
351
|
+
marginEnd: 0,
|
|
352
|
+
marginStart: 0,
|
|
353
|
+
marginRight: 11
|
|
354
|
+
}
|
|
355
|
+
], {
|
|
315
356
|
writingDirection
|
|
316
357
|
})).toMatchInlineSnapshot(`
|
|
317
358
|
[
|
|
@@ -323,10 +364,13 @@ describe("StyleSheet", function () {
|
|
|
323
364
|
"textAlign": "right",
|
|
324
365
|
},
|
|
325
366
|
]
|
|
326
|
-
`), expect(StyleSheet([
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
367
|
+
`), expect(StyleSheet([
|
|
368
|
+
inlineStyle,
|
|
369
|
+
{
|
|
370
|
+
marginEnd: null,
|
|
371
|
+
marginLeft: 11
|
|
372
|
+
}
|
|
373
|
+
], {
|
|
330
374
|
writingDirection
|
|
331
375
|
})).toMatchInlineSnapshot(`
|
|
332
376
|
[
|
|
@@ -338,7 +382,11 @@ describe("StyleSheet", function () {
|
|
|
338
382
|
},
|
|
339
383
|
]
|
|
340
384
|
`);
|
|
341
|
-
var staticStyle = [
|
|
385
|
+
var staticStyle = [
|
|
386
|
+
a,
|
|
387
|
+
b,
|
|
388
|
+
c
|
|
389
|
+
];
|
|
342
390
|
expect(StyleSheet(staticStyle)).toMatchInlineSnapshot(`
|
|
343
391
|
[
|
|
344
392
|
"r-left-2s0hu9 r-textAlign-fdjqy7 r-marginRight-zso239",
|
|
@@ -351,12 +399,15 @@ describe("StyleSheet", function () {
|
|
|
351
399
|
"r-right-1bnbe1j r-textAlign-1ff274t r-marginLeft-1n0xq6e",
|
|
352
400
|
null,
|
|
353
401
|
]
|
|
354
|
-
`), expect(StyleSheet([
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
402
|
+
`), expect(StyleSheet([
|
|
403
|
+
staticStyle,
|
|
404
|
+
{
|
|
405
|
+
marginLeft: 1,
|
|
406
|
+
marginEnd: 0,
|
|
407
|
+
marginStart: 0,
|
|
408
|
+
marginRight: 11
|
|
409
|
+
}
|
|
410
|
+
], {
|
|
360
411
|
writingDirection
|
|
361
412
|
})).toMatchInlineSnapshot(`
|
|
362
413
|
[
|
|
@@ -366,10 +417,13 @@ describe("StyleSheet", function () {
|
|
|
366
417
|
"marginRight": "0px",
|
|
367
418
|
},
|
|
368
419
|
]
|
|
369
|
-
`), expect(StyleSheet([
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
420
|
+
`), expect(StyleSheet([
|
|
421
|
+
staticStyle,
|
|
422
|
+
{
|
|
423
|
+
marginEnd: null,
|
|
424
|
+
marginLeft: 11
|
|
425
|
+
}
|
|
426
|
+
], {
|
|
373
427
|
writingDirection
|
|
374
428
|
})).toMatchInlineSnapshot(`
|
|
375
429
|
[
|
|
@@ -382,4 +436,4 @@ describe("StyleSheet", function () {
|
|
|
382
436
|
});
|
|
383
437
|
});
|
|
384
438
|
});
|
|
385
|
-
//# sourceMappingURL=index-test.
|
|
439
|
+
//# sourceMappingURL=index-test.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3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AAA,CAAA,EAErB1D,sBAAsB;;;;;;;;;;OAUvB,GACDF,OACEH,WAAW;QAACgE;QAAa;UAAEN,WAAW;UAAMO,YAAY;QAAG;SAAI;QAC7DF;MACF,CAAA,CAAA,EACA1D,sBAAsB;;;;;;;;;OASvB;AAGD,UAAM+D,cAAc;QAACT;QAAGE;QAAGC;;AAC3B3D,aAAOH,WAAWoE,WAAAA,CAAAA,EAAc/D,sBAAsB;;;;;OAKrD,GACDF,OAAOH,WAAWoE,aAAa;QAAEL;MAAiB,CAAA,CAAA,EAAI1D,sBAAsB;;;;;OAK3E,GAEDF,OACEH,WACE;QAACoE;QAAa;UAAEH,YAAY;UAAGP,WAAW;UAAGQ,aAAa;UAAGC,aAAa;QAAG;SAC7E;QACEJ;MACF,CAAA,CAAA,EAEF1D,sBAAsB;;;;;;;;OAQvB,GAEDF,OACEH,WAAW;QAACoE;QAAa;UAAEV,WAAW;UAAMO,YAAY;QAAG;SAAI;QAC7DF;MACF,CAAA,CAAA,EACA1D,sBAAsB;;;;;;;OAOvB;IACH,CAAA;EACF,CAAA;AACF,CAAA;",
|
|
5
|
+
"names": ["StyleSheet", "describe", "test", "expect", "getSheet", "toMatchInlineSnapshot", "absoluteFill", "absoluteFillObject", "compose", "toEqual", "toBe", "style", "create", "root", "position", "shadowColor", "shadowOffset", "width", "height", "shadowOpacity", "shadowRadius", "textShadowColor", "textShadowOffset", "textShadowRadius", "flatten", "opacity", "order", "backgroundColor", "undefined", "not", "toThrow", "Number", "isInteger", "hairlineWidth", "toBeTruthy", "$$css", "borderWidth", "borderColor", "display", "styleACompiled", "styleBCompiled", "color", "styleBInline", "className1", "inlineStyle1", "className2", "inlineStyle2", "styles1", "paddingHorizontal", "padding", "styles2", "marginVertical", "margin", "inlineA", "start", "inlineB", "textAlign", "inlineC", "marginEnd", "a", "x", "b", "c", "writingDirection", "inlineStyle", "marginLeft", "marginStart", "marginRight", "staticStyle"]
|
|
6
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { preprocess } from "../preprocess
|
|
2
|
-
describe("StyleSheet/preprocess", function
|
|
3
|
-
describe("preprocesses multiple shadow styles into a single declaration", function
|
|
4
|
-
test("shadowColor only", function
|
|
1
|
+
import { preprocess } from "../preprocess";
|
|
2
|
+
describe("StyleSheet/preprocess", function() {
|
|
3
|
+
describe("preprocesses multiple shadow styles into a single declaration", function() {
|
|
4
|
+
test("shadowColor only", function() {
|
|
5
5
|
expect(preprocess({
|
|
6
6
|
shadowColor: "red"
|
|
7
7
|
})).toEqual({
|
|
8
8
|
boxShadow: "0px 0px 0px rgba(255,0,0,1.00)"
|
|
9
9
|
});
|
|
10
|
-
}), test("shadowColor and shadowOpacity only", function
|
|
10
|
+
}), test("shadowColor and shadowOpacity only", function() {
|
|
11
11
|
expect(preprocess({
|
|
12
12
|
shadowColor: "red",
|
|
13
13
|
shadowOpacity: 0.5
|
|
14
14
|
})).toEqual({
|
|
15
15
|
boxShadow: "0px 0px 0px rgba(255,0,0,0.50)"
|
|
16
16
|
});
|
|
17
|
-
}), test("shadowOffset only", function
|
|
17
|
+
}), test("shadowOffset only", function() {
|
|
18
18
|
expect(preprocess({
|
|
19
19
|
shadowOffset: {
|
|
20
20
|
width: 1,
|
|
@@ -23,13 +23,13 @@ describe("StyleSheet/preprocess", function () {
|
|
|
23
23
|
})).toEqual({
|
|
24
24
|
boxShadow: "1px 2px 0px rgba(0,0,0,1.00)"
|
|
25
25
|
});
|
|
26
|
-
}), test("shadowRadius only", function
|
|
26
|
+
}), test("shadowRadius only", function() {
|
|
27
27
|
expect(preprocess({
|
|
28
28
|
shadowRadius: 5
|
|
29
29
|
})).toEqual({
|
|
30
30
|
boxShadow: "0px 0px 5px rgba(0,0,0,1.00)"
|
|
31
31
|
});
|
|
32
|
-
}), test("shadowOffset, shadowRadius, shadowColor", function
|
|
32
|
+
}), test("shadowOffset, shadowRadius, shadowColor", function() {
|
|
33
33
|
expect(preprocess({
|
|
34
34
|
shadowColor: "rgba(50,60,70,0.5)",
|
|
35
35
|
shadowOffset: {
|
|
@@ -42,23 +42,23 @@ describe("StyleSheet/preprocess", function () {
|
|
|
42
42
|
boxShadow: "1px 2px 3px rgba(50,60,70,0.25)"
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
|
-
}), describe("preprocesses multiple textShadow styles into a single declaration", function
|
|
46
|
-
test("textShadowColor only", function
|
|
45
|
+
}), describe("preprocesses multiple textShadow styles into a single declaration", function() {
|
|
46
|
+
test("textShadowColor only", function() {
|
|
47
47
|
expect(preprocess({
|
|
48
48
|
textShadowColor: "red"
|
|
49
49
|
})).toEqual({});
|
|
50
|
-
}), test("textShadowOffset only", function
|
|
50
|
+
}), test("textShadowOffset only", function() {
|
|
51
51
|
expect(preprocess({
|
|
52
52
|
textShadowOffset: {
|
|
53
53
|
width: 1,
|
|
54
54
|
height: 2
|
|
55
55
|
}
|
|
56
56
|
})).toEqual({});
|
|
57
|
-
}), test("textShadowRadius only", function
|
|
57
|
+
}), test("textShadowRadius only", function() {
|
|
58
58
|
expect(preprocess({
|
|
59
59
|
textShadowRadius: 5
|
|
60
60
|
})).toEqual({});
|
|
61
|
-
}), test("textShadowColor and textShadowOffset only", function
|
|
61
|
+
}), test("textShadowColor and textShadowOffset only", function() {
|
|
62
62
|
expect(preprocess({
|
|
63
63
|
textShadowColor: "red",
|
|
64
64
|
textShadowOffset: {
|
|
@@ -82,7 +82,7 @@ describe("StyleSheet/preprocess", function () {
|
|
|
82
82
|
})).toEqual({
|
|
83
83
|
textShadow: "1px 2px 0px rgba(255,0,0,1.00)"
|
|
84
84
|
});
|
|
85
|
-
}), test("textShadowColor and textShadowRadius only", function
|
|
85
|
+
}), test("textShadowColor and textShadowRadius only", function() {
|
|
86
86
|
expect(preprocess({
|
|
87
87
|
textShadowColor: "red",
|
|
88
88
|
textShadowRadius: 0
|
|
@@ -92,7 +92,7 @@ describe("StyleSheet/preprocess", function () {
|
|
|
92
92
|
})).toEqual({
|
|
93
93
|
textShadow: "0px 0px 5px rgba(255,0,0,1.00)"
|
|
94
94
|
});
|
|
95
|
-
}), test("textShadowColor, textShadowOffset, textShadowRadius", function
|
|
95
|
+
}), test("textShadowColor, textShadowOffset, textShadowRadius", function() {
|
|
96
96
|
expect(preprocess({
|
|
97
97
|
textShadowColor: "rgba(50,60,70,0.50)",
|
|
98
98
|
textShadowOffset: {
|
|
@@ -106,4 +106,4 @@ describe("StyleSheet/preprocess", function () {
|
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
|
-
//# sourceMappingURL=preprocess-test.
|
|
109
|
+
//# sourceMappingURL=preprocess-test.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/StyleSheet/__tests__/preprocess-test.tsx"],
|
|
4
|
+
"mappings": "AAOA,SAASA,kBAAkB;AAE3BC,SAAS,yBAAyB,WAAA;AAChCA,WAAS,iEAAiE,WAAA;AACxEC,SAAK,oBAAoB,WAAA;AACvBC,aAAOH,WAAW;QAAEI,aAAa;MAAM,CAAA,CAAA,EAAIC,QAAQ;QACjDC,WAAW;MACb,CAAA;IACF,CAAA,GAEAJ,KAAK,sCAAsC,WAAA;AACzCC,aAAOH,WAAW;QAAEI,aAAa;QAAOG,eAAe;MAAI,CAAA,CAAA,EAAIF,QAAQ;QACrEC,WAAW;MACb,CAAA;IACF,CAAA,GAEAJ,KAAK,qBAAqB,WAAA;AACxBC,aAAOH,WAAW;QAAEQ,cAAc;UAAEC,OAAO;UAAGC,QAAQ;QAAE;MAAE,CAAA,CAAA,EAAIL,QAAQ;QACpEC,WAAW;MACb,CAAA;IACF,CAAA,GAEAJ,KAAK,qBAAqB,WAAA;AACxBC,aAAOH,WAAW;QAAEW,cAAc;MAAE,CAAA,CAAA,EAAIN,QAAQ;QAC9CC,WAAW;MACb,CAAA;IACF,CAAA,GAEAJ,KAAK,2CAA2C,WAAA;AAC9CC,aACEH,WAAW;Q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IT,QAAQ;QAC1EU,YAAY;MACd,CAAA;IACF,CAAA,GAEAb,KAAK,uDAAuD,WAAA;AAC1DC,aACEH,WAAW;QACTY,iBAAiB;QACjBC,kBAAkB;UAAEJ,OAAO;UAAGC,QAAQ;QAAG;QACzCI,kBAAkB;MACpB,CAAA,CAAA,EACAT,QAAQ;QACRU,YAAY;MACd,CAAA;IACF,CAAA;EACF,CAAA;AACF,CAAA;",
|
|
5
|
+
"names": ["preprocess", "describe", "test", "expect", "shadowColor", "toEqual", "boxShadow", "shadowOpacity", "shadowOffset", "width", "height", "shadowRadius", "textShadowColor", "textShadowOffset", "textShadowRadius", "textShadow"]
|
|
6
|
+
}
|