Commit Graph
666 Commits
Author SHA1 Message Date
Steffen Becker dc06d88299 test: own soffice profile for the render-consistency leg
Run in parallel with lo-roundtrip, both soffice instances raced for
the shared user profile lock and the conversion died intermittently.
2026-08-30 10:05:43 +00:00
Steffen Becker 3f047efca8 fix: a styled table writes no table-level borders
Every cell already writes all four sides itself, and on a styled table
the table-level black default showed in Word, which lets table borders
beat a cell's "none" (only "nil" loses) — LibreOffice lets the cell
win, so only Word drew the grid over the style. Plain tables keep the
default grid via the per-cell fallback.
2026-08-30 10:05:43 +00:00
Steffen Becker 1e88427154 test: semantic package lint, LO style resolution, cross-format rendering
Three legs against the closed-loop blind spot the duplicate-style bug
exposed: package-lint.test.ts checks invariants the schemas cannot
express (unique style ids/names, dangling style/num/rel references,
balanced ranges, manifest completeness); lo-roundtrip gains a
soffice→fodt leg asserting the styles LibreOffice resolves (Heading
chain Arial/bold/sizes, Word defaults); lo-render-consistency.test.ts
renders the kitchen sink from both formats through LibreOffice and
compares pagination and pixels (ratchet thresholds). CI's LO job
gains poppler-utils; test:lo runs both LO files.
2026-08-30 10:05:43 +00:00
Steffen Becker 4295baa284 fix: ODT — define the Comment pool style, no master ref for set-less sections
A comment body references LibreOffice's pool style Comment; the
definition is now written the way LibreOffice re-saves it, so the
package resolves without that pool. A section break with no page setup
of its own no longer writes a master-page reference: the name was
never defined (LibreOffice drops the dangling reference, probed), and
a defined one would force a page break the editor does not make.
2026-08-30 10:05:43 +00:00
Steffen Becker 29a72e143e fix: splice table and numbering styles post-pack instead of importedStyles
The docx package's Styles merge spreads our options over its factory
set, so a passed importedStyles array replaced the whole set —
w:docDefaults (default font, size, language) and the Title/Heading1-6
factory slots included. Every document using a table or list style
exported without document defaults; Word fell back to its own. The
style XML is now spliced into styles.xml by a post-pack pass
(applyRawStylesDocx), and the regression test builds with a table
style and asserts w:docDefaults survives.
2026-08-30 10:05:43 +00:00
Steffen Becker 845ad4a881 docs: changelog — unreleased list styles, letter templates, export fixes
Adds the Unreleased section: named list styles, the template gallery
with the two letters and fold marks, the schema-validity and duplicate
heading-style fixes, and a design note on the Liberation/Microsoft
metric font pairs the exports translate between.
2026-08-27 20:55:45 +00:00
Steffen Becker 51f1ab372c fix: route Title/Heading1-6 through the docx factory's override slots
The docx package always emits its own Title and Heading1-6 styles; our
same-id copies in paragraphStyles made styles.xml define them twice, and
both Word and LibreOffice then dropped the basedOn chain — headings
rendered serif, regular, at the raw size. buildStyles now feeds those
seven through styles.default.title/headingN, leaving a single
definition with the chain intact. Regression test asserts unique
styleIds and Heading1's basedOn.
2026-08-27 20:15:44 +00:00
Steffen Becker 742b1cc2b0 test: kitchen-sink fixture + schema validation of both exports
tests/kitchenSink.ts authors one deterministic document using every
feature; schema-validation.test.ts validates its .odt against the ODF 1.3
RelaxNG and its .docx parts (after MCE resolution, as Word reads them)
against the ECMA-376 transitional XSDs — the structural half of Word's
strict reader, which LibreOffice silently forgives. Schemas vendored under
tests/schemas/ (sources and offline patches in its README); self-skips
without xmllint, which CI now installs.
2026-08-26 15:42:31 +00:00
Steffen Becker 3a6bc336f7 fix: schema-valid ODF and DOCX output
ODF: every part declares 1.3 (the version LibreOffice writes; header-first
is a 1.3 element), draw:image gains the mandatory xlink:type trio,
text:time-value becomes an xsd dateTime (import still reads the legacy
duration), index-entry-link-start/-end stay in TOC templates only, and
dont-balance-text-columns moves onto style:section-properties (probed: LO
reads and re-writes it there). DOCX: a final pass re-sorts w:settings into
the CT_Settings sequence, and comments.xml declares w14 mc:Ignorable.
2026-08-26 15:41:12 +00:00
Steffen Becker c566950258 fix: unwrap the imported style XML so w:style lands directly in w:styles
ImportedXmlComponent.fromXmlString returns a nameless wrapper that
serialized as a literal <undefined> element around every table and
numbering style. LibreOffice skips the unknown element; Word declares
styles.xml unreadable and rebuilds it with its own defaults, so the
recovered document also lost the 0-spacing Normal style. Regression
assertions on both DOCX style paths.
2026-08-26 14:28:53 +00:00
Steffen Becker 525c95f3a8 feat: add Numbering 1.a.i, the default cycle as a preset
The gallery avoids presets the dropdown plus default nesting already
covers, but the default cycle itself earns its slot: once a list wears
another style, switching back needs a style to switch to. No sheet
version bump — an added built-in survives the merge on its own.
2026-08-26 14:03:55 +00:00
Steffen Becker 6f57a8e7ed feat: level-varied preset gallery for the list-style built-ins
The uniform LibreOffice definitions duplicated the dropdown formats plus
default nesting. The gallery now ships patterns the depth cycle cannot
produce: the outline chains Outline I.A.1 / A.I.1, the kind-mixing
Numbering with Bullets and Checklist, and the Diamond Bullets ladder,
all on the plain 1.27cm step. STYLE_SHEET_VERSION 12 swaps stored
built-ins while user styles survive.
2026-08-26 09:58:33 +00:00
Steffen Becker 697eea4d86 fix: a list style's level decides the depth's kind
effectiveListLevel resolved a level only for its own node species, so a
Tab-nested <ul> under a number level kept cycle bullets while the named
ODF definition (and LibreOffice) numbered it. The level's kind now wins:
the walk numbers a <ul>/bullets an <ol> (CSS keys generalized), both
exporters resolve clones and forks through eff.kind (new ODT pass
applyListLevelKinds switches L# level species), and setListStyle retypes
the subtree. Node marker attrs still override with their own species.
2026-08-26 09:21:45 +00:00
Steffen Becker 78fba99c76 fix: list-style preview shows every level; rename the multilevel toggle
The preview drew a fixed three lines, and the toggle's label ("Show all
levels") read as a preview control when it switches chained numbering.
Preview now renders one line per defined level and scrolls past six;
the label says "Multilevel numbering (1, 1.1, 1.2.1)", matching the
numbering dropdown's notation.
2026-08-26 08:18:45 +00:00
Steffen Becker 108983fa86 fix: keep the style-manager selection across edits
The cursor-follow effect read the sheet and the editor state, so every
edit (sheet replaced + FORCE_PAGE_RECALC) re-ran it and reset all four
tabs' selections to the cursor's style or the first entry. Untrack the
body; only the dialog opening triggers it now.
2026-08-26 07:04:20 +00:00
Steffen Becker 48f44f3dcd feat: named list styles — assignment UI and manager tab
setListStyle assigns on the outermost list, clearing the subtree's direct
marker attrs (applying a Listenformatvorlage replaces direct numbering).
Both chromes' bullet/numbering dropdowns grow a "List styles" section split
by the style's level-1 kind, plus a manage entry; the style manager gets a
fourth, flat tab with a per-level editor and a three-level preview. The
decoration now also sets data-bullet — editor.css keys the var()-reading
marker rule on it, so a style's bullet paints (verified live, headless).
2026-08-26 00:38:44 +00:00
Steffen Becker b0de0311a8 feat: named list styles — DOCX round-trip
One shared abstract per style (each list its own w:num instance, so numbering
restarts); a post-pack pass injects w:styleLink and the numbering style's real
numId, which the docx library cannot express. Import follows w:styleLink and
w:numStyleLink — a linked abstract used to resolve to {} and silently import
as a bullet list — maps the style onto listStyleName + sheet.list, and derives
no per-level attrs. Probed: LO ignores DOCX numbering styles both ways (mints
WWNum# on import, flattens to the look on export); ODF carries the identity.
2026-08-25 22:19:14 +00:00
Steffen Becker e2525237de feat: named list styles — model, editor resolution, ODF round-trip
Fourth style family (LibreOffice's Listenformatvorlagen): per-level model in
styles/listStyles.ts, five probed LO built-ins, listStyleName on the outermost
list, one effective-level resolver shared by the decoration walk and the export.
ODF writes the full named text:list-style into styles.xml and repoints
unoverridden lists at it (overrides keep the resolved automatic clone);
import maps named list styles back to the attr + registry, attr-free.
Probed: LO keeps the named reference and display-name across a re-save.
2026-08-25 20:38:15 +00:00
Steffen Becker 7dd997cbfa feat: four draft templates, shelved out of the gallery
Cover letter, CV, invoice and meeting minutes as builder modules on a shared
builders.ts (JSON helpers + the 45mm window-envelope arithmetic), localized
en/de. They sit in the registry's SHELVED list: compiled and schema-checked
per locale by tests/unit/templates.test.ts, but not offered in the gallery
until their content is settled. Gallery gains per-template thumbnails.
2026-08-25 16:03:56 +00:00
Steffen Becker f60a07580c fix: PDF/print export with a placeholder field selected
The selected-node highlight is color-mix(), whose computed value
serializes as a color() function html2canvas cannot parse — the whole
capture aborted. The export clone now strips selection highlights
(which should not print anyway). Reproduced and verified headlessly.
2026-08-25 15:12:05 +00:00
Steffen Becker 162552cdbf feat: add the notation zone to the Form B letter
Two lines above the address (DIN's Zusatz- und Vermerkzone, filled
bottom-up) share their rows with the top of the info block, which now
starts at the norm's 50mm; the lower line carries a notation
placeholder (e.g. registered mail). Measured headlessly: info block
at 50.0mm, notation 54.8mm, address zone from 59.7mm ending 79mm —
inside the window.
2026-08-25 15:12:03 +00:00
Steffen Becker 46c59ffb11 feat: add a personal-letter template
Same window-envelope geometry as the Form B letter (45mm address
field, fold marks), but no info block: a three-line sender block on
top and a right-aligned place/date line instead. The gallery thumb
swaps the info column for a date line on this card. Positions
verified headlessly: return address 44.8mm, recipient 49.8mm, date
flush with the right margin.
2026-08-24 19:51:51 +00:00
Steffen Becker 70888409da feat: draw the fold marks on the right edge too
Both edges help fold the sheet; the punch mark stays left, where the
pages are filed. The exports mirror them as EdenFoldMark<N>R lines
(page width from the ODF page layout / the DOCX page size), the
importers already match on the shared name prefix. Verified headlessly:
5mm from either edge at 87/192mm.
2026-08-24 17:47:01 +00:00
Steffen Becker d2e7ccb48c fix: pin the letter template's mm geometry, measured headlessly
The return-address paragraph gets fontSize 8pt so its line box is 8pt
tall (a 12pt paragraph mark pushed the address zone 1.6mm low), and an
info line with no address half indents 10cm instead of leading with a
tab (a leading tab stays on the default grid). Measured in Chromium:
return address 44.97mm, address zone 49.98mm, info column 124.98mm,
fold marks 87/148.5/192mm.
2026-08-24 17:00:42 +00:00
Steffen Becker 0f8bca31cd feat: built-in template gallery with a DIN 5008 letter
lib/templates/: registry + one module per template, localized via t()
at build time. applyTemplate (App.svelte) reuses the extracted
resetDocumentState() from handleNew, then assigns the template's
margins, styles and fold marks; no file handle, so Save asks where.
Gallery dialog reachable from the ribbon File menu and the modern
chrome; first template is a DIN 5008 Form B business letter built from
placeholder fields, with the address field at 45mm and a 10cm info tab.
2026-08-24 16:54:03 +00:00
Steffen Becker a5c072db23 feat: fold and punch marks (Falzmarken, DIN 5008)
edentext-fold-marks flag: FoldMarkLayer draws the 87/192mm folds and the
148.5mm punch mark per page inside .paper, so print and PDF include them.
Toggled in the Layout tab. Exported as named EdenFoldMark* lines in the
master page's header (ODF page-relative draw:line, DOCX VML v:line);
both importers read the names back into the flag. Roundtrip Leg 32.
2026-08-24 16:27:27 +00:00
Steffen Becker 0753caa5a9 feat: placeholder fields (inline atom + ODF/DOCX round trip)
An inline atom drawn gray as ‹label›: a click selects the whole field,
typing replaces it, Tab/Shift-Tab jump between fields. Exports to ODF
<text:placeholder> (PLH sentinel U+E022) and a DOCX w:sdt content
control tagged edentext-placeholder; both importers read it back, the
export-minted gray stripped. Covered in roundtrip Leg 31 + fuzzDoc.
2026-08-24 16:16:24 +00:00
Steffen Becker ca29ff780b fix: make the recent-files list only offer files it can reopen
A file opened without a File System Access handle (no API — Firefox,
Safari, Brave — or a template) is no longer recorded: nothing could
ever reopen it, so every click failed and dropped the entry. A startup
prune clears such stale entries. Reopening now asks for 'read' instead
of 'readwrite' (Save re-prompts on its own), and a declined permission
prompt keeps the entry — only a moved or deleted file drops it.
2026-08-23 18:54:52 +00:00
Steffen Becker 91a1ecb26d style: brand the link-preview image with the logo header
Icon + wordmark above the screenshot on the light chrome color,
same 1200x630 frame.
2026-08-22 12:10:04 +00:00
Steffen Becker dca155ddd6 chore: add a single-entry sitemap.xml 2026-08-22 11:45:37 +00:00
Steffen Becker 236aad826d chore: add robots.txt (allow all, point at the sitemap) 2026-08-22 11:45:29 +00:00
Steffen Becker 8ba1fefb62 feat: serve a static intro paragraph to crawlers and noscript browsers
The block lives inside #app and is removed right before mount,
since Svelte's mount() appends rather than replaces.
2026-08-22 11:45:09 +00:00
Steffen Becker 0c420b8765 feat: add Open Graph tags, a canonical URL and a 1200x630 preview image
Shared links now render a preview card; the image is the README
screenshot center-cropped to the standard card ratio.
2026-08-22 11:44:05 +00:00
Steffen Becker 742cf97571 chore: add the Google Search Console site-verification file 2026-08-22 11:03:37 +00:00
Steffen Becker 4a87d5eb23 feat: add a meta description for search results and crawlers
The README's opening pitch, trimmed to Google's ~160-character
snippet length.
2026-08-22 10:35:06 +00:00
Steffen Becker 96e5b2fc87 fix: the PWA install icon uses the current logo
The icon PNGs still carried the old two-leaf motif; only favicon.svg was
updated in the redesign, and Chrome takes the PNGs for the install icon.
Re-rendered both from the current logo, added a padded maskable variant
so Android's mask no longer clips the leaves, bumped the service-worker
cache so existing installs drop the stale icons, and removed the
unreferenced old favicon and wordmark files.
2026-08-21 15:39:19 +02:00
Steffen Becker 5034ac7d6f docs: add an editor screenshot to the README
docs/screenshot.png sits right before the Features section, linked to
the app. Plain Markdown image syntax, so the VS Code preview renders
it too; the title bar's file name is painted out.
2026-08-20 18:59:53 +02:00
Steffen Becker 05b3f4a28b fix: first-run spell-check language follows the browser locale
loadDocumentLanguage falls back to resolveBrowserLocale() instead of a
hardcoded 'en', so a de-* browser starts with the German dictionary. A
saved choice and the document's own fo:language still win.
2026-08-20 15:19:23 +02:00
Steffen Becker c336127006 fix: ship every bundled MIT notice and link licenses.txt in About
collect-licenses falls back to the README's License section (only when it
carries a copyright line) for packages without a LICENSE file; hash.js and
isarray now ship their full notice. The About dialog links /licenses.txt,
which was previously reachable only by knowing the URL.
2026-08-20 15:15:52 +02:00
Steffen Becker 6bbf4286c3 style: the floating-island chrome is dev-only in the menu
The appearance menu's "Modern (beta)" entry sits behind
import.meta.env.DEV, so a production build offers no way into the
island chrome until it catches up with the ribbon. The chrome itself
and a stored 'modern' pref keep working.
2026-08-20 14:56:48 +02:00
Steffen Becker a7522547b7 fix: the table dialog flips below a table it would cover
The formula/sort/split popover hangs above the table's top-left corner;
with the table at the top of the page the keep-in-view clamp slid it
down over the table itself. With no room above, the dialog now opens
below the table when that fits the viewport, and only a table filling
the whole window keeps the old clamp.
2026-08-20 14:37:18 +02:00
Steffen Becker de7f63f269 fix: Enter frees the caret from a leading table
At the very first position of a table with no block before it, Enter
inserts a paragraph above the table and moves the caret there, as both
word processors do — previously the caret could never get before such
a table. Generic first-child check, so it also covers a table leading
a cell, text box or columns section.
2026-08-20 14:26:57 +02:00
Steffen Becker 8537fd0106 fix: zooming the page grid keeps the view anchored
The grid snapped the scroll to the top of the first row on every zoom,
losing the reader's place whenever it sat mid-row and ignoring the
pointer anchor of a trackpad zoom. It now uses the same anchor logic as
a single pane, measured against the grid canvas: the pointer for a
wheel zoom, else the viewport top; firstRow is re-read after the write
so the page cells re-aim immediately. Measured drift < 1px across a
92% -> 194% wheel burst.
2026-08-20 12:26:03 +02:00
Steffen Becker fb59a30b63 fix: defer the toolbar tick past Svelte's flush
Tearing down the focused pane's DOM on a layout switch fires blur
synchronously inside Svelte's commit; TipTap answers with a focus-meta
transaction, and onTransaction's tick write threw state_unsafe_mutation
there — aborting the handler before the other panes got the new state.
The tick now bumps in a microtask, after the flush, before paint.
2026-08-20 12:25:27 +02:00
Steffen Becker c6aae13a9e fix: the page count survives switching the pane layout
The pm-pagecount listener sat on the hosts[0] element, which Svelte
replaces when the pane layout changes (multi-page grid, split view).
The editor view moves to the new host, the listener died with the old
one — numPages froze, so no new page ever appeared in the grid.
Listen on the view's own DOM instead, which is only ever re-parented.
2026-08-20 11:57:20 +02:00
Steffen Becker ab79740787 style: the inline-wrap icon shows the object in the line
Three bare lines said nothing and read the same at any size. It now draws
the box on the text baseline like the floating toolbar's glyph, with the
outlined object the other three wrap icons use.
2026-08-20 00:24:04 +02:00
Steffen Becker 2436deb3bf style: Shape Format follows the caret, and carries vertical text
The tab only showed while the box was node-selected, so it vanished the
moment you clicked in to type — the floating toolbar stayed. It now reads
findTextBox(), the same box that toolbar reads; an image selected inside a
box still shows Picture Format alone. Vertical text was the one control the
tab was missing, now a Text group of its own.
2026-08-20 00:23:46 +02:00
Steffen Becker 7b3348ca6e docs: add contributer list 2026-08-19 18:56:17 +02:00
Steffen Becker a87e7a4ada fix: a heading's style name never lands on a plain paragraph
styleName was kept on split, so Enter at the end of a heading left a paragraph
carrying it: drawn like a heading, absent from the navigator's outline, exported
as text:p. It is no longer kept there. setParagraphStyle also missed the name
whenever it switched the node type — a following updateAttributes looks for the
new type in the pre-chain state — so it now rides along with setNode. Levels 2–6
never reached that command at all: the digit class built from MAX_HEADING_LEVEL
(10) read as [0-1], so Heading's own Mod-Alt-N took the key and set a level with
no style; that keymap is dropped, running ahead of every plugin binding.
2026-08-19 18:41:21 +02:00
Steffen Becker 78b732ac44 update link to custom domain 2026-08-19 09:03:21 +02:00