add ClideLightbox — click image cards to enlarge (T-252)

The inline image cards (T-249) are often too small to read. Clicking one now
opens a full-screen lightbox: zoom (scroll wheel / pinch), pan when zoomed,
double-click to reset to fit, Esc / close button / backdrop click to dismiss.

ClideLightbox is a reusable primitive (lib/widgets/) over Flutter's
InteractiveViewer with clide-owned zoom gestures, shown via the DialogRouter
(dimmed backdrop, single modal at a time, D-78). The card stays display-only;
the click is a navigation gesture, not an inline control.

CLI parity (D-6): `clide image show <path> --fullscreen` opens straight into
the lightbox instead of injecting a card.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 10:32:16 +02:00
co-authored by Claude Opus 4.8
parent 7c2d140146
commit 076e66db80
9 changed files with 351 additions and 12 deletions
+8
View File
@@ -49,6 +49,14 @@ void main() {
expect(published.single.data, {'path': '/abs/docs/diagram.png', 'caption': 'before the fix'});
});
test('--fullscreen rides along in the payload (T-252)', () async {
wire();
final r = await show(['docs/diagram.png'], flags: {'fullscreen': true});
expect(r.ok, isTrue, reason: r.error?.message);
expect(r.data['fullscreen'], isTrue);
expect(published.single.data, {'path': '/abs/docs/diagram.png', 'fullscreen': true});
});
test('accepts the documented formats case-insensitively', () async {
for (final name in ['a.PNG', 'b.jpg', 'c.jpeg', 'd.gif', 'e.webp', 'f.bmp']) {
wire(found: {name});