@verajs/renderer 0.2.1 → 0.3.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.
- package/README.md +729 -226
- package/dist/development/vera-renderer-elements.d.ts +39 -0
- package/dist/development/vera-renderer-elements.d.ts.map +1 -0
- package/dist/development/vera-renderer-elements.js +193 -0
- package/dist/development/vera-renderer-elements.js.map +1 -0
- package/dist/development/vera-renderer-hydrate-slots.d.ts +94 -0
- package/dist/development/vera-renderer-hydrate-slots.d.ts.map +1 -0
- package/dist/development/vera-renderer-hydrate-slots.js +325 -0
- package/dist/development/vera-renderer-hydrate-slots.js.map +1 -0
- package/dist/development/vera-renderer-hydration.d.ts +332 -0
- package/dist/development/vera-renderer-hydration.d.ts.map +1 -0
- package/dist/development/vera-renderer-hydration.js +864 -0
- package/dist/development/vera-renderer-hydration.js.map +1 -0
- package/dist/development/vera-renderer-keyed.d.ts +25 -8
- package/dist/development/vera-renderer-keyed.d.ts.map +1 -1
- package/dist/development/vera-renderer-keyed.js +843 -268
- package/dist/development/vera-renderer-keyed.js.map +1 -1
- package/dist/development/vera-renderer-multi-window.d.ts +5 -0
- package/dist/development/vera-renderer-multi-window.d.ts.map +1 -0
- package/dist/development/vera-renderer-multi-window.js +40 -0
- package/dist/development/vera-renderer-multi-window.js.map +1 -0
- package/dist/development/vera-renderer-namespaces.d.ts +64 -0
- package/dist/development/vera-renderer-namespaces.d.ts.map +1 -0
- package/dist/development/vera-renderer-namespaces.js +94 -0
- package/dist/development/vera-renderer-namespaces.js.map +1 -0
- package/dist/development/vera-renderer-native-elements.d.ts +13 -0
- package/dist/development/vera-renderer-native-elements.d.ts.map +1 -0
- package/dist/development/vera-renderer-native-elements.js +231 -0
- package/dist/development/vera-renderer-native-elements.js.map +1 -0
- package/dist/development/vera-renderer-portal.d.ts +29 -0
- package/dist/development/vera-renderer-portal.d.ts.map +1 -0
- package/dist/development/vera-renderer-portal.js +167 -0
- package/dist/development/vera-renderer-portal.js.map +1 -0
- package/dist/development/vera-renderer-profiler.d.ts +113 -138
- package/dist/development/vera-renderer-profiler.d.ts.map +1 -1
- package/dist/development/vera-renderer-profiler.js +2428 -2101
- package/dist/development/vera-renderer-profiler.js.map +1 -1
- package/dist/development/vera-renderer-slots.d.ts +88 -92
- package/dist/development/vera-renderer-slots.d.ts.map +1 -1
- package/dist/development/vera-renderer-slots.js +1834 -1237
- package/dist/development/vera-renderer-slots.js.map +1 -1
- package/dist/development/vera-renderer-spread.d.ts +8 -29
- package/dist/development/vera-renderer-spread.d.ts.map +1 -1
- package/dist/development/vera-renderer-spread.js +542 -461
- package/dist/development/vera-renderer-spread.js.map +1 -1
- package/dist/development/vera-renderer-tag.d.ts +12 -3
- package/dist/development/vera-renderer-tag.d.ts.map +1 -1
- package/dist/development/vera-renderer-tag.js +671 -494
- package/dist/development/vera-renderer-tag.js.map +1 -1
- package/dist/development/vera-renderer-until.d.ts +24 -0
- package/dist/development/vera-renderer-until.d.ts.map +1 -0
- package/dist/development/vera-renderer-until.js +83 -0
- package/dist/development/vera-renderer-until.js.map +1 -0
- package/dist/development/vera-renderer.d.ts +77 -96
- package/dist/development/vera-renderer.d.ts.map +1 -1
- package/dist/development/vera-renderer.js +2401 -2061
- package/dist/development/vera-renderer.js.map +1 -1
- package/dist/vera-renderer-elements.min.js +2 -0
- package/dist/vera-renderer-elements.min.js.map +1 -0
- package/dist/vera-renderer-hydrate-slots.min.js +2 -0
- package/dist/vera-renderer-hydrate-slots.min.js.map +1 -0
- package/dist/vera-renderer-hydration.min.js +3 -0
- package/dist/vera-renderer-hydration.min.js.map +1 -0
- package/dist/vera-renderer-keyed.min.js +1 -1
- package/dist/vera-renderer-keyed.min.js.map +1 -1
- package/dist/vera-renderer-multi-window.min.js +2 -0
- package/dist/vera-renderer-multi-window.min.js.map +1 -0
- package/dist/vera-renderer-namespaces.min.js +2 -0
- package/dist/vera-renderer-namespaces.min.js.map +1 -0
- package/dist/vera-renderer-native-elements.min.js +2 -0
- package/dist/vera-renderer-native-elements.min.js.map +1 -0
- package/dist/vera-renderer-portal.min.js +2 -0
- package/dist/vera-renderer-portal.min.js.map +1 -0
- package/dist/vera-renderer-slots.min.js +1 -1
- package/dist/vera-renderer-slots.min.js.map +1 -1
- package/dist/vera-renderer-spread.min.js +1 -1
- package/dist/vera-renderer-spread.min.js.map +1 -1
- package/dist/vera-renderer-tag.min.js +1 -1
- package/dist/vera-renderer-tag.min.js.map +1 -1
- package/dist/vera-renderer-until.min.js +2 -0
- package/dist/vera-renderer-until.min.js.map +1 -0
- package/dist/vera-renderer.min.js +1 -1
- package/dist/vera-renderer.min.js.map +1 -1
- package/package.json +52 -9
- package/dist/development/vera-renderer-hydrate.d.ts +0 -118
- package/dist/development/vera-renderer-hydrate.d.ts.map +0 -1
- package/dist/development/vera-renderer-hydrate.js +0 -3092
- package/dist/development/vera-renderer-hydrate.js.map +0 -1
- package/dist/vera-renderer-hydrate.min.js +0 -2
- package/dist/vera-renderer-hydrate.min.js.map +0 -1
|
@@ -1,84 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
2
|
+
* The renderer's cross-file and public types — one `types.ts` at the import-graph root, per
|
|
3
|
+
* CODE-PRINCIPLES §1.
|
|
4
|
+
*
|
|
5
|
+
* **What is here and what deliberately is not.** Everything in this file is a pure data shape: it
|
|
6
|
+
* names no runtime value, so it can sit upstream of every module in the package and nothing here
|
|
7
|
+
* can pull a class into the import graph. The renderer's remaining cross-file types — `Item`,
|
|
8
|
+
* `ListStrategy`, `KeyedResult` — name the `Instance` and `ChildPart` CLASSES in their definitions,
|
|
9
|
+
* which puts them structurally downstream of `renderer.ts`; they stay beside those classes, and
|
|
10
|
+
* §1's "one file at the import-graph root" records that limit rather than pretending otherwise.
|
|
11
|
+
* Restating a class's shape here to satisfy the letter of the rule would create exactly the twin
|
|
12
|
+
* §1 forbids.
|
|
13
|
+
*
|
|
14
|
+
* Moving `ProfileReport` and `OverlayOptions` here dissolved a real cycle: `profiler.ts` imported
|
|
15
|
+
* `OverlayOptions` from `overlay.ts` while `overlay.ts` imported `ProfileReport` back from
|
|
16
|
+
* `profiler.ts`. Type-only, so it was erased and never a runtime cycle — but it is the shape this
|
|
17
|
+
* file's position in the graph exists to make impossible.
|
|
13
18
|
*/
|
|
14
|
-
|
|
15
|
-
interface OverlayOptions {
|
|
16
|
-
/** Corner to pin to. Default `bottom-right`. */
|
|
17
|
-
corner?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
18
|
-
/** How often to repaint, in milliseconds. Default 400. */
|
|
19
|
-
interval?: number;
|
|
20
|
-
/** Churn rows to show before collapsing the rest into a count. Default 4. */
|
|
21
|
-
rows?: number;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
19
|
/**
|
|
25
|
-
*
|
|
20
|
+
* What a template tag (`html`, `svg`, `mathml`) produces — the compiled shape every renderer entry
|
|
21
|
+
* point accepts, and the one type a consumer normally names.
|
|
26
22
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* The architecture here is the one that wins that benchmark:
|
|
32
|
-
*
|
|
33
|
-
* 1. A tagged template literal's `strings` array is frozen and IDENTICAL for every call from the
|
|
34
|
-
* same call site, so it is a cache key for the template's static shape. The shape is parsed
|
|
35
|
-
* ONCE into a `<template>` element with markers where the expressions go.
|
|
36
|
-
* 2. Rendering clones that template and binds "parts" to the marker positions. Every later render
|
|
37
|
-
* of the same shape only compares and commits the dynamic values — static content is never
|
|
38
|
-
* touched again.
|
|
39
|
-
* 3. Arrays reconcile KEYED (see `keyed()`), with head/tail fast paths and map-based moves, so a
|
|
40
|
-
* reorder moves nodes instead of rebuilding them.
|
|
41
|
-
*
|
|
42
|
-
* Built in, where lit-html requires directive imports: keyed list reconciliation (`keyed`),
|
|
43
|
-
* element refs (element-position expressions), toggled-DOM preservation (`hold`), and a
|
|
44
|
-
* whole-range fast clear — one `textContent = ''` where lit removes thousands of nodes one at a
|
|
45
|
-
* time. Like-for-like (lit-html + repeat + ref + cache: 5 021 B gzip), this file is ~28% smaller.
|
|
46
|
-
*
|
|
47
|
-
* What it deliberately does NOT have, which is why it is smaller than lit-html: no directive
|
|
48
|
-
* protocol, no `noChange`/`nothing` sentinels (in a single-expression attribute, `null`/`undefined`
|
|
49
|
-
* REMOVE the attribute; in a child, they clear it), no sanitizer indirection, no async parts, no
|
|
50
|
-
* dev-mode branches.
|
|
51
|
-
*
|
|
52
|
-
* Known limits, deliberate and shared with lit-html's envelope: no bindings inside comments (the
|
|
53
|
-
* value is consumed and ignored), no dynamic tag names, and nested `<template>` elements' contents
|
|
54
|
-
* are not traversed.
|
|
55
|
-
*
|
|
56
|
-
* CONTRACTS THE SPEED PAYS FOR — these are the trade, documented rather than discovered:
|
|
57
|
-
*
|
|
58
|
-
* - **The renderer owns its container below the mount point.** The whole-range fast clear wipes
|
|
59
|
-
* everything in a parent the part fully owns, including nodes user code appended there by hand
|
|
60
|
-
* (lit-html would preserve them). Same contract as mounting Vue or React into a container.
|
|
61
|
-
* - **Do not call `Node.normalize()` on rendered content.** Child anchors are text nodes, and
|
|
62
|
-
* normalize merges adjacent text — lit-html's comment anchors are immune to this; ours are not.
|
|
63
|
-
* - **A plain string renders as text, never as HTML.** The Reef renderer parsed strings as markup;
|
|
64
|
-
* this one has no innerHTML sink at all (an XSS class removed). The deliberate escape hatch for
|
|
65
|
-
* trusted markup is a property binding: `.innerHTML=${trusted}`.
|
|
66
|
-
* - **Hydration is automatic and markerless.** The first render into a container that already has
|
|
67
|
-
* children adopts them as server output of the same template (statics matched byte-for-byte,
|
|
68
|
-
* anchors installed by splitting live text at known value positions), falling back to a clean
|
|
69
|
-
* render on any mismatch. Requires the initial client render to match server state — same
|
|
70
|
-
* contract as React/Vue hydration.
|
|
71
|
-
* - **No directive protocol.** The template language itself is closed to extension — Vera extends
|
|
72
|
-
* at the framework layer (inserts) and through element refs, not inside the renderer's value
|
|
73
|
-
* handling.
|
|
74
|
-
* - Event handlers are invoked with `this` bound to the ELEMENT (lit binds its host).
|
|
75
|
-
*
|
|
76
|
-
* NAMING NOTE: internal class fields and methods are `_`-prefixed because the production build
|
|
77
|
-
* mangles properties matching /^_[a-z]/ (see defaultRollupConfig). That is what lets this file use
|
|
78
|
-
* full descriptive names while still shipping one-letter properties — locals and top-level names
|
|
79
|
-
* are mangled by default anyway, but property names are not. `_$litType$` and `handleEvent`
|
|
80
|
-
* deliberately do not match the pattern: the first is an interop wire format, the second is called
|
|
81
|
-
* by the DOM itself.
|
|
23
|
+
* `strings` is the template literal's own `strings` array and is the TEMPLATE'S IDENTITY: the
|
|
24
|
+
* engine interns it per call site, so two literals with identical text are two templates and
|
|
25
|
+
* rendering one after the other is a teardown, not an update. Anything building these by hand must
|
|
26
|
+
* hand back the same array to get an update.
|
|
82
27
|
*/
|
|
83
28
|
type TemplateResult = {
|
|
84
29
|
/** 1 = html, 2 = svg, 3 = mathml — the markers core's built-in tags produce. */
|
|
@@ -88,65 +33,8 @@ type TemplateResult = {
|
|
|
88
33
|
/** Set by `keyed()`; drives keyed list reconciliation. */
|
|
89
34
|
key?: unknown;
|
|
90
35
|
};
|
|
91
|
-
/**
|
|
92
|
-
* Preserves the DOM of templates a child position toggles away from, instead of destroying it —
|
|
93
|
-
* form values, scroll positions and media playback survive the round trip (lit-html calls this
|
|
94
|
-
* `cache`). Stashed DOM is parked in its instance's own fragment and re-adopted on return.
|
|
95
|
-
*
|
|
96
|
-
* ```js
|
|
97
|
-
* html`<div>${hold(editing ? editor() : viewer())}</div>`
|
|
98
|
-
* ```
|
|
99
|
-
*
|
|
100
|
-
* **Anything that is not a template passes straight through.** There is nothing to park for a
|
|
101
|
-
* string, a list, `null` or `false`, and the branch that produces one is the ordinary shape of the
|
|
102
|
-
* expression this wraps — `hold(editing && editor())`, `hold(row ?? null)`. Wrapping those handed
|
|
103
|
-
* the renderer a `{ $h }` carrying a non-template, which reached the held-commit path and threw on
|
|
104
|
-
* `result.strings`: a whole render lost, from a value the same expression renders happily one
|
|
105
|
-
* character to the left. Decided here rather than in the renderer so the hot path pays nothing.
|
|
106
|
-
*/
|
|
107
|
-
declare const hold: <T>(result: T) => T | {
|
|
108
|
-
$h: TemplateResult;
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Writes a template result into a container. The renderer's imperative draw: no reactivity, no
|
|
112
|
-
* lifecycle, no knowledge of components. Slots into Vera via `wire([renderer])`; core's built-in
|
|
113
|
-
* `html` tag already produces the accepted shape, so no `setHtml` call is required — though
|
|
114
|
-
* lit-html's `html` also works, its results being structurally identical.
|
|
115
|
-
*
|
|
116
|
-
* **It owns its own range and nothing else.** The first call appends a marker and anchors a root
|
|
117
|
-
* part there; later calls with the same container reuse that part and walk only the value slots, so
|
|
118
|
-
* nodes are updated in place rather than rebuilt. Content that was already in the container stays.
|
|
119
|
-
*
|
|
120
|
-
* **Named for the relationship, not the act.** It was `render` until 0.2.0, which collided with
|
|
121
|
-
* core's `render` — a different function, with a different arity, that declares a *reactive*
|
|
122
|
-
* template and commits a component's setup. Both were public and both were documented, so a reader
|
|
123
|
-
* who knew one misread the other. `renderElement` and `renderDom` were considered and rejected: this
|
|
124
|
-
* renders *into* a container, and the container is a `Node` — a shadow root and a fragment are both
|
|
125
|
-
* valid, so "element" would be a lie in the type. Argument order is lit-html's on purpose.
|
|
126
|
-
*
|
|
127
|
-
* HYDRATION lives in `@verajs/renderer/hydrate` — a drop-in superset entry whose `renderInto` adopts
|
|
128
|
-
* existing server-rendered children on first render. SSR apps import from there instead of here;
|
|
129
|
-
* this entry carries zero hydration code.
|
|
130
|
-
*/
|
|
131
|
-
declare const renderInto: (result: unknown, container: Node) => void;
|
|
132
|
-
declare const renderer: {
|
|
133
|
-
name: string;
|
|
134
|
-
on: "render";
|
|
135
|
-
fn: never;
|
|
136
|
-
priority: number;
|
|
137
|
-
/**
|
|
138
|
-
* Typed against the registry `wire` actually hands over, not a narrower shape that happens to
|
|
139
|
-
* describe the one lookup this makes. A structural `{ get(name: 'value'): … }` is **not**
|
|
140
|
-
* assignable from `Inserts`, so `wire([renderer])` failed to compile in a consumer's project while
|
|
141
|
-
* this repo's own typecheck — which reads sources, not the shipped `.d.ts` — saw nothing.
|
|
142
|
-
*/
|
|
143
|
-
connect: (given: {
|
|
144
|
-
get(name: never): unknown;
|
|
145
|
-
}) => void;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
36
|
/** One template identity replacing another at the same position, and how often. */
|
|
149
|
-
|
|
37
|
+
type Churn = {
|
|
150
38
|
/** The template that was torn down, rendered readably. */
|
|
151
39
|
from: string;
|
|
152
40
|
/** The template that replaced it. */
|
|
@@ -155,8 +43,16 @@ interface Churn {
|
|
|
155
43
|
count: number;
|
|
156
44
|
/** Where in the DOM it happened, e.g. `main#app > ul.list`. First occurrence only. */
|
|
157
45
|
where: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* What `getReport()`, `stopProfiling()` and `profile()` hand back.
|
|
49
|
+
*
|
|
50
|
+
* The number to read first is `rebuilds`, with `churn` naming the culprits: an update commits
|
|
51
|
+
* values into DOM that already exists, while a rebuild tears a subtree down and builds another,
|
|
52
|
+
* and a template that rebuilds every render is the single most expensive mistake available in this
|
|
53
|
+
* renderer. `creates` is not a problem — it is what rendering into an empty slot costs once.
|
|
54
|
+
*/
|
|
55
|
+
type ProfileReport = {
|
|
160
56
|
/** Completed top-level `render()` calls. Nested renders are folded into their outermost frame. */
|
|
161
57
|
frames: number;
|
|
162
58
|
/** Total milliseconds spent inside `render()`. */
|
|
@@ -171,7 +67,86 @@ interface ProfileReport {
|
|
|
171
67
|
rebuilds: number;
|
|
172
68
|
/** Rebuilds grouped by template pair, worst first. */
|
|
173
69
|
churn: Churn[];
|
|
174
|
-
}
|
|
70
|
+
};
|
|
71
|
+
/** How `showProfiler()` places and paces its in-page panel. Every field has a default. */
|
|
72
|
+
type OverlayOptions = {
|
|
73
|
+
/** Corner to pin to. Default `bottom-right`. */
|
|
74
|
+
corner?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
75
|
+
/** How often to repaint, in milliseconds. Default 400. */
|
|
76
|
+
interval?: number;
|
|
77
|
+
/** Churn rows to show before collapsing the rest into a count. Default 4. */
|
|
78
|
+
rows?: number;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @verajs/renderer — a template-identity renderer.
|
|
83
|
+
*
|
|
84
|
+
* A tagged template's `strings` array is interned per call site, so it keys a parsed `<template>`.
|
|
85
|
+
* An instance clones it and binds the expression positions; every later render of the same shape
|
|
86
|
+
* commits only the values that changed. Lists reconcile by index here, by key through
|
|
87
|
+
* `@verajs/renderer/keyed`.
|
|
88
|
+
*
|
|
89
|
+
* Contracts the speed pays for:
|
|
90
|
+
* - The renderer owns its container below the mount point: a part that owns a whole parent clears it
|
|
91
|
+
* with one `textContent = ''`.
|
|
92
|
+
* - Do not `normalize()` rendered content — child anchors are text nodes.
|
|
93
|
+
* - A string renders as text, never as markup. There is no `innerHTML` sink.
|
|
94
|
+
*
|
|
95
|
+
* Internal members are `_`-prefixed because the production build mangles `/^_[a-z]/`. `$`-named
|
|
96
|
+
* members cross bundle boundaries (keyed, spread, slots) and survive mangling by not matching it.
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Preserves the DOM of a template a position toggles away from, instead of destroying it — form values
|
|
101
|
+
* and media state survive the round trip. Anything that is not a template passes straight through, so
|
|
102
|
+
* `hold(editing && editor())` is fine.
|
|
103
|
+
*
|
|
104
|
+
* ```js
|
|
105
|
+
* html`<div>${hold(editing ? editor() : viewer())}</div>`
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
declare const hold: <T>(result: T) => T | {
|
|
109
|
+
$h: TemplateResult;
|
|
110
|
+
};
|
|
111
|
+
declare const renderInto: (result: unknown, container: Node, owns?: boolean) => void;
|
|
112
|
+
type Registry = {
|
|
113
|
+
get(name: never): unknown;
|
|
114
|
+
$S?: unknown;
|
|
115
|
+
$F?: unknown;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* What a consumer's TypeScript sees — the shape `wire` accepts (`Wireable`, structurally: this package imports no
|
|
119
|
+
* types from `@verajs/inserts`): a DESCRIPTOR, `on: 'render'`, callable with options to give `[renderer, a connector]`.
|
|
120
|
+
* On a server `on` is in fact `undefined` (decided at load, below) — a runtime decision the type does not carry, as
|
|
121
|
+
* the previous `on: 'render' | undefined` did: that matched neither a descriptor nor a connector, so `wire([renderer])`
|
|
122
|
+
* stopped compiling in a consumer's project (tests/consumer, 2026-10-10).
|
|
123
|
+
*/
|
|
124
|
+
type RendererModule = ((options?: {
|
|
125
|
+
shadow?: 'open' | 'closed' | false | ShadowRootInit;
|
|
126
|
+
foreignNodes?: 'preserve' | 'drop';
|
|
127
|
+
}) => readonly [RendererModule, (registry: Registry) => void]) & {
|
|
128
|
+
readonly on: 'render';
|
|
129
|
+
fn: never;
|
|
130
|
+
priority: number;
|
|
131
|
+
connect: (given: Registry) => void;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* **`renderer` is a DUAL** — `wire([renderer])` as it always was, or `wire([renderer({ shadow: 'open' })])` to set the
|
|
135
|
+
* app's default root: every component whose own `shadow` option says nothing gets it (core's `init` reads it after the
|
|
136
|
+
* component's own and before light DOM). `renderer({ foreignNodes: 'preserve' })` is the same for `foreignNodes`, and sets
|
|
137
|
+
* COMPONENT roots only — a container handed to `renderInto` (`document.body`, `#app`) always keeps foreign nodes. Called, it returns `[renderer, a connector setting the default]` — `wire`
|
|
138
|
+
* takes nested arrays — so the module is one function with its descriptor fields on it, and nothing is made per call
|
|
139
|
+
* but that connector.
|
|
140
|
+
*
|
|
141
|
+
* **On a server it declines its render insert** (Brian's (b′), 2026-10-10): `@verajs/ssr` renders with its own renderer,
|
|
142
|
+
* and a client one wired in shared app code used to DISPLACE it, breaking every server render. There `on` is undefined,
|
|
143
|
+
* which makes `wire` hand this function the registry as a CONNECTOR: it still CONNECTS — the registry, `untracked`, the
|
|
144
|
+
* hydration hand-off: a process that loaded ssr may install a client DOM and call renderInto directly (tests/spread-ssr
|
|
145
|
+
* does) — and only the render INSERT is declined, so one shared `wire([renderer({ shadow })])` carries the same default
|
|
146
|
+
* to both sides. Development says so once per process.
|
|
147
|
+
*/
|
|
148
|
+
declare const renderer: RendererModule;
|
|
149
|
+
|
|
175
150
|
/** Begin collecting. Calling this while already profiling restarts the collection. */
|
|
176
151
|
declare const startProfiling: () => void;
|
|
177
152
|
/** What has been measured so far, without ending the session. Drives the live overlay. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vera-renderer-profiler.d.ts","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"vera-renderer-profiler.d.ts","sources":["../../src/types.ts","../../src/renderer.ts","../../src/profiler.ts"],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBH;;;;;;;;;;;;;;;;AAgBG;;AAqPC;;;;AAIG;AACH;AACA;AACA;;cAEE,IAAI;sBACM;AACV;AAYA,cAAA,UAAU,+BAAW,IAAA;AACrB,KAAA,QAAA;;;AAEA;;;;AAIA;AACA;AACE;;;AAEA,KAAA,cAAE;AACF,yCAAyB,cAAA;AACvB;8BAA6B,aAAc,QAAC;AACvC;;;AAEH,qBAAA,QAAI;AAAwD;AAC5D;;;;;AAGG;;AAEL;AACE;;;AAEK;;;AAEL;wBACA,cAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxRrB;AACH;AASA;AAKA;AAIA,cAAa,YAAM,aAAA,cAAA;AACnB;AACA,cAAc,YAAE,WAAA,aAAA;;;;","names":[]}
|