// DasuMae Doc -- in-browser sample document generator. // Builds a small planted .docx using the core's own ZIP writer (Pkg/fflate), so // a visitor without a dirty file sees the X-ray immediately. All content is // obviously fictional. Runs through the same inspect() / scrub() flow as a real // upload. import { Pkg } from './ooxml.mjs'; const XD = '\n'; const W = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'; const R = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'; const PR = 'http://schemas.openxmlformats.org/package/2006/relationships'; const CT = 'http://schemas.openxmlformats.org/package/2006/content-types'; // Fictional sample content (clearly not real). export const SAMPLE = { filename: 'sample-proposal.docx', creator: 'Pat Rivera', company: 'Nimbus Partners LLC (sample)', clientCode: 'NIMBUS-DEMO-2024', deleted: 'Our actual floor price is 30 percent lower than this quote.', comment: 'Do not send this version to the client.', }; export function sampleDocxBytes() { const pkg = new Pkg(); pkg.setText('[Content_Types].xml', XD + `` + '' + '' + '' + '' + '' + '' + '' + '' + '' + ''); pkg.setText('_rels/.rels', XD + `` + `` + '' + `` + `` + ''); pkg.setText('docProps/core.xml', XD + '' + `${SAMPLE.creator}` + `${SAMPLE.creator}` + '4' + 'Draft proposal' + '2026-02-10T08:00:00Z' + '2026-02-11T09:30:00Z' + ''); pkg.setText('docProps/app.xml', XD + '' + `${SAMPLE.company}` + ''); pkg.setText('docProps/custom.xml', XD + '' + '' + `${SAMPLE.clientCode}`); pkg.setText('word/styles.xml', XD + ``); pkg.setText('word/settings.xml', XD + `` + '' + ''); pkg.setText('word/_rels/document.xml.rels', XD + `` + `` + `` + `` + ''); pkg.setText('word/document.xml', XD + `` + 'Nimbus Partners — Proposal (sample)' + '' + 'Thank you for the opportunity. ' + '' + `${SAMPLE.deleted} ` + '' + 'Our quoted price is final.' + '' + '' + '' + '' + ''); pkg.setText('word/comments.xml', XD + `` + '' + `${SAMPLE.comment}`); return pkg.write(); }