ZDDC/shared
ZDDC b34edcecac feat(browse): markdown editor — editable YAML front matter + DOCX/HTML/PDF download buttons
Two improvements to browse's preview-markdown plugin so it can replace
the standalone mdedit tool:

1. **YAML front-matter editing.** The FM pane above the outline used to
   render a read-only <dl> of parsed keys — sparse and unusable when
   the file had no envelope yet. It's now a dedicated <textarea> that's
   always present. On load, parseFrontMatter() splits the `---\n…\n---`
   envelope off the body: the body feeds Toast UI Editor, the envelope
   feeds the textarea. On save, assembleContent() recombines them.
   Dirty tracking covers both halves via a SHA-256 of the assembled
   bytes. The shell mirrors mdedit's old layout (FM textarea top,
   outline below) but the FM pane is now always functional, eliminating
   the "empty pane over the TOC" problem.

2. **Download as DOCX / HTML / PDF.** When the file handle is HTTP-
   backed (server mode) and the file is a .md, three buttons appear in
   the info header next to Save. Clicking one fetches the server's
   ?convert=<fmt> endpoint and triggers a browser download with a
   clean filename (foo.md → foo.docx). Auto-saves the buffer first if
   dirty so the converted bytes reflect what's on screen.

Helper at window.zddc.source.downloadConverted (shared/zddc-source.js)
so other tools — archive, transmittal — can reuse the same flow later.
Friendly error messages map HTTP 503 / 422 / 504 to actionable toasts.
2026-05-13 10:32:38 -05:00
..
fonts feat(typography): bake IBM Plex Sans + Source Serif 4 into every tool 2026-05-10 20:09:59 -05:00
vendor feat(browse): two-pane shell + markdown plugin + grid mode (Phases A/B/C/D) 2026-05-10 15:46:51 -05:00
base.css feat(responsive): shared narrow-viewport baseline for the header chrome 2026-05-10 20:12:17 -05:00
build-lib.sh build(channels): correct wordlist path for tool-side build invocations 2026-05-07 12:12:46 -05:00
build-words.txt build(channels): swap source-SHA in beta label for a three-word slug 2026-05-07 12:11:23 -05:00
favicon.svg feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
fonts.css feat(typography): bake IBM Plex Sans + Source Serif 4 into every tool 2026-05-10 20:09:59 -05:00
hash.js Initial commit 2026-04-27 11:05:47 -05:00
help.js Initial commit 2026-04-27 11:05:47 -05:00
logo.css feat(shared): clickable logo links every tool's header to project home 2026-05-10 07:34:28 -05:00
logo.js feat(shared): clickable logo links every tool's header to project home 2026-05-10 07:34:28 -05:00
nav.css feat(shared): lateral project-stage strip in every tool's header 2026-05-09 19:50:30 -05:00
nav.js feat(zddc): Phase 4c — stage strip driven by cascade-declared children 2026-05-11 16:34:56 -05:00
preview-lib.js feat(shared): bake xlsx + utif + jszip + docx-preview into every tool 2026-05-10 15:09:38 -05:00
theme.js Initial commit 2026-04-27 11:05:47 -05:00
toast.css feat(shared): non-blocking toast helper available to every tool 2026-05-09 19:04:41 -05:00
toast.js feat(shared): route window.alert() to non-blocking toast 2026-05-10 19:30:36 -05:00
zddc-filter-test.html Initial commit 2026-04-27 11:05:47 -05:00
zddc-filter.js Initial commit 2026-04-27 11:05:47 -05:00
zddc-source.js feat(browse): markdown editor — editable YAML front matter + DOCX/HTML/PDF download buttons 2026-05-13 10:32:38 -05:00
zddc-test.html Initial commit 2026-04-27 11:05:47 -05:00
zddc.js Initial commit 2026-04-27 11:05:47 -05:00
zip-source.js feat(archive,browse): treat .zip transmittal folders as folders + shared zip adapter 2026-05-12 12:29:14 -05:00