@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/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, lucide-react and `cn` — those are the
8
- * documented substitution points when this directory is mirrored into the
9
- * package (icons → inlined SVGs, cn tailwind-merge), exactly like
10
- * `@ai-matrx/media` was extracted from `features/files`.
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 deliberate: after ~1.2s of recording the button latches, so a user
454
- * whose finger slips does not lose the take. Once latched, the next tap stops.
455
- * Without it, the single-button model punishes exactly the long recordings it
456
- * exists to make easy.
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, lucide-react and `cn` — those are the
8
- * documented substitution points when this directory is mirrored into the
9
- * package (icons → inlined SVGs, cn tailwind-merge), exactly like
10
- * `@ai-matrx/media` was extracted from `features/files`.
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 deliberate: after ~1.2s of recording the button latches, so a user
454
- * whose finger slips does not lose the take. Once latched, the next tap stops.
455
- * Without it, the single-button model punishes exactly the long recordings it
456
- * exists to make easy.
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