@real-router/preact 0.17.2 → 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/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
  /**
@@ -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":";;;UAIiB,eAAA;EAAA,SACN,QAAA,EAAU,iBAAA;EAAA,SACV,QAAA,GAAW,iBAAiB;AAAA;AAAA,iBAGvB,UAAA;EACd,QAAA;EACA;AAAA,GACC,eAAA,GAAkB,iBAAA;;;UCRJ,eAAA;EAAA,SACN,QAAA,EAAU,iBAAA;EAAA,SACV,QAAA,GAAW,iBAAiB;AAAA;AAAA,iBAGvB,UAAA;EACd,QAAA;EACA;AAAA,GACC,eAAA,GAAkB,iBAAA;;;UC6CJ,UAAA;;WAEN,IAAA;EFvDqB;;EAAA,SE0DrB,QAAA,GAAW,KAAA,EAAO,CAAA,KAAM,iBAAiB;AAAA;;;;;AFxDb;AAGvC;;;;;;;;iBEqEgB,KAAA;EACd,IAAA;EACA;AAAA,GACC,UAAA,CAAW,CAAA,IAAK,iBAAA;;;UC7EF,aAAA;;WAEN,QAAA,EAAU,iBAAA;EAAA,SACV,QAAA,EAAU,iBAAiB;AAAA;;;;;;;AHDC;AAGvC;iBGSgB,QAAA;EACd,QAAA;EACA;AAAA,GACC,aAAA,GAAgB,iBAAA;;;UCfF,mBAAA;;WAEN,IAAI;AAAA;;;;;;;;AJFwB;AAGvC;;;;;;;;;;;;;;;;AAGsC;;;;ACRtC;;;;;;;;;AAEuC;AAGvC;;;;;;;iBG+CgB,cAAA;EACd;AAAA,GACC,mBAAA,GAAsB,iBAAA;;;;;;AJtDzB;;;;;;;;;AAEuC;AAGvC;;;;;;;UKWiB,cAAA;EACf,IAAI;AAAA;AAAA,iBAGU,oBAAA,IAAwB,cAAc;;;UCjBrC,uBAAA;EAAA,SACN,IAAA,EAAM,cAAA;EAAA,SACN,QAAA,EAAU,iBAAiB;AAAA;AAAA,iBAGtB,kBAAA;EACd,IAAA;EACA;AAAA,GACC,uBAAA,GAA0B,iBAAA;;;;;;ANX7B;;;;iBOcgB,WAAA,cAAyB,GAAA,WAAc,OAAO,CAAC,CAAA"}
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"}
@@ -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;
@@ -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":";;;;;;UAEiB,cAAA;EAAA,SACN,QAAA;EAAA,SACA,QAAA,EAAU,iBAAiB;AAAA;AAAA,UAGrB,UAAA;EAAA,SACN,OAAA;EAAA,SACA,KAAA;EAAA,SACA,QAAA,GAAW,iBAAA;EAAA,SACX,QAAA,EAAU,iBAAiB;AAAA;AAAA,UAGrB,SAAA;EAVI;EAAA,SAYV,QAAA,GAAW,iBAAA;EAZgB;EAAA,SAc3B,QAAA,EAAU,iBAAiB;AAAA;AAAA,UAGrB,aAAA;EAAA,SACN,QAAA,EAAU,iBAAiB;AAAA;;;iBCpBtB,KAAA,CAAM,MAAkB,EAAV,UAAU;AAAA,kBAAxB,KAAA;EAAA,IAAK,WAAA;AAAA;AAAA,iBAML,IAAA,CAAK,MAAiB,EAAT,SAAS;AAAA,kBAAtB,IAAA;EAAA,IAAI,WAAA;AAAA;AAAA,iBAMJ,QAAA,CAAS,MAAqB,EAAb,aAAa;AAAA,kBAA9B,QAAA;EAAA,IAAQ,WAAA;AAAA;;;iBCLf,aAAA;EACP,QAAA;EACA;AAAA,GACC,QAAA,CAAS,cAAA,IAAkB,KAAA;AAAA,kBAHrB,aAAA;EAAA,IAAa,WAAA;AAAA;AAAA,cAoCT,SAAA,SAAS,aAAA;;;;;;;UCrCL,UAAA,WAAqB,MAAA,GAAS,MAAA;EAC7C,KAAA,EAAO,KAAA,CAAM,CAAA;EACb,aAAA,G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iBAAA,GAAoB,wBAAA;EACpB,SAAA,GAAY,gBAAA;EACZ,eAAA;AAAA;AAAA,cAGW,cAAA,EAAgB,iBAAiB,CAAC,kBAAA;;;cCvBlC,YAAA,EAAY,OAAA,CAAA,cAAA;AAAA,cAEZ,aAAA,EAAa,OAAA,CAAA,MAAA;AAAA,cAEb,gBAAA,EAAgB,OAAA,CAAA,WAAA"}
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,UAAU,UAAU,SAAS,gBAAgB,KAC5D,eAAe;EAGf;EACA,cAAc;EACd,eAAe;EACf;EACA;EACA;EACA;;;;;;;;;;EAUA;EACA;;;;c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