js.documents 6.0.1 → 6.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/README.md +283 -115
- package/dist/bin-dispatch.d.cts +2 -2
- package/dist/bin-dispatch.d.ts +2 -2
- package/dist/{blr-types-DVgO1DQ9.d.cts → blr-types-CMN0QKUE.d.cts} +1 -1
- package/dist/{blr-types-DVgO1DQ9.d.ts → blr-types-CMN0QKUE.d.ts} +1 -1
- package/dist/{capability-an5gSNsu.d.cts → capability-BZ3iNsWh.d.cts} +1 -1
- package/dist/{capability-DX0lCSiI.d.ts → capability-D-a4okp0.d.ts} +1 -1
- package/dist/{cell-typing-CEWlywIc.d.cts → cell-typing-BQ-xQ5X5.d.cts} +4 -4
- package/dist/{cell-typing-CEWlywIc.d.ts → cell-typing-BQ-xQ5X5.d.ts} +4 -4
- package/dist/codecs/read.d.cts +1 -1
- package/dist/codecs/read.d.ts +1 -1
- package/dist/convert/capability.d.cts +1 -1
- package/dist/convert/capability.d.ts +1 -1
- package/dist/convert/composition.d.cts +8 -8
- package/dist/convert/composition.d.ts +8 -8
- package/dist/convert/convert.d.cts +3 -3
- package/dist/convert/convert.d.ts +3 -3
- package/dist/convert/port.d.cts +1 -1
- package/dist/convert/port.d.ts +1 -1
- package/dist/convert/variant-bridges.d.cts +3 -3
- package/dist/convert/variant-bridges.d.ts +3 -3
- package/dist/csv/read.d.cts +1 -1
- package/dist/csv/read.d.ts +1 -1
- package/dist/csv/records.cjs +1 -1
- package/dist/csv/records.js +1 -1
- package/dist/csv/write.d.cts +2 -2
- package/dist/csv/write.d.ts +2 -2
- package/dist/{diagnostics-C5-bG09J.d.cts → diagnostics-DdO0xPGy.d.cts} +1 -1
- package/dist/{diagnostics-C5-bG09J.d.ts → diagnostics-DdO0xPGy.d.ts} +1 -1
- package/dist/edit/docx/content.d.cts +1 -1
- package/dist/edit/docx/content.d.ts +1 -1
- package/dist/edit/docx/image.d.cts +1 -1
- package/dist/edit/docx/image.d.ts +1 -1
- package/dist/edit/docx/paragraph.cjs +1 -1
- package/dist/edit/docx/paragraph.d.cts +6 -6
- package/dist/edit/docx/paragraph.d.ts +6 -6
- package/dist/edit/docx/paragraph.js +1 -1
- package/dist/edit/docx/props.d.cts +4 -4
- package/dist/edit/docx/props.d.ts +4 -4
- package/dist/edit/docx/table.d.cts +1 -1
- package/dist/edit/docx/table.d.ts +1 -1
- package/dist/edit/markdown/list.d.cts +1 -1
- package/dist/edit/markdown/list.d.ts +1 -1
- package/dist/edit/odg/page.d.cts +3 -3
- package/dist/edit/odg/page.d.ts +3 -3
- package/dist/edit/odg/vector.d.cts +1 -1
- package/dist/edit/odg/vector.d.ts +1 -1
- package/dist/edit/odp/image.d.cts +1 -1
- package/dist/edit/odp/image.d.ts +1 -1
- package/dist/edit/odp/shape.d.cts +1 -1
- package/dist/edit/odp/shape.d.ts +1 -1
- package/dist/edit/odp/slide.d.cts +4 -4
- package/dist/edit/odp/slide.d.ts +4 -4
- package/dist/edit/odt/content.d.cts +3 -3
- package/dist/edit/odt/content.d.ts +3 -3
- package/dist/edit/odt/editor.d.cts +3 -3
- package/dist/edit/odt/editor.d.ts +3 -3
- package/dist/edit/odt/image.d.cts +1 -1
- package/dist/edit/odt/image.d.ts +1 -1
- package/dist/edit/odt/list.d.cts +1 -1
- package/dist/edit/odt/list.d.ts +1 -1
- package/dist/edit/odt/paragraph.cjs +1 -1
- package/dist/edit/odt/paragraph.d.cts +1 -1
- package/dist/edit/odt/paragraph.d.ts +1 -1
- package/dist/edit/odt/paragraph.js +1 -1
- package/dist/edit/odt/table.d.cts +1 -1
- package/dist/edit/odt/table.d.ts +1 -1
- package/dist/edit/pdf/item.cjs +1 -1
- package/dist/edit/pdf/item.d.cts +1 -1
- package/dist/edit/pdf/item.d.ts +1 -1
- package/dist/edit/pdf/item.js +1 -1
- package/dist/edit/pdf/page.d.cts +1 -1
- package/dist/edit/pdf/page.d.ts +1 -1
- package/dist/edit/pdf/util.d.cts +1 -1
- package/dist/edit/pdf/util.d.ts +1 -1
- package/dist/edit/pptx/content.cjs +1 -1
- package/dist/edit/pptx/content.d.cts +1 -1
- package/dist/edit/pptx/content.d.ts +1 -1
- package/dist/edit/pptx/content.js +1 -1
- package/dist/edit/pptx/editor.cjs +1 -1
- package/dist/edit/pptx/editor.js +1 -1
- package/dist/edit/pptx/image.d.cts +1 -1
- package/dist/edit/pptx/image.d.ts +1 -1
- package/dist/edit/pptx/shape.d.cts +1 -1
- package/dist/edit/pptx/shape.d.ts +1 -1
- package/dist/edit/pptx/slide.d.cts +3 -3
- package/dist/edit/pptx/slide.d.ts +3 -3
- package/dist/edit/pptx/table.d.cts +1 -1
- package/dist/edit/pptx/table.d.ts +1 -1
- package/dist/{evaluate-BU5N1Jk1.d.ts → evaluate-Cu7iEnxX.d.ts} +1 -1
- package/dist/{evaluate-BhMXY6DM.d.cts → evaluate-Rl9P68se.d.cts} +1 -1
- package/dist/firebird/blr-types.d.cts +1 -1
- package/dist/firebird/blr-types.d.ts +1 -1
- package/dist/firebird/schema.d.cts +1 -1
- package/dist/firebird/schema.d.ts +1 -1
- package/dist/fonts/ooxml.d.cts +1 -1
- package/dist/fonts/ooxml.d.ts +1 -1
- package/dist/fonts/registry.d.cts +1 -1
- package/dist/fonts/registry.d.ts +1 -1
- package/dist/{formula-Cs0IexVi.d.cts → formula-BH1FBblm.d.cts} +1 -1
- package/dist/{formula-_8feXQH7.d.cts → formula-BpuJ3ae0.d.cts} +1 -1
- package/dist/{formula-DDSYieJg.d.ts → formula-Cb-LRoIE.d.ts} +1 -1
- package/dist/{formula-BKgIMfhi.d.ts → formula-DF4R1QEJ.d.ts} +1 -1
- package/dist/{image-DRqXQmEg.d.cts → image-BQ7F9xxz.d.cts} +1 -1
- package/dist/{image-DRqXQmEg.d.ts → image-BQ7F9xxz.d.ts} +1 -1
- package/dist/{image-CRgc_j2Q.d.cts → image-CwbCQ49u.d.ts} +2 -2
- package/dist/{image-Biwtr667.d.ts → image-DQxA-zGN.d.cts} +1 -1
- package/dist/{image-Biwtr667.d.cts → image-DQxA-zGN.d.ts} +1 -1
- package/dist/{image-3ql9_z1y.d.ts → image-DzqEWMDw.d.cts} +1 -1
- package/dist/{image-3ql9_z1y.d.cts → image-DzqEWMDw.d.ts} +1 -1
- package/dist/{image-CyYr22TE.d.ts → image-fah3VkZg.d.cts} +2 -2
- package/dist/index.d.cts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/{item-DhXpJNAQ.d.cts → item-SUC4uKDO.d.cts} +5 -5
- package/dist/{item-DhXpJNAQ.d.ts → item-SUC4uKDO.d.ts} +5 -5
- package/dist/latex/diagnostics.d.cts +1 -1
- package/dist/latex/diagnostics.d.ts +1 -1
- package/dist/latex/lint.cjs +4 -6
- package/dist/latex/lint.d.cts +1 -1
- package/dist/latex/lint.d.ts +1 -1
- package/dist/latex/lint.js +4 -6
- package/dist/latex/lower.cjs +1 -1
- package/dist/latex/lower.d.cts +1 -1
- package/dist/latex/lower.d.ts +1 -1
- package/dist/latex/lower.js +1 -1
- package/dist/latex/symbols.d.cts +1 -1
- package/dist/latex/symbols.d.ts +1 -1
- package/dist/latex/temml.d.cts +2 -2
- package/dist/latex/temml.d.ts +2 -2
- package/dist/layout/cell-typing.d.cts +1 -1
- package/dist/layout/cell-typing.d.ts +1 -1
- package/dist/layout/drawing.d.cts +1 -1
- package/dist/layout/drawing.d.ts +1 -1
- package/dist/layout/engine.d.cts +1 -1
- package/dist/layout/engine.d.ts +1 -1
- package/dist/layout/lattice.cjs +24 -0
- package/dist/layout/lattice.js +24 -0
- package/dist/layout/reconstruct.cjs +1 -1
- package/dist/layout/reconstruct.d.cts +1 -1
- package/dist/layout/reconstruct.d.ts +1 -1
- package/dist/layout/reconstruct.js +1 -1
- package/dist/layout/sheets.d.cts +1 -1
- package/dist/layout/sheets.d.ts +1 -1
- package/dist/layout/slides.d.cts +1 -1
- package/dist/layout/slides.d.ts +1 -1
- package/dist/layout/text-layout.d.cts +1 -1
- package/dist/layout/text-layout.d.ts +1 -1
- package/dist/{lexer-DGPWx_f2.d.cts → lexer-DgsW7jMA.d.cts} +9 -9
- package/dist/{lexer-DGPWx_f2.d.ts → lexer-DgsW7jMA.d.ts} +9 -9
- package/dist/{list-C55W_YCp.d.ts → list-B_Sy668f.d.ts} +1 -1
- package/dist/{list-lTB3eDLC.d.cts → list-BiTN6oop.d.cts} +1 -1
- package/dist/markdown/math.d.cts +1 -1
- package/dist/markdown/math.d.ts +1 -1
- package/dist/markdown/render.d.cts +1 -1
- package/dist/markdown/render.d.ts +1 -1
- package/dist/mathml/layout-types.d.cts +1 -1
- package/dist/mathml/layout-types.d.ts +1 -1
- package/dist/mathml/layout.d.cts +2 -2
- package/dist/mathml/layout.d.ts +2 -2
- package/dist/mathml/nodes.d.cts +1 -1
- package/dist/mathml/nodes.d.ts +1 -1
- package/dist/mathml/variant.d.cts +1 -1
- package/dist/mathml/variant.d.ts +1 -1
- package/dist/model/embedded-drawing.d.cts +1 -1
- package/dist/model/embedded-drawing.d.ts +1 -1
- package/dist/model/paint-order.d.cts +2 -2
- package/dist/model/paint-order.d.ts +2 -2
- package/dist/{nodes-pArN9ilm.d.cts → nodes-jrlUmrNs.d.cts} +3 -3
- package/dist/{nodes-pArN9ilm.d.ts → nodes-jrlUmrNs.d.ts} +3 -3
- package/dist/odb/formula/evaluate.d.cts +4 -4
- package/dist/odb/formula/evaluate.d.ts +4 -4
- package/dist/odb/formula/parser.d.cts +6 -6
- package/dist/odb/formula/parser.d.ts +6 -6
- package/dist/odb/read.d.cts +1 -1
- package/dist/odb/read.d.ts +1 -1
- package/dist/odb/report/render.d.cts +1 -1
- package/dist/odb/report/render.d.ts +1 -1
- package/dist/odb/report/source.d.cts +1 -1
- package/dist/odb/report/source.d.ts +1 -1
- package/dist/odb/sql/evaluate.d.cts +1 -1
- package/dist/odb/sql/evaluate.d.ts +1 -1
- package/dist/odb/sql/lexer.d.cts +1 -1
- package/dist/odb/sql/lexer.d.ts +1 -1
- package/dist/odb/sql/parser.d.cts +1 -1
- package/dist/odb/sql/parser.d.ts +1 -1
- package/dist/odb/values.d.cts +1 -1
- package/dist/odb/values.d.ts +1 -1
- package/dist/odf/vector/detect.cjs +1 -1
- package/dist/odf/vector/detect.js +1 -1
- package/dist/odf-package/media.d.cts +1 -1
- package/dist/odf-package/media.d.ts +1 -1
- package/dist/omml/read.d.cts +1 -1
- package/dist/omml/read.d.ts +1 -1
- package/dist/omml/shared.d.cts +1 -1
- package/dist/omml/shared.d.ts +1 -1
- package/dist/omml/write.d.cts +1 -1
- package/dist/omml/write.d.ts +1 -1
- package/dist/ooxml/docx/embedded-objects.cjs +10 -24
- package/dist/ooxml/docx/embedded-objects.d.cts +1 -1
- package/dist/ooxml/docx/embedded-objects.d.ts +1 -1
- package/dist/ooxml/docx/embedded-objects.js +10 -24
- package/dist/ooxml/docx/formula.d.cts +1 -1
- package/dist/ooxml/docx/formula.d.ts +1 -1
- package/dist/ooxml/docx/read.d.cts +1 -1
- package/dist/ooxml/docx/read.d.ts +1 -1
- package/dist/ooxml/pptx/formula.d.cts +1 -1
- package/dist/ooxml/pptx/formula.d.ts +1 -1
- package/dist/ooxml/pptx/read.d.cts +1 -1
- package/dist/ooxml/pptx/read.d.ts +1 -1
- package/dist/ooxml/pptx/vector.cjs +1 -1
- package/dist/ooxml/pptx/vector.js +1 -1
- package/dist/opc/media.d.cts +1 -1
- package/dist/opc/media.d.ts +1 -1
- package/dist/opc/rels.d.cts +1 -1
- package/dist/opc/rels.d.ts +1 -1
- package/dist/{paragraph-CoPeTuHR.d.cts → paragraph-BBmkECjw.d.cts} +1 -1
- package/dist/{paragraph--69uh-Ys.d.ts → paragraph-D_fDin5K.d.ts} +1 -1
- package/dist/{parser-DQSgYJzQ.d.ts → parser-D0IJI7LA.d.ts} +22 -22
- package/dist/{parser-B9vC1T6T.d.cts → parser-DYfiAasj.d.cts} +22 -22
- package/dist/{registry-BcBT-bnX.d.cts → registry-913jEe6-.d.ts} +3 -3
- package/dist/{registry-D1Pu5XxB.d.ts → registry-Bs4IHqVQ.d.cts} +3 -3
- package/dist/{shape-DyIjuKE9.d.ts → shape-BY5P8kDn.d.ts} +2 -2
- package/dist/{shape-CaG-RPiz.d.cts → shape-Ca-xsrde.d.cts} +2 -2
- package/dist/{shape-CLHm7U8Y.d.cts → shape-DqkYq1OL.d.cts} +2 -2
- package/dist/{shape-Dnz6-wmG.d.ts → shape-xpgICOEx.d.ts} +2 -2
- package/dist/{shared-DUOzjwcL.d.ts → shared-DHu5jDJf.d.ts} +2 -2
- package/dist/{shared-DLZ3IQUl.d.cts → shared-c0Lp3_iY.d.cts} +2 -2
- package/dist/svg/paint.d.cts +5 -5
- package/dist/svg/paint.d.ts +5 -5
- package/dist/svg/path.d.cts +2 -2
- package/dist/svg/path.d.ts +2 -2
- package/dist/svg/write.d.cts +2 -2
- package/dist/svg/write.d.ts +2 -2
- package/dist/{table-CTeOe_vm.d.ts → table-C3VWWdjr.d.ts} +1 -1
- package/dist/{table-DH0lJRVv.d.cts → table-C_KDsX5R.d.cts} +1 -1
- package/dist/{table-BxMiEZXd.d.ts → table-Ck0fyr8d.d.ts} +1 -1
- package/dist/{table-C_tSXnbt.d.cts → table-CpEmblWG.d.cts} +1 -1
- package/dist/{values-BetetbaH.d.cts → values-BBN9E8dV.d.cts} +5 -5
- package/dist/{values-BetetbaH.d.ts → values-BBN9E8dV.d.ts} +5 -5
- package/dist/{variant-BMrebjMw.d.cts → variant-uwYyRetr.d.cts} +1 -1
- package/dist/{variant-BMrebjMw.d.ts → variant-uwYyRetr.d.ts} +1 -1
- package/dist/{vector-D03KX8Ux.d.cts → vector-DDP7hgvm.d.cts} +2 -2
- package/dist/{vector-D03KX8Ux.d.ts → vector-DDP7hgvm.d.ts} +2 -2
- package/dist/{write-BQ6SK8r8.d.cts → write-DWupt1QI.d.cts} +2 -2
- package/dist/{write-THs7ipBq.d.ts → write-qKlz1R0J.d.ts} +2 -2
- package/dist/xml/odf-text.cjs +1 -1
- package/dist/xml/odf-text.js +1 -1
- package/package.json +7 -16
package/dist/bin-dispatch.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/bin-dispatch.d.ts
|
|
2
2
|
interface BinDispatch {
|
|
3
3
|
/** The npm package the launcher resolves and invokes. */
|
|
4
|
-
readonly pkg:
|
|
4
|
+
readonly pkg: "document-cli" | "document-mcp";
|
|
5
5
|
/** The executable to spawn -- each JS package manager's own download-and-run command. */
|
|
6
|
-
readonly command:
|
|
6
|
+
readonly command: "npx" | "pnpm" | "yarn" | "bunx";
|
|
7
7
|
/** Arguments after the command itself -- begins with the manager's fetch flags, then the package name, then the passthrough args. */
|
|
8
8
|
readonly runnerArgs: readonly string[];
|
|
9
9
|
}
|
package/dist/bin-dispatch.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/bin-dispatch.d.ts
|
|
2
2
|
interface BinDispatch {
|
|
3
3
|
/** The npm package the launcher resolves and invokes. */
|
|
4
|
-
readonly pkg:
|
|
4
|
+
readonly pkg: "document-cli" | "document-mcp";
|
|
5
5
|
/** The executable to spawn -- each JS package manager's own download-and-run command. */
|
|
6
|
-
readonly command:
|
|
6
|
+
readonly command: "npx" | "pnpm" | "yarn" | "bunx";
|
|
7
7
|
/** Arguments after the command itself -- begins with the manager's fetch flags, then the package name, then the passthrough args. */
|
|
8
8
|
readonly runnerArgs: readonly string[];
|
|
9
9
|
}
|
|
@@ -24,7 +24,7 @@ declare const BLR_VARYING2 = 38;
|
|
|
24
24
|
declare const BLR_CSTRING = 40;
|
|
25
25
|
declare const BLR_CSTRING2 = 41;
|
|
26
26
|
declare const BLR_BLOB = 261;
|
|
27
|
-
type FirebirdPhysicalType =
|
|
27
|
+
type FirebirdPhysicalType = "short" | "long" | "int64" | "real" | "double" | "sql_date" | "sql_time" | "timestamp" | "text" | "varying" | "cstring" | "boolean" | "blob" | "quad" | "int128" | "dec64" | "dec128" | "unsupported-tz";
|
|
28
28
|
declare class FirebirdUnsupportedFieldTypeError extends Error {
|
|
29
29
|
readonly blrType: number;
|
|
30
30
|
constructor(blrType: number);
|
|
@@ -24,7 +24,7 @@ declare const BLR_VARYING2 = 38;
|
|
|
24
24
|
declare const BLR_CSTRING = 40;
|
|
25
25
|
declare const BLR_CSTRING2 = 41;
|
|
26
26
|
declare const BLR_BLOB = 261;
|
|
27
|
-
type FirebirdPhysicalType =
|
|
27
|
+
type FirebirdPhysicalType = "short" | "long" | "int64" | "real" | "double" | "sql_date" | "sql_time" | "timestamp" | "text" | "varying" | "cstring" | "boolean" | "blob" | "quad" | "int128" | "dec64" | "dec128" | "unsupported-tz";
|
|
28
28
|
declare class FirebirdUnsupportedFieldTypeError extends Error {
|
|
29
29
|
readonly blrType: number;
|
|
30
30
|
constructor(blrType: number);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentFormat } from "./convert/port.cjs";
|
|
2
2
|
//#region src/convert/capability.d.ts
|
|
3
|
-
type ContentVariant =
|
|
3
|
+
type ContentVariant = "wordprocessing" | "presentation" | "spreadsheet" | "drawing" | "formula";
|
|
4
4
|
interface FormatCapability {
|
|
5
5
|
readonly format: DocumentFormat;
|
|
6
6
|
readonly variant?: ContentVariant;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentFormat } from "./convert/port.js";
|
|
2
2
|
//#region src/convert/capability.d.ts
|
|
3
|
-
type ContentVariant =
|
|
3
|
+
type ContentVariant = "wordprocessing" | "presentation" | "spreadsheet" | "drawing" | "formula";
|
|
4
4
|
interface FormatCapability {
|
|
5
5
|
readonly format: DocumentFormat;
|
|
6
6
|
readonly variant?: ContentVariant;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContentCellValue } from "document-schema.js";
|
|
2
2
|
//#region src/layout/cell-typing.d.ts
|
|
3
|
-
type CellTypeRule =
|
|
4
|
-
type CellTypeDeclineReason =
|
|
3
|
+
type CellTypeRule = "boolean-literal" | "iso-date" | "named-month-date" | "plain-number" | "grouped-number" | "percentage" | "currency";
|
|
4
|
+
type CellTypeDeclineReason = "ambiguous-boolean-word" | "ambiguous-date-order" | "ambiguous-grouping-separator" | "leading-zero-digits" | "precision-loss";
|
|
5
5
|
type CellTypeInferenceResult = {
|
|
6
|
-
readonly outcome:
|
|
6
|
+
readonly outcome: "retyped";
|
|
7
7
|
readonly value: ContentCellValue;
|
|
8
8
|
readonly rule: CellTypeRule;
|
|
9
9
|
} | {
|
|
10
|
-
readonly outcome:
|
|
10
|
+
readonly outcome: "declined";
|
|
11
11
|
readonly reason: CellTypeDeclineReason;
|
|
12
12
|
};
|
|
13
13
|
type CellTypeInference = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContentCellValue } from "document-schema.js";
|
|
2
2
|
//#region src/layout/cell-typing.d.ts
|
|
3
|
-
type CellTypeRule =
|
|
4
|
-
type CellTypeDeclineReason =
|
|
3
|
+
type CellTypeRule = "boolean-literal" | "iso-date" | "named-month-date" | "plain-number" | "grouped-number" | "percentage" | "currency";
|
|
4
|
+
type CellTypeDeclineReason = "ambiguous-boolean-word" | "ambiguous-date-order" | "ambiguous-grouping-separator" | "leading-zero-digits" | "precision-loss";
|
|
5
5
|
type CellTypeInferenceResult = {
|
|
6
|
-
readonly outcome:
|
|
6
|
+
readonly outcome: "retyped";
|
|
7
7
|
readonly value: ContentCellValue;
|
|
8
8
|
readonly rule: CellTypeRule;
|
|
9
9
|
} | {
|
|
10
|
-
readonly outcome:
|
|
10
|
+
readonly outcome: "declined";
|
|
11
11
|
readonly reason: CellTypeDeclineReason;
|
|
12
12
|
};
|
|
13
13
|
type CellTypeInference = {
|
package/dist/codecs/read.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ interface DocumentCodecOptions {
|
|
|
7
7
|
readonly signal?: AbortSignal;
|
|
8
8
|
readonly images?: MarkdownImageResolver;
|
|
9
9
|
}
|
|
10
|
-
type ReadContentFormat = Exclude<DocumentFormat,
|
|
10
|
+
type ReadContentFormat = Exclude<DocumentFormat, "pdf">;
|
|
11
11
|
type ContentReader = (bytes: Uint8Array, options?: DocumentCodecOptions) => ContentDocument;
|
|
12
12
|
declare const CONTENT_READERS: Readonly<Record<ReadContentFormat, ContentReader>>;
|
|
13
13
|
declare function readDocumentLayout(bytes: Uint8Array, options?: DocumentCodecOptions): LayoutDocument;
|
package/dist/codecs/read.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface DocumentCodecOptions {
|
|
|
7
7
|
readonly signal?: AbortSignal;
|
|
8
8
|
readonly images?: MarkdownImageResolver;
|
|
9
9
|
}
|
|
10
|
-
type ReadContentFormat = Exclude<DocumentFormat,
|
|
10
|
+
type ReadContentFormat = Exclude<DocumentFormat, "pdf">;
|
|
11
11
|
type ContentReader = (bytes: Uint8Array, options?: DocumentCodecOptions) => ContentDocument;
|
|
12
12
|
declare const CONTENT_READERS: Readonly<Record<ReadContentFormat, ContentReader>>;
|
|
13
13
|
declare function readDocumentLayout(bytes: Uint8Array, options?: DocumentCodecOptions): LayoutDocument;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-
|
|
1
|
+
import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-BZ3iNsWh.cjs";
|
|
2
2
|
export { ContentVariant, FORMAT_CAPABILITIES, FormatCapability, UnsupportedConversionError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-
|
|
1
|
+
import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-D-a4okp0.js";
|
|
2
2
|
export { ContentVariant, FORMAT_CAPABILITIES, FormatCapability, UnsupportedConversionError };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { DocumentFormat } from "./port.cjs";
|
|
3
|
-
import { t as ContentVariant } from "../capability-
|
|
3
|
+
import { t as ContentVariant } from "../capability-BZ3iNsWh.cjs";
|
|
4
4
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
5
|
-
import { i as CellTypeInferenceSink } from "../cell-typing-
|
|
6
|
-
import { t as OmmlDiagnostic } from "../shared-
|
|
5
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.cjs";
|
|
6
|
+
import { t as OmmlDiagnostic } from "../shared-c0Lp3_iY.cjs";
|
|
7
7
|
import { ContentDocument, DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -30,11 +30,11 @@ interface UnifiedConversionOptions {
|
|
|
30
30
|
readonly onSvgDiagnostic?: SvgDiagnosticSink;
|
|
31
31
|
readonly clock?: ClockPort;
|
|
32
32
|
}
|
|
33
|
-
type ContentFormat =
|
|
34
|
-
type LayoutVariant = Exclude<ContentVariant,
|
|
33
|
+
type ContentFormat = "docx" | "pptx" | "xlsx" | "odt" | "odp" | "ods" | "odg" | "svg" | "csv" | "markdown";
|
|
34
|
+
type LayoutVariant = Exclude<ContentVariant, "formula">;
|
|
35
35
|
interface PackageFormatNode {
|
|
36
36
|
readonly variant: LayoutVariant;
|
|
37
|
-
readonly family:
|
|
37
|
+
readonly family: "ooxml" | "odf";
|
|
38
38
|
readonly decode: (bytes: Uint8Array<ArrayBuffer>) => SourcePackage;
|
|
39
39
|
readonly read: (pkg: SourcePackage, options?: UnifiedConversionOptions) => ContentDocument;
|
|
40
40
|
readonly build: (content: ContentDocument, options?: UnifiedConversionOptions) => SourcePackage;
|
|
@@ -43,7 +43,7 @@ interface PackageFormatNode {
|
|
|
43
43
|
}
|
|
44
44
|
interface TextFormatNode {
|
|
45
45
|
readonly variant: LayoutVariant;
|
|
46
|
-
readonly family:
|
|
46
|
+
readonly family: "markdown" | "csv" | "svg";
|
|
47
47
|
readonly decode: (bytes: Uint8Array<ArrayBuffer>) => string;
|
|
48
48
|
readonly read: (text: string, options?: UnifiedConversionOptions) => ContentDocument;
|
|
49
49
|
readonly build: (content: ContentDocument, options?: UnifiedConversionOptions) => string;
|
|
@@ -56,7 +56,7 @@ declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
|
56
56
|
declare const LAYOUT_CAPABLE: ReadonlySet<ContentFormat>;
|
|
57
57
|
declare function executeBridge(source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
58
58
|
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
59
|
-
type HopExecutor =
|
|
59
|
+
type HopExecutor = "bridge" | "toPdf" | "fromPdf";
|
|
60
60
|
interface CompositionHop {
|
|
61
61
|
readonly executor: HopExecutor;
|
|
62
62
|
readonly from: DocumentFormat;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
2
|
import { DocumentFormat } from "./port.js";
|
|
3
|
-
import { t as ContentVariant } from "../capability-
|
|
3
|
+
import { t as ContentVariant } from "../capability-D-a4okp0.js";
|
|
4
4
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
5
|
-
import { i as CellTypeInferenceSink } from "../cell-typing-
|
|
6
|
-
import { t as OmmlDiagnostic } from "../shared-
|
|
5
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.js";
|
|
6
|
+
import { t as OmmlDiagnostic } from "../shared-DHu5jDJf.js";
|
|
7
7
|
import { Package } from "ooxml.js";
|
|
8
8
|
import { ContentDocument, DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
9
9
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
@@ -30,11 +30,11 @@ interface UnifiedConversionOptions {
|
|
|
30
30
|
readonly onSvgDiagnostic?: SvgDiagnosticSink;
|
|
31
31
|
readonly clock?: ClockPort;
|
|
32
32
|
}
|
|
33
|
-
type ContentFormat =
|
|
34
|
-
type LayoutVariant = Exclude<ContentVariant,
|
|
33
|
+
type ContentFormat = "docx" | "pptx" | "xlsx" | "odt" | "odp" | "ods" | "odg" | "svg" | "csv" | "markdown";
|
|
34
|
+
type LayoutVariant = Exclude<ContentVariant, "formula">;
|
|
35
35
|
interface PackageFormatNode {
|
|
36
36
|
readonly variant: LayoutVariant;
|
|
37
|
-
readonly family:
|
|
37
|
+
readonly family: "ooxml" | "odf";
|
|
38
38
|
readonly decode: (bytes: Uint8Array<ArrayBuffer>) => SourcePackage;
|
|
39
39
|
readonly read: (pkg: SourcePackage, options?: UnifiedConversionOptions) => ContentDocument;
|
|
40
40
|
readonly build: (content: ContentDocument, options?: UnifiedConversionOptions) => SourcePackage;
|
|
@@ -43,7 +43,7 @@ interface PackageFormatNode {
|
|
|
43
43
|
}
|
|
44
44
|
interface TextFormatNode {
|
|
45
45
|
readonly variant: LayoutVariant;
|
|
46
|
-
readonly family:
|
|
46
|
+
readonly family: "markdown" | "csv" | "svg";
|
|
47
47
|
readonly decode: (bytes: Uint8Array<ArrayBuffer>) => string;
|
|
48
48
|
readonly read: (text: string, options?: UnifiedConversionOptions) => ContentDocument;
|
|
49
49
|
readonly build: (content: ContentDocument, options?: UnifiedConversionOptions) => string;
|
|
@@ -56,7 +56,7 @@ declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
|
56
56
|
declare const LAYOUT_CAPABLE: ReadonlySet<ContentFormat>;
|
|
57
57
|
declare function executeBridge(source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
58
58
|
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
59
|
-
type HopExecutor =
|
|
59
|
+
type HopExecutor = "bridge" | "toPdf" | "fromPdf";
|
|
60
60
|
interface CompositionHop {
|
|
61
61
|
readonly executor: HopExecutor;
|
|
62
62
|
readonly from: DocumentFormat;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
3
|
-
import { i as CellTypeInferenceSink } from "../cell-typing-
|
|
4
|
-
import { t as OmmlDiagnostic } from "../shared-
|
|
3
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.cjs";
|
|
4
|
+
import { t as OmmlDiagnostic } from "../shared-c0Lp3_iY.cjs";
|
|
5
5
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
6
|
-
import { t as DocumentFontRegistryOptions } from "../registry-
|
|
6
|
+
import { t as DocumentFontRegistryOptions } from "../registry-Bs4IHqVQ.cjs";
|
|
7
7
|
import { ContentDocument, ContentSection, DocumentTree } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
2
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
3
|
-
import { i as CellTypeInferenceSink } from "../cell-typing-
|
|
4
|
-
import { t as OmmlDiagnostic } from "../shared-
|
|
3
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.js";
|
|
4
|
+
import { t as OmmlDiagnostic } from "../shared-DHu5jDJf.js";
|
|
5
5
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
6
|
-
import { t as DocumentFontRegistryOptions } from "../registry-
|
|
6
|
+
import { t as DocumentFontRegistryOptions } from "../registry-913jEe6-.js";
|
|
7
7
|
import { ContentDocument, ContentSection, DocumentTree } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { OdmSection, Package } from "odf.js";
|
package/dist/convert/port.d.cts
CHANGED
|
@@ -24,7 +24,7 @@ interface DocumentPayload {
|
|
|
24
24
|
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
25
25
|
}
|
|
26
26
|
interface Diagnostic {
|
|
27
|
-
readonly severity:
|
|
27
|
+
readonly severity: "info" | "warning";
|
|
28
28
|
readonly code: string;
|
|
29
29
|
readonly message: string;
|
|
30
30
|
readonly pageIndex?: number;
|
package/dist/convert/port.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface DocumentPayload {
|
|
|
24
24
|
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
25
25
|
}
|
|
26
26
|
interface Diagnostic {
|
|
27
|
-
readonly severity:
|
|
27
|
+
readonly severity: "info" | "warning";
|
|
28
28
|
readonly code: string;
|
|
29
29
|
readonly message: string;
|
|
30
30
|
readonly pageIndex?: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/convert/variant-bridges.d.ts
|
|
3
3
|
type WordprocessingContentDocument = Extract<ContentDocument, {
|
|
4
|
-
kind:
|
|
4
|
+
kind: "wordprocessing";
|
|
5
5
|
}>;
|
|
6
6
|
type PresentationContentDocument = Extract<ContentDocument, {
|
|
7
|
-
kind:
|
|
7
|
+
kind: "presentation";
|
|
8
8
|
}>;
|
|
9
9
|
type DrawingContentDocument = Extract<ContentDocument, {
|
|
10
|
-
kind:
|
|
10
|
+
kind: "drawing";
|
|
11
11
|
}>;
|
|
12
12
|
declare function wordprocessingToPresentation(doc: WordprocessingContentDocument): PresentationContentDocument;
|
|
13
13
|
declare function presentationToWordprocessing(doc: PresentationContentDocument): WordprocessingContentDocument;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/convert/variant-bridges.d.ts
|
|
3
3
|
type WordprocessingContentDocument = Extract<ContentDocument, {
|
|
4
|
-
kind:
|
|
4
|
+
kind: "wordprocessing";
|
|
5
5
|
}>;
|
|
6
6
|
type PresentationContentDocument = Extract<ContentDocument, {
|
|
7
|
-
kind:
|
|
7
|
+
kind: "presentation";
|
|
8
8
|
}>;
|
|
9
9
|
type DrawingContentDocument = Extract<ContentDocument, {
|
|
10
|
-
kind:
|
|
10
|
+
kind: "drawing";
|
|
11
11
|
}>;
|
|
12
12
|
declare function wordprocessingToPresentation(doc: WordprocessingContentDocument): PresentationContentDocument;
|
|
13
13
|
declare function presentationToWordprocessing(doc: PresentationContentDocument): WordprocessingContentDocument;
|
package/dist/csv/read.d.cts
CHANGED
package/dist/csv/read.d.ts
CHANGED
package/dist/csv/records.cjs
CHANGED
package/dist/csv/records.js
CHANGED
package/dist/csv/write.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/csv/write.d.ts
|
|
3
3
|
declare class CsvUnsupportedDocumentKindError extends Error {
|
|
4
|
-
readonly kind: ContentDocument[
|
|
5
|
-
constructor(kind: ContentDocument[
|
|
4
|
+
readonly kind: ContentDocument["kind"];
|
|
5
|
+
constructor(kind: ContentDocument["kind"]);
|
|
6
6
|
}
|
|
7
7
|
declare class CsvSheetNotSpecifiedError extends Error {
|
|
8
8
|
readonly availableSheets: readonly string[];
|
package/dist/csv/write.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/csv/write.d.ts
|
|
3
3
|
declare class CsvUnsupportedDocumentKindError extends Error {
|
|
4
|
-
readonly kind: ContentDocument[
|
|
5
|
-
constructor(kind: ContentDocument[
|
|
4
|
+
readonly kind: ContentDocument["kind"];
|
|
5
|
+
constructor(kind: ContentDocument["kind"]);
|
|
6
6
|
}
|
|
7
7
|
declare class CsvSheetNotSpecifiedError extends Error {
|
|
8
8
|
readonly availableSheets: readonly string[];
|
|
@@ -10,7 +10,7 @@ declare const MATH_LINT_CODES: readonly ["math/coherence-divergence", "math/cohe
|
|
|
10
10
|
type MathLintCode = (typeof MATH_LINT_CODES)[number];
|
|
11
11
|
interface MathLintDiagnostic {
|
|
12
12
|
readonly code: MathLintCode;
|
|
13
|
-
readonly severity:
|
|
13
|
+
readonly severity: "warning";
|
|
14
14
|
readonly provenance?: string;
|
|
15
15
|
readonly detail?: string;
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ declare const MATH_LINT_CODES: readonly ["math/coherence-divergence", "math/cohe
|
|
|
10
10
|
type MathLintCode = (typeof MATH_LINT_CODES)[number];
|
|
11
11
|
interface MathLintDiagnostic {
|
|
12
12
|
readonly code: MathLintCode;
|
|
13
|
-
readonly severity:
|
|
13
|
+
readonly severity: "warning";
|
|
14
14
|
readonly provenance?: string;
|
|
15
15
|
readonly detail?: string;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
|
-
import { t as OmmlDiagnostic } from "../../shared-
|
|
2
|
+
import { t as OmmlDiagnostic } from "../../shared-c0Lp3_iY.cjs";
|
|
3
3
|
import { ContentDocument } from "document-schema.js";
|
|
4
4
|
import { Package } from "ooxml.js";
|
|
5
5
|
//#region src/edit/docx/content.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
|
-
import { t as OmmlDiagnostic } from "../../shared-
|
|
2
|
+
import { t as OmmlDiagnostic } from "../../shared-DHu5jDJf.js";
|
|
3
3
|
import { Package } from "ooxml.js";
|
|
4
4
|
import { ContentDocument } from "document-schema.js";
|
|
5
5
|
//#region src/edit/docx/content.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as nextDrawingId, i as insertImageMedia, n as MediaContext, r as buildInlineDrawing, t as ImageInit } from "../../image-
|
|
1
|
+
import { a as nextDrawingId, i as insertImageMedia, n as MediaContext, r as buildInlineDrawing, t as ImageInit } from "../../image-BQ7F9xxz.cjs";
|
|
2
2
|
export { ImageInit, MediaContext, buildInlineDrawing, insertImageMedia, nextDrawingId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as nextDrawingId, i as insertImageMedia, n as MediaContext, r as buildInlineDrawing, t as ImageInit } from "../../image-
|
|
1
|
+
import { a as nextDrawingId, i as insertImageMedia, n as MediaContext, r as buildInlineDrawing, t as ImageInit } from "../../image-BQ7F9xxz.js";
|
|
2
2
|
export { ImageInit, MediaContext, buildInlineDrawing, insertImageMedia, nextDrawingId };
|
|
@@ -257,7 +257,7 @@ var DocxParagraph = class {
|
|
|
257
257
|
const node = this.live();
|
|
258
258
|
const lastChildIndex = node.children.length - 1;
|
|
259
259
|
const lastChild = node.children[lastChildIndex];
|
|
260
|
-
if (lastChild?.type !== "element" || lastChild
|
|
260
|
+
if (lastChild?.type !== "element" || lastChild.tag !== "w:r") return;
|
|
261
261
|
const rId = require_opc_rels.addRelationship(this.pkg, "word/document.xml", {
|
|
262
262
|
type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
263
263
|
target: url,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as MathMlNode$1 } from "../../nodes-
|
|
2
|
-
import { t as OmmlWriteResult } from "../../write-
|
|
3
|
-
import { n as MediaContext, t as ImageInit } from "../../image-
|
|
1
|
+
import { r as MathMlNode$1 } from "../../nodes-jrlUmrNs.cjs";
|
|
2
|
+
import { t as OmmlWriteResult } from "../../write-DWupt1QI.cjs";
|
|
3
|
+
import { n as MediaContext, t as ImageInit } from "../../image-BQ7F9xxz.cjs";
|
|
4
4
|
import { n as RunInit, t as DocxRun } from "../../run-swnb_wQO.cjs";
|
|
5
5
|
import { ContentListMembership, ContentVector } from "document-schema.js";
|
|
6
6
|
import { Package, XmlElement, XmlNode } from "ooxml.js";
|
|
@@ -9,7 +9,7 @@ interface ParagraphInit {
|
|
|
9
9
|
readonly text?: string;
|
|
10
10
|
readonly styleId?: string;
|
|
11
11
|
readonly headingLevel?: number;
|
|
12
|
-
readonly alignment?:
|
|
12
|
+
readonly alignment?: "left" | "center" | "right" | "justify";
|
|
13
13
|
}
|
|
14
14
|
interface ImageMediaContext {
|
|
15
15
|
readonly pkg: Package;
|
|
@@ -32,8 +32,8 @@ declare class DocxParagraph {
|
|
|
32
32
|
insertRunAt(index: number, init?: RunInit): DocxRun;
|
|
33
33
|
get styleId(): string | undefined;
|
|
34
34
|
set styleId(value: string | undefined);
|
|
35
|
-
get alignment():
|
|
36
|
-
set alignment(value:
|
|
35
|
+
get alignment(): "left" | "center" | "right" | "justify" | undefined;
|
|
36
|
+
set alignment(value: "left" | "center" | "right" | "justify" | undefined);
|
|
37
37
|
private spacingElement;
|
|
38
38
|
get spacingBeforePt(): number | undefined;
|
|
39
39
|
set spacingBeforePt(value: number | undefined);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as MathMlNode$1 } from "../../nodes-
|
|
2
|
-
import { t as OmmlWriteResult } from "../../write-
|
|
3
|
-
import { n as MediaContext, t as ImageInit } from "../../image-
|
|
1
|
+
import { r as MathMlNode$1 } from "../../nodes-jrlUmrNs.js";
|
|
2
|
+
import { t as OmmlWriteResult } from "../../write-qKlz1R0J.js";
|
|
3
|
+
import { n as MediaContext, t as ImageInit } from "../../image-BQ7F9xxz.js";
|
|
4
4
|
import { n as RunInit, t as DocxRun } from "../../run-Bv6gpAMj.js";
|
|
5
5
|
import { Package, XmlElement, XmlNode } from "ooxml.js";
|
|
6
6
|
import { ContentListMembership, ContentVector } from "document-schema.js";
|
|
@@ -9,7 +9,7 @@ interface ParagraphInit {
|
|
|
9
9
|
readonly text?: string;
|
|
10
10
|
readonly styleId?: string;
|
|
11
11
|
readonly headingLevel?: number;
|
|
12
|
-
readonly alignment?:
|
|
12
|
+
readonly alignment?: "left" | "center" | "right" | "justify";
|
|
13
13
|
}
|
|
14
14
|
interface ImageMediaContext {
|
|
15
15
|
readonly pkg: Package;
|
|
@@ -32,8 +32,8 @@ declare class DocxParagraph {
|
|
|
32
32
|
insertRunAt(index: number, init?: RunInit): DocxRun;
|
|
33
33
|
get styleId(): string | undefined;
|
|
34
34
|
set styleId(value: string | undefined);
|
|
35
|
-
get alignment():
|
|
36
|
-
set alignment(value:
|
|
35
|
+
get alignment(): "left" | "center" | "right" | "justify" | undefined;
|
|
36
|
+
set alignment(value: "left" | "center" | "right" | "justify" | undefined);
|
|
37
37
|
private spacingElement;
|
|
38
38
|
get spacingBeforePt(): number | undefined;
|
|
39
39
|
set spacingBeforePt(value: number | undefined);
|
|
@@ -256,7 +256,7 @@ var DocxParagraph = class {
|
|
|
256
256
|
const node = this.live();
|
|
257
257
|
const lastChildIndex = node.children.length - 1;
|
|
258
258
|
const lastChild = node.children[lastChildIndex];
|
|
259
|
-
if (lastChild?.type !== "element" || lastChild
|
|
259
|
+
if (lastChild?.type !== "element" || lastChild.tag !== "w:r") return;
|
|
260
260
|
const rId = addRelationship(this.pkg, "word/document.xml", {
|
|
261
261
|
type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
262
262
|
target: url,
|
|
@@ -12,9 +12,9 @@ declare function getSizePt(rPr: XmlElement | undefined): number | undefined;
|
|
|
12
12
|
declare function setSizePt(rPr: XmlElement, sizePt: number): void;
|
|
13
13
|
declare function getColor(rPr: XmlElement | undefined): Color | undefined;
|
|
14
14
|
declare function setColor(rPr: XmlElement, color: Color): void;
|
|
15
|
-
declare function getStyleId(propsElement: XmlElement | undefined, tag:
|
|
16
|
-
declare function setStyleId(propsElement: XmlElement, tag:
|
|
17
|
-
declare function getAlignment(pPr: XmlElement | undefined):
|
|
18
|
-
declare function setAlignment(pPr: XmlElement, alignment:
|
|
15
|
+
declare function getStyleId(propsElement: XmlElement | undefined, tag: "w:pStyle" | "w:rStyle"): string | undefined;
|
|
16
|
+
declare function setStyleId(propsElement: XmlElement, tag: "w:pStyle" | "w:rStyle", styleId: string, order: readonly string[]): void;
|
|
17
|
+
declare function getAlignment(pPr: XmlElement | undefined): "left" | "center" | "right" | "justify" | undefined;
|
|
18
|
+
declare function setAlignment(pPr: XmlElement, alignment: "left" | "center" | "right" | "justify"): void;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { PPR_ORDER, RPR_ORDER, ensureFirstChild, getAlignment, getColor, getFontFamily, getSizePt, getStyleId, getToggle, setAlignment, setColor, setFontFamily, setSizePt, setStyleId, setToggle };
|
|
@@ -12,9 +12,9 @@ declare function getSizePt(rPr: XmlElement | undefined): number | undefined;
|
|
|
12
12
|
declare function setSizePt(rPr: XmlElement, sizePt: number): void;
|
|
13
13
|
declare function getColor(rPr: XmlElement | undefined): Color | undefined;
|
|
14
14
|
declare function setColor(rPr: XmlElement, color: Color): void;
|
|
15
|
-
declare function getStyleId(propsElement: XmlElement | undefined, tag:
|
|
16
|
-
declare function setStyleId(propsElement: XmlElement, tag:
|
|
17
|
-
declare function getAlignment(pPr: XmlElement | undefined):
|
|
18
|
-
declare function setAlignment(pPr: XmlElement, alignment:
|
|
15
|
+
declare function getStyleId(propsElement: XmlElement | undefined, tag: "w:pStyle" | "w:rStyle"): string | undefined;
|
|
16
|
+
declare function setStyleId(propsElement: XmlElement, tag: "w:pStyle" | "w:rStyle", styleId: string, order: readonly string[]): void;
|
|
17
|
+
declare function getAlignment(pPr: XmlElement | undefined): "left" | "center" | "right" | "justify" | undefined;
|
|
18
|
+
declare function setAlignment(pPr: XmlElement, alignment: "left" | "center" | "right" | "justify"): void;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { PPR_ORDER, RPR_ORDER, ensureFirstChild, getAlignment, getColor, getFontFamily, getSizePt, getStyleId, getToggle, setAlignment, setColor, setFontFamily, setSizePt, setStyleId, setToggle };
|
|
@@ -7,7 +7,7 @@ interface TableInit {
|
|
|
7
7
|
readonly columns: number;
|
|
8
8
|
readonly columnWidthsTwips?: readonly number[];
|
|
9
9
|
}
|
|
10
|
-
type DocxVerticalMerge =
|
|
10
|
+
type DocxVerticalMerge = "restart" | "continue";
|
|
11
11
|
declare class DocxTableCell {
|
|
12
12
|
private readonly node;
|
|
13
13
|
constructor(node: XmlElement);
|
|
@@ -7,7 +7,7 @@ interface TableInit {
|
|
|
7
7
|
readonly columns: number;
|
|
8
8
|
readonly columnWidthsTwips?: readonly number[];
|
|
9
9
|
}
|
|
10
|
-
type DocxVerticalMerge =
|
|
10
|
+
type DocxVerticalMerge = "restart" | "continue";
|
|
11
11
|
declare class DocxTableCell {
|
|
12
12
|
private readonly node;
|
|
13
13
|
constructor(node: XmlElement);
|
|
@@ -2,7 +2,7 @@ import { MarkdownParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
|
2
2
|
import { ContentBlock } from "document-schema.js";
|
|
3
3
|
//#region src/edit/markdown/list.d.ts
|
|
4
4
|
interface MarkdownListInit {
|
|
5
|
-
readonly type:
|
|
5
|
+
readonly type: "bullet" | "ordered";
|
|
6
6
|
readonly start?: number;
|
|
7
7
|
readonly task?: boolean;
|
|
8
8
|
readonly loose?: boolean;
|
|
@@ -2,7 +2,7 @@ import { MarkdownParagraph, ParagraphInit } from "./paragraph.js";
|
|
|
2
2
|
import { ContentBlock } from "document-schema.js";
|
|
3
3
|
//#region src/edit/markdown/list.d.ts
|
|
4
4
|
interface MarkdownListInit {
|
|
5
|
-
readonly type:
|
|
5
|
+
readonly type: "bullet" | "ordered";
|
|
6
6
|
readonly start?: number;
|
|
7
7
|
readonly task?: boolean;
|
|
8
8
|
readonly loose?: boolean;
|
package/dist/edit/odg/page.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as ImageInit } from "../../image-
|
|
2
|
-
import { t as OdpShape } from "../../shape-
|
|
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-
|
|
1
|
+
import { t as ImageInit } from "../../image-DzqEWMDw.cjs";
|
|
2
|
+
import { t as OdpShape } from "../../shape-DqkYq1OL.cjs";
|
|
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";
|
|
6
6
|
//#region src/edit/odg/page.d.ts
|