@symbo.ls/create 2.29.64 → 2.29.66
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/router.js +3 -3
- package/dist/esm/router.js +3 -3
- package/package.json +13 -13
- package/src/router.js +1 -1
package/dist/cjs/router.js
CHANGED
|
@@ -35,10 +35,10 @@ const initRouter = (element, context) => {
|
|
|
35
35
|
else if (context.router === true) context.router = DEFAULT_ROUTING_OPTIONS;
|
|
36
36
|
else (0, import_utils.merge)(context.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
37
37
|
const routerOptions = context.router;
|
|
38
|
-
const onRouterRenderDefault = (
|
|
38
|
+
const onRouterRenderDefault = (el, s) => {
|
|
39
39
|
const { pathname, search, hash } = import_utils.window.location;
|
|
40
40
|
const url = pathname + search + hash;
|
|
41
|
-
if (
|
|
41
|
+
if (el.routes) element.call("router", url, el, {}, { initialRender: true });
|
|
42
42
|
};
|
|
43
43
|
const hasRenderRouter = element.on && !(0, import_utils.isUndefined)(element.on.renderRouter);
|
|
44
44
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
@@ -62,7 +62,7 @@ const onpopstateRouter = (element, context) => {
|
|
|
62
62
|
import_utils.window.onpopstate = async (event) => {
|
|
63
63
|
const { pathname, search, hash } = import_utils.window.location;
|
|
64
64
|
const url = pathname + search + hash;
|
|
65
|
-
await
|
|
65
|
+
await element.call(
|
|
66
66
|
"router",
|
|
67
67
|
url,
|
|
68
68
|
element,
|
package/dist/esm/router.js
CHANGED
|
@@ -10,10 +10,10 @@ const initRouter = (element, context) => {
|
|
|
10
10
|
else if (context.router === true) context.router = DEFAULT_ROUTING_OPTIONS;
|
|
11
11
|
else merge(context.router || {}, DEFAULT_ROUTING_OPTIONS);
|
|
12
12
|
const routerOptions = context.router;
|
|
13
|
-
const onRouterRenderDefault = (
|
|
13
|
+
const onRouterRenderDefault = (el, s) => {
|
|
14
14
|
const { pathname, search, hash } = window.location;
|
|
15
15
|
const url = pathname + search + hash;
|
|
16
|
-
if (
|
|
16
|
+
if (el.routes) element.call("router", url, el, {}, { initialRender: true });
|
|
17
17
|
};
|
|
18
18
|
const hasRenderRouter = element.on && !isUndefined(element.on.renderRouter);
|
|
19
19
|
if (routerOptions && routerOptions.initRouter && !hasRenderRouter) {
|
|
@@ -37,7 +37,7 @@ const onpopstateRouter = (element, context) => {
|
|
|
37
37
|
window.onpopstate = async (event) => {
|
|
38
38
|
const { pathname, search, hash } = window.location;
|
|
39
39
|
const url = pathname + search + hash;
|
|
40
|
-
await
|
|
40
|
+
await element.call(
|
|
41
41
|
"router",
|
|
42
42
|
url,
|
|
43
43
|
element,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.66",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "96c61cae2bc621ca0ca6ad1e234e5feebd50b415",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"main": "src/index.js",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"prepublish": "npm run build; npm run copy:package:cjs"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@domql/emotion": "^2.29.
|
|
33
|
-
"@domql/event": "^2.29.
|
|
34
|
-
"@domql/report": "^2.29.
|
|
35
|
-
"@domql/router": "^2.29.
|
|
36
|
-
"@symbo.ls/fetch": "^2.29.
|
|
37
|
-
"@symbo.ls/init": "^2.29.
|
|
38
|
-
"@symbo.ls/scratch": "^2.29.
|
|
39
|
-
"@symbo.ls/sync": "^2.29.
|
|
40
|
-
"@symbo.ls/uikit": "^2.29.
|
|
41
|
-
"@symbo.ls/utils": "^2.29.
|
|
42
|
-
"domql": "^2.29.
|
|
32
|
+
"@domql/emotion": "^2.29.66",
|
|
33
|
+
"@domql/event": "^2.29.66",
|
|
34
|
+
"@domql/report": "^2.29.66",
|
|
35
|
+
"@domql/router": "^2.29.66",
|
|
36
|
+
"@symbo.ls/fetch": "^2.29.66",
|
|
37
|
+
"@symbo.ls/init": "^2.29.66",
|
|
38
|
+
"@symbo.ls/scratch": "^2.29.66",
|
|
39
|
+
"@symbo.ls/sync": "^2.29.66",
|
|
40
|
+
"@symbo.ls/uikit": "^2.29.66",
|
|
41
|
+
"@symbo.ls/utils": "^2.29.66",
|
|
42
|
+
"domql": "^2.29.66"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.27.1"
|
package/src/router.js
CHANGED
|
@@ -47,7 +47,7 @@ export const onpopstateRouter = (element, context) => {
|
|
|
47
47
|
window.onpopstate = async (event) => {
|
|
48
48
|
const { pathname, search, hash } = window.location
|
|
49
49
|
const url = pathname + search + hash
|
|
50
|
-
await
|
|
50
|
+
await element.call(
|
|
51
51
|
'router',
|
|
52
52
|
url,
|
|
53
53
|
element,
|