@oddsquad/vite-plugin-lit 0.2.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/LICENSE +28 -0
- package/README.md +157 -0
- package/bin.mjs +154 -0
- package/client.d.ts +61 -0
- package/dist/client/assets/browser-agent-rpc-BXhoSh1z-CdtPhBL-.js +69 -0
- package/dist/client/assets/browser-agent-rpc-BXhoSh1z-CdtPhBL-.js.map +1 -0
- package/dist/client/assets/flow-DK8vmxvN.js +745 -0
- package/dist/client/assets/flow-DK8vmxvN.js.map +1 -0
- package/dist/client/assets/index-DVe6M4HV.js +10614 -0
- package/dist/client/assets/index-DVe6M4HV.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 +77 -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 +292 -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/options.d.ts +131 -0
- package/lib/options.d.ts.map +1 -0
- package/lib/options.js +128 -0
- package/lib/options.js.map +1 -0
- package/lib/plugin.d.ts +6 -137
- package/lib/plugin.d.ts.map +1 -1
- package/lib/plugin.js +280 -677
- package/lib/plugin.js.map +1 -1
- package/lib/plugins/css-literals.d.ts +15 -0
- package/lib/plugins/css-literals.d.ts.map +1 -0
- package/lib/plugins/css-literals.js +154 -0
- package/lib/plugins/css-literals.js.map +1 -0
- package/lib/plugins/css-queries.d.ts +20 -0
- package/lib/plugins/css-queries.d.ts.map +1 -0
- package/lib/plugins/css-queries.js +139 -0
- package/lib/plugins/css-queries.js.map +1 -0
- package/lib/plugins/open-in-editor.d.ts +16 -0
- package/lib/plugins/open-in-editor.d.ts.map +1 -0
- package/lib/plugins/open-in-editor.js +91 -0
- package/lib/plugins/open-in-editor.js.map +1 -0
- package/lib/plugins/shared.d.ts +13 -0
- package/lib/plugins/shared.d.ts.map +1 -0
- package/lib/plugins/shared.js +23 -0
- package/lib/plugins/shared.js.map +1 -0
- package/lib/plugins/timeline-virtual.d.ts +19 -0
- package/lib/plugins/timeline-virtual.d.ts.map +1 -0
- package/lib/plugins/timeline-virtual.js +53 -0
- package/lib/plugins/timeline-virtual.js.map +1 -0
- package/lib/runtime/css.d.ts +2 -2
- package/lib/runtime/css.d.ts.map +1 -1
- package/lib/runtime/css.js +41 -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 +230 -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 +359 -355
- 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 +47 -33
- 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 +2 -2
- package/lib/runtime/timeline/public-api.d.ts.map +1 -1
- package/lib/runtime/timeline/public-api.js +11 -11
- package/lib/runtime/timeline/public-api.js.map +1 -1
- package/lib/runtime/timeline/render.d.ts +15 -6
- package/lib/runtime/timeline/render.d.ts.map +1 -1
- package/lib/runtime/timeline/render.js +212 -78
- 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/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 +80 -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 +23 -1
- package/types/timeline.d.ts.map +1 -1
- package/types/timeline.js +2 -0
- package/types/timeline.js.map +1 -1
- package/lib/timeline-plugin.d.ts +0 -72
- package/lib/timeline-plugin.d.ts.map +0 -1
- package/lib/timeline-plugin.js +0 -376
- package/lib/timeline-plugin.js.map +0 -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
package/lib/segmented-tabs.js
CHANGED
|
@@ -3,15 +3,28 @@
|
|
|
3
3
|
* Copyright 2026 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
var __decorate =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
var __decorate =
|
|
7
|
+
(this && this.__decorate) ||
|
|
8
|
+
function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length,
|
|
10
|
+
r =
|
|
11
|
+
c < 3
|
|
12
|
+
? target
|
|
13
|
+
: desc === null
|
|
14
|
+
? (desc = Object.getOwnPropertyDescriptor(target, key))
|
|
15
|
+
: desc,
|
|
16
|
+
d;
|
|
17
|
+
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
18
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
+
else
|
|
20
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
21
|
+
if ((d = decorators[i]))
|
|
22
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23
|
+
return (c > 3 && r && Object.defineProperty(target, key, r), r);
|
|
24
|
+
};
|
|
25
|
+
import {LitElement, html, css, nothing} from 'lit';
|
|
26
|
+
import {customElement, property} from 'lit/decorators.js';
|
|
27
|
+
import {tokens} from './tokens.js';
|
|
15
28
|
/**
|
|
16
29
|
* Inline segmented tab control. Renders a horizontal row of text-only tabs
|
|
17
30
|
* with the active one highlighted by the accent color.
|
|
@@ -19,111 +32,127 @@ import { tokens } from './tokens.js';
|
|
|
19
32
|
* Matches the SegmentedTabs spec from the Lit Design System devtools kit.
|
|
20
33
|
*/
|
|
21
34
|
let SegmentedTabs = class SegmentedTabs extends LitElement {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var(--lit-devtools-
|
|
47
|
-
|
|
48
|
-
var(--lit-devtools-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
35
|
+
static {
|
|
36
|
+
this.styles = [
|
|
37
|
+
tokens,
|
|
38
|
+
css`
|
|
39
|
+
:host {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: var(--lit-devtools-space-1);
|
|
42
|
+
align-self: stretch;
|
|
43
|
+
}
|
|
44
|
+
button {
|
|
45
|
+
appearance: none;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: var(--lit-devtools-space-2);
|
|
49
|
+
border: 0;
|
|
50
|
+
background: none;
|
|
51
|
+
font: inherit;
|
|
52
|
+
color: var(--lit-devtools-text-muted);
|
|
53
|
+
padding: 0 var(--lit-devtools-space-5);
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
border-bottom: 2px solid transparent;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
transition:
|
|
58
|
+
color var(--lit-devtools-dur-fast) var(--lit-devtools-ease-standard),
|
|
59
|
+
border-color var(--lit-devtools-dur-fast)
|
|
60
|
+
var(--lit-devtools-ease-standard),
|
|
61
|
+
background var(--lit-devtools-dur-fast)
|
|
62
|
+
var(--lit-devtools-ease-standard);
|
|
63
|
+
}
|
|
64
|
+
button:hover {
|
|
65
|
+
color: var(--lit-devtools-text);
|
|
66
|
+
background: var(--lit-devtools-surface-hover);
|
|
67
|
+
}
|
|
68
|
+
button.active {
|
|
69
|
+
color: var(--lit-devtools-accent);
|
|
70
|
+
border-bottom-color: var(--lit-devtools-accent);
|
|
71
|
+
}
|
|
72
|
+
button:focus-visible {
|
|
73
|
+
outline: 2px solid var(--lit-devtools-accent-ring);
|
|
74
|
+
outline-offset: -2px;
|
|
75
|
+
}
|
|
76
|
+
button svg {
|
|
77
|
+
width: 18px;
|
|
78
|
+
height: 18px;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
}
|
|
81
|
+
.badge {
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
min-width: 16px;
|
|
84
|
+
padding: 0 var(--lit-devtools-space-1);
|
|
85
|
+
border-radius: var(--lit-devtools-radius-pill);
|
|
86
|
+
background: var(--lit-devtools-error-soft);
|
|
87
|
+
color: var(--lit-devtools-error);
|
|
88
|
+
font-size: var(--lit-devtools-text-xs);
|
|
89
|
+
line-height: 16px;
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
92
|
+
:host([size='sm']) button {
|
|
93
|
+
font-size: var(--lit-devtools-text-xs);
|
|
94
|
+
padding: 0 var(--lit-devtools-space-4);
|
|
95
|
+
}
|
|
96
|
+
:host([size='md']) button,
|
|
97
|
+
:host(:not([size])) button {
|
|
98
|
+
font-size: var(--lit-devtools-text-sm);
|
|
99
|
+
padding: 0 var(--lit-devtools-space-5);
|
|
100
|
+
}
|
|
101
|
+
`,
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
constructor() {
|
|
105
|
+
super();
|
|
106
|
+
this.items = [];
|
|
107
|
+
this.value = '';
|
|
108
|
+
this.size = 'md';
|
|
109
|
+
}
|
|
110
|
+
_select(id) {
|
|
111
|
+
this.value = id;
|
|
112
|
+
this.dispatchEvent(
|
|
113
|
+
new CustomEvent('change', {
|
|
114
|
+
detail: {value: id},
|
|
115
|
+
bubbles: true,
|
|
116
|
+
composed: true,
|
|
117
|
+
})
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
return html`
|
|
122
|
+
${this.items.map(
|
|
123
|
+
(item) => html`
|
|
95
124
|
<button
|
|
96
125
|
role="tab"
|
|
97
126
|
aria-selected=${item.id === this.value}
|
|
98
127
|
class=${item.id === this.value ? 'active' : ''}
|
|
99
128
|
@click=${() => this._select(item.id)}
|
|
100
129
|
>
|
|
101
|
-
${
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
130
|
+
${
|
|
131
|
+
item.icon
|
|
132
|
+
? html`<svg
|
|
133
|
+
viewBox="0 0 256 256"
|
|
134
|
+
fill="currentColor"
|
|
135
|
+
aria-hidden="true"
|
|
136
|
+
>
|
|
137
|
+
<path d=${item.icon} />
|
|
138
|
+
</svg>`
|
|
139
|
+
: nothing
|
|
140
|
+
}
|
|
110
141
|
${item.label}
|
|
142
|
+
${
|
|
143
|
+
item.badge
|
|
144
|
+
? html`<span class="badge">${item.badge}</span>`
|
|
145
|
+
: nothing
|
|
146
|
+
}
|
|
111
147
|
</button>
|
|
112
|
-
`
|
|
148
|
+
`
|
|
149
|
+
)}
|
|
113
150
|
`;
|
|
114
|
-
|
|
151
|
+
}
|
|
115
152
|
};
|
|
116
|
-
__decorate([
|
|
117
|
-
|
|
118
|
-
], SegmentedTabs.prototype,
|
|
119
|
-
__decorate([
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
__decorate([
|
|
123
|
-
property()
|
|
124
|
-
], SegmentedTabs.prototype, "size", void 0);
|
|
125
|
-
SegmentedTabs = __decorate([
|
|
126
|
-
customElement('segmented-tabs')
|
|
127
|
-
], SegmentedTabs);
|
|
128
|
-
export { SegmentedTabs };
|
|
129
|
-
//# sourceMappingURL=segmented-tabs.js.map
|
|
153
|
+
__decorate([property({type: Array})], SegmentedTabs.prototype, 'items', void 0);
|
|
154
|
+
__decorate([property()], SegmentedTabs.prototype, 'value', void 0);
|
|
155
|
+
__decorate([property()], SegmentedTabs.prototype, 'size', void 0);
|
|
156
|
+
SegmentedTabs = __decorate([customElement('segmented-tabs')], SegmentedTabs);
|
|
157
|
+
export {SegmentedTabs};
|
|
158
|
+
//# sourceMappingURL=segmented-tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented-tabs.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"segmented-tabs.js","sourceRoot":"","sources":["../src/lib/segmented-tabs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AACnD,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAYnC;;;;;GAKG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;aAC3B,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DF;KACF,AAlEqB,CAkEpB;IAQF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEO,OAAO,CAAC,EAAU;QACxB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC;YACnB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,KAAK,CAAC,GAAG,CACd,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;4BAGM,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK;oBAC9B,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;qBACrC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;;cAGlC,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAA;;;;;8BAKQ,IAAI,CAAC,IAAI;yBACd;YACT,CAAC,CAAC,OACN;cACE,IAAI,CAAC,KAAK;cAEV,IAAI,CAAC,KAAK;YACR,CAAC,CAAC,IAAI,CAAA,uBAAuB,IAAI,CAAC,KAAK,SAAS;YAChD,CAAC,CAAC,OACN;;SAEH,CACF;KACF,CAAC;IACJ,CAAC;CACF,CAAA;AAxDkC;IAAhC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;4CAA0B;AAE9B;IAAnB,QAAQ,EAAE;4CAAuB;AAEd;IAAnB,QAAQ,EAAE;2CAA0B;AAzE1B,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA6HzB","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {LitElement, html, css, nothing} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {tokens} from './tokens.js';\n\nexport interface TabItem {\n id: string;\n label: string;\n icon?: string;\n /** Optional count pill trailing the label. Hidden when absent or zero. */\n badge?: number;\n}\n\nexport type SegTabSize = 'sm' | 'md';\n\n/**\n * Inline segmented tab control. Renders a horizontal row of text-only tabs\n * with the active one highlighted by the accent color.\n *\n * Matches the SegmentedTabs spec from the Lit Design System devtools kit.\n */\n@customElement('segmented-tabs')\nexport class SegmentedTabs extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: flex;\n gap: var(--lit-devtools-space-1);\n align-self: stretch;\n }\n button {\n appearance: none;\n display: flex;\n align-items: center;\n gap: var(--lit-devtools-space-2);\n border: 0;\n background: none;\n font: inherit;\n color: var(--lit-devtools-text-muted);\n padding: 0 var(--lit-devtools-space-5);\n cursor: pointer;\n border-bottom: 2px solid transparent;\n white-space: nowrap;\n transition:\n color var(--lit-devtools-dur-fast) var(--lit-devtools-ease-standard),\n border-color var(--lit-devtools-dur-fast)\n var(--lit-devtools-ease-standard),\n background var(--lit-devtools-dur-fast)\n var(--lit-devtools-ease-standard);\n }\n button:hover {\n color: var(--lit-devtools-text);\n background: var(--lit-devtools-surface-hover);\n }\n button.active {\n color: var(--lit-devtools-accent);\n border-bottom-color: var(--lit-devtools-accent);\n }\n button:focus-visible {\n outline: 2px solid var(--lit-devtools-accent-ring);\n outline-offset: -2px;\n }\n button svg {\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n }\n .badge {\n flex-shrink: 0;\n min-width: 16px;\n padding: 0 var(--lit-devtools-space-1);\n border-radius: var(--lit-devtools-radius-pill);\n background: var(--lit-devtools-error-soft);\n color: var(--lit-devtools-error);\n font-size: var(--lit-devtools-text-xs);\n line-height: 16px;\n text-align: center;\n }\n :host([size='sm']) button {\n font-size: var(--lit-devtools-text-xs);\n padding: 0 var(--lit-devtools-space-4);\n }\n :host([size='md']) button,\n :host(:not([size])) button {\n font-size: var(--lit-devtools-text-sm);\n padding: 0 var(--lit-devtools-space-5);\n }\n `,\n ];\n\n @property({type: Array}) declare items: TabItem[];\n\n @property() declare value: string;\n\n @property() declare size: SegTabSize;\n\n constructor() {\n super();\n this.items = [];\n this.value = '';\n this.size = 'md';\n }\n\n private _select(id: string): void {\n this.value = id;\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: {value: id},\n bubbles: true,\n composed: true,\n })\n );\n }\n\n override render() {\n return html`\n ${this.items.map(\n (item) => html`\n <button\n role=\"tab\"\n aria-selected=${item.id === this.value}\n class=${item.id === this.value ? 'active' : ''}\n @click=${() => this._select(item.id)}\n >\n ${\n item.icon\n ? html`<svg\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=${item.icon} />\n </svg>`\n : nothing\n }\n ${item.label}\n ${\n item.badge\n ? html`<span class=\"badge\">${item.badge}</span>`\n : nothing\n }\n </button>\n `\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'segmented-tabs': SegmentedTabs;\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import type { FeatureSettings } from '../types/timeline.js';
|
|
7
|
+
import type { SessionSnapshot } from '../types/snapshot.js';
|
|
8
|
+
/** What {@link buildSnapshot} reports back to whoever asked for the export. */
|
|
9
|
+
export interface SnapshotBuildResult {
|
|
10
|
+
outDir: string;
|
|
11
|
+
events: number;
|
|
12
|
+
components: number;
|
|
13
|
+
details: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Write `snapshot` to `outDir` as a self-contained static panel.
|
|
17
|
+
*
|
|
18
|
+
* The build adapter is imported dynamically: it reaches for `node:fs`, and
|
|
19
|
+
* `definition.ts` is deliberately framework- and environment-neutral, so a
|
|
20
|
+
* static import would drag filesystem code into every context that merely
|
|
21
|
+
* builds the definition.
|
|
22
|
+
*/
|
|
23
|
+
export declare const buildSnapshot: (snapshot: SessionSnapshot, options: {
|
|
24
|
+
outDir: string;
|
|
25
|
+
features: FeatureSettings | null;
|
|
26
|
+
clientAssets?: string;
|
|
27
|
+
}) => Promise<SnapshotBuildResult>;
|
|
28
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../src/lib/snapshot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAE1D,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,aACd,eAAe,WAChB;IACP,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KACA,OAAO,CAAC,mBAAmB,CA0B7B,CAAC"}
|
package/lib/snapshot.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Freezing a live session into a static panel someone else can open.
|
|
8
|
+
*
|
|
9
|
+
* Capture needs no transport: by the time a developer wants to export, the
|
|
10
|
+
* node side is already holding the timeline buffer, the component tree, the
|
|
11
|
+
* details of everything that was inspected, and the HMR incompatibility list.
|
|
12
|
+
* The export reads its own state and hands it to devframe's build adapter as
|
|
13
|
+
* a second, replaying definition.
|
|
14
|
+
*
|
|
15
|
+
* The output is a plain directory: the panel SPA, a `__connection.json` that
|
|
16
|
+
* says `backend: 'static'`, and the baked RPC dump. It is mount-path agnostic,
|
|
17
|
+
* so it works opened from a file server at any base — zip it onto an issue.
|
|
18
|
+
*/
|
|
19
|
+
import {createLitDevframe} from './devframe/definition.js';
|
|
20
|
+
import {createNullSource} from './devframe/source.js';
|
|
21
|
+
/** Count the nodes of a tree, so the caller can say what it exported. */
|
|
22
|
+
const countNodes = (nodes) =>
|
|
23
|
+
nodes.reduce((total, node) => total + 1 + countNodes(node.children), 0);
|
|
24
|
+
/**
|
|
25
|
+
* Write `snapshot` to `outDir` as a self-contained static panel.
|
|
26
|
+
*
|
|
27
|
+
* The build adapter is imported dynamically: it reaches for `node:fs`, and
|
|
28
|
+
* `definition.ts` is deliberately framework- and environment-neutral, so a
|
|
29
|
+
* static import would drag filesystem code into every context that merely
|
|
30
|
+
* builds the definition.
|
|
31
|
+
*/
|
|
32
|
+
export const buildSnapshot = async (snapshot, options) => {
|
|
33
|
+
const {createBuild} = await import('devframe/adapters/build');
|
|
34
|
+
const definition = createLitDevframe({
|
|
35
|
+
// Nothing to attach to: the page this session describes is gone, and
|
|
36
|
+
// every answer the frozen panel needs is already in `replay`.
|
|
37
|
+
source: createNullSource(),
|
|
38
|
+
version: snapshot.version,
|
|
39
|
+
features: () => options.features,
|
|
40
|
+
clientAssets: options.clientAssets,
|
|
41
|
+
replay: snapshot,
|
|
42
|
+
});
|
|
43
|
+
await createBuild(definition, {
|
|
44
|
+
outDir: options.outDir,
|
|
45
|
+
// The Vite plugin declares `capabilities.build: false` because there is
|
|
46
|
+
// nothing to render during `vite build` — a *recorded* session is the one
|
|
47
|
+
// case where a build does make sense.
|
|
48
|
+
force: true,
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
outDir: options.outDir,
|
|
52
|
+
events: snapshot.events.length,
|
|
53
|
+
components: countNodes(snapshot.roots),
|
|
54
|
+
details: snapshot.details.length,
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../src/lib/snapshot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAYtD,yEAAyE;AACzE,MAAM,UAAU,GAAG,CAAC,KAA+B,EAAU,EAAE,CAC7D,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,QAAyB,EACzB,OAIC,EAC6B,EAAE;IAChC,MAAM,EAAC,WAAW,EAAC,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,iBAAiB,CAAC;QACnC,qEAAqE;QACrE,8DAA8D;QAC9D,MAAM,EAAE,gBAAgB,EAAE;QAC1B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ;QAChC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;IAEH,MAAM,WAAW,CAAC,UAAU,EAAE;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,wEAAwE;QACxE,0EAA0E;QAC1E,sCAAsC;QACtC,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM;QAC9B,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QACtC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;KACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Freezing a live session into a static panel someone else can open.\n *\n * Capture needs no transport: by the time a developer wants to export, the\n * node side is already holding the timeline buffer, the component tree, the\n * details of everything that was inspected, and the HMR incompatibility list.\n * The export reads its own state and hands it to devframe's build adapter as\n * a second, replaying definition.\n *\n * The output is a plain directory: the panel SPA, a `__connection.json` that\n * says `backend: 'static'`, and the baked RPC dump. It is mount-path agnostic,\n * so it works opened from a file server at any base — zip it onto an issue.\n */\n\nimport {createLitDevframe} from './devframe/definition.js';\nimport {createNullSource} from './devframe/source.js';\nimport type {FeatureSettings} from '../types/timeline.js';\nimport type {SessionSnapshot} from '../types/snapshot.js';\n\n/** What {@link buildSnapshot} reports back to whoever asked for the export. */\nexport interface SnapshotBuildResult {\n outDir: string;\n events: number;\n components: number;\n details: number;\n}\n\n/** Count the nodes of a tree, so the caller can say what it exported. */\nconst countNodes = (nodes: SessionSnapshot['roots']): number =>\n nodes.reduce((total, node) => total + 1 + countNodes(node.children), 0);\n\n/**\n * Write `snapshot` to `outDir` as a self-contained static panel.\n *\n * The build adapter is imported dynamically: it reaches for `node:fs`, and\n * `definition.ts` is deliberately framework- and environment-neutral, so a\n * static import would drag filesystem code into every context that merely\n * builds the definition.\n */\nexport const buildSnapshot = async (\n snapshot: SessionSnapshot,\n options: {\n outDir: string;\n features: FeatureSettings | null;\n clientAssets?: string;\n }\n): Promise<SnapshotBuildResult> => {\n const {createBuild} = await import('devframe/adapters/build');\n const definition = createLitDevframe({\n // Nothing to attach to: the page this session describes is gone, and\n // every answer the frozen panel needs is already in `replay`.\n source: createNullSource(),\n version: snapshot.version,\n features: () => options.features,\n clientAssets: options.clientAssets,\n replay: snapshot,\n });\n\n await createBuild(definition, {\n outDir: options.outDir,\n // The Vite plugin declares `capabilities.build: false` because there is\n // nothing to render during `vite build` — a *recorded* session is the one\n // case where a build does make sense.\n force: true,\n });\n\n return {\n outDir: options.outDir,\n events: snapshot.events.length,\n components: countNodes(snapshot.roots),\n details: snapshot.details.length,\n };\n};\n"]}
|
package/lib/source-meta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-meta.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"source-meta.d.ts","sourceRoot":"","sources":["../src/lib/source-meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,yEAAyE;AACzE,eAAO,MAAM,eAAe,qCAAqC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,eAAe,mDAAqC,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,uDAAuD;AACvD,eAAO,MAAM,YAAY,SAAU,MAAM,SAAS,MAAM,KAAG,MAClB,CAAC;AA8I1C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,SACrB,MAAM,YACF,MAAM,MACZ,WAAW,KACd,OAiEF,CAAC"}
|