@copilotkit/web-inspector 1.60.0 → 1.60.2
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/dist/index.cjs +68 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +68 -19
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +68 -19
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/web-inspector.spec.ts +118 -5
- package/src/index.ts +89 -21
package/dist/index.umd.js
CHANGED
|
@@ -2416,6 +2416,10 @@ ${(0, lit_directives_unsafe_html_js.unsafeHTML)(highlightedJson(event.payload))}
|
|
|
2416
2416
|
this.requestUpdate();
|
|
2417
2417
|
}
|
|
2418
2418
|
};
|
|
2419
|
+
this.handleDismissAnnouncementPreview = (event) => {
|
|
2420
|
+
event.stopPropagation();
|
|
2421
|
+
this.handleDismissAnnouncement();
|
|
2422
|
+
};
|
|
2419
2423
|
this.handleDismissAnnouncement = () => {
|
|
2420
2424
|
this.trackBannerClickedOnce({ cta: "dismiss" });
|
|
2421
2425
|
this.markAnnouncementSeen();
|
|
@@ -3157,8 +3161,9 @@ ${argsString}</pre
|
|
|
3157
3161
|
}
|
|
3158
3162
|
renderButton() {
|
|
3159
3163
|
return lit.html`
|
|
3160
|
-
<button
|
|
3161
|
-
|
|
3164
|
+
<div class="console-button-wrapper">
|
|
3165
|
+
<button
|
|
3166
|
+
class=${[
|
|
3162
3167
|
"console-button",
|
|
3163
3168
|
"group",
|
|
3164
3169
|
"relative",
|
|
@@ -3190,24 +3195,25 @@ ${argsString}</pre
|
|
|
3190
3195
|
"select-none",
|
|
3191
3196
|
this.isDragging ? "cursor-grabbing" : "cursor-grab"
|
|
3192
3197
|
].join(" ")}
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3198
|
+
type="button"
|
|
3199
|
+
aria-label="Web Inspector"
|
|
3200
|
+
data-drag-context="button"
|
|
3201
|
+
data-dragging=${this.isDragging && this.pointerContext === "button" ? "true" : "false"}
|
|
3202
|
+
@pointerdown=${this.handlePointerDown}
|
|
3203
|
+
@pointermove=${this.handlePointerMove}
|
|
3204
|
+
@pointerup=${this.handlePointerUp}
|
|
3205
|
+
@pointercancel=${this.handlePointerCancel}
|
|
3206
|
+
@click=${this.handleButtonClick}
|
|
3207
|
+
>
|
|
3208
|
+
<img
|
|
3209
|
+
src=${inspector_logo_icon_default}
|
|
3210
|
+
alt="Inspector logo"
|
|
3211
|
+
class="h-5 w-auto"
|
|
3212
|
+
loading="lazy"
|
|
3213
|
+
/>
|
|
3214
|
+
</button>
|
|
3203
3215
|
${this.renderAnnouncementPreview()}
|
|
3204
|
-
|
|
3205
|
-
src=${inspector_logo_icon_default}
|
|
3206
|
-
alt="Inspector logo"
|
|
3207
|
-
class="h-5 w-auto"
|
|
3208
|
-
loading="lazy"
|
|
3209
|
-
/>
|
|
3210
|
-
</button>
|
|
3216
|
+
</div>
|
|
3211
3217
|
`;
|
|
3212
3218
|
}
|
|
3213
3219
|
renderWindow() {
|
|
@@ -5069,6 +5075,14 @@ ${prettyEvent}</pre
|
|
|
5069
5075
|
@click=${() => this.handleAnnouncementPreviewClick()}
|
|
5070
5076
|
>
|
|
5071
5077
|
<span>${this.announcementPreviewText}</span>
|
|
5078
|
+
<button
|
|
5079
|
+
type="button"
|
|
5080
|
+
class="announcement-preview__dismiss"
|
|
5081
|
+
aria-label="Dismiss announcement"
|
|
5082
|
+
@click=${this.handleDismissAnnouncementPreview}
|
|
5083
|
+
>
|
|
5084
|
+
${this.renderIcon("X")}
|
|
5085
|
+
</button>
|
|
5072
5086
|
<span class="announcement-preview__arrow"></span>
|
|
5073
5087
|
</div>`;
|
|
5074
5088
|
}
|
|
@@ -5206,6 +5220,11 @@ ${prettyEvent}</pre
|
|
|
5206
5220
|
transition: transform 300ms ease;
|
|
5207
5221
|
}
|
|
5208
5222
|
|
|
5223
|
+
.console-button-wrapper {
|
|
5224
|
+
position: relative;
|
|
5225
|
+
display: inline-flex;
|
|
5226
|
+
}
|
|
5227
|
+
|
|
5209
5228
|
.console-button {
|
|
5210
5229
|
transition:
|
|
5211
5230
|
transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
@@ -5333,6 +5352,36 @@ ${prettyEvent}</pre
|
|
|
5333
5352
|
box-shadow: -6px 6px 10px rgba(1, 5, 7, 0.08);
|
|
5334
5353
|
}
|
|
5335
5354
|
|
|
5355
|
+
.announcement-preview__dismiss {
|
|
5356
|
+
flex: none;
|
|
5357
|
+
margin-top: -1px;
|
|
5358
|
+
width: 20px;
|
|
5359
|
+
height: 20px;
|
|
5360
|
+
padding: 0;
|
|
5361
|
+
appearance: none;
|
|
5362
|
+
background: none;
|
|
5363
|
+
border: 0;
|
|
5364
|
+
display: inline-flex;
|
|
5365
|
+
align-items: center;
|
|
5366
|
+
justify-content: center;
|
|
5367
|
+
border-radius: 6px;
|
|
5368
|
+
color: #838389;
|
|
5369
|
+
cursor: pointer;
|
|
5370
|
+
transition:
|
|
5371
|
+
background 120ms ease,
|
|
5372
|
+
color 120ms ease;
|
|
5373
|
+
}
|
|
5374
|
+
|
|
5375
|
+
.announcement-preview__dismiss:hover {
|
|
5376
|
+
background: rgba(0, 0, 0, 0.06);
|
|
5377
|
+
color: #010507;
|
|
5378
|
+
}
|
|
5379
|
+
|
|
5380
|
+
.announcement-preview__dismiss:focus-visible {
|
|
5381
|
+
outline: 2px solid #bec2ff;
|
|
5382
|
+
outline-offset: 1px;
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5336
5385
|
.announcement-dismiss {
|
|
5337
5386
|
background: none;
|
|
5338
5387
|
border: none;
|