@viewfly/router 0.0.31 → 0.1.1
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/bundles/index.esm.js +4 -4
- package/bundles/index.js +3 -3
- package/bundles/link.d.ts +1 -1
- package/bundles/root-router.d.ts +1 -1
- package/bundles/router-outlet.d.ts +1 -1
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment } from '@viewfly/core/jsx-runtime';
|
|
2
|
-
import { Injectable, inject, useSignal,
|
|
2
|
+
import { Injectable, inject, useSignal, onUnmounted, provide } from '@viewfly/core';
|
|
3
3
|
import { Subject, Subscription, fromEvent } from '@tanbo/stream';
|
|
4
4
|
|
|
5
5
|
/******************************************************************************
|
|
@@ -243,7 +243,7 @@ function Link(props) {
|
|
|
243
243
|
const subscription = navigator.onUrlChanged.subscribe(() => {
|
|
244
244
|
isActive.set(getActive());
|
|
245
245
|
});
|
|
246
|
-
|
|
246
|
+
onUnmounted(() => {
|
|
247
247
|
subscription.unsubscribe();
|
|
248
248
|
});
|
|
249
249
|
function navigate(ev) {
|
|
@@ -287,7 +287,7 @@ function RootRouter(props) {
|
|
|
287
287
|
const subscription = navigator.onUrlChanged.subscribe(() => {
|
|
288
288
|
router.refresh(getPath());
|
|
289
289
|
});
|
|
290
|
-
|
|
290
|
+
onUnmounted(() => {
|
|
291
291
|
subscription.unsubscribe();
|
|
292
292
|
navigator.destroy();
|
|
293
293
|
});
|
|
@@ -307,7 +307,7 @@ function RouterOutlet(props) {
|
|
|
307
307
|
const subscription = router.onRefresh.subscribe(() => {
|
|
308
308
|
updateChildren();
|
|
309
309
|
});
|
|
310
|
-
|
|
310
|
+
onUnmounted(() => {
|
|
311
311
|
subscription.unsubscribe();
|
|
312
312
|
});
|
|
313
313
|
let currentComponent = null;
|
package/bundles/index.js
CHANGED
|
@@ -245,7 +245,7 @@ function Link(props) {
|
|
|
245
245
|
const subscription = navigator.onUrlChanged.subscribe(() => {
|
|
246
246
|
isActive.set(getActive());
|
|
247
247
|
});
|
|
248
|
-
core.
|
|
248
|
+
core.onUnmounted(() => {
|
|
249
249
|
subscription.unsubscribe();
|
|
250
250
|
});
|
|
251
251
|
function navigate(ev) {
|
|
@@ -289,7 +289,7 @@ function RootRouter(props) {
|
|
|
289
289
|
const subscription = navigator.onUrlChanged.subscribe(() => {
|
|
290
290
|
router.refresh(getPath());
|
|
291
291
|
});
|
|
292
|
-
core.
|
|
292
|
+
core.onUnmounted(() => {
|
|
293
293
|
subscription.unsubscribe();
|
|
294
294
|
navigator.destroy();
|
|
295
295
|
});
|
|
@@ -309,7 +309,7 @@ function RouterOutlet(props) {
|
|
|
309
309
|
const subscription = router.onRefresh.subscribe(() => {
|
|
310
310
|
updateChildren();
|
|
311
311
|
});
|
|
312
|
-
core.
|
|
312
|
+
core.onUnmounted(() => {
|
|
313
313
|
subscription.unsubscribe();
|
|
314
314
|
});
|
|
315
315
|
let currentComponent = null;
|
package/bundles/link.d.ts
CHANGED
package/bundles/root-router.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export interface RootRouterProps extends Props {
|
|
|
3
3
|
basePath?: string;
|
|
4
4
|
children?: JSXInternal.JSXNode;
|
|
5
5
|
}
|
|
6
|
-
export declare function RootRouter(props: RootRouterProps): () =>
|
|
6
|
+
export declare function RootRouter(props: RootRouterProps): () => import("@viewfly/core/jsx-runtime").JSX.Element;
|
|
@@ -3,4 +3,4 @@ import { RouteConfig } from './providers/_api';
|
|
|
3
3
|
export interface RouterOutletProps extends Props {
|
|
4
4
|
config: RouteConfig[];
|
|
5
5
|
}
|
|
6
|
-
export declare function RouterOutlet(props: RouterOutletProps): () =>
|
|
6
|
+
export declare function RouterOutlet(props: RouterOutletProps): () => import("@viewfly/core/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A routing library based on the Viewfly framework that can be run in the browser or Nodejs background.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@tanbo/stream": "^1.2.3",
|
|
16
|
-
"@viewfly/core": "^0.
|
|
16
|
+
"@viewfly/core": "^0.1.1",
|
|
17
17
|
"url": "^0.11.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d6c54831a96266979af7b95c7152fe7ef2b62a4f"
|
|
38
38
|
}
|