@usejunior/docx-core 0.0.1 → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +86 -28
- package/dist/.tsbuildinfo +1 -0
- package/dist/atomizer.d.ts +218 -0
- package/dist/atomizer.d.ts.map +1 -0
- package/dist/atomizer.js +856 -0
- package/dist/atomizer.js.map +1 -0
- package/dist/baselines/atomizer/atomLcs.d.ts +96 -0
- package/dist/baselines/atomizer/atomLcs.d.ts.map +1 -0
- package/dist/baselines/atomizer/atomLcs.js +347 -0
- package/dist/baselines/atomizer/atomLcs.js.map +1 -0
- package/dist/baselines/atomizer/debug.d.ts +41 -0
- package/dist/baselines/atomizer/debug.d.ts.map +1 -0
- package/dist/baselines/atomizer/debug.js +85 -0
- package/dist/baselines/atomizer/debug.js.map +1 -0
- package/dist/baselines/atomizer/documentReconstructor.d.ts +64 -0
- package/dist/baselines/atomizer/documentReconstructor.d.ts.map +1 -0
- package/dist/baselines/atomizer/documentReconstructor.js +939 -0
- package/dist/baselines/atomizer/documentReconstructor.js.map +1 -0
- package/dist/baselines/atomizer/hierarchicalLcs.d.ts +111 -0
- package/dist/baselines/atomizer/hierarchicalLcs.d.ts.map +1 -0
- package/dist/baselines/atomizer/hierarchicalLcs.js +469 -0
- package/dist/baselines/atomizer/hierarchicalLcs.js.map +1 -0
- package/dist/baselines/atomizer/inPlaceModifier.d.ts +183 -0
- package/dist/baselines/atomizer/inPlaceModifier.d.ts.map +1 -0
- package/dist/baselines/atomizer/inPlaceModifier.js +1600 -0
- package/dist/baselines/atomizer/inPlaceModifier.js.map +1 -0
- package/dist/baselines/atomizer/numberingIntegration.d.ts +59 -0
- package/dist/baselines/atomizer/numberingIntegration.d.ts.map +1 -0
- package/dist/baselines/atomizer/numberingIntegration.js +209 -0
- package/dist/baselines/atomizer/numberingIntegration.js.map +1 -0
- package/dist/baselines/atomizer/pipeline.d.ts +65 -0
- package/dist/baselines/atomizer/pipeline.d.ts.map +1 -0
- package/dist/baselines/atomizer/pipeline.js +510 -0
- package/dist/baselines/atomizer/pipeline.js.map +1 -0
- package/dist/baselines/atomizer/premergeRuns.d.ts +26 -0
- package/dist/baselines/atomizer/premergeRuns.d.ts.map +1 -0
- package/dist/baselines/atomizer/premergeRuns.js +150 -0
- package/dist/baselines/atomizer/premergeRuns.js.map +1 -0
- package/dist/baselines/atomizer/trackChangesAcceptor.d.ts +63 -0
- package/dist/baselines/atomizer/trackChangesAcceptor.d.ts.map +1 -0
- package/dist/baselines/atomizer/trackChangesAcceptor.js +254 -0
- package/dist/baselines/atomizer/trackChangesAcceptor.js.map +1 -0
- package/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts +64 -0
- package/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts.map +1 -0
- package/dist/baselines/atomizer/trackChangesAcceptorAst.js +586 -0
- package/dist/baselines/atomizer/trackChangesAcceptorAst.js.map +1 -0
- package/dist/baselines/atomizer/xmlToWmlElement.d.ts +65 -0
- package/dist/baselines/atomizer/xmlToWmlElement.d.ts.map +1 -0
- package/dist/baselines/atomizer/xmlToWmlElement.js +95 -0
- package/dist/baselines/atomizer/xmlToWmlElement.js.map +1 -0
- package/dist/baselines/diffmatch/documentBuilder.d.ts +44 -0
- package/dist/baselines/diffmatch/documentBuilder.d.ts.map +1 -0
- package/dist/baselines/diffmatch/documentBuilder.js +227 -0
- package/dist/baselines/diffmatch/documentBuilder.js.map +1 -0
- package/dist/baselines/diffmatch/paragraphAlignment.d.ts +75 -0
- package/dist/baselines/diffmatch/paragraphAlignment.d.ts.map +1 -0
- package/dist/baselines/diffmatch/paragraphAlignment.js +206 -0
- package/dist/baselines/diffmatch/paragraphAlignment.js.map +1 -0
- package/dist/baselines/diffmatch/pipeline.d.ts +33 -0
- package/dist/baselines/diffmatch/pipeline.d.ts.map +1 -0
- package/dist/baselines/diffmatch/pipeline.js +84 -0
- package/dist/baselines/diffmatch/pipeline.js.map +1 -0
- package/dist/baselines/diffmatch/runDiff.d.ts +53 -0
- package/dist/baselines/diffmatch/runDiff.d.ts.map +1 -0
- package/dist/baselines/diffmatch/runDiff.js +253 -0
- package/dist/baselines/diffmatch/runDiff.js.map +1 -0
- package/dist/baselines/diffmatch/trackChangesRenderer.d.ts +64 -0
- package/dist/baselines/diffmatch/trackChangesRenderer.d.ts.map +1 -0
- package/dist/baselines/diffmatch/trackChangesRenderer.js +178 -0
- package/dist/baselines/diffmatch/trackChangesRenderer.js.map +1 -0
- package/dist/baselines/diffmatch/xmlParser.d.ts +45 -0
- package/dist/baselines/diffmatch/xmlParser.d.ts.map +1 -0
- package/dist/baselines/diffmatch/xmlParser.js +344 -0
- package/dist/baselines/diffmatch/xmlParser.js.map +1 -0
- package/dist/baselines/wmlcomparer/DocxodusWasm.d.ts +51 -0
- package/dist/baselines/wmlcomparer/DocxodusWasm.d.ts.map +1 -0
- package/dist/baselines/wmlcomparer/DocxodusWasm.js +83 -0
- package/dist/baselines/wmlcomparer/DocxodusWasm.js.map +1 -0
- package/dist/baselines/wmlcomparer/DotnetCli.d.ts +40 -0
- package/dist/baselines/wmlcomparer/DotnetCli.d.ts.map +1 -0
- package/dist/baselines/wmlcomparer/DotnetCli.js +135 -0
- package/dist/baselines/wmlcomparer/DotnetCli.js.map +1 -0
- package/dist/benchmark/metrics.d.ts +72 -0
- package/dist/benchmark/metrics.d.ts.map +1 -0
- package/dist/benchmark/metrics.js +45 -0
- package/dist/benchmark/metrics.js.map +1 -0
- package/dist/benchmark/reporter.d.ts +23 -0
- package/dist/benchmark/reporter.d.ts.map +1 -0
- package/dist/benchmark/reporter.js +147 -0
- package/dist/benchmark/reporter.js.map +1 -0
- package/dist/benchmark/runner.d.ts +30 -0
- package/dist/benchmark/runner.d.ts.map +1 -0
- package/dist/benchmark/runner.js +233 -0
- package/dist/benchmark/runner.js.map +1 -0
- package/dist/cli/compare-two.d.ts +28 -0
- package/dist/cli/compare-two.d.ts.map +1 -0
- package/dist/cli/compare-two.js +110 -0
- package/dist/cli/compare-two.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +21 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core-types.d.ts +296 -0
- package/dist/core-types.d.ts.map +1 -0
- package/dist/core-types.js +122 -0
- package/dist/core-types.js.map +1 -0
- package/dist/footnotes.d.ts +144 -0
- package/dist/footnotes.d.ts.map +1 -0
- package/dist/footnotes.js +291 -0
- package/dist/footnotes.js.map +1 -0
- package/dist/format-detection.d.ts +120 -0
- package/dist/format-detection.d.ts.map +1 -0
- package/dist/format-detection.js +338 -0
- package/dist/format-detection.js.map +1 -0
- package/dist/index.d.ts +177 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/integration/output-artifacts.d.ts +6 -0
- package/dist/integration/output-artifacts.d.ts.map +1 -0
- package/dist/integration/output-artifacts.js +30 -0
- package/dist/integration/output-artifacts.js.map +1 -0
- package/dist/move-detection.d.ts +211 -0
- package/dist/move-detection.d.ts.map +1 -0
- package/dist/move-detection.js +391 -0
- package/dist/move-detection.js.map +1 -0
- package/dist/numbering.d.ts +136 -0
- package/dist/numbering.d.ts.map +1 -0
- package/dist/numbering.js +446 -0
- package/dist/numbering.js.map +1 -0
- package/dist/primitives/accept_changes.d.ts +30 -0
- package/dist/primitives/accept_changes.d.ts.map +1 -0
- package/dist/primitives/accept_changes.js +241 -0
- package/dist/primitives/accept_changes.js.map +1 -0
- package/dist/primitives/bookmarks.d.ts +12 -0
- package/dist/primitives/bookmarks.d.ts.map +1 -0
- package/dist/primitives/bookmarks.js +248 -0
- package/dist/primitives/bookmarks.js.map +1 -0
- package/dist/primitives/comments.d.ts +88 -0
- package/dist/primitives/comments.d.ts.map +1 -0
- package/dist/primitives/comments.js +703 -0
- package/dist/primitives/comments.js.map +1 -0
- package/dist/primitives/document.d.ts +168 -0
- package/dist/primitives/document.d.ts.map +1 -0
- package/dist/primitives/document.js +532 -0
- package/dist/primitives/document.js.map +1 -0
- package/dist/primitives/document_view.d.ts +93 -0
- package/dist/primitives/document_view.d.ts.map +1 -0
- package/dist/primitives/document_view.js +722 -0
- package/dist/primitives/document_view.js.map +1 -0
- package/dist/primitives/dom-helpers.d.ts +94 -0
- package/dist/primitives/dom-helpers.d.ts.map +1 -0
- package/dist/primitives/dom-helpers.js +219 -0
- package/dist/primitives/dom-helpers.js.map +1 -0
- package/dist/primitives/errors.d.ts +7 -0
- package/dist/primitives/errors.d.ts.map +1 -0
- package/dist/primitives/errors.js +10 -0
- package/dist/primitives/errors.js.map +1 -0
- package/dist/primitives/extract_revisions.d.ts +50 -0
- package/dist/primitives/extract_revisions.d.ts.map +1 -0
- package/dist/primitives/extract_revisions.js +340 -0
- package/dist/primitives/extract_revisions.js.map +1 -0
- package/dist/primitives/footnotes.d.ts +37 -0
- package/dist/primitives/footnotes.d.ts.map +1 -0
- package/dist/primitives/footnotes.js +552 -0
- package/dist/primitives/footnotes.js.map +1 -0
- package/dist/primitives/formatting_tags.d.ts +30 -0
- package/dist/primitives/formatting_tags.d.ts.map +1 -0
- package/dist/primitives/formatting_tags.js +217 -0
- package/dist/primitives/formatting_tags.js.map +1 -0
- package/dist/primitives/index.d.ts +26 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +26 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/layout.d.ts +53 -0
- package/dist/primitives/layout.d.ts.map +1 -0
- package/dist/primitives/layout.js +178 -0
- package/dist/primitives/layout.js.map +1 -0
- package/dist/primitives/list_labels.d.ts +19 -0
- package/dist/primitives/list_labels.d.ts.map +1 -0
- package/dist/primitives/list_labels.js +57 -0
- package/dist/primitives/list_labels.js.map +1 -0
- package/dist/primitives/matching.d.ts +17 -0
- package/dist/primitives/matching.d.ts.map +1 -0
- package/dist/primitives/matching.js +144 -0
- package/dist/primitives/matching.js.map +1 -0
- package/dist/primitives/merge_runs.d.ts +23 -0
- package/dist/primitives/merge_runs.d.ts.map +1 -0
- package/dist/primitives/merge_runs.js +195 -0
- package/dist/primitives/merge_runs.js.map +1 -0
- package/dist/primitives/namespaces.d.ts +90 -0
- package/dist/primitives/namespaces.d.ts.map +1 -0
- package/dist/primitives/namespaces.js +107 -0
- package/dist/primitives/namespaces.js.map +1 -0
- package/dist/primitives/numbering.d.ts +27 -0
- package/dist/primitives/numbering.d.ts.map +1 -0
- package/dist/primitives/numbering.js +182 -0
- package/dist/primitives/numbering.js.map +1 -0
- package/dist/primitives/prevent_double_elevation.d.ts +18 -0
- package/dist/primitives/prevent_double_elevation.d.ts.map +1 -0
- package/dist/primitives/prevent_double_elevation.js +190 -0
- package/dist/primitives/prevent_double_elevation.js.map +1 -0
- package/dist/primitives/reject_changes.d.ts +27 -0
- package/dist/primitives/reject_changes.d.ts.map +1 -0
- package/dist/primitives/reject_changes.js +371 -0
- package/dist/primitives/reject_changes.js.map +1 -0
- package/dist/primitives/relationships.d.ts +7 -0
- package/dist/primitives/relationships.d.ts.map +1 -0
- package/dist/primitives/relationships.js +24 -0
- package/dist/primitives/relationships.js.map +1 -0
- package/dist/primitives/semantic_tags.d.ts +32 -0
- package/dist/primitives/semantic_tags.d.ts.map +1 -0
- package/dist/primitives/semantic_tags.js +139 -0
- package/dist/primitives/semantic_tags.js.map +1 -0
- package/dist/primitives/simplify_redlines.d.ts +19 -0
- package/dist/primitives/simplify_redlines.d.ts.map +1 -0
- package/dist/primitives/simplify_redlines.js +94 -0
- package/dist/primitives/simplify_redlines.js.map +1 -0
- package/dist/primitives/styles.d.ts +36 -0
- package/dist/primitives/styles.d.ts.map +1 -0
- package/dist/primitives/styles.js +190 -0
- package/dist/primitives/styles.js.map +1 -0
- package/dist/primitives/text.d.ts +27 -0
- package/dist/primitives/text.d.ts.map +1 -0
- package/dist/primitives/text.js +416 -0
- package/dist/primitives/text.js.map +1 -0
- package/dist/primitives/validate_document.d.ts +24 -0
- package/dist/primitives/validate_document.d.ts.map +1 -0
- package/dist/primitives/validate_document.js +147 -0
- package/dist/primitives/validate_document.js.map +1 -0
- package/dist/primitives/xml.d.ts +5 -0
- package/dist/primitives/xml.d.ts.map +1 -0
- package/dist/primitives/xml.js +19 -0
- package/dist/primitives/xml.js.map +1 -0
- package/dist/primitives/zip.d.ts +25 -0
- package/dist/primitives/zip.d.ts.map +1 -0
- package/dist/primitives/zip.js +78 -0
- package/dist/primitives/zip.js.map +1 -0
- package/dist/shared/docx/DocxArchive.d.ts +94 -0
- package/dist/shared/docx/DocxArchive.d.ts.map +1 -0
- package/dist/shared/docx/DocxArchive.js +169 -0
- package/dist/shared/docx/DocxArchive.js.map +1 -0
- package/dist/shared/ooxml/namespaces.d.ts +149 -0
- package/dist/shared/ooxml/namespaces.d.ts.map +1 -0
- package/dist/shared/ooxml/namespaces.js +224 -0
- package/dist/shared/ooxml/namespaces.js.map +1 -0
- package/dist/shared/ooxml/types.d.ts +136 -0
- package/dist/shared/ooxml/types.d.ts.map +1 -0
- package/dist/shared/ooxml/types.js +7 -0
- package/dist/shared/ooxml/types.js.map +1 -0
- package/package.json +63 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ZipCompression = 'STORE' | 'DEFLATE';
|
|
2
|
+
export type ZipEntryInfo = {
|
|
3
|
+
name: string;
|
|
4
|
+
isDirectory: boolean;
|
|
5
|
+
compressedSize: number;
|
|
6
|
+
uncompressedSize: number;
|
|
7
|
+
};
|
|
8
|
+
export declare class DocxZip {
|
|
9
|
+
private zip;
|
|
10
|
+
private constructor();
|
|
11
|
+
static load(buffer: Buffer): Promise<DocxZip>;
|
|
12
|
+
readText(path: string): Promise<string>;
|
|
13
|
+
readTextOrNull(path: string): Promise<string | null>;
|
|
14
|
+
writeText(path: string, text: string): void;
|
|
15
|
+
hasFile(path: string): boolean;
|
|
16
|
+
listFiles(): string[];
|
|
17
|
+
toBuffer(): Promise<Buffer>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createZipBuffer(files: Record<string, string | Buffer | Uint8Array>, opts?: {
|
|
20
|
+
compression?: ZipCompression;
|
|
21
|
+
compressionLevel?: number;
|
|
22
|
+
}): Promise<Buffer>;
|
|
23
|
+
export declare function readZipText(buffer: Buffer, path: string): Promise<string | null>;
|
|
24
|
+
export declare function inspectZipEntries(buffer: Buffer): Promise<ZipEntryInfo[]>;
|
|
25
|
+
//# sourceMappingURL=zip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../src/primitives/zip.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAaF,qBAAa,OAAO;IAClB,OAAO,CAAC,GAAG,CAAQ;IAEnB,OAAO;WAIM,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKnD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMjC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAM1D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI3C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B,SAAS,IAAI,MAAM,EAAE;IAQf,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CAIlC;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,EACnD,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,cAAc,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKtF;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAW/E"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import JSZip from 'jszip';
|
|
2
|
+
function safeNonNegativeInt(value) {
|
|
3
|
+
const parsed = Number(value);
|
|
4
|
+
if (!Number.isFinite(parsed) || parsed < 0)
|
|
5
|
+
return 0;
|
|
6
|
+
return Math.floor(parsed);
|
|
7
|
+
}
|
|
8
|
+
export class DocxZip {
|
|
9
|
+
zip;
|
|
10
|
+
constructor(zip) {
|
|
11
|
+
this.zip = zip;
|
|
12
|
+
}
|
|
13
|
+
static async load(buffer) {
|
|
14
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
15
|
+
return new DocxZip(zip);
|
|
16
|
+
}
|
|
17
|
+
readText(path) {
|
|
18
|
+
const file = this.zip.file(path);
|
|
19
|
+
if (!file)
|
|
20
|
+
throw new Error(`Missing file in .docx: ${path}`);
|
|
21
|
+
return file.async('text');
|
|
22
|
+
}
|
|
23
|
+
async readTextOrNull(path) {
|
|
24
|
+
const file = this.zip.file(path);
|
|
25
|
+
if (!file)
|
|
26
|
+
return null;
|
|
27
|
+
return file.async('text');
|
|
28
|
+
}
|
|
29
|
+
writeText(path, text) {
|
|
30
|
+
this.zip.file(path, text);
|
|
31
|
+
}
|
|
32
|
+
hasFile(path) {
|
|
33
|
+
return this.zip.file(path) !== null;
|
|
34
|
+
}
|
|
35
|
+
listFiles() {
|
|
36
|
+
const files = [];
|
|
37
|
+
this.zip.forEach((relativePath) => {
|
|
38
|
+
files.push(relativePath);
|
|
39
|
+
});
|
|
40
|
+
return files;
|
|
41
|
+
}
|
|
42
|
+
async toBuffer() {
|
|
43
|
+
const out = await this.zip.generateAsync({ type: 'nodebuffer' });
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export async function createZipBuffer(files, opts) {
|
|
48
|
+
const zip = new JSZip();
|
|
49
|
+
for (const [name, value] of Object.entries(files)) {
|
|
50
|
+
zip.file(name, value);
|
|
51
|
+
}
|
|
52
|
+
const out = await zip.generateAsync({
|
|
53
|
+
type: 'nodebuffer',
|
|
54
|
+
compression: opts?.compression ?? 'STORE',
|
|
55
|
+
compressionOptions: { level: opts?.compressionLevel ?? 9 },
|
|
56
|
+
});
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
59
|
+
export async function readZipText(buffer, path) {
|
|
60
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
61
|
+
const file = zip.file(path);
|
|
62
|
+
if (!file)
|
|
63
|
+
return null;
|
|
64
|
+
return file.async('text');
|
|
65
|
+
}
|
|
66
|
+
export async function inspectZipEntries(buffer) {
|
|
67
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
68
|
+
return Object.values(zip.files).map((file) => {
|
|
69
|
+
const stats = file._data;
|
|
70
|
+
return {
|
|
71
|
+
name: file.name,
|
|
72
|
+
isDirectory: file.dir,
|
|
73
|
+
compressedSize: safeNonNegativeInt(stats?.compressedSize),
|
|
74
|
+
uncompressedSize: safeNonNegativeInt(stats?.uncompressedSize),
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=zip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../src/primitives/zip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,SAAS,kBAAkB,CAAC,KAAc;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,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D,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAI,IAAkC,CAAC,KAAK,CAAC;QACxD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,GAAG;YACrB,cAAc,EAAE,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC;YACzD,gBAAgB,EAAE,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,CAAC;SAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOCX archive handler using JSZip.
|
|
3
|
+
*
|
|
4
|
+
* Handles reading and writing DOCX files as ZIP archives,
|
|
5
|
+
* providing access to document.xml and other parts.
|
|
6
|
+
*/
|
|
7
|
+
/** Standard paths within a DOCX archive */
|
|
8
|
+
export declare const DOCX_PATHS: {
|
|
9
|
+
readonly DOCUMENT: "word/document.xml";
|
|
10
|
+
readonly STYLES: "word/styles.xml";
|
|
11
|
+
readonly NUMBERING: "word/numbering.xml";
|
|
12
|
+
readonly SETTINGS: "word/settings.xml";
|
|
13
|
+
readonly COMMENTS: "word/comments.xml";
|
|
14
|
+
readonly FOOTNOTES: "word/footnotes.xml";
|
|
15
|
+
readonly ENDNOTES: "word/endnotes.xml";
|
|
16
|
+
readonly RELS: "word/_rels/document.xml.rels";
|
|
17
|
+
readonly CONTENT_TYPES: "[Content_Types].xml";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Represents a DOCX file as a ZIP archive.
|
|
21
|
+
*
|
|
22
|
+
* Provides methods to read and modify the XML parts of a DOCX file.
|
|
23
|
+
*/
|
|
24
|
+
export declare class DocxArchive {
|
|
25
|
+
private zip;
|
|
26
|
+
private modified;
|
|
27
|
+
private constructor();
|
|
28
|
+
/**
|
|
29
|
+
* Load a DOCX file from a Buffer.
|
|
30
|
+
*
|
|
31
|
+
* @param buffer - The DOCX file contents
|
|
32
|
+
* @returns A DocxArchive instance
|
|
33
|
+
*/
|
|
34
|
+
static load(buffer: Buffer): Promise<DocxArchive>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a new empty DOCX archive.
|
|
37
|
+
*
|
|
38
|
+
* @returns A new DocxArchive with minimal structure
|
|
39
|
+
*/
|
|
40
|
+
static create(): Promise<DocxArchive>;
|
|
41
|
+
/**
|
|
42
|
+
* Get the main document.xml content.
|
|
43
|
+
*/
|
|
44
|
+
getDocumentXml(): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Set the main document.xml content.
|
|
47
|
+
*/
|
|
48
|
+
setDocumentXml(xml: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get an arbitrary file from the archive.
|
|
51
|
+
*
|
|
52
|
+
* @param path - Path within the archive
|
|
53
|
+
* @returns File contents as string, or null if not found
|
|
54
|
+
*/
|
|
55
|
+
getFile(path: string): Promise<string | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Set an arbitrary file in the archive.
|
|
58
|
+
*
|
|
59
|
+
* @param path - Path within the archive
|
|
60
|
+
* @param content - File contents
|
|
61
|
+
*/
|
|
62
|
+
setFile(path: string, content: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Check if a file exists in the archive.
|
|
65
|
+
*/
|
|
66
|
+
hasFile(path: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* List all files in the archive.
|
|
69
|
+
*/
|
|
70
|
+
listFiles(): string[];
|
|
71
|
+
/**
|
|
72
|
+
* Get the styles.xml content if present.
|
|
73
|
+
*/
|
|
74
|
+
getStylesXml(): Promise<string | null>;
|
|
75
|
+
/**
|
|
76
|
+
* Get the numbering.xml content if present.
|
|
77
|
+
*/
|
|
78
|
+
getNumberingXml(): Promise<string | null>;
|
|
79
|
+
/**
|
|
80
|
+
* Save the archive to a Buffer.
|
|
81
|
+
*
|
|
82
|
+
* @returns The DOCX file as a Buffer
|
|
83
|
+
*/
|
|
84
|
+
save(): Promise<Buffer>;
|
|
85
|
+
/**
|
|
86
|
+
* Clone this archive (deep copy).
|
|
87
|
+
*/
|
|
88
|
+
clone(): Promise<DocxArchive>;
|
|
89
|
+
/**
|
|
90
|
+
* Get list of modified paths since loading.
|
|
91
|
+
*/
|
|
92
|
+
getModifiedPaths(): string[];
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=DocxArchive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocxArchive.d.ts","sourceRoot":"","sources":["../../../src/shared/docx/DocxArchive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,2CAA2C;AAC3C,eAAO,MAAM,UAAU;;;;;;;;;;CAUb,CAAC;AAEX;;;;GAIG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,QAAQ,CAA0B;IAE1C,OAAO;IAIP;;;;;OAKG;WACU,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAcvD;;;;OAIG;WACU,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC;IAmC3C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAQvC;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKjC;;;;;OAKG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQnD;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAK5C;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B;;OAEG;IACH,SAAS,IAAI,MAAM,EAAE;IAQrB;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI5C;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI/C;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAS7B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC;IAKnC;;OAEG;IACH,gBAAgB,IAAI,MAAM,EAAE;CAG7B"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOCX archive handler using JSZip.
|
|
3
|
+
*
|
|
4
|
+
* Handles reading and writing DOCX files as ZIP archives,
|
|
5
|
+
* providing access to document.xml and other parts.
|
|
6
|
+
*/
|
|
7
|
+
import JSZip from 'jszip';
|
|
8
|
+
/** Standard paths within a DOCX archive */
|
|
9
|
+
export const DOCX_PATHS = {
|
|
10
|
+
DOCUMENT: 'word/document.xml',
|
|
11
|
+
STYLES: 'word/styles.xml',
|
|
12
|
+
NUMBERING: 'word/numbering.xml',
|
|
13
|
+
SETTINGS: 'word/settings.xml',
|
|
14
|
+
COMMENTS: 'word/comments.xml',
|
|
15
|
+
FOOTNOTES: 'word/footnotes.xml',
|
|
16
|
+
ENDNOTES: 'word/endnotes.xml',
|
|
17
|
+
RELS: 'word/_rels/document.xml.rels',
|
|
18
|
+
CONTENT_TYPES: '[Content_Types].xml',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Represents a DOCX file as a ZIP archive.
|
|
22
|
+
*
|
|
23
|
+
* Provides methods to read and modify the XML parts of a DOCX file.
|
|
24
|
+
*/
|
|
25
|
+
export class DocxArchive {
|
|
26
|
+
zip;
|
|
27
|
+
modified = new Set();
|
|
28
|
+
constructor(zip) {
|
|
29
|
+
this.zip = zip;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Load a DOCX file from a Buffer.
|
|
33
|
+
*
|
|
34
|
+
* @param buffer - The DOCX file contents
|
|
35
|
+
* @returns A DocxArchive instance
|
|
36
|
+
*/
|
|
37
|
+
static async load(buffer) {
|
|
38
|
+
const zip = await JSZip.loadAsync(buffer);
|
|
39
|
+
// Verify this is a valid DOCX
|
|
40
|
+
if (!zip.file(DOCX_PATHS.DOCUMENT)) {
|
|
41
|
+
throw new Error('Invalid DOCX: missing word/document.xml');
|
|
42
|
+
}
|
|
43
|
+
if (!zip.file(DOCX_PATHS.CONTENT_TYPES)) {
|
|
44
|
+
throw new Error('Invalid DOCX: missing [Content_Types].xml');
|
|
45
|
+
}
|
|
46
|
+
return new DocxArchive(zip);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Create a new empty DOCX archive.
|
|
50
|
+
*
|
|
51
|
+
* @returns A new DocxArchive with minimal structure
|
|
52
|
+
*/
|
|
53
|
+
static async create() {
|
|
54
|
+
const zip = new JSZip();
|
|
55
|
+
// Add minimal content types
|
|
56
|
+
zip.file(DOCX_PATHS.CONTENT_TYPES, `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
57
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
58
|
+
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
59
|
+
<Default Extension="xml" ContentType="application/xml"/>
|
|
60
|
+
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
61
|
+
</Types>`);
|
|
62
|
+
// Add minimal document
|
|
63
|
+
zip.file(DOCX_PATHS.DOCUMENT, `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
64
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
65
|
+
<w:body/>
|
|
66
|
+
</w:document>`);
|
|
67
|
+
// Add relationships
|
|
68
|
+
zip.file('_rels/.rels', `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
69
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
70
|
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
71
|
+
</Relationships>`);
|
|
72
|
+
return new DocxArchive(zip);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get the main document.xml content.
|
|
76
|
+
*/
|
|
77
|
+
async getDocumentXml() {
|
|
78
|
+
const file = this.zip.file(DOCX_PATHS.DOCUMENT);
|
|
79
|
+
if (!file) {
|
|
80
|
+
throw new Error('Document XML not found');
|
|
81
|
+
}
|
|
82
|
+
return file.async('string');
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Set the main document.xml content.
|
|
86
|
+
*/
|
|
87
|
+
setDocumentXml(xml) {
|
|
88
|
+
this.zip.file(DOCX_PATHS.DOCUMENT, xml);
|
|
89
|
+
this.modified.add(DOCX_PATHS.DOCUMENT);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get an arbitrary file from the archive.
|
|
93
|
+
*
|
|
94
|
+
* @param path - Path within the archive
|
|
95
|
+
* @returns File contents as string, or null if not found
|
|
96
|
+
*/
|
|
97
|
+
async getFile(path) {
|
|
98
|
+
const file = this.zip.file(path);
|
|
99
|
+
if (!file) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return file.async('string');
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Set an arbitrary file in the archive.
|
|
106
|
+
*
|
|
107
|
+
* @param path - Path within the archive
|
|
108
|
+
* @param content - File contents
|
|
109
|
+
*/
|
|
110
|
+
setFile(path, content) {
|
|
111
|
+
this.zip.file(path, content);
|
|
112
|
+
this.modified.add(path);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Check if a file exists in the archive.
|
|
116
|
+
*/
|
|
117
|
+
hasFile(path) {
|
|
118
|
+
return this.zip.file(path) !== null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* List all files in the archive.
|
|
122
|
+
*/
|
|
123
|
+
listFiles() {
|
|
124
|
+
const files = [];
|
|
125
|
+
this.zip.forEach((relativePath) => {
|
|
126
|
+
files.push(relativePath);
|
|
127
|
+
});
|
|
128
|
+
return files;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get the styles.xml content if present.
|
|
132
|
+
*/
|
|
133
|
+
async getStylesXml() {
|
|
134
|
+
return this.getFile(DOCX_PATHS.STYLES);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get the numbering.xml content if present.
|
|
138
|
+
*/
|
|
139
|
+
async getNumberingXml() {
|
|
140
|
+
return this.getFile(DOCX_PATHS.NUMBERING);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Save the archive to a Buffer.
|
|
144
|
+
*
|
|
145
|
+
* @returns The DOCX file as a Buffer
|
|
146
|
+
*/
|
|
147
|
+
async save() {
|
|
148
|
+
const content = await this.zip.generateAsync({
|
|
149
|
+
type: 'nodebuffer',
|
|
150
|
+
compression: 'DEFLATE',
|
|
151
|
+
compressionOptions: { level: 6 },
|
|
152
|
+
});
|
|
153
|
+
return content;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Clone this archive (deep copy).
|
|
157
|
+
*/
|
|
158
|
+
async clone() {
|
|
159
|
+
const buffer = await this.save();
|
|
160
|
+
return DocxArchive.load(buffer);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Get list of modified paths since loading.
|
|
164
|
+
*/
|
|
165
|
+
getModifiedPaths() {
|
|
166
|
+
return Array.from(this.modified);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=DocxArchive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocxArchive.js","sourceRoot":"","sources":["../../../src/shared/docx/DocxArchive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B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AAI,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,SAAS;QACP,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YAChC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC;YAC3C,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,SAAS;YACtB,kBAAkB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;SACjC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACjC,OAAO,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OOXML namespace constants for Word document manipulation.
|
|
3
|
+
*
|
|
4
|
+
* Ported from: app/shared/document_primitives/ooxml/namespaces.py
|
|
5
|
+
*
|
|
6
|
+
* Central definitions for all WordprocessingML namespaces and qualified element names.
|
|
7
|
+
* This ensures consistent namespace handling across all XML operations.
|
|
8
|
+
*
|
|
9
|
+
* Reference: ECMA-376 Office Open XML File Formats
|
|
10
|
+
*/
|
|
11
|
+
/** Main WordprocessingML namespace */
|
|
12
|
+
export declare const W_NS = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
|
|
13
|
+
/** Relationship namespace (for hyperlinks, etc.) */
|
|
14
|
+
export declare const R_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
15
|
+
/** Extended properties namespace */
|
|
16
|
+
export declare const WP_NS = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
|
|
17
|
+
/** Drawing namespace */
|
|
18
|
+
export declare const A_NS = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
19
|
+
/** VML namespace (legacy drawing) */
|
|
20
|
+
export declare const V_NS = "urn:schemas-microsoft-com:vml";
|
|
21
|
+
/** Math namespace */
|
|
22
|
+
export declare const M_NS = "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
23
|
+
export declare const NSMAP: Record<string, string>;
|
|
24
|
+
/** Reverse map for looking up prefixes */
|
|
25
|
+
export declare const PREFIX_MAP: Record<string, string>;
|
|
26
|
+
export declare const W_BODY = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}body";
|
|
27
|
+
export declare const W_DOCUMENT = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}document";
|
|
28
|
+
export declare const W_SECTPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}sectPr";
|
|
29
|
+
export declare const W_P = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}p";
|
|
30
|
+
export declare const W_PPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pPr";
|
|
31
|
+
export declare const W_PSTYLE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pStyle";
|
|
32
|
+
export declare const W_JC = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}jc";
|
|
33
|
+
export declare const W_R = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}r";
|
|
34
|
+
export declare const W_RPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPr";
|
|
35
|
+
export declare const W_T = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t";
|
|
36
|
+
export declare const W_BR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}br";
|
|
37
|
+
export declare const W_TAB = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tab";
|
|
38
|
+
export declare const W_B = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}b";
|
|
39
|
+
export declare const W_B_CS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}bCs";
|
|
40
|
+
export declare const W_I = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}i";
|
|
41
|
+
export declare const W_I_CS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}iCs";
|
|
42
|
+
export declare const W_U = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}u";
|
|
43
|
+
export declare const W_STRIKE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}strike";
|
|
44
|
+
export declare const W_DSTRIKE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}dstrike";
|
|
45
|
+
export declare const W_CAPS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}caps";
|
|
46
|
+
export declare const W_SMALLCAPS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}smallCaps";
|
|
47
|
+
export declare const W_VANISH = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}vanish";
|
|
48
|
+
export declare const W_RFONTS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rFonts";
|
|
49
|
+
export declare const W_SZ = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}sz";
|
|
50
|
+
export declare const W_SZ_CS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}szCs";
|
|
51
|
+
export declare const W_COLOR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}color";
|
|
52
|
+
export declare const W_HIGHLIGHT = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}highlight";
|
|
53
|
+
export declare const W_SHD = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}shd";
|
|
54
|
+
export declare const W_RSTYLE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rStyle";
|
|
55
|
+
export declare const W_BOOKMARK_START = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}bookmarkStart";
|
|
56
|
+
export declare const W_BOOKMARK_END = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}bookmarkEnd";
|
|
57
|
+
export declare const W_FLDCHAR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}fldChar";
|
|
58
|
+
export declare const W_FLDCHARTYPE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}fldCharType";
|
|
59
|
+
export declare const W_INSTRTEXT = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}instrText";
|
|
60
|
+
export declare const W_FLDSIMPLE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}fldSimple";
|
|
61
|
+
export declare const W_DIRTY = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}dirty";
|
|
62
|
+
export declare const W_HYPERLINK = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}hyperlink";
|
|
63
|
+
export declare const W_NUMPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}numPr";
|
|
64
|
+
export declare const W_ILVL = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ilvl";
|
|
65
|
+
export declare const W_NUMID = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}numId";
|
|
66
|
+
export declare const W_TBL = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tbl";
|
|
67
|
+
export declare const W_TR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tr";
|
|
68
|
+
export declare const W_TC = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tc";
|
|
69
|
+
export declare const W_TBLPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tblPr";
|
|
70
|
+
export declare const W_TCPR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tcPr";
|
|
71
|
+
export declare const W_SECTTYPE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}type";
|
|
72
|
+
export declare const W_HEADERREFERENCE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}headerReference";
|
|
73
|
+
export declare const W_FOOTERREFERENCE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}footerReference";
|
|
74
|
+
export declare const W_COMMENT_RANGE_START = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}commentRangeStart";
|
|
75
|
+
export declare const W_COMMENT_RANGE_END = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}commentRangeEnd";
|
|
76
|
+
export declare const W_INS = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ins";
|
|
77
|
+
export declare const W_DEL = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}del";
|
|
78
|
+
export declare const W_DELTEXT = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}delText";
|
|
79
|
+
export declare const W_MOVEFROM = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}moveFrom";
|
|
80
|
+
export declare const W_MOVETO = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}moveTo";
|
|
81
|
+
export declare const W_RPRCHANGE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}rPrChange";
|
|
82
|
+
export declare const W_PPRCHANGE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}pPrChange";
|
|
83
|
+
export declare const R_ID = "{http://schemas.openxmlformats.org/officeDocument/2006/relationships}id";
|
|
84
|
+
export declare const W_ID = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}id";
|
|
85
|
+
export declare const W_NAME = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}name";
|
|
86
|
+
export declare const W_AUTHOR = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}author";
|
|
87
|
+
export declare const W_DATE = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}date";
|
|
88
|
+
export declare const W_VAL = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}val";
|
|
89
|
+
export declare const UNDERLINE_NONE = "none";
|
|
90
|
+
export declare const UNDERLINE_SINGLE = "single";
|
|
91
|
+
export declare const UNDERLINE_DOUBLE = "double";
|
|
92
|
+
export declare const UNDERLINE_DOTTED = "dotted";
|
|
93
|
+
export declare const UNDERLINE_DASHED = "dash";
|
|
94
|
+
export declare const UNDERLINE_WAVY = "wave";
|
|
95
|
+
export declare const UNDERLINE_WORDS = "words";
|
|
96
|
+
export declare const ALIGN_LEFT = "left";
|
|
97
|
+
export declare const ALIGN_CENTER = "center";
|
|
98
|
+
export declare const ALIGN_RIGHT = "right";
|
|
99
|
+
export declare const ALIGN_JUSTIFY = "both";
|
|
100
|
+
export declare const FLDCHAR_BEGIN = "begin";
|
|
101
|
+
export declare const FLDCHAR_SEPARATE = "separate";
|
|
102
|
+
export declare const FLDCHAR_END = "end";
|
|
103
|
+
export declare const HIGHLIGHT_YELLOW = "yellow";
|
|
104
|
+
export declare const HIGHLIGHT_GREEN = "green";
|
|
105
|
+
export declare const HIGHLIGHT_CYAN = "cyan";
|
|
106
|
+
export declare const HIGHLIGHT_MAGENTA = "magenta";
|
|
107
|
+
export declare const HIGHLIGHT_BLUE = "blue";
|
|
108
|
+
export declare const HIGHLIGHT_RED = "red";
|
|
109
|
+
export declare const HIGHLIGHT_DARK_BLUE = "darkBlue";
|
|
110
|
+
export declare const HIGHLIGHT_DARK_CYAN = "darkCyan";
|
|
111
|
+
export declare const HIGHLIGHT_DARK_GREEN = "darkGreen";
|
|
112
|
+
export declare const HIGHLIGHT_DARK_MAGENTA = "darkMagenta";
|
|
113
|
+
export declare const HIGHLIGHT_DARK_RED = "darkRed";
|
|
114
|
+
export declare const HIGHLIGHT_DARK_YELLOW = "darkYellow";
|
|
115
|
+
export declare const HIGHLIGHT_DARK_GRAY = "darkGray";
|
|
116
|
+
export declare const HIGHLIGHT_LIGHT_GRAY = "lightGray";
|
|
117
|
+
export declare const HIGHLIGHT_BLACK = "black";
|
|
118
|
+
export declare const HIGHLIGHT_NONE = "none";
|
|
119
|
+
/**
|
|
120
|
+
* Convert Clark notation to prefixed notation.
|
|
121
|
+
*
|
|
122
|
+
* @param clarkName - Element name in Clark notation, e.g., '{http://...}p'
|
|
123
|
+
* @returns Prefixed name, e.g., 'w:p'
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* clarkToPrefixed(W_P) // => 'w:p'
|
|
127
|
+
*/
|
|
128
|
+
export declare function clarkToPrefixed(clarkName: string): string;
|
|
129
|
+
/**
|
|
130
|
+
* Convert prefixed notation to Clark notation.
|
|
131
|
+
*
|
|
132
|
+
* @param prefixedName - Element name with prefix, e.g., 'w:p'
|
|
133
|
+
* @returns Clark notation name, e.g., '{http://...}p'
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* prefixedToClark('w:p') // => '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}p'
|
|
137
|
+
*/
|
|
138
|
+
export declare function prefixedToClark(prefixedName: string): string;
|
|
139
|
+
/**
|
|
140
|
+
* Extract local name from Clark notation.
|
|
141
|
+
*
|
|
142
|
+
* @param clarkName - Element name in Clark notation
|
|
143
|
+
* @returns Local name without namespace
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* localName(W_P) // => 'p'
|
|
147
|
+
*/
|
|
148
|
+
export declare function localName(clarkName: string): string;
|
|
149
|
+
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../../src/shared/ooxml/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,sCAAsC;AACtC,eAAO,MAAM,IAAI,iEAAiE,CAAC;AAEnF,oDAAoD;AACpD,eAAO,MAAM,IAAI,wEAAwE,CAAC;AAE1F,oCAAoC;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