Refresh UI components and showcase; release updated framework packages

This commit is contained in:
Clintchiz committed 2026-09-20 18:13:24 +05:30
1 parent d800228585
commit c77f5e1cec
293 files changed
+22544 -35778

No files matched your search

@@ -0,0 +1,8 @@
import { test, expect } from "bun:test";
import manifest from "../package.json";
test("published viewer retains browser auto-mount side effects", () => {
// The runtime registers renderers and installs DOM/navigation listeners on import.
// Marking split published chunks side-effect-free drops those initializers.
expect(manifest.sideEffects).toBe(true);
});
+10
View File
@@ -12,6 +12,16 @@ function fixture() {
window.document.body.append(host);
return { window, host: host as unknown as HTMLElement };
}
test('hideName hides only the visual title and preserves the file identity',async()=>{
const {window,host}=fixture();
const dispose=mountViewer(host,{name:'report.txt',blob:new Blob(['hello'])},{hideName:true});
await settled();
expect(host.querySelector<HTMLElement>('[data-viewer-title]')?.hidden??host.querySelector<HTMLElement>('.wrn-viewer-toolbar span')?.hidden).toBe(true);
expect(host.getAttribute('aria-label')).toBe('report.txt');
expect(host.querySelector<HTMLAnchorElement>('a[download]')?.download).toBe('report.txt');
dispose();window.close();
});
test("image controls, failure fallback, and teardown", async () => {
const { window, host } = fixture();
const dispose = mountViewer(host, {