svelte-effect-runtime 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dist/chunks/client-BrZka6DW.js +530 -0
- package/.dist/chunks/client-BrZka6DW.js.map +1 -0
- package/.dist/chunks/compiler-COVzgLYo.js +412 -0
- package/.dist/chunks/compiler-COVzgLYo.js.map +1 -0
- package/.dist/chunks/descriptors-B4otDlm1.js +216 -0
- package/.dist/chunks/descriptors-B4otDlm1.js.map +1 -0
- package/.dist/chunks/diagnostics-BDrky-Di.js +359 -0
- package/.dist/chunks/diagnostics-BDrky-Di.js.map +1 -0
- package/.dist/chunks/dispatcher-BA0PLQhA.js +16 -0
- package/.dist/chunks/dispatcher-BA0PLQhA.js.map +1 -0
- package/.dist/chunks/{dispatcher-DOx8iC6r.js → dispatcher-_x0MQZBS.js} +84 -258
- package/.dist/chunks/dispatcher-_x0MQZBS.js.map +1 -0
- package/.dist/chunks/{errors-IJjsUwrE.js → errors-CLsbGjIa.js} +39 -44
- package/.dist/chunks/errors-CLsbGjIa.js.map +1 -0
- package/.dist/chunks/live-BundLSoY.js +146 -0
- package/.dist/chunks/live-BundLSoY.js.map +1 -0
- package/.dist/chunks/live-CHK0RrZu.js +10 -0
- package/.dist/chunks/live-CHK0RrZu.js.map +1 -0
- package/.dist/chunks/{remote-client-CVI4t66c.js → remote-client-mkQAfP1G.js} +29 -23
- package/.dist/chunks/remote-client-mkQAfP1G.js.map +1 -0
- package/.dist/chunks/{runtime-GBQz32DZ.js → runtime-HDTlEnzp.js} +3 -27
- package/.dist/chunks/runtime-HDTlEnzp.js.map +1 -0
- package/.dist/chunks/{server-D1LcDnZE.js → server-BNrA1I-u.js} +15 -84
- package/.dist/chunks/server-BNrA1I-u.js.map +1 -0
- package/.dist/chunks/source-scan-9pZxnfct.js +1059 -0
- package/.dist/chunks/source-scan-9pZxnfct.js.map +1 -0
- package/.dist/chunks/{transform-jNUr65K9.js → transform-BXyYUAez.js} +184 -358
- package/.dist/chunks/transform-BXyYUAez.js.map +1 -0
- package/.dist/compiler/markup-identifiers.d.ts +2 -0
- package/.dist/compiler/remote-client.d.ts +1 -19
- package/.dist/compiler/source-scan.d.ts +11 -108
- package/.dist/compiler/sveltekit-remote-bridge.d.ts +3 -0
- package/.dist/compiler.d.ts +6 -0
- package/.dist/compiler.js +1 -1
- package/.dist/detect.d.ts +0 -31
- package/.dist/detect.js +0 -39
- package/.dist/detect.js.map +1 -1
- package/.dist/diagnostics.d.ts +0 -16
- package/.dist/dispatcher/deps.d.ts +3 -14
- package/.dist/dispatcher/fibers.d.ts +5 -46
- package/.dist/dispatcher/index.d.ts +1 -143
- package/.dist/dispatcher/types.d.ts +0 -151
- package/.dist/dispatcher.js +1 -1
- package/.dist/errors.d.ts +30 -42
- package/.dist/generated/dispatcher.d.ts +0 -50
- package/.dist/generators.d.ts +1 -12
- package/.dist/internal/descriptors.d.ts +0 -16
- package/.dist/internal/generators.js +13 -8
- package/.dist/internal/generators.js.map +1 -1
- package/.dist/internal/live.d.ts +9 -0
- package/.dist/internal/remote-client.js +2 -2
- package/.dist/internal/remote-server.js +2 -2
- package/.dist/internal/schema.d.ts +0 -54
- package/.dist/live.d.ts +9 -26
- package/.dist/markup/event-attributes.d.ts +0 -32
- package/.dist/markup/promise.d.ts +1 -23
- package/.dist/markup/promise.js +2 -18
- package/.dist/markup/promise.js.map +1 -1
- package/.dist/markup/run.d.ts +1 -10
- package/.dist/markup/run.js +2 -11
- package/.dist/markup/run.js.map +1 -1
- package/.dist/markup/transform/apply.d.ts +4 -4
- package/.dist/markup/transform/classify.d.ts +2 -11
- package/.dist/markup/transform/constants.d.ts +1 -1
- package/.dist/markup/transform/effect-bindings.d.ts +2 -26
- package/.dist/markup/transform/effect-callbacks.d.ts +0 -20
- package/.dist/markup/transform/emit.d.ts +2 -11
- package/.dist/markup/transform/expressions.d.ts +0 -35
- package/.dist/markup/transform/scan.d.ts +3 -22
- package/.dist/markup/transform/types.d.ts +1 -129
- package/.dist/markup/transform.js +1 -1
- package/.dist/markup/value.d.ts +1 -18
- package/.dist/markup/value.js +2 -19
- package/.dist/markup/value.js.map +1 -1
- package/.dist/mod.d.ts +3 -8
- package/.dist/mod.js +5 -5
- package/.dist/mod.js.map +1 -1
- package/.dist/remote/cause-codec.d.ts +3 -37
- package/.dist/remote/client/command.d.ts +3 -17
- package/.dist/remote/client/form-data.d.ts +0 -7
- package/.dist/remote/client/form-enhance.d.ts +0 -7
- package/.dist/remote/client/form-transport.d.ts +14 -20
- package/.dist/remote/client/form.d.ts +4 -24
- package/.dist/remote/client/index.d.ts +2 -1
- package/.dist/remote/client/prerender.d.ts +6 -0
- package/.dist/remote/client/query-result.d.ts +2 -14
- package/.dist/remote/client/query.d.ts +8 -48
- package/.dist/remote/client/responses.d.ts +3 -27
- package/.dist/remote/client/types.d.ts +16 -110
- package/.dist/remote/client/utils.d.ts +0 -8
- package/.dist/remote/client.d.ts +2 -2
- package/.dist/remote/client.js +2 -2
- package/.dist/remote/effect.d.ts +6 -0
- package/.dist/remote/failures.d.ts +4 -0
- package/.dist/remote/query-update.d.ts +2 -0
- package/.dist/remote/resource.d.ts +25 -0
- package/.dist/remote/server.d.ts +5 -50
- package/.dist/remote/server.js +2 -2
- package/.dist/remote/shared.d.ts +6 -145
- package/.dist/remote/shared.js +6 -127
- package/.dist/remote/shared.js.map +1 -1
- package/.dist/runtime/transform.js +5 -22
- package/.dist/runtime/transform.js.map +1 -1
- package/.dist/script-transform/ast.d.ts +0 -46
- package/.dist/script-transform/imports.d.ts +0 -38
- package/.dist/script-transform/lower.d.ts +0 -9
- package/.dist/script-transform/runes.d.ts +0 -10
- package/.dist/script-transform/runtime-block.d.ts +0 -17
- package/.dist/script-transform/source.d.ts +0 -24
- package/.dist/script-transform/types.d.ts +1 -126
- package/.dist/server/effects.d.ts +4 -53
- package/.dist/server/factories.d.ts +7 -7
- package/.dist/server/index.d.ts +1 -1
- package/.dist/server/invalid.d.ts +0 -7
- package/.dist/server/live-snapshot.d.ts +5 -0
- package/.dist/server/remote-handler-context.d.ts +5 -0
- package/.dist/server/runtime.d.ts +6 -24
- package/.dist/server/schema.d.ts +0 -14
- package/.dist/server/transport.d.ts +2 -0
- package/.dist/server/types.d.ts +49 -26
- package/.dist/server/wrappers.d.ts +3 -40
- package/.dist/server.d.ts +1 -1
- package/.dist/server.js +200 -215
- package/.dist/server.js.map +1 -1
- package/.dist/yieldable.d.ts +1 -35
- package/package.json +2 -2
- package/.dist/chunks/client-DcZUV4rR.js +0 -653
- package/.dist/chunks/client-DcZUV4rR.js.map +0 -1
- package/.dist/chunks/compiler-BBPNyXmQ.js +0 -460
- package/.dist/chunks/compiler-BBPNyXmQ.js.map +0 -1
- package/.dist/chunks/dispatcher-DOx8iC6r.js.map +0 -1
- package/.dist/chunks/dispatcher-H-Ia0Os4.js +0 -47
- package/.dist/chunks/dispatcher-H-Ia0Os4.js.map +0 -1
- package/.dist/chunks/errors-IJjsUwrE.js.map +0 -1
- package/.dist/chunks/live-BXAKre_4.js +0 -104
- package/.dist/chunks/live-BXAKre_4.js.map +0 -1
- package/.dist/chunks/remote-client-CVI4t66c.js.map +0 -1
- package/.dist/chunks/runtime-GBQz32DZ.js.map +0 -1
- package/.dist/chunks/schema-D9pct6Y5.js +0 -89
- package/.dist/chunks/schema-D9pct6Y5.js.map +0 -1
- package/.dist/chunks/server-D1LcDnZE.js.map +0 -1
- package/.dist/chunks/source-scan-C4PsggID.js +0 -341
- package/.dist/chunks/source-scan-C4PsggID.js.map +0 -1
- package/.dist/chunks/transform-jNUr65K9.js.map +0 -1
- package/.dist/remote/client/effect.d.ts +0 -29
- package/.dist/remote/client/failures.d.ts +0 -42
package/.dist/errors.d.ts
CHANGED
|
@@ -11,24 +11,10 @@
|
|
|
11
11
|
* @since 2.4.0
|
|
12
12
|
* @param message - Technical diagnostic message describing the failed runtime
|
|
13
13
|
* invariant.
|
|
14
|
-
* @returns A runtime-authored Error instance.
|
|
15
14
|
*/
|
|
16
15
|
export declare class RuntimeError extends Error {
|
|
17
16
|
constructor(message: string);
|
|
18
17
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Formats a runtime-owned error message with a stable screaming-case code.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* throw new Error(make_error_message("DISPATCHER_DISPOSED", "Dispatcher has been disposed"));
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @since 2.0.0
|
|
28
|
-
* @param code - Stable screaming-case identifier for the error category.
|
|
29
|
-
* @param message - Human-readable error message without the leading code.
|
|
30
|
-
* @returns The complete error message prefixed with the stable code.
|
|
31
|
-
*/
|
|
32
18
|
export declare function make_error_message(code: string, message: string): string;
|
|
33
19
|
/**
|
|
34
20
|
* Base error class for all preprocessor errors emitted during script and
|
|
@@ -43,7 +29,6 @@ export declare function make_error_message(code: string, message: string): strin
|
|
|
43
29
|
* @since 2.0.0
|
|
44
30
|
* @param message - Technical diagnostic message for the transform failure.
|
|
45
31
|
* @param filename - Source filename that triggered the transform failure.
|
|
46
|
-
* @returns A preprocessor Error instance with source file context.
|
|
47
32
|
*/
|
|
48
33
|
export declare class PreprocessError extends RuntimeError {
|
|
49
34
|
/**
|
|
@@ -67,7 +52,6 @@ export declare class PreprocessError extends RuntimeError {
|
|
|
67
52
|
* @param filename - Source filename containing the unsupported statement.
|
|
68
53
|
* @param statement_text - Full source text for the statement containing
|
|
69
54
|
* mixed async work.
|
|
70
|
-
* @returns A preprocessor Error instance with statement context.
|
|
71
55
|
*/
|
|
72
56
|
export declare class AwaitInEffectWorkError extends PreprocessError {
|
|
73
57
|
/**
|
|
@@ -92,7 +76,6 @@ export declare class AwaitInEffectWorkError extends PreprocessError {
|
|
|
92
76
|
* Effect work.
|
|
93
77
|
* @param expression_text - Full source text for the rune expression.
|
|
94
78
|
* @param filename - Source filename containing the unsupported rune.
|
|
95
|
-
* @returns A preprocessor Error instance with rune source context.
|
|
96
79
|
*/
|
|
97
80
|
export declare class AsyncEffectInSyncRuneError extends PreprocessError {
|
|
98
81
|
/**
|
|
@@ -125,7 +108,6 @@ export declare class AsyncEffectInSyncRuneError extends PreprocessError {
|
|
|
125
108
|
* @param filename - Source filename containing the invalid event handler.
|
|
126
109
|
* @param expression_text - Event handler expression that contains the nested
|
|
127
110
|
* unsupported async Effect work.
|
|
128
|
-
* @returns A preprocessor Error instance with event expression context.
|
|
129
111
|
*/
|
|
130
112
|
export declare class AsyncEffectInEventCallbackError extends PreprocessError {
|
|
131
113
|
/**
|
|
@@ -151,7 +133,6 @@ export declare class AsyncEffectInEventCallbackError extends PreprocessError {
|
|
|
151
133
|
* invalid event handler callback was found.
|
|
152
134
|
* @param expression_text - Original event handler callback text that contained
|
|
153
135
|
* `yield*` and should be rewritten as a direct event Effect expression.
|
|
154
|
-
* @returns A preprocessor Error instance with event callback context.
|
|
155
136
|
*/
|
|
156
137
|
export declare class YieldStarInEventCallbackError extends PreprocessError {
|
|
157
138
|
/**
|
|
@@ -177,7 +158,6 @@ export declare class YieldStarInEventCallbackError extends PreprocessError {
|
|
|
177
158
|
* @since 2.4.2
|
|
178
159
|
* @param filename - Source filename containing the unsupported markup.
|
|
179
160
|
* @param expression_text - The unsupported markup expression text.
|
|
180
|
-
* @returns A preprocessor Error instance with markup source context.
|
|
181
161
|
*/
|
|
182
162
|
export declare class UnsupportedMarkupEffectPositionError extends PreprocessError {
|
|
183
163
|
/**
|
|
@@ -198,7 +178,6 @@ export declare class UnsupportedMarkupEffectPositionError extends PreprocessErro
|
|
|
198
178
|
* ```
|
|
199
179
|
*
|
|
200
180
|
* @since 2.4.0
|
|
201
|
-
* @returns An Error describing missing request context.
|
|
202
181
|
*/
|
|
203
182
|
export declare class RequestEventUnavailableError extends RuntimeError {
|
|
204
183
|
constructor();
|
|
@@ -212,7 +191,6 @@ export declare class RequestEventUnavailableError extends RuntimeError {
|
|
|
212
191
|
* ```
|
|
213
192
|
*
|
|
214
193
|
* @since 2.4.0
|
|
215
|
-
* @returns An Error describing the invalid Query overload usage.
|
|
216
194
|
*/
|
|
217
195
|
export declare class UncheckedQueryHandlerMissingError extends RuntimeError {
|
|
218
196
|
constructor();
|
|
@@ -226,7 +204,6 @@ export declare class UncheckedQueryHandlerMissingError extends RuntimeError {
|
|
|
226
204
|
* ```
|
|
227
205
|
*
|
|
228
206
|
* @since 2.4.0
|
|
229
|
-
* @returns An Error describing the invalid batch Query overload usage.
|
|
230
207
|
*/
|
|
231
208
|
export declare class BatchQueryHandlerMissingError extends RuntimeError {
|
|
232
209
|
constructor();
|
|
@@ -240,7 +217,6 @@ export declare class BatchQueryHandlerMissingError extends RuntimeError {
|
|
|
240
217
|
* ```
|
|
241
218
|
*
|
|
242
219
|
* @since 2.4.0
|
|
243
|
-
* @returns An Error describing the invalid live Query overload usage.
|
|
244
220
|
*/
|
|
245
221
|
export declare class UncheckedLiveQueryHandlerMissingError extends RuntimeError {
|
|
246
222
|
constructor();
|
|
@@ -254,7 +230,6 @@ export declare class UncheckedLiveQueryHandlerMissingError extends RuntimeError
|
|
|
254
230
|
* ```
|
|
255
231
|
*
|
|
256
232
|
* @since 2.4.0
|
|
257
|
-
* @returns An Error describing the invalid Command overload usage.
|
|
258
233
|
*/
|
|
259
234
|
export declare class UncheckedCommandHandlerMissingError extends RuntimeError {
|
|
260
235
|
constructor();
|
|
@@ -268,7 +243,6 @@ export declare class UncheckedCommandHandlerMissingError extends RuntimeError {
|
|
|
268
243
|
* ```
|
|
269
244
|
*
|
|
270
245
|
* @since 2.4.0
|
|
271
|
-
* @returns An Error describing the invalid Form overload usage.
|
|
272
246
|
*/
|
|
273
247
|
export declare class UncheckedFormHandlerMissingError extends RuntimeError {
|
|
274
248
|
constructor();
|
|
@@ -282,7 +256,6 @@ export declare class UncheckedFormHandlerMissingError extends RuntimeError {
|
|
|
282
256
|
* ```
|
|
283
257
|
*
|
|
284
258
|
* @since 2.4.0
|
|
285
|
-
* @returns An Error describing the invalid Prerender overload usage.
|
|
286
259
|
*/
|
|
287
260
|
export declare class UncheckedPrerenderHandlerMissingError extends RuntimeError {
|
|
288
261
|
constructor();
|
|
@@ -296,7 +269,6 @@ export declare class UncheckedPrerenderHandlerMissingError extends RuntimeError
|
|
|
296
269
|
* ```
|
|
297
270
|
*
|
|
298
271
|
* @since 2.4.0
|
|
299
|
-
* @returns An Error describing the expected live query return protocol.
|
|
300
272
|
*/
|
|
301
273
|
export declare class InvalidLiveQueryReturnError extends RuntimeError {
|
|
302
274
|
constructor();
|
|
@@ -311,11 +283,32 @@ export declare class InvalidLiveQueryReturnError extends RuntimeError {
|
|
|
311
283
|
* ```
|
|
312
284
|
*
|
|
313
285
|
* @since 3.4.8
|
|
314
|
-
* @returns An Error describing an empty Stream in a value position.
|
|
315
286
|
*/
|
|
316
287
|
export declare class EmptyStreamYieldError extends RuntimeError {
|
|
317
288
|
constructor();
|
|
318
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* Thrown when generated component code receives a value that cannot be yielded
|
|
292
|
+
* through the SER runtime.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```ts
|
|
296
|
+
* throw new InvalidYieldableError(null);
|
|
297
|
+
* ```
|
|
298
|
+
*
|
|
299
|
+
* @since 4.0.0
|
|
300
|
+
* @param value - Runtime value that was expected to be an Effect, generator, or
|
|
301
|
+
* Stream.
|
|
302
|
+
*/
|
|
303
|
+
export declare class InvalidYieldableError extends RuntimeError {
|
|
304
|
+
/**
|
|
305
|
+
* Runtime value rejected by the generated yield boundary.
|
|
306
|
+
*
|
|
307
|
+
* @since 4.0.0
|
|
308
|
+
*/
|
|
309
|
+
readonly value: unknown;
|
|
310
|
+
constructor(value: unknown);
|
|
311
|
+
}
|
|
319
312
|
/**
|
|
320
313
|
* Thrown when a dispatcher operation is requested after disposal.
|
|
321
314
|
*
|
|
@@ -325,7 +318,6 @@ export declare class EmptyStreamYieldError extends RuntimeError {
|
|
|
325
318
|
* ```
|
|
326
319
|
*
|
|
327
320
|
* @since 2.4.0
|
|
328
|
-
* @returns An Error describing an invalid dispatcher lifecycle transition.
|
|
329
321
|
*/
|
|
330
322
|
export declare class DispatcherDisposedError extends RuntimeError {
|
|
331
323
|
constructor();
|
|
@@ -341,7 +333,6 @@ export declare class DispatcherDisposedError extends RuntimeError {
|
|
|
341
333
|
*
|
|
342
334
|
* @since 3.4.0
|
|
343
335
|
* @param runtime_name - Public runtime API that was initialized more than once.
|
|
344
|
-
* @returns An Error describing the invalid runtime lifecycle transition.
|
|
345
336
|
*/
|
|
346
337
|
export declare class RuntimeAlreadyInitializedError extends RuntimeError {
|
|
347
338
|
constructor(runtime_name: string);
|
|
@@ -355,11 +346,18 @@ export declare class RuntimeAlreadyInitializedError extends RuntimeError {
|
|
|
355
346
|
* ```
|
|
356
347
|
*
|
|
357
348
|
* @since 2.4.0
|
|
358
|
-
* @returns An Error describing an invalid query adapter input.
|
|
359
349
|
*/
|
|
360
350
|
export declare class InvalidQueryFactoryError extends RuntimeError {
|
|
361
351
|
constructor();
|
|
362
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Thrown when a generated or native remote prerender export is not callable.
|
|
355
|
+
*
|
|
356
|
+
* @since 4.0.0
|
|
357
|
+
*/
|
|
358
|
+
export declare class InvalidPrerenderFactoryError extends RuntimeError {
|
|
359
|
+
constructor();
|
|
360
|
+
}
|
|
363
361
|
/**
|
|
364
362
|
* Thrown when a generated or native remote live query export is not callable.
|
|
365
363
|
*
|
|
@@ -369,7 +367,6 @@ export declare class InvalidQueryFactoryError extends RuntimeError {
|
|
|
369
367
|
* ```
|
|
370
368
|
*
|
|
371
369
|
* @since 2.4.0
|
|
372
|
-
* @returns An Error describing an invalid live query adapter input.
|
|
373
370
|
*/
|
|
374
371
|
export declare class InvalidLiveQueryFactoryError extends RuntimeError {
|
|
375
372
|
constructor();
|
|
@@ -383,7 +380,6 @@ export declare class InvalidLiveQueryFactoryError extends RuntimeError {
|
|
|
383
380
|
* ```
|
|
384
381
|
*
|
|
385
382
|
* @since 2.4.0
|
|
386
|
-
* @returns An Error describing an invalid command adapter input.
|
|
387
383
|
*/
|
|
388
384
|
export declare class InvalidCommandFactoryError extends RuntimeError {
|
|
389
385
|
constructor();
|
|
@@ -397,7 +393,6 @@ export declare class InvalidCommandFactoryError extends RuntimeError {
|
|
|
397
393
|
* ```
|
|
398
394
|
*
|
|
399
395
|
* @since 2.4.0
|
|
400
|
-
* @returns An Error describing missing form transport metadata.
|
|
401
396
|
*/
|
|
402
397
|
export declare class RemoteFormEndpointMissingError extends RuntimeError {
|
|
403
398
|
constructor();
|
|
@@ -413,7 +408,6 @@ export declare class RemoteFormEndpointMissingError extends RuntimeError {
|
|
|
413
408
|
*
|
|
414
409
|
* @since 2.4.0
|
|
415
410
|
* @param envelope - Raw response envelope returned by the remote form endpoint.
|
|
416
|
-
* @returns An Error describing malformed form response data.
|
|
417
411
|
*/
|
|
418
412
|
export declare class InvalidRemoteFormResponseError extends RuntimeError {
|
|
419
413
|
/**
|
|
@@ -435,7 +429,6 @@ export declare class InvalidRemoteFormResponseError extends RuntimeError {
|
|
|
435
429
|
*
|
|
436
430
|
* @since 2.4.0
|
|
437
431
|
* @param envelope - Raw response envelope returned by the remote form endpoint.
|
|
438
|
-
* @returns An Error describing unsupported form response data.
|
|
439
432
|
*/
|
|
440
433
|
export declare class UnsupportedRemoteFormResponseError extends RuntimeError {
|
|
441
434
|
/**
|
|
@@ -456,7 +449,6 @@ export declare class UnsupportedRemoteFormResponseError extends RuntimeError {
|
|
|
456
449
|
*
|
|
457
450
|
* @since 2.4.0
|
|
458
451
|
* @param raw - Raw serialized remote failure payload that failed decoding.
|
|
459
|
-
* @returns An Error describing a malformed remote failure payload.
|
|
460
452
|
*/
|
|
461
453
|
export declare class RemoteErrorDecodeError extends RuntimeError {
|
|
462
454
|
/**
|
|
@@ -477,7 +469,6 @@ export declare class RemoteErrorDecodeError extends RuntimeError {
|
|
|
477
469
|
*
|
|
478
470
|
* @since 2.4.0
|
|
479
471
|
* @param export_name - Name of the server-only root export that was invoked.
|
|
480
|
-
* @returns An Error describing a missing server rewrite.
|
|
481
472
|
*/
|
|
482
473
|
export declare class ServerOnlyImportError extends RuntimeError {
|
|
483
474
|
/**
|
|
@@ -498,7 +489,6 @@ export declare class ServerOnlyImportError extends RuntimeError {
|
|
|
498
489
|
*
|
|
499
490
|
* @since 2.4.0
|
|
500
491
|
* @param export_name - Name of the `$app/server` export that was invoked.
|
|
501
|
-
* @returns An Error describing an unavailable SvelteKit virtual module export.
|
|
502
492
|
*/
|
|
503
493
|
export declare class SvelteKitServerExportUnavailableError extends RuntimeError {
|
|
504
494
|
/**
|
|
@@ -520,7 +510,6 @@ export declare class SvelteKitServerExportUnavailableError extends RuntimeError
|
|
|
520
510
|
*
|
|
521
511
|
* @since 2.4.0
|
|
522
512
|
* @param helper_name - SER helper name that triggered the context failure.
|
|
523
|
-
* @returns An Error describing the required `.remote.ts` placement.
|
|
524
513
|
*/
|
|
525
514
|
export declare class RemoteHelperContextError extends RuntimeError {
|
|
526
515
|
/**
|
|
@@ -541,7 +530,6 @@ export declare class RemoteHelperContextError extends RuntimeError {
|
|
|
541
530
|
*
|
|
542
531
|
* @since 2.4.0
|
|
543
532
|
* @param value - Non-Error value thrown while creating a remote helper.
|
|
544
|
-
* @returns An Error preserving the remote helper failure value.
|
|
545
533
|
*/
|
|
546
534
|
export declare class RemoteHelperError extends RuntimeError {
|
|
547
535
|
/**
|
|
@@ -1,60 +1,10 @@
|
|
|
1
1
|
import type { Dispatcher as RuntimeDispatcher, DispatcherEvent, MarkupPromiseEvent, MarkupRunEvent, MarkupValueEvent } from "../dispatcher.js";
|
|
2
2
|
export { Code } from "../dispatcher.js";
|
|
3
3
|
export type { DispatcherEvent, MarkupPromiseEvent, MarkupPromiseOptions, MarkupRunEvent, MarkupValueEvent, } from "../dispatcher.js";
|
|
4
|
-
/**
|
|
5
|
-
* Facade used by transform-generated component code to dispatch runtime
|
|
6
|
-
* events through the current client or server dispatcher.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const value = Dispatcher.emit({
|
|
11
|
-
* type: Code.Markup.Value,
|
|
12
|
-
* id: "Component.svelte:1:2",
|
|
13
|
-
* deps: [],
|
|
14
|
-
* fallback: undefined,
|
|
15
|
-
* fn: function* () {
|
|
16
|
-
* return yield* Effect.succeed(1);
|
|
17
|
-
* },
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @since 3.3.0
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
4
|
export declare class Dispatcher {
|
|
25
|
-
/**
|
|
26
|
-
* Emits a transform-generated dispatcher event.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* const promise = Dispatcher.emit({
|
|
31
|
-
* type: Code.Markup.Promise,
|
|
32
|
-
* id: "Component.svelte:1:2",
|
|
33
|
-
* deps: [],
|
|
34
|
-
* fn: function* () {
|
|
35
|
-
* return yield* Effect.succeed(1);
|
|
36
|
-
* },
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @since 3.3.0
|
|
41
|
-
* @param event - Generated event describing the dispatcher operation to run.
|
|
42
|
-
* @returns The result produced by the active dispatcher.
|
|
43
|
-
*/
|
|
44
5
|
static emit<A, F>(event: MarkupValueEvent<A, F>): A | F;
|
|
45
6
|
static emit<A>(event: MarkupPromiseEvent<A>): Promise<A>;
|
|
46
7
|
static emit<A>(event: MarkupRunEvent<A>): Promise<A>;
|
|
47
8
|
static emit<A, F>(event: DispatcherEvent<A, F>): A | F | Promise<A>;
|
|
48
9
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns the dispatcher appropriate for generated component code.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const dispatcher = get_dispatcher();
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* @since 3.0.1
|
|
58
|
-
* @returns The server dispatcher during SSR, otherwise the client dispatcher.
|
|
59
|
-
*/
|
|
60
10
|
export declare function get_dispatcher(): RuntimeDispatcher;
|
package/.dist/generators.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel module for transform-generated imports. Exports everything the
|
|
3
|
-
* transform needs to emit into generated code. Users never import this
|
|
4
|
-
* module directly.
|
|
5
|
-
*
|
|
6
|
-
* Note: `Effect` is NOT re-exported. The script transform emits
|
|
7
|
-
* `import { Effect } from "effect"` directly. `onMount` is NOT re-exported
|
|
8
|
-
* either; it comes from `"svelte"` directly.
|
|
9
|
-
*
|
|
10
|
-
* @since 2.0.0
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
1
|
+
/** Generated-code ABI for imports emitted by the Svelte transforms. */
|
|
13
2
|
export { Code, Dispatcher, get_dispatcher } from "./generated/dispatcher.js";
|
|
14
3
|
export { ToEffect } from "./yieldable.js";
|
|
15
4
|
export type { DispatcherEvent, MarkupPromiseEvent, MarkupPromiseOptions, MarkupRunEvent, MarkupValueEvent, } from "./generated/dispatcher.js";
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copies own property descriptors from a native helper to a wrapper while
|
|
3
|
-
* skipping function metadata and any caller-specific keys.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* copy_property_descriptors(native_remote, wrapped_remote);
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* @since 2.0.0
|
|
11
|
-
* @param source - Source object or function whose descriptors should be
|
|
12
|
-
* mirrored.
|
|
13
|
-
* @param target - Wrapper object or function that receives copied descriptors.
|
|
14
|
-
* @param exclude - Additional property keys that should not be copied.
|
|
15
|
-
* @returns Nothing.
|
|
16
|
-
*/
|
|
17
1
|
export declare function copy_property_descriptors(source: unknown, target: object, exclude?: ReadonlySet<PropertyKey>): void;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { o as EmptyStreamYieldError } from "../chunks/errors-
|
|
2
|
-
import { i as Code } from "../chunks/dispatcher-
|
|
3
|
-
import {
|
|
1
|
+
import { o as EmptyStreamYieldError, p as InvalidYieldableError } from "../chunks/errors-CLsbGjIa.js";
|
|
2
|
+
import { i as Code } from "../chunks/dispatcher-_x0MQZBS.js";
|
|
3
|
+
import { t as RemoteLiveYield } from "../chunks/live-CHK0RrZu.js";
|
|
4
|
+
import { n as get_dispatcher, t as Dispatcher } from "../chunks/dispatcher-BA0PLQhA.js";
|
|
4
5
|
import { value } from "../markup/value.js";
|
|
5
6
|
import { promise } from "../markup/promise.js";
|
|
6
7
|
import { run } from "../markup/run.js";
|
|
7
8
|
import { Effect, Option, Stream } from "effect";
|
|
8
9
|
//#region src/yieldable.ts
|
|
9
10
|
function ToEffect(value) {
|
|
10
|
-
if (Stream.isStream(value))
|
|
11
|
-
|
|
12
|
-
return Effect.
|
|
13
|
-
|
|
11
|
+
if (Stream.isStream(value)) {
|
|
12
|
+
const Head = Stream.runHead(value);
|
|
13
|
+
return Effect.provideService(Head, RemoteLiveYield, true).pipe(Effect.flatMap((option) => {
|
|
14
|
+
if (Option.isSome(option)) return Effect.succeed(option.value);
|
|
15
|
+
return Effect.fail(new EmptyStreamYieldError());
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
14
18
|
if (is_generator_result(value)) return Effect.gen(() => value);
|
|
15
|
-
return value;
|
|
19
|
+
if (Effect.isEffect(value)) return value;
|
|
20
|
+
return Effect.fail(new InvalidYieldableError(value));
|
|
16
21
|
}
|
|
17
22
|
function is_generator_result(value) {
|
|
18
23
|
return typeof value === "object" && value !== null && typeof value.next === "function";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/yieldable.ts"],"sourcesContent":["import { EmptyStreamYieldError } from \"$/errors.ts\";\nimport {
|
|
1
|
+
{"version":3,"file":"generators.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/yieldable.ts"],"sourcesContent":["import { EmptyStreamYieldError, InvalidYieldableError } from \"$/errors.ts\";\nimport { RemoteLiveYield } from \"$/internal/live.ts\";\nimport { Effect, Option, Stream } from \"effect\";\n\nexport type Yieldable<A = unknown, E = unknown, R = unknown> =\n\t| Effect.Effect<A, E, R>\n\t| Effect.gen.Return<A, E, R>\n\t| Stream.Stream<A, E, R>;\n\nexport type YieldSuccess<Value> =\n\tValue extends Stream.Stream<infer A, unknown, unknown>\n\t\t? A\n\t\t: Value extends Effect.Effect<infer A, unknown, unknown>\n\t\t\t? A\n\t\t\t: Value extends Effect.gen.Return<infer A, unknown, unknown>\n\t\t\t\t? A\n\t\t\t\t: never;\n\n/** Normalizes generated Effect and generator values at the transform ABI boundary. */\nexport function ToEffect<A, E, R>(\n\tvalue: Effect.Effect<A, E, R> | Effect.gen.Return<A, E, R>,\n): Effect.Effect<A, E, R>;\nexport function ToEffect<A, E, R>(\n\tvalue: Stream.Stream<A, E, R>,\n): Effect.Effect<A, E | EmptyStreamYieldError, R>;\nexport function ToEffect<A, E, R>(\n\tvalue: Yieldable<A, E, R>,\n): Effect.Effect<A, E | EmptyStreamYieldError, R> {\n\tif (Stream.isStream(value)) {\n\t\tconst Head = Stream.runHead(value);\n\t\tconst ResolveHead = Effect.provideService(Head, RemoteLiveYield, true);\n\n\t\treturn ResolveHead.pipe(\n\t\t\tEffect.flatMap((option) => {\n\t\t\t\tif (Option.isSome(option)) {\n\t\t\t\t\treturn Effect.succeed(option.value);\n\t\t\t\t}\n\n\t\t\t\treturn Effect.fail(new EmptyStreamYieldError());\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (is_generator_result<A, E, R>(value)) {\n\t\treturn Effect.gen(() => value) as Effect.Effect<A, E, R>;\n\t}\n\n\tif (Effect.isEffect(value)) {\n\t\treturn value;\n\t}\n\n\treturn Effect.fail(new InvalidYieldableError(value));\n}\n\nfunction is_generator_result<A, E, R>(value: unknown): value is Effect.gen.Return<A, E, R> {\n\treturn (\n\t\ttypeof value === \"object\" &&\n\t\tvalue !== null &&\n\t\ttypeof (value as { next?: unknown }).next === \"function\"\n\t);\n}\n"],"mappings":";;;;;;;;;AAyBA,SAAgB,SACf,OACiD;CACjD,IAAI,OAAO,SAAS,KAAK,GAAG;EAC3B,MAAM,OAAO,OAAO,QAAQ,KAAK;EAGjC,OAFoB,OAAO,eAAe,MAAM,iBAAiB,IAEhD,CAAC,CAAC,KAClB,OAAO,SAAS,WAAW;GAC1B,IAAI,OAAO,OAAO,MAAM,GACvB,OAAO,OAAO,QAAQ,OAAO,KAAK;GAGnC,OAAO,OAAO,KAAK,IAAI,sBAAsB,CAAC;EAC/C,CAAC,CACF;CACD;CAEA,IAAI,oBAA6B,KAAK,GACrC,OAAO,OAAO,UAAU,KAAK;CAG9B,IAAI,OAAO,SAAS,KAAK,GACxB,OAAO;CAGR,OAAO,OAAO,KAAK,IAAI,sBAAsB,KAAK,CAAC;AACpD;AAEA,SAAS,oBAA6B,OAAqD;CAC1F,OACC,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS;AAEhD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from "effect";
|
|
2
|
+
/** Brands remote live streams without relying on class identity. */
|
|
3
|
+
export declare const remote_live_stream: unique symbol;
|
|
4
|
+
/** Selects the cached-first live source while generated yields resolve. */
|
|
5
|
+
export declare const RemoteLiveYield: Context.Reference<boolean>;
|
|
6
|
+
/** Internal carrier that identifies a remote live Stream. */
|
|
7
|
+
export type RemoteLiveStreamCarrier = {
|
|
8
|
+
readonly [remote_live_stream]?: true;
|
|
9
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { create_remote_command_adapter, create_remote_form_adapter, create_remote_live_query_adapter, create_remote_query_adapter };
|
|
1
|
+
import { a as create_remote_command_adapter, i as create_remote_form_adapter, n as create_remote_query_adapter, r as create_remote_prerender_adapter, t as create_remote_live_query_adapter } from "../chunks/client-BrZka6DW.js";
|
|
2
|
+
export { create_remote_command_adapter, create_remote_form_adapter, create_remote_live_query_adapter, create_remote_prerender_adapter, create_remote_query_adapter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { encode_remote_failure, normalize_remote_helper_error, run_remote_effect, throw_form_error };
|
|
1
|
+
import { a as encode_remote_failure, i as throw_remote_cause, n as run_remote_effect, r as throw_form_error, t as normalize_remote_helper_error } from "../chunks/server-BNrA1I-u.js";
|
|
2
|
+
export { encode_remote_failure, normalize_remote_helper_error, run_remote_effect, throw_form_error, throw_remote_cause };
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
/**
|
|
3
|
-
* Minimal Standard Schema shape accepted by SvelteKit remote helpers.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* const schema: StandardSchema = {
|
|
8
|
-
* "~standard": {
|
|
9
|
-
* validate: (input) => ({ value: input }),
|
|
10
|
-
* },
|
|
11
|
-
* };
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @since 2.0.0
|
|
15
|
-
*/
|
|
16
2
|
export type StandardSchema = {
|
|
17
3
|
readonly "~standard": {
|
|
18
4
|
readonly types?: {
|
|
@@ -22,46 +8,6 @@ export type StandardSchema = {
|
|
|
22
8
|
readonly validate: (input: unknown) => unknown;
|
|
23
9
|
};
|
|
24
10
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Checks whether a value implements the Standard Schema contract.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* if (is_standard_schema(value)) {
|
|
31
|
-
* value["~standard"].validate(input);
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @since 2.0.0
|
|
36
|
-
* @param value - Value to inspect.
|
|
37
|
-
* @returns Whether the value is a Standard Schema.
|
|
38
|
-
*/
|
|
39
11
|
export declare function is_standard_schema(value: unknown): value is StandardSchema;
|
|
40
|
-
/**
|
|
41
|
-
* Checks whether a value looks like an Effect Schema.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* if (is_effect_schema(value)) {
|
|
46
|
-
* Schema.toStandardSchemaV1(value);
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @since 2.0.0
|
|
51
|
-
* @param value - Value to inspect.
|
|
52
|
-
* @returns Whether the value should be converted to Standard Schema.
|
|
53
|
-
*/
|
|
54
12
|
export declare function is_effect_schema(value: unknown): value is Schema.Schema<unknown>;
|
|
55
|
-
/**
|
|
56
|
-
* Converts Effect Schema inputs to Standard Schema for SvelteKit.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const validator = normalize_validator(Schema.Struct({ title: Schema.String }));
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* @since 2.0.0
|
|
64
|
-
* @param value - Schema or handler input.
|
|
65
|
-
* @returns Original value or Standard Schema view of an Effect Schema.
|
|
66
|
-
*/
|
|
67
13
|
export declare function normalize_validator(value: unknown): unknown;
|
package/.dist/live.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { remote_live_stream } from "./internal/live.js";
|
|
2
2
|
import type { RemoteFailure } from "./remote/shared.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* @since 3.4.8
|
|
7
|
-
*/
|
|
8
|
-
export declare const REMOTE_LIVE_STREAM: unique symbol;
|
|
9
|
-
declare const LIVE_OPERATOR: unique symbol;
|
|
3
|
+
import { Effect, Stream } from "effect";
|
|
4
|
+
declare const live_operator: unique symbol;
|
|
10
5
|
type RemoteLivePipe<A, E> = {
|
|
11
6
|
(): RemoteLiveStream<A, E>;
|
|
12
7
|
(ab: LiveFactory["status"]): Stream.Stream<LiveStatus, never, never>;
|
|
@@ -32,7 +27,7 @@ type RemoteLivePipe<A, E> = {
|
|
|
32
27
|
* @since 3.4.8
|
|
33
28
|
*/
|
|
34
29
|
export type RemoteLiveStream<A, E = never> = Omit<Stream.Stream<A, RemoteFailure<E>, never>, "pipe"> & {
|
|
35
|
-
readonly [
|
|
30
|
+
readonly [remote_live_stream]: true;
|
|
36
31
|
readonly pipe: RemoteLivePipe<A, E>;
|
|
37
32
|
};
|
|
38
33
|
/**
|
|
@@ -69,7 +64,7 @@ export type LiveStatus = {
|
|
|
69
64
|
*/
|
|
70
65
|
export interface LiveFactory {
|
|
71
66
|
readonly status: {
|
|
72
|
-
readonly [
|
|
67
|
+
readonly [live_operator]: true;
|
|
73
68
|
/**
|
|
74
69
|
* Creates a stream of transport status updates for a remote live stream.
|
|
75
70
|
*
|
|
@@ -84,7 +79,7 @@ export interface LiveFactory {
|
|
|
84
79
|
<A, E>(stream: RemoteLiveStream<A, E>): Stream.Stream<LiveStatus, never, never>;
|
|
85
80
|
};
|
|
86
81
|
readonly reconnect: {
|
|
87
|
-
readonly [
|
|
82
|
+
readonly [live_operator]: true;
|
|
88
83
|
/**
|
|
89
84
|
* Reconnects the transport behind a remote live stream.
|
|
90
85
|
*
|
|
@@ -99,25 +94,13 @@ export interface LiveFactory {
|
|
|
99
94
|
<A, E>(stream: RemoteLiveStream<A, E>): Effect.Effect<void, RemoteFailure<E>, never>;
|
|
100
95
|
};
|
|
101
96
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const stream = make_remote_live_stream(resource, normalize_native_error);
|
|
108
|
-
* ```
|
|
109
|
-
*
|
|
110
|
-
* @since 3.4.8
|
|
111
|
-
* @param resource - Native SvelteKit live query resource.
|
|
112
|
-
* @param on_error - Error mapper used for stream and reconnect failures.
|
|
113
|
-
* @returns A remote live stream carrying hidden transport metadata.
|
|
114
|
-
* @internal
|
|
115
|
-
*/
|
|
116
|
-
export declare function make_remote_live_stream<A, ErrorType = never>(resource: unknown, on_error: (error: unknown) => RemoteFailure<ErrorType>): RemoteLiveStream<A, ErrorType>;
|
|
97
|
+
export declare function make_remote_live_stream<A, ErrorType = never>(resource: unknown, on_error: (error: unknown) => RemoteFailure<ErrorType>, encode_snapshot?: (value: unknown) => string): RemoteLiveStream<A, ErrorType>;
|
|
98
|
+
export declare function make_failed_remote_live_stream<A, ErrorType = never>(error: unknown, on_error: (error: unknown) => RemoteFailure<ErrorType>): RemoteLiveStream<A, ErrorType>;
|
|
117
99
|
/**
|
|
118
100
|
* Remote live transport helpers.
|
|
119
101
|
*
|
|
120
102
|
* @since 3.4.8
|
|
121
103
|
*/
|
|
122
104
|
export declare const Live: LiveFactory;
|
|
105
|
+
export declare function get_native_remote_live_resource(value: unknown): unknown | undefined;
|
|
123
106
|
export {};
|
|
@@ -1,38 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks whether a parsed Svelte attribute has the same event shape that
|
|
3
|
-
* Svelte's compiler recognizes.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* is_svelte_event_attribute({
|
|
8
|
-
* type: "Attribute",
|
|
9
|
-
* name: "onclick",
|
|
10
|
-
* value: { type: "ExpressionTag" },
|
|
11
|
-
* });
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @since 4.0.0
|
|
15
|
-
* @param attribute - Parsed Svelte attribute with its name and complete value
|
|
16
|
-
* shape.
|
|
17
|
-
* @returns Whether Svelte treats the attribute as an event attribute.
|
|
18
|
-
*/
|
|
19
1
|
export declare function is_svelte_event_attribute(attribute: {
|
|
20
2
|
type: string;
|
|
21
3
|
name?: string;
|
|
22
4
|
value?: unknown;
|
|
23
5
|
}): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Normalizes an event-like attribute name to Svelte's lowercase DOM event
|
|
26
|
-
* spelling while keeping the legacy directive prefix intact.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* normalize_event_attribute_name("onChange");
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @since 3.4.11
|
|
34
|
-
* @param name - Event-like attribute name read from Svelte source or the
|
|
35
|
-
* parsed AST.
|
|
36
|
-
* @returns Lowercase event attribute spelling for DOM-facing Svelte nodes.
|
|
37
|
-
*/
|
|
38
6
|
export declare function normalize_event_attribute_name(name: string): string;
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { Effect } from "effect";
|
|
2
|
-
/**
|
|
3
|
-
* Options for markup promise behavior during server rendering.
|
|
4
|
-
*
|
|
5
|
-
* @since 2.4.0
|
|
6
|
-
*/
|
|
7
2
|
interface MarkupPromiseOptions {
|
|
8
|
-
/** Keep the SSR promise pending so Svelte renders an await block fallback. */
|
|
9
3
|
ssr?: "pending";
|
|
10
4
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Runtime helper emitted by the markup transform for
|
|
13
|
-
* `{#await yield* expr}` blocks. Delegates to the dispatcher's
|
|
14
|
-
* promise mechanism. During SSR it can return a fallback promise without
|
|
15
|
-
* starting the dispatcher.
|
|
16
|
-
*
|
|
17
|
-
* @since 2.0.0
|
|
18
|
-
* @param id - Stable identifier generated from the expression's source
|
|
19
|
-
* position, used for cache lookups.
|
|
20
|
-
* @param deps - Array of reactive dependencies.
|
|
21
|
-
* @param factory - Generator function that yields the effect to run.
|
|
22
|
-
* @param ssr_fallback - Value to resolve during SSR when the helper is used
|
|
23
|
-
* from an awaited expression outside a Svelte await block.
|
|
24
|
-
* @param options - Optional SSR behavior for contexts such as await blocks
|
|
25
|
-
* that should render pending UI.
|
|
26
|
-
* @returns A Promise that resolves with the effect's result.
|
|
27
|
-
*/
|
|
5
|
+
/** Runs a transform-generated promise block through the active dispatcher. */
|
|
28
6
|
export declare function promise<A, E, R>(id: string, deps: readonly unknown[], factory: () => Effect.gen.Return<A, E, R>, ssr_fallback?: A, options?: MarkupPromiseOptions): Promise<A>;
|
|
29
7
|
export {};
|