@oddsquad/vite-plugin-lit 0.0.3 → 0.0.5

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 (175) hide show
  1. package/index.d.ts +3 -2
  2. package/index.d.ts.map +1 -1
  3. package/index.js +1 -1
  4. package/index.js.map +1 -1
  5. package/lib/color-scheme.d.ts +30 -0
  6. package/lib/color-scheme.d.ts.map +1 -0
  7. package/lib/color-scheme.js +41 -0
  8. package/lib/color-scheme.js.map +1 -0
  9. package/lib/icons.d.ts +18 -0
  10. package/lib/icons.d.ts.map +1 -0
  11. package/lib/icons.js +23 -0
  12. package/lib/icons.js.map +1 -0
  13. package/lib/plugin.d.ts +71 -6
  14. package/lib/plugin.d.ts.map +1 -1
  15. package/lib/plugin.js +522 -21
  16. package/lib/plugin.js.map +1 -1
  17. package/lib/runtime/css.d.ts +94 -0
  18. package/lib/runtime/css.d.ts.map +1 -0
  19. package/lib/runtime/css.js +112 -0
  20. package/lib/runtime/css.js.map +1 -0
  21. package/lib/runtime/edge-panel.d.ts +18 -0
  22. package/lib/runtime/edge-panel.d.ts.map +1 -0
  23. package/lib/runtime/edge-panel.js +130 -0
  24. package/lib/runtime/edge-panel.js.map +1 -0
  25. package/lib/runtime/fonts.d.ts +18 -0
  26. package/lib/runtime/fonts.d.ts.map +1 -0
  27. package/lib/runtime/fonts.js +18 -0
  28. package/lib/runtime/fonts.js.map +1 -0
  29. package/lib/runtime/indicator.d.ts +7 -0
  30. package/lib/runtime/indicator.d.ts.map +1 -0
  31. package/lib/runtime/indicator.js +141 -0
  32. package/lib/runtime/indicator.js.map +1 -0
  33. package/lib/runtime/inspector/collect.d.ts +17 -0
  34. package/lib/runtime/inspector/collect.d.ts.map +1 -0
  35. package/lib/runtime/inspector/collect.js +132 -0
  36. package/lib/runtime/inspector/collect.js.map +1 -0
  37. package/lib/runtime/inspector/install.d.ts +7 -0
  38. package/lib/runtime/inspector/install.d.ts.map +1 -0
  39. package/lib/runtime/inspector/install.js +204 -0
  40. package/lib/runtime/inspector/install.js.map +1 -0
  41. package/lib/runtime/inspector/serialize.d.ts +10 -0
  42. package/lib/runtime/inspector/serialize.d.ts.map +1 -0
  43. package/lib/runtime/inspector/serialize.js +133 -0
  44. package/lib/runtime/inspector/serialize.js.map +1 -0
  45. package/lib/runtime/intern.d.ts.map +1 -1
  46. package/lib/runtime/intern.js +1 -1
  47. package/lib/runtime/intern.js.map +1 -1
  48. package/lib/runtime/overrides.d.ts +25 -0
  49. package/lib/runtime/overrides.d.ts.map +1 -0
  50. package/lib/runtime/overrides.js +33 -0
  51. package/lib/runtime/overrides.js.map +1 -0
  52. package/lib/runtime/patch.d.ts +6 -15
  53. package/lib/runtime/patch.d.ts.map +1 -1
  54. package/lib/runtime/patch.js +81 -28
  55. package/lib/runtime/patch.js.map +1 -1
  56. package/lib/runtime/source-meta.d.ts +16 -0
  57. package/lib/runtime/source-meta.d.ts.map +1 -0
  58. package/lib/runtime/source-meta.js +8 -0
  59. package/lib/runtime/source-meta.js.map +1 -0
  60. package/lib/runtime/source-overlay/editors.d.ts +9 -0
  61. package/lib/runtime/source-overlay/editors.d.ts.map +1 -0
  62. package/lib/runtime/source-overlay/editors.js +40 -0
  63. package/lib/runtime/source-overlay/editors.js.map +1 -0
  64. package/lib/runtime/source-overlay/mask-path.d.ts +7 -0
  65. package/lib/runtime/source-overlay/mask-path.d.ts.map +1 -0
  66. package/lib/runtime/source-overlay/mask-path.js +26 -0
  67. package/lib/runtime/source-overlay/mask-path.js.map +1 -0
  68. package/lib/runtime/source-overlay/overlay-element.d.ts +18 -0
  69. package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -0
  70. package/lib/runtime/source-overlay/overlay-element.js +381 -0
  71. package/lib/runtime/source-overlay/overlay-element.js.map +1 -0
  72. package/lib/runtime/source-overlay/source-host.d.ts +14 -0
  73. package/lib/runtime/source-overlay/source-host.d.ts.map +1 -0
  74. package/lib/runtime/source-overlay/source-host.js +94 -0
  75. package/lib/runtime/source-overlay/source-host.js.map +1 -0
  76. package/lib/runtime/source-overlay/template.d.ts +7 -0
  77. package/lib/runtime/source-overlay/template.d.ts.map +1 -0
  78. package/lib/runtime/source-overlay/template.js +125 -0
  79. package/lib/runtime/source-overlay/template.js.map +1 -0
  80. package/lib/runtime/source-overlay.d.ts +7 -0
  81. package/lib/runtime/source-overlay.d.ts.map +1 -0
  82. package/lib/runtime/source-overlay.js +11 -0
  83. package/lib/runtime/source-overlay.js.map +1 -0
  84. package/lib/runtime/timeline/clock.d.ts +10 -0
  85. package/lib/runtime/timeline/clock.d.ts.map +1 -0
  86. package/lib/runtime/timeline/clock.js +22 -0
  87. package/lib/runtime/timeline/clock.js.map +1 -0
  88. package/lib/runtime/timeline/identity.d.ts +37 -0
  89. package/lib/runtime/timeline/identity.d.ts.map +1 -0
  90. package/lib/runtime/timeline/identity.js +73 -0
  91. package/lib/runtime/timeline/identity.js.map +1 -0
  92. package/lib/runtime/timeline/input.d.ts +16 -0
  93. package/lib/runtime/timeline/input.d.ts.map +1 -0
  94. package/lib/runtime/timeline/input.js +87 -0
  95. package/lib/runtime/timeline/input.js.map +1 -0
  96. package/lib/runtime/timeline/install.d.ts +7 -0
  97. package/lib/runtime/timeline/install.d.ts.map +1 -0
  98. package/lib/runtime/timeline/install.js +69 -0
  99. package/lib/runtime/timeline/install.js.map +1 -0
  100. package/lib/runtime/timeline/lifecycle.d.ts +27 -0
  101. package/lib/runtime/timeline/lifecycle.d.ts.map +1 -0
  102. package/lib/runtime/timeline/lifecycle.js +225 -0
  103. package/lib/runtime/timeline/lifecycle.js.map +1 -0
  104. package/lib/runtime/timeline/public-api.d.ts +28 -0
  105. package/lib/runtime/timeline/public-api.d.ts.map +1 -0
  106. package/lib/runtime/timeline/public-api.js +44 -0
  107. package/lib/runtime/timeline/public-api.js.map +1 -0
  108. package/lib/runtime/timeline/render.d.ts +39 -0
  109. package/lib/runtime/timeline/render.d.ts.map +1 -0
  110. package/lib/runtime/timeline/render.js +109 -0
  111. package/lib/runtime/timeline/render.js.map +1 -0
  112. package/lib/runtime/timeline/transport.d.ts +42 -0
  113. package/lib/runtime/timeline/transport.d.ts.map +1 -0
  114. package/lib/runtime/timeline/transport.js +86 -0
  115. package/lib/runtime/timeline/transport.js.map +1 -0
  116. package/lib/segmented-tabs.d.ts +33 -0
  117. package/lib/segmented-tabs.d.ts.map +1 -0
  118. package/lib/segmented-tabs.js +129 -0
  119. package/lib/segmented-tabs.js.map +1 -0
  120. package/lib/source-meta.d.ts +26 -0
  121. package/lib/source-meta.d.ts.map +1 -0
  122. package/lib/source-meta.js +129 -0
  123. package/lib/source-meta.js.map +1 -0
  124. package/lib/timeline-plugin.d.ts +72 -0
  125. package/lib/timeline-plugin.d.ts.map +1 -0
  126. package/lib/timeline-plugin.js +376 -0
  127. package/lib/timeline-plugin.js.map +1 -0
  128. package/lib/tokens.d.ts +38 -0
  129. package/lib/tokens.d.ts.map +1 -0
  130. package/lib/tokens.js +263 -0
  131. package/lib/tokens.js.map +1 -0
  132. package/lib/transform.d.ts +5 -5
  133. package/lib/transform.d.ts.map +1 -1
  134. package/lib/transform.js +3 -3
  135. package/lib/transform.js.map +1 -1
  136. package/lib/types.d.ts +34 -0
  137. package/lib/types.d.ts.map +1 -0
  138. package/lib/types.js +7 -0
  139. package/lib/types.js.map +1 -0
  140. package/lib/wrap-table.d.ts.map +1 -1
  141. package/lib/wrap-table.js.map +1 -1
  142. package/package.json +18 -4
  143. package/panel/components-view.d.ts +60 -0
  144. package/panel/components-view.d.ts.map +1 -0
  145. package/panel/components-view.js +581 -0
  146. package/panel/components-view.js.map +1 -0
  147. package/panel/devtools-settings.d.ts +41 -0
  148. package/panel/devtools-settings.d.ts.map +1 -0
  149. package/panel/devtools-settings.js +463 -0
  150. package/panel/devtools-settings.js.map +1 -0
  151. package/panel/index.html +29 -0
  152. package/panel/lit-devtools-panel.d.ts +37 -0
  153. package/panel/lit-devtools-panel.d.ts.map +1 -0
  154. package/panel/lit-devtools-panel.js +183 -0
  155. package/panel/lit-devtools-panel.js.map +1 -0
  156. package/panel/timeline-event-list.d.ts +43 -0
  157. package/panel/timeline-event-list.d.ts.map +1 -0
  158. package/panel/timeline-event-list.js +416 -0
  159. package/panel/timeline-event-list.js.map +1 -0
  160. package/panel/timeline-layers.d.ts +25 -0
  161. package/panel/timeline-layers.d.ts.map +1 -0
  162. package/panel/timeline-layers.js +96 -0
  163. package/panel/timeline-layers.js.map +1 -0
  164. package/panel/timeline-view.d.ts +38 -0
  165. package/panel/timeline-view.d.ts.map +1 -0
  166. package/panel/timeline-view.js +234 -0
  167. package/panel/timeline-view.js.map +1 -0
  168. package/types/inspector.d.ts +130 -0
  169. package/types/inspector.d.ts.map +1 -0
  170. package/types/inspector.js +16 -0
  171. package/types/inspector.js.map +1 -0
  172. package/types/timeline.d.ts +98 -0
  173. package/types/timeline.d.ts.map +1 -0
  174. package/types/timeline.js +39 -0
  175. package/types/timeline.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../packages/labs/vite-plugin-lit/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"]}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ export interface TimelineLayer {
7
+ id: string;
8
+ label: string;
9
+ color: number;
10
+ }
11
+ export interface TimelineEvent<TData = unknown> {
12
+ layerId: string;
13
+ /** `performance.now()` timestamp in the browser. */
14
+ time: number;
15
+ data: TData;
16
+ title?: string;
17
+ subtitle?: string;
18
+ /** Pairs a start event with its matching end event in the same update group. */
19
+ groupId?: number | string;
20
+ logType?: 'default' | 'warning' | 'error';
21
+ meta?: {
22
+ elementId?: number;
23
+ tagName?: string;
24
+ source?: {
25
+ file: string;
26
+ line: number;
27
+ };
28
+ };
29
+ }
30
+ export interface TimelineLayersState {
31
+ recordingState: boolean;
32
+ litLifecycleEnabled: boolean;
33
+ litRenderEnabled: boolean;
34
+ mouseEventEnabled: boolean;
35
+ keyboardEventEnabled: boolean;
36
+ }
37
+ export declare const TIMELINE_LAYERS: readonly TimelineLayer[];
38
+ export declare const DEFAULT_LAYERS_STATE: TimelineLayersState;
39
+ /**
40
+ * Snapshot of the plugin's resolved feature settings, surfaced in the panel's
41
+ * Settings tab. The plugin produces this at config time (explicit options >
42
+ * LIT_PLUGIN_* env > defaults) and serves it from the panel server. It's the
43
+ * baseline the panel shows; some HMR settings can then be overridden live (see
44
+ * {@link SettingsOverride}).
45
+ */
46
+ export interface FeatureSettings {
47
+ hmr: {
48
+ enabled: boolean;
49
+ reconnect: boolean;
50
+ onIncompatible: 'reload' | 'warn';
51
+ indicatorEnabled: boolean;
52
+ indicatorCount: boolean;
53
+ };
54
+ sourceOverlay: {
55
+ enabled: boolean;
56
+ /** Hotkey letter combined with Ctrl+Shift to toggle the overlay. */
57
+ key: string;
58
+ editor: string;
59
+ throttleMs: number;
60
+ };
61
+ timeline: boolean;
62
+ }
63
+ /**
64
+ * Runtime overrides the panel applies on top of the resolved env config, for
65
+ * settings whose runtime is already injected (so they can change live). A
66
+ * feature disabled at config time has no runtime, so it can't be enabled here
67
+ * — only the behaviour of already-enabled features is overridable.
68
+ *
69
+ * Persisted under {@link SETTINGS_OVERRIDE_LS_KEY} (the panel and app share an
70
+ * origin) so overrides survive reloads, and pushed live over
71
+ * {@link SETTINGS_OVERRIDE_CHANNEL} via Vite HMR for immediate effect.
72
+ */
73
+ export interface SettingsOverride {
74
+ hmrReconnect?: boolean;
75
+ hmrOnIncompatible?: 'reload' | 'warn';
76
+ hmrIndicatorVisible?: boolean;
77
+ hmrIndicatorCount?: boolean;
78
+ /** Built-in editor key for the source overlay's open-in-editor target. */
79
+ sourceOverlayEditor?: string;
80
+ }
81
+ /**
82
+ * Built-in editors the source overlay can open files in. Keep in sync with
83
+ * BUILTIN_EDITORS in lib/runtime/source-overlay/editors.ts.
84
+ */
85
+ export declare const SOURCE_OVERLAY_EDITORS: ReadonlyArray<{
86
+ value: string;
87
+ label: string;
88
+ }>;
89
+ /** localStorage key holding the {@link SettingsOverride}. */
90
+ export declare const SETTINGS_OVERRIDE_LS_KEY = "lit-devtools-overrides";
91
+ /** Vite HMR channel the server uses to push overrides to the app runtime. */
92
+ export declare const SETTINGS_OVERRIDE_CHANNEL = "lit-devtools:settings-override";
93
+ /**
94
+ * Vite HMR channel the DevTools "toggle source overlay" command uses to tell
95
+ * the app runtime to toggle the overlay (the command handler runs server-side).
96
+ */
97
+ export declare const SOURCE_OVERLAY_TOGGLE_CHANNEL = "lit-devtools:toggle-source-overlay";
98
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../packages/labs/vite-plugin-lit/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,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,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAKnD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,mBAMlC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE;QACH,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,QAAQ,GAAG,MAAM,CAAC;QAClC,gBAAgB,EAAE,OAAO,CAAC;QAC1B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,aAAa,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,oEAAoE;QACpE,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACtC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0EAA0E;IAC1E,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;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,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,mCAAmC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,6BAA6B,uCACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ export const TIMELINE_LAYERS = [
7
+ { id: 'lit-lifecycle', label: 'Lit Lifecycle', color: 0x4d63ff },
8
+ { id: 'lit-render', label: 'Lit Render', color: 0x325cff },
9
+ { id: 'mouse', label: 'Mouse', color: 0xa451af },
10
+ { id: 'keyboard', label: 'Keyboard', color: 0x8151af },
11
+ ];
12
+ export const DEFAULT_LAYERS_STATE = {
13
+ recordingState: false,
14
+ litLifecycleEnabled: true,
15
+ litRenderEnabled: true,
16
+ mouseEventEnabled: false,
17
+ keyboardEventEnabled: false,
18
+ };
19
+ /**
20
+ * Built-in editors the source overlay can open files in. Keep in sync with
21
+ * BUILTIN_EDITORS in lib/runtime/source-overlay/editors.ts.
22
+ */
23
+ export const SOURCE_OVERLAY_EDITORS = [
24
+ { value: 'vscode', label: 'VS Code' },
25
+ { value: 'cursor', label: 'Cursor' },
26
+ { value: 'zed', label: 'Zed' },
27
+ { value: 'idea', label: 'IntelliJ' },
28
+ { value: 'windsurf', label: 'Windsurf' },
29
+ ];
30
+ /** localStorage key holding the {@link SettingsOverride}. */
31
+ export const SETTINGS_OVERRIDE_LS_KEY = 'lit-devtools-overrides';
32
+ /** Vite HMR channel the server uses to push overrides to the app runtime. */
33
+ export const SETTINGS_OVERRIDE_CHANNEL = 'lit-devtools:settings-override';
34
+ /**
35
+ * Vite HMR channel the DevTools "toggle source overlay" command uses to tell
36
+ * the app runtime to toggle the overlay (the command handler runs server-side).
37
+ */
38
+ export const SOURCE_OVERLAY_TOGGLE_CHANNEL = 'lit-devtools:toggle-source-overlay';
39
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../packages/labs/vite-plugin-lit/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;AA8CF;;;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\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"]}