vite-plugin-ai-annotator 1.1.31 → 1.1.32

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.
@@ -6487,7 +6487,7 @@
6487
6487
  overlay.className = "annotator-highlight-overlay annotator-ignore";
6488
6488
  overlay.style.cssText = `
6489
6489
  position: fixed;
6490
- pointer-events: none;
6490
+ cursor: pointer;
6491
6491
  box-sizing: border-box;
6492
6492
  z-index: ${Z_INDEX.HIGHLIGHT_OVERLAY};
6493
6493
  background:
@@ -6497,6 +6497,13 @@
6497
6497
  linear-gradient(0deg, ${color} 50%, transparent 50%) repeat-y top right / 2px 10px;
6498
6498
  animation: marching-ants 0.4s linear infinite;
6499
6499
  `;
6500
+ overlay.addEventListener("click", (e5) => {
6501
+ e5.stopPropagation();
6502
+ e5.preventDefault();
6503
+ if (onEditClickCallback) {
6504
+ onEditClickCallback(element);
6505
+ }
6506
+ });
6500
6507
  document.body.appendChild(overlay);
6501
6508
  let cleanup = null;
6502
6509
  cleanup = autoUpdate(element, badge, () => {
@@ -7793,17 +7800,13 @@
7793
7800
  }
7794
7801
  return logs;
7795
7802
  }
7803
+ // Called when clicking on an UNSELECTED element during inspection mode
7804
+ // (clicks on selected elements are handled by overlay → showCommentPopoverForElement)
7796
7805
  handleElementSelected(element) {
7797
7806
  if (!this.selectionManager) return;
7798
- const wasSelected = this.selectionManager.hasElement(element);
7799
- if (wasSelected) {
7800
- this.selectionManager.deselectElement(element);
7801
- this.elementComments.delete(element);
7802
- this.hideCommentPopover();
7803
- } else {
7804
- this.selectionManager.selectElement(element, (el) => findNearestComponent(el, this.verbose));
7805
- this.showCommentPopoverForElement(element);
7806
- }
7807
+ if (this.selectionManager.hasElement(element)) return;
7808
+ this.selectionManager.selectElement(element, (el) => findNearestComponent(el, this.verbose));
7809
+ this.showCommentPopoverForElement(element);
7807
7810
  this.selectionCount = this.selectionManager.getSelectedCount();
7808
7811
  if (this.socket?.connected) {
7809
7812
  this.socket.emit("selectionChanged", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-ai-annotator",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "AI-powered element annotator for Vite - Pick elements and get instant AI code modifications",
5
5
  "type": "module",
6
6
  "main": "dist/vite-plugin.js",