@oddsquad/vite-plugin-lit 0.3.0 → 0.5.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 (124) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/README.md +26 -11
  3. package/bin.mjs +16 -12
  4. package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BvWe4sTJ.js → browser-agent-rpc-BXhoSh1z-CRHFLjFo.js} +2 -2
  5. package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BvWe4sTJ.js.map → browser-agent-rpc-BXhoSh1z-CRHFLjFo.js.map} +1 -1
  6. package/dist/client/assets/flow-DK8vmxvN.js +745 -0
  7. package/dist/client/assets/flow-DK8vmxvN.js.map +1 -0
  8. package/dist/client/assets/{index-CFrVgNfS.js → index-Gn4Hk_9s.js} +2749 -793
  9. package/dist/client/assets/index-Gn4Hk_9s.js.map +1 -0
  10. package/dist/client/index.html +11 -1
  11. package/lib/devframe/definition.d.ts +7 -0
  12. package/lib/devframe/definition.d.ts.map +1 -1
  13. package/lib/devframe/definition.js +56 -11
  14. package/lib/devframe/definition.js.map +1 -1
  15. package/lib/devframe/launch-editor.d.ts +20 -0
  16. package/lib/devframe/launch-editor.d.ts.map +1 -0
  17. package/lib/devframe/launch-editor.js +40 -0
  18. package/lib/devframe/launch-editor.js.map +1 -0
  19. package/lib/devframe/protocol.d.ts +31 -4
  20. package/lib/devframe/protocol.d.ts.map +1 -1
  21. package/lib/devframe/protocol.js +22 -3
  22. package/lib/devframe/protocol.js.map +1 -1
  23. package/lib/devframe/rpc-source.d.ts +44 -0
  24. package/lib/devframe/rpc-source.d.ts.map +1 -0
  25. package/lib/devframe/rpc-source.js +150 -0
  26. package/lib/devframe/rpc-source.js.map +1 -0
  27. package/lib/devframe/source.d.ts +12 -0
  28. package/lib/devframe/source.d.ts.map +1 -1
  29. package/lib/devframe/source.js +12 -0
  30. package/lib/devframe/source.js.map +1 -1
  31. package/lib/devframe/vite.d.ts +2 -0
  32. package/lib/devframe/vite.d.ts.map +1 -1
  33. package/lib/devframe/vite.js +3 -8
  34. package/lib/devframe/vite.js.map +1 -1
  35. package/lib/options.d.ts +136 -0
  36. package/lib/options.d.ts.map +1 -0
  37. package/lib/options.js +175 -0
  38. package/lib/options.js.map +1 -0
  39. package/lib/override-baselines.d.ts +17 -0
  40. package/lib/override-baselines.d.ts.map +1 -0
  41. package/lib/override-baselines.js +25 -0
  42. package/lib/override-baselines.js.map +1 -0
  43. package/lib/plugin.d.ts +6 -148
  44. package/lib/plugin.d.ts.map +1 -1
  45. package/lib/plugin.js +22 -477
  46. package/lib/plugin.js.map +1 -1
  47. package/lib/plugins/css-literals.d.ts +15 -0
  48. package/lib/plugins/css-literals.d.ts.map +1 -0
  49. package/lib/plugins/css-literals.js +154 -0
  50. package/lib/plugins/css-literals.js.map +1 -0
  51. package/lib/plugins/css-queries.d.ts +20 -0
  52. package/lib/plugins/css-queries.d.ts.map +1 -0
  53. package/lib/plugins/css-queries.js +139 -0
  54. package/lib/plugins/css-queries.js.map +1 -0
  55. package/lib/plugins/open-in-editor.d.ts +16 -0
  56. package/lib/plugins/open-in-editor.d.ts.map +1 -0
  57. package/lib/plugins/open-in-editor.js +96 -0
  58. package/lib/plugins/open-in-editor.js.map +1 -0
  59. package/lib/plugins/shared.d.ts +13 -0
  60. package/lib/plugins/shared.d.ts.map +1 -0
  61. package/lib/plugins/shared.js +23 -0
  62. package/lib/plugins/shared.js.map +1 -0
  63. package/lib/plugins/timeline-virtual.d.ts +19 -0
  64. package/lib/plugins/timeline-virtual.d.ts.map +1 -0
  65. package/lib/plugins/timeline-virtual.js +53 -0
  66. package/lib/plugins/timeline-virtual.js.map +1 -0
  67. package/lib/runtime/css.d.ts.map +1 -1
  68. package/lib/runtime/css.js +9 -2
  69. package/lib/runtime/css.js.map +1 -1
  70. package/lib/runtime/indicator.js.map +1 -1
  71. package/lib/runtime/inspector/install.js +65 -13
  72. package/lib/runtime/inspector/install.js.map +1 -1
  73. package/lib/runtime/inspector/serialize.d.ts.map +1 -1
  74. package/lib/runtime/inspector/serialize.js +20 -0
  75. package/lib/runtime/inspector/serialize.js.map +1 -1
  76. package/lib/runtime/overrides.d.ts +4 -10
  77. package/lib/runtime/overrides.d.ts.map +1 -1
  78. package/lib/runtime/overrides.js +5 -3
  79. package/lib/runtime/overrides.js.map +1 -1
  80. package/lib/runtime/page-channel.d.ts +52 -0
  81. package/lib/runtime/page-channel.d.ts.map +1 -0
  82. package/lib/runtime/page-channel.js +67 -0
  83. package/lib/runtime/page-channel.js.map +1 -0
  84. package/lib/runtime/patch.d.ts.map +1 -1
  85. package/lib/runtime/patch.js +2 -1
  86. package/lib/runtime/patch.js.map +1 -1
  87. package/lib/runtime/rpc-transport.d.ts +46 -0
  88. package/lib/runtime/rpc-transport.d.ts.map +1 -0
  89. package/lib/runtime/rpc-transport.js +82 -0
  90. package/lib/runtime/rpc-transport.js.map +1 -0
  91. package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -1
  92. package/lib/runtime/source-overlay/overlay-element.js +30 -7
  93. package/lib/runtime/source-overlay/overlay-element.js.map +1 -1
  94. package/lib/runtime/timeline/install.js +25 -9
  95. package/lib/runtime/timeline/install.js.map +1 -1
  96. package/lib/runtime/timeline/public-api.d.ts +2 -2
  97. package/lib/runtime/timeline/public-api.d.ts.map +1 -1
  98. package/lib/runtime/timeline/public-api.js +13 -5
  99. package/lib/runtime/timeline/public-api.js.map +1 -1
  100. package/lib/runtime/timeline/render.d.ts +15 -6
  101. package/lib/runtime/timeline/render.d.ts.map +1 -1
  102. package/lib/runtime/timeline/render.js +150 -11
  103. package/lib/runtime/timeline/render.js.map +1 -1
  104. package/lib/runtime/timeline/transport.d.ts +6 -9
  105. package/lib/runtime/timeline/transport.d.ts.map +1 -1
  106. package/lib/runtime/timeline/transport.js.map +1 -1
  107. package/lib/timeline/filter.d.ts +38 -0
  108. package/lib/timeline/filter.d.ts.map +1 -0
  109. package/lib/timeline/filter.js +44 -0
  110. package/lib/timeline/filter.js.map +1 -0
  111. package/lib/timeline/tracks.d.ts +113 -0
  112. package/lib/timeline/tracks.d.ts.map +1 -0
  113. package/lib/timeline/tracks.js +168 -0
  114. package/lib/timeline/tracks.js.map +1 -0
  115. package/package.json +9 -1
  116. package/types/timeline.d.ts +50 -1
  117. package/types/timeline.d.ts.map +1 -1
  118. package/types/timeline.js +4 -0
  119. package/types/timeline.js.map +1 -1
  120. package/dist/client/assets/index-CFrVgNfS.js.map +0 -1
  121. package/lib/timeline-plugin.d.ts +0 -72
  122. package/lib/timeline-plugin.d.ts.map +0 -1
  123. package/lib/timeline-plugin.js +0 -359
  124. package/lib/timeline-plugin.js.map +0 -1
@@ -0,0 +1,168 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ /**
7
+ * Where a span stops occupying its row. A point event occupies only its own
8
+ * instant; a span whose end has not arrived (still running, or its end fell
9
+ * out of the buffer) occupies the rest of the recording, because that is
10
+ * where it is drawn — up to the live edge.
11
+ */
12
+ export const occupiedEnd = (span) => {
13
+ if (span.end !== undefined) return span.end;
14
+ return span.groupId === undefined ? span.start : Infinity;
15
+ };
16
+ /**
17
+ * Groups spans into one track per layer, in `layers` order, then any layer
18
+ * the spans mention that `layers` does not (a custom layer announced after the
19
+ * last `get-meta`), in first-seen order. A layer with no spans still gets an
20
+ * empty track, so a lane does not appear and vanish as events arrive.
21
+ *
22
+ * Within a track, spans are packed greedily: each goes into the first row
23
+ * whose last span has ended by the time it starts. Lit's lifecycle phases
24
+ * nest, so one update tick lands as `performUpdate` on row 0 and
25
+ * `willUpdate` / `update` / `updated` side by side on row 1 — the flame shape
26
+ * falls out of the packing without modelling it.
27
+ */
28
+ export const buildTracks = (spans, layers) => {
29
+ const byLayer = new Map();
30
+ for (const layer of layers) byLayer.set(layer.id, []);
31
+ for (const span of spans) {
32
+ let list = byLayer.get(span.layerId);
33
+ if (list === undefined) {
34
+ list = [];
35
+ byLayer.set(span.layerId, list);
36
+ }
37
+ list.push(span);
38
+ }
39
+ return [...byLayer].map(([layerId, list]) => ({
40
+ layerId,
41
+ rows: packRows(list),
42
+ }));
43
+ };
44
+ const packRows = (spans) => {
45
+ // `toSpans` already sorts by start; re-sort only if a caller did not.
46
+ const sorted = spans.every((s, i) => i === 0 || spans[i - 1].start <= s.start)
47
+ ? spans
48
+ : [...spans].sort((a, b) => a.start - b.start);
49
+ const rows = [];
50
+ const rowEnds = [];
51
+ for (const span of sorted) {
52
+ let row = rowEnds.findIndex((end) => end <= span.start);
53
+ if (row === -1) {
54
+ row = rows.length;
55
+ rows.push([]);
56
+ rowEnds.push(-Infinity);
57
+ }
58
+ rows[row].push(span);
59
+ rowEnds[row] = occupiedEnd(span);
60
+ }
61
+ return rows;
62
+ };
63
+ /**
64
+ * The recording's time bounds over `spans`: the earliest start, and the
65
+ * latest instant anything is known to have happened (an end, or the start of
66
+ * a span with none). The origin is the earliest start rather than zero
67
+ * because the panel's buffer is capped and rolls its oldest events off; a
68
+ * long recording would otherwise open on an empty stretch.
69
+ */
70
+ export const timeBounds = (spans) => {
71
+ if (spans.length === 0) return {origin: 0, extent: 0};
72
+ let origin = Infinity;
73
+ let last = -Infinity;
74
+ for (const span of spans) {
75
+ origin = Math.min(origin, span.start);
76
+ last = Math.max(last, span.end ?? span.start);
77
+ }
78
+ return {origin, extent: last - origin};
79
+ };
80
+ /** Deepest zoom, in multiples of "fit": about a microsecond per pixel on a
81
+ * second-long recording, past which there is nothing left to separate. */
82
+ export const MAX_ZOOM = 100_000;
83
+ /** A recording with a single instant in it still needs a nonzero axis. */
84
+ const MIN_EXTENT_MS = 1;
85
+ /**
86
+ * Builds the scale for a plot `width` pixels wide showing a recording that
87
+ * begins at `originMs` and runs for `extentMs`.
88
+ *
89
+ * `zoom` is a multiple of "fit" (1 shows the whole recording); `pan` is how
90
+ * many milliseconds past the origin the left edge sits. Both are clamped, so
91
+ * callers can apply a raw wheel or drag delta and read back where it landed.
92
+ */
93
+ export const timeScale = (originMs, extentMs, width, zoom = 1, pan = 0) => {
94
+ const extent = Math.max(extentMs, MIN_EXTENT_MS);
95
+ const z = clampZoom(zoom);
96
+ const visibleMs = extent / z;
97
+ const p = clampPan(pan, extent, z);
98
+ const pxPerMs = Math.max(width, 1) / visibleMs;
99
+ const start = originMs + p;
100
+ return {
101
+ pxPerMs,
102
+ start,
103
+ end: start + visibleMs,
104
+ toX: (ms) => (ms - start) * pxPerMs,
105
+ toMs: (x) => start + x / pxPerMs,
106
+ };
107
+ };
108
+ export const clampZoom = (zoom) =>
109
+ Math.min(Math.max(Number.isNaN(zoom) ? 1 : zoom, 1), MAX_ZOOM);
110
+ /** Keeps the visible window inside the recording. */
111
+ export const clampPan = (pan, extentMs, zoom) => {
112
+ const extent = Math.max(extentMs, MIN_EXTENT_MS);
113
+ const max = extent - extent / clampZoom(zoom);
114
+ return Math.min(Math.max(Number.isNaN(pan) ? 0 : pan, 0), max);
115
+ };
116
+ /** The pan that puts the live edge (the end of the recording) at the right
117
+ * of the plot, for following a recording in progress. */
118
+ export const livePan = (extentMs, zoom) => clampPan(Infinity, extentMs, zoom);
119
+ /**
120
+ * Zooms by `factor` while keeping the millisecond under pixel `x` where it
121
+ * is, which is what a wheel over a timeline is expected to do.
122
+ */
123
+ export const zoomAt = (originMs, extentMs, width, zoom, pan, x, factor) => {
124
+ const before = timeScale(originMs, extentMs, width, zoom, pan);
125
+ const anchor = before.toMs(x);
126
+ const nextZoom = clampZoom(clampZoom(zoom) * factor);
127
+ const after = timeScale(originMs, extentMs, width, nextZoom, 0);
128
+ const nextPan = anchor - originMs - x / after.pxPerMs;
129
+ return {zoom: nextZoom, pan: clampPan(nextPan, extentMs, nextZoom)};
130
+ };
131
+ /**
132
+ * Index range `[from, to)` of the spans in `row` that intersect the window
133
+ * `[start, end]`, found by binary search so a zoomed-in lane renders a
134
+ * handful of marks rather than walking thousands.
135
+ *
136
+ * Only the span just before the first one starting inside the window can
137
+ * reach into it, because a row's spans never overlap.
138
+ */
139
+ export const visibleRange = (row, start, end) => {
140
+ const firstAtOrAfter = (t, inclusive) => {
141
+ let lo = 0;
142
+ let hi = row.length;
143
+ while (lo < hi) {
144
+ const mid = (lo + hi) >> 1;
145
+ const s = row[mid].start;
146
+ if (inclusive ? s < t : s <= t) lo = mid + 1;
147
+ else hi = mid;
148
+ }
149
+ return lo;
150
+ };
151
+ let from = firstAtOrAfter(start, true);
152
+ if (from > 0 && occupiedEnd(row[from - 1]) >= start) from--;
153
+ const to = firstAtOrAfter(end, false);
154
+ return [from, Math.max(from, to)];
155
+ };
156
+ /**
157
+ * A round tick interval (1, 2 or 5 times a power of ten, in milliseconds) at
158
+ * least `minMs` long, for axis labels that land on readable numbers.
159
+ */
160
+ export const niceStep = (minMs) => {
161
+ if (!(minMs > 0) || !Number.isFinite(minMs)) return 1;
162
+ const pow = 10 ** Math.floor(Math.log10(minMs));
163
+ for (const m of [1, 2, 5, 10]) {
164
+ if (m * pow >= minMs) return m * pow;
165
+ }
166
+ return 10 * pow;
167
+ };
168
+ //# sourceMappingURL=tracks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracks.js","sourceRoot":"","sources":["../../src/lib/timeline/tracks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA+BH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAU,EAAE;IACxD,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC;IAC5C,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC5D,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,KAA8B,EAC9B,MAA+B,EACtB,EAAE;IACX,MAAM,OAAO,GAAG,IAAI,GAAG,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,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK;YAAE,OAAO,CAAC,GAAG,GAAG,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,GAAG,GAAG,CAAC;AAClB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Layout for the Timeline's track view: one horizontal lane per layer on a\n * shared time axis.\n *\n * The list answers \"what happened, in what order, to whom\". It cannot show\n * concurrency or rhythm — which layers fire together, how a click lines up\n * with the update tick it caused, how long a tick is next to its neighbours.\n * This module turns the same {@link TimelineSpan}s into lanes and rows, and\n * owns the arithmetic between milliseconds and pixels, so the element that\n * draws them (`panel/timeline-tracks.ts`) is only DOM.\n *\n * Pure and dependency-free, like `derive.ts`, so it is unit-tested without a\n * browser.\n */\n\nimport type {TimelineSpan} from './derive.js';\n\n/**\n * Spans in one row of a lane, sorted by start and never overlapping, so\n * {@link visibleRange} can binary-search them.\n */\nexport type TrackRow = TimelineSpan[];\n\n/** One lane: every span of one layer, packed into non-overlapping rows. */\nexport interface Track {\n layerId: string;\n rows: TrackRow[];\n}\n\n/**\n * Where a span stops occupying its row. A point event occupies only its own\n * instant; a span whose end has not arrived (still running, or its end fell\n * out of the buffer) occupies the rest of the recording, because that is\n * where it is drawn — up to the live edge.\n */\nexport const occupiedEnd = (span: TimelineSpan): number => {\n if (span.end !== undefined) return span.end;\n return span.groupId === undefined ? span.start : Infinity;\n};\n\n/**\n * Groups spans into one track per layer, in `layers` order, then any layer\n * the spans mention that `layers` does not (a custom layer announced after the\n * last `get-meta`), in first-seen order. A layer with no spans still gets an\n * empty track, so a lane does not appear and vanish as events arrive.\n *\n * Within a track, spans are packed greedily: each goes into the first row\n * whose last span has ended by the time it starts. Lit's lifecycle phases\n * nest, so one update tick lands as `performUpdate` on row 0 and\n * `willUpdate` / `update` / `updated` side by side on row 1 — the flame shape\n * falls out of the packing without modelling it.\n */\nexport const buildTracks = (\n spans: readonly TimelineSpan[],\n layers: readonly {id: string}[]\n): Track[] => {\n const byLayer = new Map<string, TimelineSpan[]>();\n for (const layer of layers) byLayer.set(layer.id, []);\n for (const span of spans) {\n let list = byLayer.get(span.layerId);\n if (list === undefined) {\n list = [];\n byLayer.set(span.layerId, list);\n }\n list.push(span);\n }\n return [...byLayer].map(([layerId, list]) => ({\n layerId,\n rows: packRows(list),\n }));\n};\n\nconst packRows = (spans: TimelineSpan[]): TrackRow[] => {\n // `toSpans` already sorts by start; re-sort only if a caller did not.\n const sorted = spans.every(\n (s, i) => i === 0 || spans[i - 1]!.start <= s.start\n )\n ? spans\n : [...spans].sort((a, b) => a.start - b.start);\n const rows: TrackRow[] = [];\n const rowEnds: number[] = [];\n for (const span of sorted) {\n let row = rowEnds.findIndex((end) => end <= span.start);\n if (row === -1) {\n row = rows.length;\n rows.push([]);\n rowEnds.push(-Infinity);\n }\n rows[row]!.push(span);\n rowEnds[row] = occupiedEnd(span);\n }\n return rows;\n};\n\n/**\n * The recording's time bounds over `spans`: the earliest start, and the\n * latest instant anything is known to have happened (an end, or the start of\n * a span with none). The origin is the earliest start rather than zero\n * because the panel's buffer is capped and rolls its oldest events off; a\n * long recording would otherwise open on an empty stretch.\n */\nexport const timeBounds = (\n spans: readonly TimelineSpan[]\n): {origin: number; extent: number} => {\n if (spans.length === 0) return {origin: 0, extent: 0};\n let origin = Infinity;\n let last = -Infinity;\n for (const span of spans) {\n origin = Math.min(origin, span.start);\n last = Math.max(last, span.end ?? span.start);\n }\n return {origin, extent: last - origin};\n};\n\n/** Deepest zoom, in multiples of \"fit\": about a microsecond per pixel on a\n * second-long recording, past which there is nothing left to separate. */\nexport const MAX_ZOOM = 100_000;\n\n/** A recording with a single instant in it still needs a nonzero axis. */\nconst MIN_EXTENT_MS = 1;\n\n/** Mapping between recording time and pixels for the current zoom and pan. */\nexport interface TimeScale {\n pxPerMs: number;\n /** First and last millisecond inside the plot. */\n start: number;\n end: number;\n toX(ms: number): number;\n toMs(x: number): number;\n}\n\n/**\n * Builds the scale for a plot `width` pixels wide showing a recording that\n * begins at `originMs` and runs for `extentMs`.\n *\n * `zoom` is a multiple of \"fit\" (1 shows the whole recording); `pan` is how\n * many milliseconds past the origin the left edge sits. Both are clamped, so\n * callers can apply a raw wheel or drag delta and read back where it landed.\n */\nexport const timeScale = (\n originMs: number,\n extentMs: number,\n width: number,\n zoom = 1,\n pan = 0\n): TimeScale => {\n const extent = Math.max(extentMs, MIN_EXTENT_MS);\n const z = clampZoom(zoom);\n const visibleMs = extent / z;\n const p = clampPan(pan, extent, z);\n const pxPerMs = Math.max(width, 1) / visibleMs;\n const start = originMs + p;\n return {\n pxPerMs,\n start,\n end: start + visibleMs,\n toX: (ms) => (ms - start) * pxPerMs,\n toMs: (x) => start + x / pxPerMs,\n };\n};\n\nexport const clampZoom = (zoom: number): number =>\n Math.min(Math.max(Number.isNaN(zoom) ? 1 : zoom, 1), MAX_ZOOM);\n\n/** Keeps the visible window inside the recording. */\nexport const clampPan = (\n pan: number,\n extentMs: number,\n zoom: number\n): number => {\n const extent = Math.max(extentMs, MIN_EXTENT_MS);\n const max = extent - extent / clampZoom(zoom);\n return Math.min(Math.max(Number.isNaN(pan) ? 0 : pan, 0), max);\n};\n\n/** The pan that puts the live edge (the end of the recording) at the right\n * of the plot, for following a recording in progress. */\nexport const livePan = (extentMs: number, zoom: number): number =>\n clampPan(Infinity, extentMs, zoom);\n\n/**\n * Zooms by `factor` while keeping the millisecond under pixel `x` where it\n * is, which is what a wheel over a timeline is expected to do.\n */\nexport const zoomAt = (\n originMs: number,\n extentMs: number,\n width: number,\n zoom: number,\n pan: number,\n x: number,\n factor: number\n): {zoom: number; pan: number} => {\n const before = timeScale(originMs, extentMs, width, zoom, pan);\n const anchor = before.toMs(x);\n const nextZoom = clampZoom(clampZoom(zoom) * factor);\n const after = timeScale(originMs, extentMs, width, nextZoom, 0);\n const nextPan = anchor - originMs - x / after.pxPerMs;\n return {zoom: nextZoom, pan: clampPan(nextPan, extentMs, nextZoom)};\n};\n\n/**\n * Index range `[from, to)` of the spans in `row` that intersect the window\n * `[start, end]`, found by binary search so a zoomed-in lane renders a\n * handful of marks rather than walking thousands.\n *\n * Only the span just before the first one starting inside the window can\n * reach into it, because a row's spans never overlap.\n */\nexport const visibleRange = (\n row: TrackRow,\n start: number,\n end: number\n): [number, number] => {\n const firstAtOrAfter = (t: number, inclusive: boolean) => {\n let lo = 0;\n let hi = row.length;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n const s = row[mid]!.start;\n if (inclusive ? s < t : s <= t) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n };\n let from = firstAtOrAfter(start, true);\n if (from > 0 && occupiedEnd(row[from - 1]!) >= start) from--;\n const to = firstAtOrAfter(end, false);\n return [from, Math.max(from, to)];\n};\n\n/**\n * A round tick interval (1, 2 or 5 times a power of ten, in milliseconds) at\n * least `minMs` long, for axis labels that land on readable numbers.\n */\nexport const niceStep = (minMs: number): number => {\n if (!(minMs > 0) || !Number.isFinite(minMs)) return 1;\n const pow = 10 ** Math.floor(Math.log10(minMs));\n for (const m of [1, 2, 5, 10]) {\n if (m * pow >= minMs) return m * pow;\n }\n return 10 * pow;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddsquad/vite-plugin-lit",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Vite plugin providing true HMR for Lit components, plus CSS helpers and a DevTools panel",
5
5
  "license": "BSD-3-Clause",
6
6
  "author": "Oddsquad (based on @lit-labs/vite-hmr by Google LLC)",
@@ -28,6 +28,10 @@
28
28
  "types": "./lib/runtime/css.d.ts",
29
29
  "default": "./lib/runtime/css.js"
30
30
  },
31
+ "./connect.js": {
32
+ "types": "./lib/runtime/rpc-transport.d.ts",
33
+ "default": "./lib/runtime/rpc-transport.js"
34
+ },
31
35
  "./client": {
32
36
  "types": "./client.d.ts"
33
37
  }
@@ -77,9 +81,11 @@
77
81
  "@types/node": "^26.6.1",
78
82
  "@vitejs/devtools-kit": "0.7.5",
79
83
  "cac": "7.0.0",
84
+ "git-cliff": "^2.13.1",
80
85
  "lightningcss": "^1.33.0",
81
86
  "lit": "^3.3.3",
82
87
  "playwright-core": "^1.63.0",
88
+ "temporal-polyfill": "^1.0.5",
83
89
  "typescript": "^7.0.2",
84
90
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.2",
85
91
  "vite-plus": "0.3.2"
@@ -107,10 +113,12 @@
107
113
  "test": "pnpm run test:unit && pnpm run test:e2e",
108
114
  "test:unit": "node scripts/check-client-types.mjs && vp test run --project unit",
109
115
  "test:e2e": "pnpm run build && vp test run --project e2e",
116
+ "changelog": "git-cliff --unreleased",
110
117
  "bench": "node bench/run.mjs",
111
118
  "bench:serve": "node bench/run.mjs --serve",
112
119
  "docs:dev": "pnpm --filter ./docs dev",
113
120
  "docs:build": "pnpm --filter ./docs build",
121
+ "docs:shots": "pnpm run build && node scripts/docs-shots.mjs",
114
122
  "format": "vp fmt \"**/*.{cjs,html,js,json,md,mdx,ts,yaml}\"",
115
123
  "format:check": "vp fmt \"**/*.{cjs,html,js,json,md,mdx,ts,yaml}\" --check",
116
124
  "build:panel": "vp build src/panel"
@@ -9,8 +9,18 @@ export interface TimelineLayer {
9
9
  color: number;
10
10
  }
11
11
  export interface TimelineEvent<TData = unknown> {
12
+ /**
13
+ * Stable identity, stamped on the Node side (`${epoch}-${seq}`) when the
14
+ * event is received, so it survives the stream, `recent-events` and a
15
+ * snapshot export. Absent on events still in the page runtime.
16
+ */
17
+ id?: string;
12
18
  layerId: string;
13
- /** `performance.now()` timestamp in the browser. */
19
+ /**
20
+ * Milliseconds since recording started, stamped in the browser page
21
+ * (`performance.now()` re-zeroed on each recording start; see
22
+ * `runtime/timeline/clock.ts`). Not comparable to any Node-side clock.
23
+ */
14
24
  time: number;
15
25
  data: TData;
16
26
  title?: string;
@@ -31,6 +41,13 @@ export interface TimelineLayersState {
31
41
  recordingState: boolean;
32
42
  litLifecycleEnabled: boolean;
33
43
  litRenderEnabled: boolean;
44
+ /**
45
+ * Per-part `lit-debug` events (`template updating`, `set part`, `commit
46
+ * *`, …) — one per binding on *every* render, so a ticking clock or
47
+ * animation floods the layer. Off by default; the `lit-render` layer's
48
+ * begin/end render pair already covers the common case.
49
+ */
50
+ litRenderVerboseEnabled: boolean;
34
51
  mouseEventEnabled: boolean;
35
52
  keyboardEventEnabled: boolean;
36
53
  }
@@ -59,6 +76,29 @@ export interface FeatureSettings {
59
76
  throttleMs: number;
60
77
  };
61
78
  timeline: boolean;
79
+ /**
80
+ * Which layer supplied each setting, keyed like {@link SettingsOverride}
81
+ * (plus the read-only source-overlay rows). Lets the panel label a value
82
+ * "Zed (env)" and name the baseline a panel override replaced. Optional so
83
+ * older producers (and snapshots) without it still type-check.
84
+ */
85
+ sources?: SettingSources;
86
+ }
87
+ /**
88
+ * Where a resolved setting came from, in precedence order after a panel
89
+ * override: an explicit `litPlugin({...})` option, a `LIT_PLUGIN_*` env var,
90
+ * or the built-in default.
91
+ */
92
+ export type SettingSource = 'option' | 'env' | 'default';
93
+ /** Per-setting {@link SettingSource}, as carried on {@link FeatureSettings}. */
94
+ export interface SettingSources {
95
+ hmrReconnect?: SettingSource;
96
+ hmrOnIncompatible?: SettingSource;
97
+ hmrIndicatorVisible?: SettingSource;
98
+ hmrIndicatorCount?: SettingSource;
99
+ sourceOverlayEditor?: SettingSource;
100
+ sourceOverlayKey?: SettingSource;
101
+ sourceOverlayThrottleMs?: SettingSource;
62
102
  }
63
103
  /**
64
104
  * Runtime overrides the panel applies on top of the resolved env config, for
@@ -99,6 +139,15 @@ export declare const SOURCE_OVERLAY_EDITORS: ReadonlyArray<{
99
139
  }>;
100
140
  /** localStorage key holding the {@link SettingsOverride}. */
101
141
  export declare const SETTINGS_OVERRIDE_LS_KEY = "lit-devtools-overrides";
142
+ /**
143
+ * The resolved config value each overridden key was set against, recorded so
144
+ * the Settings tab can notice when `.env` or plugin options moved on. Kept
145
+ * beside the {@link SettingsOverride}, never inside it: the runtime applies and
146
+ * receives the override as-is and has no use for these.
147
+ */
148
+ export type OverrideBaselines = Partial<Record<'hmrReconnect' | 'hmrOnIncompatible' | 'hmrIndicatorVisible' | 'hmrIndicatorCount' | 'sourceOverlayEditor', unknown>>;
149
+ /** localStorage key holding the {@link OverrideBaselines}. */
150
+ export declare const OVERRIDE_BASELINES_LS_KEY = "lit-devtools-override-baselines";
102
151
  /** Vite HMR channel the server uses to push overrides to the app runtime. */
103
152
  export declare const SETTINGS_OVERRIDE_CHANNEL = "lit-devtools:settings-override";
104
153
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../src/types/timeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,OAAO;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1C,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,I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CAAC,EAAE,OAAO,CAAC;IAC5B,0EAA0E;IAC1E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAMA,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,2BAA2B,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACrC,MAAM,CACF,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,EACvB,OAAO,CACR,CACF,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,yBAAyB,oCAAoC,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,mCAAmC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,6BAA6B,uCACJ,CAAC"}
package/types/timeline.js CHANGED
@@ -6,6 +6,7 @@
6
6
  export const TIMELINE_LAYERS = [
7
7
  { id: 'lit-lifecycle', label: 'Lit Lifecycle', color: 0x4d63ff },
8
8
  { id: 'lit-render', label: 'Lit Render', color: 0x325cff },
9
+ { id: 'lit-render-verbose', label: 'Lit Render (verbose)', color: 0x99aeff },
9
10
  { id: 'mouse', label: 'Mouse', color: 0xa451af },
10
11
  { id: 'keyboard', label: 'Keyboard', color: 0x8151af },
11
12
  ];
@@ -13,6 +14,7 @@ export const DEFAULT_LAYERS_STATE = {
13
14
  recordingState: false,
14
15
  litLifecycleEnabled: true,
15
16
  litRenderEnabled: true,
17
+ litRenderVerboseEnabled: false,
16
18
  mouseEventEnabled: false,
17
19
  keyboardEventEnabled: false,
18
20
  };
@@ -29,6 +31,8 @@ export const SOURCE_OVERLAY_EDITORS = [
29
31
  ];
30
32
  /** localStorage key holding the {@link SettingsOverride}. */
31
33
  export const SETTINGS_OVERRIDE_LS_KEY = 'lit-devtools-overrides';
34
+ /** localStorage key holding the {@link OverrideBaselines}. */
35
+ export const OVERRIDE_BASELINES_LS_KEY = 'lit-devtools-override-baselines';
32
36
  /** Vite HMR channel the server uses to push overrides to the app runtime. */
33
37
  export const SETTINGS_OVERRIDE_CHANNEL = 'lit-devtools:settings-override';
34
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../src/types/timeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiCH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,EAAC,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAC;IAC9D,EAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAC;IACxD,EAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAC;IAC9C,EAAC,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAC;CACrD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAyDF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAG9B;IACH,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAC;IACnC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;IAClC,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC;IAC5B,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC;IAClC,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;CACvC,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAEjE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,gCAAgC,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,oCAAoC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nexport interface TimelineLayer {\n id: string;\n label: string;\n color: number; // 0xRRGGBB\n}\n\nexport interface TimelineEvent<TData = unknown> {\n layerId: string;\n /** `performance.now()` timestamp in the browser. */\n time: number;\n data: TData;\n title?: string;\n subtitle?: string;\n /** Pairs a start event with its matching end event in the same update group. */\n groupId?: number | string;\n logType?: 'default' | 'warning' | 'error';\n meta?: {\n elementId?: number;\n tagName?: string;\n source?: {file: string; line: number};\n };\n}\n\nexport interface TimelineLayersState {\n recordingState: boolean;\n litLifecycleEnabled: boolean;\n litRenderEnabled: boolean;\n mouseEventEnabled: boolean;\n keyboardEventEnabled: boolean;\n}\n\nexport const TIMELINE_LAYERS: readonly TimelineLayer[] = [\n {id: 'lit-lifecycle', label: 'Lit Lifecycle', color: 0x4d63ff},\n {id: 'lit-render', label: 'Lit Render', color: 0x325cff},\n {id: 'mouse', label: 'Mouse', color: 0xa451af},\n {id: 'keyboard', label: 'Keyboard', color: 0x8151af},\n];\n\nexport const DEFAULT_LAYERS_STATE: TimelineLayersState = {\n recordingState: false,\n litLifecycleEnabled: true,\n litRenderEnabled: true,\n mouseEventEnabled: false,\n keyboardEventEnabled: false,\n};\n\n/**\n * Snapshot of the plugin's resolved feature settings, surfaced in the panel's\n * Settings tab. The plugin produces this at config time (explicit options >\n * LIT_PLUGIN_* env > defaults) and serves it from the panel server. It's the\n * baseline the panel shows; some HMR settings can then be overridden live (see\n * {@link SettingsOverride}).\n */\nexport interface FeatureSettings {\n hmr: {\n enabled: boolean;\n reconnect: boolean;\n onIncompatible: 'reload' | 'warn';\n indicatorEnabled: boolean;\n indicatorCount: boolean;\n };\n sourceOverlay: {\n enabled: boolean;\n /** Hotkey letter combined with Ctrl+Shift to toggle the overlay. */\n key: string;\n editor: string;\n throttleMs: number;\n };\n timeline: boolean;\n}\n\n/**\n * Runtime overrides the panel applies on top of the resolved env config, for\n * settings whose runtime is already injected (so they can change live). A\n * feature disabled at config time has no runtime, so it can't be enabled here\n * — only the behaviour of already-enabled features is overridable.\n *\n * Persisted under {@link SETTINGS_OVERRIDE_LS_KEY} (the panel and app share an\n * origin) so overrides survive reloads, and pushed live over\n * {@link SETTINGS_OVERRIDE_CHANNEL} via Vite HMR for immediate effect.\n */\nexport interface SettingsOverride {\n hmrReconnect?: boolean;\n hmrOnIncompatible?: 'reload' | 'warn';\n hmrIndicatorVisible?: boolean;\n hmrIndicatorCount?: boolean;\n /** Built-in editor key for the source overlay's open-in-editor target. */\n sourceOverlayEditor?: string;\n /**\n * Flash a short outline over every Lit element that completes an update.\n * Pure preference (no config-time baseline), so `undefined` reads as off.\n */\n flashUpdates?: boolean;\n /**\n * Colour the flash by how often the element updated in the last second,\n * calm to hot, instead of one flat colour. Only meaningful with\n * {@link SettingsOverride.flashUpdates}.\n */\n flashUpdatesRamp?: boolean;\n}\n\n/**\n * Built-in editors the source overlay can open files in. Keep in sync with\n * BUILTIN_EDITORS in lib/runtime/source-overlay/editors.ts.\n */\nexport const SOURCE_OVERLAY_EDITORS: ReadonlyArray<{\n value: string;\n label: string;\n}> = [\n {value: 'vscode', label: 'VS Code'},\n {value: 'cursor', label: 'Cursor'},\n {value: 'zed', label: 'Zed'},\n {value: 'idea', label: 'IntelliJ'},\n {value: 'windsurf', label: 'Windsurf'},\n];\n\n/** localStorage key holding the {@link SettingsOverride}. */\nexport const SETTINGS_OVERRIDE_LS_KEY = 'lit-devtools-overrides';\n\n/** Vite HMR channel the server uses to push overrides to the app runtime. */\nexport const SETTINGS_OVERRIDE_CHANNEL = 'lit-devtools:settings-override';\n\n/**\n * Vite HMR channel the DevTools \"toggle source overlay\" command uses to tell\n * the app runtime to toggle the overlay (the command handler runs server-side).\n */\nexport const SOURCE_OVERLAY_TOGGLE_CHANNEL =\n 'lit-devtools:toggle-source-overlay';\n"]}
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../src/types/timeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkDH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,EAAC,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAC;IAC9D,EAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAC;IACxD,EAAC,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,EAAC;IAC1E,EAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAC;IAC9C,EAAC,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAC;CACrD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,KAAK;IAC9B,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAkFF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAG9B;IACH,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAC;IACnC,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;IAClC,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC;IAC5B,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC;IAClC,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAC;CACvC,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAmBjE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iCAAiC,CAAC;AAE3E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,gCAAgC,CAAC;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,oCAAoC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nexport interface TimelineLayer {\n id: string;\n label: string;\n color: number; // 0xRRGGBB\n}\n\nexport interface TimelineEvent<TData = unknown> {\n /**\n * Stable identity, stamped on the Node side (`${epoch}-${seq}`) when the\n * event is received, so it survives the stream, `recent-events` and a\n * snapshot export. Absent on events still in the page runtime.\n */\n id?: string;\n layerId: string;\n /**\n * Milliseconds since recording started, stamped in the browser page\n * (`performance.now()` re-zeroed on each recording start; see\n * `runtime/timeline/clock.ts`). Not comparable to any Node-side clock.\n */\n time: number;\n data: TData;\n title?: string;\n subtitle?: string;\n /** Pairs a start event with its matching end event in the same update group. */\n groupId?: number | string;\n logType?: 'default' | 'warning' | 'error';\n meta?: {\n elementId?: number;\n tagName?: string;\n source?: {file: string; line: number};\n };\n}\n\nexport interface TimelineLayersState {\n recordingState: boolean;\n litLifecycleEnabled: boolean;\n litRenderEnabled: boolean;\n /**\n * Per-part `lit-debug` events (`template updating`, `set part`, `commit\n * *`, …) — one per binding on *every* render, so a ticking clock or\n * animation floods the layer. Off by default; the `lit-render` layer's\n * begin/end render pair already covers the common case.\n */\n litRenderVerboseEnabled: boolean;\n mouseEventEnabled: boolean;\n keyboardEventEnabled: boolean;\n}\n\nexport const TIMELINE_LAYERS: readonly TimelineLayer[] = [\n {id: 'lit-lifecycle', label: 'Lit Lifecycle', color: 0x4d63ff},\n {id: 'lit-render', label: 'Lit Render', color: 0x325cff},\n {id: 'lit-render-verbose', label: 'Lit Render (verbose)', color: 0x99aeff},\n {id: 'mouse', label: 'Mouse', color: 0xa451af},\n {id: 'keyboard', label: 'Keyboard', color: 0x8151af},\n];\n\nexport const DEFAULT_LAYERS_STATE: TimelineLayersState = {\n recordingState: false,\n litLifecycleEnabled: true,\n litRenderEnabled: true,\n litRenderVerboseEnabled: false,\n mouseEventEnabled: false,\n keyboardEventEnabled: false,\n};\n\n/**\n * Snapshot of the plugin's resolved feature settings, surfaced in the panel's\n * Settings tab. The plugin produces this at config time (explicit options >\n * LIT_PLUGIN_* env > defaults) and serves it from the panel server. It's the\n * baseline the panel shows; some HMR settings can then be overridden live (see\n * {@link SettingsOverride}).\n */\nexport interface FeatureSettings {\n hmr: {\n enabled: boolean;\n reconnect: boolean;\n onIncompatible: 'reload' | 'warn';\n indicatorEnabled: boolean;\n indicatorCount: boolean;\n };\n sourceOverlay: {\n enabled: boolean;\n /** Hotkey letter combined with Ctrl+Shift to toggle the overlay. */\n key: string;\n editor: string;\n throttleMs: number;\n };\n timeline: boolean;\n /**\n * Which layer supplied each setting, keyed like {@link SettingsOverride}\n * (plus the read-only source-overlay rows). Lets the panel label a value\n * \"Zed (env)\" and name the baseline a panel override replaced. Optional so\n * older producers (and snapshots) without it still type-check.\n */\n sources?: SettingSources;\n}\n\n/**\n * Where a resolved setting came from, in precedence order after a panel\n * override: an explicit `litPlugin({...})` option, a `LIT_PLUGIN_*` env var,\n * or the built-in default.\n */\nexport type SettingSource = 'option' | 'env' | 'default';\n\n/** Per-setting {@link SettingSource}, as carried on {@link FeatureSettings}. */\nexport interface SettingSources {\n hmrReconnect?: SettingSource;\n hmrOnIncompatible?: SettingSource;\n hmrIndicatorVisible?: SettingSource;\n hmrIndicatorCount?: SettingSource;\n sourceOverlayEditor?: SettingSource;\n sourceOverlayKey?: SettingSource;\n sourceOverlayThrottleMs?: SettingSource;\n}\n\n/**\n * Runtime overrides the panel applies on top of the resolved env config, for\n * settings whose runtime is already injected (so they can change live). A\n * feature disabled at config time has no runtime, so it can't be enabled here\n * — only the behaviour of already-enabled features is overridable.\n *\n * Persisted under {@link SETTINGS_OVERRIDE_LS_KEY} (the panel and app share an\n * origin) so overrides survive reloads, and pushed live over\n * {@link SETTINGS_OVERRIDE_CHANNEL} via Vite HMR for immediate effect.\n */\nexport interface SettingsOverride {\n hmrReconnect?: boolean;\n hmrOnIncompatible?: 'reload' | 'warn';\n hmrIndicatorVisible?: boolean;\n hmrIndicatorCount?: boolean;\n /** Built-in editor key for the source overlay's open-in-editor target. */\n sourceOverlayEditor?: string;\n /**\n * Flash a short outline over every Lit element that completes an update.\n * Pure preference (no config-time baseline), so `undefined` reads as off.\n */\n flashUpdates?: boolean;\n /**\n * Colour the flash by how often the element updated in the last second,\n * calm to hot, instead of one flat colour. Only meaningful with\n * {@link SettingsOverride.flashUpdates}.\n */\n flashUpdatesRamp?: boolean;\n}\n\n/**\n * Built-in editors the source overlay can open files in. Keep in sync with\n * BUILTIN_EDITORS in lib/runtime/source-overlay/editors.ts.\n */\nexport const SOURCE_OVERLAY_EDITORS: ReadonlyArray<{\n value: string;\n label: string;\n}> = [\n {value: 'vscode', label: 'VS Code'},\n {value: 'cursor', label: 'Cursor'},\n {value: 'zed', label: 'Zed'},\n {value: 'idea', label: 'IntelliJ'},\n {value: 'windsurf', label: 'Windsurf'},\n];\n\n/** localStorage key holding the {@link SettingsOverride}. */\nexport const SETTINGS_OVERRIDE_LS_KEY = 'lit-devtools-overrides';\n\n/**\n * The resolved config value each overridden key was set against, recorded so\n * the Settings tab can notice when `.env` or plugin options moved on. Kept\n * beside the {@link SettingsOverride}, never inside it: the runtime applies and\n * receives the override as-is and has no use for these.\n */\nexport type OverrideBaselines = Partial<\n Record<\n | 'hmrReconnect'\n | 'hmrOnIncompatible'\n | 'hmrIndicatorVisible'\n | 'hmrIndicatorCount'\n | 'sourceOverlayEditor',\n unknown\n >\n>;\n\n/** localStorage key holding the {@link OverrideBaselines}. */\nexport const OVERRIDE_BASELINES_LS_KEY = 'lit-devtools-override-baselines';\n\n/** Vite HMR channel the server uses to push overrides to the app runtime. */\nexport const SETTINGS_OVERRIDE_CHANNEL = 'lit-devtools:settings-override';\n\n/**\n * Vite HMR channel the DevTools \"toggle source overlay\" command uses to tell\n * the app runtime to toggle the overlay (the command handler runs server-side).\n */\nexport const SOURCE_OVERLAY_TOGGLE_CHANNEL =\n 'lit-devtools:toggle-source-overlay';\n"]}