@storybook/react-native-theming 9.1.1-alpha.0 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +217 -202
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as RN from 'react-native';
|
|
2
|
-
import { ImageSourcePropType, ImageProps
|
|
2
|
+
import { TextStyle, ImageSourcePropType, ImageProps } from 'react-native';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
|
|
@@ -495,4 +495,4 @@ type StorybookTheme = StorybookThemeWeb;
|
|
|
495
495
|
declare const theme: StorybookThemeWeb;
|
|
496
496
|
declare const darkTheme: StorybookThemeWeb;
|
|
497
497
|
|
|
498
|
-
export { StorybookTheme, StyledComponent, ThemeProvider, darkTheme, styled, theme, useTheme, withTheme };
|
|
498
|
+
export { type StorybookTheme, type StyledComponent, ThemeProvider, darkTheme, styled, theme, useTheme, withTheme };
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
|
|
32
32
|
// ../../node_modules/postcss-value-parser/lib/parse.js
|
|
33
33
|
var require_parse = __commonJS({
|
|
34
|
-
"../../node_modules/postcss-value-parser/lib/parse.js"(
|
|
34
|
+
"../../node_modules/postcss-value-parser/lib/parse.js"(exports2, module2) {
|
|
35
35
|
var openParentheses = "(".charCodeAt(0);
|
|
36
36
|
var closeParentheses = ")".charCodeAt(0);
|
|
37
37
|
var singleQuote = "'".charCodeAt(0);
|
|
@@ -281,7 +281,7 @@ var require_parse = __commonJS({
|
|
|
281
281
|
|
|
282
282
|
// ../../node_modules/postcss-value-parser/lib/walk.js
|
|
283
283
|
var require_walk = __commonJS({
|
|
284
|
-
"../../node_modules/postcss-value-parser/lib/walk.js"(
|
|
284
|
+
"../../node_modules/postcss-value-parser/lib/walk.js"(exports2, module2) {
|
|
285
285
|
module2.exports = function walk(nodes, cb, bubble) {
|
|
286
286
|
var i, max, node2, result;
|
|
287
287
|
for (i = 0, max = nodes.length; i < max; i += 1) {
|
|
@@ -302,7 +302,7 @@ var require_walk = __commonJS({
|
|
|
302
302
|
|
|
303
303
|
// ../../node_modules/postcss-value-parser/lib/stringify.js
|
|
304
304
|
var require_stringify = __commonJS({
|
|
305
|
-
"../../node_modules/postcss-value-parser/lib/stringify.js"(
|
|
305
|
+
"../../node_modules/postcss-value-parser/lib/stringify.js"(exports2, module2) {
|
|
306
306
|
function stringifyNode(node2, custom) {
|
|
307
307
|
var type = node2.type;
|
|
308
308
|
var value = node2.value;
|
|
@@ -345,7 +345,7 @@ var require_stringify = __commonJS({
|
|
|
345
345
|
|
|
346
346
|
// ../../node_modules/postcss-value-parser/lib/unit.js
|
|
347
347
|
var require_unit = __commonJS({
|
|
348
|
-
"../../node_modules/postcss-value-parser/lib/unit.js"(
|
|
348
|
+
"../../node_modules/postcss-value-parser/lib/unit.js"(exports2, module2) {
|
|
349
349
|
var minus = "-".charCodeAt(0);
|
|
350
350
|
var plus = "+".charCodeAt(0);
|
|
351
351
|
var dot = ".".charCodeAt(0);
|
|
@@ -432,7 +432,7 @@ var require_unit = __commonJS({
|
|
|
432
432
|
|
|
433
433
|
// ../../node_modules/postcss-value-parser/lib/index.js
|
|
434
434
|
var require_lib = __commonJS({
|
|
435
|
-
"../../node_modules/postcss-value-parser/lib/index.js"(
|
|
435
|
+
"../../node_modules/postcss-value-parser/lib/index.js"(exports2, module2) {
|
|
436
436
|
var parse2 = require_parse();
|
|
437
437
|
var walk = require_walk();
|
|
438
438
|
var stringify2 = require_stringify();
|
|
@@ -459,7 +459,7 @@ var require_lib = __commonJS({
|
|
|
459
459
|
|
|
460
460
|
// ../../node_modules/camelize/index.js
|
|
461
461
|
var require_camelize = __commonJS({
|
|
462
|
-
"../../node_modules/camelize/index.js"(
|
|
462
|
+
"../../node_modules/camelize/index.js"(exports2, module2) {
|
|
463
463
|
"use strict";
|
|
464
464
|
module2.exports = function(obj) {
|
|
465
465
|
if (typeof obj === "string") {
|
|
@@ -531,7 +531,7 @@ var require_camelize = __commonJS({
|
|
|
531
531
|
|
|
532
532
|
// ../../node_modules/css-color-keywords/colors.json
|
|
533
533
|
var require_colors = __commonJS({
|
|
534
|
-
"../../node_modules/css-color-keywords/colors.json"(
|
|
534
|
+
"../../node_modules/css-color-keywords/colors.json"(exports2, module2) {
|
|
535
535
|
module2.exports = {
|
|
536
536
|
black: "#000000",
|
|
537
537
|
silver: "#c0c0c0",
|
|
@@ -685,7 +685,7 @@ var require_colors = __commonJS({
|
|
|
685
685
|
|
|
686
686
|
// ../../node_modules/css-color-keywords/index.js
|
|
687
687
|
var require_css_color_keywords = __commonJS({
|
|
688
|
-
"../../node_modules/css-color-keywords/index.js"(
|
|
688
|
+
"../../node_modules/css-color-keywords/index.js"(exports2, module2) {
|
|
689
689
|
"use strict";
|
|
690
690
|
module2.exports = require_colors();
|
|
691
691
|
}
|
|
@@ -693,9 +693,9 @@ var require_css_color_keywords = __commonJS({
|
|
|
693
693
|
|
|
694
694
|
// ../../node_modules/css-to-react-native/index.js
|
|
695
695
|
var require_css_to_react_native = __commonJS({
|
|
696
|
-
"../../node_modules/css-to-react-native/index.js"(
|
|
696
|
+
"../../node_modules/css-to-react-native/index.js"(exports2) {
|
|
697
697
|
"use strict";
|
|
698
|
-
Object.defineProperty(
|
|
698
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
699
699
|
value: true
|
|
700
700
|
});
|
|
701
701
|
function _interopDefault(ex) {
|
|
@@ -706,8 +706,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
706
706
|
var camelizeStyleName = _interopDefault(require_camelize());
|
|
707
707
|
var cssColorKeywords = _interopDefault(require_css_color_keywords());
|
|
708
708
|
var matchString = function matchString2(node2) {
|
|
709
|
-
if (node2.type !== "string")
|
|
710
|
-
return null;
|
|
709
|
+
if (node2.type !== "string") return null;
|
|
711
710
|
return node2.value.replace(/\\([0-9a-f]{1,6})(?:\s|$)/gi, function(match2, charCode) {
|
|
712
711
|
return String.fromCharCode(parseInt(charCode, 16));
|
|
713
712
|
}).replace(/\\/g, "");
|
|
@@ -745,11 +744,9 @@ var require_css_to_react_native = __commonJS({
|
|
|
745
744
|
transform3 = String;
|
|
746
745
|
}
|
|
747
746
|
return function(node2) {
|
|
748
|
-
if (node2.type !== "word")
|
|
749
|
-
return null;
|
|
747
|
+
if (node2.type !== "word") return null;
|
|
750
748
|
var match2 = node2.value.match(regExp);
|
|
751
|
-
if (match2 === null)
|
|
752
|
-
return null;
|
|
749
|
+
if (match2 === null) return null;
|
|
753
750
|
var value = transform3(match2[1]);
|
|
754
751
|
return value;
|
|
755
752
|
};
|
|
@@ -805,8 +802,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
805
802
|
}
|
|
806
803
|
var partsParsed = 0;
|
|
807
804
|
while (partsParsed < 3 && tokenStream.hasTokens()) {
|
|
808
|
-
if (partsParsed !== 0)
|
|
809
|
-
tokenStream.expect(SPACE);
|
|
805
|
+
if (partsParsed !== 0) tokenStream.expect(SPACE);
|
|
810
806
|
if (borderWidth2 === void 0 && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {
|
|
811
807
|
borderWidth2 = tokenStream.lastValue;
|
|
812
808
|
} else if (borderColor2 === void 0 && tokenStream.matches(COLOR)) {
|
|
@@ -819,12 +815,9 @@ var require_css_to_react_native = __commonJS({
|
|
|
819
815
|
partsParsed += 1;
|
|
820
816
|
}
|
|
821
817
|
tokenStream.expectEmpty();
|
|
822
|
-
if (borderWidth2 === void 0)
|
|
823
|
-
|
|
824
|
-
if (
|
|
825
|
-
borderColor2 = defaultBorderColor;
|
|
826
|
-
if (borderStyle === void 0)
|
|
827
|
-
borderStyle = defaultBorderStyle;
|
|
818
|
+
if (borderWidth2 === void 0) borderWidth2 = defaultBorderWidth;
|
|
819
|
+
if (borderColor2 === void 0) borderColor2 = defaultBorderColor;
|
|
820
|
+
if (borderStyle === void 0) borderStyle = defaultBorderStyle;
|
|
828
821
|
return {
|
|
829
822
|
borderWidth: borderWidth2,
|
|
830
823
|
borderColor: borderColor2,
|
|
@@ -876,8 +869,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
876
869
|
}
|
|
877
870
|
var didParseFirst = false;
|
|
878
871
|
while (tokenStream.hasTokens()) {
|
|
879
|
-
if (didParseFirst)
|
|
880
|
-
tokenStream.expect(SPACE);
|
|
872
|
+
if (didParseFirst) tokenStream.expect(SPACE);
|
|
881
873
|
if (offsetX === void 0 && tokenStream.matches(LENGTH, UNSUPPORTED_LENGTH_UNIT)) {
|
|
882
874
|
offsetX = tokenStream.lastValue;
|
|
883
875
|
tokenStream.expect(SPACE);
|
|
@@ -895,8 +887,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
895
887
|
}
|
|
896
888
|
didParseFirst = true;
|
|
897
889
|
}
|
|
898
|
-
if (offsetX === void 0)
|
|
899
|
-
tokenStream["throw"]();
|
|
890
|
+
if (offsetX === void 0) tokenStream["throw"]();
|
|
900
891
|
return {
|
|
901
892
|
offset: {
|
|
902
893
|
width: offsetX,
|
|
@@ -941,8 +932,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
941
932
|
tokenStream.rewind();
|
|
942
933
|
var partsParsed = 0;
|
|
943
934
|
while (partsParsed < 2 && tokenStream.hasTokens()) {
|
|
944
|
-
if (partsParsed !== 0)
|
|
945
|
-
tokenStream.expect(SPACE);
|
|
935
|
+
if (partsParsed !== 0) tokenStream.expect(SPACE);
|
|
946
936
|
if (flexGrow === void 0 && tokenStream.matches(NUMBER)) {
|
|
947
937
|
flexGrow = tokenStream.lastValue;
|
|
948
938
|
tokenStream.saveRewindPoint();
|
|
@@ -961,12 +951,9 @@ var require_css_to_react_native = __commonJS({
|
|
|
961
951
|
partsParsed += 1;
|
|
962
952
|
}
|
|
963
953
|
tokenStream.expectEmpty();
|
|
964
|
-
if (flexGrow === void 0)
|
|
965
|
-
|
|
966
|
-
if (
|
|
967
|
-
flexShrink = defaultFlexShrink;
|
|
968
|
-
if (flexBasis === void 0)
|
|
969
|
-
flexBasis = defaultFlexBasis;
|
|
954
|
+
if (flexGrow === void 0) flexGrow = defaultFlexGrow;
|
|
955
|
+
if (flexShrink === void 0) flexShrink = defaultFlexShrink;
|
|
956
|
+
if (flexBasis === void 0) flexBasis = defaultFlexBasis;
|
|
970
957
|
return {
|
|
971
958
|
flexGrow,
|
|
972
959
|
flexShrink,
|
|
@@ -982,8 +969,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
982
969
|
var flexDirection;
|
|
983
970
|
var partsParsed = 0;
|
|
984
971
|
while (partsParsed < 2 && tokenStream.hasTokens()) {
|
|
985
|
-
if (partsParsed !== 0)
|
|
986
|
-
tokenStream.expect(SPACE);
|
|
972
|
+
if (partsParsed !== 0) tokenStream.expect(SPACE);
|
|
987
973
|
if (flexWrap === void 0 && tokenStream.matches(FLEX_WRAP)) {
|
|
988
974
|
flexWrap = tokenStream.lastValue;
|
|
989
975
|
} else if (flexDirection === void 0 && tokenStream.matches(FLEX_DIRECTION)) {
|
|
@@ -994,10 +980,8 @@ var require_css_to_react_native = __commonJS({
|
|
|
994
980
|
partsParsed += 1;
|
|
995
981
|
}
|
|
996
982
|
tokenStream.expectEmpty();
|
|
997
|
-
if (flexWrap === void 0)
|
|
998
|
-
|
|
999
|
-
if (flexDirection === void 0)
|
|
1000
|
-
flexDirection = defaultFlexDirection;
|
|
983
|
+
if (flexWrap === void 0) flexWrap = defaultFlexWrap;
|
|
984
|
+
if (flexDirection === void 0) flexDirection = defaultFlexDirection;
|
|
1001
985
|
return {
|
|
1002
986
|
flexWrap,
|
|
1003
987
|
flexDirection
|
|
@@ -1034,8 +1018,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1034
1018
|
var lineHeight;
|
|
1035
1019
|
var numStyleWeightVariantMatched = 0;
|
|
1036
1020
|
while (numStyleWeightVariantMatched < 3 && tokenStream.hasTokens()) {
|
|
1037
|
-
if (tokenStream.matches(NORMAL))
|
|
1038
|
-
;
|
|
1021
|
+
if (tokenStream.matches(NORMAL)) ;
|
|
1039
1022
|
else if (fontStyle === void 0 && tokenStream.matches(STYLE)) {
|
|
1040
1023
|
fontStyle = tokenStream.lastValue;
|
|
1041
1024
|
} else if (fontWeight2 === void 0 && tokenStream.matches(WEIGHT)) {
|
|
@@ -1054,12 +1037,9 @@ var require_css_to_react_native = __commonJS({
|
|
|
1054
1037
|
}
|
|
1055
1038
|
tokenStream.expect(SPACE);
|
|
1056
1039
|
var _fontFamily = fontFamily(tokenStream), fontFamily$1 = _fontFamily.fontFamily;
|
|
1057
|
-
if (fontStyle === void 0)
|
|
1058
|
-
|
|
1059
|
-
if (
|
|
1060
|
-
fontWeight2 = defaultFontWeight;
|
|
1061
|
-
if (fontVariant2 === void 0)
|
|
1062
|
-
fontVariant2 = defaultFontVariant;
|
|
1040
|
+
if (fontStyle === void 0) fontStyle = defaultFontStyle;
|
|
1041
|
+
if (fontWeight2 === void 0) fontWeight2 = defaultFontWeight;
|
|
1042
|
+
if (fontVariant2 === void 0) fontVariant2 = defaultFontVariant;
|
|
1063
1043
|
var out = {
|
|
1064
1044
|
fontStyle,
|
|
1065
1045
|
fontWeight: fontWeight2,
|
|
@@ -1067,8 +1047,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1067
1047
|
fontSize,
|
|
1068
1048
|
fontFamily: fontFamily$1
|
|
1069
1049
|
};
|
|
1070
|
-
if (lineHeight !== void 0)
|
|
1071
|
-
out.lineHeight = lineHeight;
|
|
1050
|
+
if (lineHeight !== void 0) out.lineHeight = lineHeight;
|
|
1072
1051
|
return out;
|
|
1073
1052
|
};
|
|
1074
1053
|
var fontVariant = function fontVariant2(tokenStream) {
|
|
@@ -1108,8 +1087,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1108
1087
|
var color2;
|
|
1109
1088
|
var didParseFirst = false;
|
|
1110
1089
|
while (tokenStream.hasTokens()) {
|
|
1111
|
-
if (didParseFirst)
|
|
1112
|
-
tokenStream.expect(SPACE);
|
|
1090
|
+
if (didParseFirst) tokenStream.expect(SPACE);
|
|
1113
1091
|
if (line2 === void 0 && tokenStream.matches(LINE)) {
|
|
1114
1092
|
var lines = [tokenStream.lastValue.toLowerCase()];
|
|
1115
1093
|
tokenStream.saveRewindPoint();
|
|
@@ -1139,8 +1117,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1139
1117
|
var lines = [];
|
|
1140
1118
|
var didParseFirst = false;
|
|
1141
1119
|
while (tokenStream.hasTokens()) {
|
|
1142
|
-
if (didParseFirst)
|
|
1143
|
-
tokenStream.expect(SPACE);
|
|
1120
|
+
if (didParseFirst) tokenStream.expect(SPACE);
|
|
1144
1121
|
lines.push(tokenStream.expect(LINE).toLowerCase());
|
|
1145
1122
|
didParseFirst = true;
|
|
1146
1123
|
}
|
|
@@ -1209,8 +1186,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1209
1186
|
var transforms2 = [];
|
|
1210
1187
|
var didParseFirst = false;
|
|
1211
1188
|
while (tokenStream.hasTokens()) {
|
|
1212
|
-
if (didParseFirst)
|
|
1213
|
-
tokenStream.expect(SPACE);
|
|
1189
|
+
if (didParseFirst) tokenStream.expect(SPACE);
|
|
1214
1190
|
var functionStream = tokenStream.expectFunction();
|
|
1215
1191
|
var functionName = functionStream.functionName;
|
|
1216
1192
|
var transformedValues = partTransforms[functionName](functionStream);
|
|
@@ -1310,8 +1286,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1310
1286
|
return this.index <= this.nodes.length - 1;
|
|
1311
1287
|
};
|
|
1312
1288
|
_proto[SYMBOL_MATCH] = function() {
|
|
1313
|
-
if (!this.hasTokens())
|
|
1314
|
-
return null;
|
|
1289
|
+
if (!this.hasTokens()) return null;
|
|
1315
1290
|
var node2 = this.nodes[this.index];
|
|
1316
1291
|
for (var i = 0; i < arguments.length; i += 1) {
|
|
1317
1292
|
var tokenDescriptor = i < 0 || arguments.length <= i ? void 0 : arguments[i];
|
|
@@ -1333,8 +1308,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1333
1308
|
};
|
|
1334
1309
|
_proto.matchesFunction = function matchesFunction() {
|
|
1335
1310
|
var node2 = this.nodes[this.index];
|
|
1336
|
-
if (node2.type !== "function")
|
|
1337
|
-
return null;
|
|
1311
|
+
if (node2.type !== "function") return null;
|
|
1338
1312
|
var value = new TokenStream2(node2.nodes, node2);
|
|
1339
1313
|
this.index += 1;
|
|
1340
1314
|
this.lastValue = null;
|
|
@@ -1345,8 +1319,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1345
1319
|
return value !== null ? value : this["throw"]();
|
|
1346
1320
|
};
|
|
1347
1321
|
_proto.expectEmpty = function expectEmpty() {
|
|
1348
|
-
if (this.hasTokens())
|
|
1349
|
-
this["throw"]();
|
|
1322
|
+
if (this.hasTokens()) this["throw"]();
|
|
1350
1323
|
};
|
|
1351
1324
|
_proto["throw"] = function _throw() {
|
|
1352
1325
|
throw new Error("Unexpected token type: " + this.nodes[this.index].type);
|
|
@@ -1355,8 +1328,7 @@ var require_css_to_react_native = __commonJS({
|
|
|
1355
1328
|
this.rewindIndex = this.index;
|
|
1356
1329
|
};
|
|
1357
1330
|
_proto.rewind = function rewind() {
|
|
1358
|
-
if (this.rewindIndex === -1)
|
|
1359
|
-
throw new Error("Internal error");
|
|
1331
|
+
if (this.rewindIndex === -1) throw new Error("Internal error");
|
|
1360
1332
|
this.index = this.rewindIndex;
|
|
1361
1333
|
this.lastValue = null;
|
|
1362
1334
|
};
|
|
@@ -1379,17 +1351,13 @@ var require_css_to_react_native = __commonJS({
|
|
|
1379
1351
|
}
|
|
1380
1352
|
}
|
|
1381
1353
|
var numberMatch = value.match(numberOrLengthRe);
|
|
1382
|
-
if (numberMatch !== null)
|
|
1383
|
-
return Number(numberMatch[1]);
|
|
1354
|
+
if (numberMatch !== null) return Number(numberMatch[1]);
|
|
1384
1355
|
var boolMatch = value.match(boolRe);
|
|
1385
|
-
if (boolMatch !== null)
|
|
1386
|
-
return boolMatch[0].toLowerCase() === "true";
|
|
1356
|
+
if (boolMatch !== null) return boolMatch[0].toLowerCase() === "true";
|
|
1387
1357
|
var nullMatch = value.match(nullRe);
|
|
1388
|
-
if (nullMatch !== null)
|
|
1389
|
-
return null;
|
|
1358
|
+
if (nullMatch !== null) return null;
|
|
1390
1359
|
var undefinedMatch = value.match(undefinedRe);
|
|
1391
|
-
if (undefinedMatch !== null)
|
|
1392
|
-
return void 0;
|
|
1360
|
+
if (undefinedMatch !== null) return void 0;
|
|
1393
1361
|
return value;
|
|
1394
1362
|
};
|
|
1395
1363
|
var baseTransformShorthandValue = function baseTransformShorthandValue2(propName, value) {
|
|
@@ -1429,16 +1397,16 @@ var require_css_to_react_native = __commonJS({
|
|
|
1429
1397
|
return Object.assign(accum, getStylesForProperty(propertyName, value, allowShorthand));
|
|
1430
1398
|
}, {});
|
|
1431
1399
|
};
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1400
|
+
exports2["default"] = index2;
|
|
1401
|
+
exports2.getPropertyName = getPropertyName;
|
|
1402
|
+
exports2.getStylesForProperty = getStylesForProperty;
|
|
1403
|
+
exports2.transformRawValue = transformRawValue;
|
|
1436
1404
|
}
|
|
1437
1405
|
});
|
|
1438
1406
|
|
|
1439
1407
|
// ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
1440
1408
|
var require_react_is_production_min = __commonJS({
|
|
1441
|
-
"../../node_modules/react-is/cjs/react-is.production.min.js"(
|
|
1409
|
+
"../../node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
1442
1410
|
"use strict";
|
|
1443
1411
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
1444
1412
|
var c = b ? Symbol.for("react.element") : 60103;
|
|
@@ -1492,66 +1460,66 @@ var require_react_is_production_min = __commonJS({
|
|
|
1492
1460
|
function A(a) {
|
|
1493
1461
|
return z(a) === m;
|
|
1494
1462
|
}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1463
|
+
exports2.AsyncMode = l;
|
|
1464
|
+
exports2.ConcurrentMode = m;
|
|
1465
|
+
exports2.ContextConsumer = k;
|
|
1466
|
+
exports2.ContextProvider = h;
|
|
1467
|
+
exports2.Element = c;
|
|
1468
|
+
exports2.ForwardRef = n;
|
|
1469
|
+
exports2.Fragment = e;
|
|
1470
|
+
exports2.Lazy = t;
|
|
1471
|
+
exports2.Memo = r;
|
|
1472
|
+
exports2.Portal = d;
|
|
1473
|
+
exports2.Profiler = g;
|
|
1474
|
+
exports2.StrictMode = f;
|
|
1475
|
+
exports2.Suspense = p;
|
|
1476
|
+
exports2.isAsyncMode = function(a) {
|
|
1509
1477
|
return A(a) || z(a) === l;
|
|
1510
1478
|
};
|
|
1511
|
-
|
|
1512
|
-
|
|
1479
|
+
exports2.isConcurrentMode = A;
|
|
1480
|
+
exports2.isContextConsumer = function(a) {
|
|
1513
1481
|
return z(a) === k;
|
|
1514
1482
|
};
|
|
1515
|
-
|
|
1483
|
+
exports2.isContextProvider = function(a) {
|
|
1516
1484
|
return z(a) === h;
|
|
1517
1485
|
};
|
|
1518
|
-
|
|
1486
|
+
exports2.isElement = function(a) {
|
|
1519
1487
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
1520
1488
|
};
|
|
1521
|
-
|
|
1489
|
+
exports2.isForwardRef = function(a) {
|
|
1522
1490
|
return z(a) === n;
|
|
1523
1491
|
};
|
|
1524
|
-
|
|
1492
|
+
exports2.isFragment = function(a) {
|
|
1525
1493
|
return z(a) === e;
|
|
1526
1494
|
};
|
|
1527
|
-
|
|
1495
|
+
exports2.isLazy = function(a) {
|
|
1528
1496
|
return z(a) === t;
|
|
1529
1497
|
};
|
|
1530
|
-
|
|
1498
|
+
exports2.isMemo = function(a) {
|
|
1531
1499
|
return z(a) === r;
|
|
1532
1500
|
};
|
|
1533
|
-
|
|
1501
|
+
exports2.isPortal = function(a) {
|
|
1534
1502
|
return z(a) === d;
|
|
1535
1503
|
};
|
|
1536
|
-
|
|
1504
|
+
exports2.isProfiler = function(a) {
|
|
1537
1505
|
return z(a) === g;
|
|
1538
1506
|
};
|
|
1539
|
-
|
|
1507
|
+
exports2.isStrictMode = function(a) {
|
|
1540
1508
|
return z(a) === f;
|
|
1541
1509
|
};
|
|
1542
|
-
|
|
1510
|
+
exports2.isSuspense = function(a) {
|
|
1543
1511
|
return z(a) === p;
|
|
1544
1512
|
};
|
|
1545
|
-
|
|
1513
|
+
exports2.isValidElementType = function(a) {
|
|
1546
1514
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
1547
1515
|
};
|
|
1548
|
-
|
|
1516
|
+
exports2.typeOf = z;
|
|
1549
1517
|
}
|
|
1550
1518
|
});
|
|
1551
1519
|
|
|
1552
1520
|
// ../../node_modules/react-is/cjs/react-is.development.js
|
|
1553
1521
|
var require_react_is_development = __commonJS({
|
|
1554
|
-
"../../node_modules/react-is/cjs/react-is.development.js"(
|
|
1522
|
+
"../../node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
1555
1523
|
"use strict";
|
|
1556
1524
|
if (process.env.NODE_ENV !== "production") {
|
|
1557
1525
|
(function() {
|
|
@@ -1671,34 +1639,34 @@ var require_react_is_development = __commonJS({
|
|
|
1671
1639
|
function isSuspense(object) {
|
|
1672
1640
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1673
1641
|
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1642
|
+
exports2.AsyncMode = AsyncMode;
|
|
1643
|
+
exports2.ConcurrentMode = ConcurrentMode;
|
|
1644
|
+
exports2.ContextConsumer = ContextConsumer;
|
|
1645
|
+
exports2.ContextProvider = ContextProvider;
|
|
1646
|
+
exports2.Element = Element;
|
|
1647
|
+
exports2.ForwardRef = ForwardRef;
|
|
1648
|
+
exports2.Fragment = Fragment3;
|
|
1649
|
+
exports2.Lazy = Lazy;
|
|
1650
|
+
exports2.Memo = Memo;
|
|
1651
|
+
exports2.Portal = Portal;
|
|
1652
|
+
exports2.Profiler = Profiler;
|
|
1653
|
+
exports2.StrictMode = StrictMode;
|
|
1654
|
+
exports2.Suspense = Suspense;
|
|
1655
|
+
exports2.isAsyncMode = isAsyncMode;
|
|
1656
|
+
exports2.isConcurrentMode = isConcurrentMode;
|
|
1657
|
+
exports2.isContextConsumer = isContextConsumer;
|
|
1658
|
+
exports2.isContextProvider = isContextProvider;
|
|
1659
|
+
exports2.isElement = isElement;
|
|
1660
|
+
exports2.isForwardRef = isForwardRef;
|
|
1661
|
+
exports2.isFragment = isFragment;
|
|
1662
|
+
exports2.isLazy = isLazy;
|
|
1663
|
+
exports2.isMemo = isMemo;
|
|
1664
|
+
exports2.isPortal = isPortal;
|
|
1665
|
+
exports2.isProfiler = isProfiler;
|
|
1666
|
+
exports2.isStrictMode = isStrictMode;
|
|
1667
|
+
exports2.isSuspense = isSuspense;
|
|
1668
|
+
exports2.isValidElementType = isValidElementType;
|
|
1669
|
+
exports2.typeOf = typeOf;
|
|
1702
1670
|
})();
|
|
1703
1671
|
}
|
|
1704
1672
|
}
|
|
@@ -1706,7 +1674,7 @@ var require_react_is_development = __commonJS({
|
|
|
1706
1674
|
|
|
1707
1675
|
// ../../node_modules/react-is/index.js
|
|
1708
1676
|
var require_react_is = __commonJS({
|
|
1709
|
-
"../../node_modules/react-is/index.js"(
|
|
1677
|
+
"../../node_modules/react-is/index.js"(exports2, module2) {
|
|
1710
1678
|
"use strict";
|
|
1711
1679
|
if (process.env.NODE_ENV === "production") {
|
|
1712
1680
|
module2.exports = require_react_is_production_min();
|
|
@@ -1718,7 +1686,7 @@ var require_react_is = __commonJS({
|
|
|
1718
1686
|
|
|
1719
1687
|
// ../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
1720
1688
|
var require_hoist_non_react_statics_cjs = __commonJS({
|
|
1721
|
-
"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(
|
|
1689
|
+
"../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports2, module2) {
|
|
1722
1690
|
"use strict";
|
|
1723
1691
|
var reactIs = require_react_is();
|
|
1724
1692
|
var REACT_STATICS = {
|
|
@@ -1806,13 +1774,12 @@ var require_hoist_non_react_statics_cjs = __commonJS({
|
|
|
1806
1774
|
|
|
1807
1775
|
// ../../node_modules/@babel/runtime/helpers/extends.js
|
|
1808
1776
|
var require_extends = __commonJS({
|
|
1809
|
-
"../../node_modules/@babel/runtime/helpers/extends.js"(
|
|
1777
|
+
"../../node_modules/@babel/runtime/helpers/extends.js"(exports2, module2) {
|
|
1810
1778
|
function _extends2() {
|
|
1811
1779
|
return module2.exports = _extends2 = Object.assign ? Object.assign.bind() : function(n) {
|
|
1812
1780
|
for (var e = 1; e < arguments.length; e++) {
|
|
1813
1781
|
var t = arguments[e];
|
|
1814
|
-
for (var r in t)
|
|
1815
|
-
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1782
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1816
1783
|
}
|
|
1817
1784
|
return n;
|
|
1818
1785
|
}, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _extends2.apply(null, arguments);
|
|
@@ -1822,8 +1789,8 @@ var require_extends = __commonJS({
|
|
|
1822
1789
|
});
|
|
1823
1790
|
|
|
1824
1791
|
// src/index.ts
|
|
1825
|
-
var
|
|
1826
|
-
__export(
|
|
1792
|
+
var index_exports = {};
|
|
1793
|
+
__export(index_exports, {
|
|
1827
1794
|
ThemeProvider: () => ThemeProvider,
|
|
1828
1795
|
darkTheme: () => darkTheme,
|
|
1829
1796
|
styled: () => index,
|
|
@@ -1831,7 +1798,7 @@ __export(src_exports, {
|
|
|
1831
1798
|
useTheme: () => useTheme,
|
|
1832
1799
|
withTheme: () => withTheme
|
|
1833
1800
|
});
|
|
1834
|
-
module.exports = __toCommonJS(
|
|
1801
|
+
module.exports = __toCommonJS(index_exports);
|
|
1835
1802
|
|
|
1836
1803
|
// ../../node_modules/@emotion/native/dist/emotion-native.esm.js
|
|
1837
1804
|
var reactNative = __toESM(require("react-native"));
|
|
@@ -2016,12 +1983,14 @@ function slice(begin, end) {
|
|
|
2016
1983
|
}
|
|
2017
1984
|
function token(type) {
|
|
2018
1985
|
switch (type) {
|
|
1986
|
+
// \0 \t \n \r \s whitespace token
|
|
2019
1987
|
case 0:
|
|
2020
1988
|
case 9:
|
|
2021
1989
|
case 10:
|
|
2022
1990
|
case 13:
|
|
2023
1991
|
case 32:
|
|
2024
1992
|
return 5;
|
|
1993
|
+
// ! + , / > @ ~ isolate token
|
|
2025
1994
|
case 33:
|
|
2026
1995
|
case 43:
|
|
2027
1996
|
case 44:
|
|
@@ -2029,17 +1998,21 @@ function token(type) {
|
|
|
2029
1998
|
case 62:
|
|
2030
1999
|
case 64:
|
|
2031
2000
|
case 126:
|
|
2001
|
+
// ; { } breakpoint token
|
|
2032
2002
|
case 59:
|
|
2033
2003
|
case 123:
|
|
2034
2004
|
case 125:
|
|
2035
2005
|
return 4;
|
|
2006
|
+
// : accompanied token
|
|
2036
2007
|
case 58:
|
|
2037
2008
|
return 3;
|
|
2009
|
+
// " ' ( [ opening delimit token
|
|
2038
2010
|
case 34:
|
|
2039
2011
|
case 39:
|
|
2040
2012
|
case 40:
|
|
2041
2013
|
case 91:
|
|
2042
2014
|
return 2;
|
|
2015
|
+
// ) ] closing delimit token
|
|
2043
2016
|
case 41:
|
|
2044
2017
|
case 93:
|
|
2045
2018
|
return 1;
|
|
@@ -2072,17 +2045,21 @@ function escaping(index2, count) {
|
|
|
2072
2045
|
function delimiter(type) {
|
|
2073
2046
|
while (next())
|
|
2074
2047
|
switch (character) {
|
|
2048
|
+
// ] ) " '
|
|
2075
2049
|
case type:
|
|
2076
2050
|
return position;
|
|
2051
|
+
// " '
|
|
2077
2052
|
case 34:
|
|
2078
2053
|
case 39:
|
|
2079
2054
|
if (type !== 34 && type !== 39)
|
|
2080
2055
|
delimiter(character);
|
|
2081
2056
|
break;
|
|
2057
|
+
// (
|
|
2082
2058
|
case 40:
|
|
2083
2059
|
if (type === 41)
|
|
2084
2060
|
delimiter(type);
|
|
2085
2061
|
break;
|
|
2062
|
+
// \
|
|
2086
2063
|
case 92:
|
|
2087
2064
|
next();
|
|
2088
2065
|
break;
|
|
@@ -2125,26 +2102,31 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
2125
2102
|
var characters2 = type;
|
|
2126
2103
|
while (scanning)
|
|
2127
2104
|
switch (previous = character2, character2 = next()) {
|
|
2105
|
+
// (
|
|
2128
2106
|
case 40:
|
|
2129
2107
|
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
2130
2108
|
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
|
|
2131
2109
|
ampersand = -1;
|
|
2132
2110
|
break;
|
|
2133
2111
|
}
|
|
2112
|
+
// " ' [
|
|
2134
2113
|
case 34:
|
|
2135
2114
|
case 39:
|
|
2136
2115
|
case 91:
|
|
2137
2116
|
characters2 += delimit(character2);
|
|
2138
2117
|
break;
|
|
2118
|
+
// \t \n \r \s
|
|
2139
2119
|
case 9:
|
|
2140
2120
|
case 10:
|
|
2141
2121
|
case 13:
|
|
2142
2122
|
case 32:
|
|
2143
2123
|
characters2 += whitespace(previous);
|
|
2144
2124
|
break;
|
|
2125
|
+
// \
|
|
2145
2126
|
case 92:
|
|
2146
2127
|
characters2 += escaping(caret() - 1, 7);
|
|
2147
2128
|
continue;
|
|
2129
|
+
// /
|
|
2148
2130
|
case 47:
|
|
2149
2131
|
switch (peek()) {
|
|
2150
2132
|
case 42:
|
|
@@ -2155,23 +2137,28 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
2155
2137
|
characters2 += "/";
|
|
2156
2138
|
}
|
|
2157
2139
|
break;
|
|
2140
|
+
// {
|
|
2158
2141
|
case 123 * variable:
|
|
2159
2142
|
points[index2++] = strlen(characters2) * ampersand;
|
|
2143
|
+
// } ; \0
|
|
2160
2144
|
case 125 * variable:
|
|
2161
2145
|
case 59:
|
|
2162
2146
|
case 0:
|
|
2163
2147
|
switch (character2) {
|
|
2148
|
+
// \0 }
|
|
2164
2149
|
case 0:
|
|
2165
2150
|
case 125:
|
|
2166
2151
|
scanning = 0;
|
|
2152
|
+
// ;
|
|
2167
2153
|
case 59 + offset:
|
|
2168
|
-
if (ampersand == -1)
|
|
2169
|
-
characters2 = replace(characters2, /\f/g, "");
|
|
2154
|
+
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
2170
2155
|
if (property > 0 && strlen(characters2) - length2)
|
|
2171
2156
|
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
|
|
2172
2157
|
break;
|
|
2158
|
+
// @ ;
|
|
2173
2159
|
case 59:
|
|
2174
2160
|
characters2 += ";";
|
|
2161
|
+
// { rule/at-rule
|
|
2175
2162
|
default:
|
|
2176
2163
|
append(reference = ruleset(characters2, root, parent, index2, offset, rules, points, type, props = [], children = [], length2), rulesets);
|
|
2177
2164
|
if (character2 === 123)
|
|
@@ -2179,6 +2166,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
2179
2166
|
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
2180
2167
|
else
|
|
2181
2168
|
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
2169
|
+
// d l m s
|
|
2182
2170
|
case 100:
|
|
2183
2171
|
case 108:
|
|
2184
2172
|
case 109:
|
|
@@ -2191,6 +2179,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
2191
2179
|
}
|
|
2192
2180
|
index2 = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
2193
2181
|
break;
|
|
2182
|
+
// :
|
|
2194
2183
|
case 58:
|
|
2195
2184
|
length2 = 1 + strlen(characters2), property = previous;
|
|
2196
2185
|
default:
|
|
@@ -2201,17 +2190,21 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
2201
2190
|
continue;
|
|
2202
2191
|
}
|
|
2203
2192
|
switch (characters2 += from(character2), character2 * variable) {
|
|
2193
|
+
// &
|
|
2204
2194
|
case 38:
|
|
2205
2195
|
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
2206
2196
|
break;
|
|
2197
|
+
// ,
|
|
2207
2198
|
case 44:
|
|
2208
2199
|
points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
2209
2200
|
break;
|
|
2201
|
+
// @
|
|
2210
2202
|
case 64:
|
|
2211
2203
|
if (peek() === 45)
|
|
2212
2204
|
characters2 += delimit(next());
|
|
2213
2205
|
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
2214
2206
|
break;
|
|
2207
|
+
// -
|
|
2215
2208
|
case 45:
|
|
2216
2209
|
if (previous === 45 && strlen(characters2) == 2)
|
|
2217
2210
|
variable = 0;
|
|
@@ -2247,8 +2240,7 @@ function serialize(children, callback) {
|
|
|
2247
2240
|
function stringify(element, index2, children, callback) {
|
|
2248
2241
|
switch (element.type) {
|
|
2249
2242
|
case LAYER:
|
|
2250
|
-
if (element.children.length)
|
|
2251
|
-
break;
|
|
2243
|
+
if (element.children.length) break;
|
|
2252
2244
|
case IMPORT:
|
|
2253
2245
|
case DECLARATION:
|
|
2254
2246
|
return element.return = element.return || element.value;
|
|
@@ -2298,8 +2290,7 @@ var weakMemoize = function weakMemoize2(func) {
|
|
|
2298
2290
|
function memoize(fn) {
|
|
2299
2291
|
var cache = /* @__PURE__ */ Object.create(null);
|
|
2300
2292
|
return function(arg) {
|
|
2301
|
-
if (cache[arg] === void 0)
|
|
2302
|
-
cache[arg] = fn(arg);
|
|
2293
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
2303
2294
|
return cache[arg];
|
|
2304
2295
|
};
|
|
2305
2296
|
}
|
|
@@ -2342,6 +2333,7 @@ var toRules = function toRules2(parsed, points) {
|
|
|
2342
2333
|
points[index2] = parsed[index2].length;
|
|
2343
2334
|
break;
|
|
2344
2335
|
}
|
|
2336
|
+
// fallthrough
|
|
2345
2337
|
default:
|
|
2346
2338
|
parsed[index2] += from(character2);
|
|
2347
2339
|
}
|
|
@@ -2362,8 +2354,7 @@ var compat = function compat2(element) {
|
|
|
2362
2354
|
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
2363
2355
|
while (parent.type !== "rule") {
|
|
2364
2356
|
parent = parent.parent;
|
|
2365
|
-
if (!parent)
|
|
2366
|
-
return;
|
|
2357
|
+
if (!parent) return;
|
|
2367
2358
|
}
|
|
2368
2359
|
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
|
|
2369
2360
|
return;
|
|
@@ -2396,8 +2387,10 @@ var removeLabel = function removeLabel2(element) {
|
|
|
2396
2387
|
};
|
|
2397
2388
|
function prefix(value, length2) {
|
|
2398
2389
|
switch (hash(value, length2)) {
|
|
2390
|
+
// color-adjust
|
|
2399
2391
|
case 5103:
|
|
2400
2392
|
return WEBKIT + "print-" + value + value;
|
|
2393
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
2401
2394
|
case 5737:
|
|
2402
2395
|
case 4201:
|
|
2403
2396
|
case 3177:
|
|
@@ -2405,18 +2398,21 @@ function prefix(value, length2) {
|
|
|
2405
2398
|
case 1641:
|
|
2406
2399
|
case 4457:
|
|
2407
2400
|
case 2921:
|
|
2401
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
2408
2402
|
case 5572:
|
|
2409
2403
|
case 6356:
|
|
2410
2404
|
case 5844:
|
|
2411
2405
|
case 3191:
|
|
2412
2406
|
case 6645:
|
|
2413
2407
|
case 3005:
|
|
2408
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
2414
2409
|
case 6391:
|
|
2415
2410
|
case 5879:
|
|
2416
2411
|
case 5623:
|
|
2417
2412
|
case 6135:
|
|
2418
2413
|
case 4599:
|
|
2419
2414
|
case 4855:
|
|
2415
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
2420
2416
|
case 4215:
|
|
2421
2417
|
case 6389:
|
|
2422
2418
|
case 5109:
|
|
@@ -2424,43 +2420,58 @@ function prefix(value, length2) {
|
|
|
2424
2420
|
case 5621:
|
|
2425
2421
|
case 3829:
|
|
2426
2422
|
return WEBKIT + value + value;
|
|
2423
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
2427
2424
|
case 5349:
|
|
2428
2425
|
case 4246:
|
|
2429
2426
|
case 4810:
|
|
2430
2427
|
case 6968:
|
|
2431
2428
|
case 2756:
|
|
2432
2429
|
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
2430
|
+
// flex, flex-direction
|
|
2433
2431
|
case 6828:
|
|
2434
2432
|
case 4268:
|
|
2435
2433
|
return WEBKIT + value + MS + value + value;
|
|
2434
|
+
// order
|
|
2436
2435
|
case 6165:
|
|
2437
2436
|
return WEBKIT + value + MS + "flex-" + value + value;
|
|
2437
|
+
// align-items
|
|
2438
2438
|
case 5187:
|
|
2439
2439
|
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
2440
|
+
// align-self
|
|
2440
2441
|
case 5443:
|
|
2441
2442
|
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
2443
|
+
// align-content
|
|
2442
2444
|
case 4675:
|
|
2443
2445
|
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
2446
|
+
// flex-shrink
|
|
2444
2447
|
case 5548:
|
|
2445
2448
|
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
2449
|
+
// flex-basis
|
|
2446
2450
|
case 5292:
|
|
2447
2451
|
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
2452
|
+
// flex-grow
|
|
2448
2453
|
case 6060:
|
|
2449
2454
|
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
2455
|
+
// transition
|
|
2450
2456
|
case 4554:
|
|
2451
2457
|
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
2458
|
+
// cursor
|
|
2452
2459
|
case 6187:
|
|
2453
2460
|
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
2461
|
+
// background, background-image
|
|
2454
2462
|
case 5495:
|
|
2455
2463
|
case 3959:
|
|
2456
2464
|
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
2465
|
+
// justify-content
|
|
2457
2466
|
case 4968:
|
|
2458
2467
|
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
2468
|
+
// (margin|padding)-inline-(start|end)
|
|
2459
2469
|
case 4095:
|
|
2460
2470
|
case 3583:
|
|
2461
2471
|
case 4068:
|
|
2462
2472
|
case 2532:
|
|
2463
2473
|
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
2474
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
2464
2475
|
case 8116:
|
|
2465
2476
|
case 7059:
|
|
2466
2477
|
case 5753:
|
|
@@ -2473,34 +2484,42 @@ function prefix(value, length2) {
|
|
|
2473
2484
|
case 5789:
|
|
2474
2485
|
case 5021:
|
|
2475
2486
|
case 4765:
|
|
2476
|
-
if (strlen(value) - 1 - length2 > 6)
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2487
|
+
if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
|
|
2488
|
+
// (m)ax-content, (m)in-content
|
|
2489
|
+
case 109:
|
|
2490
|
+
if (charat(value, length2 + 4) !== 45) break;
|
|
2491
|
+
// (f)ill-available, (f)it-content
|
|
2492
|
+
case 102:
|
|
2493
|
+
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
2494
|
+
// (s)tretch
|
|
2495
|
+
case 115:
|
|
2496
|
+
return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
|
|
2497
|
+
}
|
|
2486
2498
|
break;
|
|
2499
|
+
// position: sticky
|
|
2487
2500
|
case 4949:
|
|
2488
|
-
if (charat(value, length2 + 1) !== 115)
|
|
2489
|
-
|
|
2501
|
+
if (charat(value, length2 + 1) !== 115) break;
|
|
2502
|
+
// display: (flex|inline-flex)
|
|
2490
2503
|
case 6444:
|
|
2491
2504
|
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
2505
|
+
// stic(k)y
|
|
2492
2506
|
case 107:
|
|
2493
2507
|
return replace(value, ":", ":" + WEBKIT) + value;
|
|
2508
|
+
// (inline-)?fl(e)x
|
|
2494
2509
|
case 101:
|
|
2495
2510
|
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
2496
2511
|
}
|
|
2497
2512
|
break;
|
|
2513
|
+
// writing-mode
|
|
2498
2514
|
case 5936:
|
|
2499
2515
|
switch (charat(value, length2 + 11)) {
|
|
2516
|
+
// vertical-l(r)
|
|
2500
2517
|
case 114:
|
|
2501
2518
|
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
2519
|
+
// vertical-r(l)
|
|
2502
2520
|
case 108:
|
|
2503
2521
|
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
2522
|
+
// horizontal(-)tb
|
|
2504
2523
|
case 45:
|
|
2505
2524
|
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
2506
2525
|
}
|
|
@@ -2510,36 +2529,36 @@ function prefix(value, length2) {
|
|
|
2510
2529
|
}
|
|
2511
2530
|
var prefixer = function prefixer2(element, index2, children, callback) {
|
|
2512
2531
|
if (element.length > -1) {
|
|
2513
|
-
if (!element["return"])
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2532
|
+
if (!element["return"]) switch (element.type) {
|
|
2533
|
+
case DECLARATION:
|
|
2534
|
+
element["return"] = prefix(element.value, element.length);
|
|
2535
|
+
break;
|
|
2536
|
+
case KEYFRAMES:
|
|
2537
|
+
return serialize([copy(element, {
|
|
2538
|
+
value: replace(element.value, "@", "@" + WEBKIT)
|
|
2539
|
+
})], callback);
|
|
2540
|
+
case RULESET:
|
|
2541
|
+
if (element.length) return combine(element.props, function(value) {
|
|
2542
|
+
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
2543
|
+
// :read-(only|write)
|
|
2544
|
+
case ":read-only":
|
|
2545
|
+
case ":read-write":
|
|
2546
|
+
return serialize([copy(element, {
|
|
2547
|
+
props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
|
|
2548
|
+
})], callback);
|
|
2549
|
+
// :placeholder
|
|
2550
|
+
case "::placeholder":
|
|
2551
|
+
return serialize([copy(element, {
|
|
2552
|
+
props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
|
|
2553
|
+
}), copy(element, {
|
|
2554
|
+
props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
|
|
2555
|
+
}), copy(element, {
|
|
2556
|
+
props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
|
|
2557
|
+
})], callback);
|
|
2558
|
+
}
|
|
2559
|
+
return "";
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2543
2562
|
}
|
|
2544
2563
|
};
|
|
2545
2564
|
var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
|
|
@@ -2656,8 +2675,7 @@ function _extends() {
|
|
|
2656
2675
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
2657
2676
|
for (var e = 1; e < arguments.length; e++) {
|
|
2658
2677
|
var t = arguments[e];
|
|
2659
|
-
for (var r in t)
|
|
2660
|
-
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2678
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2661
2679
|
}
|
|
2662
2680
|
return n;
|
|
2663
2681
|
}, _extends.apply(null, arguments);
|
|
@@ -2776,8 +2794,7 @@ function handleInterpolation(interpolation, i, arr) {
|
|
|
2776
2794
|
interpolation = interpolation.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, "");
|
|
2777
2795
|
}
|
|
2778
2796
|
if (type === "function") {
|
|
2779
|
-
if (this === void 0)
|
|
2780
|
-
;
|
|
2797
|
+
if (this === void 0) ;
|
|
2781
2798
|
else {
|
|
2782
2799
|
handleInterpolation.call(this, interpolation(this), i, arr);
|
|
2783
2800
|
}
|
|
@@ -2852,8 +2869,7 @@ function convertPropertyValue(style) {
|
|
|
2852
2869
|
}
|
|
2853
2870
|
}
|
|
2854
2871
|
function convertStyles(str) {
|
|
2855
|
-
if (str.trim() === "")
|
|
2856
|
-
return;
|
|
2872
|
+
if (str.trim() === "") return;
|
|
2857
2873
|
var stylePairs = [];
|
|
2858
2874
|
var parsedString = str.split(";");
|
|
2859
2875
|
parsedString.forEach(convertPropertyValue, stylePairs);
|
|
@@ -2904,8 +2920,7 @@ function createStyled(StyleSheet4, options) {
|
|
|
2904
2920
|
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getShouldForwardProp(finalTag) : defaultShouldForwardProp;
|
|
2905
2921
|
var newProps = {};
|
|
2906
2922
|
for (var _key2 in props) {
|
|
2907
|
-
if (shouldUseAs && _key2 === "as")
|
|
2908
|
-
continue;
|
|
2923
|
+
if (shouldUseAs && _key2 === "as") continue;
|
|
2909
2924
|
if (finalShouldForwardProp(_key2)) {
|
|
2910
2925
|
newProps[_key2] = props[_key2];
|
|
2911
2926
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-theming",
|
|
3
|
-
"version": "9.1.1
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "A wrapper library around emotion 11 to provide theming support for react-native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@emotion/native": "^11.11.0",
|
|
32
32
|
"@emotion/react": "^11.11.1",
|
|
33
|
-
"tsup": "^
|
|
33
|
+
"tsup": "^8.5.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "*",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"dist/**/*",
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "105eafb68700cd6d137ed9f893481af963189a28"
|
|
47
47
|
}
|