@tbib-image-viewer/react 0.1.4 → 0.1.5

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
@@ -14,6 +14,7 @@ import {
14
14
  } from "@tbib-image-viewer/core";
15
15
 
16
16
  // src/components/ImageToolbar.tsx
17
+ import React2 from "react";
17
18
  import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
18
19
  import {
19
20
  faHand,
@@ -264,251 +265,311 @@ var ImageToolbar = ({
264
265
  totalImages
265
266
  }) => {
266
267
  const showSubtoolbar = activeTool === "pen" || activeTool === "highlighter" || activeTool === "laser";
268
+ const toolbarRef = React2.useRef(null);
269
+ const subtoolbarRef = React2.useRef(null);
270
+ const toolbarTouchState = React2.useRef({ isDown: false, startX: 0, scrollLeft: 0 });
271
+ const subtoolbarTouchState = React2.useRef({ isDown: false, startX: 0, scrollLeft: 0 });
272
+ const handleToolbarTouchStart = (e) => {
273
+ if (!toolbarRef.current) return;
274
+ toolbarTouchState.current = {
275
+ isDown: true,
276
+ startX: e.touches[0].clientX,
277
+ scrollLeft: toolbarRef.current.scrollLeft
278
+ };
279
+ };
280
+ const handleToolbarTouchMove = (e) => {
281
+ if (!toolbarTouchState.current.isDown || !toolbarRef.current) return;
282
+ const dx = e.touches[0].clientX - toolbarTouchState.current.startX;
283
+ toolbarRef.current.scrollLeft = toolbarTouchState.current.scrollLeft - dx;
284
+ };
285
+ const handleToolbarTouchEnd = () => {
286
+ toolbarTouchState.current.isDown = false;
287
+ };
288
+ const handleSubtoolbarTouchStart = (e) => {
289
+ if (!subtoolbarRef.current) return;
290
+ subtoolbarTouchState.current = {
291
+ isDown: true,
292
+ startX: e.touches[0].clientX,
293
+ scrollLeft: subtoolbarRef.current.scrollLeft
294
+ };
295
+ };
296
+ const handleSubtoolbarTouchMove = (e) => {
297
+ if (!subtoolbarTouchState.current.isDown || !subtoolbarRef.current) return;
298
+ const dx = e.touches[0].clientX - subtoolbarTouchState.current.startX;
299
+ subtoolbarRef.current.scrollLeft = subtoolbarTouchState.current.scrollLeft - dx;
300
+ };
301
+ const handleSubtoolbarTouchEnd = () => {
302
+ subtoolbarTouchState.current.isDown = false;
303
+ };
267
304
  return /* @__PURE__ */ jsxs2("div", { className: "tbib-iv-toolbar-wrapper", children: [
268
- /* @__PURE__ */ jsxs2("header", { className: "tbib-iv-toolbar", role: "toolbar", "aria-label": "Image tools", children: [
269
- currentIndex !== void 0 && totalImages !== void 0 && totalImages > 1 && /* @__PURE__ */ jsxs2(Fragment, { children: [
270
- /* @__PURE__ */ jsxs2("span", { className: "tbib-iv-tabular", title: "Current Image", children: [
271
- currentIndex + 1,
272
- " / ",
273
- totalImages
274
- ] }),
275
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" })
276
- ] }),
277
- /* @__PURE__ */ jsx2(
278
- "button",
279
- {
280
- type: "button",
281
- className: `tbib-iv-btn ${activeTool === "hand" ? "tbib-iv-btn-active" : ""}`,
282
- onClick: () => onToolChange("hand"),
283
- title: "Pan & Move (1-finger / drag)",
284
- "aria-label": "Hand Pan Tool",
285
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faHand })
286
- }
287
- ),
288
- /* @__PURE__ */ jsx2(
289
- "button",
290
- {
291
- type: "button",
292
- className: `tbib-iv-btn ${activeTool === "pen" ? "tbib-iv-btn-active" : ""}`,
293
- onClick: () => onToolChange("pen"),
294
- title: "Draw Pen",
295
- "aria-label": "Pen Tool",
296
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faPen })
297
- }
298
- ),
299
- /* @__PURE__ */ jsx2(
300
- "button",
301
- {
302
- type: "button",
303
- className: `tbib-iv-btn ${activeTool === "highlighter" ? "tbib-iv-btn-active" : ""}`,
304
- onClick: () => onToolChange("highlighter"),
305
- title: "Highlighter (Semi-transparent)",
306
- "aria-label": "Highlighter Tool",
307
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faHighlighter })
308
- }
309
- ),
310
- /* @__PURE__ */ jsx2(
311
- "button",
312
- {
313
- type: "button",
314
- className: `tbib-iv-btn ${activeTool === "laser" ? "tbib-iv-btn-active" : ""}`,
315
- onClick: () => onToolChange("laser"),
316
- title: "Laser Pointer (Glowing WebGL trail)",
317
- "aria-label": "Laser Pointer",
318
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faCrosshairs })
319
- }
320
- ),
321
- /* @__PURE__ */ jsx2(
322
- "button",
323
- {
324
- type: "button",
325
- className: `tbib-iv-btn ${activeTool === "eraser" ? "tbib-iv-btn-active" : ""}`,
326
- onClick: () => onToolChange("eraser"),
327
- title: "Eraser (Erase strokes on tap)",
328
- "aria-label": "Eraser Tool",
329
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faEraser })
330
- }
331
- ),
332
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
333
- /* @__PURE__ */ jsx2(
334
- "button",
335
- {
336
- type: "button",
337
- className: "tbib-iv-btn",
338
- disabled: !canUndo,
339
- onClick: onUndo,
340
- title: "Undo (Ctrl+Z)",
341
- "aria-label": "Undo",
342
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotateLeft })
343
- }
344
- ),
345
- /* @__PURE__ */ jsx2(
346
- "button",
347
- {
348
- type: "button",
349
- className: "tbib-iv-btn",
350
- disabled: !canRedo,
351
- onClick: onRedo,
352
- title: "Redo (Ctrl+Y)",
353
- "aria-label": "Redo",
354
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotateRight })
355
- }
356
- ),
357
- /* @__PURE__ */ jsx2(
358
- "button",
359
- {
360
- type: "button",
361
- className: "tbib-iv-btn",
362
- onClick: onClear,
363
- title: "Clear Slide Annotations",
364
- "aria-label": "Clear All",
365
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faTrashCan })
366
- }
367
- ),
368
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
369
- /* @__PURE__ */ jsx2(
370
- "button",
371
- {
372
- type: "button",
373
- className: "tbib-iv-btn",
374
- onClick: onZoomOut,
375
- title: "Zoom Out (-)",
376
- "aria-label": "Zoom Out",
377
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faMagnifyingGlassMinus })
378
- }
379
- ),
380
- /* @__PURE__ */ jsxs2("span", { className: "tbib-iv-tabular", title: "Current Zoom Scale", children: [
381
- Math.round(zoomScale * 100),
382
- "%"
383
- ] }),
384
- /* @__PURE__ */ jsx2(
385
- "button",
386
- {
387
- type: "button",
388
- className: "tbib-iv-btn",
389
- onClick: onZoomIn,
390
- title: "Zoom In (+)",
391
- "aria-label": "Zoom In",
392
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faMagnifyingGlassPlus })
393
- }
394
- ),
395
- /* @__PURE__ */ jsx2(
396
- "button",
397
- {
398
- type: "button",
399
- className: "tbib-iv-btn",
400
- onClick: onZoomReset,
401
- title: "Reset Fit to Screen (0)",
402
- "aria-label": "Reset Zoom",
403
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faExpand })
404
- }
405
- ),
406
- /* @__PURE__ */ jsx2(
407
- "button",
408
- {
409
- type: "button",
410
- className: "tbib-iv-btn",
411
- onClick: onRotate,
412
- title: "Rotate 90\xB0 Clockwise",
413
- "aria-label": "Rotate Image",
414
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotate })
415
- }
416
- ),
417
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
418
- /* @__PURE__ */ jsx2(
419
- DownloadMenu,
420
- {
421
- onDownloadAnnotated,
422
- onDownloadClean,
423
- onExportJson
424
- }
425
- ),
426
- onToggleFullscreen && /* @__PURE__ */ jsx2(
427
- "button",
428
- {
429
- type: "button",
430
- className: "tbib-iv-btn",
431
- onClick: onToggleFullscreen,
432
- title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
433
- "aria-label": "Toggle Fullscreen",
434
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: isFullscreen ? faCompressAlt : faExpandAlt })
435
- }
436
- ),
437
- onClose && /* @__PURE__ */ jsxs2(Fragment, { children: [
438
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
439
- /* @__PURE__ */ jsx2(
440
- "button",
441
- {
442
- type: "button",
443
- className: "tbib-iv-btn",
444
- onClick: onClose,
445
- title: "Close Viewer (Esc)",
446
- "aria-label": "Close",
447
- style: { color: "#ef4444" },
448
- children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faXmark, style: { fontSize: "16px" } })
449
- }
450
- )
451
- ] })
452
- ] }),
453
- showSubtoolbar && /* @__PURE__ */ jsxs2("div", { className: "tbib-iv-subtoolbar", role: "region", "aria-label": "Tool customization", children: [
454
- activeTool !== "laser" && /* @__PURE__ */ jsx2("div", { className: "tbib-iv-thickness-group", children: THICKNESS_OPTIONS.map((opt) => /* @__PURE__ */ jsxs2(
455
- "button",
456
- {
457
- type: "button",
458
- className: `tbib-iv-thickness-btn ${strokeWidth === opt.value ? "tbib-iv-thickness-active" : ""}`,
459
- onClick: () => onStrokeWidthChange(opt.value),
460
- title: `${opt.label} stroke (${opt.value}px)`,
461
- children: [
305
+ /* @__PURE__ */ jsxs2(
306
+ "header",
307
+ {
308
+ ref: toolbarRef,
309
+ className: "tbib-iv-toolbar",
310
+ role: "toolbar",
311
+ "aria-label": "Image tools",
312
+ onTouchStart: handleToolbarTouchStart,
313
+ onTouchMove: handleToolbarTouchMove,
314
+ onTouchEnd: handleToolbarTouchEnd,
315
+ children: [
316
+ currentIndex !== void 0 && totalImages !== void 0 && totalImages > 1 && /* @__PURE__ */ jsxs2(Fragment, { children: [
317
+ /* @__PURE__ */ jsxs2("span", { className: "tbib-iv-tabular", title: "Current Image", children: [
318
+ currentIndex + 1,
319
+ " / ",
320
+ totalImages
321
+ ] }),
322
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" })
323
+ ] }),
324
+ /* @__PURE__ */ jsx2(
325
+ "button",
326
+ {
327
+ type: "button",
328
+ className: `tbib-iv-btn ${activeTool === "hand" ? "tbib-iv-btn-active" : ""}`,
329
+ onClick: () => onToolChange("hand"),
330
+ title: "Pan & Move (1-finger / drag)",
331
+ "aria-label": "Hand Pan Tool",
332
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faHand })
333
+ }
334
+ ),
335
+ /* @__PURE__ */ jsx2(
336
+ "button",
337
+ {
338
+ type: "button",
339
+ className: `tbib-iv-btn ${activeTool === "pen" ? "tbib-iv-btn-active" : ""}`,
340
+ onClick: () => onToolChange("pen"),
341
+ title: "Draw Pen",
342
+ "aria-label": "Pen Tool",
343
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faPen })
344
+ }
345
+ ),
346
+ /* @__PURE__ */ jsx2(
347
+ "button",
348
+ {
349
+ type: "button",
350
+ className: `tbib-iv-btn ${activeTool === "highlighter" ? "tbib-iv-btn-active" : ""}`,
351
+ onClick: () => onToolChange("highlighter"),
352
+ title: "Highlighter (Semi-transparent)",
353
+ "aria-label": "Highlighter Tool",
354
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faHighlighter })
355
+ }
356
+ ),
357
+ /* @__PURE__ */ jsx2(
358
+ "button",
359
+ {
360
+ type: "button",
361
+ className: `tbib-iv-btn ${activeTool === "laser" ? "tbib-iv-btn-active" : ""}`,
362
+ onClick: () => onToolChange("laser"),
363
+ title: "Laser Pointer (Glowing WebGL trail)",
364
+ "aria-label": "Laser Pointer",
365
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faCrosshairs })
366
+ }
367
+ ),
368
+ /* @__PURE__ */ jsx2(
369
+ "button",
370
+ {
371
+ type: "button",
372
+ className: `tbib-iv-btn ${activeTool === "eraser" ? "tbib-iv-btn-active" : ""}`,
373
+ onClick: () => onToolChange("eraser"),
374
+ title: "Eraser (Erase strokes on tap)",
375
+ "aria-label": "Eraser Tool",
376
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faEraser })
377
+ }
378
+ ),
379
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
380
+ /* @__PURE__ */ jsx2(
381
+ "button",
382
+ {
383
+ type: "button",
384
+ className: "tbib-iv-btn",
385
+ disabled: !canUndo,
386
+ onClick: onUndo,
387
+ title: "Undo (Ctrl+Z)",
388
+ "aria-label": "Undo",
389
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotateLeft })
390
+ }
391
+ ),
392
+ /* @__PURE__ */ jsx2(
393
+ "button",
394
+ {
395
+ type: "button",
396
+ className: "tbib-iv-btn",
397
+ disabled: !canRedo,
398
+ onClick: onRedo,
399
+ title: "Redo (Ctrl+Y)",
400
+ "aria-label": "Redo",
401
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotateRight })
402
+ }
403
+ ),
404
+ /* @__PURE__ */ jsx2(
405
+ "button",
406
+ {
407
+ type: "button",
408
+ className: "tbib-iv-btn",
409
+ onClick: onClear,
410
+ title: "Clear Slide Annotations",
411
+ "aria-label": "Clear All",
412
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faTrashCan })
413
+ }
414
+ ),
415
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
416
+ /* @__PURE__ */ jsx2(
417
+ "button",
418
+ {
419
+ type: "button",
420
+ className: "tbib-iv-btn",
421
+ onClick: onZoomOut,
422
+ title: "Zoom Out (-)",
423
+ "aria-label": "Zoom Out",
424
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faMagnifyingGlassMinus })
425
+ }
426
+ ),
427
+ /* @__PURE__ */ jsxs2("span", { className: "tbib-iv-tabular", title: "Current Zoom Scale", children: [
428
+ Math.round(zoomScale * 100),
429
+ "%"
430
+ ] }),
431
+ /* @__PURE__ */ jsx2(
432
+ "button",
433
+ {
434
+ type: "button",
435
+ className: "tbib-iv-btn",
436
+ onClick: onZoomIn,
437
+ title: "Zoom In (+)",
438
+ "aria-label": "Zoom In",
439
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faMagnifyingGlassPlus })
440
+ }
441
+ ),
442
+ /* @__PURE__ */ jsx2(
443
+ "button",
444
+ {
445
+ type: "button",
446
+ className: "tbib-iv-btn",
447
+ onClick: onZoomReset,
448
+ title: "Reset Fit to Screen (0)",
449
+ "aria-label": "Reset Zoom",
450
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faExpand })
451
+ }
452
+ ),
453
+ /* @__PURE__ */ jsx2(
454
+ "button",
455
+ {
456
+ type: "button",
457
+ className: "tbib-iv-btn",
458
+ onClick: onRotate,
459
+ title: "Rotate 90\xB0 Clockwise",
460
+ "aria-label": "Rotate Image",
461
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faRotate })
462
+ }
463
+ ),
464
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
465
+ /* @__PURE__ */ jsx2(
466
+ DownloadMenu,
467
+ {
468
+ onDownloadAnnotated,
469
+ onDownloadClean,
470
+ onExportJson
471
+ }
472
+ ),
473
+ onToggleFullscreen && /* @__PURE__ */ jsx2(
474
+ "button",
475
+ {
476
+ type: "button",
477
+ className: "tbib-iv-btn",
478
+ onClick: onToggleFullscreen,
479
+ title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
480
+ "aria-label": "Toggle Fullscreen",
481
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: isFullscreen ? faCompressAlt : faExpandAlt })
482
+ }
483
+ ),
484
+ onClose && /* @__PURE__ */ jsxs2(Fragment, { children: [
485
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider" }),
462
486
  /* @__PURE__ */ jsx2(
463
- "span",
487
+ "button",
464
488
  {
465
- style: {
466
- display: "inline-block",
467
- width: `${Math.min(opt.value * 1.5, 12)}px`,
468
- height: `${Math.min(opt.value * 1.5, 12)}px`,
469
- borderRadius: "50%",
470
- backgroundColor: "currentColor"
471
- }
489
+ type: "button",
490
+ className: "tbib-iv-btn",
491
+ onClick: onClose,
492
+ title: "Close Viewer (Esc)",
493
+ "aria-label": "Close",
494
+ style: { color: "#ef4444" },
495
+ children: /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faXmark, style: { fontSize: "16px" } })
472
496
  }
473
- ),
474
- /* @__PURE__ */ jsx2("span", { children: opt.label })
475
- ]
476
- },
477
- opt.value
478
- )) }),
479
- activeTool === "laser" && /* @__PURE__ */ jsx2("span", { style: { fontSize: "11px", color: "var(--tbib-iv-text-muted)", fontStyle: "italic", paddingRight: "4px" }, children: "Laser Beam Color:" }),
480
- /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider", style: { height: "16px", margin: "0 2px" } }),
481
- /* @__PURE__ */ jsxs2("div", { style: { display: "inline-flex", alignItems: "center", gap: "6px" }, children: [
482
- PRESET_COLORS.map((c) => {
483
- const isSelected = color.toLowerCase() === c.toLowerCase();
484
- return /* @__PURE__ */ jsx2(
497
+ )
498
+ ] })
499
+ ]
500
+ }
501
+ ),
502
+ showSubtoolbar && /* @__PURE__ */ jsxs2(
503
+ "div",
504
+ {
505
+ ref: subtoolbarRef,
506
+ className: "tbib-iv-subtoolbar",
507
+ role: "region",
508
+ "aria-label": "Tool customization",
509
+ onTouchStart: handleSubtoolbarTouchStart,
510
+ onTouchMove: handleSubtoolbarTouchMove,
511
+ onTouchEnd: handleSubtoolbarTouchEnd,
512
+ children: [
513
+ activeTool !== "laser" && /* @__PURE__ */ jsx2("div", { className: "tbib-iv-thickness-group", children: THICKNESS_OPTIONS.map((opt) => /* @__PURE__ */ jsxs2(
485
514
  "button",
486
515
  {
487
516
  type: "button",
488
- className: `tbib-iv-swatch-btn ${isSelected ? "tbib-iv-swatch-active" : ""}`,
489
- style: { backgroundColor: c },
490
- onClick: () => onColorChange(c),
491
- title: `Select color: ${c}`,
492
- "aria-label": `Color ${c}`
517
+ className: `tbib-iv-thickness-btn ${strokeWidth === opt.value ? "tbib-iv-thickness-active" : ""}`,
518
+ onClick: () => onStrokeWidthChange(opt.value),
519
+ title: `${opt.label} stroke (${opt.value}px)`,
520
+ children: [
521
+ /* @__PURE__ */ jsx2(
522
+ "span",
523
+ {
524
+ style: {
525
+ display: "inline-block",
526
+ width: `${Math.min(opt.value * 1.5, 12)}px`,
527
+ height: `${Math.min(opt.value * 1.5, 12)}px`,
528
+ borderRadius: "50%",
529
+ backgroundColor: "currentColor"
530
+ }
531
+ }
532
+ ),
533
+ /* @__PURE__ */ jsx2("span", { children: opt.label })
534
+ ]
493
535
  },
494
- c
495
- );
496
- }),
497
- /* @__PURE__ */ jsxs2("label", { className: "tbib-iv-custom-color-btn", title: "Custom Color Picker", children: [
498
- /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faEyeDropper, style: { fontSize: "10px", opacity: 0.8 } }),
499
- /* @__PURE__ */ jsx2(
500
- "input",
501
- {
502
- type: "color",
503
- value: color,
504
- onChange: (e) => onColorChange(e.target.value),
505
- className: "tbib-iv-custom-color-input",
506
- "aria-label": "Custom color picker"
507
- }
508
- )
509
- ] })
510
- ] })
511
- ] })
536
+ opt.value
537
+ )) }),
538
+ activeTool === "laser" && /* @__PURE__ */ jsx2("span", { style: { fontSize: "11px", color: "var(--tbib-iv-text-muted)", fontStyle: "italic", paddingRight: "4px" }, children: "Laser Beam Color:" }),
539
+ /* @__PURE__ */ jsx2("div", { className: "tbib-iv-divider", style: { height: "16px", margin: "0 2px" } }),
540
+ /* @__PURE__ */ jsxs2("div", { style: { display: "inline-flex", alignItems: "center", gap: "6px" }, children: [
541
+ PRESET_COLORS.map((c) => {
542
+ const isSelected = color.toLowerCase() === c.toLowerCase();
543
+ return /* @__PURE__ */ jsx2(
544
+ "button",
545
+ {
546
+ type: "button",
547
+ className: `tbib-iv-swatch-btn ${isSelected ? "tbib-iv-swatch-active" : ""}`,
548
+ style: { backgroundColor: c },
549
+ onClick: () => onColorChange(c),
550
+ title: `Select color: ${c}`,
551
+ "aria-label": `Color ${c}`
552
+ },
553
+ c
554
+ );
555
+ }),
556
+ /* @__PURE__ */ jsxs2("label", { className: "tbib-iv-custom-color-btn", title: "Custom Color Picker", children: [
557
+ /* @__PURE__ */ jsx2(FontAwesomeIcon2, { icon: faEyeDropper, style: { fontSize: "10px", opacity: 0.8 } }),
558
+ /* @__PURE__ */ jsx2(
559
+ "input",
560
+ {
561
+ type: "color",
562
+ value: color,
563
+ onChange: (e) => onColorChange(e.target.value),
564
+ className: "tbib-iv-custom-color-input",
565
+ "aria-label": "Custom color picker"
566
+ }
567
+ )
568
+ ] })
569
+ ] })
570
+ ]
571
+ }
572
+ )
512
573
  ] });
513
574
  };
514
575