react-native-css 3.0.0-preview.0 → 3.0.0-preview.2
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 +114 -35
- 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/line-height.js +25 -0
- package/dist/commonjs/runtime/native/styles/line-height.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +2 -0
- package/dist/commonjs/runtime/native/styles/resolve.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 +109 -35
- 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/line-height.js +20 -0
- package/dist/module/runtime/native/styles/line-height.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +2 -0
- package/dist/module/runtime/native/styles/resolve.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 +15 -4
- 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/line-height.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.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 +15 -4
- 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/line-height.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/line-height.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.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 +9 -10
- package/src/babel/index.ts +2 -2
- package/src/compiler/atRules.ts +2 -0
- package/src/compiler/declarations.ts +156 -46
- 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/line-height.ts +25 -0
- package/src/runtime/native/styles/resolve.ts +2 -0
- 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;IAEvC,QAAQD,WAAW,CAACJ,KAAK,CAACC,IAAI;MAC5B,KAAK,oBAAoB;QAAE;UACzBG,WAAW,CAACJ,KAAK,CAACA,KAAK,CAACM,OAAO,CAAEC,KAAK,IAAK;YACzC,IAAIA,KAAK,CAACR,IAAI,KAAK,cAAc,EAAE;cACjC;YACF;YAEA,IAAIQ,KAAK,CAACP,KAAK,KAAK,MAAM,IAAIO,KAAK,CAACP,KAAK,KAAK,OAAO,EAAE;cACrD;YACF;YAEAF,OAAO,CAACU,UAAU,CAAC,mBAAmB,EAAED,KAAK,CAACP,KAAK,KAAK,MAAM,CAAC;UACjE,CAAC,CAAC;UACF;QACF;MACA;QACE;IACJ;EACF;AACF;;AAEA;AACA;AACA;;AAEA,SAASS,YAAYA,CAACZ,IAAuB,EAAsB;EACjE,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,MAAM;AAC9D;AAEO,S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
|
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;IAEvC,QAAQD,WAAW,CAACJ,KAAK,CAACC,IAAI;MAC5B,KAAK,oBAAoB;QAAE;UACzBG,WAAW,CAACJ,KAAK,CAACA,KAAK,CAACM,OAAO,CAAEC,KAAK,IAAK;YACzC,IAAIA,KAAK,CAACR,IAAI,KAAK,cAAc,EAAE;cACjC;YACF;YAEA,IAAIQ,KAAK,CAACP,KAAK,KAAK,MAAM,IAAIO,KAAK,CAACP,KAAK,KAAK,OAAO,EAAE;cACrD;YACF;YAEAF,OAAO,CAACU,UAAU,CAAC,mBAAmB,EAAED,KAAK,CAACP,KAAK,KAAK,MAAM,CAAC;UACjE,CAAC,CAAC;UACF;QACF;MACA;QACE;IACJ;EACF;AACF;;AAEA;AACA;AACA;;AAEA,SAASS,YAAYA,CAACZ,IAAuB,EAAsB;EACjE,OAAOA,IA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C,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,15 +83,13 @@ 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 = {
|
|
85
90
|
"background-image": "experimental_backgroundImage"
|
|
86
91
|
};
|
|
87
|
-
|
|
88
|
-
// TODO: We need a better way to handle this
|
|
89
|
-
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
|
|
92
|
+
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "line-height", "rotate", "scale", "text-shadow", "transform", "translate"]);
|
|
90
93
|
const parsers = {
|
|
91
94
|
"align-content": parseAlignContent,
|
|
92
95
|
"align-items": parseAlignItems,
|
|
@@ -101,6 +104,7 @@ const parsers = {
|
|
|
101
104
|
"animation-play-state": addAnimationValue,
|
|
102
105
|
"animation-timing-function": addAnimationValue,
|
|
103
106
|
"aspect-ratio": parseAspectRatio,
|
|
107
|
+
"backface-visibility": parseBackfaceVisibility,
|
|
104
108
|
"background-color": parseColorDeclaration,
|
|
105
109
|
"background-image": parseBackgroundImage,
|
|
106
110
|
"block-size": parseSizeDeclaration,
|
|
@@ -156,8 +160,9 @@ const parsers = {
|
|
|
156
160
|
"border-top-style": parseBorderStyleDeclaration,
|
|
157
161
|
"border-top-width": parseBorderSideWidthDeclaration,
|
|
158
162
|
"border-width": parseBorderWidth,
|
|
159
|
-
"bottom":
|
|
163
|
+
"bottom": parseSizeWithAutoDeclaration,
|
|
160
164
|
"box-shadow": parseBoxShadow,
|
|
165
|
+
"box-sizing": parseBoxSizing,
|
|
161
166
|
"caret-color": parseColorOrAutoDeclaration,
|
|
162
167
|
"color": parseFontColorDeclaration,
|
|
163
168
|
"column-gap": parseGap,
|
|
@@ -165,10 +170,11 @@ const parsers = {
|
|
|
165
170
|
"container-name": parseContainerName,
|
|
166
171
|
"container-type": parseContainerType,
|
|
167
172
|
"display": parseDisplay,
|
|
173
|
+
"direction": parseDirection,
|
|
168
174
|
"fill": parseSVGPaint,
|
|
169
175
|
"filter": parseFilter,
|
|
170
176
|
"flex": parseFlex,
|
|
171
|
-
"flex-basis":
|
|
177
|
+
"flex-basis": parseLengthPercentageDeclaration,
|
|
172
178
|
"flex-direction": ({
|
|
173
179
|
value
|
|
174
180
|
}) => value,
|
|
@@ -189,30 +195,30 @@ const parsers = {
|
|
|
189
195
|
"font-variant-caps": parseFontVariantCapsDeclaration,
|
|
190
196
|
"font-weight": parseFontWeightDeclaration,
|
|
191
197
|
"gap": parseGap,
|
|
192
|
-
"height":
|
|
193
|
-
"inline-size":
|
|
198
|
+
"height": parseSizeWithAutoDeclaration,
|
|
199
|
+
"inline-size": parseSizeWithAutoDeclaration,
|
|
194
200
|
"inset": parseInset,
|
|
195
201
|
"inset-block": parseInsetBlock,
|
|
196
|
-
"inset-block-end":
|
|
197
|
-
"inset-block-start":
|
|
202
|
+
"inset-block-end": parseLengthPercentageDeclaration,
|
|
203
|
+
"inset-block-start": parseLengthPercentageDeclaration,
|
|
198
204
|
"inset-inline": parseInsetInline,
|
|
199
|
-
"inset-inline-end":
|
|
200
|
-
"inset-inline-start":
|
|
205
|
+
"inset-inline-end": parseLengthPercentageDeclaration,
|
|
206
|
+
"inset-inline-start": parseLengthPercentageDeclaration,
|
|
201
207
|
"justify-content": parseJustifyContent,
|
|
202
|
-
"left":
|
|
208
|
+
"left": parseSizeWithAutoDeclaration,
|
|
203
209
|
"letter-spacing": parseLetterSpacing,
|
|
204
210
|
"line-height": parseLineHeightDeclaration,
|
|
205
211
|
"margin": parseMargin,
|
|
206
212
|
"margin-block": parseMarginBlock,
|
|
207
213
|
"margin-block-end": parseLengthPercentageOrAutoDeclaration,
|
|
208
214
|
"margin-block-start": parseLengthPercentageOrAutoDeclaration,
|
|
209
|
-
"margin-bottom":
|
|
215
|
+
"margin-bottom": parseSizeWithAutoDeclaration,
|
|
210
216
|
"margin-inline": parseMarginInline,
|
|
211
217
|
"margin-inline-end": parseLengthPercentageOrAutoDeclaration,
|
|
212
218
|
"margin-inline-start": parseLengthPercentageOrAutoDeclaration,
|
|
213
|
-
"margin-left":
|
|
214
|
-
"margin-right":
|
|
215
|
-
"margin-top":
|
|
219
|
+
"margin-left": parseSizeWithAutoDeclaration,
|
|
220
|
+
"margin-right": parseSizeWithAutoDeclaration,
|
|
221
|
+
"margin-top": parseSizeWithAutoDeclaration,
|
|
216
222
|
"max-block-size": parseSizeDeclaration,
|
|
217
223
|
"max-height": parseSizeDeclaration,
|
|
218
224
|
"max-inline-size": parseSizeDeclaration,
|
|
@@ -223,21 +229,24 @@ const parsers = {
|
|
|
223
229
|
"min-width": parseSizeDeclaration,
|
|
224
230
|
"opacity": ({
|
|
225
231
|
value
|
|
226
|
-
}) => value,
|
|
232
|
+
}) => round(value),
|
|
233
|
+
"outline-color": parseColorDeclaration,
|
|
234
|
+
"outline-style": parseOutlineStyle,
|
|
235
|
+
"outline-width": parseBorderSideWidthDeclaration,
|
|
227
236
|
"overflow": parseOverflow,
|
|
228
237
|
"padding": parsePadding,
|
|
229
238
|
"padding-block": parsePaddingBlock,
|
|
230
|
-
"padding-block-end":
|
|
231
|
-
"padding-block-start":
|
|
239
|
+
"padding-block-end": parseLengthPercentageDeclaration,
|
|
240
|
+
"padding-block-start": parseLengthPercentageDeclaration,
|
|
232
241
|
"padding-bottom": parseSizeDeclaration,
|
|
233
242
|
"padding-inline": parsePaddingInline,
|
|
234
|
-
"padding-inline-end":
|
|
235
|
-
"padding-inline-start":
|
|
243
|
+
"padding-inline-end": parseLengthPercentageDeclaration,
|
|
244
|
+
"padding-inline-start": parseLengthPercentageDeclaration,
|
|
236
245
|
"padding-left": parseSizeDeclaration,
|
|
237
246
|
"padding-right": parseSizeDeclaration,
|
|
238
247
|
"padding-top": parseSizeDeclaration,
|
|
239
248
|
"position": parsePosition,
|
|
240
|
-
"right":
|
|
249
|
+
"right": parseSizeWithAutoDeclaration,
|
|
241
250
|
"rotate": parseRotate,
|
|
242
251
|
"row-gap": parseGap,
|
|
243
252
|
"scale": parseScale,
|
|
@@ -252,7 +261,7 @@ const parsers = {
|
|
|
252
261
|
"text-transform": ({
|
|
253
262
|
value
|
|
254
263
|
}) => value.case,
|
|
255
|
-
"top":
|
|
264
|
+
"top": parseSizeWithAutoDeclaration,
|
|
256
265
|
"transform": parseTransform,
|
|
257
266
|
"transition": addTransitionValue,
|
|
258
267
|
"transition-delay": addTransitionValue,
|
|
@@ -263,7 +272,7 @@ const parsers = {
|
|
|
263
272
|
"user-select": parseUserSelect,
|
|
264
273
|
"vertical-align": parseVerticalAlign,
|
|
265
274
|
"visibility": parseVisibility,
|
|
266
|
-
"width":
|
|
275
|
+
"width": parseSizeWithAutoDeclaration,
|
|
267
276
|
"z-index": parseZIndex
|
|
268
277
|
};
|
|
269
278
|
|
|
@@ -468,16 +477,24 @@ function parseMarginBlock({
|
|
|
468
477
|
value
|
|
469
478
|
}, builder) {
|
|
470
479
|
builder.addShorthand("margin-block", {
|
|
471
|
-
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder
|
|
472
|
-
|
|
480
|
+
"margin-block-start": parseLengthPercentageOrAuto(value.blockStart, builder, {
|
|
481
|
+
allowAuto: true
|
|
482
|
+
}),
|
|
483
|
+
"margin-block-end": parseLengthPercentageOrAuto(value.blockEnd, builder, {
|
|
484
|
+
allowAuto: true
|
|
485
|
+
})
|
|
473
486
|
});
|
|
474
487
|
}
|
|
475
488
|
function parseMarginInline({
|
|
476
489
|
value
|
|
477
490
|
}, builder) {
|
|
478
491
|
builder.addShorthand("margin-inline", {
|
|
479
|
-
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder
|
|
480
|
-
|
|
492
|
+
"margin-inline-start": parseLengthPercentageOrAuto(value.inlineStart, builder, {
|
|
493
|
+
allowAuto: true
|
|
494
|
+
}),
|
|
495
|
+
"margin-inline-end": parseLengthPercentageOrAuto(value.inlineEnd, builder, {
|
|
496
|
+
allowAuto: true
|
|
497
|
+
})
|
|
481
498
|
});
|
|
482
499
|
}
|
|
483
500
|
function parsePadding({
|
|
@@ -679,13 +696,24 @@ function parseCustomDeclaration(declaration, builder) {
|
|
|
679
696
|
if (property === "-webkit-line-clamp") {
|
|
680
697
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
681
698
|
} else if (property === "-rn-ripple-style") {
|
|
682
|
-
|
|
699
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "borderless") {
|
|
700
|
+
builder.addDescriptor(property, true);
|
|
701
|
+
}
|
|
702
|
+
} else if (property === "-rn-ripple-layer") {
|
|
703
|
+
if (parseUnparsed(declaration.value.value, builder, property) === "foreground") {
|
|
704
|
+
builder.addDescriptor(property, true);
|
|
705
|
+
}
|
|
683
706
|
} else if (property === "object-fit") {
|
|
684
707
|
// https://github.com/parcel-bundler/lightningcss/issues/1046
|
|
685
708
|
parseObjectFit(declaration.value, builder);
|
|
686
709
|
} else if (property === "object-position") {
|
|
687
710
|
// https://github.com/parcel-bundler/lightningcss/issues/1047
|
|
688
711
|
parseObjectPosition(declaration.value, builder);
|
|
712
|
+
} else if (property === "outline-offset") {
|
|
713
|
+
// https://github.com/parcel-bundler/lightningcss/issues/1048
|
|
714
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
715
|
+
} else if (property === "corner-shape") {
|
|
716
|
+
parseCornerShape(declaration.value, builder);
|
|
689
717
|
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
690
718
|
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
691
719
|
} else {
|
|
@@ -1058,6 +1086,11 @@ function parseAngle(angle, builder) {
|
|
|
1058
1086
|
function parseSizeDeclaration(declaration, builder) {
|
|
1059
1087
|
return parseSize(declaration.value, builder);
|
|
1060
1088
|
}
|
|
1089
|
+
function parseSizeWithAutoDeclaration(declaration, builder) {
|
|
1090
|
+
return parseSize(declaration.value, builder, {
|
|
1091
|
+
allowAuto: true
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1061
1094
|
function parsePointerEvents({
|
|
1062
1095
|
value
|
|
1063
1096
|
}, builder) {
|
|
@@ -1273,9 +1306,14 @@ function parseColor(cssColor, builder) {
|
|
|
1273
1306
|
});
|
|
1274
1307
|
}
|
|
1275
1308
|
}
|
|
1276
|
-
function
|
|
1309
|
+
function parseLengthPercentageDeclaration(value, builder) {
|
|
1277
1310
|
return parseLengthPercentageOrAuto(value.value, builder);
|
|
1278
1311
|
}
|
|
1312
|
+
function parseLengthPercentageOrAutoDeclaration(value, builder) {
|
|
1313
|
+
return parseLengthPercentageOrAuto(value.value, builder, {
|
|
1314
|
+
allowAuto: true
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1279
1317
|
function parseLengthPercentageOrAuto(lengthPercentageOrAuto, builder, {
|
|
1280
1318
|
allowAuto = false
|
|
1281
1319
|
} = {}) {
|
|
@@ -1321,7 +1359,7 @@ function parseJustifyContent(declaration, builder) {
|
|
|
1321
1359
|
return value;
|
|
1322
1360
|
}
|
|
1323
1361
|
function parseAlignContent(declaration, builder) {
|
|
1324
|
-
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around"]);
|
|
1362
|
+
const allowed = new Set(["flex-start", "flex-end", "center", "stretch", "space-between", "space-around", "space-evenly"]);
|
|
1325
1363
|
let value;
|
|
1326
1364
|
switch (declaration.value.type) {
|
|
1327
1365
|
case "normal":
|
|
@@ -1465,7 +1503,7 @@ function parseTextDecorationLine(value, builder) {
|
|
|
1465
1503
|
function parsePosition({
|
|
1466
1504
|
value
|
|
1467
1505
|
}, builder) {
|
|
1468
|
-
if (value.type === "absolute" || value.type === "relative") {
|
|
1506
|
+
if (value.type === "absolute" || value.type === "relative" || value.type === "static") {
|
|
1469
1507
|
return value.type;
|
|
1470
1508
|
}
|
|
1471
1509
|
builder.addWarning("value", value.type);
|
|
@@ -1549,7 +1587,7 @@ function parseFontFamily({
|
|
|
1549
1587
|
return value[0];
|
|
1550
1588
|
}
|
|
1551
1589
|
function parseLineHeightDeclaration(declaration, builder) {
|
|
1552
|
-
|
|
1590
|
+
builder.addDescriptor("line-height", [{}, "lineHeight", [parseLineHeight(declaration.value, builder)], 1]);
|
|
1553
1591
|
}
|
|
1554
1592
|
function parseLineHeight(value, builder) {
|
|
1555
1593
|
switch (value.type) {
|
|
@@ -1675,11 +1713,18 @@ function parseBoxShadow({
|
|
|
1675
1713
|
builder.addDescriptor(`boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
|
|
1676
1714
|
}
|
|
1677
1715
|
}
|
|
1716
|
+
function parseBoxSizing(declaration, builder) {
|
|
1717
|
+
if (["border-box", "content-box"].includes(declaration.value)) {
|
|
1718
|
+
return declaration.value;
|
|
1719
|
+
}
|
|
1720
|
+
builder.addWarning("value", declaration.value);
|
|
1721
|
+
return undefined;
|
|
1722
|
+
}
|
|
1678
1723
|
function parseDisplay({
|
|
1679
1724
|
value
|
|
1680
1725
|
}, builder) {
|
|
1681
1726
|
if (value.type === "keyword") {
|
|
1682
|
-
if (value.value === "none") {
|
|
1727
|
+
if (value.value === "none" || value.value === "contents") {
|
|
1683
1728
|
return value.value;
|
|
1684
1729
|
} else {
|
|
1685
1730
|
builder.addWarning("value", value.value);
|
|
@@ -1730,6 +1775,14 @@ function parseDisplay({
|
|
|
1730
1775
|
}
|
|
1731
1776
|
}
|
|
1732
1777
|
}
|
|
1778
|
+
function parseDirection(declaration, builder) {
|
|
1779
|
+
if (["ltr", "rtl"].includes(declaration.value)) {
|
|
1780
|
+
builder.addDescriptor("direction", declaration.value);
|
|
1781
|
+
builder.addDescriptor("--__rn-css-direction", declaration.value);
|
|
1782
|
+
}
|
|
1783
|
+
builder.addWarning("value", declaration.value);
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1733
1786
|
function parseAspectRatio({
|
|
1734
1787
|
value
|
|
1735
1788
|
}) {
|
|
@@ -1746,6 +1799,16 @@ function parseAspectRatio({
|
|
|
1746
1799
|
}
|
|
1747
1800
|
}
|
|
1748
1801
|
}
|
|
1802
|
+
function parseBackfaceVisibility({
|
|
1803
|
+
value
|
|
1804
|
+
}, builder) {
|
|
1805
|
+
if (["visible", "hidden"].includes(value)) {
|
|
1806
|
+
return value;
|
|
1807
|
+
} else {
|
|
1808
|
+
builder.addWarning("value", value);
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1749
1812
|
function parseDimension({
|
|
1750
1813
|
unit,
|
|
1751
1814
|
value
|
|
@@ -2155,6 +2218,14 @@ function parseObjectPosition(declaration, builder) {
|
|
|
2155
2218
|
});
|
|
2156
2219
|
builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
|
|
2157
2220
|
}
|
|
2221
|
+
function parseCornerShape(declaration, builder) {
|
|
2222
|
+
const shape = parseUnparsed(declaration.value, builder, "corner-shape");
|
|
2223
|
+
if (shape === "round") {
|
|
2224
|
+
builder.addDescriptor("borderCurve", "circular");
|
|
2225
|
+
} else if (shape === "squircle") {
|
|
2226
|
+
builder.addDescriptor("borderCurve", "continuous");
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2158
2229
|
function parseVisibility(declaration, builder) {
|
|
2159
2230
|
if (declaration.value === "visible") {
|
|
2160
2231
|
builder.addDescriptor("opacity", 1);
|
|
@@ -2164,6 +2235,14 @@ function parseVisibility(declaration, builder) {
|
|
|
2164
2235
|
builder.addWarning("value", declaration.value);
|
|
2165
2236
|
}
|
|
2166
2237
|
}
|
|
2238
|
+
function parseOutlineStyle(declaration, builder) {
|
|
2239
|
+
const allowed = ["solid", "dotted", "dashed"];
|
|
2240
|
+
if (declaration.value.type !== "auto" && allowed.includes(declaration.value.value)) {
|
|
2241
|
+
builder.addDescriptor("outlineStyle", declaration.value.value);
|
|
2242
|
+
} else {
|
|
2243
|
+
builder.addWarning("value", declaration.value.type === "auto" ? "auto" : declaration.value.value);
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2167
2246
|
function parseFilter(declaration, builder) {
|
|
2168
2247
|
if (declaration.value.type === "none") {
|
|
2169
2248
|
return "unset";
|