@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.
- package/CHANGELOG.md +29 -0
- package/LICENSE +1 -1
- package/README.md +14 -7
- package/bin.mjs +2 -8
- package/client.d.ts +0 -6
- package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BuCvPGjS.js → browser-agent-rpc-BXhoSh1z-ybEeG-x9.js} +2 -2
- package/dist/client/assets/{browser-agent-rpc-BXhoSh1z-BuCvPGjS.js.map → browser-agent-rpc-BXhoSh1z-ybEeG-x9.js.map} +1 -1
- package/dist/client/assets/{index-D632jo79.js → index-CgkhETVR.js} +2 -144
- package/dist/client/assets/index-CgkhETVR.js.map +1 -0
- package/dist/client/index.html +1 -1
- package/dist/standalone/lit-devtools.js +2 -105
- package/index.d.ts +0 -5
- package/index.d.ts.map +1 -1
- package/index.js +1 -5
- package/index.js.map +1 -1
- package/lib/color-scheme.d.ts +0 -5
- package/lib/color-scheme.d.ts.map +1 -1
- package/lib/color-scheme.js +0 -5
- package/lib/color-scheme.js.map +1 -1
- package/lib/confine.d.ts +0 -5
- package/lib/confine.d.ts.map +1 -1
- package/lib/confine.js +0 -5
- package/lib/confine.js.map +1 -1
- package/lib/devframe/allowed-origins.d.ts +11 -3
- package/lib/devframe/allowed-origins.d.ts.map +1 -1
- package/lib/devframe/allowed-origins.js +0 -5
- package/lib/devframe/allowed-origins.js.map +1 -1
- package/lib/devframe/definition.d.ts +7 -3
- package/lib/devframe/definition.d.ts.map +1 -1
- package/lib/devframe/definition.js +1 -6
- package/lib/devframe/definition.js.map +1 -1
- package/lib/devframe/icon.d.ts +0 -5
- package/lib/devframe/icon.d.ts.map +1 -1
- package/lib/devframe/icon.js +0 -5
- package/lib/devframe/icon.js.map +1 -1
- package/lib/devframe/launch-editor.d.ts +0 -5
- package/lib/devframe/launch-editor.d.ts.map +1 -1
- package/lib/devframe/launch-editor.js +0 -5
- package/lib/devframe/launch-editor.js.map +1 -1
- package/lib/devframe/paths.d.ts +8 -3
- package/lib/devframe/paths.d.ts.map +1 -1
- package/lib/devframe/paths.js +0 -5
- package/lib/devframe/paths.js.map +1 -1
- package/lib/devframe/protocol.d.ts +6 -3
- package/lib/devframe/protocol.d.ts.map +1 -1
- package/lib/devframe/protocol.js +0 -5
- package/lib/devframe/protocol.js.map +1 -1
- package/lib/devframe/rpc-source.d.ts +15 -3
- package/lib/devframe/rpc-source.d.ts.map +1 -1
- package/lib/devframe/rpc-source.js +0 -5
- package/lib/devframe/rpc-source.js.map +1 -1
- package/lib/devframe/source.d.ts +0 -5
- package/lib/devframe/source.d.ts.map +1 -1
- package/lib/devframe/source.js +7 -3
- package/lib/devframe/source.js.map +1 -1
- package/lib/devframe/vite.d.ts +0 -5
- package/lib/devframe/vite.d.ts.map +1 -1
- package/lib/devframe/vite.js +16 -3
- package/lib/devframe/vite.js.map +1 -1
- package/lib/http.d.ts +0 -5
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +0 -5
- package/lib/http.js.map +1 -1
- package/lib/icons.d.ts +0 -5
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +0 -5
- package/lib/icons.js.map +1 -1
- package/lib/options.d.ts +0 -5
- package/lib/options.d.ts.map +1 -1
- package/lib/options.js +0 -5
- package/lib/options.js.map +1 -1
- package/lib/override-baselines.d.ts +0 -5
- package/lib/override-baselines.d.ts.map +1 -1
- package/lib/override-baselines.js +0 -5
- package/lib/override-baselines.js.map +1 -1
- package/lib/plugin.d.ts +0 -5
- package/lib/plugin.d.ts.map +1 -1
- package/lib/plugin.js +0 -5
- package/lib/plugin.js.map +1 -1
- package/lib/plugins/css-literals.d.ts +0 -5
- package/lib/plugins/css-literals.d.ts.map +1 -1
- package/lib/plugins/css-literals.js +0 -5
- package/lib/plugins/css-literals.js.map +1 -1
- package/lib/plugins/css-queries.d.ts +0 -5
- package/lib/plugins/css-queries.d.ts.map +1 -1
- package/lib/plugins/css-queries.js +0 -5
- package/lib/plugins/css-queries.js.map +1 -1
- package/lib/plugins/open-in-editor.d.ts +0 -5
- package/lib/plugins/open-in-editor.d.ts.map +1 -1
- package/lib/plugins/open-in-editor.js +0 -5
- package/lib/plugins/open-in-editor.js.map +1 -1
- package/lib/plugins/private-fields.d.ts +0 -5
- package/lib/plugins/private-fields.d.ts.map +1 -1
- package/lib/plugins/private-fields.js +0 -5
- package/lib/plugins/private-fields.js.map +1 -1
- package/lib/plugins/shared.d.ts +0 -5
- package/lib/plugins/shared.d.ts.map +1 -1
- package/lib/plugins/shared.js +0 -5
- package/lib/plugins/shared.js.map +1 -1
- package/lib/plugins/timeline-virtual.d.ts +0 -5
- package/lib/plugins/timeline-virtual.d.ts.map +1 -1
- package/lib/plugins/timeline-virtual.js +0 -5
- package/lib/plugins/timeline-virtual.js.map +1 -1
- package/lib/runtime/child-state.d.ts +0 -5
- package/lib/runtime/child-state.d.ts.map +1 -1
- package/lib/runtime/child-state.js +18 -3
- package/lib/runtime/child-state.js.map +1 -1
- package/lib/runtime/css.d.ts +14 -3
- package/lib/runtime/css.d.ts.map +1 -1
- package/lib/runtime/css.js +3 -5
- package/lib/runtime/css.js.map +1 -1
- package/lib/runtime/edge-panel.d.ts +8 -3
- package/lib/runtime/edge-panel.d.ts.map +1 -1
- package/lib/runtime/edge-panel.js +0 -5
- package/lib/runtime/edge-panel.js.map +1 -1
- package/lib/runtime/fonts.d.ts +0 -5
- package/lib/runtime/fonts.d.ts.map +1 -1
- package/lib/runtime/fonts.js +0 -5
- package/lib/runtime/fonts.js.map +1 -1
- package/lib/runtime/indicator.d.ts +3 -3
- package/lib/runtime/indicator.js +0 -5
- package/lib/runtime/indicator.js.map +1 -1
- package/lib/runtime/inspector/collect.d.ts +3 -3
- package/lib/runtime/inspector/collect.d.ts.map +1 -1
- package/lib/runtime/inspector/collect.js +0 -5
- package/lib/runtime/inspector/collect.js.map +1 -1
- package/lib/runtime/inspector/highlight.d.ts +10 -3
- package/lib/runtime/inspector/highlight.d.ts.map +1 -1
- package/lib/runtime/inspector/highlight.js +0 -5
- package/lib/runtime/inspector/highlight.js.map +1 -1
- package/lib/runtime/inspector/install.d.ts +6 -3
- package/lib/runtime/inspector/install.d.ts.map +1 -1
- package/lib/runtime/inspector/install.js +0 -5
- package/lib/runtime/inspector/install.js.map +1 -1
- package/lib/runtime/inspector/serialize.d.ts +4 -3
- package/lib/runtime/inspector/serialize.d.ts.map +1 -1
- package/lib/runtime/inspector/serialize.js +0 -5
- package/lib/runtime/inspector/serialize.js.map +1 -1
- package/lib/runtime/intern.d.ts +11 -3
- package/lib/runtime/intern.d.ts.map +1 -1
- package/lib/runtime/intern.js +11 -3
- package/lib/runtime/intern.js.map +1 -1
- package/lib/runtime/overrides.d.ts +3 -3
- package/lib/runtime/overrides.d.ts.map +1 -1
- package/lib/runtime/overrides.js +0 -5
- package/lib/runtime/overrides.js.map +1 -1
- package/lib/runtime/page-channel.d.ts +0 -5
- package/lib/runtime/page-channel.d.ts.map +1 -1
- package/lib/runtime/page-channel.js +13 -3
- package/lib/runtime/page-channel.js.map +1 -1
- package/lib/runtime/patch.d.ts +0 -5
- package/lib/runtime/patch.d.ts.map +1 -1
- package/lib/runtime/patch.js +0 -5
- package/lib/runtime/patch.js.map +1 -1
- package/lib/runtime/rpc-transport.d.ts +13 -3
- package/lib/runtime/rpc-transport.d.ts.map +1 -1
- package/lib/runtime/rpc-transport.js +3 -5
- package/lib/runtime/rpc-transport.js.map +1 -1
- package/lib/runtime/source-meta.d.ts +0 -5
- package/lib/runtime/source-meta.d.ts.map +1 -1
- package/lib/runtime/source-meta.js +0 -5
- package/lib/runtime/source-meta.js.map +1 -1
- package/lib/runtime/source-overlay/editors.d.ts +0 -5
- package/lib/runtime/source-overlay/editors.d.ts.map +1 -1
- package/lib/runtime/source-overlay/editors.js +0 -5
- package/lib/runtime/source-overlay/editors.js.map +1 -1
- package/lib/runtime/source-overlay/mask-path.d.ts +0 -5
- package/lib/runtime/source-overlay/mask-path.d.ts.map +1 -1
- package/lib/runtime/source-overlay/mask-path.js +0 -5
- package/lib/runtime/source-overlay/mask-path.js.map +1 -1
- package/lib/runtime/source-overlay/overlay-element.d.ts +0 -5
- package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -1
- package/lib/runtime/source-overlay/overlay-element.js +0 -5
- package/lib/runtime/source-overlay/overlay-element.js.map +1 -1
- package/lib/runtime/source-overlay/source-host.d.ts +0 -5
- package/lib/runtime/source-overlay/source-host.d.ts.map +1 -1
- package/lib/runtime/source-overlay/source-host.js +0 -5
- package/lib/runtime/source-overlay/source-host.js.map +1 -1
- package/lib/runtime/source-overlay/template.d.ts +0 -5
- package/lib/runtime/source-overlay/template.d.ts.map +1 -1
- package/lib/runtime/source-overlay/template.js +0 -5
- package/lib/runtime/source-overlay/template.js.map +1 -1
- package/lib/runtime/source-overlay.d.ts +0 -5
- package/lib/runtime/source-overlay.d.ts.map +1 -1
- package/lib/runtime/source-overlay.js +0 -5
- package/lib/runtime/source-overlay.js.map +1 -1
- package/lib/runtime/standalone.d.ts +0 -5
- package/lib/runtime/standalone.d.ts.map +1 -1
- package/lib/runtime/standalone.js +0 -5
- package/lib/runtime/standalone.js.map +1 -1
- package/lib/runtime/timeline/chrome-tracks.d.ts +0 -5
- package/lib/runtime/timeline/chrome-tracks.d.ts.map +1 -1
- package/lib/runtime/timeline/chrome-tracks.js +5 -3
- package/lib/runtime/timeline/chrome-tracks.js.map +1 -1
- package/lib/runtime/timeline/clock.d.ts +7 -3
- package/lib/runtime/timeline/clock.d.ts.map +1 -1
- package/lib/runtime/timeline/clock.js +0 -5
- package/lib/runtime/timeline/clock.js.map +1 -1
- package/lib/runtime/timeline/flash.d.ts +0 -5
- package/lib/runtime/timeline/flash.d.ts.map +1 -1
- package/lib/runtime/timeline/flash.js +15 -3
- package/lib/runtime/timeline/flash.js.map +1 -1
- package/lib/runtime/timeline/identity.d.ts +0 -5
- package/lib/runtime/timeline/identity.d.ts.map +1 -1
- package/lib/runtime/timeline/identity.js +9 -3
- package/lib/runtime/timeline/identity.js.map +1 -1
- package/lib/runtime/timeline/input.d.ts +0 -5
- package/lib/runtime/timeline/input.d.ts.map +1 -1
- package/lib/runtime/timeline/input.js +2 -3
- package/lib/runtime/timeline/input.js.map +1 -1
- package/lib/runtime/timeline/install.d.ts +11 -3
- package/lib/runtime/timeline/install.d.ts.map +1 -1
- package/lib/runtime/timeline/install.js +0 -5
- package/lib/runtime/timeline/install.js.map +1 -1
- package/lib/runtime/timeline/lifecycle.d.ts +13 -3
- package/lib/runtime/timeline/lifecycle.d.ts.map +1 -1
- package/lib/runtime/timeline/lifecycle.js +0 -5
- package/lib/runtime/timeline/lifecycle.js.map +1 -1
- package/lib/runtime/timeline/public-api.d.ts +6 -3
- package/lib/runtime/timeline/public-api.d.ts.map +1 -1
- package/lib/runtime/timeline/public-api.js +0 -5
- package/lib/runtime/timeline/public-api.js.map +1 -1
- package/lib/runtime/timeline/render.d.ts +0 -5
- package/lib/runtime/timeline/render.d.ts.map +1 -1
- package/lib/runtime/timeline/render.js +21 -3
- package/lib/runtime/timeline/render.js.map +1 -1
- package/lib/runtime/timeline/transport.d.ts +0 -5
- package/lib/runtime/timeline/transport.d.ts.map +1 -1
- package/lib/runtime/timeline/transport.js +10 -3
- package/lib/runtime/timeline/transport.js.map +1 -1
- package/lib/segmented-tabs.d.ts +0 -5
- package/lib/segmented-tabs.d.ts.map +1 -1
- package/lib/segmented-tabs.js +0 -5
- package/lib/segmented-tabs.js.map +1 -1
- package/lib/snapshot.d.ts +11 -3
- package/lib/snapshot.d.ts.map +1 -1
- package/lib/snapshot.js +0 -5
- package/lib/snapshot.js.map +1 -1
- package/lib/source-meta.d.ts +0 -5
- package/lib/source-meta.d.ts.map +1 -1
- package/lib/source-meta.js +0 -5
- package/lib/source-meta.js.map +1 -1
- package/lib/timeline/derive.d.ts +0 -5
- package/lib/timeline/derive.d.ts.map +1 -1
- package/lib/timeline/derive.js +22 -3
- package/lib/timeline/derive.js.map +1 -1
- package/lib/timeline/filter.d.ts +0 -5
- package/lib/timeline/filter.d.ts.map +1 -1
- package/lib/timeline/filter.js +6 -3
- package/lib/timeline/filter.js.map +1 -1
- package/lib/timeline/tracks.d.ts +0 -5
- package/lib/timeline/tracks.d.ts.map +1 -1
- package/lib/timeline/tracks.js +12 -3
- package/lib/timeline/tracks.js.map +1 -1
- package/lib/tokens.d.ts +0 -5
- package/lib/tokens.d.ts.map +1 -1
- package/lib/tokens.js +0 -5
- package/lib/tokens.js.map +1 -1
- package/lib/transform.d.ts +0 -5
- package/lib/transform.d.ts.map +1 -1
- package/lib/transform.js +0 -5
- package/lib/transform.js.map +1 -1
- package/lib/types.d.ts +10 -5
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +0 -5
- package/lib/types.js.map +1 -1
- package/lib/wrap-table.d.ts +0 -5
- package/lib/wrap-table.d.ts.map +1 -1
- package/lib/wrap-table.js +12 -3
- package/lib/wrap-table.js.map +1 -1
- package/package.json +2 -2
- package/types/hmr-incompatibility.d.ts +0 -5
- package/types/hmr-incompatibility.d.ts.map +1 -1
- package/types/hmr-incompatibility.js +13 -3
- package/types/hmr-incompatibility.js.map +1 -1
- package/types/in-page.d.ts +0 -5
- package/types/in-page.d.ts.map +1 -1
- package/types/in-page.js +0 -5
- package/types/in-page.js.map +1 -1
- package/types/inspector.d.ts +0 -5
- package/types/inspector.d.ts.map +1 -1
- package/types/inspector.js +13 -3
- package/types/inspector.js.map +1 -1
- package/types/snapshot.d.ts +0 -5
- package/types/snapshot.d.ts.map +1 -1
- package/types/snapshot.js +12 -3
- package/types/snapshot.js.map +1 -1
- package/types/timeline.d.ts +0 -5
- package/types/timeline.d.ts.map +1 -1
- package/types/timeline.js +0 -5
- package/types/timeline.js.map +1 -1
- package/dist/client/assets/index-D632jo79.js.map +0 -1
package/dist/client/index.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
`prefers-color-scheme` @media owns it, following the host/OS; an explicit
|
|
33
33
|
light/dark pins a `.color-scheme-*` class on :root.
|
|
34
34
|
-->
|
|
35
|
-
<script type="module" crossorigin src="./assets/index-
|
|
35
|
+
<script type="module" crossorigin src="./assets/index-CgkhETVR.js"></script>
|
|
36
36
|
</head>
|
|
37
37
|
<body>
|
|
38
38
|
<lit-devtools-panel></lit-devtools-panel>
|
|
@@ -20,11 +20,6 @@
|
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/lib/runtime/timeline/transport.ts
|
|
23
|
-
/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright 2026 Google LLC
|
|
26
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/
|
|
28
23
|
var queue = [];
|
|
29
24
|
var flushScheduled = false;
|
|
30
25
|
var hotClient = null;
|
|
@@ -79,11 +74,6 @@
|
|
|
79
74
|
//#endregion
|
|
80
75
|
//#region src/lib/runtime/timeline/clock.ts
|
|
81
76
|
/**
|
|
82
|
-
* @license
|
|
83
|
-
* Copyright 2026 Google LLC
|
|
84
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
77
|
* Recording-relative clock for the timeline.
|
|
88
78
|
*
|
|
89
79
|
* Built-in capture layers timestamp events with {@link now} rather than raw
|
|
@@ -107,11 +97,6 @@
|
|
|
107
97
|
var toPerfTime = (t) => t + epoch;
|
|
108
98
|
//#endregion
|
|
109
99
|
//#region src/lib/runtime/timeline/chrome-tracks.ts
|
|
110
|
-
/**
|
|
111
|
-
* @license
|
|
112
|
-
* Copyright 2026 Google LLC
|
|
113
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
-
*/
|
|
115
100
|
var GROUP = "Lit";
|
|
116
101
|
var MAX_PENDING = 1e3;
|
|
117
102
|
var TRACKS = {
|
|
@@ -187,11 +172,6 @@
|
|
|
187
172
|
};
|
|
188
173
|
//#endregion
|
|
189
174
|
//#region src/lib/runtime/timeline/identity.ts
|
|
190
|
-
/**
|
|
191
|
-
* @license
|
|
192
|
-
* Copyright 2026 Google LLC
|
|
193
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
194
|
-
*/
|
|
195
175
|
var SOURCE_META_KEY$1 = Symbol.for("@lit-labs/vite-plugin-lit#source");
|
|
196
176
|
/** WeakMap avoids retaining elements after disconnection + GC. */
|
|
197
177
|
var ids = /* @__PURE__ */ new WeakMap();
|
|
@@ -260,11 +240,6 @@
|
|
|
260
240
|
//#endregion
|
|
261
241
|
//#region src/lib/runtime/timeline/lifecycle.ts
|
|
262
242
|
/**
|
|
263
|
-
* @license
|
|
264
|
-
* Copyright 2026 Google LLC
|
|
265
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
-
*/
|
|
267
|
-
/**
|
|
268
243
|
* ReactiveElement prototype instrumentation for the lifecycle timeline layer.
|
|
269
244
|
*
|
|
270
245
|
* Wraps the lifecycle methods listed in PHASES on the prototype of the
|
|
@@ -475,11 +450,6 @@
|
|
|
475
450
|
//#endregion
|
|
476
451
|
//#region src/lib/runtime/timeline/render.ts
|
|
477
452
|
/**
|
|
478
|
-
* @license
|
|
479
|
-
* Copyright 2026 Google LLC
|
|
480
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
481
|
-
*/
|
|
482
|
-
/**
|
|
483
453
|
* Builds the element-identity `meta` for a render event from the render
|
|
484
454
|
* `host` (the LitElement whose `render()` produced these debug events).
|
|
485
455
|
* Uses the same id/source maps as the lifecycle layer so an element keeps one
|
|
@@ -702,11 +672,6 @@
|
|
|
702
672
|
};
|
|
703
673
|
//#endregion
|
|
704
674
|
//#region src/lib/runtime/timeline/input.ts
|
|
705
|
-
/**
|
|
706
|
-
* @license
|
|
707
|
-
* Copyright 2026 Google LLC
|
|
708
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
709
|
-
*/
|
|
710
675
|
var MOUSE_EVENTS = [
|
|
711
676
|
"mousedown",
|
|
712
677
|
"mouseup",
|
|
@@ -779,11 +744,6 @@
|
|
|
779
744
|
};
|
|
780
745
|
//#endregion
|
|
781
746
|
//#region src/lib/runtime/timeline/flash.ts
|
|
782
|
-
/**
|
|
783
|
-
* @license
|
|
784
|
-
* Copyright 2026 Google LLC
|
|
785
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
786
|
-
*/
|
|
787
747
|
/** Fade length; long enough to catch, short enough not to smear. */
|
|
788
748
|
var DURATION_MS = 450;
|
|
789
749
|
/** How far back the ramp counts updates for one element. */
|
|
@@ -950,11 +910,6 @@
|
|
|
950
910
|
};
|
|
951
911
|
//#endregion
|
|
952
912
|
//#region src/lib/runtime/page-channel.ts
|
|
953
|
-
/**
|
|
954
|
-
* @license
|
|
955
|
-
* Copyright 2026 Google LLC
|
|
956
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
957
|
-
*/
|
|
958
913
|
/** Wraps Vite's HMR client as a {@link PageTransport}. */
|
|
959
914
|
var fromViteHot = (hot) => ({
|
|
960
915
|
send: (channel, data) => hot.send(channel, data),
|
|
@@ -1015,11 +970,6 @@
|
|
|
1015
970
|
var pageChannel = shared[CHANNEL_KEY] ??= createPageChannel();
|
|
1016
971
|
//#endregion
|
|
1017
972
|
//#region src/types/timeline.ts
|
|
1018
|
-
/**
|
|
1019
|
-
* @license
|
|
1020
|
-
* Copyright 2026 Google LLC
|
|
1021
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1022
|
-
*/
|
|
1023
973
|
/** localStorage key holding the {@link SettingsOverride}. */
|
|
1024
974
|
var SETTINGS_OVERRIDE_LS_KEY = "lit-devtools-overrides";
|
|
1025
975
|
/** Vite HMR channel the server uses to push overrides to the app runtime. */
|
|
@@ -1027,11 +977,6 @@
|
|
|
1027
977
|
//#endregion
|
|
1028
978
|
//#region src/lib/runtime/overrides.ts
|
|
1029
979
|
/**
|
|
1030
|
-
* @license
|
|
1031
|
-
* Copyright 2026 Google LLC
|
|
1032
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1033
|
-
*/
|
|
1034
|
-
/**
|
|
1035
980
|
* Browser-runtime side of the panel's live setting overrides. Reads the
|
|
1036
981
|
* persisted override (written by the panel; same origin) and subscribes to the
|
|
1037
982
|
* page channel the server rebroadcasts panel changes on.
|
|
@@ -1057,11 +1002,6 @@
|
|
|
1057
1002
|
//#endregion
|
|
1058
1003
|
//#region src/lib/runtime/timeline/install.ts
|
|
1059
1004
|
/**
|
|
1060
|
-
* @license
|
|
1061
|
-
* Copyright 2026 Google LLC
|
|
1062
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1063
|
-
*/
|
|
1064
|
-
/**
|
|
1065
1005
|
* Timeline runtime install entry point.
|
|
1066
1006
|
*
|
|
1067
1007
|
* Injected by the plugin into the host page via `transformIndexHtml` when
|
|
@@ -3249,11 +3189,6 @@
|
|
|
3249
3189
|
//#endregion
|
|
3250
3190
|
//#region src/lib/runtime/inspector/serialize.ts
|
|
3251
3191
|
/**
|
|
3252
|
-
* @license
|
|
3253
|
-
* Copyright 2026 Google LLC
|
|
3254
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3255
|
-
*/
|
|
3256
|
-
/**
|
|
3257
3192
|
* Compact, depth- and breadth-limited previews of arbitrary property values
|
|
3258
3193
|
* for the inspector details pane. Values cross the transport as plain strings,
|
|
3259
3194
|
* so this never needs to round-trip — it only has to be readable and safe
|
|
@@ -3359,11 +3294,6 @@
|
|
|
3359
3294
|
//#endregion
|
|
3360
3295
|
//#region src/lib/runtime/inspector/collect.ts
|
|
3361
3296
|
/**
|
|
3362
|
-
* @license
|
|
3363
|
-
* Copyright 2026 Google LLC
|
|
3364
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3365
|
-
*/
|
|
3366
|
-
/**
|
|
3367
3297
|
* Walks the page to build the component render tree and to snapshot a single
|
|
3368
3298
|
* element's reactive state for the inspector panel. Runs entirely in the page;
|
|
3369
3299
|
* the results are sent over the transport as plain JSON.
|
|
@@ -3474,11 +3404,6 @@
|
|
|
3474
3404
|
//#endregion
|
|
3475
3405
|
//#region src/lib/runtime/inspector/highlight.ts
|
|
3476
3406
|
/**
|
|
3477
|
-
* @license
|
|
3478
|
-
* Copyright 2026 Google LLC
|
|
3479
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3480
|
-
*/
|
|
3481
|
-
/**
|
|
3482
3407
|
* The hover outline the panel draws over an element in the page.
|
|
3483
3408
|
*
|
|
3484
3409
|
* Its own module because two transports drive it: the in-page channel (the
|
|
@@ -3540,11 +3465,6 @@
|
|
|
3540
3465
|
//#endregion
|
|
3541
3466
|
//#region src/types/in-page.ts
|
|
3542
3467
|
/**
|
|
3543
|
-
* @license
|
|
3544
|
-
* Copyright 2026 Google LLC
|
|
3545
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3546
|
-
*/
|
|
3547
|
-
/**
|
|
3548
3468
|
* The direct page ↔ panel channel, for interactions that never need the node
|
|
3549
3469
|
* side.
|
|
3550
3470
|
*
|
|
@@ -3573,11 +3493,6 @@
|
|
|
3573
3493
|
var LIT_IN_PAGE_CHANNEL = "lit:in-page";
|
|
3574
3494
|
//#endregion
|
|
3575
3495
|
//#region src/types/inspector.ts
|
|
3576
|
-
/**
|
|
3577
|
-
* @license
|
|
3578
|
-
* Copyright 2026 Google LLC
|
|
3579
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3580
|
-
*/
|
|
3581
3496
|
/** HMR channel the server uses to forward a panel command to the app runtime. */
|
|
3582
3497
|
var INSPECT_CMD_CHANNEL = "lit:inspect:cmd";
|
|
3583
3498
|
/** HMR channel the app runtime uses to push an {@link InspectorMessage}. */
|
|
@@ -3585,11 +3500,6 @@
|
|
|
3585
3500
|
//#endregion
|
|
3586
3501
|
//#region src/lib/runtime/inspector/install.ts
|
|
3587
3502
|
/**
|
|
3588
|
-
* @license
|
|
3589
|
-
* Copyright 2026 Google LLC
|
|
3590
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3591
|
-
*/
|
|
3592
|
-
/**
|
|
3593
3503
|
* Components inspector runtime.
|
|
3594
3504
|
*
|
|
3595
3505
|
* Injected into the host page (alongside the timeline runtime) when the
|
|
@@ -3791,11 +3701,6 @@
|
|
|
3791
3701
|
//#endregion
|
|
3792
3702
|
//#region src/lib/devframe/protocol.ts
|
|
3793
3703
|
/**
|
|
3794
|
-
* @license
|
|
3795
|
-
* Copyright 2026 Google LLC
|
|
3796
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3797
|
-
*/
|
|
3798
|
-
/**
|
|
3799
3704
|
* Bare name of the page-to-server event. A page runtime that is not on a Vite
|
|
3800
3705
|
* dev server's HMR socket sends every channel message it would have sent over
|
|
3801
3706
|
* `import.meta.hot` as `page-send(channel, data)`.
|
|
@@ -6731,11 +6636,6 @@
|
|
|
6731
6636
|
//#endregion
|
|
6732
6637
|
//#region src/lib/runtime/rpc-transport.ts
|
|
6733
6638
|
/**
|
|
6734
|
-
* @license
|
|
6735
|
-
* Copyright 2026 Google LLC
|
|
6736
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6737
|
-
*/
|
|
6738
|
-
/**
|
|
6739
6639
|
* Carries the page channel over devframe RPC to a standalone
|
|
6740
6640
|
* `lit-devtools dev` server, so a page that is not served by a DevTools-enabled
|
|
6741
6641
|
* Vite dev server can still feed the panel. The server half is
|
|
@@ -6744,6 +6644,8 @@
|
|
|
6744
6644
|
* Opt-in and explicit: nothing connects until {@link connectToDevServer} is
|
|
6745
6645
|
* called, and `devframe/client` is only imported then, so a page that never
|
|
6746
6646
|
* asks pays nothing.
|
|
6647
|
+
*
|
|
6648
|
+
* @module
|
|
6747
6649
|
*/
|
|
6748
6650
|
/**
|
|
6749
6651
|
* A {@link PageTransport} over a devframe RPC client: `send` becomes a
|
|
@@ -6806,11 +6708,6 @@
|
|
|
6806
6708
|
};
|
|
6807
6709
|
//#endregion
|
|
6808
6710
|
//#region src/lib/runtime/standalone.ts
|
|
6809
|
-
/**
|
|
6810
|
-
* @license
|
|
6811
|
-
* Copyright 2026 Google LLC
|
|
6812
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6813
|
-
*/
|
|
6814
6711
|
var config = globalThis.__LIT_DEVTOOLS_CONNECT__ ?? {};
|
|
6815
6712
|
var script = document.currentScript;
|
|
6816
6713
|
var url = script instanceof HTMLScriptElement && script.src !== "" ? new URL(".", script.src).href : config.url;
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2026 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
1
|
export { litPlugin, litPlugin as default } from './lib/plugin.js';
|
|
7
2
|
export type { LitPluginOptions } from './lib/plugin.js';
|
|
8
3
|
export type { ElementInfo, EditorConfig, SourceOverlayOptions, } from './lib/types.js';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,SAAS,IAAI,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACtD,YAAY,EACV,WAAW,EACX,YAAY,EACZ,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"}
|
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAC,SAAS,EAAE,SAAS,IAAI,OAAO,EAAC,MAAM,iBAAiB,CAAC","sourcesContent":["/* @ts-self-types=\"./index.d.ts\" */\nexport {litPlugin, litPlugin as default} from './lib/plugin.js';\nexport type {LitPluginOptions} from './lib/plugin.js';\nexport type {\n ElementInfo,\n EditorConfig,\n SourceOverlayOptions,\n} from './lib/types.js';\n"]}
|
package/lib/color-scheme.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-scheme.d.ts","sourceRoot":"","sources":["../src/lib/color-scheme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"color-scheme.d.ts","sourceRoot":"","sources":["../src/lib/color-scheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9D,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,QAAO,qBAQ5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,qBAAqB,KAAG,IAI9D,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,SAAU,qBAAqB,KAAG,IAOtE,CAAC"}
|
package/lib/color-scheme.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2026 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
1
|
/** localStorage key for the panel UI color-scheme preference. */
|
|
7
2
|
export const COLOR_SCHEME_LS_KEY = 'lit-devtools-color-scheme';
|
|
8
3
|
/** Read the saved preference, defaulting to `auto`. */
|
package/lib/color-scheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-scheme.js","sourceRoot":"","sources":["../src/lib/color-scheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-scheme.js","sourceRoot":"","sources":["../src/lib/color-scheme.ts"],"names":[],"mappings":"AAaA,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAE/D,uDAAuD;AACvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAA0B,EAAE;IACnE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACtD,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,OAAO;YAAE,OAAO,GAAG,CAAC;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAA2B,EAAQ,EAAE;IACpE,MAAM,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;IACtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;IACjE,IAAI,IAAI,KAAK,MAAM;QAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,qDAAqD;AACrD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAA2B,EAAQ,EAAE;IAC5E,IAAI,CAAC;QACH,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IACD,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC,CAAC","sourcesContent":["/**\n * Panel color-scheme preference, persisted in `localStorage`.\n *\n * `auto` is the default and needs no JavaScript: the token values injected by\n * {@link injectTokens} in `tokens.ts` react to `prefers-color-scheme` via\n * `@media`, so the panel follows whatever scheme its host requests — the OS\n * when standalone, or the embedding app's `color-scheme` when docked in the\n * Vite DevTools shell (the iframe inherits it). An explicit `light`/`dark`\n * preference pins the matching `.color-scheme-light` / `.color-scheme-dark`\n * class on the document root, overriding the media query.\n */\nexport type ColorSchemePreference = 'auto' | 'dark' | 'light';\n\n/** localStorage key for the panel UI color-scheme preference. */\nexport const COLOR_SCHEME_LS_KEY = 'lit-devtools-color-scheme';\n\n/** Read the saved preference, defaulting to `auto`. */\nexport const readColorSchemePreference = (): ColorSchemePreference => {\n try {\n const raw = localStorage.getItem(COLOR_SCHEME_LS_KEY);\n if (raw === 'auto' || raw === 'dark' || raw === 'light') return raw;\n } catch {\n // ignore\n }\n return 'auto';\n};\n\n/**\n * Apply a preference to the document root. `light`/`dark` pin the matching\n * class; `auto` removes both and lets the `prefers-color-scheme` `@media` rule\n * in the injected tokens own the scheme (and live-update on OS changes).\n */\nexport const applyColorScheme = (pref: ColorSchemePreference): void => {\n const root = document.documentElement;\n root.classList.remove('color-scheme-light', 'color-scheme-dark');\n if (pref !== 'auto') root.classList.add('color-scheme-' + pref);\n};\n\n/** Persist a preference and apply it immediately. */\nexport const setColorSchemePreference = (pref: ColorSchemePreference): void => {\n try {\n localStorage.setItem(COLOR_SCHEME_LS_KEY, pref);\n } catch {\n // ignore\n }\n applyColorScheme(pref);\n};\n"]}
|
package/lib/confine.d.ts
CHANGED
package/lib/confine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confine.d.ts","sourceRoot":"","sources":["../src/lib/confine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"confine.d.ts","sourceRoot":"","sources":["../src/lib/confine.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,UAClB,SAAS,MAAM,EAAE,QAClB,MAAM,KACX;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG;IAAC,OAAO,EAAE,cAAc,CAAA;CAmB3C,CAAC"}
|
package/lib/confine.js
CHANGED
package/lib/confine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confine.js","sourceRoot":"","sources":["../src/lib/confine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"confine.js","sourceRoot":"","sources":["../src/lib/confine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAE,GAAG,EAAC,MAAM,WAAW,CAAC;AAKtD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAwB,EACxB,IAAY,EACgC,EAAE;IAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC;IACvD,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC;QAAE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC;IAC9D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC;IACnD,2EAA2E;IAC3E,0EAA0E;IAC1E,2CAA2C;IAC3C,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/C,IAAI,CAAC;YACH,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC;IACxE,OAAO,EAAC,IAAI,EAAC,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAwB,EAAE,IAAY,EAAW,EAAE,CACjE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC","sourcesContent":["import {existsSync, realpathSync} from 'node:fs';\nimport {resolve as resolvePath, sep} from 'node:path';\n\n/** Why {@link confineToRoots} refused a path. */\nexport type ConfineFailure = 'outside' | 'missing';\n\n/**\n * Resolve `file` against the first of `roots` and accept it only if it lands\n * at or beneath one of them and exists. Every caller hands the result to\n * `launch-editor`, which spawns the developer's editor on it, so this is the\n * boundary that keeps a request from opening arbitrary files (absolute paths,\n * `../` traversal, a sibling directory that merely shares a root's prefix, a\n * symlink out of the tree).\n * Without roots nothing is allowed.\n */\nexport const confineToRoots = (\n roots: readonly string[],\n file: string\n): {path: string} | {failure: ConfineFailure} => {\n const resolvedRoots = roots.map((root) => resolvePath(root));\n const primary = resolvedRoots[0];\n if (primary === undefined) return {failure: 'outside'};\n const path = resolvePath(primary, file);\n if (!within(resolvedRoots, path)) return {failure: 'outside'};\n if (!existsSync(path)) return {failure: 'missing'};\n // Checked again on the real paths, so a symlink beneath a root can't point\n // the editor outside every root. The caller still gets the path as asked:\n // that's the one the developer recognises.\n const realRoots = resolvedRoots.flatMap((root) => {\n try {\n return [realpathSync(root)];\n } catch {\n return [];\n }\n });\n if (!within(realRoots, realpathSync(path))) return {failure: 'outside'};\n return {path};\n};\n\nconst within = (roots: readonly string[], path: string): boolean =>\n roots.some((root) => path === root || path.startsWith(root + sep));\n"]}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The origin allowlist behind `lit-devtools dev --allow-origin`.
|
|
3
|
+
*
|
|
4
|
+
* devframe compares `allowedOrigins` entries exactly, which cannot admit a
|
|
5
|
+
* page whose origin is only known once it boots: StackBlitz gives every port
|
|
6
|
+
* of a project its own `https://<slug>--<port>--<hash>.<zone>.webcontainer-api.io`.
|
|
7
|
+
* An entry may therefore put `*` in its host (`https://*.webcontainer-api.io`),
|
|
8
|
+
* standing for one or more DNS labels. Scheme and port still have to match.
|
|
9
|
+
*
|
|
10
|
+
* With a wildcard among the entries the list is handed to devframe as an
|
|
11
|
+
* origin registry, the one shape it accepts that decides per origin; its
|
|
12
|
+
* WebSocket and SSE gates both ask it. Without one it stays a plain array.
|
|
5
13
|
*/
|
|
6
14
|
import type { WsOriginRegistry } from 'devframe/rpc/transports/ws-server';
|
|
7
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-origins.d.ts","sourceRoot":"","sources":["../../src/lib/devframe/allowed-origins.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"allowed-origins.d.ts","sourceRoot":"","sources":["../../src/lib/devframe/allowed-origins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAsBxE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,YACvB,SAAS,MAAM,EAAE,KACzB,SAAS,MAAM,EAAE,GAAG,gBAAgB,GAAG,SAkBzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-origins.js","sourceRoot":"","sources":["../../src/lib/devframe/allowed-origins.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"allowed-origins.js","sourceRoot":"","sources":["../../src/lib/devframe/allowed-origins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAGlE,4DAA4D;AAC5D,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE;IAC/C,MAAM,KAAK,GAAG,uCAAuC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9B,sDAAsD;IACtD,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,qCAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,KAAK,CACb,kBAAkB,KAAK,+BAA+B;YACpD,kEAAkE,CACrE,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,EAAE,MAAM,EAAE,AAAD,EAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACjC,MAAM,UAAU,GAAG,IAAI;SACpB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;SAC1D,IAAI,CAAC,8BAA8B,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;IACxD,OAAO,IAAI,MAAM,CAAC,IAAI,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,EAAE,GAAG,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAA0B,EACwB,EAAE;IACpD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,MAAM,KAAK,GAAG,OAAO;SAClB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SACvC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,OAAO;SACrB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SACtC,GAAG,CAAC,cAAc,CAAC,CAAC;IACvB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO;QACL,oEAAoE;QACpE,kEAAkE;QAClE,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE;QAC1B,eAAe,EAAE,GAAG,EAAE,CAAC,SAAS;QAChC,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACpB,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC;YAC9B,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;KACnE,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * The origin allowlist behind `lit-devtools dev --allow-origin`.\n *\n * devframe compares `allowedOrigins` entries exactly, which cannot admit a\n * page whose origin is only known once it boots: StackBlitz gives every port\n * of a project its own `https://<slug>--<port>--<hash>.<zone>.webcontainer-api.io`.\n * An entry may therefore put `*` in its host (`https://*.webcontainer-api.io`),\n * standing for one or more DNS labels. Scheme and port still have to match.\n *\n * With a wildcard among the entries the list is handed to devframe as an\n * origin registry, the one shape it accepts that decides per origin; its\n * WebSocket and SSE gates both ask it. Without one it stays a plain array.\n */\n\nimport {isAllowedOrigin} from 'devframe/rpc/transports/ws-server';\nimport type {WsOriginRegistry} from 'devframe/rpc/transports/ws-server';\n\n/** An entry with `*` in the host, compiled to a matcher. */\nconst compilePattern = (entry: string): RegExp => {\n const match = /^(https?):\\/\\/([^/:]+)(?::(\\d+))?\\/?$/.exec(entry);\n const host = match?.[2] ?? '';\n // `*` alone, or `*.com`, would admit most of the web.\n if (match === null || !/^(?:[^*]*\\*)*[^*]*\\.[^*.]+\\.[^*.]+$/.test(host)) {\n throw new Error(\n `--allow-origin ${entry}: a wildcard needs the shape ` +\n `https://*.example.com, with at least two literal labels after it`\n );\n }\n const [, scheme, , port] = match;\n const hostSource = host\n .split('*')\n .map((part) => part.replace(/[.\\\\+?^$()[\\]{}|-]/g, '\\\\$&'))\n .join('[a-z0-9-]+(?:\\\\.[a-z0-9-]+)*');\n const portSource = port === undefined ? '' : `:${port}`;\n return new RegExp(`^${scheme}://${hostSource}${portSource}$`, 'i');\n};\n\n/**\n * `allowedOrigins` for `createDevServer`, from the `--allow-origin` values:\n * `undefined` for none, the entries as given when all are exact, or a registry\n * that also matches the wildcard ones. Throws on a malformed wildcard entry.\n */\nexport const resolveAllowedOrigins = (\n entries: readonly string[]\n): readonly string[] | WsOriginRegistry | undefined => {\n if (entries.length === 0) return undefined;\n const exact = entries\n .filter((entry) => !entry.includes('*'))\n .map((entry) => entry.replace(/\\/$/, ''));\n const patterns = entries\n .filter((entry) => entry.includes('*'))\n .map(compilePattern);\n if (patterns.length === 0) return exact;\n return {\n // No viewer registers itself through this list, so the token guards\n // nothing; it is random only so it is never a guessable constant.\n token: crypto.randomUUID(),\n registerFromUrl: () => undefined,\n isAllowed: (origin) =>\n isAllowedOrigin(origin, exact) ||\n (origin !== undefined && patterns.some((re) => re.test(origin))),\n };\n};\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The framework-neutral Lit devframe: RPC functions, shared state, and the
|
|
3
|
+
* timeline stream. Talks to the page runtime only through the injected
|
|
4
|
+
* {@link TimelineSource} port, so it runs unchanged under `createDevServer()`,
|
|
5
|
+
* `createBuild()`, or an MCP server with no Vite in the loop. `vite.ts` wires
|
|
6
|
+
* the real page-runtime bridge and mounts this via `createPluginFromDevframe`.
|
|
7
|
+
*
|
|
8
|
+
* @see plans/devframe-foundation.md
|
|
5
9
|
*/
|
|
6
10
|
import type { DevframeDefinition } from 'devframe';
|
|
7
11
|
import type { FeatureSettings } from '../../types/timeline.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/lib/devframe/definition.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/lib/devframe/definition.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,OAAO,KAAK,EAAC,kBAAkB,EAAsB,MAAM,UAAU,CAAC;AAWtE,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,yBAAyB,CAAC;AA6CjC,OAAO,EAAmB,KAAK,cAAc,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,wBAAwB;IACvC,kFAAkF;IAClF,MAAM,EAAE,cAAc,CAAC;IACvB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;IACvC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC5C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,kBAAkB,CAqlBpB"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2026 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* The framework-neutral Lit devframe: RPC functions, shared state, and the
|
|
8
3
|
* timeline stream. Talks to the page runtime only through the injected
|
|
@@ -117,7 +112,7 @@ export function createLitDevframe(options) {
|
|
|
117
112
|
// Bounded history for the `recent-events` agent query and the panel's
|
|
118
113
|
// `timeline-history` seed. A plain array, not devframe's internal
|
|
119
114
|
// per-stream replay buffer, which devframe marks `@internal` (see
|
|
120
|
-
// plans/
|
|
115
|
+
// plans/devtools-features.md).
|
|
121
116
|
const recentEvents = replay ? [...replay.events] : [];
|
|
122
117
|
// Event ids: `${epoch}-${seq}`. The epoch is the session start, so a
|
|
123
118
|
// restarted dev server can never reissue an id an older snapshot holds;
|