Add browser playtest and improve library, media and input

Bundle web bootstrap, icons, local font fallbacks and hosting instructions.
Add optimized WebP/MP3 packaging, asset checks and a browser narration
regression tool. Support browser audio handoff and ad-free explained hints.

Refresh the responsive bookshelf and reduce unnecessary app, narration and
paper repaint work. Preserve deliberate page swipes while tolerating small
mouse movements during cell and navigation clicks.

Validation: all 77 Flutter tests pass; shell, JavaScript and Python scripts
parse; locale and web manifests are valid JSON; git diff --check passes.
This commit is contained in:
Hadrian Burkhardt
2026-11-06 03:33:26 +01:00
parent 7855aafade
commit 7e6b203a02
34 changed files with 1370 additions and 269 deletions
+37
View File
@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:lumen/ui/paper.dart';
void main() {
testWidgets('paper raster layer stays within the viewport on large screens', (
tester,
) async {
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
for (final viewport in [
const Size(1920, 1080),
const Size(3840, 2160),
const Size(390, 844),
]) {
tester.view.physicalSize = viewport;
await tester.pumpWidget(
const MaterialApp(home: Paper(child: SizedBox.expand())),
);
await tester.pumpAndSettle();
final image = find.image(
const AssetImage('assets/artwork/mara-single-page-v2.png'),
);
final bounds = tester.getRect(image);
expect(bounds.left, greaterThanOrEqualTo(0));
expect(bounds.top, greaterThanOrEqualTo(0));
expect(bounds.right, lessThanOrEqualTo(viewport.width));
expect(bounds.bottom, lessThanOrEqualTo(viewport.height));
if (viewport.width > viewport.height) {
expect(bounds.size, viewport);
expect(tester.widget<Image>(image).fit, BoxFit.cover);
} else {
expect(bounds.size, const Size(390, 585));
}
}
});
}