@copilotkit/web-inspector 1.60.1 → 1.61.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/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 +2 -2
- package/src/__tests__/web-inspector.spec.ts +118 -5
- package/src/index.ts +89 -21
package/dist/index.cjs
CHANGED
|
@@ -2126,6 +2126,10 @@ var WebInspectorElement = class extends lit.LitElement {
|
|
|
2126
2126
|
this.requestUpdate();
|
|
2127
2127
|
}
|
|
2128
2128
|
};
|
|
2129
|
+
this.handleDismissAnnouncementPreview = (event) => {
|
|
2130
|
+
event.stopPropagation();
|
|
2131
|
+
this.handleDismissAnnouncement();
|
|
2132
|
+
};
|
|
2129
2133
|
this.handleDismissAnnouncement = () => {
|
|
2130
2134
|
this.trackBannerClickedOnce({ cta: "dismiss" });
|
|
2131
2135
|
this.markAnnouncementSeen();
|
|
@@ -2796,6 +2800,11 @@ ${argsString}</pre
|
|
|
2796
2800
|
transition: transform 300ms ease;
|
|
2797
2801
|
}
|
|
2798
2802
|
|
|
2803
|
+
.console-button-wrapper {
|
|
2804
|
+
position: relative;
|
|
2805
|
+
display: inline-flex;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2799
2808
|
.console-button {
|
|
2800
2809
|
transition:
|
|
2801
2810
|
transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
@@ -2923,6 +2932,36 @@ ${argsString}</pre
|
|
|
2923
2932
|
box-shadow: -6px 6px 10px rgba(1, 5, 7, 0.08);
|
|
2924
2933
|
}
|
|
2925
2934
|
|
|
2935
|
+
.announcement-preview__dismiss {
|
|
2936
|
+
flex: none;
|
|
2937
|
+
margin-top: -1px;
|
|
2938
|
+
width: 20px;
|
|
2939
|
+
height: 20px;
|
|
2940
|
+
padding: 0;
|
|
2941
|
+
appearance: none;
|
|
2942
|
+
background: none;
|
|
2943
|
+
border: 0;
|
|
2944
|
+
display: inline-flex;
|
|
2945
|
+
align-items: center;
|
|
2946
|
+
justify-content: center;
|
|
2947
|
+
border-radius: 6px;
|
|
2948
|
+
color: #838389;
|
|
2949
|
+
cursor: pointer;
|
|
2950
|
+
transition:
|
|
2951
|
+
background 120ms ease,
|
|
2952
|
+
color 120ms ease;
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
.announcement-preview__dismiss:hover {
|
|
2956
|
+
background: rgba(0, 0, 0, 0.06);
|
|
2957
|
+
color: #010507;
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
.announcement-preview__dismiss:focus-visible {
|
|
2961
|
+
outline: 2px solid #bec2ff;
|
|
2962
|
+
outline-offset: 1px;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2926
2965
|
.announcement-dismiss {
|
|
2927
2966
|
background: none;
|
|
2928
2967
|
border: none;
|
|
@@ -3543,8 +3582,9 @@ ${argsString}</pre
|
|
|
3543
3582
|
}
|
|
3544
3583
|
renderButton() {
|
|
3545
3584
|
return lit.html`
|
|
3546
|
-
<button
|
|
3547
|
-
|
|
3585
|
+
<div class="console-button-wrapper">
|
|
3586
|
+
<button
|
|
3587
|
+
class=${[
|
|
3548
3588
|
"console-button",
|
|
3549
3589
|
"group",
|
|
3550
3590
|
"relative",
|
|
@@ -3576,24 +3616,25 @@ ${argsString}</pre
|
|
|
3576
3616
|
"select-none",
|
|
3577
3617
|
this.isDragging ? "cursor-grabbing" : "cursor-grab"
|
|
3578
3618
|
].join(" ")}
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3619
|
+
type="button"
|
|
3620
|
+
aria-label="Web Inspector"
|
|
3621
|
+
data-drag-context="button"
|
|
3622
|
+
data-dragging=${this.isDragging && this.pointerContext === "button" ? "true" : "false"}
|
|
3623
|
+
@pointerdown=${this.handlePointerDown}
|
|
3624
|
+
@pointermove=${this.handlePointerMove}
|
|
3625
|
+
@pointerup=${this.handlePointerUp}
|
|
3626
|
+
@pointercancel=${this.handlePointerCancel}
|
|
3627
|
+
@click=${this.handleButtonClick}
|
|
3628
|
+
>
|
|
3629
|
+
<img
|
|
3630
|
+
src=${require_inspector_logo_icon.default}
|
|
3631
|
+
alt="Inspector logo"
|
|
3632
|
+
class="h-5 w-auto"
|
|
3633
|
+
loading="lazy"
|
|
3634
|
+
/>
|
|
3635
|
+
</button>
|
|
3589
3636
|
${this.renderAnnouncementPreview()}
|
|
3590
|
-
|
|
3591
|
-
src=${require_inspector_logo_icon.default}
|
|
3592
|
-
alt="Inspector logo"
|
|
3593
|
-
class="h-5 w-auto"
|
|
3594
|
-
loading="lazy"
|
|
3595
|
-
/>
|
|
3596
|
-
</button>
|
|
3637
|
+
</div>
|
|
3597
3638
|
`;
|
|
3598
3639
|
}
|
|
3599
3640
|
renderWindow() {
|
|
@@ -5424,6 +5465,14 @@ ${prettyEvent}</pre
|
|
|
5424
5465
|
@click=${() => this.handleAnnouncementPreviewClick()}
|
|
5425
5466
|
>
|
|
5426
5467
|
<span>${this.announcementPreviewText}</span>
|
|
5468
|
+
<button
|
|
5469
|
+
type="button"
|
|
5470
|
+
class="announcement-preview__dismiss"
|
|
5471
|
+
aria-label="Dismiss announcement"
|
|
5472
|
+
@click=${this.handleDismissAnnouncementPreview}
|
|
5473
|
+
>
|
|
5474
|
+
${this.renderIcon("X")}
|
|
5475
|
+
</button>
|
|
5427
5476
|
<span class="announcement-preview__arrow"></span>
|
|
5428
5477
|
</div>`;
|
|
5429
5478
|
}
|