@ai-matrx/capture 0.5.1 → 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/CHANGELOG.md +5 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/react.cjs +32 -10
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +32 -10
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/capture
|
|
2
2
|
|
|
3
|
+
## 0.5.2 — 2026-09-01
|
|
4
|
+
|
|
5
|
+
- `CameraCapture` no longer wraps the injected recents thumbnail in its Open-library button. Persisted-media error fallbacks may own remedy buttons (for example, Copy URL); those controls now remain valid siblings, act without also opening the library, and the non-interactive thumbnail area still opens the library.
|
|
6
|
+
- Added an exact fail-first regression covering the real `InlineMediaRef` error-panel shape and preventing nested interactive markup from returning.
|
|
7
|
+
|
|
3
8
|
## 0.1.0 — 2026-08-29
|
|
4
9
|
|
|
5
10
|
Initial extraction from matrx-frontend `features/capture-camera/` (the iPhone-style rebuild of the commerce intake camera, generalized):
|
package/dist/index.d.cts
CHANGED
|
@@ -33,8 +33,8 @@ type CaptureAspect = "full" | "4:3" | "1:1" | "16:9";
|
|
|
33
33
|
*/
|
|
34
34
|
interface CaptureCloudPort {
|
|
35
35
|
/** Content of the bottom-left recents thumbnail (latest cloud/session
|
|
36
|
-
* media). Null renders the placeholder
|
|
37
|
-
* library. */
|
|
36
|
+
* media). Null renders the placeholder. Non-interactive thumbnail space
|
|
37
|
+
* opens the library; any injected remedy control owns its own action. */
|
|
38
38
|
recentsThumb: React.ReactNode;
|
|
39
39
|
/** Opens the host's cloud media library (tiled gallery). */
|
|
40
40
|
onOpenLibrary: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ type CaptureAspect = "full" | "4:3" | "1:1" | "16:9";
|
|
|
33
33
|
*/
|
|
34
34
|
interface CaptureCloudPort {
|
|
35
35
|
/** Content of the bottom-left recents thumbnail (latest cloud/session
|
|
36
|
-
* media). Null renders the placeholder
|
|
37
|
-
* library. */
|
|
36
|
+
* media). Null renders the placeholder. Non-interactive thumbnail space
|
|
37
|
+
* opens the library; any injected remedy control owns its own action. */
|
|
38
38
|
recentsThumb: React.ReactNode;
|
|
39
39
|
/** Opens the host's cloud media library (tiled gallery). */
|
|
40
40
|
onOpenLibrary: () => void;
|
package/dist/react.cjs
CHANGED
|
@@ -1553,6 +1553,18 @@ function CameraCapture({
|
|
|
1553
1553
|
const [timerSetting, setTimerSetting] = (0, import_react5.useState)(0);
|
|
1554
1554
|
const [aspect, setAspect] = (0, import_react5.useState)("full");
|
|
1555
1555
|
const [exposureOpen, setExposureOpen] = (0, import_react5.useState)(false);
|
|
1556
|
+
const openLibraryFromRecents = (0, import_react5.useCallback)(
|
|
1557
|
+
(event) => {
|
|
1558
|
+
const target = event.target;
|
|
1559
|
+
if (target instanceof Element && target.closest(
|
|
1560
|
+
"button, a, input, select, textarea, [role='button'], [role='link']"
|
|
1561
|
+
)) {
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1564
|
+
cloud.onOpenLibrary();
|
|
1565
|
+
},
|
|
1566
|
+
[cloud]
|
|
1567
|
+
);
|
|
1556
1568
|
const [countdown, setCountdown] = (0, import_react5.useState)(null);
|
|
1557
1569
|
const [blockedDismissed, setBlockedDismissed] = (0, import_react5.useState)(false);
|
|
1558
1570
|
const countdownRef = (0, import_react5.useRef)(null);
|
|
@@ -1800,16 +1812,26 @@ function CameraCapture({
|
|
|
1800
1812
|
slots.modeRowTrailing && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "shrink-0", children: slots.modeRowTrailing })
|
|
1801
1813
|
] }),
|
|
1802
1814
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between px-2 pb-1.5 pt-0.5", children: [
|
|
1803
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-14 justify-start", children: [
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1817
|
+
"div",
|
|
1818
|
+
{
|
|
1819
|
+
onClick: openLibraryFromRecents,
|
|
1820
|
+
className: "h-11 w-11 touch-manipulation overflow-hidden rounded-xl bg-white/10 ring-1 ring-white/25 transition-transform active:scale-95",
|
|
1821
|
+
children: cloud.recentsThumb ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block h-full w-full bg-white/5" })
|
|
1822
|
+
}
|
|
1823
|
+
),
|
|
1824
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1825
|
+
"button",
|
|
1826
|
+
{
|
|
1827
|
+
type: "button",
|
|
1828
|
+
onClick: cloud.onOpenLibrary,
|
|
1829
|
+
"aria-label": "Open your media library",
|
|
1830
|
+
className: "sr-only",
|
|
1831
|
+
children: "Open your media library"
|
|
1832
|
+
}
|
|
1833
|
+
)
|
|
1834
|
+
] }),
|
|
1813
1835
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1814
1836
|
ShutterButton,
|
|
1815
1837
|
{
|