@solidjs/web 2.0.0-rc.21 → 2.0.0-rc.22

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.
@@ -200,8 +200,9 @@ export declare function hasFlightMetadata(response: Response): boolean;
200
200
  * value. Pending entries in the slices (values the collector folded while
201
201
  * still in flight, streamed after the response head) are settled before
202
202
  * any consumer runs. A consumer whose source was not folded is skipped —
203
- * unless the response carries integration metadata, in which case it runs
204
- * with `data` `undefined` to apply the metadata. Consumers are looked up
203
+ * unless the response carries integration metadata, or the server folded
204
+ * nothing at all (a plain mutation, #4883), in which case it runs with
205
+ * `data` `undefined` to apply the metadata or its default. Consumers are looked up
205
206
  * per delivery: an awaited consumer may unsubscribe another (a provider
206
207
  * tearing down under a navigation).
207
208
  *
package/types/server.d.ts CHANGED
@@ -284,10 +284,10 @@ export declare function renderToStream<T>(fn: () => T, options?: {
284
284
  * (see `ServerErrorHook`): every failure the render handles — an
285
285
  * `<Errored>` fallback (`handling: "fallback"`), a rejected fragment
286
286
  * (`"client"`), a hydration value that would not serialize
287
- * (`"serialize"`: an async value that fails before the first flush
288
- * also fails the render, with no `onCompleteAll`; after it, its key
289
- * rejects on the client — #4647) — and the one that fails the request
290
- * (`"failed"`),
287
+ * (`"serialize"`: a default serializer failure before the first flush
288
+ * also fails the render, with no `onCompleteAll` (#4709); after it,
289
+ * published values reject on the client (#4647)), and the one that fails
290
+ * the request (`"failed"`),
291
291
  * once per error per kind per request (per render outside one), with
292
292
  * where it was met. A one-argument listener still
293
293
  * works; it hears them all — filter on `context.handling` for the
@@ -419,6 +419,38 @@ export declare function createLiveHoles(sink: any, scoped: any, settled: any, er
419
419
  /** The shared id counter — `ssr()` mints an attr address at injection
420
420
  * time, before its capture completes. */
421
421
  mint(): number;
422
+ /**
423
+ * Open an attr capture for the tag whose open ends at `off` in `text`
424
+ * (`ssr()`'s tag-open segment): mint its address and splice
425
+ * ` data-lha="N"` in, or — a boundary resume re-rendering a tag whose
426
+ * capture went pending (see `retry`), where the address is already on
427
+ * the element — take that address over, so the pending capture never
428
+ * registers. Returns the capture, its segment's new text on `text`.
429
+ */
430
+ open(text: any, off: any, hole: any): {
431
+ id: any;
432
+ parts: any[];
433
+ base: any;
434
+ inject: any;
435
+ waiting: number;
436
+ text: any;
437
+ };
438
+ /**
439
+ * An in-tag hole that escalated (its value is still pending) resolves later
440
+ * as a retry fn, one of two ways. A boundary resume re-renders the open tag
441
+ * through `ssr(pending.t, ...pending.h)`, which captures it again. At the
442
+ * top of a render there is no boundary: the tree resolver pulls the retry
443
+ * as a function node, which it otherwise treats as content and routes
444
+ * through the live-hole engine, so its markers would land inside the tag
445
+ * (`<div<!--lh:N--> style="…"<!--lh:/N-->>`) or inside the attribute value.
446
+ * The retry is tagged (`$lhInTag`, carried through re-wraps) so the engine
447
+ * never marks it. When the tag was being captured, the capture stays open
448
+ * as pending (`$lhAttr`): its address stays on the element, and the engine
449
+ * registers its binding once the tag's last retry resolves, with the text
450
+ * at that moment as the baseline. A boundary resume adopts the address
451
+ * instead (see `open`), so the element carries one.
452
+ */
453
+ retry(fn: any, cap: any): void;
422
454
  /** Whether interception may arm at the current evaluation point —
423
455
  * `ssr()` asks before opening an attr capture (the `data-lha`
424
456
  * injection must not touch out-of-scope bytes, nor address an element
@@ -475,8 +507,12 @@ export type LinkClaimHandler = (attrs: Readonly<Record<string, unknown>>) => str
475
507
  * @internal
476
508
  */
477
509
  export declare function ssrLinkClaim(attrs: Readonly<Record<string, unknown>>): string;
478
- export declare function ssrSelectValues(): void;
479
- export declare function resolveSSRSelectValues(html: any): any;
510
+ /** Compiler-emitted primitive; not for hand-written code. @internal */
511
+ export declare function ssrSelect(value: any): any;
512
+ /** Compiler-emitted primitive; not for hand-written code. @internal */
513
+ export declare function ssrIn<T>(state: any, fn: () => T): T;
514
+ /** Compiler-emitted primitive; not for hand-written code. @internal */
515
+ export declare function ssrOption(value: any, state?: any, own?: any): string;
480
516
  export declare function escape(s: any, attr?: boolean): any;
481
517
  export declare function getHydrationKey(): string | undefined;
482
518
  export declare function applyRef(r: ((element: any) => void) | ((element: any) => void)[], element: any): void;
@@ -715,9 +751,14 @@ export type ElementClaimOptions = {
715
751
  * register isomorphically. Returns a no-op unregister function.
716
752
  */
717
753
  export declare function registerElementClaim(handler: (element: Element) => void, options?: ElementClaimOptions): () => void;
754
+ export declare function setTrustedTypesPolicy(policy: {
755
+ createHTML(html: string): unknown;
756
+ } | undefined): void;
757
+ /** Server: markup stays a string. @internal */
758
+ export declare function trustedHTML(html: string): string;
718
759
  export declare function claimElement<T extends Element>(node: T, owner?: Owner | null): T;
719
760
  export declare function claimElementTree<T extends Node>(root: T): T;
720
761
  /** Server: `fn()`. No event is dispatched during SSR, so there is no interaction to join. */
721
762
  export declare function dispatchAsInteraction<T>(_e: Event, fn: () => T): T;
722
- export { notSup as style, notSup as insert, notSup as spread, notSup as delegateEvents, notSup as registerDelegatedRoot, notSup as unregisterDelegatedRoot, notSup as registerDelegatedContainer, notSup as unregisterDelegatedContainer, notSup as getDelegatedRoot, notSup as dynamicProperty, notSup as setAttribute, notSup as setAttributeNS, notSup as addEvent, notSup as render, notSup as template, notSup as setProperty, notSup as setStatefulProperty, notSup as className, notSup as assign, notSup as hydrate, notSup as getNextElement, notSup as getNextMatch, notSup as getNextMarker, notSup as runHydrationEvents, notSup as ref, notSup as setStyleProperty, notSup as readShallow, notSup as acquireAsset };
763
+ export { notSup as style, notSup as insert, notSup as spread, notSup as delegateEvents, notSup as registerDelegatedRoot, notSup as unregisterDelegatedRoot, notSup as registerDelegatedContainer, notSup as unregisterDelegatedContainer, notSup as getDelegatedRoot, notSup as dynamicProperty, notSup as setAttribute, notSup as setAttributeNS, notSup as addEvent, notSup as render, notSup as template, notSup as setProperty, notSup as setStatefulProperty, notSup as heldRead, notSup as strictHandler, notSup as className, notSup as assign, notSup as hydrate, notSup as getNextElement, notSup as getNextMatch, notSup as getNextMarker, notSup as runHydrationEvents, notSup as ref, notSup as setStyleProperty, notSup as readShallow, notSup as acquireAsset };
723
764
  declare function notSup(): void;