@usejunior/docx-core 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ export interface SyntheticDocxOptions {
2
+ paragraphs: string[];
3
+ footnoteOnParagraph?: number;
4
+ footnoteText?: string;
5
+ commentOnParagraph?: number;
6
+ commentText?: string;
7
+ commentAuthor?: string;
8
+ commentAncillaryParts?: boolean;
9
+ /**
10
+ * Threaded reply to the root comment (w:id="1"). Emits a second
11
+ * <w:comment w:id="2"> with paraId 00000002 and, when commentAncillaryParts
12
+ * is also set, a <w15:commentEx w15:paraIdParent="00000001"> linkage and a
13
+ * second <w15:person> for the reply author. Reply comments deliberately
14
+ * have NO <w:commentReference> in document.xml — that's the issue #108
15
+ * shape: replies are discoverable only via paraIdParent threading.
16
+ */
17
+ replyText?: string;
18
+ replyAuthor?: string;
19
+ /**
20
+ * Cross-paragraph comment span. The comment opens at the start of
21
+ * paragraphs[start] and closes at the end of paragraphs[end]. The
22
+ * commentReference run is appended to paragraphs[end].
23
+ *
24
+ * Mutually exclusive with commentOnParagraph.
25
+ */
26
+ commentSpanParagraphs?: {
27
+ start: number;
28
+ end: number;
29
+ };
30
+ /**
31
+ * Bookmark spanning a single paragraph (start and end inside the same w:p).
32
+ * Used to verify paragraph-internal bookmark preservation through rebuild.
33
+ */
34
+ bookmarkOnParagraph?: {
35
+ paragraph: number;
36
+ name: string;
37
+ id?: number;
38
+ };
39
+ /**
40
+ * Body-level (sibling of <w:p>) bookmark inserted between
41
+ * paragraphs[index - 1] and paragraphs[index]. Used to verify scaffold
42
+ * markers do not leak into reconstructed paragraphs.
43
+ */
44
+ siblingBookmarkBefore?: {
45
+ index: number;
46
+ name: string;
47
+ id?: number;
48
+ };
49
+ }
50
+ export declare function buildSyntheticDocx(opts: SyntheticDocxOptions): Promise<Buffer>;
51
+ export interface SyntheticResultParts {
52
+ documentXml: string;
53
+ footnotesXml: string | null;
54
+ endnotesXml: string | null;
55
+ commentsXml: string | null;
56
+ commentsExtendedXml: string | null;
57
+ peopleXml: string | null;
58
+ contentTypesXml: string | null;
59
+ relsXml: string | null;
60
+ }
61
+ export declare function getResultParts(resultBuffer: Buffer): Promise<SyntheticResultParts>;
62
+ //# sourceMappingURL=synthetic-docx-fixture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthetic-docx-fixture.d.ts","sourceRoot":"","sources":["../../src/integration/synthetic-docx-fixture.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD;;;OAGG;IACH,mBAAmB,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE;;;;OAIG;IACH,qBAAqB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4MpF;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAsB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAYxF"}
@@ -0,0 +1,171 @@
1
+ import JSZip from 'jszip';
2
+ import { DocxArchive } from '../shared/docx/DocxArchive.js';
3
+ export async function buildSyntheticDocx(opts) {
4
+ const hasFootnote = opts.footnoteOnParagraph != null;
5
+ const hasComment = opts.commentOnParagraph != null;
6
+ const hasCommentSpan = opts.commentSpanParagraphs != null;
7
+ const hasBookmark = opts.bookmarkOnParagraph != null;
8
+ const hasSiblingBookmark = opts.siblingBookmarkBefore != null;
9
+ if (hasComment && hasCommentSpan) {
10
+ throw new Error('commentOnParagraph and commentSpanParagraphs are mutually exclusive');
11
+ }
12
+ const bookmarkId = opts.bookmarkOnParagraph?.id ?? 100;
13
+ const siblingBookmarkId = opts.siblingBookmarkBefore?.id ?? 200;
14
+ const spanStart = opts.commentSpanParagraphs?.start;
15
+ const spanEnd = opts.commentSpanParagraphs?.end;
16
+ const paragraphParts = opts.paragraphs.map((text, idx) => {
17
+ const escaped = text
18
+ .replaceAll('&', '&amp;')
19
+ .replaceAll('<', '&lt;')
20
+ .replaceAll('>', '&gt;');
21
+ let extra = '';
22
+ if (hasFootnote && idx === opts.footnoteOnParagraph) {
23
+ extra += `<w:r><w:rPr><w:rStyle w:val="FootnoteReference"/></w:rPr><w:footnoteReference w:id="1"/></w:r>`;
24
+ }
25
+ if (hasComment && idx === opts.commentOnParagraph) {
26
+ extra =
27
+ `<w:commentRangeStart w:id="1"/>` +
28
+ `<w:r><w:t>${escaped}</w:t></w:r>` +
29
+ `<w:commentRangeEnd w:id="1"/>` +
30
+ `<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="1"/></w:r>`;
31
+ return `<w:p>${extra}</w:p>`;
32
+ }
33
+ if (hasCommentSpan && (idx === spanStart || idx === spanEnd)) {
34
+ const before = idx === spanStart ? `<w:commentRangeStart w:id="1"/>` : '';
35
+ const after = idx === spanEnd
36
+ ? `<w:commentRangeEnd w:id="1"/>` +
37
+ `<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="1"/></w:r>`
38
+ : '';
39
+ return `<w:p>${before}<w:r><w:t>${escaped}</w:t></w:r>${after}${extra}</w:p>`;
40
+ }
41
+ if (hasBookmark && idx === opts.bookmarkOnParagraph.paragraph) {
42
+ const name = opts.bookmarkOnParagraph.name;
43
+ return (`<w:p>` +
44
+ `<w:bookmarkStart w:id="${bookmarkId}" w:name="${name}"/>` +
45
+ `<w:r><w:t>${escaped}</w:t></w:r>` +
46
+ `<w:bookmarkEnd w:id="${bookmarkId}"/>` +
47
+ extra +
48
+ `</w:p>`);
49
+ }
50
+ return `<w:p><w:r><w:t>${escaped}</w:t></w:r>${extra}</w:p>`;
51
+ });
52
+ // Inject a body-level (sibling of <w:p>) bookmark before paragraphs[index].
53
+ // Bookmark*Start*/End placed as sibling of <w:p> per ECMA-376 §17.13.5.
54
+ if (hasSiblingBookmark) {
55
+ const { index, name } = opts.siblingBookmarkBefore;
56
+ const sibling = `<w:bookmarkStart w:id="${siblingBookmarkId}" w:name="${name}"/>` +
57
+ `<w:bookmarkEnd w:id="${siblingBookmarkId}"/>`;
58
+ paragraphParts.splice(index, 0, sibling);
59
+ }
60
+ const paragraphsXml = paragraphParts.join('\n ');
61
+ const documentXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
62
+ `<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"` +
63
+ ` xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml">` +
64
+ `<w:body>${paragraphsXml}<w:sectPr/></w:body></w:document>`;
65
+ const contentTypeParts = [
66
+ `<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>`,
67
+ ];
68
+ const docRelEntries = [];
69
+ let rIdCounter = 1;
70
+ const zip = new JSZip();
71
+ if (hasFootnote) {
72
+ const fnText = opts.footnoteText ?? 'Test footnote';
73
+ const footnotesXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
74
+ `<w:footnotes xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">` +
75
+ `<w:footnote w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:footnote>` +
76
+ `<w:footnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:footnote>` +
77
+ `<w:footnote w:id="1"><w:p><w:r><w:t>${fnText}</w:t></w:r></w:p></w:footnote>` +
78
+ `</w:footnotes>`;
79
+ zip.file('word/footnotes.xml', footnotesXml);
80
+ contentTypeParts.push(`<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>`);
81
+ rIdCounter++;
82
+ docRelEntries.push(`<Relationship Id="rId${rIdCounter}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" Target="footnotes.xml"/>`);
83
+ }
84
+ if (hasComment || hasCommentSpan) {
85
+ const cText = opts.commentText ?? 'Test comment';
86
+ const cAuthor = opts.commentAuthor ?? 'Author';
87
+ const hasReply = opts.replyText != null;
88
+ const replyAuthor = opts.replyAuthor ?? 'Replier';
89
+ const replyEntry = hasReply
90
+ ? `<w:comment w:id="2" w:author="${replyAuthor}" w:date="2025-01-02T00:00:00Z">` +
91
+ `<w:p w14:paraId="00000002"><w:r><w:t>${opts.replyText}</w:t></w:r></w:p>` +
92
+ `</w:comment>`
93
+ : '';
94
+ const commentsXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
95
+ `<w:comments xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"` +
96
+ ` xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml">` +
97
+ `<w:comment w:id="1" w:author="${cAuthor}" w:date="2025-01-01T00:00:00Z">` +
98
+ `<w:p w14:paraId="00000001"><w:r><w:t>${cText}</w:t></w:r></w:p>` +
99
+ `</w:comment>` +
100
+ replyEntry +
101
+ `</w:comments>`;
102
+ zip.file('word/comments.xml', commentsXml);
103
+ contentTypeParts.push(`<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/>`);
104
+ rIdCounter++;
105
+ docRelEntries.push(`<Relationship Id="rId${rIdCounter}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" Target="comments.xml"/>`);
106
+ if (opts.commentAncillaryParts) {
107
+ const replyExEntry = hasReply
108
+ ? `<w15:commentEx w15:paraId="00000002" w15:paraIdParent="00000001" w15:done="0"/>`
109
+ : '';
110
+ const commentsExtendedXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
111
+ `<w15:commentsEx xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">` +
112
+ `<w15:commentEx w15:paraId="00000001" w15:done="0"/>` +
113
+ replyExEntry +
114
+ `</w15:commentsEx>`;
115
+ zip.file('word/commentsExtended.xml', commentsExtendedXml);
116
+ contentTypeParts.push(`<Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.ms-word.commentsExtended+xml"/>`);
117
+ rIdCounter++;
118
+ docRelEntries.push(`<Relationship Id="rId${rIdCounter}" Type="http://schemas.microsoft.com/office/2011/relationships/commentsExtended" Target="commentsExtended.xml"/>`);
119
+ const replyPersonEntry = hasReply
120
+ ? `<w15:person w15:author="${replyAuthor}">` +
121
+ `<w15:presenceInfo w15:providerId="None" w15:userId="${replyAuthor}@example.com"/>` +
122
+ `</w15:person>`
123
+ : '';
124
+ const peopleXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
125
+ `<w15:people xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"` +
126
+ ` xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">` +
127
+ `<w15:person w15:author="${cAuthor}">` +
128
+ `<w15:presenceInfo w15:providerId="None" w15:userId="${cAuthor}@example.com"/>` +
129
+ `</w15:person>` +
130
+ replyPersonEntry +
131
+ `</w15:people>`;
132
+ zip.file('word/people.xml', peopleXml);
133
+ contentTypeParts.push(`<Override PartName="/word/people.xml" ContentType="application/vnd.ms-word.people+xml"/>`);
134
+ rIdCounter++;
135
+ docRelEntries.push(`<Relationship Id="rId${rIdCounter}" Type="http://schemas.microsoft.com/office/2011/relationships/people" Target="people.xml"/>`);
136
+ }
137
+ }
138
+ const contentTypesXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
139
+ `<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">` +
140
+ `<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>` +
141
+ `<Default Extension="xml" ContentType="application/xml"/>` +
142
+ contentTypeParts.join('') +
143
+ `</Types>`;
144
+ const rootRelsXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
145
+ `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">` +
146
+ `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>` +
147
+ `</Relationships>`;
148
+ const docRelsXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
149
+ `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">` +
150
+ docRelEntries.join('') +
151
+ `</Relationships>`;
152
+ zip.file('[Content_Types].xml', contentTypesXml);
153
+ zip.file('_rels/.rels', rootRelsXml);
154
+ zip.file('word/document.xml', documentXml);
155
+ zip.file('word/_rels/document.xml.rels', docRelsXml);
156
+ return (await zip.generateAsync({ type: 'nodebuffer' }));
157
+ }
158
+ export async function getResultParts(resultBuffer) {
159
+ const archive = await DocxArchive.load(resultBuffer);
160
+ return {
161
+ documentXml: await archive.getDocumentXml(),
162
+ footnotesXml: await archive.getFile('word/footnotes.xml'),
163
+ endnotesXml: await archive.getFile('word/endnotes.xml'),
164
+ commentsXml: await archive.getFile('word/comments.xml'),
165
+ commentsExtendedXml: await archive.getFile('word/commentsExtended.xml'),
166
+ peopleXml: await archive.getFile('word/people.xml'),
167
+ contentTypesXml: await archive.getFile('[Content_Types].xml'),
168
+ relsXml: await archive.getFile('word/_rels/document.xml.rels'),
169
+ };
170
+ }
171
+ //# sourceMappingURL=synthetic-docx-fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthetic-docx-fixture.js","sourceRoot":"","sources":["../../src/integration/synthetic-docx-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AA2C5D,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAA0B;IACjE,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC;IACrD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC;IACnD,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC;IAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC;IACrD,MAAM,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC;IAE9D,IAAI,UAAU,IAAI,cAAc,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,G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EAAE,WAAW,CAAC,CAAC;IACrC,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE,UAAU,CAAC,CAAC;IAErD,OAAO,CAAC,MAAM,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAW,CAAC;AACrE,CAAC;AAaD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,YAAoB;IACvD,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,OAAO;QACL,WAAW,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE;QAC3C,YAAY,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACzD,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACvD,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACvD,mBAAmB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC;QACvE,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACnD,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC7D,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC;KAC/D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usejunior/docx-core",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "OOXML (.docx) core library: primitives, comparison, and track changes",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",