theseus/bundled-addons/docx-editor/icon.svg

43 lines
2 KiB
XML
Raw Normal View History

feat(docx-editor): Save as…, PDF export, and a mark of our own Three gaps, one theme: the editor could produce a file but not decide where it went, what format it was in, or look like anything in the dock. **Save as…** opens a real file dialog, and the extension typed there picks the format. Save then writes to that file instead of dropping another copy in Downloads every time. The renderer never names a path: the dialog returns an opaque token, and the add-on will only write to a path a dialog actually returned. An extension page is the least trusted thing in the add-on, and "write these bytes anywhere" is not a capability it needs. **PDF** goes through Chromium's own print pipeline in a hidden window — the same engine as Ctrl+P — on the paper size read out of the document's own sectPr. For that to match what the user was looking at, the page's typography had to stop living in editor.css, which the export window can't reach: it moves to lib/doc-css.js and both surfaces read the one string. The result embeds subsetted fonts, keeps images, and turns hyperlinks into real PDF link annotations. **The icon** is ours. Microsoft's Word mark is a trademark and borrowing it to look official is not something a browser that talks about sovereignty should do. icon.svg says "text document" in its own words — a turned corner, a heading rule, body lines, a pilcrow badge in Silent Mode green — and `npm run icons` derives the PNGs and addon.json's copy from it, so there is one drawing rather than several that drift. Also: the scratch folder follows the profile rename to extensions-data/ via the api.dataDir the host now provides, instead of creating a stale addons-data/ beside it.
2026-09-21 03:35:55 +02:00
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="Word editor">
<title>Word editor</title>
<!--
Silent Mode's own mark for the Word editor.
It is deliberately NOT Microsoft's Word icon. That icon — and the blue
sheet with a white "W" that goes with it — is Microsoft's trademark, and
borrowing it to make our extension look official is exactly the kind of
thing a browser that talks about sovereignty should not do.
What it does instead is say "text document" in the only vocabulary that
survives 16 pixels: a portrait page with a turned corner, a coloured
heading rule, a few lines of body text, and a pilcrow — the paragraph
mark every word processor has used since the trade was done on paper.
The accent is Silent Mode's green, not Office blue.
-->
<defs>
<linearGradient id="dx-page" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#ffffff"/>
<stop offset="1" stop-color="#e9edf4"/>
</linearGradient>
</defs>
<!-- the sheet, with the top-right corner turned down -->
<path d="M6.5 2.5h12l7 7v20a1 1 0 0 1-1 1h-18a1 1 0 0 1-1-1v-26a1 1 0 0 1 1-1z"
fill="url(#dx-page)" stroke="#2a3242" stroke-width="1.5" stroke-linejoin="round"/>
<path d="M18.5 2.5v7h7" fill="#cfd8e6" stroke="#2a3242" stroke-width="1.5" stroke-linejoin="round"/>
<!-- heading rule, then body lines -->
<rect x="9.5" y="13" width="9" height="2.2" rx="1.1" fill="#0ac18e"/>
<rect x="9.5" y="17.6" width="13" height="1.6" rx=".8" fill="#97a3b6"/>
<rect x="9.5" y="21" width="13" height="1.6" rx=".8" fill="#97a3b6"/>
<rect x="9.5" y="24.4" width="8.5" height="1.6" rx=".8" fill="#97a3b6"/>
<!-- pilcrow, bottom-right, overlapping the page edge so it reads as a mark
rather than as more body text -->
<g transform="translate(20.4 19.2)">
<circle cx="4.6" cy="4.6" r="5.4" fill="#0ac18e"/>
<path d="M6.6 1.9H3.9a1.85 1.85 0 0 0 0 3.7h.8M5.3 1.9v5.6M6.6 1.9v5.6"
fill="none" stroke="#0a0f16" stroke-width="1.15" stroke-linecap="round"/>
</g>
</svg>