@ai-matrx/capture 0.5.0 → 0.5.2

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/react.d.cts CHANGED
@@ -34,8 +34,8 @@ type CaptureAspect = "full" | "4:3" | "1:1" | "16:9";
34
34
  */
35
35
  interface CaptureCloudPort {
36
36
  /** Content of the bottom-left recents thumbnail (latest cloud/session
37
- * media). Null renders the placeholder the button still opens the
38
- * library. */
37
+ * media). Null renders the placeholder. Non-interactive thumbnail space
38
+ * opens the library; any injected remedy control owns its own action. */
39
39
  recentsThumb: React.ReactNode;
40
40
  /** Opens the host's cloud media library (tiled gallery). */
41
41
  onOpenLibrary: () => void;
package/dist/react.d.ts CHANGED
@@ -34,8 +34,8 @@ type CaptureAspect = "full" | "4:3" | "1:1" | "16:9";
34
34
  */
35
35
  interface CaptureCloudPort {
36
36
  /** Content of the bottom-left recents thumbnail (latest cloud/session
37
- * media). Null renders the placeholder the button still opens the
38
- * library. */
37
+ * media). Null renders the placeholder. Non-interactive thumbnail space
38
+ * opens the library; any injected remedy control owns its own action. */
39
39
  recentsThumb: React.ReactNode;
40
40
  /** Opens the host's cloud media library (tiled gallery). */
41
41
  onOpenLibrary: () => void;
package/dist/react.js CHANGED
@@ -1498,6 +1498,18 @@ function CameraCapture({
1498
1498
  const [timerSetting, setTimerSetting] = useState5(0);
1499
1499
  const [aspect, setAspect] = useState5("full");
1500
1500
  const [exposureOpen, setExposureOpen] = useState5(false);
1501
+ const openLibraryFromRecents = useCallback4(
1502
+ (event) => {
1503
+ const target = event.target;
1504
+ if (target instanceof Element && target.closest(
1505
+ "button, a, input, select, textarea, [role='button'], [role='link']"
1506
+ )) {
1507
+ return;
1508
+ }
1509
+ cloud.onOpenLibrary();
1510
+ },
1511
+ [cloud]
1512
+ );
1501
1513
  const [countdown, setCountdown] = useState5(null);
1502
1514
  const [blockedDismissed, setBlockedDismissed] = useState5(false);
1503
1515
  const countdownRef = useRef3(null);
@@ -1745,16 +1757,26 @@ function CameraCapture({
1745
1757
  slots.modeRowTrailing && /* @__PURE__ */ jsx12("div", { className: "shrink-0", children: slots.modeRowTrailing })
1746
1758
  ] }),
1747
1759
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between px-2 pb-1.5 pt-0.5", children: [
1748
- /* @__PURE__ */ jsx12("div", { className: "flex w-14 justify-start", children: /* @__PURE__ */ jsx12(
1749
- "button",
1750
- {
1751
- type: "button",
1752
- onClick: cloud.onOpenLibrary,
1753
- "aria-label": "Open your media library",
1754
- className: "h-11 w-11 touch-manipulation overflow-hidden rounded-xl bg-white/10 ring-1 ring-white/25 transition-transform active:scale-95",
1755
- children: cloud.recentsThumb ?? /* @__PURE__ */ jsx12("span", { className: "block h-full w-full bg-white/5" })
1756
- }
1757
- ) }),
1760
+ /* @__PURE__ */ jsxs10("div", { className: "flex w-14 justify-start", children: [
1761
+ /* @__PURE__ */ jsx12(
1762
+ "div",
1763
+ {
1764
+ onClick: openLibraryFromRecents,
1765
+ className: "h-11 w-11 touch-manipulation overflow-hidden rounded-xl bg-white/10 ring-1 ring-white/25 transition-transform active:scale-95",
1766
+ children: cloud.recentsThumb ?? /* @__PURE__ */ jsx12("span", { className: "block h-full w-full bg-white/5" })
1767
+ }
1768
+ ),
1769
+ /* @__PURE__ */ jsx12(
1770
+ "button",
1771
+ {
1772
+ type: "button",
1773
+ onClick: cloud.onOpenLibrary,
1774
+ "aria-label": "Open your media library",
1775
+ className: "sr-only",
1776
+ children: "Open your media library"
1777
+ }
1778
+ )
1779
+ ] }),
1758
1780
  /* @__PURE__ */ jsx12(
1759
1781
  ShutterButton,
1760
1782
  {