ui-sniper 3.1.0 → 3.1.1

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.mjs CHANGED
@@ -7974,7 +7974,8 @@ function ReviewPanel({
7974
7974
  annotations,
7975
7975
  onClose,
7976
7976
  onJumpTo,
7977
- onDelete
7977
+ onDelete,
7978
+ onCopy
7978
7979
  }) {
7979
7980
  const [mode, setMode] = useState6("list");
7980
7981
  const [currentIndex, setCurrentIndex] = useState6(0);
@@ -8087,6 +8088,20 @@ function ReviewPanel({
8087
8088
  ] })
8088
8089
  }
8089
8090
  ),
8091
+ onCopy && /* @__PURE__ */ jsx9(
8092
+ "button",
8093
+ {
8094
+ type: "button",
8095
+ className: styles_module_default4.cardActionBtn,
8096
+ title: "Copy",
8097
+ onClick: (e) => {
8098
+ e.stopPropagation();
8099
+ onCopy(ann);
8100
+ },
8101
+ "aria-label": "Copy annotation",
8102
+ children: /* @__PURE__ */ jsx9(IconCopyAlt, { size: 12 })
8103
+ }
8104
+ ),
8090
8105
  /* @__PURE__ */ jsx9(
8091
8106
  "button",
8092
8107
  {
@@ -8214,6 +8229,17 @@ function ReviewPanel({
8214
8229
  ]
8215
8230
  }
8216
8231
  ),
8232
+ onCopy && /* @__PURE__ */ jsx9(
8233
+ "button",
8234
+ {
8235
+ type: "button",
8236
+ className: `${styles_module_default4.flashcardActionBtn} ${styles_module_default4.jumpBtn}`,
8237
+ onClick: () => onCopy(currentAnnotation),
8238
+ title: "Copy annotation",
8239
+ "aria-label": "Copy annotation",
8240
+ children: /* @__PURE__ */ jsx9(IconCopyAlt, { size: 13 })
8241
+ }
8242
+ ),
8217
8243
  /* @__PURE__ */ jsx9(
8218
8244
  "button",
8219
8245
  {
@@ -8241,7 +8267,7 @@ function ReviewPanel({
8241
8267
  children: [
8242
8268
  /* @__PURE__ */ jsxs8("div", { className: styles_module_default4.panelHeader, children: [
8243
8269
  /* @__PURE__ */ jsxs8("div", { className: styles_module_default4.panelTitle, children: [
8244
- /* @__PURE__ */ jsx9("div", { className: styles_module_default4.panelTitleIcon, children: /* @__PURE__ */ jsx9(IconLayout, { size: 13 }) }),
8270
+ /* @__PURE__ */ jsx9("div", { className: styles_module_default4.panelTitleIcon, children: /* @__PURE__ */ jsx9(IconChatEllipsis, { size: 13 }) }),
8245
8271
  "Review",
8246
8272
  annotations.length > 0 && /* @__PURE__ */ jsxs8("span", { className: styles_module_default4.panelCount, children: [
8247
8273
  reviewedIds.size,
@@ -8704,10 +8730,10 @@ function SettingsPanel({
8704
8730
  className: `${styles_module_default10.settingsPage} ${settingsPage === "automations" ? styles_module_default10.slideLeft : ""}`,
8705
8731
  children: [
8706
8732
  /* @__PURE__ */ jsxs13("div", { className: styles_module_default10.settingsHeader, children: [
8707
- /* @__PURE__ */ jsx14("a", { className: styles_module_default10.settingsBrand, href: "https://hara-xy.com", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx14("svg", { width: "72", height: "16", viewBox: "0 0 500 151", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx14("text", { x: "10", y: "110", "font-family": "'Arial Black', 'Impact', sans-serif", "font-size": "105", "font-weight": "900", "font-style": "italic", "letter-spacing": "-2", fill: "currentColor", children: "UI SNIPER" }) }) }),
8733
+ /* @__PURE__ */ jsx14("a", { className: styles_module_default10.settingsBrand, href: "https://hara-xy.com", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx14("svg", { width: "72", height: "16", viewBox: "0 0 500 151", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx14("text", { x: "10", y: "110", fontFamily: "'Arial Black', 'Impact', sans-serif", fontSize: "105", fontWeight: "900", fontStyle: "italic", letterSpacing: "-2", fill: "currentColor", children: "UI SNIPER" }) }) }),
8708
8734
  /* @__PURE__ */ jsxs13("p", { className: styles_module_default10.settingsVersion, children: [
8709
8735
  "v",
8710
- "3.1.0"
8736
+ "3.1.1"
8711
8737
  ] }),
8712
8738
  /* @__PURE__ */ jsx14(
8713
8739
  "button",
@@ -9403,7 +9429,7 @@ function PageFeedbackToolbarCSS({
9403
9429
  }, [shouldShowMarkers]);
9404
9430
  useEffect7(() => {
9405
9431
  const checkMobile = () => {
9406
- setIsMobile(window.innerWidth < 768 || window.matchMedia("(pointer: coarse)").matches);
9432
+ setIsMobile(window.innerWidth < 768 || window.matchMedia?.("(pointer: coarse)")?.matches);
9407
9433
  };
9408
9434
  checkMobile();
9409
9435
  window.addEventListener("resize", checkMobile);
@@ -12005,7 +12031,7 @@ function PageFeedbackToolbarCSS({
12005
12031
  ] })
12006
12032
  ] }),
12007
12033
  hasAnnotations && /* @__PURE__ */ jsxs14("div", { className: styles_module_default5.buttonWrapper, children: [
12008
- /* @__PURE__ */ jsx15(
12034
+ /* @__PURE__ */ jsxs14(
12009
12035
  "button",
12010
12036
  {
12011
12037
  className: `${styles_module_default5.controlButton} ${showReviewPanel ? "" : ""}`,
@@ -12016,7 +12042,10 @@ function PageFeedbackToolbarCSS({
12016
12042
  },
12017
12043
  title: "Review annotations",
12018
12044
  "aria-label": "Review annotations",
12019
- children: /* @__PURE__ */ jsx15(IconLayout, { size: 20 })
12045
+ children: [
12046
+ /* @__PURE__ */ jsx15(IconChatEllipsis, { size: 20 }),
12047
+ annotations.length > 0 && /* @__PURE__ */ jsx15("span", { className: styles_module_default5.buttonBadge, children: annotations.length })
12048
+ ]
12020
12049
  }
12021
12050
  ),
12022
12051
  /* @__PURE__ */ jsx15("span", { className: styles_module_default5.buttonTooltip, children: "Review notes" })
@@ -12286,6 +12315,13 @@ function PageFeedbackToolbarCSS({
12286
12315
  },
12287
12316
  onDelete: (ann) => {
12288
12317
  deleteAnnotation2(ann.id);
12318
+ },
12319
+ onCopy: (ann) => {
12320
+ const output = generateOutput([ann], pathname, settings.outputDetail || "standard");
12321
+ if (navigator.clipboard) {
12322
+ navigator.clipboard.writeText(output).catch(() => {
12323
+ });
12324
+ }
12289
12325
  }
12290
12326
  }
12291
12327
  ),