From fb27e478662bb0daeb773dcf1efec4c974b59443 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Wed, 13 May 2026 11:14:17 -0500 Subject: [PATCH] fix(browse): bundle shared/zddc-source.js so downloadConverted is available The markdown editor's DOCX/HTML/PDF download buttons silently no-op'd because the gate `typeof window.zddc.source.downloadConverted === 'function'` always failed: browse rolls its own server-mode detection (state.source === 'server' + node.url) and never needed the shared/ zddc-source.js polyfill before. The new download helper lives on window.zddc.source, so browse needs to bundle it. Adds ../shared/zddc-source.js to browse/build.sh's concat_files list, right after preview-lib.js. Bundle gains ~12 KB; tools that don't need the polyfill (browse doesn't use HttpDirectoryHandle directly) pay a small footprint cost in exchange for getting the helper. --- browse/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/browse/build.sh b/browse/build.sh index 65243b8..72838b6 100755 --- a/browse/build.sh +++ b/browse/build.sh @@ -49,6 +49,7 @@ concat_files \ "../shared/logo.js" \ "../shared/help.js" \ "../shared/preview-lib.js" \ + "../shared/zddc-source.js" \ "js/init.js" \ "js/loader.js" \ "js/tree.js" \