@oddsquad/vite-plugin-lit 0.7.0 → 0.8.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 (292) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +1 -1
  3. package/README.md +14 -7
  4. package/bin.mjs +2 -8
  5. package/client.d.ts +0 -6
  6. package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BuCvPGjS.js → browser-agent-rpc-BXhoSh1z-ybEeG-x9.js} +2 -2
  7. package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BuCvPGjS.js.map → browser-agent-rpc-BXhoSh1z-ybEeG-x9.js.map} +1 -1
  8. package/dist/client/assets/{index-D632jo79.js → index-CgkhETVR.js} +2 -144
  9. package/dist/client/assets/index-CgkhETVR.js.map +1 -0
  10. package/dist/client/index.html +1 -1
  11. package/dist/standalone/lit-devtools.js +2 -105
  12. package/index.d.ts +0 -5
  13. package/index.d.ts.map +1 -1
  14. package/index.js +1 -5
  15. package/index.js.map +1 -1
  16. package/lib/color-scheme.d.ts +0 -5
  17. package/lib/color-scheme.d.ts.map +1 -1
  18. package/lib/color-scheme.js +0 -5
  19. package/lib/color-scheme.js.map +1 -1
  20. package/lib/confine.d.ts +0 -5
  21. package/lib/confine.d.ts.map +1 -1
  22. package/lib/confine.js +0 -5
  23. package/lib/confine.js.map +1 -1
  24. package/lib/devframe/allowed-origins.d.ts +11 -3
  25. package/lib/devframe/allowed-origins.d.ts.map +1 -1
  26. package/lib/devframe/allowed-origins.js +0 -5
  27. package/lib/devframe/allowed-origins.js.map +1 -1
  28. package/lib/devframe/definition.d.ts +7 -3
  29. package/lib/devframe/definition.d.ts.map +1 -1
  30. package/lib/devframe/definition.js +1 -6
  31. package/lib/devframe/definition.js.map +1 -1
  32. package/lib/devframe/icon.d.ts +0 -5
  33. package/lib/devframe/icon.d.ts.map +1 -1
  34. package/lib/devframe/icon.js +0 -5
  35. package/lib/devframe/icon.js.map +1 -1
  36. package/lib/devframe/launch-editor.d.ts +0 -5
  37. package/lib/devframe/launch-editor.d.ts.map +1 -1
  38. package/lib/devframe/launch-editor.js +0 -5
  39. package/lib/devframe/launch-editor.js.map +1 -1
  40. package/lib/devframe/paths.d.ts +8 -3
  41. package/lib/devframe/paths.d.ts.map +1 -1
  42. package/lib/devframe/paths.js +0 -5
  43. package/lib/devframe/paths.js.map +1 -1
  44. package/lib/devframe/protocol.d.ts +6 -3
  45. package/lib/devframe/protocol.d.ts.map +1 -1
  46. package/lib/devframe/protocol.js +0 -5
  47. package/lib/devframe/protocol.js.map +1 -1
  48. package/lib/devframe/rpc-source.d.ts +15 -3
  49. package/lib/devframe/rpc-source.d.ts.map +1 -1
  50. package/lib/devframe/rpc-source.js +0 -5
  51. package/lib/devframe/rpc-source.js.map +1 -1
  52. package/lib/devframe/source.d.ts +0 -5
  53. package/lib/devframe/source.d.ts.map +1 -1
  54. package/lib/devframe/source.js +7 -3
  55. package/lib/devframe/source.js.map +1 -1
  56. package/lib/devframe/vite.d.ts +0 -5
  57. package/lib/devframe/vite.d.ts.map +1 -1
  58. package/lib/devframe/vite.js +16 -3
  59. package/lib/devframe/vite.js.map +1 -1
  60. package/lib/http.d.ts +0 -5
  61. package/lib/http.d.ts.map +1 -1
  62. package/lib/http.js +0 -5
  63. package/lib/http.js.map +1 -1
  64. package/lib/icons.d.ts +0 -5
  65. package/lib/icons.d.ts.map +1 -1
  66. package/lib/icons.js +0 -5
  67. package/lib/icons.js.map +1 -1
  68. package/lib/options.d.ts +0 -5
  69. package/lib/options.d.ts.map +1 -1
  70. package/lib/options.js +0 -5
  71. package/lib/options.js.map +1 -1
  72. package/lib/override-baselines.d.ts +0 -5
  73. package/lib/override-baselines.d.ts.map +1 -1
  74. package/lib/override-baselines.js +0 -5
  75. package/lib/override-baselines.js.map +1 -1
  76. package/lib/plugin.d.ts +0 -5
  77. package/lib/plugin.d.ts.map +1 -1
  78. package/lib/plugin.js +0 -5
  79. package/lib/plugin.js.map +1 -1
  80. package/lib/plugins/css-literals.d.ts +0 -5
  81. package/lib/plugins/css-literals.d.ts.map +1 -1
  82. package/lib/plugins/css-literals.js +0 -5
  83. package/lib/plugins/css-literals.js.map +1 -1
  84. package/lib/plugins/css-queries.d.ts +0 -5
  85. package/lib/plugins/css-queries.d.ts.map +1 -1
  86. package/lib/plugins/css-queries.js +0 -5
  87. package/lib/plugins/css-queries.js.map +1 -1
  88. package/lib/plugins/open-in-editor.d.ts +0 -5
  89. package/lib/plugins/open-in-editor.d.ts.map +1 -1
  90. package/lib/plugins/open-in-editor.js +0 -5
  91. package/lib/plugins/open-in-editor.js.map +1 -1
  92. package/lib/plugins/private-fields.d.ts +0 -5
  93. package/lib/plugins/private-fields.d.ts.map +1 -1
  94. package/lib/plugins/private-fields.js +0 -5
  95. package/lib/plugins/private-fields.js.map +1 -1
  96. package/lib/plugins/shared.d.ts +0 -5
  97. package/lib/plugins/shared.d.ts.map +1 -1
  98. package/lib/plugins/shared.js +0 -5
  99. package/lib/plugins/shared.js.map +1 -1
  100. package/lib/plugins/timeline-virtual.d.ts +0 -5
  101. package/lib/plugins/timeline-virtual.d.ts.map +1 -1
  102. package/lib/plugins/timeline-virtual.js +0 -5
  103. package/lib/plugins/timeline-virtual.js.map +1 -1
  104. package/lib/runtime/child-state.d.ts +0 -5
  105. package/lib/runtime/child-state.d.ts.map +1 -1
  106. package/lib/runtime/child-state.js +18 -3
  107. package/lib/runtime/child-state.js.map +1 -1
  108. package/lib/runtime/css.d.ts +14 -3
  109. package/lib/runtime/css.d.ts.map +1 -1
  110. package/lib/runtime/css.js +3 -5
  111. package/lib/runtime/css.js.map +1 -1
  112. package/lib/runtime/edge-panel.d.ts +8 -3
  113. package/lib/runtime/edge-panel.d.ts.map +1 -1
  114. package/lib/runtime/edge-panel.js +0 -5
  115. package/lib/runtime/edge-panel.js.map +1 -1
  116. package/lib/runtime/fonts.d.ts +0 -5
  117. package/lib/runtime/fonts.d.ts.map +1 -1
  118. package/lib/runtime/fonts.js +0 -5
  119. package/lib/runtime/fonts.js.map +1 -1
  120. package/lib/runtime/indicator.d.ts +3 -3
  121. package/lib/runtime/indicator.js +0 -5
  122. package/lib/runtime/indicator.js.map +1 -1
  123. package/lib/runtime/inspector/collect.d.ts +3 -3
  124. package/lib/runtime/inspector/collect.d.ts.map +1 -1
  125. package/lib/runtime/inspector/collect.js +0 -5
  126. package/lib/runtime/inspector/collect.js.map +1 -1
  127. package/lib/runtime/inspector/highlight.d.ts +10 -3
  128. package/lib/runtime/inspector/highlight.d.ts.map +1 -1
  129. package/lib/runtime/inspector/highlight.js +0 -5
  130. package/lib/runtime/inspector/highlight.js.map +1 -1
  131. package/lib/runtime/inspector/install.d.ts +6 -3
  132. package/lib/runtime/inspector/install.d.ts.map +1 -1
  133. package/lib/runtime/inspector/install.js +0 -5
  134. package/lib/runtime/inspector/install.js.map +1 -1
  135. package/lib/runtime/inspector/serialize.d.ts +4 -3
  136. package/lib/runtime/inspector/serialize.d.ts.map +1 -1
  137. package/lib/runtime/inspector/serialize.js +0 -5
  138. package/lib/runtime/inspector/serialize.js.map +1 -1
  139. package/lib/runtime/intern.d.ts +11 -3
  140. package/lib/runtime/intern.d.ts.map +1 -1
  141. package/lib/runtime/intern.js +11 -3
  142. package/lib/runtime/intern.js.map +1 -1
  143. package/lib/runtime/overrides.d.ts +3 -3
  144. package/lib/runtime/overrides.d.ts.map +1 -1
  145. package/lib/runtime/overrides.js +0 -5
  146. package/lib/runtime/overrides.js.map +1 -1
  147. package/lib/runtime/page-channel.d.ts +0 -5
  148. package/lib/runtime/page-channel.d.ts.map +1 -1
  149. package/lib/runtime/page-channel.js +13 -3
  150. package/lib/runtime/page-channel.js.map +1 -1
  151. package/lib/runtime/patch.d.ts +0 -5
  152. package/lib/runtime/patch.d.ts.map +1 -1
  153. package/lib/runtime/patch.js +0 -5
  154. package/lib/runtime/patch.js.map +1 -1
  155. package/lib/runtime/rpc-transport.d.ts +13 -3
  156. package/lib/runtime/rpc-transport.d.ts.map +1 -1
  157. package/lib/runtime/rpc-transport.js +3 -5
  158. package/lib/runtime/rpc-transport.js.map +1 -1
  159. package/lib/runtime/source-meta.d.ts +0 -5
  160. package/lib/runtime/source-meta.d.ts.map +1 -1
  161. package/lib/runtime/source-meta.js +0 -5
  162. package/lib/runtime/source-meta.js.map +1 -1
  163. package/lib/runtime/source-overlay/editors.d.ts +0 -5
  164. package/lib/runtime/source-overlay/editors.d.ts.map +1 -1
  165. package/lib/runtime/source-overlay/editors.js +0 -5
  166. package/lib/runtime/source-overlay/editors.js.map +1 -1
  167. package/lib/runtime/source-overlay/mask-path.d.ts +0 -5
  168. package/lib/runtime/source-overlay/mask-path.d.ts.map +1 -1
  169. package/lib/runtime/source-overlay/mask-path.js +0 -5
  170. package/lib/runtime/source-overlay/mask-path.js.map +1 -1
  171. package/lib/runtime/source-overlay/overlay-element.d.ts +0 -5
  172. package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -1
  173. package/lib/runtime/source-overlay/overlay-element.js +0 -5
  174. package/lib/runtime/source-overlay/overlay-element.js.map +1 -1
  175. package/lib/runtime/source-overlay/source-host.d.ts +0 -5
  176. package/lib/runtime/source-overlay/source-host.d.ts.map +1 -1
  177. package/lib/runtime/source-overlay/source-host.js +0 -5
  178. package/lib/runtime/source-overlay/source-host.js.map +1 -1
  179. package/lib/runtime/source-overlay/template.d.ts +0 -5
  180. package/lib/runtime/source-overlay/template.d.ts.map +1 -1
  181. package/lib/runtime/source-overlay/template.js +0 -5
  182. package/lib/runtime/source-overlay/template.js.map +1 -1
  183. package/lib/runtime/source-overlay.d.ts +0 -5
  184. package/lib/runtime/source-overlay.d.ts.map +1 -1
  185. package/lib/runtime/source-overlay.js +0 -5
  186. package/lib/runtime/source-overlay.js.map +1 -1
  187. package/lib/runtime/standalone.d.ts +0 -5
  188. package/lib/runtime/standalone.d.ts.map +1 -1
  189. package/lib/runtime/standalone.js +0 -5
  190. package/lib/runtime/standalone.js.map +1 -1
  191. package/lib/runtime/timeline/chrome-tracks.d.ts +0 -5
  192. package/lib/runtime/timeline/chrome-tracks.d.ts.map +1 -1
  193. package/lib/runtime/timeline/chrome-tracks.js +5 -3
  194. package/lib/runtime/timeline/chrome-tracks.js.map +1 -1
  195. package/lib/runtime/timeline/clock.d.ts +7 -3
  196. package/lib/runtime/timeline/clock.d.ts.map +1 -1
  197. package/lib/runtime/timeline/clock.js +0 -5
  198. package/lib/runtime/timeline/clock.js.map +1 -1
  199. package/lib/runtime/timeline/flash.d.ts +0 -5
  200. package/lib/runtime/timeline/flash.d.ts.map +1 -1
  201. package/lib/runtime/timeline/flash.js +15 -3
  202. package/lib/runtime/timeline/flash.js.map +1 -1
  203. package/lib/runtime/timeline/identity.d.ts +0 -5
  204. package/lib/runtime/timeline/identity.d.ts.map +1 -1
  205. package/lib/runtime/timeline/identity.js +9 -3
  206. package/lib/runtime/timeline/identity.js.map +1 -1
  207. package/lib/runtime/timeline/input.d.ts +0 -5
  208. package/lib/runtime/timeline/input.d.ts.map +1 -1
  209. package/lib/runtime/timeline/input.js +2 -3
  210. package/lib/runtime/timeline/input.js.map +1 -1
  211. package/lib/runtime/timeline/install.d.ts +11 -3
  212. package/lib/runtime/timeline/install.d.ts.map +1 -1
  213. package/lib/runtime/timeline/install.js +0 -5
  214. package/lib/runtime/timeline/install.js.map +1 -1
  215. package/lib/runtime/timeline/lifecycle.d.ts +13 -3
  216. package/lib/runtime/timeline/lifecycle.d.ts.map +1 -1
  217. package/lib/runtime/timeline/lifecycle.js +0 -5
  218. package/lib/runtime/timeline/lifecycle.js.map +1 -1
  219. package/lib/runtime/timeline/public-api.d.ts +6 -3
  220. package/lib/runtime/timeline/public-api.d.ts.map +1 -1
  221. package/lib/runtime/timeline/public-api.js +0 -5
  222. package/lib/runtime/timeline/public-api.js.map +1 -1
  223. package/lib/runtime/timeline/render.d.ts +0 -5
  224. package/lib/runtime/timeline/render.d.ts.map +1 -1
  225. package/lib/runtime/timeline/render.js +21 -3
  226. package/lib/runtime/timeline/render.js.map +1 -1
  227. package/lib/runtime/timeline/transport.d.ts +0 -5
  228. package/lib/runtime/timeline/transport.d.ts.map +1 -1
  229. package/lib/runtime/timeline/transport.js +10 -3
  230. package/lib/runtime/timeline/transport.js.map +1 -1
  231. package/lib/segmented-tabs.d.ts +0 -5
  232. package/lib/segmented-tabs.d.ts.map +1 -1
  233. package/lib/segmented-tabs.js +0 -5
  234. package/lib/segmented-tabs.js.map +1 -1
  235. package/lib/snapshot.d.ts +11 -3
  236. package/lib/snapshot.d.ts.map +1 -1
  237. package/lib/snapshot.js +0 -5
  238. package/lib/snapshot.js.map +1 -1
  239. package/lib/source-meta.d.ts +0 -5
  240. package/lib/source-meta.d.ts.map +1 -1
  241. package/lib/source-meta.js +0 -5
  242. package/lib/source-meta.js.map +1 -1
  243. package/lib/timeline/derive.d.ts +0 -5
  244. package/lib/timeline/derive.d.ts.map +1 -1
  245. package/lib/timeline/derive.js +22 -3
  246. package/lib/timeline/derive.js.map +1 -1
  247. package/lib/timeline/filter.d.ts +0 -5
  248. package/lib/timeline/filter.d.ts.map +1 -1
  249. package/lib/timeline/filter.js +6 -3
  250. package/lib/timeline/filter.js.map +1 -1
  251. package/lib/timeline/tracks.d.ts +0 -5
  252. package/lib/timeline/tracks.d.ts.map +1 -1
  253. package/lib/timeline/tracks.js +12 -3
  254. package/lib/timeline/tracks.js.map +1 -1
  255. package/lib/tokens.d.ts +0 -5
  256. package/lib/tokens.d.ts.map +1 -1
  257. package/lib/tokens.js +0 -5
  258. package/lib/tokens.js.map +1 -1
  259. package/lib/transform.d.ts +0 -5
  260. package/lib/transform.d.ts.map +1 -1
  261. package/lib/transform.js +0 -5
  262. package/lib/transform.js.map +1 -1
  263. package/lib/types.d.ts +10 -5
  264. package/lib/types.d.ts.map +1 -1
  265. package/lib/types.js +0 -5
  266. package/lib/types.js.map +1 -1
  267. package/lib/wrap-table.d.ts +0 -5
  268. package/lib/wrap-table.d.ts.map +1 -1
  269. package/lib/wrap-table.js +12 -3
  270. package/lib/wrap-table.js.map +1 -1
  271. package/package.json +2 -2
  272. package/types/hmr-incompatibility.d.ts +0 -5
  273. package/types/hmr-incompatibility.d.ts.map +1 -1
  274. package/types/hmr-incompatibility.js +13 -3
  275. package/types/hmr-incompatibility.js.map +1 -1
  276. package/types/in-page.d.ts +0 -5
  277. package/types/in-page.d.ts.map +1 -1
  278. package/types/in-page.js +0 -5
  279. package/types/in-page.js.map +1 -1
  280. package/types/inspector.d.ts +0 -5
  281. package/types/inspector.d.ts.map +1 -1
  282. package/types/inspector.js +13 -3
  283. package/types/inspector.js.map +1 -1
  284. package/types/snapshot.d.ts +0 -5
  285. package/types/snapshot.d.ts.map +1 -1
  286. package/types/snapshot.js +12 -3
  287. package/types/snapshot.js.map +1 -1
  288. package/types/timeline.d.ts +0 -5
  289. package/types/timeline.d.ts.map +1 -1
  290. package/types/timeline.js +0 -5
  291. package/types/timeline.js.map +1 -1
  292. package/dist/client/assets/index-D632jo79.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../src/types/inspector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8FH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAErD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AAE5E,wEAAwE;AACxE,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAEtD,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Shared types and channel/path constants for the Components inspector.\n *\n * The inspector lets the DevTools panel show a hierarchical tree of the Lit\n * components on the page plus a detail view (reactive properties, internal\n * state, attributes, source) of a selected element. The panel can't touch the\n * page DOM directly (separate iframe document), so everything flows over the\n * existing transport: panel → server (POST {@link INSPECT_PATH}) → app runtime\n * (HMR {@link INSPECT_CMD_CHANNEL}); app → server (HMR\n * {@link INSPECT_DATA_CHANNEL}) → panel (SSE `event: {@link INSPECT_SSE_EVENT}`).\n *\n * Elements are referenced across the boundary by the stable numeric id from the\n * timeline's `idOf()` WeakMap, so a tree node, a details payload, and an\n * inspector pick all agree on identity.\n */\n\nexport interface ElementSource {\n file: string;\n line: number;\n}\n\n/** A node in the component render tree (one inspectable Lit element). */\nexport interface InspectorTreeNode {\n id: number;\n tagName: string;\n componentName?: string;\n source?: ElementSource;\n children: InspectorTreeNode[];\n}\n\n/** One reactive property (or internal `@state`) of an inspected element. */\nexport interface InspectorProp {\n name: string;\n /** Serialized, depth-limited preview of the current value. */\n value: string;\n /** A short type tag (`string`, `number`, `Array(3)`, `MyClass`, …). */\n type: string;\n /** The reflected attribute name, or `false` when `attribute: false`. */\n attribute: string | false;\n /** Whether the property reflects to its attribute. */\n reflects: boolean;\n /** Whether it's an internal `@state()` (no public attribute). */\n state: boolean;\n}\n\n/** Full detail snapshot for a single inspected element. */\nexport interface InspectorDetails {\n id: number;\n tagName: string;\n componentName?: string;\n source?: ElementSource;\n attributes: Array<{name: string; value: string}>;\n properties: InspectorProp[];\n flags: {\n hasUpdated: boolean;\n isUpdatePending: boolean;\n hasShadowRoot: boolean;\n };\n}\n\n/** App runtime → panel messages, carried on SSE `event: inspect`. */\nexport type InspectorMessage =\n /** The runtime came online; the panel should (re)request the tree. */\n | {type: 'ready'}\n | {type: 'tree'; roots: InspectorTreeNode[]}\n | {type: 'details'; details: InspectorDetails}\n /** The requested element id couldn't be resolved (removed / GC'd). */\n | {type: 'gone'; id: number}\n /** An inspect-mode overlay pick — select this element in the panel. */\n | {type: 'pick'; id: number};\n\n/** Panel → app runtime commands, POSTed to {@link INSPECT_PATH}. */\nexport type InspectorCommand =\n | {type: 'tree'}\n | {type: 'details'; id: number}\n /** Keep pushing fresh details for `id` as it updates; `null` stops. */\n | {type: 'watch'; id: number | null}\n /** Outline element `id` in the page on tree hover; `null` clears it. */\n | {type: 'highlight'; id: number | null}\n /**\n * Opt-in live tree: when enabled, the runtime watches the DOM and pushes a\n * fresh `tree` message whenever the component hierarchy changes. Off by\n * default (the panel otherwise refreshes on demand / on pick).\n */\n | {type: 'observe'; enabled: boolean}\n /**\n * Start the overlay's inspect-mode picker (the panel's \"Pick\" button). Handled\n * by the server (it broadcasts {@link INSPECT_OVERLAY_TOGGLE_CHANNEL}), not the\n * app runtime, so it never reaches the runtime's command handler.\n */\n | {type: 'pick'};\n\n/** HMR channel the server uses to forward a panel command to the app runtime. */\nexport const INSPECT_CMD_CHANNEL = 'lit:inspect:cmd';\n\n/** HMR channel the app runtime uses to push an {@link InspectorMessage}. */\nexport const INSPECT_DATA_CHANNEL = 'lit:inspect:data';\n\n/** Vite HMR channel the DevTools \"inspect element\" command broadcasts on. */\nexport const INSPECT_OVERLAY_TOGGLE_CHANNEL = 'lit-devtools:toggle-inspect';\n\n/** POST endpoint the panel uses to send an {@link InspectorCommand}. */\nexport const INSPECT_PATH = '/__lit-devtools-inspect';\n\n/** Named SSE event the server relays {@link InspectorMessage}s to the panel on. */\nexport const INSPECT_SSE_EVENT = 'inspect';\n"]}
1
+ {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../src/types/inspector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA8EH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAErD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,6BAA6B,CAAC;AAE5E,wEAAwE;AACxE,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAEtD,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC","sourcesContent":["/**\n * Shared types and channel/path constants for the Components inspector.\n *\n * The inspector lets the DevTools panel show a hierarchical tree of the Lit\n * components on the page plus a detail view (reactive properties, internal\n * state, attributes, source) of a selected element. The panel can't touch the\n * page DOM directly (separate iframe document), so everything flows over the\n * existing transport: panel → server (POST {@link INSPECT_PATH}) → app runtime\n * (HMR {@link INSPECT_CMD_CHANNEL}); app → server (HMR\n * {@link INSPECT_DATA_CHANNEL}) → panel (SSE `event: {@link INSPECT_SSE_EVENT}`).\n *\n * Elements are referenced across the boundary by the stable numeric id from the\n * timeline's `idOf()` WeakMap, so a tree node, a details payload, and an\n * inspector pick all agree on identity.\n */\n\nexport interface ElementSource {\n file: string;\n line: number;\n}\n\n/** A node in the component render tree (one inspectable Lit element). */\nexport interface InspectorTreeNode {\n id: number;\n tagName: string;\n componentName?: string;\n source?: ElementSource;\n children: InspectorTreeNode[];\n}\n\n/** One reactive property (or internal `@state`) of an inspected element. */\nexport interface InspectorProp {\n name: string;\n /** Serialized, depth-limited preview of the current value. */\n value: string;\n /** A short type tag (`string`, `number`, `Array(3)`, `MyClass`, …). */\n type: string;\n /** The reflected attribute name, or `false` when `attribute: false`. */\n attribute: string | false;\n /** Whether the property reflects to its attribute. */\n reflects: boolean;\n /** Whether it's an internal `@state()` (no public attribute). */\n state: boolean;\n}\n\n/** Full detail snapshot for a single inspected element. */\nexport interface InspectorDetails {\n id: number;\n tagName: string;\n componentName?: string;\n source?: ElementSource;\n attributes: Array<{name: string; value: string}>;\n properties: InspectorProp[];\n flags: {\n hasUpdated: boolean;\n isUpdatePending: boolean;\n hasShadowRoot: boolean;\n };\n}\n\n/** App runtime → panel messages, carried on SSE `event: inspect`. */\nexport type InspectorMessage =\n /** The runtime came online; the panel should (re)request the tree. */\n | {type: 'ready'}\n | {type: 'tree'; roots: InspectorTreeNode[]}\n | {type: 'details'; details: InspectorDetails}\n /** The requested element id couldn't be resolved (removed / GC'd). */\n | {type: 'gone'; id: number}\n /** An inspect-mode overlay pick — select this element in the panel. */\n | {type: 'pick'; id: number};\n\n/** Panel → app runtime commands, POSTed to {@link INSPECT_PATH}. */\nexport type InspectorCommand =\n | {type: 'tree'}\n | {type: 'details'; id: number}\n /** Keep pushing fresh details for `id` as it updates; `null` stops. */\n | {type: 'watch'; id: number | null}\n /** Outline element `id` in the page on tree hover; `null` clears it. */\n | {type: 'highlight'; id: number | null}\n /**\n * Opt-in live tree: when enabled, the runtime watches the DOM and pushes a\n * fresh `tree` message whenever the component hierarchy changes. Off by\n * default (the panel otherwise refreshes on demand / on pick).\n */\n | {type: 'observe'; enabled: boolean}\n /**\n * Start the overlay's inspect-mode picker (the panel's \"Pick\" button). Handled\n * by the server (it broadcasts {@link INSPECT_OVERLAY_TOGGLE_CHANNEL}), not the\n * app runtime, so it never reaches the runtime's command handler.\n */\n | {type: 'pick'};\n\n/** HMR channel the server uses to forward a panel command to the app runtime. */\nexport const INSPECT_CMD_CHANNEL = 'lit:inspect:cmd';\n\n/** HMR channel the app runtime uses to push an {@link InspectorMessage}. */\nexport const INSPECT_DATA_CHANNEL = 'lit:inspect:data';\n\n/** Vite HMR channel the DevTools \"inspect element\" command broadcasts on. */\nexport const INSPECT_OVERLAY_TOGGLE_CHANNEL = 'lit-devtools:toggle-inspect';\n\n/** POST endpoint the panel uses to send an {@link InspectorCommand}. */\nexport const INSPECT_PATH = '/__lit-devtools-inspect';\n\n/** Named SSE event the server relays {@link InspectorMessage}s to the panel on. */\nexport const INSPECT_SSE_EVENT = 'inspect';\n"]}
@@ -1,8 +1,3 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
1
  /**
7
2
  * A recorded DevTools session, frozen so someone else can open it.
8
3
  *
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../src/types/snapshot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;G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aAAa,EAAE,CAAC;IACxB,yDAAyD;IACzD,oBAAoB,EAAE,uBAAuB,EAAE,CAAC;CACjD"}
package/types/snapshot.js CHANGED
@@ -1,7 +1,16 @@
1
1
  /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
2
+ * A recorded DevTools session, frozen so someone else can open it.
3
+ *
4
+ * The point is not "a static copy of the panel". It is a bug report a
5
+ * maintainer can actually act on: the timeline of what happened, the component
6
+ * tree as it stood, the details of the components that were inspected, and any
7
+ * HMR incompatibilities that fired — opened in a browser with no checkout of
8
+ * the reporter's app and no reproduction steps.
9
+ *
10
+ * Everything here is already in the node side's hands during a live session
11
+ * (see `lib/devframe/definition.ts`, which caches exactly these four things),
12
+ * which is why capture needs no new transport: the dev server exports its own
13
+ * state.
5
14
  */
6
15
  export {};
7
16
  //# sourceMappingURL=snapshot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../src/types/snapshot.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * A recorded DevTools session, frozen so someone else can open it.\n *\n * The point is not \"a static copy of the panel\". It is a bug report a\n * maintainer can actually act on: the timeline of what happened, the component\n * tree as it stood, the details of the components that were inspected, and any\n * HMR incompatibilities that fired — opened in a browser with no checkout of\n * the reporter's app and no reproduction steps.\n *\n * Everything here is already in the node side's hands during a live session\n * (see `lib/devframe/definition.ts`, which caches exactly these four things),\n * which is why capture needs no new transport: the dev server exports its own\n * state.\n */\n\nimport type {HmrIncompatibilityEvent} from './hmr-incompatibility.js';\nimport type {InspectorDetails, InspectorTreeNode} from './inspector.js';\nimport type {TimelineEvent, TimelineLayer} from './timeline.js';\n\n/** Everything a frozen panel needs to render a past session. */\nexport interface SessionSnapshot {\n /** ISO timestamp of the export, shown by the frozen panel. */\n capturedAt: string;\n /** Plugin version the session was recorded on. */\n version: string;\n /** Custom layers registered by the app, so recorded events keep their labels. */\n customLayers: TimelineLayer[];\n /** The component tree as it stood at export time. */\n roots: InspectorTreeNode[];\n /**\n * Details for every component whose details were fetched during the\n * session. Only these ids can be baked — details are collected from live\n * DOM, so a component nobody opened has none to freeze.\n */\n details: InspectorDetails[];\n /** The recorded timeline, up to the node side's ring-buffer cap. */\n events: TimelineEvent[];\n /** HMR incompatibilities reported during the session. */\n hmrIncompatibilities: HmrIncompatibilityEvent[];\n}\n"]}
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../src/types/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG","sourcesContent":["/**\n * A recorded DevTools session, frozen so someone else can open it.\n *\n * The point is not \"a static copy of the panel\". It is a bug report a\n * maintainer can actually act on: the timeline of what happened, the component\n * tree as it stood, the details of the components that were inspected, and any\n * HMR incompatibilities that fired — opened in a browser with no checkout of\n * the reporter's app and no reproduction steps.\n *\n * Everything here is already in the node side's hands during a live session\n * (see `lib/devframe/definition.ts`, which caches exactly these four things),\n * which is why capture needs no new transport: the dev server exports its own\n * state.\n */\n\nimport type {HmrIncompatibilityEvent} from './hmr-incompatibility.js';\nimport type {InspectorDetails, InspectorTreeNode} from './inspector.js';\nimport type {TimelineEvent, TimelineLayer} from './timeline.js';\n\n/** Everything a frozen panel needs to render a past session. */\nexport interface SessionSnapshot {\n /** ISO timestamp of the export, shown by the frozen panel. */\n capturedAt: string;\n /** Plugin version the session was recorded on. */\n version: string;\n /** Custom layers registered by the app, so recorded events keep their labels. */\n customLayers: TimelineLayer[];\n /** The component tree as it stood at export time. */\n roots: InspectorTreeNode[];\n /**\n * Details for every component whose details were fetched during the\n * session. Only these ids can be baked — details are collected from live\n * DOM, so a component nobody opened has none to freeze.\n */\n details: InspectorDetails[];\n /** The recorded timeline, up to the node side's ring-buffer cap. */\n events: TimelineEvent[];\n /** HMR incompatibilities reported during the session. */\n hmrIncompatibilities: HmrIncompatibilityEvent[];\n}\n"]}
@@ -1,8 +1,3 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
1
  export interface TimelineLayer {
7
2
  id: string;
8
3
  label: string;
@@ -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;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,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,IAAI,EAAE,MAAM,CAAA;SAAC,CAAC;KACvC,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,OAAO,CAAC;IACxB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,uBAAuB,EAAE,OAAO,CAAC;IACjC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,eA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BAAiB,GAAG,OAAO,CACrC,MAAM,CACF,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,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
@@ -1,8 +1,3 @@
1
- /**
2
- * @license
3
- * Copyright 2026 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
1
  export const TIMELINE_LAYERS = [
7
2
  { id: 'lit-lifecycle', label: 'Lit Lifecycle', color: 0x4d63ff },
8
3
  { id: 'lit-render', label: 'Lit Render', color: 0x325cff },
@@ -1 +1 @@
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;AA2FF;;;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;AAoBjE,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 childState: 'reset' | 'transfer' | 'reuse';\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 hmrChildState?: 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 hmrChildState?: 'reset' | 'transfer' | 'reuse';\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 * Mirror the timeline into Chrome DevTools' Performance panel as custom\n * tracks (via `console.timeStamp`), independent of panel recording. Pure\n * preference (no config-time baseline), so `undefined` reads as off.\n */\n chromeTracks?: 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 | 'hmrChildState'\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"]}
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../src/types/timeline.ts"],"names":[],"mappings":"AAgDA,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;AA2FF;;;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;AAoBjE,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":["export 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 childState: 'reset' | 'transfer' | 'reuse';\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 hmrChildState?: 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 hmrChildState?: 'reset' | 'transfer' | 'reuse';\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 * Mirror the timeline into Chrome DevTools' Performance panel as custom\n * tracks (via `console.timeStamp`), independent of panel recording. Pure\n * preference (no config-time baseline), so `undefined` reads as off.\n */\n chromeTracks?: 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 | 'hmrChildState'\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"]}