js.documents 7.5.0 → 7.6.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.
@@ -1,5 +1,5 @@
1
1
  import { t as ImageInit } from "../../image-D1z0T9Za.cjs";
2
- import { t as OdpShape } from "../../shape-CAm2tKw5.cjs";
2
+ import { t as OdpShape } from "../../shape-Kmmxib5z.cjs";
3
3
  import { a as OdgLineVector, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "../../vector-DDP7hgvm.cjs";
4
4
  import { Box, ContentVector } from "document-schema.js";
5
5
  import { Package, XmlElement, XmlNode } from "odf.js";
@@ -1,5 +1,5 @@
1
1
  import { t as ImageInit } from "../../image-D1z0T9Za.js";
2
- import { t as OdpShape } from "../../shape-DAt3nOQm.js";
2
+ import { t as OdpShape } from "../../shape-ZAfNsCC5.js";
3
3
  import { a as OdgLineVector, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "../../vector-DDP7hgvm.js";
4
4
  import { Box, ContentVector } from "document-schema.js";
5
5
  import { Package, XmlElement, XmlNode } from "odf.js";
@@ -1,2 +1,2 @@
1
- import { i as buildTextBoxFrame, n as buildImageFrame, r as buildTableFrame, t as OdpShape } from "../../shape-CAm2tKw5.cjs";
1
+ import { i as buildTextBoxFrame, n as buildImageFrame, r as buildTableFrame, t as OdpShape } from "../../shape-Kmmxib5z.cjs";
2
2
  export { OdpShape, buildImageFrame, buildTableFrame, buildTextBoxFrame };
@@ -1,2 +1,2 @@
1
- import { i as buildTextBoxFrame, n as buildImageFrame, r as buildTableFrame, t as OdpShape } from "../../shape-DAt3nOQm.js";
1
+ import { i as buildTextBoxFrame, n as buildImageFrame, r as buildTableFrame, t as OdpShape } from "../../shape-ZAfNsCC5.js";
2
2
  export { OdpShape, buildImageFrame, buildTableFrame, buildTextBoxFrame };
@@ -1,5 +1,5 @@
1
1
  import { t as ImageInit } from "../../image-D1z0T9Za.cjs";
2
- import { t as OdpShape } from "../../shape-CAm2tKw5.cjs";
2
+ import { t as OdpShape } from "../../shape-Kmmxib5z.cjs";
3
3
  import { s as OdgVector } from "../../vector-DDP7hgvm.cjs";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-COmzfIOe.cjs";
5
5
  import { Box, ContentFormula, ContentVector } from "document-schema.js";
@@ -1,5 +1,5 @@
1
1
  import { t as ImageInit } from "../../image-D1z0T9Za.js";
2
- import { t as OdpShape } from "../../shape-DAt3nOQm.js";
2
+ import { t as OdpShape } from "../../shape-ZAfNsCC5.js";
3
3
  import { s as OdgVector } from "../../vector-DDP7hgvm.js";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-BmMyqRML.js";
5
5
  import { Box, ContentFormula, ContentVector } from "document-schema.js";
@@ -1,6 +1,6 @@
1
1
  import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
2
2
  import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-CRaLSzWz.cjs";
3
- import { t as OdtList } from "../../list-yc0dJrOX.cjs";
3
+ import { t as OdtList } from "../../list-C_UPIZWM.cjs";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-COmzfIOe.cjs";
5
5
  import { Box, ContentFormula, ContentVector, LayoutMetadata } from "document-schema.js";
6
6
  import { Package } from "odf.js";
@@ -1,6 +1,6 @@
1
1
  import { t as ClockPort } from "../../clock-C7SUuYN0.js";
2
2
  import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-D4f705GG.js";
3
- import { t as OdtList } from "../../list-C32h8MNc.js";
3
+ import { t as OdtList } from "../../list-C2GWIe6E.js";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-BmMyqRML.js";
5
5
  import { Box, ContentFormula, ContentVector, LayoutMetadata } from "document-schema.js";
6
6
  import { Package } from "odf.js";
@@ -85,6 +85,16 @@ var OdtList = class {
85
85
  require_xml_edit.removeChild(this.container, this.live());
86
86
  this.removed = true;
87
87
  }
88
+ indentItem(index) {
89
+ const itemNodes = this.live().children.filter((child) => child.type === "element" && child.tag === "text:list-item");
90
+ const itemNode = itemNodes[index];
91
+ if (index <= 0 || itemNode === void 0) throw new Error(`cannot indent list item ${String(index)}: it has no preceding sibling to nest under`);
92
+ const previousItem = new OdtListItem(itemNodes[index - 1], this.pkg);
93
+ const existingNestedLists = previousItem.nestedLists();
94
+ const nestedList = existingNestedLists[existingNestedLists.length - 1] ?? previousItem.addNestedList();
95
+ require_xml_edit.removeChild(this.live().children, itemNode);
96
+ nestedList.node.children.push(itemNode);
97
+ }
88
98
  };
89
99
  function buildList(pkg) {
90
100
  return require_xml_fragment.el("text:list", { "text:style-name": internBulletListStyle(pkg) });
@@ -1,2 +1,2 @@
1
- import { n as OdtListItem, r as buildList, t as OdtList } from "../../list-yc0dJrOX.cjs";
1
+ import { n as OdtListItem, r as buildList, t as OdtList } from "../../list-C_UPIZWM.cjs";
2
2
  export { OdtList, OdtListItem, buildList };
@@ -1,2 +1,2 @@
1
- import { n as OdtListItem, r as buildList, t as OdtList } from "../../list-C32h8MNc.js";
1
+ import { n as OdtListItem, r as buildList, t as OdtList } from "../../list-C2GWIe6E.js";
2
2
  export { OdtList, OdtListItem, buildList };
@@ -84,6 +84,16 @@ var OdtList = class {
84
84
  removeChild(this.container, this.live());
85
85
  this.removed = true;
86
86
  }
87
+ indentItem(index) {
88
+ const itemNodes = this.live().children.filter((child) => child.type === "element" && child.tag === "text:list-item");
89
+ const itemNode = itemNodes[index];
90
+ if (index <= 0 || itemNode === void 0) throw new Error(`cannot indent list item ${String(index)}: it has no preceding sibling to nest under`);
91
+ const previousItem = new OdtListItem(itemNodes[index - 1], this.pkg);
92
+ const existingNestedLists = previousItem.nestedLists();
93
+ const nestedList = existingNestedLists[existingNestedLists.length - 1] ?? previousItem.addNestedList();
94
+ removeChild(this.live().children, itemNode);
95
+ nestedList.node.children.push(itemNode);
96
+ }
87
97
  };
88
98
  function buildList(pkg) {
89
99
  return el("text:list", { "text:style-name": internBulletListStyle(pkg) });
package/dist/index.d.cts CHANGED
@@ -34,8 +34,8 @@ import { CreateMarkdownEditorOptions, MarkdownBody, MarkdownEditor, createMarkdo
34
34
  import { BuildOdgPackageOptions, buildOdgPackage } from "./edit/odg/content.cjs";
35
35
  import { n as RunInit$1, t as OdtRun } from "./run-mzBHuFWz.cjs";
36
36
  import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-CRaLSzWz.cjs";
37
- import { n as OdtListItem, t as OdtList } from "./list-yc0dJrOX.cjs";
38
- import { t as OdpShape } from "./shape-CAm2tKw5.cjs";
37
+ import { n as OdtListItem, t as OdtList } from "./list-C_UPIZWM.cjs";
38
+ import { t as OdpShape } from "./shape-Kmmxib5z.cjs";
39
39
  import { a as OdgLineVector, c as OdgVectorKind, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "./vector-DDP7hgvm.cjs";
40
40
  import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.cjs";
41
41
  import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.cjs";
package/dist/index.d.ts CHANGED
@@ -34,8 +34,8 @@ import { CreateMarkdownEditorOptions, MarkdownBody, MarkdownEditor, createMarkdo
34
34
  import { BuildOdgPackageOptions, buildOdgPackage } from "./edit/odg/content.js";
35
35
  import { n as RunInit$1, t as OdtRun } from "./run-mzBHuFWz.js";
36
36
  import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-D4f705GG.js";
37
- import { n as OdtListItem, t as OdtList } from "./list-C32h8MNc.js";
38
- import { t as OdpShape } from "./shape-DAt3nOQm.js";
37
+ import { n as OdtListItem, t as OdtList } from "./list-C2GWIe6E.js";
38
+ import { t as OdpShape } from "./shape-ZAfNsCC5.js";
39
39
  import { a as OdgLineVector, c as OdgVectorKind, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "./vector-DDP7hgvm.js";
40
40
  import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.js";
41
41
  import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
@@ -21,6 +21,7 @@ declare class OdtList {
21
21
  items(): OdtListItem[];
22
22
  addItem(): OdtListItem;
23
23
  remove(): void;
24
+ indentItem(index: number): void;
24
25
  }
25
26
  declare function buildList(pkg: Package): XmlElement;
26
27
  //#endregion
@@ -21,6 +21,7 @@ declare class OdtList {
21
21
  items(): OdtListItem[];
22
22
  addItem(): OdtListItem;
23
23
  remove(): void;
24
+ indentItem(index: number): void;
24
25
  }
25
26
  declare function buildList(pkg: Package): XmlElement;
26
27
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-CRaLSzWz.cjs";
2
- import { t as OdtList } from "./list-yc0dJrOX.cjs";
2
+ import { t as OdtList } from "./list-C_UPIZWM.cjs";
3
3
  import { Box } from "document-schema.js";
4
4
  import { Package, XmlElement, XmlNode } from "odf.js";
5
5
  //#region src/edit/odp/shape.d.ts
@@ -1,5 +1,5 @@
1
1
  import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-D4f705GG.js";
2
- import { t as OdtList } from "./list-C32h8MNc.js";
2
+ import { t as OdtList } from "./list-C2GWIe6E.js";
3
3
  import { Box } from "document-schema.js";
4
4
  import { Package, XmlElement, XmlNode } from "odf.js";
5
5
  //#region src/edit/odp/shape.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js.documents",
3
- "version": "7.5.0",
3
+ "version": "7.6.1",
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": {
@@ -77,20 +77,20 @@
77
77
  ],
78
78
  "license": "MIT",
79
79
  "dependencies": {
80
- "archive-codec": "^1.6.5",
80
+ "archive-codec": "^1.6.6",
81
81
  "byte-codec": "^1.4.0",
82
- "doc-codec": "^2.3.1",
83
- "document-schema.js": "^7.0.0",
82
+ "doc-codec": "^2.3.2",
83
+ "document-schema.js": "^7.1.0",
84
84
  "fflate": "^0.8.3",
85
- "markdown-codec": "^6.3.6",
86
- "odf.js": "^7.4.0",
87
- "ooxml.js": "^8.3.0",
88
- "pdf-codec": "^4.0.5",
89
- "ppt-codec": "^1.2.6",
90
- "rtf-codec": "^4.0.1",
85
+ "markdown-codec": "^6.3.7",
86
+ "odf.js": "^7.4.1",
87
+ "ooxml.js": "^8.4.0",
88
+ "pdf-codec": "^4.0.6",
89
+ "ppt-codec": "^1.2.7",
90
+ "rtf-codec": "^4.0.2",
91
91
  "temml": "0.13.4",
92
- "wpd-codec": "^3.0.1",
93
- "xls-codec": "^4.2.0",
92
+ "wpd-codec": "^3.0.2",
93
+ "xls-codec": "^4.2.1",
94
94
  "zod": "^4.4.3"
95
95
  },
96
96
  "devDependencies": {