@micromag/core 0.3.482 → 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.
Files changed (2) hide show
  1. package/lib/contexts.js +6 -5
  2. package/package.json +4 -4
package/lib/contexts.js CHANGED
@@ -1288,13 +1288,14 @@ function RoutesProvider(_ref) {
1288
1288
  RoutesProvider.propTypes = propTypes$6;
1289
1289
  RoutesProvider.defaultProps = defaultProps$6;
1290
1290
  var compilers = {};
1291
- function generatePath(path, data) {
1291
+ function generatePath(fullPath, data) {
1292
1292
  var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1293
- if (typeof compilers[path] === 'undefined') {
1294
- compilers[path] = pathToRegexp.compile(path, opts);
1293
+ var fullUrlMatches = fullPath.match(/^(https?:\/\/[^/]+)\//);
1294
+ if (typeof compilers[fullPath] === 'undefined') {
1295
+ compilers[fullPath] = pathToRegexp.compile(fullPath.replace(/^(https?:\/\/[^/]+)\//, '/'), opts);
1295
1296
  }
1296
- var compiler = compilers[path];
1297
- return compiler(data);
1297
+ var compiler = compilers[fullPath];
1298
+ return fullUrlMatches !== null ? "".concat(fullUrlMatches[1].substr(0, -1)).concat(compiler(data)) : compiler(data);
1298
1299
  }
1299
1300
  var useUrlGeneratorPathToRepexp = function useUrlGeneratorPathToRepexp() {
1300
1301
  var _ref2 = useRoutesContext() || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.482",
3
+ "version": "0.3.486",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -93,7 +93,8 @@
93
93
  "scripts": {
94
94
  "clean": "rm -rf es && rm -rf lib && rm -rf assets && rm -rf scss",
95
95
  "vendor": "../../scripts/build-sass.js ./src/styles/vendor.scss ./assets/css/vendor.css",
96
- "prepare": "../../scripts/prepare-package.sh --scss && npm run vendor"
96
+ "prepublishOnly": "npm run build",
97
+ "build": "../../scripts/prepare-package.sh --scss && npm run vendor"
97
98
  },
98
99
  "devDependencies": {
99
100
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
@@ -114,7 +115,6 @@
114
115
  "@fortawesome/fontawesome-svg-core": "^1.2.32",
115
116
  "@fortawesome/free-solid-svg-icons": "^5.15.1",
116
117
  "@fortawesome/react-fontawesome": "^0.1.13",
117
- "@panneau/core": "^3.0.119",
118
118
  "@react-spring/core": "^9.6.1",
119
119
  "@react-spring/web": "^9.6.1",
120
120
  "@uppy/core": "^2.1.4",
@@ -155,5 +155,5 @@
155
155
  "access": "public",
156
156
  "registry": "https://registry.npmjs.org/"
157
157
  },
158
- "gitHead": "931f86bb7dd77a05d196cadda88c8a170e665c3d"
158
+ "gitHead": "dc11ac41ea80f5d5c5d7c247bfa146fda3cc9905"
159
159
  }