@qwik.dev/router 2.0.0-alpha.9 → 2.0.0-beta.10

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.
Files changed (159) hide show
  1. package/README.md +1 -1
  2. package/adapters/static/vite.d.ts +1 -1
  3. package/lib/adapters/azure-swa/vite/index-BqUeglYs.cjs +1 -0
  4. package/lib/adapters/azure-swa/vite/index-CBIchDYq.js +651 -0
  5. package/lib/adapters/azure-swa/vite/index-ClHGw5z1.js +6 -0
  6. package/lib/adapters/azure-swa/vite/index-CrwlB95_.js +22 -0
  7. package/lib/adapters/azure-swa/vite/index-DTIOTwZo.cjs +11 -0
  8. package/lib/adapters/azure-swa/vite/index-vQuPcef3.cjs +1 -0
  9. package/lib/adapters/azure-swa/vite/index.cjs +5 -96
  10. package/lib/adapters/azure-swa/vite/index.d.ts +13 -13
  11. package/lib/adapters/azure-swa/vite/index.mjs +201 -26
  12. package/lib/adapters/bun-server/vite/index-BqUeglYs.cjs +1 -0
  13. package/lib/adapters/bun-server/vite/index-CBIchDYq.js +651 -0
  14. package/lib/adapters/bun-server/vite/index-ClHGw5z1.js +6 -0
  15. package/lib/adapters/bun-server/vite/index-CrwlB95_.js +22 -0
  16. package/lib/adapters/bun-server/vite/index-DTIOTwZo.cjs +11 -0
  17. package/lib/adapters/bun-server/vite/index-vQuPcef3.cjs +1 -0
  18. package/lib/adapters/bun-server/vite/index.cjs +5 -50
  19. package/lib/adapters/bun-server/vite/index.d.ts +14 -14
  20. package/lib/adapters/bun-server/vite/index.mjs +196 -12
  21. package/lib/adapters/cloud-run/vite/index-BqUeglYs.cjs +1 -0
  22. package/lib/adapters/cloud-run/vite/index-CBIchDYq.js +651 -0
  23. package/lib/adapters/cloud-run/vite/index-ClHGw5z1.js +6 -0
  24. package/lib/adapters/cloud-run/vite/index-CrwlB95_.js +22 -0
  25. package/lib/adapters/cloud-run/vite/index-DTIOTwZo.cjs +11 -0
  26. package/lib/adapters/cloud-run/vite/index-vQuPcef3.cjs +1 -0
  27. package/lib/adapters/cloud-run/vite/index.cjs +5 -47
  28. package/lib/adapters/cloud-run/vite/index.d.ts +13 -13
  29. package/lib/adapters/cloud-run/vite/index.mjs +195 -11
  30. package/lib/adapters/cloudflare-pages/vite/index-BIeHg2Cj.cjs +5 -0
  31. package/lib/adapters/cloudflare-pages/vite/index-C455V8_A.cjs +1 -0
  32. package/lib/adapters/cloudflare-pages/vite/index-ClHGw5z1.js +6 -0
  33. package/lib/adapters/cloudflare-pages/vite/index-D3HITboM.js +645 -0
  34. package/lib/adapters/cloudflare-pages/vite/index-DKcVHRBy.cjs +11 -0
  35. package/lib/adapters/cloudflare-pages/vite/index-DwovcBp3.js +22 -0
  36. package/lib/adapters/cloudflare-pages/vite/index-bogwy7wh.js +250 -0
  37. package/lib/adapters/cloudflare-pages/vite/index-vQuPcef3.cjs +1 -0
  38. package/lib/adapters/cloudflare-pages/vite/index.cjs +1 -115
  39. package/lib/adapters/cloudflare-pages/vite/index.d.ts +27 -27
  40. package/lib/adapters/cloudflare-pages/vite/index.mjs +4 -78
  41. package/lib/adapters/deno-server/vite/index-BqUeglYs.cjs +1 -0
  42. package/lib/adapters/deno-server/vite/index-CBIchDYq.js +651 -0
  43. package/lib/adapters/deno-server/vite/index-ClHGw5z1.js +6 -0
  44. package/lib/adapters/deno-server/vite/index-CrwlB95_.js +22 -0
  45. package/lib/adapters/deno-server/vite/index-DTIOTwZo.cjs +11 -0
  46. package/lib/adapters/deno-server/vite/index-vQuPcef3.cjs +1 -0
  47. package/lib/adapters/deno-server/vite/index.cjs +5 -62
  48. package/lib/adapters/deno-server/vite/index.d.ts +14 -14
  49. package/lib/adapters/deno-server/vite/index.mjs +198 -14
  50. package/lib/adapters/netlify-edge/vite/index-BqUeglYs.cjs +1 -0
  51. package/lib/adapters/netlify-edge/vite/index-CBIchDYq.js +651 -0
  52. package/lib/adapters/netlify-edge/vite/index-ClHGw5z1.js +6 -0
  53. package/lib/adapters/netlify-edge/vite/index-CrwlB95_.js +22 -0
  54. package/lib/adapters/netlify-edge/vite/index-DTIOTwZo.cjs +11 -0
  55. package/lib/adapters/netlify-edge/vite/index-vQuPcef3.cjs +1 -0
  56. package/lib/adapters/netlify-edge/vite/index.cjs +6 -129
  57. package/lib/adapters/netlify-edge/vite/index.d.ts +44 -44
  58. package/lib/adapters/netlify-edge/vite/index.mjs +240 -60
  59. package/lib/adapters/node-server/vite/index-BqUeglYs.cjs +1 -0
  60. package/lib/adapters/node-server/vite/index-CBIchDYq.js +651 -0
  61. package/lib/adapters/node-server/vite/index-ClHGw5z1.js +6 -0
  62. package/lib/adapters/node-server/vite/index-CrwlB95_.js +22 -0
  63. package/lib/adapters/node-server/vite/index-DTIOTwZo.cjs +11 -0
  64. package/lib/adapters/node-server/vite/index-vQuPcef3.cjs +1 -0
  65. package/lib/adapters/node-server/vite/index.cjs +5 -50
  66. package/lib/adapters/node-server/vite/index.d.ts +14 -14
  67. package/lib/adapters/node-server/vite/index.mjs +196 -12
  68. package/lib/adapters/shared/vite/index-BqUeglYs.cjs +1 -0
  69. package/lib/adapters/shared/vite/index-CBIchDYq.js +651 -0
  70. package/lib/adapters/shared/vite/index-ClHGw5z1.js +6 -0
  71. package/lib/adapters/shared/vite/index-CrwlB95_.js +22 -0
  72. package/lib/adapters/shared/vite/index-DTIOTwZo.cjs +11 -0
  73. package/lib/adapters/shared/vite/index-vQuPcef3.cjs +1 -0
  74. package/lib/adapters/shared/vite/index.cjs +5 -371
  75. package/lib/adapters/shared/vite/index.d.ts +108 -114
  76. package/lib/adapters/shared/vite/index.mjs +158 -288
  77. package/lib/adapters/ssg/vite/index-BqUeglYs.cjs +1 -0
  78. package/lib/adapters/ssg/vite/index-CBIchDYq.js +651 -0
  79. package/lib/adapters/ssg/vite/index-ClHGw5z1.js +6 -0
  80. package/lib/adapters/ssg/vite/index-CrwlB95_.js +22 -0
  81. package/lib/adapters/ssg/vite/index-DTIOTwZo.cjs +11 -0
  82. package/lib/adapters/ssg/vite/index-vQuPcef3.cjs +1 -0
  83. package/lib/adapters/ssg/vite/index.cjs +5 -0
  84. package/lib/adapters/ssg/vite/index.d.ts +13 -0
  85. package/lib/adapters/ssg/vite/index.mjs +201 -0
  86. package/lib/adapters/vercel-edge/vite/index-BqUeglYs.cjs +1 -0
  87. package/lib/adapters/vercel-edge/vite/index-CBIchDYq.js +651 -0
  88. package/lib/adapters/vercel-edge/vite/index-ClHGw5z1.js +6 -0
  89. package/lib/adapters/vercel-edge/vite/index-CrwlB95_.js +22 -0
  90. package/lib/adapters/vercel-edge/vite/index-DTIOTwZo.cjs +11 -0
  91. package/lib/adapters/vercel-edge/vite/index-vQuPcef3.cjs +1 -0
  92. package/lib/adapters/vercel-edge/vite/index.cjs +5 -118
  93. package/lib/adapters/vercel-edge/vite/index.d.ts +45 -45
  94. package/lib/adapters/vercel-edge/vite/index.mjs +230 -51
  95. package/lib/index.d.ts +1000 -810
  96. package/lib/index.qwik.cjs +438 -203
  97. package/lib/index.qwik.mjs +440 -205
  98. package/lib/middleware/aws-lambda/index.cjs +1 -0
  99. package/lib/middleware/aws-lambda/index.d.ts +49 -48
  100. package/lib/middleware/aws-lambda/index.mjs +27 -41
  101. package/lib/middleware/azure-swa/index.cjs +1 -0
  102. package/lib/middleware/azure-swa/index.d.ts +28 -28
  103. package/lib/middleware/azure-swa/index.mjs +46 -269
  104. package/lib/middleware/bun/index.cjs +1 -0
  105. package/lib/middleware/bun/index.d.ts +35 -35
  106. package/lib/middleware/bun/index.mjs +68 -120
  107. package/lib/middleware/cloudflare-pages/index.cjs +1 -0
  108. package/lib/middleware/cloudflare-pages/index.d.ts +35 -35
  109. package/lib/middleware/cloudflare-pages/index.mjs +48 -80
  110. package/lib/middleware/deno/index.cjs +1 -0
  111. package/lib/middleware/deno/index.d.ts +47 -47
  112. package/lib/middleware/deno/index.mjs +63 -110
  113. package/lib/middleware/firebase/index.cjs +1 -0
  114. package/lib/middleware/firebase/index.d.ts +26 -26
  115. package/lib/middleware/firebase/index.mjs +16 -28
  116. package/lib/middleware/netlify-edge/index.cjs +1 -0
  117. package/lib/middleware/netlify-edge/index.d.ts +27 -27
  118. package/lib/middleware/netlify-edge/index.mjs +36 -64
  119. package/lib/middleware/node/index.cjs +1 -314
  120. package/lib/middleware/node/index.d.ts +64 -64
  121. package/lib/middleware/node/index.mjs +116 -198
  122. package/lib/middleware/request-handler/index.cjs +11 -1538
  123. package/lib/middleware/request-handler/index.d.ts +711 -676
  124. package/lib/middleware/request-handler/index.mjs +895 -1281
  125. package/lib/middleware/vercel-edge/index.cjs +1 -0
  126. package/lib/middleware/vercel-edge/index.d.ts +26 -26
  127. package/lib/middleware/vercel-edge/index.mjs +47 -82
  128. package/lib/modules.d.ts +4 -12
  129. package/lib/service-worker.cjs +1 -267
  130. package/lib/service-worker.d.ts +15 -4
  131. package/lib/service-worker.mjs +3 -263
  132. package/lib/ssg/deno.cjs +1 -0
  133. package/lib/ssg/deno.mjs +6 -0
  134. package/lib/ssg/index-CBIchDYq.js +651 -0
  135. package/lib/ssg/index-ClHGw5z1.js +6 -0
  136. package/lib/ssg/index-DTIOTwZo.cjs +11 -0
  137. package/lib/ssg/index-vQuPcef3.cjs +1 -0
  138. package/lib/ssg/index.cjs +1 -0
  139. package/lib/{static → ssg}/index.d.ts +96 -96
  140. package/lib/ssg/index.mjs +22 -0
  141. package/lib/ssg/node.cjs +11 -0
  142. package/lib/ssg/node.mjs +651 -0
  143. package/lib/vite/index.cjs +29 -27484
  144. package/lib/vite/index.d.ts +170 -154
  145. package/lib/vite/index.mjs +1422 -27288
  146. package/modules.d.ts +4 -12
  147. package/package.json +51 -40
  148. package/ssg.d.ts +2 -0
  149. package/static.d.ts +1 -1
  150. package/lib/adapters/static/vite/index.cjs +0 -361
  151. package/lib/adapters/static/vite/index.d.ts +0 -10
  152. package/lib/adapters/static/vite/index.mjs +0 -324
  153. package/lib/static/deno.mjs +0 -8
  154. package/lib/static/index.cjs +0 -67
  155. package/lib/static/index.mjs +0 -48
  156. package/lib/static/node.cjs +0 -1124
  157. package/lib/static/node.mjs +0 -1086
  158. package/middleware/request-handler/generated/not-found-paths.ts +0 -7
  159. package/middleware/request-handler/generated/static-paths.ts +0 -35
package/lib/index.d.ts CHANGED
@@ -1,812 +1,1002 @@
1
1
  /// <reference path="./modules.d.ts" />
2
2
 
3
- import { Component } from '@qwik.dev/core';
4
- import { Cookie } from '@qwik.dev/router/middleware/request-handler';
5
- import { CookieOptions } from '@qwik.dev/router/middleware/request-handler';
6
- import { CookieValue } from '@qwik.dev/router/middleware/request-handler';
7
- import { DeferReturn } from '@qwik.dev/router/middleware/request-handler';
8
- import type { EnvGetter } from '@qwik.dev/router/middleware/request-handler';
9
- import { JSXNode } from '@qwik.dev/core';
10
- import { JSXOutput } from '@qwik.dev/core';
11
- import { QRL } from '@qwik.dev/core';
12
- import { QRLEventHandlerMulti } from '@qwik.dev/core';
13
- import { QwikIntrinsicElements } from '@qwik.dev/core';
14
- import { QwikJSX } from '@qwik.dev/core';
15
- import type { ReadonlySignal } from '@qwik.dev/core';
16
- import { RequestEvent } from '@qwik.dev/router/middleware/request-handler';
17
- import { RequestEventAction } from '@qwik.dev/router/middleware/request-handler';
18
- import { RequestEventBase } from '@qwik.dev/router/middleware/request-handler';
19
- import { RequestEventCommon } from '@qwik.dev/router/middleware/request-handler';
20
- import { RequestEventLoader } from '@qwik.dev/router/middleware/request-handler';
21
- import { RequestHandler } from '@qwik.dev/router/middleware/request-handler';
22
- import type { ResolveSyncValue } from '@qwik.dev/router/middleware/request-handler';
23
- import type * as v from 'valibot';
24
- import type { ValueOrPromise } from '@qwik.dev/core';
25
- import { z } from 'zod';
26
- import type * as z_2 from 'zod';
27
-
28
- /** @public */
29
- export declare type Action<RETURN, INPUT = Record<string, unknown>, OPTIONAL extends boolean = true> = {
30
- /**
31
- * Returns the `ActionStore` containing the current action state and methods to invoke it from a
32
- * component$(). Like all `use-` functions and methods, it can only be invoked within a
33
- * `component$()`.
34
- */
35
- (): ActionStore<RETURN, INPUT, OPTIONAL>;
36
- };
37
-
38
- /** @public */
39
- export declare type ActionConstructor = {
40
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
41
- readonly id?: string;
42
- readonly validation: [VALIDATOR, ...REST];
43
- }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
44
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
45
- readonly id?: string;
46
- readonly validation: [VALIDATOR];
47
- }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
48
- <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
49
- readonly id?: string;
50
- readonly validation: REST;
51
- }): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
52
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: VALIDATOR, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
53
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: VALIDATOR): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
54
- <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
55
- <OBJ>(actionQrl: (form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, options?: {
56
- readonly id?: string;
57
- }): Action<StrictUnion<OBJ>>;
58
- };
59
-
60
- /** @public */
61
- declare type ActionConstructorQRL = {
62
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
63
- readonly id?: string;
64
- readonly validation: [VALIDATOR, ...REST];
65
- }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
66
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
67
- readonly id?: string;
68
- readonly validation: [VALIDATOR];
69
- }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
70
- <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
71
- readonly id?: string;
72
- readonly validation: REST;
73
- }): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
74
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: VALIDATOR, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
75
- <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: VALIDATOR): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
76
- <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
77
- <OBJ>(actionQrl: QRL<(form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, options?: {
78
- readonly id?: string;
79
- }): Action<StrictUnion<OBJ>>;
80
- };
81
-
82
- /** @public */
83
- export declare type ActionReturn<RETURN> = {
84
- readonly status?: number;
85
- readonly value: RETURN;
86
- };
87
-
88
- /** @public */
89
- export declare type ActionStore<RETURN, INPUT, OPTIONAL extends boolean = true> = {
90
- /**
91
- * It's the "action" path that a native `<form>` should have in order to call the action.
92
- *
93
- * ```tsx
94
- * <form action={action.actionPath} />
95
- * ```
96
- *
97
- * Most of the time this property should not be used directly, instead use the `Form` component:
98
- *
99
- * ```tsx
100
- * import {action$, Form} from '@qwik.dev/router';
101
- *
102
- * export const useAddUser = action$(() => { ... });
103
- *
104
- * export default component$(() => {
105
- * const action = useAddUser();
106
- * return (
107
- * <Form action={action}/>
108
- * );
109
- * });
110
- * ```
111
- */
112
- readonly actionPath: string;
113
- /**
114
- * Reactive property that becomes `true` only in the browser, when a form is submitted and
115
- * switched back to false when the action finish, ie, it describes if the action is actively
116
- * running.
117
- *
118
- * This property is specially useful to disable the submit button while the action is processing,
119
- * to prevent multiple submissions, and to inform visually to the user that the action is actively
120
- * running.
121
- *
122
- * It will be always `false` in the server, and only becomes `true` briefly while the action is
123
- * running.
124
- */
125
- readonly isRunning: boolean;
126
- /**
127
- * Returned HTTP status code of the action after its last execution.
128
- *
129
- * It's `undefined` before the action is first called.
130
- */
131
- readonly status?: number;
132
- /**
133
- * When calling an action through a `<form>`, this property contains the previously submitted
134
- * `FormData`.
135
- *
136
- * This is useful to keep the filled form data even after a full page reload.
137
- *
138
- * It's `undefined` before the action is first called.
139
- */
140
- readonly formData: FormData | undefined;
141
- /**
142
- * Returned successful data of the action. This reactive property will contain the data returned
143
- * inside the `action$` function.
144
- *
145
- * It's `undefined` before the action is first called.
146
- */
147
- readonly value: RETURN | undefined;
148
- /**
149
- * Method to execute the action programmatically from the browser. Ie, instead of using a
150
- * `<form>`, a 'click' handle can call the `run()` method of the action in order to execute the
151
- * action in the server.
152
- */
153
- readonly submit: QRL<OPTIONAL extends true ? (form?: INPUT | FormData | SubmitEvent) => Promise<ActionReturn<RETURN>> : (form: INPUT | FormData | SubmitEvent) => Promise<ActionReturn<RETURN>>>;
154
- /** Is action.submit was submitted */
155
- readonly submitted: boolean;
156
- };
157
-
158
- declare type AnchorAttributes = QwikIntrinsicElements['a'];
159
-
160
- /** @public */
161
- export declare interface ContentHeading {
162
- readonly text: string;
163
- readonly id: string;
164
- readonly level: number;
165
- }
166
-
167
- /** @public */
168
- export declare interface ContentMenu {
169
- readonly text: string;
170
- readonly href?: string;
171
- readonly items?: ContentMenu[];
172
- }
173
-
174
- declare type ContentModule = PageModule | LayoutModule;
175
-
176
- declare type ContentModuleHead = DocumentHead | ResolvedDocumentHead;
177
-
178
- declare type ContentModuleLoader = () => Promise<ContentModule>;
179
-
180
- /** @public */
181
- declare interface ContentState {
182
- readonly headings: ContentHeading[] | undefined;
183
- readonly menu: ContentMenu | undefined;
184
- }
185
-
186
- export { Cookie }
187
-
188
- export { CookieOptions }
189
-
190
- export { CookieValue }
191
-
192
- /** @public */
193
- export declare type DataValidator<T extends Record<string, any> = {}> = {
194
- validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<T>>;
195
- };
196
-
197
- export { DeferReturn }
198
-
199
- /** @public */
200
- export declare type DocumentHead = DocumentHeadValue | ((props: DocumentHeadProps) => DocumentHeadValue);
201
-
202
- /** @public */
203
- export declare interface DocumentHeadProps extends RouteLocation {
204
- readonly head: ResolvedDocumentHead;
205
- readonly withLocale: <T>(fn: () => T) => T;
206
- readonly resolveValue: ResolveSyncValue;
207
- }
208
-
209
- /** @public */
210
- export declare interface DocumentHeadValue<FrontMatter extends Record<string, any> = Record<string, unknown>> {
211
- /** Sets `document.title`. */
212
- readonly title?: string;
213
- /**
214
- * Used to manually set meta tags in the head. Additionally, the `data` property could be used to
215
- * set arbitrary data which the `<head>` component could later use to generate `<meta>` tags.
216
- */
217
- readonly meta?: readonly DocumentMeta[];
218
- /** Used to manually append `<link>` elements to the `<head>`. */
219
- readonly links?: readonly DocumentLink[];
220
- /** Used to manually append `<style>` elements to the `<head>`. */
221
- readonly styles?: readonly DocumentStyle[];
222
- /** Used to manually append `<script>` elements to the `<head>`. */
223
- readonly scripts?: readonly DocumentScript[];
224
- /**
225
- * Arbitrary object containing custom data. When the document head is created from markdown files,
226
- * the frontmatter attributes that are not recognized as a well-known meta names (such as title,
227
- * description, author, etc...), are stored in this property.
228
- */
229
- readonly frontmatter?: Readonly<FrontMatter>;
230
- }
231
-
232
- /** @public */
233
- export declare interface DocumentLink {
234
- as?: string;
235
- crossorigin?: string;
236
- disabled?: boolean;
237
- href?: string;
238
- hreflang?: string;
239
- id?: string;
240
- imagesizes?: string;
241
- imagesrcset?: string;
242
- integrity?: string;
243
- media?: string;
244
- prefetch?: string;
245
- referrerpolicy?: string;
246
- rel?: string;
247
- sizes?: string;
248
- title?: string;
249
- type?: string;
250
- key?: string;
251
- }
252
-
253
- /** @public */
254
- export declare interface DocumentMeta {
255
- readonly content?: string;
256
- readonly httpEquiv?: string;
257
- readonly name?: string;
258
- readonly property?: string;
259
- readonly key?: string;
260
- readonly itemprop?: string;
261
- readonly media?: string;
262
- }
263
-
264
- /** @beta */
265
- export declare interface DocumentScript {
266
- readonly script?: string;
267
- readonly props?: Readonly<QwikIntrinsicElements['script']>;
268
- readonly key?: string;
269
- }
270
-
271
- /** @public */
272
- export declare interface DocumentStyle {
273
- readonly style: string;
274
- readonly props?: Readonly<QwikIntrinsicElements['style']>;
275
- readonly key?: string;
276
- }
277
-
278
- declare type EndpointModuleLoader = () => Promise<RouteModule>;
279
-
280
- /** @public */
281
- export declare const ErrorBoundary: Component<ErrorBoundaryProps>;
282
-
283
- /** @public */
284
- declare interface ErrorBoundaryProps {
285
- fallback$?: QRL<(error: any) => any>;
286
- }
287
-
288
- declare type Failed = {
289
- failed: true;
290
- };
291
-
292
- /** @public */
293
- export declare type FailOfRest<REST extends readonly DataValidator[]> = REST extends readonly DataValidator<infer ERROR>[] ? ERROR : never;
294
-
295
- /** @public */
296
- export declare type FailReturn<T> = T & Failed;
297
-
298
- /** @public */
299
- export declare const Form: <O, I>({ action, spaReset, reloadDocument, onSubmit$, ...rest }: FormProps<O, I>, key: string | null) => JSXOutput;
300
-
301
- /** @public */
302
- export declare interface FormProps<O, I> extends Omit<QwikJSX.IntrinsicElements['form'], 'action' | 'method'> {
303
- /** Reference to the action returned by `action()`. */
304
- action?: ActionStore<O, I, true | false>;
305
- /**
306
- * When `true` the form submission will cause a full page reload, even if SPA mode is enabled and
307
- * JS is available.
308
- */
309
- reloadDocument?: boolean;
310
- /**
311
- * When `true` all the form inputs will be reset in SPA mode, just like happens in a full page
312
- * form submission.
313
- *
314
- * Defaults to `false`
315
- */
316
- spaReset?: boolean;
317
- /** Event handler executed right when the form is submitted. */
318
- onSubmit$?: QRLEventHandlerMulti<SubmitEvent, HTMLFormElement> | undefined;
319
- /** Event handler executed right after the action is executed successfully and returns some data. */
320
- onSubmitCompleted$?: QRLEventHandlerMulti<CustomEvent<FormSubmitSuccessDetail<O>>, HTMLFormElement> | undefined;
321
- key?: string | number | null;
322
- }
323
-
324
- /** @public */
325
- export declare interface FormSubmitSuccessDetail<T> {
326
- status: number;
327
- value: T;
328
- }
329
-
330
- /** @public */
331
- export declare type GetValidatorInputType<VALIDATOR extends TypedDataValidator> = VALIDATOR extends ValibotDataValidator<infer TYPE> ? v.InferInput<TYPE> : VALIDATOR extends ZodDataValidator<infer TYPE> ? z_2.input<TYPE> : never;
332
-
333
- /** @public */
334
- export declare type GetValidatorOutputType<VALIDATOR extends TypedDataValidator> = VALIDATOR extends ValibotDataValidator<infer TYPE> ? v.InferOutput<TYPE> : VALIDATOR extends ZodDataValidator<infer TYPE> ? z_2.output<TYPE> : never;
335
-
336
- /** @public */
337
- export declare type GetValidatorType<VALIDATOR extends TypedDataValidator> = GetValidatorOutputType<VALIDATOR>;
338
-
339
- /** @public */
340
- export declare const globalAction$: ActionConstructor;
341
-
342
- /* Excluded from this release type: globalActionQrl */
343
-
344
- declare type IsAny<Type> = 0 extends 1 & Type ? true : false;
345
-
346
- /** @public */
347
- export declare type JSONObject = {
348
- [x: string]: JSONValue;
349
- };
350
-
351
- /** @public */
352
- export declare type JSONValue = string | number | boolean | {
353
- [x: string]: JSONValue;
354
- } | Array<JSONValue>;
355
-
356
- declare interface LayoutModule extends RouteModule {
357
- readonly default: unknown;
358
- readonly head?: ContentModuleHead;
359
- }
360
-
361
- /** @public */
362
- export declare const Link: Component<LinkProps>;
363
-
364
- /** @public */
365
- export declare interface LinkProps extends AnchorAttributes {
366
- /**
367
- * **Defaults to _true_.**
368
- *
369
- * Whether Qwik should prefetch and cache the target page of this **`Link`**, this includes
370
- * invoking any **`routeLoader$`**, **`onGet`**, etc.
371
- *
372
- * This **improves UX performance** for client-side (**SPA**) navigations.
373
- *
374
- * Prefetching occurs when a the Link enters the viewport in production (**`on:qvisibile`**), or
375
- * with **`mouseover`/`focus`** during dev.
376
- *
377
- * Prefetching will not occur if the user has the **data saver** setting enabled.
378
- *
379
- * Setting this value to **`"js"`** will prefetch only javascript bundles required to render this
380
- * page on the client, **`false`** will disable prefetching altogether.
381
- */
382
- prefetch?: boolean | 'js';
383
- reload?: boolean;
384
- replaceState?: boolean;
385
- scroll?: boolean;
386
- }
387
-
388
- /** @public */
389
- declare type Loader_2<RETURN> = {
390
- /**
391
- * Returns the `Signal` containing the data returned by the `loader$` function. Like all `use-`
392
- * functions and methods, it can only be invoked within a `component$()`.
393
- */
394
- (): LoaderSignal<RETURN>;
395
- };
396
- export { Loader_2 as Loader }
397
-
398
- /** @public */
399
- declare type LoaderConstructor = {
400
- <OBJ>(loaderFn: (event: RequestEventLoader) => ValueOrPromise<OBJ>, options?: LoaderOptions): Loader_2<[Extract<OBJ, Failed>] extends [never] ? OBJ : StrictUnion<OBJ>>;
401
- <OBJ extends Record<string, any> | void | null, REST extends readonly DataValidator[]>(loaderFn: (event: RequestEventLoader) => ValueOrPromise<OBJ>, ...rest: REST): Loader_2<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
402
- };
403
-
404
- /** @public */
405
- declare type LoaderConstructorQRL = {
406
- <OBJ>(loaderQrl: QRL<(event: RequestEventLoader) => ValueOrPromise<OBJ>>, options?: LoaderOptions): Loader_2<[Extract<OBJ, Failed>] extends [never] ? OBJ : StrictUnion<OBJ>>;
407
- <OBJ extends Record<string, any> | void | null, REST extends readonly DataValidator[]>(loaderQrl: QRL<(event: RequestEventLoader) => ValueOrPromise<OBJ>>, ...rest: REST): Loader_2<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
408
- };
409
-
410
- /** @public */
411
- declare type LoaderOptions = {
412
- id?: string;
413
- };
414
-
415
- /** @public */
416
- export declare type LoaderSignal<TYPE> = TYPE extends () => ValueOrPromise<infer VALIDATOR> ? ReadonlySignal<ValueOrPromise<VALIDATOR>> : ReadonlySignal<TYPE>;
417
-
418
- /** @public */
419
- export declare type MenuData = [pathname: string, menuLoader: MenuModuleLoader];
420
-
421
- declare interface MenuModule {
422
- readonly default: ContentMenu;
423
- }
424
-
425
- declare type MenuModuleLoader = () => Promise<MenuModule>;
426
-
427
- declare type ModuleLoader = ContentModuleLoader | EndpointModuleLoader;
428
-
429
- /** @public */
430
- declare type NavigationType_2 = 'initial' | 'form' | 'link' | 'popstate';
431
- export { NavigationType_2 as NavigationType }
432
-
433
- /**
434
- * Creates a new object from `obj` by omitting a set of `keys`.
435
- *
436
- * @beta
437
- * @experimental
438
- */
439
- export declare function omitProps<T, KEYS extends keyof T>(obj: T, keys: KEYS[]): Omit<T, KEYS>;
440
-
441
- /** @public */
442
- export declare interface PageModule extends RouteModule {
443
- readonly default: unknown;
444
- readonly head?: ContentModuleHead;
445
- readonly headings?: ContentHeading[];
446
- readonly onStaticGenerate?: StaticGenerateHandler;
447
- }
448
-
449
- /** @public */
450
- export declare type PathParams = Record<string, string>;
451
-
452
- declare type Prettify<T> = {} & {
453
- [K in keyof T]: T[K];
454
- };
455
-
456
- /**
457
- * @param url - The URL that the user is trying to navigate to, or a number to indicate the user is
458
- * trying to navigate back/forward in the application history. If it is missing, the event is sent
459
- * by the browser and the user is trying to reload or navigate away from the page. In this case,
460
- * the function should decide the answer synchronously.
461
- * @returns `true` to prevent navigation, `false` to allow navigation, or a Promise that resolves to
462
- * `true` or `false`. For browser events, returning `true` or a Promise may show a confirmation
463
- * dialog, at the browser's discretion. If the user confirms, the navigation will still be
464
- * allowed.
465
- * @public
466
- */
467
- export declare type PreventNavigateCallback = (url?: number | URL) => ValueOrPromise<boolean>;
468
-
469
- /**
470
- * @deprecated Use `QWIK_ROUTER_SCROLLER` instead (will be removed in V3)
471
- * @public
472
- */
473
- export declare const QWIK_CITY_SCROLLER = "_qCityScroller";
474
-
475
- /** @public */
476
- export declare const QWIK_ROUTER_SCROLLER = "_qRouterScroller";
477
-
478
- /**
479
- * @deprecated Use `QwikRouterMockProps` instead. will be removed in V3
480
- * @public
481
- */
482
- export declare type QwikCityMockProps = QwikRouterMockProps;
483
-
484
- /**
485
- * @deprecated Use `QwikRouterMockProvider` instead. Will be removed in V3
486
- * @public
487
- */
488
- export declare const QwikCityMockProvider: Component<QwikRouterMockProps>;
489
-
490
- /**
491
- * @deprecated Use `QwikRouterConfig` instead. Will be removed in V3.
492
- * @public
493
- */
494
- export declare type QwikCityPlan = QwikRouterConfig;
495
-
496
- /**
497
- * @deprecated Use `QwikRouterProps` instead. will be removed in V3
498
- * @public
499
- */
500
- export declare type QwikCityProps = QwikRouterProps;
501
-
502
- /**
503
- * @deprecated Use `QwikRouterProvider` instead. will be removed in V3
504
- * @public
505
- */
506
- export declare const QwikCityProvider: Component<QwikRouterProps>;
507
-
508
- /** @public */
509
- export declare interface QwikRouterConfig {
510
- readonly routes: RouteData[];
511
- readonly serverPlugins?: RouteModule[];
512
- readonly basePathname?: string;
513
- readonly menus?: MenuData[];
514
- readonly trailingSlash?: boolean;
515
- readonly cacheModules?: boolean;
516
- }
517
-
518
- /** @public */
519
- export declare interface QwikRouterMockProps {
520
- url?: string;
521
- params?: Record<string, string>;
522
- goto?: RouteNavigate;
523
- }
524
-
525
- /** @public */
526
- export declare const QwikRouterMockProvider: Component<QwikRouterMockProps>;
527
-
528
- /** @public */
529
- export declare interface QwikRouterProps {
530
- /**
531
- * Enable the ViewTransition API
532
- *
533
- * Default: `true`
534
- *
535
- * @see https://github.com/WICG/view-transitions/blob/main/explainer.md
536
- * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
537
- * @see https://caniuse.com/mdn-api_viewtransition
538
- */
539
- viewTransition?: boolean;
540
- }
541
-
542
- /** @public */
543
- export declare const QwikRouterProvider: Component<QwikRouterProps>;
544
-
545
- export { RequestEvent }
546
-
547
- export { RequestEventAction }
548
-
549
- export { RequestEventBase }
550
-
551
- export { RequestEventCommon }
552
-
553
- export { RequestEventLoader }
554
-
555
- export { RequestHandler }
556
-
557
- /** @public */
558
- export declare type ResolvedDocumentHead<FrontMatter extends Record<string, any> = Record<string, unknown>> = Required<DocumentHeadValue<FrontMatter>>;
559
-
560
- /** @public */
561
- export declare const routeAction$: ActionConstructor;
562
-
563
- /* Excluded from this release type: routeActionQrl */
564
-
565
- /** @public */
566
- export declare type RouteData = [routeName: string, loaders: ModuleLoader[]] | [
567
- routeName: string,
568
- loaders: ModuleLoader[],
569
- originalPathname: string,
570
- routeBundleNames: string[]
571
- ];
572
-
573
- /** @public */
574
- export declare const routeLoader$: LoaderConstructor;
575
-
576
- /* Excluded from this release type: routeLoaderQrl */
577
-
578
- /** @public */
579
- export declare interface RouteLocation {
580
- readonly params: Readonly<Record<string, string>>;
581
- readonly url: URL;
582
- readonly isNavigating: boolean;
583
- readonly prevUrl: URL | undefined;
584
- }
585
-
586
- declare interface RouteModule<BODY = unknown> {
587
- onDelete?: RequestHandler<BODY> | RequestHandler<BODY>[];
588
- onGet?: RequestHandler<BODY> | RequestHandler<BODY>[];
589
- onHead?: RequestHandler<BODY> | RequestHandler<BODY>[];
590
- onOptions?: RequestHandler<BODY> | RequestHandler<BODY>[];
591
- onPatch?: RequestHandler<BODY> | RequestHandler<BODY>[];
592
- onPost?: RequestHandler<BODY> | RequestHandler<BODY>[];
593
- onPut?: RequestHandler<BODY> | RequestHandler<BODY>[];
594
- onRequest?: RequestHandler<BODY> | RequestHandler<BODY>[];
595
- }
596
-
597
- /** @public */
598
- export declare type RouteNavigate = QRL<(path?: string | number | URL, options?: {
599
- type?: Exclude<NavigationType_2, 'initial'>;
600
- forceReload?: boolean;
601
- replaceState?: boolean;
602
- scroll?: boolean;
603
- } | boolean) => Promise<void>>;
604
-
605
- /** @public */
606
- export declare const RouterOutlet: Component<unknown>;
607
-
608
- /** @public */
609
- export declare const server$: <T extends ServerFunction>(qrl: T, options?: ServerConfig | undefined) => ServerQRL<T>;
610
-
611
- /** @public */
612
- declare interface ServerConfig {
613
- origin?: string;
614
- method?: 'get' | 'post';
615
- headers?: Record<string, string>;
616
- fetchOptions?: any;
617
- }
618
-
619
- /** @public */
620
- export declare type ServerFunction = {
621
- (this: RequestEventBase, ...args: any[]): any;
622
- options?: ServerConfig;
623
- };
624
-
625
- /**
626
- * You can pass an AbortSignal as the first argument of a `server$` function and it will use it to
627
- * abort the fetch when fired.
628
- *
629
- * @public
630
- */
631
- export declare type ServerQRL<T extends ServerFunction> = QRL<((abort: AbortSignal, ...args: Parameters<T>) => ReturnType<T>) | ((...args: Parameters<T>) => ReturnType<T>)>;
632
-
633
- /* Excluded from this release type: serverQrl */
634
-
635
- /** @public */
636
- export declare const ServiceWorkerRegister: (props: {
637
- nonce?: string;
638
- }) => JSXNode<"script">;
639
-
640
- /** @public */
641
- export declare interface StaticGenerate {
642
- params?: PathParams[];
643
- }
644
-
645
- /** @public */
646
- export declare type StaticGenerateHandler = ({ env, }: {
647
- env: EnvGetter;
648
- }) => Promise<StaticGenerate> | StaticGenerate;
649
-
650
- /** @public */
651
- export declare type StrictUnion<T> = Prettify<StrictUnionHelper<T, T>>;
652
-
653
- declare type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
654
-
655
- /** @public */
656
- export declare type TypedDataValidator = ValibotDataValidator | ZodDataValidator;
657
-
658
- declare type UnionKeys<T> = T extends T ? keyof T : never;
659
-
660
- /**
661
- * @beta
662
- * @experimental
663
- */
664
- export declare const untypedAppUrl: (route: string, params?: Record<string, string>, paramsPrefix?: string) => string;
665
-
666
- /** @public */
667
- export declare const useContent: () => ContentState;
668
-
669
- /**
670
- * Returns the document head for the current page. The generic type describes the front matter.
671
- *
672
- * @public
673
- */
674
- export declare const useDocumentHead: <FrontMatter extends Record<string, unknown> = Record<string, any>>() => Required<ResolvedDocumentHead<FrontMatter>>;
675
-
676
- /** @public */
677
- export declare const useLocation: () => RouteLocation;
678
-
679
- /** @public */
680
- export declare const useNavigate: () => RouteNavigate;
681
-
682
- /**
683
- * Prevent navigation attempts. This hook registers a callback that will be called before SPA or
684
- * browser navigation.
685
- *
686
- * Return `true` to prevent navigation.
687
- *
688
- * #### SPA Navigation
689
- *
690
- * For Single-Page-App (SPA) navigation (via `<Link />`, `const nav = useNavigate()`, and browser
691
- * backwards/forwards inside SPA history), the callback will be provided with the target, either a
692
- * URL or a number. It will only be a number if `nav(number)` was called to navigate forwards or
693
- * backwards in SPA history.
694
- *
695
- * If you return a Promise, the navigation will be blocked until the promise resolves.
696
- *
697
- * This can be used to show a nice dialog to the user, and wait for the user to confirm, or to
698
- * record the url, prevent the navigation, and navigate there later via `nav(url)`.
699
- *
700
- * #### Browser Navigation
701
- *
702
- * However, when the user navigates away by clicking on a regular `<a />`, reloading, or moving
703
- * backwards/forwards outside SPA history, this callback will not be awaited. This is because the
704
- * browser does not provide a way to asynchronously prevent these navigations.
705
- *
706
- * In this case, returning returning `true` will tell the browser to show a confirmation dialog,
707
- * which cannot be customized. You are also not able to show your own `window.confirm()` dialog
708
- * during the callback, the browser won't allow it. If you return a Promise, it will be considered
709
- * as `true`.
710
- *
711
- * When the callback is called from the browser, no url will be provided. Use this to know whether
712
- * you can show a dialog or just return `true` to prevent the navigation.
713
- *
714
- * @public
715
- */
716
- export declare const usePreventNavigate$: (qrl: PreventNavigateCallback) => void;
717
-
718
- /* Excluded from this release type: usePreventNavigateQrl */
719
-
720
- /** @beta */
721
- export declare const valibot$: ValibotConstructor;
722
-
723
- /** @beta */
724
- declare type ValibotConstructor = {
725
- <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: T): ValibotDataValidator<T>;
726
- <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: (ev: RequestEvent) => T): ValibotDataValidator<T>;
727
- };
728
-
729
- /** @beta */
730
- declare type ValibotConstructorQRL = {
731
- <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: QRL<T>): ValibotDataValidator<T>;
732
- <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: QRL<(ev: RequestEvent) => T>): ValibotDataValidator<T>;
733
- };
734
-
735
- /** @beta */
736
- declare type ValibotDataValidator<T extends v.GenericSchema | v.GenericSchemaAsync = v.GenericSchema | v.GenericSchemaAsync> = {
737
- readonly __brand: 'valibot';
738
- validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<ValidatorErrorType<v.InferInput<T>>>>;
739
- };
740
-
741
- /* Excluded from this release type: valibotQrl */
742
-
743
- /** @public */
744
- export declare const validator$: ValidatorConstructor;
745
-
746
- declare type ValidatorConstructor = {
747
- <T extends ValidatorReturn>(validator: (ev: RequestEvent, data: unknown) => ValueOrPromise<T>): T extends ValidatorReturnFail<infer ERROR> ? DataValidator<ERROR> : DataValidator<never>;
748
- };
749
-
750
- declare type ValidatorConstructorQRL = {
751
- <T extends ValidatorReturn>(validator: QRL<(ev: RequestEvent, data: unknown) => ValueOrPromise<T>>): T extends ValidatorReturnFail<infer ERROR> ? DataValidator<ERROR> : DataValidator<never>;
752
- };
753
-
754
- /** @public */
755
- export declare type ValidatorErrorKeyDotNotation<T, Prefix extends string = ''> = IsAny<T> extends true ? never : T extends object ? {
756
- [K in keyof T & string]: IsAny<T[K]> extends true ? never : T[K] extends (infer U)[] ? IsAny<U> extends true ? never : U extends object ? `${Prefix}${K}[]` | ValidatorErrorKeyDotNotation<U, `${Prefix}${K}[].`> : `${Prefix}${K}[]` : T[K] extends object ? ValidatorErrorKeyDotNotation<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
757
- }[keyof T & string] : never;
758
-
759
- /** @public */
760
- export declare type ValidatorErrorType<T, U = string> = {
761
- formErrors: U[];
762
- fieldErrors: Partial<{
763
- [K in ValidatorErrorKeyDotNotation<T>]: K extends `${infer _Prefix}[]${infer _Suffix}` ? U[] : U;
764
- }>;
765
- };
766
-
767
- /* Excluded from this release type: validatorQrl */
768
-
769
- /** @public */
770
- export declare type ValidatorReturn<T extends Record<string, any> = {}> = ValidatorReturnSuccess | ValidatorReturnFail<T>;
771
-
772
- declare type ValidatorReturnFail<T extends Record<string, any> = {}> = {
773
- readonly success: false;
774
- readonly error: T;
775
- readonly status?: number;
776
- };
777
-
778
- declare type ValidatorReturnSuccess = {
779
- readonly success: true;
780
- readonly data?: unknown;
781
- };
782
-
783
- export { z }
784
-
785
- /** @public */
786
- export declare const zod$: ZodConstructor;
787
-
788
- /** @public */
789
- export declare type ZodConstructor = {
790
- <T extends z_2.ZodRawShape>(schema: T): ZodDataValidator<z_2.ZodObject<T>>;
791
- <T extends z_2.ZodRawShape>(schema: (zod: typeof z_2.z, ev: RequestEvent) => T): ZodDataValidator<z_2.ZodObject<T>>;
792
- <T extends z_2.Schema>(schema: T): ZodDataValidator<T>;
793
- <T extends z_2.Schema>(schema: (zod: typeof z_2.z, ev: RequestEvent) => T): ZodDataValidator<T>;
794
- };
795
-
796
- /** @public */
797
- declare type ZodConstructorQRL = {
798
- <T extends z_2.ZodRawShape>(schema: QRL<T>): ZodDataValidator<z_2.ZodObject<T>>;
799
- <T extends z_2.ZodRawShape>(schema: QRL<(zod: typeof z_2.z, ev: RequestEvent) => T>): ZodDataValidator<z_2.ZodObject<T>>;
800
- <T extends z_2.Schema>(schema: QRL<T>): ZodDataValidator<T>;
801
- <T extends z_2.Schema>(schema: QRL<(zod: typeof z_2.z, ev: RequestEvent) => T>): ZodDataValidator<T>;
802
- };
803
-
804
- /** @public */
805
- declare type ZodDataValidator<T extends z_2.ZodType = z_2.ZodType> = {
806
- readonly __brand: 'zod';
807
- validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<ValidatorErrorType<z_2.input<T>>>>;
808
- };
809
-
810
- /* Excluded from this release type: zodQrl */
811
-
812
- export { }
3
+ import { Component } from '@qwik.dev/core';
4
+ import { Cookie } from '@qwik.dev/router/middleware/request-handler';
5
+ import { CookieOptions } from '@qwik.dev/router/middleware/request-handler';
6
+ import { CookieValue } from '@qwik.dev/router/middleware/request-handler';
7
+ import { DeferReturn } from '@qwik.dev/router/middleware/request-handler';
8
+ import type { EnvGetter } from '@qwik.dev/router/middleware/request-handler';
9
+ import { JSXOutput as JSXOutput_2 } from '@qwik.dev/core';
10
+ import { QRL } from '@qwik.dev/core';
11
+ import { QRLEventHandlerMulti } from '@qwik.dev/core';
12
+ import { QwikIntrinsicElements } from '@qwik.dev/core';
13
+ import { QwikJSX } from '@qwik.dev/core';
14
+ import type { ReadonlySignal } from '@qwik.dev/core';
15
+ import { Render } from '@qwik.dev/core/server';
16
+ import { RenderOptions } from '@qwik.dev/core/server';
17
+ import { RequestEvent } from '@qwik.dev/router/middleware/request-handler';
18
+ import { RequestEventAction } from '@qwik.dev/router/middleware/request-handler';
19
+ import { RequestEventBase } from '@qwik.dev/router/middleware/request-handler';
20
+ import { RequestEventCommon } from '@qwik.dev/router/middleware/request-handler';
21
+ import { RequestEventLoader } from '@qwik.dev/router/middleware/request-handler';
22
+ import { RequestHandler } from '@qwik.dev/router/middleware/request-handler';
23
+ import type { ResolveSyncValue } from '@qwik.dev/router/middleware/request-handler';
24
+ import type { SerializationStrategy } from '@qwik.dev/core/internal';
25
+ import type * as v from 'valibot';
26
+ import type { ValueOrPromise } from '@qwik.dev/core';
27
+ import { z } from 'zod';
28
+ import type * as z_2 from 'zod';
29
+
30
+ /** @public */
31
+ export declare type Action<RETURN, INPUT = Record<string, unknown>, OPTIONAL extends boolean = true> = {
32
+ /**
33
+ * Returns the `ActionStore` containing the current action state and methods to invoke it from a
34
+ * component$(). Like all `use-` functions and methods, it can only be invoked within a
35
+ * `component$()`.
36
+ */
37
+ (): ActionStore<RETURN, INPUT, OPTIONAL>;
38
+ };
39
+
40
+ /** @public */
41
+ export declare type ActionConstructor = {
42
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
43
+ readonly id?: string;
44
+ readonly validation: [VALIDATOR, ...REST];
45
+ }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
46
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
47
+ readonly id?: string;
48
+ readonly validation: [VALIDATOR];
49
+ }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
50
+ <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, options: {
51
+ readonly id?: string;
52
+ readonly validation: REST;
53
+ }): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
54
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: VALIDATOR, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
55
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: (data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>, options: VALIDATOR): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
56
+ <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: (form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
57
+ <OBJ>(actionQrl: (form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>, options?: {
58
+ readonly id?: string;
59
+ }): Action<StrictUnion<OBJ>>;
60
+ };
61
+
62
+ /** @public */
63
+ declare type ActionConstructorQRL = {
64
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
65
+ readonly id?: string;
66
+ readonly validation: [VALIDATOR, ...REST];
67
+ }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
68
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
69
+ readonly id?: string;
70
+ readonly validation: [VALIDATOR];
71
+ }): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
72
+ <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: {
73
+ readonly id?: string;
74
+ readonly validation: REST;
75
+ }): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
76
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: VALIDATOR, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>> | FailReturn<FailOfRest<REST>>>, GetValidatorInputType<VALIDATOR>, false>;
77
+ <OBJ extends Record<string, any> | void | null, VALIDATOR extends TypedDataValidator>(actionQrl: QRL<(data: GetValidatorOutputType<VALIDATOR>, event: RequestEventAction) => ValueOrPromise<OBJ>>, options: VALIDATOR): Action<StrictUnion<OBJ | FailReturn<ValidatorErrorType<GetValidatorInputType<VALIDATOR>>>>, GetValidatorInputType<VALIDATOR>, false>;
78
+ <OBJ extends Record<string, any> | void | null, REST extends [DataValidator, ...DataValidator[]]>(actionQrl: QRL<(form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, ...rest: REST): Action<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
79
+ <OBJ>(actionQrl: QRL<(form: JSONObject, event: RequestEventAction) => ValueOrPromise<OBJ>>, options?: {
80
+ readonly id?: string;
81
+ }): Action<StrictUnion<OBJ>>;
82
+ };
83
+
84
+ /** @public */
85
+ export declare type ActionReturn<RETURN> = {
86
+ readonly status?: number;
87
+ readonly value: RETURN;
88
+ };
89
+
90
+ /** @public */
91
+ export declare type ActionStore<RETURN, INPUT, OPTIONAL extends boolean = true> = {
92
+ /**
93
+ * It's the "action" path that a native `<form>` should have in order to call the action.
94
+ *
95
+ * ```tsx
96
+ * <form action={action.actionPath} />
97
+ * ```
98
+ *
99
+ * Most of the time this property should not be used directly, instead use the `Form` component:
100
+ *
101
+ * ```tsx
102
+ * import {action$, Form} from '@qwik.dev/router';
103
+ *
104
+ * export const useAddUser = action$(() => { ... });
105
+ *
106
+ * export default component$(() => {
107
+ * const action = useAddUser();
108
+ * return (
109
+ * <Form action={action}/>
110
+ * );
111
+ * });
112
+ * ```
113
+ */
114
+ readonly actionPath: string;
115
+ /**
116
+ * Reactive property that becomes `true` only in the browser, when a form is submitted and
117
+ * switched back to false when the action finish, ie, it describes if the action is actively
118
+ * running.
119
+ *
120
+ * This property is specially useful to disable the submit button while the action is processing,
121
+ * to prevent multiple submissions, and to inform visually to the user that the action is actively
122
+ * running.
123
+ *
124
+ * It will be always `false` in the server, and only becomes `true` briefly while the action is
125
+ * running.
126
+ */
127
+ readonly isRunning: boolean;
128
+ /**
129
+ * Returned HTTP status code of the action after its last execution.
130
+ *
131
+ * It's `undefined` before the action is first called.
132
+ */
133
+ readonly status?: number;
134
+ /**
135
+ * When calling an action through a `<form>`, this property contains the previously submitted
136
+ * `FormData`.
137
+ *
138
+ * This is useful to keep the filled form data even after a full page reload.
139
+ *
140
+ * It's `undefined` before the action is first called.
141
+ */
142
+ readonly formData: FormData | undefined;
143
+ /**
144
+ * Returned successful data of the action. This reactive property will contain the data returned
145
+ * inside the `action$` function.
146
+ *
147
+ * It's `undefined` before the action is first called.
148
+ */
149
+ readonly value: RETURN | undefined;
150
+ /**
151
+ * Method to execute the action programmatically from the browser. Ie, instead of using a
152
+ * `<form>`, a 'click' handle can call the `run()` method of the action in order to execute the
153
+ * action in the server.
154
+ */
155
+ readonly submit: QRL<OPTIONAL extends true ? (form?: INPUT | FormData | SubmitEvent) => Promise<ActionReturn<RETURN>> : (form: INPUT | FormData | SubmitEvent) => Promise<ActionReturn<RETURN>>>;
156
+ /** Is action.submit was submitted */
157
+ readonly submitted: boolean;
158
+ };
159
+
160
+ declare type AnchorAttributes = QwikIntrinsicElements['a'];
161
+
162
+ /** @public */
163
+ export declare interface ContentHeading {
164
+ readonly text: string;
165
+ readonly id: string;
166
+ readonly level: number;
167
+ }
168
+
169
+ /** @public */
170
+ export declare interface ContentMenu {
171
+ readonly text: string;
172
+ readonly href?: string;
173
+ readonly items?: ContentMenu[];
174
+ }
175
+
176
+ declare type ContentModule = PageModule | LayoutModule;
177
+
178
+ declare type ContentModuleHead = DocumentHead | ResolvedDocumentHead;
179
+
180
+ declare type ContentModuleLoader = () => Promise<ContentModule>;
181
+
182
+ /** @public */
183
+ declare interface ContentState {
184
+ readonly headings: ContentHeading[] | undefined;
185
+ readonly menu: ContentMenu | undefined;
186
+ }
187
+
188
+ export { Cookie }
189
+
190
+ export { CookieOptions }
191
+
192
+ export { CookieValue }
193
+
194
+ /**
195
+ * Creates the `render()` function that is required by `createQwikRouter()`. It requires a function
196
+ * that returns the `jsx` and `options` for the renderer.
197
+ *
198
+ * @example
199
+ *
200
+ * ```tsx
201
+ * const renderer = createRenderer((opts) => {
202
+ * if (opts.requestHeaders['x-hello'] === 'world') {
203
+ * return { jsx: <Hello />, options: opts };
204
+ * }
205
+ * return { jsx: <Root />, options: {
206
+ * ...opts,
207
+ * serverData: {
208
+ * ...opts.serverData,
209
+ * documentHead: {
210
+ * meta: [
211
+ * { name: 'renderedAt', content: new Date().toISOString() },
212
+ * ],
213
+ * },
214
+ * },
215
+ * } };
216
+ * });
217
+ * ```
218
+ *
219
+ * @public
220
+ */
221
+ export declare const createRenderer: (getOptions: (options: RendererOptions) => {
222
+ jsx: JSXOutput_2;
223
+ options: RendererOutputOptions;
224
+ }) => Render;
225
+
226
+ /** @public */
227
+ export declare type DataValidator<T extends Record<string, any> = {}> = {
228
+ validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<T>>;
229
+ };
230
+
231
+ export { DeferReturn }
232
+
233
+ /** @public */
234
+ declare interface DevJSX {
235
+ fileName: string;
236
+ lineNumber: number;
237
+ columnNumber: number;
238
+ stack?: string;
239
+ }
240
+
241
+ /** @public */
242
+ export declare type DocumentHead = DocumentHeadValue | ((props: DocumentHeadProps) => DocumentHeadValue);
243
+
244
+ /** @public */
245
+ export declare interface DocumentHeadProps extends RouteLocation {
246
+ readonly head: ResolvedDocumentHead;
247
+ readonly withLocale: <T>(fn: () => T) => T;
248
+ readonly resolveValue: ResolveSyncValue;
249
+ }
250
+
251
+ /**
252
+ * This renders all the tags collected from `head`.
253
+ *
254
+ * You can partially override the head, for example if you want to change the title:
255
+ *
256
+ * ```tsx
257
+ * import { DocumentHeadTags, useDocumentHead } from '@qwik.dev/router';
258
+ *
259
+ * export default component$(() => {
260
+ * const head = useDocumentHead();
261
+ * return <DocumentHeadTags title={`${head.title} - My App`} />;
262
+ * });
263
+ * ```
264
+ *
265
+ * You don't have to use this component, you can also do it yourself for full control. Just copy the
266
+ * code from this component and modify it to your needs.
267
+ *
268
+ * Note that this component normally only runs once, during SSR. You can use Signals in your
269
+ * `src/root.tsx` to make runtime changes to `<head>` if needed.
270
+ *
271
+ * @public
272
+ */
273
+ export declare const DocumentHeadTags: Component<DocumentHeadValue<Record<string, unknown>>>;
274
+
275
+ /** @public */
276
+ export declare interface DocumentHeadValue<FrontMatter extends Record<string, any> = Record<string, unknown>> {
277
+ /** Sets `document.title`. */
278
+ readonly title?: string;
279
+ /** Used to manually set meta tags in the head. */
280
+ readonly meta?: readonly DocumentMeta[];
281
+ /** Used to manually append `<link>` elements to the `<head>`. */
282
+ readonly links?: readonly DocumentLink[];
283
+ /** Used to manually append `<style>` elements to the `<head>`. */
284
+ readonly styles?: readonly DocumentStyle[];
285
+ /** Used to manually append `<script>` elements to the `<head>`. */
286
+ readonly scripts?: readonly DocumentScript[];
287
+ /**
288
+ * Arbitrary object containing custom data. When the document head is created from markdown files,
289
+ * the frontmatter attributes that are not recognized as a well-known meta names (such as title,
290
+ * description, author, etc...), are stored in this property.
291
+ */
292
+ readonly frontmatter?: Readonly<FrontMatter>;
293
+ }
294
+
295
+ /** @public */
296
+ export declare type DocumentLink = QwikIntrinsicElements['link'];
297
+
298
+ /** @public */
299
+ export declare type DocumentMeta = QwikIntrinsicElements['meta'];
300
+
301
+ /** @public */
302
+ export declare type DocumentScript = ((Omit<QwikIntrinsicElements['script'], 'dangerouslySetInnerHTML'> & {
303
+ props?: never;
304
+ }) | {
305
+ key?: string;
306
+ /**
307
+ * The props of the script element. @deprecated Prefer setting the properties directly instead
308
+ * of using this property.
309
+ */
310
+ props: Readonly<QwikIntrinsicElements['script']>;
311
+ }) & ({
312
+ /** The inline script content. */
313
+ script?: string;
314
+ dangerouslySetInnerHTML?: never;
315
+ } | {
316
+ dangerouslySetInnerHTML?: string;
317
+ script?: never;
318
+ });
319
+
320
+ /** @public */
321
+ export declare type DocumentStyle = Readonly<((Omit<QwikIntrinsicElements['style'], 'dangerouslySetInnerHTML'> & {
322
+ props?: never;
323
+ }) | {
324
+ key?: string;
325
+ /**
326
+ * The props of the style element. @deprecated Prefer setting the properties directly
327
+ * instead of using this property.
328
+ */
329
+ props: Readonly<QwikIntrinsicElements['style']>;
330
+ }) & ({
331
+ /** The inline style content. */
332
+ style?: string;
333
+ dangerouslySetInnerHTML?: never;
334
+ } | {
335
+ dangerouslySetInnerHTML?: string;
336
+ style?: never;
337
+ })>;
338
+
339
+ declare type EndpointModuleLoader = () => Promise<RouteModule>;
340
+
341
+ declare interface EndpointResponse {
342
+ status: number;
343
+ loaders: Record<string, unknown>;
344
+ loadersSerializationStrategy: Map<string, SerializationStrategy>;
345
+ formData?: FormData;
346
+ action?: string;
347
+ }
348
+
349
+ /** @public */
350
+ export declare const ErrorBoundary: Component<ErrorBoundaryProps>;
351
+
352
+ /** @public */
353
+ declare interface ErrorBoundaryProps {
354
+ fallback$?: QRL<(error: any) => any>;
355
+ }
356
+
357
+ declare type Failed = {
358
+ failed: true;
359
+ };
360
+
361
+ /** @public */
362
+ export declare type FailOfRest<REST extends readonly DataValidator[]> = REST extends readonly DataValidator<infer ERROR>[] ? ERROR : never;
363
+
364
+ /** @public */
365
+ export declare type FailReturn<T> = T & Failed;
366
+
367
+ /** @public */
368
+ export declare const Form: <O, I>({ action, spaReset, reloadDocument, onSubmit$, ...rest }: FormProps<O, I>, key: string | null) => JSXOutput_2;
369
+
370
+ /** @public */
371
+ export declare interface FormProps<O, I> extends Omit<QwikJSX.IntrinsicElements['form'], 'action' | 'method'> {
372
+ /** Reference to the action returned by `action()`. */
373
+ action?: ActionStore<O, I, true | false>;
374
+ /**
375
+ * When `true` the form submission will cause a full page reload, even if SPA mode is enabled and
376
+ * JS is available.
377
+ */
378
+ reloadDocument?: boolean;
379
+ /**
380
+ * When `true` all the form inputs will be reset in SPA mode, just like happens in a full page
381
+ * form submission.
382
+ *
383
+ * Defaults to `false`
384
+ */
385
+ spaReset?: boolean;
386
+ /** Event handler executed right when the form is submitted. */
387
+ onSubmit$?: QRLEventHandlerMulti<SubmitEvent, HTMLFormElement> | undefined;
388
+ /** Event handler executed right after the action is executed successfully and returns some data. */
389
+ onSubmitCompleted$?: QRLEventHandlerMulti<CustomEvent<FormSubmitSuccessDetail<O>>, HTMLFormElement> | undefined;
390
+ key?: string | number | null;
391
+ }
392
+
393
+ /** @public */
394
+ export declare interface FormSubmitSuccessDetail<T> {
395
+ status: number;
396
+ value: T;
397
+ }
398
+
399
+ /**
400
+ * Any function taking a props object that returns JSXOutput.
401
+ *
402
+ * The `key`, `flags` and `dev` parameters are for internal use.
403
+ *
404
+ * @public
405
+ */
406
+ declare type FunctionComponent<P = unknown> = {
407
+ renderFn(props: P, key: string | null, flags: number, dev?: DevJSX): JSXOutput;
408
+ }['renderFn'];
409
+
410
+ /** @public */
411
+ export declare type GetValidatorInputType<VALIDATOR extends TypedDataValidator> = VALIDATOR extends ValibotDataValidator<infer TYPE> ? v.InferInput<TYPE> : VALIDATOR extends ZodDataValidator<infer TYPE> ? z_2.input<TYPE> : never;
412
+
413
+ /** @public */
414
+ export declare type GetValidatorOutputType<VALIDATOR extends TypedDataValidator> = VALIDATOR extends ValibotDataValidator<infer TYPE> ? v.InferOutput<TYPE> : VALIDATOR extends ZodDataValidator<infer TYPE> ? z_2.output<TYPE> : never;
415
+
416
+ /** @public */
417
+ export declare type GetValidatorType<VALIDATOR extends TypedDataValidator> = GetValidatorOutputType<VALIDATOR>;
418
+
419
+ /** @public */
420
+ export declare const globalAction$: ActionConstructor;
421
+
422
+ /* Excluded from this release type: globalActionQrl */
423
+
424
+ declare type IsAny<Type> = 0 extends 1 & Type ? true : false;
425
+
426
+ /** @public */
427
+ export declare type JSONObject = {
428
+ [x: string]: JSONValue;
429
+ };
430
+
431
+ /** @public */
432
+ export declare type JSONValue = string | number | boolean | {
433
+ [x: string]: JSONValue;
434
+ } | Array<JSONValue>;
435
+
436
+ /** @public */
437
+ declare type JSXChildren = string | number | boolean | null | undefined | Function | RegExp | JSXChildren[] | Promise<JSXChildren> | Signal<JSXChildren> | JSXNode;
438
+
439
+ /**
440
+ * A JSX Node, an internal structure. You probably want to use `JSXOutput` instead.
441
+ *
442
+ * @public
443
+ */
444
+ declare interface JSXNode<T extends string | FunctionComponent | unknown = unknown> {
445
+ type: T;
446
+ props: T extends FunctionComponent<infer P> ? P : Record<any, unknown>;
447
+ children: JSXChildren | null;
448
+ key: string | null;
449
+ dev?: DevJSX;
450
+ }
451
+
452
+ /**
453
+ * Any valid output for a component
454
+ *
455
+ * @public
456
+ */
457
+ declare type JSXOutput = JSXNode | string | number | boolean | null | undefined | JSXOutput[];
458
+
459
+ declare interface LayoutModule extends RouteModule {
460
+ readonly default: unknown;
461
+ readonly head?: ContentModuleHead;
462
+ }
463
+
464
+ /** @public */
465
+ export declare const Link: Component<LinkProps>;
466
+
467
+ /** @public */
468
+ export declare interface LinkProps extends AnchorAttributes {
469
+ /**
470
+ * **Defaults to _true_.**
471
+ *
472
+ * Whether Qwik should prefetch and cache the target page of this **`Link`**, this includes
473
+ * invoking any **`routeLoader$`**, **`onGet`**, etc.
474
+ *
475
+ * This **improves UX performance** for client-side (**SPA**) navigations.
476
+ *
477
+ * Prefetching occurs when a the Link enters the viewport in production (**`on:qvisible`**), or
478
+ * with **`mouseover`/`focus`** during dev.
479
+ *
480
+ * Prefetching will not occur if the user has the **data saver** setting enabled.
481
+ *
482
+ * Setting this value to **`"js"`** will prefetch only javascript bundles required to render this
483
+ * page on the client, **`false`** will disable prefetching altogether.
484
+ */
485
+ prefetch?: boolean | 'js';
486
+ reload?: boolean;
487
+ replaceState?: boolean;
488
+ scroll?: boolean;
489
+ }
490
+
491
+ declare type LoadedRoute = [
492
+ routeName: string,
493
+ params: PathParams,
494
+ mods: (RouteModule | ContentModule)[],
495
+ menu: ContentMenu | undefined,
496
+ routeBundleNames: string[] | undefined
497
+ ];
498
+
499
+ /** @public */
500
+ declare type Loader_2<RETURN> = {
501
+ /**
502
+ * Returns the `Signal` containing the data returned by the `loader$` function. Like all `use-`
503
+ * functions and methods, it can only be invoked within a `component$()`.
504
+ */
505
+ (): LoaderSignal<RETURN>;
506
+ };
507
+ export { Loader_2 as Loader }
508
+
509
+ /** @public */
510
+ declare type LoaderConstructor = {
511
+ <OBJ>(loaderFn: (event: RequestEventLoader) => ValueOrPromise<OBJ>, options?: LoaderOptions): Loader_2<[Extract<OBJ, Failed>] extends [never] ? OBJ : StrictUnion<OBJ>>;
512
+ <OBJ extends Record<string, any> | void | null, REST extends readonly DataValidator[]>(loaderFn: (event: RequestEventLoader) => ValueOrPromise<OBJ>, ...rest: REST): Loader_2<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
513
+ };
514
+
515
+ /** @public */
516
+ declare type LoaderConstructorQRL = {
517
+ <OBJ>(loaderQrl: QRL<(event: RequestEventLoader) => ValueOrPromise<OBJ>>, options?: LoaderOptions): Loader_2<[Extract<OBJ, Failed>] extends [never] ? OBJ : StrictUnion<OBJ>>;
518
+ <OBJ extends Record<string, any> | void | null, REST extends readonly DataValidator[]>(loaderQrl: QRL<(event: RequestEventLoader) => ValueOrPromise<OBJ>>, ...rest: REST): Loader_2<StrictUnion<OBJ | FailReturn<FailOfRest<REST>>>>;
519
+ };
520
+
521
+ /** @public */
522
+ declare type LoaderOptions = {
523
+ readonly id?: string;
524
+ readonly validation?: DataValidator[];
525
+ readonly serializationStrategy?: SerializationStrategy;
526
+ };
527
+
528
+ /** @public */
529
+ export declare type LoaderSignal<TYPE> = TYPE extends () => ValueOrPromise<infer VALIDATOR> ? ReadonlySignal<ValueOrPromise<VALIDATOR>> : ReadonlySignal<TYPE>;
530
+
531
+ /** @public */
532
+ export declare type MenuData = [pathname: string, menuLoader: MenuModuleLoader];
533
+
534
+ declare interface MenuModule {
535
+ readonly default: ContentMenu;
536
+ }
537
+
538
+ declare type MenuModuleLoader = () => Promise<MenuModule>;
539
+
540
+ declare type ModuleLoader = ContentModuleLoader | EndpointModuleLoader;
541
+
542
+ /** @public */
543
+ declare type NavigationType_2 = 'initial' | 'form' | 'link' | 'popstate';
544
+ export { NavigationType_2 as NavigationType }
545
+
546
+ /**
547
+ * Creates a new object from `obj` by omitting a set of `keys`.
548
+ *
549
+ * @beta
550
+ * @experimental
551
+ */
552
+ export declare function omitProps<T, KEYS extends keyof T>(obj: T, keys: KEYS[]): Omit<T, KEYS>;
553
+
554
+ /** @public */
555
+ export declare interface PageModule extends RouteModule {
556
+ readonly default: unknown;
557
+ readonly head?: ContentModuleHead;
558
+ readonly headings?: ContentHeading[];
559
+ readonly onStaticGenerate?: StaticGenerateHandler;
560
+ }
561
+
562
+ /** @public */
563
+ export declare type PathParams = Record<string, string>;
564
+
565
+ declare type Prettify<T> = {} & {
566
+ [K in keyof T]: T[K];
567
+ };
568
+
569
+ /**
570
+ * @param url - The URL that the user is trying to navigate to, or a number to indicate the user is
571
+ * trying to navigate back/forward in the application history. If it is missing, the event is sent
572
+ * by the browser and the user is trying to reload or navigate away from the page. In this case,
573
+ * the function should decide the answer synchronously.
574
+ * @returns `true` to prevent navigation, `false` to allow navigation, or a Promise that resolves to
575
+ * `true` or `false`. For browser events, returning `true` or a Promise may show a confirmation
576
+ * dialog, at the browser's discretion. If the user confirms, the navigation will still be
577
+ * allowed.
578
+ * @public
579
+ */
580
+ export declare type PreventNavigateCallback = (url?: number | URL) => ValueOrPromise<boolean>;
581
+
582
+ /** @public */
583
+ export declare const Q_ROUTE = "q:route";
584
+
585
+ /**
586
+ * @deprecated Use `QWIK_ROUTER_SCROLLER` instead (will be removed in V3)
587
+ * @public
588
+ */
589
+ export declare const QWIK_CITY_SCROLLER = "_qCityScroller";
590
+
591
+ /** @public */
592
+ export declare const QWIK_ROUTER_SCROLLER = "_qRouterScroller";
593
+
594
+ /**
595
+ * @deprecated Use `QwikRouterMockProps` instead. will be removed in V3
596
+ * @public
597
+ */
598
+ export declare type QwikCityMockProps = QwikRouterMockProps;
599
+
600
+ /**
601
+ * @deprecated Use `useQwikMockRouter()` instead. Will be removed in V3
602
+ * @public
603
+ */
604
+ export declare const QwikCityMockProvider: Component<QwikRouterMockProps>;
605
+
606
+ /**
607
+ * @deprecated Use `QwikRouterConfig` instead. Will be removed in V3.
608
+ * @public
609
+ */
610
+ export declare type QwikCityPlan = QwikRouterConfig;
611
+
612
+ /**
613
+ * @deprecated Use `QwikRouterProps` instead. Will be removed in v3.
614
+ * @public
615
+ */
616
+ export declare type QwikCityProps = QwikRouterProps;
617
+
618
+ /**
619
+ * @deprecated Use `useQwikRouter()` instead. Will be removed in v3.
620
+ * @public
621
+ */
622
+ export declare const QwikCityProvider: Component<QwikRouterProps>;
623
+
624
+ /** @public */
625
+ export declare interface QwikRouterConfig {
626
+ readonly routes: RouteData[];
627
+ readonly serverPlugins?: RouteModule[];
628
+ readonly basePathname?: string;
629
+ readonly menus?: MenuData[];
630
+ readonly trailingSlash?: boolean;
631
+ readonly cacheModules?: boolean;
632
+ }
633
+
634
+ /** @public */
635
+ export declare interface QwikRouterEnvData {
636
+ routeName: string;
637
+ ev: RequestEvent;
638
+ params: PathParams;
639
+ response: EndpointResponse;
640
+ loadedRoute: LoadedRoute | null;
641
+ }
642
+
643
+ /** @public */
644
+ export declare interface QwikRouterMockProps {
645
+ url?: string;
646
+ params?: Record<string, string>;
647
+ goto?: RouteNavigate;
648
+ }
649
+
650
+ /** @public */
651
+ export declare const QwikRouterMockProvider: Component<QwikRouterMockProps>;
652
+
653
+ /** @public */
654
+ export declare interface QwikRouterProps {
655
+ /**
656
+ * Enable the ViewTransition API
657
+ *
658
+ * Default: `true`
659
+ *
660
+ * @see https://github.com/WICG/view-transitions/blob/main/explainer.md
661
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
662
+ * @see https://caniuse.com/mdn_api_viewtransition
663
+ */
664
+ viewTransition?: boolean;
665
+ }
666
+
667
+ /** @public This is a wrapper around the `useQwikRouter()` hook. We recommend using the hook instead of this component. */
668
+ export declare const QwikRouterProvider: Component<QwikRouterProps>;
669
+
670
+ /** @public */
671
+ declare interface ReadonlySignal_2<T = unknown> {
672
+ readonly value: T;
673
+ }
674
+
675
+ /** @public */
676
+ export declare type RendererOptions = Omit<RenderOptions, 'serverData'> & {
677
+ serverData: ServerData;
678
+ };
679
+
680
+ /** @public */
681
+ export declare type RendererOutputOptions = Omit<RenderOptions, 'serverData'> & {
682
+ serverData: ServerData & {
683
+ documentHead?: DocumentHeadValue;
684
+ } & Record<string, unknown>;
685
+ };
686
+
687
+ export { RequestEvent }
688
+
689
+ export { RequestEventAction }
690
+
691
+ export { RequestEventBase }
692
+
693
+ export { RequestEventCommon }
694
+
695
+ export { RequestEventLoader }
696
+
697
+ export { RequestHandler }
698
+
699
+ /** @public */
700
+ export declare type ResolvedDocumentHead<FrontMatter extends Record<string, any> = Record<string, unknown>> = Required<DocumentHeadValue<FrontMatter>>;
701
+
702
+ /** @public */
703
+ export declare const routeAction$: ActionConstructor;
704
+
705
+ /* Excluded from this release type: routeActionQrl */
706
+
707
+ /** @public */
708
+ export declare type RouteData = [routeName: string, loaders: ModuleLoader[]] | [
709
+ routeName: string,
710
+ loaders: ModuleLoader[],
711
+ originalPathname: string,
712
+ routeBundleNames: string[]
713
+ ];
714
+
715
+ /** @public */
716
+ export declare const routeLoader$: LoaderConstructor;
717
+
718
+ /* Excluded from this release type: routeLoaderQrl */
719
+
720
+ /** @public */
721
+ export declare interface RouteLocation {
722
+ readonly params: Readonly<Record<string, string>>;
723
+ readonly url: URL;
724
+ readonly isNavigating: boolean;
725
+ readonly prevUrl: URL | undefined;
726
+ }
727
+
728
+ declare interface RouteModule<BODY = unknown> {
729
+ onDelete?: RequestHandler<BODY> | RequestHandler<BODY>[];
730
+ onGet?: RequestHandler<BODY> | RequestHandler<BODY>[];
731
+ onHead?: RequestHandler<BODY> | RequestHandler<BODY>[];
732
+ onOptions?: RequestHandler<BODY> | RequestHandler<BODY>[];
733
+ onPatch?: RequestHandler<BODY> | RequestHandler<BODY>[];
734
+ onPost?: RequestHandler<BODY> | RequestHandler<BODY>[];
735
+ onPut?: RequestHandler<BODY> | RequestHandler<BODY>[];
736
+ onRequest?: RequestHandler<BODY> | RequestHandler<BODY>[];
737
+ }
738
+
739
+ /** @public */
740
+ export declare type RouteNavigate = QRL<(path?: string | number | URL, options?: {
741
+ type?: Exclude<NavigationType_2, 'initial'>;
742
+ forceReload?: boolean;
743
+ replaceState?: boolean;
744
+ scroll?: boolean;
745
+ } | boolean) => Promise<void>>;
746
+
747
+ /** @public */
748
+ export declare const RouterOutlet: Component<unknown>;
749
+
750
+ /** @public */
751
+ export declare const server$: <T extends ServerFunction>(qrl: T, options?: ServerConfig | undefined) => ServerQRL<T>;
752
+
753
+ /** @public */
754
+ declare interface ServerConfig {
755
+ origin?: string;
756
+ method?: 'get' | 'post';
757
+ headers?: Record<string, string>;
758
+ fetchOptions?: any;
759
+ }
760
+
761
+ /** @public The server data that is provided by Qwik Router during SSR rendering. It can be retrieved with `useServerData(key)` in the server, but it is not available in the client. */
762
+ export declare type ServerData = {
763
+ url: string;
764
+ requestHeaders: Record<string, string>;
765
+ locale: string | undefined;
766
+ nonce: string | undefined;
767
+ containerAttributes: Record<string, string> & {
768
+ [Q_ROUTE]: string;
769
+ };
770
+ qwikrouter: QwikRouterEnvData;
771
+ };
772
+
773
+ /** @public */
774
+ export declare type ServerFunction = {
775
+ (this: RequestEventBase, ...args: any[]): any;
776
+ options?: ServerConfig;
777
+ };
778
+
779
+ /**
780
+ * You can pass an AbortSignal as the first argument of a `server$` function and it will use it to
781
+ * abort the fetch when fired.
782
+ *
783
+ * @public
784
+ */
785
+ export declare type ServerQRL<T extends ServerFunction> = QRL<((abort: AbortSignal, ...args: Parameters<T>) => ReturnType<T>) | ((...args: Parameters<T>) => ReturnType<T>)>;
786
+
787
+ /* Excluded from this release type: serverQrl */
788
+
789
+ /**
790
+ * Loads the service workers that are defined in the routes. Any file named `service-worker.*` (all
791
+ * JS extensions are allowed) will be picked up, bundled into a separate file, and registered as a
792
+ * service worker.
793
+ *
794
+ * Qwik 1.14.0 and above now use `<link rel="modulepreload">` by default. If you didn't add custom
795
+ * service-worker logic, you should remove your service-worker.ts file(s) for the
796
+ * `ServiceWorkerRegister` Component to actually unregister the service-worker.js and delete its
797
+ * related cache. Make sure to keep the `ServiceWorkerRegister` Component in your app (without any
798
+ * service-worker.ts file) as long as you want to unregister the service-worker.js for your users.
799
+ *
800
+ * @public
801
+ */
802
+ export declare const ServiceWorkerRegister: (props: {
803
+ nonce?: string;
804
+ }) => JSXOutput;
805
+
806
+ /**
807
+ * A signal is a reactive value which can be read and written. When the signal is written, all tasks
808
+ * which are tracking the signal will be re-run and all components that read the signal will be
809
+ * re-rendered.
810
+ *
811
+ * Furthermore, when a signal value is passed as a prop to a component, the optimizer will
812
+ * automatically forward the signal. This means that `return <div title={signal.value}>hi</div>`
813
+ * will update the `title` attribute when the signal changes without having to re-render the
814
+ * component.
815
+ *
816
+ * @public
817
+ */
818
+ declare interface Signal<T = any> extends ReadonlySignal_2<T> {
819
+ value: T;
820
+ }
821
+
822
+ /** @public */
823
+ export declare interface StaticGenerate {
824
+ params?: PathParams[];
825
+ }
826
+
827
+ /** @public */
828
+ export declare type StaticGenerateHandler = ({ env, }: {
829
+ env: EnvGetter;
830
+ }) => Promise<StaticGenerate> | StaticGenerate;
831
+
832
+ /** @public */
833
+ export declare type StrictUnion<T> = Prettify<StrictUnionHelper<T, T>>;
834
+
835
+ declare type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
836
+
837
+ /** @public */
838
+ export declare type TypedDataValidator = ValibotDataValidator | ZodDataValidator;
839
+
840
+ declare type UnionKeys<T> = T extends T ? keyof T : never;
841
+
842
+ /**
843
+ * @beta
844
+ * @experimental
845
+ */
846
+ export declare const untypedAppUrl: (route: string, params?: Record<string, string>, paramsPrefix?: string) => string;
847
+
848
+ /** @public */
849
+ export declare const useContent: () => ContentState;
850
+
851
+ /**
852
+ * Returns the document head for the current page. The generic type describes the front matter.
853
+ *
854
+ * @public
855
+ */
856
+ export declare const useDocumentHead: <FrontMatter extends Record<string, unknown> = Record<string, any>>() => Required<ResolvedDocumentHead<FrontMatter>>;
857
+
858
+ /** @public */
859
+ export declare const useLocation: () => RouteLocation;
860
+
861
+ /** @public */
862
+ export declare const useNavigate: () => RouteNavigate;
863
+
864
+ /**
865
+ * Prevent navigation attempts. This hook registers a callback that will be called before SPA or
866
+ * browser navigation.
867
+ *
868
+ * Return `true` to prevent navigation.
869
+ *
870
+ * #### SPA Navigation
871
+ *
872
+ * For Single-Page-App (SPA) navigation (via `<Link />`, `const nav = useNavigate()`, and browser
873
+ * backwards/forwards inside SPA history), the callback will be provided with the target, either a
874
+ * URL or a number. It will only be a number if `nav(number)` was called to navigate forwards or
875
+ * backwards in SPA history.
876
+ *
877
+ * If you return a Promise, the navigation will be blocked until the promise resolves.
878
+ *
879
+ * This can be used to show a nice dialog to the user, and wait for the user to confirm, or to
880
+ * record the url, prevent the navigation, and navigate there later via `nav(url)`.
881
+ *
882
+ * #### Browser Navigation
883
+ *
884
+ * However, when the user navigates away by clicking on a regular `<a />`, reloading, or moving
885
+ * backwards/forwards outside SPA history, this callback will not be awaited. This is because the
886
+ * browser does not provide a way to asynchronously prevent these navigations.
887
+ *
888
+ * In this case, returning returning `true` will tell the browser to show a confirmation dialog,
889
+ * which cannot be customized. You are also not able to show your own `window.confirm()` dialog
890
+ * during the callback, the browser won't allow it. If you return a Promise, it will be considered
891
+ * as `true`.
892
+ *
893
+ * When the callback is called from the browser, no url will be provided. Use this to know whether
894
+ * you can show a dialog or just return `true` to prevent the navigation.
895
+ *
896
+ * @public
897
+ */
898
+ export declare const usePreventNavigate$: (qrl: PreventNavigateCallback) => void;
899
+
900
+ /* Excluded from this release type: usePreventNavigateQrl */
901
+
902
+ /**
903
+ * @public
904
+ * This hook initializes Qwik Router, providing the necessary context for it to work.
905
+ *
906
+ * This hook should be used once, at the root of your application.
907
+ */
908
+ export declare const useQwikRouter: (props?: QwikRouterProps) => void;
909
+
910
+ /** @beta */
911
+ export declare const valibot$: ValibotConstructor;
912
+
913
+ /** @beta */
914
+ declare type ValibotConstructor = {
915
+ <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: T): ValibotDataValidator<T>;
916
+ <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: (ev: RequestEvent) => T): ValibotDataValidator<T>;
917
+ };
918
+
919
+ /** @beta */
920
+ declare type ValibotConstructorQRL = {
921
+ <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: QRL<T>): ValibotDataValidator<T>;
922
+ <T extends v.GenericSchema | v.GenericSchemaAsync>(schema: QRL<(ev: RequestEvent) => T>): ValibotDataValidator<T>;
923
+ };
924
+
925
+ /** @beta */
926
+ declare type ValibotDataValidator<T extends v.GenericSchema | v.GenericSchemaAsync = v.GenericSchema | v.GenericSchemaAsync> = {
927
+ readonly __brand: 'valibot';
928
+ validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<ValidatorErrorType<v.InferInput<T>>>>;
929
+ };
930
+
931
+ /* Excluded from this release type: valibotQrl */
932
+
933
+ /** @public */
934
+ export declare const validator$: ValidatorConstructor;
935
+
936
+ declare type ValidatorConstructor = {
937
+ <T extends ValidatorReturn>(validator: (ev: RequestEvent, data: unknown) => ValueOrPromise<T>): T extends ValidatorReturnFail<infer ERROR> ? DataValidator<ERROR> : DataValidator<never>;
938
+ };
939
+
940
+ declare type ValidatorConstructorQRL = {
941
+ <T extends ValidatorReturn>(validator: QRL<(ev: RequestEvent, data: unknown) => ValueOrPromise<T>>): T extends ValidatorReturnFail<infer ERROR> ? DataValidator<ERROR> : DataValidator<never>;
942
+ };
943
+
944
+ /** @public */
945
+ export declare type ValidatorErrorKeyDotNotation<T, Prefix extends string = ''> = IsAny<T> extends true ? never : T extends object ? {
946
+ [K in keyof T & string]: IsAny<T[K]> extends true ? never : T[K] extends (infer U)[] ? IsAny<U> extends true ? never : U extends object ? `${Prefix}${K}[]` | ValidatorErrorKeyDotNotation<U, `${Prefix}${K}[].`> : `${Prefix}${K}[]` : T[K] extends object ? ValidatorErrorKeyDotNotation<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
947
+ }[keyof T & string] : never;
948
+
949
+ /** @public */
950
+ export declare type ValidatorErrorType<T, U = string> = {
951
+ formErrors: U[];
952
+ fieldErrors: Partial<{
953
+ [K in ValidatorErrorKeyDotNotation<T>]: K extends `${infer _Prefix}[]${infer _Suffix}` ? U[] : U;
954
+ }>;
955
+ };
956
+
957
+ /* Excluded from this release type: validatorQrl */
958
+
959
+ /** @public */
960
+ export declare type ValidatorReturn<T extends Record<string, any> = {}> = ValidatorReturnSuccess | ValidatorReturnFail<T>;
961
+
962
+ declare type ValidatorReturnFail<T extends Record<string, any> = {}> = {
963
+ readonly success: false;
964
+ readonly error: T;
965
+ readonly status?: number;
966
+ };
967
+
968
+ declare type ValidatorReturnSuccess = {
969
+ readonly success: true;
970
+ readonly data?: unknown;
971
+ };
972
+
973
+ export { z }
974
+
975
+ /** @public */
976
+ export declare const zod$: ZodConstructor;
977
+
978
+ /** @public */
979
+ export declare type ZodConstructor = {
980
+ <T extends z_2.ZodRawShape>(schema: T): ZodDataValidator<z_2.ZodObject<T>>;
981
+ <T extends z_2.ZodRawShape>(schema: (zod: typeof z_2.z, ev: RequestEvent) => T): ZodDataValidator<z_2.ZodObject<T>>;
982
+ <T extends z_2.Schema>(schema: T): ZodDataValidator<T>;
983
+ <T extends z_2.Schema>(schema: (zod: typeof z_2.z, ev: RequestEvent) => T): ZodDataValidator<T>;
984
+ };
985
+
986
+ /** @public */
987
+ declare type ZodConstructorQRL = {
988
+ <T extends z_2.ZodRawShape>(schema: QRL<T>): ZodDataValidator<z_2.ZodObject<T>>;
989
+ <T extends z_2.ZodRawShape>(schema: QRL<(zod: typeof z_2.z, ev: RequestEvent) => T>): ZodDataValidator<z_2.ZodObject<T>>;
990
+ <T extends z_2.Schema>(schema: QRL<T>): ZodDataValidator<T>;
991
+ <T extends z_2.Schema>(schema: QRL<(zod: typeof z_2.z, ev: RequestEvent) => T>): ZodDataValidator<T>;
992
+ };
993
+
994
+ /** @public */
995
+ declare type ZodDataValidator<T extends z_2.ZodType = z_2.ZodType> = {
996
+ readonly __brand: 'zod';
997
+ validate(ev: RequestEvent, data: unknown): Promise<ValidatorReturn<ValidatorErrorType<z_2.input<T>>>>;
998
+ };
999
+
1000
+ /* Excluded from this release type: zodQrl */
1001
+
1002
+ export { }