@micromag/viewer 0.3.484 → 0.3.486
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/lib/index.js +6 -5
- package/package.json +12 -11
package/lib/index.js
CHANGED
|
@@ -474,13 +474,14 @@ function RoutesProvider(_ref) {
|
|
|
474
474
|
RoutesProvider.propTypes = propTypes$o;
|
|
475
475
|
RoutesProvider.defaultProps = defaultProps$o;
|
|
476
476
|
var compilers = {};
|
|
477
|
-
function generatePath(
|
|
477
|
+
function generatePath(fullPath, data) {
|
|
478
478
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
var fullUrlMatches = fullPath.match(/^(https?:\/\/[^/]+)\//);
|
|
480
|
+
if (typeof compilers[fullPath] === 'undefined') {
|
|
481
|
+
compilers[fullPath] = pathToRegexp.compile(fullPath.replace(/^(https?:\/\/[^/]+)\//, '/'), opts);
|
|
481
482
|
}
|
|
482
|
-
var compiler = compilers[
|
|
483
|
-
return compiler(data);
|
|
483
|
+
var compiler = compilers[fullPath];
|
|
484
|
+
return fullUrlMatches !== null ? "".concat(fullUrlMatches[1].substr(0, -1)).concat(compiler(data)) : compiler(data);
|
|
484
485
|
}
|
|
485
486
|
var useUrlGeneratorPathToRepexp = function useUrlGeneratorPathToRepexp() {
|
|
486
487
|
var _ref2 = useRoutesContext() || {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.486",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
],
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets && rm -rf scss",
|
|
54
|
-
"
|
|
54
|
+
"prepublishOnly": "npm run build",
|
|
55
|
+
"build": "../../scripts/prepare-package.sh --scss"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -64,14 +65,14 @@
|
|
|
64
65
|
"dependencies": {
|
|
65
66
|
"@babel/runtime": "^7.13.10",
|
|
66
67
|
"@folklore/routes": "^0.2.27",
|
|
67
|
-
"@micromag/core": "^0.3.
|
|
68
|
-
"@micromag/element-badge": "^0.3.
|
|
69
|
-
"@micromag/element-scroll": "^0.3.
|
|
70
|
-
"@micromag/element-share-options": "^0.3.
|
|
71
|
-
"@micromag/element-webview": "^0.3.
|
|
72
|
-
"@micromag/elements": "^0.3.
|
|
73
|
-
"@micromag/intl": "^0.3.
|
|
74
|
-
"@micromag/screens": "^0.3.
|
|
68
|
+
"@micromag/core": "^0.3.486",
|
|
69
|
+
"@micromag/element-badge": "^0.3.486",
|
|
70
|
+
"@micromag/element-scroll": "^0.3.486",
|
|
71
|
+
"@micromag/element-share-options": "^0.3.486",
|
|
72
|
+
"@micromag/element-webview": "^0.3.486",
|
|
73
|
+
"@micromag/elements": "^0.3.486",
|
|
74
|
+
"@micromag/intl": "^0.3.486",
|
|
75
|
+
"@micromag/screens": "^0.3.486",
|
|
75
76
|
"@react-spring/core": "^9.6.1",
|
|
76
77
|
"@react-spring/web": "^9.6.1",
|
|
77
78
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -90,5 +91,5 @@
|
|
|
90
91
|
"access": "public",
|
|
91
92
|
"registry": "https://registry.npmjs.org/"
|
|
92
93
|
},
|
|
93
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "dc11ac41ea80f5d5c5d7c247bfa146fda3cc9905"
|
|
94
95
|
}
|