@vitessce/description 2.0.3 → 3.0.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.mjs → index.js} +477 -300
- package/dist-tsc/Description.d.ts +2 -0
- package/dist-tsc/Description.d.ts.map +1 -0
- package/dist-tsc/Description.js +45 -0
- package/dist-tsc/Description.test.d.ts +2 -0
- package/dist-tsc/Description.test.d.ts.map +1 -0
- package/dist-tsc/Description.test.js +36 -0
- package/dist-tsc/DescriptionSubscriber.d.ts +18 -0
- package/dist-tsc/DescriptionSubscriber.d.ts.map +1 -0
- package/dist-tsc/DescriptionSubscriber.js +44 -0
- package/dist-tsc/index.d.ts +3 -0
- package/dist-tsc/index.d.ts.map +1 -0
- package/dist-tsc/index.js +2 -2
- package/package.json +19 -8
- package/src/Description.js +1 -1
- package/src/Description.test.jsx +5 -4
- package/src/DescriptionSubscriber.js +2 -13
- package/src/index.js +2 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { useLoaders, useCoordination, useDescription, useImageData, useReady, TitleInfo
|
|
2
|
+
import { useLoaders, useCoordination, useDescription, useImageData, useReady, TitleInfo } from "@vitessce/vit-s";
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
3
6
|
var jsxRuntime = { exports: {} };
|
|
4
7
|
var reactJsxRuntime_development = {};
|
|
5
8
|
/**
|
|
@@ -82,7 +85,11 @@ var reactJsxRuntime_development = {};
|
|
|
82
85
|
return true;
|
|
83
86
|
}
|
|
84
87
|
if (typeof type === "object" && type !== null) {
|
|
85
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
88
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
89
|
+
// types supported by any Flight configuration anywhere since
|
|
90
|
+
// we don't know which Flight build this will end up being used
|
|
91
|
+
// with.
|
|
92
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
86
93
|
return true;
|
|
87
94
|
}
|
|
88
95
|
}
|
|
@@ -562,11 +569,14 @@ var reactJsxRuntime_development = {};
|
|
|
562
569
|
}
|
|
563
570
|
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
564
571
|
var element = {
|
|
572
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
565
573
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
574
|
+
// Built-in properties that belong on the element
|
|
566
575
|
type,
|
|
567
576
|
key,
|
|
568
577
|
ref,
|
|
569
578
|
props,
|
|
579
|
+
// Record the component responsible for creating this element.
|
|
570
580
|
_owner: owner
|
|
571
581
|
};
|
|
572
582
|
{
|
|
@@ -760,7 +770,9 @@ var reactJsxRuntime_development = {};
|
|
|
760
770
|
var propTypes2;
|
|
761
771
|
if (typeof type === "function") {
|
|
762
772
|
propTypes2 = type.propTypes;
|
|
763
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
773
|
+
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
774
|
+
// Inner props are checked in the reconciler.
|
|
775
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
764
776
|
propTypes2 = type.propTypes;
|
|
765
777
|
} else {
|
|
766
778
|
return;
|
|
@@ -865,20 +877,17 @@ var reactJsxRuntime_development = {};
|
|
|
865
877
|
return jsxWithValidation(type, props, key, false);
|
|
866
878
|
}
|
|
867
879
|
}
|
|
868
|
-
var
|
|
869
|
-
var
|
|
880
|
+
var jsx = jsxWithValidationDynamic;
|
|
881
|
+
var jsxs = jsxWithValidationStatic;
|
|
870
882
|
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
871
|
-
reactJsxRuntime_development.jsx =
|
|
872
|
-
reactJsxRuntime_development.jsxs =
|
|
883
|
+
reactJsxRuntime_development.jsx = jsx;
|
|
884
|
+
reactJsxRuntime_development.jsxs = jsxs;
|
|
873
885
|
})();
|
|
874
886
|
}
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
})(jsxRuntime);
|
|
880
|
-
const jsx = jsxRuntime.exports.jsx;
|
|
881
|
-
const jsxs = jsxRuntime.exports.jsxs;
|
|
887
|
+
{
|
|
888
|
+
jsxRuntime.exports = reactJsxRuntime_development;
|
|
889
|
+
}
|
|
890
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
882
891
|
const ViewType = {
|
|
883
892
|
DESCRIPTION: "description",
|
|
884
893
|
STATUS: "status",
|
|
@@ -896,10 +905,12 @@ const ViewType = {
|
|
|
896
905
|
};
|
|
897
906
|
const CoordinationType = {
|
|
898
907
|
DATASET: "dataset",
|
|
908
|
+
// Entity types
|
|
899
909
|
OBS_TYPE: "obsType",
|
|
900
910
|
FEATURE_TYPE: "featureType",
|
|
901
911
|
FEATURE_VALUE_TYPE: "featureValueType",
|
|
902
912
|
OBS_LABELS_TYPE: "obsLabelsType",
|
|
913
|
+
// Other types
|
|
903
914
|
EMBEDDING_TYPE: "embeddingType",
|
|
904
915
|
EMBEDDING_ZOOM: "embeddingZoom",
|
|
905
916
|
EMBEDDING_ROTATION: "embeddingRotation",
|
|
@@ -932,6 +943,7 @@ const CoordinationType = {
|
|
|
932
943
|
OBS_HIGHLIGHT: "obsHighlight",
|
|
933
944
|
OBS_SET_SELECTION: "obsSetSelection",
|
|
934
945
|
OBS_SET_HIGHLIGHT: "obsSetHighlight",
|
|
946
|
+
OBS_SET_EXPANSION: "obsSetExpansion",
|
|
935
947
|
OBS_SET_COLOR: "obsSetColor",
|
|
936
948
|
FEATURE_FILTER: "featureFilter",
|
|
937
949
|
FEATURE_HIGHLIGHT: "featureHighlight",
|
|
@@ -949,10 +961,12 @@ const CoordinationType = {
|
|
|
949
961
|
GENOMIC_TARGET_X: "genomicTargetX",
|
|
950
962
|
GENOMIC_TARGET_Y: "genomicTargetY",
|
|
951
963
|
ADDITIONAL_OBS_SETS: "additionalObsSets",
|
|
964
|
+
// TODO: use obsHighlight rather than moleculeHighlight.
|
|
952
965
|
MOLECULE_HIGHLIGHT: "moleculeHighlight",
|
|
953
966
|
GATING_FEATURE_SELECTION_X: "gatingFeatureSelectionX",
|
|
954
967
|
GATING_FEATURE_SELECTION_Y: "gatingFeatureSelectionY",
|
|
955
|
-
FEATURE_VALUE_TRANSFORM_COEFFICIENT: "featureValueTransformCoefficient"
|
|
968
|
+
FEATURE_VALUE_TRANSFORM_COEFFICIENT: "featureValueTransformCoefficient",
|
|
969
|
+
TOOLTIPS_VISIBLE: "tooltipsVisible"
|
|
956
970
|
};
|
|
957
971
|
const COMPONENT_COORDINATION_TYPES = {
|
|
958
972
|
[ViewType.SCATTERPLOT]: [
|
|
@@ -984,7 +998,8 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
984
998
|
CoordinationType.FEATURE_VALUE_COLORMAP,
|
|
985
999
|
CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
|
|
986
1000
|
CoordinationType.OBS_COLOR_ENCODING,
|
|
987
|
-
CoordinationType.ADDITIONAL_OBS_SETS
|
|
1001
|
+
CoordinationType.ADDITIONAL_OBS_SETS,
|
|
1002
|
+
CoordinationType.TOOLTIPS_VISIBLE
|
|
988
1003
|
],
|
|
989
1004
|
[ViewType.GATING]: [
|
|
990
1005
|
CoordinationType.DATASET,
|
|
@@ -1052,7 +1067,8 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1052
1067
|
CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
|
|
1053
1068
|
CoordinationType.OBS_COLOR_ENCODING,
|
|
1054
1069
|
CoordinationType.ADDITIONAL_OBS_SETS,
|
|
1055
|
-
CoordinationType.MOLECULE_HIGHLIGHT
|
|
1070
|
+
CoordinationType.MOLECULE_HIGHLIGHT,
|
|
1071
|
+
CoordinationType.TOOLTIPS_VISIBLE
|
|
1056
1072
|
],
|
|
1057
1073
|
[ViewType.HEATMAP]: [
|
|
1058
1074
|
CoordinationType.DATASET,
|
|
@@ -1075,12 +1091,14 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1075
1091
|
CoordinationType.FEATURE_VALUE_COLORMAP,
|
|
1076
1092
|
CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
|
|
1077
1093
|
CoordinationType.OBS_COLOR_ENCODING,
|
|
1078
|
-
CoordinationType.ADDITIONAL_OBS_SETS
|
|
1094
|
+
CoordinationType.ADDITIONAL_OBS_SETS,
|
|
1095
|
+
CoordinationType.TOOLTIPS_VISIBLE
|
|
1079
1096
|
],
|
|
1080
1097
|
[ViewType.OBS_SETS]: [
|
|
1081
1098
|
CoordinationType.DATASET,
|
|
1082
1099
|
CoordinationType.OBS_TYPE,
|
|
1083
1100
|
CoordinationType.OBS_SET_SELECTION,
|
|
1101
|
+
CoordinationType.OBS_SET_EXPANSION,
|
|
1084
1102
|
CoordinationType.OBS_SET_HIGHLIGHT,
|
|
1085
1103
|
CoordinationType.OBS_SET_COLOR,
|
|
1086
1104
|
CoordinationType.OBS_COLOR_ENCODING,
|
|
@@ -1091,6 +1109,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1091
1109
|
CoordinationType.DATASET,
|
|
1092
1110
|
CoordinationType.OBS_TYPE,
|
|
1093
1111
|
CoordinationType.OBS_SET_SELECTION,
|
|
1112
|
+
CoordinationType.OBS_SET_EXPANSION,
|
|
1094
1113
|
CoordinationType.OBS_SET_HIGHLIGHT,
|
|
1095
1114
|
CoordinationType.OBS_SET_COLOR,
|
|
1096
1115
|
CoordinationType.ADDITIONAL_OBS_SETS
|
|
@@ -1131,7 +1150,11 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1131
1150
|
CoordinationType.OBS_TYPE,
|
|
1132
1151
|
CoordinationType.FEATURE_TYPE,
|
|
1133
1152
|
CoordinationType.FEATURE_VALUE_TYPE,
|
|
1134
|
-
CoordinationType.FEATURE_SELECTION
|
|
1153
|
+
CoordinationType.FEATURE_SELECTION,
|
|
1154
|
+
CoordinationType.ADDITIONAL_OBS_SETS,
|
|
1155
|
+
CoordinationType.OBS_SET_COLOR,
|
|
1156
|
+
CoordinationType.OBS_COLOR_ENCODING,
|
|
1157
|
+
CoordinationType.OBS_SET_SELECTION
|
|
1135
1158
|
],
|
|
1136
1159
|
[ViewType.LAYER_CONTROLLER]: [
|
|
1137
1160
|
CoordinationType.DATASET,
|
|
@@ -1184,8 +1207,132 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1184
1207
|
CoordinationType.FEATURE_SELECTION
|
|
1185
1208
|
]
|
|
1186
1209
|
};
|
|
1187
|
-
|
|
1188
|
-
|
|
1210
|
+
var common = {
|
|
1211
|
+
black: "#000",
|
|
1212
|
+
white: "#fff"
|
|
1213
|
+
};
|
|
1214
|
+
const common$1 = common;
|
|
1215
|
+
var red = {
|
|
1216
|
+
50: "#ffebee",
|
|
1217
|
+
100: "#ffcdd2",
|
|
1218
|
+
200: "#ef9a9a",
|
|
1219
|
+
300: "#e57373",
|
|
1220
|
+
400: "#ef5350",
|
|
1221
|
+
500: "#f44336",
|
|
1222
|
+
600: "#e53935",
|
|
1223
|
+
700: "#d32f2f",
|
|
1224
|
+
800: "#c62828",
|
|
1225
|
+
900: "#b71c1c",
|
|
1226
|
+
A100: "#ff8a80",
|
|
1227
|
+
A200: "#ff5252",
|
|
1228
|
+
A400: "#ff1744",
|
|
1229
|
+
A700: "#d50000"
|
|
1230
|
+
};
|
|
1231
|
+
const red$1 = red;
|
|
1232
|
+
var pink = {
|
|
1233
|
+
50: "#fce4ec",
|
|
1234
|
+
100: "#f8bbd0",
|
|
1235
|
+
200: "#f48fb1",
|
|
1236
|
+
300: "#f06292",
|
|
1237
|
+
400: "#ec407a",
|
|
1238
|
+
500: "#e91e63",
|
|
1239
|
+
600: "#d81b60",
|
|
1240
|
+
700: "#c2185b",
|
|
1241
|
+
800: "#ad1457",
|
|
1242
|
+
900: "#880e4f",
|
|
1243
|
+
A100: "#ff80ab",
|
|
1244
|
+
A200: "#ff4081",
|
|
1245
|
+
A400: "#f50057",
|
|
1246
|
+
A700: "#c51162"
|
|
1247
|
+
};
|
|
1248
|
+
const pink$1 = pink;
|
|
1249
|
+
var indigo = {
|
|
1250
|
+
50: "#e8eaf6",
|
|
1251
|
+
100: "#c5cae9",
|
|
1252
|
+
200: "#9fa8da",
|
|
1253
|
+
300: "#7986cb",
|
|
1254
|
+
400: "#5c6bc0",
|
|
1255
|
+
500: "#3f51b5",
|
|
1256
|
+
600: "#3949ab",
|
|
1257
|
+
700: "#303f9f",
|
|
1258
|
+
800: "#283593",
|
|
1259
|
+
900: "#1a237e",
|
|
1260
|
+
A100: "#8c9eff",
|
|
1261
|
+
A200: "#536dfe",
|
|
1262
|
+
A400: "#3d5afe",
|
|
1263
|
+
A700: "#304ffe"
|
|
1264
|
+
};
|
|
1265
|
+
const indigo$1 = indigo;
|
|
1266
|
+
var blue = {
|
|
1267
|
+
50: "#e3f2fd",
|
|
1268
|
+
100: "#bbdefb",
|
|
1269
|
+
200: "#90caf9",
|
|
1270
|
+
300: "#64b5f6",
|
|
1271
|
+
400: "#42a5f5",
|
|
1272
|
+
500: "#2196f3",
|
|
1273
|
+
600: "#1e88e5",
|
|
1274
|
+
700: "#1976d2",
|
|
1275
|
+
800: "#1565c0",
|
|
1276
|
+
900: "#0d47a1",
|
|
1277
|
+
A100: "#82b1ff",
|
|
1278
|
+
A200: "#448aff",
|
|
1279
|
+
A400: "#2979ff",
|
|
1280
|
+
A700: "#2962ff"
|
|
1281
|
+
};
|
|
1282
|
+
const blue$1 = blue;
|
|
1283
|
+
var green = {
|
|
1284
|
+
50: "#e8f5e9",
|
|
1285
|
+
100: "#c8e6c9",
|
|
1286
|
+
200: "#a5d6a7",
|
|
1287
|
+
300: "#81c784",
|
|
1288
|
+
400: "#66bb6a",
|
|
1289
|
+
500: "#4caf50",
|
|
1290
|
+
600: "#43a047",
|
|
1291
|
+
700: "#388e3c",
|
|
1292
|
+
800: "#2e7d32",
|
|
1293
|
+
900: "#1b5e20",
|
|
1294
|
+
A100: "#b9f6ca",
|
|
1295
|
+
A200: "#69f0ae",
|
|
1296
|
+
A400: "#00e676",
|
|
1297
|
+
A700: "#00c853"
|
|
1298
|
+
};
|
|
1299
|
+
const green$1 = green;
|
|
1300
|
+
var orange = {
|
|
1301
|
+
50: "#fff3e0",
|
|
1302
|
+
100: "#ffe0b2",
|
|
1303
|
+
200: "#ffcc80",
|
|
1304
|
+
300: "#ffb74d",
|
|
1305
|
+
400: "#ffa726",
|
|
1306
|
+
500: "#ff9800",
|
|
1307
|
+
600: "#fb8c00",
|
|
1308
|
+
700: "#f57c00",
|
|
1309
|
+
800: "#ef6c00",
|
|
1310
|
+
900: "#e65100",
|
|
1311
|
+
A100: "#ffd180",
|
|
1312
|
+
A200: "#ffab40",
|
|
1313
|
+
A400: "#ff9100",
|
|
1314
|
+
A700: "#ff6d00"
|
|
1315
|
+
};
|
|
1316
|
+
const orange$1 = orange;
|
|
1317
|
+
var grey = {
|
|
1318
|
+
50: "#fafafa",
|
|
1319
|
+
100: "#f5f5f5",
|
|
1320
|
+
200: "#eeeeee",
|
|
1321
|
+
300: "#e0e0e0",
|
|
1322
|
+
400: "#bdbdbd",
|
|
1323
|
+
500: "#9e9e9e",
|
|
1324
|
+
600: "#757575",
|
|
1325
|
+
700: "#616161",
|
|
1326
|
+
800: "#424242",
|
|
1327
|
+
900: "#212121",
|
|
1328
|
+
A100: "#d5d5d5",
|
|
1329
|
+
A200: "#aaaaaa",
|
|
1330
|
+
A400: "#303030",
|
|
1331
|
+
A700: "#616161"
|
|
1332
|
+
};
|
|
1333
|
+
const grey$1 = grey;
|
|
1334
|
+
function _extends$1() {
|
|
1335
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
1189
1336
|
for (var i = 1; i < arguments.length; i++) {
|
|
1190
1337
|
var source = arguments[i];
|
|
1191
1338
|
for (var key in source) {
|
|
@@ -1196,24 +1343,24 @@ function _extends() {
|
|
|
1196
1343
|
}
|
|
1197
1344
|
return target;
|
|
1198
1345
|
};
|
|
1199
|
-
return _extends.apply(this, arguments);
|
|
1346
|
+
return _extends$1.apply(this, arguments);
|
|
1200
1347
|
}
|
|
1201
|
-
function _typeof$
|
|
1348
|
+
function _typeof$2(obj) {
|
|
1202
1349
|
"@babel/helpers - typeof";
|
|
1203
|
-
return _typeof$
|
|
1350
|
+
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
1204
1351
|
return typeof obj2;
|
|
1205
1352
|
} : function(obj2) {
|
|
1206
1353
|
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
1207
|
-
}, _typeof$
|
|
1354
|
+
}, _typeof$2(obj);
|
|
1208
1355
|
}
|
|
1209
1356
|
function isPlainObject(item) {
|
|
1210
|
-
return item && _typeof$
|
|
1357
|
+
return item && _typeof$2(item) === "object" && item.constructor === Object;
|
|
1211
1358
|
}
|
|
1212
1359
|
function deepmerge(target, source) {
|
|
1213
1360
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
1214
1361
|
clone: true
|
|
1215
1362
|
};
|
|
1216
|
-
var output = options.clone ? _extends({}, target) : target;
|
|
1363
|
+
var output = options.clone ? _extends$1({}, target) : target;
|
|
1217
1364
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
1218
1365
|
Object.keys(source).forEach(function(key) {
|
|
1219
1366
|
if (key === "__proto__") {
|
|
@@ -1261,7 +1408,8 @@ var reactIs_development$1 = {};
|
|
|
1261
1408
|
var REACT_RESPONDER_TYPE = hasSymbol2 ? Symbol.for("react.responder") : 60118;
|
|
1262
1409
|
var REACT_SCOPE_TYPE = hasSymbol2 ? Symbol.for("react.scope") : 60119;
|
|
1263
1410
|
function isValidElementType(type) {
|
|
1264
|
-
return typeof type === "string" || typeof type === "function" ||
|
|
1411
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1412
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1265
1413
|
}
|
|
1266
1414
|
function typeOf(object) {
|
|
1267
1415
|
if (typeof object === "object" && object !== null) {
|
|
@@ -1385,11 +1533,10 @@ var reactIs_development$1 = {};
|
|
|
1385
1533
|
reactIs_development$1.typeOf = typeOf;
|
|
1386
1534
|
})();
|
|
1387
1535
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
})(reactIs$1);
|
|
1536
|
+
{
|
|
1537
|
+
reactIs$1.exports = reactIs_development$1;
|
|
1538
|
+
}
|
|
1539
|
+
var reactIsExports$1 = reactIs$1.exports;
|
|
1393
1540
|
/*
|
|
1394
1541
|
object-assign
|
|
1395
1542
|
(c) Sindre Sorhus
|
|
@@ -1517,7 +1664,7 @@ checkPropTypes$1.resetWarningCache = function() {
|
|
|
1517
1664
|
}
|
|
1518
1665
|
};
|
|
1519
1666
|
var checkPropTypes_1 = checkPropTypes$1;
|
|
1520
|
-
var ReactIs$1 =
|
|
1667
|
+
var ReactIs$1 = reactIsExports$1;
|
|
1521
1668
|
var assign = objectAssign;
|
|
1522
1669
|
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
1523
1670
|
var has = has$2;
|
|
@@ -1600,7 +1747,8 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
1600
1747
|
throw err;
|
|
1601
1748
|
} else if (typeof console !== "undefined") {
|
|
1602
1749
|
var cacheKey = componentName + ":" + propName;
|
|
1603
|
-
if (!manualPropTypeCallCache[cacheKey] &&
|
|
1750
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1751
|
+
manualPropTypeWarningCount < 3) {
|
|
1604
1752
|
printWarning(
|
|
1605
1753
|
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1606
1754
|
);
|
|
@@ -1953,10 +2101,12 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
1953
2101
|
return ReactPropTypes;
|
|
1954
2102
|
};
|
|
1955
2103
|
{
|
|
1956
|
-
var ReactIs =
|
|
2104
|
+
var ReactIs = reactIsExports$1;
|
|
1957
2105
|
var throwOnDirectAccess = true;
|
|
1958
2106
|
propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1959
2107
|
}
|
|
2108
|
+
var propTypesExports = propTypes.exports;
|
|
2109
|
+
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
1960
2110
|
function _defineProperty(obj, key, value) {
|
|
1961
2111
|
if (key in obj) {
|
|
1962
2112
|
Object.defineProperty(obj, key, {
|
|
@@ -1970,9 +2120,9 @@ function _defineProperty(obj, key, value) {
|
|
|
1970
2120
|
}
|
|
1971
2121
|
return obj;
|
|
1972
2122
|
}
|
|
1973
|
-
var specialProperty = "exact-prop:
|
|
2123
|
+
var specialProperty = "exact-prop: ";
|
|
1974
2124
|
function exactProp(propTypes2) {
|
|
1975
|
-
return _extends({}, propTypes2, _defineProperty({}, specialProperty, function(props) {
|
|
2125
|
+
return _extends$1({}, propTypes2, _defineProperty({}, specialProperty, function(props) {
|
|
1976
2126
|
var unsupportedProps = Object.keys(props).filter(function(prop) {
|
|
1977
2127
|
return !propTypes2.hasOwnProperty(prop);
|
|
1978
2128
|
});
|
|
@@ -2175,11 +2325,10 @@ var reactIs_development = {};
|
|
|
2175
2325
|
reactIs_development.typeOf = typeOf;
|
|
2176
2326
|
})();
|
|
2177
2327
|
}
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
})(reactIs);
|
|
2328
|
+
{
|
|
2329
|
+
reactIs.exports = reactIs_development;
|
|
2330
|
+
}
|
|
2331
|
+
var reactIsExports = reactIs.exports;
|
|
2183
2332
|
var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
2184
2333
|
function getFunctionName(fn) {
|
|
2185
2334
|
var match = "".concat(fn).match(fnNameMatchRegex);
|
|
@@ -2204,11 +2353,11 @@ function getDisplayName(Component) {
|
|
|
2204
2353
|
if (typeof Component === "function") {
|
|
2205
2354
|
return getFunctionComponentName(Component, "Component");
|
|
2206
2355
|
}
|
|
2207
|
-
if (_typeof$
|
|
2356
|
+
if (_typeof$2(Component) === "object") {
|
|
2208
2357
|
switch (Component.$$typeof) {
|
|
2209
|
-
case
|
|
2358
|
+
case reactIsExports.ForwardRef:
|
|
2210
2359
|
return getWrappedName(Component, Component.render, "ForwardRef");
|
|
2211
|
-
case
|
|
2360
|
+
case reactIsExports.Memo:
|
|
2212
2361
|
return getWrappedName(Component, Component.type, "memo");
|
|
2213
2362
|
default:
|
|
2214
2363
|
return void 0;
|
|
@@ -2333,7 +2482,7 @@ function lighten(color, coefficient) {
|
|
|
2333
2482
|
}
|
|
2334
2483
|
return recomposeColor(color);
|
|
2335
2484
|
}
|
|
2336
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2485
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
2337
2486
|
if (source == null)
|
|
2338
2487
|
return {};
|
|
2339
2488
|
var target = {};
|
|
@@ -2350,7 +2499,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
2350
2499
|
function _objectWithoutProperties(source, excluded) {
|
|
2351
2500
|
if (source == null)
|
|
2352
2501
|
return {};
|
|
2353
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
2502
|
+
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
2354
2503
|
var key, i;
|
|
2355
2504
|
if (Object.getOwnPropertySymbols) {
|
|
2356
2505
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -2407,7 +2556,7 @@ function createBreakpoints(breakpoints) {
|
|
|
2407
2556
|
}
|
|
2408
2557
|
return values[key];
|
|
2409
2558
|
}
|
|
2410
|
-
return _extends({
|
|
2559
|
+
return _extends$1({
|
|
2411
2560
|
keys,
|
|
2412
2561
|
values,
|
|
2413
2562
|
up,
|
|
@@ -2419,14 +2568,14 @@ function createBreakpoints(breakpoints) {
|
|
|
2419
2568
|
}
|
|
2420
2569
|
function createMixins(breakpoints, spacing, mixins) {
|
|
2421
2570
|
var _toolbar;
|
|
2422
|
-
return _extends({
|
|
2571
|
+
return _extends$1({
|
|
2423
2572
|
gutters: function gutters() {
|
|
2424
2573
|
var styles = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2425
2574
|
console.warn(["Material-UI: theme.mixins.gutters() is deprecated.", "You can use the source of the mixin directly:", "\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n"));
|
|
2426
|
-
return _extends({
|
|
2575
|
+
return _extends$1({
|
|
2427
2576
|
paddingLeft: spacing(2),
|
|
2428
2577
|
paddingRight: spacing(2)
|
|
2429
|
-
}, styles, _defineProperty({}, breakpoints.up("sm"), _extends({
|
|
2578
|
+
}, styles, _defineProperty({}, breakpoints.up("sm"), _extends$1({
|
|
2430
2579
|
paddingLeft: spacing(3),
|
|
2431
2580
|
paddingRight: spacing(3)
|
|
2432
2581
|
}, styles[breakpoints.up("sm")])));
|
|
@@ -2440,149 +2589,39 @@ function createMixins(breakpoints, spacing, mixins) {
|
|
|
2440
2589
|
}), _toolbar)
|
|
2441
2590
|
}, mixins);
|
|
2442
2591
|
}
|
|
2443
|
-
var common = {
|
|
2444
|
-
black: "#000",
|
|
2445
|
-
white: "#fff"
|
|
2446
|
-
};
|
|
2447
|
-
const common$1 = common;
|
|
2448
|
-
var grey = {
|
|
2449
|
-
50: "#fafafa",
|
|
2450
|
-
100: "#f5f5f5",
|
|
2451
|
-
200: "#eeeeee",
|
|
2452
|
-
300: "#e0e0e0",
|
|
2453
|
-
400: "#bdbdbd",
|
|
2454
|
-
500: "#9e9e9e",
|
|
2455
|
-
600: "#757575",
|
|
2456
|
-
700: "#616161",
|
|
2457
|
-
800: "#424242",
|
|
2458
|
-
900: "#212121",
|
|
2459
|
-
A100: "#d5d5d5",
|
|
2460
|
-
A200: "#aaaaaa",
|
|
2461
|
-
A400: "#303030",
|
|
2462
|
-
A700: "#616161"
|
|
2463
|
-
};
|
|
2464
|
-
const grey$1 = grey;
|
|
2465
|
-
var indigo = {
|
|
2466
|
-
50: "#e8eaf6",
|
|
2467
|
-
100: "#c5cae9",
|
|
2468
|
-
200: "#9fa8da",
|
|
2469
|
-
300: "#7986cb",
|
|
2470
|
-
400: "#5c6bc0",
|
|
2471
|
-
500: "#3f51b5",
|
|
2472
|
-
600: "#3949ab",
|
|
2473
|
-
700: "#303f9f",
|
|
2474
|
-
800: "#283593",
|
|
2475
|
-
900: "#1a237e",
|
|
2476
|
-
A100: "#8c9eff",
|
|
2477
|
-
A200: "#536dfe",
|
|
2478
|
-
A400: "#3d5afe",
|
|
2479
|
-
A700: "#304ffe"
|
|
2480
|
-
};
|
|
2481
|
-
const indigo$1 = indigo;
|
|
2482
|
-
var pink = {
|
|
2483
|
-
50: "#fce4ec",
|
|
2484
|
-
100: "#f8bbd0",
|
|
2485
|
-
200: "#f48fb1",
|
|
2486
|
-
300: "#f06292",
|
|
2487
|
-
400: "#ec407a",
|
|
2488
|
-
500: "#e91e63",
|
|
2489
|
-
600: "#d81b60",
|
|
2490
|
-
700: "#c2185b",
|
|
2491
|
-
800: "#ad1457",
|
|
2492
|
-
900: "#880e4f",
|
|
2493
|
-
A100: "#ff80ab",
|
|
2494
|
-
A200: "#ff4081",
|
|
2495
|
-
A400: "#f50057",
|
|
2496
|
-
A700: "#c51162"
|
|
2497
|
-
};
|
|
2498
|
-
const pink$1 = pink;
|
|
2499
|
-
var red = {
|
|
2500
|
-
50: "#ffebee",
|
|
2501
|
-
100: "#ffcdd2",
|
|
2502
|
-
200: "#ef9a9a",
|
|
2503
|
-
300: "#e57373",
|
|
2504
|
-
400: "#ef5350",
|
|
2505
|
-
500: "#f44336",
|
|
2506
|
-
600: "#e53935",
|
|
2507
|
-
700: "#d32f2f",
|
|
2508
|
-
800: "#c62828",
|
|
2509
|
-
900: "#b71c1c",
|
|
2510
|
-
A100: "#ff8a80",
|
|
2511
|
-
A200: "#ff5252",
|
|
2512
|
-
A400: "#ff1744",
|
|
2513
|
-
A700: "#d50000"
|
|
2514
|
-
};
|
|
2515
|
-
const red$1 = red;
|
|
2516
|
-
var orange = {
|
|
2517
|
-
50: "#fff3e0",
|
|
2518
|
-
100: "#ffe0b2",
|
|
2519
|
-
200: "#ffcc80",
|
|
2520
|
-
300: "#ffb74d",
|
|
2521
|
-
400: "#ffa726",
|
|
2522
|
-
500: "#ff9800",
|
|
2523
|
-
600: "#fb8c00",
|
|
2524
|
-
700: "#f57c00",
|
|
2525
|
-
800: "#ef6c00",
|
|
2526
|
-
900: "#e65100",
|
|
2527
|
-
A100: "#ffd180",
|
|
2528
|
-
A200: "#ffab40",
|
|
2529
|
-
A400: "#ff9100",
|
|
2530
|
-
A700: "#ff6d00"
|
|
2531
|
-
};
|
|
2532
|
-
const orange$1 = orange;
|
|
2533
|
-
var blue = {
|
|
2534
|
-
50: "#e3f2fd",
|
|
2535
|
-
100: "#bbdefb",
|
|
2536
|
-
200: "#90caf9",
|
|
2537
|
-
300: "#64b5f6",
|
|
2538
|
-
400: "#42a5f5",
|
|
2539
|
-
500: "#2196f3",
|
|
2540
|
-
600: "#1e88e5",
|
|
2541
|
-
700: "#1976d2",
|
|
2542
|
-
800: "#1565c0",
|
|
2543
|
-
900: "#0d47a1",
|
|
2544
|
-
A100: "#82b1ff",
|
|
2545
|
-
A200: "#448aff",
|
|
2546
|
-
A400: "#2979ff",
|
|
2547
|
-
A700: "#2962ff"
|
|
2548
|
-
};
|
|
2549
|
-
const blue$1 = blue;
|
|
2550
|
-
var green = {
|
|
2551
|
-
50: "#e8f5e9",
|
|
2552
|
-
100: "#c8e6c9",
|
|
2553
|
-
200: "#a5d6a7",
|
|
2554
|
-
300: "#81c784",
|
|
2555
|
-
400: "#66bb6a",
|
|
2556
|
-
500: "#4caf50",
|
|
2557
|
-
600: "#43a047",
|
|
2558
|
-
700: "#388e3c",
|
|
2559
|
-
800: "#2e7d32",
|
|
2560
|
-
900: "#1b5e20",
|
|
2561
|
-
A100: "#b9f6ca",
|
|
2562
|
-
A200: "#69f0ae",
|
|
2563
|
-
A400: "#00e676",
|
|
2564
|
-
A700: "#00c853"
|
|
2565
|
-
};
|
|
2566
|
-
const green$1 = green;
|
|
2567
2592
|
var light = {
|
|
2593
|
+
// The colors used to style the text.
|
|
2568
2594
|
text: {
|
|
2595
|
+
// The most important text.
|
|
2569
2596
|
primary: "rgba(0, 0, 0, 0.87)",
|
|
2597
|
+
// Secondary text.
|
|
2570
2598
|
secondary: "rgba(0, 0, 0, 0.54)",
|
|
2599
|
+
// Disabled text have even lower visual prominence.
|
|
2571
2600
|
disabled: "rgba(0, 0, 0, 0.38)",
|
|
2601
|
+
// Text hints.
|
|
2572
2602
|
hint: "rgba(0, 0, 0, 0.38)"
|
|
2573
2603
|
},
|
|
2604
|
+
// The color used to divide different elements.
|
|
2574
2605
|
divider: "rgba(0, 0, 0, 0.12)",
|
|
2606
|
+
// The background colors used to style the surfaces.
|
|
2607
|
+
// Consistency between these values is important.
|
|
2575
2608
|
background: {
|
|
2576
2609
|
paper: common$1.white,
|
|
2577
2610
|
default: grey$1[50]
|
|
2578
2611
|
},
|
|
2612
|
+
// The colors used to style the action elements.
|
|
2579
2613
|
action: {
|
|
2614
|
+
// The color of an active action like an icon button.
|
|
2580
2615
|
active: "rgba(0, 0, 0, 0.54)",
|
|
2616
|
+
// The color of an hovered action.
|
|
2581
2617
|
hover: "rgba(0, 0, 0, 0.04)",
|
|
2582
2618
|
hoverOpacity: 0.04,
|
|
2619
|
+
// The color of a selected action.
|
|
2583
2620
|
selected: "rgba(0, 0, 0, 0.08)",
|
|
2584
2621
|
selectedOpacity: 0.08,
|
|
2622
|
+
// The color of a disabled action.
|
|
2585
2623
|
disabled: "rgba(0, 0, 0, 0.26)",
|
|
2624
|
+
// The background color of a disabled action.
|
|
2586
2625
|
disabledBackground: "rgba(0, 0, 0, 0.12)",
|
|
2587
2626
|
disabledOpacity: 0.38,
|
|
2588
2627
|
focus: "rgba(0, 0, 0, 0.12)",
|
|
@@ -2670,7 +2709,7 @@ function createPalette(palette) {
|
|
|
2670
2709
|
var mainShade = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 500;
|
|
2671
2710
|
var lightShade = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 300;
|
|
2672
2711
|
var darkShade = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 700;
|
|
2673
|
-
color = _extends({}, color);
|
|
2712
|
+
color = _extends$1({}, color);
|
|
2674
2713
|
if (!color.main && color[mainShade]) {
|
|
2675
2714
|
color.main = color[mainShade];
|
|
2676
2715
|
}
|
|
@@ -2678,7 +2717,7 @@ function createPalette(palette) {
|
|
|
2678
2717
|
throw new Error("Material-UI: The color provided to augmentColor(color) is invalid.\nThe color object needs to have a `main` property or a `".concat(mainShade, "` property."));
|
|
2679
2718
|
}
|
|
2680
2719
|
if (typeof color.main !== "string") {
|
|
2681
|
-
throw new Error("Material-UI: The color provided to augmentColor(color) is invalid.\n`color.main` should be a string, but `".concat(JSON.stringify(color.main), '` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport {
|
|
2720
|
+
throw new Error("Material-UI: The color provided to augmentColor(color) is invalid.\n`color.main` should be a string, but `".concat(JSON.stringify(color.main), '` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@material-ui/core/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });'));
|
|
2682
2721
|
}
|
|
2683
2722
|
addLightOrDark(color, "light", lightShade, tonalOffset);
|
|
2684
2723
|
addLightOrDark(color, "dark", darkShade, tonalOffset);
|
|
@@ -2696,19 +2735,35 @@ function createPalette(palette) {
|
|
|
2696
2735
|
console.error("Material-UI: The palette type `".concat(type, "` is not supported."));
|
|
2697
2736
|
}
|
|
2698
2737
|
}
|
|
2699
|
-
var paletteOutput = deepmerge(_extends({
|
|
2738
|
+
var paletteOutput = deepmerge(_extends$1({
|
|
2739
|
+
// A collection of common colors.
|
|
2700
2740
|
common: common$1,
|
|
2741
|
+
// The palette type, can be light or dark.
|
|
2701
2742
|
type,
|
|
2743
|
+
// The colors used to represent primary interface elements for a user.
|
|
2702
2744
|
primary: augmentColor(primary),
|
|
2745
|
+
// The colors used to represent secondary interface elements for a user.
|
|
2703
2746
|
secondary: augmentColor(secondary, "A400", "A200", "A700"),
|
|
2747
|
+
// The colors used to represent interface elements that the user should be made aware of.
|
|
2704
2748
|
error: augmentColor(error),
|
|
2749
|
+
// The colors used to represent potentially dangerous actions or important messages.
|
|
2705
2750
|
warning: augmentColor(warning2),
|
|
2751
|
+
// The colors used to present information to the user that is neutral and not necessarily important.
|
|
2706
2752
|
info: augmentColor(info),
|
|
2753
|
+
// The colors used to indicate the successful completion of an action that user triggered.
|
|
2707
2754
|
success: augmentColor(success),
|
|
2755
|
+
// The grey colors.
|
|
2708
2756
|
grey: grey$1,
|
|
2757
|
+
// Used by `getContrastText()` to maximize the contrast between
|
|
2758
|
+
// the background and the text.
|
|
2709
2759
|
contrastThreshold,
|
|
2760
|
+
// Takes a background color and returns the text color that maximizes the contrast.
|
|
2710
2761
|
getContrastText,
|
|
2762
|
+
// Generate a rich color object.
|
|
2711
2763
|
augmentColor,
|
|
2764
|
+
// Used by the functions below to shift a color's luminance by approximately
|
|
2765
|
+
// two indexes within its tonal palette.
|
|
2766
|
+
// E.g., shift from Red 500 to Red 300 or Red 700.
|
|
2712
2767
|
tonalOffset
|
|
2713
2768
|
}, types[type]), other);
|
|
2714
2769
|
return paletteOutput;
|
|
@@ -2745,10 +2800,11 @@ function createTypography(palette, typography) {
|
|
|
2745
2800
|
return "".concat(size / htmlFontSize * coef, "rem");
|
|
2746
2801
|
};
|
|
2747
2802
|
var buildVariant = function buildVariant2(fontWeight, size, lineHeight, letterSpacing, casing) {
|
|
2748
|
-
return _extends({
|
|
2803
|
+
return _extends$1({
|
|
2749
2804
|
fontFamily,
|
|
2750
2805
|
fontWeight,
|
|
2751
2806
|
fontSize: pxToRem(size),
|
|
2807
|
+
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
2752
2808
|
lineHeight
|
|
2753
2809
|
}, fontFamily === defaultFontFamily ? {
|
|
2754
2810
|
letterSpacing: "".concat(round(letterSpacing / size), "em")
|
|
@@ -2769,10 +2825,11 @@ function createTypography(palette, typography) {
|
|
|
2769
2825
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
2770
2826
|
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
2771
2827
|
};
|
|
2772
|
-
return deepmerge(_extends({
|
|
2828
|
+
return deepmerge(_extends$1({
|
|
2773
2829
|
htmlFontSize,
|
|
2774
2830
|
pxToRem,
|
|
2775
2831
|
round: roundWithDeprecationWarning,
|
|
2832
|
+
// TODO v5: remove
|
|
2776
2833
|
fontFamily,
|
|
2777
2834
|
fontSize,
|
|
2778
2835
|
fontWeightLight,
|
|
@@ -2781,6 +2838,7 @@ function createTypography(palette, typography) {
|
|
|
2781
2838
|
fontWeightBold
|
|
2782
2839
|
}, variants), other, {
|
|
2783
2840
|
clone: false
|
|
2841
|
+
// No need to clone deep
|
|
2784
2842
|
});
|
|
2785
2843
|
}
|
|
2786
2844
|
var shadowKeyUmbraOpacity = 0.2;
|
|
@@ -2795,43 +2853,8 @@ var shape = {
|
|
|
2795
2853
|
borderRadius: 4
|
|
2796
2854
|
};
|
|
2797
2855
|
const shape$1 = shape;
|
|
2798
|
-
var responsivePropType =
|
|
2856
|
+
var responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]);
|
|
2799
2857
|
const responsivePropType$1 = responsivePropType;
|
|
2800
|
-
function _arrayLikeToArray(arr, len) {
|
|
2801
|
-
if (len == null || len > arr.length)
|
|
2802
|
-
len = arr.length;
|
|
2803
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2804
|
-
arr2[i] = arr[i];
|
|
2805
|
-
}
|
|
2806
|
-
return arr2;
|
|
2807
|
-
}
|
|
2808
|
-
function _arrayWithoutHoles(arr) {
|
|
2809
|
-
if (Array.isArray(arr))
|
|
2810
|
-
return _arrayLikeToArray(arr);
|
|
2811
|
-
}
|
|
2812
|
-
function _iterableToArray(iter) {
|
|
2813
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
2814
|
-
return Array.from(iter);
|
|
2815
|
-
}
|
|
2816
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
2817
|
-
if (!o)
|
|
2818
|
-
return;
|
|
2819
|
-
if (typeof o === "string")
|
|
2820
|
-
return _arrayLikeToArray(o, minLen);
|
|
2821
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2822
|
-
if (n === "Object" && o.constructor)
|
|
2823
|
-
n = o.constructor.name;
|
|
2824
|
-
if (n === "Map" || n === "Set")
|
|
2825
|
-
return Array.from(o);
|
|
2826
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
2827
|
-
return _arrayLikeToArray(o, minLen);
|
|
2828
|
-
}
|
|
2829
|
-
function _nonIterableSpread() {
|
|
2830
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2831
|
-
}
|
|
2832
|
-
function _toConsumableArray(arr) {
|
|
2833
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
2834
|
-
}
|
|
2835
2858
|
var spacingKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "p", "pt", "pr", "pb", "pl", "px", "py", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY"];
|
|
2836
2859
|
function createUnarySpacing(theme) {
|
|
2837
2860
|
var themeSpacing = theme.spacing || 8;
|
|
@@ -2916,18 +2939,27 @@ function createSpacing() {
|
|
|
2916
2939
|
return spacing;
|
|
2917
2940
|
}
|
|
2918
2941
|
var easing = {
|
|
2942
|
+
// This is the most common easing curve.
|
|
2919
2943
|
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
2944
|
+
// Objects enter the screen at full velocity from off-screen and
|
|
2945
|
+
// slowly decelerate to a resting point.
|
|
2920
2946
|
easeOut: "cubic-bezier(0.0, 0, 0.2, 1)",
|
|
2947
|
+
// Objects leave the screen at full velocity. They do not decelerate when off-screen.
|
|
2921
2948
|
easeIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
2949
|
+
// The sharp curve is used by objects that may return to the screen at any time.
|
|
2922
2950
|
sharp: "cubic-bezier(0.4, 0, 0.6, 1)"
|
|
2923
2951
|
};
|
|
2924
2952
|
var duration = {
|
|
2925
2953
|
shortest: 150,
|
|
2926
2954
|
shorter: 200,
|
|
2927
2955
|
short: 250,
|
|
2956
|
+
// most basic recommended timing
|
|
2928
2957
|
standard: 300,
|
|
2958
|
+
// this is to be used in complex animations
|
|
2929
2959
|
complex: 375,
|
|
2960
|
+
// recommended when something is entering screen
|
|
2930
2961
|
enteringScreen: 225,
|
|
2962
|
+
// recommended when something is leaving screen
|
|
2931
2963
|
leavingScreen: 195
|
|
2932
2964
|
};
|
|
2933
2965
|
function formatMs(milliseconds) {
|
|
@@ -2996,8 +3028,10 @@ function createTheme() {
|
|
|
2996
3028
|
direction: "ltr",
|
|
2997
3029
|
mixins: createMixins(breakpoints, spacing, mixinsInput),
|
|
2998
3030
|
overrides: {},
|
|
3031
|
+
// Inject custom styles
|
|
2999
3032
|
palette,
|
|
3000
3033
|
props: {},
|
|
3034
|
+
// Provide default props
|
|
3001
3035
|
shadows: shadows$1,
|
|
3002
3036
|
typography: createTypography(palette, typographyInput),
|
|
3003
3037
|
spacing,
|
|
@@ -3090,12 +3124,50 @@ function warning(condition, message) {
|
|
|
3090
3124
|
}
|
|
3091
3125
|
}
|
|
3092
3126
|
}
|
|
3093
|
-
|
|
3127
|
+
function _extends() {
|
|
3128
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
3129
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3130
|
+
var source = arguments[i];
|
|
3131
|
+
for (var key in source) {
|
|
3132
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3133
|
+
target[key] = source[key];
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
return target;
|
|
3138
|
+
};
|
|
3139
|
+
return _extends.apply(this, arguments);
|
|
3140
|
+
}
|
|
3141
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
3094
3142
|
return typeof obj;
|
|
3095
3143
|
} : function(obj) {
|
|
3096
3144
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3097
3145
|
};
|
|
3098
|
-
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === "object" && document.nodeType === 9;
|
|
3146
|
+
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === "object" && document.nodeType === 9;
|
|
3147
|
+
function _typeof(obj) {
|
|
3148
|
+
"@babel/helpers - typeof";
|
|
3149
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
3150
|
+
return typeof obj2;
|
|
3151
|
+
} : function(obj2) {
|
|
3152
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
3153
|
+
}, _typeof(obj);
|
|
3154
|
+
}
|
|
3155
|
+
function _toPrimitive(input, hint) {
|
|
3156
|
+
if (_typeof(input) !== "object" || input === null)
|
|
3157
|
+
return input;
|
|
3158
|
+
var prim = input[Symbol.toPrimitive];
|
|
3159
|
+
if (prim !== void 0) {
|
|
3160
|
+
var res = prim.call(input, hint || "default");
|
|
3161
|
+
if (_typeof(res) !== "object")
|
|
3162
|
+
return res;
|
|
3163
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3164
|
+
}
|
|
3165
|
+
return (hint === "string" ? String : Number)(input);
|
|
3166
|
+
}
|
|
3167
|
+
function _toPropertyKey(arg) {
|
|
3168
|
+
var key = _toPrimitive(arg, "string");
|
|
3169
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
3170
|
+
}
|
|
3099
3171
|
function _defineProperties(target, props) {
|
|
3100
3172
|
for (var i = 0; i < props.length; i++) {
|
|
3101
3173
|
var descriptor = props[i];
|
|
@@ -3103,7 +3175,7 @@ function _defineProperties(target, props) {
|
|
|
3103
3175
|
descriptor.configurable = true;
|
|
3104
3176
|
if ("value" in descriptor)
|
|
3105
3177
|
descriptor.writable = true;
|
|
3106
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3178
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
3107
3179
|
}
|
|
3108
3180
|
}
|
|
3109
3181
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -3134,6 +3206,20 @@ function _assertThisInitialized(self2) {
|
|
|
3134
3206
|
}
|
|
3135
3207
|
return self2;
|
|
3136
3208
|
}
|
|
3209
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
3210
|
+
if (source == null)
|
|
3211
|
+
return {};
|
|
3212
|
+
var target = {};
|
|
3213
|
+
var sourceKeys = Object.keys(source);
|
|
3214
|
+
var key, i;
|
|
3215
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
3216
|
+
key = sourceKeys[i];
|
|
3217
|
+
if (excluded.indexOf(key) >= 0)
|
|
3218
|
+
continue;
|
|
3219
|
+
target[key] = source[key];
|
|
3220
|
+
}
|
|
3221
|
+
return target;
|
|
3222
|
+
}
|
|
3137
3223
|
var plainObjectConstrurctor = {}.constructor;
|
|
3138
3224
|
function cloneStyle(style) {
|
|
3139
3225
|
if (style == null || typeof style !== "object")
|
|
@@ -3533,6 +3619,7 @@ var pluginKeyframesRule = {
|
|
|
3533
3619
|
onCreateRule: function onCreateRule3(key, frames, options) {
|
|
3534
3620
|
return typeof key === "string" && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;
|
|
3535
3621
|
},
|
|
3622
|
+
// Animation name ref replacer.
|
|
3536
3623
|
onProcessStyle: function onProcessStyle(style, rule, sheet) {
|
|
3537
3624
|
if (rule.type !== "style" || !sheet)
|
|
3538
3625
|
return style;
|
|
@@ -3672,6 +3759,10 @@ var defaultUpdateOptions = {
|
|
|
3672
3759
|
var forceUpdateOptions = {
|
|
3673
3760
|
force: true,
|
|
3674
3761
|
process: true
|
|
3762
|
+
/**
|
|
3763
|
+
* Contains rules objects and allows adding/removing etc.
|
|
3764
|
+
* Is used for e.g. by `StyleSheet` or `ConditionalRule`.
|
|
3765
|
+
*/
|
|
3675
3766
|
};
|
|
3676
3767
|
var RuleList = /* @__PURE__ */ function() {
|
|
3677
3768
|
function RuleList2(options) {
|
|
@@ -3742,7 +3833,7 @@ var RuleList = /* @__PURE__ */ function() {
|
|
|
3742
3833
|
var plugins2 = this.options.jss.plugins;
|
|
3743
3834
|
this.index.slice(0).forEach(plugins2.onProcessRule, plugins2);
|
|
3744
3835
|
};
|
|
3745
|
-
_proto.register = function
|
|
3836
|
+
_proto.register = function register(rule) {
|
|
3746
3837
|
this.map[rule.key] = rule;
|
|
3747
3838
|
if (rule instanceof StyleRule) {
|
|
3748
3839
|
this.map[rule.selector] = rule;
|
|
@@ -3936,7 +4027,9 @@ var StyleSheet = /* @__PURE__ */ function() {
|
|
|
3936
4027
|
};
|
|
3937
4028
|
_proto.deleteRule = function deleteRule(name) {
|
|
3938
4029
|
var rule = typeof name === "object" ? name : this.rules.get(name);
|
|
3939
|
-
if (!rule ||
|
|
4030
|
+
if (!rule || // Style sheet was created without link: true and attached, in this case we
|
|
4031
|
+
// won't be able to remove the CSS rule from the DOM.
|
|
4032
|
+
this.attached && !rule.renderable) {
|
|
3940
4033
|
return false;
|
|
3941
4034
|
}
|
|
3942
4035
|
this.rules.remove(rule);
|
|
@@ -4094,6 +4187,9 @@ var SheetsRegistry = /* @__PURE__ */ function() {
|
|
|
4094
4187
|
};
|
|
4095
4188
|
_createClass(SheetsRegistry2, [{
|
|
4096
4189
|
key: "index",
|
|
4190
|
+
/**
|
|
4191
|
+
* Current highest index number.
|
|
4192
|
+
*/
|
|
4097
4193
|
get: function get2() {
|
|
4098
4194
|
return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;
|
|
4099
4195
|
}
|
|
@@ -4607,7 +4703,7 @@ var GlobalContainerRule = /* @__PURE__ */ function() {
|
|
|
4607
4703
|
this.isProcessed = false;
|
|
4608
4704
|
this.key = key;
|
|
4609
4705
|
this.options = options;
|
|
4610
|
-
this.rules = new RuleList(_extends({}, options, {
|
|
4706
|
+
this.rules = new RuleList(_extends$1({}, options, {
|
|
4611
4707
|
parent: this
|
|
4612
4708
|
}));
|
|
4613
4709
|
for (var selector in styles) {
|
|
@@ -4647,7 +4743,7 @@ var GlobalPrefixedRule = /* @__PURE__ */ function() {
|
|
|
4647
4743
|
this.key = key;
|
|
4648
4744
|
this.options = options;
|
|
4649
4745
|
var selector = key.substr(atPrefix.length);
|
|
4650
|
-
this.rule = options.jss.createRule(selector, style, _extends({}, options, {
|
|
4746
|
+
this.rule = options.jss.createRule(selector, style, _extends$1({}, options, {
|
|
4651
4747
|
parent: this
|
|
4652
4748
|
}));
|
|
4653
4749
|
}
|
|
@@ -4674,7 +4770,7 @@ function handleNestedGlobalContainerRule(rule, sheet) {
|
|
|
4674
4770
|
if (!rules)
|
|
4675
4771
|
return;
|
|
4676
4772
|
for (var name in rules) {
|
|
4677
|
-
sheet.addRule(name, rules[name], _extends({}, options, {
|
|
4773
|
+
sheet.addRule(name, rules[name], _extends$1({}, options, {
|
|
4678
4774
|
selector: addScope(name, rule.selector)
|
|
4679
4775
|
}));
|
|
4680
4776
|
}
|
|
@@ -4686,7 +4782,7 @@ function handlePrefixedGlobalRule(rule, sheet) {
|
|
|
4686
4782
|
if (prop[0] !== "@" || prop.substr(0, at.length) !== at)
|
|
4687
4783
|
continue;
|
|
4688
4784
|
var selector = addScope(prop.substr(at.length), rule.selector);
|
|
4689
|
-
sheet.addRule(selector, style[prop], _extends({}, options, {
|
|
4785
|
+
sheet.addRule(selector, style[prop], _extends$1({}, options, {
|
|
4690
4786
|
selector
|
|
4691
4787
|
}));
|
|
4692
4788
|
delete style[prop];
|
|
@@ -4763,6 +4859,7 @@ function jssNested() {
|
|
|
4763
4859
|
var options = _extends({}, rule.options, {
|
|
4764
4860
|
nestingLevel,
|
|
4765
4861
|
index: container.indexOf(rule) + 1
|
|
4862
|
+
// We don't need the parent name to be set options for chlid.
|
|
4766
4863
|
});
|
|
4767
4864
|
delete options.name;
|
|
4768
4865
|
return options;
|
|
@@ -4864,12 +4961,15 @@ var px = hasCSSTOMSupport && CSS ? CSS.px : "px";
|
|
|
4864
4961
|
var ms = hasCSSTOMSupport && CSS ? CSS.ms : "ms";
|
|
4865
4962
|
var percent = hasCSSTOMSupport && CSS ? CSS.percent : "%";
|
|
4866
4963
|
var defaultUnits = {
|
|
4964
|
+
// Animation properties
|
|
4867
4965
|
"animation-delay": ms,
|
|
4868
4966
|
"animation-duration": ms,
|
|
4967
|
+
// Background properties
|
|
4869
4968
|
"background-position": px,
|
|
4870
4969
|
"background-position-x": px,
|
|
4871
4970
|
"background-position-y": px,
|
|
4872
4971
|
"background-size": px,
|
|
4972
|
+
// Border Properties
|
|
4873
4973
|
border: px,
|
|
4874
4974
|
"border-bottom": px,
|
|
4875
4975
|
"border-bottom-left-radius": px,
|
|
@@ -4901,6 +5001,7 @@ var defaultUnits = {
|
|
|
4901
5001
|
"border-start-end-radius": px,
|
|
4902
5002
|
"border-end-start-radius": px,
|
|
4903
5003
|
"border-end-end-radius": px,
|
|
5004
|
+
// Margin properties
|
|
4904
5005
|
margin: px,
|
|
4905
5006
|
"margin-bottom": px,
|
|
4906
5007
|
"margin-left": px,
|
|
@@ -4912,6 +5013,7 @@ var defaultUnits = {
|
|
|
4912
5013
|
"margin-inline": px,
|
|
4913
5014
|
"margin-inline-end": px,
|
|
4914
5015
|
"margin-inline-start": px,
|
|
5016
|
+
// Padding properties
|
|
4915
5017
|
padding: px,
|
|
4916
5018
|
"padding-bottom": px,
|
|
4917
5019
|
"padding-left": px,
|
|
@@ -4923,15 +5025,18 @@ var defaultUnits = {
|
|
|
4923
5025
|
"padding-inline": px,
|
|
4924
5026
|
"padding-inline-end": px,
|
|
4925
5027
|
"padding-inline-start": px,
|
|
5028
|
+
// Mask properties
|
|
4926
5029
|
"mask-position-x": px,
|
|
4927
5030
|
"mask-position-y": px,
|
|
4928
5031
|
"mask-size": px,
|
|
5032
|
+
// Width and height properties
|
|
4929
5033
|
height: px,
|
|
4930
5034
|
width: px,
|
|
4931
5035
|
"min-height": px,
|
|
4932
5036
|
"max-height": px,
|
|
4933
5037
|
"min-width": px,
|
|
4934
5038
|
"max-width": px,
|
|
5039
|
+
// Position properties
|
|
4935
5040
|
bottom: px,
|
|
4936
5041
|
left: px,
|
|
4937
5042
|
top: px,
|
|
@@ -4943,12 +5048,15 @@ var defaultUnits = {
|
|
|
4943
5048
|
"inset-inline": px,
|
|
4944
5049
|
"inset-inline-end": px,
|
|
4945
5050
|
"inset-inline-start": px,
|
|
5051
|
+
// Shadow properties
|
|
4946
5052
|
"box-shadow": px,
|
|
4947
5053
|
"text-shadow": px,
|
|
5054
|
+
// Column properties
|
|
4948
5055
|
"column-gap": px,
|
|
4949
5056
|
"column-rule": px,
|
|
4950
5057
|
"column-rule-width": px,
|
|
4951
5058
|
"column-width": px,
|
|
5059
|
+
// Font and text properties
|
|
4952
5060
|
"font-size": px,
|
|
4953
5061
|
"font-size-delta": px,
|
|
4954
5062
|
"letter-spacing": px,
|
|
@@ -4957,25 +5065,33 @@ var defaultUnits = {
|
|
|
4957
5065
|
"text-stroke": px,
|
|
4958
5066
|
"text-stroke-width": px,
|
|
4959
5067
|
"word-spacing": px,
|
|
5068
|
+
// Motion properties
|
|
4960
5069
|
motion: px,
|
|
4961
5070
|
"motion-offset": px,
|
|
5071
|
+
// Outline properties
|
|
4962
5072
|
outline: px,
|
|
4963
5073
|
"outline-offset": px,
|
|
4964
5074
|
"outline-width": px,
|
|
5075
|
+
// Perspective properties
|
|
4965
5076
|
perspective: px,
|
|
4966
5077
|
"perspective-origin-x": percent,
|
|
4967
5078
|
"perspective-origin-y": percent,
|
|
5079
|
+
// Transform properties
|
|
4968
5080
|
"transform-origin": percent,
|
|
4969
5081
|
"transform-origin-x": percent,
|
|
4970
5082
|
"transform-origin-y": percent,
|
|
4971
5083
|
"transform-origin-z": percent,
|
|
5084
|
+
// Transition properties
|
|
4972
5085
|
"transition-delay": ms,
|
|
4973
5086
|
"transition-duration": ms,
|
|
5087
|
+
// Alignment properties
|
|
4974
5088
|
"vertical-align": px,
|
|
4975
5089
|
"flex-basis": px,
|
|
5090
|
+
// Some random properties
|
|
4976
5091
|
"shape-margin": px,
|
|
4977
5092
|
size: px,
|
|
4978
5093
|
gap: px,
|
|
5094
|
+
// Grid properties
|
|
4979
5095
|
grid: px,
|
|
4980
5096
|
"grid-gap": px,
|
|
4981
5097
|
"row-gap": px,
|
|
@@ -4985,6 +5101,8 @@ var defaultUnits = {
|
|
|
4985
5101
|
"grid-template-columns": px,
|
|
4986
5102
|
"grid-auto-rows": px,
|
|
4987
5103
|
"grid-auto-columns": px,
|
|
5104
|
+
// Not existing properties.
|
|
5105
|
+
// Used to avoid issues with jss-plugin-expand integration.
|
|
4988
5106
|
"box-shadow-x": px,
|
|
4989
5107
|
"box-shadow-y": px,
|
|
4990
5108
|
"box-shadow-blur": px,
|
|
@@ -5054,6 +5172,40 @@ function defaultUnit(options) {
|
|
|
5054
5172
|
onChangeValue: onChangeValue2
|
|
5055
5173
|
};
|
|
5056
5174
|
}
|
|
5175
|
+
function _arrayLikeToArray(arr, len) {
|
|
5176
|
+
if (len == null || len > arr.length)
|
|
5177
|
+
len = arr.length;
|
|
5178
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
5179
|
+
arr2[i] = arr[i];
|
|
5180
|
+
return arr2;
|
|
5181
|
+
}
|
|
5182
|
+
function _arrayWithoutHoles(arr) {
|
|
5183
|
+
if (Array.isArray(arr))
|
|
5184
|
+
return _arrayLikeToArray(arr);
|
|
5185
|
+
}
|
|
5186
|
+
function _iterableToArray(iter) {
|
|
5187
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
5188
|
+
return Array.from(iter);
|
|
5189
|
+
}
|
|
5190
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
5191
|
+
if (!o)
|
|
5192
|
+
return;
|
|
5193
|
+
if (typeof o === "string")
|
|
5194
|
+
return _arrayLikeToArray(o, minLen);
|
|
5195
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5196
|
+
if (n === "Object" && o.constructor)
|
|
5197
|
+
n = o.constructor.name;
|
|
5198
|
+
if (n === "Map" || n === "Set")
|
|
5199
|
+
return Array.from(o);
|
|
5200
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
5201
|
+
return _arrayLikeToArray(o, minLen);
|
|
5202
|
+
}
|
|
5203
|
+
function _nonIterableSpread() {
|
|
5204
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5205
|
+
}
|
|
5206
|
+
function _toConsumableArray(arr) {
|
|
5207
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
5208
|
+
}
|
|
5057
5209
|
var js = "";
|
|
5058
5210
|
var css = "";
|
|
5059
5211
|
var vendor = "";
|
|
@@ -5272,6 +5424,7 @@ var propMap = {
|
|
|
5272
5424
|
order: "flex-order",
|
|
5273
5425
|
"align-items": "flex-align",
|
|
5274
5426
|
"align-content": "flex-line-pack"
|
|
5427
|
+
// 'align-self' is handled by 'align-self' plugin.
|
|
5275
5428
|
};
|
|
5276
5429
|
var flex2012 = {
|
|
5277
5430
|
supportedProperty: function supportedProperty15(prop, style) {
|
|
@@ -5491,6 +5644,9 @@ function jssPreset() {
|
|
|
5491
5644
|
jssNested(),
|
|
5492
5645
|
camelCase(),
|
|
5493
5646
|
defaultUnit(),
|
|
5647
|
+
// Disable the vendor prefixer server-side, it does nothing.
|
|
5648
|
+
// This way, we can get a performance boost.
|
|
5649
|
+
// In the documentation, we are using `autoprefixer` to solve this problem.
|
|
5494
5650
|
typeof window === "undefined" ? null : jssVendorPrefixer(),
|
|
5495
5651
|
jssPropsSort()
|
|
5496
5652
|
]
|
|
@@ -5502,7 +5658,7 @@ function mergeClasses() {
|
|
|
5502
5658
|
if (!newClasses) {
|
|
5503
5659
|
return baseClasses;
|
|
5504
5660
|
}
|
|
5505
|
-
var nextClasses = _extends({}, baseClasses);
|
|
5661
|
+
var nextClasses = _extends$1({}, baseClasses);
|
|
5506
5662
|
{
|
|
5507
5663
|
if (typeof newClasses === "string") {
|
|
5508
5664
|
console.error(["Material-UI: The value `".concat(newClasses, "` ") + "provided to the classes prop of ".concat(getDisplayName(Component), " is incorrect."), "You might want to use the className prop instead."].join("\n"));
|
|
@@ -5574,7 +5730,7 @@ var injectFirstNode;
|
|
|
5574
5730
|
function StylesProvider(props) {
|
|
5575
5731
|
var children = props.children, _props$injectFirst = props.injectFirst, injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst, _props$disableGenerat = props.disableGeneration, disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat, localOptions = _objectWithoutProperties(props, ["children", "injectFirst", "disableGeneration"]);
|
|
5576
5732
|
var outerOptions = React.useContext(StylesContext);
|
|
5577
|
-
var context = _extends({}, outerOptions, {
|
|
5733
|
+
var context = _extends$1({}, outerOptions, {
|
|
5578
5734
|
disableGeneration
|
|
5579
5735
|
}, localOptions);
|
|
5580
5736
|
{
|
|
@@ -5608,15 +5764,58 @@ function StylesProvider(props) {
|
|
|
5608
5764
|
}, children);
|
|
5609
5765
|
}
|
|
5610
5766
|
StylesProvider.propTypes = {
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5767
|
+
/**
|
|
5768
|
+
* Your component tree.
|
|
5769
|
+
*/
|
|
5770
|
+
children: PropTypes.node.isRequired,
|
|
5771
|
+
/**
|
|
5772
|
+
* You can disable the generation of the styles with this option.
|
|
5773
|
+
* It can be useful when traversing the React tree outside of the HTML
|
|
5774
|
+
* rendering step on the server.
|
|
5775
|
+
* Let's say you are using react-apollo to extract all
|
|
5776
|
+
* the queries made by the interface server-side - you can significantly speed up the traversal with this prop.
|
|
5777
|
+
*/
|
|
5778
|
+
disableGeneration: PropTypes.bool,
|
|
5779
|
+
/**
|
|
5780
|
+
* JSS's class name generator.
|
|
5781
|
+
*/
|
|
5782
|
+
generateClassName: PropTypes.func,
|
|
5783
|
+
/**
|
|
5784
|
+
* By default, the styles are injected last in the <head> element of the page.
|
|
5785
|
+
* As a result, they gain more specificity than any other style sheet.
|
|
5786
|
+
* If you want to override Material-UI's styles, set this prop.
|
|
5787
|
+
*/
|
|
5788
|
+
injectFirst: PropTypes.bool,
|
|
5789
|
+
/**
|
|
5790
|
+
* JSS's instance.
|
|
5791
|
+
*/
|
|
5792
|
+
jss: PropTypes.object,
|
|
5793
|
+
/**
|
|
5794
|
+
* @ignore
|
|
5795
|
+
*/
|
|
5796
|
+
serverGenerateClassName: PropTypes.func,
|
|
5797
|
+
/**
|
|
5798
|
+
* @ignore
|
|
5799
|
+
*
|
|
5800
|
+
* Beta feature.
|
|
5801
|
+
*
|
|
5802
|
+
* Cache for the sheets.
|
|
5803
|
+
*/
|
|
5804
|
+
sheetsCache: PropTypes.object,
|
|
5805
|
+
/**
|
|
5806
|
+
* @ignore
|
|
5807
|
+
*
|
|
5808
|
+
* The sheetsManager is used to deduplicate style sheet injection in the page.
|
|
5809
|
+
* It's deduplicating using the (theme, styles) couple.
|
|
5810
|
+
* On the server, you should provide a new instance for each request.
|
|
5811
|
+
*/
|
|
5812
|
+
sheetsManager: PropTypes.object,
|
|
5813
|
+
/**
|
|
5814
|
+
* @ignore
|
|
5815
|
+
*
|
|
5816
|
+
* Collect the sheets.
|
|
5817
|
+
*/
|
|
5818
|
+
sheetsRegistry: PropTypes.object
|
|
5620
5819
|
};
|
|
5621
5820
|
{
|
|
5622
5821
|
StylesProvider.propTypes = exactProp(StylesProvider.propTypes);
|
|
@@ -5636,7 +5835,7 @@ const noopTheme$1 = noopTheme;
|
|
|
5636
5835
|
function getStylesCreator(stylesOrCreator) {
|
|
5637
5836
|
var themingEnabled = typeof stylesOrCreator === "function";
|
|
5638
5837
|
{
|
|
5639
|
-
if (_typeof$
|
|
5838
|
+
if (_typeof$2(stylesOrCreator) !== "object" && !themingEnabled) {
|
|
5640
5839
|
console.error(["Material-UI: The `styles` argument provided is invalid.", "You need to provide a function generating the styles or a styles object."].join("\n"));
|
|
5641
5840
|
}
|
|
5642
5841
|
}
|
|
@@ -5657,7 +5856,7 @@ function getStylesCreator(stylesOrCreator) {
|
|
|
5657
5856
|
return styles;
|
|
5658
5857
|
}
|
|
5659
5858
|
var overrides = theme.overrides[name];
|
|
5660
|
-
var stylesWithOverrides = _extends({}, styles);
|
|
5859
|
+
var stylesWithOverrides = _extends$1({}, styles);
|
|
5661
5860
|
Object.keys(overrides).forEach(function(key) {
|
|
5662
5861
|
{
|
|
5663
5862
|
if (!stylesWithOverrides[key]) {
|
|
@@ -5678,8 +5877,11 @@ function getClasses(_ref, classes, Component) {
|
|
|
5678
5877
|
}
|
|
5679
5878
|
if (!state.cacheClasses) {
|
|
5680
5879
|
state.cacheClasses = {
|
|
5880
|
+
// Cache for the finalized classes value.
|
|
5681
5881
|
value: null,
|
|
5882
|
+
// Cache for the last used classes prop pointer.
|
|
5682
5883
|
lastProp: null,
|
|
5884
|
+
// Cache for the last used rendered classes pointer.
|
|
5683
5885
|
lastJSS: {}
|
|
5684
5886
|
};
|
|
5685
5887
|
}
|
|
@@ -5715,7 +5917,7 @@ function attach(_ref2, props) {
|
|
|
5715
5917
|
};
|
|
5716
5918
|
multiKeyStore$1.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);
|
|
5717
5919
|
}
|
|
5718
|
-
var options = _extends({}, stylesCreator.options, stylesOptions, {
|
|
5920
|
+
var options = _extends$1({}, stylesCreator.options, stylesOptions, {
|
|
5719
5921
|
theme,
|
|
5720
5922
|
flip: typeof stylesOptions.flip === "boolean" ? stylesOptions.flip : theme.direction === "rtl"
|
|
5721
5923
|
});
|
|
@@ -5728,7 +5930,7 @@ function attach(_ref2, props) {
|
|
|
5728
5930
|
}
|
|
5729
5931
|
var styles = stylesCreator.create(theme, name);
|
|
5730
5932
|
if (!staticSheet) {
|
|
5731
|
-
staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({
|
|
5933
|
+
staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends$1({
|
|
5732
5934
|
link: false
|
|
5733
5935
|
}, options));
|
|
5734
5936
|
staticSheet.attach();
|
|
@@ -5743,7 +5945,7 @@ function attach(_ref2, props) {
|
|
|
5743
5945
|
sheetManager.dynamicStyles = getDynamicStyles(styles);
|
|
5744
5946
|
}
|
|
5745
5947
|
if (sheetManager.dynamicStyles) {
|
|
5746
|
-
var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({
|
|
5948
|
+
var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends$1({
|
|
5747
5949
|
link: true
|
|
5748
5950
|
}, options));
|
|
5749
5951
|
dynamicSheet.update(props);
|
|
@@ -5808,6 +6010,7 @@ function useSynchronousEffect(func, values) {
|
|
|
5808
6010
|
};
|
|
5809
6011
|
},
|
|
5810
6012
|
[currentKey]
|
|
6013
|
+
// eslint-disable-line react-hooks/exhaustive-deps
|
|
5811
6014
|
);
|
|
5812
6015
|
}
|
|
5813
6016
|
function makeStyles$1(stylesOrCreator) {
|
|
@@ -5824,7 +6027,7 @@ function makeStyles$1(stylesOrCreator) {
|
|
|
5824
6027
|
var useStyles2 = function useStyles3() {
|
|
5825
6028
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5826
6029
|
var theme = useTheme() || defaultTheme2;
|
|
5827
|
-
var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);
|
|
6030
|
+
var stylesOptions = _extends$1({}, React.useContext(StylesContext), stylesOptions2);
|
|
5828
6031
|
var instance = React.useRef();
|
|
5829
6032
|
var shouldUpdate = React.useRef();
|
|
5830
6033
|
useSynchronousEffect(function() {
|
|
@@ -5860,7 +6063,7 @@ var defaultTheme = createTheme();
|
|
|
5860
6063
|
const defaultTheme$1 = defaultTheme;
|
|
5861
6064
|
function makeStyles(stylesOrCreator) {
|
|
5862
6065
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5863
|
-
return makeStyles$1(stylesOrCreator, _extends({
|
|
6066
|
+
return makeStyles$1(stylesOrCreator, _extends$1({
|
|
5864
6067
|
defaultTheme: defaultTheme$1
|
|
5865
6068
|
}, options));
|
|
5866
6069
|
}
|
|
@@ -5874,6 +6077,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
5874
6077
|
marginBottom: "6px"
|
|
5875
6078
|
},
|
|
5876
6079
|
"& summary": {
|
|
6080
|
+
// TODO(monorepo): lighten color by 10%
|
|
5877
6081
|
borderBottom: `1px solid ${theme.palette.primaryBackground}`,
|
|
5878
6082
|
cursor: "pointer"
|
|
5879
6083
|
}
|
|
@@ -5892,6 +6096,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
5892
6096
|
width: "50%"
|
|
5893
6097
|
},
|
|
5894
6098
|
"& tr:nth-child(even)": {
|
|
6099
|
+
// TODO(monorepo): lighten color by 5%
|
|
5895
6100
|
backgroundColor: `1px solid ${theme.palette.primaryBackground}`
|
|
5896
6101
|
}
|
|
5897
6102
|
}
|
|
@@ -5900,43 +6105,17 @@ const useStyles = makeStyles((theme) => ({
|
|
|
5900
6105
|
function Description(props) {
|
|
5901
6106
|
const { description, metadata } = props;
|
|
5902
6107
|
const classes = useStyles();
|
|
5903
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
5904
|
-
|
|
5905
|
-
children: [
|
|
5906
|
-
/* @__PURE__ */ jsx("
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
}),
|
|
5914
|
-
/* @__PURE__ */ jsx("div", {
|
|
5915
|
-
className: classes.metadataContainer,
|
|
5916
|
-
children: /* @__PURE__ */ jsx("table", {
|
|
5917
|
-
children: /* @__PURE__ */ jsx("tbody", {
|
|
5918
|
-
children: Object.entries(metadataRecord).map(([key, value]) => /* @__PURE__ */ jsxs("tr", {
|
|
5919
|
-
children: [
|
|
5920
|
-
/* @__PURE__ */ jsx("th", {
|
|
5921
|
-
title: key,
|
|
5922
|
-
children: key
|
|
5923
|
-
}),
|
|
5924
|
-
/* @__PURE__ */ jsx("td", {
|
|
5925
|
-
title: value,
|
|
5926
|
-
children: value
|
|
5927
|
-
})
|
|
5928
|
-
]
|
|
5929
|
-
}, key))
|
|
5930
|
-
})
|
|
5931
|
-
})
|
|
5932
|
-
})
|
|
5933
|
-
]
|
|
5934
|
-
}, layerIndex) : null)
|
|
5935
|
-
]
|
|
5936
|
-
});
|
|
6108
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.description, children: [
|
|
6109
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: description }),
|
|
6110
|
+
metadata && Array.from(metadata.entries()).map(([layerIndex, { name: layerName, metadata: metadataRecord }]) => metadataRecord && Object.entries(metadataRecord).length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { children: [
|
|
6111
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("summary", { children: layerName }),
|
|
6112
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.metadataContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("table", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: Object.entries(metadataRecord).map(([key, value]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
|
|
6113
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { title: key, children: key }),
|
|
6114
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { title: value, children: value })
|
|
6115
|
+
] }, key)) }) }) })
|
|
6116
|
+
] }, layerIndex) : null)
|
|
6117
|
+
] });
|
|
5937
6118
|
}
|
|
5938
|
-
const addUrl = () => {
|
|
5939
|
-
};
|
|
5940
6119
|
function DescriptionSubscriber(props) {
|
|
5941
6120
|
const {
|
|
5942
6121
|
coordinationScopes,
|
|
@@ -5954,11 +6133,11 @@ function DescriptionSubscriber(props) {
|
|
|
5954
6133
|
const [{ image }, imageStatus] = useImageData(
|
|
5955
6134
|
loaders,
|
|
5956
6135
|
dataset,
|
|
5957
|
-
addUrl,
|
|
5958
6136
|
false,
|
|
5959
6137
|
{},
|
|
5960
6138
|
{},
|
|
5961
6139
|
{}
|
|
6140
|
+
// TODO: which properties to match on. Revisit after #830.
|
|
5962
6141
|
);
|
|
5963
6142
|
const { loaders: imageLayerLoaders = [], meta: imageLayerMeta = [] } = image || {};
|
|
5964
6143
|
const isReady = useReady([imageStatus]);
|
|
@@ -5977,27 +6156,25 @@ function DescriptionSubscriber(props) {
|
|
|
5977
6156
|
}
|
|
5978
6157
|
return result;
|
|
5979
6158
|
}, [rasterLayers, imageLayerMeta, imageLayerLoaders]);
|
|
5980
|
-
return /* @__PURE__ */ jsx(
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
COMPONENT_COORDINATION_TYPES[ViewType.DESCRIPTION]
|
|
6159
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6160
|
+
TitleInfo,
|
|
6161
|
+
{
|
|
6162
|
+
title,
|
|
6163
|
+
removeGridComponent,
|
|
6164
|
+
isScroll: true,
|
|
6165
|
+
theme,
|
|
6166
|
+
isReady,
|
|
6167
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6168
|
+
Description,
|
|
6169
|
+
{
|
|
6170
|
+
description: descriptionOverride || description,
|
|
6171
|
+
metadata
|
|
6172
|
+
}
|
|
6173
|
+
)
|
|
6174
|
+
}
|
|
5997
6175
|
);
|
|
5998
6176
|
}
|
|
5999
6177
|
export {
|
|
6000
6178
|
Description,
|
|
6001
|
-
DescriptionSubscriber
|
|
6002
|
-
register
|
|
6179
|
+
DescriptionSubscriber
|
|
6003
6180
|
};
|