js.documents 1.101.2 → 1.102.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/markdown/render.cjs +170 -0
- package/dist/markdown/render.d.cts +27 -0
- package/dist/markdown/render.d.ts +27 -0
- package/dist/markdown/render.js +168 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,7 @@ const require_odf_odp_read = require("./odf/odp/read.cjs");
|
|
|
62
62
|
const require_odf_ods_read = require("./odf/ods/read.cjs");
|
|
63
63
|
const require_odf_odg_read = require("./odf/odg/read.cjs");
|
|
64
64
|
const require_markdown_text = require("./markdown/text.cjs");
|
|
65
|
+
const require_markdown_render = require("./markdown/render.cjs");
|
|
65
66
|
const require_layout_engine = require("./layout/engine.cjs");
|
|
66
67
|
const require_layout_slides = require("./layout/slides.cjs");
|
|
67
68
|
const require_ports_abort = require("./ports/abort.cjs");
|
|
@@ -381,6 +382,7 @@ exports.MarkdownBytesSchema = require_model_bytes.MarkdownBytesSchema;
|
|
|
381
382
|
exports.MarkdownEditor = require_edit_markdown_editor.MarkdownEditor;
|
|
382
383
|
exports.MarkdownList = require_edit_markdown_list.MarkdownList;
|
|
383
384
|
exports.MarkdownParagraph = require_edit_markdown_paragraph.MarkdownParagraph;
|
|
385
|
+
exports.MarkdownRenderDiagnosticCodes = require_markdown_render.MarkdownRenderDiagnosticCodes;
|
|
384
386
|
exports.MarkdownRun = require_edit_markdown_run.MarkdownRun;
|
|
385
387
|
exports.MarkdownTable = require_edit_markdown_table.MarkdownTable;
|
|
386
388
|
exports.MarkdownTableCell = require_edit_markdown_table.MarkdownTableCell;
|
|
@@ -967,6 +969,7 @@ exports.reconstructDrawing = require_layout_reconstruct.reconstructDrawing;
|
|
|
967
969
|
exports.reconstructPresentation = require_layout_reconstruct.reconstructPresentation;
|
|
968
970
|
exports.reconstructSpreadsheet = require_layout_reconstruct.reconstructSpreadsheet;
|
|
969
971
|
exports.reconstructWordprocessing = require_layout_reconstruct.reconstructWordprocessing;
|
|
972
|
+
exports.renderContentDocumentToMarkdown = require_markdown_render.renderContentDocumentToMarkdown;
|
|
970
973
|
exports.renderOdbReportContent = require_odb_report_render.renderOdbReportContent;
|
|
971
974
|
exports.resolveCompositionPlan = require_convert_composition.resolveCompositionPlan;
|
|
972
975
|
exports.resolveMetadataTimestamps = require_model_metadata.resolveMetadataTimestamps;
|
package/dist/index.d.cts
CHANGED
|
@@ -82,6 +82,7 @@ import { readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/rea
|
|
|
82
82
|
import { decodeMarkdownText, encodeMarkdownText } from "./markdown/text.cjs";
|
|
83
83
|
import { readMarkdownContent } from "./markdown/read.cjs";
|
|
84
84
|
import { buildMarkdownText } from "./markdown/write.cjs";
|
|
85
|
+
import { MarkdownRenderDiagnostic, MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, MarkdownRenderDiagnosticSeverity, MarkdownRenderDiagnosticSink, RenderMarkdownOptions, renderContentDocumentToMarkdown } from "./markdown/render.cjs";
|
|
85
86
|
import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.cjs";
|
|
86
87
|
import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.cjs";
|
|
87
88
|
import { resolveMetadataTimestamps } from "./model/metadata.cjs";
|
|
@@ -115,4 +116,4 @@ import { Alignment, Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, CellPosition, Cell
|
|
|
115
116
|
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, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, readXlsxContent, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
|
|
116
117
|
import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
|
|
117
118
|
import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
118
|
-
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 CellPosition, type CellRange, 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 CompositionHop, 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 ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, 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 FontFace, FontFaceParseError, 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, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, 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, type MetadataOverrides, 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, type OdbReportToDocxOptions, type OdbReportToOdtOptions, 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$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocumentMetadataOptions, 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 SetDocumentMetadataOptions, 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, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, 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, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
119
|
+
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 CellPosition, type CellRange, 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 CompositionHop, 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 ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, 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 FontFace, FontFaceParseError, 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, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, 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, type MetadataOverrides, 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, type OdbReportToDocxOptions, type OdbReportToOdtOptions, 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$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, 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 SetDocumentMetadataOptions, 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, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, 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, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ import { readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/rea
|
|
|
82
82
|
import { decodeMarkdownText, encodeMarkdownText } from "./markdown/text.js";
|
|
83
83
|
import { readMarkdownContent } from "./markdown/read.js";
|
|
84
84
|
import { buildMarkdownText } from "./markdown/write.js";
|
|
85
|
+
import { MarkdownRenderDiagnostic, MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, MarkdownRenderDiagnosticSeverity, MarkdownRenderDiagnosticSink, RenderMarkdownOptions, renderContentDocumentToMarkdown } from "./markdown/render.js";
|
|
85
86
|
import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.js";
|
|
86
87
|
import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.js";
|
|
87
88
|
import { resolveMetadataTimestamps } from "./model/metadata.js";
|
|
@@ -115,4 +116,4 @@ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, Comm
|
|
|
115
116
|
import { Alignment, Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color as LayoutColor, 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, DEFAULT_LAYOUT_FONT, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, FontFace, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, Margins, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PositionedFormula, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
|
|
116
117
|
import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
117
118
|
import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
|
|
118
|
-
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 CellPosition, type CellRange, 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 CompositionHop, 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 ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, 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 FontFace, FontFaceParseError, 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, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, 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, type MetadataOverrides, 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, type OdbReportToDocxOptions, type OdbReportToOdtOptions, 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$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocumentMetadataOptions, 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 SetDocumentMetadataOptions, 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, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, 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, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
119
|
+
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 CellPosition, type CellRange, 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 CompositionHop, 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 ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, 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 FontFace, FontFaceParseError, 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, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, 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, type MetadataOverrides, 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, type OdbReportToDocxOptions, type OdbReportToOdtOptions, 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$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, 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 SetDocumentMetadataOptions, 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, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, 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, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
package/dist/index.js
CHANGED
|
@@ -61,6 +61,7 @@ import { readOdpContent } from "./odf/odp/read.js";
|
|
|
61
61
|
import { readOdsContent } from "./odf/ods/read.js";
|
|
62
62
|
import { readOdgContent } from "./odf/odg/read.js";
|
|
63
63
|
import { decodeMarkdownText, encodeMarkdownText } from "./markdown/text.js";
|
|
64
|
+
import { MarkdownRenderDiagnosticCodes, renderContentDocumentToMarkdown } from "./markdown/render.js";
|
|
64
65
|
import { convertWordprocessingToLayout } from "./layout/engine.js";
|
|
65
66
|
import { convertPresentationToLayout } from "./layout/slides.js";
|
|
66
67
|
import { throwIfAborted } from "./ports/abort.js";
|
|
@@ -107,4 +108,4 @@ import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema,
|
|
|
107
108
|
import { COLOR_BLACK, 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, DEFAULT_LAYOUT_FONT, DocumentPackageSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
|
|
108
109
|
import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
109
110
|
import { FontFaceParseError, NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
|
|
110
|
-
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, DOCUMENT_FORMATS, DefinedNameSchema, DocumentFormatSchema, 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, FontFaceParseError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, MarkdownEditor, MarkdownList, MarkdownParagraph, MarkdownRun, MarkdownTable, MarkdownTableCell, MarkdownTableRow, 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, PdfEditor, PdfEllipseItem, PdfEncryptedError, PdfImageItem, PdfLineItem, PdfLinkItem, PdfPage, PdfParseError, PdfPathItem, PdfRectItem, PdfTextItem, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
111
|
+
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, DOCUMENT_FORMATS, DefinedNameSchema, DocumentFormatSchema, 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, FontFaceParseError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, MarkdownEditor, MarkdownList, MarkdownParagraph, MarkdownRenderDiagnosticCodes, MarkdownRun, MarkdownTable, MarkdownTableCell, MarkdownTableRow, 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, PdfEditor, PdfEllipseItem, PdfEncryptedError, PdfImageItem, PdfLineItem, PdfLinkItem, PdfPage, PdfParseError, PdfPathItem, PdfRectItem, PdfTextItem, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeDocumentPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, 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, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_model_formula = require("../model/formula.cjs");
|
|
3
|
+
const require_markdown_write = require("./write.cjs");
|
|
4
|
+
let document_schema_js = require("document-schema.js");
|
|
5
|
+
let markdown_codec = require("markdown-codec");
|
|
6
|
+
//#region src/markdown/render.ts
|
|
7
|
+
const MarkdownRenderDiagnosticCodes = {
|
|
8
|
+
PRESENTATION_SLIDE_AS_HEADING: "markdown-render/presentation-slide-as-heading",
|
|
9
|
+
PRESENTATION_NOTES_DROPPED: "markdown-render/presentation-notes-dropped",
|
|
10
|
+
SPREADSHEET_SHEET_AS_TABLE: "markdown-render/spreadsheet-sheet-as-table",
|
|
11
|
+
SPREADSHEET_HIDDEN_CELLS_DROPPED: "markdown-render/spreadsheet-hidden-cells-dropped",
|
|
12
|
+
SPREADSHEET_ANCHORED_CONTENT_DROPPED: "markdown-render/spreadsheet-anchored-content-dropped",
|
|
13
|
+
DRAWING_PAGE_AS_HEADING: "markdown-render/drawing-page-as-heading",
|
|
14
|
+
DRAWING_VECTORS_DROPPED: "markdown-render/drawing-vectors-dropped",
|
|
15
|
+
FORMULA_AS_PLACEHOLDER: "markdown-render/formula-as-placeholder"
|
|
16
|
+
};
|
|
17
|
+
const NOOP_RENDER_DIAGNOSTIC_SINK = () => {};
|
|
18
|
+
const SYNTHETIC_MARGINS = {
|
|
19
|
+
topPt: 72,
|
|
20
|
+
rightPt: 72,
|
|
21
|
+
bottomPt: 72,
|
|
22
|
+
leftPt: 72
|
|
23
|
+
};
|
|
24
|
+
const DEFAULT_COLUMN_WIDTH_PT = 72;
|
|
25
|
+
function headingParagraph(level, text) {
|
|
26
|
+
return {
|
|
27
|
+
kind: "paragraph",
|
|
28
|
+
styleId: (0, markdown_codec.headingStyleId)(level),
|
|
29
|
+
runs: [{ text }]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function textParagraph(text) {
|
|
33
|
+
return {
|
|
34
|
+
kind: "paragraph",
|
|
35
|
+
runs: [{ text }]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function wrapAsWordprocessing(metadata, blocks) {
|
|
39
|
+
return {
|
|
40
|
+
kind: "wordprocessing",
|
|
41
|
+
formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
|
|
42
|
+
metadata,
|
|
43
|
+
sections: [{
|
|
44
|
+
pageSize: document_schema_js.PAGE_SIZE_A4,
|
|
45
|
+
margins: SYNTHETIC_MARGINS,
|
|
46
|
+
blocks: [...blocks]
|
|
47
|
+
}]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function presentationBlocks(document, sink) {
|
|
51
|
+
const blocks = [];
|
|
52
|
+
document.slides.forEach((slide, index) => {
|
|
53
|
+
const slideNumber = index + 1;
|
|
54
|
+
blocks.push(headingParagraph(2, `Slide ${String(slideNumber)}`));
|
|
55
|
+
sink({
|
|
56
|
+
severity: "info",
|
|
57
|
+
code: MarkdownRenderDiagnosticCodes.PRESENTATION_SLIDE_AS_HEADING,
|
|
58
|
+
message: `slide ${String(slideNumber)} of ${String(document.slides.length)} has no markdown section equivalent; its shapes are flattened in slide order under a level-2 "Slide ${String(slideNumber)}" heading`
|
|
59
|
+
});
|
|
60
|
+
for (const shape of slide.shapes) blocks.push(...shape.blocks);
|
|
61
|
+
if (slide.notes.trim().length > 0) sink({
|
|
62
|
+
severity: "info",
|
|
63
|
+
code: MarkdownRenderDiagnosticCodes.PRESENTATION_NOTES_DROPPED,
|
|
64
|
+
message: `slide ${String(slideNumber)}'s speaker notes have no markdown representation and were dropped`
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
return blocks;
|
|
68
|
+
}
|
|
69
|
+
function drawingBlocks(document, sink) {
|
|
70
|
+
const blocks = [];
|
|
71
|
+
document.pages.forEach((page, index) => {
|
|
72
|
+
const pageNumber = index + 1;
|
|
73
|
+
blocks.push(headingParagraph(2, `Page ${String(pageNumber)}`));
|
|
74
|
+
sink({
|
|
75
|
+
severity: "info",
|
|
76
|
+
code: MarkdownRenderDiagnosticCodes.DRAWING_PAGE_AS_HEADING,
|
|
77
|
+
message: `page ${String(pageNumber)} of ${String(document.pages.length)} has no markdown section equivalent; its text-carrying shapes are flattened in shape order under a level-2 "Page ${String(pageNumber)}" heading`
|
|
78
|
+
});
|
|
79
|
+
for (const shape of page.shapes) blocks.push(...shape.blocks);
|
|
80
|
+
if (page.vectors.length > 0) sink({
|
|
81
|
+
severity: "warning",
|
|
82
|
+
code: MarkdownRenderDiagnosticCodes.DRAWING_VECTORS_DROPPED,
|
|
83
|
+
message: `page ${String(pageNumber)} carries ${String(page.vectors.length)} vector primitive(s) (rect/ellipse/line/path) with no markdown representation; dropped`
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
return blocks;
|
|
87
|
+
}
|
|
88
|
+
function spreadsheetCellToTableCell(cell) {
|
|
89
|
+
if (cell === void 0) return { blocks: [textParagraph("")] };
|
|
90
|
+
return { blocks: [{
|
|
91
|
+
kind: "paragraph",
|
|
92
|
+
runs: cell.runs ?? [{ text: cell.displayText }],
|
|
93
|
+
alignment: cell.alignment
|
|
94
|
+
}] };
|
|
95
|
+
}
|
|
96
|
+
function sheetToTable(sheet, sink) {
|
|
97
|
+
const hiddenRows = new Set(sheet.rows.filter((row) => row.hidden === true).map((row) => row.index));
|
|
98
|
+
const hiddenColumns = new Set(sheet.columns.filter((column) => column.hidden === true).map((column) => column.index));
|
|
99
|
+
const cellByPosition = /* @__PURE__ */ new Map();
|
|
100
|
+
let maxRow = -1;
|
|
101
|
+
let maxColumn = -1;
|
|
102
|
+
for (const cell of sheet.cells) {
|
|
103
|
+
if (hiddenRows.has(cell.row) || hiddenColumns.has(cell.column)) continue;
|
|
104
|
+
cellByPosition.set(`${String(cell.row)}:${String(cell.column)}`, cell);
|
|
105
|
+
maxRow = Math.max(maxRow, cell.row);
|
|
106
|
+
maxColumn = Math.max(maxColumn, cell.column);
|
|
107
|
+
}
|
|
108
|
+
if (cellByPosition.size === 0) return;
|
|
109
|
+
if (hiddenRows.size > 0 || hiddenColumns.size > 0) sink({
|
|
110
|
+
severity: "info",
|
|
111
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_HIDDEN_CELLS_DROPPED,
|
|
112
|
+
message: `sheet "${sheet.name}" hides ${String(hiddenRows.size)} row(s) and ${String(hiddenColumns.size)} column(s); hidden rows/columns are excluded from the rendered table`
|
|
113
|
+
});
|
|
114
|
+
const visibleRows = [];
|
|
115
|
+
for (let row = 0; row <= maxRow; row += 1) if (!hiddenRows.has(row)) visibleRows.push(row);
|
|
116
|
+
const visibleColumns = [];
|
|
117
|
+
for (let column = 0; column <= maxColumn; column += 1) if (!hiddenColumns.has(column)) visibleColumns.push(column);
|
|
118
|
+
const columnWidthByIndex = new Map(sheet.columns.map((column) => [column.index, column.widthPt]));
|
|
119
|
+
const columnWidthsPt = visibleColumns.map((column) => columnWidthByIndex.get(column) ?? DEFAULT_COLUMN_WIDTH_PT);
|
|
120
|
+
const rows = visibleRows.map((row) => ({ cells: visibleColumns.map((column) => spreadsheetCellToTableCell(cellByPosition.get(`${String(row)}:${String(column)}`))) }));
|
|
121
|
+
sink({
|
|
122
|
+
severity: "info",
|
|
123
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_SHEET_AS_TABLE,
|
|
124
|
+
message: `sheet "${sheet.name}" flattened to a ${String(rows.length)}x${String(columnWidthsPt.length)} GFM table; its first row is rendered as the table header (a GFM table always has one, and a spreadsheet has no header/body distinction of its own)`
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
kind: "table",
|
|
128
|
+
rows,
|
|
129
|
+
columnWidthsPt
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function spreadsheetBlocks(document, sink) {
|
|
133
|
+
const blocks = [];
|
|
134
|
+
for (const sheet of document.sheets) {
|
|
135
|
+
blocks.push(headingParagraph(2, sheet.name));
|
|
136
|
+
const table = sheetToTable(sheet, sink);
|
|
137
|
+
blocks.push(table ?? textParagraph("_(empty sheet)_"));
|
|
138
|
+
const embeddedObjectCount = sheet.embeddedObjects?.length ?? 0;
|
|
139
|
+
if (sheet.images.length > 0 || embeddedObjectCount > 0) sink({
|
|
140
|
+
severity: "warning",
|
|
141
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_ANCHORED_CONTENT_DROPPED,
|
|
142
|
+
message: `sheet "${sheet.name}" carries ${String(sheet.images.length)} anchored image(s) and ${String(embeddedObjectCount)} embedded object(s) with no placement in a GFM table; dropped`
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return blocks;
|
|
146
|
+
}
|
|
147
|
+
function formulaBlocks(document, sink) {
|
|
148
|
+
sink({
|
|
149
|
+
severity: "warning",
|
|
150
|
+
code: MarkdownRenderDiagnosticCodes.FORMULA_AS_PLACEHOLDER,
|
|
151
|
+
message: "a standalone formula document has no markdown math construct; rendered as its own plain-text stand-in"
|
|
152
|
+
});
|
|
153
|
+
return [textParagraph(require_model_formula.formulaPlaceholderText(document.formula))];
|
|
154
|
+
}
|
|
155
|
+
function degradedBlocksFor(document, sink) {
|
|
156
|
+
switch (document.kind) {
|
|
157
|
+
case "presentation": return presentationBlocks(document, sink);
|
|
158
|
+
case "spreadsheet": return spreadsheetBlocks(document, sink);
|
|
159
|
+
case "drawing": return drawingBlocks(document, sink);
|
|
160
|
+
case "formula": return formulaBlocks(document, sink);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function renderContentDocumentToMarkdown(document, options) {
|
|
164
|
+
if (document.kind === "wordprocessing") return require_markdown_write.buildMarkdownText(document, options);
|
|
165
|
+
const blocks = degradedBlocksFor(document, options?.onDiagnostic ?? NOOP_RENDER_DIAGNOSTIC_SINK);
|
|
166
|
+
return require_markdown_write.buildMarkdownText(wrapAsWordprocessing(document.metadata, blocks), options);
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
exports.MarkdownRenderDiagnosticCodes = MarkdownRenderDiagnosticCodes;
|
|
170
|
+
exports.renderContentDocumentToMarkdown = renderContentDocumentToMarkdown;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ContentDocument } from "document-schema.js";
|
|
2
|
+
import { WriteMarkdownOptions } from "markdown-codec";
|
|
3
|
+
//#region src/markdown/render.d.ts
|
|
4
|
+
type MarkdownRenderDiagnosticSeverity = 'info' | 'warning';
|
|
5
|
+
declare const MarkdownRenderDiagnosticCodes: {
|
|
6
|
+
readonly PRESENTATION_SLIDE_AS_HEADING: "markdown-render/presentation-slide-as-heading";
|
|
7
|
+
readonly PRESENTATION_NOTES_DROPPED: "markdown-render/presentation-notes-dropped";
|
|
8
|
+
readonly SPREADSHEET_SHEET_AS_TABLE: "markdown-render/spreadsheet-sheet-as-table";
|
|
9
|
+
readonly SPREADSHEET_HIDDEN_CELLS_DROPPED: "markdown-render/spreadsheet-hidden-cells-dropped";
|
|
10
|
+
readonly SPREADSHEET_ANCHORED_CONTENT_DROPPED: "markdown-render/spreadsheet-anchored-content-dropped";
|
|
11
|
+
readonly DRAWING_PAGE_AS_HEADING: "markdown-render/drawing-page-as-heading";
|
|
12
|
+
readonly DRAWING_VECTORS_DROPPED: "markdown-render/drawing-vectors-dropped";
|
|
13
|
+
readonly FORMULA_AS_PLACEHOLDER: "markdown-render/formula-as-placeholder";
|
|
14
|
+
};
|
|
15
|
+
type MarkdownRenderDiagnosticCode = (typeof MarkdownRenderDiagnosticCodes)[keyof typeof MarkdownRenderDiagnosticCodes];
|
|
16
|
+
interface MarkdownRenderDiagnostic {
|
|
17
|
+
readonly code: MarkdownRenderDiagnosticCode;
|
|
18
|
+
readonly severity: MarkdownRenderDiagnosticSeverity;
|
|
19
|
+
readonly message: string;
|
|
20
|
+
}
|
|
21
|
+
type MarkdownRenderDiagnosticSink = (diagnostic: MarkdownRenderDiagnostic) => void;
|
|
22
|
+
interface RenderMarkdownOptions extends WriteMarkdownOptions {
|
|
23
|
+
readonly onDiagnostic?: MarkdownRenderDiagnosticSink;
|
|
24
|
+
}
|
|
25
|
+
declare function renderContentDocumentToMarkdown(document: ContentDocument, options?: RenderMarkdownOptions): string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { MarkdownRenderDiagnostic, MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, MarkdownRenderDiagnosticSeverity, MarkdownRenderDiagnosticSink, RenderMarkdownOptions, renderContentDocumentToMarkdown };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ContentDocument } from "document-schema.js";
|
|
2
|
+
import { WriteMarkdownOptions } from "markdown-codec";
|
|
3
|
+
//#region src/markdown/render.d.ts
|
|
4
|
+
type MarkdownRenderDiagnosticSeverity = 'info' | 'warning';
|
|
5
|
+
declare const MarkdownRenderDiagnosticCodes: {
|
|
6
|
+
readonly PRESENTATION_SLIDE_AS_HEADING: "markdown-render/presentation-slide-as-heading";
|
|
7
|
+
readonly PRESENTATION_NOTES_DROPPED: "markdown-render/presentation-notes-dropped";
|
|
8
|
+
readonly SPREADSHEET_SHEET_AS_TABLE: "markdown-render/spreadsheet-sheet-as-table";
|
|
9
|
+
readonly SPREADSHEET_HIDDEN_CELLS_DROPPED: "markdown-render/spreadsheet-hidden-cells-dropped";
|
|
10
|
+
readonly SPREADSHEET_ANCHORED_CONTENT_DROPPED: "markdown-render/spreadsheet-anchored-content-dropped";
|
|
11
|
+
readonly DRAWING_PAGE_AS_HEADING: "markdown-render/drawing-page-as-heading";
|
|
12
|
+
readonly DRAWING_VECTORS_DROPPED: "markdown-render/drawing-vectors-dropped";
|
|
13
|
+
readonly FORMULA_AS_PLACEHOLDER: "markdown-render/formula-as-placeholder";
|
|
14
|
+
};
|
|
15
|
+
type MarkdownRenderDiagnosticCode = (typeof MarkdownRenderDiagnosticCodes)[keyof typeof MarkdownRenderDiagnosticCodes];
|
|
16
|
+
interface MarkdownRenderDiagnostic {
|
|
17
|
+
readonly code: MarkdownRenderDiagnosticCode;
|
|
18
|
+
readonly severity: MarkdownRenderDiagnosticSeverity;
|
|
19
|
+
readonly message: string;
|
|
20
|
+
}
|
|
21
|
+
type MarkdownRenderDiagnosticSink = (diagnostic: MarkdownRenderDiagnostic) => void;
|
|
22
|
+
interface RenderMarkdownOptions extends WriteMarkdownOptions {
|
|
23
|
+
readonly onDiagnostic?: MarkdownRenderDiagnosticSink;
|
|
24
|
+
}
|
|
25
|
+
declare function renderContentDocumentToMarkdown(document: ContentDocument, options?: RenderMarkdownOptions): string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { MarkdownRenderDiagnostic, MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, MarkdownRenderDiagnosticSeverity, MarkdownRenderDiagnosticSink, RenderMarkdownOptions, renderContentDocumentToMarkdown };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { formulaPlaceholderText } from "../model/formula.js";
|
|
2
|
+
import { buildMarkdownText } from "./write.js";
|
|
3
|
+
import { CONTENT_FORMAT_VERSION, PAGE_SIZE_A4 } from "document-schema.js";
|
|
4
|
+
import { headingStyleId } from "markdown-codec";
|
|
5
|
+
//#region src/markdown/render.ts
|
|
6
|
+
const MarkdownRenderDiagnosticCodes = {
|
|
7
|
+
PRESENTATION_SLIDE_AS_HEADING: "markdown-render/presentation-slide-as-heading",
|
|
8
|
+
PRESENTATION_NOTES_DROPPED: "markdown-render/presentation-notes-dropped",
|
|
9
|
+
SPREADSHEET_SHEET_AS_TABLE: "markdown-render/spreadsheet-sheet-as-table",
|
|
10
|
+
SPREADSHEET_HIDDEN_CELLS_DROPPED: "markdown-render/spreadsheet-hidden-cells-dropped",
|
|
11
|
+
SPREADSHEET_ANCHORED_CONTENT_DROPPED: "markdown-render/spreadsheet-anchored-content-dropped",
|
|
12
|
+
DRAWING_PAGE_AS_HEADING: "markdown-render/drawing-page-as-heading",
|
|
13
|
+
DRAWING_VECTORS_DROPPED: "markdown-render/drawing-vectors-dropped",
|
|
14
|
+
FORMULA_AS_PLACEHOLDER: "markdown-render/formula-as-placeholder"
|
|
15
|
+
};
|
|
16
|
+
const NOOP_RENDER_DIAGNOSTIC_SINK = () => {};
|
|
17
|
+
const SYNTHETIC_MARGINS = {
|
|
18
|
+
topPt: 72,
|
|
19
|
+
rightPt: 72,
|
|
20
|
+
bottomPt: 72,
|
|
21
|
+
leftPt: 72
|
|
22
|
+
};
|
|
23
|
+
const DEFAULT_COLUMN_WIDTH_PT = 72;
|
|
24
|
+
function headingParagraph(level, text) {
|
|
25
|
+
return {
|
|
26
|
+
kind: "paragraph",
|
|
27
|
+
styleId: headingStyleId(level),
|
|
28
|
+
runs: [{ text }]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function textParagraph(text) {
|
|
32
|
+
return {
|
|
33
|
+
kind: "paragraph",
|
|
34
|
+
runs: [{ text }]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function wrapAsWordprocessing(metadata, blocks) {
|
|
38
|
+
return {
|
|
39
|
+
kind: "wordprocessing",
|
|
40
|
+
formatVersion: CONTENT_FORMAT_VERSION,
|
|
41
|
+
metadata,
|
|
42
|
+
sections: [{
|
|
43
|
+
pageSize: PAGE_SIZE_A4,
|
|
44
|
+
margins: SYNTHETIC_MARGINS,
|
|
45
|
+
blocks: [...blocks]
|
|
46
|
+
}]
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function presentationBlocks(document, sink) {
|
|
50
|
+
const blocks = [];
|
|
51
|
+
document.slides.forEach((slide, index) => {
|
|
52
|
+
const slideNumber = index + 1;
|
|
53
|
+
blocks.push(headingParagraph(2, `Slide ${String(slideNumber)}`));
|
|
54
|
+
sink({
|
|
55
|
+
severity: "info",
|
|
56
|
+
code: MarkdownRenderDiagnosticCodes.PRESENTATION_SLIDE_AS_HEADING,
|
|
57
|
+
message: `slide ${String(slideNumber)} of ${String(document.slides.length)} has no markdown section equivalent; its shapes are flattened in slide order under a level-2 "Slide ${String(slideNumber)}" heading`
|
|
58
|
+
});
|
|
59
|
+
for (const shape of slide.shapes) blocks.push(...shape.blocks);
|
|
60
|
+
if (slide.notes.trim().length > 0) sink({
|
|
61
|
+
severity: "info",
|
|
62
|
+
code: MarkdownRenderDiagnosticCodes.PRESENTATION_NOTES_DROPPED,
|
|
63
|
+
message: `slide ${String(slideNumber)}'s speaker notes have no markdown representation and were dropped`
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
return blocks;
|
|
67
|
+
}
|
|
68
|
+
function drawingBlocks(document, sink) {
|
|
69
|
+
const blocks = [];
|
|
70
|
+
document.pages.forEach((page, index) => {
|
|
71
|
+
const pageNumber = index + 1;
|
|
72
|
+
blocks.push(headingParagraph(2, `Page ${String(pageNumber)}`));
|
|
73
|
+
sink({
|
|
74
|
+
severity: "info",
|
|
75
|
+
code: MarkdownRenderDiagnosticCodes.DRAWING_PAGE_AS_HEADING,
|
|
76
|
+
message: `page ${String(pageNumber)} of ${String(document.pages.length)} has no markdown section equivalent; its text-carrying shapes are flattened in shape order under a level-2 "Page ${String(pageNumber)}" heading`
|
|
77
|
+
});
|
|
78
|
+
for (const shape of page.shapes) blocks.push(...shape.blocks);
|
|
79
|
+
if (page.vectors.length > 0) sink({
|
|
80
|
+
severity: "warning",
|
|
81
|
+
code: MarkdownRenderDiagnosticCodes.DRAWING_VECTORS_DROPPED,
|
|
82
|
+
message: `page ${String(pageNumber)} carries ${String(page.vectors.length)} vector primitive(s) (rect/ellipse/line/path) with no markdown representation; dropped`
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return blocks;
|
|
86
|
+
}
|
|
87
|
+
function spreadsheetCellToTableCell(cell) {
|
|
88
|
+
if (cell === void 0) return { blocks: [textParagraph("")] };
|
|
89
|
+
return { blocks: [{
|
|
90
|
+
kind: "paragraph",
|
|
91
|
+
runs: cell.runs ?? [{ text: cell.displayText }],
|
|
92
|
+
alignment: cell.alignment
|
|
93
|
+
}] };
|
|
94
|
+
}
|
|
95
|
+
function sheetToTable(sheet, sink) {
|
|
96
|
+
const hiddenRows = new Set(sheet.rows.filter((row) => row.hidden === true).map((row) => row.index));
|
|
97
|
+
const hiddenColumns = new Set(sheet.columns.filter((column) => column.hidden === true).map((column) => column.index));
|
|
98
|
+
const cellByPosition = /* @__PURE__ */ new Map();
|
|
99
|
+
let maxRow = -1;
|
|
100
|
+
let maxColumn = -1;
|
|
101
|
+
for (const cell of sheet.cells) {
|
|
102
|
+
if (hiddenRows.has(cell.row) || hiddenColumns.has(cell.column)) continue;
|
|
103
|
+
cellByPosition.set(`${String(cell.row)}:${String(cell.column)}`, cell);
|
|
104
|
+
maxRow = Math.max(maxRow, cell.row);
|
|
105
|
+
maxColumn = Math.max(maxColumn, cell.column);
|
|
106
|
+
}
|
|
107
|
+
if (cellByPosition.size === 0) return;
|
|
108
|
+
if (hiddenRows.size > 0 || hiddenColumns.size > 0) sink({
|
|
109
|
+
severity: "info",
|
|
110
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_HIDDEN_CELLS_DROPPED,
|
|
111
|
+
message: `sheet "${sheet.name}" hides ${String(hiddenRows.size)} row(s) and ${String(hiddenColumns.size)} column(s); hidden rows/columns are excluded from the rendered table`
|
|
112
|
+
});
|
|
113
|
+
const visibleRows = [];
|
|
114
|
+
for (let row = 0; row <= maxRow; row += 1) if (!hiddenRows.has(row)) visibleRows.push(row);
|
|
115
|
+
const visibleColumns = [];
|
|
116
|
+
for (let column = 0; column <= maxColumn; column += 1) if (!hiddenColumns.has(column)) visibleColumns.push(column);
|
|
117
|
+
const columnWidthByIndex = new Map(sheet.columns.map((column) => [column.index, column.widthPt]));
|
|
118
|
+
const columnWidthsPt = visibleColumns.map((column) => columnWidthByIndex.get(column) ?? DEFAULT_COLUMN_WIDTH_PT);
|
|
119
|
+
const rows = visibleRows.map((row) => ({ cells: visibleColumns.map((column) => spreadsheetCellToTableCell(cellByPosition.get(`${String(row)}:${String(column)}`))) }));
|
|
120
|
+
sink({
|
|
121
|
+
severity: "info",
|
|
122
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_SHEET_AS_TABLE,
|
|
123
|
+
message: `sheet "${sheet.name}" flattened to a ${String(rows.length)}x${String(columnWidthsPt.length)} GFM table; its first row is rendered as the table header (a GFM table always has one, and a spreadsheet has no header/body distinction of its own)`
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
kind: "table",
|
|
127
|
+
rows,
|
|
128
|
+
columnWidthsPt
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function spreadsheetBlocks(document, sink) {
|
|
132
|
+
const blocks = [];
|
|
133
|
+
for (const sheet of document.sheets) {
|
|
134
|
+
blocks.push(headingParagraph(2, sheet.name));
|
|
135
|
+
const table = sheetToTable(sheet, sink);
|
|
136
|
+
blocks.push(table ?? textParagraph("_(empty sheet)_"));
|
|
137
|
+
const embeddedObjectCount = sheet.embeddedObjects?.length ?? 0;
|
|
138
|
+
if (sheet.images.length > 0 || embeddedObjectCount > 0) sink({
|
|
139
|
+
severity: "warning",
|
|
140
|
+
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_ANCHORED_CONTENT_DROPPED,
|
|
141
|
+
message: `sheet "${sheet.name}" carries ${String(sheet.images.length)} anchored image(s) and ${String(embeddedObjectCount)} embedded object(s) with no placement in a GFM table; dropped`
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return blocks;
|
|
145
|
+
}
|
|
146
|
+
function formulaBlocks(document, sink) {
|
|
147
|
+
sink({
|
|
148
|
+
severity: "warning",
|
|
149
|
+
code: MarkdownRenderDiagnosticCodes.FORMULA_AS_PLACEHOLDER,
|
|
150
|
+
message: "a standalone formula document has no markdown math construct; rendered as its own plain-text stand-in"
|
|
151
|
+
});
|
|
152
|
+
return [textParagraph(formulaPlaceholderText(document.formula))];
|
|
153
|
+
}
|
|
154
|
+
function degradedBlocksFor(document, sink) {
|
|
155
|
+
switch (document.kind) {
|
|
156
|
+
case "presentation": return presentationBlocks(document, sink);
|
|
157
|
+
case "spreadsheet": return spreadsheetBlocks(document, sink);
|
|
158
|
+
case "drawing": return drawingBlocks(document, sink);
|
|
159
|
+
case "formula": return formulaBlocks(document, sink);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function renderContentDocumentToMarkdown(document, options) {
|
|
163
|
+
if (document.kind === "wordprocessing") return buildMarkdownText(document, options);
|
|
164
|
+
const blocks = degradedBlocksFor(document, options?.onDiagnostic ?? NOOP_RENDER_DIAGNOSTIC_SINK);
|
|
165
|
+
return buildMarkdownText(wrapAsWordprocessing(document.metadata, blocks), options);
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
export { MarkdownRenderDiagnosticCodes, renderContentDocumentToMarkdown };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.102.1",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"markdown-codec": "^1.4.2",
|
|
68
68
|
"odf.js": "^2.7.23",
|
|
69
69
|
"ooxml.js": "^2.11.31",
|
|
70
|
-
"pdf-codec": "^2.2.
|
|
70
|
+
"pdf-codec": "^2.2.34",
|
|
71
71
|
"zod": "^4.4.3"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|