afterbefore 0.2.16 → 0.2.17

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // src/overlay/index.tsx
4
- import { useState as useState5, useCallback as useCallback5, useRef as useRef4, useEffect as useEffect4 } from "react";
4
+ import { useState as useState4, useCallback as useCallback4, useEffect as useEffect3 } from "react";
5
5
 
6
6
  // src/overlay/state.ts
7
7
  import { useState, useCallback } from "react";
@@ -177,62 +177,131 @@ function loadImage(src) {
177
177
  });
178
178
  }
179
179
 
180
- // src/overlay/ui/icon.tsx
181
- import { useRef, useCallback as useCallback2, useEffect, useState as useState2 } from "react";
182
- import { Camera, Check, LoaderCircle } from "lucide-react";
183
- import { jsx, jsxs } from "react/jsx-runtime";
184
- var CONTAINER_SIZE = 38;
185
- var ICON_SIZE = CONTAINER_SIZE;
180
+ // src/overlay/ui/toolbar.tsx
181
+ import { useCallback as useCallback2, useEffect, useRef, useState as useState2 } from "react";
182
+ import {
183
+ ArrowUp,
184
+ Camera,
185
+ Check,
186
+ ChevronDown,
187
+ Clock,
188
+ Eye,
189
+ FolderOpen,
190
+ Frame,
191
+ ImageIcon,
192
+ LoaderCircle,
193
+ Maximize,
194
+ Monitor,
195
+ MousePointer2,
196
+ Palette,
197
+ Settings,
198
+ Trash2,
199
+ Upload,
200
+ X
201
+ } from "lucide-react";
202
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
186
203
  var EDGE_MARGIN = 24;
187
- function Icon({ phase, onClick, loading, onPositionChange }) {
188
- const ref = useRef(null);
189
- const [pos, setPos] = useState2({ x: -1, y: -1 });
204
+ var CONTAINER_SIZE = 38;
205
+ function getCornerStyle(corner) {
206
+ switch (corner) {
207
+ case "bottom-right":
208
+ return { bottom: EDGE_MARGIN, right: EDGE_MARGIN };
209
+ case "bottom-left":
210
+ return { bottom: EDGE_MARGIN, left: EDGE_MARGIN };
211
+ case "top-right":
212
+ return { top: EDGE_MARGIN, right: EDGE_MARGIN };
213
+ case "top-left":
214
+ return { top: EDGE_MARGIN, left: EDGE_MARGIN };
215
+ }
216
+ }
217
+ function isBottomCorner(corner) {
218
+ return corner === "bottom-right" || corner === "bottom-left";
219
+ }
220
+ function isRightCorner(corner) {
221
+ return corner === "bottom-right" || corner === "top-right";
222
+ }
223
+ function snapToCorner(x, y) {
224
+ const cx = window.innerWidth / 2;
225
+ const cy = window.innerHeight / 2;
226
+ if (x < cx) {
227
+ return y < cy ? "top-left" : "bottom-left";
228
+ }
229
+ return y < cy ? "top-right" : "bottom-right";
230
+ }
231
+ var MODES = [
232
+ { mode: "component", label: "Component", icon: MousePointer2 },
233
+ { mode: "viewport", label: "Viewport", icon: Monitor },
234
+ { mode: "fullpage", label: "Full Page", icon: Maximize }
235
+ ];
236
+ function Toolbar({
237
+ expanded,
238
+ onToggle,
239
+ phase,
240
+ loading,
241
+ selectedMode,
242
+ onModeChange,
243
+ onCapture,
244
+ onCancel,
245
+ frameSettings,
246
+ onFrameSettingsChange
247
+ }) {
248
+ const [settingsOpen, setSettingsOpen] = useState2(false);
249
+ const [historyOpen, setHistoryOpen] = useState2(false);
250
+ const [corner, setCorner] = useState2(() => {
251
+ try {
252
+ const stored = localStorage.getItem("ab-toolbar-corner");
253
+ if (stored && ["bottom-right", "bottom-left", "top-right", "top-left"].includes(stored)) {
254
+ return stored;
255
+ }
256
+ } catch {
257
+ }
258
+ return "bottom-right";
259
+ });
190
260
  const [dragging, setDragging] = useState2(false);
191
- const [hovered, setHovered] = useState2(false);
261
+ const [dragPos, setDragPos] = useState2(null);
192
262
  const dragState = useRef(null);
263
+ const toolbarRef = useRef(null);
264
+ const [cameraHovered, setCameraHovered] = useState2(false);
193
265
  useEffect(() => {
194
- setPos((prev) => {
195
- if (prev.x === -1 || prev.y === -1) {
196
- return {
197
- x: window.innerWidth - ICON_SIZE - EDGE_MARGIN,
198
- y: window.innerHeight - ICON_SIZE - EDGE_MARGIN
199
- };
266
+ if (!expanded) return;
267
+ const onKey = (e) => {
268
+ if (e.target?.tagName === "INPUT") {
269
+ if (e.key === "Escape") {
270
+ e.target.blur();
271
+ }
272
+ return;
273
+ }
274
+ if (e.key === "Escape") {
275
+ if (settingsOpen) {
276
+ setSettingsOpen(false);
277
+ return;
278
+ }
279
+ onCancel();
280
+ } else if (e.key === "Enter") {
281
+ onCapture(selectedMode);
200
282
  }
201
- return prev;
202
- });
203
- }, []);
204
- useEffect(() => {
205
- const handleResize = () => {
206
- setPos((prev) => {
207
- if (prev.x === -1 || prev.y === -1) return prev;
208
- const clampedX = Math.max(0, Math.min(prev.x, window.innerWidth - ICON_SIZE));
209
- const clampedY = Math.max(0, Math.min(prev.y, window.innerHeight - ICON_SIZE));
210
- if (clampedX === prev.x && clampedY === prev.y) return prev;
211
- return { x: clampedX, y: clampedY };
212
- });
213
283
  };
214
- window.addEventListener("resize", handleResize);
215
- return () => window.removeEventListener("resize", handleResize);
216
- }, []);
217
- useEffect(() => {
218
- if (pos.x !== -1 && pos.y !== -1) {
219
- onPositionChange?.({ x: pos.x, y: pos.y });
220
- }
221
- }, [pos, onPositionChange]);
284
+ document.addEventListener("keydown", onKey);
285
+ return () => document.removeEventListener("keydown", onKey);
286
+ }, [expanded, onCancel, onCapture, selectedMode, settingsOpen]);
222
287
  const handleMouseDown = useCallback2(
223
288
  (e) => {
224
289
  e.preventDefault();
290
+ const el = toolbarRef.current;
291
+ if (!el) return;
292
+ const rect = el.getBoundingClientRect();
225
293
  setDragging(true);
294
+ setDragPos({ x: rect.left, y: rect.top });
226
295
  dragState.current = {
227
296
  dragging: true,
228
297
  startX: e.clientX,
229
298
  startY: e.clientY,
230
- origX: pos.x,
231
- origY: pos.y,
299
+ origX: rect.left,
300
+ origY: rect.top,
232
301
  distance: 0
233
302
  };
234
303
  },
235
- [pos]
304
+ []
236
305
  );
237
306
  useEffect(() => {
238
307
  const handleMouseMove = (e) => {
@@ -241,23 +310,31 @@ function Icon({ phase, onClick, loading, onPositionChange }) {
241
310
  const dx = e.clientX - ds.startX;
242
311
  const dy = e.clientY - ds.startY;
243
312
  ds.distance = Math.sqrt(dx * dx + dy * dy);
244
- const newX = Math.max(
245
- 0,
246
- Math.min(window.innerWidth - ICON_SIZE, ds.origX + dx)
247
- );
248
- const newY = Math.max(
249
- 0,
250
- Math.min(window.innerHeight - ICON_SIZE, ds.origY + dy)
251
- );
252
- setPos({ x: newX, y: newY });
313
+ setDragPos({
314
+ x: ds.origX + dx,
315
+ y: ds.origY + dy
316
+ });
253
317
  };
254
- const handleMouseUp = () => {
318
+ const handleMouseUp = (e) => {
255
319
  const ds = dragState.current;
256
320
  if (!ds) return;
257
321
  if (ds.distance < 5) {
258
- onClick();
322
+ onToggle();
323
+ } else {
324
+ const el = toolbarRef.current;
325
+ const w = el?.offsetWidth ?? CONTAINER_SIZE;
326
+ const h = el?.offsetHeight ?? CONTAINER_SIZE;
327
+ const centerX = ds.origX + (e.clientX - ds.startX) + w / 2;
328
+ const centerY = ds.origY + (e.clientY - ds.startY) + h / 2;
329
+ const newCorner = snapToCorner(centerX, centerY);
330
+ setCorner(newCorner);
331
+ try {
332
+ localStorage.setItem("ab-toolbar-corner", newCorner);
333
+ } catch {
334
+ }
259
335
  }
260
336
  setDragging(false);
337
+ setDragPos(null);
261
338
  dragState.current = null;
262
339
  };
263
340
  window.addEventListener("mousemove", handleMouseMove);
@@ -266,34 +343,28 @@ function Icon({ phase, onClick, loading, onPositionChange }) {
266
343
  window.removeEventListener("mousemove", handleMouseMove);
267
344
  window.removeEventListener("mouseup", handleMouseUp);
268
345
  };
269
- }, [onClick]);
270
- if (pos.x === -1 || pos.y === -1) return null;
271
- return /* @__PURE__ */ jsxs(
346
+ }, [onToggle]);
347
+ const panelSide = isRightCorner(corner) ? "left" : "right";
348
+ const tooltipSide = panelSide;
349
+ const bottom = isBottomCorner(corner);
350
+ const positionStyle = dragging && dragPos ? { left: dragPos.x, top: dragPos.y } : getCornerStyle(corner);
351
+ const cameraButton = /* @__PURE__ */ jsxs(
272
352
  "div",
273
353
  {
274
- ref,
275
- "data-afterbefore": "true",
276
354
  onMouseDown: handleMouseDown,
355
+ onMouseEnter: () => setCameraHovered(true),
356
+ onMouseLeave: () => setCameraHovered(false),
277
357
  style: {
278
- position: "fixed",
279
- left: pos.x,
280
- top: pos.y,
281
- width: CONTAINER_SIZE,
282
- height: CONTAINER_SIZE,
358
+ width: 32,
359
+ height: 32,
283
360
  borderRadius: "50%",
284
- background: hovered ? "rgb(38, 38, 42)" : "rgb(32, 32, 36)",
285
- border: "none",
286
361
  display: "flex",
287
362
  alignItems: "center",
288
363
  justifyContent: "center",
289
364
  cursor: dragging ? "grabbing" : "pointer",
290
- zIndex: 2147483647,
291
- boxShadow: "0 8px 32px rgba(0, 0, 0, 0.4)",
292
- transition: "background 0.15s",
293
- userSelect: "none"
365
+ background: cameraHovered ? "rgba(255, 255, 255, 0.12)" : "transparent",
366
+ transition: "background 0.12s ease"
294
367
  },
295
- onMouseEnter: () => setHovered(true),
296
- onMouseLeave: () => setHovered(false),
297
368
  children: [
298
369
  /* @__PURE__ */ jsx(
299
370
  "style",
@@ -319,137 +390,89 @@ function Icon({ phase, onClick, loading, onPositionChange }) {
319
390
  {
320
391
  size: 16,
321
392
  strokeWidth: 1.9,
322
- color: hovered ? "rgba(255, 255, 255, 0.96)" : "rgba(255, 255, 255, 0.52)"
393
+ color: cameraHovered ? "rgba(255, 255, 255, 0.96)" : "rgba(255, 255, 255, 0.52)"
323
394
  }
324
395
  )
325
396
  ]
326
397
  }
327
398
  );
328
- }
329
-
330
- // src/overlay/ui/toolbar.tsx
331
- import { useCallback as useCallback3, useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
332
- import {
333
- ArrowUp,
334
- ChevronDown,
335
- Clock,
336
- Maximize,
337
- FolderOpen,
338
- Frame,
339
- ImageIcon,
340
- Monitor,
341
- MousePointer2,
342
- Palette,
343
- Settings,
344
- Trash2,
345
- Upload,
346
- X
347
- } from "lucide-react";
348
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
349
- var MODES = [
350
- { mode: "component", label: "Component", icon: MousePointer2 },
351
- { mode: "viewport", label: "Viewport", icon: Monitor },
352
- { mode: "fullpage", label: "Full Page", icon: Maximize }
353
- ];
354
- function Toolbar({
355
- selectedMode,
356
- onModeChange,
357
- onCapture,
358
- onCancel,
359
- frameSettings,
360
- onFrameSettingsChange
361
- }) {
362
- const [settingsOpen, setSettingsOpen] = useState3(false);
363
- const [historyOpen, setHistoryOpen] = useState3(false);
364
- useEffect2(() => {
365
- const onKey = (e) => {
366
- if (e.target?.tagName === "INPUT") {
367
- if (e.key === "Escape") {
368
- e.target.blur();
369
- }
370
- return;
399
+ const toolbarButtons = expanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
400
+ /* @__PURE__ */ jsx(IconButton, { tooltipSide, tooltip: "Close", onClick: onCancel, children: /* @__PURE__ */ jsx(X, { size: 16, strokeWidth: 1.7 }) }),
401
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 2, padding: "4px 0" }, children: MODES.map(({ mode, label, icon: ModeIcon }) => /* @__PURE__ */ jsx(
402
+ IconButton,
403
+ {
404
+ active: selectedMode === mode,
405
+ tooltipSide,
406
+ tooltip: label,
407
+ onClick: () => {
408
+ setSettingsOpen(false);
409
+ setHistoryOpen(false);
410
+ if (mode === "viewport" || mode === "fullpage") {
411
+ onModeChange(mode);
412
+ onCapture(mode);
413
+ } else {
414
+ onModeChange(mode);
415
+ }
416
+ },
417
+ children: /* @__PURE__ */ jsx(ModeIcon, { size: 16, strokeWidth: 1.7 })
418
+ },
419
+ mode
420
+ )) }),
421
+ /* @__PURE__ */ jsx(Separator, { vertical: false }),
422
+ /* @__PURE__ */ jsx(
423
+ SettingsButton,
424
+ {
425
+ open: settingsOpen,
426
+ onClick: () => {
427
+ setSettingsOpen((prev) => !prev);
428
+ setHistoryOpen(false);
429
+ },
430
+ selectedMode,
431
+ frameSettings,
432
+ onFrameSettingsChange,
433
+ panelSide,
434
+ tooltipSide
371
435
  }
372
- if (e.key === "Escape") {
373
- if (settingsOpen) {
436
+ ),
437
+ /* @__PURE__ */ jsx(
438
+ HistoryButton,
439
+ {
440
+ open: historyOpen,
441
+ onClick: () => {
442
+ setHistoryOpen((prev) => !prev);
374
443
  setSettingsOpen(false);
375
- return;
376
- }
377
- onCancel();
378
- } else if (e.key === "Enter") {
379
- onCapture(selectedMode);
444
+ },
445
+ panelSide,
446
+ tooltipSide
380
447
  }
381
- };
382
- document.addEventListener("keydown", onKey);
383
- return () => document.removeEventListener("keydown", onKey);
384
- }, [onCancel, onCapture, selectedMode, settingsOpen]);
385
- return /* @__PURE__ */ jsx2(
448
+ ),
449
+ /* @__PURE__ */ jsx(Separator, { vertical: false })
450
+ ] }) : null;
451
+ return /* @__PURE__ */ jsx(
386
452
  "div",
387
453
  {
454
+ ref: toolbarRef,
388
455
  "data-afterbefore": "true",
389
456
  style: {
390
457
  position: "fixed",
391
- bottom: 48,
392
- left: "50%",
393
- transform: "translateX(-50%)",
458
+ ...positionStyle,
394
459
  zIndex: 2147483647,
395
460
  display: "flex",
461
+ flexDirection: "column",
396
462
  alignItems: "center",
397
- gap: 10,
398
- flexWrap: "wrap",
399
- justifyContent: "center",
400
- maxWidth: "min(calc(100vw - 32px), 1120px)",
401
463
  background: "rgb(32, 32, 36)",
402
- border: "none",
403
464
  borderRadius: 999,
404
465
  padding: 6,
405
466
  boxShadow: "0 8px 32px rgba(0, 0, 0, 0.4)",
406
- fontFamily: "system-ui, -apple-system, sans-serif"
467
+ fontFamily: "system-ui, -apple-system, sans-serif",
468
+ userSelect: "none"
407
469
  },
408
- children: /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: 0 }, children: [
409
- /* @__PURE__ */ jsx2(IconButton, { tooltip: "Close", onClick: onCancel, children: /* @__PURE__ */ jsx2(X, { size: 16, strokeWidth: 1.7 }) }),
410
- /* @__PURE__ */ jsx2("div", { style: { display: "flex", alignItems: "center", gap: 2, padding: "0 4px" }, children: MODES.map(({ mode, label, icon: ModeIcon }) => /* @__PURE__ */ jsx2(
411
- IconButton,
412
- {
413
- active: selectedMode === mode,
414
- tooltip: label,
415
- onClick: () => {
416
- setSettingsOpen(false);
417
- setHistoryOpen(false);
418
- if (mode === "viewport" || mode === "fullpage") {
419
- onModeChange(mode);
420
- onCapture(mode);
421
- } else {
422
- onModeChange(mode);
423
- }
424
- },
425
- children: /* @__PURE__ */ jsx2(ModeIcon, { size: 16, strokeWidth: 1.7 })
426
- },
427
- mode
428
- )) }),
429
- /* @__PURE__ */ jsx2(Separator, {}),
430
- /* @__PURE__ */ jsx2(
431
- SettingsButton,
432
- {
433
- open: settingsOpen,
434
- onClick: () => {
435
- setSettingsOpen((prev) => !prev);
436
- setHistoryOpen(false);
437
- },
438
- selectedMode,
439
- frameSettings,
440
- onFrameSettingsChange
441
- }
442
- ),
443
- /* @__PURE__ */ jsx2(
444
- HistoryButton,
445
- {
446
- open: historyOpen,
447
- onClick: () => {
448
- setHistoryOpen((prev) => !prev);
449
- setSettingsOpen(false);
450
- }
451
- }
452
- )
470
+ children: bottom ? /* @__PURE__ */ jsxs(Fragment, { children: [
471
+ toolbarButtons,
472
+ cameraButton
473
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
474
+ cameraButton,
475
+ toolbarButtons
453
476
  ] })
454
477
  }
455
478
  );
@@ -458,18 +481,26 @@ function IconButton({
458
481
  children,
459
482
  active,
460
483
  tooltip,
484
+ tooltipSide = "left",
461
485
  onClick
462
486
  }) {
463
- const [hovered, setHovered] = useState3(false);
464
- return /* @__PURE__ */ jsxs2("div", { style: { position: "relative" }, children: [
465
- tooltip && hovered && /* @__PURE__ */ jsx2(
487
+ const [hovered, setHovered] = useState2(false);
488
+ const tooltipStyle = tooltipSide === "left" ? {
489
+ right: "calc(100% + 10px)",
490
+ top: "50%",
491
+ transform: "translateY(-50%)"
492
+ } : {
493
+ left: "calc(100% + 10px)",
494
+ top: "50%",
495
+ transform: "translateY(-50%)"
496
+ };
497
+ return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
498
+ tooltip && hovered && /* @__PURE__ */ jsx(
466
499
  "div",
467
500
  {
468
501
  style: {
469
502
  position: "absolute",
470
- left: "50%",
471
- bottom: "calc(100% + 16px)",
472
- transform: "translateX(-50%)",
503
+ ...tooltipStyle,
473
504
  background: "rgb(32, 32, 36)",
474
505
  border: "1px solid rgba(255, 255, 255, 0.1)",
475
506
  borderRadius: 6,
@@ -483,7 +514,7 @@ function IconButton({
483
514
  children: tooltip
484
515
  }
485
516
  ),
486
- /* @__PURE__ */ jsx2(
517
+ /* @__PURE__ */ jsx(
487
518
  "button",
488
519
  {
489
520
  onClick,
@@ -513,11 +544,13 @@ function SettingsButton({
513
544
  onClick,
514
545
  selectedMode,
515
546
  frameSettings,
516
- onFrameSettingsChange
547
+ onFrameSettingsChange,
548
+ panelSide,
549
+ tooltipSide
517
550
  }) {
518
- const [saveDir, setSaveDir] = useState3(null);
519
- const [picking, setPicking] = useState3(false);
520
- useEffect2(() => {
551
+ const [saveDir, setSaveDir] = useState2(null);
552
+ const [picking, setPicking] = useState2(false);
553
+ useEffect(() => {
521
554
  if (!open) return;
522
555
  fetch("/__afterbefore/config").then((r) => r.json()).then((data) => setSaveDir(data.saveDir)).catch(() => {
523
556
  });
@@ -541,16 +574,15 @@ function SettingsButton({
541
574
  }
542
575
  };
543
576
  const shortDir = saveDir ? saveDir.replace(/^\/Users\/[^/]+/, "~") : "~/Desktop";
544
- return /* @__PURE__ */ jsxs2("div", { style: { position: "relative" }, children: [
545
- /* @__PURE__ */ jsx2(IconButton, { active: open, tooltip: !open ? "Settings" : void 0, onClick, children: /* @__PURE__ */ jsx2(Settings, { size: 16, strokeWidth: 1.7 }) }),
546
- open && /* @__PURE__ */ jsxs2(
577
+ const panelStyle = panelSide === "left" ? { right: "calc(100% + 10px)", top: 0 } : { left: "calc(100% + 10px)", top: 0 };
578
+ return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
579
+ /* @__PURE__ */ jsx(IconButton, { active: open, tooltipSide, tooltip: !open ? "Settings" : void 0, onClick, children: /* @__PURE__ */ jsx(Settings, { size: 16, strokeWidth: 1.7 }) }),
580
+ open && /* @__PURE__ */ jsxs(
547
581
  "div",
548
582
  {
549
583
  style: {
550
584
  position: "absolute",
551
- left: "50%",
552
- bottom: "calc(100% + 12px)",
553
- transform: "translateX(-50%)",
585
+ ...panelStyle,
554
586
  minWidth: 260,
555
587
  padding: "10px 12px",
556
588
  borderRadius: 12,
@@ -559,7 +591,7 @@ function SettingsButton({
559
591
  boxShadow: "0 14px 36px rgba(0, 0, 0, 0.32)"
560
592
  },
561
593
  children: [
562
- /* @__PURE__ */ jsx2(
594
+ /* @__PURE__ */ jsx(
563
595
  "div",
564
596
  {
565
597
  style: {
@@ -572,26 +604,26 @@ function SettingsButton({
572
604
  children: "Settings"
573
605
  }
574
606
  ),
575
- selectedMode === "component" && /* @__PURE__ */ jsxs2(Fragment, { children: [
576
- /* @__PURE__ */ jsx2(
607
+ selectedMode === "component" && /* @__PURE__ */ jsxs(Fragment, { children: [
608
+ /* @__PURE__ */ jsx(
577
609
  ToggleRow,
578
610
  {
579
- icon: /* @__PURE__ */ jsx2(Frame, { size: 15, strokeWidth: 1.8 }),
611
+ icon: /* @__PURE__ */ jsx(Frame, { size: 15, strokeWidth: 1.8 }),
580
612
  label: "Frame",
581
613
  hint: "Wrap component in a sized canvas with background",
582
614
  enabled: frameSettings.enabled,
583
615
  onChange: () => onFrameSettingsChange({ ...frameSettings, enabled: !frameSettings.enabled })
584
616
  }
585
617
  ),
586
- frameSettings.enabled && /* @__PURE__ */ jsxs2("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 10 }, children: [
587
- /* @__PURE__ */ jsx2(
618
+ frameSettings.enabled && /* @__PURE__ */ jsxs("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 10 }, children: [
619
+ /* @__PURE__ */ jsx(
588
620
  FrameSizeControl,
589
621
  {
590
622
  size: frameSettings.size,
591
623
  onChange: (size) => onFrameSettingsChange({ ...frameSettings, size })
592
624
  }
593
625
  ),
594
- /* @__PURE__ */ jsx2(
626
+ /* @__PURE__ */ jsx(
595
627
  FrameBackgroundControl,
596
628
  {
597
629
  bgType: frameSettings.bgType,
@@ -603,8 +635,8 @@ function SettingsButton({
603
635
  )
604
636
  ] })
605
637
  ] }),
606
- selectedMode === "component" && /* @__PURE__ */ jsx2("div", { style: { height: 1, background: "rgba(255,255,255,0.08)", margin: "8px 0" } }),
607
- /* @__PURE__ */ jsx2(
638
+ selectedMode === "component" && /* @__PURE__ */ jsx("div", { style: { height: 1, background: "rgba(255,255,255,0.08)", margin: "8px 0" } }),
639
+ /* @__PURE__ */ jsx(
608
640
  SaveLocationRow,
609
641
  {
610
642
  dir: shortDir,
@@ -621,13 +653,13 @@ function FrameSizeControl({
621
653
  size,
622
654
  onChange
623
655
  }) {
624
- const [sizeOpen, setSizeOpen] = useState3(false);
656
+ const [sizeOpen, setSizeOpen] = useState2(false);
625
657
  const currentPreset = FRAME_SIZE_PRESETS.find((p) => p.w === size.w && p.h === size.h);
626
658
  const isCustom = !currentPreset;
627
- return /* @__PURE__ */ jsxs2("div", { children: [
628
- /* @__PURE__ */ jsx2(SettingsLabel, { children: "Size" }),
629
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: 4, marginTop: 4 }, children: [
630
- /* @__PURE__ */ jsx2(
659
+ return /* @__PURE__ */ jsxs("div", { children: [
660
+ /* @__PURE__ */ jsx(SettingsLabel, { children: "Size" }),
661
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 4, marginTop: 4 }, children: [
662
+ /* @__PURE__ */ jsx(
631
663
  NumInput,
632
664
  {
633
665
  value: size.w,
@@ -637,8 +669,8 @@ function FrameSizeControl({
637
669
  }
638
670
  }
639
671
  ),
640
- /* @__PURE__ */ jsx2(StaticText, { children: "x" }),
641
- /* @__PURE__ */ jsx2(
672
+ /* @__PURE__ */ jsx(StaticText, { children: "x" }),
673
+ /* @__PURE__ */ jsx(
642
674
  NumInput,
643
675
  {
644
676
  value: size.h,
@@ -649,8 +681,8 @@ function FrameSizeControl({
649
681
  }
650
682
  )
651
683
  ] }),
652
- /* @__PURE__ */ jsxs2("div", { style: { position: "relative", marginTop: 6 }, children: [
653
- /* @__PURE__ */ jsxs2(
684
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative", marginTop: 6 }, children: [
685
+ /* @__PURE__ */ jsxs(
654
686
  "button",
655
687
  {
656
688
  onClick: () => setSizeOpen((prev) => !prev),
@@ -672,11 +704,11 @@ function FrameSizeControl({
672
704
  },
673
705
  children: [
674
706
  currentPreset ? currentPreset.label : "Custom",
675
- /* @__PURE__ */ jsx2(ChevronDown, { size: 12, strokeWidth: 2 })
707
+ /* @__PURE__ */ jsx(ChevronDown, { size: 12, strokeWidth: 2 })
676
708
  ]
677
709
  }
678
710
  ),
679
- sizeOpen && /* @__PURE__ */ jsx2(
711
+ sizeOpen && /* @__PURE__ */ jsx(
680
712
  "div",
681
713
  {
682
714
  style: {
@@ -691,7 +723,7 @@ function FrameSizeControl({
691
723
  boxShadow: "0 10px 30px rgba(0, 0, 0, 0.3)",
692
724
  zIndex: 1
693
725
  },
694
- children: FRAME_SIZE_PRESETS.map((preset) => /* @__PURE__ */ jsxs2(
726
+ children: FRAME_SIZE_PRESETS.map((preset) => /* @__PURE__ */ jsxs(
695
727
  DropItem,
696
728
  {
697
729
  active: !isCustom && preset.w === size.w && preset.h === size.h,
@@ -700,8 +732,8 @@ function FrameSizeControl({
700
732
  setSizeOpen(false);
701
733
  },
702
734
  children: [
703
- /* @__PURE__ */ jsx2("span", { children: preset.label }),
704
- /* @__PURE__ */ jsx2("span", { style: { marginLeft: 6, fontSize: 10, color: "rgba(255,255,255,0.34)" }, children: preset.hint })
735
+ /* @__PURE__ */ jsx("span", { children: preset.label }),
736
+ /* @__PURE__ */ jsx("span", { style: { marginLeft: 6, fontSize: 10, color: "rgba(255,255,255,0.34)" }, children: preset.hint })
705
737
  ]
706
738
  },
707
739
  preset.label
@@ -718,7 +750,7 @@ function FrameBackgroundControl({
718
750
  frameSize,
719
751
  onChange
720
752
  }) {
721
- const fileInputRef = useRef2(null);
753
+ const fileInputRef = useRef(null);
722
754
  const handleFileSelect = (e) => {
723
755
  const file = e.target.files?.[0];
724
756
  if (!file) return;
@@ -736,40 +768,40 @@ function FrameBackgroundControl({
736
768
  reader.readAsDataURL(file);
737
769
  e.target.value = "";
738
770
  };
739
- return /* @__PURE__ */ jsxs2("div", { children: [
740
- /* @__PURE__ */ jsx2(SettingsLabel, { children: "Background" }),
741
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 2, marginTop: 4 }, children: [
742
- /* @__PURE__ */ jsxs2(
771
+ return /* @__PURE__ */ jsxs("div", { children: [
772
+ /* @__PURE__ */ jsx(SettingsLabel, { children: "Background" }),
773
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 2, marginTop: 4 }, children: [
774
+ /* @__PURE__ */ jsxs(
743
775
  SegmentButton,
744
776
  {
745
777
  active: bgType === "color",
746
778
  onClick: () => onChange({ bgType: "color" }),
747
779
  style: { borderRadius: "6px 0 0 6px" },
748
780
  children: [
749
- /* @__PURE__ */ jsx2(Palette, { size: 12, strokeWidth: 2 }),
781
+ /* @__PURE__ */ jsx(Palette, { size: 12, strokeWidth: 2 }),
750
782
  "Color"
751
783
  ]
752
784
  }
753
785
  ),
754
- /* @__PURE__ */ jsxs2(
786
+ /* @__PURE__ */ jsxs(
755
787
  SegmentButton,
756
788
  {
757
789
  active: bgType === "image",
758
790
  onClick: () => onChange({ bgType: "image" }),
759
791
  style: { borderRadius: "0 6px 6px 0" },
760
792
  children: [
761
- /* @__PURE__ */ jsx2(ImageIcon, { size: 12, strokeWidth: 2 }),
793
+ /* @__PURE__ */ jsx(ImageIcon, { size: 12, strokeWidth: 2 }),
762
794
  "Image"
763
795
  ]
764
796
  }
765
797
  )
766
798
  ] }),
767
- bgType === "color" && /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: 8, marginTop: 6 }, children: [
768
- /* @__PURE__ */ jsx2(ColorSwatch, { color: bgColor, onChange: (c) => onChange({ bgColor: c }) }),
769
- /* @__PURE__ */ jsx2(HexInput, { value: bgColor, onChange: (c) => onChange({ bgColor: c }) })
799
+ bgType === "color" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginTop: 6 }, children: [
800
+ /* @__PURE__ */ jsx(ColorSwatch, { color: bgColor, onChange: (c) => onChange({ bgColor: c }) }),
801
+ /* @__PURE__ */ jsx(HexInput, { value: bgColor, onChange: (c) => onChange({ bgColor: c }) })
770
802
  ] }),
771
- bgType === "image" && /* @__PURE__ */ jsxs2("div", { style: { marginTop: 6 }, children: [
772
- /* @__PURE__ */ jsx2(
803
+ bgType === "image" && /* @__PURE__ */ jsxs("div", { style: { marginTop: 6 }, children: [
804
+ /* @__PURE__ */ jsx(
773
805
  "input",
774
806
  {
775
807
  ref: fileInputRef,
@@ -779,8 +811,8 @@ function FrameBackgroundControl({
779
811
  style: { display: "none" }
780
812
  }
781
813
  ),
782
- bgImage ? /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
783
- /* @__PURE__ */ jsx2(
814
+ bgImage ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
815
+ /* @__PURE__ */ jsx(
784
816
  "img",
785
817
  {
786
818
  src: bgImage,
@@ -794,20 +826,20 @@ function FrameBackgroundControl({
794
826
  }
795
827
  }
796
828
  ),
797
- /* @__PURE__ */ jsxs2(SmallButton, { onClick: () => fileInputRef.current?.click(), children: [
798
- /* @__PURE__ */ jsx2(Upload, { size: 11, strokeWidth: 2 }),
829
+ /* @__PURE__ */ jsxs(SmallButton, { onClick: () => fileInputRef.current?.click(), children: [
830
+ /* @__PURE__ */ jsx(Upload, { size: 11, strokeWidth: 2 }),
799
831
  "Replace"
800
832
  ] }),
801
- /* @__PURE__ */ jsx2(SmallButton, { onClick: () => onChange({ bgImage: null }), children: /* @__PURE__ */ jsx2(Trash2, { size: 11, strokeWidth: 2 }) })
802
- ] }) : /* @__PURE__ */ jsxs2(SmallButton, { onClick: () => fileInputRef.current?.click(), children: [
803
- /* @__PURE__ */ jsx2(Upload, { size: 11, strokeWidth: 2 }),
833
+ /* @__PURE__ */ jsx(SmallButton, { onClick: () => onChange({ bgImage: null }), children: /* @__PURE__ */ jsx(Trash2, { size: 11, strokeWidth: 2 }) })
834
+ ] }) : /* @__PURE__ */ jsxs(SmallButton, { onClick: () => fileInputRef.current?.click(), children: [
835
+ /* @__PURE__ */ jsx(Upload, { size: 11, strokeWidth: 2 }),
804
836
  "Upload image"
805
837
  ] })
806
838
  ] })
807
839
  ] });
808
840
  }
809
841
  function SettingsLabel({ children }) {
810
- return /* @__PURE__ */ jsx2(
842
+ return /* @__PURE__ */ jsx(
811
843
  "div",
812
844
  {
813
845
  style: {
@@ -825,7 +857,7 @@ function SegmentButton({
825
857
  onClick,
826
858
  style
827
859
  }) {
828
- return /* @__PURE__ */ jsx2(
860
+ return /* @__PURE__ */ jsx(
829
861
  "button",
830
862
  {
831
863
  onClick,
@@ -852,9 +884,9 @@ function ColorSwatch({
852
884
  color,
853
885
  onChange
854
886
  }) {
855
- const inputRef = useRef2(null);
856
- return /* @__PURE__ */ jsxs2("div", { style: { position: "relative" }, children: [
857
- /* @__PURE__ */ jsx2(
887
+ const inputRef = useRef(null);
888
+ return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
889
+ /* @__PURE__ */ jsx(
858
890
  "button",
859
891
  {
860
892
  onClick: () => inputRef.current?.click(),
@@ -869,7 +901,7 @@ function ColorSwatch({
869
901
  }
870
902
  }
871
903
  ),
872
- /* @__PURE__ */ jsx2(
904
+ /* @__PURE__ */ jsx(
873
905
  "input",
874
906
  {
875
907
  ref: inputRef,
@@ -893,8 +925,8 @@ function SmallButton({
893
925
  children,
894
926
  onClick
895
927
  }) {
896
- const [hovered, setHovered] = useState3(false);
897
- return /* @__PURE__ */ jsx2(
928
+ const [hovered, setHovered] = useState2(false);
929
+ return /* @__PURE__ */ jsx(
898
930
  "button",
899
931
  {
900
932
  onClick,
@@ -939,8 +971,8 @@ function SaveLocationRow({
939
971
  picking,
940
972
  onPick
941
973
  }) {
942
- const [btnHovered, setBtnHovered] = useState3(false);
943
- return /* @__PURE__ */ jsx2("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: /* @__PURE__ */ jsxs2(
974
+ const [btnHovered, setBtnHovered] = useState2(false);
975
+ return /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: /* @__PURE__ */ jsxs(
944
976
  "div",
945
977
  {
946
978
  style: {
@@ -951,8 +983,8 @@ function SaveLocationRow({
951
983
  fontSize: 13
952
984
  },
953
985
  children: [
954
- /* @__PURE__ */ jsx2(FolderOpen, { size: 15, strokeWidth: 1.8, style: { flexShrink: 0 } }),
955
- /* @__PURE__ */ jsx2(
986
+ /* @__PURE__ */ jsx(FolderOpen, { size: 15, strokeWidth: 1.8, style: { flexShrink: 0 } }),
987
+ /* @__PURE__ */ jsx(
956
988
  "span",
957
989
  {
958
990
  style: {
@@ -966,7 +998,7 @@ function SaveLocationRow({
966
998
  children: dir
967
999
  }
968
1000
  ),
969
- /* @__PURE__ */ jsx2(
1001
+ /* @__PURE__ */ jsx(
970
1002
  "button",
971
1003
  {
972
1004
  onClick: onPick,
@@ -999,7 +1031,7 @@ function ToggleRow({
999
1031
  enabled,
1000
1032
  onChange
1001
1033
  }) {
1002
- return /* @__PURE__ */ jsxs2(
1034
+ return /* @__PURE__ */ jsxs(
1003
1035
  "label",
1004
1036
  {
1005
1037
  style: {
@@ -1010,8 +1042,8 @@ function ToggleRow({
1010
1042
  cursor: "pointer"
1011
1043
  },
1012
1044
  children: [
1013
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
1014
- /* @__PURE__ */ jsxs2(
1045
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
1046
+ /* @__PURE__ */ jsxs(
1015
1047
  "span",
1016
1048
  {
1017
1049
  style: {
@@ -1028,7 +1060,7 @@ function ToggleRow({
1028
1060
  ]
1029
1061
  }
1030
1062
  ),
1031
- hint && /* @__PURE__ */ jsx2(
1063
+ hint && /* @__PURE__ */ jsx(
1032
1064
  "span",
1033
1065
  {
1034
1066
  style: {
@@ -1040,7 +1072,7 @@ function ToggleRow({
1040
1072
  }
1041
1073
  )
1042
1074
  ] }),
1043
- /* @__PURE__ */ jsx2(
1075
+ /* @__PURE__ */ jsx(
1044
1076
  "button",
1045
1077
  {
1046
1078
  type: "button",
@@ -1057,7 +1089,7 @@ function ToggleRow({
1057
1089
  flexShrink: 0,
1058
1090
  transition: "background 0.12s ease"
1059
1091
  },
1060
- children: /* @__PURE__ */ jsx2(
1092
+ children: /* @__PURE__ */ jsx(
1061
1093
  "span",
1062
1094
  {
1063
1095
  style: {
@@ -1082,14 +1114,14 @@ function NumInput({
1082
1114
  value,
1083
1115
  onChange
1084
1116
  }) {
1085
- const [editing, setEditing] = useState3(false);
1086
- const [text, setText] = useState3(String(value));
1087
- useEffect2(() => {
1117
+ const [editing, setEditing] = useState2(false);
1118
+ const [text, setText] = useState2(String(value));
1119
+ useEffect(() => {
1088
1120
  if (!editing) {
1089
1121
  setText(String(value));
1090
1122
  }
1091
1123
  }, [editing, value]);
1092
- return /* @__PURE__ */ jsx2(
1124
+ return /* @__PURE__ */ jsx(
1093
1125
  "input",
1094
1126
  {
1095
1127
  type: "text",
@@ -1127,9 +1159,9 @@ function HexInput({
1127
1159
  value,
1128
1160
  onChange
1129
1161
  }) {
1130
- const [editing, setEditing] = useState3(false);
1131
- const [text, setText] = useState3(value);
1132
- useEffect2(() => {
1162
+ const [editing, setEditing] = useState2(false);
1163
+ const [text, setText] = useState2(value);
1164
+ useEffect(() => {
1133
1165
  if (!editing) {
1134
1166
  setText(value);
1135
1167
  }
@@ -1140,7 +1172,7 @@ function HexInput({
1140
1172
  onChange(hex);
1141
1173
  }
1142
1174
  };
1143
- return /* @__PURE__ */ jsx2(
1175
+ return /* @__PURE__ */ jsx(
1144
1176
  "input",
1145
1177
  {
1146
1178
  type: "text",
@@ -1175,7 +1207,7 @@ function HexInput({
1175
1207
  );
1176
1208
  }
1177
1209
  function StaticText({ children }) {
1178
- return /* @__PURE__ */ jsx2(
1210
+ return /* @__PURE__ */ jsx(
1179
1211
  "span",
1180
1212
  {
1181
1213
  style: {
@@ -1194,7 +1226,7 @@ function DropItem({
1194
1226
  active,
1195
1227
  accent
1196
1228
  }) {
1197
- return /* @__PURE__ */ jsx2(
1229
+ return /* @__PURE__ */ jsx(
1198
1230
  "button",
1199
1231
  {
1200
1232
  onClick,
@@ -1215,7 +1247,7 @@ function DropItem({
1215
1247
  );
1216
1248
  }
1217
1249
  function Separator({ vertical = true }) {
1218
- return /* @__PURE__ */ jsx2(
1250
+ return /* @__PURE__ */ jsx(
1219
1251
  "div",
1220
1252
  {
1221
1253
  style: {
@@ -1230,22 +1262,25 @@ function Separator({ vertical = true }) {
1230
1262
  }
1231
1263
  function HistoryButton({
1232
1264
  open,
1233
- onClick
1265
+ onClick,
1266
+ panelSide,
1267
+ tooltipSide
1234
1268
  }) {
1235
- const [toast, setToast] = useState3(null);
1236
- const [pushing, setPushing] = useState3(false);
1237
- const [repos, setRepos] = useState3([]);
1238
- const [branches, setBranches] = useState3([]);
1239
- const [screenshots, setScreenshots] = useState3([]);
1240
- const [selectedRepo, setSelectedRepo] = useState3(null);
1241
- const [selectedBranch, setSelectedBranch] = useState3(null);
1242
- const [loading, setLoading] = useState3(false);
1243
- const [repoDropOpen, setRepoDropOpen] = useState3(false);
1244
- const [branchDropOpen, setBranchDropOpen] = useState3(false);
1245
- const [lightboxSrc, setLightboxSrc] = useState3(null);
1246
- const [editingFile, setEditingFile] = useState3(null);
1247
- const [editValue, setEditValue] = useState3("");
1248
- useEffect2(() => {
1269
+ const [toast, setToast] = useState2(null);
1270
+ const [pushing, setPushing] = useState2(false);
1271
+ const [repos, setRepos] = useState2([]);
1272
+ const [branches, setBranches] = useState2([]);
1273
+ const [screenshots, setScreenshots] = useState2([]);
1274
+ const [selectedRepo, setSelectedRepo] = useState2(null);
1275
+ const [selectedBranch, setSelectedBranch] = useState2(null);
1276
+ const [loading, setLoading] = useState2(false);
1277
+ const [repoDropOpen, setRepoDropOpen] = useState2(false);
1278
+ const [branchDropOpen, setBranchDropOpen] = useState2(false);
1279
+ const [lightboxSrc, setLightboxSrc] = useState2(null);
1280
+ const [editingFile, setEditingFile] = useState2(null);
1281
+ const [editValue, setEditValue] = useState2("");
1282
+ const [hoveredThumb, setHoveredThumb] = useState2(null);
1283
+ useEffect(() => {
1249
1284
  if (!open) {
1250
1285
  setRepoDropOpen(false);
1251
1286
  setBranchDropOpen(false);
@@ -1264,7 +1299,7 @@ function HistoryButton({
1264
1299
  }).catch(() => {
1265
1300
  }).finally(() => setLoading(false));
1266
1301
  }, [open, selectedRepo, selectedBranch]);
1267
- const showToast = useCallback3((message, type) => {
1302
+ const showToast = useCallback2((message, type) => {
1268
1303
  setToast({ message, type });
1269
1304
  setTimeout(() => setToast(null), 3e3);
1270
1305
  }, []);
@@ -1347,16 +1382,15 @@ function HistoryButton({
1347
1382
  setPushing(false);
1348
1383
  }
1349
1384
  };
1350
- return /* @__PURE__ */ jsxs2("div", { style: { position: "relative" }, children: [
1351
- /* @__PURE__ */ jsx2(IconButton, { active: open, tooltip: !open ? "Screenshots" : void 0, onClick, children: /* @__PURE__ */ jsx2(Clock, { size: 16, strokeWidth: 1.7 }) }),
1352
- open && /* @__PURE__ */ jsxs2(
1385
+ const panelStyle = panelSide === "left" ? { right: "calc(100% + 10px)", top: 0 } : { left: "calc(100% + 10px)", top: 0 };
1386
+ return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
1387
+ /* @__PURE__ */ jsx(IconButton, { active: open, tooltipSide, tooltip: !open ? "Screenshots" : void 0, onClick, children: /* @__PURE__ */ jsx(Clock, { size: 16, strokeWidth: 1.7 }) }),
1388
+ open && /* @__PURE__ */ jsxs(
1353
1389
  "div",
1354
1390
  {
1355
1391
  style: {
1356
1392
  position: "absolute",
1357
- left: "50%",
1358
- bottom: "calc(100% + 12px)",
1359
- transform: "translateX(-50%)",
1393
+ ...panelStyle,
1360
1394
  minWidth: 300,
1361
1395
  maxWidth: 360,
1362
1396
  padding: "10px 12px",
@@ -1366,7 +1400,7 @@ function HistoryButton({
1366
1400
  boxShadow: "0 14px 36px rgba(0, 0, 0, 0.32)"
1367
1401
  },
1368
1402
  children: [
1369
- /* @__PURE__ */ jsx2(
1403
+ /* @__PURE__ */ jsx(
1370
1404
  "div",
1371
1405
  {
1372
1406
  style: {
@@ -1379,8 +1413,8 @@ function HistoryButton({
1379
1413
  children: "Screenshots"
1380
1414
  }
1381
1415
  ),
1382
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 6, marginBottom: 10 }, children: [
1383
- /* @__PURE__ */ jsx2(
1416
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 6, marginBottom: 10 }, children: [
1417
+ /* @__PURE__ */ jsx(
1384
1418
  FilterDropdown,
1385
1419
  {
1386
1420
  label: "Project",
@@ -1398,7 +1432,7 @@ function HistoryButton({
1398
1432
  }
1399
1433
  }
1400
1434
  ),
1401
- /* @__PURE__ */ jsx2(
1435
+ /* @__PURE__ */ jsx(
1402
1436
  FilterDropdown,
1403
1437
  {
1404
1438
  label: "Branch",
@@ -1416,7 +1450,7 @@ function HistoryButton({
1416
1450
  }
1417
1451
  )
1418
1452
  ] }),
1419
- loading ? /* @__PURE__ */ jsx2(
1453
+ loading ? /* @__PURE__ */ jsx(
1420
1454
  "div",
1421
1455
  {
1422
1456
  style: {
@@ -1427,7 +1461,7 @@ function HistoryButton({
1427
1461
  },
1428
1462
  children: "Loading..."
1429
1463
  }
1430
- ) : screenshots.length === 0 ? /* @__PURE__ */ jsx2(
1464
+ ) : screenshots.length === 0 ? /* @__PURE__ */ jsx(
1431
1465
  "div",
1432
1466
  {
1433
1467
  style: {
@@ -1438,8 +1472,8 @@ function HistoryButton({
1438
1472
  },
1439
1473
  children: "No screenshots yet"
1440
1474
  }
1441
- ) : /* @__PURE__ */ jsxs2(Fragment, { children: [
1442
- /* @__PURE__ */ jsx2(
1475
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
1476
+ /* @__PURE__ */ jsx(
1443
1477
  "div",
1444
1478
  {
1445
1479
  style: {
@@ -1452,7 +1486,7 @@ function HistoryButton({
1452
1486
  children: screenshots.map((shot) => {
1453
1487
  const imgUrl = `/__afterbefore/history/image?repo=${encodeURIComponent(selectedRepo || "")}&branch=${encodeURIComponent(selectedBranch || "")}&file=${encodeURIComponent(shot.filename)}`;
1454
1488
  const isEditing = editingFile === shot.filename;
1455
- return /* @__PURE__ */ jsxs2(
1489
+ return /* @__PURE__ */ jsxs(
1456
1490
  "div",
1457
1491
  {
1458
1492
  style: {
@@ -1461,25 +1495,59 @@ function HistoryButton({
1461
1495
  alignItems: "center"
1462
1496
  },
1463
1497
  children: [
1464
- /* @__PURE__ */ jsx2(
1465
- "img",
1498
+ /* @__PURE__ */ jsxs(
1499
+ "div",
1466
1500
  {
1467
- src: imgUrl,
1468
- alt: "",
1469
- onClick: () => setLightboxSrc(imgUrl),
1470
1501
  style: {
1502
+ position: "relative",
1471
1503
  width: 56,
1472
1504
  height: 36,
1473
- borderRadius: 4,
1474
- objectFit: "cover",
1475
- border: "1px solid rgba(255, 255, 255, 0.1)",
1476
1505
  flexShrink: 0,
1477
- background: "rgba(255, 255, 255, 0.05)",
1506
+ borderRadius: 4,
1507
+ overflow: "hidden",
1478
1508
  cursor: "pointer"
1479
- }
1509
+ },
1510
+ onMouseEnter: () => setHoveredThumb(shot.filename),
1511
+ onMouseLeave: () => setHoveredThumb(null),
1512
+ onClick: () => setLightboxSrc(imgUrl),
1513
+ children: [
1514
+ /* @__PURE__ */ jsx(
1515
+ "img",
1516
+ {
1517
+ src: imgUrl,
1518
+ alt: "",
1519
+ style: {
1520
+ width: 56,
1521
+ height: 36,
1522
+ objectFit: "cover",
1523
+ border: "1px solid rgba(255, 255, 255, 0.1)",
1524
+ borderRadius: 4,
1525
+ background: "rgba(255, 255, 255, 0.05)",
1526
+ display: "block"
1527
+ }
1528
+ }
1529
+ ),
1530
+ /* @__PURE__ */ jsx(
1531
+ "div",
1532
+ {
1533
+ style: {
1534
+ position: "absolute",
1535
+ inset: 0,
1536
+ background: "rgba(0, 0, 0, 0.55)",
1537
+ display: "flex",
1538
+ alignItems: "center",
1539
+ justifyContent: "center",
1540
+ borderRadius: 4,
1541
+ opacity: hoveredThumb === shot.filename ? 1 : 0,
1542
+ transition: "opacity 0.15s ease"
1543
+ },
1544
+ children: /* @__PURE__ */ jsx(Eye, { size: 16, strokeWidth: 1.8, color: "rgba(255, 255, 255, 0.9)" })
1545
+ }
1546
+ )
1547
+ ]
1480
1548
  }
1481
1549
  ),
1482
- /* @__PURE__ */ jsx2("div", { style: { flex: 1, minWidth: 0 }, children: isEditing ? /* @__PURE__ */ jsx2(
1550
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, minWidth: 0 }, children: isEditing ? /* @__PURE__ */ jsx(
1483
1551
  "input",
1484
1552
  {
1485
1553
  autoFocus: true,
@@ -1502,7 +1570,7 @@ function HistoryButton({
1502
1570
  fontFamily: "inherit"
1503
1571
  }
1504
1572
  }
1505
- ) : /* @__PURE__ */ jsx2(
1573
+ ) : /* @__PURE__ */ jsx(
1506
1574
  "div",
1507
1575
  {
1508
1576
  onClick: () => {
@@ -1521,7 +1589,7 @@ function HistoryButton({
1521
1589
  children: formatTimestamp(shot.filename)
1522
1590
  }
1523
1591
  ) }),
1524
- /* @__PURE__ */ jsx2(
1592
+ /* @__PURE__ */ jsx(
1525
1593
  "button",
1526
1594
  {
1527
1595
  onClick: () => handleDelete(shot.filename),
@@ -1548,7 +1616,7 @@ function HistoryButton({
1548
1616
  e.currentTarget.style.color = "rgba(255, 255, 255, 0.35)";
1549
1617
  e.currentTarget.style.background = "transparent";
1550
1618
  },
1551
- children: /* @__PURE__ */ jsx2(Trash2, { size: 13, strokeWidth: 1.8 })
1619
+ children: /* @__PURE__ */ jsx(Trash2, { size: 13, strokeWidth: 1.8 })
1552
1620
  }
1553
1621
  )
1554
1622
  ]
@@ -1558,7 +1626,7 @@ function HistoryButton({
1558
1626
  })
1559
1627
  }
1560
1628
  ),
1561
- /* @__PURE__ */ jsx2(
1629
+ /* @__PURE__ */ jsx(
1562
1630
  "div",
1563
1631
  {
1564
1632
  style: {
@@ -1568,18 +1636,18 @@ function HistoryButton({
1568
1636
  }
1569
1637
  }
1570
1638
  ),
1571
- /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
1572
- /* @__PURE__ */ jsxs2(ActionButton, { onClick: handleOpenFolder, children: [
1573
- /* @__PURE__ */ jsx2(FolderOpen, { size: 13, strokeWidth: 1.8 }),
1639
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
1640
+ /* @__PURE__ */ jsxs(ActionButton, { onClick: handleOpenFolder, children: [
1641
+ /* @__PURE__ */ jsx(FolderOpen, { size: 13, strokeWidth: 1.8 }),
1574
1642
  "Open Folder"
1575
1643
  ] }),
1576
- /* @__PURE__ */ jsxs2(ActionButton, { onClick: handlePush, disabled: pushing, children: [
1577
- /* @__PURE__ */ jsx2(ArrowUp, { size: 13, strokeWidth: 1.8 }),
1644
+ /* @__PURE__ */ jsxs(ActionButton, { onClick: handlePush, disabled: pushing, children: [
1645
+ /* @__PURE__ */ jsx(ArrowUp, { size: 13, strokeWidth: 1.8 }),
1578
1646
  pushing ? "Pushing..." : "Push to PR"
1579
1647
  ] })
1580
1648
  ] })
1581
1649
  ] }),
1582
- toast && /* @__PURE__ */ jsx2(
1650
+ toast && /* @__PURE__ */ jsx(
1583
1651
  "div",
1584
1652
  {
1585
1653
  style: {
@@ -1603,7 +1671,7 @@ function HistoryButton({
1603
1671
  ]
1604
1672
  }
1605
1673
  ),
1606
- lightboxSrc && /* @__PURE__ */ jsxs2(
1674
+ lightboxSrc && /* @__PURE__ */ jsxs(
1607
1675
  "div",
1608
1676
  {
1609
1677
  onClick: () => setLightboxSrc(null),
@@ -1613,7 +1681,8 @@ function HistoryButton({
1613
1681
  style: {
1614
1682
  position: "fixed",
1615
1683
  inset: 0,
1616
- zIndex: 2147483647,
1684
+ bottom: 100,
1685
+ zIndex: 2147483646,
1617
1686
  background: "rgba(0, 0, 0, 0.85)",
1618
1687
  display: "flex",
1619
1688
  alignItems: "center",
@@ -1621,7 +1690,7 @@ function HistoryButton({
1621
1690
  cursor: "zoom-out"
1622
1691
  },
1623
1692
  children: [
1624
- /* @__PURE__ */ jsx2(
1693
+ /* @__PURE__ */ jsx(
1625
1694
  "img",
1626
1695
  {
1627
1696
  src: lightboxSrc,
@@ -1629,14 +1698,14 @@ function HistoryButton({
1629
1698
  onClick: (e) => e.stopPropagation(),
1630
1699
  style: {
1631
1700
  maxWidth: "90vw",
1632
- maxHeight: "90vh",
1701
+ maxHeight: "calc(100% - 32px)",
1633
1702
  borderRadius: 8,
1634
1703
  boxShadow: "0 20px 60px rgba(0, 0, 0, 0.5)",
1635
1704
  cursor: "default"
1636
1705
  }
1637
1706
  }
1638
1707
  ),
1639
- /* @__PURE__ */ jsx2(
1708
+ /* @__PURE__ */ jsx(
1640
1709
  "button",
1641
1710
  {
1642
1711
  onClick: () => setLightboxSrc(null),
@@ -1656,7 +1725,7 @@ function HistoryButton({
1656
1725
  justifyContent: "center",
1657
1726
  padding: 0
1658
1727
  },
1659
- children: /* @__PURE__ */ jsx2(X, { size: 18, strokeWidth: 2 })
1728
+ children: /* @__PURE__ */ jsx(X, { size: 18, strokeWidth: 2 })
1660
1729
  }
1661
1730
  )
1662
1731
  ]
@@ -1672,8 +1741,8 @@ function FilterDropdown({
1672
1741
  onToggle,
1673
1742
  onSelect
1674
1743
  }) {
1675
- return /* @__PURE__ */ jsxs2("div", { children: [
1676
- /* @__PURE__ */ jsx2(
1744
+ return /* @__PURE__ */ jsxs("div", { children: [
1745
+ /* @__PURE__ */ jsx(
1677
1746
  "div",
1678
1747
  {
1679
1748
  style: {
@@ -1685,8 +1754,8 @@ function FilterDropdown({
1685
1754
  children: label
1686
1755
  }
1687
1756
  ),
1688
- /* @__PURE__ */ jsxs2("div", { style: { position: "relative" }, children: [
1689
- /* @__PURE__ */ jsxs2(
1757
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
1758
+ /* @__PURE__ */ jsxs(
1690
1759
  "button",
1691
1760
  {
1692
1761
  onClick: onToggle,
@@ -1707,7 +1776,7 @@ function FilterDropdown({
1707
1776
  fontFamily: "inherit"
1708
1777
  },
1709
1778
  children: [
1710
- /* @__PURE__ */ jsx2(
1779
+ /* @__PURE__ */ jsx(
1711
1780
  "span",
1712
1781
  {
1713
1782
  style: {
@@ -1718,11 +1787,11 @@ function FilterDropdown({
1718
1787
  children: value || "\u2014"
1719
1788
  }
1720
1789
  ),
1721
- /* @__PURE__ */ jsx2(ChevronDown, { size: 12, strokeWidth: 2 })
1790
+ /* @__PURE__ */ jsx(ChevronDown, { size: 12, strokeWidth: 2 })
1722
1791
  ]
1723
1792
  }
1724
1793
  ),
1725
- isOpen && options.length > 0 && /* @__PURE__ */ jsx2(
1794
+ isOpen && options.length > 0 && /* @__PURE__ */ jsx(
1726
1795
  "div",
1727
1796
  {
1728
1797
  style: {
@@ -1739,7 +1808,7 @@ function FilterDropdown({
1739
1808
  boxShadow: "0 10px 30px rgba(0, 0, 0, 0.3)",
1740
1809
  zIndex: 1
1741
1810
  },
1742
- children: options.map((opt) => /* @__PURE__ */ jsx2(
1811
+ children: options.map((opt) => /* @__PURE__ */ jsx(
1743
1812
  DropItem,
1744
1813
  {
1745
1814
  active: opt === value,
@@ -1758,8 +1827,8 @@ function ActionButton({
1758
1827
  onClick,
1759
1828
  disabled
1760
1829
  }) {
1761
- const [hovered, setHovered] = useState3(false);
1762
- return /* @__PURE__ */ jsx2(
1830
+ const [hovered, setHovered] = useState2(false);
1831
+ return /* @__PURE__ */ jsx(
1763
1832
  "button",
1764
1833
  {
1765
1834
  onClick,
@@ -1801,13 +1870,13 @@ function formatTimestamp(filename) {
1801
1870
  }
1802
1871
 
1803
1872
  // src/overlay/ui/inspector.tsx
1804
- import { useEffect as useEffect3, useRef as useRef3, useCallback as useCallback4, useState as useState4 } from "react";
1805
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1873
+ import { useEffect as useEffect2, useRef as useRef2, useCallback as useCallback3, useState as useState3 } from "react";
1874
+ import { jsx as jsx2 } from "react/jsx-runtime";
1806
1875
  function Inspector({ onSelect, onCancel }) {
1807
- const [highlight, setHighlight] = useState4(null);
1808
- const hoveredEl = useRef3(null);
1809
- const styleEl = useRef3(null);
1810
- useEffect3(() => {
1876
+ const [highlight, setHighlight] = useState3(null);
1877
+ const hoveredEl = useRef2(null);
1878
+ const styleEl = useRef2(null);
1879
+ useEffect2(() => {
1811
1880
  const style = document.createElement("style");
1812
1881
  style.setAttribute("data-afterbefore", "true");
1813
1882
  style.textContent = [
@@ -1822,7 +1891,7 @@ function Inspector({ onSelect, onCancel }) {
1822
1891
  style.remove();
1823
1892
  };
1824
1893
  }, []);
1825
- const isOverlayElement = useCallback4((el) => {
1894
+ const isOverlayElement = useCallback3((el) => {
1826
1895
  let node = el;
1827
1896
  while (node) {
1828
1897
  if (node instanceof HTMLElement && node.dataset.afterbefore) return true;
@@ -1830,7 +1899,7 @@ function Inspector({ onSelect, onCancel }) {
1830
1899
  }
1831
1900
  return false;
1832
1901
  }, []);
1833
- const handleMouseMove = useCallback4(
1902
+ const handleMouseMove = useCallback3(
1834
1903
  (e) => {
1835
1904
  const el = document.elementFromPoint(e.clientX, e.clientY);
1836
1905
  if (!el || !(el instanceof HTMLElement) || isOverlayElement(el)) {
@@ -1844,13 +1913,12 @@ function Inspector({ onSelect, onCancel }) {
1844
1913
  x: rect.x,
1845
1914
  y: rect.y,
1846
1915
  width: rect.width,
1847
- height: rect.height,
1848
- tag: el.tagName.toLowerCase() + (el.className && typeof el.className === "string" ? `.${el.className.split(" ")[0]}` : "")
1916
+ height: rect.height
1849
1917
  });
1850
1918
  },
1851
1919
  [isOverlayElement]
1852
1920
  );
1853
- const handleClick = useCallback4(
1921
+ const handleClick = useCallback3(
1854
1922
  (e) => {
1855
1923
  if (isOverlayElement(e.target)) return;
1856
1924
  e.preventDefault();
@@ -1862,7 +1930,7 @@ function Inspector({ onSelect, onCancel }) {
1862
1930
  },
1863
1931
  [onSelect, isOverlayElement]
1864
1932
  );
1865
- const handleKeyDown = useCallback4(
1933
+ const handleKeyDown = useCallback3(
1866
1934
  (e) => {
1867
1935
  if (e.key === "Escape") {
1868
1936
  onCancel();
@@ -1870,7 +1938,7 @@ function Inspector({ onSelect, onCancel }) {
1870
1938
  },
1871
1939
  [onCancel]
1872
1940
  );
1873
- useEffect3(() => {
1941
+ useEffect2(() => {
1874
1942
  document.addEventListener("mousemove", handleMouseMove, true);
1875
1943
  document.addEventListener("click", handleClick, true);
1876
1944
  document.addEventListener("keydown", handleKeyDown);
@@ -1880,49 +1948,27 @@ function Inspector({ onSelect, onCancel }) {
1880
1948
  document.removeEventListener("keydown", handleKeyDown);
1881
1949
  };
1882
1950
  }, [handleMouseMove, handleClick, handleKeyDown]);
1883
- return /* @__PURE__ */ jsx3("div", { "data-afterbefore": "true", style: { position: "fixed", inset: 0, zIndex: 2147483646, pointerEvents: "none" }, children: highlight && /* @__PURE__ */ jsxs3(Fragment2, { children: [
1884
- /* @__PURE__ */ jsx3(
1885
- "div",
1886
- {
1887
- style: {
1888
- position: "fixed",
1889
- left: highlight.x,
1890
- top: highlight.y,
1891
- width: highlight.width,
1892
- height: highlight.height,
1893
- background: "transparent",
1894
- border: "2px solid rgba(255, 255, 255, 0.5)",
1895
- borderRadius: 2,
1896
- boxShadow: "0 0 0 9999px rgba(0, 0, 0, 0.5)",
1897
- pointerEvents: "none"
1898
- }
1899
- }
1900
- ),
1901
- /* @__PURE__ */ jsx3(
1902
- "div",
1903
- {
1904
- style: {
1905
- position: "fixed",
1906
- left: highlight.x,
1907
- top: Math.max(0, highlight.y - 24),
1908
- background: "rgba(0, 0, 0, 0.8)",
1909
- color: "#fff",
1910
- fontSize: 11,
1911
- fontFamily: "system-ui, -apple-system, monospace",
1912
- padding: "2px 6px",
1913
- borderRadius: 3,
1914
- pointerEvents: "none",
1915
- whiteSpace: "nowrap",
1916
- lineHeight: "18px"
1917
- },
1918
- children: highlight.tag
1951
+ return /* @__PURE__ */ jsx2("div", { "data-afterbefore": "true", style: { position: "fixed", inset: 0, zIndex: 2147483646, pointerEvents: "none" }, children: highlight && /* @__PURE__ */ jsx2(
1952
+ "div",
1953
+ {
1954
+ style: {
1955
+ position: "fixed",
1956
+ left: highlight.x,
1957
+ top: highlight.y,
1958
+ width: highlight.width,
1959
+ height: highlight.height,
1960
+ background: "transparent",
1961
+ border: "1px solid #fff",
1962
+ borderRadius: 2,
1963
+ boxShadow: "0 0 0 9999px rgba(0, 0, 0, 0.5)",
1964
+ pointerEvents: "none"
1919
1965
  }
1920
- )
1921
- ] }) });
1966
+ }
1967
+ ) });
1922
1968
  }
1923
1969
 
1924
1970
  // src/overlay/index.tsx
1925
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1971
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
1926
1972
  async function saveCapture(mode, dataUrl) {
1927
1973
  try {
1928
1974
  const res = await fetch("/__afterbefore/save", {
@@ -1940,13 +1986,12 @@ async function saveCapture(mode, dataUrl) {
1940
1986
  }
1941
1987
  function AfterBefore() {
1942
1988
  const { state, captureComplete, reset } = useOverlayState();
1943
- const [toolbarActive, setToolbarActive] = useState5(false);
1944
- const [inspectorActive, setInspectorActive] = useState5(false);
1945
- const [loading, setLoading] = useState5(false);
1946
- const [selectedMode, setSelectedMode] = useState5("component");
1947
- const [frameSettings, setFrameSettings] = useState5(DEFAULT_FRAME_SETTINGS);
1948
- const iconPos = useRef4({ x: 24, y: 0 });
1949
- useEffect4(() => {
1989
+ const [toolbarActive, setToolbarActive] = useState4(false);
1990
+ const [inspectorActive, setInspectorActive] = useState4(false);
1991
+ const [loading, setLoading] = useState4(false);
1992
+ const [selectedMode, setSelectedMode] = useState4("component");
1993
+ const [frameSettings, setFrameSettings] = useState4(DEFAULT_FRAME_SETTINGS);
1994
+ useEffect3(() => {
1950
1995
  try {
1951
1996
  const stored = localStorage.getItem("ab-frame-settings");
1952
1997
  if (stored) {
@@ -1961,7 +2006,7 @@ function AfterBefore() {
1961
2006
  setFrameSettings(DEFAULT_FRAME_SETTINGS);
1962
2007
  }
1963
2008
  }, []);
1964
- useEffect4(() => {
2009
+ useEffect3(() => {
1965
2010
  if (state.phase === "ready") {
1966
2011
  const timer = setTimeout(() => {
1967
2012
  reset();
@@ -1969,13 +2014,7 @@ function AfterBefore() {
1969
2014
  return () => clearTimeout(timer);
1970
2015
  }
1971
2016
  }, [state.phase, reset]);
1972
- const handlePositionChange = useCallback5(
1973
- (pos) => {
1974
- iconPos.current = pos;
1975
- },
1976
- []
1977
- );
1978
- const handleIconClick = useCallback5(() => {
2017
+ const handleToggle = useCallback4(() => {
1979
2018
  if (loading) return;
1980
2019
  if (state.phase === "ready") {
1981
2020
  reset();
@@ -1993,7 +2032,7 @@ function AfterBefore() {
1993
2032
  }
1994
2033
  }
1995
2034
  }, [state.phase, loading, toolbarActive, inspectorActive, selectedMode, reset]);
1996
- const performCapture = useCallback5(
2035
+ const performCapture = useCallback4(
1997
2036
  async (mode, element) => {
1998
2037
  setLoading(true);
1999
2038
  try {
@@ -2012,7 +2051,7 @@ function AfterBefore() {
2012
2051
  },
2013
2052
  [captureComplete, frameSettings]
2014
2053
  );
2015
- const handleToolbarCapture = useCallback5(
2054
+ const handleToolbarCapture = useCallback4(
2016
2055
  (mode) => {
2017
2056
  if (mode === "viewport") {
2018
2057
  setToolbarActive(false);
@@ -2026,10 +2065,11 @@ function AfterBefore() {
2026
2065
  },
2027
2066
  [performCapture]
2028
2067
  );
2029
- const handleToolbarCancel = useCallback5(() => {
2068
+ const handleToolbarCancel = useCallback4(() => {
2030
2069
  setToolbarActive(false);
2070
+ setInspectorActive(false);
2031
2071
  }, []);
2032
- const handleComponentSelect = useCallback5(
2072
+ const handleComponentSelect = useCallback4(
2033
2073
  (element) => {
2034
2074
  setInspectorActive(false);
2035
2075
  setToolbarActive(false);
@@ -2037,34 +2077,29 @@ function AfterBefore() {
2037
2077
  },
2038
2078
  [performCapture]
2039
2079
  );
2040
- const handleComponentCancel = useCallback5(() => {
2080
+ const handleComponentCancel = useCallback4(() => {
2041
2081
  setInspectorActive(false);
2042
2082
  setToolbarActive(true);
2043
2083
  }, []);
2044
- const handleFrameSettingsChange = useCallback5((next) => {
2084
+ const handleFrameSettingsChange = useCallback4((next) => {
2045
2085
  setFrameSettings(next);
2046
2086
  try {
2047
2087
  localStorage.setItem("ab-frame-settings", JSON.stringify(next));
2048
2088
  } catch {
2049
2089
  }
2050
2090
  }, []);
2051
- const handleModeChange = useCallback5((mode) => {
2091
+ const handleModeChange = useCallback4((mode) => {
2052
2092
  setSelectedMode(mode);
2053
2093
  setInspectorActive(mode === "component");
2054
2094
  }, []);
2055
- return /* @__PURE__ */ jsxs4("div", { "data-afterbefore": "true", children: [
2056
- /* @__PURE__ */ jsx4(
2057
- Icon,
2095
+ return /* @__PURE__ */ jsxs2("div", { "data-afterbefore": "true", children: [
2096
+ /* @__PURE__ */ jsx3(
2097
+ Toolbar,
2058
2098
  {
2099
+ expanded: toolbarActive,
2100
+ onToggle: handleToggle,
2059
2101
  phase: state.phase,
2060
- onClick: handleIconClick,
2061
2102
  loading,
2062
- onPositionChange: handlePositionChange
2063
- }
2064
- ),
2065
- toolbarActive && /* @__PURE__ */ jsx4(
2066
- Toolbar,
2067
- {
2068
2103
  selectedMode,
2069
2104
  onModeChange: handleModeChange,
2070
2105
  onCapture: handleToolbarCapture,
@@ -2073,7 +2108,7 @@ function AfterBefore() {
2073
2108
  onFrameSettingsChange: handleFrameSettingsChange
2074
2109
  }
2075
2110
  ),
2076
- inspectorActive && /* @__PURE__ */ jsx4(Inspector, { onSelect: handleComponentSelect, onCancel: handleComponentCancel })
2111
+ inspectorActive && /* @__PURE__ */ jsx3(Inspector, { onSelect: handleComponentSelect, onCancel: handleComponentCancel })
2077
2112
  ] });
2078
2113
  }
2079
2114
  export {