vite-plugin-ai-annotator 1.1.10 → 1.1.12
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/annotator-toolbar.js +44 -28
- package/package.json +1 -1
|
@@ -6587,9 +6587,17 @@
|
|
|
6587
6587
|
deselectElement(element) {
|
|
6588
6588
|
const elementData = selectedElements.get(element);
|
|
6589
6589
|
if (elementData) {
|
|
6590
|
-
;
|
|
6591
|
-
|
|
6592
|
-
|
|
6590
|
+
const el = element;
|
|
6591
|
+
if (elementData.originalOutline) {
|
|
6592
|
+
el.style.outline = elementData.originalOutline;
|
|
6593
|
+
} else {
|
|
6594
|
+
el.style.removeProperty("outline");
|
|
6595
|
+
}
|
|
6596
|
+
if (elementData.originalOutlineOffset) {
|
|
6597
|
+
el.style.outlineOffset = elementData.originalOutlineOffset;
|
|
6598
|
+
} else {
|
|
6599
|
+
el.style.removeProperty("outline-offset");
|
|
6600
|
+
}
|
|
6593
6601
|
const badge = badges.get(element);
|
|
6594
6602
|
if (badge) {
|
|
6595
6603
|
badge._cleanup?.();
|
|
@@ -6602,9 +6610,17 @@
|
|
|
6602
6610
|
},
|
|
6603
6611
|
clearAllSelections() {
|
|
6604
6612
|
selectedElements.forEach((data, element) => {
|
|
6605
|
-
;
|
|
6606
|
-
|
|
6607
|
-
|
|
6613
|
+
const el = element;
|
|
6614
|
+
if (data.originalOutline) {
|
|
6615
|
+
el.style.outline = data.originalOutline;
|
|
6616
|
+
} else {
|
|
6617
|
+
el.style.removeProperty("outline");
|
|
6618
|
+
}
|
|
6619
|
+
if (data.originalOutlineOffset) {
|
|
6620
|
+
el.style.outlineOffset = data.originalOutlineOffset;
|
|
6621
|
+
} else {
|
|
6622
|
+
el.style.removeProperty("outline-offset");
|
|
6623
|
+
}
|
|
6608
6624
|
});
|
|
6609
6625
|
badges.forEach((badge) => {
|
|
6610
6626
|
badge._cleanup?.();
|
|
@@ -7679,7 +7695,7 @@
|
|
|
7679
7695
|
if (textareaEl) {
|
|
7680
7696
|
textareaEl.focus();
|
|
7681
7697
|
textareaEl.style.height = "auto";
|
|
7682
|
-
textareaEl.style.height = Math.min(textareaEl.scrollHeight,
|
|
7698
|
+
textareaEl.style.height = Math.min(textareaEl.scrollHeight, 56) + "px";
|
|
7683
7699
|
}
|
|
7684
7700
|
this.popoverCleanup = autoUpdate(element, popoverEl, () => {
|
|
7685
7701
|
computePosition2(element, popoverEl, {
|
|
@@ -7700,7 +7716,7 @@
|
|
|
7700
7716
|
});
|
|
7701
7717
|
}
|
|
7702
7718
|
handlePopoverInputKeydown(e5) {
|
|
7703
|
-
if (e5.key === "Enter" &&
|
|
7719
|
+
if (e5.key === "Enter" && !e5.shiftKey) {
|
|
7704
7720
|
e5.preventDefault();
|
|
7705
7721
|
this.hideCommentPopover();
|
|
7706
7722
|
} else if (e5.key === "Escape") {
|
|
@@ -7722,7 +7738,7 @@
|
|
|
7722
7738
|
const comment = target.value;
|
|
7723
7739
|
const element = this.commentPopover.element;
|
|
7724
7740
|
target.style.height = "auto";
|
|
7725
|
-
target.style.height = Math.min(target.scrollHeight,
|
|
7741
|
+
target.style.height = Math.min(target.scrollHeight, 56) + "px";
|
|
7726
7742
|
this.commentPopover = { ...this.commentPopover, comment };
|
|
7727
7743
|
if (element) {
|
|
7728
7744
|
const hasComment = comment.trim().length > 0;
|
|
@@ -7928,7 +7944,7 @@
|
|
|
7928
7944
|
<div class="popover">
|
|
7929
7945
|
<textarea
|
|
7930
7946
|
class="popover-input"
|
|
7931
|
-
placeholder="Add a note... (
|
|
7947
|
+
placeholder="Add a note... (↵ to close)"
|
|
7932
7948
|
.value=${this.commentPopover.comment}
|
|
7933
7949
|
@input=${this.handlePopoverInput}
|
|
7934
7950
|
@keydown=${this.handlePopoverInputKeydown}
|
|
@@ -8056,13 +8072,10 @@
|
|
|
8056
8072
|
top: 0;
|
|
8057
8073
|
left: 0;
|
|
8058
8074
|
z-index: 1000000;
|
|
8059
|
-
display: flex;
|
|
8060
|
-
align-items: stretch;
|
|
8061
8075
|
background: #1a1a1a;
|
|
8062
8076
|
border: 1px solid rgba(99, 102, 241, 0.5);
|
|
8063
8077
|
border-radius: 8px;
|
|
8064
8078
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.1);
|
|
8065
|
-
overflow: hidden;
|
|
8066
8079
|
animation: popover-in 0.15s ease-out;
|
|
8067
8080
|
}
|
|
8068
8081
|
|
|
@@ -8078,12 +8091,11 @@
|
|
|
8078
8091
|
}
|
|
8079
8092
|
|
|
8080
8093
|
.popover-input {
|
|
8081
|
-
|
|
8082
|
-
min-
|
|
8083
|
-
max-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
padding: 10px 12px;
|
|
8094
|
+
width: 240px;
|
|
8095
|
+
min-height: 36px;
|
|
8096
|
+
max-height: 56px;
|
|
8097
|
+
padding: 8px 12px;
|
|
8098
|
+
padding-bottom: 32px;
|
|
8087
8099
|
border: none;
|
|
8088
8100
|
background: transparent;
|
|
8089
8101
|
color: #fff;
|
|
@@ -8100,37 +8112,41 @@
|
|
|
8100
8112
|
}
|
|
8101
8113
|
|
|
8102
8114
|
.popover-actions {
|
|
8115
|
+
position: absolute;
|
|
8116
|
+
bottom: 4px;
|
|
8117
|
+
right: 4px;
|
|
8103
8118
|
display: flex;
|
|
8104
8119
|
align-items: center;
|
|
8105
|
-
|
|
8120
|
+
gap: 2px;
|
|
8106
8121
|
}
|
|
8107
8122
|
|
|
8108
8123
|
.popover-btn {
|
|
8109
8124
|
display: flex;
|
|
8110
8125
|
align-items: center;
|
|
8111
8126
|
justify-content: center;
|
|
8112
|
-
width:
|
|
8113
|
-
height:
|
|
8127
|
+
width: 24px;
|
|
8128
|
+
height: 24px;
|
|
8114
8129
|
border: none;
|
|
8115
|
-
|
|
8116
|
-
|
|
8130
|
+
border-radius: 4px;
|
|
8131
|
+
background: rgba(255, 255, 255, 0.1);
|
|
8132
|
+
color: #888;
|
|
8117
8133
|
cursor: pointer;
|
|
8118
8134
|
transition: all 0.12s ease;
|
|
8119
8135
|
}
|
|
8120
8136
|
|
|
8121
8137
|
.popover-btn:hover {
|
|
8122
|
-
background: rgba(255, 255, 255, 0.
|
|
8138
|
+
background: rgba(255, 255, 255, 0.15);
|
|
8123
8139
|
color: #fff;
|
|
8124
8140
|
}
|
|
8125
8141
|
|
|
8126
8142
|
.popover-btn.danger:hover {
|
|
8127
|
-
background: rgba(239, 68, 68, 0.
|
|
8143
|
+
background: rgba(239, 68, 68, 0.2);
|
|
8128
8144
|
color: #f87171;
|
|
8129
8145
|
}
|
|
8130
8146
|
|
|
8131
8147
|
.popover-btn svg {
|
|
8132
|
-
width:
|
|
8133
|
-
height:
|
|
8148
|
+
width: 12px;
|
|
8149
|
+
height: 12px;
|
|
8134
8150
|
}
|
|
8135
8151
|
|
|
8136
8152
|
.hidden {
|
package/package.json
CHANGED