document-content-model 7.11.4 → 7.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/schema-io.cjs +2 -2
- package/dist/schema-io.js +2 -2
- package/dist/table-grid.cjs +119 -0
- package/dist/table-grid.d.cts +66 -0
- package/dist/table-grid.d.ts +66 -0
- package/dist/table-grid.js +113 -0
- package/package.json +1 -1
- package/schemas/content-document.schema.json +16 -16
- package/schemas/document-tree.schema.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ const require_decompose = require("./decompose.cjs");
|
|
|
20
20
|
const require_flatten = require("./flatten.cjs");
|
|
21
21
|
const require_factor_styles = require("./factor-styles.cjs");
|
|
22
22
|
require("./font-port.cjs");
|
|
23
|
+
const require_table_grid = require("./table-grid.cjs");
|
|
23
24
|
require("./text-layout.cjs");
|
|
24
25
|
require("./math-layout.cjs");
|
|
25
26
|
exports.AlignmentSchema = require_style.AlignmentSchema;
|
|
@@ -205,6 +206,7 @@ exports.contentDocumentSharedFields = require_content.contentDocumentSharedField
|
|
|
205
206
|
exports.contentDocumentWithSchema = require_schema_io.contentDocumentWithSchema;
|
|
206
207
|
exports.dashedBorderWeightForWidthPt = require_border_weight.dashedBorderWeightForWidthPt;
|
|
207
208
|
exports.decompose = require_decompose.decompose;
|
|
209
|
+
exports.denseTableRows = require_table_grid.denseTableRows;
|
|
208
210
|
exports.documentFromJson = require_schema_io.documentFromJson;
|
|
209
211
|
exports.documentSchemaKindOf = require_schema_io.documentSchemaKindOf;
|
|
210
212
|
exports.documentTreeWithSchema = require_schema_io.documentTreeWithSchema;
|
|
@@ -234,9 +236,14 @@ exports.isTreeNode = require_package_node.isTreeNode;
|
|
|
234
236
|
exports.overlayStyleEntries = require_definitions.overlayStyleEntries;
|
|
235
237
|
exports.parseCellReference = require_a1.parseCellReference;
|
|
236
238
|
exports.parseRangeReference = require_a1.parseRangeReference;
|
|
239
|
+
exports.placeAnchorTableRows = require_table_grid.placeAnchorTableRows;
|
|
237
240
|
exports.rangeReference = require_a1.rangeReference;
|
|
238
241
|
exports.resolveCellFillColor = require_content.resolveCellFillColor;
|
|
239
242
|
exports.resolveStyleChain = require_definitions.resolveStyleChain;
|
|
240
243
|
exports.rgbHexToColor = require_color.rgbHexToColor;
|
|
241
244
|
exports.schemaUriFor = require_schema_io.schemaUriFor;
|
|
245
|
+
exports.tableCellColumnSpan = require_table_grid.tableCellColumnSpan;
|
|
246
|
+
exports.tableCellRowSpan = require_table_grid.tableCellRowSpan;
|
|
247
|
+
exports.tableGridColumnCount = require_table_grid.tableGridColumnCount;
|
|
242
248
|
exports.unrecognizedFillKind = require_content.unrecognizedFillKind;
|
|
249
|
+
exports.walkTableGrid = require_table_grid.walkTableGrid;
|
package/dist/index.d.cts
CHANGED
|
@@ -18,7 +18,8 @@ import { assembleTree, factorStyles } from "./factor-styles.cjs";
|
|
|
18
18
|
import { flattenTree } from "./flatten.cjs";
|
|
19
19
|
import { FontFace, FontRegistryOptions, FontSubstitution, ProvidedFont } from "./font-port.cjs";
|
|
20
20
|
import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.cjs";
|
|
21
|
+
import { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.cjs";
|
|
21
22
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.cjs";
|
|
22
23
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.cjs";
|
|
23
24
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.cjs";
|
|
24
|
-
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, BORDER_WIDTH_PT, BorderWeight, Box, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValue, EvaluationValueSchema, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FormulaBindings, FormulaBindingsSchema, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, IMAGE_FORMATS, ImageFormat, Interval, IntervalSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, Quantity, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SheetRuleOperator, SheetRuleOperatorSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextDirection, TextDirectionSchema, TextMeasurer, TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, TreeEmbeddedFont, TreeEmbeddedFontSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, unrecognizedFillKind };
|
|
25
|
+
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorTableRow, AnchorType, AnchorTypeSchema, BORDER_WIDTH_PT, BorderWeight, Box, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValue, EvaluationValueSchema, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FormulaBindings, FormulaBindingsSchema, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, IMAGE_FORMATS, ImageFormat, Interval, IntervalSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, PositionedTableCell, PositionedTableRow, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, Quantity, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SheetRuleOperator, SheetRuleOperatorSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TableGridAnchor, TableGridCovered, TableGridPosition, TextDirection, TextDirectionSchema, TextMeasurer, TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, TreeEmbeddedFont, TreeEmbeddedFontSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, denseTableRows, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, placeAnchorTableRows, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, unrecognizedFillKind, walkTableGrid };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ import { assembleTree, factorStyles } from "./factor-styles.js";
|
|
|
18
18
|
import { flattenTree } from "./flatten.js";
|
|
19
19
|
import { FontFace, FontRegistryOptions, FontSubstitution, ProvidedFont } from "./font-port.js";
|
|
20
20
|
import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.js";
|
|
21
|
+
import { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
|
|
21
22
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.js";
|
|
22
23
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.js";
|
|
23
24
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.js";
|
|
24
|
-
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, BORDER_WIDTH_PT, BorderWeight, Box, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValue, EvaluationValueSchema, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FormulaBindings, FormulaBindingsSchema, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, IMAGE_FORMATS, ImageFormat, Interval, IntervalSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, Quantity, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SheetRuleOperator, SheetRuleOperatorSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TextDirection, TextDirectionSchema, TextMeasurer, TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, TreeEmbeddedFont, TreeEmbeddedFontSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, unrecognizedFillKind };
|
|
25
|
+
export { Alignment, AlignmentSchema, AnchorDescriptor, AnchorDescriptorSchema, AnchorTableRow, AnchorType, AnchorTypeSchema, BORDER_WIDTH_PT, BorderWeight, Box, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CellPosition, CellRange, Color, ColorSchema, ConstructDescriptor, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalString, DecimalStringSchema, DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, DimensionVector, DimensionVectorSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValue, EvaluationValueSchema, ExactRational, ExactRationalSchema, FieldDescriptor, FieldDescriptorSchema, FontFace, FontRegistryOptions, FontSubstitution, FormulaBindings, FormulaBindingsSchema, FusedNode, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, IMAGE_FORMATS, ImageFormat, Interval, IntervalSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutMetadata, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathApp, MathAppSchema, MathAssembledGlyphs, MathBox, MathColor, MathExpression, MathExpressionSchema, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMatrix, MathMatrixSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathNormalisationContext, MathNormalisationContextSchema, MathNum, MathNumSchema, MathPresentation, MathPresentationSchema, MathProd, MathProdSchema, MathProvenance, MathProvenanceSchema, MathQty, MathQtySchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, PositionedTableCell, PositionedTableRow, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, ProvidedFont, Quantity, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SheetRuleOperator, SheetRuleOperatorSchema, SiBaseDimension, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StyledFragment, StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TableGridAnchor, TableGridCovered, TableGridPosition, TextDirection, TextDirectionSchema, TextMeasurer, TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, TreeEmbeddedFont, TreeEmbeddedFontSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, denseTableRows, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, placeAnchorTableRows, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, unrecognizedFillKind, walkTableGrid };
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ import { ConstructMarkerImbalanceError, decompose } from "./decompose.js";
|
|
|
19
19
|
import { flattenTree } from "./flatten.js";
|
|
20
20
|
import { assembleTree, factorStyles } from "./factor-styles.js";
|
|
21
21
|
import "./font-port.js";
|
|
22
|
+
import { denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
|
|
22
23
|
import "./text-layout.js";
|
|
23
24
|
import "./math-layout.js";
|
|
24
|
-
export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BORDER_WIDTH_PT, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, ColorSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBitmapFillSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellFillSchema, ContentCellPatternTypeSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDefinedNameSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFillPatternSchema, ContentFloatAlignSchema, ContentFloatAxisSchema, ContentFloatOriginSchema, ContentFloatPositionSchema, ContentFontSchema, ContentFormulaSchema, ContentGradientFillSchema, ContentGradientStyleSchema, ContentHatchFillSchema, ContentHatchStyleSchema, ContentImageBlockSchema, ContentImageOriginalSchema, ContentInterpretationSchema, ContentListMembershipSchema, ContentOriginSchema, ContentPageBreakSchema, ContentPageFurnitureSchema, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidationSchema, ContentSheetDataValidationTypeSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRangeSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentTranscriptSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalStringSchema, DefinitionEntrySchema, DefinitionsTableSchema, DimensionVectorSchema, DivisionDescriptorSchema, DivisionSourceSchema, DocumentPackageRenamedError, DocumentTreeSchema, DrawPageDescriptorSchema, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValueSchema, ExactRationalSchema, FieldDescriptorSchema, FormulaBindingsSchema, HeadingGroupSchema, HeadingParagraphSchema, IMAGE_FORMATS, IntervalSchema, LayoutFontSchema, LayoutFrameSchema, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, ListParagraphSchema, MAX_SAFE_INTEGER, MarginsSchema, MathAppSchema, MathExpressionSchema, MathMatrixSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, MathNormalisationContextSchema, MathNumSchema, MathPresentationSchema, MathProdSchema, MathProvenanceSchema, MathQtySchema, MathSumSchema, MathSymSchema, MathSymbolEntrySchema, MathUncertaintySchema, MathUnitSchema, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtentSchema, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SheetRuleOperatorSchema, SlideDescriptorSchema, SlideGroupSchema, SourceFormatSchema, SourceResidueSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, SymbolTableSchema, TextDirectionSchema, TreeBlockLeafSchema, TreeEmbeddedFontSchema, TreeGroupSchema, TreeLeafSchema, TreeNodeSchema, UnrecognizedDocumentSchemaError, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, unrecognizedFillKind };
|
|
25
|
+
export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BORDER_WIDTH_PT, BoxSchema, COLOR_BLACK, CONTENT_ANNOTATION_FIELDS, CONTENT_DEFS, CONTENT_DOCUMENT_URI, ColorSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBitmapFillSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellFillSchema, ContentCellPatternTypeSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDefinedNameSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFillPatternSchema, ContentFloatAlignSchema, ContentFloatAxisSchema, ContentFloatOriginSchema, ContentFloatPositionSchema, ContentFontSchema, ContentFormulaSchema, ContentGradientFillSchema, ContentGradientStyleSchema, ContentHatchFillSchema, ContentHatchStyleSchema, ContentImageBlockSchema, ContentImageOriginalSchema, ContentInterpretationSchema, ContentListMembershipSchema, ContentOriginSchema, ContentPageBreakSchema, ContentPageFurnitureSchema, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidationSchema, ContentSheetDataValidationTypeSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRangeSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentTranscriptSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DecimalStringSchema, DefinitionEntrySchema, DefinitionsTableSchema, DimensionVectorSchema, DivisionDescriptorSchema, DivisionSourceSchema, DocumentPackageRenamedError, DocumentTreeSchema, DrawPageDescriptorSchema, DrawPageGroupSchema, EMBEDDED_OBJECT_KINDS, EvaluationValueSchema, ExactRationalSchema, FieldDescriptorSchema, FormulaBindingsSchema, HeadingGroupSchema, HeadingParagraphSchema, IMAGE_FORMATS, IntervalSchema, LayoutFontSchema, LayoutFrameSchema, LayoutMetadataSchema, LayoutSchemaDemotedError, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, ListParagraphSchema, MAX_SAFE_INTEGER, MarginsSchema, MathAppSchema, MathExpressionSchema, MathMatrixSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, MathNormalisationContextSchema, MathNumSchema, MathPresentationSchema, MathProdSchema, MathProvenanceSchema, MathQtySchema, MathSumSchema, MathSymSchema, MathSymbolEntrySchema, MathUncertaintySchema, MathUnitSchema, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, QuantitySchema, RUN_FONT_PROPERTY_SHAPE, RunConstructExtentSchema, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SchemaVersionMismatchError, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SheetRuleOperatorSchema, SlideDescriptorSchema, SlideGroupSchema, SourceFormatSchema, SourceResidueSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, SymbolTableSchema, TextDirectionSchema, TreeBlockLeafSchema, TreeEmbeddedFontSchema, TreeGroupSchema, TreeLeafSchema, TreeNodeSchema, UnrecognizedDocumentSchemaError, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, denseTableRows, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isMathExpression, isMathMlNode, isRunConstructExtent, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, parseCellReference, parseRangeReference, placeAnchorTableRows, rangeReference, resolveCellFillColor, resolveStyleChain, rgbHexToColor, schemaUriFor, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, unrecognizedFillKind, walkTableGrid };
|
package/dist/schema-io.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const SCHEMA_FILE_NAMES = {
|
|
|
7
7
|
ContentDocument: "content-document.schema.json"
|
|
8
8
|
};
|
|
9
9
|
function schemaUriFor(kind) {
|
|
10
|
-
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
10
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
11
11
|
}
|
|
12
12
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
|
|
13
13
|
function parseSchemaUri(uri) {
|
|
@@ -102,7 +102,7 @@ function documentFromJson(value) {
|
|
|
102
102
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
103
103
|
const kind = kindForFileStem(parts.stem);
|
|
104
104
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
105
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.
|
|
105
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.12.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.12.0");
|
|
106
106
|
switch (kind) {
|
|
107
107
|
case "DocumentTree": return {
|
|
108
108
|
kind,
|
package/dist/schema-io.js
CHANGED
|
@@ -6,7 +6,7 @@ const SCHEMA_FILE_NAMES = {
|
|
|
6
6
|
ContentDocument: "content-document.schema.json"
|
|
7
7
|
};
|
|
8
8
|
function schemaUriFor(kind) {
|
|
9
|
-
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
9
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
10
10
|
}
|
|
11
11
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
|
|
12
12
|
function parseSchemaUri(uri) {
|
|
@@ -101,7 +101,7 @@ function documentFromJson(value) {
|
|
|
101
101
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
102
102
|
const kind = kindForFileStem(parts.stem);
|
|
103
103
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
104
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.
|
|
104
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.12.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.12.0");
|
|
105
105
|
switch (kind) {
|
|
106
106
|
case "DocumentTree": return {
|
|
107
107
|
kind,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/table-grid.ts
|
|
3
|
+
/** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
|
|
4
|
+
function tableCellColumnSpan(cell) {
|
|
5
|
+
return cell.colSpan ?? 1;
|
|
6
|
+
}
|
|
7
|
+
/** The number of grid rows a cell occupies; an absent `rowSpan` means the cell occupies its own row only. */
|
|
8
|
+
function tableCellRowSpan(cell) {
|
|
9
|
+
return cell.rowSpan ?? 1;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The table's grid width. For a table obeying the dense rule this is `columnWidthsPt.length` and every row's `cells.length` alike; taking the largest of them is what lets a reader mid-construction, or a table whose source declared a grid narrower than a row actually uses, still be walked without the walk inventing a narrower grid than the rows occupy.
|
|
13
|
+
*/
|
|
14
|
+
function tableGridColumnCount(table) {
|
|
15
|
+
let count = table.columnWidthsPt.length;
|
|
16
|
+
for (const row of table.rows) count = Math.max(count, row.cells.length);
|
|
17
|
+
return count;
|
|
18
|
+
}
|
|
19
|
+
function coveringAnchor(anchors, rowIndex, columnIndex) {
|
|
20
|
+
for (const anchor of anchors) if (rowIndex < anchor.rowEnd && anchor.column <= columnIndex && columnIndex < anchor.columnEnd) return anchor;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
24
|
+
*
|
|
25
|
+
* This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
|
|
26
|
+
*/
|
|
27
|
+
function walkTableGrid(table) {
|
|
28
|
+
const anchors = [];
|
|
29
|
+
return table.rows.map((row, rowIndex) => row.cells.map((cell, columnIndex) => {
|
|
30
|
+
const anchor = coveringAnchor(anchors, rowIndex, columnIndex);
|
|
31
|
+
if (anchor !== void 0) return {
|
|
32
|
+
rowIndex,
|
|
33
|
+
columnIndex,
|
|
34
|
+
cell,
|
|
35
|
+
anchorRowIndex: anchor.row,
|
|
36
|
+
anchorColumnIndex: anchor.column
|
|
37
|
+
};
|
|
38
|
+
anchors.push({
|
|
39
|
+
row: rowIndex,
|
|
40
|
+
column: columnIndex,
|
|
41
|
+
rowEnd: rowIndex + tableCellRowSpan(cell),
|
|
42
|
+
columnEnd: columnIndex + tableCellColumnSpan(cell)
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
rowIndex,
|
|
46
|
+
columnIndex,
|
|
47
|
+
cell
|
|
48
|
+
};
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
function placedGridWidth(rows, columnCount) {
|
|
52
|
+
let width = columnCount;
|
|
53
|
+
for (const row of rows) for (const { columnIndex, cell } of row.cells) width = Math.max(width, columnIndex + tableCellColumnSpan(cell));
|
|
54
|
+
return width;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
|
|
58
|
+
*
|
|
59
|
+
* `columnCount` is the grid width the source declared (a docx `w:tblGrid`, an ODF `table:table-column` run). The result is that wide, or wider if some row places a cell past it, so that every returned row has the same length whatever the source's own grid declaration said.
|
|
60
|
+
*/
|
|
61
|
+
function denseTableRows(rows, columnCount) {
|
|
62
|
+
const width = placedGridWidth(rows, columnCount);
|
|
63
|
+
return rows.map((row) => {
|
|
64
|
+
const cells = Array.from({ length: width }, () => ({ blocks: [] }));
|
|
65
|
+
for (const { columnIndex, cell } of row.cells) cells[columnIndex] = cell;
|
|
66
|
+
return {
|
|
67
|
+
...row,
|
|
68
|
+
cells
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function occupiedColumns(occupied, rowIndex) {
|
|
73
|
+
const existing = occupied.get(rowIndex);
|
|
74
|
+
if (existing !== void 0) return existing;
|
|
75
|
+
const created = /* @__PURE__ */ new Set();
|
|
76
|
+
occupied.set(rowIndex, created);
|
|
77
|
+
return created;
|
|
78
|
+
}
|
|
79
|
+
function positionAnchorRows(rows) {
|
|
80
|
+
const occupied = /* @__PURE__ */ new Map();
|
|
81
|
+
return rows.map((row, rowIndex) => {
|
|
82
|
+
const taken = occupiedColumns(occupied, rowIndex);
|
|
83
|
+
let column = 0;
|
|
84
|
+
const cells = row.cells.map((cell) => {
|
|
85
|
+
while (taken.has(column)) column++;
|
|
86
|
+
const lastRow = rowIndex + tableCellRowSpan(cell);
|
|
87
|
+
const lastColumn = column + tableCellColumnSpan(cell);
|
|
88
|
+
for (let r = rowIndex; r < lastRow; r++) {
|
|
89
|
+
const rowTaken = occupiedColumns(occupied, r);
|
|
90
|
+
for (let c = column; c < lastColumn; c++) rowTaken.add(c);
|
|
91
|
+
}
|
|
92
|
+
const positioned = {
|
|
93
|
+
columnIndex: column,
|
|
94
|
+
cell
|
|
95
|
+
};
|
|
96
|
+
column = lastColumn;
|
|
97
|
+
return positioned;
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
...row,
|
|
101
|
+
cells
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
|
|
107
|
+
*
|
|
108
|
+
* `columnCount` is the grid width the source declared, where it declares one at all; pass 0 when it does not and the width follows from the placement.
|
|
109
|
+
*/
|
|
110
|
+
function placeAnchorTableRows(rows, columnCount) {
|
|
111
|
+
return denseTableRows(positionAnchorRows(rows), columnCount);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
exports.denseTableRows = denseTableRows;
|
|
115
|
+
exports.placeAnchorTableRows = placeAnchorTableRows;
|
|
116
|
+
exports.tableCellColumnSpan = tableCellColumnSpan;
|
|
117
|
+
exports.tableCellRowSpan = tableCellRowSpan;
|
|
118
|
+
exports.tableGridColumnCount = tableGridColumnCount;
|
|
119
|
+
exports.walkTableGrid = walkTableGrid;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { o as TextDirection } from "./style-BGMcYrD2.cjs";
|
|
2
|
+
import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-zNNPbwYY.cjs";
|
|
3
|
+
//#region src/table-grid.d.ts
|
|
4
|
+
/** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
|
|
5
|
+
declare function tableCellColumnSpan(cell: ContentTableCell): number;
|
|
6
|
+
/** The number of grid rows a cell occupies; an absent `rowSpan` means the cell occupies its own row only. */
|
|
7
|
+
declare function tableCellRowSpan(cell: ContentTableCell): number;
|
|
8
|
+
/**
|
|
9
|
+
* The table's grid width. For a table obeying the dense rule this is `columnWidthsPt.length` and every row's `cells.length` alike; taking the largest of them is what lets a reader mid-construction, or a table whose source declared a grid narrower than a row actually uses, still be walked without the walk inventing a narrower grid than the rows occupy.
|
|
10
|
+
*/
|
|
11
|
+
declare function tableGridColumnCount(table: ContentTable): number;
|
|
12
|
+
/** A grid position holding a merged region's anchor, or an unmerged cell (which is its own one-position region's anchor). */
|
|
13
|
+
interface TableGridAnchor {
|
|
14
|
+
readonly rowIndex: number;
|
|
15
|
+
readonly columnIndex: number;
|
|
16
|
+
readonly cell: ContentTableCell;
|
|
17
|
+
readonly anchorRowIndex?: never;
|
|
18
|
+
readonly anchorColumnIndex?: never;
|
|
19
|
+
}
|
|
20
|
+
/** A grid position covered by a merged region anchored elsewhere. `anchorRowIndex < rowIndex` means the region reaches this position vertically; `anchorRowIndex === rowIndex` means it reaches it horizontally along this same row. */
|
|
21
|
+
interface TableGridCovered {
|
|
22
|
+
readonly rowIndex: number;
|
|
23
|
+
readonly columnIndex: number;
|
|
24
|
+
readonly cell: ContentTableCell;
|
|
25
|
+
readonly anchorRowIndex: number;
|
|
26
|
+
readonly anchorColumnIndex: number;
|
|
27
|
+
}
|
|
28
|
+
/** Discriminated by the presence of the anchor coordinates rather than by a tag field, since the two shapes' required fields are already mutually exclusive: `"anchorRowIndex" in position` narrows to the covered branch. */
|
|
29
|
+
type TableGridPosition = TableGridAnchor | TableGridCovered;
|
|
30
|
+
/**
|
|
31
|
+
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
32
|
+
*
|
|
33
|
+
* This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
|
|
34
|
+
*/
|
|
35
|
+
declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
|
|
36
|
+
/** A cell together with the grid column it starts at, for a reader whose source format states that column directly. */
|
|
37
|
+
interface PositionedTableCell {
|
|
38
|
+
readonly columnIndex: number;
|
|
39
|
+
readonly cell: ContentTableCell;
|
|
40
|
+
}
|
|
41
|
+
/** One row's worth of positioned cells, carrying the row-level properties denseTableRows copies through unchanged. */
|
|
42
|
+
interface PositionedTableRow {
|
|
43
|
+
readonly cells: readonly PositionedTableCell[];
|
|
44
|
+
readonly heightPt?: number;
|
|
45
|
+
readonly direction?: TextDirection;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
|
|
49
|
+
*
|
|
50
|
+
* `columnCount` is the grid width the source declared (a docx `w:tblGrid`, an ODF `table:table-column` run). The result is that wide, or wider if some row places a cell past it, so that every returned row has the same length whatever the source's own grid declaration said.
|
|
51
|
+
*/
|
|
52
|
+
declare function denseTableRows(rows: readonly PositionedTableRow[], columnCount: number): ContentTableRow[];
|
|
53
|
+
/** One row's worth of anchor cells only, for a reader whose source format omits covered positions entirely and leaves their grid columns to be worked out from the spans around them. */
|
|
54
|
+
interface AnchorTableRow {
|
|
55
|
+
readonly cells: readonly ContentTableCell[];
|
|
56
|
+
readonly heightPt?: number;
|
|
57
|
+
readonly direction?: TextDirection;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
|
|
61
|
+
*
|
|
62
|
+
* `columnCount` is the grid width the source declared, where it declares one at all; pass 0 when it does not and the width follows from the placement.
|
|
63
|
+
*/
|
|
64
|
+
declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
|
|
65
|
+
//#endregion
|
|
66
|
+
export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { o as TextDirection } from "./style-BGMcYrD2.js";
|
|
2
|
+
import { _n as ContentTableRow, hn as ContentTableCell, mn as ContentTable } from "./content-GHj_31uQ.js";
|
|
3
|
+
//#region src/table-grid.d.ts
|
|
4
|
+
/** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
|
|
5
|
+
declare function tableCellColumnSpan(cell: ContentTableCell): number;
|
|
6
|
+
/** The number of grid rows a cell occupies; an absent `rowSpan` means the cell occupies its own row only. */
|
|
7
|
+
declare function tableCellRowSpan(cell: ContentTableCell): number;
|
|
8
|
+
/**
|
|
9
|
+
* The table's grid width. For a table obeying the dense rule this is `columnWidthsPt.length` and every row's `cells.length` alike; taking the largest of them is what lets a reader mid-construction, or a table whose source declared a grid narrower than a row actually uses, still be walked without the walk inventing a narrower grid than the rows occupy.
|
|
10
|
+
*/
|
|
11
|
+
declare function tableGridColumnCount(table: ContentTable): number;
|
|
12
|
+
/** A grid position holding a merged region's anchor, or an unmerged cell (which is its own one-position region's anchor). */
|
|
13
|
+
interface TableGridAnchor {
|
|
14
|
+
readonly rowIndex: number;
|
|
15
|
+
readonly columnIndex: number;
|
|
16
|
+
readonly cell: ContentTableCell;
|
|
17
|
+
readonly anchorRowIndex?: never;
|
|
18
|
+
readonly anchorColumnIndex?: never;
|
|
19
|
+
}
|
|
20
|
+
/** A grid position covered by a merged region anchored elsewhere. `anchorRowIndex < rowIndex` means the region reaches this position vertically; `anchorRowIndex === rowIndex` means it reaches it horizontally along this same row. */
|
|
21
|
+
interface TableGridCovered {
|
|
22
|
+
readonly rowIndex: number;
|
|
23
|
+
readonly columnIndex: number;
|
|
24
|
+
readonly cell: ContentTableCell;
|
|
25
|
+
readonly anchorRowIndex: number;
|
|
26
|
+
readonly anchorColumnIndex: number;
|
|
27
|
+
}
|
|
28
|
+
/** Discriminated by the presence of the anchor coordinates rather than by a tag field, since the two shapes' required fields are already mutually exclusive: `"anchorRowIndex" in position` narrows to the covered branch. */
|
|
29
|
+
type TableGridPosition = TableGridAnchor | TableGridCovered;
|
|
30
|
+
/**
|
|
31
|
+
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
32
|
+
*
|
|
33
|
+
* This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
|
|
34
|
+
*/
|
|
35
|
+
declare function walkTableGrid(table: ContentTable): TableGridPosition[][];
|
|
36
|
+
/** A cell together with the grid column it starts at, for a reader whose source format states that column directly. */
|
|
37
|
+
interface PositionedTableCell {
|
|
38
|
+
readonly columnIndex: number;
|
|
39
|
+
readonly cell: ContentTableCell;
|
|
40
|
+
}
|
|
41
|
+
/** One row's worth of positioned cells, carrying the row-level properties denseTableRows copies through unchanged. */
|
|
42
|
+
interface PositionedTableRow {
|
|
43
|
+
readonly cells: readonly PositionedTableCell[];
|
|
44
|
+
readonly heightPt?: number;
|
|
45
|
+
readonly direction?: TextDirection;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
|
|
49
|
+
*
|
|
50
|
+
* `columnCount` is the grid width the source declared (a docx `w:tblGrid`, an ODF `table:table-column` run). The result is that wide, or wider if some row places a cell past it, so that every returned row has the same length whatever the source's own grid declaration said.
|
|
51
|
+
*/
|
|
52
|
+
declare function denseTableRows(rows: readonly PositionedTableRow[], columnCount: number): ContentTableRow[];
|
|
53
|
+
/** One row's worth of anchor cells only, for a reader whose source format omits covered positions entirely and leaves their grid columns to be worked out from the spans around them. */
|
|
54
|
+
interface AnchorTableRow {
|
|
55
|
+
readonly cells: readonly ContentTableCell[];
|
|
56
|
+
readonly heightPt?: number;
|
|
57
|
+
readonly direction?: TextDirection;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
|
|
61
|
+
*
|
|
62
|
+
* `columnCount` is the grid width the source declared, where it declares one at all; pass 0 when it does not and the width follows from the placement.
|
|
63
|
+
*/
|
|
64
|
+
declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
|
|
65
|
+
//#endregion
|
|
66
|
+
export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridPosition, denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
//#region src/table-grid.ts
|
|
2
|
+
/** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
|
|
3
|
+
function tableCellColumnSpan(cell) {
|
|
4
|
+
return cell.colSpan ?? 1;
|
|
5
|
+
}
|
|
6
|
+
/** The number of grid rows a cell occupies; an absent `rowSpan` means the cell occupies its own row only. */
|
|
7
|
+
function tableCellRowSpan(cell) {
|
|
8
|
+
return cell.rowSpan ?? 1;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The table's grid width. For a table obeying the dense rule this is `columnWidthsPt.length` and every row's `cells.length` alike; taking the largest of them is what lets a reader mid-construction, or a table whose source declared a grid narrower than a row actually uses, still be walked without the walk inventing a narrower grid than the rows occupy.
|
|
12
|
+
*/
|
|
13
|
+
function tableGridColumnCount(table) {
|
|
14
|
+
let count = table.columnWidthsPt.length;
|
|
15
|
+
for (const row of table.rows) count = Math.max(count, row.cells.length);
|
|
16
|
+
return count;
|
|
17
|
+
}
|
|
18
|
+
function coveringAnchor(anchors, rowIndex, columnIndex) {
|
|
19
|
+
for (const anchor of anchors) if (rowIndex < anchor.rowEnd && anchor.column <= columnIndex && columnIndex < anchor.columnEnd) return anchor;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Classify every entry of every row as an anchor or as covered, in row-major order, one inner array per table row.
|
|
23
|
+
*
|
|
24
|
+
* This is the walk a consumer runs instead of accumulating spans itself. A writer targeting a format that stores only anchors (HTML's `<td colspan>`, a docx `w:tc` with `w:gridSpan`) keeps the anchors and drops the covered positions; a writer targeting a format that stores covered positions explicitly (ODF, pptx) writes both; a reader checks its own output against it.
|
|
25
|
+
*/
|
|
26
|
+
function walkTableGrid(table) {
|
|
27
|
+
const anchors = [];
|
|
28
|
+
return table.rows.map((row, rowIndex) => row.cells.map((cell, columnIndex) => {
|
|
29
|
+
const anchor = coveringAnchor(anchors, rowIndex, columnIndex);
|
|
30
|
+
if (anchor !== void 0) return {
|
|
31
|
+
rowIndex,
|
|
32
|
+
columnIndex,
|
|
33
|
+
cell,
|
|
34
|
+
anchorRowIndex: anchor.row,
|
|
35
|
+
anchorColumnIndex: anchor.column
|
|
36
|
+
};
|
|
37
|
+
anchors.push({
|
|
38
|
+
row: rowIndex,
|
|
39
|
+
column: columnIndex,
|
|
40
|
+
rowEnd: rowIndex + tableCellRowSpan(cell),
|
|
41
|
+
columnEnd: columnIndex + tableCellColumnSpan(cell)
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
rowIndex,
|
|
45
|
+
columnIndex,
|
|
46
|
+
cell
|
|
47
|
+
};
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
function placedGridWidth(rows, columnCount) {
|
|
51
|
+
let width = columnCount;
|
|
52
|
+
for (const row of rows) for (const { columnIndex, cell } of row.cells) width = Math.max(width, columnIndex + tableCellColumnSpan(cell));
|
|
53
|
+
return width;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Build dense rows from cells a reader has already positioned, filling every position no cell was placed at with an empty covered cell.
|
|
57
|
+
*
|
|
58
|
+
* `columnCount` is the grid width the source declared (a docx `w:tblGrid`, an ODF `table:table-column` run). The result is that wide, or wider if some row places a cell past it, so that every returned row has the same length whatever the source's own grid declaration said.
|
|
59
|
+
*/
|
|
60
|
+
function denseTableRows(rows, columnCount) {
|
|
61
|
+
const width = placedGridWidth(rows, columnCount);
|
|
62
|
+
return rows.map((row) => {
|
|
63
|
+
const cells = Array.from({ length: width }, () => ({ blocks: [] }));
|
|
64
|
+
for (const { columnIndex, cell } of row.cells) cells[columnIndex] = cell;
|
|
65
|
+
return {
|
|
66
|
+
...row,
|
|
67
|
+
cells
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function occupiedColumns(occupied, rowIndex) {
|
|
72
|
+
const existing = occupied.get(rowIndex);
|
|
73
|
+
if (existing !== void 0) return existing;
|
|
74
|
+
const created = /* @__PURE__ */ new Set();
|
|
75
|
+
occupied.set(rowIndex, created);
|
|
76
|
+
return created;
|
|
77
|
+
}
|
|
78
|
+
function positionAnchorRows(rows) {
|
|
79
|
+
const occupied = /* @__PURE__ */ new Map();
|
|
80
|
+
return rows.map((row, rowIndex) => {
|
|
81
|
+
const taken = occupiedColumns(occupied, rowIndex);
|
|
82
|
+
let column = 0;
|
|
83
|
+
const cells = row.cells.map((cell) => {
|
|
84
|
+
while (taken.has(column)) column++;
|
|
85
|
+
const lastRow = rowIndex + tableCellRowSpan(cell);
|
|
86
|
+
const lastColumn = column + tableCellColumnSpan(cell);
|
|
87
|
+
for (let r = rowIndex; r < lastRow; r++) {
|
|
88
|
+
const rowTaken = occupiedColumns(occupied, r);
|
|
89
|
+
for (let c = column; c < lastColumn; c++) rowTaken.add(c);
|
|
90
|
+
}
|
|
91
|
+
const positioned = {
|
|
92
|
+
columnIndex: column,
|
|
93
|
+
cell
|
|
94
|
+
};
|
|
95
|
+
column = lastColumn;
|
|
96
|
+
return positioned;
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
99
|
+
...row,
|
|
100
|
+
cells
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Build dense rows from anchor cells alone, placing each at the first grid column no earlier cell already reaches -- the placement HTML's own table model needs, where a `rowspan` in one row silently consumes a column in the rows below it and nothing marks the consumed position.
|
|
106
|
+
*
|
|
107
|
+
* `columnCount` is the grid width the source declared, where it declares one at all; pass 0 when it does not and the width follows from the placement.
|
|
108
|
+
*/
|
|
109
|
+
function placeAnchorTableRows(rows, columnCount) {
|
|
110
|
+
return denseTableRows(positionAnchorRows(rows), columnCount);
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { denseTableRows, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-content-model",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.12.0",
|
|
4
4
|
"description": "The canonical, format-agnostic content and document-tree schemas shared by ooxml.js, odf.js, documents.js, pdf-codec, and markdown-codec, plus the structural transform between them -- no format-specific or I/O behaviour.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"blocks": {
|
|
134
134
|
"type": "array",
|
|
135
135
|
"items": {
|
|
136
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
136
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
"breakType": {
|
|
@@ -151,19 +151,19 @@
|
|
|
151
151
|
"default": {
|
|
152
152
|
"type": "array",
|
|
153
153
|
"items": {
|
|
154
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
154
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
"even": {
|
|
158
158
|
"type": "array",
|
|
159
159
|
"items": {
|
|
160
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
160
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
"first": {
|
|
164
164
|
"type": "array",
|
|
165
165
|
"items": {
|
|
166
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
166
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
},
|
|
@@ -175,19 +175,19 @@
|
|
|
175
175
|
"default": {
|
|
176
176
|
"type": "array",
|
|
177
177
|
"items": {
|
|
178
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
178
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
181
|
"even": {
|
|
182
182
|
"type": "array",
|
|
183
183
|
"items": {
|
|
184
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
184
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
187
|
"first": {
|
|
188
188
|
"type": "array",
|
|
189
189
|
"items": {
|
|
190
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
190
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
},
|
|
@@ -199,19 +199,19 @@
|
|
|
199
199
|
"default": {
|
|
200
200
|
"type": "array",
|
|
201
201
|
"items": {
|
|
202
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
202
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
"even": {
|
|
206
206
|
"type": "array",
|
|
207
207
|
"items": {
|
|
208
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
208
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
211
|
"first": {
|
|
212
212
|
"type": "array",
|
|
213
213
|
"items": {
|
|
214
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
214
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
},
|
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
"blocks": {
|
|
639
639
|
"type": "array",
|
|
640
640
|
"items": {
|
|
641
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
641
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
},
|
|
@@ -2659,7 +2659,7 @@
|
|
|
2659
2659
|
]
|
|
2660
2660
|
},
|
|
2661
2661
|
"document": {
|
|
2662
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
2662
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
|
|
2663
2663
|
},
|
|
2664
2664
|
"frame": {
|
|
2665
2665
|
"type": "object",
|
|
@@ -5021,7 +5021,7 @@
|
|
|
5021
5021
|
"blocks": {
|
|
5022
5022
|
"type": "array",
|
|
5023
5023
|
"items": {
|
|
5024
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
5024
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/undefined#/$defs/schema2"
|
|
5025
5025
|
}
|
|
5026
5026
|
}
|
|
5027
5027
|
},
|
|
@@ -8027,7 +8027,7 @@
|
|
|
8027
8027
|
]
|
|
8028
8028
|
},
|
|
8029
8029
|
"document": {
|
|
8030
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
8030
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
|
|
8031
8031
|
},
|
|
8032
8032
|
"frame": {
|
|
8033
8033
|
"$ref": "#/$defs/Box"
|
|
@@ -10353,7 +10353,7 @@
|
|
|
10353
10353
|
]
|
|
10354
10354
|
},
|
|
10355
10355
|
"document": {
|
|
10356
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
10356
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
|
|
10357
10357
|
},
|
|
10358
10358
|
"frame": {
|
|
10359
10359
|
"$ref": "#/$defs/Box"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/document-tree.schema.json",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
@@ -1993,7 +1993,7 @@
|
|
|
1993
1993
|
]
|
|
1994
1994
|
},
|
|
1995
1995
|
"document": {
|
|
1996
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
1996
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
|
|
1997
1997
|
},
|
|
1998
1998
|
"frame": {
|
|
1999
1999
|
"$ref": "#/$defs/Box"
|
|
@@ -4319,7 +4319,7 @@
|
|
|
4319
4319
|
]
|
|
4320
4320
|
},
|
|
4321
4321
|
"document": {
|
|
4322
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.
|
|
4322
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.12.0/schemas/content-document.schema.json"
|
|
4323
4323
|
},
|
|
4324
4324
|
"frame": {
|
|
4325
4325
|
"$ref": "#/$defs/Box"
|