@docx4j/core-ts 0.1.0

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.
Files changed (92) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +12 -0
  3. package/README.md +126 -0
  4. package/dist/index.d.mts +7 -0
  5. package/dist/index.mjs +10 -0
  6. package/dist/model/content/Body.d.mts +107 -0
  7. package/dist/model/content/Body.mjs +363 -0
  8. package/dist/model/content/Font.d.mts +46 -0
  9. package/dist/model/content/Font.mjs +50 -0
  10. package/dist/model/content/Paragraph.d.mts +99 -0
  11. package/dist/model/content/Paragraph.mjs +364 -0
  12. package/dist/model/content/Range.d.mts +34 -0
  13. package/dist/model/content/Range.mjs +94 -0
  14. package/dist/model/content/index.d.mts +7 -0
  15. package/dist/model/content/index.mjs +9 -0
  16. package/dist/model/content/search.d.mts +12 -0
  17. package/dist/model/content/search.mjs +68 -0
  18. package/dist/model/content/tree.d.mts +40 -0
  19. package/dist/model/content/tree.mjs +120 -0
  20. package/dist/model/index.d.mts +1 -0
  21. package/dist/model/index.mjs +2 -0
  22. package/dist/opc/ContentTypeManager.d.mts +37 -0
  23. package/dist/opc/ContentTypeManager.mjs +126 -0
  24. package/dist/opc/ContentTypes.d.mts +118 -0
  25. package/dist/opc/ContentTypes.mjs +139 -0
  26. package/dist/opc/FlatOpcPartStore.d.mts +42 -0
  27. package/dist/opc/FlatOpcPartStore.mjs +151 -0
  28. package/dist/opc/Load.d.mts +18 -0
  29. package/dist/opc/Load.mjs +123 -0
  30. package/dist/opc/PartName.d.mts +46 -0
  31. package/dist/opc/PartName.mjs +132 -0
  32. package/dist/opc/PartStore.d.mts +45 -0
  33. package/dist/opc/PartStore.mjs +54 -0
  34. package/dist/opc/Save.d.mts +9 -0
  35. package/dist/opc/Save.mjs +52 -0
  36. package/dist/opc/ZipPartStore.d.mts +32 -0
  37. package/dist/opc/ZipPartStore.mjs +117 -0
  38. package/dist/opc/exceptions.d.mts +17 -0
  39. package/dist/opc/exceptions.mjs +22 -0
  40. package/dist/opc/index.d.mts +12 -0
  41. package/dist/opc/index.mjs +13 -0
  42. package/dist/opc/mce/preprocessor.d.mts +15 -0
  43. package/dist/opc/mce/preprocessor.mjs +74 -0
  44. package/dist/opc/mce/understood.d.mts +1 -0
  45. package/dist/opc/mce/understood.mjs +98 -0
  46. package/dist/packages/OpcPackage.d.mts +62 -0
  47. package/dist/packages/OpcPackage.mjs +133 -0
  48. package/dist/packages/PresentationMLPackage.d.mts +12 -0
  49. package/dist/packages/PresentationMLPackage.mjs +39 -0
  50. package/dist/packages/SpreadsheetMLPackage.d.mts +12 -0
  51. package/dist/packages/SpreadsheetMLPackage.mjs +38 -0
  52. package/dist/packages/WordprocessingMLPackage.d.mts +49 -0
  53. package/dist/packages/WordprocessingMLPackage.mjs +130 -0
  54. package/dist/packages/index.d.mts +5 -0
  55. package/dist/packages/index.mjs +6 -0
  56. package/dist/packages/registry.d.mts +7 -0
  57. package/dist/packages/registry.mjs +18 -0
  58. package/dist/parts/BinaryPart.d.mts +38 -0
  59. package/dist/parts/BinaryPart.mjs +72 -0
  60. package/dist/parts/DefaultXmlPart.d.mts +29 -0
  61. package/dist/parts/DefaultXmlPart.mjs +63 -0
  62. package/dist/parts/Namespaces.d.mts +99 -0
  63. package/dist/parts/Namespaces.mjs +99 -0
  64. package/dist/parts/Part.d.mts +50 -0
  65. package/dist/parts/Part.mjs +68 -0
  66. package/dist/parts/PartRegistry.d.mts +20 -0
  67. package/dist/parts/PartRegistry.mjs +142 -0
  68. package/dist/parts/Parts.d.mts +13 -0
  69. package/dist/parts/Parts.mjs +28 -0
  70. package/dist/parts/RelationshipsPart.d.mts +66 -0
  71. package/dist/parts/RelationshipsPart.mjs +224 -0
  72. package/dist/parts/XmlPart.d.mts +46 -0
  73. package/dist/parts/XmlPart.mjs +87 -0
  74. package/dist/parts/customXml/index.d.mts +9 -0
  75. package/dist/parts/customXml/index.mjs +11 -0
  76. package/dist/parts/dml/index.d.mts +54 -0
  77. package/dist/parts/dml/index.mjs +83 -0
  78. package/dist/parts/docProps/index.d.mts +14 -0
  79. package/dist/parts/docProps/index.mjs +18 -0
  80. package/dist/parts/index.d.mts +14 -0
  81. package/dist/parts/index.mjs +15 -0
  82. package/dist/parts/pml/index.d.mts +53 -0
  83. package/dist/parts/pml/index.mjs +90 -0
  84. package/dist/parts/sml/index.d.mts +61 -0
  85. package/dist/parts/sml/index.mjs +107 -0
  86. package/dist/parts/wml/defaultStyles.d.mts +1 -0
  87. package/dist/parts/wml/defaultStyles.mjs +500 -0
  88. package/dist/parts/wml/index.d.mts +102 -0
  89. package/dist/parts/wml/index.mjs +213 -0
  90. package/dist/xml/dom.d.mts +22 -0
  91. package/dist/xml/dom.mjs +92 -0
  92. package/package.json +75 -0
@@ -0,0 +1,213 @@
1
+ import { XmlPart } from '../XmlPart.mjs';
2
+ import { ContentTypes } from '../../opc/ContentTypes.mjs';
3
+ import { Namespaces } from '../Namespaces.mjs';
4
+ import { DefaultXmlPart } from '../DefaultXmlPart.mjs';
5
+ import { ThemePart } from '../dml/index.mjs';
6
+ import { Body } from '../../model/content/Body.mjs';
7
+ import { Docx4JException } from '../../opc/exceptions.mjs';
8
+ const bodies = new WeakMap();
9
+ /** The Body view of a part's block-level container, one per container object. */
10
+ function bodyOf(part, container, prefix) {
11
+ if (!container)
12
+ throw new Docx4JException(`${part.partName} has no content yet; await getContents() first, or set contents`);
13
+ let body = bodies.get(container);
14
+ if (!body) {
15
+ body = new Body(part, container, prefix, part.package);
16
+ bodies.set(container, body);
17
+ }
18
+ return body;
19
+ }
20
+ const W = Namespaces.NS_WORD12;
21
+ const W15 = 'http://schemas.microsoft.com/office/word/2012/wordml';
22
+ const W16CID = 'http://schemas.microsoft.com/office/word/2016/wordml/cid';
23
+ const WNE = 'http://schemas.microsoft.com/office/word/2006/wordml';
24
+ /**
25
+ * Shared by the main document and the glossary document (docx4j DocumentPart): the shortcuts
26
+ * to styles, numbering, fonts, settings, theme, comments and notes.
27
+ */
28
+ export class DocumentPart extends XmlPart {
29
+ setPartShortcut(part, relationshipType) {
30
+ switch (relationshipType) {
31
+ case Namespaces.STYLES:
32
+ this.styleDefinitionsPart = part;
33
+ return true;
34
+ case Namespaces.NUMBERING:
35
+ this.numberingDefinitionsPart = part;
36
+ return true;
37
+ case Namespaces.FONT_TABLE:
38
+ this.fontTablePart = part;
39
+ return true;
40
+ case Namespaces.THEME:
41
+ this.themePart = part;
42
+ return true;
43
+ case Namespaces.SETTINGS:
44
+ this.documentSettingsPart = part;
45
+ return true;
46
+ case Namespaces.WEB_SETTINGS:
47
+ this.webSettingsPart = part;
48
+ return true;
49
+ case Namespaces.COMMENTS:
50
+ this.commentsPart = part;
51
+ return true;
52
+ case Namespaces.COMMENTS_EXTENDED:
53
+ this.commentsExtendedPart = part;
54
+ return true;
55
+ case Namespaces.COMMENTS_IDS:
56
+ this.commentsIdsPart = part;
57
+ return true;
58
+ case Namespaces.FOOTNOTES:
59
+ this.footnotesPart = part;
60
+ return true;
61
+ case Namespaces.ENDNOTES:
62
+ this.endnotesPart = part;
63
+ return true;
64
+ case Namespaces.OFFICE_2011_PEOPLE:
65
+ this.peoplePart = part;
66
+ return true;
67
+ default: return false;
68
+ }
69
+ }
70
+ /** Header parts related from this document, in relationship order. */
71
+ get headerParts() {
72
+ return this.targets(Namespaces.HEADER);
73
+ }
74
+ get footerParts() {
75
+ return this.targets(Namespaces.FOOTER);
76
+ }
77
+ targets(relationshipType) {
78
+ const rp = this.relationshipsPart;
79
+ if (!rp)
80
+ return [];
81
+ return rp.getRelationshipsByType(relationshipType).map((r) => rp.getPart(r)).filter((p) => p !== undefined);
82
+ }
83
+ }
84
+ /** `/word/document.xml` (docx4j MainDocumentPart). */
85
+ export class MainDocumentPart extends DocumentPart {
86
+ constructor(partName = '/word/document.xml', contentType = ContentTypes.WORDPROCESSINGML_DOCUMENT) {
87
+ super(partName, contentType, Namespaces.DOCUMENT, { namespaceURI: W, localPart: 'document' });
88
+ }
89
+ setPartShortcut(part, relationshipType) {
90
+ if (relationshipType === Namespaces.GLOSSARY_DOCUMENT) {
91
+ this.glossaryDocumentPart = part;
92
+ return true;
93
+ }
94
+ return super.setPartShortcut(part, relationshipType);
95
+ }
96
+ /** The Office JS-shaped view of `w:body`; the part must be unmarshalled (`getBody()` does that). */
97
+ get body() {
98
+ var _a;
99
+ const doc = this.contents;
100
+ (_a = doc.body) !== null && _a !== void 0 ? _a : (doc.body = { TYPE_NAME: 'org_docx4j_wml.Body' });
101
+ return bodyOf(this, doc.body, 'body');
102
+ }
103
+ async getBody() {
104
+ await this.getContents();
105
+ return this.body;
106
+ }
107
+ }
108
+ /** `/word/glossary/document.xml` (docx4j GlossaryDocumentPart). */
109
+ export class GlossaryDocumentPart extends DocumentPart {
110
+ constructor(partName = '/word/glossary/document.xml') {
111
+ super(partName, ContentTypes.WORDPROCESSINGML_GLOSSARYDOCUMENT, Namespaces.GLOSSARY_DOCUMENT, { namespaceURI: W, localPart: 'glossaryDocument' });
112
+ }
113
+ }
114
+ export class StyleDefinitionsPart extends XmlPart {
115
+ constructor(partName = '/word/styles.xml') {
116
+ super(partName, ContentTypes.WORDPROCESSINGML_STYLES, Namespaces.STYLES, { namespaceURI: W, localPart: 'styles' });
117
+ }
118
+ }
119
+ export class NumberingDefinitionsPart extends XmlPart {
120
+ constructor(partName = '/word/numbering.xml') {
121
+ super(partName, ContentTypes.WORDPROCESSINGML_NUMBERING, Namespaces.NUMBERING, { namespaceURI: W, localPart: 'numbering' });
122
+ }
123
+ }
124
+ export class FontTablePart extends XmlPart {
125
+ constructor(partName = '/word/fontTable.xml') {
126
+ super(partName, ContentTypes.WORDPROCESSINGML_FONTTABLE, Namespaces.FONT_TABLE, { namespaceURI: W, localPart: 'fonts' });
127
+ }
128
+ }
129
+ export class DocumentSettingsPart extends XmlPart {
130
+ constructor(partName = '/word/settings.xml') {
131
+ super(partName, ContentTypes.WORDPROCESSINGML_SETTINGS, Namespaces.SETTINGS, { namespaceURI: W, localPart: 'settings' });
132
+ }
133
+ }
134
+ export class WebSettingsPart extends XmlPart {
135
+ constructor(partName = '/word/webSettings.xml') {
136
+ super(partName, ContentTypes.WORDPROCESSINGML_WEBSETTINGS, Namespaces.WEB_SETTINGS, { namespaceURI: W, localPart: 'webSettings' });
137
+ }
138
+ }
139
+ export class HeaderPart extends XmlPart {
140
+ constructor(partName = '/word/header1.xml') {
141
+ super(partName, ContentTypes.WORDPROCESSINGML_HEADER, Namespaces.HEADER, { namespaceURI: W, localPart: 'hdr' });
142
+ }
143
+ /** The header's content as a Body; addresses are 'header:<relId>/n'. */
144
+ get body() {
145
+ var _a, _b;
146
+ return bodyOf(this, this.contents, `header:${(_b = (_a = this.sourceRelationship) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.partName.fileName}`);
147
+ }
148
+ async getBody() {
149
+ await this.getContents();
150
+ return this.body;
151
+ }
152
+ }
153
+ export class FooterPart extends XmlPart {
154
+ constructor(partName = '/word/footer1.xml') {
155
+ super(partName, ContentTypes.WORDPROCESSINGML_FOOTER, Namespaces.FOOTER, { namespaceURI: W, localPart: 'ftr' });
156
+ }
157
+ /** The footer's content as a Body; addresses are 'footer:<relId>/n'. */
158
+ get body() {
159
+ var _a, _b;
160
+ return bodyOf(this, this.contents, `footer:${(_b = (_a = this.sourceRelationship) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this.partName.fileName}`);
161
+ }
162
+ async getBody() {
163
+ await this.getContents();
164
+ return this.body;
165
+ }
166
+ }
167
+ export class FootnotesPart extends XmlPart {
168
+ constructor(partName = '/word/footnotes.xml') {
169
+ super(partName, ContentTypes.WORDPROCESSINGML_FOOTNOTES, Namespaces.FOOTNOTES, { namespaceURI: W, localPart: 'footnotes' });
170
+ }
171
+ }
172
+ export class EndnotesPart extends XmlPart {
173
+ constructor(partName = '/word/endnotes.xml') {
174
+ super(partName, ContentTypes.WORDPROCESSINGML_ENDNOTES, Namespaces.ENDNOTES, { namespaceURI: W, localPart: 'endnotes' });
175
+ }
176
+ }
177
+ export class CommentsPart extends XmlPart {
178
+ constructor(partName = '/word/comments.xml') {
179
+ super(partName, ContentTypes.WORDPROCESSINGML_COMMENTS, Namespaces.COMMENTS, { namespaceURI: W, localPart: 'comments' });
180
+ }
181
+ }
182
+ export class CommentsExtendedPart extends XmlPart {
183
+ constructor(partName = '/word/commentsExtended.xml') {
184
+ super(partName, ContentTypes.WORDPROCESSINGML_COMMENTS_EXTENDED, Namespaces.COMMENTS_EXTENDED, { namespaceURI: W15, localPart: 'commentsEx' });
185
+ }
186
+ }
187
+ export class CommentsIdsPart extends XmlPart {
188
+ constructor(partName = '/word/commentsIds.xml') {
189
+ super(partName, ContentTypes.WORDPROCESSINGML_COMMENTS_IDS, Namespaces.COMMENTS_IDS, { namespaceURI: W16CID, localPart: 'commentsIds' });
190
+ }
191
+ }
192
+ export class PeoplePart extends XmlPart {
193
+ constructor(partName = '/word/people.xml') {
194
+ super(partName, ContentTypes.WORDPROCESSINGML_PEOPLE, Namespaces.OFFICE_2011_PEOPLE, { namespaceURI: W15, localPart: 'people' });
195
+ }
196
+ }
197
+ export class KeyMapCustomizationsPart extends XmlPart {
198
+ constructor(partName = '/word/customizations.xml') {
199
+ super(partName, ContentTypes.MS_WORD_KEYMAP, Namespaces.KEYMAP, { namespaceURI: WNE, localPart: 'tcg' });
200
+ }
201
+ }
202
+ export class VbaDataPart extends XmlPart {
203
+ constructor(partName = '/word/vbaData.xml') {
204
+ super(partName, ContentTypes.OFFICEDOCUMENT_VBA_DATA, Namespaces.VBA_DATA_WORD, { namespaceURI: WNE, localPart: 'vbaSuppData' });
205
+ }
206
+ }
207
+ /** A VML drawing (`/word/vmlDrawing1.vml`, docx4j VMLPart), as a DOM: the root `<xml>` is docx4j's own wrapper, not typed here yet. */
208
+ export class VMLPart extends DefaultXmlPart {
209
+ constructor(partName) {
210
+ super(partName, ContentTypes.VML_DRAWING, Namespaces.VML);
211
+ }
212
+ }
213
+ export { ThemePart };
@@ -0,0 +1,22 @@
1
+ /** The declaration docx4j writes on every XML part. */
2
+ export declare const XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
3
+ /** Parses XML text to a DOM document; throws on malformed input. */
4
+ export declare function parseXml(text: string): Document;
5
+ /** Serialises a node (document or element) without an XML declaration. */
6
+ export declare function serializeXml(node: Node): string;
7
+ export declare function createDocument(): Document;
8
+ /** XML declaration plus the serialised document element, as one string. */
9
+ export declare function serializeXmlPart(node: Node): string;
10
+ /** UTF-8 bytes of a string. */
11
+ export declare function encodeText(text: string): Uint8Array;
12
+ /**
13
+ * Text of an XML part's bytes: honours a UTF-8 or UTF-16 byte order mark, else assumes UTF-8
14
+ * (the only encoding Office writes without a BOM). The BOM is not part of the result.
15
+ */
16
+ export declare function decodeXmlText(bytes: Uint8Array): string;
17
+ /** Removes an XML declaration (and a leading BOM) from XML text. */
18
+ export declare function stripXmlDeclaration(text: string): string;
19
+ export declare function base64Encode(bytes: Uint8Array): string;
20
+ export declare function base64Decode(text: string): Uint8Array;
21
+ /** Element children of a node, in order. */
22
+ export declare function childElements(node: Node): Element[];
@@ -0,0 +1,92 @@
1
+ // DOM, text and base64 helpers over the runtime's DOM implementation. In Node the runtime brings
2
+ // @xmldom/xmldom; in browsers it uses the native DOM. Jsonix.DOM is not in the runtime's typings
3
+ // yet (a jsonix CR candidate), hence the cast here, kept to this one module.
4
+ import { Jsonix } from '@docx4j/generated-objects-ts';
5
+ const DOM = Jsonix.DOM;
6
+ /** The declaration docx4j writes on every XML part. */
7
+ export const XML_DECLARATION = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
8
+ /** Parses XML text to a DOM document; throws on malformed input. */
9
+ export function parseXml(text) {
10
+ return DOM.parse(text);
11
+ }
12
+ /** Serialises a node (document or element) without an XML declaration. */
13
+ export function serializeXml(node) {
14
+ return DOM.serialize(node);
15
+ }
16
+ export function createDocument() {
17
+ return DOM.createDocument();
18
+ }
19
+ /** XML declaration plus the serialised document element, as one string. */
20
+ export function serializeXmlPart(node) {
21
+ const el = node.nodeType === 9 ? node.documentElement : node;
22
+ return XML_DECLARATION + serializeXml(el);
23
+ }
24
+ const utf8Encoder = new TextEncoder();
25
+ /** UTF-8 bytes of a string. */
26
+ export function encodeText(text) {
27
+ return utf8Encoder.encode(text);
28
+ }
29
+ /**
30
+ * Text of an XML part's bytes: honours a UTF-8 or UTF-16 byte order mark, else assumes UTF-8
31
+ * (the only encoding Office writes without a BOM). The BOM is not part of the result.
32
+ */
33
+ export function decodeXmlText(bytes) {
34
+ if (bytes.length >= 2) {
35
+ if (bytes[0] === 0xff && bytes[1] === 0xfe)
36
+ return new TextDecoder('utf-16le').decode(bytes.subarray(2));
37
+ if (bytes[0] === 0xfe && bytes[1] === 0xff)
38
+ return new TextDecoder('utf-16be').decode(bytes.subarray(2));
39
+ }
40
+ if (bytes.length >= 3 && bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf) {
41
+ return new TextDecoder('utf-8').decode(bytes.subarray(3));
42
+ }
43
+ return new TextDecoder('utf-8').decode(bytes);
44
+ }
45
+ /** Removes an XML declaration (and a leading BOM) from XML text. */
46
+ export function stripXmlDeclaration(text) {
47
+ return text.replace(/^\uFEFF?\s*<\?xml[^>]*\?>\s*/, '');
48
+ }
49
+ const B64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
50
+ const B64_LOOKUP = new Uint8Array(128);
51
+ for (let i = 0; i < B64.length; i++)
52
+ B64_LOOKUP[B64.charCodeAt(i)] = i;
53
+ export function base64Encode(bytes) {
54
+ let out = '';
55
+ let i = 0;
56
+ for (; i + 2 < bytes.length; i += 3) {
57
+ const n = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
58
+ out += B64[n >> 18] + B64[(n >> 12) & 63] + B64[(n >> 6) & 63] + B64[n & 63];
59
+ }
60
+ if (i < bytes.length) {
61
+ const n = (bytes[i] << 16) | ((i + 1 < bytes.length ? bytes[i + 1] : 0) << 8);
62
+ out += B64[n >> 18] + B64[(n >> 12) & 63] + (i + 1 < bytes.length ? B64[(n >> 6) & 63] : '=') + '=';
63
+ }
64
+ return out;
65
+ }
66
+ export function base64Decode(text) {
67
+ const clean = text.replace(/[^A-Za-z0-9+/]/g, '');
68
+ const out = new Uint8Array(Math.floor((clean.length * 3) / 4));
69
+ let o = 0;
70
+ for (let i = 0; i < clean.length; i += 4) {
71
+ const a = B64_LOOKUP[clean.charCodeAt(i)];
72
+ const b = i + 1 < clean.length ? B64_LOOKUP[clean.charCodeAt(i + 1)] : 0;
73
+ const c = i + 2 < clean.length ? B64_LOOKUP[clean.charCodeAt(i + 2)] : 0;
74
+ const d = i + 3 < clean.length ? B64_LOOKUP[clean.charCodeAt(i + 3)] : 0;
75
+ const n = (a << 18) | (b << 12) | (c << 6) | d;
76
+ if (o < out.length)
77
+ out[o++] = (n >> 16) & 255;
78
+ if (i + 2 < clean.length && o < out.length)
79
+ out[o++] = (n >> 8) & 255;
80
+ if (i + 3 < clean.length && o < out.length)
81
+ out[o++] = n & 255;
82
+ }
83
+ return out.subarray(0, o);
84
+ }
85
+ /** Element children of a node, in order. */
86
+ export function childElements(node) {
87
+ const out = [];
88
+ for (let c = node.firstChild; c; c = c.nextSibling)
89
+ if (c.nodeType === 1)
90
+ out.push(c);
91
+ return out;
92
+ }
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@docx4j/core-ts",
3
+ "version": "0.1.0",
4
+ "description": "docx4j-core for TypeScript: Open Packaging (docx/pptx/xlsx zip and flat OPC), typed parts and relationships, style, numbering and font resolution over @docx4j/generated-objects-ts. Node, browsers, Word add-ins.",
5
+ "type": "module",
6
+ "main": "./dist/index.mjs",
7
+ "types": "./dist/index.d.mts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs"
12
+ },
13
+ "./opc": {
14
+ "types": "./dist/opc/index.d.mts",
15
+ "import": "./dist/opc/index.mjs"
16
+ },
17
+ "./parts": {
18
+ "types": "./dist/parts/index.d.mts",
19
+ "import": "./dist/parts/index.mjs"
20
+ },
21
+ "./packages": {
22
+ "types": "./dist/packages/index.d.mts",
23
+ "import": "./dist/packages/index.mjs"
24
+ },
25
+ "./model": {
26
+ "types": "./dist/model/index.d.mts",
27
+ "import": "./dist/model/index.mjs"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "README.md",
33
+ "LICENSE",
34
+ "NOTICE"
35
+ ],
36
+ "scripts": {
37
+ "build": "tsc -p tsconfig.build.json",
38
+ "typecheck": "tsc -p tsconfig.json",
39
+ "test": "npm run build && tsc -p test/nodenext/tsconfig.json && node --test test/*.test.mjs",
40
+ "prepublishOnly": "npm run typecheck && npm test"
41
+ },
42
+ "keywords": [
43
+ "docx4j",
44
+ "ooxml",
45
+ "openxml",
46
+ "office open xml",
47
+ "docx",
48
+ "pptx",
49
+ "xlsx",
50
+ "opc",
51
+ "wordprocessingml",
52
+ "office-js",
53
+ "word-addin",
54
+ "typescript"
55
+ ],
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/plutext/docx4j-core-ts.git"
59
+ },
60
+ "homepage": "https://github.com/plutext/docx4j-core-ts",
61
+ "bugs": {
62
+ "url": "https://github.com/plutext/docx4j-core-ts/issues"
63
+ },
64
+ "license": "Apache-2.0",
65
+ "dependencies": {
66
+ "@docx4j/generated-objects-ts": "^0.1.1",
67
+ "fflate": "^0.8.2"
68
+ },
69
+ "devDependencies": {
70
+ "typescript": "~5.6.3"
71
+ },
72
+ "engines": {
73
+ "node": ">=18"
74
+ }
75
+ }