documents.js 1.64.0 → 1.66.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.
- package/README.md +20 -11
- package/dist/color-C98dn-pT.d.ts +2 -0
- package/dist/edit/docx/content.cjs +5 -0
- package/dist/edit/docx/content.js +5 -0
- package/dist/edit/docx/image.cjs +1 -0
- package/dist/edit/docx/image.d.cts +2 -2
- package/dist/edit/docx/image.d.ts +2 -2
- package/dist/edit/docx/image.js +1 -1
- package/dist/edit/docx/paragraph.cjs +10 -1
- package/dist/edit/docx/paragraph.d.cts +4 -3
- package/dist/edit/docx/paragraph.d.ts +4 -3
- package/dist/edit/docx/paragraph.js +13 -4
- package/dist/edit/docx/props.d.ts +1 -1
- package/dist/edit/docx/run.cjs +8 -1
- package/dist/edit/docx/run.d.cts +2 -2
- package/dist/edit/docx/run.d.ts +2 -2
- package/dist/edit/docx/run.js +8 -2
- package/dist/edit/docx/vector.cjs +69 -0
- package/dist/edit/docx/vector.d.cts +6 -0
- package/dist/edit/docx/vector.d.ts +6 -0
- package/dist/edit/docx/vector.js +68 -0
- package/dist/edit/drawingml/vector.cjs +113 -0
- package/dist/edit/drawingml/vector.d.cts +9 -0
- package/dist/edit/drawingml/vector.d.ts +9 -0
- package/dist/edit/drawingml/vector.js +109 -0
- package/dist/edit/odg/content.cjs +1 -26
- package/dist/edit/odg/content.js +1 -26
- package/dist/edit/odg/page.cjs +14 -1
- package/dist/edit/odg/page.d.cts +5 -3
- package/dist/edit/odg/page.d.ts +5 -3
- package/dist/edit/odg/page.js +14 -1
- package/dist/edit/odg/style.cjs +17 -3
- package/dist/edit/odg/style.d.cts +1 -0
- package/dist/edit/odg/style.d.ts +1 -0
- package/dist/edit/odg/style.js +17 -3
- package/dist/edit/odg/vector.cjs +65 -3
- package/dist/edit/odg/vector.d.cts +2 -2
- package/dist/edit/odg/vector.d.ts +2 -2
- package/dist/edit/odg/vector.js +63 -4
- package/dist/edit/odp/content.cjs +4 -1
- package/dist/edit/odp/content.js +5 -2
- package/dist/edit/odp/shape.cjs +1 -1
- package/dist/edit/odp/shape.d.cts +1 -1
- package/dist/edit/odp/shape.d.ts +1 -1
- package/dist/edit/odp/shape.js +1 -1
- package/dist/edit/odp/slide.cjs +4 -0
- package/dist/edit/odp/slide.d.cts +8 -5
- package/dist/edit/odp/slide.d.ts +9 -6
- package/dist/edit/odp/slide.js +4 -0
- package/dist/edit/odt/content.cjs +5 -0
- package/dist/edit/odt/content.d.ts +2 -2
- package/dist/edit/odt/content.js +5 -0
- package/dist/edit/odt/editor.cjs +7 -0
- package/dist/edit/odt/editor.d.cts +3 -2
- package/dist/edit/odt/editor.d.ts +5 -4
- package/dist/edit/odt/editor.js +7 -0
- package/dist/edit/odt/list.cjs +13 -0
- package/dist/edit/odt/list.d.cts +1 -1
- package/dist/edit/odt/list.d.ts +1 -1
- package/dist/edit/odt/list.js +13 -0
- package/dist/edit/odt/paragraph.d.ts +1 -1
- package/dist/edit/odt/run.d.ts +1 -1
- package/dist/edit/odt/table.d.ts +1 -1
- package/dist/edit/pptx/content.cjs +5 -2
- package/dist/edit/pptx/content.js +5 -2
- package/dist/edit/pptx/shape.cjs +2 -5
- package/dist/edit/pptx/shape.d.ts +1 -1
- package/dist/edit/pptx/shape.js +2 -5
- package/dist/edit/pptx/slide.cjs +7 -0
- package/dist/edit/pptx/slide.d.cts +6 -4
- package/dist/edit/pptx/slide.d.ts +8 -6
- package/dist/edit/pptx/slide.js +7 -0
- package/dist/edit/pptx/table.d.ts +1 -1
- package/dist/edit/pptx/vector.cjs +17 -0
- package/dist/edit/pptx/vector.d.cts +6 -0
- package/dist/edit/pptx/vector.d.ts +6 -0
- package/dist/edit/pptx/vector.js +16 -0
- package/dist/{image-BfRLAD9B.d.cts → image-DRqXQmEg.d.cts} +2 -1
- package/dist/{image-BfRLAD9B.d.ts → image-DRqXQmEg.d.ts} +2 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +13 -13
- package/dist/index.js +2 -2
- package/dist/layout/shared.cjs +1 -0
- package/dist/layout/shared.js +1 -0
- package/dist/{list-BuBM9rwQ.d.cts → list-BzcN-LTJ.d.cts} +3 -0
- package/dist/{list-CvKxhy3y.d.ts → list-nlhN5bat.d.ts} +4 -1
- package/dist/markdown/write.cjs +1 -1
- package/dist/markdown/write.js +1 -1
- package/dist/mathml/compose.cjs +8 -0
- package/dist/mathml/compose.js +8 -0
- package/dist/mathml/layout-types.d.cts +14 -2
- package/dist/mathml/layout-types.d.ts +14 -2
- package/dist/mathml/layout.cjs +62 -3
- package/dist/mathml/layout.js +62 -3
- package/dist/mathml/metrics.d.cts +17 -1
- package/dist/mathml/metrics.d.ts +17 -1
- package/dist/mathml/operators.cjs +1 -1
- package/dist/mathml/operators.js +1 -1
- package/dist/model/color.d.ts +1 -1
- package/dist/model/embedded-drawing.cjs +47 -0
- package/dist/model/embedded-drawing.d.cts +4 -2
- package/dist/model/embedded-drawing.d.ts +4 -2
- package/dist/model/embedded-drawing.js +46 -1
- package/dist/{paragraph-CoUi_88j.d.ts → paragraph-DndYbWuT.d.ts} +1 -1
- package/dist/{run-D2rTWHbt.d.ts → run-BhYv2wJf.d.ts} +3 -2
- package/dist/{run-CJfh8rv3.d.ts → run-DtrwZwN6.d.ts} +1 -1
- package/dist/{run-B3GNScJH.d.cts → run-P0b2pDdX.d.cts} +2 -1
- package/dist/{shape-BkVcwPcf.d.ts → shape-B-TjU_Ej.d.ts} +1 -1
- package/dist/{shape-CXZ6fejV.d.cts → shape-C8qDhn0l.d.cts} +1 -1
- package/dist/{shape-CVXedeL7.d.ts → shape-XGp__l-J.d.ts} +2 -2
- package/dist/{table-DqfqMkVq.d.ts → table-BHeUmLzZ.d.ts} +1 -1
- package/dist/{table-DvS_7UQS.d.ts → table-DQpKafyl.d.ts} +1 -1
- package/dist/{vector-Puuqu_IT.d.cts → vector-D03KX8Ux.d.cts} +15 -2
- package/dist/{vector-Puuqu_IT.d.ts → vector-D03KX8Ux.d.ts} +15 -2
- package/package.json +3 -3
- package/dist/color-Bo228AY2.d.ts +0 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Box, Color, ContentPathPoint, ContentStroke, ContentSubpath } from "document-schema.js";
|
|
1
|
+
import { Box, Color, ContentPathPoint, ContentStroke, ContentSubpath, ContentVector } from "document-schema.js";
|
|
2
2
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
3
3
|
//#region src/edit/odg/vector.d.ts
|
|
4
4
|
interface BoxVectorInit {
|
|
5
5
|
readonly frame: Box;
|
|
6
6
|
readonly fill?: Color;
|
|
7
7
|
readonly stroke?: ContentStroke;
|
|
8
|
+
readonly textFlowAnchored?: boolean;
|
|
8
9
|
}
|
|
9
10
|
type OdgBoxVectorKind = 'rect' | 'ellipse';
|
|
10
11
|
declare function buildRectElement(pkg: Package, init: BoxVectorInit): XmlElement;
|
|
@@ -32,9 +33,11 @@ interface LineVectorInit {
|
|
|
32
33
|
readonly from: ContentPathPoint;
|
|
33
34
|
readonly to: ContentPathPoint;
|
|
34
35
|
readonly stroke: ContentStroke;
|
|
36
|
+
readonly textFlowAnchored?: boolean;
|
|
35
37
|
}
|
|
36
38
|
declare function buildLineElement(pkg: Package, init: LineVectorInit): XmlElement;
|
|
37
39
|
declare class OdgLineVector {
|
|
40
|
+
readonly kind = "line";
|
|
38
41
|
private readonly container;
|
|
39
42
|
private readonly node;
|
|
40
43
|
private readonly pkg;
|
|
@@ -55,9 +58,11 @@ interface PathVectorInit {
|
|
|
55
58
|
readonly subpaths: readonly ContentSubpath[];
|
|
56
59
|
readonly fill?: Color;
|
|
57
60
|
readonly stroke?: ContentStroke;
|
|
61
|
+
readonly textFlowAnchored?: boolean;
|
|
58
62
|
}
|
|
59
63
|
declare function buildPathElement(pkg: Package, init: PathVectorInit): XmlElement;
|
|
60
64
|
declare class OdgPathVector {
|
|
65
|
+
readonly kind = "path";
|
|
61
66
|
private readonly container;
|
|
62
67
|
private readonly node;
|
|
63
68
|
private readonly pkg;
|
|
@@ -76,5 +81,13 @@ declare class OdgPathVector {
|
|
|
76
81
|
get subpaths(): ContentSubpath[];
|
|
77
82
|
remove(): void;
|
|
78
83
|
}
|
|
84
|
+
type OdgVectorKind = OdgBoxVectorKind | 'line' | 'path';
|
|
85
|
+
type OdgVector = OdgBoxVector | OdgLineVector | OdgPathVector;
|
|
86
|
+
declare function wrapVectorElement(container: XmlNode[], node: XmlElement, pkg: Package): OdgVector | undefined;
|
|
87
|
+
interface VectorElementOptions {
|
|
88
|
+
readonly textFlowAnchored?: boolean;
|
|
89
|
+
}
|
|
90
|
+
declare function buildVectorElement(pkg: Package, vector: ContentVector, options?: VectorElementOptions): XmlElement;
|
|
91
|
+
declare function appendVectorTo(container: XmlNode[], pkg: Package, vector: ContentVector, options?: VectorElementOptions): OdgVector;
|
|
79
92
|
//#endregion
|
|
80
|
-
export { OdgLineVector as a,
|
|
93
|
+
export { wrapVectorElement as _, OdgLineVector as a, OdgVectorKind as c, appendVectorTo as d, buildEllipseElement as f, buildVectorElement as g, buildRectElement as h, OdgBoxVectorKind as i, PathVectorInit as l, buildPathElement as m, LineVectorInit as n, OdgPathVector as o, buildLineElement as p, OdgBoxVector as r, OdgVector as s, BoxVectorInit as t, VectorElementOptions as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "documents.js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.66.0",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"license": "MIT",
|
|
72
72
|
"packageManager": "pnpm@11.6.0",
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"document-schema.js": "^2.
|
|
74
|
+
"document-schema.js": "^2.1.0",
|
|
75
75
|
"fflate": "^0.8.3",
|
|
76
76
|
"markdown-codec": "github:ExaDev/markdown-codec#beda0a89d92fffd153d5dcd05d767b404b721cda",
|
|
77
77
|
"odf.js": "^2.0.0",
|
|
78
78
|
"ooxml.js": "^2.6.1",
|
|
79
|
-
"pdf-codec": "^1.
|
|
79
|
+
"pdf-codec": "^1.8.0",
|
|
80
80
|
"zod": "^4.4.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
package/dist/color-Bo228AY2.d.ts
DELETED