documents.js 1.68.0 → 1.70.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 +3 -3
- package/dist/edit/docx/content.cjs +6 -1
- package/dist/edit/docx/content.d.cts +2 -0
- package/dist/edit/docx/content.d.ts +2 -0
- package/dist/edit/docx/content.js +7 -2
- package/dist/edit/docx/editor.cjs +6 -2
- package/dist/edit/docx/editor.d.cts +6 -2
- package/dist/edit/docx/editor.d.ts +6 -2
- package/dist/edit/docx/editor.js +6 -2
- package/dist/edit/docx/scaffold.cjs +5 -2
- package/dist/edit/docx/scaffold.d.cts +6 -2
- package/dist/edit/docx/scaffold.d.ts +6 -2
- package/dist/edit/docx/scaffold.js +5 -2
- package/dist/edit/odg/content.cjs +7 -2
- package/dist/edit/odg/content.d.cts +6 -2
- package/dist/edit/odg/content.d.ts +6 -2
- package/dist/edit/odg/content.js +8 -3
- package/dist/edit/odg/editor.cjs +6 -2
- package/dist/edit/odg/editor.d.cts +6 -2
- package/dist/edit/odg/editor.d.ts +6 -2
- package/dist/edit/odg/editor.js +6 -2
- package/dist/edit/odg/scaffold.cjs +17 -4
- package/dist/edit/odg/scaffold.d.cts +6 -2
- package/dist/edit/odg/scaffold.d.ts +6 -2
- package/dist/edit/odg/scaffold.js +18 -5
- package/dist/edit/odp/content.cjs +7 -2
- package/dist/edit/odp/content.d.cts +6 -2
- package/dist/edit/odp/content.d.ts +6 -2
- package/dist/edit/odp/content.js +8 -3
- package/dist/edit/odp/editor.cjs +6 -2
- package/dist/edit/odp/editor.d.cts +6 -2
- package/dist/edit/odp/editor.d.ts +6 -2
- package/dist/edit/odp/editor.js +6 -2
- package/dist/edit/odp/scaffold.cjs +17 -4
- package/dist/edit/odp/scaffold.d.cts +6 -2
- package/dist/edit/odp/scaffold.d.ts +6 -2
- package/dist/edit/odp/scaffold.js +18 -5
- package/dist/edit/ods/content.cjs +7 -2
- package/dist/edit/ods/content.d.cts +6 -2
- package/dist/edit/ods/content.d.ts +6 -2
- package/dist/edit/ods/content.js +8 -3
- package/dist/edit/ods/editor.cjs +6 -2
- package/dist/edit/ods/editor.d.cts +6 -2
- package/dist/edit/ods/editor.d.ts +6 -2
- package/dist/edit/ods/editor.js +6 -2
- package/dist/edit/ods/scaffold.cjs +17 -4
- package/dist/edit/ods/scaffold.d.cts +6 -2
- package/dist/edit/ods/scaffold.d.ts +6 -2
- package/dist/edit/ods/scaffold.js +18 -5
- package/dist/edit/odt/content.cjs +7 -2
- package/dist/edit/odt/content.d.cts +6 -2
- package/dist/edit/odt/content.d.ts +6 -2
- package/dist/edit/odt/content.js +8 -3
- package/dist/edit/odt/editor.cjs +6 -2
- package/dist/edit/odt/editor.d.cts +6 -2
- package/dist/edit/odt/editor.d.ts +6 -2
- package/dist/edit/odt/editor.js +6 -2
- package/dist/edit/odt/scaffold.cjs +17 -4
- package/dist/edit/odt/scaffold.d.cts +6 -2
- package/dist/edit/odt/scaffold.d.ts +6 -2
- package/dist/edit/odt/scaffold.js +18 -5
- package/dist/edit/pptx/content.cjs +7 -2
- package/dist/edit/pptx/content.d.cts +6 -2
- package/dist/edit/pptx/content.d.ts +6 -2
- package/dist/edit/pptx/content.js +8 -3
- package/dist/edit/pptx/editor.cjs +6 -2
- package/dist/edit/pptx/editor.d.cts +6 -2
- package/dist/edit/pptx/editor.d.ts +6 -2
- package/dist/edit/pptx/editor.js +6 -2
- package/dist/edit/pptx/scaffold.cjs +3 -1
- package/dist/edit/pptx/scaffold.d.cts +6 -2
- package/dist/edit/pptx/scaffold.d.ts +6 -2
- package/dist/edit/pptx/scaffold.js +3 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +20 -13
- package/dist/index.d.ts +20 -13
- package/dist/index.js +3 -2
- package/dist/mathml/layout.cjs +42 -3
- package/dist/mathml/layout.js +42 -3
- package/dist/mathml/operators.cjs +12 -0
- package/dist/mathml/operators.js +12 -0
- package/dist/model/metadata.cjs +13 -0
- package/dist/model/metadata.d.cts +6 -0
- package/dist/model/metadata.d.ts +6 -0
- package/dist/model/metadata.js +12 -0
- package/dist/opc/core-properties.cjs +65 -0
- package/dist/opc/core-properties.d.cts +6 -0
- package/dist/opc/core-properties.d.ts +6 -0
- package/dist/opc/core-properties.js +64 -0
- package/dist/opc/rels.cjs +11 -4
- package/dist/opc/rels.d.cts +2 -1
- package/dist/opc/rels.d.ts +2 -1
- package/dist/opc/rels.js +11 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbT
|
|
|
6
6
|
import { ConversionOptions, ConversionRequest, ConversionResult, Diagnostic, DocumentConverter, DocumentFormat, DocumentPayload } from "./convert/port.js";
|
|
7
7
|
import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.js";
|
|
8
8
|
import { createLocalDocumentConverter } from "./convert/local.js";
|
|
9
|
+
import { ClockPort, fixedClock, systemClock } from "./ports/clock.js";
|
|
9
10
|
import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.js";
|
|
10
11
|
import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.js";
|
|
11
12
|
import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-THs7ipBq.js";
|
|
@@ -13,9 +14,10 @@ import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-
|
|
|
13
14
|
import { t as DocxRun } from "./run-DDe7miD5.js";
|
|
14
15
|
import { DocxParagraph } from "./edit/docx/paragraph.js";
|
|
15
16
|
import { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge } from "./edit/docx/table.js";
|
|
16
|
-
import { DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.js";
|
|
17
|
+
import { CreateDocxOptions, DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.js";
|
|
18
|
+
import { CreateEmptyDocxPackageOptions } from "./edit/docx/scaffold.js";
|
|
17
19
|
import { a as PAGE_SIZE_A4, d as flipY, l as SLIDE_SIZE_STANDARD, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-DaJr8yQW.js";
|
|
18
|
-
import { buildOdgPackage } from "./edit/odg/content.js";
|
|
20
|
+
import { BuildOdgPackageOptions, buildOdgPackage } from "./edit/odg/content.js";
|
|
19
21
|
import { i as LayoutFont, r as DEFAULT_LAYOUT_FONT, t as Alignment } from "./style-DkamR3aY.js";
|
|
20
22
|
import { n as RunInit, t as OdtRun } from "./run-wB22_F5w.js";
|
|
21
23
|
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-CjtZP77X.js";
|
|
@@ -23,22 +25,27 @@ import { n as OdtListItem, t as OdtList } from "./list-BJVehfU8.js";
|
|
|
23
25
|
import { t as OdpShape } from "./shape-GV8i37zL.js";
|
|
24
26
|
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-D03KX8Ux.js";
|
|
25
27
|
import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.js";
|
|
26
|
-
import { OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
|
|
27
|
-
import {
|
|
28
|
+
import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
|
|
29
|
+
import { CreateEmptyOdgPackageOptions } from "./edit/odg/scaffold.js";
|
|
30
|
+
import { BuildOdpPackageOptions, buildOdpPackage } from "./edit/odp/content.js";
|
|
28
31
|
import { i as TableInit, n as OdtTableCell, r as OdtTableRow, t as OdtTable } from "./table-Vf6nCixr.js";
|
|
29
32
|
import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.js";
|
|
30
|
-
import { OdpEditor, createOdp, openOdp } from "./edit/odp/editor.js";
|
|
33
|
+
import { CreateOdpOptions, OdpEditor, createOdp, openOdp } from "./edit/odp/editor.js";
|
|
34
|
+
import { CreateEmptyOdpPackageOptions } from "./edit/odp/scaffold.js";
|
|
31
35
|
import { t as OdsCell } from "./cell-CNHPsDEk.js";
|
|
32
|
-
import { buildOdsPackage } from "./edit/ods/content.js";
|
|
36
|
+
import { BuildOdsPackageOptions, buildOdsPackage } from "./edit/ods/content.js";
|
|
33
37
|
import { OdsSheet } from "./edit/ods/sheet.js";
|
|
34
|
-
import { OdsEditor, createOds, openOds } from "./edit/ods/editor.js";
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
+
import { CreateOdsOptions, OdsEditor, createOds, openOds } from "./edit/ods/editor.js";
|
|
39
|
+
import { CreateEmptyOdsPackageOptions } from "./edit/ods/scaffold.js";
|
|
40
|
+
import { BuildOdtPackageOptions, buildOdtPackage } from "./edit/odt/content.js";
|
|
41
|
+
import { CreateOdtOptions, OdtBody, OdtEditor, createOdt, openOdt } from "./edit/odt/editor.js";
|
|
42
|
+
import { CreateEmptyOdtPackageOptions } from "./edit/odt/scaffold.js";
|
|
43
|
+
import { BuildPptxPackageOptions, buildPptxPackage } from "./edit/pptx/content.js";
|
|
38
44
|
import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-BjX3wlig.js";
|
|
39
45
|
import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-Db91eorq.js";
|
|
40
46
|
import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
|
|
41
|
-
import { PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
|
|
47
|
+
import { CreatePptxOptions, PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
|
|
48
|
+
import { CreateEmptyPptxPackageOptions } from "./edit/pptx/scaffold.js";
|
|
42
49
|
import { a as parseHsqldbScript, i as displayTextFor, n as HsqldbScriptParseError, r as HsqldbTable, t as HsqldbColumn } from "./script-DsGGIzGU.js";
|
|
43
50
|
import { t as FirebirdBackupParseError } from "./reader-DP0Mbaj4.js";
|
|
44
51
|
import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-DVgO1DQ9.js";
|
|
@@ -69,6 +76,7 @@ import { readMarkdownContent } from "./markdown/read.js";
|
|
|
69
76
|
import { buildMarkdownText } from "./markdown/write.js";
|
|
70
77
|
import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.js";
|
|
71
78
|
import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.js";
|
|
79
|
+
import { resolveMetadataTimestamps } from "./model/metadata.js";
|
|
72
80
|
import { EngineLayoutOptions, WordprocessingLayoutResult, convertWordprocessingToLayout } from "./layout/engine.js";
|
|
73
81
|
import { PresentationLayoutResult, SlidesLayoutOptions, convertPresentationToLayout } from "./layout/slides.js";
|
|
74
82
|
import { SheetsLayoutOptions, SpreadsheetLayoutResult, convertSpreadsheetToLayout } from "./layout/sheets.js";
|
|
@@ -91,10 +99,9 @@ import { RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedE
|
|
|
91
99
|
import { OdbReportContentOptions, OdbReportNotSpecifiedError, readOdbReportContent } from "./odb/report/content.js";
|
|
92
100
|
import { renderOdbReportContent } from "./odb/report/render.js";
|
|
93
101
|
import { OdbReportDataSourceError, odbReportCommandSql, resolveOdbReportRows } from "./odb/report/source.js";
|
|
94
|
-
import { ClockPort, fixedClock, systemClock } from "./ports/clock.js";
|
|
95
102
|
import { throwIfAborted } from "./ports/abort.js";
|
|
96
103
|
import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Footnote, FootnoteSchema, NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, Package, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
|
|
97
104
|
import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, schemaUriFor } from "document-schema.js";
|
|
98
105
|
import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
99
106
|
import { FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PositionedFormula, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
|
|
100
|
-
export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildDocxPackageOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
107
|
+
export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildDocxPackageOptions, type BuildOdgPackageOptions, type BuildOdpPackageOptions, type BuildOdsPackageOptions, type BuildOdtPackageOptions, type BuildPptxPackageOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePptxOptions, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import { PAGE_SIZE_A4, PAGE_SIZE_LETTER, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCR
|
|
|
2
2
|
import { COLOR_BLACK, rgbHexToColor } from "./model/color.js";
|
|
3
3
|
import { DEFAULT_LAYOUT_FONT } from "./model/style.js";
|
|
4
4
|
import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "./model/bytes.js";
|
|
5
|
+
import { resolveMetadataTimestamps } from "./model/metadata.js";
|
|
6
|
+
import { fixedClock, systemClock } from "./ports/clock.js";
|
|
5
7
|
import { elementChildren, elementLocalName, firstChildByLocalName, isMathMlElement, localName, textContent } from "./mathml/nodes.js";
|
|
6
8
|
import { operatorProperties } from "./mathml/operators.js";
|
|
7
9
|
import { applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.js";
|
|
@@ -88,9 +90,8 @@ import { renderOdbReportContent } from "./odb/report/render.js";
|
|
|
88
90
|
import { OdbReportDataSourceError, odbReportCommandSql, resolveOdbReportRows } from "./odb/report/source.js";
|
|
89
91
|
import { OdbReportNotSpecifiedError, readOdbReportContent } from "./odb/report/content.js";
|
|
90
92
|
import { createLocalDocumentConverter } from "./convert/local.js";
|
|
91
|
-
import { fixedClock, systemClock } from "./ports/clock.js";
|
|
92
93
|
import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, DefinedNameSchema, FootnoteSchema, NumberingDefinitionSchema, NumberingLevelSchema, PackageSchema, PartSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
|
|
93
94
|
import { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DocumentPackageSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, schemaUriFor } from "document-schema.js";
|
|
94
95
|
import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
95
96
|
import { NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
|
|
96
|
-
export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DefinedNameSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, NumberingDefinitionSchema, NumberingLevelSchema, OdbNoEmbeddedDataSourceError, OdbReportDataSourceError, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEncryptedError, PdfParseError, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
97
|
+
export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DefinedNameSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, NumberingDefinitionSchema, NumberingLevelSchema, OdbNoEmbeddedDataSourceError, OdbReportDataSourceError, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEncryptedError, PdfParseError, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
package/dist/mathml/layout.cjs
CHANGED
|
@@ -124,6 +124,45 @@ function stretchOperator(element, targetSizePt, ctx) {
|
|
|
124
124
|
if (result === void 0 || result.kind === "base") return;
|
|
125
125
|
return stretchedBox(result, text, ctx);
|
|
126
126
|
}
|
|
127
|
+
function horizontallyStretchedBox(result, text, ctx) {
|
|
128
|
+
const ascentPt = result.inkAscentPt;
|
|
129
|
+
const descentPt = result.inkDescentPt;
|
|
130
|
+
const items = [{
|
|
131
|
+
kind: "assembled-glyphs",
|
|
132
|
+
placements: result.placements.map((placement) => ({
|
|
133
|
+
glyphId: placement.glyphId,
|
|
134
|
+
xPt: placement.offsetPt,
|
|
135
|
+
yPt: ascentPt
|
|
136
|
+
})),
|
|
137
|
+
text,
|
|
138
|
+
sizePt: ctx.sizePt,
|
|
139
|
+
color: ctx.color
|
|
140
|
+
}];
|
|
141
|
+
return {
|
|
142
|
+
widthPt: result.sizePt,
|
|
143
|
+
ascentPt,
|
|
144
|
+
descentPt,
|
|
145
|
+
heightPt: ascentPt + descentPt,
|
|
146
|
+
items
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function stretchHorizontalOperator(element, targetWidthPt, ctx) {
|
|
150
|
+
const text = require_mathml_nodes.textContent(element).trim();
|
|
151
|
+
const codePoints = [...text];
|
|
152
|
+
if (codePoints.length !== 1) return;
|
|
153
|
+
const codePoint = codePoints[0]?.codePointAt(0);
|
|
154
|
+
if (codePoint === void 0) return;
|
|
155
|
+
const result = ctx.metrics.stretch(codePoint, "horizontal", targetWidthPt, ctx.sizePt);
|
|
156
|
+
if (result === void 0 || result.kind === "base") return;
|
|
157
|
+
return horizontallyStretchedBox(result, text, ctx);
|
|
158
|
+
}
|
|
159
|
+
function layoutUnderOverChild(childElement, targetWidthPt, scriptCtx) {
|
|
160
|
+
if (isStretchyOperator(childElement)) {
|
|
161
|
+
const stretched = stretchHorizontalOperator(childElement, targetWidthPt, scriptCtx);
|
|
162
|
+
if (stretched !== void 0) return stretched;
|
|
163
|
+
}
|
|
164
|
+
return layoutNode(childElement, scriptCtx);
|
|
165
|
+
}
|
|
127
166
|
function stretchRowOperators(children, boxes, ctx) {
|
|
128
167
|
const stretchy = children.map(isStretchyOperator);
|
|
129
168
|
if (!stretchy.includes(true)) return boxes;
|
|
@@ -269,9 +308,9 @@ function layoutUnderOverElement(element, kind, ctx) {
|
|
|
269
308
|
overXPt: isAccent ? topAccentXPt : void 0,
|
|
270
309
|
underXPt: isAccentUnder ? topAccentXPt : void 0
|
|
271
310
|
};
|
|
272
|
-
if (kind === "munder") return layoutUnderOver(base, children[1] === void 0 ? void 0 :
|
|
273
|
-
if (kind === "mover") return layoutUnderOver(base, void 0, children[1] === void 0 ? void 0 :
|
|
274
|
-
return layoutUnderOver(base, children[1] === void 0 ? void 0 :
|
|
311
|
+
if (kind === "munder") return layoutUnderOver(base, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), void 0, ctx, accentAttachment);
|
|
312
|
+
if (kind === "mover") return layoutUnderOver(base, void 0, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), ctx, accentAttachment);
|
|
313
|
+
return layoutUnderOver(base, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), children[2] === void 0 ? void 0 : layoutUnderOverChild(children[2], base.widthPt, scriptCtx), ctx, accentAttachment);
|
|
275
314
|
}
|
|
276
315
|
function layoutFraction(element, ctx) {
|
|
277
316
|
const children = require_mathml_nodes.elementChildren(element);
|
package/dist/mathml/layout.js
CHANGED
|
@@ -123,6 +123,45 @@ function stretchOperator(element, targetSizePt, ctx) {
|
|
|
123
123
|
if (result === void 0 || result.kind === "base") return;
|
|
124
124
|
return stretchedBox(result, text, ctx);
|
|
125
125
|
}
|
|
126
|
+
function horizontallyStretchedBox(result, text, ctx) {
|
|
127
|
+
const ascentPt = result.inkAscentPt;
|
|
128
|
+
const descentPt = result.inkDescentPt;
|
|
129
|
+
const items = [{
|
|
130
|
+
kind: "assembled-glyphs",
|
|
131
|
+
placements: result.placements.map((placement) => ({
|
|
132
|
+
glyphId: placement.glyphId,
|
|
133
|
+
xPt: placement.offsetPt,
|
|
134
|
+
yPt: ascentPt
|
|
135
|
+
})),
|
|
136
|
+
text,
|
|
137
|
+
sizePt: ctx.sizePt,
|
|
138
|
+
color: ctx.color
|
|
139
|
+
}];
|
|
140
|
+
return {
|
|
141
|
+
widthPt: result.sizePt,
|
|
142
|
+
ascentPt,
|
|
143
|
+
descentPt,
|
|
144
|
+
heightPt: ascentPt + descentPt,
|
|
145
|
+
items
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function stretchHorizontalOperator(element, targetWidthPt, ctx) {
|
|
149
|
+
const text = textContent(element).trim();
|
|
150
|
+
const codePoints = [...text];
|
|
151
|
+
if (codePoints.length !== 1) return;
|
|
152
|
+
const codePoint = codePoints[0]?.codePointAt(0);
|
|
153
|
+
if (codePoint === void 0) return;
|
|
154
|
+
const result = ctx.metrics.stretch(codePoint, "horizontal", targetWidthPt, ctx.sizePt);
|
|
155
|
+
if (result === void 0 || result.kind === "base") return;
|
|
156
|
+
return horizontallyStretchedBox(result, text, ctx);
|
|
157
|
+
}
|
|
158
|
+
function layoutUnderOverChild(childElement, targetWidthPt, scriptCtx) {
|
|
159
|
+
if (isStretchyOperator(childElement)) {
|
|
160
|
+
const stretched = stretchHorizontalOperator(childElement, targetWidthPt, scriptCtx);
|
|
161
|
+
if (stretched !== void 0) return stretched;
|
|
162
|
+
}
|
|
163
|
+
return layoutNode(childElement, scriptCtx);
|
|
164
|
+
}
|
|
126
165
|
function stretchRowOperators(children, boxes, ctx) {
|
|
127
166
|
const stretchy = children.map(isStretchyOperator);
|
|
128
167
|
if (!stretchy.includes(true)) return boxes;
|
|
@@ -268,9 +307,9 @@ function layoutUnderOverElement(element, kind, ctx) {
|
|
|
268
307
|
overXPt: isAccent ? topAccentXPt : void 0,
|
|
269
308
|
underXPt: isAccentUnder ? topAccentXPt : void 0
|
|
270
309
|
};
|
|
271
|
-
if (kind === "munder") return layoutUnderOver(base, children[1] === void 0 ? void 0 :
|
|
272
|
-
if (kind === "mover") return layoutUnderOver(base, void 0, children[1] === void 0 ? void 0 :
|
|
273
|
-
return layoutUnderOver(base, children[1] === void 0 ? void 0 :
|
|
310
|
+
if (kind === "munder") return layoutUnderOver(base, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), void 0, ctx, accentAttachment);
|
|
311
|
+
if (kind === "mover") return layoutUnderOver(base, void 0, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), ctx, accentAttachment);
|
|
312
|
+
return layoutUnderOver(base, children[1] === void 0 ? void 0 : layoutUnderOverChild(children[1], base.widthPt, scriptCtx), children[2] === void 0 ? void 0 : layoutUnderOverChild(children[2], base.widthPt, scriptCtx), ctx, accentAttachment);
|
|
274
313
|
}
|
|
275
314
|
function layoutFraction(element, ctx) {
|
|
276
315
|
const children = elementChildren(element);
|
|
@@ -180,6 +180,18 @@ const OPERATORS = /* @__PURE__ */ new Map([
|
|
|
180
180
|
lspaceEm: ZERO_SPACE,
|
|
181
181
|
rspaceEm: ZERO_SPACE,
|
|
182
182
|
stretchy: true
|
|
183
|
+
}],
|
|
184
|
+
["⏞", {
|
|
185
|
+
...DEFAULT_OPERATOR,
|
|
186
|
+
lspaceEm: ZERO_SPACE,
|
|
187
|
+
rspaceEm: ZERO_SPACE,
|
|
188
|
+
stretchy: true
|
|
189
|
+
}],
|
|
190
|
+
["⏟", {
|
|
191
|
+
...DEFAULT_OPERATOR,
|
|
192
|
+
lspaceEm: ZERO_SPACE,
|
|
193
|
+
rspaceEm: ZERO_SPACE,
|
|
194
|
+
stretchy: true
|
|
183
195
|
}]
|
|
184
196
|
]);
|
|
185
197
|
function operatorProperties(text) {
|
package/dist/mathml/operators.js
CHANGED
|
@@ -179,6 +179,18 @@ const OPERATORS = /* @__PURE__ */ new Map([
|
|
|
179
179
|
lspaceEm: ZERO_SPACE,
|
|
180
180
|
rspaceEm: ZERO_SPACE,
|
|
181
181
|
stretchy: true
|
|
182
|
+
}],
|
|
183
|
+
["⏞", {
|
|
184
|
+
...DEFAULT_OPERATOR,
|
|
185
|
+
lspaceEm: ZERO_SPACE,
|
|
186
|
+
rspaceEm: ZERO_SPACE,
|
|
187
|
+
stretchy: true
|
|
188
|
+
}],
|
|
189
|
+
["⏟", {
|
|
190
|
+
...DEFAULT_OPERATOR,
|
|
191
|
+
lspaceEm: ZERO_SPACE,
|
|
192
|
+
rspaceEm: ZERO_SPACE,
|
|
193
|
+
stretchy: true
|
|
182
194
|
}]
|
|
183
195
|
]);
|
|
184
196
|
function operatorProperties(text) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/model/metadata.ts
|
|
3
|
+
function resolveMetadataTimestamps(metadata, clock) {
|
|
4
|
+
if (metadata.createdIso !== void 0 && metadata.modifiedIso !== void 0) return metadata;
|
|
5
|
+
const now = clock.now().toISOString();
|
|
6
|
+
return {
|
|
7
|
+
...metadata,
|
|
8
|
+
createdIso: metadata.createdIso ?? now,
|
|
9
|
+
modifiedIso: metadata.modifiedIso ?? now
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.resolveMetadataTimestamps = resolveMetadataTimestamps;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClockPort } from "../ports/clock.cjs";
|
|
2
|
+
import { LayoutMetadata } from "document-schema.js";
|
|
3
|
+
//#region src/model/metadata.d.ts
|
|
4
|
+
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock: ClockPort): LayoutMetadata;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { resolveMetadataTimestamps };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClockPort } from "../ports/clock.js";
|
|
2
|
+
import { LayoutMetadata } from "document-schema.js";
|
|
3
|
+
//#region src/model/metadata.d.ts
|
|
4
|
+
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock: ClockPort): LayoutMetadata;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { resolveMetadataTimestamps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/model/metadata.ts
|
|
2
|
+
function resolveMetadataTimestamps(metadata, clock) {
|
|
3
|
+
if (metadata.createdIso !== void 0 && metadata.modifiedIso !== void 0) return metadata;
|
|
4
|
+
const now = clock.now().toISOString();
|
|
5
|
+
return {
|
|
6
|
+
...metadata,
|
|
7
|
+
createdIso: metadata.createdIso ?? now,
|
|
8
|
+
modifiedIso: metadata.modifiedIso ?? now
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { resolveMetadataTimestamps };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_xml_fragment = require("../xml/fragment.cjs");
|
|
3
|
+
const require_xml_entities = require("../xml/entities.cjs");
|
|
4
|
+
const require_opc_rels = require("./rels.cjs");
|
|
5
|
+
const require_opc_content_types = require("./content-types.cjs");
|
|
6
|
+
//#region src/opc/core-properties.ts
|
|
7
|
+
const CORE_PROPERTIES_PART_PATH = "docProps/core.xml";
|
|
8
|
+
const CORE_PROPERTIES_CONTENT_TYPE = "application/vnd.openxmlformats-package.core-properties+xml";
|
|
9
|
+
const CORE_PROPERTIES_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
|
|
10
|
+
const CP_NS = "http://schemas.openxmlformats.org/package/2006/metadata/core-properties";
|
|
11
|
+
const DC_NS = "http://purl.org/dc/elements/1.1/";
|
|
12
|
+
const DCTERMS_NS = "http://purl.org/dc/terms/";
|
|
13
|
+
const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
|
|
14
|
+
const W3CDTF_TYPE = "dcterms:W3CDTF";
|
|
15
|
+
function declaration() {
|
|
16
|
+
return {
|
|
17
|
+
type: "declaration",
|
|
18
|
+
attributes: [
|
|
19
|
+
{
|
|
20
|
+
name: "version",
|
|
21
|
+
value: "1.0"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "encoding",
|
|
25
|
+
value: "UTF-8"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "standalone",
|
|
29
|
+
value: "yes"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function textElement(tag, value) {
|
|
35
|
+
return require_xml_fragment.el(tag, {}, [require_xml_fragment.txt(require_xml_entities.encodeXmlText(value))]);
|
|
36
|
+
}
|
|
37
|
+
function dateElement(tag, isoValue) {
|
|
38
|
+
return require_xml_fragment.el(tag, { "xsi:type": W3CDTF_TYPE }, [require_xml_fragment.txt(require_xml_entities.encodeXmlText(isoValue))]);
|
|
39
|
+
}
|
|
40
|
+
function addCoreProperties(pkg, metadata) {
|
|
41
|
+
const children = [];
|
|
42
|
+
if (metadata.title !== void 0) children.push(textElement("dc:title", metadata.title));
|
|
43
|
+
if (metadata.author !== void 0) children.push(textElement("dc:creator", metadata.author));
|
|
44
|
+
if (metadata.subject !== void 0) children.push(textElement("dc:subject", metadata.subject));
|
|
45
|
+
if (metadata.keywords !== void 0 && metadata.keywords.length > 0) children.push(textElement("cp:keywords", metadata.keywords.join(", ")));
|
|
46
|
+
if (metadata.createdIso !== void 0) children.push(dateElement("dcterms:created", metadata.createdIso));
|
|
47
|
+
if (metadata.modifiedIso !== void 0) children.push(dateElement("dcterms:modified", metadata.modifiedIso));
|
|
48
|
+
const root = require_xml_fragment.el("cp:coreProperties", {
|
|
49
|
+
"xmlns:cp": CP_NS,
|
|
50
|
+
"xmlns:dc": DC_NS,
|
|
51
|
+
"xmlns:dcterms": DCTERMS_NS,
|
|
52
|
+
"xmlns:xsi": XSI_NS
|
|
53
|
+
}, children);
|
|
54
|
+
pkg.parts[CORE_PROPERTIES_PART_PATH] = {
|
|
55
|
+
kind: "xml",
|
|
56
|
+
nodes: [declaration(), root]
|
|
57
|
+
};
|
|
58
|
+
require_opc_content_types.ensureContentTypeOverride(pkg, CORE_PROPERTIES_PART_PATH, CORE_PROPERTIES_CONTENT_TYPE);
|
|
59
|
+
require_opc_rels.addRootRelationship(pkg, {
|
|
60
|
+
type: CORE_PROPERTIES_REL_TYPE,
|
|
61
|
+
target: CORE_PROPERTIES_PART_PATH
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
exports.addCoreProperties = addCoreProperties;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { el, txt } from "../xml/fragment.js";
|
|
2
|
+
import { encodeXmlText } from "../xml/entities.js";
|
|
3
|
+
import { addRootRelationship } from "./rels.js";
|
|
4
|
+
import { ensureContentTypeOverride } from "./content-types.js";
|
|
5
|
+
//#region src/opc/core-properties.ts
|
|
6
|
+
const CORE_PROPERTIES_PART_PATH = "docProps/core.xml";
|
|
7
|
+
const CORE_PROPERTIES_CONTENT_TYPE = "application/vnd.openxmlformats-package.core-properties+xml";
|
|
8
|
+
const CORE_PROPERTIES_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
|
|
9
|
+
const CP_NS = "http://schemas.openxmlformats.org/package/2006/metadata/core-properties";
|
|
10
|
+
const DC_NS = "http://purl.org/dc/elements/1.1/";
|
|
11
|
+
const DCTERMS_NS = "http://purl.org/dc/terms/";
|
|
12
|
+
const XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
|
|
13
|
+
const W3CDTF_TYPE = "dcterms:W3CDTF";
|
|
14
|
+
function declaration() {
|
|
15
|
+
return {
|
|
16
|
+
type: "declaration",
|
|
17
|
+
attributes: [
|
|
18
|
+
{
|
|
19
|
+
name: "version",
|
|
20
|
+
value: "1.0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "encoding",
|
|
24
|
+
value: "UTF-8"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "standalone",
|
|
28
|
+
value: "yes"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function textElement(tag, value) {
|
|
34
|
+
return el(tag, {}, [txt(encodeXmlText(value))]);
|
|
35
|
+
}
|
|
36
|
+
function dateElement(tag, isoValue) {
|
|
37
|
+
return el(tag, { "xsi:type": W3CDTF_TYPE }, [txt(encodeXmlText(isoValue))]);
|
|
38
|
+
}
|
|
39
|
+
function addCoreProperties(pkg, metadata) {
|
|
40
|
+
const children = [];
|
|
41
|
+
if (metadata.title !== void 0) children.push(textElement("dc:title", metadata.title));
|
|
42
|
+
if (metadata.author !== void 0) children.push(textElement("dc:creator", metadata.author));
|
|
43
|
+
if (metadata.subject !== void 0) children.push(textElement("dc:subject", metadata.subject));
|
|
44
|
+
if (metadata.keywords !== void 0 && metadata.keywords.length > 0) children.push(textElement("cp:keywords", metadata.keywords.join(", ")));
|
|
45
|
+
if (metadata.createdIso !== void 0) children.push(dateElement("dcterms:created", metadata.createdIso));
|
|
46
|
+
if (metadata.modifiedIso !== void 0) children.push(dateElement("dcterms:modified", metadata.modifiedIso));
|
|
47
|
+
const root = el("cp:coreProperties", {
|
|
48
|
+
"xmlns:cp": CP_NS,
|
|
49
|
+
"xmlns:dc": DC_NS,
|
|
50
|
+
"xmlns:dcterms": DCTERMS_NS,
|
|
51
|
+
"xmlns:xsi": XSI_NS
|
|
52
|
+
}, children);
|
|
53
|
+
pkg.parts[CORE_PROPERTIES_PART_PATH] = {
|
|
54
|
+
kind: "xml",
|
|
55
|
+
nodes: [declaration(), root]
|
|
56
|
+
};
|
|
57
|
+
ensureContentTypeOverride(pkg, CORE_PROPERTIES_PART_PATH, CORE_PROPERTIES_CONTENT_TYPE);
|
|
58
|
+
addRootRelationship(pkg, {
|
|
59
|
+
type: CORE_PROPERTIES_REL_TYPE,
|
|
60
|
+
target: CORE_PROPERTIES_PART_PATH
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { addCoreProperties };
|
package/dist/opc/rels.cjs
CHANGED
|
@@ -5,8 +5,8 @@ let ooxml_js = require("ooxml.js");
|
|
|
5
5
|
//#region src/opc/rels.ts
|
|
6
6
|
const RELATIONSHIPS_NAMESPACE = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
7
7
|
const RELATIONSHIP_ID_PATTERN = /^rId(\d+)$/;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const ROOT_RELS_PART_PATH = "_rels/.rels";
|
|
9
|
+
function ensureRelationshipsRootAtPath(pkg, relsPath) {
|
|
10
10
|
const existingRoot = (0, ooxml_js.rootElement)(pkg.parts[relsPath]);
|
|
11
11
|
if (existingRoot !== void 0) return existingRoot;
|
|
12
12
|
const root = require_xml_fragment.el("Relationships", { xmlns: RELATIONSHIPS_NAMESPACE });
|
|
@@ -31,8 +31,8 @@ function allocateRelationshipId(relationshipsRoot) {
|
|
|
31
31
|
}
|
|
32
32
|
return `rId${max + 1}`;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const root =
|
|
34
|
+
function addRelationshipAtPath(pkg, relsPath, rel) {
|
|
35
|
+
const root = ensureRelationshipsRootAtPath(pkg, relsPath);
|
|
36
36
|
const id = allocateRelationshipId(root);
|
|
37
37
|
const attrs = {
|
|
38
38
|
Id: id,
|
|
@@ -43,5 +43,12 @@ function addRelationship(pkg, partPath, rel) {
|
|
|
43
43
|
root.children.push(require_xml_fragment.el("Relationship", attrs));
|
|
44
44
|
return id;
|
|
45
45
|
}
|
|
46
|
+
function addRelationship(pkg, partPath, rel) {
|
|
47
|
+
return addRelationshipAtPath(pkg, require_opc_paths.relsPathFor(partPath), rel);
|
|
48
|
+
}
|
|
49
|
+
function addRootRelationship(pkg, rel) {
|
|
50
|
+
return addRelationshipAtPath(pkg, ROOT_RELS_PART_PATH, rel);
|
|
51
|
+
}
|
|
46
52
|
//#endregion
|
|
47
53
|
exports.addRelationship = addRelationship;
|
|
54
|
+
exports.addRootRelationship = addRootRelationship;
|
package/dist/opc/rels.d.cts
CHANGED
|
@@ -6,5 +6,6 @@ interface NewRelationship {
|
|
|
6
6
|
readonly targetMode?: 'External';
|
|
7
7
|
}
|
|
8
8
|
declare function addRelationship(pkg: Package, partPath: string, rel: NewRelationship): string;
|
|
9
|
+
declare function addRootRelationship(pkg: Package, rel: NewRelationship): string;
|
|
9
10
|
//#endregion
|
|
10
|
-
export { NewRelationship, addRelationship };
|
|
11
|
+
export { NewRelationship, addRelationship, addRootRelationship };
|
package/dist/opc/rels.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ interface NewRelationship {
|
|
|
6
6
|
readonly targetMode?: 'External';
|
|
7
7
|
}
|
|
8
8
|
declare function addRelationship(pkg: Package, partPath: string, rel: NewRelationship): string;
|
|
9
|
+
declare function addRootRelationship(pkg: Package, rel: NewRelationship): string;
|
|
9
10
|
//#endregion
|
|
10
|
-
export { NewRelationship, addRelationship };
|
|
11
|
+
export { NewRelationship, addRelationship, addRootRelationship };
|
package/dist/opc/rels.js
CHANGED
|
@@ -4,8 +4,8 @@ import { attr, rootElement } from "ooxml.js";
|
|
|
4
4
|
//#region src/opc/rels.ts
|
|
5
5
|
const RELATIONSHIPS_NAMESPACE = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
6
6
|
const RELATIONSHIP_ID_PATTERN = /^rId(\d+)$/;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const ROOT_RELS_PART_PATH = "_rels/.rels";
|
|
8
|
+
function ensureRelationshipsRootAtPath(pkg, relsPath) {
|
|
9
9
|
const existingRoot = rootElement(pkg.parts[relsPath]);
|
|
10
10
|
if (existingRoot !== void 0) return existingRoot;
|
|
11
11
|
const root = el("Relationships", { xmlns: RELATIONSHIPS_NAMESPACE });
|
|
@@ -30,8 +30,8 @@ function allocateRelationshipId(relationshipsRoot) {
|
|
|
30
30
|
}
|
|
31
31
|
return `rId${max + 1}`;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const root =
|
|
33
|
+
function addRelationshipAtPath(pkg, relsPath, rel) {
|
|
34
|
+
const root = ensureRelationshipsRootAtPath(pkg, relsPath);
|
|
35
35
|
const id = allocateRelationshipId(root);
|
|
36
36
|
const attrs = {
|
|
37
37
|
Id: id,
|
|
@@ -42,5 +42,11 @@ function addRelationship(pkg, partPath, rel) {
|
|
|
42
42
|
root.children.push(el("Relationship", attrs));
|
|
43
43
|
return id;
|
|
44
44
|
}
|
|
45
|
+
function addRelationship(pkg, partPath, rel) {
|
|
46
|
+
return addRelationshipAtPath(pkg, relsPathFor(partPath), rel);
|
|
47
|
+
}
|
|
48
|
+
function addRootRelationship(pkg, rel) {
|
|
49
|
+
return addRelationshipAtPath(pkg, ROOT_RELS_PART_PATH, rel);
|
|
50
|
+
}
|
|
45
51
|
//#endregion
|
|
46
|
-
export { addRelationship };
|
|
52
|
+
export { addRelationship, addRootRelationship };
|
package/package.json
CHANGED