@oddsquad/vite-plugin-lit 0.2.3 → 0.3.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 +64 -0
- package/LICENSE +28 -0
- package/README.md +153 -0
- package/bin.mjs +154 -0
- package/client.d.ts +61 -0
- package/dist/client/assets/browser-agent-rpc-BXhoSh1z-BvWe4sTJ.js +69 -0
- package/dist/client/assets/browser-agent-rpc-BXhoSh1z-BvWe4sTJ.js.map +1 -0
- package/dist/client/assets/index-CFrVgNfS.js +9740 -0
- package/dist/client/assets/index-CFrVgNfS.js.map +1 -0
- package/{panel → dist/client}/index.html +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/lib/color-scheme.d.ts.map +1 -1
- package/lib/color-scheme.js +17 -21
- package/lib/color-scheme.js.map +1 -1
- package/lib/devframe/definition.d.ts +45 -0
- package/lib/devframe/definition.d.ts.map +1 -0
- package/lib/devframe/definition.js +547 -0
- package/lib/devframe/definition.js.map +1 -0
- package/lib/devframe/icon.d.ts +8 -0
- package/lib/devframe/icon.d.ts.map +1 -0
- package/lib/devframe/icon.js +21 -0
- package/lib/devframe/icon.js.map +1 -0
- package/lib/devframe/paths.d.ts +12 -0
- package/lib/devframe/paths.d.ts.map +1 -0
- package/lib/devframe/paths.js +38 -0
- package/lib/devframe/paths.js.map +1 -0
- package/lib/devframe/protocol.d.ts +218 -0
- package/lib/devframe/protocol.d.ts.map +1 -0
- package/lib/devframe/protocol.js +76 -0
- package/lib/devframe/protocol.js.map +1 -0
- package/lib/devframe/source.d.ts +49 -0
- package/lib/devframe/source.d.ts.map +1 -0
- package/lib/devframe/source.js +23 -0
- package/lib/devframe/source.js.map +1 -0
- package/lib/devframe/vite.d.ts +116 -0
- package/lib/devframe/vite.d.ts.map +1 -0
- package/lib/devframe/vite.js +291 -0
- package/lib/devframe/vite.js.map +1 -0
- package/lib/http.d.ts +29 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +35 -0
- package/lib/http.js.map +1 -0
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +10 -4
- package/lib/icons.js.map +1 -1
- package/lib/plugin.d.ts +15 -4
- package/lib/plugin.d.ts.map +1 -1
- package/lib/plugin.js +640 -574
- package/lib/plugin.js.map +1 -1
- package/lib/runtime/css.d.ts +2 -2
- package/lib/runtime/css.d.ts.map +1 -1
- package/lib/runtime/css.js +34 -34
- package/lib/runtime/css.js.map +1 -1
- package/lib/runtime/edge-panel.d.ts.map +1 -1
- package/lib/runtime/edge-panel.js +82 -91
- package/lib/runtime/edge-panel.js.map +1 -1
- package/lib/runtime/fonts.d.ts.map +1 -1
- package/lib/runtime/fonts.js +1 -1
- package/lib/runtime/fonts.js.map +1 -1
- package/lib/runtime/indicator.d.ts.map +1 -1
- package/lib/runtime/indicator.js +71 -74
- package/lib/runtime/indicator.js.map +1 -1
- package/lib/runtime/inspector/collect.d.ts.map +1 -1
- package/lib/runtime/inspector/collect.js +83 -90
- package/lib/runtime/inspector/collect.js.map +1 -1
- package/lib/runtime/inspector/highlight.d.ts +16 -0
- package/lib/runtime/inspector/highlight.d.ts.map +1 -0
- package/lib/runtime/inspector/highlight.js +66 -0
- package/lib/runtime/inspector/highlight.js.map +1 -0
- package/lib/runtime/inspector/install.d.ts.map +1 -1
- package/lib/runtime/inspector/install.js +180 -205
- package/lib/runtime/inspector/install.js.map +1 -1
- package/lib/runtime/inspector/serialize.d.ts.map +1 -1
- package/lib/runtime/inspector/serialize.js +86 -107
- package/lib/runtime/inspector/serialize.js.map +1 -1
- package/lib/runtime/intern.d.ts.map +1 -1
- package/lib/runtime/intern.js +31 -29
- package/lib/runtime/intern.js.map +1 -1
- package/lib/runtime/overrides.d.ts.map +1 -1
- package/lib/runtime/overrides.js +14 -13
- package/lib/runtime/overrides.js.map +1 -1
- package/lib/runtime/patch.d.ts +8 -0
- package/lib/runtime/patch.d.ts.map +1 -1
- package/lib/runtime/patch.js +321 -282
- package/lib/runtime/patch.js.map +1 -1
- package/lib/runtime/source-meta.d.ts.map +1 -1
- package/lib/runtime/source-meta.js +1 -1
- package/lib/runtime/source-meta.js.map +1 -1
- package/lib/runtime/source-overlay/editors.d.ts.map +1 -1
- package/lib/runtime/source-overlay/editors.js +27 -27
- package/lib/runtime/source-overlay/editors.js.map +1 -1
- package/lib/runtime/source-overlay/mask-path.d.ts.map +1 -1
- package/lib/runtime/source-overlay/mask-path.js +15 -15
- package/lib/runtime/source-overlay/mask-path.js.map +1 -1
- package/lib/runtime/source-overlay/overlay-element.d.ts.map +1 -1
- package/lib/runtime/source-overlay/overlay-element.js +347 -356
- package/lib/runtime/source-overlay/overlay-element.js.map +1 -1
- package/lib/runtime/source-overlay/source-host.d.ts.map +1 -1
- package/lib/runtime/source-overlay/source-host.js +64 -71
- package/lib/runtime/source-overlay/source-host.js.map +1 -1
- package/lib/runtime/source-overlay/template.d.ts.map +1 -1
- package/lib/runtime/source-overlay/template.js +3 -3
- package/lib/runtime/source-overlay/template.js.map +1 -1
- package/lib/runtime/source-overlay.d.ts.map +1 -1
- package/lib/runtime/source-overlay.js +5 -2
- package/lib/runtime/source-overlay.js.map +1 -1
- package/lib/runtime/timeline/clock.d.ts.map +1 -1
- package/lib/runtime/timeline/clock.js +2 -2
- package/lib/runtime/timeline/clock.js.map +1 -1
- package/lib/runtime/timeline/flash.d.ts +39 -0
- package/lib/runtime/timeline/flash.d.ts.map +1 -0
- package/lib/runtime/timeline/flash.js +169 -0
- package/lib/runtime/timeline/flash.js.map +1 -0
- package/lib/runtime/timeline/identity.d.ts.map +1 -1
- package/lib/runtime/timeline/identity.js +27 -27
- package/lib/runtime/timeline/identity.js.map +1 -1
- package/lib/runtime/timeline/input.d.ts.map +1 -1
- package/lib/runtime/timeline/input.js +54 -67
- package/lib/runtime/timeline/input.js.map +1 -1
- package/lib/runtime/timeline/install.d.ts.map +1 -1
- package/lib/runtime/timeline/install.js +38 -29
- package/lib/runtime/timeline/install.js.map +1 -1
- package/lib/runtime/timeline/lifecycle.d.ts +8 -0
- package/lib/runtime/timeline/lifecycle.d.ts.map +1 -1
- package/lib/runtime/timeline/lifecycle.js +149 -133
- package/lib/runtime/timeline/lifecycle.js.map +1 -1
- package/lib/runtime/timeline/public-api.d.ts.map +1 -1
- package/lib/runtime/timeline/public-api.js +9 -9
- package/lib/runtime/timeline/public-api.js.map +1 -1
- package/lib/runtime/timeline/render.d.ts.map +1 -1
- package/lib/runtime/timeline/render.js +70 -75
- package/lib/runtime/timeline/render.js.map +1 -1
- package/lib/runtime/timeline/transport.d.ts.map +1 -1
- package/lib/runtime/timeline/transport.js +39 -43
- package/lib/runtime/timeline/transport.js.map +1 -1
- package/lib/segmented-tabs.d.ts +3 -1
- package/lib/segmented-tabs.d.ts.map +1 -1
- package/lib/segmented-tabs.js +136 -107
- package/lib/segmented-tabs.js.map +1 -1
- package/lib/snapshot.d.ts +28 -0
- package/lib/snapshot.d.ts.map +1 -0
- package/lib/snapshot.js +57 -0
- package/lib/snapshot.js.map +1 -0
- package/lib/source-meta.d.ts.map +1 -1
- package/lib/source-meta.js +176 -162
- package/lib/source-meta.js.map +1 -1
- package/lib/timeline/derive.d.ts +152 -0
- package/lib/timeline/derive.d.ts.map +1 -0
- package/lib/timeline/derive.js +242 -0
- package/lib/timeline/derive.js.map +1 -0
- package/lib/timeline-plugin.d.ts.map +1 -1
- package/lib/timeline-plugin.js +304 -321
- package/lib/timeline-plugin.js.map +1 -1
- package/lib/tokens.d.ts.map +1 -1
- package/lib/tokens.js +17 -18
- package/lib/tokens.js.map +1 -1
- package/lib/transform.d.ts.map +1 -1
- package/lib/transform.js +62 -57
- package/lib/transform.js.map +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -1
- package/lib/types.js.map +1 -1
- package/lib/wrap-table.d.ts.map +1 -1
- package/lib/wrap-table.js +19 -17
- package/lib/wrap-table.js.map +1 -1
- package/package.json +77 -13
- package/types/hmr-incompatibility.d.ts +59 -0
- package/types/hmr-incompatibility.d.ts.map +1 -0
- package/types/hmr-incompatibility.js +30 -0
- package/types/hmr-incompatibility.js.map +1 -0
- package/types/in-page.d.ts +49 -0
- package/types/in-page.d.ts.map +1 -0
- package/types/in-page.js +33 -0
- package/types/in-page.js.map +1 -0
- package/types/inspector.d.ts.map +1 -1
- package/types/inspector.js.map +1 -1
- package/types/snapshot.d.ts +44 -0
- package/types/snapshot.d.ts.map +1 -0
- package/types/snapshot.js +7 -0
- package/types/snapshot.js.map +1 -0
- package/types/timeline.d.ts +11 -0
- package/types/timeline.d.ts.map +1 -1
- package/types/timeline.js.map +1 -1
- package/panel/components-view.d.ts +0 -60
- package/panel/components-view.d.ts.map +0 -1
- package/panel/components-view.js +0 -587
- package/panel/components-view.js.map +0 -1
- package/panel/devtools-settings.d.ts +0 -41
- package/panel/devtools-settings.d.ts.map +0 -1
- package/panel/devtools-settings.js +0 -463
- package/panel/devtools-settings.js.map +0 -1
- package/panel/lit-devtools-panel.d.ts +0 -37
- package/panel/lit-devtools-panel.d.ts.map +0 -1
- package/panel/lit-devtools-panel.js +0 -185
- package/panel/lit-devtools-panel.js.map +0 -1
- package/panel/timeline-event-list.d.ts +0 -43
- package/panel/timeline-event-list.d.ts.map +0 -1
- package/panel/timeline-event-list.js +0 -416
- package/panel/timeline-event-list.js.map +0 -1
- package/panel/timeline-layers.d.ts +0 -25
- package/panel/timeline-layers.d.ts.map +0 -1
- package/panel/timeline-layers.js +0 -96
- package/panel/timeline-layers.js.map +0 -1
- package/panel/timeline-view.d.ts +0 -38
- package/panel/timeline-view.d.ts.map +0 -1
- package/panel/timeline-view.js +0 -234
- package/panel/timeline-view.js.map +0 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
INSPECT_CMD_CHANNEL,
|
|
8
|
+
INSPECT_DATA_CHANNEL,
|
|
9
|
+
INSPECT_OVERLAY_TOGGLE_CHANNEL,
|
|
10
|
+
} from '../../types/inspector.js';
|
|
11
|
+
import {HMR_INCOMPATIBLE_CHANNEL} from '../../types/hmr-incompatibility.js';
|
|
12
|
+
import {SETTINGS_OVERRIDE_CHANNEL} from '../../types/timeline.js';
|
|
13
|
+
import {createLitDevframe} from './definition.js';
|
|
14
|
+
import {LIT_DEVFRAME_ID} from './protocol.js';
|
|
15
|
+
export {createLitDevframe};
|
|
16
|
+
/**
|
|
17
|
+
* `TimelineSource` over a Vite dev server's `hot` channel.
|
|
18
|
+
*
|
|
19
|
+
* `install()` runs the definition's `setup()` — and therefore
|
|
20
|
+
* `source.attach()` — before it resolves, so this is attached before a dev
|
|
21
|
+
* server is necessarily in hand. Calls made before {@link bind} are dropped
|
|
22
|
+
* rather than buffered: nothing can emit a page-runtime event until a page
|
|
23
|
+
* has connected to a bound server.
|
|
24
|
+
*/
|
|
25
|
+
export class HotTimelineSource {
|
|
26
|
+
#hot;
|
|
27
|
+
#sink;
|
|
28
|
+
#hub;
|
|
29
|
+
/**
|
|
30
|
+
* Wire the source to a live dev server. Call once, from `devtools.setup()`.
|
|
31
|
+
* `hub` is optional: without it the bridge still carries page traffic both
|
|
32
|
+
* ways, it just cannot bring the dock to the front on an overlay pick.
|
|
33
|
+
*/
|
|
34
|
+
bind(server, hub) {
|
|
35
|
+
this.#hub = hub;
|
|
36
|
+
const hot = server.hot;
|
|
37
|
+
this.#hot = hot;
|
|
38
|
+
hot.on('lit:timeline:push-event', (data) => {
|
|
39
|
+
this.#sink?.pushEvents(data.events ?? []);
|
|
40
|
+
});
|
|
41
|
+
hot.on('lit:timeline:custom-layer', (data) => {
|
|
42
|
+
if (!data.layer?.id) return;
|
|
43
|
+
this.#sink?.addLayer(data.layer);
|
|
44
|
+
});
|
|
45
|
+
hot.on(INSPECT_DATA_CHANNEL, (data) => {
|
|
46
|
+
// An overlay pick means the developer clicked an element in the page and
|
|
47
|
+
// wants the Components tab. Bring the dock forward from the node side
|
|
48
|
+
// rather than having the panel reach into the parent frame.
|
|
49
|
+
if (data.type === 'pick') {
|
|
50
|
+
// Carry the target with the activation, not just the dock id: the
|
|
51
|
+
// params ride the hub's `devframe:docks:active` state, so a panel
|
|
52
|
+
// that mounts *because of* this pick still lands on the right
|
|
53
|
+
// element instead of racing the separate `pick` message.
|
|
54
|
+
this.#hub?.docks?.activate?.(LIT_DEVFRAME_ID, {componentId: data.id});
|
|
55
|
+
}
|
|
56
|
+
this.#sink?.inspectorMessage(data);
|
|
57
|
+
});
|
|
58
|
+
hot.on(HMR_INCOMPATIBLE_CHANNEL, (event) => {
|
|
59
|
+
this.#sink?.hmrIncompatible(event);
|
|
60
|
+
});
|
|
61
|
+
// The runtime announces itself on every connect. It boots from the
|
|
62
|
+
// compiled-in defaults (recording off), so the session's current state
|
|
63
|
+
// has to be pushed back down or a page that loads while recording is on
|
|
64
|
+
// captures nothing while every surface still reports `recording: true`.
|
|
65
|
+
hot.on('lit:timeline:runtime-ready', () => {
|
|
66
|
+
this.#sink?.runtimeReady();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/** Toggle the page's inspect overlay. Also used by the palette command. */
|
|
70
|
+
toggleOverlay() {
|
|
71
|
+
this.#hot?.send(INSPECT_OVERLAY_TOGGLE_CHANNEL);
|
|
72
|
+
}
|
|
73
|
+
attach(sink) {
|
|
74
|
+
this.#sink = sink;
|
|
75
|
+
return () => {
|
|
76
|
+
if (this.#sink === sink) this.#sink = undefined;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
sendInspector(cmd) {
|
|
80
|
+
this.#hot?.send(INSPECT_CMD_CHANNEL, cmd);
|
|
81
|
+
}
|
|
82
|
+
setRecording(recording) {
|
|
83
|
+
this.#hot?.send('lit:timeline:recording-changed', {recording});
|
|
84
|
+
}
|
|
85
|
+
setLayers(layers) {
|
|
86
|
+
// Wire format matches what runtime/timeline/install.ts listens for: a flat
|
|
87
|
+
// map of the boolean toggle fields, not `{layers}`.
|
|
88
|
+
this.#hot?.send('lit:timeline:layers-changed', {
|
|
89
|
+
litLifecycleEnabled: layers.litLifecycleEnabled,
|
|
90
|
+
litRenderEnabled: layers.litRenderEnabled,
|
|
91
|
+
mouseEventEnabled: layers.mouseEventEnabled,
|
|
92
|
+
keyboardEventEnabled: layers.keyboardEventEnabled,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
setSettingsOverride(override) {
|
|
96
|
+
this.#hot?.send(SETTINGS_OVERRIDE_CHANNEL, override);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One warning per process, not per dev server: a restart-heavy session
|
|
101
|
+
* should not paper the terminal with the same advisory. Carries the reason,
|
|
102
|
+
* because "discovery unavailable" with no cause is the kind of message that
|
|
103
|
+
* costs an afternoon when the guess below finally goes stale.
|
|
104
|
+
*/
|
|
105
|
+
let warnedDiscoveryUnavailable = false;
|
|
106
|
+
const warnDiscoveryUnavailable = (reason) => {
|
|
107
|
+
if (warnedDiscoveryUnavailable) return;
|
|
108
|
+
warnedDiscoveryUnavailable = true;
|
|
109
|
+
console.warn(
|
|
110
|
+
`[lit-plugin] devframe instance-registry discovery unavailable ` +
|
|
111
|
+
`(${reason}); stdio MCP clients cannot auto-discover this dev ` +
|
|
112
|
+
`server. The MCP endpoint itself is unaffected — point clients at ` +
|
|
113
|
+
`<dev-server-origin>/__devtools/__mcp directly.`
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Publish this devframe in devframe's global instance registry
|
|
118
|
+
* (`~/.devframe/instances/`), so stdio MCP connectors — `devframe connect`,
|
|
119
|
+
* this package's own `lit-devtools mcp` — find the running dev server
|
|
120
|
+
* without port guessing.
|
|
121
|
+
*
|
|
122
|
+
* `createDevServer()` registers itself, but this plugin never goes through
|
|
123
|
+
* it: it mounts into the Vite DevTools hub, and `@vitejs/devtools@0.7.5`
|
|
124
|
+
* calls `initHub()` with no `register` option, which defaults to off. So a
|
|
125
|
+
* Vite-hosted devframe is invisible to discovery unless a plugin publishes
|
|
126
|
+
* the record itself — which is all this does. `registerDevframeInstance()`
|
|
127
|
+
* is documented for exactly this case ("custom hosts that serve a devframe
|
|
128
|
+
* in-process call this explicitly with the origin they are reachable at"),
|
|
129
|
+
* and the registry is a directory of per-`pid`+`port` JSON files, so
|
|
130
|
+
* registrants coexist.
|
|
131
|
+
*
|
|
132
|
+
* The mount path is the soft spot: `/__devtools/` is where this version of
|
|
133
|
+
* Vite DevTools mounts, not a promise about where a devframe host mounts in
|
|
134
|
+
* general. So the guess is verified before it is published — the same
|
|
135
|
+
* `probeDevframeOrigin()` primitive the registry's own liveness check uses
|
|
136
|
+
* has to answer at that base, or nothing is registered. A record that
|
|
137
|
+
* doesn't answer is worse than no record: an agent dials it and gets 404s
|
|
138
|
+
* from a server that claimed to be there.
|
|
139
|
+
*
|
|
140
|
+
* The MCP path is then taken from what that probe *reports* rather than
|
|
141
|
+
* assumed to be the `__mcp` default, which removes the second guess
|
|
142
|
+
* entirely. Note the two path conventions in play: `__connection.json`
|
|
143
|
+
* serves `mcp.path` **relative** to the base (`"__mcp"`), while a registry
|
|
144
|
+
* record stores it **absolute** (`"/__devtools/__mcp"`) because the
|
|
145
|
+
* connector dials `origin + record.mcp.path` directly. Joining the two is
|
|
146
|
+
* exactly what devframe's own `probePort()` does with its root-mounted
|
|
147
|
+
* probe.
|
|
148
|
+
*
|
|
149
|
+
* Known sharp edge: records are keyed by `pid`+`port` alone. Another
|
|
150
|
+
* devframe-hosting plugin in the same Vite process would share this file,
|
|
151
|
+
* and whichever unregisters first removes it for both. Single-devframe use
|
|
152
|
+
* is the common case and there is no cross-plugin coordination primitive
|
|
153
|
+
* today.
|
|
154
|
+
*/
|
|
155
|
+
async function registerInstance(ctx, name) {
|
|
156
|
+
// Both imports are dynamic and optional: `@vitejs/devtools-kit` is an
|
|
157
|
+
// optional peer this package must never hard-resolve, and `devframe`'s
|
|
158
|
+
// `internal` subpath is only needed on this path.
|
|
159
|
+
const constants = await import('@vitejs/devtools-kit/constants').catch(
|
|
160
|
+
() => null
|
|
161
|
+
);
|
|
162
|
+
const internal = await import('devframe/internal').catch(() => null);
|
|
163
|
+
if (!constants) return {reason: '@vitejs/devtools-kit not resolvable'};
|
|
164
|
+
if (!internal) return {reason: 'devframe/internal not resolvable'};
|
|
165
|
+
const basePath = constants.DEVTOOLS_MOUNT_PATH;
|
|
166
|
+
const origin = ctx.host?.resolveOrigin?.();
|
|
167
|
+
if (!origin) return {reason: 'host origin unavailable'};
|
|
168
|
+
const probed = await internal.probeDevframeOrigin(origin, basePath);
|
|
169
|
+
if (!probed) {
|
|
170
|
+
return {reason: `no devframe answered at ${origin}${basePath}`};
|
|
171
|
+
}
|
|
172
|
+
// Relative (`"__mcp"`) as served, absolute as stored — see above. A host
|
|
173
|
+
// that already reports an absolute path is passed through unchanged.
|
|
174
|
+
const reported = probed.meta.mcp?.path;
|
|
175
|
+
const mcpPath =
|
|
176
|
+
reported === undefined
|
|
177
|
+
? null
|
|
178
|
+
: reported.startsWith('/')
|
|
179
|
+
? reported
|
|
180
|
+
: `${basePath}${reported}`;
|
|
181
|
+
const {unregister} = internal.registerDevframeInstance({
|
|
182
|
+
pid: process.pid,
|
|
183
|
+
// The probe reports the origin that actually answered — a `localhost`
|
|
184
|
+
// bind may only be dialable as `127.0.0.1` or `[::1]` — so its port is
|
|
185
|
+
// the one truly listening, which `config.server.port` is not when the
|
|
186
|
+
// configured port was taken.
|
|
187
|
+
port: Number(new URL(probed.origin).port) || 0,
|
|
188
|
+
origin: probed.origin,
|
|
189
|
+
basePath,
|
|
190
|
+
id: LIT_DEVFRAME_ID,
|
|
191
|
+
name,
|
|
192
|
+
rootDir: process.cwd(),
|
|
193
|
+
// Registering with `mcp: null` is honest rather than useless: the
|
|
194
|
+
// connector surfaces the instance with its own "MCP disabled" hint,
|
|
195
|
+
// which beats the instance being invisible.
|
|
196
|
+
mcp: mcpPath === null ? null : {path: mcpPath},
|
|
197
|
+
startedAt: Date.now(),
|
|
198
|
+
});
|
|
199
|
+
return {unregister};
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Register once the dev server is actually accepting connections. The
|
|
203
|
+
* DevTools `setup()` hook runs during server construction, well before
|
|
204
|
+
* `listen()` resolves, so probing from there always fails to connect — the
|
|
205
|
+
* record has to wait for the port it is about to advertise to be real.
|
|
206
|
+
*/
|
|
207
|
+
function registerInstanceWhenListening(ctx, name) {
|
|
208
|
+
const httpServer = ctx.viteServer?.httpServer;
|
|
209
|
+
if (!httpServer) {
|
|
210
|
+
// Middleware mode: no server of our own to advertise.
|
|
211
|
+
warnDiscoveryUnavailable('no HTTP server (middleware mode?)');
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const run = () => {
|
|
215
|
+
registerInstance(ctx, name)
|
|
216
|
+
.then((result) => {
|
|
217
|
+
if ('unregister' in result) {
|
|
218
|
+
httpServer.once('close', result.unregister);
|
|
219
|
+
} else {
|
|
220
|
+
warnDiscoveryUnavailable(result.reason);
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
.catch((error) => {
|
|
224
|
+
warnDiscoveryUnavailable(String(error));
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
if (httpServer.listening) run();
|
|
228
|
+
else httpServer.once('listening', run);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The Vite plugin that mounts the Lit devframe on the DevTools hub. A no-op
|
|
232
|
+
* when DevTools is not active: without it nothing calls `devtools.setup()`,
|
|
233
|
+
* so the definition is never installed and the panel simply isn't there.
|
|
234
|
+
*/
|
|
235
|
+
export function createLitDevframePlugin(options) {
|
|
236
|
+
const source = new HotTimelineSource();
|
|
237
|
+
// Only known once `setup()` has the dev server, which is after the
|
|
238
|
+
// definition is built -- hence the getter.
|
|
239
|
+
let viteRoot;
|
|
240
|
+
const definition = createLitDevframe({
|
|
241
|
+
source,
|
|
242
|
+
version: options.version,
|
|
243
|
+
features: options.features,
|
|
244
|
+
clientAssets: options.clientAssets,
|
|
245
|
+
sourceRoot: () => viteRoot,
|
|
246
|
+
});
|
|
247
|
+
return {
|
|
248
|
+
name: `devframe:${LIT_DEVFRAME_ID}`,
|
|
249
|
+
devtools: {
|
|
250
|
+
// The panel reflects a running page, so there is nothing to mount
|
|
251
|
+
// during `vite build`. A static snapshot goes through
|
|
252
|
+
// `devframe/adapters/build` instead.
|
|
253
|
+
capabilities: {dev: true, build: false},
|
|
254
|
+
async setup(ctx) {
|
|
255
|
+
// Bind before installing: `install()` runs the definition's `setup()`,
|
|
256
|
+
// which attaches to this source, and the dev server is already
|
|
257
|
+
// available on the context by now.
|
|
258
|
+
if (ctx.viteServer) source.bind(ctx.viteServer, ctx);
|
|
259
|
+
viteRoot = ctx.viteServer?.config.root;
|
|
260
|
+
await ctx.install(definition);
|
|
261
|
+
// The overlay picker as a palette command with a managed shortcut.
|
|
262
|
+
// Only meaningful when the source overlay is enabled, since that is
|
|
263
|
+
// what draws the picker in the page.
|
|
264
|
+
if (options.features?.()?.sourceOverlay.enabled) {
|
|
265
|
+
ctx.commands?.register?.({
|
|
266
|
+
id: 'lit:overlay:toggle',
|
|
267
|
+
title: 'Pick Lit Element',
|
|
268
|
+
description:
|
|
269
|
+
'Click to inspect in the Components panel, hold Meta/Ctrl and click to open in your editor',
|
|
270
|
+
icon: 'ph:crosshair-duotone',
|
|
271
|
+
category: 'Lit',
|
|
272
|
+
keybindings: [{key: 'Meta+Shift+E'}],
|
|
273
|
+
handler: () => source.toggleOverlay(),
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
// Discovery is a convenience on top of a panel that already works,
|
|
277
|
+
// so this never blocks `setup()` and never throws: a failure costs
|
|
278
|
+
// the user the stdio MCP shortcut, and the direct URL still works.
|
|
279
|
+
registerInstanceWhenListening(ctx, definition.name);
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* The page-runtime bridge on its own, for a host that drives its own mount
|
|
286
|
+
* (or a test that wants to observe page traffic without a hub). Bind it to a
|
|
287
|
+
* dev server, then either hand it to {@link createLitDevframe} or
|
|
288
|
+
* {@link TimelineSource.attach} your own sink.
|
|
289
|
+
*/
|
|
290
|
+
export const createHotTimelineSource = () => new HotTimelineSource();
|
|
291
|
+
//# sourceMappingURL=vite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../src/lib/devframe/vite.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuBH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAC,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;AAQlE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAC,iBAAiB,EAAC,CAAC;AA6C3B;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAAiB;IAC5B,IAAI,CAAmC;IACvC,KAAK,CAA2B;IAChC,IAAI,CAAiC;IAErC;;;;OAIG;IACH,IAAI,CAAC,MAAqB,EAAE,GAAwB;QAClD,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAEhB,GAAG,CAAC,EAAE,CAAC,yBAAyB,EAAE,CAAC,IAAgC,EAAE,EAAE;YACrE,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;QAC5C,CAAC,CAAC,C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kB;wBACzB,WAAW,EACT,2FAA2F;wBAC7F,IAAI,EAAE,sBAAsB;wBAC5B,QAAQ,EAAE,KAAK;wBACf,WAAW,EAAE,CAAC,EAAC,GAAG,EAAE,cAAc,EAAC,CAAC;wBACpC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;qBACtC,CAAC,CAAC;gBACL,CAAC;gBAED,mEAAmE;gBACnE,mEAAmE;gBACnE,mEAAmE;gBACnE,6BAA6B,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAsB,EAAE,CAC7D,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Mounts the Lit devframe ({@link createLitDevframe}) into the Vite DevTools\n * hub and bridges the page runtime's `import.meta.hot` transport to the\n * definition's `TimelineSource` port. Everything Vite-specific lives here:\n * the definition itself must keep running under `createDevServer()` with no\n * Vite installed.\n *\n * Vite DevTools 0.7+ is itself built on devframe, so its plugin context is a\n * devframe hub context: `ctx.install(definition)` serves the panel SPA from\n * the definition's `clientAssets`, registers its dock, and exposes its RPC\n * over the hub's authenticated WebSocket. That is all\n * `createPluginFromDevframe()` from `@vitejs/devtools-kit` does, so calling\n * `install` directly keeps DevTools an optional peer we never import at\n * runtime — the hook below is duck-typed, exactly as the panel's previous\n * dock registration was.\n *\n * @see plans/devframe-foundation.md\n */\n\nimport type {Plugin, ViteDevServer} from 'vite';\nimport type {DevframeDefinition} from 'devframe';\nimport {\n INSPECT_CMD_CHANNEL,\n INSPECT_DATA_CHANNEL,\n INSPECT_OVERLAY_TOGGLE_CHANNEL,\n} from '../../types/inspector.js';\nimport type {\n InspectorCommand,\n InspectorMessage,\n} from '../../types/inspector.js';\nimport {HMR_INCOMPATIBLE_CHANNEL} from '../../types/hmr-incompatibility.js';\nimport type {HmrIncompatibilityEvent} from '../../types/hmr-incompatibility.js';\nimport {SETTINGS_OVERRIDE_CHANNEL} from '../../types/timeline.js';\nimport type {\n FeatureSettings,\n SettingsOverride,\n TimelineEvent,\n TimelineLayer,\n TimelineLayersState,\n} from '../../types/timeline.js';\nimport {createLitDevframe} from './definition.js';\nimport {LIT_DEVFRAME_ID} from './protocol.js';\nimport type {TimelineSink, TimelineSource} from './source.js';\n\nexport {createLitDevframe};\n\n/**\n * The slice of the Vite DevTools hub context this plugin uses. Structurally a\n * subset of `ViteDevToolsNodeContext` from `@vitejs/devtools-kit/node`;\n * declared here so the package never imports that optional peer at runtime.\n * Install `@vitejs/devtools-kit` as a dev dependency to check it against the\n * real declarations.\n */\ninterface DevToolsHubContext {\n readonly viteServer?: ViteDevServer;\n /** Serve a devframe's SPA, register its dock, and run its `setup()`. */\n install: (\n devframe: DevframeDefinition,\n options?: {base?: string; dock?: Record<string, unknown>}\n ) => Promise<void>;\n docks?: {\n activate?: (dockId: string, params?: Record<string, unknown>) => void;\n };\n commands?: {register?: (command: Record<string, unknown>) => unknown};\n /**\n * The hub's host runtime. Structurally the slice of devframe's\n * `DevframeHost` {@link registerInstance} needs; `DevframeHubContext`\n * extends `DevframeNodeContext`, which carries it.\n */\n host?: {resolveOrigin?: () => string};\n}\n\ndeclare module 'vite' {\n interface Plugin {\n /** Vite DevTools plugin hook, contributed by `@vitejs/devtools`. */\n devtools?: {\n capabilities?: {dev?: boolean; build?: boolean};\n setup: (ctx: DevToolsHubContext) => void | Promise<void>;\n };\n }\n}\n\nexport interface CreateLitDevframePluginOptions {\n version: string;\n features?: () => FeatureSettings | null;\n /** Override the built panel SPA directory. Defaults to `dist/client`. */\n clientAssets?: string;\n}\n\n/**\n * `TimelineSource` over a Vite dev server's `hot` channel.\n *\n * `install()` runs the definition's `setup()` — and therefore\n * `source.attach()` — before it resolves, so this is attached before a dev\n * server is necessarily in hand. Calls made before {@link bind} are dropped\n * rather than buffered: nothing can emit a page-runtime event until a page\n * has connected to a bound server.\n */\nexport class HotTimelineSource implements TimelineSource {\n #hot: ViteDevServer['hot'] | undefined;\n #sink: TimelineSink | undefined;\n #hub: DevToolsHubContext | undefined;\n\n /**\n * Wire the source to a live dev server. Call once, from `devtools.setup()`.\n * `hub` is optional: without it the bridge still carries page traffic both\n * ways, it just cannot bring the dock to the front on an overlay pick.\n */\n bind(server: ViteDevServer, hub?: DevToolsHubContext): void {\n this.#hub = hub;\n const hot = server.hot;\n this.#hot = hot;\n\n hot.on('lit:timeline:push-event', (data: {events?: TimelineEvent[]}) => {\n this.#sink?.pushEvents(data.events ?? []);\n });\n\n hot.on('lit:timeline:custom-layer', (data: {layer?: TimelineLayer}) => {\n if (!data.layer?.id) return;\n this.#sink?.addLayer(data.layer);\n });\n\n hot.on(INSPECT_DATA_CHANNEL, (data: InspectorMessage) => {\n // An overlay pick means the developer clicked an element in the page and\n // wants the Components tab. Bring the dock forward from the node side\n // rather than having the panel reach into the parent frame.\n if (data.type === 'pick') {\n // Carry the target with the activation, not just the dock id: the\n // params ride the hub's `devframe:docks:active` state, so a panel\n // that mounts *because of* this pick still lands on the right\n // element instead of racing the separate `pick` message.\n this.#hub?.docks?.activate?.(LIT_DEVFRAME_ID, {componentId: data.id});\n }\n this.#sink?.inspectorMessage(data);\n });\n\n hot.on(HMR_INCOMPATIBLE_CHANNEL, (event: HmrIncompatibilityEvent) => {\n this.#sink?.hmrIncompatible(event);\n });\n\n // The runtime announces itself on every connect. It boots from the\n // compiled-in defaults (recording off), so the session's current state\n // has to be pushed back down or a page that loads while recording is on\n // captures nothing while every surface still reports `recording: true`.\n hot.on('lit:timeline:runtime-ready', () => {\n this.#sink?.runtimeReady();\n });\n }\n\n /** Toggle the page's inspect overlay. Also used by the palette command. */\n toggleOverlay(): void {\n this.#hot?.send(INSPECT_OVERLAY_TOGGLE_CHANNEL);\n }\n\n attach(sink: TimelineSink): () => void {\n this.#sink = sink;\n return () => {\n if (this.#sink === sink) this.#sink = undefined;\n };\n }\n\n sendInspector(cmd: InspectorCommand): void {\n this.#hot?.send(INSPECT_CMD_CHANNEL, cmd);\n }\n\n setRecording(recording: boolean): void {\n this.#hot?.send('lit:timeline:recording-changed', {recording});\n }\n\n setLayers(layers: TimelineLayersState): void {\n // Wire format matches what runtime/timeline/install.ts listens for: a flat\n // map of the boolean toggle fields, not `{layers}`.\n this.#hot?.send('lit:timeline:layers-changed', {\n litLifecycleEnabled: layers.litLifecycleEnabled,\n litRenderEnabled: layers.litRenderEnabled,\n mouseEventEnabled: layers.mouseEventEnabled,\n keyboardEventEnabled: layers.keyboardEventEnabled,\n });\n }\n\n setSettingsOverride(override: SettingsOverride): void {\n this.#hot?.send(SETTINGS_OVERRIDE_CHANNEL, override);\n }\n}\n\n/**\n * One warning per process, not per dev server: a restart-heavy session\n * should not paper the terminal with the same advisory. Carries the reason,\n * because \"discovery unavailable\" with no cause is the kind of message that\n * costs an afternoon when the guess below finally goes stale.\n */\nlet warnedDiscoveryUnavailable = false;\n\nconst warnDiscoveryUnavailable = (reason: string): void => {\n if (warnedDiscoveryUnavailable) return;\n warnedDiscoveryUnavailable = true;\n console.warn(\n `[lit-plugin] devframe instance-registry discovery unavailable ` +\n `(${reason}); stdio MCP clients cannot auto-discover this dev ` +\n `server. The MCP endpoint itself is unaffected — point clients at ` +\n `<dev-server-origin>/__devtools/__mcp directly.`\n );\n};\n\n/**\n * Publish this devframe in devframe's global instance registry\n * (`~/.devframe/instances/`), so stdio MCP connectors — `devframe connect`,\n * this package's own `lit-devtools mcp` — find the running dev server\n * without port guessing.\n *\n * `createDevServer()` registers itself, but this plugin never goes through\n * it: it mounts into the Vite DevTools hub, and `@vitejs/devtools@0.7.5`\n * calls `initHub()` with no `register` option, which defaults to off. So a\n * Vite-hosted devframe is invisible to discovery unless a plugin publishes\n * the record itself — which is all this does. `registerDevframeInstance()`\n * is documented for exactly this case (\"custom hosts that serve a devframe\n * in-process call this explicitly with the origin they are reachable at\"),\n * and the registry is a directory of per-`pid`+`port` JSON files, so\n * registrants coexist.\n *\n * The mount path is the soft spot: `/__devtools/` is where this version of\n * Vite DevTools mounts, not a promise about where a devframe host mounts in\n * general. So the guess is verified before it is published — the same\n * `probeDevframeOrigin()` primitive the registry's own liveness check uses\n * has to answer at that base, or nothing is registered. A record that\n * doesn't answer is worse than no record: an agent dials it and gets 404s\n * from a server that claimed to be there.\n *\n * The MCP path is then taken from what that probe *reports* rather than\n * assumed to be the `__mcp` default, which removes the second guess\n * entirely. Note the two path conventions in play: `__connection.json`\n * serves `mcp.path` **relative** to the base (`\"__mcp\"`), while a registry\n * record stores it **absolute** (`\"/__devtools/__mcp\"`) because the\n * connector dials `origin + record.mcp.path` directly. Joining the two is\n * exactly what devframe's own `probePort()` does with its root-mounted\n * probe.\n *\n * Known sharp edge: records are keyed by `pid`+`port` alone. Another\n * devframe-hosting plugin in the same Vite process would share this file,\n * and whichever unregisters first removes it for both. Single-devframe use\n * is the common case and there is no cross-plugin coordination primitive\n * today.\n */\nasync function registerInstance(\n ctx: DevToolsHubContext,\n name: string\n): Promise<{unregister: () => void} | {reason: string}> {\n // Both imports are dynamic and optional: `@vitejs/devtools-kit` is an\n // optional peer this package must never hard-resolve, and `devframe`'s\n // `internal` subpath is only needed on this path.\n const constants = await import('@vitejs/devtools-kit/constants').catch(\n () => null\n );\n const internal = await import('devframe/internal').catch(() => null);\n if (!constants) return {reason: '@vitejs/devtools-kit not resolvable'};\n if (!internal) return {reason: 'devframe/internal not resolvable'};\n\n const basePath = constants.DEVTOOLS_MOUNT_PATH;\n const origin = ctx.host?.resolveOrigin?.();\n if (!origin) return {reason: 'host origin unavailable'};\n\n const probed = await internal.probeDevframeOrigin(origin, basePath);\n if (!probed) {\n return {reason: `no devframe answered at ${origin}${basePath}`};\n }\n\n // Relative (`\"__mcp\"`) as served, absolute as stored — see above. A host\n // that already reports an absolute path is passed through unchanged.\n const reported = probed.meta.mcp?.path;\n const mcpPath =\n reported === undefined\n ? null\n : reported.startsWith('/')\n ? reported\n : `${basePath}${reported}`;\n\n const {unregister} = internal.registerDevframeInstance({\n pid: process.pid,\n // The probe reports the origin that actually answered — a `localhost`\n // bind may only be dialable as `127.0.0.1` or `[::1]` — so its port is\n // the one truly listening, which `config.server.port` is not when the\n // configured port was taken.\n port: Number(new URL(probed.origin).port) || 0,\n origin: probed.origin,\n basePath,\n id: LIT_DEVFRAME_ID,\n name,\n rootDir: process.cwd(),\n // Registering with `mcp: null` is honest rather than useless: the\n // connector surfaces the instance with its own \"MCP disabled\" hint,\n // which beats the instance being invisible.\n mcp: mcpPath === null ? null : {path: mcpPath},\n startedAt: Date.now(),\n });\n return {unregister};\n}\n\n/**\n * Register once the dev server is actually accepting connections. The\n * DevTools `setup()` hook runs during server construction, well before\n * `listen()` resolves, so probing from there always fails to connect — the\n * record has to wait for the port it is about to advertise to be real.\n */\nfunction registerInstanceWhenListening(\n ctx: DevToolsHubContext,\n name: string\n): void {\n const httpServer = ctx.viteServer?.httpServer;\n if (!httpServer) {\n // Middleware mode: no server of our own to advertise.\n warnDiscoveryUnavailable('no HTTP server (middleware mode?)');\n return;\n }\n\n const run = (): void => {\n registerInstance(ctx, name)\n .then((result) => {\n if ('unregister' in result) {\n httpServer.once('close', result.unregister);\n } else {\n warnDiscoveryUnavailable(result.reason);\n }\n })\n .catch((error: unknown) => {\n warnDiscoveryUnavailable(String(error));\n });\n };\n\n if (httpServer.listening) run();\n else httpServer.once('listening', run);\n}\n\n/**\n * The Vite plugin that mounts the Lit devframe on the DevTools hub. A no-op\n * when DevTools is not active: without it nothing calls `devtools.setup()`,\n * so the definition is never installed and the panel simply isn't there.\n */\nexport function createLitDevframePlugin(\n options: CreateLitDevframePluginOptions\n): Plugin {\n const source = new HotTimelineSource();\n // Only known once `setup()` has the dev server, which is after the\n // definition is built -- hence the getter.\n let viteRoot: string | undefined;\n const definition = createLitDevframe({\n source,\n version: options.version,\n features: options.features,\n clientAssets: options.clientAssets,\n sourceRoot: () => viteRoot,\n });\n\n return {\n name: `devframe:${LIT_DEVFRAME_ID}`,\n devtools: {\n // The panel reflects a running page, so there is nothing to mount\n // during `vite build`. A static snapshot goes through\n // `devframe/adapters/build` instead.\n capabilities: {dev: true, build: false},\n async setup(ctx) {\n // Bind before installing: `install()` runs the definition's `setup()`,\n // which attaches to this source, and the dev server is already\n // available on the context by now.\n if (ctx.viteServer) source.bind(ctx.viteServer, ctx);\n viteRoot = ctx.viteServer?.config.root;\n await ctx.install(definition);\n\n // The overlay picker as a palette command with a managed shortcut.\n // Only meaningful when the source overlay is enabled, since that is\n // what draws the picker in the page.\n if (options.features?.()?.sourceOverlay.enabled) {\n ctx.commands?.register?.({\n id: 'lit:overlay:toggle',\n title: 'Pick Lit Element',\n description:\n 'Click to inspect in the Components panel, hold Meta/Ctrl and click to open in your editor',\n icon: 'ph:crosshair-duotone',\n category: 'Lit',\n keybindings: [{key: 'Meta+Shift+E'}],\n handler: () => source.toggleOverlay(),\n });\n }\n\n // Discovery is a convenience on top of a panel that already works,\n // so this never blocks `setup()` and never throws: a failure costs\n // the user the stdio MCP shortcut, and the direct URL still works.\n registerInstanceWhenListening(ctx, definition.name);\n },\n },\n };\n}\n\n/**\n * The page-runtime bridge on its own, for a host that drives its own mount\n * (or a test that wants to observe page traffic without a hub). Bind it to a\n * dev server, then either hand it to {@link createLitDevframe} or\n * {@link TimelineSource.attach} your own sink.\n */\nexport const createHotTimelineSource = (): HotTimelineSource =>\n new HotTimelineSource();\n"]}
|
package/lib/http.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Headers the trust check looks at. Both the open-in-editor endpoint and the
|
|
8
|
+
* timeline/inspector endpoints are local-only dev tooling: only the page the
|
|
9
|
+
* dev server itself served may drive them.
|
|
10
|
+
*/
|
|
11
|
+
export interface TrustHeaders {
|
|
12
|
+
origin?: string;
|
|
13
|
+
host?: string;
|
|
14
|
+
'sec-fetch-site'?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* True when the request demonstrably comes from the dev server's own page.
|
|
18
|
+
*
|
|
19
|
+
* Two independent signals, because neither is present on every request:
|
|
20
|
+
* - `Origin` is sent on CORS-mode fetches and on every non-GET/HEAD request,
|
|
21
|
+
* but NOT on a plain cross-site GET (`<img>`, `<iframe>`, a navigation).
|
|
22
|
+
* - `Sec-Fetch-Site` is sent by Chromium and Firefox on every request and is
|
|
23
|
+
* the signal that covers exactly that gap; `same-origin` and `none` (a
|
|
24
|
+
* user-typed URL) are ours, `cross-site`/`same-site` are not.
|
|
25
|
+
* A request is trusted only when every signal it does carry says same-origin,
|
|
26
|
+
* and at least one of them is present.
|
|
27
|
+
*/
|
|
28
|
+
export declare const isTrustedRequest: (headers: TrustHeaders) => boolean;
|
|
29
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/lib/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,YAAa,YAAY,KAAG,OAgBxD,CAAC"}
|
package/lib/http.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* True when the request demonstrably comes from the dev server's own page.
|
|
8
|
+
*
|
|
9
|
+
* Two independent signals, because neither is present on every request:
|
|
10
|
+
* - `Origin` is sent on CORS-mode fetches and on every non-GET/HEAD request,
|
|
11
|
+
* but NOT on a plain cross-site GET (`<img>`, `<iframe>`, a navigation).
|
|
12
|
+
* - `Sec-Fetch-Site` is sent by Chromium and Firefox on every request and is
|
|
13
|
+
* the signal that covers exactly that gap; `same-origin` and `none` (a
|
|
14
|
+
* user-typed URL) are ours, `cross-site`/`same-site` are not.
|
|
15
|
+
* A request is trusted only when every signal it does carry says same-origin,
|
|
16
|
+
* and at least one of them is present.
|
|
17
|
+
*/
|
|
18
|
+
export const isTrustedRequest = (headers) => {
|
|
19
|
+
const site = headers['sec-fetch-site'];
|
|
20
|
+
if (site !== undefined) {
|
|
21
|
+
if (site !== 'same-origin' && site !== 'none') return false;
|
|
22
|
+
}
|
|
23
|
+
const {origin, host} = headers;
|
|
24
|
+
if (origin !== undefined && origin !== 'null') {
|
|
25
|
+
try {
|
|
26
|
+
if (new URL(origin).host !== host) return false;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
// No `Origin`: trust only when `Sec-Fetch-Site` vouched for it above.
|
|
33
|
+
return site !== undefined;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=http.js.map
|
package/lib/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/lib/http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAqB,EAAW,EAAE;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,MAAM;YAAE,OAAO,KAAK,CAAC;IAC9D,CAAC;IACD,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;IAC/B,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC9C,IAAI,CAAC;YACH,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI;gBAAE,OAAO,KAAK,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,sEAAsE;IACtE,OAAO,IAAI,KAAK,SAAS,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Headers the trust check looks at. Both the open-in-editor endpoint and the\n * timeline/inspector endpoints are local-only dev tooling: only the page the\n * dev server itself served may drive them.\n */\nexport interface TrustHeaders {\n origin?: string;\n host?: string;\n 'sec-fetch-site'?: string;\n}\n\n/**\n * True when the request demonstrably comes from the dev server's own page.\n *\n * Two independent signals, because neither is present on every request:\n * - `Origin` is sent on CORS-mode fetches and on every non-GET/HEAD request,\n * but NOT on a plain cross-site GET (`<img>`, `<iframe>`, a navigation).\n * - `Sec-Fetch-Site` is sent by Chromium and Firefox on every request and is\n * the signal that covers exactly that gap; `same-origin` and `none` (a\n * user-typed URL) are ours, `cross-site`/`same-site` are not.\n * A request is trusted only when every signal it does carry says same-origin,\n * and at least one of them is present.\n */\nexport const isTrustedRequest = (headers: TrustHeaders): boolean => {\n const site = headers['sec-fetch-site'];\n if (site !== undefined) {\n if (site !== 'same-origin' && site !== 'none') return false;\n }\n const {origin, host} = headers;\n if (origin !== undefined && origin !== 'null') {\n try {\n if (new URL(origin).host !== host) return false;\n } catch {\n return false;\n }\n return true;\n }\n // No `Origin`: trust only when `Sec-Fetch-Site` vouched for it above.\n return site !== undefined;\n};\n"]}
|
package/lib/icons.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
export declare const CUBE_ICON = "M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z";
|
|
8
8
|
/** `clock` — Timeline tab. */
|
|
9
9
|
export declare const CLOCK_ICON = "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z";
|
|
10
|
+
/** `notification` — Updates tab. */
|
|
11
|
+
export declare const NOTIFICATION_ICON = "M216,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V56A16,16,0,0,1,48,40h80a8,8,0,0,1,0,16H48V208H200V128a8,8,0,0,1,16,0Zm16-68a36,36,0,1,1-36-36A36,36,0,0,1,232,60Zm-16,0a20,20,0,1,0-20,20A20,20,0,0,0,216,60Z";
|
|
10
12
|
/** `gear` — Settings tab. */
|
|
11
13
|
export declare const GEAR_ICON = "M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z";
|
|
12
14
|
/** `code` — the source overlay's "open in editor" affordance. */
|
package/lib/icons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/lib/icons.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,+BAA+B;AAC/B,eAAO,MAAM,SAAS,mTAC4R,CAAC;AAEnT,8BAA8B;AAC9B,eAAO,MAAM,UAAU,gMACwK,CAAC;AAEhM,oCAAoC;AACpC,eAAO,MAAM,iBAAiB,qNACsL,CAAC;AAErN,6BAA6B;AAC7B,eAAO,MAAM,SAAS,01DACm0D,CAAC;AAE11D,iEAAiE;AACjE,eAAO,MAAM,SAAS,gbAA0a,CAAC;AAEjc,mEAAmE;AACnE,eAAO,MAAM,SAAS,yPAAmP,CAAC;AAE1Q,iDAAiD;AACjD,eAAO,MAAM,UAAU,kfAA4e,CAAC"}
|
package/lib/icons.js
CHANGED
|
@@ -9,15 +9,21 @@
|
|
|
9
9
|
// fill="currentColor"><path d={...}/></svg>; runtime icons are full markup
|
|
10
10
|
// injected as raw HTML.
|
|
11
11
|
/** `cube` — Components tab. */
|
|
12
|
-
export const CUBE_ICON =
|
|
12
|
+
export const CUBE_ICON =
|
|
13
|
+
'M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z';
|
|
13
14
|
/** `clock` — Timeline tab. */
|
|
14
|
-
export const CLOCK_ICON =
|
|
15
|
+
export const CLOCK_ICON =
|
|
16
|
+
'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z';
|
|
17
|
+
/** `notification` — Updates tab. */
|
|
18
|
+
export const NOTIFICATION_ICON =
|
|
19
|
+
'M216,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V56A16,16,0,0,1,48,40h80a8,8,0,0,1,0,16H48V208H200V128a8,8,0,0,1,16,0Zm16-68a36,36,0,1,1-36-36A36,36,0,0,1,232,60Zm-16,0a20,20,0,1,0-20,20A20,20,0,0,0,216,60Z';
|
|
15
20
|
/** `gear` — Settings tab. */
|
|
16
|
-
export const GEAR_ICON =
|
|
21
|
+
export const GEAR_ICON =
|
|
22
|
+
'M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z';
|
|
17
23
|
/** `code` — the source overlay's "open in editor" affordance. */
|
|
18
24
|
export const CODE_ICON = `<svg viewBox="0 0 256 256" aria-hidden="true"><path d="M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z"></path></svg>`;
|
|
19
25
|
/** `copy-simple` — the source overlay's "copy path" affordance. */
|
|
20
26
|
export const COPY_ICON = `<svg viewBox="0 0 256 256" aria-hidden="true"><path d="M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z"></path></svg>`;
|
|
21
27
|
/** `flame` — the HMR update indicator's mark. */
|
|
22
28
|
export const FLAME_ICON = `<svg viewBox="0 0 256 256" aria-hidden="true"><path d="M183.89,153.34a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68ZM216,144a88,88,0,0,1-176,0c0-27.92,11-56.47,32.66-84.85a8,8,0,0,1,11.93-.89l24.12,23.41,22-60.41a8,8,0,0,1,12.63-3.41C165.21,36,216,84.55,216,144Zm-16,0c0-46.09-35.79-85.92-58.21-106.33L119.52,98.74a8,8,0,0,1-13.09,3L80.06,76.16C64.09,99.21,56,122,56,144a72,72,0,0,0,144,0Z"></path></svg>`;
|
|
23
|
-
//# sourceMappingURL=icons.js.map
|
|
29
|
+
//# sourceMappingURL=icons.js.map
|
package/lib/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/lib/icons.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,0EAA0E;AAC1E,qEAAqE;AACrE,oEAAoE;AACpE,2EAA2E;AAC3E,wBAAwB;AAExB,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GACpB,gTAAgT,CAAC;AAEnT,8BAA8B;AAC9B,MAAM,CAAC,MAAM,UAAU,GACrB,6LAA6L,CAAC;AAEhM,oCAAoC;AACpC,MAAM,CAAC,MAAM,iBAAiB,GAC5B,kNAAkN,CAAC;AAErN,6BAA6B;AAC7B,MAAM,CAAC,MAAM,SAAS,GACpB,u1DAAu1D,CAAC;AAE11D,iEAAiE;AACjE,MAAM,CAAC,MAAM,SAAS,GAAG,uaAAua,CAAC;AAEjc,mEAAmE;AACnE,MAAM,CAAC,MAAM,SAAS,GAAG,gPAAgP,CAAC;AAE1Q,iDAAiD;AACjD,MAAM,CAAC,MAAM,UAAU,GAAG,yeAAye,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// Phosphor Icons (https://phosphoricons.com, MIT) inlined so the devtools\n// modules stay self-contained with no extra icon library dependency.\n// Panel icons are SVG path data used via <svg viewBox=\"0 0 256 256\"\n// fill=\"currentColor\"><path d={...}/></svg>; runtime icons are full markup\n// injected as raw HTML.\n\n/** `cube` — Components tab. */\nexport const CUBE_ICON =\n 'M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z';\n\n/** `clock` — Timeline tab. */\nexport const CLOCK_ICON =\n 'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z';\n\n/** `notification` — Updates tab. */\nexport const NOTIFICATION_ICON =\n 'M216,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V56A16,16,0,0,1,48,40h80a8,8,0,0,1,0,16H48V208H200V128a8,8,0,0,1,16,0Zm16-68a36,36,0,1,1-36-36A36,36,0,0,1,232,60Zm-16,0a20,20,0,1,0-20,20A20,20,0,0,0,216,60Z';\n\n/** `gear` — Settings tab. */\nexport const GEAR_ICON =\n 'M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z';\n\n/** `code` — the source overlay's \"open in editor\" affordance. */\nexport const CODE_ICON = `<svg viewBox=\"0 0 256 256\" aria-hidden=\"true\"><path d=\"M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z\"></path></svg>`;\n\n/** `copy-simple` — the source overlay's \"copy path\" affordance. */\nexport const COPY_ICON = `<svg viewBox=\"0 0 256 256\" aria-hidden=\"true\"><path d=\"M184,64H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V72A8,8,0,0,0,184,64Zm-8,144H48V80H176ZM224,40V184a8,8,0,0,1-16,0V48H72a8,8,0,0,1,0-16H216A8,8,0,0,1,224,40Z\"></path></svg>`;\n\n/** `flame` — the HMR update indicator's mark. */\nexport const FLAME_ICON = `<svg viewBox=\"0 0 256 256\" aria-hidden=\"true\"><path d=\"M183.89,153.34a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68ZM216,144a88,88,0,0,1-176,0c0-27.92,11-56.47,32.66-84.85a8,8,0,0,1,11.93-.89l24.12,23.41,22-60.41a8,8,0,0,1,12.63-3.41C165.21,36,216,84.55,216,144Zm-16,0c0-46.09-35.79-85.92-58.21-106.33L119.52,98.74a8,8,0,0,1-13.09,3L80.06,76.16C64.09,99.21,56,122,56,144a72,72,0,0,0,144,0Z\"></path></svg>`;\n"]}
|
package/lib/plugin.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
6
|
import { type Plugin } from 'vite';
|
|
7
|
+
import { type TrustHeaders } from './http.js';
|
|
7
8
|
import type { SourceOverlayOptions } from './types.js';
|
|
8
9
|
/**
|
|
9
10
|
* On-page HMR feedback: a small pulsing indicator in the corner of the host
|
|
@@ -121,10 +122,8 @@ export interface ResolvedOptions {
|
|
|
121
122
|
export declare const resolveOptions: (options: LitPluginOptions, env: Record<string, string>) => ResolvedOptions;
|
|
122
123
|
export declare const createOpenInEditorMiddleware: (allowedRoots: readonly string[]) => (req: {
|
|
123
124
|
url?: string;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
host?: string;
|
|
127
|
-
};
|
|
125
|
+
method?: string;
|
|
126
|
+
headers?: TrustHeaders;
|
|
128
127
|
}, res: {
|
|
129
128
|
statusCode: number;
|
|
130
129
|
end: (msg: string) => void;
|
|
@@ -141,6 +140,18 @@ export declare const createOpenInEditorMiddleware: (allowedRoots: readonly strin
|
|
|
141
140
|
* default.
|
|
142
141
|
*/
|
|
143
142
|
export declare const litCssQueries: (getCssSheetBuild?: () => CssSheetBuild) => Plugin;
|
|
143
|
+
/**
|
|
144
|
+
* The public timeline API virtual module, served in dev and build alike:
|
|
145
|
+
* app code importing it must keep building under `vite build`, where the HMR
|
|
146
|
+
* plugin doesn't apply. While these hooks lived on that serve-only plugin,
|
|
147
|
+
* nothing claimed the specifier during a build and the bundler failed to
|
|
148
|
+
* resolve it.
|
|
149
|
+
*
|
|
150
|
+
* `getTimeline` is a getter, not a value: `litPlugin()` re-resolves its
|
|
151
|
+
* options against the loaded env in a `config` hook, which runs after the
|
|
152
|
+
* plugin array is built.
|
|
153
|
+
*/
|
|
154
|
+
export declare const litTimelineVirtual: (getTimeline?: () => boolean) => Plugin;
|
|
144
155
|
/**
|
|
145
156
|
* Vite plugin set providing HMR, CSS helpers, and Lightning CSS processing
|
|
146
157
|
* for Lit projects.
|
package/lib/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/lib/plugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAA2B,KAAK,MAAM,EAAC,MAAM,MAAM,CAAC;AAE3D,OAAO,EAAmB,KAAK,YAAY,EAAC,MAAM,WAAW,CAAC;AAG9D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAMrD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAEnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CAC3C;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC;AASrE;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,oBAAoB,CAAC;IAE/C;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,cA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