@stll/docx-core 0.43.0 → 0.43.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/dist/{document-Ca6wPoTu.d.ts → document-CaGfolcU.d.ts} +28 -0
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/document.d.ts +1 -1
- package/dist/ops/documentOps.d.ts +170 -72
- package/dist/ops/documentOps.js +1568 -464
- package/dist/schema/sequenceChildren.js +1 -1
- package/dist/{sequenceChildren-CSn0-1ov.js → sequenceChildren-BEcOm3tR.js} +1 -1
- package/dist/xml/xmlNamespaceContext.d.ts +25 -0
- package/dist/xml/xmlNamespaceContext.js +25 -1
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as SEQUENCE_CHILDREN, o as SETTINGS_CHILDREN, t as assertSafePreservedMarkup, n as isSafePreservedChildXml, r as isWithinPreservedMarkupBudget, i as serializeSequenceChildren } from "../sequenceChildren-
|
|
1
|
+
export { a as SEQUENCE_CHILDREN, o as SETTINGS_CHILDREN, t as assertSafePreservedMarkup, n as isSafePreservedChildXml, r as isWithinPreservedMarkupBudget, i as serializeSequenceChildren } from "../sequenceChildren-BEcOm3tR.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as readXml } from "./streamingXmlParser-GnKxUuw_.js";
|
|
2
|
+
import { OOXML_NS } from "./xml/xmlNamespaceContext.js";
|
|
2
3
|
import { TaggedError } from "better-result";
|
|
3
|
-
import { OOXML_NS } from "@stll/docx-utils";
|
|
4
4
|
// src/schema/sequenceChildren.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* GENERATED FILE — do not edit.
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import { n as XmlNamespaceScope, t as XmlElement } from "../xmlElement-C-vuKoul.js";
|
|
2
2
|
export declare const EMPTY_NAMESPACE_SCOPE: XmlNamespaceScope;
|
|
3
|
+
/**
|
|
4
|
+
* The OOXML namespaces a WordprocessingML package binds, by their customary
|
|
5
|
+
* prefix. The same table as `OOXML_NS` in `@stll/docx-utils`, so code reading
|
|
6
|
+
* either agrees on every URI.
|
|
7
|
+
*/
|
|
8
|
+
export declare const OOXML_NS: {
|
|
9
|
+
readonly w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
|
|
10
|
+
readonly a: "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
11
|
+
readonly r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
12
|
+
readonly wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
|
|
13
|
+
readonly wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing";
|
|
14
|
+
readonly wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
|
|
15
|
+
readonly wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas";
|
|
16
|
+
readonly wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";
|
|
17
|
+
readonly pic: "http://schemas.openxmlformats.org/drawingml/2006/picture";
|
|
18
|
+
readonly m: "http://schemas.openxmlformats.org/officeDocument/2006/math";
|
|
19
|
+
readonly mc: "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
20
|
+
readonly v: "urn:schemas-microsoft-com:vml";
|
|
21
|
+
readonly o: "urn:schemas-microsoft-com:office:office";
|
|
22
|
+
readonly w14: "http://schemas.microsoft.com/office/word/2010/wordml";
|
|
23
|
+
readonly w15: "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
24
|
+
readonly ct: "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
25
|
+
readonly pr: "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
26
|
+
};
|
|
27
|
+
export type OoxmlPrefix = keyof typeof OOXML_NS;
|
|
3
28
|
export declare const XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
|
|
4
29
|
export declare const resolveNamespaceUri: (scope: XmlNamespaceScope | undefined, prefix: string) => string | undefined;
|
|
5
30
|
/** Attach the element's resolved namespace metadata from its in-scope declarations. */
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
// src/xml/xmlNamespaceContext.ts
|
|
2
2
|
const EMPTY_NAMESPACE_SCOPE = { bindings: /* @__PURE__ */ new Map() };
|
|
3
3
|
/**
|
|
4
|
+
* The OOXML namespaces a WordprocessingML package binds, by their customary
|
|
5
|
+
* prefix. The same table as `OOXML_NS` in `@stll/docx-utils`, so code reading
|
|
6
|
+
* either agrees on every URI.
|
|
7
|
+
*/
|
|
8
|
+
const OOXML_NS = {
|
|
9
|
+
w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
10
|
+
a: "http://schemas.openxmlformats.org/drawingml/2006/main",
|
|
11
|
+
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
12
|
+
wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
|
|
13
|
+
wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
|
|
14
|
+
wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
|
|
15
|
+
wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
16
|
+
wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
|
|
17
|
+
pic: "http://schemas.openxmlformats.org/drawingml/2006/picture",
|
|
18
|
+
m: "http://schemas.openxmlformats.org/officeDocument/2006/math",
|
|
19
|
+
mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
|
|
20
|
+
v: "urn:schemas-microsoft-com:vml",
|
|
21
|
+
o: "urn:schemas-microsoft-com:office:office",
|
|
22
|
+
w14: "http://schemas.microsoft.com/office/word/2010/wordml",
|
|
23
|
+
w15: "http://schemas.microsoft.com/office/word/2012/wordml",
|
|
24
|
+
ct: "http://schemas.openxmlformats.org/package/2006/content-types",
|
|
25
|
+
pr: "http://schemas.openxmlformats.org/package/2006/relationships"
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
4
28
|
* Reserved by the XML Namespaces recommendation (§3): every document binds
|
|
5
29
|
* this prefix to this URI whether or not it declares `xmlns:xml`, and no
|
|
6
30
|
* document may bind it to anything else. A source that omits the declaration
|
|
@@ -50,4 +74,4 @@ const attachXmlNamespaceContext = (element, inheritedNamespaceScope = EMPTY_NAME
|
|
|
50
74
|
});
|
|
51
75
|
return namespaceScope;
|
|
52
76
|
};
|
|
53
|
-
export { EMPTY_NAMESPACE_SCOPE, XML_NAMESPACE_URI, attachXmlNamespaceContext, resolveNamespaceUri };
|
|
77
|
+
export { EMPTY_NAMESPACE_SCOPE, OOXML_NS, XML_NAMESPACE_URI, attachXmlNamespaceContext, resolveNamespaceUri };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/docx-core",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"description": "Typed OOXML/DOCX model, validation, serialization, legal-source compilation, and browser-native package projection.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-model",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"prepack": "bun run build"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@stll/docx-utils": "^0.2.0",
|
|
103
102
|
"@stll/utf8-boundaries": "0.2.0",
|
|
104
103
|
"better-result": "3.0.1",
|
|
105
104
|
"marked": "^18.1.2"
|