lit-ui-router-ssr 0.1.1 → 0.2.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.
Files changed (47) hide show
  1. package/README.md +17 -5
  2. package/dist/adopt-context.d.ts.map +1 -1
  3. package/dist/adopt-context.js.map +1 -1
  4. package/dist/client.d.ts +46 -4
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +46 -25
  7. package/dist/client.js.map +1 -1
  8. package/dist/dev-warn.js.map +1 -1
  9. package/dist/development/adopt-context.js.map +1 -1
  10. package/dist/development/client.js +55 -27
  11. package/dist/development/client.js.map +1 -1
  12. package/dist/development/dev-warn.js.map +1 -1
  13. package/dist/development/index.js.map +1 -1
  14. package/dist/development/prerender.js +88 -52
  15. package/dist/development/prerender.js.map +1 -1
  16. package/dist/development/served-view.js +1 -1
  17. package/dist/development/served-view.js.map +1 -1
  18. package/dist/development/settle.js.map +1 -1
  19. package/dist/development/signature.js +4 -0
  20. package/dist/development/signature.js.map +1 -0
  21. package/dist/development/ui-view-renderer.js.map +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/prerender.d.ts +33 -3
  25. package/dist/prerender.d.ts.map +1 -1
  26. package/dist/prerender.js +82 -47
  27. package/dist/prerender.js.map +1 -1
  28. package/dist/served-view.d.ts.map +1 -1
  29. package/dist/served-view.js +1 -1
  30. package/dist/served-view.js.map +1 -1
  31. package/dist/settle.js.map +1 -1
  32. package/dist/signature.d.ts +39 -0
  33. package/dist/signature.d.ts.map +1 -0
  34. package/dist/signature.js +4 -0
  35. package/dist/signature.js.map +1 -0
  36. package/dist/ui-view-renderer.d.ts.map +1 -1
  37. package/dist/ui-view-renderer.js.map +1 -1
  38. package/package.json +2 -2
  39. package/src/adopt-context.ts +2 -0
  40. package/src/client.ts +198 -47
  41. package/src/dev-warn.ts +1 -0
  42. package/src/index.ts +2 -0
  43. package/src/prerender.ts +219 -87
  44. package/src/served-view.ts +13 -1
  45. package/src/settle.ts +19 -0
  46. package/src/signature.ts +43 -0
  47. package/src/ui-view-renderer.ts +33 -8
package/README.md CHANGED
@@ -22,6 +22,10 @@ imports the pre-1.0 renderer or re-derives the incantation.
22
22
  per page — so a template's `<ui-router>` descendants answer `context-request` and its `srefHref`
23
23
  attribute directives emit real hrefs. The render passes `deferHydration`, so every custom element
24
24
  on the page carries `defer-hydration` and renders nothing until the client's walk reaches it.
25
+ - **The hydration signature.** A page rendered from a template opens on a JSON data block,
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.
25
29
  - **The emit loop.** Verdict to file name, redirect to rules line, tally, warnings for paths that
26
30
  matched nothing.
27
31
  - **The host rules file.** `_redirects` by default, every generated line paired with and without a
@@ -345,11 +349,20 @@ if (!release) render(page(router), root);
345
349
  `hydrateRoot()`. The walk commits `.uiRouter` onto `<ui-router>` and each `<ui-view>` re-seeks the
346
350
  router before its own first render, so every view finds the settled router rather than the
347
351
  placeholder it registered against. Nothing constrains when `lit-ui-router-ssr/register` is imported.
352
+ - **The signature decides first.** `hydrateRoot()` reads the container's hydration signature before
353
+ it touches the document, and returns `false` over an emptied container when there is none — a
354
+ cold client render, a dev server, a page from an earlier `prerender()`, a string `renderShell` —
355
+ or when it names another release line: below 1.0 a document adopts only on the client's own minor,
356
+ from 1.0 its own major. The development build warns on that skew, naming both versions, and on a
357
+ block no `lit-part` marker follows, which is what a comment-stripping minifier leaves. The emptied
358
+ container is what lets `render(page(router), root)` draw the page once. A container it adopts
359
+ keeps the block. `readHydrationSignature(container)` returns the parsed `HydrationSignature`, or
360
+ `null` when there is none or it does not parse to an object with a string `version`; only
361
+ `version` is typed, so narrow `state` and `params` before use.
348
362
  - **`hydrateRoot(container, value, options?)`** provides `adoptUiViewContext` under `container` with
349
363
  core's `provideContext()` and runs one `hydrate()` over `container`. It returns that provider's
350
- release function, or `false` when there is nothing to adopt — a cold client render, a dev server.
351
- Release it once the page has settled; a nested view wakes on its parent's own update, after this
352
- call returns.
364
+ release function, or `false` when there is nothing to adopt. Release it once the page has settled;
365
+ a nested view wakes on its parent's own update, after this call returns.
353
366
  - **One walk wakes the page.** A served `<ui-view>` sleeps under `defer-hydration` and renders
354
367
  nothing. Removing the attribute wakes it: it re-seeks its router, requests `adoptUiViewContext`
355
368
  and calls the adopter it gets, which adopts the nodes the view holds. A view the app detaches
@@ -383,8 +396,7 @@ if (!release) render(page(router), root);
383
396
  production as in development. `hydrateRoot()`'s `onAdopt(view, outcome, error)` option receives
384
397
  the same reports for every view its walk reaches, a view the pin adopts after the release included.
385
398
  - **A mutated document throws.** `hydrateRoot()` rethrows what `hydrate()` threw, over a container it
386
- first leaves cold-renderable: no element still asleep behind `defer-hydration`, no marker still
387
- hidden behind the prefix. The caller renders over the container.
399
+ first empties. The caller renders into it.
388
400
 
389
401
  ### How this compares
390
402
 
@@ -1 +1 @@
1
- {"version":3,"file":"adopt-context.d.ts","mappings":"AACA,cAAc,qBAAqB;AACnC,cAAc,eAAe;;;;;;;AAQ7B,iBAAiB,sBAAsB;;UAE5B,MAAM;AACjB;;;;;;;AAQA,iBAAiB,sBAAsB,YAAY;;CAEjD;;UAES,eAAe;AAC1B;;;;;;;;AASA,YAAY,qBAAqB,QAC/B,wBACC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,OAAO,cAAM,oBAAoB","names":[],"ignoreList":[],"sources":["../src/adopt-context.ts"]}
1
+ {"version":3,"file":"adopt-context.d.ts","mappings":"AACA,cAAc,qBAAqB;AACnC,cAAc,eAAe;;;;;;;AAQ7B,iBAAiB,sBAAsB;;UAE5B,MAAM;AACjB;;;;;;;AAQA,iBAAiB,sBAAsB,YAAY;;CAGjD;;UAES,eAAe;AAC1B;;;;;;;;AASA,YAAY,qBAAqB,QAC/B,wBACC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,OAAO,cAAM,oBAAoB","names":[],"ignoreList":[],"sources":["../src/adopt-context.ts"]}
@@ -1 +1 @@
1
- {"version":3,"file":"adopt-context.js","mappings":"AA+DA,OAAO,MAAM,qBAAyC,OAAO,OAAO,EAClE,MAAM,0CACR,CAAC","names":[],"ignoreList":[],"sources":["../src/adopt-context.ts"]}
1
+ {"version":3,"file":"adopt-context.js","mappings":"AAiEA,OAAO,MAAM,qBAAyC,OAAO,OAAO,EAClE,MAAM,0CACR,CAAC","names":[],"ignoreList":[],"sources":["../src/adopt-context.ts"]}
package/dist/client.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { renderLight } from "@lit-labs/ssr-client/directives/render-light.js";
2
2
  import type { RenderOptions } from "lit";
3
+ import type { HydrationSignature } from "./signature.js";
3
4
  export { adoptUiViewContext, type AdoptableView, type AdoptUiViewContext, type AdoptUiViewContextKey } from "./adopt-context.js";
4
5
  export { isServedViewClass, type ServedUiView, type ServedUiViewConstructor, servedViewBrand, withServedRender } from "./served-view.js";
6
+ export type { HydrationSignature } from "./signature.js";
5
7
  /**
6
8
  * What a served `<ui-view>`'s wake came to.
7
9
  *
@@ -89,8 +91,49 @@ declare global {
89
91
  */
90
92
  export declare const uiViewSlot: typeof renderLight;
91
93
  /**
94
+ * Reads the hydration signature `prerender()` wrote ahead of the render a
95
+ * container holds: the version of this package that drew the document, and
96
+ * the state and parameter values it was drawn for.
97
+ *
98
+ * The signature is a `<script type="application/json" data-lit-ui-router-ssr>`
99
+ * data block among the container's own children, so this reads no deeper than
100
+ * they are; the first one wins. It reads the same before and after a
101
+ * {@link hydrateRoot} that adopts, which leaves the block in place; one that
102
+ * returns `false` clears the container.
103
+ *
104
+ * Only `version` is checked. `state` and `params` are whatever the block
105
+ * carries, so narrow them before use. Read it before {@link hydrateRoot}, which
106
+ * clears a container it does not adopt.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * import { hydrateRoot, readHydrationSignature } from 'lit-ui-router-ssr/client';
111
+ *
112
+ * await booted;
113
+ * const { state } = readHydrationSignature(root) ?? {};
114
+ * const drawnForBoot = state === router.globals.current.name;
115
+ * const release = hydrateRoot(root, page(router));
116
+ * ```
117
+ *
118
+ * @param container - the element the server's markup was written into
119
+ * @returns the signature, or `null` when the container holds none, or one that
120
+ * does not parse to an object with a string `version`
121
+ *
122
+ * @category client
123
+ */
124
+ export declare function readHydrationSignature(container: ParentNode): HydrationSignature | null;
125
+ /**
92
126
  * Adopts a server-rendered container, and the `<ui-view>`s that wake under it.
93
127
  *
128
+ * The container's {@link readHydrationSignature | hydration signature} is read
129
+ * first, and decides whether there is anything to adopt. A container with no
130
+ * signature renders cold, and so does one whose signature names another release
131
+ * line of this package — another minor below 1.0, another major from 1.0 — with
132
+ * a development warning naming both versions, and so does one whose signature
133
+ * no `lit-part` marker follows, as a comment-stripping minifier leaves it. Each
134
+ * time the container is emptied and this returns `false`, so the caller's
135
+ * `render()` draws the page once. A container this adopts keeps its signature.
136
+ *
94
137
  * {@link adoptUiViewContext} is provided on `container` with core's
95
138
  * `provideContext()` first, so a view woken by the walk finds it; `hydrate()`
96
139
  * then runs over `container`. The walk reaches each `<ui-view>`'s {@link
@@ -120,9 +163,8 @@ export declare const uiViewSlot: typeof renderLight;
120
163
  * the view, and to `options.onAdopt` when given. The pin carries that callback,
121
164
  * so a view adopted after the release still reaches it.
122
165
  *
123
- * A `hydrate()` that throws is rethrown, over a container left cold-renderable:
124
- * nothing asleep behind `defer-hydration`, no marker still hidden. The caller
125
- * renders over it.
166
+ * A `hydrate()` that throws is rethrown, over a container emptied the same
167
+ * way. The caller renders into it.
126
168
  *
127
169
  * The boot is the router first: `router.start()`, await its first successful
128
170
  * transition, then this call. The walk commits `.uiRouter` onto `<ui-router>`
@@ -143,7 +185,7 @@ export declare const uiViewSlot: typeof renderLight;
143
185
  * @param container - the element the server's markup was written into
144
186
  * @param value - the same template the server rendered, with every `<ui-view>` hole empty
145
187
  * @param options - lit render options, passed on to `hydrate()`, and `onAdopt`
146
- * @returns the function that releases the provider, or `false` when the container holds nothing to adopt — a cold client render, a dev server
188
+ * @returns the function that releases the provider, or `false`, over an emptied container, when there is nothing to adopt — no signature, as on a cold client render or a dev server, one from another release line, or one no render marker follows
147
189
  *
148
190
  * @category client
149
191
  */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","mappings":"AAMA,SAAS,mBAAmB;AAG5B,cAAyB,qBAAqB;AAU9C,SACE,yBACK,oBACA,yBACA,6BACA;AACP,SACE,wBACK,mBACA,yBACL,iBACA,wBACK;;;;;;;;;;;;AAgBP,YAAY,eAAe,YAAY,cAAc;;;;;;;AAQrD,OAAO,cAAM,sBAAuB;;;;;;AAOpC,iBAAiB,kBAAkB;;UAExB,SAAS;;UAET;AACX;;;;;;;AAQA,YAAY,mBAAmB,YAAY;;;;;;AAO3C,YAAY,iBACV,MAAM,SACN,SAAS,cACT;;;;;;;AASF,iBAAiB,2BAA2B,cAAc;;;;;;CAMxD,UAAU;AACZ;eAEe;WACH,oBAAoB;;EAE5B,iBAAiB;CACnB;AACF;;;;;;;;;;;;;;;;;;;;;;;AA6DA,OAAO,cAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoWhC,OAAO,iBAAS,YACd,WAAW,aACX,gBACA,UAAS,qBACR","names":[],"ignoreList":[],"sources":["../src/client.ts"]}
1
+ {"version":3,"file":"client.d.ts","mappings":"AAMA,SAAS,mBAAmB;AAI5B,cAAyB,qBAAqB;AAU9C,cAAc,0BAA0B;AAExC,SACE,yBACK,oBACA,yBACA,6BACA;AAEP,SACE,wBACK,mBACA,yBACL,iBACA,wBACK;AAEP,cAAc,0BAA0B;;;;;;;;;;;;AAgBxC,YAAY,eAAe,YAAY,cAAc;;;;;;;AAQrD,OAAO,cAAM,sBAAuB;;;;;;AAOpC,iBAAiB,kBAAkB;;UAExB,SAAS;;UAET;AACX;;;;;;;AAQA,YAAY,mBAAmB,YAAY;;;;;;AAO3C,YAAY,iBACV,MAAM,SACN,SAAS,cAET;;;;;;;AASF,iBAAiB,2BAA2B,cAAc;;;;;;CAMxD,UAAU;AACZ;eAEe;WACH,oBAAoB;;EAE5B,iBAAiB;CACnB;AACF;;;;;;;;;;;;;;;;;;;;;;;AAkEA,OAAO,cAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqVhC,OAAO,iBAAS,uBACd,WAAW,aACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8IH,OAAO,iBAAS,YACd,WAAW,aAEX,gBACA,UAAS,qBACR","names":[],"ignoreList":[],"sources":["../src/client.ts"]}
package/dist/client.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { hydrate } from "@lit-labs/ssr-client";
2
2
  import { renderLight } from "@lit-labs/ssr-client/directives/render-light.js";
3
+ import { isFunction } from "@uirouter/core";
3
4
  import { noChange } from "lit";
4
5
  import { directive } from "lit/directive.js";
5
6
  import { getDirectiveClass } from "lit/directive-helpers.js";
@@ -7,6 +8,7 @@ import { provideContext } from "lit-ui-router/context";
7
8
  import { UiView } from "lit-ui-router/pure";
8
9
  import { adoptUiViewContext } from "./adopt-context.js";
9
10
  import { servedMarkerPrefix } from "./served-markers.js";
11
+ import { packageVersion, signatureSelector } from "./signature.js";
10
12
  export { adoptUiViewContext } from "./adopt-context.js";
11
13
  export { isServedViewClass, servedViewBrand, withServedRender } from "./served-view.js";
12
14
  const DEFER = "defer-hydration";
@@ -25,7 +27,7 @@ class UiViewSlotDirective extends RenderLightDirective {
25
27
  }
26
28
  update(part) {
27
29
  const host = part.parentNode;
28
- return typeof host.renderLight === "function" ? host.renderLight() : noChange;
30
+ return isFunction(host.renderLight) ? host.renderLight() : noChange;
29
31
  }
30
32
  }
31
33
  export const uiViewSlot = directive(UiViewSlotDirective);
@@ -39,10 +41,10 @@ const walkWith = (reporter, walk) => {
39
41
  walkReporter = outer;
40
42
  }
41
43
  };
42
- const report = (view, reporter, outcome, error) => {
44
+ const report = (view, reporter, outcome, cause) => {
43
45
  const detail = outcome === "fell-back" ? {
44
46
  outcome,
45
- error
47
+ error: cause
46
48
  } : { outcome };
47
49
  view.dispatchEvent(new CustomEvent(uiViewAdoptEventName, {
48
50
  bubbles: true,
@@ -50,14 +52,14 @@ const report = (view, reporter, outcome, error) => {
50
52
  detail
51
53
  }));
52
54
  try {
53
- reporter?.(view, outcome, error);
55
+ reporter?.(view, outcome, cause);
54
56
  } catch (thrown) {
55
- queueMicrotask(() => {
56
- throw thrown;
57
- });
57
+ if (!isFunction(globalThis.reportError)) throw thrown;
58
+ globalThis.reportError(thrown);
58
59
  }
59
60
  };
60
- const isPart = (node, data) => node?.nodeType === Node.COMMENT_NODE && node.data.startsWith(data);
61
+ const isComment = (node) => node?.nodeType === Node.COMMENT_NODE;
62
+ const isPart = (node, data) => isComment(node) && node.data.startsWith(data);
61
63
  const servedPair = (view) => {
62
64
  for (const child of view.childNodes) if (isPart(child, "lit-part")) return child;
63
65
  };
@@ -70,8 +72,7 @@ const hasServedMarkers = (node) => {
70
72
  };
71
73
  const revealMarker = (node) => {
72
74
  if (!isPart(node, servedMarkerPrefix)) return;
73
- const comment = node;
74
- comment.data = comment.data.slice(servedMarkerPrefix.length);
75
+ node.data = node.data.slice(servedMarkerPrefix.length);
75
76
  };
76
77
  const revealNestedPair = (view) => {
77
78
  const markers = [...view.childNodes].filter((node) => isPart(node, servedMarkerPrefix));
@@ -86,13 +87,6 @@ const revealServedMarkers = (node) => {
86
87
  revealServedMarkers(child);
87
88
  }
88
89
  };
89
- const revealEveryMarker = (node) => {
90
- for (const child of node.childNodes) if (child.nodeType === Node.COMMENT_NODE) revealMarker(child);
91
- else if (child instanceof Element) {
92
- if (child.shadowRoot) revealEveryMarker(child.shadowRoot);
93
- revealEveryMarker(child);
94
- }
95
- };
96
90
  const dropServedRender = (view) => {
97
91
  const children = [...view.childNodes];
98
92
  const from = children.findIndex((child) => isPart(child, servedMarkerPrefix) || child instanceof Element && hasServedMarkers(child));
@@ -140,21 +134,48 @@ const pinAdopter = (view, reporter) => {
140
134
  adopt(woken, reporter);
141
135
  });
142
136
  };
143
- const isServed = (container) => {
144
- for (const child of container.childNodes) {
145
- if (isPart(child, "lit-part")) return true;
146
- if (child.nodeType === Node.COMMENT_NODE) continue;
147
- if (child.nodeType === Node.TEXT_NODE && !child.data.trim()) continue;
137
+ const isHydrationSignature = (value) => typeof value === "object" && value !== null && "version" in value && typeof value.version === "string";
138
+ const parseSignature = (json) => {
139
+ try {
140
+ const signature = JSON.parse(json);
141
+ return isHydrationSignature(signature) ? signature : null;
142
+ } catch {
143
+ return null;
144
+ }
145
+ };
146
+ export function readHydrationSignature(container) {
147
+ const block = signatureBlockIn(container);
148
+ return block ? parseSignature(block.text) : null;
149
+ }
150
+ const signatureBlockIn = (container) => [...container.children].find((child) => child.matches(signatureSelector));
151
+ const precedesRender = (block) => {
152
+ let node = block.nextSibling;
153
+ while (node?.nodeType === Node.TEXT_NODE && !node.data.trim()) node = node.nextSibling;
154
+ return isPart(node, "lit-part");
155
+ };
156
+ const releaseLine = (version) => {
157
+ const [major = "", minor = ""] = version.split(".");
158
+ return major === "0" ? `0.${minor}` : major;
159
+ };
160
+ const isAdoptable = (container) => {
161
+ const block = signatureBlockIn(container);
162
+ const signature = block && parseSignature(block.text);
163
+ if (!signature) return false;
164
+ if (releaseLine(signature.version) !== releaseLine(packageVersion)) {
165
+ signature.version;
148
166
  return false;
149
167
  }
168
+ if (precedesRender(block)) return true;
150
169
  return false;
151
170
  };
152
171
  const makeCold = (container) => {
153
- for (const element of container.querySelectorAll(`[${DEFER}]`)) element.removeAttribute(DEFER);
154
- revealEveryMarker(container);
172
+ container.replaceChildren();
155
173
  };
156
174
  export function hydrateRoot(container, value, options = {}) {
157
- if (!isServed(container)) return false;
175
+ if (!isAdoptable(container)) {
176
+ makeCold(container);
177
+ return false;
178
+ }
158
179
  const { onAdopt, ...renderOptions } = options;
159
180
  const release = provideContext(container, adoptUiViewContext, (view) => adopt(view, onAdopt));
160
181
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","mappings":"AAKA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB;AAEzB,SAAS,iBAAiB;AAE1B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,0BAA0B;AAEnC,SAAS,0BAA0B;AAEnC,SACE,0BAIK;AACP,SACE,mBAGA,iBACA,wBACK;AAGP,MAAM,QAAQ;AAqBd,OAAO,MAAM,uBAAuB;AAwDpC,MAAM,uBAAuB,kBAAkB,YAAY,CAAC;AAG5D,MAAM,4BAA4B,qBAAqB;CASrD,YAAY,MAAgB;EAC1B,MAAM,IAAI;EAEV,MAAM,OAAQ,KAAmB;EACjC,IAAI,EAAE,gBAAgB,UAAU;EAEhC,IAAI,WAAW,IAAI,GAAG,WAAW,MAAM,YAAY;EACnD,IAAI,KAAK,aAAa,KAAK,GAAG,KAAK,gBAAgB,KAAK;CAC1D;CAGA,SAA0B;EACxB,OAAO;CACT;CAGA,OAAgB,MAA0B;EACxC,MAAM,OAAO,KAAK;EAClB,OAAO,OAAO,KAAK,gBAAgB,aAC/B,KAAK,YAAY,IACjB;CACN;AACF;AAwBA,OAAO,MAAM,aAAiC,UAAU,mBAAmB;AAG3E,IAAI;AAGJ,MAAM,YACJ,UACA,SACS;CACT,MAAM,QAAQ;CACd,eAAe;CACf,IAAI;EACF,KAAK;CACP,UAAU;EACR,eAAe;CACjB;AACF;AAGA,MAAM,UACJ,MACA,UACA,SACA,UACS;CACT,MAAM,SACJ,YAAY,cAAc;EAAE;EAAS;CAAM,IAAI,EAAE,QAAQ;CAC3D,KAAK,cACH,IAAI,YAAY,sBAAsB;EACpC,SAAS;EACT,UAAU;EACV;CACF,CAAC,CACH;CACA,IAAI;EACF,WAAW,MAAM,SAAS,KAAK;CACjC,SAAS,QAAQ;EACf,qBAAqB;GACnB,MA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D,IAAI,EAAE,mBAAmB,SAAS,QAAQ,gBAAgB,KAAK;CAGjE,OAAO;AACT","names":[],"ignoreList":[],"sources":["../src/client.ts"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-warn.js","mappings":"AAaA,OAAO,SAAS,0BAA0B,SAAwB,CAOlE;AAsBA,OAAO,SAAS,uBAAuB,SAAwB,CAa/D","names":[],"ignoreList":[],"sources":["../src/dev-warn.ts"]}
1
+ {"version":3,"file":"dev-warn.js","mappings":"AAaA,OAAO,SAAS,0BAA0B,SAAwB,CAOlE;AAsBA,OAAO,SAAS,uBAAuB,SAAwB,CAc/D","names":[],"ignoreList":[],"sources":["../src/dev-warn.ts"]}
@@ -1 +1 @@
1
- {"version":3,"file":"adopt-context.js","mappings":"AA+DA,OAAO,MAAM,qBAAyC,OAAO,OAAO,EAClE,MAAM,0CACR,CAAC","names":[],"ignoreList":[],"sources":["../../src/adopt-context.ts"]}
1
+ {"version":3,"file":"adopt-context.js","mappings":"AAiEA,OAAO,MAAM,qBAAyC,OAAO,OAAO,EAClE,MAAM,0CACR,CAAC","names":[],"ignoreList":[],"sources":["../../src/adopt-context.ts"]}
@@ -1,5 +1,6 @@
1
1
  import { hydrate } from "@lit-labs/ssr-client";
2
2
  import { renderLight } from "@lit-labs/ssr-client/directives/render-light.js";
3
+ import { isFunction } from "@uirouter/core";
3
4
  import { noChange } from "lit";
4
5
  import { directive } from "lit/directive.js";
5
6
  import { getDirectiveClass } from "lit/directive-helpers.js";
@@ -7,6 +8,7 @@ import { provideContext } from "lit-ui-router/context";
7
8
  import { UiView } from "lit-ui-router/pure";
8
9
  import { adoptUiViewContext } from "./adopt-context.js";
9
10
  import { servedMarkerPrefix } from "./served-markers.js";
11
+ import { packageVersion, signatureSelector } from "./signature.js";
10
12
  export { adoptUiViewContext } from "./adopt-context.js";
11
13
  export { isServedViewClass, servedViewBrand, withServedRender } from "./served-view.js";
12
14
  const DEFER = "defer-hydration";
@@ -25,7 +27,7 @@ class UiViewSlotDirective extends RenderLightDirective {
25
27
  }
26
28
  update(part) {
27
29
  const host = part.parentNode;
28
- return typeof host.renderLight === "function" ? host.renderLight() : noChange;
30
+ return isFunction(host.renderLight) ? host.renderLight() : noChange;
29
31
  }
30
32
  }
31
33
  export const uiViewSlot = directive(UiViewSlotDirective);
@@ -39,10 +41,10 @@ const walkWith = (reporter, walk) => {
39
41
  walkReporter = outer;
40
42
  }
41
43
  };
42
- const report = (view, reporter, outcome, error) => {
44
+ const report = (view, reporter, outcome, cause) => {
43
45
  const detail = outcome === "fell-back" ? {
44
46
  outcome,
45
- error
47
+ error: cause
46
48
  } : { outcome };
47
49
  view.dispatchEvent(new CustomEvent(uiViewAdoptEventName, {
48
50
  bubbles: true,
@@ -50,17 +52,17 @@ const report = (view, reporter, outcome, error) => {
50
52
  detail
51
53
  }));
52
54
  try {
53
- reporter?.(view, outcome, error);
55
+ reporter?.(view, outcome, cause);
54
56
  } catch (thrown) {
55
- queueMicrotask(() => {
56
- throw thrown;
57
- });
57
+ if (!isFunction(globalThis.reportError)) throw thrown;
58
+ globalThis.reportError(thrown);
58
59
  }
59
60
  };
60
- const warnMismatch = (view, error) => {
61
- console.warn("lit-ui-router-ssr: this element could not adopt the server render, so it rendered over it instead. One static document answers a whole family of urls, so a client that boots into another state reaches this legitimately.", view.localName, error, ...view instanceof UiView && view.viewContext ? [] : ["lit-ui-router-ssr: this view had no routed component to adopt against, which is also what a router that never started, or whose first transition was not awaited, looks like: call router.start(), await its first successful transition, then hydrateRoot()."]);
61
+ const warnMismatch = (view, cause) => {
62
+ console.warn("lit-ui-router-ssr: this element could not adopt the server render, so it rendered over it instead. One static document answers a whole family of urls, so a client that boots into another state reaches this legitimately.", view.localName, cause, ...view instanceof UiView && view.viewContext ? [] : ["lit-ui-router-ssr: this view had no routed component to adopt against, which is also what a router that never started, or whose first transition was not awaited, looks like: call router.start(), await its first successful transition, then hydrateRoot()."]);
62
63
  };
63
- const isPart = (node, data) => node?.nodeType === Node.COMMENT_NODE && node.data.startsWith(data);
64
+ const isComment = (node) => node?.nodeType === Node.COMMENT_NODE;
65
+ const isPart = (node, data) => isComment(node) && node.data.startsWith(data);
64
66
  const servedPair = (view) => {
65
67
  for (const child of view.childNodes) if (isPart(child, "lit-part")) return child;
66
68
  };
@@ -73,8 +75,7 @@ const hasServedMarkers = (node) => {
73
75
  };
74
76
  const revealMarker = (node) => {
75
77
  if (!isPart(node, servedMarkerPrefix)) return;
76
- const comment = node;
77
- comment.data = comment.data.slice(servedMarkerPrefix.length);
78
+ node.data = node.data.slice(servedMarkerPrefix.length);
78
79
  };
79
80
  const revealNestedPair = (view) => {
80
81
  const markers = [...view.childNodes].filter((node) => isPart(node, servedMarkerPrefix));
@@ -89,13 +90,6 @@ const revealServedMarkers = (node) => {
89
90
  revealServedMarkers(child);
90
91
  }
91
92
  };
92
- const revealEveryMarker = (node) => {
93
- for (const child of node.childNodes) if (child.nodeType === Node.COMMENT_NODE) revealMarker(child);
94
- else if (child instanceof Element) {
95
- if (child.shadowRoot) revealEveryMarker(child.shadowRoot);
96
- revealEveryMarker(child);
97
- }
98
- };
99
93
  const dropServedRender = (view) => {
100
94
  const children = [...view.childNodes];
101
95
  const from = children.findIndex((child) => isPart(child, servedMarkerPrefix) || child instanceof Element && hasServedMarkers(child));
@@ -145,21 +139,55 @@ const pinAdopter = (view, reporter) => {
145
139
  adopt(woken, reporter);
146
140
  });
147
141
  };
148
- const isServed = (container) => {
149
- for (const child of container.childNodes) {
150
- if (isPart(child, "lit-part")) return true;
151
- if (child.nodeType === Node.COMMENT_NODE) continue;
152
- if (child.nodeType === Node.TEXT_NODE && !child.data.trim()) continue;
142
+ const isHydrationSignature = (value) => typeof value === "object" && value !== null && "version" in value && typeof value.version === "string";
143
+ const parseSignature = (json) => {
144
+ try {
145
+ const signature = JSON.parse(json);
146
+ return isHydrationSignature(signature) ? signature : null;
147
+ } catch {
148
+ return null;
149
+ }
150
+ };
151
+ export function readHydrationSignature(container) {
152
+ const block = signatureBlockIn(container);
153
+ return block ? parseSignature(block.text) : null;
154
+ }
155
+ const signatureBlockIn = (container) => [...container.children].find((child) => child.matches(signatureSelector));
156
+ const precedesRender = (block) => {
157
+ let node = block.nextSibling;
158
+ while (node?.nodeType === Node.TEXT_NODE && !node.data.trim()) node = node.nextSibling;
159
+ return isPart(node, "lit-part");
160
+ };
161
+ const releaseLine = (version) => {
162
+ const [major = "", minor = ""] = version.split(".");
163
+ return major === "0" ? `0.${minor}` : major;
164
+ };
165
+ const warnVersionSkew = (served) => {
166
+ console.warn("lit-ui-router-ssr: this document was prerendered by a release line this client does not adopt, so hydrateRoot() left it to a cold render. Prerender it again with the version the client ships. Prerendered by, then client:", served, packageVersion);
167
+ };
168
+ const warnMarkersStripped = () => {
169
+ console.warn("lit-ui-router-ssr: this document carries a hydration signature but no lit-part marker follows it, so hydrateRoot() left it to a cold render. hydrate() reads html comments: serve prerendered pages without stripping them.");
170
+ };
171
+ const isAdoptable = (container) => {
172
+ const block = signatureBlockIn(container);
173
+ const signature = block && parseSignature(block.text);
174
+ if (!signature) return false;
175
+ if (releaseLine(signature.version) !== releaseLine(packageVersion)) {
176
+ warnVersionSkew(signature.version);
153
177
  return false;
154
178
  }
179
+ if (precedesRender(block)) return true;
180
+ warnMarkersStripped();
155
181
  return false;
156
182
  };
157
183
  const makeCold = (container) => {
158
- for (const element of container.querySelectorAll(`[${DEFER}]`)) element.removeAttribute(DEFER);
159
- revealEveryMarker(container);
184
+ container.replaceChildren();
160
185
  };
161
186
  export function hydrateRoot(container, value, options = {}) {
162
- if (!isServed(container)) return false;
187
+ if (!isAdoptable(container)) {
188
+ makeCold(container);
189
+ return false;
190
+ }
163
191
  const { onAdopt, ...renderOptions } = options;
164
192
  const release = provideContext(container, adoptUiViewContext, (view) => adopt(view, onAdopt));
165
193
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","mappings":"AAKA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB;AAEzB,SAA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AAC,YAAY,SAAS,GAAG;EAC3B,SAAS,SAAS;EAElB,OAAO;CACT;CAEA,MAAM,EAAE,SAAS,GAAG,kBAAkB;CAEtC,MAAM,UAAU,eAAe,WAAW,qBAAqB,SAC7D,MAAM,MAAM,OAAO,CACrB;CAEA,IAAI;EACF,SAAS,eAAe,QAAQ,OAAO,WAAW,aAAa,CAAC;CAClE,SAAS,OAAO;EACd,QAAQ;EACR,SAAS,SAAS;EAClB,MAAM;CACR;CAGA,KAAK,MAAM,WAAW,UAAU,iBAAiB,IAAI,MAAM,EAAE,GAC3D,IAAI,EAAE,mBAAmB,SAAS,QAAQ,gBAAgB,KAAK;CAGjE,OAAO;AACT","names":[],"ignoreList":[],"sources":["../../src/client.ts"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-warn.js","mappings":"AAaA,OAAO,SAAS,0BAA0B,SAAwB;CAGhE,QAAQ,KACN,6MACA,OACF;AACF;AAQA,MAAM,mBAAmB,IAAI,QAAiB;AAc9C,OAAO,SAAS,uBAAuB,SAAwB;CAG7D,IAAI,iBAAiB,IAAI,OAAO,GAAG;CACnC,iBAAiB,IAAI,OAAO;CAC5B,QAAQ,KACN,ubAKA,OACF;AACF","names":[],"ignoreList":[],"sources":["../../src/dev-warn.ts"]}
1
+ {"version":3,"file":"dev-warn.js","mappings":"AAaA,OAAO,SAAS,0BAA0B,SAAwB;CAGhE,QAAQ,KACN,6MACA,OACF;AACF;AAQA,MAAM,mBAAmB,IAAI,QAAiB;AAc9C,OAAO,SAAS,uBAAuB,SAAwB;CAI7D,IAAI,iBAAiB,IAAI,OAAO,GAAG;CACnC,iBAAiB,IAAI,OAAO;CAC5B,QAAQ,KACN,ubAKA,OACF;AACF","names":[],"ignoreList":[],"sources":["../../src/dev-warn.ts"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"AAIA,SAGE,iBAMK;AACP,SAAS,cAAkC;AAC3C,SAAS,sBAAsB","names":[],"ignoreList":[],"sources":["../../src/index.ts"]}
1
+ {"version":3,"file":"index.js","mappings":"AAIA,SAGE,iBAMK;AAEP,SAAS,cAAkC;AAE3C,SAAS,sBAAsB","names":[],"ignoreList":[],"sources":["../../src/index.ts"]}