@oddsquad/vite-plugin-lit 0.2.3 → 0.4.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 (240) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/LICENSE +28 -0
  3. package/README.md +157 -0
  4. package/bin.mjs +154 -0
  5. package/client.d.ts +61 -0
  6. package/dist/client/assets/browser-agent-rpc-BXhoSh1z-CdtPhBL-.js +69 -0
  7. package/dist/client/assets/browser-agent-rpc-BXhoSh1z-CdtPhBL-.js.map +1 -0
  8. package/dist/client/assets/flow-DK8vmxvN.js +745 -0
  9. package/dist/client/assets/flow-DK8vmxvN.js.map +1 -0
  10. package/dist/client/assets/index-DVe6M4HV.js +10614 -0
  11. package/dist/client/assets/index-DVe6M4HV.js.map +1 -0
  12. package/{panel → dist/client}/index.html +1 -0
  13. package/index.d.ts.map +1 -1
  14. package/index.js +2 -2
  15. package/index.js.map +1 -1
  16. package/lib/color-scheme.d.ts.map +1 -1
  17. package/lib/color-scheme.js +17 -21
  18. package/lib/color-scheme.js.map +1 -1
  19. package/lib/devframe/definition.d.ts +45 -0
  20. package/lib/devframe/definition.d.ts.map +1 -0
  21. package/lib/devframe/definition.js +547 -0
  22. package/lib/devframe/definition.js.map +1 -0
  23. package/lib/devframe/icon.d.ts +8 -0
  24. package/lib/devframe/icon.d.ts.map +1 -0
  25. package/lib/devframe/icon.js +21 -0
  26. package/lib/devframe/icon.js.map +1 -0
  27. package/lib/devframe/paths.d.ts +12 -0
  28. package/lib/devframe/paths.d.ts.map +1 -0
  29. package/lib/devframe/paths.js +38 -0
  30. package/lib/devframe/paths.js.map +1 -0
  31. package/lib/devframe/protocol.d.ts +218 -0
  32. package/lib/devframe/protocol.d.ts.map +1 -0
  33. package/lib/devframe/protocol.js +77 -0
  34. package/lib/devframe/protocol.js.map +1 -0
  35. package/lib/devframe/source.d.ts +49 -0
  36. package/lib/devframe/source.d.ts.map +1 -0
  37. package/lib/devframe/source.js +23 -0
  38. package/lib/devframe/source.js.map +1 -0
  39. package/lib/devframe/vite.d.ts +116 -0
  40. package/lib/devframe/vite.d.ts.map +1 -0
  41. package/lib/devframe/vite.js +292 -0
  42. package/lib/devframe/vite.js.map +1 -0
  43. package/lib/http.d.ts +29 -0
  44. package/lib/http.d.ts.map +1 -0
  45. package/lib/http.js +35 -0
  46. package/lib/http.js.map +1 -0
  47. package/lib/icons.d.ts +2 -0
  48. package/lib/icons.d.ts.map +1 -1
  49. package/lib/icons.js +10 -4
  50. package/lib/icons.js.map +1 -1
  51. package/lib/options.d.ts +131 -0
  52. package/lib/options.d.ts.map +1 -0
  53. package/lib/options.js +128 -0
  54. package/lib/options.js.map +1 -0
  55. package/lib/plugin.d.ts +6 -137
  56. package/lib/plugin.d.ts.map +1 -1
  57. package/lib/plugin.js +280 -677
  58. package/lib/plugin.js.map +1 -1
  59. package/lib/plugins/css-literals.d.ts +15 -0
  60. package/lib/plugins/css-literals.d.ts.map +1 -0
  61. package/lib/plugins/css-literals.js +154 -0
  62. package/lib/plugins/css-literals.js.map +1 -0
  63. package/lib/plugins/css-queries.d.ts +20 -0
  64. package/lib/plugins/css-queries.d.ts.map +1 -0
  65. package/lib/plugins/css-queries.js +139 -0
  66. package/lib/plugins/css-queries.js.map +1 -0
  67. package/lib/plugins/open-in-editor.d.ts +16 -0
  68. package/lib/plugins/open-in-editor.d.ts.map +1 -0
  69. package/lib/plugins/open-in-editor.js +91 -0
  70. package/lib/plugins/open-in-editor.js.map +1 -0
  71. package/lib/plugins/shared.d.ts +13 -0
  72. package/lib/plugins/shared.d.ts.map +1 -0
  73. package/lib/plugins/shared.js +23 -0
  74. package/lib/plugins/shared.js.map +1 -0
  75. package/lib/plugins/timeline-virtual.d.ts +19 -0
  76. package/lib/plugins/timeline-virtual.d.ts.map +1 -0
  77. package/lib/plugins/timeline-virtual.js +53 -0
  78. package/lib/plugins/timeline-virtual.js.map +1 -0
  79. package/lib/runtime/css.d.ts +2 -2
  80. package/lib/runtime/css.d.ts.map +1 -1
  81. package/lib/runtime/css.js +41 -34
  82. package/lib/runtime/css.js.map +1 -1
  83. package/lib/runtime/edge-panel.d.ts.map +1 -1
  84. package/lib/runtime/edge-panel.js +82 -91
  85. package/lib/runtime/edge-panel.js.map +1 -1
  86. package/lib/runtime/fonts.d.ts.map +1 -1
  87. package/lib/runtime/fonts.js +1 -1
  88. package/lib/runtime/fonts.js.map +1 -1
  89. package/lib/runtime/indicator.d.ts.map +1 -1
  90. package/lib/runtime/indicator.js +71 -74
  91. package/lib/runtime/indicator.js.map +1 -1
  92. package/lib/runtime/inspector/collect.d.ts.map +1 -1
  93. package/lib/runtime/inspector/collect.js +83 -90
  94. package/lib/runtime/inspector/collect.js.map +1 -1
  95. package/lib/runtime/inspector/highlight.d.ts +16 -0
  96. package/lib/runtime/inspector/highlight.d.ts.map +1 -0
  97. package/lib/runtime/inspector/highlight.js +66 -0
  98. package/lib/runtime/inspector/highlight.js.map +1 -0
  99. package/lib/runtime/inspector/install.d.ts.map +1 -1
  100. package/lib/runtime/inspector/install.js +230 -205
  101. package/lib/runtime/inspector/install.js.map +1 -1
  102. package/lib/runtime/inspector/serialize.d.ts.map +1 -1
  103. package/lib/runtime/inspector/serialize.js +86 -107
  104. package/lib/runtime/inspector/serialize.js.map +1 -1
  105. package/lib/runtime/intern.d.ts.map +1 -1
  106. package/lib/runtime/intern.js +31 -29
  107. package/lib/runtime/intern.js.map +1 -1
  108. package/lib/runtime/overrides.d.ts.map +1 -1
  109. package/lib/runtime/overrides.js +14 -13
  110. package/lib/runtime/overrides.js.map +1 -1
  111. package/lib/runtime/patch.d.ts +8 -0
  112. package/lib/runtime/patch.d.ts.map +1 -1
  113. package/lib/runtime/patch.js +321 -282
  114. package/lib/runtime/patch.js.map +1 -1
  115. package/lib/runtime/source-meta.d.ts.map +1 -1
  116. package/lib/runtime/source-meta.js +1 -1
  117. package/lib/runtime/source-meta.js.map +1 -1
  118. package/lib/runtime/source-overlay/editors.d.ts.map +1 -1
  119. package/lib/runtime/source-overlay/editors.js +27 -27
  120. package/lib/runtime/source-overlay/editors.js.map +1 -1
  121. package/lib/runtime/source-overlay/mask-path.d.ts.map +1 -1
  122. package/lib/runtime/source-overlay/mask-path.js +15 -15
  123. package/lib/runtime/source-overlay/mask-path.js.map +1 -1
  124. package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -1
  125. package/lib/runtime/source-overlay/overlay-element.js +359 -355
  126. package/lib/runtime/source-overlay/overlay-element.js.map +1 -1
  127. package/lib/runtime/source-overlay/source-host.d.ts.map +1 -1
  128. package/lib/runtime/source-overlay/source-host.js +64 -71
  129. package/lib/runtime/source-overlay/source-host.js.map +1 -1
  130. package/lib/runtime/source-overlay/template.d.ts.map +1 -1
  131. package/lib/runtime/source-overlay/template.js +3 -3
  132. package/lib/runtime/source-overlay/template.js.map +1 -1
  133. package/lib/runtime/source-overlay.d.ts.map +1 -1
  134. package/lib/runtime/source-overlay.js +5 -2
  135. package/lib/runtime/source-overlay.js.map +1 -1
  136. package/lib/runtime/timeline/clock.d.ts.map +1 -1
  137. package/lib/runtime/timeline/clock.js +2 -2
  138. package/lib/runtime/timeline/clock.js.map +1 -1
  139. package/lib/runtime/timeline/flash.d.ts +39 -0
  140. package/lib/runtime/timeline/flash.d.ts.map +1 -0
  141. package/lib/runtime/timeline/flash.js +169 -0
  142. package/lib/runtime/timeline/flash.js.map +1 -0
  143. package/lib/runtime/timeline/identity.d.ts.map +1 -1
  144. package/lib/runtime/timeline/identity.js +27 -27
  145. package/lib/runtime/timeline/identity.js.map +1 -1
  146. package/lib/runtime/timeline/input.d.ts.map +1 -1
  147. package/lib/runtime/timeline/input.js +54 -67
  148. package/lib/runtime/timeline/input.js.map +1 -1
  149. package/lib/runtime/timeline/install.d.ts.map +1 -1
  150. package/lib/runtime/timeline/install.js +47 -33
  151. package/lib/runtime/timeline/install.js.map +1 -1
  152. package/lib/runtime/timeline/lifecycle.d.ts +8 -0
  153. package/lib/runtime/timeline/lifecycle.d.ts.map +1 -1
  154. package/lib/runtime/timeline/lifecycle.js +149 -133
  155. package/lib/runtime/timeline/lifecycle.js.map +1 -1
  156. package/lib/runtime/timeline/public-api.d.ts +2 -2
  157. package/lib/runtime/timeline/public-api.d.ts.map +1 -1
  158. package/lib/runtime/timeline/public-api.js +11 -11
  159. package/lib/runtime/timeline/public-api.js.map +1 -1
  160. package/lib/runtime/timeline/render.d.ts +15 -6
  161. package/lib/runtime/timeline/render.d.ts.map +1 -1
  162. package/lib/runtime/timeline/render.js +212 -78
  163. package/lib/runtime/timeline/render.js.map +1 -1
  164. package/lib/runtime/timeline/transport.d.ts.map +1 -1
  165. package/lib/runtime/timeline/transport.js +39 -43
  166. package/lib/runtime/timeline/transport.js.map +1 -1
  167. package/lib/segmented-tabs.d.ts +3 -1
  168. package/lib/segmented-tabs.d.ts.map +1 -1
  169. package/lib/segmented-tabs.js +136 -107
  170. package/lib/segmented-tabs.js.map +1 -1
  171. package/lib/snapshot.d.ts +28 -0
  172. package/lib/snapshot.d.ts.map +1 -0
  173. package/lib/snapshot.js +57 -0
  174. package/lib/snapshot.js.map +1 -0
  175. package/lib/source-meta.d.ts.map +1 -1
  176. package/lib/source-meta.js +176 -162
  177. package/lib/source-meta.js.map +1 -1
  178. package/lib/timeline/derive.d.ts +152 -0
  179. package/lib/timeline/derive.d.ts.map +1 -0
  180. package/lib/timeline/derive.js +242 -0
  181. package/lib/timeline/derive.js.map +1 -0
  182. package/lib/tokens.d.ts.map +1 -1
  183. package/lib/tokens.js +17 -18
  184. package/lib/tokens.js.map +1 -1
  185. package/lib/transform.d.ts.map +1 -1
  186. package/lib/transform.js +62 -57
  187. package/lib/transform.js.map +1 -1
  188. package/lib/types.d.ts.map +1 -1
  189. package/lib/types.js +1 -1
  190. package/lib/types.js.map +1 -1
  191. package/lib/wrap-table.d.ts.map +1 -1
  192. package/lib/wrap-table.js +19 -17
  193. package/lib/wrap-table.js.map +1 -1
  194. package/package.json +80 -13
  195. package/types/hmr-incompatibility.d.ts +59 -0
  196. package/types/hmr-incompatibility.d.ts.map +1 -0
  197. package/types/hmr-incompatibility.js +30 -0
  198. package/types/hmr-incompatibility.js.map +1 -0
  199. package/types/in-page.d.ts +49 -0
  200. package/types/in-page.d.ts.map +1 -0
  201. package/types/in-page.js +33 -0
  202. package/types/in-page.js.map +1 -0
  203. package/types/inspector.d.ts.map +1 -1
  204. package/types/inspector.js.map +1 -1
  205. package/types/snapshot.d.ts +44 -0
  206. package/types/snapshot.d.ts.map +1 -0
  207. package/types/snapshot.js +7 -0
  208. package/types/snapshot.js.map +1 -0
  209. package/types/timeline.d.ts +23 -1
  210. package/types/timeline.d.ts.map +1 -1
  211. package/types/timeline.js +2 -0
  212. package/types/timeline.js.map +1 -1
  213. package/lib/timeline-plugin.d.ts +0 -72
  214. package/lib/timeline-plugin.d.ts.map +0 -1
  215. package/lib/timeline-plugin.js +0 -376
  216. package/lib/timeline-plugin.js.map +0 -1
  217. package/panel/components-view.d.ts +0 -60
  218. package/panel/components-view.d.ts.map +0 -1
  219. package/panel/components-view.js +0 -587
  220. package/panel/components-view.js.map +0 -1
  221. package/panel/devtools-settings.d.ts +0 -41
  222. package/panel/devtools-settings.d.ts.map +0 -1
  223. package/panel/devtools-settings.js +0 -463
  224. package/panel/devtools-settings.js.map +0 -1
  225. package/panel/lit-devtools-panel.d.ts +0 -37
  226. package/panel/lit-devtools-panel.d.ts.map +0 -1
  227. package/panel/lit-devtools-panel.js +0 -185
  228. package/panel/lit-devtools-panel.js.map +0 -1
  229. package/panel/timeline-event-list.d.ts +0 -43
  230. package/panel/timeline-event-list.d.ts.map +0 -1
  231. package/panel/timeline-event-list.js +0 -416
  232. package/panel/timeline-event-list.js.map +0 -1
  233. package/panel/timeline-layers.d.ts +0 -25
  234. package/panel/timeline-layers.d.ts.map +0 -1
  235. package/panel/timeline-layers.js +0 -96
  236. package/panel/timeline-layers.js.map +0 -1
  237. package/panel/timeline-view.d.ts +0 -38
  238. package/panel/timeline-view.d.ts.map +0 -1
  239. package/panel/timeline-view.js +0 -234
  240. package/panel/timeline-view.js.map +0 -1
package/lib/options.js ADDED
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const CSS_SHEET_BUILD_MODES = ['auto', 'url', 'inline', 'inline-raw'];
7
+ /** Env var prefix consumed at config time. */
8
+ export const ENV_PREFIX = 'LIT_PLUGIN';
9
+ const ON_INCOMPATIBLE_MODES = ['reload', 'warn'];
10
+ /** Parse a boolean-ish env string; `undefined` when unset/unrecognized. */
11
+ const envBool = (v) =>
12
+ v === 'true' || v === '1'
13
+ ? true
14
+ : v === 'false' || v === '0'
15
+ ? false
16
+ : undefined;
17
+ /** Parse a numeric env string; `undefined` when unset/non-numeric. */
18
+ const envNum = (v) => {
19
+ if (v === undefined || v === '') return undefined;
20
+ const n = Number(v);
21
+ return Number.isNaN(n) ? undefined : n;
22
+ };
23
+ /**
24
+ * Parse a string against a closed set of values; `undefined` (with a warning)
25
+ * when set to something outside it, so a typo falls back to the default
26
+ * instead of silently disabling a feature.
27
+ */
28
+ const envEnum = (v, allowed, source) => {
29
+ if (v === undefined || v === '') return undefined;
30
+ if (allowed.includes(v)) return v;
31
+ console.warn(
32
+ `[lit-plugin] ignoring ${source}=${JSON.stringify(v)}; expected one of ` +
33
+ allowed.map((a) => JSON.stringify(a)).join(', ')
34
+ );
35
+ return undefined;
36
+ };
37
+ /**
38
+ * Merge explicit options over env vars over defaults (in that precedence) into
39
+ * the flat shape the plugin hooks consume.
40
+ */
41
+ export const resolveOptions = (options, env) => {
42
+ const hmr = options.hmr;
43
+ const hmrObj = typeof hmr === 'object' ? hmr : undefined;
44
+ const hmrEnabled =
45
+ (typeof hmr === 'boolean' ? hmr : hmrObj?.enabled) ??
46
+ envBool(env[`${ENV_PREFIX}_HMR`]) ??
47
+ true;
48
+ const reconnect =
49
+ hmrObj?.reconnect ?? envBool(env[`${ENV_PREFIX}_HMR_RECONNECT`]) ?? false;
50
+ const onIncompatible =
51
+ hmrObj?.onIncompatible ??
52
+ envEnum(
53
+ env[`${ENV_PREFIX}_HMR_ON_INCOMPATIBLE`],
54
+ ON_INCOMPATIBLE_MODES,
55
+ `${ENV_PREFIX}_HMR_ON_INCOMPATIBLE`
56
+ ) ??
57
+ 'reload';
58
+ const ind = hmrObj?.indicator;
59
+ const indObj = typeof ind === 'object' ? ind : undefined;
60
+ const indEnabled =
61
+ (typeof ind === 'boolean' ? ind : indObj?.enabled) ??
62
+ envBool(env[`${ENV_PREFIX}_HMR_INDICATOR`]) ??
63
+ true;
64
+ const indCount =
65
+ indObj?.count ?? envBool(env[`${ENV_PREFIX}_HMR_INDICATOR_COUNT`]) ?? false;
66
+ // The indicator is meaningless without HMR, so it follows the master toggle.
67
+ const indicator = hmrEnabled && indEnabled ? {count: indCount} : false;
68
+ const so = options.sourceOverlay;
69
+ const soExplicit =
70
+ typeof so === 'boolean' ? so : so === undefined ? undefined : true;
71
+ const soEnabled =
72
+ soExplicit ?? envBool(env[`${ENV_PREFIX}_SOURCE_OVERLAY`]) ?? false;
73
+ let sourceOverlay = false;
74
+ if (soEnabled) {
75
+ const base = typeof so === 'object' ? {...so} : {};
76
+ base.key ??= env[`${ENV_PREFIX}_SOURCE_OVERLAY_KEY`] || undefined;
77
+ base.editor ??= env[`${ENV_PREFIX}_SOURCE_OVERLAY_EDITOR`] || undefined;
78
+ base.throttleMs ??= envNum(env[`${ENV_PREFIX}_SOURCE_OVERLAY_THROTTLE_MS`]);
79
+ sourceOverlay = base;
80
+ }
81
+ const timeline =
82
+ options.timeline ?? envBool(env[`${ENV_PREFIX}_TIMELINE`]) ?? false;
83
+ const cssSheetBuild =
84
+ envEnum(options.cssSheetBuild, CSS_SHEET_BUILD_MODES, 'cssSheetBuild') ??
85
+ envEnum(
86
+ env[`${ENV_PREFIX}_CSS_SHEET_BUILD`],
87
+ CSS_SHEET_BUILD_MODES,
88
+ `${ENV_PREFIX}_CSS_SHEET_BUILD`
89
+ ) ??
90
+ 'auto';
91
+ return {
92
+ hmrEnabled,
93
+ reconnect,
94
+ onIncompatible,
95
+ indicator,
96
+ sourceOverlay,
97
+ timeline,
98
+ cssSheetBuild,
99
+ };
100
+ };
101
+ /**
102
+ * Flattens resolved options into the JSON-serializable shape the panel's
103
+ * Settings tab consumes (callback options like `exclude`/`onSelect` dropped;
104
+ * a custom editor object reported as `"custom"`). Default key/editor/throttle
105
+ * are applied here so the panel shows the effective values the runtime uses.
106
+ */
107
+ export const toFeatureSettings = (r) => {
108
+ const so = r.sourceOverlay;
109
+ const editor = so === false ? undefined : so.editor;
110
+ return {
111
+ hmr: {
112
+ enabled: r.hmrEnabled,
113
+ reconnect: r.reconnect,
114
+ onIncompatible: r.onIncompatible,
115
+ indicatorEnabled: r.indicator !== false,
116
+ indicatorCount: r.indicator !== false && r.indicator.count,
117
+ },
118
+ sourceOverlay: {
119
+ enabled: so !== false,
120
+ key: (so === false ? undefined : so.key) ?? 's',
121
+ editor:
122
+ typeof editor === 'string' ? editor : editor ? 'custom' : 'vscode',
123
+ throttleMs: (so === false ? undefined : so.throttleMs) ?? 50,
124
+ },
125
+ timeline: r.timeline,
126
+ };
127
+ };
128
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/lib/options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgEH,MAAM,qBAAqB,GAA6B;IACtD,MAAM;IACN,KAAK;IACL,QAAQ;IACR,YAAY;CACb,CAAC;AA8DF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,MAAM,qBAAqB,GAAmC;IAC5D,QAAQ;IACR,MAAM;CACP,CAAC;AAEF,2EAA2E;AAC3E,MAAM,OAAO,GAAG,CAAC,CAAqB,EAAuB,EAAE,CAC7D,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,GAAG;IACvB,C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IAC3B,MAAM,MAAM,GAAG,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,OAAO,EAAE,CAAC,CAAC,UAAU;YACrB,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,cAAc,EAAE,CAAC,CAAC,cAAc;YAChC,gBAAgB,EAAE,CAAC,CAAC,SAAS,KAAK,KAAK;YACvC,cAAc,EAAE,CAAC,CAAC,SAAS,KAAK,KAAK,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK;SAC3D;QACD,aAAa,EAAE;YACb,OAAO,EAAE,EAAE,KAAK,KAAK;YACrB,GAAG,EAAE,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG;YAC/C,MAAM,EACJ,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;YACpE,UAAU,EAAE,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;SAC7D;QACD,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport type {SourceOverlayOptions} from './types.js';\nimport type {FeatureSettings} from '../types/timeline.js';\n\n/**\n * On-page HMR feedback: a small pulsing indicator in the corner of the host\n * page that briefly animates on each HMR update, for at-a-glance feedback\n * without watching the console.\n */\nexport interface HmrIndicatorOptions {\n /** Inject the indicator element. Defaults to `true` (when HMR is enabled). */\n enabled?: boolean;\n\n /**\n * Show a cumulative update count next to the dot (idle opacity 0.5 instead\n * of fully transparent). Defaults to `false`.\n */\n count?: boolean;\n}\n\n/**\n * HMR for Lit component classes and its on-page feedback.\n */\nexport interface HmrOptions {\n /**\n * Enable in-place HMR for Lit component classes. When `false`, the plugin\n * skips all HMR transforms and runtime injection. Defaults to `true`.\n */\n enabled?: boolean;\n\n /**\n * Cycle `disconnectedCallback()`/`connectedCallback()` on live instances\n * after a hot patch. Interning makes this mostly unnecessary, so it's\n * opt-in. Defaults to `false`.\n */\n reconnect?: boolean;\n\n /**\n * What to do when a component can't be hot-patched in place (e.g.\n * standard `accessor` decorators). Defaults to `'reload'`.\n */\n onIncompatible?: 'reload' | 'warn';\n\n /**\n * The on-page update indicator. `true` enables it without a count; an\n * object configures it. Forced off when HMR itself is disabled. Defaults\n * to enabled (without a count).\n */\n indicator?: boolean | HmrIndicatorOptions;\n}\n\n/**\n * What a `?css-sheet` import compiles to under `vite build`.\n *\n * - `'url'`: fetch-backed sheet over the emitted `.css` asset.\n * - `'inline'`: css text embedded in the JS chunk, processed by the css\n * pipeline (`?inline`).\n * - `'inline-raw'`: css text embedded verbatim, skipping the css pipeline\n * (`?raw`).\n * - `'auto'`: `'inline'` when `build.lib` is set, `'url'` otherwise.\n */\nexport type CssSheetBuild = 'auto' | 'url' | 'inline' | 'inline-raw';\n\nconst CSS_SHEET_BUILD_MODES: readonly CssSheetBuild[] = [\n 'auto',\n 'url',\n 'inline',\n 'inline-raw',\n];\n\n/**\n * Options for the Lit Vite plugin.\n *\n * Every option also resolves from environment variables (and `.env` files)\n * with the `LIT_PLUGIN` prefix — e.g. `LIT_PLUGIN_HMR_INDICATOR=true`. Options\n * passed here take precedence over env vars, which take precedence over the\n * built-in defaults.\n */\nexport interface LitPluginOptions {\n /**\n * HMR for Lit components and its on-page feedback. `true`/`false` toggles\n * the whole feature (patching and indicator); an object configures it.\n * Defaults to enabled.\n */\n hmr?: boolean | HmrOptions;\n\n /**\n * Dev-only click-to-open-in-IDE inspector for Lit custom elements.\n * Toggle with Ctrl+Shift+S (configurable via `key`). Defaults to `false`.\n */\n sourceOverlay?: boolean | SourceOverlayOptions;\n\n /**\n * Vite DevTools Timeline panel — a Vue DevTools–style layered event stream\n * for Lit lifecycle, render, mouse, and keyboard events.\n *\n * Requires `@vitejs/devtools` in the Vite config and the `@vitejs/devtools`\n * Vite plugin (`DevTools()`) to be active. Defaults to `false` while\n * experimental.\n *\n * `true` enables all built-in layers with defaults.\n */\n timeline?: boolean;\n\n /**\n * What a `?css-sheet` import compiles to under `vite build`.\n * - `'url'`: fetch-backed sheet over the emitted `.css` asset\n * - `'inline'`: css text embedded in the JS chunk, processed by the css\n * pipeline (`?inline`)\n * - `'inline-raw'`: css text embedded verbatim, skipping the css pipeline\n * (`?raw`)\n * - `'auto'`: `'inline'` when `build.lib` is set, `'url'` otherwise\n *\n * Dev is always the fetch-backed HMR form regardless of this setting.\n * Defaults to `'auto'`.\n */\n cssSheetBuild?: CssSheetBuild;\n}\n\n/** Plugin options after merging explicit options, env vars, and defaults. */\nexport interface ResolvedOptions {\n hmrEnabled: boolean;\n reconnect: boolean;\n onIncompatible: 'reload' | 'warn';\n indicator: false | {count: boolean};\n sourceOverlay: false | SourceOverlayOptions;\n timeline: boolean;\n cssSheetBuild: CssSheetBuild;\n}\n\n/** Env var prefix consumed at config time. */\nexport const ENV_PREFIX = 'LIT_PLUGIN';\n\nconst ON_INCOMPATIBLE_MODES: readonly ('reload' | 'warn')[] = [\n 'reload',\n 'warn',\n];\n\n/** Parse a boolean-ish env string; `undefined` when unset/unrecognized. */\nconst envBool = (v: string | undefined): boolean | undefined =>\n v === 'true' || v === '1'\n ? true\n : v === 'false' || v === '0'\n ? false\n : undefined;\n\n/** Parse a numeric env string; `undefined` when unset/non-numeric. */\nconst envNum = (v: string | undefined): number | undefined => {\n if (v === undefined || v === '') return undefined;\n const n = Number(v);\n return Number.isNaN(n) ? undefined : n;\n};\n\n/**\n * Parse a string against a closed set of values; `undefined` (with a warning)\n * when set to something outside it, so a typo falls back to the default\n * instead of silently disabling a feature.\n */\nconst envEnum = <T extends string>(\n v: string | undefined,\n allowed: readonly T[],\n source: string\n): T | undefined => {\n if (v === undefined || v === '') return undefined;\n if ((allowed as readonly string[]).includes(v)) return v as T;\n console.warn(\n `[lit-plugin] ignoring ${source}=${JSON.stringify(v)}; expected one of ` +\n allowed.map((a) => JSON.stringify(a)).join(', ')\n );\n return undefined;\n};\n\n/**\n * Merge explicit options over env vars over defaults (in that precedence) into\n * the flat shape the plugin hooks consume.\n */\nexport const resolveOptions = (\n options: LitPluginOptions,\n env: Record<string, string>\n): ResolvedOptions => {\n const hmr = options.hmr;\n const hmrObj = typeof hmr === 'object' ? hmr : undefined;\n const hmrEnabled =\n (typeof hmr === 'boolean' ? hmr : hmrObj?.enabled) ??\n envBool(env[`${ENV_PREFIX}_HMR`]) ??\n true;\n const reconnect =\n hmrObj?.reconnect ?? envBool(env[`${ENV_PREFIX}_HMR_RECONNECT`]) ?? false;\n const onIncompatible =\n hmrObj?.onIncompatible ??\n envEnum(\n env[`${ENV_PREFIX}_HMR_ON_INCOMPATIBLE`],\n ON_INCOMPATIBLE_MODES,\n `${ENV_PREFIX}_HMR_ON_INCOMPATIBLE`\n ) ??\n 'reload';\n\n const ind = hmrObj?.indicator;\n const indObj = typeof ind === 'object' ? ind : undefined;\n const indEnabled =\n (typeof ind === 'boolean' ? ind : indObj?.enabled) ??\n envBool(env[`${ENV_PREFIX}_HMR_INDICATOR`]) ??\n true;\n const indCount =\n indObj?.count ?? envBool(env[`${ENV_PREFIX}_HMR_INDICATOR_COUNT`]) ?? false;\n // The indicator is meaningless without HMR, so it follows the master toggle.\n const indicator = hmrEnabled && indEnabled ? {count: indCount} : false;\n\n const so = options.sourceOverlay;\n const soExplicit =\n typeof so === 'boolean' ? so : so === undefined ? undefined : true;\n const soEnabled =\n soExplicit ?? envBool(env[`${ENV_PREFIX}_SOURCE_OVERLAY`]) ?? false;\n let sourceOverlay: false | SourceOverlayOptions = false;\n if (soEnabled) {\n const base: SourceOverlayOptions = typeof so === 'object' ? {...so} : {};\n base.key ??= env[`${ENV_PREFIX}_SOURCE_OVERLAY_KEY`] || undefined;\n base.editor ??= env[`${ENV_PREFIX}_SOURCE_OVERLAY_EDITOR`] || undefined;\n base.throttleMs ??= envNum(env[`${ENV_PREFIX}_SOURCE_OVERLAY_THROTTLE_MS`]);\n sourceOverlay = base;\n }\n\n const timeline =\n options.timeline ?? envBool(env[`${ENV_PREFIX}_TIMELINE`]) ?? false;\n\n const cssSheetBuild =\n envEnum(options.cssSheetBuild, CSS_SHEET_BUILD_MODES, 'cssSheetBuild') ??\n envEnum(\n env[`${ENV_PREFIX}_CSS_SHEET_BUILD`],\n CSS_SHEET_BUILD_MODES,\n `${ENV_PREFIX}_CSS_SHEET_BUILD`\n ) ??\n 'auto';\n\n return {\n hmrEnabled,\n reconnect,\n onIncompatible,\n indicator,\n sourceOverlay,\n timeline,\n cssSheetBuild,\n };\n};\n\n/**\n * Flattens resolved options into the JSON-serializable shape the panel's\n * Settings tab consumes (callback options like `exclude`/`onSelect` dropped;\n * a custom editor object reported as `\"custom\"`). Default key/editor/throttle\n * are applied here so the panel shows the effective values the runtime uses.\n */\nexport const toFeatureSettings = (r: ResolvedOptions): FeatureSettings => {\n const so = r.sourceOverlay;\n const editor = so === false ? undefined : so.editor;\n return {\n hmr: {\n enabled: r.hmrEnabled,\n reconnect: r.reconnect,\n onIncompatible: r.onIncompatible,\n indicatorEnabled: r.indicator !== false,\n indicatorCount: r.indicator !== false && r.indicator.count,\n },\n sourceOverlay: {\n enabled: so !== false,\n key: (so === false ? undefined : so.key) ?? 's',\n editor:\n typeof editor === 'string' ? editor : editor ? 'custom' : 'vscode',\n throttleMs: (so === false ? undefined : so.throttleMs) ?? 50,\n },\n timeline: r.timeline,\n };\n};\n"]}
package/lib/plugin.d.ts CHANGED
@@ -4,143 +4,12 @@
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
6
  import { type Plugin } from 'vite';
7
- import type { SourceOverlayOptions } from './types.js';
8
- /**
9
- * On-page HMR feedback: a small pulsing indicator in the corner of the host
10
- * page that briefly animates on each HMR update, for at-a-glance feedback
11
- * without watching the console.
12
- */
13
- export interface HmrIndicatorOptions {
14
- /** Inject the indicator element. Defaults to `true` (when HMR is enabled). */
15
- enabled?: boolean;
16
- /**
17
- * Show a cumulative update count next to the dot (idle opacity 0.5 instead
18
- * of fully transparent). Defaults to `false`.
19
- */
20
- count?: boolean;
21
- }
22
- /**
23
- * HMR for Lit component classes and its on-page feedback.
24
- */
25
- export interface HmrOptions {
26
- /**
27
- * Enable in-place HMR for Lit component classes. When `false`, the plugin
28
- * skips all HMR transforms and runtime injection. Defaults to `true`.
29
- */
30
- enabled?: boolean;
31
- /**
32
- * Cycle `disconnectedCallback()`/`connectedCallback()` on live instances
33
- * after a hot patch. Interning makes this mostly unnecessary, so it's
34
- * opt-in. Defaults to `false`.
35
- */
36
- reconnect?: boolean;
37
- /**
38
- * What to do when a component can't be hot-patched in place (e.g.
39
- * standard `accessor` decorators). Defaults to `'reload'`.
40
- */
41
- onIncompatible?: 'reload' | 'warn';
42
- /**
43
- * The on-page update indicator. `true` enables it without a count; an
44
- * object configures it. Forced off when HMR itself is disabled. Defaults
45
- * to enabled (without a count).
46
- */
47
- indicator?: boolean | HmrIndicatorOptions;
48
- }
49
- /**
50
- * What a `?css-sheet` import compiles to under `vite build`.
51
- *
52
- * - `'url'`: fetch-backed sheet over the emitted `.css` asset.
53
- * - `'inline'`: css text embedded in the JS chunk, processed by the css
54
- * pipeline (`?inline`).
55
- * - `'inline-raw'`: css text embedded verbatim, skipping the css pipeline
56
- * (`?raw`).
57
- * - `'auto'`: `'inline'` when `build.lib` is set, `'url'` otherwise.
58
- */
59
- export type CssSheetBuild = 'auto' | 'url' | 'inline' | 'inline-raw';
60
- /**
61
- * Options for the Lit Vite plugin.
62
- *
63
- * Every option also resolves from environment variables (and `.env` files)
64
- * with the `LIT_PLUGIN` prefix — e.g. `LIT_PLUGIN_HMR_INDICATOR=true`. Options
65
- * passed here take precedence over env vars, which take precedence over the
66
- * built-in defaults.
67
- */
68
- export interface LitPluginOptions {
69
- /**
70
- * HMR for Lit components and its on-page feedback. `true`/`false` toggles
71
- * the whole feature (patching and indicator); an object configures it.
72
- * Defaults to enabled.
73
- */
74
- hmr?: boolean | HmrOptions;
75
- /**
76
- * Dev-only click-to-open-in-IDE inspector for Lit custom elements.
77
- * Toggle with Ctrl+Shift+S (configurable via `key`). Defaults to `false`.
78
- */
79
- sourceOverlay?: boolean | SourceOverlayOptions;
80
- /**
81
- * Vite DevTools Timeline panel — a Vue DevTools–style layered event stream
82
- * for Lit lifecycle, render, mouse, and keyboard events.
83
- *
84
- * Requires `@vitejs/devtools` in the Vite config and the `@vitejs/devtools`
85
- * Vite plugin (`DevTools()`) to be active. Defaults to `false` while
86
- * experimental.
87
- *
88
- * `true` enables all built-in layers with defaults.
89
- */
90
- timeline?: boolean;
91
- /**
92
- * What a `?css-sheet` import compiles to under `vite build`.
93
- * - `'url'`: fetch-backed sheet over the emitted `.css` asset
94
- * - `'inline'`: css text embedded in the JS chunk, processed by the css
95
- * pipeline (`?inline`)
96
- * - `'inline-raw'`: css text embedded verbatim, skipping the css pipeline
97
- * (`?raw`)
98
- * - `'auto'`: `'inline'` when `build.lib` is set, `'url'` otherwise
99
- *
100
- * Dev is always the fetch-backed HMR form regardless of this setting.
101
- * Defaults to `'auto'`.
102
- */
103
- cssSheetBuild?: CssSheetBuild;
104
- }
105
- /** Plugin options after merging explicit options, env vars, and defaults. */
106
- export interface ResolvedOptions {
107
- hmrEnabled: boolean;
108
- reconnect: boolean;
109
- onIncompatible: 'reload' | 'warn';
110
- indicator: false | {
111
- count: boolean;
112
- };
113
- sourceOverlay: false | SourceOverlayOptions;
114
- timeline: boolean;
115
- cssSheetBuild: CssSheetBuild;
116
- }
117
- /**
118
- * Merge explicit options over env vars over defaults (in that precedence) into
119
- * the flat shape the plugin hooks consume.
120
- */
121
- export declare const resolveOptions: (options: LitPluginOptions, env: Record<string, string>) => ResolvedOptions;
122
- export declare const createOpenInEditorMiddleware: (allowedRoots: readonly string[]) => (req: {
123
- url?: string;
124
- headers?: {
125
- origin?: string;
126
- host?: string;
127
- };
128
- }, res: {
129
- statusCode: number;
130
- end: (msg: string) => void;
131
- }, next: (err?: unknown) => void) => void;
132
- /**
133
- * Import-query support, served in dev and build alike (source code using
134
- * `?hmr-url`/`?css-sheet` must keep working under `vite build`, where the HMR
135
- * plugin doesn't apply). Exported for the baseline e2e run, which needs the
136
- * queries working without the HMR plugin.
137
- *
138
- * `getCssSheetBuild` is a getter, not a value: `litPlugin()` re-resolves its
139
- * options against the loaded env in a `config` hook, which runs after the
140
- * plugin array is built. Standalone (no getter) it behaves like the `'auto'`
141
- * default.
142
- */
143
- export declare const litCssQueries: (getCssSheetBuild?: () => CssSheetBuild) => Plugin;
7
+ import { type LitPluginOptions } from './options.js';
8
+ export { createOpenInEditorMiddleware } from './plugins/open-in-editor.js';
9
+ export { litCssQueries } from './plugins/css-queries.js';
10
+ export { litTimelineVirtual } from './plugins/timeline-virtual.js';
11
+ export type { HmrIndicatorOptions, HmrOptions, CssSheetBuild, LitPluginOptions, ResolvedOptions, } from './options.js';
12
+ export { resolveOptions } from './options.js';
144
13
  /**
145
14
  * Vite plugin set providing HMR, CSS helpers, and Lightning CSS processing
146
15
  * for Lit projects.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../packages/labs/vite-plugin-lit/src/lib/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAA2B,KAAK,MAAM,EAAC,MAAM,MAAM,CAAC;AAI3D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAKrD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB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