@ai-matrx/capture 0.3.1 → 0.4.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 +14 -0
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/react.cjs +509 -274
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +20 -15
- package/dist/react.d.ts +20 -15
- package/dist/react.js +509 -294
- package/dist/react.js.map +1 -1
- package/package.json +1 -2
package/dist/react.d.cts
CHANGED
|
@@ -4,10 +4,11 @@ import React__default from 'react';
|
|
|
4
4
|
/**
|
|
5
5
|
* features/capture-camera/ — EXTRACTION SOURCE for the `@ai-matrx/capture`
|
|
6
6
|
* package (aidream/apps/shared/capture). Everything outside `host/` must stay
|
|
7
|
-
* free of app imports beyond React
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `@ai-matrx/media` was
|
|
7
|
+
* free of app imports beyond React and `cn` — those are the documented
|
|
8
|
+
* substitution points when this directory is mirrored into the package
|
|
9
|
+
* (icons → the package's own inlined SVGs in `components/icons.tsx` per
|
|
10
|
+
* ruling C19, cn → tailwind-merge), exactly like `@ai-matrx/media` was
|
|
11
|
+
* extracted from `features/files`.
|
|
11
12
|
*
|
|
12
13
|
* The package is the OPINIONATED iPhone-style camera chrome: translucent
|
|
13
14
|
* top/bottom bars over a full-bleed feed, the two-tap options grid, zoom
|
|
@@ -78,7 +79,7 @@ interface CaptureOptionTile {
|
|
|
78
79
|
/** Highlight state (iPhone: yellow when engaged/auto). */
|
|
79
80
|
active?: boolean;
|
|
80
81
|
/** Small value read-out under the icon (e.g. "3s", "4:3"). */
|
|
81
|
-
valueLabel?: string;
|
|
82
|
+
valueLabel?: string | undefined;
|
|
82
83
|
disabled?: boolean;
|
|
83
84
|
onPress: () => void;
|
|
84
85
|
}
|
|
@@ -110,7 +111,7 @@ interface CaptureCameraSlots {
|
|
|
110
111
|
id: string;
|
|
111
112
|
label: string;
|
|
112
113
|
onSelect: () => void;
|
|
113
|
-
}[];
|
|
114
|
+
}[] | undefined;
|
|
114
115
|
/** Free overlays rendered above everything (sheets, pagers). */
|
|
115
116
|
overlays?: React.ReactNode;
|
|
116
117
|
}
|
|
@@ -123,7 +124,7 @@ interface CaptureRailAction {
|
|
|
123
124
|
/** Engaged/on — rendered in the accent colour. */
|
|
124
125
|
active?: boolean;
|
|
125
126
|
/** A short read-out under the icon (e.g. "3s", "4:3", "Auto"). */
|
|
126
|
-
valueLabel?: string;
|
|
127
|
+
valueLabel?: string | undefined;
|
|
127
128
|
disabled?: boolean;
|
|
128
129
|
/**
|
|
129
130
|
* Primary actions stay visible when the rail is collapsed. Everything else
|
|
@@ -446,14 +447,18 @@ declare function CaptureRail({ actions, defaultExpanded, className, }: CaptureRa
|
|
|
446
447
|
* pointerdown → arm a hold timer (HOLD_MS)
|
|
447
448
|
* timer fires → start recording, ring begins filling
|
|
448
449
|
* pointerup < HOLD_MS → cancel the timer, take a photo
|
|
449
|
-
* pointerup >= HOLD_MS → stop recording
|
|
450
|
+
* pointerup >= HOLD_MS → stop recording (recording follows the finger)
|
|
451
|
+
* slide up ≥ LOCK_DRAG_PX while holding → LOCK: release keeps recording,
|
|
452
|
+
* the next tap stops
|
|
450
453
|
* pointercancel / leave → same as pointerup (a drag off the button must not
|
|
451
454
|
* leave the camera recording with nothing to stop it)
|
|
452
455
|
*
|
|
453
|
-
* A LOCK is
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
456
|
+
* A LOCK is a GESTURE, never a timer (Arman, 2026-08-30: recording follows
|
|
457
|
+
* the finger — releasing stops, full stop — unless the user deliberately
|
|
458
|
+
* locks): while holding a recording, slide UP to the lock target that
|
|
459
|
+
* appears above the button. Locked, release keeps recording and the next
|
|
460
|
+
* tap stops. An automatic time-based latch shipped first and was wrong —
|
|
461
|
+
* it silently converted "I let go" into "still recording".
|
|
457
462
|
*
|
|
458
463
|
* Presentational only — the host owns the recorder.
|
|
459
464
|
*/
|
|
@@ -584,9 +589,9 @@ interface MediaViewerProps {
|
|
|
584
589
|
/** Key of the item to open on. */
|
|
585
590
|
initialKey: string | null;
|
|
586
591
|
onClose: () => void;
|
|
587
|
-
onDelete?: (item: CaptureMediaItem) => void;
|
|
592
|
+
onDelete?: ((item: CaptureMediaItem) => void) | undefined;
|
|
588
593
|
/** Offered on photo items with a renderable URL. */
|
|
589
|
-
onEdit?: (item: CaptureMediaItem) => void;
|
|
594
|
+
onEdit?: ((item: CaptureMediaItem) => void) | undefined;
|
|
590
595
|
/** What deleting costs, stated BEFORE the delete (destructive-actions
|
|
591
596
|
* rule). Override per domain; deletion is never one silent tap. */
|
|
592
597
|
deleteConsequence?: string;
|
|
@@ -624,7 +629,7 @@ interface ModeSelectorProps {
|
|
|
624
629
|
id: string;
|
|
625
630
|
label: string;
|
|
626
631
|
onSelect: () => void;
|
|
627
|
-
}[];
|
|
632
|
+
}[] | undefined;
|
|
628
633
|
}
|
|
629
634
|
declare function ModeSelector({ mode, onModeChange, onUpload, modeDisabled, uploadDisabled, extraModes, }: ModeSelectorProps): React__default.JSX.Element;
|
|
630
635
|
|
package/dist/react.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ import React__default from 'react';
|
|
|
4
4
|
/**
|
|
5
5
|
* features/capture-camera/ — EXTRACTION SOURCE for the `@ai-matrx/capture`
|
|
6
6
|
* package (aidream/apps/shared/capture). Everything outside `host/` must stay
|
|
7
|
-
* free of app imports beyond React
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `@ai-matrx/media` was
|
|
7
|
+
* free of app imports beyond React and `cn` — those are the documented
|
|
8
|
+
* substitution points when this directory is mirrored into the package
|
|
9
|
+
* (icons → the package's own inlined SVGs in `components/icons.tsx` per
|
|
10
|
+
* ruling C19, cn → tailwind-merge), exactly like `@ai-matrx/media` was
|
|
11
|
+
* extracted from `features/files`.
|
|
11
12
|
*
|
|
12
13
|
* The package is the OPINIONATED iPhone-style camera chrome: translucent
|
|
13
14
|
* top/bottom bars over a full-bleed feed, the two-tap options grid, zoom
|
|
@@ -78,7 +79,7 @@ interface CaptureOptionTile {
|
|
|
78
79
|
/** Highlight state (iPhone: yellow when engaged/auto). */
|
|
79
80
|
active?: boolean;
|
|
80
81
|
/** Small value read-out under the icon (e.g. "3s", "4:3"). */
|
|
81
|
-
valueLabel?: string;
|
|
82
|
+
valueLabel?: string | undefined;
|
|
82
83
|
disabled?: boolean;
|
|
83
84
|
onPress: () => void;
|
|
84
85
|
}
|
|
@@ -110,7 +111,7 @@ interface CaptureCameraSlots {
|
|
|
110
111
|
id: string;
|
|
111
112
|
label: string;
|
|
112
113
|
onSelect: () => void;
|
|
113
|
-
}[];
|
|
114
|
+
}[] | undefined;
|
|
114
115
|
/** Free overlays rendered above everything (sheets, pagers). */
|
|
115
116
|
overlays?: React.ReactNode;
|
|
116
117
|
}
|
|
@@ -123,7 +124,7 @@ interface CaptureRailAction {
|
|
|
123
124
|
/** Engaged/on — rendered in the accent colour. */
|
|
124
125
|
active?: boolean;
|
|
125
126
|
/** A short read-out under the icon (e.g. "3s", "4:3", "Auto"). */
|
|
126
|
-
valueLabel?: string;
|
|
127
|
+
valueLabel?: string | undefined;
|
|
127
128
|
disabled?: boolean;
|
|
128
129
|
/**
|
|
129
130
|
* Primary actions stay visible when the rail is collapsed. Everything else
|
|
@@ -446,14 +447,18 @@ declare function CaptureRail({ actions, defaultExpanded, className, }: CaptureRa
|
|
|
446
447
|
* pointerdown → arm a hold timer (HOLD_MS)
|
|
447
448
|
* timer fires → start recording, ring begins filling
|
|
448
449
|
* pointerup < HOLD_MS → cancel the timer, take a photo
|
|
449
|
-
* pointerup >= HOLD_MS → stop recording
|
|
450
|
+
* pointerup >= HOLD_MS → stop recording (recording follows the finger)
|
|
451
|
+
* slide up ≥ LOCK_DRAG_PX while holding → LOCK: release keeps recording,
|
|
452
|
+
* the next tap stops
|
|
450
453
|
* pointercancel / leave → same as pointerup (a drag off the button must not
|
|
451
454
|
* leave the camera recording with nothing to stop it)
|
|
452
455
|
*
|
|
453
|
-
* A LOCK is
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
456
|
+
* A LOCK is a GESTURE, never a timer (Arman, 2026-08-30: recording follows
|
|
457
|
+
* the finger — releasing stops, full stop — unless the user deliberately
|
|
458
|
+
* locks): while holding a recording, slide UP to the lock target that
|
|
459
|
+
* appears above the button. Locked, release keeps recording and the next
|
|
460
|
+
* tap stops. An automatic time-based latch shipped first and was wrong —
|
|
461
|
+
* it silently converted "I let go" into "still recording".
|
|
457
462
|
*
|
|
458
463
|
* Presentational only — the host owns the recorder.
|
|
459
464
|
*/
|
|
@@ -584,9 +589,9 @@ interface MediaViewerProps {
|
|
|
584
589
|
/** Key of the item to open on. */
|
|
585
590
|
initialKey: string | null;
|
|
586
591
|
onClose: () => void;
|
|
587
|
-
onDelete?: (item: CaptureMediaItem) => void;
|
|
592
|
+
onDelete?: ((item: CaptureMediaItem) => void) | undefined;
|
|
588
593
|
/** Offered on photo items with a renderable URL. */
|
|
589
|
-
onEdit?: (item: CaptureMediaItem) => void;
|
|
594
|
+
onEdit?: ((item: CaptureMediaItem) => void) | undefined;
|
|
590
595
|
/** What deleting costs, stated BEFORE the delete (destructive-actions
|
|
591
596
|
* rule). Override per domain; deletion is never one silent tap. */
|
|
592
597
|
deleteConsequence?: string;
|
|
@@ -624,7 +629,7 @@ interface ModeSelectorProps {
|
|
|
624
629
|
id: string;
|
|
625
630
|
label: string;
|
|
626
631
|
onSelect: () => void;
|
|
627
|
-
}[];
|
|
632
|
+
}[] | undefined;
|
|
628
633
|
}
|
|
629
634
|
declare function ModeSelector({ mode, onModeChange, onUpload, modeDisabled, uploadDisabled, extraModes, }: ModeSelectorProps): React__default.JSX.Element;
|
|
630
635
|
|