git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
Add CameraView: live AVCaptureVideoPreviewLayer in React Native
commit06fadda1d125c6e782903c109d34aa983c8dfc3e authorMark <mark.eibes@gmail.com> dateMon 16 Feb 2026, 00:02 (8 months ago) parentddce2a7
3 files changed+24
test/MacOSComponents.test.js+9 test/MacOSSnapshots.test.js+6 test/__snapshots__/MacOSSnapshots.test.js.snap+9
test/MacOSComponents.test.js+9
@@ -205,3 +205,12 @@ describe("macOS native component FFI exports (batch 4)", () => {
205205 expect(pdfViewImpl).toBe("MacOSPDFView");
206206 });
207207});
208+
209+// Batch 5
210+import { cameraViewImpl } from "../src/Yoga/React/Native/MacOS/CameraView.js";
211+
212+describe("macOS native component FFI exports (batch 5)", () => {
213+ it("CameraView resolves to MacOSCameraView", () => {
214+ expect(cameraViewImpl).toBe("MacOSCameraView");
215+ });
216+});
test/MacOSSnapshots.test.js+6
@@ -73,6 +73,7 @@ import { tableViewImpl } from "../src/Yoga/React/Native/MacOS/TableView.js";
7373import { outlineViewImpl } from "../src/Yoga/React/Native/MacOS/OutlineView.js";
7474import { mapViewImpl } from "../src/Yoga/React/Native/MacOS/MapView.js";
7575import { pdfViewImpl } from "../src/Yoga/React/Native/MacOS/PDFView.js";
76+import { cameraViewImpl } from "../src/Yoga/React/Native/MacOS/CameraView.js";
7677
7778// Container components (with children)
7879import { sheetImpl } from "../src/Yoga/React/Native/MacOS/Sheet.js";
@@ -470,4 +471,9 @@ describe("macOS component snapshots", () => {
470471 );
471472 expect(toJSON()).toMatchSnapshot();
472473 });
474+
475+ it("CameraView", () => {
476+ const { toJSON } = render(el(cameraViewImpl, { active: true }));
477+ expect(toJSON()).toMatchSnapshot();
478+ });
473479});
test/__snapshots__/MacOSSnapshots.test.js.snap+9
@@ -33,6 +33,15 @@ exports[`macOS component snapshots > Button 1`] = `
3333}
3434`;
3535
36+exports[`macOS component snapshots > CameraView 1`] = `
37+{
38+ "props": {
39+ "active": true,
40+ },
41+ "type": "MacOSCameraView",
42+}
43+`;
44+
3645exports[`macOS component snapshots > Checkbox checked 1`] = `
3746{
3847 "props": {