lit-ui-router-ssr 0.6.0 → 0.7.0

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 (68) hide show
  1. package/README.md +122 -11
  2. package/dist/client.d.ts +53 -18
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +30 -7
  5. package/dist/client.js.map +1 -1
  6. package/dist/development/client.js +30 -7
  7. package/dist/development/client.js.map +1 -1
  8. package/dist/development/index.js +1 -0
  9. package/dist/development/index.js.map +1 -1
  10. package/dist/development/light-element-renderer.js +1 -1
  11. package/dist/development/prerender.js +26 -5
  12. package/dist/development/prerender.js.map +1 -1
  13. package/dist/development/respond.js +26 -0
  14. package/dist/development/respond.js.map +1 -0
  15. package/dist/development/served-interior.js +9 -0
  16. package/dist/development/served-interior.js.map +1 -0
  17. package/dist/development/served-view.js +13 -1
  18. package/dist/development/served-view.js.map +1 -1
  19. package/dist/development/signature.js +3 -2
  20. package/dist/development/signature.js.map +1 -1
  21. package/dist/development/testing.js +35 -0
  22. package/dist/development/testing.js.map +1 -0
  23. package/dist/development/ui-view-renderer.js +45 -40
  24. package/dist/development/ui-view-renderer.js.map +1 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/light-element-renderer.js +1 -1
  30. package/dist/prerender.d.ts +60 -7
  31. package/dist/prerender.d.ts.map +1 -1
  32. package/dist/prerender.js +26 -5
  33. package/dist/prerender.js.map +1 -1
  34. package/dist/respond.d.ts +43 -0
  35. package/dist/respond.d.ts.map +1 -0
  36. package/dist/respond.js +26 -0
  37. package/dist/respond.js.map +1 -0
  38. package/dist/served-interior.d.ts +10 -0
  39. package/dist/served-interior.d.ts.map +1 -0
  40. package/dist/served-interior.js +9 -0
  41. package/dist/served-interior.js.map +1 -0
  42. package/dist/served-view.d.ts +13 -2
  43. package/dist/served-view.d.ts.map +1 -1
  44. package/dist/served-view.js +13 -1
  45. package/dist/served-view.js.map +1 -1
  46. package/dist/signature.d.ts +17 -5
  47. package/dist/signature.d.ts.map +1 -1
  48. package/dist/signature.js +3 -2
  49. package/dist/signature.js.map +1 -1
  50. package/dist/testing.d.ts +44 -0
  51. package/dist/testing.d.ts.map +1 -0
  52. package/dist/testing.js +35 -0
  53. package/dist/testing.js.map +1 -0
  54. package/dist/ui-view-renderer.d.ts +12 -29
  55. package/dist/ui-view-renderer.d.ts.map +1 -1
  56. package/dist/ui-view-renderer.js +46 -37
  57. package/dist/ui-view-renderer.js.map +1 -1
  58. package/package.json +25 -3
  59. package/src/client.ts +131 -28
  60. package/src/index.ts +13 -1
  61. package/src/light-element-renderer.ts +1 -1
  62. package/src/prerender.ts +115 -10
  63. package/src/respond.ts +105 -0
  64. package/src/served-interior.ts +26 -0
  65. package/src/served-view.ts +40 -4
  66. package/src/signature.ts +31 -14
  67. package/src/testing.ts +88 -0
  68. package/src/ui-view-renderer.ts +126 -112
package/README.md CHANGED
@@ -24,14 +24,17 @@ imports the pre-1.0 renderer or re-derives the incantation.
24
24
  on the page carries `defer-hydration` and renders nothing until the client's walk reaches it.
25
25
  - **The hydration signature.** A page rendered from a template opens on a JSON data block,
26
26
  `<script type="application/json" data-lit-ui-router-ssr>`, naming this package's version, the
27
- state the router stood on, and that state's url parameter values. A page `renderShell` returns
28
- as a string is written as-is, without one.
27
+ state the router stood on, that state's url parameter values, and the resolved values the
28
+ `payload` hook supplies. A page `renderShell` returns as a string is written as-is, without one.
29
29
  - **The lit render inside the emit loop.** The loop itself — verdict to file name, redirect to
30
30
  rules line, the `_redirects` file, delegating states skipped, tally, warnings for paths that
31
31
  matched nothing — is
32
32
  `prerender` from `ui-router-server/prerender`, which takes any render. This package's `prerender`
33
33
  supplies the lit one and takes the same options, plus `router`, `renderShell`, `document`,
34
- `root` and `elementRenderers`. No SPA catch-all is ever written: one turns every 404 into a 200.
34
+ `root`, `elementRenderers`, `payload`, `responses` and `origin`. No SPA catch-all is ever written: one
35
+ turns every 404 into a 200.
36
+ - **Response states after settle.** `responder` runs the handler bound to a response state's name
37
+ with the resolves its transition landed with.
35
38
  - **`<ui-view>` on both sides.** `UiViewRenderer` fills the element's light DOM on the server;
36
39
  `lit-ui-router-ssr/client` adopts what it drew.
37
40
 
@@ -50,6 +53,9 @@ npm install lit-ui-router-ssr
50
53
  the client half, so a bundle takes one or the other, never both. `@lit-labs/ssr-client` is optional:
51
54
  install it when you import `lit-ui-router-ssr/client`.
52
55
 
56
+ The `lit-ui-router` peer is `^1.19.0`: the server renders a view through the helper `<ui-view>`
57
+ renders through, and the client hands a served class element to the view it wakes.
58
+
53
59
  ## Quick Start
54
60
 
55
61
  ```typescript
@@ -125,6 +131,53 @@ A page fails to land in four ways, and each rejects rather than hangs:
125
131
  `settle()` never calls `router.start()`, which runs once per router: it drives `urlService`
126
132
  directly, so a page loop calls it once per path on the same router, started or not.
127
133
 
134
+ ## Response states
135
+
136
+ A [response state](https://lit-ui-router.dev/packages/server#response-states) answers with a
137
+ `Response` built from its resolves instead of a page. `responder(router, responses)` settles
138
+ `router` on the verdict's subpath, query included, runs the handler bound to the landed state's
139
+ name with that transition's resolves (inherited ones included) and the request, and returns the
140
+ `Response` as built; a HEAD gets it without its body. A resolve that throws rejects before any
141
+ handler runs. It fits the fetch adapter's `serveResponse`, and `prerender` takes the same handlers
142
+ as `responses`, writing a 2xx body at the path its url spells or a 3xx as a rules line. See
143
+ [response states](https://lit-ui-router.dev/packages/ssr#response-states).
144
+
145
+ ## Adopting the resolves on boot
146
+
147
+ The `payload` option hands each rendered page's landed transition to a hook, which returns the
148
+ resolve payload to write. `dehydrate` from `ui-router-server/ssr` draws one, and the hook decides what to do with the resolves it leaves out:
149
+
150
+ ```typescript
151
+ import { prerender } from 'lit-ui-router-ssr';
152
+ import { dehydrate } from 'ui-router-server/ssr';
153
+
154
+ await prerender({
155
+ // mounts, router, paths, renderShell, …
156
+ payload: (transition, { path }) => {
157
+ const { payload, unserializable } = dehydrate(transition);
158
+
159
+ for (const { state, token } of unserializable)
160
+ console.warn(`${path}: ${state}.${token} re-runs on the client`);
161
+
162
+ return payload;
163
+ },
164
+ });
165
+ ```
166
+
167
+ The payload's `resolves` go into the page's hydration signature, beside `version`, `state` and
168
+ `params`, so the one block is the payload. `bootstrap()` seeds the boot transition from it before
169
+ the router starts: each resolve the page was drawn with adopts its value in place of running its
170
+ function. Every other resolve runs as it would without one: a value `dehydrate` left out, a
171
+ `NOWAIT` resolve, every resolve of a boot that lands on another state or other parameters, and
172
+ every resolve of a page whose block carries no `resolves`. Without the hook no page carries
173
+ resolves. What `dehydrate` draws, and which values it leaves out, is in
174
+ [its documentation](https://lit-ui-router.dev/packages/server#handing-resolves-to-the-client).
175
+
176
+ A value plain JSON can't carry, such as a `Date`, travels through a transporter. Pass the same
177
+ `transport` to `dehydrate` in the hook and to `bootstrap()`: the signature keeps the payload's
178
+ `transported` marks, and `bootstrap()` hands `transport` to `seed`. See
179
+ [values beyond plain JSON](https://lit-ui-router.dev/packages/server#values-beyond-plain-json).
180
+
128
181
  ## The routed view, drawn on the server
129
182
 
130
183
  `elementRenderers` defaults to `[UiViewRenderer, LightElementRenderer]` — not `@lit-labs/ssr`'s
@@ -138,6 +191,20 @@ hydrates against. An address no state routes gets empty markers. That pair stays
138
191
  hydrating the view's surroundings reads it as the `uiViewSlot()` part and stops there; every marker
139
192
  between it carries a prefix, so the same walk reads past the view's interior.
140
193
 
194
+ The template comes from `lit-ui-router`'s own render helper, the one `<ui-view>`'s `render()` calls,
195
+ so the served markup and the client's first render share one source. A routed `LitElement` class,
196
+ plain or `sticky`, prerenders too: `lit-ui-router` builds the element and assigns its props, and
197
+ `LitElementRenderer` writes it, shadow root included, into the slot `<ui-view>` places a class in.
198
+ At the wake the served view hands that element to `lit-ui-router`, which adopts it instead of
199
+ building its own, so the element the server wrote is the element the client keeps. A class that
200
+ renders into its own light DOM prerenders into it when it uses
201
+ [`LightDomHydrating`](#light-dom-elements), and hydrates those nodes in place. Without it, the class
202
+ is written as its bare element, with no shadow root to hide its render, and renders on the client. A
203
+ class must be on the `customElements` registry to prerender.
204
+
205
+ The served `<ui-view>` markup is internal to this package and `lit-ui-router` and changes with them.
206
+ Post-processing of prerendered HTML keys on the [hydration signature](#the-client-half) block.
207
+
141
208
  The use site opts in with `uiViewSlot()`, which is what reaches the renderer's light-DOM render and
142
209
  commits nothing on the client:
143
210
 
@@ -362,15 +429,19 @@ const { outcome } = await bootstrap(router, root, page(router));
362
429
  - **The boot decides mismatches once.** A boot that lands where the document was drawn adopts every
363
430
  view, and a view that still mismatches warns in development: the two halves render that template
364
431
  differently. A boot that lands elsewhere — one static document served for a family of urls, or a
365
- redirect — adopts the views that match and renders the rest cold without a warning each; once the
366
- page is live, the development build warns once, naming both states and how many views rendered
367
- cold.
368
- - **The boot transition takes a seed.** `options.payload` is handed to `seed()` from
432
+ redirect — adopts the views that match and renders the rest cold without a warning each. A view
433
+ whose state, or whose url parameters (its own and inherited), differ from the drawn ones renders
434
+ cold. Once the page is live, a boot into another state warns once in development, naming both
435
+ states and how many views rendered cold; a boot into other url parameters of the drawn state is
436
+ silent.
437
+ - **The boot transition is seeded.** The payload the signature carries is handed to `seed()` from
369
438
  `ui-router-server/ssr/client` before the router starts, so the boot transition adopts the
370
- resolved values a server render drew in place of running their resolve functions.
371
- - **`hydrateRoot()` is the step underneath.** An app that owns its own boot calls `router.start()`,
372
- awaits the first successful transition, then `hydrateRoot(root, page(router))`, and renders
373
- `page(router)` itself when that returns `false`.
439
+ resolved values the prerender drew in place of running their resolve functions.
440
+ `options.payload` takes its place when given.
441
+ - **`hydrateRoot()` is the step underneath.** An app that owns its own boot calls
442
+ `seed(router, readResolvePayload(root))` and `router.start()`, awaits the first successful
443
+ transition, then `hydrateRoot(root, page(router))`, and renders `page(router)` itself when that
444
+ returns `false`.
374
445
  - **The signature decides first.** `hydrateRoot()` reads the container's hydration signature before
375
446
  it touches the document, and returns `false` over an emptied container when there is none — a
376
447
  cold client render, a dev server, a page from an earlier `prerender()`, a string `renderShell` —
@@ -500,6 +571,46 @@ the grid entirely.
500
571
 
501
572
  The [guide](https://lit-ui-router.dev/packages/ssr#how-this-compares) carries the longer discussion.
502
573
 
574
+ ## Measuring the round trip
575
+
576
+ `lit-ui-router-ssr/testing` counts how many of the server's elements survive the boot. It imports
577
+ nothing — no lit, no router — and runs anywhere there is a DOM. `stampServed(root)` takes every
578
+ element under `root`, open shadow roots included, before the client boots; `countRetained(stamp)`
579
+ returns `{ served, retained, removed, added }` after it. A hydrated page keeps `removed` at 0. A view
580
+ the client rendered over counts its served elements as removed and its new ones as added; an element
581
+ a component draws in `firstUpdated`, or the shadow `<slot>` each `<ui-router>` renders, counts only
582
+ as added.
583
+
584
+ ```ts
585
+ import { countRetained, stampServed } from 'lit-ui-router-ssr/testing';
586
+
587
+ const stamp = stampServed(container); // after the prerender is parsed in, before bootstrap()
588
+ await bootstrap(router, container, page(router));
589
+ expect(countRetained(stamp)).toMatchObject({ removed: 0 });
590
+ ```
591
+
592
+ In a browser the stamp and the count must run in the page. Each helper is self-contained, so its
593
+ source text is valid page script. In Playwright, an init script stamps the body when parsing ends,
594
+ before module scripts run:
595
+
596
+ ```ts
597
+ import { countRetained, stampServed } from 'lit-ui-router-ssr/testing';
598
+
599
+ await page.addInitScript(`
600
+ const stampServed = ${stampServed};
601
+ window.countRetained = ${countRetained};
602
+ document.addEventListener('readystatechange', () => {
603
+ if (document.readyState === 'interactive') window.servedStamp = stampServed(document.body);
604
+ });
605
+ `);
606
+ await page.goto('/sheet/7B/');
607
+ await page.waitForFunction(() => !document.querySelector('[defer-hydration]'));
608
+
609
+ expect(await page.evaluate('countRetained(servedStamp)')).toMatchObject({
610
+ removed: 0,
611
+ });
612
+ ```
613
+
503
614
  ## Documentation
504
615
 
505
616
  - [Guide](https://lit-ui-router.dev/packages/ssr)
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { renderLight } from "@lit-labs/ssr-client/directives/render-light.js";
2
2
  import type { RenderOptions } from "lit";
3
3
  import type { UIRouterLit } from "lit-ui-router/pure";
4
- import type { ResolvePayload } from "ui-router-server/ssr/client";
4
+ import type { ResolvePayload, SeedOptions } from "ui-router-server/ssr/client";
5
5
  import type { HydrationSignature } from "./signature.js";
6
6
  export { adoptUiViewContext, type AdoptableView, type AdoptUiViewContext, type AdoptUiViewContextKey } from "./adopt-context.js";
7
7
  export { isServedViewClass, type ServedUiView, type ServedUiViewConstructor, servedViewBrand, withServedRender } from "./served-view.js";
@@ -12,7 +12,8 @@ export type { HydrationSignature } from "./signature.js";
12
12
  *
13
13
  * - `adopted`: the element hydrated its served nodes, and they are the live ones.
14
14
  * - `fell-back`: the served pair did not match the render the client booted
15
- * into, or was lost; the view dropped the served interior and rendered cold.
15
+ * into, was drawn for another state or other url parameters, or was lost;
16
+ * the view dropped the served interior and rendered cold.
16
17
  * - `none`: nothing to adopt — an empty served pair, the address no state
17
18
  * routed, or a view the document served no markers for.
18
19
  */
@@ -28,7 +29,7 @@ export declare const uiViewAdoptEventName: "ui-view:adopt";
28
29
  export interface UiViewAdoptDetail {
29
30
  /** What the wake came to. */
30
31
  readonly outcome: AdoptOutcome;
31
- /** What `hydrate()` threw, or why the pair was lost; present only on `fell-back`. */
32
+ /** What `hydrate()` threw, or why the view did not adopt; present only on `fell-back`. */
32
33
  readonly error?: unknown;
33
34
  }
34
35
  /**
@@ -135,6 +136,30 @@ export declare const lightSlot: typeof renderLight;
135
136
  */
136
137
  export declare function readHydrationSignature(container: ParentNode): HydrationSignature | null;
137
138
  /**
139
+ * Reads the resolve payload `prerender()` wrote into the container's
140
+ * {@link readHydrationSignature | hydration signature}: the state and url
141
+ * parameters the document was drawn for, and the values its resolves settled
142
+ * on, keyed by state name, then by resolve token.
143
+ *
144
+ * {@link bootstrap} reads it on its own. A boot that calls {@link hydrateRoot}
145
+ * directly hands it to `seed` from `ui-router-server/ssr/client` before the
146
+ * router starts.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * import { readResolvePayload } from 'lit-ui-router-ssr/client';
151
+ * import { seed } from 'ui-router-server/ssr/client';
152
+ *
153
+ * seed(router, readResolvePayload(root));
154
+ * router.start();
155
+ * ```
156
+ *
157
+ * @param container - the element the server's markup was written into
158
+ * @returns the payload, or `undefined` when the container holds no signature,
159
+ * one from another release line of this package, or one without `resolves`
160
+ */
161
+ export declare function readResolvePayload(container: ParentNode): ResolvePayload | undefined;
162
+ /**
138
163
  * Adopts a server-rendered container, and the `<ui-view>`s that wake under it.
139
164
  *
140
165
  * The container's {@link readHydrationSignature | hydration signature} is read
@@ -181,11 +206,11 @@ export declare function readHydrationSignature(container: ParentNode): Hydration
181
206
  * way. The caller renders into it.
182
207
  *
183
208
  * {@link bootstrap} runs the whole boot around this call. Called directly, the
184
- * boot is the router first: `router.start()`, await its first successful
185
- * transition, then this call. The walk commits `.uiRouter` onto `<ui-router>`
186
- * and each woken `<ui-view>` re-seeks the router before its own first render,
187
- * so the views find the settled router rather than the placeholder they
188
- * registered against. Nothing constrains when `lit-ui-router-ssr/register` is
209
+ * boot is the router first: `seed` the router with {@link readResolvePayload},
210
+ * `router.start()`, await its first successful transition, then this call.
211
+ * The walk commits `.uiRouter` onto `<ui-router>` and each woken `<ui-view>`
212
+ * re-seeks the router before its own first render, so the views find the
213
+ * settled router rather than the placeholder they registered against. Nothing constrains when `lit-ui-router-ssr/register` is
189
214
  * imported.
190
215
  *
191
216
  * @example
@@ -237,12 +262,16 @@ export interface BootstrapResult {
237
262
  */
238
263
  readonly error?: unknown;
239
264
  }
240
- /** {@link bootstrap}'s options: {@link HydrateRootOptions}, plus the boot transition's seed. */
241
- export interface BootstrapOptions extends HydrateRootOptions {
265
+ /**
266
+ * {@link bootstrap}'s options: {@link HydrateRootOptions}, plus the boot
267
+ * transition's seed and the `transport` handed to `seed` with it.
268
+ */
269
+ export interface BootstrapOptions extends HydrateRootOptions, SeedOptions {
242
270
  /**
243
271
  * Resolved values the document was drawn with, handed to `seed` from
244
272
  * `ui-router-server/ssr/client` before the router starts, so the boot
245
- * transition adopts them in place of running their resolve functions.
273
+ * transition adopts them in place of running their resolve functions. It
274
+ * takes the place of the payload the container's signature carries.
246
275
  */
247
276
  readonly payload?: ResolvePayload;
248
277
  }
@@ -250,9 +279,13 @@ export interface BootstrapOptions extends HydrateRootOptions {
250
279
  * Boots `router` into the page `container` holds, and resolves once that page
251
280
  * is live.
252
281
  *
253
- * It owns the whole client boot. `options.payload`, when given, seeds the boot
254
- * transition first. The container's {@link readHydrationSignature | signature}
255
- * is read before anything else touches the document; a container {@link
282
+ * It owns the whole client boot. The boot transition is seeded first, with
283
+ * `options.payload` when given, and otherwise with the resolves the
284
+ * container's signature carries ({@link readResolvePayload}): each resolve the
285
+ * document was drawn with adopts its value in place of running its function,
286
+ * and every other resolve runs as it would without a payload. The
287
+ * container's {@link readHydrationSignature | signature} is read before
288
+ * anything else touches the document; a container {@link
256
289
  * hydrateRoot} would not adopt — no signature, another release line, stripped
257
290
  * markers — is emptied and `value` rendered into it at once, and the router
258
291
  * then starts. Otherwise the router starts, the call waits for the boot
@@ -266,9 +299,11 @@ export interface BootstrapOptions extends HydrateRootOptions {
266
299
  * since that is a template the two halves render differently.
267
300
  * - The boot lands elsewhere — a static host serving one document for a
268
301
  * family of urls, or a redirect: the views that match adopt, and the views
269
- * that differ render cold without a warning of their own. Once the page is
270
- * live, one development warning names both states and how many views
271
- * rendered cold, when any did.
302
+ * that differ render cold without a warning of their own. A view whose
303
+ * state, or whose url parameters, its own and inherited, differ from the
304
+ * drawn ones renders cold. Once the page is live, a boot into another state
305
+ * warns once in development, naming both states and how many views rendered
306
+ * cold; a boot into other url parameters of the drawn state is silent.
272
307
  * - The boot fails, or the url starts no transition: the container is emptied
273
308
  * and `value` rendered cold. The root `hydrate()` throwing, as over a
274
309
  * mutated document, does the same. The call resolves rather than rejects.
@@ -288,7 +323,7 @@ export interface BootstrapOptions extends HydrateRootOptions {
288
323
  * @param router - the client router, its states registered and not yet started
289
324
  * @param container - the element the server's markup was written into, or an empty one
290
325
  * @param value - the same template the server rendered, with every `<ui-view>` hole empty
291
- * @param options - lit render options, `onAdopt`, and the boot transition's `payload`
326
+ * @param options - lit render options, `onAdopt`, and the boot transition's `payload` and `transport`
292
327
  * @returns what the boot came to, once every awake view has updated
293
328
  * @throws what `router.start()` throws, as on a router already started
294
329
  * @throws the `TypeError` `seed` throws on a payload with no `resolves`, before the router starts
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","mappings":"AAQA,SAAS,mBAAmB;AAK5B,cAAyB,qBAAqB;AAM9C,cAAc,mBAAmB;AAEjC,cAAc,sBAAsB;AAOpC,cAAc,0BAA0B;AAExC,SACE,yBACK,oBACA,yBACA,6BACA;AAEP,SACE,wBACK,mBACA,yBACL,iBACA,wBACK;AAEP,SACE,wBACK,mCACA,+BACA,6BACA;AAEP,cAAc,0BAA0B;;;;;;;;;;AAcxC,YAAY,eAAe,YAAY,cAAc;;;;;AAMrD,OAAO,cAAM,sBAAuB;;;;AAKpC,iBAAiB,kBAAkB;;UAExB,SAAS;;UAET;AACX;;;;;AAMA,YAAY,mBAAmB,YAAY;;;;;;AAO3C,OAAO,cAAM,wBAAyB;;AAGtC,YAAY,qBAAqB,YAAY;;;;AAK7C,YAAY,iBACV,MAAM,SACN,SAAS,cAET;;;;;AAOF,iBAAiB,2BAA2B,cAAc;;;;;;CAMxD,UAAU;AACZ;eAEe;WACH,oBAAoB;;EAE5B,iBAAiB;;EAEjB,mBAAmB;CACrB;AACF;;;;;;;;;;;;;;;;;;;;;AAgEA,OAAO,cAAM,mBAAmB;;;;;;;;;;;;;;;AAgBhC,OAAO,cAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuY/B,OAAO,iBAAS,uBACd,WAAW,aACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IH,OAAO,iBAAS,YACd,WAAW,aA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W,aACV;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,OAAO,iBAAS,mBACd,WAAW,aACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2JH,OAAO,iBAAS,YACd,WAAW,aAEX,gBACA,UAAS,qBACR;;AAsCH,YAAY,mBAAmB,YAAY;;;;;;;;;;;;;;;;AAiB3C,YAAY,qBAAqB,YAAY,cAAc;;AAG3D,iBAAiB,gBAAgB;;;;;;UAMtB,SAAS;;UAET,WAAW;;;;;UAKX;AACX;;;;;AAMA,iBAAiB,yBAAyB,oBAAoB,YAAY;;;;;;;UAO/D,UAAU;AACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6LA,OAAO,iBAAe,UACpB,QAAQ,aACR,WAAW,aAEX,gBACA,UAAS,mBACR,QAAQ","names":[],"ignoreList":[],"sources":["../src/client.ts"]}
package/dist/client.js CHANGED
@@ -11,7 +11,7 @@ import "#dev-gate";
11
11
  import { adoptUiViewContext } from "./adopt-context.js";
12
12
  import { isLightDomElement } from "./light-dom-brand.js";
13
13
  import { servedMarkerPrefix } from "./served-markers.js";
14
- import { packageVersion, routeOf, signatureSelector } from "./signature.js";
14
+ import { packageVersion, routeOf, signatureSelector, urlParamsOf } from "./signature.js";
15
15
  export { adoptUiViewContext } from "./adopt-context.js";
16
16
  export { isServedViewClass, servedViewBrand, withServedRender } from "./served-view.js";
17
17
  export { LightDomHydrating } from "./light-dom.js";
@@ -125,6 +125,10 @@ const adopt = (view, policy) => {
125
125
  return report(view, reporter, "fell-back", error);
126
126
  }
127
127
  if (isPart(open.nextSibling, "/lit-part")) return report(view, reporter, "none");
128
+ if (policy.drawn && !policy.drawn(view)) {
129
+ clearInterior(open);
130
+ return report(view, reporter, "fell-back", notDrawn);
131
+ }
128
132
  try {
129
133
  revealServedMarkers(view);
130
134
  walkWith(policy, () => hydrate(view.render(), view, view.renderOptions));
@@ -165,6 +169,13 @@ export function readHydrationSignature(container) {
165
169
  const block = signatureBlockIn(container);
166
170
  return block ? parseSignature(block.text) : null;
167
171
  }
172
+ export function readResolvePayload(container) {
173
+ return payloadIn(readHydrationSignature(container));
174
+ }
175
+ const payloadIn = (signature) => {
176
+ if (signature?.resolves === void 0 || releaseLine(signature.version) !== releaseLine(packageVersion)) return void 0;
177
+ return signature;
178
+ };
168
179
  const signatureBlockIn = (container) => [...container.children].find((child) => child.matches(signatureSelector));
169
180
  const precedesRender = (block) => {
170
181
  let node = block.nextSibling;
@@ -237,6 +248,14 @@ const startBoot = (router) => new Promise((resolve) => {
237
248
  }
238
249
  if (!created) land({});
239
250
  });
251
+ const notDrawn = "the view was drawn for another state or other url parameters";
252
+ const drawnView = (signature, router) => (view) => {
253
+ if (!(view instanceof UiView) || !view.viewContext) return true;
254
+ const state = view.viewContext;
255
+ if (!router.stateRegistry.get(String(signature.state))?.$$state?.().path.includes(state)) return false;
256
+ const drawnParams = signature.params ?? {};
257
+ return Object.entries(urlParamsOf(state, router.globals.params)).every(([id, value]) => JSON.stringify(value) === JSON.stringify(drawnParams[id]));
258
+ };
240
259
  const signatureMatches = (signature, router) => JSON.stringify([signature.state, signature.params]) === JSON.stringify(routeOf(router.globals));
241
260
  const settleViews = async (container) => {
242
261
  const settled = new Set();
@@ -252,11 +271,11 @@ const renderCold = (container, value, renderOptions) => {
252
271
  render(value, container, renderOptions);
253
272
  };
254
273
  export async function bootstrap(router, container, value, options = {}) {
255
- const { onAdopt, payload, ...renderOptions } = options;
256
- const disarm = seed(router, payload);
274
+ const { onAdopt, payload, transport, ...renderOptions } = options;
275
+ const served = readHydrationSignature(container);
276
+ const disarm = seed(router, payload ?? payloadIn(served), { transport });
257
277
  const signature = readAdoptable(container);
258
278
  if (!signature) {
259
- const served = readHydrationSignature(container);
260
279
  renderCold(container, value, renderOptions);
261
280
  const landing = await startBoot(router);
262
281
  disarm();
@@ -287,9 +306,13 @@ export async function bootstrap(router, container, value, options = {}) {
287
306
  };
288
307
  let release;
289
308
  try {
290
- release = adoptRoot(container, value, renderOptions, {
309
+ release = adoptRoot(container, value, renderOptions, drawn ? {
310
+ reporter,
311
+ quiet: false
312
+ } : {
291
313
  reporter,
292
- quiet: !drawn
314
+ quiet: true,
315
+ drawn: drawnView(signature, router)
293
316
  });
294
317
  } catch (error) {
295
318
  render(value, container, renderOptions);
@@ -302,7 +325,7 @@ export async function bootstrap(router, container, value, options = {}) {
302
325
  }
303
326
  await settleViews(container);
304
327
  release();
305
- if (!drawn && fellBack > 0);
328
+ if (fellBack > 0 && signature.state !== router.globals.current.name);
306
329
  return {
307
330
  outcome: "adopted",
308
331
  signature: compared
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","mappings":"AAOA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAE5B,SAAS,YAAY,kBAAkB;AAEvC,SAAS,UAAU,cAAc;AAEjC,SAAS,iBAAiB;AAE1B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,YAAY;AAErB,OAAwB;AACxB,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,gBAAgB,SAAS,yBAAyB;AAG3D,SACE,0BAIK;AAEP,SACE,mBAGA,iBACA,wBACK;AAEP,SACE,yBAIK;AAKP,MAAM,QAAQ;AAiBd,OAAO,MAAM,uBAAuB;AAuBpC,OAAO,MAAM,yBAAyB;AAsCtC,MAAM,uBAAuB,kBAAkB,YAAY,CAAC;AAG5D,MAAM,4BAA4B,qBAAqB;CASrD,YAAY,MAAgB;EAC1B,MAAM,IAAI;EAGV,MAAM,OAAQ,KAAmB;EAEjC,IAAI,EAAE,gBAAgB,UAAU;EAGhC,IAAI,WAAW,IAAI,GAAG,WAAW,MAAM,UAAU;EAEjD,IAAI,KAAK,aAAa,KAAK,GAAG,KAAK,gBAAgB,KAAK;CAC1D;CAGA,SAA0B;EACxB,OAA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MAAM,aAAa,YACjB,WAAW,UAAU,EAAE,OAAO,QAAQ,MAAM,IAAI,CAAC","names":[],"ignoreList":[],"sources":["../src/client.ts"]}
@@ -11,7 +11,7 @@ import { devGate } from "#dev-gate";
11
11
  import { adoptUiViewContext } from "./adopt-context.js";
12
12
  import { isLightDomElement } from "./light-dom-brand.js";
13
13
  import { servedMarkerPrefix } from "./served-markers.js";
14
- import { packageVersion, routeOf, signatureSelector } from "./signature.js";
14
+ import { packageVersion, routeOf, signatureSelector, urlParamsOf } from "./signature.js";
15
15
  export { adoptUiViewContext } from "./adopt-context.js";
16
16
  export { isServedViewClass, servedViewBrand, withServedRender } from "./served-view.js";
17
17
  export { LightDomHydrating } from "./light-dom.js";
@@ -134,6 +134,10 @@ const adopt = (view, policy) => {
134
134
  return report(view, reporter, "fell-back", error);
135
135
  }
136
136
  if (isPart(open.nextSibling, "/lit-part")) return report(view, reporter, "none");
137
+ if (policy.drawn && !policy.drawn(view)) {
138
+ clearInterior(open);
139
+ return report(view, reporter, "fell-back", notDrawn);
140
+ }
137
141
  try {
138
142
  revealServedMarkers(view);
139
143
  walkWith(policy, () => hydrate(view.render(), view, view.renderOptions));
@@ -175,6 +179,13 @@ export function readHydrationSignature(container) {
175
179
  const block = signatureBlockIn(container);
176
180
  return block ? parseSignature(block.text) : null;
177
181
  }
182
+ export function readResolvePayload(container) {
183
+ return payloadIn(readHydrationSignature(container));
184
+ }
185
+ const payloadIn = (signature) => {
186
+ if (signature?.resolves === void 0 || releaseLine(signature.version) !== releaseLine(packageVersion)) return void 0;
187
+ return signature;
188
+ };
178
189
  const signatureBlockIn = (container) => [...container.children].find((child) => child.matches(signatureSelector));
179
190
  const precedesRender = (block) => {
180
191
  let node = block.nextSibling;
@@ -256,6 +267,14 @@ const startBoot = (router) => new Promise((resolve) => {
256
267
  }
257
268
  if (!created) land({});
258
269
  });
270
+ const notDrawn = "the view was drawn for another state or other url parameters";
271
+ const drawnView = (signature, router) => (view) => {
272
+ if (!(view instanceof UiView) || !view.viewContext) return true;
273
+ const state = view.viewContext;
274
+ if (!router.stateRegistry.get(String(signature.state))?.$$state?.().path.includes(state)) return false;
275
+ const drawnParams = signature.params ?? {};
276
+ return Object.entries(urlParamsOf(state, router.globals.params)).every(([id, value]) => JSON.stringify(value) === JSON.stringify(drawnParams[id]));
277
+ };
259
278
  const signatureMatches = (signature, router) => JSON.stringify([signature.state, signature.params]) === JSON.stringify(routeOf(router.globals));
260
279
  const warnBootElsewhere = (signature, router, fellBack) => {
261
280
  if (!devGate()) return;
@@ -275,11 +294,11 @@ const renderCold = (container, value, renderOptions) => {
275
294
  render(value, container, renderOptions);
276
295
  };
277
296
  export async function bootstrap(router, container, value, options = {}) {
278
- const { onAdopt, payload, ...renderOptions } = options;
279
- const disarm = seed(router, payload);
297
+ const { onAdopt, payload, transport, ...renderOptions } = options;
298
+ const served = readHydrationSignature(container);
299
+ const disarm = seed(router, payload ?? payloadIn(served), { transport });
280
300
  const signature = readAdoptable(container);
281
301
  if (!signature) {
282
- const served = readHydrationSignature(container);
283
302
  renderCold(container, value, renderOptions);
284
303
  const landing = await startBoot(router);
285
304
  disarm();
@@ -310,9 +329,13 @@ export async function bootstrap(router, container, value, options = {}) {
310
329
  };
311
330
  let release;
312
331
  try {
313
- release = adoptRoot(container, value, renderOptions, {
332
+ release = adoptRoot(container, value, renderOptions, drawn ? {
333
+ reporter,
334
+ quiet: false
335
+ } : {
314
336
  reporter,
315
- quiet: !drawn
337
+ quiet: true,
338
+ drawn: drawnView(signature, router)
316
339
  });
317
340
  } catch (error) {
318
341
  render(value, container, renderOptions);
@@ -325,7 +348,7 @@ export async function bootstrap(router, container, value, options = {}) {
325
348
  }
326
349
  await settleViews(container);
327
350
  release();
328
- if (!drawn && fellBack > 0) warnBootElsewhere(signature, router, fellBack);
351
+ if (fellBack > 0 && signature.state !== router.globals.current.name) warnBootElsewhere(signature, router, fellBack);
329
352
  return {
330
353
  outcome: "adopted",
331
354
  signature: compared
@@ -1 +1 @@
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AM;CACtC,OAAO;CAEP,IAAI,EAAE,gBAAgB,UAAU;EAC9B,WAAW,WAAW,OAAO,aAAa;EAC1C,MAAM,YAAY,SAAS;EAE3B,OAAO;GAAE,SAAS;GAAQ,WAAW;GAAa,GAAG,UAAU,OAAO;EAAE;CAC1E;CAEA,MAAM,WAAW,iBAAiB,WAAW,SAAS,MAAM;CAC5D,MAAM,QAAQ,aAAa;CAC3B,IAAI,WAAW;CAEf,MAAM,YAA2B,MAAM,SAAS,UAAU;EACxD,IAAI,YAAY,aAAa,YAAY;EACzC,UAAU,MAAM,SAAS,KAAK;CAChC;CAEA,IAAI;CAEJ,IAAI;EACF,UAAU,UACR,WACA,OACA,eACA,QACI;GAAE;GAAU,OAAO;EAAM,IACzB;GAAE;GAAU,OAAO;GAAM,OAAO,UAAU,WAAW,MAAM;EAAE,CACnE;CACF,SAAS,OAAO;EACd,OAAO,OAAO,WAAW,aAAa;EACtC,MAAM,YAAY,SAAS;EAE3B,OAAO;GAAE,SAAS;GAAQ,WAAW;GAAU;EAAM;CACvD;CAEA,MAAM,YAAY,SAAS;CAC3B,QAAQ;CAGR,IAAI,WAAW,KAAK,UAAU,UAAU,OAAO,QAAQ,QAAQ,MAC7D,kBAAkB,WAAW,QAAQ,QAAQ;CAE/C,OAAO;EAAE,SAAS;EAAW,WAAW;CAAS;AACnD;AAGA,MAAM,oBACJ,WACA,SACA,WACuB;CACvB,IAAI,CAAC,WAAW,OAAO;CAEvB,OAAO,gBAAgB,WAAW,iBAAiB,WAAW,MAAM,IAChE,YACA;AACN;AAGA,MAAM,aAAa,YACjB,WAAW,UAAU,EAAE,OAAO,QAAQ,MAAM,IAAI,CAAC","names":[],"ignoreList":[],"sources":["../../src/client.ts"]}
@@ -1,5 +1,6 @@
1
1
  export { prerender } from "./prerender.js";
2
2
  export { settle } from "ui-router-server/ssr";
3
3
  export { LightElementRenderer } from "./light-element-renderer.js";
4
+ export { responder } from "./respond.js";
4
5
  export { UiViewRenderer } from "./ui-view-renderer.js";
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"AAMA,SAGE,iBAMK;AAEP,SAAS,cAAkC;AAE3C,SAAS,4BAA4B;AAErC,SAAS,sBAAsB","names":[],"ignoreList":[],"sources":["../../src/index.ts"]}
1
+ {"version":3,"file":"index.js","mappings":"AAMA,SAGE,iBAMK;AAEP,SAEE,cAEK;AAEP,SAAS,4BAA4B;AAErC,SAA8C,iBAAiB;AAQ/D,SAAS,sBAAsB","names":[],"ignoreList":[],"sources":["../../src/index.ts"]}
@@ -2,7 +2,7 @@ import { LitElementRenderer } from "@lit-labs/ssr";
2
2
  import { collectResultSync } from "@lit-labs/ssr/lib/render-result.js";
3
3
  import { renderValue } from "@lit-labs/ssr/lib/render-value.js";
4
4
  import { isLightDomClass } from "./light-dom-brand.js";
5
- import { prefixInterior } from "./ui-view-renderer.js";
5
+ import { prefixInterior } from "./served-interior.js";
6
6
  export class LightElementRenderer extends LitElementRenderer {
7
7
  static matchesClass(ceClass) {
8
8
  return isLightDomClass(ceClass);