@domql/router 2.5.170 → 2.5.172
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/cjs/index.js +2 -1
- package/index.js +2 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -49,7 +49,8 @@ const defaultOptions = {
|
|
|
49
49
|
contentElementKey: "content",
|
|
50
50
|
scrollToOptions: { behavior: "smooth" }
|
|
51
51
|
};
|
|
52
|
-
const router = (path,
|
|
52
|
+
const router = (path, el, state = {}, options = {}) => {
|
|
53
|
+
const element = el || void 0;
|
|
53
54
|
const win = element.context.window || import_utils.window;
|
|
54
55
|
const doc = element.context.document || import_utils.document;
|
|
55
56
|
const opts = { ...defaultOptions, ...element.context.routerOptions, ...options };
|
package/index.js
CHANGED
|
@@ -29,10 +29,11 @@ const defaultOptions = {
|
|
|
29
29
|
|
|
30
30
|
export const router = (
|
|
31
31
|
path,
|
|
32
|
-
|
|
32
|
+
el,
|
|
33
33
|
state = {},
|
|
34
34
|
options = {}
|
|
35
35
|
) => {
|
|
36
|
+
const element = el || this
|
|
36
37
|
const win = element.context.window || window
|
|
37
38
|
const doc = element.context.document || document
|
|
38
39
|
const opts = { ...defaultOptions, ...element.context.routerOptions, ...options }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/router",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.172",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@domql/utils": "^2.5.170"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "82b527e3cf59a1beb8ffc56a1fa62037179074eb",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/core": "^7.12.0"
|
|
30
30
|
}
|