@stylexjs/shared 0.7.5 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/convert-to-className.js +2 -2
- package/lib/generate-css-rule.js +1 -1
- package/lib/index.js +2 -2
- package/lib/physical-rtl/generate-ltr.d.ts +3 -1
- package/lib/physical-rtl/generate-ltr.js +8 -12
- package/lib/physical-rtl/generate-ltr.js.flow +2 -2
- package/lib/physical-rtl/generate-rtl.d.ts +2 -2
- package/lib/physical-rtl/generate-rtl.js +57 -64
- package/lib/physical-rtl/generate-rtl.js.flow +2 -2
- package/lib/preprocess-rules/application-order.d.ts +4 -111
- package/lib/preprocess-rules/application-order.js.flow +3 -110
- package/lib/preprocess-rules/basic-validation.js +1 -1
- package/lib/preprocess-rules/flatten-raw-style-obj.js +1 -1
- package/lib/preprocess-rules/index.js +1 -1
- package/lib/preprocess-rules/legacy-expand-shorthands.d.ts +3 -38
- package/lib/preprocess-rules/legacy-expand-shorthands.js +1 -1
- package/lib/preprocess-rules/legacy-expand-shorthands.js.flow +3 -38
- package/lib/preprocess-rules/property-specificity.d.ts +4 -15
- package/lib/preprocess-rules/property-specificity.js.flow +3 -14
- package/lib/stylex-create-theme.js +2 -2
- package/lib/stylex-define-vars.d.ts +8 -5
- package/lib/stylex-define-vars.js +2 -2
- package/lib/stylex-define-vars.js.flow +5 -1
- package/lib/stylex-include.js +1 -1
- package/lib/stylex-keyframes.js +1 -1
- package/lib/transform-value.js +7 -4
- package/lib/types/index.js.flow +1 -1
- package/lib/utils/normalize-value.js +1 -1
- package/lib/utils/normalizers/convert-camel-case-values.js +1 -1
- package/lib/utils/normalizers/detect-unclosed-fns.js +1 -1
- package/lib/utils/normalizers/font-size-px-to-rem.js +1 -1
- package/lib/utils/normalizers/leading-zero.js +1 -1
- package/lib/utils/normalizers/timings.js +1 -1
- package/lib/utils/normalizers/zero-dimensions.js +1 -1
- package/lib/utils/object-utils.d.ts +3 -2
- package/lib/utils/object-utils.js.flow +5 -2
- package/lib/utils/property-priorities.d.ts +3 -56
- package/lib/utils/property-priorities.js.flow +56 -56
- package/lib/utils/split-css-value.js +1 -1
- package/package.json +2 -2
@@ -13,8 +13,8 @@ var _defaultOptions = require("./utils/default-options");
|
|
13
13
|
var _objectUtils = require("./utils/object-utils");
|
14
14
|
var messages = _interopRequireWildcard(require("./messages"));
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
17
|
-
function _interopRequireDefault(
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
18
18
|
function convertStyleToClassName(objEntry, pseudos, atRules) {
|
19
19
|
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _defaultOptions.defaultOptions;
|
20
20
|
const {
|
package/lib/generate-css-rule.js
CHANGED
@@ -8,7 +8,7 @@ var _generateLtr = _interopRequireDefault(require("./physical-rtl/generate-ltr")
|
|
8
8
|
var _generateRtl = _interopRequireDefault(require("./physical-rtl/generate-rtl"));
|
9
9
|
var _genCSSRule = require("./utils/genCSSRule");
|
10
10
|
var _propertyPriorities = _interopRequireDefault(require("./utils/property-priorities"));
|
11
|
-
function _interopRequireDefault(
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
12
|
function generateRule(className, key, value, pseudos, atRules) {
|
13
13
|
const pairs = Array.isArray(value) ? value.map(eachValue => [key, eachValue]) : [[key, value]];
|
14
14
|
const ltrPairs = pairs.map(_generateLtr.default);
|
package/lib/index.js
CHANGED
@@ -17,8 +17,8 @@ var _types = _interopRequireWildcard(require("./types"));
|
|
17
17
|
exports.types = _types;
|
18
18
|
var _propertyPriorities = require("./utils/property-priorities");
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
21
|
-
function _interopRequireDefault(
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
22
22
|
const create = exports.create = _stylexCreate.default;
|
23
23
|
const defineVars = exports.defineVars = _stylexDefineVars.default;
|
24
24
|
const createTheme = exports.createTheme = _stylexCreateTheme.default;
|
@@ -73,28 +73,24 @@ const propertyToLTR = {
|
|
73
73
|
let [_key, val] = _ref16;
|
74
74
|
return ['border-bottom-right-radius', val];
|
75
75
|
},
|
76
|
-
|
76
|
+
float: _ref17 => {
|
77
77
|
let [key, val] = _ref17;
|
78
78
|
return [key, logicalToPhysical[val] ?? val];
|
79
79
|
},
|
80
|
-
|
80
|
+
clear: _ref18 => {
|
81
81
|
let [key, val] = _ref18;
|
82
82
|
return [key, logicalToPhysical[val] ?? val];
|
83
83
|
},
|
84
|
-
|
85
|
-
let [
|
86
|
-
return [key, logicalToPhysical[val] ?? val];
|
87
|
-
},
|
88
|
-
start: _ref20 => {
|
89
|
-
let [_key, val] = _ref20;
|
84
|
+
start: _ref19 => {
|
85
|
+
let [_key, val] = _ref19;
|
90
86
|
return ['left', val];
|
91
87
|
},
|
92
|
-
end:
|
93
|
-
let [_key, val] =
|
88
|
+
end: _ref20 => {
|
89
|
+
let [_key, val] = _ref20;
|
94
90
|
return ['right', val];
|
95
91
|
},
|
96
|
-
'background-position':
|
97
|
-
let [key, val] =
|
92
|
+
'background-position': _ref21 => {
|
93
|
+
let [key, val] = _ref21;
|
98
94
|
return [key, val.split(' ').map(word => word === 'start' ? 'left' : word === 'end' ? 'right' : word).join(' ')];
|
99
95
|
}
|
100
96
|
};
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = generateRTL;
|
7
7
|
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
const cursorFlip = {
|
10
10
|
'e-resize': 'w-resize',
|
11
11
|
'w-resize': 'e-resize',
|
@@ -60,123 +60,116 @@ function flipShadow(value) {
|
|
60
60
|
return rtl;
|
61
61
|
}
|
62
62
|
}
|
63
|
-
const shadowsFlip = {
|
64
|
-
'box-shadow': _ref => {
|
65
|
-
let [key, val] = _ref;
|
66
|
-
const rtlVal = flipShadow(val);
|
67
|
-
return rtlVal ? [key, rtlVal] : null;
|
68
|
-
},
|
69
|
-
'text-shadow': _ref2 => {
|
70
|
-
let [key, val] = _ref2;
|
71
|
-
const rtlVal = flipShadow(val);
|
72
|
-
return rtlVal ? [key, rtlVal] : null;
|
73
|
-
}
|
74
|
-
};
|
75
63
|
const logicalToPhysical = {
|
76
64
|
start: 'right',
|
77
65
|
end: 'left'
|
78
66
|
};
|
79
67
|
const propertyToRTL = {
|
80
|
-
'margin-start':
|
81
|
-
let [_key, val] =
|
68
|
+
'margin-start': _ref => {
|
69
|
+
let [_key, val] = _ref;
|
82
70
|
return ['margin-right', val];
|
83
71
|
},
|
84
|
-
'margin-end':
|
85
|
-
let [_key, val] =
|
72
|
+
'margin-end': _ref2 => {
|
73
|
+
let [_key, val] = _ref2;
|
86
74
|
return ['margin-left', val];
|
87
75
|
},
|
88
|
-
'padding-start':
|
89
|
-
let [_key, val] =
|
76
|
+
'padding-start': _ref3 => {
|
77
|
+
let [_key, val] = _ref3;
|
90
78
|
return ['padding-right', val];
|
91
79
|
},
|
92
|
-
'padding-end':
|
93
|
-
let [_key, val] =
|
80
|
+
'padding-end': _ref4 => {
|
81
|
+
let [_key, val] = _ref4;
|
94
82
|
return ['padding-left', val];
|
95
83
|
},
|
96
|
-
'border-start':
|
97
|
-
let [_key, val] =
|
84
|
+
'border-start': _ref5 => {
|
85
|
+
let [_key, val] = _ref5;
|
98
86
|
return ['border-right', val];
|
99
87
|
},
|
100
|
-
'border-end':
|
101
|
-
let [_key, val] =
|
88
|
+
'border-end': _ref6 => {
|
89
|
+
let [_key, val] = _ref6;
|
102
90
|
return ['border-left', val];
|
103
91
|
},
|
104
|
-
'border-start-width':
|
105
|
-
let [_key, val] =
|
92
|
+
'border-start-width': _ref7 => {
|
93
|
+
let [_key, val] = _ref7;
|
106
94
|
return ['border-right-width', val];
|
107
95
|
},
|
108
|
-
'border-end-width':
|
109
|
-
let [_key, val] =
|
96
|
+
'border-end-width': _ref8 => {
|
97
|
+
let [_key, val] = _ref8;
|
110
98
|
return ['border-left-width', val];
|
111
99
|
},
|
112
|
-
'border-start-color':
|
113
|
-
let [_key, val] =
|
100
|
+
'border-start-color': _ref9 => {
|
101
|
+
let [_key, val] = _ref9;
|
114
102
|
return ['border-right-color', val];
|
115
103
|
},
|
116
|
-
'border-end-color':
|
117
|
-
let [_key, val] =
|
104
|
+
'border-end-color': _ref10 => {
|
105
|
+
let [_key, val] = _ref10;
|
118
106
|
return ['border-left-color', val];
|
119
107
|
},
|
120
|
-
'border-start-style':
|
121
|
-
let [_key, val] =
|
108
|
+
'border-start-style': _ref11 => {
|
109
|
+
let [_key, val] = _ref11;
|
122
110
|
return ['border-right-style', val];
|
123
111
|
},
|
124
|
-
'border-end-style':
|
125
|
-
let [_key, val] =
|
112
|
+
'border-end-style': _ref12 => {
|
113
|
+
let [_key, val] = _ref12;
|
126
114
|
return ['border-left-style', val];
|
127
115
|
},
|
128
|
-
'border-top-start-radius':
|
129
|
-
let [_key, val] =
|
116
|
+
'border-top-start-radius': _ref13 => {
|
117
|
+
let [_key, val] = _ref13;
|
130
118
|
return ['border-top-right-radius', val];
|
131
119
|
},
|
132
|
-
'border-bottom-start-radius':
|
133
|
-
let [_key, val] =
|
120
|
+
'border-bottom-start-radius': _ref14 => {
|
121
|
+
let [_key, val] = _ref14;
|
134
122
|
return ['border-bottom-right-radius', val];
|
135
123
|
},
|
136
|
-
'border-top-end-radius':
|
137
|
-
let [_key, val] =
|
124
|
+
'border-top-end-radius': _ref15 => {
|
125
|
+
let [_key, val] = _ref15;
|
138
126
|
return ['border-top-left-radius', val];
|
139
127
|
},
|
140
|
-
'border-bottom-end-radius':
|
141
|
-
let [_key, val] =
|
128
|
+
'border-bottom-end-radius': _ref16 => {
|
129
|
+
let [_key, val] = _ref16;
|
142
130
|
return ['border-bottom-left-radius', val];
|
143
131
|
},
|
144
|
-
|
145
|
-
let [key, val] =
|
132
|
+
float: _ref17 => {
|
133
|
+
let [key, val] = _ref17;
|
146
134
|
return logicalToPhysical[val] != null ? [key, logicalToPhysical[val]] : null;
|
147
135
|
},
|
148
|
-
|
149
|
-
let [key, val] =
|
136
|
+
clear: _ref18 => {
|
137
|
+
let [key, val] = _ref18;
|
150
138
|
return logicalToPhysical[val] != null ? [key, logicalToPhysical[val]] : null;
|
151
139
|
},
|
152
|
-
|
153
|
-
let [
|
154
|
-
return logicalToPhysical[val] != null ? [key, logicalToPhysical[val]] : null;
|
155
|
-
},
|
156
|
-
start: _ref22 => {
|
157
|
-
let [_key, val] = _ref22;
|
140
|
+
start: _ref19 => {
|
141
|
+
let [_key, val] = _ref19;
|
158
142
|
return ['right', val];
|
159
143
|
},
|
160
|
-
end:
|
161
|
-
let [_key, val] =
|
144
|
+
end: _ref20 => {
|
145
|
+
let [_key, val] = _ref20;
|
162
146
|
return ['left', val];
|
163
147
|
},
|
164
|
-
'background-position':
|
165
|
-
let [key, val] =
|
148
|
+
'background-position': _ref21 => {
|
149
|
+
let [key, val] = _ref21;
|
166
150
|
const words = val.split(' ');
|
167
151
|
if (!words.includes('start') && !words.includes('end')) {
|
168
152
|
return null;
|
169
153
|
}
|
170
154
|
return [key, words.map(word => word === 'start' ? 'right' : word === 'end' ? 'left' : word).join(' ')];
|
171
155
|
},
|
172
|
-
cursor:
|
173
|
-
let [key, val] =
|
156
|
+
cursor: _ref22 => {
|
157
|
+
let [key, val] = _ref22;
|
174
158
|
return cursorFlip[val] != null ? [key, cursorFlip[val]] : null;
|
175
159
|
},
|
176
|
-
|
160
|
+
'box-shadow': _ref23 => {
|
161
|
+
let [key, val] = _ref23;
|
162
|
+
const rtlVal = flipShadow(val);
|
163
|
+
return rtlVal ? [key, rtlVal] : null;
|
164
|
+
},
|
165
|
+
'text-shadow': _ref24 => {
|
166
|
+
let [key, val] = _ref24;
|
167
|
+
const rtlVal = flipShadow(val);
|
168
|
+
return rtlVal ? [key, rtlVal] : null;
|
169
|
+
}
|
177
170
|
};
|
178
|
-
function generateRTL(
|
179
|
-
let [key, value] =
|
171
|
+
function generateRTL(_ref25) {
|
172
|
+
let [key, value] = _ref25;
|
180
173
|
if (propertyToRTL[key]) {
|
181
174
|
return propertyToRTL[key]([key, value]);
|
182
175
|
}
|
@@ -111,116 +111,9 @@ import type { TStyleValue } from '../common-types';
|
|
111
111
|
*/
|
112
112
|
|
113
113
|
type TReturn = ReadonlyArray<[string, TStyleValue]>;
|
114
|
-
declare const shorthands: {
|
115
|
-
|
116
|
-
|
117
|
-
animationRange: (value: TStyleValue) => TReturn;
|
118
|
-
background: (value: TStyleValue) => TReturn;
|
119
|
-
backgroundPosition: (value: TStyleValue) => TReturn;
|
120
|
-
border: (rawValue: TStyleValue) => TReturn;
|
121
|
-
borderInline: (rawValue: TStyleValue) => TReturn;
|
122
|
-
borderBlock: (rawValue: TStyleValue) => TReturn;
|
123
|
-
borderTop: (rawValue: TStyleValue) => TReturn;
|
124
|
-
borderInlineEnd: (rawValue: TStyleValue) => TReturn;
|
125
|
-
borderRight: (rawValue: TStyleValue) => TReturn;
|
126
|
-
borderBottom: (rawValue: TStyleValue) => TReturn;
|
127
|
-
borderInlineStart: (rawValue: TStyleValue) => TReturn;
|
128
|
-
borderLeft: (rawValue: TStyleValue) => TReturn;
|
129
|
-
borderInlineWidth: (rawValue: TStyleValue) => TReturn;
|
130
|
-
borderInlineStyle: (rawValue: TStyleValue) => TReturn;
|
131
|
-
borderInlineColor: (rawValue: TStyleValue) => TReturn;
|
132
|
-
borderBlockWidth: (rawValue: TStyleValue) => TReturn;
|
133
|
-
borderBlockStyle: (rawValue: TStyleValue) => TReturn;
|
134
|
-
borderBlockColor: (rawValue: TStyleValue) => TReturn;
|
135
|
-
borderColor: (value: TStyleValue) => TReturn;
|
136
|
-
borderStyle: (value: TStyleValue) => TReturn;
|
137
|
-
borderWidth: (value: TStyleValue) => TReturn;
|
138
|
-
borderInlineStartColor: (value: TStyleValue) => TReturn;
|
139
|
-
borderInlineEndColor: (value: TStyleValue) => TReturn;
|
140
|
-
borderInlineStartStyle: (value: TStyleValue) => TReturn;
|
141
|
-
borderInlineEndStyle: (value: TStyleValue) => TReturn;
|
142
|
-
borderInlineStartWidth: (value: TStyleValue) => TReturn;
|
143
|
-
borderInlineEndWidth: (value: TStyleValue) => TReturn;
|
144
|
-
borderLeftColor: (value: TStyleValue) => TReturn;
|
145
|
-
borderRightColor: (value: TStyleValue) => TReturn;
|
146
|
-
borderLeftStyle: (value: TStyleValue) => TReturn;
|
147
|
-
borderRightStyle: (value: TStyleValue) => TReturn;
|
148
|
-
borderLeftWidth: (value: TStyleValue) => TReturn;
|
149
|
-
borderRightWidth: (value: TStyleValue) => TReturn;
|
150
|
-
borderRadius: (value: TStyleValue) => TReturn;
|
151
|
-
borderStartStartRadius: (value: TStyleValue) => TReturn;
|
152
|
-
borderStartEndRadius: (value: TStyleValue) => TReturn;
|
153
|
-
borderEndStartRadius: (value: TStyleValue) => TReturn;
|
154
|
-
borderEndEndRadius: (value: TStyleValue) => TReturn;
|
155
|
-
borderTopLeftRadius: (value: TStyleValue) => TReturn;
|
156
|
-
borderTopRightRadius: (value: TStyleValue) => TReturn;
|
157
|
-
borderBottomLeftRadius: (value: TStyleValue) => TReturn;
|
158
|
-
borderBottomRightRadius: (value: TStyleValue) => TReturn;
|
159
|
-
borderImage: (value: TStyleValue) => TReturn;
|
160
|
-
columnRule: (value: TStyleValue) => TReturn;
|
161
|
-
columns: (value: TStyleValue) => TReturn;
|
162
|
-
container: (value: TStyleValue) => TReturn;
|
163
|
-
containIntrinsicSize: (value: TStyleValue) => TReturn;
|
164
|
-
flex: (value: TStyleValue) => TReturn;
|
165
|
-
flexFlow: (value: TStyleValue) => TReturn;
|
166
|
-
font: (value: TStyleValue) => TReturn;
|
167
|
-
fontVariant: (value: TStyleValue) => TReturn;
|
168
|
-
gap: (value: TStyleValue) => TReturn;
|
169
|
-
grid: (value: TStyleValue) => TReturn;
|
170
|
-
gridArea: (value: TStyleValue) => TReturn;
|
171
|
-
gridRow: (value: TStyleValue) => TReturn;
|
172
|
-
gridColumn: (value: TStyleValue) => TReturn;
|
173
|
-
gridTemplate: (value: TStyleValue) => TReturn;
|
174
|
-
inset: (value: TStyleValue) => TReturn;
|
175
|
-
insetInline: (value: TStyleValue) => TReturn;
|
176
|
-
insetBlock: (value: TStyleValue) => TReturn;
|
177
|
-
insetInlineStart: (value: TStyleValue) => TReturn;
|
178
|
-
insetInlineEnd: (value: TStyleValue) => TReturn;
|
179
|
-
left: (value: TStyleValue) => TReturn;
|
180
|
-
right: (value: TStyleValue) => TReturn;
|
181
|
-
listStyle: (value: TStyleValue) => TReturn;
|
182
|
-
margin: (value: TStyleValue) => TReturn;
|
183
|
-
marginInline: (value: TStyleValue) => TReturn;
|
184
|
-
marginBlock: (value: TStyleValue) => TReturn;
|
185
|
-
marginInlineStart: (value: TStyleValue) => TReturn;
|
186
|
-
marginInlineEnd: (value: TStyleValue) => TReturn;
|
187
|
-
marginLeft: (value: TStyleValue) => TReturn;
|
188
|
-
marginRight: (value: TStyleValue) => TReturn;
|
189
|
-
mask: (value: TStyleValue) => TReturn;
|
190
|
-
maskBorder: (value: TStyleValue) => TReturn;
|
191
|
-
offset: (value: TStyleValue) => TReturn;
|
192
|
-
outline: (value: TStyleValue) => TReturn;
|
193
|
-
overflow: (value: TStyleValue) => TReturn;
|
194
|
-
padding: (rawValue: TStyleValue) => TReturn;
|
195
|
-
paddingInline: (rawValue: TStyleValue) => TReturn;
|
196
|
-
paddingBlock: (rawValue: TStyleValue) => TReturn;
|
197
|
-
paddingInlineStart: (value: TStyleValue) => TReturn;
|
198
|
-
paddingInlineEnd: (value: TStyleValue) => TReturn;
|
199
|
-
paddingLeft: (value: TStyleValue) => TReturn;
|
200
|
-
paddingRight: (value: TStyleValue) => TReturn;
|
201
|
-
placeContent: (value: TStyleValue) => TReturn;
|
202
|
-
placeItems: (value: TStyleValue) => TReturn;
|
203
|
-
placeSelf: (value: TStyleValue) => TReturn;
|
204
|
-
scrollMargin: (value: TStyleValue) => TReturn;
|
205
|
-
scrollMarginBlock: (value: TStyleValue) => TReturn;
|
206
|
-
scrollMarginInline: (value: TStyleValue) => TReturn;
|
207
|
-
scrollMarginInlineStart: (value: TStyleValue) => TReturn;
|
208
|
-
scrollMarginInlineEnd: (value: TStyleValue) => TReturn;
|
209
|
-
scrollMarginLeft: (value: TStyleValue) => TReturn;
|
210
|
-
scrollMarginRight: (value: TStyleValue) => TReturn;
|
211
|
-
scrollPadding: (value: TStyleValue) => TReturn;
|
212
|
-
scrollPaddingBlock: (value: TStyleValue) => TReturn;
|
213
|
-
scrollPaddingInline: (value: TStyleValue) => TReturn;
|
214
|
-
scrollPaddingInlineStart: (value: TStyleValue) => TReturn;
|
215
|
-
scrollPaddingInlineEnd: (value: TStyleValue) => TReturn;
|
216
|
-
scrollPaddingLeft: (value: TStyleValue) => TReturn;
|
217
|
-
scrollPaddingRight: (value: TStyleValue) => TReturn;
|
218
|
-
scrollSnapType: (value: TStyleValue) => TReturn;
|
219
|
-
scrollTimeline: (value: TStyleValue) => TReturn;
|
220
|
-
textDecoration: (value: TStyleValue) => TReturn;
|
221
|
-
textEmphasis: (value: TStyleValue) => TReturn;
|
222
|
-
transition: (value: TStyleValue) => TReturn;
|
223
|
-
};
|
114
|
+
declare const shorthands: Readonly<{
|
115
|
+
[key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
|
116
|
+
}>;
|
224
117
|
declare const aliases: {
|
225
118
|
borderHorizontal: any;
|
226
119
|
borderVertical: any;
|
@@ -283,7 +176,7 @@ declare const aliases: {
|
|
283
176
|
end: any;
|
284
177
|
};
|
285
178
|
declare const $$EXPORT_DEFAULT_DECLARATION$$: Readonly</**
|
286
|
-
* >
|
179
|
+
* > 132 | ...typeof shorthands,
|
287
180
|
* | ^^^^^^^^^^^^^^^^^^^^ Unsupported feature: Translating "object types with complex spreads" is currently not supported.
|
288
181
|
**/
|
289
182
|
any>;
|
@@ -62,116 +62,9 @@ import type { TStyleValue } from '../common-types';
|
|
62
62
|
|
63
63
|
type TReturn = $ReadOnlyArray<[string, TStyleValue]>;
|
64
64
|
|
65
|
-
declare const shorthands: {
|
66
|
-
|
67
|
-
|
68
|
-
animationRange: (value: TStyleValue) => TReturn,
|
69
|
-
background: (value: TStyleValue) => TReturn,
|
70
|
-
backgroundPosition: (value: TStyleValue) => TReturn,
|
71
|
-
border: (rawValue: TStyleValue) => TReturn,
|
72
|
-
borderInline: (rawValue: TStyleValue) => TReturn,
|
73
|
-
borderBlock: (rawValue: TStyleValue) => TReturn,
|
74
|
-
borderTop: (rawValue: TStyleValue) => TReturn,
|
75
|
-
borderInlineEnd: (rawValue: TStyleValue) => TReturn,
|
76
|
-
borderRight: (rawValue: TStyleValue) => TReturn,
|
77
|
-
borderBottom: (rawValue: TStyleValue) => TReturn,
|
78
|
-
borderInlineStart: (rawValue: TStyleValue) => TReturn,
|
79
|
-
borderLeft: (rawValue: TStyleValue) => TReturn,
|
80
|
-
borderInlineWidth: (rawValue: TStyleValue) => TReturn,
|
81
|
-
borderInlineStyle: (rawValue: TStyleValue) => TReturn,
|
82
|
-
borderInlineColor: (rawValue: TStyleValue) => TReturn,
|
83
|
-
borderBlockWidth: (rawValue: TStyleValue) => TReturn,
|
84
|
-
borderBlockStyle: (rawValue: TStyleValue) => TReturn,
|
85
|
-
borderBlockColor: (rawValue: TStyleValue) => TReturn,
|
86
|
-
borderColor: (value: TStyleValue) => TReturn,
|
87
|
-
borderStyle: (value: TStyleValue) => TReturn,
|
88
|
-
borderWidth: (value: TStyleValue) => TReturn,
|
89
|
-
borderInlineStartColor: (value: TStyleValue) => TReturn,
|
90
|
-
borderInlineEndColor: (value: TStyleValue) => TReturn,
|
91
|
-
borderInlineStartStyle: (value: TStyleValue) => TReturn,
|
92
|
-
borderInlineEndStyle: (value: TStyleValue) => TReturn,
|
93
|
-
borderInlineStartWidth: (value: TStyleValue) => TReturn,
|
94
|
-
borderInlineEndWidth: (value: TStyleValue) => TReturn,
|
95
|
-
borderLeftColor: (value: TStyleValue) => TReturn,
|
96
|
-
borderRightColor: (value: TStyleValue) => TReturn,
|
97
|
-
borderLeftStyle: (value: TStyleValue) => TReturn,
|
98
|
-
borderRightStyle: (value: TStyleValue) => TReturn,
|
99
|
-
borderLeftWidth: (value: TStyleValue) => TReturn,
|
100
|
-
borderRightWidth: (value: TStyleValue) => TReturn,
|
101
|
-
borderRadius: (value: TStyleValue) => TReturn,
|
102
|
-
borderStartStartRadius: (value: TStyleValue) => TReturn,
|
103
|
-
borderStartEndRadius: (value: TStyleValue) => TReturn,
|
104
|
-
borderEndStartRadius: (value: TStyleValue) => TReturn,
|
105
|
-
borderEndEndRadius: (value: TStyleValue) => TReturn,
|
106
|
-
borderTopLeftRadius: (value: TStyleValue) => TReturn,
|
107
|
-
borderTopRightRadius: (value: TStyleValue) => TReturn,
|
108
|
-
borderBottomLeftRadius: (value: TStyleValue) => TReturn,
|
109
|
-
borderBottomRightRadius: (value: TStyleValue) => TReturn,
|
110
|
-
borderImage: (value: TStyleValue) => TReturn,
|
111
|
-
columnRule: (value: TStyleValue) => TReturn,
|
112
|
-
columns: (value: TStyleValue) => TReturn,
|
113
|
-
container: (value: TStyleValue) => TReturn,
|
114
|
-
containIntrinsicSize: (value: TStyleValue) => TReturn,
|
115
|
-
flex: (value: TStyleValue) => TReturn,
|
116
|
-
flexFlow: (value: TStyleValue) => TReturn,
|
117
|
-
font: (value: TStyleValue) => TReturn,
|
118
|
-
fontVariant: (value: TStyleValue) => TReturn,
|
119
|
-
gap: (value: TStyleValue) => TReturn,
|
120
|
-
grid: (value: TStyleValue) => TReturn,
|
121
|
-
gridArea: (value: TStyleValue) => TReturn,
|
122
|
-
gridRow: (value: TStyleValue) => TReturn,
|
123
|
-
gridColumn: (value: TStyleValue) => TReturn,
|
124
|
-
gridTemplate: (value: TStyleValue) => TReturn,
|
125
|
-
inset: (value: TStyleValue) => TReturn,
|
126
|
-
insetInline: (value: TStyleValue) => TReturn,
|
127
|
-
insetBlock: (value: TStyleValue) => TReturn,
|
128
|
-
insetInlineStart: (value: TStyleValue) => TReturn,
|
129
|
-
insetInlineEnd: (value: TStyleValue) => TReturn,
|
130
|
-
left: (value: TStyleValue) => TReturn,
|
131
|
-
right: (value: TStyleValue) => TReturn,
|
132
|
-
listStyle: (value: TStyleValue) => TReturn,
|
133
|
-
margin: (value: TStyleValue) => TReturn,
|
134
|
-
marginInline: (value: TStyleValue) => TReturn,
|
135
|
-
marginBlock: (value: TStyleValue) => TReturn,
|
136
|
-
marginInlineStart: (value: TStyleValue) => TReturn,
|
137
|
-
marginInlineEnd: (value: TStyleValue) => TReturn,
|
138
|
-
marginLeft: (value: TStyleValue) => TReturn,
|
139
|
-
marginRight: (value: TStyleValue) => TReturn,
|
140
|
-
mask: (value: TStyleValue) => TReturn,
|
141
|
-
maskBorder: (value: TStyleValue) => TReturn,
|
142
|
-
offset: (value: TStyleValue) => TReturn,
|
143
|
-
outline: (value: TStyleValue) => TReturn,
|
144
|
-
overflow: (value: TStyleValue) => TReturn,
|
145
|
-
padding: (rawValue: TStyleValue) => TReturn,
|
146
|
-
paddingInline: (rawValue: TStyleValue) => TReturn,
|
147
|
-
paddingBlock: (rawValue: TStyleValue) => TReturn,
|
148
|
-
paddingInlineStart: (value: TStyleValue) => TReturn,
|
149
|
-
paddingInlineEnd: (value: TStyleValue) => TReturn,
|
150
|
-
paddingLeft: (value: TStyleValue) => TReturn,
|
151
|
-
paddingRight: (value: TStyleValue) => TReturn,
|
152
|
-
placeContent: (value: TStyleValue) => TReturn,
|
153
|
-
placeItems: (value: TStyleValue) => TReturn,
|
154
|
-
placeSelf: (value: TStyleValue) => TReturn,
|
155
|
-
scrollMargin: (value: TStyleValue) => TReturn,
|
156
|
-
scrollMarginBlock: (value: TStyleValue) => TReturn,
|
157
|
-
scrollMarginInline: (value: TStyleValue) => TReturn,
|
158
|
-
scrollMarginInlineStart: (value: TStyleValue) => TReturn,
|
159
|
-
scrollMarginInlineEnd: (value: TStyleValue) => TReturn,
|
160
|
-
scrollMarginLeft: (value: TStyleValue) => TReturn,
|
161
|
-
scrollMarginRight: (value: TStyleValue) => TReturn,
|
162
|
-
scrollPadding: (value: TStyleValue) => TReturn,
|
163
|
-
scrollPaddingBlock: (value: TStyleValue) => TReturn,
|
164
|
-
scrollPaddingInline: (value: TStyleValue) => TReturn,
|
165
|
-
scrollPaddingInlineStart: (value: TStyleValue) => TReturn,
|
166
|
-
scrollPaddingInlineEnd: (value: TStyleValue) => TReturn,
|
167
|
-
scrollPaddingLeft: (value: TStyleValue) => TReturn,
|
168
|
-
scrollPaddingRight: (value: TStyleValue) => TReturn,
|
169
|
-
scrollSnapType: (value: TStyleValue) => TReturn,
|
170
|
-
scrollTimeline: (value: TStyleValue) => TReturn,
|
171
|
-
textDecoration: (value: TStyleValue) => TReturn,
|
172
|
-
textEmphasis: (value: TStyleValue) => TReturn,
|
173
|
-
transition: (value: TStyleValue) => TReturn,
|
174
|
-
};
|
65
|
+
declare const shorthands: $ReadOnly<{
|
66
|
+
[key: string]: (TStyleValue) => TReturn,
|
67
|
+
}>;
|
175
68
|
|
176
69
|
declare const aliases: {
|
177
70
|
borderHorizontal: $FlowFixMe,
|
@@ -8,7 +8,7 @@ var _stylexInclude = require("../stylex-include");
|
|
8
8
|
var messages = _interopRequireWildcard(require("../messages"));
|
9
9
|
var _objectUtils = require("../utils/object-utils");
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
12
12
|
function validateNamespace(namespace) {
|
13
13
|
let conditions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
14
14
|
if (!(0, _objectUtils.isPlainObject)(namespace)) {
|
@@ -8,7 +8,7 @@ exports.flattenRawStyleObject = flattenRawStyleObject;
|
|
8
8
|
var _index = _interopRequireDefault(require("./index"));
|
9
9
|
var _PreRule = require("./PreRule");
|
10
10
|
var _stylexInclude = require("../stylex-include");
|
11
|
-
function _interopRequireDefault(
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
12
|
function flattenRawStyleObject(style, options) {
|
13
13
|
return _flattenRawStyleObject(style, [], [], options);
|
14
14
|
}
|
@@ -8,7 +8,7 @@ exports.getExpandedKeys = getExpandedKeys;
|
|
8
8
|
var _applicationOrder = _interopRequireDefault(require("./application-order"));
|
9
9
|
var _legacyExpandShorthands = _interopRequireDefault(require("./legacy-expand-shorthands"));
|
10
10
|
var _propertySpecificity = _interopRequireDefault(require("./property-specificity"));
|
11
|
-
function _interopRequireDefault(
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
12
|
const expansions = {
|
13
13
|
'application-order': _applicationOrder.default,
|
14
14
|
'property-specificity': _propertySpecificity.default,
|
@@ -103,44 +103,9 @@ import type { TStyleValue } from '../common-types';
|
|
103
103
|
*/
|
104
104
|
|
105
105
|
type TReturn = ReadonlyArray<[string, TStyleValue]>;
|
106
|
-
declare const shorthands: {
|
107
|
-
|
108
|
-
|
109
|
-
borderHorizontal: (rawValue: TStyleValue) => TReturn;
|
110
|
-
borderStyle: (rawValue: TStyleValue) => TReturn;
|
111
|
-
borderVertical: (rawValue: TStyleValue) => TReturn;
|
112
|
-
borderWidth: (rawValue: TStyleValue) => TReturn;
|
113
|
-
borderHorizontalColor: (rawValue: TStyleValue) => TReturn;
|
114
|
-
borderHorizontalStyle: (rawValue: TStyleValue) => TReturn;
|
115
|
-
borderHorizontalWidth: (rawValue: TStyleValue) => TReturn;
|
116
|
-
borderVerticalColor: (rawValue: TStyleValue) => TReturn;
|
117
|
-
borderVerticalStyle: (rawValue: TStyleValue) => TReturn;
|
118
|
-
borderVerticalWidth: (rawValue: TStyleValue) => TReturn;
|
119
|
-
borderRadius: (rawValue: TStyleValue) => TReturn;
|
120
|
-
inset: (rawValue: TStyleValue) => TReturn;
|
121
|
-
insetInline: (rawValue: TStyleValue) => TReturn;
|
122
|
-
insetBlock: (rawValue: TStyleValue) => TReturn;
|
123
|
-
start: (rawValue: TStyleValue) => TReturn;
|
124
|
-
end: (rawValue: TStyleValue) => TReturn;
|
125
|
-
left: (rawValue: TStyleValue) => TReturn;
|
126
|
-
right: (rawValue: TStyleValue) => TReturn;
|
127
|
-
gap: (rawValue: TStyleValue) => TReturn;
|
128
|
-
margin: (rawValue: TStyleValue) => TReturn;
|
129
|
-
marginHorizontal: (rawValue: TStyleValue) => TReturn;
|
130
|
-
marginStart: (rawValue: TStyleValue) => TReturn;
|
131
|
-
marginEnd: (rawValue: TStyleValue) => TReturn;
|
132
|
-
marginLeft: (rawValue: TStyleValue) => TReturn;
|
133
|
-
marginRight: (rawValue: TStyleValue) => TReturn;
|
134
|
-
marginVertical: (rawValue: TStyleValue) => TReturn;
|
135
|
-
overflow: (rawValue: TStyleValue) => TReturn;
|
136
|
-
padding: (rawValue: TStyleValue) => TReturn;
|
137
|
-
paddingHorizontal: (val: TStyleValue) => TReturn;
|
138
|
-
paddingStart: (val: TStyleValue) => TReturn;
|
139
|
-
paddingEnd: (val: TStyleValue) => TReturn;
|
140
|
-
paddingLeft: (val: TStyleValue) => TReturn;
|
141
|
-
paddingRight: (val: TStyleValue) => TReturn;
|
142
|
-
paddingVertical: (val: TStyleValue) => TReturn;
|
143
|
-
};
|
106
|
+
declare const shorthands: Readonly<{
|
107
|
+
[key: string]: ($$PARAM_0$$: TStyleValue) => TReturn;
|
108
|
+
}>;
|
144
109
|
declare const aliases: {
|
145
110
|
insetBlockStart: (val: TStyleValue) => TReturn;
|
146
111
|
insetBlockEnd: (val: TStyleValue) => TReturn;
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
var _splitCssValue = _interopRequireDefault(require("../utils/split-css-value"));
|
8
|
-
function _interopRequireDefault(
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
9
|
const shorthands = {
|
10
10
|
border: rawValue => {
|
11
11
|
return [['borderTop', rawValue], ['borderEnd', rawValue], ['borderBottom', rawValue], ['borderStart', rawValue]];
|