@micromag/core 0.2.384 → 0.2.399
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/es/contexts.js +2 -3
- package/es/hooks.js +14 -5
- package/es/index.js +1 -1
- package/lib/contexts.js +2 -3
- package/lib/hooks.js +14 -5
- package/lib/index.js +1 -1
- package/package.json +13 -14
package/es/contexts.js
CHANGED
|
@@ -1157,9 +1157,8 @@ var _excluded$2 = ["default"];
|
|
|
1157
1157
|
|
|
1158
1158
|
var packagesCache$1 = {};
|
|
1159
1159
|
var defaultPackagesMap$1 = {
|
|
1160
|
-
transloadit:
|
|
1161
|
-
|
|
1162
|
-
},
|
|
1160
|
+
transloadit: null,
|
|
1161
|
+
// Disabled for compatibility reasons
|
|
1163
1162
|
tus: function tus() {
|
|
1164
1163
|
return import('@uppy/tus');
|
|
1165
1164
|
},
|
package/es/hooks.js
CHANGED
|
@@ -1125,21 +1125,30 @@ var useScreenSizeFromElement = function useScreenSizeFromElement() {
|
|
|
1125
1125
|
var fullWidth = width !== null ? width : calculatedWidth;
|
|
1126
1126
|
var fullHeight = height !== null ? height : calculatedHeight;
|
|
1127
1127
|
var landscape = fullHeight > 0 && fullWidth > fullHeight;
|
|
1128
|
-
|
|
1129
|
-
|
|
1128
|
+
|
|
1129
|
+
var _ref6 = opts || {},
|
|
1130
|
+
_ref6$withoutMaxSize = _ref6.withoutMaxSize,
|
|
1131
|
+
withoutMaxSize = _ref6$withoutMaxSize === void 0 ? false : _ref6$withoutMaxSize,
|
|
1132
|
+
_ref6$desktopHeightTh = _ref6.desktopHeightThreshold,
|
|
1133
|
+
desktopHeightThreshold = _ref6$desktopHeightTh === void 0 ? 600 : _ref6$desktopHeightTh,
|
|
1134
|
+
_ref6$desktopHeightRa = _ref6.desktopHeightRatio,
|
|
1135
|
+
desktopHeightRatio = _ref6$desktopHeightRa === void 0 ? 3 / 4 : _ref6$desktopHeightRa,
|
|
1136
|
+
_ref6$screenRatio = _ref6.screenRatio,
|
|
1137
|
+
screenRatio = _ref6$screenRatio === void 0 ? 2 / 3 : _ref6$screenRatio;
|
|
1138
|
+
|
|
1130
1139
|
var landscapeWithMaxSize = landscape && !withoutMaxSize;
|
|
1131
1140
|
var finalWidth = fullWidth;
|
|
1132
1141
|
var finalHeight = fullHeight;
|
|
1133
1142
|
var menuOverScreen = !landscape;
|
|
1134
1143
|
|
|
1135
1144
|
if (landscapeWithMaxSize) {
|
|
1136
|
-
if (fullHeight <
|
|
1145
|
+
if (fullHeight < desktopHeightThreshold) {
|
|
1137
1146
|
menuOverScreen = true;
|
|
1138
1147
|
} else {
|
|
1139
|
-
finalHeight = Math.round(fullHeight *
|
|
1148
|
+
finalHeight = Math.round(fullHeight * desktopHeightRatio);
|
|
1140
1149
|
}
|
|
1141
1150
|
|
|
1142
|
-
finalWidth = Math.round(finalHeight *
|
|
1151
|
+
finalWidth = Math.round(finalHeight * screenRatio);
|
|
1143
1152
|
}
|
|
1144
1153
|
|
|
1145
1154
|
if (finalWidth % 2 === 1) {
|
package/es/index.js
CHANGED
|
@@ -1119,7 +1119,7 @@ var FieldsManager = /*#__PURE__*/function (_DefinitionsManager) {
|
|
|
1119
1119
|
return _super.apply(this, arguments);
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
return FieldsManager;
|
|
1122
|
+
return _createClass(FieldsManager);
|
|
1123
1123
|
}(DefinitionsManager);
|
|
1124
1124
|
|
|
1125
1125
|
var _excluded$2 = ["medias"];
|
package/lib/contexts.js
CHANGED
|
@@ -1191,9 +1191,8 @@ var _excluded$2 = ["default"];
|
|
|
1191
1191
|
|
|
1192
1192
|
var packagesCache$1 = {};
|
|
1193
1193
|
var defaultPackagesMap$1 = {
|
|
1194
|
-
transloadit:
|
|
1195
|
-
|
|
1196
|
-
},
|
|
1194
|
+
transloadit: null,
|
|
1195
|
+
// Disabled for compatibility reasons
|
|
1197
1196
|
tus: function tus() {
|
|
1198
1197
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@uppy/tus')); });
|
|
1199
1198
|
},
|
package/lib/hooks.js
CHANGED
|
@@ -1161,21 +1161,30 @@ var useScreenSizeFromElement = function useScreenSizeFromElement() {
|
|
|
1161
1161
|
var fullWidth = width !== null ? width : calculatedWidth;
|
|
1162
1162
|
var fullHeight = height !== null ? height : calculatedHeight;
|
|
1163
1163
|
var landscape = fullHeight > 0 && fullWidth > fullHeight;
|
|
1164
|
-
|
|
1165
|
-
|
|
1164
|
+
|
|
1165
|
+
var _ref6 = opts || {},
|
|
1166
|
+
_ref6$withoutMaxSize = _ref6.withoutMaxSize,
|
|
1167
|
+
withoutMaxSize = _ref6$withoutMaxSize === void 0 ? false : _ref6$withoutMaxSize,
|
|
1168
|
+
_ref6$desktopHeightTh = _ref6.desktopHeightThreshold,
|
|
1169
|
+
desktopHeightThreshold = _ref6$desktopHeightTh === void 0 ? 600 : _ref6$desktopHeightTh,
|
|
1170
|
+
_ref6$desktopHeightRa = _ref6.desktopHeightRatio,
|
|
1171
|
+
desktopHeightRatio = _ref6$desktopHeightRa === void 0 ? 3 / 4 : _ref6$desktopHeightRa,
|
|
1172
|
+
_ref6$screenRatio = _ref6.screenRatio,
|
|
1173
|
+
screenRatio = _ref6$screenRatio === void 0 ? 2 / 3 : _ref6$screenRatio;
|
|
1174
|
+
|
|
1166
1175
|
var landscapeWithMaxSize = landscape && !withoutMaxSize;
|
|
1167
1176
|
var finalWidth = fullWidth;
|
|
1168
1177
|
var finalHeight = fullHeight;
|
|
1169
1178
|
var menuOverScreen = !landscape;
|
|
1170
1179
|
|
|
1171
1180
|
if (landscapeWithMaxSize) {
|
|
1172
|
-
if (fullHeight <
|
|
1181
|
+
if (fullHeight < desktopHeightThreshold) {
|
|
1173
1182
|
menuOverScreen = true;
|
|
1174
1183
|
} else {
|
|
1175
|
-
finalHeight = Math.round(fullHeight *
|
|
1184
|
+
finalHeight = Math.round(fullHeight * desktopHeightRatio);
|
|
1176
1185
|
}
|
|
1177
1186
|
|
|
1178
|
-
finalWidth = Math.round(finalHeight *
|
|
1187
|
+
finalWidth = Math.round(finalHeight * screenRatio);
|
|
1179
1188
|
}
|
|
1180
1189
|
|
|
1181
1190
|
if (finalWidth % 2 === 1) {
|
package/lib/index.js
CHANGED
|
@@ -1145,7 +1145,7 @@ var FieldsManager = /*#__PURE__*/function (_DefinitionsManager) {
|
|
|
1145
1145
|
return _super.apply(this, arguments);
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
|
-
return FieldsManager;
|
|
1148
|
+
return _createClass__default["default"](FieldsManager);
|
|
1149
1149
|
}(DefinitionsManager);
|
|
1150
1150
|
|
|
1151
1151
|
var _excluded$2 = ["medias"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.399",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -86,18 +86,17 @@
|
|
|
86
86
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
87
87
|
"@react-spring/core": "^9.1.1",
|
|
88
88
|
"@react-spring/web": "^9.1.1",
|
|
89
|
-
"@uppy/core": "^2.1.
|
|
90
|
-
"@uppy/dashboard": "^2.1.
|
|
91
|
-
"@uppy/dropbox": "^2.0.
|
|
92
|
-
"@uppy/facebook": "^2.0.
|
|
93
|
-
"@uppy/google-drive": "^2.0.
|
|
94
|
-
"@uppy/instagram": "^2.0.
|
|
95
|
-
"@uppy/locales": "^2.0.
|
|
96
|
-
"@uppy/react": "^2.1.
|
|
97
|
-
"@uppy/
|
|
98
|
-
"@uppy/
|
|
99
|
-
"@uppy/
|
|
100
|
-
"@uppy/xhr-upload": "^2.0.5",
|
|
89
|
+
"@uppy/core": "^2.1.4",
|
|
90
|
+
"@uppy/dashboard": "^2.1.3",
|
|
91
|
+
"@uppy/dropbox": "^2.0.5",
|
|
92
|
+
"@uppy/facebook": "^2.0.5",
|
|
93
|
+
"@uppy/google-drive": "^2.0.5",
|
|
94
|
+
"@uppy/instagram": "^2.0.5",
|
|
95
|
+
"@uppy/locales": "^2.0.5",
|
|
96
|
+
"@uppy/react": "^2.1.2",
|
|
97
|
+
"@uppy/tus": "^2.2.0",
|
|
98
|
+
"@uppy/webcam": "^2.0.5",
|
|
99
|
+
"@uppy/xhr-upload": "^2.0.7",
|
|
101
100
|
"bootstrap": "^4.5.3",
|
|
102
101
|
"change-case": "^4.1.2",
|
|
103
102
|
"classnames": "^2.2.6",
|
|
@@ -125,5 +124,5 @@
|
|
|
125
124
|
"publishConfig": {
|
|
126
125
|
"access": "public"
|
|
127
126
|
},
|
|
128
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "7831a2f2c709e75b499cefbad367cfd7ee41cf04"
|
|
129
128
|
}
|