react-native-css 0.0.0-nightly.38ce466 → 0.0.0-nightly.5ce6396
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/commonjs/babel/index.js +6 -2
- package/dist/commonjs/babel/index.js.map +1 -1
- package/dist/commonjs/compiler/atRules.js +3 -1
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +112 -31
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +5 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/jest/index.js +0 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/runtime/native/api.js +21 -2
- package/dist/commonjs/runtime/native/api.js.map +1 -1
- package/dist/commonjs/runtime/native/reactivity.js +1 -5
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +19 -11
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/units.js +10 -8
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
- package/dist/commonjs/runtime/web/api.js +18 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -1
- package/dist/commonjs/style-collection/root.js +1 -0
- package/dist/commonjs/style-collection/root.js.map +1 -1
- package/dist/module/babel/index.js +2 -2
- package/dist/module/babel/index.js.map +1 -1
- package/dist/module/compiler/atRules.js +3 -1
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/declarations.js +107 -31
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +5 -0
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/jest/index.js +1 -2
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/runtime/native/api.js +21 -3
- package/dist/module/runtime/native/api.js.map +1 -1
- package/dist/module/runtime/native/reactivity.js +0 -4
- package/dist/module/runtime/native/reactivity.js.map +1 -1
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js +19 -11
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -1
- package/dist/module/runtime/native/styles/units.js +11 -8
- package/dist/module/runtime/native/styles/units.js.map +1 -1
- package/dist/module/runtime/web/api.js +18 -1
- package/dist/module/runtime/web/api.js.map +1 -1
- package/dist/module/style-collection/root.js +1 -0
- package/dist/module/style-collection/root.js.map +1 -1
- package/dist/typescript/commonjs/src/babel/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +14 -3
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +13 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +8 -2
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/index.d.ts +3 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +14 -3
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts +13 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +0 -2
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts +8 -2
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/babel/index.ts +2 -2
- package/src/compiler/atRules.ts +2 -0
- package/src/compiler/declarations.ts +147 -42
- package/src/compiler/stylesheet.ts +6 -0
- package/src/jest/index.ts +1 -2
- package/src/runtime/native/{api.ts → api.tsx} +31 -4
- package/src/runtime/native/reactivity.ts +0 -4
- package/src/runtime/native/styles/shorthands/box-shadow.ts +24 -18
- package/src/runtime/native/styles/units.ts +13 -8
- package/src/runtime/web/{api.ts → api.tsx} +28 -2
- package/src/style-collection/root.ts +2 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
3
7
|
/* eslint-disable */
|
|
4
|
-
|
|
8
|
+
function _default() {
|
|
5
9
|
return {
|
|
6
10
|
plugins: [require("./import-plugin").default, "react-native-worklets/plugin"]
|
|
7
11
|
};
|
|
8
|
-
}
|
|
12
|
+
}
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_default","plugins","require","default"],"sourceRoot":"../../../src","sources":["babel/index.ts"],"mappings":";;;;;;AAAA;AACe,SAAAA,SAAA,EAAY;EACzB,OAAO;IACLC,OAAO,EAAE,CACPC,OAAO,CAAC,iBAAiB,CAAC,CAACC,OAAO,EAClC,8BAA8B;EAElC,CAAC;AACH","ignoreList":[]}
|
|
@@ -57,7 +57,9 @@ function parsePropAtRule(rules) {
|
|
|
57
57
|
"stroke-width": ["strokeWidth"],
|
|
58
58
|
"-webkit-line-clamp": ["numberOfLines"],
|
|
59
59
|
"-rn-ripple-color": ["android_ripple", "color"],
|
|
60
|
-
"-rn-ripple-style": ["android_ripple", "borderless"]
|
|
60
|
+
"-rn-ripple-style": ["android_ripple", "borderless"],
|
|
61
|
+
"-rn-ripple-radius": ["android_ripple", "radius"],
|
|
62
|
+
"-rn-ripple-layer": ["android_ripple", "foreground"]
|
|
61
63
|
};
|
|
62
64
|
if (!rules) return mapping;
|
|
63
65
|
for (const rule of rules) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","builder","type","value","name","declarations","body","declaration","property","forEach","token","setOptions","isPropAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","propAtRuleBlock","block","blocks","blockRules","splitByDelimiter","from","to","fromToken","toRNProperty","flatMap","index"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAYA;AACA;AACA;;AAcO,SAASE,6BAA6BA,CAC3CC,IAA8B,EAC9BC,OAA0B,EAC1B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGL,IAAI,CAACG,KAAK,CAACG,IAAI,CAACH,KAAK;EAC9C,IAAI,CAACE,YAAY,EAAE;EAEnB,KAAK,MAAME,WAAW,IAAIF,YAAY,EAAE;IACtC,IAAIE,WAAW,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAE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AAG,IAAAa,uBAAY,EAACD,SAAS,CAACxB,KAAK,CAACA,KAAK,CAAC;IAClD,OAAOY,OAAO;EAChB;EAEAA,OAAO,CAAC,IAAAa,uBAAY,EAACD,SAAS,CAACxB,KAAK,CAACA,KAAK,CAAC,CAAC,GAAGuB,EAAE,CAACG,OAAO,CAAC,CAACV,IAAI,EAAEW,KAAK,KAAK;IACzE,QAAQX,IAAI,CAAChB,KAAK,CAACD,IAAI;MACrB,KAAK,OAAO;QACV,OAAO4B,KAAK,KAAK,CAAC,IAAIX,IAAI,CAAChB,KAAK,CAACA,KAAK,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;MAC7D,KAAK,OAAO;QACV,OAAO,CAAC,IAAAyB,uBAAY,EAACT,IAAI,CAAChB,KAAK,CAACA,KAAK,CAAC,CAAC;MACzC;QACE,OAAO,EAAE;IACb;EACF,CAAC,CAAC;EAEF,OAAOY,OAAO;AAChB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","builder","type","value","name","declarations","body","declaration","property","forEach","token","setOptions","isPropAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","propAtRuleBlock","block","blocks","blockRules","splitByDelimiter","from","to","fromToken","toRNProperty","flatMap","index"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAYA;AACA;AACA;;AAcO,SAASE,6BAA6BA,CAC3CC,IAA8B,EAC9BC,OAA0B,EAC1B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGL,IAAI,CAACG,KAAK,CAACG,IAAI,CAACH,KAAK;EAC9C,IAAI,CAACE,YAAY,EAAE;EAEnB,K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GAAGF,IAAI,CAAC,CAAC,CAAC;EACzB,IAAI,CAACE,SAAS,IAAIA,SAAS,CAACxB,KAAK,CAACD,IAAI,KAAK,OAAO,EAAE;IAClD,OAAOa,OAAO;EAChB;EAEA,IAAI,CAACW,EAAE,EAAE;IACPX,OAAO,CAAC,GAAG,CAAC,GAAG,IAAAa,uBAAY,EAACD,SAAS,CAACxB,KAAK,CAACA,KAAK,CAAC;IAClD,OAAOY,OAAO;EAChB;EAEAA,OAAO,CAAC,IAAAa,uBAAY,EAACD,SAAS,CAACxB,KAAK,CAACA,KAAK,CAAC,CAAC,GAAGuB,EAAE,CAACG,OAAO,CAAC,CAACV,IAAI,EAAEW,KAAK,KAAK;IACzE,QAAQX,IAAI,CAAChB,KAAK,CAACD,IAAI;MACrB,KAAK,OAAO;QACV,OAAO4B,KAAK,KAAK,CAAC,IAAIX,IAAI,CAAChB,KAAK,CAACA,KAAK,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;MAC7D,KAAK,OAAO;QACV,OAAO,CAAC,IAAAyB,uBAAY,EAACT,IAAI,CAAChB,KAAK,CAACA,KAAK,CAAC,CAAC;MACzC;QACE,OAAO,EAAE;IACb;EACF,CAAC,CAAC;EAEF,OAAOY,OAAO;AAChB","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@ exports.parseAlignItems = parseAlignItems;
|
|
|
13
13
|
exports.parseAlignSelf = parseAlignSelf;
|
|
14
14
|
exports.parseAngle = parseAngle;
|
|
15
15
|
exports.parseAspectRatio = parseAspectRatio;
|
|
16
|
+
exports.parseBackfaceVisibility = parseBackfaceVisibility;
|
|
16
17
|
exports.parseBorderBlockWidth = parseBorderBlockWidth;
|
|
17
18
|
exports.parseBorderInlineStyle = parseBorderInlineStyle;
|
|
18
19
|
exports.parseBorderInlineWidth = parseBorderInlineWidth;
|
|
@@ -21,6 +22,7 @@ exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
|
|
|
21
22
|
exports.parseBorderStyle = parseBorderStyle;
|
|
22
23
|
exports.parseBorderStyleDeclaration = parseBorderStyleDeclaration;
|
|
23
24
|
exports.parseBoxShadow = parseBoxShadow;
|
|
25
|
+
exports.parseBoxSizing = parseBoxSizing;
|
|
24
26
|
exports.parseCalcArguments = parseCalcArguments;
|
|
25
27
|
exports.parseCalcFn = parseCalcFn;
|
|
26
28
|
exports.parseColor = parseColor;
|
|
@@ -30,6 +32,7 @@ exports.parseCustomDeclaration = parseCustomDeclaration;
|
|
|
30
32
|
exports.parseDeclaration = parseDeclaration;
|
|
31
33
|
exports.parseDimension = parseDimension;
|
|
32
34
|
exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
|
|
35
|
+
exports.parseDirection = parseDirection;
|
|
33
36
|
exports.parseDisplay = parseDisplay;
|
|
34
37
|
exports.parseEnv = parseEnv;
|
|
35
38
|
exports.parseFontColorDeclaration = parseFontColorDeclaration;
|
|
@@ -46,6 +49,7 @@ exports.parseJustifyContent = parseJustifyContent;
|
|
|
46
49
|
exports.parseLength = parseLength;
|
|
47
50
|
exports.parseLengthDeclaration = parseLengthDeclaration;
|
|
48
51
|
exports.parseLengthOrCoercePercentageToRuntime = parseLengthOrCoercePercentageToRuntime;
|
|
52
|
+
exports.parseLengthPercentageDeclaration = parseLengthPercentageDeclaration;
|
|
49
53
|
exports.parseLengthPercentageOrAuto = parseLengthPercentageOrAuto;
|
|
50
54
|
exports.parseLengthPercentageOrAutoDeclaration = parseLengthPercentageOrAutoDeclaration;
|
|
51
55
|
exports.parseLineHeight = parseLineHeight;
|
|
@@ -59,6 +63,7 @@ exports.parseSize = parseSize;
|
|
|
59
63
|
exports.parseSize2DDimensionPercentage = parseSize2DDimensionPercentage;
|
|
60
64
|
exports.parseSize2DDimensionPercentageDeclaration = parseSize2DDimensionPercentageDeclaration;
|
|
61
65
|
exports.parseSizeDeclaration = parseSizeDeclaration;
|
|
66
|
+
exports.parseSizeWithAutoDeclaration = parseSizeWithAutoDeclaration;
|
|
62
67
|
exports.parseTextAlign = parseTextAlign;
|
|
63
68
|
exports.parseTextDecorationLine = parseTextDecorationLine;
|
|
64
69
|
exports.parseTextDecorationLineDeclaration = parseTextDecorationLineDeclaration;
|
|
@@ -78,7 +83,7 @@ var _colorjs = _interopRequireDefault(require("colorjs.io"));
|
|
|
78
83
|
var _keyframes = require("./keyframes.js");
|
|
79
84
|
var _selectors = require("./selectors.js");
|
|
80
85
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
81
|
-
// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto
|
|
86
|
+
// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto,squircle,oldstyle,nums
|
|
82
87
|
|
|
83
88
|
const CommaSeparator = Symbol("CommaSeparator");
|
|
84
89
|
const propertyRename = {
|
|
@@ -101,6 +106,7 @@ const parsers = {
|
|
|
101
106
|
"animation-play-state": addAnimationValue,
|
|
102
107
|
"animation-timing-function": addAnimationValue,
|
|
103
108
|
"aspect-ratio": parseAspectRatio,
|
|
109
|
+
"backface-visibility": parseBackfaceVisibility,
|
|
104
110
|
"background-color": parseColorDeclaration,
|
|
105
111
|
"background-image": parseBackgroundImage,
|
|
106
112
|
"block-size": parseSizeDeclaration,
|
|
@@ -156,8 +162,9 @@ const parsers = {
|
|
|
156
162
|
"border-top-style": parseBorderStyleDeclaration,
|
|
157
163
|
"border-top-width": parseBorderSideWidthDeclaration,
|
|
158
164
|
"border-width": parseBorderWidth,
|
|
159
|
-
"bottom":
|
|
165
|
+
"bottom": parseSizeWithAutoDeclaration,
|
|
160
166
|
"box-shadow": parseBoxShadow,
|
|
167
|
+
"box-sizing": parseBoxSizing,
|
|
161
168
|
"caret-color": parseColorOrAutoDeclaration,
|
|
162
169
|
"color": parseFontColorDeclaration,
|
|
163
170
|
"column-gap": parseGap,
|
|
@@ -165,10 +172,11 @@ const parsers = {
|
|
|
165
172
|
"container-name": parseContainerName,
|
|
166
173
|
"container-type": parseContainerType,
|
|
167
174
|
"display": parseDisplay,
|
|
175
|
+
"direction": parseDirection,
|
|
168
176
|
"fill": parseSVGPaint,
|
|
169
177
|
"filter": parseFilter,
|
|
170
178
|
"flex": parseFlex,
|
|
171
|
-
"flex-basis":
|
|
179
|
+
"flex-basis": parseLengthPercentageDeclaration,
|
|
172
180
|
"flex-direction": ({
|
|
173
181
|
value
|
|
174
182
|
}) => value,
|
|
@@ -189,30 +197,30 @@ const parsers = {
|
|
|
189
197
|
"font-variant-caps": parseFontVariantCapsDeclaration,
|
|
190
198
|
"font-weight": parseFontWeightDeclaration,
|
|
191
199
|
"gap": parseGap,
|
|
192
|
-
"height":
|
|
193
|
-
"inline-size":
|
|
200
|
+
"height": parseSizeWithAutoDeclaration,
|
|
201
|
+
"inline-size": parseSizeWithAutoDeclaration,
|
|
194
202
|
"inset": parseInset,
|
|
195
203
|
"inset-block": parseInsetBlock,
|
|
196
|
-
"inset-block-end":
|
|
197
|
-
"inset-block-start":
|
|
204
|
+
"inset-block-end": parseLengthPercentageDeclaration,
|
|
205
|
+
"inset-block-start": parseLengthPercentageDeclaration,
|
|
198
206
|
"inset-inline": parseInsetInline,
|
|
199
|
-
"inset-inline-end":
|
|
200
|
-
"inset-inline-start":
|
|
207
|
+
"inset-inline-end": parseLengthPercentageDeclaration,
|
|
208
|
+
"inset-inline-start": parseLengthPercentageDeclaration,
|
|
201
209
|
"justify-content": parseJustifyContent,
|
|
202
|
-
"left":
|
|
210
|
+
"left": parseSizeWithAutoDeclaration,
|
|
203
211
|
"letter-spacing": parseLetterSpacing,
|
|
204
212
|
"line-height": parseLineHeightDeclaration,
|
|
205
213
|
"margin": parseMargin,
|
|
206
214
|
"margin-block": parseMarginBlock,
|
|
207
215
|
"margin-block-end": parseLengthPercentageOrAutoDeclaration,
|
|
208
216
|
"margin-block-start": parseLengthPercentageOrAutoDeclaration,
|
|
209
|
-
"margin-bottom":
|
|
217
|
+
"margin-bottom": parseSizeWithAutoDeclaration,
|
|
210
218
|
"margin-inline": parseMarginInline,
|
|
211
219
|
"margin-inline-end": parseLengthPercentageOrAutoDeclaration,
|
|
212
220
|
"margin-inline-start": parseLengthPercentageOrAutoDeclaration,
|
|
213
|
-
"margin-left":
|
|
214
|
-
"margin-right":
|
|
215
|
-
"margin-top":
|
|
221
|
+
"margin-left": parseSizeWithAutoDeclaration,
|
|
222
|
+
"margin-right": parseSizeWithAutoDeclaration,
|
|
223
|
+
"margin-top": parseSizeWithAutoDeclaration,
|
|
216
224
|
"max-block-size": parseSizeDeclaration,
|
|
217
225
|
"max-height": parseSizeDeclaration,
|
|
218
226
|
"max-inline-size": parseSizeDeclaration,
|
|
@@ -223,21 +231,24 @@ const parsers = {
|
|
|
223
231
|
"min-width": parseSizeDeclaration,
|
|
224
232
|
"opacity": ({
|
|
225
233
|
value
|
|
226
|
-
}) => value,
|
|
234
|
+
}) => round(value),
|
|
235
|
+
"outline-color": parseColorDeclaration,
|
|
236
|
+
"outline-style": parseOutlineStyle,
|
|
237
|
+
"outline-width": parseBorderSideWidthDeclaration,
|
|
227
238
|
"overflow": parseOverflow,
|
|
228
239
|
"padding": parsePadding,
|
|
229
240
|
"padding-block": parsePaddingBlock,
|
|
230
|
-
"padding-block-end":
|
|
231
|
-
"padding-block-start":
|
|
241
|
+
"padding-block-end": parseLengthPercentageDeclaration,
|
|
242
|
+
"padding-block-start": parseLengthPercentageDeclaration,
|
|
232
243
|
"padding-bottom": parseSizeDeclaration,
|
|
233
244
|
"padding-inline": parsePaddingInline,
|
|
234
|
-
"padding-inline-end":
|
|
235
|
-
"padding-inline-start":
|
|
245
|
+
"padding-inline-end": parseLengthPercentageDeclaration,
|
|
246
|
+
"padding-inline-start": parseLengthPercentageDeclaration,
|
|
236
247
|
"padding-left": parseSizeDeclaration,
|
|
237
248
|
"padding-right": parseSizeDeclaration,
|
|
238
249
|
"padding-top": parseSizeDeclaration,
|
|
239
250
|
"position": parsePosition,
|
|
240
|
-
"right":
|
|
251
|
+
"right": parseSizeWithAutoDeclaration,
|
|
241
252
|
"rotate": parseRotate,
|
|
242
253
|
"row-gap": parseGap,
|
|
243
254
|
"scale": parseScale,
|
|
@@ -252,7 +263,7 @@ const parsers = {
|
|
|
252
263
|
"text-transform": ({
|
|
253
264
|
value
|
|
254
265
|
}) => value.case,
|
|
255
|
-
"top":
|
|
266
|
+
"top": parseSizeWithAutoDeclaration,
|
|
256
267
|
"transform": parseTransform,
|
|
257
268
|
"transition": addTransitionValue,
|
|
258
269
|
"transition-delay": addTransitionValue,
|
|
@@ -263,7 +274,7 @@ const parsers = {
|
|
|
263
274
|
"user-select": parseUserSelect,
|
|
264
275
|
"vertical-align": parseVerticalAlign,
|
|
265
276
|
"visibility": parseVisibility,
|
|
266
|
-
"width":
|
|
277
|
+
"width": parseSizeWithAutoDeclaration,
|
|
267
278
|
"z-index": parseZIndex
|
|
268
279
|
};
|
|
269
280
|
|
|
@@ -468,16 +479,24 @@ function parseMarginBlock({
|
|
|
468
479
|
value
|
|
469
480
|
}, builder) {
|
|
470
481
|
builder.addShorthand("margin-block", {
|
|
471
|
-
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder
|
|
472
|
-
|
|
482
|
+
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder, {
|
|
483
|
+
allowAuto: true
|
|
484
|
+
}),
|
|
485
|
+
"margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder, {
|
|
486
|
+
allowAuto: true
|
|
487
|
+
})
|
|
473
488
|
});
|
|
474
489
|
}
|
|
475
490
|
function parseMarginInline({
|
|
476
491
|
value
|
|
477
492
|
}, builder) {
|
|
478
493
|
builder.addShorthand("margin-inline", {
|
|
479
|
-
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder
|
|
480
|
-
|
|
494
|
+
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder, {
|
|
495
|
+
allowAuto: true
|
|
496
|
+
}),
|
|
497
|
+
"margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder, {
|
|
498
|
+
allowAuto: true
|
|
499
|
+
})
|
|
481
500
|
});
|
|
482
501
|
}
|
|
483
502
|
function parsePadding({
|
|
@@ -679,13 +698,24 @@ function parseCustomDeclaration(declaration, builder) {
|
|
|
679
698
|
if (property === "-webkit-line-clamp") {
|
|
680
699
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
681
700
|
} else if (property === "-rn-ripple-style") {
|
|
682
|
-
|
|
701
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "borderless") {
|
|
702
|
+
builder.addDescriptor(property, true);
|
|
703
|
+
}
|
|
704
|
+
} else if (property === "-rn-ripple-layer") {
|
|
705
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "foreground") {
|
|
706
|
+
builder.addDescriptor(property, true);
|
|
707
|
+
}
|
|
683
708
|
} else if (property === "object-fit") {
|
|
684
709
|
// https://github.com/parcel-bundler/lightningcss/issues/1046
|
|
685
710
|
parseObjectFit(declaration.value, builder);
|
|
686
711
|
} else if (property === "object-position") {
|
|
687
712
|
// https://github.com/parcel-bundler/lightningcss/issues/1047
|
|
688
713
|
parseObjectPosition(declaration.value, builder);
|
|
714
|
+
} else if (property === "outline-offset") {
|
|
715
|
+
// https://github.com/parcel-bundler/lightningcss/issues/1048
|
|
716
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
717
|
+
} else if (property === "corner-shape") {
|
|
718
|
+
parseCornerShape(declaration.value, builder);
|
|
689
719
|
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
690
720
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
691
721
|
} else {
|
|
@@ -1058,6 +1088,11 @@ function parseAngle(angle, builder) {
|
|
|
1058
1088
|
function parseSizeDeclaration(declaration, builder) {
|
|
1059
1089
|
return parseSize(declaration.value, builder);
|
|
1060
1090
|
}
|
|
1091
|
+
function parseSizeWithAutoDeclaration(declaration, builder) {
|
|
1092
|
+
return parseSize(declaration.value, builder, {
|
|
1093
|
+
allowAuto: true
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1061
1096
|
function parsePointerEvents({
|
|
1062
1097
|
value
|
|
1063
1098
|
}, builder) {
|
|
@@ -1273,9 +1308,14 @@ function parseColor(cssColor, builder) {
|
|
|
1273
1308
|
});
|
|
1274
1309
|
}
|
|
1275
1310
|
}
|
|
1276
|
-
function
|
|
1311
|
+
function parseLengthPercentageDeclaration(value, builder) {
|
|
1277
1312
|
return parseLengthPercentageOrAuto(value.value, builder);
|
|
1278
1313
|
}
|
|
1314
|
+
function parseLengthPercentageOrAutoDeclaration(value, builder) {
|
|
1315
|
+
return parseLengthPercentageOrAuto(value.value, builder, {
|
|
1316
|
+
allowAuto: true
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1279
1319
|
function parseLengthPercentageOrAuto(lengthPercentageOrAuto, builder, {
|
|
1280
1320
|
allowAuto = false
|
|
1281
1321
|
} = {}) {
|
|
@@ -1321,7 +1361,7 @@ function parseJustifyContent(declaration, builder) {
|
|
|
1321
1361
|
return value;
|
|
1322
1362
|
}
|
|
1323
1363
|
function parseAlignContent(declaration, builder) {
|
|
1324
|
-
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around"]);
|
|
1364
|
+
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around", "space-evenly"]);
|
|
1325
1365
|
let value;
|
|
1326
1366
|
switch (declaration.value.type) {
|
|
1327
1367
|
case "normal":
|
|
@@ -1465,7 +1505,7 @@ function parseTextDecorationLine(value, builder) {
|
|
|
1465
1505
|
function parsePosition({
|
|
1466
1506
|
value
|
|
1467
1507
|
}, builder) {
|
|
1468
|
-
if (value.type === "absolute" || value.type === "relative") {
|
|
1508
|
+
if (value.type === "absolute" || value.type === "relative" || value.type === "static") {
|
|
1469
1509
|
return value.type;
|
|
1470
1510
|
}
|
|
1471
1511
|
builder.addWarning("value", value.type);
|
|
@@ -1675,11 +1715,18 @@ function parseBoxShadow({
|
|
|
1675
1715
|
builder.addDescriptor(`boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
|
|
1676
1716
|
}
|
|
1677
1717
|
}
|
|
1718
|
+
function parseBoxSizing(declaration, builder) {
|
|
1719
|
+
if (["border-box", "content-box"].includes(declaration.value)) {
|
|
1720
|
+
return declaration.value;
|
|
1721
|
+
}
|
|
1722
|
+
builder.addWarning("value", declaration.value);
|
|
1723
|
+
return undefined;
|
|
1724
|
+
}
|
|
1678
1725
|
function parseDisplay({
|
|
1679
1726
|
value
|
|
1680
1727
|
}, builder) {
|
|
1681
1728
|
if (value.type === "keyword") {
|
|
1682
|
-
if (value.value === "none") {
|
|
1729
|
+
if (value.value === "none" || value.value === "contents") {
|
|
1683
1730
|
return value.value;
|
|
1684
1731
|
} else {
|
|
1685
1732
|
builder.addWarning("value", value.value);
|
|
@@ -1730,6 +1777,14 @@ function parseDisplay({
|
|
|
1730
1777
|
}
|
|
1731
1778
|
}
|
|
1732
1779
|
}
|
|
1780
|
+
function parseDirection(declaration, builder) {
|
|
1781
|
+
if (["ltr", "rtl"].includes(declaration.value)) {
|
|
1782
|
+
builder.addDescriptor("direction", declaration.value);
|
|
1783
|
+
builder.addDescriptor("--__rn-css-direction", declaration.value);
|
|
1784
|
+
}
|
|
1785
|
+
builder.addWarning("value", declaration.value);
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1733
1788
|
function parseAspectRatio({
|
|
1734
1789
|
value
|
|
1735
1790
|
}) {
|
|
@@ -1746,6 +1801,16 @@ function parseAspectRatio({
|
|
|
1746
1801
|
}
|
|
1747
1802
|
}
|
|
1748
1803
|
}
|
|
1804
|
+
function parseBackfaceVisibility({
|
|
1805
|
+
value
|
|
1806
|
+
}, builder) {
|
|
1807
|
+
if (["visible", "hidden"].includes(value)) {
|
|
1808
|
+
return value;
|
|
1809
|
+
} else {
|
|
1810
|
+
builder.addWarning("value", value);
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1749
1814
|
function parseDimension({
|
|
1750
1815
|
unit,
|
|
1751
1816
|
value
|
|
@@ -2155,6 +2220,14 @@ function parseObjectPosition(declaration, builder) {
|
|
|
2155
2220
|
});
|
|
2156
2221
|
builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
|
|
2157
2222
|
}
|
|
2223
|
+
function parseCornerShape(declaration, builder) {
|
|
2224
|
+
const shape = parseUnparsed(declaration.value, builder, "corner-shape");
|
|
2225
|
+
if (shape === "round") {
|
|
2226
|
+
builder.addDescriptor("borderCurve", "circular");
|
|
2227
|
+
} else if (shape === "squircle") {
|
|
2228
|
+
builder.addDescriptor("borderCurve", "continuous");
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2158
2231
|
function parseVisibility(declaration, builder) {
|
|
2159
2232
|
if (declaration.value === "visible") {
|
|
2160
2233
|
builder.addDescriptor("opacity", 1);
|
|
@@ -2164,6 +2237,14 @@ function parseVisibility(declaration, builder) {
|
|
|
2164
2237
|
builder.addWarning("value", declaration.value);
|
|
2165
2238
|
}
|
|
2166
2239
|
}
|
|
2240
|
+
function parseOutlineStyle(declaration, builder) {
|
|
2241
|
+
const allowed = ["solid", "dotted", "dashed"];
|
|
2242
|
+
if (declaration.value.type !== "auto" && allowed.includes(declaration.value.value)) {
|
|
2243
|
+
builder.addDescriptor("outlineStyle", declaration.value.value);
|
|
2244
|
+
} else {
|
|
2245
|
+
builder.addWarning("value", declaration.value.type === "auto" ? "auto" : declaration.value.value);
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2167
2248
|
function parseFilter(declaration, builder) {
|
|
2168
2249
|
if (declaration.value.type === "none") {
|
|
2169
2250
|
return "unset";
|