@real-router/preact 0.17.1 → 0.17.3
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.d.ts +2 -10
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/ssr.d.ts +6 -24
- package/dist/cjs/ssr.d.ts.map +1 -1
- package/dist/esm/index.d.mts +2 -10
- package/dist/esm/index.d.mts.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/ssr.d.mts +6 -24
- package/dist/esm/ssr.d.mts.map +1 -1
- package/package.json +5 -5
package/dist/cjs/ssr.d.ts
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { ComponentChildren } from "preact";
|
|
2
|
-
|
|
3
2
|
//#region src/components/ClientOnly.d.ts
|
|
4
3
|
interface ClientOnlyProps {
|
|
5
4
|
readonly children: ComponentChildren;
|
|
6
5
|
readonly fallback?: ComponentChildren;
|
|
7
6
|
}
|
|
8
|
-
declare function ClientOnly({
|
|
9
|
-
children,
|
|
10
|
-
fallback
|
|
11
|
-
}: ClientOnlyProps): ComponentChildren;
|
|
7
|
+
declare function ClientOnly({ children, fallback }: ClientOnlyProps): ComponentChildren;
|
|
12
8
|
//#endregion
|
|
13
9
|
//#region src/components/ServerOnly.d.ts
|
|
14
10
|
interface ServerOnlyProps {
|
|
15
11
|
readonly children: ComponentChildren;
|
|
16
12
|
readonly fallback?: ComponentChildren;
|
|
17
13
|
}
|
|
18
|
-
declare function ServerOnly({
|
|
19
|
-
children,
|
|
20
|
-
fallback
|
|
21
|
-
}: ServerOnlyProps): ComponentChildren;
|
|
14
|
+
declare function ServerOnly({ children, fallback }: ServerOnlyProps): ComponentChildren;
|
|
22
15
|
//#endregion
|
|
23
16
|
//#region src/components/Await.d.ts
|
|
24
17
|
interface AwaitProps<T> {
|
|
@@ -41,10 +34,7 @@ interface AwaitProps<T> {
|
|
|
41
34
|
* </Streamed>
|
|
42
35
|
* ```
|
|
43
36
|
*/
|
|
44
|
-
declare function Await<T = unknown>({
|
|
45
|
-
name,
|
|
46
|
-
children
|
|
47
|
-
}: AwaitProps<T>): ComponentChildren;
|
|
37
|
+
declare function Await<T = unknown>({ name, children }: AwaitProps<T>): ComponentChildren;
|
|
48
38
|
//#endregion
|
|
49
39
|
//#region src/components/Streamed.d.ts
|
|
50
40
|
interface StreamedProps {
|
|
@@ -60,10 +50,7 @@ interface StreamedProps {
|
|
|
60
50
|
* Preact's `Suspense` is part of `preact/compat` (experimental). For
|
|
61
51
|
* production streaming the preact-render-to-string toolchain is required.
|
|
62
52
|
*/
|
|
63
|
-
declare function Streamed({
|
|
64
|
-
fallback,
|
|
65
|
-
children
|
|
66
|
-
}: StreamedProps): ComponentChildren;
|
|
53
|
+
declare function Streamed({ fallback, children }: StreamedProps): ComponentChildren;
|
|
67
54
|
//#endregion
|
|
68
55
|
//#region src/components/HttpStatusCode.d.ts
|
|
69
56
|
interface HttpStatusCodeProps {
|
|
@@ -115,9 +102,7 @@ interface HttpStatusCodeProps {
|
|
|
115
102
|
* dropped connection, not silent corruption. Pass a real HTTP status integer
|
|
116
103
|
* (commonly 4xx/5xx; 100-999 is what Node accepts).
|
|
117
104
|
*/
|
|
118
|
-
declare function HttpStatusCode({
|
|
119
|
-
code
|
|
120
|
-
}: HttpStatusCodeProps): ComponentChildren;
|
|
105
|
+
declare function HttpStatusCode({ code }: HttpStatusCodeProps): ComponentChildren;
|
|
121
106
|
//#endregion
|
|
122
107
|
//#region src/utils/createHttpStatusSink.d.ts
|
|
123
108
|
/**
|
|
@@ -150,10 +135,7 @@ interface HttpStatusProviderProps {
|
|
|
150
135
|
readonly sink: HttpStatusSink;
|
|
151
136
|
readonly children: ComponentChildren;
|
|
152
137
|
}
|
|
153
|
-
declare function HttpStatusProvider({
|
|
154
|
-
sink,
|
|
155
|
-
children
|
|
156
|
-
}: HttpStatusProviderProps): ComponentChildren;
|
|
138
|
+
declare function HttpStatusProvider({ sink, children }: HttpStatusProviderProps): ComponentChildren;
|
|
157
139
|
//#endregion
|
|
158
140
|
//#region src/hooks/useDeferred.d.ts
|
|
159
141
|
/**
|
package/dist/cjs/ssr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr.d.ts","names":[],"sources":["../../src/components/ClientOnly.tsx","../../src/components/ServerOnly.tsx","../../src/components/Await.tsx","../../src/components/Streamed.tsx","../../src/components/HttpStatusCode.tsx","../../src/utils/createHttpStatusSink.ts","../../src/components/HttpStatusProvider.tsx","../../src/hooks/useDeferred.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssr.d.ts","names":[],"sources":["../../src/components/ClientOnly.tsx","../../src/components/ServerOnly.tsx","../../src/components/Await.tsx","../../src/components/Streamed.tsx","../../src/components/HttpStatusCode.tsx","../../src/utils/createHttpStatusSink.ts","../../src/components/HttpStatusProvider.tsx","../../src/hooks/useDeferred.tsx"],"mappings":";;UAIiB;WACN,UAAU;WACV,WAAW;;iBAGN,aACd,UACA,YACC,kBAAkB;;;UCRJ;WACN,UAAU;WACV,WAAW;;iBAGN,aACd,UACA,YACC,kBAAkB;;;UC6CJ,WAAW;;WAEjB;;;WAGA,WAAW,OAAO,MAAM;;;;;;;;;;;;;;;iBAgBnB,MAAM,eACpB,MACA,YACC,WAAW,KAAK;;;UC7EF;;WAEN,UAAU;WACV,UAAU;;;;;;;;;;iBAWL,WACd,UACA,YACC,gBAAgB;;;UCfF;;WAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgDK,iBACd,QACC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;UCtCR;EACf;;iBAGc,wBAAwB;;;UCjBvB;WACN,MAAM;WACN,UAAU;;iBAGL,qBACd,MACA,YACC,0BAA0B;;;;;;;;;;iBCGb,YAAY,aAAa,cAAc,QAAQ"}
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { NavigationOptions, Navigator, Navigator as Navigator$1, Params, Router,
|
|
|
2
2
|
import { RouteUtils } from "@real-router/route-utils";
|
|
3
3
|
import { ComponentChildren, Context, FunctionComponent, HTMLAttributes, VNode } from "preact";
|
|
4
4
|
import { RouterTransitionSnapshot, RouterTransitionSnapshot as RouterTransitionSnapshot$1 } from "@real-router/sources";
|
|
5
|
-
|
|
6
5
|
//#region src/components/RouteView/types.d.ts
|
|
7
6
|
interface RouteViewProps {
|
|
8
7
|
readonly nodeName: string;
|
|
@@ -39,10 +38,7 @@ declare namespace NotFound {
|
|
|
39
38
|
}
|
|
40
39
|
//#endregion
|
|
41
40
|
//#region src/components/RouteView/RouteView.d.ts
|
|
42
|
-
declare function RouteViewRoot({
|
|
43
|
-
nodeName,
|
|
44
|
-
children
|
|
45
|
-
}: Readonly<RouteViewProps>): VNode | null;
|
|
41
|
+
declare function RouteViewRoot({ nodeName, children }: Readonly<RouteViewProps>): VNode | null;
|
|
46
42
|
declare namespace RouteViewRoot {
|
|
47
43
|
var displayName: string;
|
|
48
44
|
}
|
|
@@ -106,11 +102,7 @@ interface RouterErrorBoundaryProps {
|
|
|
106
102
|
* (e.g. `preact-iso/ErrorBoundary` or a custom `componentDidCatch` class) —
|
|
107
103
|
* the two can coexist.
|
|
108
104
|
*/
|
|
109
|
-
declare function RouterErrorBoundary({
|
|
110
|
-
children,
|
|
111
|
-
fallback,
|
|
112
|
-
onError
|
|
113
|
-
}: RouterErrorBoundaryProps): VNode;
|
|
105
|
+
declare function RouterErrorBoundary({ children, fallback, onError }: RouterErrorBoundaryProps): VNode;
|
|
114
106
|
//#endregion
|
|
115
107
|
//#region src/hooks/useRouter.d.ts
|
|
116
108
|
declare const useRouter: () => Router;
|
package/dist/esm/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/components/RouteView/types.ts","../../src/components/RouteView/components.tsx","../../src/components/RouteView/RouteView.tsx","../../src/types.ts","../../src/components/Link.tsx","../../src/components/RouterErrorBoundary.tsx","../../src/hooks/useRouter.tsx","../../src/hooks/useNavigator.tsx","../../src/hooks/useRouteUtils.tsx","../../src/hooks/useRoute.tsx","../../src/hooks/useRouteNode.tsx","../../src/hooks/useRouterTransition.tsx","../../src/hooks/useRouteExit.tsx","../../src/hooks/useRouteEnter.tsx","../../../../shared/dom-utils/route-announcer.ts","../../../../shared/dom-utils/scroll-restore.ts","../../../../shared/dom-utils/scroll-spy.ts","../../src/RouterProvider.tsx","../../src/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/components/RouteView/types.ts","../../src/components/RouteView/components.tsx","../../src/components/RouteView/RouteView.tsx","../../src/types.ts","../../src/components/Link.tsx","../../src/components/RouterErrorBoundary.tsx","../../src/hooks/useRouter.tsx","../../src/hooks/useNavigator.tsx","../../src/hooks/useRouteUtils.tsx","../../src/hooks/useRoute.tsx","../../src/hooks/useRouteNode.tsx","../../src/hooks/useRouterTransition.tsx","../../src/hooks/useRouteExit.tsx","../../src/hooks/useRouteEnter.tsx","../../../../shared/dom-utils/route-announcer.ts","../../../../shared/dom-utils/scroll-restore.ts","../../../../shared/dom-utils/scroll-spy.ts","../../src/RouterProvider.tsx","../../src/context.ts"],"mappings":";;;;;UAEiB;WACN;WACA,UAAU;;UAGJ;WACN;WACA;WACA,WAAW;WACX,UAAU;;UAGJ;;WAEN,WAAW;;WAEX,UAAU;;UAGJ;WACN,UAAU;;;;iBCpBL,MAAM,QAAQ;kBAAd;MAAA;;iBAMA,KAAK,QAAQ;kBAAb;MAAA;;iBAMA,SAAS,QAAQ;kBAAjB;MAAA;;;;iBCLP,gBACP,UACA,YACC,SAAS,kBAAkB;kBAHrB;MAAA;;cAoCI,kBAAS;;;;;;;UCrCL,WAAW,UAAU,SAAS;EAC7C,OAAO,MAAM;EACb,gBAAgB;;KAGN,eAAa,UAAU,SAAS,UAAU,WAAW;EAC/D,WAAW;;UAGI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